diff --git a/brmsaptool.scm b/brmsaptool.scm index 1ac79c5..4e1574b 100644 --- a/brmsaptool.scm +++ b/brmsaptool.scm @@ -331,10 +331,19 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Member info data file +;; Member File Parser: remove comments from line and return the result +(define (mfp:line:remove-comments l) + (let ((si (substring-index "#" l))) + (if si + (if (= si 0) + "" + (car (string-chop l si))) + l))) + ;; Parses given key-value line. Key is up to first space, value is the ;; rest of the line. If the line doesn't contain anything, returns #f. (define (parse-member-line l) - (let ((sp (string-split l " "))) + (let ((sp (string-split (mfp:line:remove-comments l) " "))) (and sp (not (null? sp)) (list (string->symbol (car sp))