Index: configf.scm ================================================================== --- configf.scm +++ configf.scm @@ -113,12 +113,15 @@ (let ((targ (or (args:get-arg "-reqtarg")(args:get-arg "-target")))) (if targ (config-lookup config targ var) #f))) -(define-inline (configf:read-line p ht) - (configf:process-line (read-line p) ht)) +(define-inline (configf:read-line p ht allow-processing) + (if (and allow-processing + (not (eq? allow-processing 'return-string))) + (configf:process-line (read-line p) ht) + (read-line p))) ;; read a config file, returns hash table of alists ;; read a config file, returns hash table of alists ;; adds to ht if given (must be #f otherwise) @@ -131,11 +134,11 @@ (begin (debug:print-info 4 "read-config - file not found " path " current path: " (current-directory)) (if (not ht)(make-hash-table) ht)) (let ((inp (open-input-file path)) (res (if (not ht)(make-hash-table) ht))) - (let loop ((inl (configf:read-line inp res)) ;; (read-line inp)) + (let loop ((inl (configf:read-line inp res allow-system)) ;; (read-line inp)) (curr-section-name (if curr-section curr-section "default")) (var-flag #f);; turn on for key-var-pr and cont-ln-rx, turn off elsewhere (lead #f)) (debug:print-info 8 "curr-section-name: " curr-section-name " var-flag: " var-flag "\n inl: \"" inl "\"") (if (eof-object? inl) @@ -143,19 +146,19 @@ (close-input-port inp) (hash-table-delete! res "") ;; we are using "" as a dumping ground and must remove it before returning the ht res) (regex-case inl - (configf:comment-rx _ (loop (configf:read-line inp res) curr-section-name #f #f)) - (configf:blank-l-rx _ (loop (configf:read-line inp res) curr-section-name #f #f)) + (configf:comment-rx _ (loop (configf:read-line inp res allow-system) curr-section-name #f #f)) + (configf:blank-l-rx _ (loop (configf:read-line inp res allow-system) curr-section-name #f #f)) (configf:include-rx ( x include-file ) (let ((curr-dir (current-directory)) (conf-dir (pathname-directory path))) (if conf-dir (change-directory conf-dir)) (read-config include-file res allow-system environ-patt: environ-patt curr-section: curr-section-name sections: sections) (change-directory curr-dir) - (loop (configf:read-line inp res) curr-section-name #f #f))) - (configf:section-rx ( x section-name ) (loop (configf:read-line inp res) + (loop (configf:read-line inp res allow-system) curr-section-name #f #f))) + (configf:section-rx ( x section-name ) (loop (configf:read-line inp res allow-system) ;; if we have the sections list then force all settings into "" and delete it later? (if (or (not sections) (member section-name sections)) section-name "") ;; stick everything into "" #f #f)) @@ -179,12 +182,12 @@ key (case allow-system ((return-procs) val-proc) ((return-string) cmd) (else (val-proc))))) - (loop (configf:read-line inp res) curr-section-name #f #f)) - (loop (configf:read-line inp res) curr-section-name #f #f))) + (loop (configf:read-line inp res allow-system) curr-section-name #f #f)) + (loop (configf:read-line inp res allow-system) curr-section-name #f #f))) (configf:key-val-pr ( x key unk1 val unk2 ) (let* ((alist (hash-table-ref/default res curr-section-name '())) (envar (and environ-patt (string-search (regexp environ-patt) curr-section-name))) (realval (if envar (config:eval-string-in-environment val) val))) @@ -193,11 +196,11 @@ (begin ;; (debug:print-info 4 "read-config key=" key ", val=" val ", realval=" realval) (setenv key realval))) (hash-table-set! res curr-section-name (config:assoc-safe-add alist key realval)) - (loop (configf:read-line inp res) curr-section-name key #f))) + (loop (configf:read-line inp res allow-system) curr-section-name key #f))) ;; if a continued line (configf:cont-ln-rx ( x whsp val ) (let ((alist (hash-table-ref/default res curr-section-name '()))) (if var-flag ;; if set to a string then we have a continued var (let ((newval (conc (config-lookup res curr-section-name var-flag) "\n" @@ -207,15 +210,15 @@ "") val))) ;; (print "val: " val "\nnewval: \"" newval "\"\nvarflag: " var-flag) (hash-table-set! res curr-section-name (config:assoc-safe-add alist var-flag newval)) - (loop (configf:read-line inp res) curr-section-name var-flag (if lead lead whsp))) - (loop (configf:read-line inp res) curr-section-name #f #f)))) + (loop (configf:read-line inp res allow-system) curr-section-name var-flag (if lead lead whsp))) + (loop (configf:read-line inp res allow-system) curr-section-name #f #f)))) (else (debug:print 0 "ERROR: problem parsing " path ",\n \"" inl "\"") (set! var-flag #f) - (loop (configf:read-line inp res) curr-section-name #f #f)))))))) + (loop (configf:read-line inp res allow-system) curr-section-name #f #f)))))))) ;; pathenvvar will set the named var to the path of the config (define (find-and-read-config fname #!key (environ-patt #f)(given-toppath #f)(pathenvvar #f)) (let* ((curr-dir (current-directory)) (configinfo (find-config fname toppath: given-toppath)) Index: dashboard-main.scm ================================================================== --- dashboard-main.scm +++ dashboard-main.scm @@ -210,11 +210,16 @@ (define (main-panel) (iup:dialog #:title "Menu Test" #:menu (main-menu) - (let ((tabtop (iup:tabs (mtest) (rconfig) (tests) (runs)))) - (iup:attribute-set! tabtop "TABTITLE0" "Megatest") - (iup:attribute-set! tabtop "TABTITLE1" "Runconfigs") - (iup:attribute-set! tabtop "TABTITLE2" "Tests") - (iup:attribute-set! tabtop "TABTITLE3" "Runs") + (let ((tabtop (iup:tabs + (runs) + (mtest) + (rconfig) + (tests) + ))) + (iup:attribute-set! tabtop "TABTITLE0" "Runs") + (iup:attribute-set! tabtop "TABTITLE3" "Tests") + (iup:attribute-set! tabtop "TABTITLE1" "megatest.config") + (iup:attribute-set! tabtop "TABTITLE2" "runconfigs.config") tabtop)))