Random Bits of Open Code

Check-in [9c9044594c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Resurected textcalc
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:9c9044594c72ef9aa4d9d00e30045b2b1faaa578
User & Date: matt 2019-05-07 04:43:17
Context
2019-05-08
05:54
Added torus check-in: 6da40221e5 user: matt tags: trunk
2019-05-07
04:43
Resurected textcalc check-in: 9c9044594c user: matt tags: trunk
2019-05-06
18:09
Merged changes for mtdb to trunk check-in: d63085db62 user: mrwellan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to textcalc/textcalc.scm.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
...
341
342
343
344
345
346
347

348
349
350
351
352
353
354
355
;; push
;; pop
;; set-scope
;;
(use regex-case)

(define textcalc-version 0.1)
(require-library margs)
(use sqlite3 srfi-69 srfi-1 regex-case format)
(import (prefix sqlite3 sqlite3:))

;; (define *verbosity* 1)

(define help (conc "
Textcalc, documentation at http://www.kiatoa.com/fossils/opensource
................................................................................
	(let ((outres (string-intersperse 
		       res
		       "\n")))
	  (debug:print 4 "INFO: shell result:\n" outres)
	  outres)
	(begin
	  (with-output-to-port (current-error-port)

	    (print "ERROR: " cmd " returned bad exit code " status))
	  ""))))

(define (set-state_info db #!key (timename "current")(page #f)(section #f)(var #f))
  (let* ((stinfo   (db:get-state_info db (if timename timename "current")))
	 (have-tn  (vector-ref stinfo 0))
	 (tn       (if have-tn have-tn timename)))
    (if have-tn







|







 







>
|







3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
...
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
;; push
;; pop
;; set-scope
;;
(use regex-case)

(define textcalc-version 0.1)
(use (prefix margs args:))
(use sqlite3 srfi-69 srfi-1 regex-case format)
(import (prefix sqlite3 sqlite3:))

;; (define *verbosity* 1)

(define help (conc "
Textcalc, documentation at http://www.kiatoa.com/fossils/opensource
................................................................................
	(let ((outres (string-intersperse 
		       res
		       "\n")))
	  (debug:print 4 "INFO: shell result:\n" outres)
	  outres)
	(begin
	  (with-output-to-port (current-error-port)
	    (lambda ()
	      (print "ERROR: " cmd " returned bad exit code " status)))
	  ""))))

(define (set-state_info db #!key (timename "current")(page #f)(section #f)(var #f))
  (let* ((stinfo   (db:get-state_info db (if timename timename "current")))
	 (have-tn  (vector-ref stinfo 0))
	 (tn       (if have-tn have-tn timename)))
    (if have-tn