summaryrefslogtreecommitdiff
path: root/guimb/scm/sieve.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guimb/scm/sieve.scm')
-rw-r--r--guimb/scm/sieve.scm19
1 files changed, 16 insertions, 3 deletions
diff --git a/guimb/scm/sieve.scm b/guimb/scm/sieve.scm
index 15d12d42f..64ead17dc 100644
--- a/guimb/scm/sieve.scm
+++ b/guimb/scm/sieve.scm
@@ -318,7 +318,7 @@
((eof-object? current-token)
(syntax-error "Expected string-list but found " current-token))
((eq? (car current-token) 'string)
- (list (cdr current-token)))
+ (list 'string-list (cdr current-token)))
((not (eq? (car current-token) 'delimiter))
(syntax-error "Expected string-list but found " (car current-token)))
((char=? (cdr current-token) #\[)
@@ -876,8 +876,13 @@
(define output #f)
(define (sieve-usage)
- (display "usage: sieve.scm --file FILENAME [--output FILENAME]")
- (newline)
+ (display "usage: sieve.scm [OPTIONS]\n")
+ (display "GNU sieve.scm -- compile a Sieve program into Scheme code\n")
+ (display "Options are:\n")
+ (display " -f, --file FILENAME Set input file name\n")
+ (display " -o, --output FILENAME Set output file name\n")
+ (display " -L, --lib-dir DIRNAME Set sieve library directory name\n")
+ (display " -d, --debug LEVEL Set debugging level\n")
(exit 0))
(define (sieve-expand-filename name)
@@ -907,6 +912,10 @@
(value #t))
(output (single-char #\o)
(value #t))
+ (debug (single-char #\d)
+ (value #t))
+ (lib-dir (single-char #\L)
+ (value #t))
(help (single-char #\h))))
(define program-name (car (command-line)))
@@ -916,8 +925,12 @@
(cond
((pair? x)
(case (car x)
+ ((debug)
+ (set! sieve-debug (string->number (cdr x))))
((file)
(set! filename (cdr x)))
+ ((lib-dir)
+ (set! sieve-libdir (cdr x)))
((output)
(set! output (cdr x)))
((help)

Return to:

Send suggestions and report system problems to the System administrator.