75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
((get)
(let* ((parts (string-split cmd))
(sect (car parts))
(var (cadr parts)))
(conc "(lambda (ht)(config-lookup ht \"" sect "\" \"" var "\"))")))
((runconfigs-get) (conc "(lambda (ht)(runconfigs-get ht \"" cmd "\"))"))
(else "(lambda (ht)(print \"ERROR\") \"ERROR\")"))))
(print "fullcmd=" fullcmd)
(with-input-from-string fullcmd
(lambda ()
(set! result ((eval (read)) ht))))
(loop (conc prestr result poststr)))
res))
res)))
|
|
|
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
((get)
(let* ((parts (string-split cmd))
(sect (car parts))
(var (cadr parts)))
(conc "(lambda (ht)(config-lookup ht \"" sect "\" \"" var "\"))")))
((runconfigs-get) (conc "(lambda (ht)(runconfigs-get ht \"" cmd "\"))"))
(else "(lambda (ht)(print \"ERROR\") \"ERROR\")"))))
;; (print "fullcmd=" fullcmd)
(with-input-from-string fullcmd
(lambda ()
(set! result ((eval (read)) ht))))
(loop (conc prestr result poststr)))
res))
res)))
|