TODO fix Path math everywhere
#include <stdio.h>
#define PATH_MAX "evil"
int main () {
return 0;
}
DONE [#A] convince the Guix people to use scheme everywhere scheme
(define (main args)
;;the option specification tells getopt-long how
;; to parse the command line
(let* ((option-spec '((version (single-char #\v) (value #f))
(help (single-char #\h) (value #f))
(calc (single-char #\c) (value #t)
;; (required #t)
)))
;; tell getopt-long to parse the command line and put the
;; data in options
(options (getopt-long args option-spec))
;; was --help or -h used?
(help-wanted (option-ref options 'help #f))
(version-wanted (option-ref options 'version #f))
;; was -c or --calc used? If there was no value given,
;; then return #f
(calc-wanted (option-ref options '() #f)))
(if (or version-wanted help-wanted)
(cond
(help-wanted
(display "calc [options]\n")
(display "-v --version Display version\n")
(display "-h, --help Display this help info\n"))
(version-wanted
(display "calc version 0.1\n")))
(display calc-wanted))))