summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-04-19 12:29:52 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-04-19 12:29:52 +0000
commit9c0caf82fe4e87624c395060e9f6a607d4ebef34 (patch)
treeb068983783789d77149c22da16fe5fa4ef16ac09
parentbf2774af82ff249eea50f631f86495048f084589 (diff)
downloadmailutils-9c0caf82fe4e87624c395060e9f6a607d4ebef34.tar.gz
mailutils-9c0caf82fe4e87624c395060e9f6a607d4ebef34.tar.bz2
(sieve-parse-command): Bugfix: must always return a list whose car is
the token type. New command line options: --debug and --lib-dir
-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.