Use STDPORTS.

This commit is contained in:
sperber 2002-02-21 14:00:42 +00:00
parent d5dcfe983d
commit f097c07cbf
1 changed files with 9 additions and 7 deletions

View File

@ -76,11 +76,13 @@
(cond
((procedure? and-then)
(run (| (begin (man section key man-path))
(begin (and-then key section)))))
(begin (and-then key section)))
stdports))
(else
(run (| (begin (man section key man-path))
(,@rman/rman ,@and-then
-r ,(reference-template entry section))))))))
-r ,(reference-template entry section)))
stdports)))))
(if (not (zero? status))
(http-error http-reply/internal-error #f
@ -105,8 +107,7 @@
(if (not (zero?
(with-env (("MANPATH" . ,(string-join man-path ":")))
(run (,@rman/man ,@(if section `(,section) '()) ,key)
(< /dev/null)
(> 2 /dev/null)))))
stdports))))
(http-error http-reply/not-found #f "man page not found")))))
(define man-default-sections
@ -153,8 +154,8 @@
(define (cat-n-decode file)
(let ((ext (file-name-extension file)))
(cond
((string=? ".gz" ext) (run (,@rman/gzcat ,file)))
((string=? ".Z" ext) (run (,@rman/zcat ,file)))
((string=? ".gz" ext) (run (,@rman/gzcat ,file) stdports))
((string=? ".Z" ext) (run (,@rman/zcat ,file) stdports))
(else (call-with-input-file
file
(lambda (port)
@ -164,5 +165,6 @@
(if (not (zero? (run (| (begin (cat-n-decode file))
(begin
(with-cwd (file->man-directory file)
(exec-epf (,@rman/nroff))))))))
(exec-epf (,@rman/nroff)))))
stdports)))
(http-error http-reply/not-found #f "man page not found")))