The Lambda Lab
/
projects
/
scratchy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7aa244c
)
Added missing termination periods to text and index output.
author
Tim Vaughan
<tgvaughan@gmail.com>
Sat, 25 May 2019 11:47:45 +0000
(13:47 +0200)
committer
Tim Vaughan
<tgvaughan@gmail.com>
Sat, 25 May 2019 11:47:45 +0000
(13:47 +0200)
burrower.scm
patch
|
blob
|
history
diff --git
a/burrower.scm
b/burrower.scm
index
e600f90
..
2886a07
100644
(file)
--- a/
burrower.scm
+++ b/
burrower.scm
@@
-25,7
+25,7
@@
(define burrower-footer
(conc "\n"
"--------------------------------------------------\n"
(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
"Powered by Chicken Scheme!"))
;;; Server loop
@@
-134,18
+134,21
@@
(serve-info-records (read-line)))
(loop (peek-char)))))))
(if (config-display-footer config)
(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)
(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)
(error "File not found." filename))))
(define (serve-binary-file selector config)
@@
-304,9
+307,9
@@
(config-port-set! config (string->number (caddr args))))
(run-server 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)
;; (test)