71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
(loop (read-line inp) curr-section-name)))
(key-val-pr ( x key val ) (let ((alist (hash-table-ref/default res curr-section-name '())))
(hash-table-set! res curr-section-name
(config:assoc-safe-add alist key val))
;; (append alist (list (list key val))))
(loop (read-line inp) curr-section-name)))
(else (debug:print 0 "ERROR: problem parsing " path ",\n \"" inl "\"")
(loop (read-line inp) curr-section-name))))))))
(define (find-and-read-config fname)
(let* ((curr-dir (current-directory))
(configinfo (find-config fname))
(toppath (car configinfo))
(configfile (cadr configinfo)))
(if toppath (change-directory toppath))
|
|
>
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
(loop (read-line inp) curr-section-name)))
(key-val-pr ( x key val ) (let ((alist (hash-table-ref/default res curr-section-name '())))
(hash-table-set! res curr-section-name
(config:assoc-safe-add alist key val))
;; (append alist (list (list key val))))
(loop (read-line inp) curr-section-name)))
(else (debug:print 0 "ERROR: problem parsing " path ",\n \"" inl "\"")
(loop (read-line inp) curr-section-name)))))
(close-input-port inp))))
(define (find-and-read-config fname)
(let* ((curr-dir (current-directory))
(configinfo (find-config fname))
(toppath (car configinfo))
(configfile (cadr configinfo)))
(if toppath (change-directory toppath))
|