diff --git a/bin/.cvsignore b/bin/.cvsignore
index de46628c..435c7213 100644
--- a/bin/.cvsignore
+++ b/bin/.cvsignore
@@ -134,3 +134,8 @@ xd
yacc
yuv
zip
+grep
+iconv
+import
+sed
+troff2html
diff --git a/bin/man b/bin/man
index f11fd04d..dd4e042d 100755
--- a/bin/man
+++ b/bin/man
@@ -2,11 +2,9 @@
. $PLAN9/man/fonts
-cmd=n
-sec=()
-S=$PLAN9/man
-d=0
-
+#
+# formatters
+#
fn roff {
preproc=()
x=`{doctype $2}
@@ -38,6 +36,46 @@ fn roff {
}
}
+fn doecho { echo $1 }
+fn dotroff { roff t $1 }
+fn doproof { roff t $1 | proof }
+fn dopage { roff t $1 | page }
+fn donroff {
+ roff n $1 | sed '
+ ${
+ /^$/p
+ }
+ //N
+ /^\n$/D
+ '
+}
+seq=0
+fn dohtml {
+ MAN=manhtml
+ b=`{echo $1 | sed 's/\.[0-9].*//'}
+ if(test -f $b.html)
+ web $b.html
+ if not{
+ roff t $1 | troff2html >/tmp/man.$pid.$seq.html
+ web /tmp/man.$pid.$seq.html
+ seq=`{echo 1+$seq | hoc}
+ }
+}
+
+
+#
+# setup
+#
+if(! ~ $path(1) $PLAN9/bin)
+ path=($PLAN9/bin $path)
+cmd=donroff
+sec=()
+S=$PLAN9/man
+
+#
+# parse flags and sections
+#
+d=0
while(~ $d 0) {
if(~ $#* 0) {
echo 'Usage: man [-ntp] [-s sec] [0-9] [0-9] ... name1 name2 ...' >[1=2]
@@ -48,63 +86,62 @@ while(~ $d 0) {
shift
}
if not switch($1) {
- case -t ; cmd=t ; shift
- case -n ; cmd=n ; shift
- case -p ; cmd=p ; shift
- case -P ; cmd=P ; shift
+ case -t ; fmt=dotroff ; shift
+ case -n ; cmd=donroff ; shift
+ case -p ; cmd=doproof ; shift
+ case -P ; cmd=dopage ; shift
+ case -w ; cmd=doecho ; shift
+ case -h ; cmd=dohtml ; shift
+ case -- ; d=1 ; shift
case * ; d=1
}
}
if(~ $#sec 0) {
sec=`{ls -pd $S/man[0-9]* | sed 's/man//'}
}
-ix=$S/man$sec/INDEX
-if(~ $#* 1) pat='^'^$1^' '
-if not pat='^('^`{echo $* | 9 sed 's/ /|/g'}^') '
-fils=()
-for(i in $S/man$sec){
- if(test -f $i/INDEX){
- try=`{grep $pat $i/INDEX | 9 sed 's/^[^ ]* //'}
- if(! ~ $#try 0)
- fils=($fils $i/$try)
- }
-}
-# bug: should also do following loop if not all pages found
-if(~ $#fils 0) {
- # nothing in INDEX. try for file of given name
- for(i) {
- for(n in $sec) {
- try=$S/man$n/$i.$n*
- if (test -f $try)
- fils=($fils $try)
+
+#
+# search index
+#
+allfiles=()
+missing=no
+for(word){
+ files=()
+ regexp='^'^$word^' '
+ for(i in $S/man$sec){
+ if(test -f $i/INDEX){
+ try=`{grep $regexp $i/INDEX | sed 's/^[^ ]* //'}
+ if(! ~ $#try 0)
+ files=($files $i/$try)
}
}
- if(~ $#fils 0) {
- echo 'man: no manual page' >[1=2]
- exit 'no man'
+ if(~ $#files 0){
+ for(i in $S/man$sec){
+ if(test -f $i/$word.[0-9]*)
+ files=($files $i/$word.[0-9]*)
+ }
}
+ if(~ $#files 0){
+ echo 'man: no manual page' $word >[1=2]
+ missing=yes
+ }
+ allfiles=($allfiles $files)
}
-for(i in $fils) {
- if(! test -f $i)
+if(~ $#allfiles 0)
+ exit 'no man'
+allfiles=`{ls $allfiles | sort -u >[2]/dev/null}
+
+files=()
+for(i in $allfiles){
+ if(test -f $i)
+ files=($files $i)
+ if not
echo need $i >[1=2]
- if not {
- switch($cmd) {
- case t
- roff t $i
-
- case p
- roff t $i | proof
-
- case P
- roff t $i |tr2post |psfonts |page
-
- case n
- roff n $i | 9 sed '
- ${
- /^$/p
- }
- //N
- /^\n$/D'
- }
- }
}
+
+#
+# format pages
+#
+for(i in $files)
+ $cmd $i
+
diff --git a/dict/.cvsignore b/dict/.cvsignore
index 6a0079bd..72e8ffc0 100644
--- a/dict/.cvsignore
+++ b/dict/.cvsignore
@@ -1,2 +1 @@
-pgw
-pgwindex
+*
diff --git a/dist/download.html b/dist/download.html
new file mode 100644
index 00000000..838c952e
--- /dev/null
+++ b/dist/download.html
@@ -0,0 +1,162 @@
+
+
+
+
+
+Plan 9 from User Space - Download
+
+
+
+ | |
+ |
|
+
+
+
+
+
+ Plan 9 from User Space - Download
+
+
+
+ overview
+ |
+ screen shots
+ |
+ manual
+ |
+ install notes
+ |
+ download
+ |
+ cvs
+ |
+ unix
+
+
+ Plan 9 from User Space (aka plan9port)
+ is a port of many Plan 9 programs from their native
+ Plan 9
+ environment to Unix-like operating systems.
+
+
+ supported systems
+
+ |
+ | |
+ Linux (x86 and PowerPC),
+ FreeBSD (x86),
+ Mac OS X (Power PC),
+ SunOS (Sparc).
+ |
+
+
+ getting started
+
+ |
+ | |
+ Start with the overview in
+ intro(1).
+ Install(1)
+ explains how to install the system.
+ |
+
+
+ acknowledgements
+
+ |
+ | |
+
+ Most obviously, plan9port derives from
+ Plan 9 from Bell Labs
+ and would not exist without the work of the Plan 9 team over the
+ past many years.
+
+
+
+ Many people have provided help,
+ ported programs, written bug reports,
+ sent useful patches, and gotten plan9port running on new
+ operating systems. A few have done far more than their fair share.
+
+
+
+ Rob Pike suggested the original X11 port of libdraw years ago,
+ as part of drawterm, and strongly encouraged the Mac OS X work.
+ He has also been a consistent source of good ideas to hide
+ the ugliness of modern Unix.
+
+
+
+ William Josephson handled
+ troff(1)
+ (with Taj Khattra) and many of
+ the supporting programs. He also inspired the recent thread library
+ clean-up and has ported a handful of applications.
+
+
+
+ Andrey Mirtchovski and Axel Belinfante have done significant
+ work dealing with X11 corner cases and fine-tuning
+ rio(1).
+ Axel never tires of finding bugs in the SunOS port.
+
+
+
+ Eric Van Hensbergen brought the system up on Linux/PowerPC.
+
+
+
+ Thanks to all.
+
+ |
+
+
+ contact
+
+
+
+ unix extracts
+
+ |
+ | |
+ The UTF-8 library, the formatted print library,
+ the buffered I/O library, the (Unicode-capable) regular expression
+ library, and mk are available in packaging separate from plan9port.
+ |
+
+
+ history
+
+
+
+ |
|
+ |
+
+
+
diff --git a/dist/main.html b/dist/main.html
new file mode 100644
index 00000000..aa177bb8
--- /dev/null
+++ b/dist/main.html
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+Plan 9 from User Space
+
+
+
+ | |
+ |
|
+
+
+
+
+
+ Plan 9 from User Space
+
+
+
+ overview
+ |
+ screen shots
+ |
+ manual
+ |
+ install notes
+ |
+ cvs
+ |
+ unix
+
+
+ Plan 9 from User Space (aka plan9port)
+ is a port of many Plan 9 programs from their native
+ Plan 9
+ environment to Unix-like operating systems.
+
+
+ supported systems
+
+ |
+ | |
+ Linux (x86 and PowerPC),
+ FreeBSD (x86),
+ Mac OS X (Power PC),
+ SunOS (Sparc).
+ |
+
+
+ getting started
+
+ |
+ | |
+ Start with the overview in
+ intro(1).
+ For information on installing the system, see
+ Install(1).
+ |
+
+
+ download
+
+
+
+ acknowledgements
+
+ |
+ | |
+
+ Most obviously, plan9port derives from
+ Plan 9 from Bell Labs
+ and would not exist without the work of the Plan 9 team over the
+ past many years.
+
+
+
+ Rob Pike suggested the original X11 port of libdraw years ago,
+ as part of drawterm, and strongly encouraged the Mac OS X work.
+ He has also been a consistent source of good ideas to hide
+ the ugliness of modern Unix.
+
+
+
+ William Josephson handled
+ troff(1)
+ (with Taj Khattra) and many of
+ the supporting programs. He also inspired the recent thread library
+ clean-up and has ported a handful of applications.
+
+
+
+ Andrey Mirtchovski and Axel Belinfante have done significant
+ work dealing with X11 corner cases and fine-tuning
+ rio(1).
+ Axel never tires of finding bugs in the SunOS port.
+
+
+
+ Latchesar Ionkov has contributed many fixes to tricky bugs.
+
+
+
+ Many other people have provided help,
+ ported programs, written bug reports,
+ sent useful patches, and gotten plan9port running on new
+ systems.
+
+
+
+ Thanks to all.
+
+ |
+
+
+ contact
+
+
+
+
+ unix extracts
+
+ |
+ | |
+ The UTF-8 library, the formatted print library,
+ the buffered I/O library, the (Unicode-capable) regular expression
+ library, and mk are available in packaging separate from plan9port.
+
+
+
+ See http://swtch.com/plan9port/unix/.
+ |
+
+
+ history
+
+
+
+ |
|
+ |
+
+
+
diff --git a/dist/manindexbottom.html b/dist/manindexbottom.html
new file mode 100644
index 00000000..19ae28a7
--- /dev/null
+++ b/dist/manindexbottom.html
@@ -0,0 +1,13 @@
+
+
+
+ | |
+ |
|
+
+
+
+ |
+
+
+ |