Make web server

This commit is contained in:
2024-09-05 14:46:05 -07:00
parent 9e35fed164
commit c6cadc3123
11 changed files with 525 additions and 142 deletions

View File

@ -130,7 +130,8 @@ arguments will be placed in a list at the beginning of the alist."
finally (setf output-other (nconc (nreverse rest) output-other)))
(cons (nreverse output-other) output-opts)))
(defun print-usage (stream spec exec-name &optional general-args)
(defun print-usage (stream spec exec-name &key general-args
(print-astrisk t))
"Print the command line usage corresponding to SPEC to STREAM."
(format stream "usage: ~a [options]~@[ ~a~]~%~%" exec-name general-args)
(loop with longest-option
@ -149,8 +150,9 @@ arguments will be placed in a list at the beginning of the alist."
(format stream " ~v@<~@[-~c~]~@[, ~*~]~@[--~a~]~@[=<arg>~*~]~> ~a~%"
longest-option
short (or short long) long has-arg-p desc))
(format stream "~%The choice surrounded by '*' is the default. Arguments to long
options are also required for their short variant.~%"))
(format stream
"~%~@[The choice surrounded by '*' is the default. ~]Arguments to long~:[ ~;~%~]~
options are also required for their short variant.~%" print-astrisk print-astrisk))
(defun option-value (opt opts)
"Get the value of command line option OPT from OTPS, which is an alist as