(define burrower-footer
(conc "\n"
"--------------------------------------------------\n"
- "This gopher hole was dug using Burrower v" burrower-version "\n"
+ "This gopher hole was dug using Burrower v" burrower-version ".\n"
"Powered by Chicken Scheme!"))
;;; Server loop
(serve-info-records (read-line)))
(loop (peek-char)))))))
(if (config-display-footer config)
- (serve-info-records burrower-footer)))
+ (serve-info-records burrower-footer))
+ (print ".\r"))
(error "Index file not found."))))
(define (serve-text-file selector config)
(let ((filename (make-pathname (config-root-dir config) selector)))
(if (legal-filename? filename config)
- (with-input-from-file filename
- (lambda ()
- (for-each
- (lambda (line)
- (print line "\r"))
- (read-lines))))
+ (begin
+ (with-input-from-file filename
+ (lambda ()
+ (for-each
+ (lambda (line)
+ (print line "\r"))
+ (read-lines))))
+ (print ".\r"))
(error "File not found." filename))))
(define (serve-binary-file selector config)
(config-port-set! config (string->number (caddr args))))
(run-server config)))))))
-(main)
+;; (main)
-;; (define (test)
-;; (run-server (make-config "gopher-root" "localhost" 70 #t)))
+(define (test)
+ (run-server (make-config "gopher-root" "localhost" 70 #t)))
;; (test)