summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-06-16 09:57:45 -0500
committerCase Duckworth2022-06-16 09:57:45 -0500
commite13f4f99188aee63d8ed0121221529e4fcacfb6d (patch)
tree7f91c0aa45855560a48501d87bc75140a781892e
parentAdd extra/qotd.service (diff)
downloadqotd-e13f4f99188aee63d8ed0121221529e4fcacfb6d.tar.gz
qotd-e13f4f99188aee63d8ed0121221529e4fcacfb6d.zip
Convert arguments to numbers
-rwxr-xr-xqotd.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/qotd.scm b/qotd.scm index 92ea1a8..394085d 100755 --- a/qotd.scm +++ b/qotd.scm
@@ -64,10 +64,14 @@ An implementation of the QOTD protocol (RFC 865)
64 (member "-h" args)) 64 (member "-h" args))
65 (usage) 65 (usage)
66 (exit 0)) 66 (exit 0))
67 ((member "-port" args) => (lambda (a) (set! qotd-port (cadr a)))) 67 ((member "-port" args)
68 ((member "-host" args) => (lambda (a) (set! qotd-host (cadr a)))) 68 => (lambda (a) (set! qotd-port (string->number (cadr a)))))
69 ((member "-backlog" args) => (lambda (a) (set! qotd-backlog (cadr a)))) 69 ((member "-host" args)
70 ((member "-file" args) => (lambda (a) (set! qotd-file (cadr a))))) 70 => (lambda (a) (set! qotd-host (cadr a))))
71 ((member "-backlog" args)
72 => (lambda (a) (set! qotd-backlog (string->number (cadr a)))))
73 ((member "-file" args)
74 => (lambda (a) (set! qotd-file (cadr a)))))
71 (argloop (cdr args))))) 75 (argloop (cdr args)))))
72 76
73 (with-output-to-port (current-error-port) 77 (with-output-to-port (current-error-port)