diff options
author | Case Duckworth | 2022-06-16 09:57:45 -0500 |
---|---|---|
committer | Case Duckworth | 2022-06-16 09:57:45 -0500 |
commit | e13f4f99188aee63d8ed0121221529e4fcacfb6d (patch) | |
tree | 7f91c0aa45855560a48501d87bc75140a781892e | |
parent | Add extra/qotd.service (diff) | |
download | qotd-e13f4f99188aee63d8ed0121221529e4fcacfb6d.tar.gz qotd-e13f4f99188aee63d8ed0121221529e4fcacfb6d.zip |
Convert arguments to numbers
-rwxr-xr-x | qotd.scm | 12 |
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) |