From ff4def43e39e7966014db746dda3039b0c3dbee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 18 Mar 2020 23:31:43 +0100 Subject: Remove output flag to main main. --- module/main.scm | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) (limited to 'module/main.scm') diff --git a/module/main.scm b/module/main.scm index bb3fa041..fbf1992e 100755 --- a/module/main.scm +++ b/module/main.scm @@ -32,9 +32,8 @@ exec guile -e main -s $0 "$@" (parameters)) (define options - '((mode (value #t) (single-char #\m)) - (output (value #t) (single-char #\o)) - (statprof (value optional)))) + '((statprof (value optional)) + (help (single-char #\h)))) (define (ornull a b) (if (null? a) @@ -52,27 +51,23 @@ exec guile -e main -s $0 "$@" (when (file-exists? config-file) (primitive-load config-file))) - (with-output-to-port - (open-output-port (option-ref opts 'output "-")) - (lambda () - (let ((ropt (ornull (option-ref opts '() '()) - '("term")))) - ((case (string->symbol (car ropt)) - ((html) html-main) - ((term) terminal-main) - ((import) import-main) - ((text) text-main) - ((info) info-main) - ((ical) ical-main) - ((server) server-main) - ((benchmark) benchmark-main) - (else => (lambda (s) - (format (current-error-port) - "Unsupported mode of operation: ~a~%" - s) - (exit 1)))) - ropt)) - (newline))) + (let ((ropt (ornull (option-ref opts '() '()) + '("term")))) + ((case (string->symbol (car ropt)) + ((html) html-main) + ((term) terminal-main) + ((import) import-main) + ((text) text-main) + ((info) info-main) + ((ical) ical-main) + ((server) server-main) + ((benchmark) benchmark-main) + (else => (lambda (s) + (format (current-error-port) + "Unsupported mode of operation: ~a~%" + s) + (exit 1)))) + ropt)) (when stprof (statprof-stop) -- cgit v1.2.3