summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xqotd.scm29
1 files changed, 14 insertions, 15 deletions
diff --git a/qotd.scm b/qotd.scm index da3aba8..60efe57 100755 --- a/qotd.scm +++ b/qotd.scm
@@ -59,21 +59,20 @@ An implementation of the QOTD protocol (RFC 865)
59 (newline))) 59 (newline)))
60 60
61 (let argloop ((args arguments)) 61 (let argloop ((args arguments))
62 (cond ((null? args) #f) 62 (unless (null? args)
63 (else (cond 63 (cond ((or (string=? "-help" (car args))
64 ((or (member "-help" args) 64 (string=? "-h" (car args)))
65 (member "-h" args)) 65 (usage)
66 (usage) 66 (exit 0))
67 (exit 0)) 67 ((string=? "-port" (car args))
68 ((member "-port" args) 68 (set! qotd-port (string->number (cadr args))))
69 => (lambda (a) (set! qotd-port (string->number (cadr a))))) 69 ((string=? "-host" (car args))
70 ((member "-host" args) 70 (set! qotd-host (cadr args)))
71 => (lambda (a) (set! qotd-host (cadr a)))) 71 ((string=? "-backlog" (car args))
72 ((member "-backlog" args) 72 (set! qotd-backlog (string->number (cadr args))))
73 => (lambda (a) (set! qotd-backlog (string->number (cadr a))))) 73 ((string=? "-file" (car args))
74 ((member "-file" args) 74 (set! qotd-file (cadr args))))
75 => (lambda (a) (set! qotd-file (cadr a))))) 75 (argloop (cdr args))))
76 (argloop (cdr args)))))
77 76
78 (with-output-to-port (current-error-port) 77 (with-output-to-port (current-error-port)
79 (lambda () 78 (lambda ()