aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-14 05:28:38 +0000
committerrsc <devnull@localhost>2005-01-14 05:28:38 +0000
commit67075c3634c316ce9cc0e6fa88e65ca27503abc4 (patch)
tree708e1582e3b4b45ba40f9329b2dfef01439752e9 /bin
parent359c1e017ee367c34b082b1b4e6c002686d01bce (diff)
downloadplan9port-67075c3634c316ce9cc0e6fa88e65ca27503abc4.tar.gz
plan9port-67075c3634c316ce9cc0e6fa88e65ca27503abc4.tar.bz2
plan9port-67075c3634c316ce9cc0e6fa88e65ca27503abc4.zip
fixes
Diffstat (limited to 'bin')
-rwxr-xr-xbin/9.rc7
-rwxr-xr-xbin/man17
-rwxr-xr-xbin/page2
3 files changed, 15 insertions, 11 deletions
diff --git a/bin/9.rc b/bin/9.rc
new file mode 100755
index 00000000..1fb75d23
--- /dev/null
+++ b/bin/9.rc
@@ -0,0 +1,7 @@
+#!/usr/local/plan9/bin/rc
+
+PLAN9=/usr/local/plan9
+if(! ~ $path(1) $PLAN9/bin)
+ path=($PLAN9/bin $path)
+
+! ~ $#* 0 && exec $*
diff --git a/bin/man b/bin/man
index dd4e042d..89d1a5a7 100755
--- a/bin/man
+++ b/bin/man
@@ -1,5 +1,8 @@
#!/usr/local/plan9/bin/rc
+. 9.rc
+whatis path
+whatis troff
. $PLAN9/man/fonts
#
@@ -22,6 +25,7 @@ fn roff {
preproc=($preproc eqn)
if(~ $x *tbl*)
preproc=($preproc tbl)
+
switch($#preproc) {
case 0
{echo -n $FONTS; cat $2< /dev/null} | troff $Nflag -$MAN
@@ -39,7 +43,7 @@ fn roff {
fn doecho { echo $1 }
fn dotroff { roff t $1 }
fn doproof { roff t $1 | proof }
-fn dopage { roff t $1 | page }
+fn dopage { roff t $1 | tr2post | psfonts | page }
fn donroff {
roff n $1 | sed '
${
@@ -62,19 +66,12 @@ fn dohtml {
}
}
-
#
-# setup
-#
-if(! ~ $path(1) $PLAN9/bin)
- path=($PLAN9/bin $path)
+# parse flags and sections
+#
cmd=donroff
sec=()
S=$PLAN9/man
-
-#
-# parse flags and sections
-#
d=0
while(~ $d 0) {
if(~ $#* 0) {
diff --git a/bin/page b/bin/page
index d654a7e8..8b85e559 100755
--- a/bin/page
+++ b/bin/page
@@ -81,7 +81,7 @@ case $# in
tmp=$tmp.png
;;
*)
- echo 1>&2 unrecognized file format
+ echo 1>&2 page: unrecognized file type on standard input
rm -f $tmp
exit 1
esac