aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/.cvsignore5
-rwxr-xr-xbin/man139
-rw-r--r--dict/.cvsignore3
-rw-r--r--dist/download.html162
-rw-r--r--dist/main.html175
-rw-r--r--dist/manindexbottom.html13
-rw-r--r--dist/manindextop.html15
-rw-r--r--dist/mantrailer.html7
-rwxr-xr-xdist/manweb64
-rw-r--r--dist/mkfile13
-rw-r--r--dist/spaceglenda100.pngbin0 -> 3265 bytes
-rw-r--r--dist/unix.html234
-rw-r--r--include/bio.h2
-rw-r--r--include/regexp9.h2
-rw-r--r--man/index.html45
-rw-r--r--man/man1/9.html100
-rw-r--r--man/man1/9c.html172
-rw-r--r--man/man1/9p.html122
-rw-r--r--man/man1/9term.html259
-rw-r--r--man/man1/acid.html486
-rw-r--r--man/man1/acme.html481
-rw-r--r--man/man1/acmeevent.html332
-rw-r--r--man/man1/ascii.html159
-rw-r--r--man/man1/astro.html125
-rw-r--r--man/man1/basename.html63
-rw-r--r--man/man1/bc.html272
-rw-r--r--man/man1/bundle.html95
-rw-r--r--man/man1/cal.html81
-rw-r--r--man/man1/calendar.html82
-rw-r--r--man/man1/cat.html126
-rw-r--r--man/man1/cleanname.html65
-rw-r--r--man/man1/clog.html61
-rw-r--r--man/man1/cmp.html84
-rw-r--r--man/man1/colors.html92
-rw-r--r--man/man1/comm.html79
-rw-r--r--man/man1/core.html83
-rw-r--r--man/man1/crop.html127
-rw-r--r--man/man1/date.html75
-rw-r--r--man/man1/db.html548
-rw-r--r--man/man1/dc.html199
-rw-r--r--man/man1/deroff.html102
-rw-r--r--man/man1/dial.html67
-rw-r--r--man/man1/dict.html168
-rw-r--r--man/man1/diff.html141
-rw-r--r--man/man1/doctype.html88
-rw-r--r--man/man1/echo.html62
-rw-r--r--man/man1/ed.html439
-rw-r--r--man/man1/eqn.html203
-rw-r--r--man/man1/factor.html73
-rw-r--r--man/man1/fmt.html100
-rw-r--r--man/man1/fortune.html64
-rw-r--r--man/man1/freq.html69
-rw-r--r--man/man1/fsize.html68
-rw-r--r--man/man1/grap.html232
-rw-r--r--man/man1/graph.html117
-rw-r--r--man/man1/grep.html117
-rw-r--r--man/man1/gview.html155
-rw-r--r--man/man1/gzip.html135
-rw-r--r--man/man1/hoc.html136
-rw-r--r--man/man1/idiff.html87
-rw-r--r--man/man1/index.html449
-rw-r--r--man/man1/intro.html221
-rw-r--r--man/man1/join.html144
-rw-r--r--man/man1/jpg.html175
-rw-r--r--man/man1/kill.html96
-rw-r--r--man/man1/label.html117
-rw-r--r--man/man1/lex.html110
-rw-r--r--man/man1/look.html96
-rw-r--r--man/man1/ls.html121
-rw-r--r--man/man1/man.html139
-rw-r--r--man/man1/map.html483
-rw-r--r--man/man1/mc.html64
-rw-r--r--man/man1/mk.html621
-rw-r--r--man/man1/mk9660.1232
-rw-r--r--man/man1/mkdir.html79
-rw-r--r--man/man1/namespace.html61
-rw-r--r--man/man1/news.html91
-rw-r--r--man/man1/p.html63
-rw-r--r--man/man1/page.html97
-rw-r--r--man/man1/pic.html435
-rw-r--r--man/man1/plot.html88
-rw-r--r--man/man1/plumb.html80
-rw-r--r--man/man1/pr.html90
-rw-r--r--man/man1/proof.html119
-rw-r--r--man/man1/ps.html95
-rw-r--r--man/man1/psfonts.html148
-rw-r--r--man/man1/pwd.html73
-rw-r--r--man/man1/rc.html655
-rw-r--r--man/man1/rio.html172
-rw-r--r--man/man1/rm.html66
-rw-r--r--man/man1/sam.html577
-rw-r--r--man/man1/scat.html385
-rw-r--r--man/man1/secstore.html145
-rw-r--r--man/man1/sed.html300
-rw-r--r--man/man1/seq.html99
-rw-r--r--man/man1/sleep.html91
-rw-r--r--man/man1/sort.html200
-rw-r--r--man/man1/spell.html125
-rw-r--r--man/man1/split.html91
-rw-r--r--man/man1/src.html99
-rw-r--r--man/man1/stats.html214
-rw-r--r--man/man1/strings.html69
-rw-r--r--man/man1/sum.html92
-rw-r--r--man/man1/tail.html116
-rw-r--r--man/man1/tbl.html187
-rw-r--r--man/man1/tcs.html131
-rw-r--r--man/man1/tee.html56
-rw-r--r--man/man1/test.html156
-rw-r--r--man/man1/time.html63
-rw-r--r--man/man1/touch.html69
-rw-r--r--man/man1/tr.html107
-rw-r--r--man/man1/tr2post.html152
-rw-r--r--man/man1/troff.html126
-rw-r--r--man/man1/troff2html.196
-rw-r--r--man/man1/troff2html.html108
-rw-r--r--man/man1/tweak.html194
-rw-r--r--man/man1/uniq.html79
-rw-r--r--man/man1/units.html156
-rw-r--r--man/man1/vac.html160
-rw-r--r--man/man1/wc.html75
-rw-r--r--man/man1/web.html115
-rw-r--r--man/man1/wintext.html124
-rw-r--r--man/man1/xd.html99
-rw-r--r--man/man1/yacc.html170
-rw-r--r--man/man3/9p-cmdbuf.html128
-rw-r--r--man/man3/9p-fid.html170
-rw-r--r--man/man3/9p-file.html258
-rw-r--r--man/man3/9p-intmap.html110
-rw-r--r--man/man3/9p.html434
-rw-r--r--man/man3/9pclient.html250
-rw-r--r--man/man3/addpt.html174
-rw-r--r--man/man3/aes.html85
-rw-r--r--man/man3/allocimage.html321
-rw-r--r--man/man3/arg.html152
-rw-r--r--man/man3/arith3.html216
-rw-r--r--man/man3/atof.html170
-rw-r--r--man/man3/bin.html131
-rw-r--r--man/man3/bio.html293
-rw-r--r--man/man3/blowfish.html95
-rw-r--r--man/man3/cachechars.html292
-rw-r--r--man/man3/cleanname.html71
-rw-r--r--man/man3/color.html89
-rw-r--r--man/man3/complete.html136
-rw-r--r--man/man3/cputime.html65
-rw-r--r--man/man3/ctime.html150
-rw-r--r--man/man3/des.html170
-rw-r--r--man/man3/dial.html241
-rw-r--r--man/man3/dirread.html114
-rw-r--r--man/man3/draw.html1174
-rw-r--r--man/man3/dsa.html172
-rw-r--r--man/man3/dup.html78
-rw-r--r--man/man3/elgamal.html174
-rw-r--r--man/man3/encode.html109
-rw-r--r--man/man3/errstr.html121
-rw-r--r--man/man3/event.html390
-rw-r--r--man/man3/exec.html146
-rw-r--r--man/man3/exits.html126
-rw-r--r--man/man3/fcall.html274
-rw-r--r--man/man3/flate.html333
-rw-r--r--man/man3/fmtinstall.html339
-rw-r--r--man/man3/frame.html325
-rw-r--r--man/man3/genrandom.html84
-rw-r--r--man/man3/get9root.html109
-rw-r--r--man/man3/getcallerpc.html99
-rw-r--r--man/man3/getenv.html79
-rw-r--r--man/man3/getfields.html136
-rw-r--r--man/man3/getns.html67
-rw-r--r--man/man3/getsnarf.html73
-rw-r--r--man/man3/getuser.html75
-rw-r--r--man/man3/getwd.html84
-rw-r--r--man/man3/graphics.html592
-rw-r--r--man/man3/html.html1206
-rw-r--r--man/man3/index.html647
-rw-r--r--man/man3/intro.html288
-rw-r--r--man/man3/ioproc.html211
-rw-r--r--man/man3/ip.html345
-rw-r--r--man/man3/isalpharune.html96
-rw-r--r--man/man3/keyboard.html135
-rw-r--r--man/man3/lock.html222
-rw-r--r--man/man3/mach-cmd.html167
-rw-r--r--man/man3/mach-file.html185
-rw-r--r--man/man3/mach-map.html312
-rw-r--r--man/man3/mach-stack.html232
-rw-r--r--man/man3/mach-swap.html124
-rw-r--r--man/man3/mach-symbol.html272
-rw-r--r--man/man3/mach.html123
-rw-r--r--man/man3/malloc.html181
-rw-r--r--man/man3/matrix.html263
-rw-r--r--man/man3/memdraw.html466
-rw-r--r--man/man3/memlayer.html325
-rw-r--r--man/man3/memory.html123
-rw-r--r--man/man3/mouse.html249
-rw-r--r--man/man3/mousescrollsize.html108
-rw-r--r--man/man3/mp.html441
-rw-r--r--man/man3/muldiv.html61
-rw-r--r--man/man3/mux.html169
-rw-r--r--man/man3/nan.html79
-rw-r--r--man/man3/needstack.html98
-rw-r--r--man/man3/notify.html183
-rw-r--r--man/man3/open.html130
-rw-r--r--man/man3/opentemp.html78
-rw-r--r--man/man3/pipe.html111
-rw-r--r--man/man3/plumb.html257
-rw-r--r--man/man3/post9pservice.html67
-rw-r--r--man/man3/postnote.html80
-rw-r--r--man/man3/prime.html114
-rw-r--r--man/man3/print.html309
-rw-r--r--man/man3/proto.html140
-rw-r--r--man/man3/pushtls.html261
-rw-r--r--man/man3/qball.html111
-rw-r--r--man/man3/quaternion.html163
-rw-r--r--man/man3/quote.html164
-rw-r--r--man/man3/rand.html190
-rw-r--r--man/man3/rc4.html86
-rw-r--r--man/man3/read.html109
-rw-r--r--man/man3/regexp.html178
-rw-r--r--man/man3/rfork.html118
-rw-r--r--man/man3/rsa.html262
-rw-r--r--man/man3/rune.html157
-rw-r--r--man/man3/runestrcat.html107
-rw-r--r--man/man3/sechash.html195
-rw-r--r--man/man3/seek.html96
-rw-r--r--man/man3/sendfd.html85
-rw-r--r--man/man3/setjmp.html110
-rw-r--r--man/man3/sleep.html95
-rw-r--r--man/man3/stat.html244
-rw-r--r--man/man3/strcat.html203
-rw-r--r--man/man3/string.html244
-rw-r--r--man/man3/stringsize.html116
-rw-r--r--man/man3/subfont.html260
-rw-r--r--man/man3/sysfatal.html71
-rw-r--r--man/man3/thread.html383
-rw-r--r--man/man3/time.html79
-rw-r--r--man/man3/udpread.html105
-rw-r--r--man/man3/wait.html170
-rw-r--r--man/man3/wctl.html78
-rw-r--r--man/man3/window.html241
-rw-r--r--man/man4/9pserve.html79
-rw-r--r--man/man4/acme.html268
-rw-r--r--man/man4/import.html107
-rw-r--r--man/man4/index.html49
-rw-r--r--man/man4/intro.html92
-rw-r--r--man/man4/plumber.html122
-rw-r--r--man/man4/ramfs.html81
-rw-r--r--man/man5/index.html28
-rw-r--r--man/man7/color.html169
-rw-r--r--man/man7/face.html127
-rw-r--r--man/man7/font.html101
-rw-r--r--man/man7/image.html175
-rw-r--r--man/man7/index.html76
-rw-r--r--man/man7/man.html292
-rw-r--r--man/man7/map.html108
-rw-r--r--man/man7/ms.html185
-rw-r--r--man/man7/plot.html386
-rw-r--r--man/man7/plumb.html357
-rw-r--r--man/man7/regexp.html131
-rw-r--r--man/man7/thumbprint.html68
-rw-r--r--man/man7/utf.html96
-rw-r--r--man/man9/attach.html107
-rw-r--r--man/man9/clunk.html66
-rw-r--r--man/man9/error.html53
-rw-r--r--man/man9/flush.html98
-rw-r--r--man/man9/index.html69
-rw-r--r--man/man9/intro.html344
-rw-r--r--man/man9/open.html154
-rw-r--r--man/man9/read.html96
-rw-r--r--man/man9/remove.html70
-rw-r--r--man/man9/stat.html258
-rw-r--r--man/man9/version.html100
-rw-r--r--man/man9/walk.html119
-rw-r--r--rcmain5
-rw-r--r--src/cmd/acme/rows.c18
-rw-r--r--src/cmd/mk/sys.std.h2
-rw-r--r--src/cmd/troff2html/troff2html.c32
-rw-r--r--src/lib9/fmt/runevsmprint.c1
-rw-r--r--src/lib9/fmt/vsmprint.c1
-rw-r--r--src/libsec/386/mkfile7
-rw-r--r--src/mkfile1
-rw-r--r--src/mksyslib2
-rw-r--r--tmac/tmac.an3
-rw-r--r--unix/Makefile14
-rw-r--r--unix/NOTICE.bio6
-rw-r--r--unix/NOTICE.fmt6
-rw-r--r--unix/NOTICE.mk6
-rw-r--r--unix/NOTICE.regexp6
-rw-r--r--unix/NOTICE.utf6
-rw-r--r--unix/README3
-rw-r--r--unix/make/Makefile.CMD3
-rw-r--r--unix/make/Makefile.bio2
-rw-r--r--unix/make/Makefile.mk2
-rw-r--r--unix/man/.cvsignore1
-rw-r--r--unix/man/bio.3363
-rw-r--r--unix/man/ex.man8
-rwxr-xr-xunix/man/fixurls34
-rw-r--r--unix/man/fmtinstall.3371
-rw-r--r--unix/man/fmtstrtod.354
-rw-r--r--unix/man/index.html9
-rw-r--r--unix/man/isalpharune.349
-rw-r--r--unix/man/mk.1 (renamed from src/cmd/mk/mk.1)79
-rw-r--r--unix/man/mkfile48
-rw-r--r--unix/man/print.3474
-rw-r--r--unix/man/quote.3151
-rw-r--r--unix/man/regexp9.3212
-rw-r--r--unix/man/regexp9.7133
-rw-r--r--unix/man/rune.3186
-rw-r--r--unix/man/runestrcat.366
-rw-r--r--unix/man/utf.791
-rw-r--r--unix/mkfile109
-rw-r--r--unix/mkfile.bio28
-rw-r--r--unix/mkfile.fmt28
-rw-r--r--unix/mkfile.mk28
-rw-r--r--unix/mkfile.regexp34
-rw-r--r--unix/mkfile.utf32
-rw-r--r--unix/mkfile.what22
314 files changed, 48197 insertions, 298 deletions
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)
+
+#
+# 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)
+ }
}
-}
-# 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)
+ if(~ $#files 0){
+ for(i in $S/man$sec){
+ if(test -f $i/$word.[0-9]*)
+ files=($files $i/$word.[0-9]*)
}
}
- if(~ $#fils 0) {
- echo 'man: no manual page' >[1=2]
- exit 'no man'
+ if(~ $#files 0){
+ echo 'man: no manual page' $word >[1=2]
+ missing=yes
}
+ allfiles=($allfiles $files)
}
-for(i in $fils) {
- if(! test -f $i)
- echo need $i >[1=2]
- if not {
- switch($cmd) {
- case t
- roff t $i
+if(~ $#allfiles 0)
+ exit 'no man'
+allfiles=`{ls $allfiles | sort -u >[2]/dev/null}
- case p
- roff t $i | proof
+files=()
+for(i in $allfiles){
+ if(test -f $i)
+ files=($files $i)
+ if not
+ echo need $i >[1=2]
+}
- case P
- roff t $i |tr2post |psfonts |page
+#
+# format pages
+#
+for(i in $files)
+ $cmd $i
- case n
- roff n $i | 9 sed '
- ${
- /^$/p
- }
- //N
- /^\n$/D'
- }
- }
-}
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 @@
+<html>
+<!--
+Edit ./^$/,s/<table border=0 cellspacing=0 cellpadding=0 width=100%/<Table/g
+Edit ./^$/,s/<Table/<table border=0 cellspacing=0 cellpadding=0 width=100%/g
+-->
+
+<head>
+<base href="http://swtch.com/plan9port/">
+<title>Plan 9 from User Space - Download</title>
+</head>
+<body bgcolor=#ffffff>
+<Table>
+ <tr height=10><td width=20><td><td width=20>
+ <tr><td><td>
+ <center>
+ <img src="dist/spaceglenda100.png" alt="Space Glenda">
+ </center>
+ <Table><tr height=10><td></table>
+ <center>
+ <font size=+1><b>Plan 9 from User Space - Download</b></font>
+ </center>
+ <Table><tr height=10><td></table>
+ <center>
+ <a href="man/man1/intro.html">overview</a>
+ |
+ <a href="screenshots/">screen shots</a>
+ |
+ <a href="man/">manual</a>
+ |
+ <a href="man/man1/install.html">install notes</a>
+ |
+ <a href="download.html">download</a>
+ |
+ <a href="man/man1/cvs.html">cvs</a>
+ |
+ <a href="unix/">unix</a>
+ </center>
+ <Table><tr height=10><td></table>
+ Plan 9 from User Space (aka plan9port)
+ is a port of many Plan 9 programs from their native
+ <a href="http://plan9.bell-labs.com/plan9/">Plan 9</a>
+ environment to Unix-like operating systems.
+
+ <Table><tr height=20><td></table>
+ <b>supported systems</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ Linux <font size=-1>(x86 and PowerPC)</font>,
+ FreeBSD <font size=-1>(x86)</font>,
+ Mac OS X <font size=-1>(Power PC)</font>,
+ SunOS <font size=-1>(Sparc)</font>.
+ </table>
+
+ <Table><tr height=20><td></table>
+ <b>getting started</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ Start with the overview in
+ <a href="man/man1/intro.html"><i>intro</i>(1)</a>.
+ <a href="man/man1/install.html"><i>Install</i>(1)</a>
+ explains how to install the system.
+ </table>
+
+ <Table><tr height=20><td></table>
+ <b>acknowledgements</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+
+ Most obviously, plan9port derives from
+ <a href="http://plan9.bell-labs.com/plan9">Plan 9 from Bell Labs</a>
+ and would not exist without the work of the Plan 9 team over the
+ past many years.
+
+ <Table><tr height=10><td></table>
+
+ 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.
+
+ <Table><tr height=10><td></table>
+
+ 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.
+
+ <Table><tr height=10><td></table>
+
+ William Josephson handled
+ <a href="man/man1/troff.html"><i>troff</i>(1)</a>
+ (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.
+
+ <Table><tr height=10><td></table>
+
+ Andrey Mirtchovski and Axel Belinfante have done significant
+ work dealing with X11 corner cases and fine-tuning
+ <a href="man/man1/rio.html"><i>rio</i>(1)</a>.
+ Axel never tires of finding bugs in the SunOS port.
+
+ <Table><tr height=10><td></table>
+
+ Eric Van Hensbergen brought the system up on Linux/PowerPC.
+
+ <Table><tr height=10><td></table>
+
+ Thanks to all.
+
+ </table>
+
+ <Table><tr height=20><td></table>
+ <b>contact</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ Russ Cox <font size=-1>(<a href="mailto:rsc@swtch.com">rsc@swtch.com</a>)
+ </table>
+
+ <Table><tr height=20><td></table>
+ <b>unix extracts</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ 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.
+ </table>
+
+ <Table><tr height=20><td></table>
+ <b>history</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ <a href="http://plan9.bell-labs.com/plan9dist/ureg.html">
+ Sean Quinlan's 9pm
+ </a> &#8722; a port of an earlier Plan 9 (including <a href="man/man1/sam.html"><i>sam</i>(1)</a>) to Windows
+ <br>
+ <a href="http://www.cs.usyd.edu.au/~matty/9term/">
+ Matty Farrow's 9term
+ </a> &#8722; a native X11 version that inspired <a href="man/man1/9term.html"><i>9term</i>(1)</a>
+ <br>
+ <a href="http://unauthorised.org/dhog/9wm.html">David Hogan's 9wm</a>
+ and
+ <a href="http://lists.cse.psu.edu/archives/9fans/1994-November/003081.html">Arnold Robbin's 9menu</a> &#8722; precursor to
+ <a href="man/man1/rio.html"><i>rio</i>(1)</a>
+ <br>
+ <a href="http://www.star.le.ac.uk/~tjg/rc/">Byron Rakitzis's rc</a> &#8722; a mostly-compatible clone of Plan 9's <a href="man/man1/rc.html"><i>rc</i>(1)</a>
+ <br>
+ <a href="http://www.cs.yorku.ca/~oz/wily/">Gary Capell's wily</a> &#8722; an <a href="man/man1/acme.html"><i>acme</i>(1)</a>-inspired editor
+ </table>
+
+
+ <tr height=10><td>
+</table>
+
+</body>
+</html>
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 @@
+
+<html>
+<!--
+Edit ./^$/,s/<table border=0 cellspacing=0 cellpadding=0 width=100%/<Table/g
+Edit ./^$/,s/<Table/<table border=0 cellspacing=0 cellpadding=0 width=100%/g
+-->
+
+<head>
+<base href="http://swtch.com/plan9port/">
+<title>Plan 9 from User Space</title>
+</head>
+<body bgcolor=#ffffff>
+<Table>
+ <tr height=10><td width=20><td><td width=20>
+ <tr><td><td>
+ <center>
+ <img src="dist/spaceglenda100.png" alt="Space Glenda">
+ </center>
+ <Table><tr height=10><td></table>
+ <center>
+ <font size=+1><b>Plan 9 from User Space</b></font>
+ </center>
+ <Table><tr height=10><td></table>
+ <center>
+ <a href="man/man1/intro.html">overview</a>
+ |
+ <a href="screenshots/">screen shots</a>
+ |
+ <a href="man/">manual</a>
+ |
+ <a href="man/man1/install.html">install notes</a>
+ |
+ <a href="man/man1/cvs.html">cvs</a>
+ |
+ <a href="unix/">unix</a>
+ </center>
+ <Table><tr height=10><td></table>
+ Plan 9 from User Space (aka plan9port)
+ is a port of many Plan 9 programs from their native
+ <a href="http://plan9.bell-labs.com/plan9/">Plan 9</a>
+ environment to Unix-like operating systems.
+
+ <Table><tr height=20><td></table>
+ <b>supported systems</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ Linux <font size=-1>(x86 and PowerPC)</font>,
+ FreeBSD <font size=-1>(x86)</font>,
+ Mac OS X <font size=-1>(Power PC)</font>,
+ SunOS <font size=-1>(Sparc)</font>.
+ </table>
+
+ <Table><tr height=20><td></table>
+ <b>getting started</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ Start with the overview in
+ <a href="man/man1/intro.html"><i>intro</i>(1)</a>.
+ For information on installing the system, see
+ <a href="man/man1/install.html"><i>Install</i>(1)</a>.
+ </table>
+
+ <Table><tr height=20><td></table>
+ <b>download</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ latest tree: <a href="plan9port.tgz">plan9port.tgz</a>
+ <font size=-1>(<a href="/cgi-bin/info.cgi?file=/plan9port/plan9port.tgz">date and checksums</a>)</font>
+ </table>
+
+ <Table><tr height=20><td></table>
+ <b>acknowledgements</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+
+ Most obviously, plan9port derives from
+ <a href="http://plan9.bell-labs.com/plan9">Plan 9 from Bell Labs</a>
+ and would not exist without the work of the Plan 9 team over the
+ past many years.
+
+ <Table><tr height=10><td></table>
+
+ 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.
+
+ <Table><tr height=10><td></table>
+
+ William Josephson handled
+ <a href="man/man1/troff.html"><i>troff</i>(1)</a>
+ (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.
+
+ <Table><tr height=10><td></table>
+
+ Andrey Mirtchovski and Axel Belinfante have done significant
+ work dealing with X11 corner cases and fine-tuning
+ <a href="man/man1/rio.html"><i>rio</i>(1)</a>.
+ Axel never tires of finding bugs in the SunOS port.
+
+ <Table><tr height=10><td></table>
+
+ Latchesar Ionkov has contributed many fixes to tricky bugs.
+
+ <Table><tr height=10><td></table>
+
+ Many other people have provided help,
+ ported programs, written bug reports,
+ sent useful patches, and gotten plan9port running on new
+ systems.
+
+ <Table><tr height=10><td></table>
+
+ Thanks to all.
+
+ </table>
+
+ <Table><tr height=20><td></table>
+ <b>contact</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ Russ Cox <font size=-1>(<a href="mailto:rsc@swtch.com">rsc@swtch.com</a>)
+ </table>
+
+
+ <Table><tr height=20><td></table>
+ <b>unix extracts</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ 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.
+
+ <Table><tr height=10><td></table>
+
+ See <a href="http://swtch.com/plan9port/unix/">http://swtch.com/plan9port/unix/</a>.
+ </table>
+
+ <Table><tr height=20><td></table>
+ <b>history</b>
+ <Table>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ <a href="http://plan9.bell-labs.com/plan9dist/ureg.html">
+ Sean Quinlan's 9pm
+ </a> &#8722; a port of an earlier Plan 9 (including <a href="man/man1/sam.html"><i>sam</i>(1)</a>) to Windows
+ <br>
+ <a href="http://www.cs.usyd.edu.au/~matty/9term/">
+ Matty Farrow's 9term
+ </a> &#8722; a native X11 version that inspired <a href="man/man1/9term.html"><i>9term</i>(1)</a>
+ <br>
+ <a href="http://unauthorised.org/dhog/9wm.html">David Hogan's 9wm</a>
+ and
+ <a href="http://lists.cse.psu.edu/archives/9fans/1994-November/003081.html">Arnold Robbin's 9menu</a> &#8722; precursor to
+ <a href="man/man1/rio.html"><i>rio</i>(1)</a>
+ <br>
+ <a href="http://www.star.le.ac.uk/~tjg/rc/">Byron Rakitzis's rc</a> &#8722; a mostly-compatible clone of Plan 9's <a href="man/man1/rc.html"><i>rc</i>(1)</a>
+ <br>
+ <a href="http://www.cs.yorku.ca/~oz/wily/">Gary Capell's wily</a> &#8722; an <a href="man/man1/acme.html"><i>acme</i>(1)</a>-inspired editor
+ </table>
+
+
+ <tr height=10><td>
+</table>
+
+</body>
+</html>
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 @@
+</table>
+</center>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<td width=20>
+</table>
+</body>
+</html>
diff --git a/dist/manindextop.html b/dist/manindextop.html
new file mode 100644
index 00000000..a392896e
--- /dev/null
+++ b/dist/manindextop.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+<title>Manual Section NNN - Plan 9 from User Space</title>
+</head>
+<body>
+<table width=100%>
+<tr><td width=20><td>
+<center>
+<table border=0 cellspacing=0 cellpadding=0 width=100%>
+<tr height=1><td width=200><td>
+<tr><td colspan=2>
+ <center>
+ <b>Manual Section NNN - Plan 9 from User Space</b>
+ </center>
+<tr height=10><td>
diff --git a/dist/mantrailer.html b/dist/mantrailer.html
new file mode 100644
index 00000000..3fbe0f44
--- /dev/null
+++ b/dist/mantrailer.html
@@ -0,0 +1,7 @@
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
diff --git a/dist/manweb b/dist/manweb
new file mode 100755
index 00000000..0a6f0f40
--- /dev/null
+++ b/dist/manweb
@@ -0,0 +1,64 @@
+#!/usr/local/plan9/bin/rc
+
+path=($PLAN9/bin $path)
+cd $PLAN9/man
+# rm -f */*.html
+
+for(i in */INDEX) @{
+ n=`{echo $i | sed 's/man//;s!/INDEX!!'}
+ cat $PLAN9/dist/manindextop.html | sed 's/NNN/'$n'/g'
+ cd `{basename -d $i}
+ # complicated sort order: want 9p.3, 9p-cmdbuf.3, 9pclient.3
+ for (j in `{ls [a-z0-9:]*.[0-9]* | sed 's/[.\-]/ &/g;s/\./ &/g' | sort | tr -d ' '}){
+ n=`{grep '^\.TH' $j | sed 1q | awk '{print $3}'}
+ name=`{echo $j | sed 's/\..*//'}
+ if(~ $name 0intro)
+ name=intro
+ if not{
+ echo '<tr height=1><td>'
+ echo '<tr height=1><td colspan=2 bgcolor=#cccccc>'
+ echo '<tr height=1><td>'
+ }
+ echo -n '<tr><td valign=top><a href="'$name'.html">'$name'('$n')</a><td>'
+ sed -n '
+ /SH *NAM/,/SH/{
+ /SH/d
+ s/, *$//
+ ty
+ :y
+ s/ *\\*-.*/&/
+ tx
+ s/ *\\\(mi.*/&/
+ tx
+ s/\n\\n/\
+/g
+ p
+ }
+ /SH *DES/q
+ d
+ :x
+ /^$/d
+ s/\n\n/\
+/g
+ s/\\-/\&ndash;/
+ p
+ q' $j
+ }
+ cat $PLAN9/dist/manindexbottom.html
+} >$i.html && mv $i.html `{echo $i.html | tr A-Z a-z}
+
+for (i in */[~.]*.[0-9]*){
+ j=`{echo $i | 9 sed 's/\..*//'}
+ p=`{basename $j}
+ d=`{basename -d $j}
+ if(~ $p 0intro)
+ p=intro
+ echo $d/$p
+ troff -manhtml $i | troff2html -t 'Plan 9 from User Space'>/tmp/manweb.html
+ {
+ sed '/<!-- TRAILER -->/q' /tmp/manweb.html
+ cat $PLAN9/dist/mantrailer.html
+ sed -n '/<!-- TRAILER -->/,$p' /tmp/manweb.html
+ } >$d/$p.html
+}
+rm /tmp/manweb.html
diff --git a/dist/mkfile b/dist/mkfile
index 5e679d52..4def6970 100644
--- a/dist/mkfile
+++ b/dist/mkfile
@@ -1,5 +1,16 @@
+MKSHELL=rc
+
check.out:V:
cd ../man; mk indices
cd ..
- awk -f dist/checkman.awk man/man*/*.* >dist/check.out
+ 9 awk -f dist/checkman.awk man/man*/*.[0-9]* >dist/check.out
+
+man:V:
+ rc ./manweb
+push:V:
+ rsync -e ssh -avz --delete $PLAN9/man/ swtch:www/swtch.com/plan9port/man
+ rsync -e ssh unix.html swtch:www/swtch.com/plan9port/unix/index.html
+ rsync -e ssh main.html swtch:www/swtch.com/plan9port/nindex.html
+ @{cd ../unix/man && mk push}
+ @{cd ../unix && mk push}
diff --git a/dist/spaceglenda100.png b/dist/spaceglenda100.png
new file mode 100644
index 00000000..a9fc336a
--- /dev/null
+++ b/dist/spaceglenda100.png
Binary files differ
diff --git a/dist/unix.html b/dist/unix.html
new file mode 100644
index 00000000..e56e41ac
--- /dev/null
+++ b/dist/unix.html
@@ -0,0 +1,234 @@
+
+<html>
+<!--
+Edit ./^$/,s/<table border=0 cellspacing=0 cellpadding=0 width=100%/<Table/g
+Edit ./^$/,s/<Table/<table border=0 cellspacing=0 cellpadding=0 width=100%/g
+-->
+
+<head>
+<base href="http://swtch.com/plan9port/unix/">
+<title>Unix Software from Plan 9</title>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellspacing=0 cellpadding=0 width=100%>
+ <tr height=10><td width=20><td><td width=20>
+ <tr><td><td>
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+ <center>
+ <font size=+1><b>Unix Software from Plan 9</b></font>
+ </center>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+ These are ports of <a href="http://plan9.bell-labs.com/plan9">Plan 9</a>'s
+ UTF-8, formatted print, buffered I/O, and regular expression
+ libraries, along with mk, a simple replacement for make.
+ <p>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=20><td></table>
+ <b>supported systems</b>
+ <table border=0 cellspacing=0 cellpadding=0 width=100%>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ Digital Unix OSF1 <font size=-1>(Alpha)</font>,
+ Linux <font size=-1>(x86 and PowerPC)</font>,
+ FreeBSD <font size=-1>(x86)</font>,
+ NetBSD <font size=-1>(x86)</font>,
+ Mac OS X <font size=-1>(Power PC)</font>,
+ OpenBSD <font size=-1>(x86)</font>,
+ SunOS <font size=-1>(Sparc)</font>
+ </table>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=20><td></table>
+ <b>installation</b>
+ <table border=0 cellspacing=0 cellpadding=0 width=100%>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ Links to source tgzs are below.
+ On supported systems, extract and <font size=+1><tt>make install</tt></font>.
+ The default installation target is <font size=+1><tt>/usr/local</tt></font>. To install elsewhere,
+ <font size=+1><tt>make PREFIX=/usr/elsewhere install</tt></font>.
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ On unsupported systems, you will need to create
+ <font size=+1><tt>Make.<i>YourOS</i>-<i>YourArch</i></tt></font>.
+ See the existing ones for examples.
+
+ </table>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=20><td></table>
+ <b>libutf</b>
+ <table border=0 cellspacing=0 cellpadding=0 width=100%>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+
+ Libutf is a port of Plan 9's support library for UTF-8 and Unicode.
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>manual:</font>
+ <!-- [ 9 man -w `{nm /usr/local/lib/libutf.a | awk '$2=="T" {print $3}'} ]-->
+ <a href="man/isalpharune3.html"><i>isalpharune</i>(3)</a>,
+ <a href="man/rune3.html"><i>rune</i>(3)</a>,
+ <a href="man/runestrcat3.html"><i>runestrcat</i>(3)</a>,
+ <a href="man/utf7.html"><i>utf</i>(7)</a>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>download:</font> <a href="libutf.tgz">libutf.tgz</a> <font size=-1>(<a href="/cgi-bin/info.cgi?file=/plan9port/unix/libutf.tgz">checksums</a>)</font>
+
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>license: original <a href="license-bl.txt">Bell Labs MIT-like</a>
+ or <a href="http://plan9.bell-labs.com/plan9dist/license.html">Lucent Public License</a></font>
+
+ </table>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=20><td></table>
+ <b>libfmt</b>
+ <table border=0 cellspacing=0 cellpadding=0 width=100%>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+
+ Libfmt is a port of Plan 9's formatted print library.
+ As a base it provides all the syntax of ANSI C's printf but adds
+ the ability for client programs to install new print verbs.
+ One such print verb (installed by default) is <font size=+1><tt>%r</tt></font>, which prints
+ the system error string.
+ Instead of <font size=+1><tt>perror("foo")</tt></font>, you can write
+ <font size=+1><tt>fprint(2, "foo: %r\n");</tt></font>.
+ This is especially nice when you write verbs to format the
+ data structures used by your particular programs.
+ Needs libutf.
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>manual:</font>
+ <!-- [ 9 man -w `{nm /usr/local/lib/libfmt.a | awk '$2=="T" {print $3}'} ]-->
+ <a href="man/print3.html"><i>print</i>(3)</a>,
+ <a href="man/fmtinstall3.html"><i>fmtinstall</i>(3)</a>,
+ <a href="man/quote3.html"><i>quote</i>(3)</a>,
+ <a href="man/fmtstrtod3.html"><i>fmtstrtod</i>(3)</a>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>download:</font> <a href="libfmt.tgz">libfmt.tgz</a> <font size=-1>(<a href="/cgi-bin/info.cgi?file=/plan9port/unix/libfmt.tgz">checksums</a>)</font>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>License: original <a href="license-bl.txt">Bell Labs MIT-like</a>
+ or <a href="http://plan9.bell-labs.com/plan9dist/license.html">Lucent Public License</a></font>
+
+ </table>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=20><td></table>
+ <b>libbio</b>
+ <table border=0 cellspacing=0 cellpadding=0 width=100%>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+
+ Libbio is a port of Plan 9's buffered I/O library.
+ It provides most of the same functionality as stdio or sfio,
+ but with a simpler interface and smaller footprint.
+ Needs libutf and libfmt.
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>manual:</font>
+ <a href="man/bio3.html"><i>bio</i>(3)</a>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>download:</font> <a href="libbio.tgz">libbio.tgz</a> <font size=-1>(<a href="/cgi-bin/info.cgi?file=/plan9port/unix/libbio.tgz">checksums</a>)</font>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>License: <a href="license-vn.txt">Vita Nuova Free-for-All</a>
+ or <a href="http://plan9.bell-labs.com/plan9dist/license.html">Lucent Public License</a></font>
+
+ </table>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=20><td></table>
+ <b>libregexp9</b>
+ <table border=0 cellspacing=0 cellpadding=0 width=100%>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+
+ Libregexp9 is a port of Plan 9's Unicode-capable regular expression library.
+ It is small and simple and provides the traditional extended regular
+ expressions (without modern complications like
+ <font size=+1><tt>{}</tt></font> and various <font size=+1><tt>\x</tt></font> character classes).
+ It supports Unicode via wide character or UTF-8 encoding.
+ Needs libutf and libfmt.
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>manual:</font>
+ <a href="man/regexp93.html"><i>regexp9</i>(3)</a>,
+ <a href="man/regexp97.html"><i>regexp9</i>(7)</a>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>download:</font> <a href="libregexp9.tgz">libregexp9.tgz</a> <font size=-1>(<a href="/cgi-bin/info.cgi?file=/plan9port/unix/libregexp9.tgz">checksums</a>)</font>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>License: <a href="license-vn.txt">Vita Nuova Free-for-All</a>
+ or <a href="http://plan9.bell-labs.com/plan9dist/license.html">Lucent Public License</a></font>
+
+ </table>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=20><td></table>
+ <b>mk</b>
+ <table border=0 cellspacing=0 cellpadding=0 width=100%>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+
+ Mk is a simple replacement for <i>make</i>.
+ Needs libutf, libfmt, libbio, and libregexp9.
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>manual:</font>
+ <a href="man/mk1.html"><i>mk</i>(1)</a>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>download:</font> <a href="mk.tgz">mk.tgz</a> <font size=-1>(<a href="/cgi-bin/info.cgi?file=/plan9port/unix/mk.tgz">checksums</a>)</font>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>License: <a href="license-vn.txt">Vita Nuova Free-for-All</a>
+ or <a href="http://plan9.bell-labs.com/plan9dist/license.html">Lucent Public License</a></font>
+ </table>
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=20><td></table>
+ <b>one with everything</b>
+ <table border=0 cellspacing=0 cellpadding=0 width=100%>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+
+ Includes mk and all the libraries.
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=10><td></table>
+
+ <font size=-1>download:</font> <a href="mk-with-libs.tgz">mk-with-libs.tgz</a> <font size=-1>(<a href="/cgi-bin/info.cgi?file=/plan9port/unix/mk-with-libs.tgz">checksums</a>)</font>
+ </table>
+
+
+ <table border=0 cellspacing=0 cellpadding=0 width=100%><tr height=20><td></table>
+ <b>contact</b>
+ <table border=0 cellspacing=0 cellpadding=0 width=100%>
+ <tr height=10><td width=20><td>
+ <tr><td><td>
+ Russ Cox <font size=-1>(<a href="mailto:rsc@swtch.com">rsc@swtch.com</a>)
+ </table>
+ <tr height=10><td>
+ <tr><td><td><center><a href=".."><img src="../dist/spaceglenda100.png" border=1 alt="Space Glenda"></a></center>
+
+ <tr height=10><td>
+</table>
+
+</body>
+</html>
diff --git a/include/bio.h b/include/bio.h
index 2c2b9566..caffa742 100644
--- a/include/bio.h
+++ b/include/bio.h
@@ -4,7 +4,9 @@
extern "C" {
#endif
+#ifdef AUTOLIB
AUTOLIB(bio)
+#endif
#include <sys/types.h> /* for off_t */
#include <fcntl.h> /* for O_RDONLY, O_WRONLY */
diff --git a/include/regexp9.h b/include/regexp9.h
index 9e1c01b1..20c0c3da 100644
--- a/include/regexp9.h
+++ b/include/regexp9.h
@@ -4,7 +4,9 @@
extern "C" {
#endif
+#ifdef AUTOLIB
AUTOLIB(regexp9)
+#endif
#include <utf.h>
diff --git a/man/index.html b/man/index.html
new file mode 100644
index 00000000..3d00d11b
--- /dev/null
+++ b/man/index.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+<title>Manual - Plan 9 from User Space</title>
+</head>
+<body>
+<table width=100%>
+<tr><td width=20><td>
+<center>
+<table border=0 cellspacing=0 cellpadding=0 width=100%>
+<tr height=1><td width=200><td>
+<tr><td colspan=2>
+ <center>
+ <b>Manual - Plan 9 from User Space</b>
+ </center>
+<tr height=10><td>
+<tr><td valign=top><a href="man1/index.html">Section 1</a><td>commands
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="man3/index.html">Section 3</a><td>C library functions
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="man4/index.html">Section 4</a><td>file servers
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="man7/index.html">Section 7</a><td>file formats, protocols, and conventions
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="man9/index.html">Section 9P</a><td>the Plan 9 file protocol
+</table>
+</center>
+<td width=20>
+</table>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=5><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../"><img src="../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+</body>
+</html>
diff --git a/man/man1/9.html b/man/man1/9.html
new file mode 100644
index 00000000..1ddef719
--- /dev/null
+++ b/man/man1/9.html
@@ -0,0 +1,100 @@
+<head>
+<title>9(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>9(1)</b><td align=right><b>9(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ 9 &ndash; run Plan 9 commands<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>9</font></tt> <i>cmd</i> [ <i>args</i> ... ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>. 9<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Because Plan 9 supplies commands with the same name as but different
+ behavior than many basic Unix system commands (e.g., <tt><font size=+1>grep</font></tt>, <tt><font size=+1>sed</font></tt>,
+ <tt><font size=+1>mkdir</font></tt>, <tt><font size=+1>rm</font></tt>), it is not recommended to run with the Plan 9 bin directory
+ ahead of the system directories.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9</i> is a shell script that sets up a Plan 9 environment and runs
+ <i>cmd .</i> It sets <tt><font size=+1>$PLAN9</font></tt> and adds <tt><font size=+1>$PLAN9/bin</font></tt> to the beginning of <tt><font size=+1>$PATH</font></tt>
+ before running <i>cmd</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If run with no arguments, <tt><font size=+1>9</font></tt> does not do anything. This is so that
+ it can be invoked from <i>sh</i>-style shells using <tt><font size=+1>. 9</font></tt> in order to make
+ the current shell start running in the Plan 9 environment.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Search for greek in the password file:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>$ 9 grep '[&#945;&#8722;&#950;]' /etc/passwd<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Start an <a href="../man1/rc.html"><i>rc</i>(1)</a> with the Plan 9 commands in the path before the
+ system commands.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>9 rc<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin/9<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/intro.html"><i>intro</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/9c.html b/man/man1/9c.html
new file mode 100644
index 00000000..894a34ae
--- /dev/null
+++ b/man/man1/9c.html
@@ -0,0 +1,172 @@
+<head>
+<title>9c(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>9C(1)</b><td align=right><b>9C(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ 9c, 9a, 9l, 9ar &ndash; C compiler, assembler, linker, archiver<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>9c</font></tt> [ <tt><font size=+1>&#8722;I</font></tt> <i>path</i> ] [ <tt><font size=+1>&#8722;D</font></tt> <i>name</i> ] <i>file</i> ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>9a</font></tt> <i>file</i> ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>9l</font></tt> [ <i>-o target</i> ] <i>object</i> ... [ <i>library</i> ... ] [ <tt><font size=+1>&#8722;L</font></tt><i>path</i> ... ] [ <tt><font size=+1>&#8722;l</font></tt><i>name</i>
+ ... ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>9ar</font></tt> <i>key</i> [ <i>posname</i> ] <i>afile</i> [ <i>file</i> ... ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These programs are shell scripts that invoke the appropriate standard
+ tools for the current operating system and architecture. One can
+ use them to write portable recipes for mkfiles.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9c</i> compiles the named C <i>files</i> into object files for the current
+ system. The system C compiler is invoked with warnings enabled.
+ The <tt><font size=+1>&#8722;I</font></tt> option adds <i>path</i> to the include path, and the <tt><font size=+1>&#8722;D</font></tt> option
+ defines <i>name</i> in the C preprocessor. <i>9c</i> always defines the symbol
+ <tt><font size=+1>PLAN9PORT</font></tt> defined in the C preprocessor and adds
+ <tt><font size=+1>$PLAN9/include</font></tt> to the include path.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9c</i> also defines <tt><font size=+1>__sun__</font></tt> on SunOS systems and <tt><font size=+1>__Linux26__</font></tt> on Linux
+ systems with 2.6-series kernels.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9a</i> assembles the named files into object files for the current
+ system. Unlike some system assemblers, it does <i>not</i> promise to
+ run the C preprocessor on the source files.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9l</i> links the named object files and libraries to create the target
+ executable. Each <tt><font size=+1>&#8722;l</font></tt> option specifies that a library named <tt><font size=+1>lib</font></tt><i>name</i><tt><font size=+1>.a</font></tt>
+ be found and linked. The <tt><font size=+1>&#8722;L</font></tt> option adds directories to the library
+ search path. <i>9l</i> invokes the system linker with <tt><font size=+1>$PLAN9/lib</font></tt> already
+ on the library search path.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9l</i> searches the named objects and libraries for symbols of the
+ form <tt><font size=+1>__p9l_autolib_</font></tt><i>name</i>, which it takes as indication that it
+ should link <tt><font size=+1>$PLAN9/lib/lib</font></tt><i>name</i><tt><font size=+1>.a</font></tt> as well. It also examines such
+ libraries to find their own dependencies. A single <tt><font size=+1>&#8722;l</font></tt> option at
+ the beginning of the command line disables this
+ behavior. The symbol <tt><font size=+1>__p9l_autolib_</font></tt><i>name</i> is added to an object
+ file by the macro <tt><font size=+1>AUTOLIB( name )</font></tt>, defined in <tt><font size=+1>&lt;u.h&gt;.</font></tt> Header files
+ associated with libraries contain <tt><font size=+1>AUTOLIB</font></tt> annotations; ordinary
+ programs need not use them. Due to shortcomings in the implementation,
+ a source file may not contain the
+ same <tt><font size=+1>AUTOLIB</font></tt> statement multiple times.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9ar</i> maintains object file archives called libraries. The exact
+ set of valid command keys varies from system to system, but <i>9ar</i>
+ always provides the following key characters:<br>
+ <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete <i>files</i> from the archive file.<br>
+ <tt><font size=+1>r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replace <i>files</i> in the archive file, or add them if missing.<br>
+ <tt><font size=+1>t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List a table of contents of the archive. If names are given,
+ only those files are listed.<br>
+ <tt><font size=+1>x</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extract the named files. If no names are given, all files in
+ the archive are extracted. In neither case does <tt><font size=+1>x</font></tt> alter the archive
+ file.<br>
+ <tt><font size=+1>v</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Verbose. Give a file-by-file description of the making of a new
+ archive file from the old archive and the constituent files. With
+ <tt><font size=+1>t</font></tt>, give a long listing of all information about the files, somewhat
+ like a listing by <a href="../man1/ls.html"><i>ls</i>(1)</a>, showing<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>mode uid/gid size date name<br>
+ </font></tt>
+ </table>
+
+ </table>
+ <tt><font size=+1>c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create. Normally <i>9ar</i> will create a new archive when <i>afile</i> does
+ not exist, and give a warning. Option <tt><font size=+1>c</font></tt> discards any old contents
+ and suppresses the warning.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When a <tt><font size=+1>d</font></tt>, <tt><font size=+1>r</font></tt>, or <tt><font size=+1>m</font></tt> <i>key</i> is specified, <i>9ar</i> inserts a table of contents,
+ required by the linker, at the front of the library. The table
+ of contents is rebuilt whenever the archive is modified.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>9c file1.c file2.c file3.c<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Compile three C source files.<br>
+
+ </table>
+ <tt><font size=+1>9a file4.s<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Assemble one assembler source file.<br>
+
+ </table>
+ <tt><font size=+1>9ar rvc lib.a file[12].o<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Archive the first two object files into a library.<br>
+
+ </table>
+ <tt><font size=+1>9l &#8722;o prog file3.o file4.o lib.a<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Link the final two object files and any necessary objects from
+ the library into an executable.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/9p.html b/man/man1/9p.html
new file mode 100644
index 00000000..449d0eb5
--- /dev/null
+++ b/man/man1/9p.html
@@ -0,0 +1,122 @@
+<head>
+<title>9p(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>9P(1)</b><td align=right><b>9P(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ 9p &ndash; read and write files on a 9P server<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>9p</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> <i>addr</i> ] <tt><font size=+1>read</font></tt> <i>path<br>
+ </i><tt><font size=+1>9p</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> <i>addr</i> ] <tt><font size=+1>readfd</font></tt> <i>path
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>9p</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> <i>addr</i> ] <tt><font size=+1>write</font></tt> <i>path<br>
+ </i><tt><font size=+1>9p</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> <i>addr</i> ] <tt><font size=+1>writefd</font></tt> <i>path
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>9p</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> <i>addr</i> ] <tt><font size=+1>stat</font></tt> <i>path<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>9p</i> is a trivial 9P client that can access a single file on a 9P
+ server. It can be useful for manual interaction with a 9P server
+ or for accessing simple 9P services from within shell scripts.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The first argument is a command, one of:<br>
+ <tt><font size=+1>read</font></tt>print the contents of <i>path</i> to standard output<br>
+ <tt><font size=+1>write<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ write data on standard input to <i>path<br>
+ </i>
+ </table>
+ <tt><font size=+1>readfd</font></tt>, <tt><font size=+1>writefd<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ like <tt><font size=+1>read</font></tt> and <tt><font size=+1>write</font></tt> but use <i>openfd</i>(9p) instead of <i>open</i>; this masks
+ errors and is mainly useful for debugging the implementation of
+ <i>openfd<br>
+ </i>
+ </table>
+ <tt><font size=+1>stat</font></tt>execute <i>stat (9p)</i> on <i>path</i> and print the result
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9p</i> dials <i>address</i> to connect to the 9P server. If the <tt><font size=+1>&#8722;a</font></tt> option
+ is not given, <i>9p</i> requires the <i>path</i> to be of the form <i>service</i><tt><font size=+1>/</font></tt><i>subpath</i>;
+ it connects to the Unix domain socket <i>service</i> in the name space
+ directory (see <a href="../man4/intro.html"><i>intro</i>(4)</a>) and then accesses <i>subpath</i>.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To update <a href="../man4/plumber.html"><i>plumber</i>(4)</a>&#8217;s copy of your plumbing rules after editing
+ <tt><font size=+1>$HOME/lib/plumbing</font></tt>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>cat $HOME/lib/plumbing | 9p write plumb/rules<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ To display the contents of the current <a href="../man4/acme.html"><i>acme</i>(4)</a> window:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>9p read acme/$winid/body<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/9p.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man4/intro.html"><i>intro</i>(4)</a>, <i>intro</i>(9p), <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/9term.html b/man/man1/9term.html
new file mode 100644
index 00000000..7d6a741f
--- /dev/null
+++ b/man/man1/9term.html
@@ -0,0 +1,259 @@
+<head>
+<title>9term(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>9TERM(1)</b><td align=right><b>9TERM(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ 9term &ndash; terminal windows<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>9term</font></tt> [ <tt><font size=+1>&#8722;as</font></tt> ] [ <tt><font size=+1>&#8722;f</font></tt> <i>font</i> ] [ <i>cmd</i> ... ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>9term</i> is a terminal window program for the X Window System, providing
+ an interface similar to that used on Plan 9.<br>
+ <p><font size=+1><b>Command </b></font><br>
+ The <i>9term</i> command starts a new window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;a</font></tt> flag causes button 2 to send the selection immediately,
+ like acme. Otherwise button 2 brings up a menu, described below.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;s</font></tt> option initializes windows so that text scrolls; the default
+ is not to scroll.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>font</i> argument to <tt><font size=+1>&#8722;f</font></tt> names a font used to display text, both
+ in <i>9term</i>&#8217;s menus and as a default for any programs running in
+ its windows; it also establishes the environment variable <tt><font size=+1>$font</font></tt>.
+ If <tt><font size=+1>&#8722;f</font></tt> is not given, <i>9term</i> uses the imported value of <tt><font size=+1>$font</font></tt> if
+ set; otherwise it uses the graphics system default.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9term</i> runs the given command in the window, or <tt><font size=+1>$SHELL</font></tt> if no command
+ is given.<br>
+ <p><font size=+1><b>Text windows </b></font><br>
+ Characters typed on the keyboard collect in the window to form
+ a long, continuous document.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There is always some <i>selected text</i>, a contiguous string marked
+ on the screen by reversing its color. If the selected text is
+ a null string, it is indicated by a hairline cursor between two
+ characters. The selected text may be edited by mousing and typing.
+ Text is selected by pointing and clicking button 1 to make a null-
+ string selection, or by pointing, then sweeping with button 1
+ pressed. Text may also be selected by double-clicking: just inside
+ a matched delimiter-pair with one of <tt><font size=+1>{[(&lt;`'&quot;</font></tt> on the left and <tt><font size=+1>}])&gt;`'&quot;</font></tt>
+ on the right, it selects all text within the pair; at the beginning
+ or end of a line, it selects the line; within or at the
+ edge of an alphanumeric word, it selects the word.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Characters typed on the keyboard replace the selected text; if
+ this text is not empty, it is placed in a <i>snarf buffer</i> common
+ to all windows but distinct from that of <a href="../man1/sam.html"><i>sam</i>(1)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Programs access the text in the window at a single point maintained
+ automatically by <i>9term</i>. The <i>output point</i> is the location in the
+ text where the next character written by a program to the terminal
+ will appear; afterwards, the output point is the null string beyond
+ the new character. The output point is also the location
+ in the text of the next character that will be read (directly
+ from the text in the window, not from an intervening buffer) by
+ a program. Since Unix does not make it possible to know when a
+ program is reading the terminal, lines are sent as they are completed
+ (when the user types a newline character).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In general there is text in the window after the output point,
+ usually placed there by typing but occasionally by the editing
+ operations described below. A pending read of the terminal will
+ block until the text after the output point contains a newline,
+ whereupon the read may acquire the text, up to and including the
+ newline. After the read, as described above, the output point
+ will be at the beginning of the next line of text. In normal circumstances,
+ therefore, typed text is delivered to programs a line at a time.
+ Changes made by typing or editing before the text is read will
+ not be seen by the program reading it. Because of the
+ Unix issues mentioned above, a line of text is only editable until
+ it is completed with a newline character, or when hold mode (see
+ below) is enabled.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Even when there are newlines in the output text, <i>9term</i> will not
+ honor reads if the window is in <i>hold mode</i>, which is indicated
+ by a white cursor and blue text and border. The ESC character
+ toggles hold mode. Some programs automatically turn on hold mode
+ to simplify the editing of multi-line text; type ESC when done
+ to allow <i>mail</i> to read the text.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An EOT character (control-D) behaves exactly like newline except
+ that it is not delivered to a program when read. Thus on an empty
+ line an EOT serves to deliver an end-of-file indication: the read
+ will return zero characters. The BS character (control-H) erases
+ the character before the selected text. The ETB character
+ (control-W) erases any nonalphanumeric characters, then the alphanumeric
+ word just before the selected text. &#8216;Alphanumeric&#8217; here means
+ non-blanks and non-punctuation. The NAK character (control-U)
+ erases the text after the output point, and not yet read by a
+ program, but not more than one line. All these
+ characters are typed on the keyboard and hence replace the selected
+ text; for example, typing a BS with a word selected places the
+ word in the snarf buffer, removes it from the screen, and erases
+ the character before the word.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An ACK character (control-F) or Insert character triggers file
+ name completion for the preceding string (see <a href="../man3/complete.html"><i>complete</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Text may be moved vertically within the window. A scroll bar on
+ the left of the window shows in its clear portion what fragment
+ of the total output text is visible on the screen, and in its
+ gray part what is above or below view; it measures characters,
+ not lines. Mousing inside the scroll bar moves text: clicking
+ button 1
+ with the mouse pointing inside the scroll bar brings the line
+ at the top of the window to the cursor&#8217;s vertical location; button
+ 3 takes the line at the cursor to the top of the window; button
+ 2, treating the scroll bar as a ruler, jumps to the indicated
+ portion of the stored text. Holding a button pressed in the scroll
+ bar will
+ cause the text to scroll continuously until the button is released.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Typing down-arrow scrolls forward one third of a window, and up-arrow
+ scrolls back. Typing page-down scrolls forward two thirds of a
+ window, and page-up scrolls back. Typing Home scrolls to the top
+ of the window; typing End scrolls to the end.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The DEL character sends an <tt><font size=+1>interrupt</font></tt> note to all processes in
+ the window&#8217;s process group. Unlike the other characters, the DEL
+ and arrow keys do not affect the selected text. The left (right)
+ arrow key moves the selection to one character before (after)
+ the current selection.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9term</i> relies on the kernel&#8217;s terminal processing to handle EOT
+ and DEL, so the terminal must be set up with EOT as the &#8220;eof&#8221;
+ character and DEL as the &#8220;intr&#8221; character. <i>9term</i> runs <a href="../man1/stty.html"><i>stty</i>(1)</a>
+ to establish this when the terminal is created.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Normally, written output to a window blocks when the text reaches
+ the end of the screen and the terminal buffer fills; a button
+ 2 menu item toggles scrolling.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9term</i> changes behavior according to the terminal settings of the
+ running programs. Most programs run with echo enabled. In this
+ mode, <i>9term</i> displays and allows editing of the input. Some programs,
+ typically those reading passwords, run with echo disabled. In
+ this mode, <i>9term</i> passes keystrokes through directly,
+ without echoing them or buffering until a newline character. These
+ heuristics work well in many cases, but there are a few common
+ ones where they fall short. First, programs using the GNU readline
+ library typically disable terminal echo and perform echoing themselves.
+ The most common example is the shell
+ <a href="../man1/bash.html"><i>bash</i>(1)</a>. Disabling the use of readline with &#8220;<tt><font size=+1>set +o emacs</font></tt>&#8221; [<i>sic</i>]
+ usually restores the desired behavior. Second, remote terminal
+ programs such as <a href="../man1/ssh.html"><i>ssh</i>(1)</a> typically run with echo disabled, relying
+ on the remote system to echo characters as desired. Plan 9&#8217;s <i>ssh</i>
+ has a <tt><font size=+1>&#8722;C</font></tt> flag to disable this, leaving the terminal in
+ &#8220;cooked&#8221; mode. For similar situations on Unix, <i>9term</i>&#8217;s button
+ 2 menu has an entry to toggle the forced use of cooked mode, despite
+ the terminal settings. In such cases, it is useful to run &#8220;<tt><font size=+1>stty
+ &#8722;echo</font></tt>&#8221; on the remote system to avoid seeing your input twice.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Editing operations are selected from a menu on button 2. The <tt><font size=+1>cut</font></tt>
+ operation deletes the selected text from the screen and puts it
+ in the snarf buffer; <tt><font size=+1>snarf</font></tt> copies the selected text to the buffer
+ without deleting it; <tt><font size=+1>paste</font></tt> replaces the selected text with the
+ contents of the buffer; and <tt><font size=+1>send</font></tt> copies the snarf buffer to
+ just after the output point, adding a final newline if missing.
+ <tt><font size=+1>Paste</font></tt> will sometimes and <tt><font size=+1>send</font></tt> will always place text after the
+ output point; the text so placed will behave exactly as described
+ above. Therefore when pasting text containing newlines after the
+ output point, it may be prudent to turn on hold mode first.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>plumb</font></tt> menu item sends the contents of the selection (not the
+ snarf buffer) to the <i>plumber</i> (see <a href="../man1/plumb.html"><i>plumb</i>(1)</a>). If the selection
+ is empty, it sends the white-space-delimited text containing the
+ selection (typing cursor). A typical use of this feature is to
+ tell the editor to find the source of an error by plumbing the
+ file and
+ line information in a compiler&#8217;s diagnostic.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each <i>9term</i> listens for connections on a Unix socket. When a client
+ connects, the <i>9term</i> writes the window contents to the client and
+ then hangs up. <i>9term</i> installs the name of this socket in the environment
+ as <tt><font size=+1>$text9term</font></tt> before running <i>cmd</i>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/9term<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ There should be a program to toggle the current window&#8217;s hold
+ mode.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Unix makes everything harder.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/wintext.html"><i>wintext</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/acid.html b/man/man1/acid.html
new file mode 100644
index 00000000..f04c9baa
--- /dev/null
+++ b/man/man1/acid.html
@@ -0,0 +1,486 @@
+<head>
+<title>acid(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ACID(1)</b><td align=right><b>ACID(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ acid, acidtypes &ndash; debugger<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>acid</font></tt> [ <tt><font size=+1>&#8722;l</font></tt> <i>library</i> ] [ <tt><font size=+1>&#8722;wq</font></tt> ] [ <tt><font size=+1>&#8722;m</font></tt> <i>machine</i> ] [ <i>pid</i> | <i>core</i> ] [ <i>textfile</i>
+ ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>acidtypes</font></tt> [ <tt><font size=+1>&#8722;p</font></tt> <i>prefix</i> ] <i>file</i> ...<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Acid</i> is a programmable symbolic debugger. It can inspect one or
+ more processes that share an address space. A program to be debugged
+ may be specified by the process id of a running or defunct process,
+ or by the name of the program&#8217;s text file (<tt><font size=+1>a.out</font></tt> by default).
+ At the prompt, <i>acid</i> will store function definitions
+ or print the value of expressions. Options are<br>
+ <tt><font size=+1>&#8722;w</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allow the textfile to be modified.<br>
+ <tt><font size=+1>&#8722;q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print variable renamings at startup.<br>
+ <tt><font size=+1>&#8722;l</font></tt> <i>library</i>&nbsp;&nbsp;&nbsp;&nbsp;Load from <i>library</i> at startup; see below.<br>
+ <tt><font size=+1>&#8722;m</font></tt> <i>machine</i>&nbsp;&nbsp;&nbsp;Assume instructions are for the given CPU type (see
+ <a href="../man3/mach.html"><i>mach</i>(3)</a>) instead of using the executable header to select the
+ CPU type.<br>
+ <tt><font size=+1>&#8722;k</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Debug the kernel state for the process, rather than the user
+ state.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ At startup, <i>acid</i> obtains standard function definitions from the
+ library file <tt><font size=+1>/usr/local/plan9/acid/port</font></tt>, architecture-dependent
+ functions from <tt><font size=+1>/usr/local/plan9/acid/$objtype</font></tt>, user-specified
+ functions from <tt><font size=+1>$home/lib/acid</font></tt>, and further functions from <tt><font size=+1>&#8722;l</font></tt> files.
+ Definitions in any file may
+ override previously defined functions. If the function <i>acidinit</i>()
+ is defined, it will be invoked after all modules have been loaded.
+ Then the function <i>acidmap</i>() will be invoked if defined. <tt><font size=+1>/usr/local/plan9/acid/port</font></tt>
+ provides a definition of <i>acidmap</i> that attaches all the shared
+ libraries being used by the target
+ process and then runs <i>acidtypes</i> (<i>q.v.</i>) to create <i>acid</i> functions
+ for examining data structures.<br>
+ <p><font size=+1><b>Language </b></font><br>
+ Symbols of the program being debugged become integer variables
+ whose values are addresses. Contents of addresses are obtained
+ by indirection. Local variables are qualified by function name,
+ for example <tt><font size=+1>main:argv</font></tt>. When program symbols conflict with <i>acid</i>
+ words, distinguishing <tt><font size=+1>$</font></tt> signs are prefixed. Such
+ renamings are reported at startup; option <tt><font size=+1>&#8722;q</font></tt> suppresses them.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Variable types (<i>integer, float, list, string</i>) and formats are
+ inferred from assignments. Truth values false/true are attributed
+ to zero/nonzero integers or floats and to empty/nonempty lists
+ or strings. Lists are sequences of expressions surrounded by <tt><font size=+1>{}</font></tt>
+ and separated by commas.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Expressions are much as in C, but yield both a value and a format.
+ Casts to complex types are allowed. Lists admit the following
+ operators, with subscripts counted from 0.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>head</font></tt> <i>list<br>
+ </i><tt><font size=+1>tail</font></tt> <i>list<br>
+ </i><tt><font size=+1>append</font></tt> <i>list</i><tt><font size=+1>,</font></tt> <i>element<br>
+ </i><tt><font size=+1>delete</font></tt> <i>list</i><tt><font size=+1>,</font></tt> <i>subscript
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+
+ </table>
+ Format codes are the same as in <a href="../man1/db.html"><i>db</i>(1)</a>. Formats may be attached
+ to (unary) expressions with <tt><font size=+1>\</font></tt>, e.g. <tt><font size=+1>(32*7)\D</font></tt>. There are two indirection
+ operators, <tt><font size=+1>*</font></tt> to address a core image, <tt><font size=+1>@</font></tt> to address a text file.
+ The type and format of the result are determined by the format
+ of the operand, whose type must be integer.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Statements are<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>if</font></tt> <i>expr</i> <tt><font size=+1>then</font></tt> <i>statement</i> [ <tt><font size=+1>else</font></tt> <i>statement</i> ]<br>
+ <tt><font size=+1>while</font></tt> <i>expr</i> <tt><font size=+1>do</font></tt> <i>statement<br>
+ </i><tt><font size=+1>loop</font></tt> <i>expr</i><tt><font size=+1>,</font></tt> <i>expr</i> <tt><font size=+1>do</font></tt> <i>statement<br>
+ </i><tt><font size=+1>defn</font></tt> <i>name</i><tt><font size=+1>(</font></tt><i>args</i><tt><font size=+1>) {</font></tt> <i>statement</i> <tt><font size=+1>}<br>
+ defn</font></tt> <i>name<br>
+ name</i><tt><font size=+1>(</font></tt><i>args</i><tt><font size=+1>)<br>
+ builtin</font></tt> <i>name</i><tt><font size=+1>(</font></tt><i>args</i><tt><font size=+1>)<br>
+ local</font></tt> <i>name<br>
+ </i><tt><font size=+1>return</font></tt> <i>expr<br>
+ </i><tt><font size=+1>whatis</font></tt> [ <i>name</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ The statement <tt><font size=+1>defn</font></tt> <i>name</i> clears the definition for <i>name</i>. A <tt><font size=+1>defn</font></tt>
+ may override a built-in function; prefixing a function call with
+ <tt><font size=+1>builtin</font></tt> ignores any overriding <tt><font size=+1>defn</font></tt>, forcing the use of the built-in
+ function.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Here is a partial list of functions; see the manual for a complete
+ list.<br>
+ <tt><font size=+1>stk()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print a stack trace for current process.<br>
+ <tt><font size=+1>lstk()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print a stack trace with values of local variables.<br>
+ <tt><font size=+1>gpr()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print general registers. Registers can also be accessed by
+ name, for example <tt><font size=+1>*R0</font></tt>.<br>
+ <tt><font size=+1>spr()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print special registers such as program counter and stack
+ pointer.<br>
+ <tt><font size=+1>fpr()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print floating-point registers.<br>
+ <tt><font size=+1>regs()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Same as <tt><font size=+1>spr();gpr()</font></tt>.<br>
+ <tt><font size=+1>fmt(</font></tt><i>expr</i><tt><font size=+1>,</font></tt><i>format</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Expression <i>expr</i> with format given by the character value of expression
+ <i>format</i>.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>src(</font></tt><i>address</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print 10 lines of source around the program address.<br>
+ <tt><font size=+1>Bsrc(</font></tt><i>address</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Get the source line for the program address into
+ a window of a running <a href="../man1/sam.html"><i>sam</i>(1)</a> and select it.<br>
+ <tt><font size=+1>line(</font></tt><i>address</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print source line nearest to the program address.<br>
+ <tt><font size=+1>source()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List current source directories.<br>
+ <tt><font size=+1>addsrcdir(</font></tt><i>string</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Add a source directory to the list.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>filepc(</font></tt><i>where</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;Convert a string of the form <i>sourcefile</i><tt><font size=+1>:</font></tt><i>linenumber</i>
+ to a machine address.<br>
+ <tt><font size=+1>pcfile(</font></tt><i>address</i><tt><font size=+1>)</font></tt>Convert a machine address to a source file name.<br>
+ <tt><font size=+1>pcline(</font></tt><i>address</i><tt><font size=+1>)</font></tt>Convert a machine address to a source line number.<br>
+ <tt><font size=+1>bptab()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List breakpoints set in the current process.<br>
+ <tt><font size=+1>bpset(</font></tt><i>address</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;Set a breakpoint in the current process at the given
+ address. (Doesn&#8217;t work on Unix yet.)<br>
+ <tt><font size=+1>bpdel(</font></tt><i>address</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;Delete a breakpoint from the current process.<br>
+ <tt><font size=+1>cont()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Continue execution of current process and wait for it to
+ stop.<br>
+ <tt><font size=+1>step()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Execute a single machine instruction in the current process.
+ (Doesn&#8217;t work on Unix yet.)<br>
+ <tt><font size=+1>func()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Step repeatedly until after a function return.<br>
+ <tt><font size=+1>stopped(</font></tt><i>pid</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;This replaceable function is called automatically
+ when the given process stops. It normally prints the program counter
+ and returns to the prompt.<br>
+ <tt><font size=+1>asm(</font></tt><i>address</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disassemble 30 machine instructions beginning at the
+ given address.<br>
+ <tt><font size=+1>mem(</font></tt><i>address</i><tt><font size=+1>,</font></tt><i>string</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print a block of memory interpreted according to a string of format
+ codes.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>dump(</font></tt><i>address</i><tt><font size=+1>,</font></tt><i>n</i><tt><font size=+1>,</font></tt><i>string</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Like <tt><font size=+1>mem</font></tt>(), repeated for <i>n</i> consecutive blocks.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>print(</font></tt><i>expr</i><tt><font size=+1>,</font></tt><i>...</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;Print the values of the expressions.<br>
+ <tt><font size=+1>newproc(</font></tt><i>arguments</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Start a new process with arguments given as a string and halt
+ at the first instruction.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>new()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Like <i>newproc</i>(), but take arguments (except <tt><font size=+1>argv[0]</font></tt>) from
+ string variable <tt><font size=+1>progargs</font></tt>.<br>
+ <tt><font size=+1>win()</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Like <i>new</i>(), but run the process in a separate window.<br>
+ <tt><font size=+1>start(</font></tt><i>pid</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start a stopped process.<br>
+ <tt><font size=+1>kill(</font></tt><i>pid</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kill the given process.<br>
+ <tt><font size=+1>setproc(</font></tt><i>pid</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Make the given process current.<br>
+ <tt><font size=+1>rc(</font></tt><i>string</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Escape to the shell, <a href="../man1/rc.html"><i>rc</i>(1)</a>, to execute the command string.<br>
+ <tt><font size=+1>include(</font></tt><i>string</i><tt><font size=+1>)</font></tt>Read acid commands from the named file.<br>
+ <tt><font size=+1>includepipe(</font></tt><i>string</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Run the command string, reading its standard output as acid commands.<br>
+
+ </table>
+
+ </table>
+ <p><font size=+1><b>Shared library segments </b></font><br>
+ When a pid or core file is specified on the command line, <i>acid</i>
+ will, as part of its startup, determine the set of shared libraries
+ in use by the process image and map those at appropriate locations.
+ If <i>acid</i> is started without a pid or core file and is subsequently
+ attached to a process via <tt><font size=+1>setproc</font></tt>, the shared library maps
+ can be initialized by calling <tt><font size=+1>dynamicmap()</font></tt>.<br>
+ <p><font size=+1><b>Type information </b></font><br>
+ Unix compilers conventionally include detailed type information
+ in the debugging symbol section of binaries. The external program
+ <tt><font size=+1>acidtypes</font></tt> extracts this information and formats it as <i>acid</i> program
+ text. Once the shared libraries have been mapped, the default
+ <i>acid</i> startup invokes <tt><font size=+1>acidtypes</font></tt> (via
+ <tt><font size=+1>includepipe</font></tt>) on the set of currently mapped text files. The function
+ <tt><font size=+1>acidtypes()</font></tt> can be called to rerun the command after changing
+ the set of mapped text files.<br>
+ <p><font size=+1><b>Acid Libraries </b></font><br>
+ There are a number of <i>acid</i> &#8216;libraries&#8217; that provide higher-level
+ debugging facilities. One notable example is <i>trump</i>, which uses
+ <i>acid</i> to trace memory allocation. <i>Trump</i> requires starting <i>acid</i>
+ on the program, either by attaching to a running process or by
+ executing <tt><font size=+1>new()</font></tt> on a binary (perhaps after setting <tt><font size=+1>progargs</font></tt>),
+ stopping the process, and then running <tt><font size=+1>trump()</font></tt> to execute the
+ program under the scaffolding. The output will be a trace of the
+ memory allocation and free calls executed by the program. When
+ finished tracing, stop the process and execute <tt><font size=+1>untrump()</font></tt> followed
+ by <tt><font size=+1>cont()</font></tt> to resume execution.
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Start to debug <tt><font size=+1>/bin/ls</font></tt>; set some breakpoints; run up to the first
+ one (this example doesn&#8217;t work on Unix yet):<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>% acid /bin/ls<br>
+ /bin/ls: mips plan 9 executable<br>
+ /sys/lib/acid/port<br>
+ /sys/lib/acid/mips<br>
+ acid: new()<br>
+ 70094: system call &nbsp;&nbsp;&nbsp;_main &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ADD &nbsp;&nbsp;&nbsp;$&#8722;0x14,R29<br>
+ 70094: breakpoint &nbsp;&nbsp;&nbsp;&nbsp;main+0x4 &nbsp;&nbsp;&nbsp;MOVW R31,0x0(R29)<br>
+ acid: pid<br>
+ 70094<br>
+ acid: argv0 = **main:argv\s<br>
+ acid: whatis argv0<br>
+ integer variable format s<br>
+ acid: *argv0<br>
+ /bin/ls<br>
+ acid: bpset(ls)<br>
+ acid: cont()<br>
+ 70094: breakpoint &nbsp;&nbsp;&nbsp;ls &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ADD &nbsp;&nbsp;&nbsp;$&#8722;0x16c8,R29<br>
+ acid: <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Display elements of a linked list of structures:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>complex Str { 'D' 0 val; 'X' 4 next; };<br>
+ s = *headstr;<br>
+ while s != 0 do{<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ complex Str s;<br>
+ print(s.val, &quot;\n&quot;);<br>
+ s = s.next;<br>
+
+ </table>
+ }<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Note the use of the <tt><font size=+1>.</font></tt> operator instead of <tt><font size=+1>&#8722;&gt;</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Display an array of bytes declared in C as <tt><font size=+1>char array[]</font></tt>.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>*(array\s)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ This example gives <tt><font size=+1>array</font></tt> string format, then prints the string
+ beginning at the address (in <i>acid</i> notation) <tt><font size=+1>*array</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Trace the system calls executed by <a href="../man1/ls.html"><i>ls</i>(1)</a> (neither does this one):<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>% acid &#8722;l truss /bin/ls<br>
+ /bin/ls:386 plan 9 executable<br>
+ /sys/lib/acid/port<br>
+ /sys/lib/acid/kernel<br>
+ /sys/lib/acid/truss<br>
+ /sys/lib/acid/386<br>
+ acid: progargs = &quot;&#8722;l lib/profile&quot;<br>
+ acid: new()<br>
+ acid: truss()<br>
+ open(&quot;#c/pid&quot;, 0)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return value: 3<br>
+
+ </table>
+ pread(3, 0x7fffeeac, 20, &#8722;1)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return value: 12<br>
+ data: &quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;166 &quot;<br>
+
+ </table>
+ ...<br>
+ stat(&quot;lib/profile&quot;, 0x0000f8cc, 113)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return value: 65<br>
+
+ </table>
+ open(&quot;/env/timezone&quot;, 0)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return value: 3<br>
+
+ </table>
+ pread(3, 0x7fffd7c4, 1680, &#8722;1)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return value: 1518<br>
+ data: &quot;EST &#8722;18000 EDT &#8722;14400<br>
+ 9943200 &nbsp;&nbsp;&nbsp;&nbsp;25664400 &nbsp;&nbsp;&nbsp;&nbsp;41392800 &nbsp;&nbsp;&nbsp;&nbsp;57718800 &nbsp;&nbsp;&nbsp;&nbsp;73447200 &nbsp;&nbsp;&nbsp;&nbsp;89168400<br>
+ 104896800 &nbsp;&nbsp;&nbsp;...&quot;<br>
+
+ </table>
+ close(3)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return value: 0<br>
+
+ </table>
+ pwrite(1, &quot;&#8722;&#8722;rw&#8722;rw&#8722;r&#8722;&#8722; M 9 rob rob 2519 Mar 22 10:29 lib/profile<br>
+ &quot;, 54, &#8722;1)<br>
+ &#8722;&#8722;rw&#8722;rw&#8722;r&#8722;&#8722; M 9 rob rob 2519 Mar 22 10:29 lib/profile<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return value: 54<br>
+
+ </table>
+ ...<br>
+ 166: breakpoint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_exits+0x5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INTB $0x40<br>
+ acid: cont()<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/acid/$objtype<br>
+ /usr/local/plan9/acid/port<br>
+ /usr/local/plan9/acid/kernel<br>
+ /usr/local/plan9/acid/trump<br>
+ /usr/local/plan9/acid/truss<br>
+ $home/lib/acid<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/acid<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/mk.html"><i>mk</i>(1)</a>, <a href="../man1/db.html"><i>db</i>(1)</a><br>
+ Phil Winterbottom, &#8220;Acid Manual&#8221;.<br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ At termination, kill commands are proposed for processes that
+ are still active.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ There is no way to redirect the standard input and standard output
+ of a new process.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Source line selection near the beginning of a file may pick an
+ adjacent file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ With the extant stepping commands, one cannot step through instructions
+ outside the text segment and it is hard to debug across process
+ forks.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Breakpoints do not work yet. Therefore, commands such as <tt><font size=+1>step</font></tt>,
+ <tt><font size=+1>new</font></tt>, and <tt><font size=+1>truss</font></tt> do not work either. <tt><font size=+1>New</font></tt> in particular will need
+ some help to cope with dynamic libraries.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/acme.html b/man/man1/acme.html
new file mode 100644
index 00000000..bc1063bd
--- /dev/null
+++ b/man/man1/acme.html
@@ -0,0 +1,481 @@
+<head>
+<title>acme(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ACME(1)</b><td align=right><b>ACME(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ acme, win, awd &ndash; interactive text windows<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>acme</font></tt> [ <tt><font size=+1>&#8722;f</font></tt> <i>varfont</i> ] [ <tt><font size=+1>&#8722;F</font></tt> <i>fixfont</i> ] [ <tt><font size=+1>&#8722;c</font></tt> <i>ncol</i> ] [ <tt><font size=+1>&#8722;br</font></tt> ] [ <tt><font size=+1>&#8722;l</font></tt> <i>file</i>
+ | <i>file</i> ... ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>win</font></tt> [ <i>command</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>awd</font></tt> [ <i>label</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Acme</i> manages windows of text that may be edited interactively
+ or by external programs. The interactive interface uses the keyboard
+ and mouse; external programs use a set of files served by <i>acme</i>;
+ these are discussed in <a href="../man4/acme.html"><i>acme</i>(4)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Any named <i>files</i> are read into <i>acme</i> windows before <i>acme</i> accepts
+ input. With the <tt><font size=+1>&#8722;l</font></tt> option, the state of the entire system is loaded
+ from <i>file</i>, which should have been created by a <tt><font size=+1>Dump</font></tt> command (q.v.),
+ and subsequent <i>file</i> names are ignored. Plain files display as
+ text; directories display as columnated lists of the
+ names of their components, as in <tt><font size=+1>ls &#8722;p directory|mc</font></tt> except that
+ the names of subdirectories have a slash appended.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;f</font></tt> (<tt><font size=+1>&#8722;F</font></tt>) option sets the main font, usually variable-pitch
+ (alternate, usually fixed-pitch); the default is <tt><font size=+1>/usr/local/plan9/font/lucidasans/euro.8.font</font></tt>
+ (<tt><font size=+1>.../lucm/unicode.9.font</font></tt>). Tab intervals are set to the width
+ of 4 (or the value of <tt><font size=+1>$tabstop</font></tt>) numeral zeros in the appropriate
+ font.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <p><font size=+1><b>Windows </b></font><br>
+ <i>Acme</i> windows are in two parts: a one-line <i>tag</i> above a multi-line
+ <i>body</i>. The body typically contains an image of a file, as in <a href="../man1/sam.html"><i>sam</i>(1)</a>,
+ or the output of a program, as in an <a href="../man1/rio.html"><i>rio</i>(1)</a> window. The tag contains
+ a number of blank-separated words, followed by a vertical bar
+ character, followed by anything. The first word is the
+ name of the window, typically the name of the associated file
+ or directory, and the other words are commands available in that
+ window. Any text may be added after the bar; examples are strings
+ to search for or commands to execute in that window. Changes to
+ the text left of the bar will be ignored, unless the result is
+ to change the name of the window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If a window holds a directory, the name (first word of the tag)
+ will end with a slash.<br>
+ <p><font size=+1><b>Scrolling </b></font><br>
+ Each window has a scroll bar to the left of the body. The scroll
+ bar behaves much as in <a href="../man1/sam.html"><i>sam</i>(1)</a> or <a href="../man1/rio.html"><i>rio</i>(1)</a> except that scrolling
+ occurs when the button is pressed, rather than released, and continues
+ as long as the mouse button is held down in the scroll bar. For
+ example, to scroll slowly through a file, hold button 3
+ down near the top of the scroll bar. Moving the mouse down the
+ scroll bar speeds up the rate of scrolling. (The experimental
+ option <tt><font size=+1>&#8722;r</font></tt> reverses the scrolling behavior of buttons 1 and 3,
+ to behave more like <a href="../man1/xterm.html"><i>xterm</i>(1)</a>.)<br>
+ <p><font size=+1><b>Layout </b></font><br>
+ <i>Acme</i> windows are arranged in columns. By default, it creates two
+ columns when starting; this can be overridden with the <tt><font size=+1>&#8722;c</font></tt> option.
+ Placement is automatic but may be adjusted using the <i>layout box</i>
+ in the upper left corner of each window and column. Pressing and
+ holding any mouse button in the box drags the
+ associated window or column. For windows, just clicking in the
+ layout box grows the window in place: button 1 grows it a little,
+ button 2 grows it as much as it can, still leaving all other tags
+ in that column visible, and button 3 takes over the column completely,
+ temporarily hiding other windows in the column. (They
+ will return <i>en masse</i> if any of them needs attention.) The layout
+ box in a window is normally white; when it is black in the center,
+ it records that the file is &#8216;dirty&#8217;: <i>acme</i> believes it is modified
+ from its original contents.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Tags exist at the top of each column and across the whole display.
+ <i>Acme</i> pre-loads them with useful commands. Also, the tag across
+ the top maintains a list of executing long-running commands.<br>
+ <p><font size=+1><b>Typing </b></font><br>
+ The behavior of typed text is similar to that in <a href="../man1/rio.html"><i>rio</i>(1)</a> except
+ that the characters are delivered to the tag or body under the
+ mouse; there is no &#8216;click to type&#8217;. (The experimental option <tt><font size=+1>&#8722;b</font></tt>
+ causes typing to go to the most recently clicked-at or made window.)
+ The usual backspacing conventions apply. As in <a href="../man1/sam.html"><i>sam</i>(1)</a> but not
+ <i>rio</i>, the ESC key selects the text typed since the last mouse action,
+ a feature particularly useful when executing commands. A side
+ effect is that typing ESC with text already selected is identical
+ to a <tt><font size=+1>Cut</font></tt> command (<i>q.v.</i>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Most text, including the names of windows, may be edited uniformly.
+ The only exception is that the command names to the left of the
+ bar in a tag are maintained automatically; changes to them are
+ repaired by <i>acme</i>.<br>
+ <p><font size=+1><b>Directory context </b></font><br>
+ Each window&#8217;s tag names a directory: explicitly if the window
+ holds a directory; implicitly if it holds a regular file (e.g.
+ the directory <tt><font size=+1>/adm</font></tt> if the window holds <tt><font size=+1>/adm/users</font></tt>). This directory
+ provides a <i>context</i> for interpreting file names in that window.
+ For example, the string <tt><font size=+1>users</font></tt> in a window labeled <tt><font size=+1>/adm/</font></tt> or
+ <tt><font size=+1>/adm/keys</font></tt> will be interpreted as the file name <tt><font size=+1>/adm/users</font></tt>. The
+ directory is defined purely textually, so it can be a non-existent
+ directory or a real directory associated with a non-existent file
+ (e.g. <tt><font size=+1>/adm/not&#8722;a&#8722;file</font></tt>). File names beginning with a slash are
+ assumed to be absolute file names.
+ <p><font size=+1><b>Errors </b></font><br>
+ Windows whose names begin with <tt><font size=+1>&#8722;</font></tt> or <tt><font size=+1>+</font></tt> conventionally hold diagnostics
+ and other data not directly associated with files. A window labeled
+ <tt><font size=+1>+Errors</font></tt> receives all diagnostics produced by <i>acme</i> itself. Diagnostics
+ from commands run by <i>acme</i> appear in a window named <i>directory</i><tt><font size=+1>/+Errors</font></tt>
+ where <i>directory</i> is
+ identified by the context of the command. These error windows
+ are created when needed.<br>
+ <p><font size=+1><b>Mouse button 1 </b></font><br>
+ Mouse button 1 selects text just as in <a href="../man1/sam.html"><i>sam</i>(1)</a> or <a href="../man1/rio.html"><i>rio</i>(1)</a><i>,</i> including
+ the usual double-clicking conventions.<br>
+ <p><font size=+1><b>Mouse button 2 </b></font><br>
+ By an action similar to selecting text with button 1, button 2
+ indicates text to execute as a command. If the indicated text
+ has multiple white-space-separated words, the first is the command
+ name and the second and subsequent are its arguments. If button
+ 2 is &#8216;clicked&#8217;--indicates a null string--<i>acme expands</i> the
+ indicated text to find a command to run: if the click is within
+ button-1-selected text, <i>acme</i> takes that selection as the command;
+ otherwise it takes the largest string of valid file name characters
+ containing the click. Valid file name characters are alphanumerics
+ and <tt><font size=+1>_ . &#8722; + /</font></tt>. This behavior is similar to double-clicking
+ with button 1 but, because a null command is meaningless, only
+ a single click is required.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Some commands, all by convention starting with a capital letter,
+ are <i>built-ins</i> that are executed directly by <i>acme</i>:<br>
+ <tt><font size=+1>Cut</font></tt>&nbsp;&nbsp;&nbsp;Delete most recently selected text and place in snarf buffer.<br>
+ <tt><font size=+1>Del</font></tt>&nbsp;&nbsp;&nbsp;Delete window. If window is dirty, instead print a warning;
+ a second <tt><font size=+1>Del</font></tt> will succeed.<br>
+ <tt><font size=+1>Delcol<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Delete column and all its windows, after checking that windows
+ are not dirty.<br>
+
+ </table>
+ <tt><font size=+1>Delete<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Delete window without checking for dirtiness.<br>
+
+ </table>
+ <tt><font size=+1>Dump</font></tt>Write the state of <i>acme</i> to the file name, if specified, or
+ <tt><font size=+1>$home/acme.dump</font></tt> by default.<br>
+ <tt><font size=+1>Edit</font></tt>Treat the argument as a text editing command in the style
+ of <a href="../man1/sam.html"><i>sam</i>(1)</a>. The full <tt><font size=+1>Sam</font></tt> language is implemented except for the
+ commands <tt><font size=+1>k</font></tt>, <tt><font size=+1>n</font></tt>, <tt><font size=+1>q</font></tt>, and <tt><font size=+1>!</font></tt>. The <tt><font size=+1>=</font></tt> command is slightly different:
+ it includes the file name and gives only the line address unless
+ the command is explicitly <tt><font size=+1>=#</font></tt>. The &#8216;current window&#8217; for the
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ command is the body of the window in which the <tt><font size=+1>Edit</font></tt> command is
+ executed. Usually the <tt><font size=+1>Edit</font></tt> command would be typed in a tag; longer
+ commands may be prepared in a scratch window and executed, with
+ <tt><font size=+1>Edit</font></tt> itself in the current window, using the 2-1 chord described
+ below.
+
+ </table>
+ <tt><font size=+1>Exit</font></tt>Exit <i>acme</i> after checking that windows are not dirty.<br>
+ <tt><font size=+1>Font</font></tt>With no arguments, change the font of the associated window
+ from fixed-spaced to proportional-spaced or <i>vice versa</i>. Given
+ a file name argument, change the font of the window to that stored
+ in the named file. If the file name argument is prefixed by <tt><font size=+1>var</font></tt>
+ (<tt><font size=+1>fix</font></tt>), also set the default proportional-spaced
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ (fixed-spaced) font for future use to that font. Other existing
+ windows are unaffected.<br>
+
+ </table>
+ <tt><font size=+1>Get</font></tt>&nbsp;&nbsp;&nbsp;Load file into window, replacing previous contents (after checking
+ for dirtiness as in <tt><font size=+1>Del</font></tt>). With no argument, use the existing file
+ name of the window. Given an argument, use that file but do not
+ change the window&#8217;s file name.<br>
+ <tt><font size=+1>ID</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print window ID number (<i>q.v.</i>).<br>
+ <tt><font size=+1>Incl</font></tt>When opening &#8216;include&#8217; files (those enclosed in <tt><font size=+1>&lt;&gt;</font></tt>) with button
+ 3, <i>acme</i> searches in directories <tt><font size=+1>/$objtype/include</font></tt> and <tt><font size=+1>/sys/include</font></tt>.
+ <tt><font size=+1>Incl</font></tt> adds its arguments to a supplementary list of include directories,
+ analogous to the <tt><font size=+1>&#8722;I</font></tt> option to the compilers. This list is per-window
+ and is inherited when
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ windows are created by actions in that window, so <i>Incl</i> is most
+ usefully applied to a directory containing relevant source. With
+ no arguments, <i>Incl</i> prints the supplementary list. This command
+ is largely superseded by plumbing (see <a href="../man7/plumb.html"><i>plumb</i>(7)</a>).<br>
+
+ </table>
+ <tt><font size=+1>Kill</font></tt>Send a <tt><font size=+1>kill</font></tt> note to <i>acme</i>-initiated commands named as arguments.<br>
+ <tt><font size=+1>Local<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ In the Plan 9 <i>acme</i>, this prefix causes a command to be run in
+ <i>acme</i>&#8217;s<i>own</i> file name space and environment variable group. On Unix
+ this is impossible. <tt><font size=+1>Local</font></tt> is recognized as a prefix, but has no
+ effect on the command being executed.<br>
+
+ </table>
+ <tt><font size=+1>Load</font></tt>Restore the state of <i>acme</i> from a file (default <tt><font size=+1>$home/acme.dump</font></tt>)
+ created by the <tt><font size=+1>Dump</font></tt> command.<br>
+ <tt><font size=+1>Look</font></tt>Search in body for occurrence of literal text indicated by
+ the argument or, if none is given, by the selected text in the
+ body.<br>
+ <tt><font size=+1>New</font></tt>&nbsp;&nbsp;&nbsp;Make new window. With arguments, load the named files into
+ windows.<br>
+ <tt><font size=+1>Newcol<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Make new column.<br>
+
+ </table>
+ <tt><font size=+1>Paste<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Replace most recently selected text with contents of snarf buffer.<br>
+
+ </table>
+ <tt><font size=+1>Put</font></tt>&nbsp;&nbsp;&nbsp;Write window to the named file. With no argument, write to
+ the file named in the tag of the window.<br>
+ <tt><font size=+1>Putall<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Write all dirty windows whose names indicate existing regular
+ files.<br>
+
+ </table>
+ <tt><font size=+1>Redo</font></tt>Complement of <tt><font size=+1>Undo</font></tt>.<br>
+ <tt><font size=+1>Send</font></tt>Append selected text or snarf buffer to end of body; used
+ mainly with <i>win</i>.<br>
+ <tt><font size=+1>Snarf<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Place selected text in snarf buffer.<br>
+
+ </table>
+ <tt><font size=+1>Sort</font></tt>Arrange the windows in the column from top to bottom in lexicographical
+ order based on their names.<br>
+ <tt><font size=+1>Tab</font></tt>&nbsp;&nbsp;&nbsp;Set the width of tab stops for this window to the value of
+ the argument, in units of widths of the zero character. With no
+ arguments, it prints the current value.<br>
+ <tt><font size=+1>Undo</font></tt>Undo last textual change or set of changes.<br>
+ <tt><font size=+1>Zerox<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Create a copy of the window containing most recently selected
+ text.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ A common place to store text for commands is in the tag; in fact
+ <i>acme</i> maintains a set of commands appropriate to the state of the
+ window to the left of the bar in the tag.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the text indicated with button 2 is not a recognized built-in,
+ it is executed as a shell command. For example, indicating <tt><font size=+1>date</font></tt>
+ with button 2 runs <a href="../man1/date.html"><i>date</i>(1)</a>. The standard and error outputs of
+ commands are sent to the error window associated with the directory
+ from which the command was run, which will be created if
+ necessary. For example, in a window <tt><font size=+1>/etc/passwd</font></tt> executing <tt><font size=+1>pwd</font></tt>
+ will produce the output <tt><font size=+1>/etc</font></tt> in a (possibly newly-created) window
+ labeled <tt><font size=+1>/etc/+Errors</font></tt>; in a window containing <tt><font size=+1>/home/rob/sam/sam.c</font></tt>
+ executing <tt><font size=+1>mk</font></tt> will run <a href="../man1/mk.html"><i>mk</i>(1)</a> in <tt><font size=+1>/home/rob/sam</font></tt>, producing output
+ in a window labeled
+ <tt><font size=+1>/home/rob/sam/+Errors</font></tt>. The environment of such commands contains
+ the variable <tt><font size=+1>$%</font></tt> with value set to the filename of the window in
+ which the command is run, and <tt><font size=+1>$winid</font></tt> set to the window&#8217;s id number
+ (see <a href="../man4/acme.html"><i>acme</i>(4)</a>).<br>
+ <p><font size=+1><b>Mouse button 3 </b></font><br>
+ Pointing at text with button 3 instructs <i>acme</i> to locate or acquire
+ the file, string, etc. described by the indicated text and its
+ context. This description follows the actions taken when button
+ 3 is released after sweeping out some text. In the description,
+ <i>text</i> refers to the text of the original sweep or, if it was null,
+ the
+ result of applying the same expansion rules that apply to button
+ 2 actions.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the text names an existing window, <i>acme</i> moves the mouse cursor
+ to the selected text in the body of that window. If the text names
+ an existing file with no associated window, <i>acme</i> loads the file
+ into a new window and moves the mouse there. If the text is a
+ file name contained in angle brackets, <i>acme</i> loads the
+ indicated include file from the directory appropriate to the suffix
+ of the file name of the window holding the text. (The <tt><font size=+1>Incl</font></tt> command
+ adds directories to the standard list.)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the text begins with a colon, it is taken to be an address,
+ in the style of <a href="../man1/sam.html"><i>sam</i>(1)</a>, within the body of the window containing
+ the text. The address is evaluated, the resulting text highlighted,
+ and the mouse moved to it. Thus, in <i>acme</i>, one must type <tt><font size=+1>:/regexp</font></tt>
+ or <tt><font size=+1>:127</font></tt> not just <tt><font size=+1>/regexp</font></tt> or <tt><font size=+1>127</font></tt>. (There is an easier
+ way to locate literal text; see below.)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the text is a file name followed by a colon and an address,
+ <i>acme</i> loads the file and evaluates the address. For example, clicking
+ button 3 anywhere in the text <tt><font size=+1>file.c:27</font></tt> will open <tt><font size=+1>file.c</font></tt>, select
+ line 27, and put the mouse at the beginning of the line. The rules
+ about Error files, directories, and so on all combine
+ to make this an efficient way to investigate errors from compilers,
+ etc.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the text is not an address or file, it is taken to be literal
+ text, which is then searched for in the body of the window in
+ which button 3 was clicked. If a match is found, it is selected
+ and the mouse is moved there. Thus, to search for occurrences
+ of a word in a file, just click button 3 on the word. Because
+ of the rule of
+ using the selection as the button 3 action, subsequent clicks
+ will find subsequent occurrences without moving the mouse.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In all these actions, the mouse motion is not done if the text
+ is a null string within a non-null selected string in the tag,
+ so that (for example) complex regular expressions may be selected
+ and applied repeatedly to the body by just clicking button 3 over
+ them.<br>
+ <p><font size=+1><b>Chords of mouse buttons </b></font><br>
+ Several operations are bound to multiple-button actions. After
+ selecting text, with button 1 still down, pressing button 2 executes
+ <tt><font size=+1>Cut</font></tt> and button 3 executes <tt><font size=+1>Paste</font></tt>. After clicking one button, the
+ other undoes the first; thus (while holding down button 1) 2 followed
+ by 3 is a <tt><font size=+1>Snarf</font></tt> that leaves the file undirtied; 3
+ followed by 2 is a no-op. These actions also apply to text selected
+ by double-clicking because the double-click expansion is made
+ when the second click starts, not when it ends.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Commands may be given extra arguments by a mouse chord with buttons
+ 2 and 1. While holding down button 2 on text to be executed as
+ a command, clicking button 1 appends the text last pointed to
+ by button 1 as a distinct final argument. For example, to search
+ for literal <tt><font size=+1>text</font></tt> one may execute <tt><font size=+1>Look text</font></tt> with
+ button 2 or instead point at <tt><font size=+1>text</font></tt> with button 1 in any window,
+ release button 1, then execute <tt><font size=+1>Look</font></tt>, clicking button 1 while 2
+ is held down.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When an external command (e.g. <a href="../man1/echo.html"><i>echo</i>(1)</a>) is executed this way,
+ the extra argument is passed as expected and an environment variable
+ <tt><font size=+1>$acmeaddr</font></tt> is created that holds, in the form interpreted by button
+ 3, the fully-qualified address of the extra argument.<br>
+ <p><font size=+1><b>Support programs </b></font><br>
+ <i>Win</i> creates a new <i>acme</i> window and runs a <i>command</i> (default <tt><font size=+1>$SHELL</font></tt>)
+ in it, turning the window into something analogous to an <a href="../man1/rio.html"><i>rio</i>(1)</a>
+ window. Executing text in a <i>win</i> window with button 2 is similar
+ to using <tt><font size=+1>Send</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Awd</i> loads the tag line of its window with the directory in which
+ it&#8217;s running, suffixed <tt><font size=+1>&#8722;</font></tt><i>label</i> (default <tt><font size=+1>rc</font></tt>); it is intended to
+ be executed by a <tt><font size=+1>cd</font></tt> function for use in <i>win</i> windows. An example
+ definition is<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>fn cd { builtin cd $1 &amp;&amp; awd $sysname }<br>
+ </font></tt>
+ </table>
+ <p><font size=+1><b>Applications and guide files </b></font><br>
+ In the directory <tt><font size=+1>/acme</font></tt> live several subdirectories, each corresponding
+ to a program or set of related programs that employ <i>acme&#8217;s</i> user
+ interface. Each subdirectory includes source, binaries, and a
+ <tt><font size=+1>readme</font></tt> file for further information. It also includes a <tt><font size=+1>guide</font></tt>,
+ a text file holding sample commands to invoke the
+ programs. The idea is to find an example in the guide that best
+ matches the job at hand, edit it to suit, and execute it.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Whenever a command is executed by <i>acme</i>, the default search path
+ includes the directory of the window containing the command and
+ its subdirectory <tt><font size=+1>$cputype</font></tt>. The program directories in <tt><font size=+1>/acme</font></tt> contain
+ appropriately labeled subdirectories of binaries, so commands
+ named in the guide files will be found
+ automatically when run. Also, <i>acme</i> binds the directories <tt><font size=+1>/acme/bin</font></tt>
+ and <tt><font size=+1>/acme/bin/$cputype</font></tt> to the end of <tt><font size=+1>/bin</font></tt> when it starts; this
+ is where <i>acme</i>-specific programs such as <i>win</i> and <i>awd</i> reside.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>$home/acme.dump</font></tt>&nbsp;&nbsp;&nbsp;default file for <tt><font size=+1>Dump</font></tt> and <tt><font size=+1>Load</font></tt>; also where state
+ is written if <i>acme</i> dies or is killed unexpectedly, e.g. by deleting
+ its window.<br>
+ <tt><font size=+1>/acme/*/guide</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;template files for applications<br>
+ <tt><font size=+1>/acme/*/readme</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;informal documentation for applications<br>
+ <tt><font size=+1>/acme/*/src</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source for applications<br>
+ <tt><font size=+1>/acme/*/mips</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MIPS-specific binaries for applications<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/acme<br>
+ /usr/local/plan9/src/cmd/9term/win.c<br>
+ /usr/local/plan9/bin/awd<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man4/acme.html"><i>acme</i>(4)</a><br>
+ Rob Pike, <i>Acme: A User Interface for Programmers.<br>
+ </i>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ With the <tt><font size=+1>&#8722;l</font></tt> option or <tt><font size=+1>Load</font></tt> command, the recreation of windows
+ under control of external programs such as <i>win</i> is just to rerun
+ the command; information may be lost.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/acmeevent.html b/man/man1/acmeevent.html
new file mode 100644
index 00000000..230145ce
--- /dev/null
+++ b/man/man1/acmeevent.html
@@ -0,0 +1,332 @@
+<head>
+<title>acmeevent(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ACMEEVENT(1)</b><td align=right><b>ACMEEVENT(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ acmeevent, acme.rc &ndash; shell script support for acme clients<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>9p read acme/acme/$winid/event | acmeevent
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>. /usr/local/plan9/lib/acme.rc
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>newwindow
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>winread</font></tt> <i>file
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>winwrite</font></tt> <i>file
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>winctl</font></tt> <i>cmd
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>windump</font></tt> [ <i>dumpdir</i> | <tt><font size=+1>&#8722;</font></tt> ] [ <i>dumpcmd</i> | <tt><font size=+1>&#8722;</font></tt> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>winname</font></tt> <i>name
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>windel</font></tt> [ <tt><font size=+1>sure</font></tt> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>winwriteevent</font></tt> <i>c1 c2 q0 q1</i> [ <i>eq0 eq1 flag textlen text chordarg
+ chordaddr</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>wineventloop<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Acmeevent</i> and <i>acme.rc</i> make it easy to write simple <a href="../man1/acme.html"><i>acme</i>(1)</a> client
+ programs as shell scripts.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Acme</i> clients read the <tt><font size=+1>event</font></tt> files (see <a href="../man4/acme.html"><i>acme</i>(4)</a>) for the windows
+ they control, reacting to the events. The events are presented
+ in a format that is easy to read with C programs but hard to read
+ with shell scripts.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Acmeevent</i> reads an <a href="../man4/acme.html"><i>acme</i>(4)</a> event stream from standard input, printing
+ a shell-friendly version of the events, one per line, on standard
+ output. Each output line from <i>acmeevent</i> has the form:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>event</font></tt> <i>c1 c2 q0 q1 eq0 eq1 flag textlen text chordarg chordaddr
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+
+ </table>
+ The fields are:<br>
+ <i>c1</i>&nbsp;&nbsp;&nbsp;&nbsp;A character indicating the origin or cause of the action. The
+ possible causes are: a write to the body or tag file (<tt><font size=+1>E</font></tt>), a write
+ to the window&#8217;s other files (<tt><font size=+1>F</font></tt>), input via the keyboard (<tt><font size=+1>K</font></tt>), and
+ input via the mouse (<tt><font size=+1>M</font></tt>).<br>
+ <i>c2</i>&nbsp;&nbsp;&nbsp;&nbsp;A character indicating the type of action. The possible types
+ are: text deleted from the body (<tt><font size=+1>D</font></tt>), text deleted from the tag
+ (<tt><font size=+1>d</font></tt>), text inserted in the body (<tt><font size=+1>I</font></tt>), text inserted in the tag (<tt><font size=+1>i</font></tt>),
+ a button 3 action in the body (<tt><font size=+1>L</font></tt>), a button 3 action in the tag
+ (<tt><font size=+1>l</font></tt>), a button 2 action in the body (<tt><font size=+1>X</font></tt>), and a button 2 action
+ in the
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ tag (<tt><font size=+1>x</font></tt>).<br>
+
+ </table>
+ <i>q0</i>, <i>q1</i>The character addresses of the action.<br>
+ <i>eq0</i>, <i>q1<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The expanded character addresses of the action. If the text indicated
+ by <i>q0</i>, <i>q1</i> is a null string that has a non-null expansion, <i>eq0</i>,
+ <i>eq1</i> are the addresses of the expansion. Otherwise they are the
+ same as <i>q0</i>, <i>q1</i>.<br>
+
+ </table>
+ <i>flag&nbsp;&nbsp;&nbsp;Flag</i> is a bitwise OR (reported decimally) of the following:
+ 1 if the text indicated is recognized as an <i>acme</i> built-in command;
+ 2 if the text indicated is a null string that has a non-null expansion
+ (see <i>eq0</i>, <i>eq1</i> above); 8 if the command has an extra (chorded)
+ argument (see <i>chordarg</i> below). <i>Flag</i> remains from the
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man4/acme.html"><i>acme</i>(4)</a> event format. Because <i>eq0</i>, <i>eq1</i>, and <i>chordarg</i> are explicit
+ in each event (unlike in <a href="../man4/acme.html"><i>acme</i>(4)</a> events), <i>flag</i> can usually be
+ ignored.<br>
+
+ </table>
+ <i>textlen<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The length of the action text (or its expansion) for button 2
+ and button 3 events in characters.<br>
+
+ </table>
+ <i>text</i>&nbsp;&nbsp;&nbsp;If <i>textlen</i> is less than 256 chracters, <i>text</i> is the action
+ text itself. Otherwise it is an empty string and must be read
+ from the <tt><font size=+1>data</font></tt> file.<br>
+ <i>chordarg<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The chorded argument for an action.<br>
+
+ </table>
+ <i>chordorigin<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If the chord argument is in the body of a named window, <i>chordorigin</i>
+ specifies the full address of the argument, as in <tt><font size=+1>/etc/group:#123,#234</font></tt>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ To experiment with <i>acmeevent</i>, create an empty window in <i>acme</i> (using
+ <i>New</i>),<i>type<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>9p read acme/$winid/event | acmeevent<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ inside it, and execute it. Actions performed on the window will
+ be printed as events in the <tt><font size=+1>+Errors</font></tt> window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Acme.rc</i> is a library of <a href="../man1/rc.html"><i>rc</i>(1)</a> shell functions useful for writing
+ acme clients.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Newwindow</i> creates a new acme window and sets <tt><font size=+1>$winid</font></tt> to the new
+ window&#8217;s id. The other commands all use <tt><font size=+1>$winid</font></tt> to determine which
+ window to operate on.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Winread</i> prints the current window&#8217;s <i>file</i> to standard output. It
+ is equivalent to <tt><font size=+1>cat /mnt/acme/acme/$winid/</font></tt><i>file</i> on Plan 9. Similarly,
+ <i>winwrite</i> writes standard input to the current window&#8217;s <i>file</i>. <i>Winread</i>
+ and <i>winwrite</i> are useful mainly in building more complex functions.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Winctl</i> writes <i>cmd</i> to the window&#8217;s <tt><font size=+1>ctl</font></tt> file. The most commonly-used
+ command is <tt><font size=+1>clean</font></tt>, which marks the window as clean. See <a href="../man4/acme.html"><i>acme</i>(4)</a>
+ for a full list of commands.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Windump</i> sets the window&#8217;s dump directory and dump command (see
+ <a href="../man4/acme.html"><i>acme</i>(4)</a>). If either argument is omitted or is <tt><font size=+1>&#8722;</font></tt>, that argument
+ is not set.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Winname</i> sets the name displayed in the window&#8217;s tag.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Windel</i> simulates the <tt><font size=+1>Del</font></tt> command. If the argument <tt><font size=+1>sure</font></tt> is given,
+ it simulates the <tt><font size=+1>Delete</font></tt> command.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Winwriteevent</i> writes an event to the window&#8217;s event file. The
+ event is in the format produced by <i>acmeevent</i>. Only the first four
+ arguments are necessary: the rest are ignored. Event handlers
+ should call <i>winwriteevent</i> to pass unhandled button 2 or button
+ 3 events back to <i>acme</i> for processing.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Wineventloop</i> executes the current window&#8217;s event file, as output
+ by <i>acmeevent</i>. It returns when the window has been deleted. Before
+ running <i>wineventloop ,</i> clients must define a shell function named
+ <tt><font size=+1>event</font></tt>, which will be run for each incoming event, as <i>rc</i> executes
+ the output of <i>acmeevent</i>. A typical event function
+ need only worry about button 2 and button 3 events. Those events
+ not handled should be sent back to <i>acme</i> with <i>winwriteevent</i>.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Adict</i>, a dictionary browser, is implemented using <i>acmeevent</i> and
+ <i>acme.rc</i>. The <i>event</i> handler is:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>fn event {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ switch($1$2){<br>
+ case Mx MX &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# button 2 &#8722; pass back to acme<br>
+ winwriteevent $*<br>
+ case Ml ML &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# button 3 &#8722; open new window on dictionary or entry<br>
+ {<br>
+ if(~ $dict NONE)<br>
+ dictwin /adict/$7/ $7<br>
+ if not<br>
+ dictwin /adict/$dict/$7 $dict $7<br>
+ } &amp;<br>
+ }<br>
+
+ </table>
+ }<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Note that the button 3 handler starts a subshell in which to run
+ <i>dictwin</i>. That subshell will create a new window, set its name,
+ possibly fill the window with a dictionary list or dictionary
+ entry, mark the window as clean, and run the event loop:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>fn dictwin {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ newwindow<br>
+ winname $1<br>
+ dict=$2<br>
+ if(~ $dict NONE)<br>
+ dict &#8722;d '?' &gt;[2=1] | sed 1d | winwrite body<br>
+ if(~ $#* 3)<br>
+ dict &#8722;d $dict $3 &gt;[2=1] | winwrite body<br>
+ winctl clean<br>
+ wineventloop<br>
+
+ </table>
+ }<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The script starts with an initial window:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>dictwin /adict/ NONE<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Button 3 clicking on a dictionary name in the initial window will
+ create a new empty window for that dictionary. Typing and button
+ 3 clicking on a word in that window will create a new window with
+ the dictionary&#8217;s entry for that word.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ See <tt><font size=+1>/usr/local/plan9/bin/adict</font></tt> for the full implementation.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/acmeevent.c<br>
+ /usr/local/plan9/lib/acme.rc<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/acme.html"><i>acme</i>(1)</a>, <a href="../man4/acme.html"><i>acme</i>(4)</a>, <a href="../man1/rc.html"><i>rc</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ There is more that could be done to ease the writing of complicated
+ clients.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/ascii.html b/man/man1/ascii.html
new file mode 100644
index 00000000..4067eece
--- /dev/null
+++ b/man/man1/ascii.html
@@ -0,0 +1,159 @@
+<head>
+<title>ascii(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ASCII(1)</b><td align=right><b>ASCII(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ascii, unicode &ndash; interpret ASCII, Unicode characters<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>ascii</font></tt> [ <tt><font size=+1>&#8722;8</font></tt> ] [ <tt><font size=+1>&#8722;oxdb</font></tt><i>n</i> ] [ <tt><font size=+1>&#8722;nct</font></tt> ] [ <i>text</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>unicode</font></tt> [ <tt><font size=+1>&#8722;nt</font></tt> ] <i>hexmin</i><tt><font size=+1>&#8722;</font></tt><i>hexmax
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>unicode</font></tt> [ <tt><font size=+1>&#8722;t</font></tt> ] <i>hex</i> [ ... ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>unicode</font></tt> [ <tt><font size=+1>&#8722;n</font></tt> ] <i>characters
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>look</font></tt> <i>hex</i> <tt><font size=+1>/usr/local/plan9/lib/unicode<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Ascii</i> prints the ASCII values corresponding to characters and
+ <i>vice versa</i>; under the <tt><font size=+1>&#8722;8</font></tt> option, the ISO Latin-1 extensions (codes
+ 0200-0377) are included. The values are interpreted in a settable
+ numeric base; <tt><font size=+1>&#8722;o</font></tt> specifies octal, <tt><font size=+1>&#8722;d</font></tt> decimal, <tt><font size=+1>&#8722;x</font></tt> hexadecimal (the
+ default), and <tt><font size=+1>&#8722;b</font></tt><i>n</i> base <i>n</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ With no arguments, <i>ascii</i> prints a table of the character set in
+ the specified base. Characters of <i>text</i> are converted to their
+ ASCII values, one per line. If, however, the first <i>text</i> argument
+ is a valid number in the specified base, conversion goes the opposite
+ way. Control characters are printed as two- or three-character
+ mnemonics. Other options are:<br>
+ <tt><font size=+1>&#8722;n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Force numeric output.<br>
+ <tt><font size=+1>&#8722;c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Force character output.<br>
+ <tt><font size=+1>&#8722;t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Convert from numbers to running text; do not interpret control
+ characters or insert newlines.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Unicode</i> is similar; it converts between UTF and character values
+ from the Unicode Standard (see <a href="../man7/utf.html"><i>utf</i>(7)</a>). If given a range of hexadecimal
+ numbers, <i>unicode</i> prints a table of the specified Unicode characters
+ -- their values and UTF representations. Otherwise it translates
+ from UTF to numeric value or vice versa, depending
+ on the appearance of the supplied text; the <tt><font size=+1>&#8722;n</font></tt> option forces numeric
+ output to avoid ambiguity with numeric characters. If converting
+ to UTF , the characters are printed one per line unless the <tt><font size=+1>&#8722;t</font></tt>
+ flag is set, in which case the output is a single string containing
+ only the specified characters. Unlike <i>ascii</i>, <i>unicode</i> treats
+ no characters specially.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The output of <i>ascii</i> and <i>unicode</i> may be unhelpful if the characters
+ printed are not available in the current font.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The file <tt><font size=+1>/usr/local/plan9/lib/unicode</font></tt> contains a table of characters
+ and descriptions, sorted in hexadecimal order, suitable for <a href="../man1/look.html"><i>look</i>(1)</a>
+ on the lower case <i>hex</i> values of characters.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>ascii &#8722;d<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the ASCII table base 10.<br>
+
+ </table>
+ <tt><font size=+1>unicode p<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the hex value of &#8216;p&#8217;.<br>
+
+ </table>
+ <tt><font size=+1>unicode 2200&#8722;22f1<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print a table of miscellaneous mathematical symbols.<br>
+
+ </table>
+ <tt><font size=+1>look 039 /usr/local/plan9/lib/unicode<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ See the start of the Greek alphabet&#8217;s encoding in the Unicode
+ Standard.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/lib/unicode<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ table of characters and descriptions.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/ascii.c<br>
+ /usr/local/plan9/src/cmd/unicode.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/look.html"><i>look</i>(1)</a>, <a href="../man1/tcs.html"><i>tcs</i>(1)</a>, <a href="../man7/utf.html"><i>utf</i>(7)</a>, <a href="../man7/font.html"><i>font</i>(7)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/astro.html b/man/man1/astro.html
new file mode 100644
index 00000000..f410421c
--- /dev/null
+++ b/man/man1/astro.html
@@ -0,0 +1,125 @@
+<head>
+<title>astro(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ASTRO(1)</b><td align=right><b>ASTRO(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ astro &ndash; print astronomical information<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>astro</font></tt> [ <tt><font size=+1>&#8722;dlpsatokm</font></tt> ] [ <tt><font size=+1>&#8722;c</font></tt> n ] [ <tt><font size=+1>&#8722;C</font></tt> d ] [ <tt><font size=+1>&#8722;e</font></tt> <i>obj1 obj2</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Astro</i> reports upcoming celestial events, by default for 24 hours
+ starting now. The options are:<br>
+ <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the starting date. A prompt gives the input format.<br>
+ <tt><font size=+1>l</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the north latitude, west longitude, and elevation of the
+ observation point. A prompt gives the input format. If <tt><font size=+1>l</font></tt> is missing,
+ the initial position is read from the file <tt><font size=+1>/usr/local/plan9/sky/here</font></tt>.<br>
+ <tt><font size=+1>c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Report for <i>n</i> (default 1) successive days.<br>
+ <tt><font size=+1>C</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Used with <tt><font size=+1>&#8722;c</font></tt>, set the interval to <tt><font size=+1>d</font></tt> days (or fractions of days).<br>
+ <tt><font size=+1>e</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Report distance between the centers of objects, in arc seconds,
+ during eclipses or occultations involving <i>obj1</i> and <i>obj2</i>.<br>
+ <tt><font size=+1>p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the positions of objects at the given time rather than
+ searching for interesting conjunctions. For each, the name is
+ followed by the right ascension (hours, minutes, seconds), declination
+ (degrees, minutes, seconds), azimuth (degrees), elevation (degrees),
+ and semidiameter (arc seconds). For the sun and
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ moon, the magnitude is also printed. The first line of output
+ presents the date and time, sidereal time, and the latitude, longitude,
+ and elevation.<br>
+
+ </table>
+ <tt><font size=+1>s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print output in English words suitable for speech synthesizers.<br>
+ <tt><font size=+1>a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Include a list of artificial earth satellites for interesting
+ events. (There are no orbital elements for the satellites, so
+ this option is not usable.)<br>
+ <tt><font size=+1>t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read &#916;T from standard input. &#916;T is the difference between ephemeris
+ and universal time (seconds) due to the slowing of the earth&#8217;s
+ rotation. &#916;T is normally calculated from an empirical formula.
+ This option is needed only for very accurate timing of occultations,
+ eclipses, etc.<br>
+ <tt><font size=+1>o</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search for stellar occultations.<br>
+ <tt><font size=+1>k</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print times in local time (&#8216;kitchen clock&#8217;) as described in the
+ <tt><font size=+1>timezone</font></tt> environment variable.<br>
+ <tt><font size=+1>m</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Includes a single comet in the list of objects. This is modified
+ (in the source) to refer to an approaching comet but in steady
+ state usually refers to the last interesting comet (currently
+ Hale-Bopp, C/1995 O1).<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/sky/estartab<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ecliptic star data<br>
+
+ </table>
+ <tt><font size=+1>/usr/local/plan9/sky/here<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ default latitude (N), longitude (W), and elevation (meters)<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/astro<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/scat.html"><i>scat</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>k</font></tt> option reverts to GMT outside of 1970-2036.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/basename.html b/man/man1/basename.html
new file mode 100644
index 00000000..b04ce45d
--- /dev/null
+++ b/man/man1/basename.html
@@ -0,0 +1,63 @@
+<head>
+<title>basename(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>BASENAME(1)</b><td align=right><b>BASENAME(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ basename &ndash; strip file name affixes<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>basename</font></tt> [ <tt><font size=+1>&#8722;d</font></tt> ] <i>string</i> [ <i>suffix</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Basename</i> deletes any prefix ending in slash (<tt><font size=+1>/</font></tt>) and the <i>suffix</i>,
+ if present in <i>string</i>, from <i>string</i>, and prints the result on the
+ standard output.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;d</font></tt> option instead prints the directory component, that is,
+ <i>string</i> up to but not including the final slash. If the string
+ contains no slash, a period and newline are printed.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/basename.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/bc.html b/man/man1/bc.html
new file mode 100644
index 00000000..c4f7e7ba
--- /dev/null
+++ b/man/man1/bc.html
@@ -0,0 +1,272 @@
+<head>
+<title>bc(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>BC(1)</b><td align=right><b>BC(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ bc &ndash; arbitrary-precision arithmetic language<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>bc</font></tt> [ <tt><font size=+1>&#8722;c</font></tt> ] [ <tt><font size=+1>&#8722;l</font></tt> ] [ <tt><font size=+1>&#8722;s</font></tt> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Bc</i> is an interactive processor for a language that resembles C
+ but provides arithmetic on numbers of arbitrary length with up
+ to 100 digits right of the decimal point. It takes input from
+ any files given, then reads the standard input. The <tt><font size=+1>&#8722;l</font></tt> argument
+ stands for the name of an arbitrary precision math library. The
+ <tt><font size=+1>&#8722;s
+ </font></tt>argument suppresses the automatic display of calculation results;
+ all output is via the <tt><font size=+1>print</font></tt> command.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The following syntax for <i>bc</i> programs is like that of C; <i>L</i> means
+ letter <tt><font size=+1>a</font></tt>-<tt><font size=+1>z</font></tt>, <i>E</i> means expression, <i>S</i> means statement.<br>
+ Lexical<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ comments are enclosed in <tt><font size=+1>/* */<br>
+ </font></tt>newlines end statements<br>
+
+ </table>
+
+ </table>
+ Names<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ simple variables: <i>L<br>
+ </i>array elements: <i>L</i><tt><font size=+1>[</font></tt><i>E</i><tt><font size=+1>]<br>
+ </font></tt>The words <tt><font size=+1>ibase</font></tt>, <tt><font size=+1>obase</font></tt>, and <tt><font size=+1>scale<br>
+ </font></tt>
+ </table>
+
+ </table>
+ Other operands<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ arbitrarily long numbers with optional sign and decimal point.<br>
+ <tt><font size=+1>(</font></tt><i>E</i><tt><font size=+1>)<br>
+ sqrt(</font></tt><i>E</i><tt><font size=+1>)<br>
+ length(</font></tt><i>E</i><tt><font size=+1>)<br>
+ </font></tt>number of significant decimal digits<br>
+ <tt><font size=+1>scale(</font></tt><i>E</i><tt><font size=+1>)<br>
+ </font></tt>number of digits right of decimal point<br>
+ <i>L</i><tt><font size=+1>(</font></tt><i>E</i><tt><font size=+1>,</font></tt><i>...</i><tt><font size=+1>,</font></tt><i>E</i><tt><font size=+1>)<br>
+ </font></tt>function call<br>
+
+ </table>
+
+ </table>
+ Operators<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>+ &nbsp;&nbsp;&nbsp;&#8722; &nbsp;&nbsp;&nbsp;* &nbsp;&nbsp;&nbsp;/ &nbsp;&nbsp;&nbsp;% &nbsp;&nbsp;&nbsp;^ </font></tt> (<tt><font size=+1>%</font></tt> is remainder; <tt><font size=+1>^</font></tt> is power)<br>
+ <tt><font size=+1>++ &nbsp;&nbsp;&nbsp;&#8722;&#8722; <br>
+ == &nbsp;&nbsp;&nbsp;&lt;= &nbsp;&nbsp;&nbsp;&gt;= &nbsp;&nbsp;&nbsp;!= &nbsp;&nbsp;&nbsp;&lt; &nbsp;&nbsp;&nbsp;&gt;<br>
+ = &nbsp;&nbsp;&nbsp;+= &nbsp;&nbsp;&nbsp;&#8722;= &nbsp;&nbsp;&nbsp;*= &nbsp;&nbsp;&nbsp;/= &nbsp;&nbsp;&nbsp;%= &nbsp;&nbsp;&nbsp;^=<br>
+ </font></tt>
+ </table>
+
+ </table>
+ Statements<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>E<br>
+ </i><tt><font size=+1>{</font></tt> <i>S</i> <tt><font size=+1>;</font></tt> ... <tt><font size=+1>;</font></tt> <i>S</i> <tt><font size=+1>}<br>
+ print</font></tt> <i>E<br>
+ </i><tt><font size=+1>if (</font></tt> <i>E</i> <tt><font size=+1>)</font></tt> <i>S<br>
+ </i><tt><font size=+1>while (</font></tt> <i>E</i> <tt><font size=+1>)</font></tt> <i>S<br>
+ </i><tt><font size=+1>for (</font></tt> <i>E</i> <tt><font size=+1>;</font></tt> <i>E</i> <tt><font size=+1>;</font></tt> <i>E</i> <tt><font size=+1>)</font></tt> <i>S<br>
+ </i>null statement<br>
+ <tt><font size=+1>break<br>
+ quit<br>
+ &quot;</font></tt>text<tt><font size=+1>&quot;<br>
+ </font></tt>
+ </table>
+
+ </table>
+ Function definitions<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>define</font></tt> <i>L</i> <tt><font size=+1>(</font></tt> <i>L</i> <tt><font size=+1>,</font></tt> ... <tt><font size=+1>,</font></tt> <i>L</i> <tt><font size=+1>){<br>
+ auto</font></tt> <i>L</i> <tt><font size=+1>,</font></tt> ... <tt><font size=+1>,</font></tt> <i>L<br>
+ S</i> <tt><font size=+1>;</font></tt> ... <tt><font size=+1>;</font></tt> <i>S<br>
+ </i><tt><font size=+1>return</font></tt> <i>E
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>}<br>
+ </font></tt>
+ </table>
+
+ </table>
+ Functions in<tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&#8722;l</font></tt> math library<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>s(</font></tt><i>x</i><tt><font size=+1>)</font></tt>sine<br>
+ <tt><font size=+1>c(</font></tt><i>x</i><tt><font size=+1>)</font></tt>cosine<br>
+ <tt><font size=+1>e(</font></tt><i>x</i><tt><font size=+1>)</font></tt>exponential<br>
+ <tt><font size=+1>l(</font></tt><i>x</i><tt><font size=+1>)</font></tt>log<br>
+ <tt><font size=+1>a(</font></tt><i>x</i><tt><font size=+1>)</font></tt>arctangent<br>
+ <tt><font size=+1>j(</font></tt><i>n, x</i><tt><font size=+1>)<br>
+ </font></tt>Bessel function<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ All function arguments are passed by value.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The value of an expression at the top level is printed unless
+ the main operator is an assignment or the <tt><font size=+1>&#8722;s</font></tt> command line argument
+ is given. Text in quotes, which may include newlines, is always
+ printed. Either semicolons or newlines may separate statements.
+ Assignment to <tt><font size=+1>scale</font></tt> influences the number of digits to
+ be retained on arithmetic operations in the manner of <a href="../man1/dc.html"><i>dc</i>(1)</a>. Assignments
+ to <tt><font size=+1>ibase</font></tt> or <tt><font size=+1>obase</font></tt> set the input and output number radix respectively.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The same letter may be used as an array, a function, and a simple
+ variable simultaneously. All variables are global to the program.
+ Automatic variables are pushed down during function calls. In
+ a declaration of an array as a function argument or automatic
+ variable empty square brackets must follow the array name.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bc</i> is actually a preprocessor for <a href="../man1/dc.html"><i>dc</i>(1)</a>, which it invokes automatically,
+ unless the <tt><font size=+1>&#8722;c</font></tt> (compile only) option is present. In this case the
+ <i>dc</i> input is sent to the standard output instead.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Define a function to compute an approximate value of the exponential.
+ Use it to print 10 values. (The exponential function in the library
+ gives better answers.)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>scale = 20<br>
+ define e(x) {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ auto a, b, c, i, s<br>
+ a = 1<br>
+ b = 1<br>
+ s = 1<br>
+ for(i=1; 1; i++) {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ a *= x<br>
+ b *= i<br>
+ c = a/b<br>
+ if(c == 0) return s<br>
+ s += c<br>
+
+ </table>
+ }<br>
+
+ </table>
+ }<br>
+ for(i=1; i&lt;=10; i++) print e(i)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/lib/bclib</font></tt> mathematical library<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/bc.y<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/dc.html"><i>dc</i>(1)</a>, <a href="../man1/hoc.html"><i>hoc</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ No <tt><font size=+1>&amp;&amp;</font></tt>, <tt><font size=+1>||</font></tt>, or <tt><font size=+1>!</font></tt> operators.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>for</font></tt> statement must have all three <tt><font size=+1>E</font></tt>s.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>quit</font></tt> is interpreted when read, not when executed.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/bundle.html b/man/man1/bundle.html
new file mode 100644
index 00000000..4f052d42
--- /dev/null
+++ b/man/man1/bundle.html
@@ -0,0 +1,95 @@
+<head>
+<title>bundle(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>BUNDLE(1)</b><td align=right><b>BUNDLE(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ bundle &ndash; collect files for distribution<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>bundle</font></tt> <i>file ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Bundle</i> writes on its standard output a shell script for <a href="../man1/rc.html"><i>rc</i>(1)</a>
+ or a Bourne shell which, when executed, will recreate the original
+ <i>files</i>. Its main use is for distributing small numbers of text
+ files by <a href="../man1/mail.html"><i>mail</i>(1)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Although less refined than standard archives from <i>9ar</i> (see <a href="../man1/9c.html"><i>9c</i>(1)</a>)
+ or <a href="../man1/tar.html"><i>tar</i>(1)</a>, a <i>bundle</i> file is self-documenting and complete; little
+ preparation is required on the receiving machine.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>bundle mkfile *.[ch] | mail kremvax!boris<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Send a makefile to Boris together with related <tt><font size=+1>.c</font></tt> and <tt><font size=+1>.h</font></tt> files.
+ Upon receiving the mail, Boris may save the file sans postmark,
+ say in <tt><font size=+1>gift/horse</font></tt>, then do<br>
+
+ </table>
+ <tt><font size=+1>cd gift; sh horse; mk<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin/bundle<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>9ar</i> (in <a href="../man1/9c.html"><i>9c</i>(1)</a>), <a href="../man1/tar.html"><i>tar</i>(1)</a>, <a href="../man1/mail.html"><i>mail</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Bundle</i> will not create directories and is unsatisfactory for non-text
+ files.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Beware of gift horses.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/cal.html b/man/man1/cal.html
new file mode 100644
index 00000000..ec3cffc2
--- /dev/null
+++ b/man/man1/cal.html
@@ -0,0 +1,81 @@
+<head>
+<title>cal(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CAL(1)</b><td align=right><b>CAL(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ cal &ndash; print calendar<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>cal</font></tt> [ <i>month</i> ] [ <i>year</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Cal</i> prints a calendar. <i>Month</i> is either a number from 1 to 12,
+ a lower case month name, or a lower case three-letter prefix of
+ a month name. <i>Year</i> can be between 1 and 9999. If either <i>month</i>
+ or <i>year</i> is omitted, the current month or year is used. If only
+ one argument is given, and it is a number larger than 12, a
+ calendar for all twelve months of the given year is produced;
+ otherwise a calendar for just one month is printed. The calendar
+ produced is that for England and her colonies.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Try<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>cal sep 1752<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/cal.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The year is always considered to start in January even though
+ this is historically naive.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Beware that <tt><font size=+1>cal 90</font></tt> refers to the early Christian era, not the
+ 20th century.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/calendar.html b/man/man1/calendar.html
new file mode 100644
index 00000000..48b9816b
--- /dev/null
+++ b/man/man1/calendar.html
@@ -0,0 +1,82 @@
+<head>
+<title>calendar(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CALENDAR(1)</b><td align=right><b>CALENDAR(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ calendar &ndash; print upcoming events<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>calendar</font></tt> [ <tt><font size=+1>&ndash;y</font></tt> ] [ <tt><font size=+1>&ndash;p days</font></tt> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Calendar</i> reads the named files, default <tt><font size=+1>$HOME/lib/calendar</font></tt>, and
+ writes to standard output any lines containing today&#8217;s or tomorrow&#8217;s
+ date. Examples of recognized date formats are &quot;4/11&quot;, &quot;April 11&quot;,
+ &quot;Apr 11&quot;, &quot;11 April&quot;, and &quot;11 Apr&quot;. All comparisons are case insensitive.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the <tt><font size=+1>&ndash;y</font></tt> flag is given, an attempt is made to match on year too.
+ In this case, dates of the forms listed above will be accepted
+ if they are followed by the current year (or last two digits thereof)
+ or not a year &#8212; digits not followed by white space or non-digits.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the <tt><font size=+1>&ndash;p</font></tt> flag is given, its argument is the number of days ahead
+ to match dates. This flag is not repeatable, and it performs no
+ special processing at the end of the week.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ On Friday and Saturday, events through Monday are printed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To have your calendar mailed to you every day, use <a href="../man8/cron.html"><i>cron</i>(8)</a>.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>$HOME/lib/calendar</font></tt>&nbsp;&nbsp;&nbsp;personal calendar<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/calendar.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/cat.html b/man/man1/cat.html
new file mode 100644
index 00000000..36d6923e
--- /dev/null
+++ b/man/man1/cat.html
@@ -0,0 +1,126 @@
+<head>
+<title>cat(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CAT(1)</b><td align=right><b>CAT(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ cat, read, nobs &ndash; catenate files<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>cat</font></tt> [ <i>file ...</i> ]<br>
+ <tt><font size=+1>read</font></tt> [ <tt><font size=+1>&#8722;m</font></tt> ] [ <tt><font size=+1>&#8722;n</font></tt> <i>nline</i> ] [ <i>file ...</i> ]<br>
+ <tt><font size=+1>nobs</font></tt> [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Cat</i> reads each <i>file</i> in sequence and writes it on the standard
+ output. Thus<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>cat file
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ prints a file and<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>cat file1 file2 &gt;file3
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ concatenates the first two files and places the result on the
+ third.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If no <i>file</i> is given, <i>cat</i> reads from the standard input. Output
+ is buffered in blocks matching the input.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Read</i> copies to standard output exactly one line from the named
+ <i>file</i>, default standard input. It is useful in interactive <a href="../man1/rc.html"><i>rc</i>(1)</a>
+ scripts.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;m</font></tt> flag causes it to continue reading and writing multiple
+ lines until end of file; <tt><font size=+1>&#8722;n</font></tt> causes it to read no more than <i>nline</i>
+ lines.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Read</i> always executes a single <tt><font size=+1>write</font></tt> for each line of input, which
+ can be helpful when preparing input to programs that expect line-at-a-time
+ data. It never reads any more data from the input than it prints
+ to the output.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Nobs</i> copies the named files to standard output except that it
+ removes all backspace characters and the characters that precede
+ them. It is useful to use as <tt><font size=+1>$PAGER</font></tt> with the Unix version of <a href="../man1/man.html"><i>man</i>(1)</a>
+ when run inside a <i>win</i> (see <a href="../man1/acme.html"><i>acme</i>(1)</a>) window.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/cat.c<br>
+ /usr/local/plan9/src/cmd/read.c<br>
+ /usr/local/plan9/bin/nobs<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/cp.html"><i>cp</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Read</i> exits with status <tt><font size=+1>eof</font></tt> on end of file or, in the <tt><font size=+1>&#8722;n</font></tt> case,
+ if it doesn&#8217;t read <i>nlines</i> lines.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Beware of <tt><font size=+1>cat a b &gt;a</font></tt> and <tt><font size=+1>cat a b &gt;b</font></tt>, which destroy input files before
+ reading them.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/cleanname.html b/man/man1/cleanname.html
new file mode 100644
index 00000000..8f736fbd
--- /dev/null
+++ b/man/man1/cleanname.html
@@ -0,0 +1,65 @@
+<head>
+<title>cleanname(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CLEANNAME(1)</b><td align=right><b>CLEANNAME(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ cleanname &ndash; clean a path name<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>cleanname</font></tt> [ <tt><font size=+1>&#8722;d</font></tt> <i>pwd</i> ] <i>names ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ For each file name argument, <i>cleanname</i>, by lexical processing
+ only, prints the shortest equivalent string that names the same
+ (possibly hypothetical) file. It eliminates multiple and trailing
+ slashes, and it lexically interprets <tt><font size=+1>.</font></tt> and <tt><font size=+1>..</font></tt> directory components
+ in the name. If the <tt><font size=+1>&#8722;d</font></tt> option is present, unrooted names are
+ prefixed with <i>pwd</i><tt><font size=+1>/</font></tt> before processing.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/cleanname.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/cleanname.html"><i>cleanname</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/clog.html b/man/man1/clog.html
new file mode 100644
index 00000000..6c12e0be
--- /dev/null
+++ b/man/man1/clog.html
@@ -0,0 +1,61 @@
+<head>
+<title>clog(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CLOG(1)</b><td align=right><b>CLOG(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ auxclog &ndash; create date-stamped console log<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>auxclog</font></tt> <i>console logfile<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Auxclog</i> opens the file <i>console</i> and writes every line read from
+ it, prefixed by the ASCII time, to the file <i>logfile</i>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/auxclog.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Should be named <i>aux/clog</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/cmp.html b/man/man1/cmp.html
new file mode 100644
index 00000000..cc7831a9
--- /dev/null
+++ b/man/man1/cmp.html
@@ -0,0 +1,84 @@
+<head>
+<title>cmp(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CMP(1)</b><td align=right><b>CMP(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ cmp &ndash; compare two files<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>cmp</font></tt> [ <tt><font size=+1>&#8722;lsL</font></tt> ] <i>file1 file2</i> [ <i>offset1</i> [ <i>offset2</i> ] ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The two files are compared. A diagnostic results if the contents
+ differ, otherwise there is no output.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The options are:<br>
+ <tt><font size=+1>l</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the byte number (decimal) and the differing bytes (hexadecimal)
+ for each difference.<br>
+ <tt><font size=+1>s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print nothing for differing files, but set the exit status.<br>
+ <tt><font size=+1>L</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the line number of the first differing byte.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If offsets are given, comparison starts at the designated byte
+ position of the corresponding file. Offsets that begin with <tt><font size=+1>0x</font></tt>
+ are hexadecimal; with <tt><font size=+1>0</font></tt>, octal; with anything else, decimal.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/cmp.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/diff.html"><i>diff</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If a file is inaccessible or missing, the exit status is <tt><font size=+1>open</font></tt>.
+ If the files are the same, the exit status is empty (true). If
+ they are the same except that one is longer than the other, the
+ exit status is <tt><font size=+1>EOF</font></tt>. Otherwise <i>cmp</i> reports the position of the
+ first disagreeing byte and the exit status is <tt><font size=+1>differ</font></tt>.
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/colors.html b/man/man1/colors.html
new file mode 100644
index 00000000..af67eec2
--- /dev/null
+++ b/man/man1/colors.html
@@ -0,0 +1,92 @@
+<head>
+<title>colors(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>COLORS(1)</b><td align=right><b>COLORS(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ colors, cmapcube &ndash; display color map<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>colors</font></tt> [ <tt><font size=+1>&#8722;r &#8722;x</font></tt> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>cmapcube</font></tt> [ <tt><font size=+1>&#8722;nbw</font></tt> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Colors</i> presents a grid showing the colors in the RGBV color map
+ (see <a href="../man7/color.html"><i>color</i>(7)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Clicking mouse button 1 over a color in the grid will display
+ the map index for that color, its red, green, and blue components,
+ and the 32-bit hexadecimal color value as defined in <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>.
+ If the <tt><font size=+1>&#8722;x</font></tt> option is specified, the components will also be listed
+ in hexadecimal.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;r</font></tt> option instead shows, in the same form, a grey-scale ramp.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A menu on mouse button 3 contains a single entry, to exit the
+ program.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Cmapcube</i> presents the same colors but in a 3-dimensional cube.
+ Dragging with button 1 rotates the cube. Clicking on a color with
+ button 2 displays the map index for that color. Clicking button
+ 3 exits.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;n</font></tt> option disables drawing of the color squares. The <tt><font size=+1>&#8722;b</font></tt> and
+ <tt><font size=+1>&#8722;w</font></tt> options set the background (default grey) to black or white.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/draw/colors.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man7/color.html"><i>color</i>(7)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/comm.html b/man/man1/comm.html
new file mode 100644
index 00000000..860a0956
--- /dev/null
+++ b/man/man1/comm.html
@@ -0,0 +1,79 @@
+<head>
+<title>comm(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>COMM(1)</b><td align=right><b>COMM(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ comm &ndash; select or reject lines common to two sorted files<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>comm</font></tt> [ <tt><font size=+1>&#8722;123</font></tt> ] <i>file1 file2<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Comm</i> reads <i>file1</i> and <i>file2</i>, which are in lexicographical order,
+ and produces a three column output: lines only in <i>file1</i>; lines
+ only in <i>file2</i>; and lines in both files. The file name <tt><font size=+1>&#8722;</font></tt> means
+ the standard input.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Flag <tt><font size=+1>1</font></tt>, <tt><font size=+1>2</font></tt>, or <tt><font size=+1>3</font></tt> suppresses printing of the corresponding column.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>comm &#8722;12 file1 file2<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print lines common to two sorted files.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/comm.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/sort.html"><i>sort</i>(1)</a>, <a href="../man1/cmp.html"><i>cmp</i>(1)</a>, <a href="../man1/diff.html"><i>diff</i>(1)</a>, <a href="../man1/uniq.html"><i>uniq</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/core.html b/man/man1/core.html
new file mode 100644
index 00000000..9c1cf3df
--- /dev/null
+++ b/man/man1/core.html
@@ -0,0 +1,83 @@
+<head>
+<title>core(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CORE(1)</b><td align=right><b>CORE(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ core &ndash; print information about dead processes<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>core</font></tt> [ <i>dir</i> | <i>corefile</i> ]...<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Core</i> prints information about dead processes that have been saved
+ as core dumps.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Core reads its arguments in order. If a directory is encountered,
+ <i>core</i> reads every core file named <tt><font size=+1>core.*</font></tt> or <tt><font size=+1>*.core</font></tt> in that directory.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For each core file read, <i>core</i> prints the date and time the core
+ was generated, the command that generated it, and a short stack
+ trace at the time of the core dump.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If no arguments are given, <i>core</i> searches the directory <tt><font size=+1>$COREDIR</font></tt>
+ for core files; if <tt><font size=+1>$COREDIR</font></tt> is not set, <i>core</i> searches the current
+ directory.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/core.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/acid.html"><i>acid</i>(1)</a>, <a href="../man1/db.html"><i>db</i>(1)</a>, <a href="../man5/core.html"><i>core</i>(5)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Core</i> has not been written.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/crop.html b/man/man1/crop.html
new file mode 100644
index 00000000..34a4eefb
--- /dev/null
+++ b/man/man1/crop.html
@@ -0,0 +1,127 @@
+<head>
+<title>crop(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CROP(1)</b><td align=right><b>CROP(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ crop, iconv &ndash; frame, crop, and convert image<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>crop</font></tt> [ <tt><font size=+1>&#8722;c</font></tt> <i>red green blue</i> ] [ <tt><font size=+1>&#8722;i</font></tt> <i>n</i> | <tt><font size=+1>&#8722;x</font></tt> <i>dx</i> | <tt><font size=+1>&#8722;y</font></tt> <i>dy</i> | <tt><font size=+1>&#8722;r</font></tt> <i>minx miny
+ maxx maxy</i> ] [ <tt><font size=+1>&#8722;t</font></tt> <i>tx ty</i> ] [ <tt><font size=+1>&#8722;b</font></tt> <i>red green blue</i> ] [ <i>file</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>iconv</font></tt> [ <tt><font size=+1>&#8722;u</font></tt> ] [ <tt><font size=+1>&#8722;c</font></tt> <i>chandesc</i> ] [ <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Crop</i> reads an <a href="../man7/image.html"><i>image</i>(7)</a> file (default standard input), crops it,
+ and writes it as a compressed <a href="../man7/image.html"><i>image</i>(7)</a> file to standard output.
+ There are two ways to specify a crop, by color value or by geometry.
+ They may be combined in a single run of <i>crop</i>, in which case the
+ color value crop will be done first.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;c</font></tt> option takes a red-green-blue triplet as described in <a href="../man3/color.html"><i>color</i>(3)</a>.
+ (For example, white is <tt><font size=+1>255 255 255</font></tt>.) The corresponding color is
+ used as a value to be cut from the outer edge of the picture;
+ that is, the image is cropped to remove the maximal outside rectangular
+ strip in which every pixel has the specified color.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;i</font></tt> option insets the image rectangle by a constant amount,
+ <i>n</i>, which may be negative to generate extra space around the image.
+ The <tt><font size=+1>&#8722;x</font></tt> and <tt><font size=+1>&#8722;y</font></tt> options are similar, but apply only to the <i>x</i> or
+ <i>y</i> coordinates of the image.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;r</font></tt> option specifies an exact rectangle.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;t</font></tt> option specifies that the image&#8217;s coordinate system should
+ be translated by <i>tx</i>, <i>ty</i> as the last step of processing.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;b</font></tt> option specifies a background color to be used to fill
+ around the image if the cropped image is larger than the original,
+ such as if the <tt><font size=+1>&#8722;i</font></tt> option is given a negative argument. This can
+ be used to draw a monochrome frame around the image. The default
+ color is black.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Iconv</i> changes the format of pixels in the image <i>file</i> (default
+ standard input) and writes the resulting image to standard output.
+ Pixels in the image are converted according to the channel descriptor
+ <i>chandesc</i>, (see <a href="../man7/image.html"><i>image</i>(7)</a>). For example, to convert a 4-bit-per-pixel
+ grey-scale image to an 8-bit-per-pixel color-mapped
+ image, <i>chandesc</i> should be <tt><font size=+1>m8</font></tt>. If <i>chandesc</i> is not given, the format
+ is unchanged. The output image is by default compressed; the <tt><font size=+1>&#8722;u</font></tt>
+ option turns off the compression.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To crop white edges off the picture and add a ten-pixel pink border,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>crop &#8722;c 255 255 255 &#8722;i &#8722;10 &#8722;b 255 150 150 imagefile &gt; cropped<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/draw/crop.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man7/image.html"><i>image</i>(7)</a>, <a href="../man3/color.html"><i>color</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Iconv</i> should be able to do Floyd-Steinberg error diffusion or
+ dithering when converting to small image depths.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/date.html b/man/man1/date.html
new file mode 100644
index 00000000..a8cbbf9a
--- /dev/null
+++ b/man/man1/date.html
@@ -0,0 +1,75 @@
+<head>
+<title>date(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DATE(1)</b><td align=right><b>DATE(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ date &ndash; date and time<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>date</font></tt> [ <i>option</i> ] [ <i>seconds</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the date, in the format
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>Tue Aug 16 17:03:52 CDT 1977
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The options are<br>
+ <tt><font size=+1>&#8722;u</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Report Greenwich Mean Time (GMT) rather than local time.<br>
+ <tt><font size=+1>&#8722;n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Report the date as the number of seconds since the epoch, 00:00:00
+ GMT, January 1, 1970.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The conversion from Greenwich Mean Time to local time depends
+ on the <tt><font size=+1>$timezone</font></tt> environment variable; see <a href="../man3/ctime.html"><i>ctime</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the optional argument <i>seconds</i> is present, it is used as the
+ time to convert rather than the real time.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/date.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/db.html b/man/man1/db.html
new file mode 100644
index 00000000..eed2c3f9
--- /dev/null
+++ b/man/man1/db.html
@@ -0,0 +1,548 @@
+<head>
+<title>db(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DB(1)</b><td align=right><b>DB(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ db &ndash; debugger<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>db</font></tt> [ <i>option ...</i> ] [ <i>textfile</i> ] [ <i>pid</i> | <i>corefile</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Db</i> is a general purpose debugging program. It may be used to examine
+ files and to provide a controlled environment for the execution
+ of programs.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <i>textfile</i> is a file containing the text and initialized data
+ of an executable program. A <i>pid</i> or <i>corefile</i> specifies the memory
+ image of a process. A <i>pid</i> gives the id of an executing process
+ to be accessed via <a href="../man2/ptrace.html"><i>ptrace</i>(2)</a>. A <i>corefile</i> specifies the name of
+ a core dump (see <a href="../man5/core.html"><i>core</i>(5)</a> on your system of choice) containing
+ the
+ memory image of a terminated process. This manual refers to the
+ memory image specified by <i>pid</i> or <i>corefile</i> as a <i>memfile</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <i>map</i> associated with each <i>textfile</i> or <i>memfile</i> supports accesses
+ to instructions and data in the file; see &#8216;Addresses&#8217;.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An argument consisting entirely of digits is assumed to be a process
+ id; otherwise, it is the name of a <i>textfile</i> or <i>corefile</i>. When
+ a <i>textfile</i> is given, the textfile map is associated with it. If
+ only a <i>memfile</i> is given, the textfile map is derived from the
+ corresponding <i>textfile</i>, if it can be determined (this varies from
+ system to
+ system). When a <i>memfile</i> is given, the memfile map is associated
+ with it; otherwise the map is undefined and accesses to it are
+ not permitted.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Commands to <i>db</i> are read from the standard input and responses
+ are to the standard output. The options are<br>
+ <tt><font size=+1>&#8722;w</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Open <i>textfile</i> and <i>memfile</i> for writing as well as reading.<br>
+ <tt><font size=+1>&#8722;I</font></tt><i>path<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Directory in which to look for relative path names in <tt><font size=+1>$&lt;</font></tt> and <tt><font size=+1>$&lt;&lt;</font></tt>
+ commands.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;m</font></tt><i>machine<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Assume instructions are for the given CPU type (possible names
+ include <tt><font size=+1>386</font></tt> and <tt><font size=+1>powerpc</font></tt>; adding the suffix <tt><font size=+1>&#8722;co</font></tt> as in <tt><font size=+1>386&#8722;co</font></tt> and
+ <tt><font size=+1>powerpc&#8722;co</font></tt> selects disassembly in the manufacturer&#8217;s syntax, if
+ available, rather than the default Plan 9 syntax).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ Most <i>db</i> commands have the following form:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ [<i>address</i>] [<tt><font size=+1>,</font></tt> <i>count</i>] [<i>command</i>]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ If <i>address</i> is present then the current position, called &#8216;dot&#8217;,
+ is set to <i>address</i>. Initially dot is set to 0. Most commands are
+ repeated <i>count</i> times with dot advancing between repetitions. The
+ default <i>count</i> is 1. <i>Address</i> and <i>count</i> are expressions. Multiple
+ commands on one line must be separated by <tt><font size=+1>;</font></tt>.
+ <p><font size=+1><b>Expressions </b></font><br>
+ Expressions are evaluated as long <i>ints</i>.<br>
+ <tt><font size=+1>.</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The value of dot.<br>
+ <tt><font size=+1>+</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The value of dot incremented by the current increment.<br>
+ <tt><font size=+1>^</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The value of dot decremented by the current increment.<br>
+ <tt><font size=+1>&quot;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The last <i>address</i> typed.<br>
+ <i>integer<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A number, in decimal radix by default. The prefixes <tt><font size=+1>0</font></tt> and <tt><font size=+1>0o</font></tt> and
+ <tt><font size=+1>0O</font></tt> (zero oh) force interpretation in octal radix; the prefixes
+ <tt><font size=+1>0t</font></tt> and <tt><font size=+1>0T</font></tt> force interpretation in decimal radix; the prefixes
+ <tt><font size=+1>0x</font></tt>, <tt><font size=+1>0X</font></tt>, and <tt><font size=+1>#</font></tt> force interpretation in hexadecimal radix. Thus
+ <tt><font size=+1>020</font></tt>, <tt><font size=+1>0o20</font></tt>, <tt><font size=+1>0t16</font></tt>, and <tt><font size=+1>#10</font></tt> all represent sixteen.
+
+ </table>
+ <i>integer</i><tt><font size=+1>.</font></tt><i>fraction<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A single-precision floating point number.<br>
+
+ </table>
+ <tt><font size=+1>'</font></tt><i>c</i><tt><font size=+1>'</font></tt>&nbsp;&nbsp;&nbsp;The 16-bit value of a character. <tt><font size=+1>\</font></tt> may be used to escape a
+ <tt><font size=+1>'</font></tt>.<br>
+ <tt><font size=+1>&lt;</font></tt><i>name<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The value of <i>name</i>, which is a register name. The register names
+ are those printed by the <tt><font size=+1>$r</font></tt> command.<br>
+
+ </table>
+ <i>symbol<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A <i>symbol</i> is a sequence of upper or lower case letters, underscores
+ or digits, not starting with a digit. <tt><font size=+1>\</font></tt> may be used to escape
+ other characters. The location of the <i>symbol</i> is calculated from
+ the symbol table in <i>textfile</i>.<br>
+
+ </table>
+ <i>routine</i><tt><font size=+1>.</font></tt><i>name<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The address of the variable <i>name</i> in the specified C routine. Both
+ <i>routine</i> and <i>name</i> are <i>symbols</i>. If <i>name</i> is omitted the value is
+ the address of the most recently activated stack frame corresponding
+ to <i>routine</i>; if <i>routine</i> is omitted, the active procedure is assumed.<br>
+
+ </table>
+ <i>file</i><tt><font size=+1>:</font></tt><i>integer<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The address of the instruction corresponding to the source statement
+ at the indicated line number of the file. If the source line contains
+ no executable statement, the address of the instruction associated
+ with the nearest executable source line is returned. Files begin
+ at line 1. If multiple files of the same name
+ are loaded, an expression of this form resolves to the first file
+ encountered in the symbol table.<br>
+
+ </table>
+ <tt><font size=+1>(</font></tt><i>exp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The value of the expression <i>exp</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <i>Monadic operators<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>*</font></tt><i>exp</i>&nbsp;&nbsp;&nbsp;The contents of the location addressed by <i>exp</i> in <i>memfile</i>.<br>
+ <tt><font size=+1>@</font></tt><i>exp</i>&nbsp;&nbsp;&nbsp;The contents of the location addressed by <i>exp</i> in <i>textfile</i>.<br>
+ <tt><font size=+1>&#8722;</font></tt><i>exp</i>&nbsp;&nbsp;&nbsp;Integer negation.<br>
+ <tt><font size=+1>~</font></tt><i>exp</i>&nbsp;&nbsp;&nbsp;Bitwise complement.<br>
+ <tt><font size=+1>%</font></tt><i>exp</i>&nbsp;&nbsp;&nbsp;When used as an <i>address</i>, <i>exp</i> is an offset into the segment
+ named <i>ublock</i>; see &#8216;Addresses&#8217;.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <i>Dyadic operators</i> are left-associative and are less binding than
+ monadic operators.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>e1</i><tt><font size=+1>+</font></tt><i>e2</i>Integer addition.<br>
+ <i>e1</i><tt><font size=+1>&#8722;</font></tt><i>e2</i>Integer subtraction.<br>
+ <i>e1</i><tt><font size=+1>*</font></tt><i>e2</i>Integer multiplication.<br>
+ <i>e1</i><tt><font size=+1>%</font></tt><i>e2</i>Integer division.<br>
+ <i>e1</i><tt><font size=+1>&amp;</font></tt><i>e2</i>Bitwise conjunction.<br>
+ <i>e1</i><tt><font size=+1>|</font></tt><i>e2</i>Bitwise disjunction.<br>
+ <i>e1</i><tt><font size=+1>#</font></tt><i>e2E1</i> rounded up to the next multiple of <i>e2</i>.<br>
+
+ </table>
+ <p><font size=+1><b>Commands </b></font><br>
+ Most commands have the following syntax:<br>
+ <tt><font size=+1>?</font></tt><i>f</i>&nbsp;&nbsp;&nbsp;&nbsp;Locations starting at <i>address</i> in <i>textfile</i> are printed according
+ to the format <i>f</i>.<br>
+ <tt><font size=+1>/</font></tt><i>f</i>&nbsp;&nbsp;&nbsp;&nbsp;Locations starting at <i>address</i> in <i>memfile</i> are printed according
+ to the format <i>f</i>.<br>
+ <tt><font size=+1>=</font></tt><i>f</i>&nbsp;&nbsp;&nbsp;&nbsp;The value of <i>address</i> itself is printed according to the format
+ <i>f</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <i>format</i> consists of one or more characters that specify a style
+ of printing. Each format character may be preceded by a decimal
+ integer that is a repeat count for the format character. If no
+ format is given then the last format is used.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Most format letters fetch some data, print it, and advance (a
+ local copy of) dot by the number of bytes fetched. The total number
+ of bytes in a format becomes the <i>current</i>increment<i>.<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>o</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print two-byte integer in octal.<br>
+ <tt><font size=+1>O</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print four-byte integer in octal.<br>
+ <tt><font size=+1>q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print two-byte integer in signed octal.<br>
+ <tt><font size=+1>Q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print four-byte integer in signed octal.<br>
+ <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print two-byte integer in decimal.<br>
+ <tt><font size=+1>D</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print four-byte integer in decimal.<br>
+ <tt><font size=+1>V</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print eight-byte integer in decimal.<br>
+ <tt><font size=+1>Z</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print eight-byte integer in unsigned decimal.<br>
+ <tt><font size=+1>x</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print two-byte integer in hexadecimal.<br>
+ <tt><font size=+1>X</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print four-byte integer in hexadecimal.<br>
+ <tt><font size=+1>Y</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print eight-byte integer in hexadecimal.<br>
+ <tt><font size=+1>u</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print two-byte integer in unsigned decimal.<br>
+ <tt><font size=+1>U</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print four-byte integer in unsigned decimal.<br>
+ <tt><font size=+1>f</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print as a single-precision floating point number.<br>
+ <tt><font size=+1>F</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print double-precision floating point.<br>
+ <tt><font size=+1>b</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the addressed byte in hexadecimal.<br>
+ <tt><font size=+1>c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the addressed byte as an ASCII character.<br>
+ <tt><font size=+1>C</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the addressed byte as a character. Printable ASCII characters
+ are represented normally; others are printed in the form <tt><font size=+1>\xnn</font></tt>.<br>
+ <tt><font size=+1>s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the addressed characters, as a UTF string, until a zero
+ byte is reached. Advance dot by the length of the string, including
+ the zero terminator.<br>
+ <tt><font size=+1>S</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print a string using the escape convention (see <tt><font size=+1>C</font></tt> above).<br>
+ <tt><font size=+1>r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print as UTF the addressed two-byte integer (rune).<br>
+ <tt><font size=+1>R</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print as UTF the addressed two-byte integers as runes until a
+ zero rune is reached. Advance dot by the length of the string,
+ including the zero terminator.<br>
+ <tt><font size=+1>i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print as machine instructions. Dot is incremented by the size
+ of the instruction.<br>
+ <tt><font size=+1>I</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;As <tt><font size=+1>i</font></tt> above, but print the machine instructions in an alternate
+ form if possible.<br>
+ <tt><font size=+1>M</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the addressed machine instruction in a machine-dependent
+ hexadecimal form.<br>
+ <tt><font size=+1>a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the value of dot in symbolic form. Dot is unaffected.<br>
+ <tt><font size=+1>A</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the value of dot in hexadecimal. Dot is unaffected.<br>
+ <tt><font size=+1>z</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the function name, source file, and line number corresponding
+ to dot (textfile only). Dot is unaffected.<br>
+ <tt><font size=+1>p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the addressed value in symbolic form. Dot is advanced by
+ the size of a machine address.<br>
+ <tt><font size=+1>t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When preceded by an integer, tabs to the next appropriate tab
+ stop. For example, <tt><font size=+1>8t</font></tt> moves to the next 8-space tab stop. Dot
+ is unaffected.<br>
+ <tt><font size=+1>n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print a newline. Dot is unaffected.<br>
+ <tt><font size=+1>&quot;</font></tt>...<tt><font size=+1>&quot;</font></tt>&nbsp;&nbsp;&nbsp;Print the enclosed string. Dot is unaffected.<br>
+ <tt><font size=+1>^</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dot is decremented by the current increment. Nothing is printed.<br>
+ <tt><font size=+1>+</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dot is incremented by 1. Nothing is printed.<br>
+ <tt><font size=+1>&#8722;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dot is decremented by 1. Nothing is printed.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ Other commands include:<br>
+ newline<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Update dot by the current increment. Repeat the previous command
+ with a <i>count</i> of 1.<br>
+
+ </table>
+ [<tt><font size=+1>?/</font></tt>]<tt><font size=+1>l</font></tt> <i>value mask<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Words starting at dot are masked with <i>mask</i> and compared with <i>value</i>
+ until a match is found. If <tt><font size=+1>l</font></tt> is used, the match is for a two-byte
+ integer; <tt><font size=+1>L</font></tt> matches four bytes. If no match is found then dot is
+ unchanged; otherwise dot is set to the matched location. If <i>mask</i>
+ is omitted then ~0 is used.
+
+ </table>
+ [<tt><font size=+1>?/</font></tt>]<tt><font size=+1>w</font></tt> <i>value ...<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Write the two-byte <i>value</i> into the addressed location. If the command
+ is <tt><font size=+1>W</font></tt>, write four bytes.<br>
+
+ </table>
+ [<tt><font size=+1>?/</font></tt>]<tt><font size=+1>m</font></tt> <i>s b e f</i> [<tt><font size=+1>?</font></tt>]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ New values for (<i>b, e, f</i>) in the segment named <i>s</i> are recorded.
+ Valid segment names are <i>text</i>, <i>data</i>, or <i>ublock</i>. If less than three
+ address expressions are given, the remaining parameters are left
+ unchanged. If the list is terminated by <tt><font size=+1>?</font></tt> or <tt><font size=+1>/</font></tt> then the file (<i>textfile</i>
+ or <i>memfile</i> respectively) is used for subsequent
+ requests. For example, <tt><font size=+1>/m?</font></tt> causes <tt><font size=+1>/</font></tt> to refer to <i>textfile</i>.<br>
+
+ </table>
+ <tt><font size=+1>&gt;</font></tt><i>name<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Dot is assigned to the variable or register named.<br>
+
+ </table>
+ <tt><font size=+1>!</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The rest of the line is passed to <a href="../man1/rc.html"><i>rc</i>(1)</a> for execution.<br>
+ <tt><font size=+1>$</font></tt><i>modifier<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Miscellaneous commands. The available <i>modifiers</i> are:<br>
+ <tt><font size=+1>&lt;</font></tt><i>f</i>&nbsp;&nbsp;&nbsp;&nbsp;Read commands from the file <i>f</i>. If this command is executed in
+ a file, further commands in the file are not seen. If <i>f</i> is omitted,
+ the current input stream is terminated. If a <i>count</i> is given, and
+ is zero, the command is ignored.<br>
+ <tt><font size=+1>&lt;&lt;</font></tt><i>f</i>&nbsp;&nbsp;&nbsp;Similar to <tt><font size=+1>&lt;</font></tt> except it can be used in a file of commands without
+ causing the file to be closed. There is a (small) limit to the
+ number of <tt><font size=+1>&lt;&lt;</font></tt> files that can be open at once.<br>
+ <tt><font size=+1>&gt;</font></tt><i>f</i>&nbsp;&nbsp;&nbsp;&nbsp;Append output to the file <i>f</i>, which is created if it does not
+ exist. If <i>f</i> is omitted, output is returned to the terminal.<br>
+ <tt><font size=+1>?</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print process id, the condition which caused stopping or termination,
+ the registers and the instruction addressed by <tt><font size=+1>pc</font></tt>. This is the
+ default if <i>modifier</i> is omitted.<br>
+ <tt><font size=+1>r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the general registers and the instruction addressed by
+ <tt><font size=+1>pc</font></tt>. Dot is set to <tt><font size=+1>pc</font></tt>.<br>
+ <tt><font size=+1>R</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Like <tt><font size=+1>$r</font></tt>, but include miscellaneous processor control registers
+ and floating point registers.<br>
+ <tt><font size=+1>f</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print floating-point register values as single-precision floating
+ point numbers.<br>
+ <tt><font size=+1>F</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print floating-point register values as double-precision floating
+ point numbers.<br>
+ <tt><font size=+1>b</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print all breakpoints and their associated counts and commands.
+ &#8216;B&#8217; produces the same results.<br>
+ <tt><font size=+1>c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stack backtrace. If <i>address</i> is given, it specifies the address
+ of a pair of 32-bit values containing the <tt><font size=+1>sp</font></tt> and <tt><font size=+1>pc</font></tt> of an active
+ process. This allows selecting among various contexts of a multi-threaded
+ process. If <tt><font size=+1>C</font></tt> is used, the names and (long) values of all parameters,
+ automatic and static variables are
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ printed for each active function. If <i>count</i> is given, only the
+ first <i>count</i> frames are printed.<br>
+
+ </table>
+ <tt><font size=+1>a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attach to the running process whose pid is contained in <i>address</i>.<br>
+ <tt><font size=+1>e</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The names and values of all external variables are printed.<br>
+ <tt><font size=+1>w</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the page width for output to <i>address</i> (default 80).<br>
+ <tt><font size=+1>q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exit from <i>db</i>.<br>
+ <tt><font size=+1>m</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the address maps.<br>
+ <tt><font size=+1>k</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Simulate kernel memory management.<br>
+ <tt><font size=+1>M</font></tt><i>machine<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set the <i>machine</i> type used for disassembling instructions.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>:</font></tt><i>modifier<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Manage a subprocess. Available modifiers are:<br>
+ <tt><font size=+1>h</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Halt an asynchronously running process to allow breakpointing.
+ Unnecessary for processes created under <i>db</i>, e.g. by <tt><font size=+1>:r</font></tt>.<br>
+ <tt><font size=+1>b</font></tt><i>c</i>&nbsp;&nbsp;&nbsp;&nbsp;Set breakpoint at <i>address</i>. The breakpoint is executed <i>count</i>&ndash;1
+ times before causing a stop. Also, if a command <i>c</i> is given it
+ is executed at each breakpoint and if it sets dot to zero the
+ breakpoint causes a stop.<br>
+ <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete breakpoint at <i>address</i>.<br>
+ <tt><font size=+1>r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Run <i>textfile</i> as a subprocess. If <i>address</i> is given the program
+ is entered at that point; otherwise the standard entry point is
+ used. <i>Count</i> specifies how many breakpoints are to be ignored before
+ stopping. Arguments to the subprocess may be supplied on the same
+ line as the command. An argument
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ starting with &lt; or &gt; causes the standard input or output to be established
+ for the command.<br>
+
+ </table>
+ <tt><font size=+1>c</font></tt><i>s</i>&nbsp;&nbsp;&nbsp;&nbsp;The subprocess is continued. If <i>s</i> is omitted or nonzero, the
+ subprocess is sent the note that caused it to stop. If 0 is specified,
+ no note is sent. (If the stop was due to a breakpoint or single-step,
+ the corresponding note is elided before continuing.) Breakpoint
+ skipping is the same as for <tt><font size=+1>r</font></tt>.
+ <tt><font size=+1>s</font></tt><i>s</i>&nbsp;&nbsp;&nbsp;&nbsp;As for <tt><font size=+1>c</font></tt> except that the subprocess is single stepped for <i>count</i>
+ machine instructions. If a note is pending, it is received before
+ the first instruction is executed. If there is no current subprocess
+ then <i>textfile</i> is run as a subprocess as for <tt><font size=+1>r</font></tt>. In this case no
+ note can be sent; the remainder of the line is
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ treated as arguments to the subprocess.<br>
+
+ </table>
+ <tt><font size=+1>S</font></tt><i>s</i>&nbsp;&nbsp;&nbsp;&nbsp;Identical to <tt><font size=+1>s</font></tt> except the subprocess is single stepped for <i>count</i>
+ lines of C source. In optimized code, the correspondence between
+ C source and the machine instructions is approximate at best.<br>
+ <tt><font size=+1>x</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The current subprocess, if any, is released by <i>db</i> and allowed
+ to continue executing normally.<br>
+ <tt><font size=+1>k</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The current subprocess, if any, is terminated.<br>
+ <tt><font size=+1>n</font></tt><i>c</i>&nbsp;&nbsp;&nbsp;&nbsp;Display the pending notes for the process. If <i>c</i> is specified,
+ first delete <i>c&#8217;th</i> pending note.<br>
+
+ </table>
+ <p><font size=+1><b>Addresses </b></font><br>
+ The location in a file or memory image associated with an address
+ is calculated from a map associated with the file. Each map contains
+ one or more quadruples (<i>t, f, b, e, o</i>), defining a segment named
+ <i>t</i> (usually, <i>text</i>, <i>data</i>, or <i>core</i>) in file <i>f</i> mapping addresses in
+ the range <i>b</i> through <i>e</i> to the part of the file beginning at
+ offset <i>o</i>. If segments overlap, later segments obscure earlier
+ ones. An address <i>a</i> is translated to a file address by finding
+ the last segment in the list for which <i>b</i>&le;<i>a</i>&lt;<i>e</i>; the location in the
+ file is then <i>address</i>+<i>f</i>&ndash;<i>b</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Usually, the text and initialized data of a program are mapped
+ by segments called <i>text</i>, <i>data</i>, and <i>bss</i>. Since a program file does
+ not contain stack data, this data is not mapped. The text segment
+ is mapped similarly in a normal (i.e., non-kernel) <i>memfile</i>. However,
+ one or more segments called <i>data</i> provide access to
+ process memory. This region contains the program&#8217;s static data,
+ the bss, the heap and the stack.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Sometimes it is useful to define a map with a single segment mapping
+ the region from 0 to 0xFFFFFFFF; a map of this type allows an
+ entire file to be examined without address translation.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>$m</font></tt> command dumps the currently active maps. The <tt><font size=+1>?m</font></tt> and <tt><font size=+1>/m</font></tt>
+ commands modify the segment parameters in the <i>textfile</i> and <i>memfile</i>
+ maps, respectively.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To set a breakpoint at the beginning of <tt><font size=+1>write()</font></tt> in extant process
+ 27:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>% db 27<br>
+ :h<br>
+ write:b<br>
+ :c<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ To set a breakpoint at the entry of function <tt><font size=+1>parse</font></tt> when the local
+ variable <tt><font size=+1>argc</font></tt> in <tt><font size=+1>main</font></tt> is equal to 1:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>parse:b *main.argc&#8722;1=X<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ This prints the value of <tt><font size=+1>argc&#8722;1</font></tt> which as a side effect sets dot;
+ when <tt><font size=+1>argc</font></tt> is one the breakpoint will fire. Beware that local variables
+ may be stored in registers; see the BUGS section.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/acid.html"><i>acid</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/db<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Exit status is 0, unless the last command failed or returned non-zero
+ status.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Examining a local variable with <i>routine.name</i> returns the contents
+ of the memory allocated for the variable, but with optimization,
+ variables often reside in registers. Also, on some architectures,
+ the first argument is always passed in a register.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Variables and parameters that have been optimized away do not
+ appear in the symbol table, returning the error <i>bad local variable</i>
+ when accessed by <i>db</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Breakpoints should not be set on instructions scheduled in delay
+ slots. When a program stops on such a breakpoint, it is usually
+ impossible to continue its execution.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/dc.html b/man/man1/dc.html
new file mode 100644
index 00000000..95b7fd24
--- /dev/null
+++ b/man/man1/dc.html
@@ -0,0 +1,199 @@
+<head>
+<title>dc(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DC(1)</b><td align=right><b>DC(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ dc &ndash; desk calculator<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>dc</font></tt> [ <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Dc</i> is an arbitrary precision desk calculator. Ordinarily it operates
+ on decimal integers, but one may specify an input base, output
+ base, and a number of fractional digits to be maintained. The
+ overall structure of <i>dc</i> is a stacking (reverse Polish) calculator.
+ If an argument is given, input is taken from that file until its
+ end, then from the standard input. The following constructions
+ are recognized:<br>
+ number<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The value of the number is pushed on the stack. A number is an
+ unbroken string of the digits <tt><font size=+1>0&#8722;9A&#8722;F</font></tt> or <tt><font size=+1>0&#8722;9a&#8722;f</font></tt>. A hexadecimal
+ number beginning with a lower case letter must be preceded by
+ a zero to distinguish it from the command associated with the
+ letter. It may be preceded by an underscore <tt><font size=+1>_</font></tt> to
+ input a negative number. Numbers may contain decimal points.<br>
+
+ </table>
+ <tt><font size=+1>+ &nbsp;&nbsp;&nbsp;&#8722; / &nbsp;&nbsp;&nbsp;* &nbsp;&nbsp;&nbsp;% &nbsp;&nbsp;&nbsp;^<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Add <tt><font size=+1>+</font></tt>, subtract <tt><font size=+1>&#8722;</font></tt>, multiply <tt><font size=+1>*</font></tt>, divide <tt><font size=+1>/</font></tt>, remainder <tt><font size=+1>%</font></tt>, or exponentiate
+ <tt><font size=+1>^</font></tt> the top two values on the stack. The two entries are popped
+ off the stack; the result is pushed on the stack in their place.
+ Any fractional part of an exponent is ignored.<br>
+
+ </table>
+ <tt><font size=+1>s</font></tt><i>x<br>
+ </i><tt><font size=+1>S</font></tt><i>x</i>&nbsp;&nbsp;&nbsp;&nbsp;Pop the top of the stack and store into a register named <i>x</i>,
+ where <i>x</i> may be any character. Under operation <tt><font size=+1>S</font></tt> register <i>x</i> is
+ treated as a stack and the value is pushed on it.<br>
+ <tt><font size=+1>l</font></tt><i>x<br>
+ </i><tt><font size=+1>L</font></tt><i>x</i>&nbsp;&nbsp;&nbsp;&nbsp;Push the value in register <i>x</i> onto the stack. The register <i>x</i>
+ is not altered. All registers start with zero value. Under operation
+ <tt><font size=+1>L</font></tt> register <i>x</i> is treated as a stack and its top value is popped
+ onto the main stack.<br>
+ <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Duplicate the top value on the stack.<br>
+ <tt><font size=+1>p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the top value on the stack. The top value remains unchanged.
+ <tt><font size=+1>P</font></tt> interprets the top of the stack as an text string, removes it,
+ and prints it.<br>
+ <tt><font size=+1>f</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the values on the stack.<br>
+ <tt><font size=+1>q<br>
+ Q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exit the program. If executing a string, the recursion level
+ is popped by two. Under operation <tt><font size=+1>Q</font></tt> the top value on the stack
+ is popped and the string execution level is popped by that value.<br>
+ <tt><font size=+1>x</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Treat the top element of the stack as a character string and
+ execute it as a string of <i>dc</i> commands.<br>
+ <tt><font size=+1>X</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replace the number on the top of the stack with its scale factor.<br>
+ <tt><font size=+1>[ ... ]<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Put the bracketed text string on the top of the stack.<br>
+
+ </table>
+ <tt><font size=+1>&lt;</font></tt><i>x<br>
+ </i><tt><font size=+1>&gt;</font></tt><i>x<br>
+ </i><tt><font size=+1>=</font></tt><i>x</i>&nbsp;&nbsp;&nbsp;&nbsp;Pop and compare the top two elements of the stack. Register
+ <i>x</i> is executed if they obey the stated relation.<br>
+ <tt><font size=+1>v</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replace the top element on the stack by its square root. Any
+ existing fractional part of the argument is taken into account,
+ but otherwise the scale factor is ignored.<br>
+ <tt><font size=+1>!</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interpret the rest of the line as a shell command.<br>
+ <tt><font size=+1>c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clear the stack.<br>
+ <tt><font size=+1>i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The top value on the stack is popped and used as the number base
+ for further input.<br>
+ <tt><font size=+1>I</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push the input base on the top of the stack.<br>
+ <tt><font size=+1>o</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The top value on the stack is popped and used as the number base
+ for further output. In bases larger than 10, each &#8216;digit&#8217; prints
+ as a group of decimal digits.<br>
+ <tt><font size=+1>O</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push the output base on the top of the stack.<br>
+ <tt><font size=+1>k</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pop the top of the stack, and use that value as a non-negative
+ scale factor: the appropriate number of places are printed on
+ output, and maintained during multiplication, division, and exponentiation.
+ The interaction of scale factor, input base, and output base will
+ be reasonable if all are changed together.
+ <tt><font size=+1>z</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Push the stack level onto the stack.<br>
+ <tt><font size=+1>Z</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replace the number on the top of the stack with its length.<br>
+ <tt><font size=+1>?</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A line of input is taken from the input source (usually the terminal)
+ and executed.<br>
+ <tt><font size=+1>; :</font></tt>&nbsp;&nbsp;&nbsp;Used by <i>bc</i> for array operations.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The scale factor set by <tt><font size=+1>k</font></tt> determines how many digits are kept
+ to the right of the decimal point. If <i>s</i> is the current scale factor,
+ <i>sa</i> is the scale of the first operand, <i>sb</i> is the scale of the second,
+ and <i>b</i> is the (integer) second operand, results are truncated to
+ the following scales.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>+</font></tt>,<tt><font size=+1>&#8722; </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;max(<i>sa,sb</i>)<br>
+ <tt><font size=+1>* </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min(<i>sa</i>+<i>sb</i> , max(<i>s,sa,sb</i>))<br>
+ <tt><font size=+1>/ </font></tt><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s<br>
+ </i><tt><font size=+1>% </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;so that dividend = divisor*quotient + remainder; remainder has
+ sign of dividend<br>
+ <tt><font size=+1>^ </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min(<i>sa</i>&#215;|<i>b</i>|, max(<i>s,sa</i>))<br>
+ <tt><font size=+1>v </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max(<i>s,sa</i>)<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the first ten values of <i>n</i>!<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>[la1+dsa*pla10&gt;y]sy<br>
+ 0sa1<br>
+ lyx<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/dc.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/bc.html"><i>bc</i>(1)</a>, <a href="../man1/hoc.html"><i>hoc</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>x</i> <tt><font size=+1>is unimplemented</font></tt>, where <i>x</i> is an octal number: an internal error.<br>
+ &#8216;Out of headers&#8217; for too many numbers being kept around.<br>
+ &#8216;Nesting depth&#8217; for too many levels of nested execution.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ When the input base exceeds 16, there is no notation for digits
+ greater than <tt><font size=+1>F</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Past its time.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/deroff.html b/man/man1/deroff.html
new file mode 100644
index 00000000..cb0c5aff
--- /dev/null
+++ b/man/man1/deroff.html
@@ -0,0 +1,102 @@
+<head>
+<title>deroff(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DEROFF(1)</b><td align=right><b>DEROFF(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ deroff, delatex &ndash; remove formatting requests<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>deroff</font></tt> [ <i>option ...</i> ] <i>file ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>delatex</font></tt> <i>file<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Deroff</i> reads each file in sequence and removes all <i>nroff</i> and <a href="../man1/troff.html"><i>troff</i>(1)</a>
+ requests and non-text arguments, backslash constructions, and
+ constructs of preprocessors such as <a href="../man1/eqn.html"><i>eqn</i>(1)</a>, <a href="../man1/pic.html"><i>pic</i>(1)</a>, and <a href="../man1/tbl.html"><i>tbl</i>(1)</a>.
+ Remaining text is written on the standard output. <i>Deroff</i> follows
+ files included by <tt><font size=+1>.so</font></tt> and <tt><font size=+1>.nx</font></tt> commands; if a file has
+ already been included, a <tt><font size=+1>.so</font></tt> for that file is ignored and a <tt><font size=+1>.nx</font></tt>
+ terminates execution. If no input file is given, <i>deroff</i> reads
+ from standard input.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The options are<br>
+ <tt><font size=+1>&#8722;w</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Output a word list, one &#8216;word&#8217; (string of letters, digits, and
+ properly embedded ampersands and apostrophes, beginning with a
+ letter) per line. Other characters are skipped. Otherwise, the
+ output follows the original, with the deletions mentioned above.<br>
+ <tt><font size=+1>&#8722;_</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Like <tt><font size=+1>&#8722;w</font></tt>, but consider underscores to be alphanumeric rather
+ than punctuation.<br>
+ <tt><font size=+1>&#8722;i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Ignore <tt><font size=+1>.so</font></tt> and <tt><font size=+1>.nx</font></tt> requests.<br>
+ <tt><font size=+1>&#8722;ms<br>
+ &#8722;mm</font></tt>&nbsp;&nbsp;&nbsp;Remove titles, attachments, etc., as well as ordinary <i>troff</i>
+ constructs, from <a href="../man7/ms.html"><i>ms</i>(7)</a> or <i>mm</i> documents.<br>
+ <tt><font size=+1>&#8722;ml</font></tt>&nbsp;&nbsp;&nbsp;Same as <tt><font size=+1>&#8722;mm</font></tt>, but remove lists as well.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Delatex</i> does for <i>tex</i> and <i>latex</i> (see <a href="../man1/tex.html"><i>tex</i>(1)</a>) files what <tt><font size=+1>deroff
+ &#8722;wi</font></tt> does for <i>troff</i> files.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/deroff.c<br>
+ /usr/local/plan9/src/cmd/delatex.lx<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/troff.html"><i>troff</i>(1)</a>, <a href="../man1/tex.html"><i>tex</i>(1)</a>, <a href="../man1/spell.html"><i>spell</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These filters are not complete interpreters of <i>troff</i> or <i>tex</i>. For
+ example, macro definitions containing <tt><font size=+1>\$</font></tt> cause chaos in <i>deroff</i>
+ when the popular <tt><font size=+1>$$</font></tt> delimiters for <i>eqn</i> are in effect.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Text inside macros is emitted at place of definition, not place
+ of call.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/dial.html b/man/man1/dial.html
new file mode 100644
index 00000000..70456274
--- /dev/null
+++ b/man/man1/dial.html
@@ -0,0 +1,67 @@
+<head>
+<title>dial(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DIAL(1)</b><td align=right><b>DIAL(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ dial &ndash; connect to a remote service<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>dial</font></tt> [ <tt><font size=+1>&#8722;e</font></tt> ] <i>addr<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Dial</i> connects to the network address <i>addr</i> (see <a href="../man3/dial.html"><i>dial</i>(3)</a>) and then
+ copies data from the connection to standard output, and from standard
+ input to the connection.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ By default, <i>dial</i> exits when end of file is reached on standard
+ input or on the network connection. The <tt><font size=+1>&#8722;e</font></tt> flag causes <i>dial</i> to
+ exit only in response to end of file on the network connection.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/dial.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/dial.html"><i>dial</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/dict.html b/man/man1/dict.html
new file mode 100644
index 00000000..48d086ba
--- /dev/null
+++ b/man/man1/dict.html
@@ -0,0 +1,168 @@
+<head>
+<title>dict(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DICT(1)</b><td align=right><b>DICT(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ dict, adict &ndash; dictionary browser<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>dict</font></tt> [ <tt><font size=+1>&#8722;k</font></tt> ] [ <tt><font size=+1>&#8722;d</font></tt> <i>dictname</i> ] [ <tt><font size=+1>&#8722;c</font></tt> <i>command</i> ] [ <i>pattern</i> ] <tt><font size=+1>adict</font></tt> [
+ <tt><font size=+1>&#8722;d</font></tt> <i>dictname</i> ] [ <i>pattern</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Dict</i> is a dictionary browser. If a <i>pattern</i> is given on the command
+ line, <i>dict</i> prints all matching entries; otherwise it repeatedly
+ accepts and executes commands. The options are<br>
+ <tt><font size=+1>&#8722;d</font></tt> <i>dictname</i>&nbsp;&nbsp;&nbsp;Use the given dictionary. A list of available dictionaries
+ is printed by option <tt><font size=+1>&#8722;d?</font></tt>. The default is the first dictionary
+ on the list that is installed on the system.<br>
+ <tt><font size=+1>&#8722;c</font></tt> <i>command</i>&nbsp;&nbsp;&nbsp;Execute one command and quit. The command syntax is
+ described below.<br>
+ <tt><font size=+1>&#8722;k</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print a pronunciation key.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Patterns are regular expressions (see <a href="../man7/regexp.html"><i>regexp</i>(7)</a>), with an implicit
+ leading <tt><font size=+1>^</font></tt> and trailing <tt><font size=+1>$</font></tt>. Patterns are matched against an index
+ of headwords and variants, to form a &#8216;match set&#8217;. By default,
+ both patterns and the index are folded: upper case characters
+ are mapped into their lower case equivalents, and Latin accented
+ characters are mapped into their non-accented equivalents. In
+ interactive mode, there is always a &#8216;current match set&#8217; and a
+ &#8216;current entry&#8217; within the match set. Commands can change either
+ or both, as well as print the entries or information about them.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Commands have an address followed by a command letter. Addresses
+ have the form:<br>
+ <tt><font size=+1>/</font></tt><i>re</i><tt><font size=+1>/</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the match set to all entries matching the regular expression
+ <i>re</i>, sorted in dictionary order. Set the current entry to the first
+ of the match set.<br>
+ <tt><font size=+1>!</font></tt><i>re</i><tt><font size=+1>!</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Like <tt><font size=+1>/</font></tt><i>re</i><tt><font size=+1>/</font></tt> but use exact matching, i.e., without case and accent
+ folding.<br>
+ <i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An integer <i>n</i> means change the current entry to the <i>n</i>th of the
+ current match set.<br>
+ <tt><font size=+1>#</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The integer <i>n</i> is an absolute byte offset into the raw dictionary.
+ (See the <tt><font size=+1>A</font></tt> command, below.)<br>
+ <i>addr</i><tt><font size=+1>+</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;After setting the match set and current entry according to
+ <i>addr</i>, change the match set and current entry to be the next entry
+ in the dictionary (not necessarily in the match set) after the
+ current entry.<br>
+ <i>addr</i><tt><font size=+1>&#8722;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Like <i>addr</i><tt><font size=+1>+</font></tt> but go to previous dictionary entry.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The command letters come in pairs: a lower case and the corresponding
+ upper case letter. The lower case version prints something about
+ the current entry only, and advances the current entry to the
+ next in the match set (wrapping around to the beginning after
+ the last). The upper case version prints something about
+ all of the match set and resets the current entry to the beginning
+ of the set.<br>
+ <tt><font size=+1>p</font></tt>,<tt><font size=+1>P</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print the whole entry.<br>
+ <tt><font size=+1>h</font></tt>,<tt><font size=+1>H</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print only the headword(s) of the entry.<br>
+ <tt><font size=+1>a</font></tt>,<tt><font size=+1>A</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print the dictionary byte offset of the entry.<br>
+ <tt><font size=+1>r</font></tt>,<tt><font size=+1>R</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print the whole entry in raw format (without translating special
+ characters, etc.).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If no command letter is given for the first command, <tt><font size=+1>H</font></tt> is assumed.
+ After an <tt><font size=+1>H</font></tt>, the default command is <tt><font size=+1>p</font></tt>. Otherwise, the default command
+ is the previous command.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Adict</i> is a dictionary browser for <a href="../man1/acme.html"><i>acme</i>(1)</a>. When run with no arguments,
+ it creates a new <i>acme</i> window named <tt><font size=+1>/adict/</font></tt> listing the installed
+ dictionaries. Clicking with button 3 on a dictionary name will
+ create a new empty window named <tt><font size=+1>/adict/</font></tt><i>dict</i><tt><font size=+1>/.</font></tt> Typing and then
+ clicking on a pattern in this window will create
+ a new lookup window named <tt><font size=+1>/adict/</font></tt><i>dict</i><tt><font size=+1>/</font></tt><i>pattern</i> containing the dictionary&#8217;s
+ definition of <i>pattern</i>. Clicking with button 3 on any word in this
+ new window will create new lookup windows.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If <i>adict</i> is run with a <i>pattern ,</i> it starts with the <tt><font size=+1>/adict/</font></tt><i>dict</i><tt><font size=+1>/</font></tt><i>pattern</i>
+ window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If <i>adict</i> is run with no pattern but with a <tt><font size=+1>&#8722;d</font></tt> option, it starts
+ with the <tt><font size=+1>/adict/</font></tt><i>dict</i><tt><font size=+1>/</font></tt> window.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/dict<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ dictionaries<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man7/regexp.html"><i>regexp</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/dict<br>
+ /usr/local/plan9/bin/adict<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A font with wide coverage of the Unicode Standard should be used
+ for best results. (Try <tt><font size=+1>/usr/local/plan9/font/pelm/unicode.9.font</font></tt>.)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the <i>pattern</i> doesn&#8217;t begin with a few literal characters, matching
+ takes a long time.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The dictionaries are not distributed outside Bell Labs, though
+ see <tt><font size=+1>/usr/local/plan9/dict/README</font></tt> for information on using free
+ dictionaries prepared by Project Gutenberg.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/diff.html b/man/man1/diff.html
new file mode 100644
index 00000000..c5e824be
--- /dev/null
+++ b/man/man1/diff.html
@@ -0,0 +1,141 @@
+<head>
+<title>diff(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DIFF(1)</b><td align=right><b>DIFF(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ diff &ndash; differential file comparator<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>diff</font></tt> [ <tt><font size=+1>&#8722;efmnbwr</font></tt> ] file1 ... file2<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Diff</i> tells what lines must be changed in two files to bring them
+ into agreement. If one file is a directory, then a file in that
+ directory with basename the same as that of the other file is
+ used. If both files are directories, similarly named files in
+ the two directories are compared by the method of <i>diff</i> for text
+ files and
+ <a href="../man1/cmp.html"><i>cmp</i>(1)</a> otherwise. If more than two file names are given, then
+ each argument is compared to the last argument as above. The <tt><font size=+1>&#8722;r</font></tt>
+ option causes <i>diff</i> to process similarly named subdirectories recursively.
+ When processing more than one file, <i>diff</i> prefixes file differences
+ with a single line listing the two differing files, in
+ the form of a <i>diff</i> command line. The <tt><font size=+1>&#8722;m</font></tt> flag causes this behavior
+ even when processing single files.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The normal output contains lines of these forms:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>n1</i> <tt><font size=+1>a</font></tt> <i>n3,n4<br>
+ n1,n2</i> <tt><font size=+1>d</font></tt> <i>n3<br>
+ n1,n2</i> <tt><font size=+1>c</font></tt> <i>n3,n4
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+
+ </table>
+ These lines resemble <i>ed</i> commands to convert <i>file1</i> into <i>file2</i>.
+ The numbers after the letters pertain to <i>file2</i>. In fact, by exchanging
+ &#8216;a&#8217; for &#8216;d&#8217; and reading backward one may ascertain equally how
+ to convert <i>file2</i> into <i>file1</i>. As in <i>ed</i>, identical pairs where <i>n1</i>
+ = <i>n2</i> or <i>n3</i> = <i>n4</i> are abbreviated as a single number.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Following each of these lines come all the lines that are affected
+ in the first file flagged by &#8216;&lt;&#8217;, then all the lines that are affected
+ in the second file flagged by &#8216;&gt;&#8217;.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;b</font></tt> option causes trailing blanks (spaces and tabs) to be ignored
+ and other strings of blanks to compare equal. The <tt><font size=+1>&#8722;w</font></tt> option causes
+ all white-space to be removed from input lines before applying
+ the difference algorithm.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;n</font></tt> option prefixes each range with <i>file</i><tt><font size=+1>:</font></tt> and inserts a space
+ around the <tt><font size=+1>a</font></tt>, <tt><font size=+1>c</font></tt>, and <tt><font size=+1>d</font></tt> verbs. The <tt><font size=+1>&#8722;e</font></tt> option produces a script
+ of <i>a, c</i> and <i>d</i> commands for the editor <i>ed</i>, which will recreate
+ <i>file2</i> from <i>file1</i>. The <tt><font size=+1>&#8722;f</font></tt> option produces a similar script, not
+ useful with <i>ed</i>, in the opposite order. It may, however, be useful
+ as
+ input to a stream-oriented post-processor.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Except in rare circumstances, <i>diff</i> finds a smallest sufficient
+ set of file differences.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/tmp/diff[12]<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/diff<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/cmp.html"><i>cmp</i>(1)</a>, <a href="../man1/comm.html"><i>comm</i>(1)</a>, <a href="../man1/ed.html"><i>ed</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Exit status is the empty string for no differences, <tt><font size=+1>some</font></tt> for some,
+ and <tt><font size=+1>error</font></tt> for trouble.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Editing scripts produced under the <tt><font size=+1>&#8722;e</font></tt> or <tt><font size=+1>&#8722;f</font></tt> option are naive about
+ creating lines consisting of a single &#8216;.&#8217;.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When running <i>diff</i> on directories, the notion of what is a text
+ file is open to debate.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/doctype.html b/man/man1/doctype.html
new file mode 100644
index 00000000..f837d915
--- /dev/null
+++ b/man/man1/doctype.html
@@ -0,0 +1,88 @@
+<head>
+<title>doctype(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DOCTYPE(1)</b><td align=right><b>DOCTYPE(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ doctype &ndash; intuit command line for formatting a document<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>doctype</font></tt> [ <tt><font size=+1>&#8722;n</font></tt> ] [ <tt><font size=+1>&#8722;T</font></tt> <i>dev</i> ] [ <i>file</i> ] ...<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Doctype</i> examines a <a href="../man1/troff.html"><i>troff</i>(1)</a> input file to deduce the appropriate
+ text formatting command and prints it on standard output. <i>Doctype</i>
+ recognizes input for <a href="../man1/troff.html"><i>troff</i>(1)</a>, related preprocessors like <a href="../man1/eqn.html"><i>eqn</i>(1)</a>,
+ and the <a href="../man7/ms.html"><i>ms</i>(7)</a> and <i>mm</i> macro packages.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Option <tt><font size=+1>&#8722;n</font></tt> invokes <i>nroff</i> instead of <i>troff</i>. The <tt><font size=+1>&#8722;T</font></tt> option is passed
+ to <i>troff</i>.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>eval `{doctype chapter.?} | lp<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Typeset files named <tt><font size=+1>chapter.0</font></tt>, <tt><font size=+1>chapter.1</font></tt>, ...<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin/doctype<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/troff.html"><i>troff</i>(1)</a>, <a href="../man1/eqn.html"><i>eqn</i>(1)</a>, <a href="../man1/tbl.html"><i>tbl</i>(1)</a>, <a href="../man1/pic.html"><i>pic</i>(1)</a>, <a href="../man1/grap.html"><i>grap</i>(1)</a>, <a href="../man7/ms.html"><i>ms</i>(7)</a>, <a href="../man7/man.html"><i>man</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ In true A.I. style, its best guesses are inspired rather than
+ accurate.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/echo.html b/man/man1/echo.html
new file mode 100644
index 00000000..a4f6e359
--- /dev/null
+++ b/man/man1/echo.html
@@ -0,0 +1,62 @@
+<head>
+<title>echo(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ECHO(1)</b><td align=right><b>ECHO(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ echo &ndash; print arguments<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>echo</font></tt> [ <tt><font size=+1>&#8722;n</font></tt> ] [ <i>arg ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Echo</i> writes its arguments separated by blanks and terminated by
+ a newline on the standard output. Option <tt><font size=+1>&#8722;n</font></tt> suppresses the newline.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/echo.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If <i>echo</i> draws an error while writing to standard output, the exit
+ status is <tt><font size=+1>write error</font></tt>. Otherwise the exit status is empty.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/ed.html b/man/man1/ed.html
new file mode 100644
index 00000000..a259b9bc
--- /dev/null
+++ b/man/man1/ed.html
@@ -0,0 +1,439 @@
+<head>
+<title>ed(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ED(1)</b><td align=right><b>ED(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ed &ndash; text editor<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>ed</font></tt> [ <tt><font size=+1>&#8722;</font></tt> ] [ <tt><font size=+1>&#8722;o</font></tt> ] [ <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Ed</i> is a venerable text editor.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If a <i>file</i> argument is given, <i>ed</i> simulates an <tt><font size=+1>e</font></tt> command (see below)
+ on that file: it is read into <i>ed&#8217;s</i> buffer so that it can be edited.
+ The options are<br>
+ <tt><font size=+1>&#8722;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Suppress the printing of character counts by <tt><font size=+1>e</font></tt>, <tt><font size=+1>r</font></tt>, and <tt><font size=+1>w</font></tt> commands
+ and of the confirming <tt><font size=+1>!</font></tt> by <tt><font size=+1>!</font></tt> commands.<br>
+ <tt><font size=+1>&#8722;o</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;(for output piping) Write all output to the standard error file
+ except writing by <tt><font size=+1>w</font></tt> commands. If no <i>file</i> is given, make <tt><font size=+1>/dev/stdout</font></tt>
+ the remembered file; see the <tt><font size=+1>e</font></tt> command below.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ed</i> operates on a &#8216;buffer&#8217;, a copy of the file it is editing; changes
+ made in the buffer have no effect on the file until a <tt><font size=+1>w</font></tt> (write)
+ command is given. The copy of the text being edited resides in
+ a temporary file called the <i>buffer</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Commands to <i>ed</i> have a simple and regular structure: zero, one,
+ or two <i>addresses</i> followed by a single character <i>command</i>, possibly
+ followed by parameters to the command. These addresses specify
+ one or more lines in the buffer. Missing addresses are supplied
+ by default.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In general, only one command may appear on a line. Certain commands
+ allow the addition of text to the buffer. While <i>ed</i> is accepting
+ text, it is said to be in <i>input mode.</i> In this mode, no commands
+ are recognized; all input is merely collected. Input mode is left
+ by typing a period <tt><font size=+1>.</font></tt> alone at the beginning of a line.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ed</i> supports the <i>regular expression</i> notation described in <a href="../man7/regexp.html"><i>regexp</i>(7)</a>.
+ Regular expressions are used in addresses to specify lines and
+ in one command (see <i>s</i> below) to specify a portion of a line which
+ is to be replaced. If it is desired to use one of the regular
+ expression metacharacters as an ordinary character, that
+ character may be preceded by &#8216;<tt><font size=+1>\</font></tt>&#8217;. This also applies to the character
+ bounding the regular expression (often <tt><font size=+1>/</font></tt>) and to <tt><font size=+1>\</font></tt> itself.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To understand addressing in <i>ed</i> it is necessary to know that at
+ any time there is a <i>current line.</i> Generally, the current line
+ is the last line affected by a command; however, the exact effect
+ on the current line is discussed under the description of each
+ command. Addresses are constructed as follows.
+ 1.&nbsp;&nbsp;&nbsp;&nbsp;The character <tt><font size=+1>.</font></tt>, customarily called &#8216;dot&#8217;, addresses the current
+ line.<br>
+ 2.&nbsp;&nbsp;&nbsp;&nbsp;The character <tt><font size=+1>$</font></tt> addresses the last line of the buffer.<br>
+ 3.&nbsp;&nbsp;&nbsp;&nbsp;A decimal number <i>n</i> addresses the <i>n</i>-th line of the buffer.<br>
+ 4.<tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;'x</font></tt> addresses the line marked with the name <i>x</i>, which must be
+ a lower-case letter. Lines are marked with the <tt><font size=+1>k</font></tt> command.<br>
+ 5.&nbsp;&nbsp;&nbsp;&nbsp;A regular expression enclosed in slashes ( <tt><font size=+1>/</font></tt>) addresses the
+ line found by searching forward from the current line and stopping
+ at the first line containing a string that matches the regular
+ expression. If necessary the search wraps around to the beginning
+ of the buffer.<br>
+ 6.&nbsp;&nbsp;&nbsp;&nbsp;A regular expression enclosed in queries <tt><font size=+1>?</font></tt> addresses the line
+ found by searching backward from the current line and stopping
+ at the first line containing a string that matches the regular
+ expression. If necessary the search wraps around to the end of
+ the buffer.<br>
+ 7.&nbsp;&nbsp;&nbsp;&nbsp;An address followed by a plus sign <tt><font size=+1>+</font></tt> or a minus sign <tt><font size=+1>&#8722;</font></tt> followed
+ by a decimal number specifies that address plus (resp. minus)
+ the indicated number of lines. The plus sign may be omitted.<br>
+ 8.&nbsp;&nbsp;&nbsp;&nbsp;An address followed by <tt><font size=+1>+</font></tt> (or <tt><font size=+1>&#8722;</font></tt>) followed by a regular expression
+ enclosed in slashes specifies the first matching line following
+ (or preceding) that address. The search wraps around if necessary.
+ The <tt><font size=+1>+</font></tt> may be omitted, so <tt><font size=+1>0/x/</font></tt> addresses the <i>first</i> line in the
+ buffer with an <tt><font size=+1>x</font></tt>. Enclosing the regular expression in
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>?</font></tt> reverses the search direction.<br>
+
+ </table>
+ 9.&nbsp;&nbsp;&nbsp;&nbsp;If an address begins with <tt><font size=+1>+</font></tt> or <tt><font size=+1>&#8722;</font></tt> the addition or subtraction
+ is taken with respect to the current line; e.g. <tt><font size=+1>&#8722;5</font></tt> is understood
+ to mean <tt><font size=+1>.&#8722;5</font></tt>.<br>
+ 10.&nbsp;&nbsp;&nbsp;If an address ends with <tt><font size=+1>+</font></tt> or <tt><font size=+1>&#8722;</font></tt>, then 1 is added (resp. subtracted).
+ As a consequence of this rule and rule 9, the address <tt><font size=+1>&#8722;</font></tt> refers
+ to the line before the current line. Moreover, trailing <tt><font size=+1>+</font></tt> and
+ <tt><font size=+1>&#8722;</font></tt> characters have cumulative effect, so <tt><font size=+1>&#8722;&#8722;</font></tt> refers to the current
+ line less 2.<br>
+ 11.&nbsp;&nbsp;&nbsp;To maintain compatibility with earlier versions of the editor,
+ the character <tt><font size=+1>^</font></tt> in addresses is equivalent to <tt><font size=+1>&#8722;</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Commands may require zero, one, or two addresses. Commands which
+ require no addresses regard the presence of an address as an error.
+ Commands which accept one or two addresses assume default addresses
+ when insufficient are given. If more addresses are given than
+ a command requires, the last one or two
+ (depending on what is accepted) are used.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Addresses are separated from each other typically by a comma <tt><font size=+1>,</font></tt>.
+ They may also be separated by a semicolon <tt><font size=+1>;</font></tt>. In this case the
+ current line is set to the previous address before the next address
+ is interpreted. If no address precedes a comma or semicolon, line
+ 1 is assumed; if no address follows, the last line of the
+ buffer is assumed. The second address of any two-address sequence
+ must correspond to a line following the line corresponding to
+ the first address.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In the following list of <i>ed</i> commands, the default addresses are
+ shown in parentheses. The parentheses are not part of the address,
+ but are used to show that the given addresses are the default.
+ &#8216;Dot&#8217; means the current line.<br>
+ (<tt><font size=+1>.</font></tt>)<tt><font size=+1>a<br>
+ </font></tt>&lt;text&gt;<br>
+ <tt><font size=+1>.</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the given text and append it after the addressed line. Dot
+ is left on the last line input, if there were any, otherwise at
+ the addressed line. Address <tt><font size=+1>0</font></tt> is legal for this command; text
+ is placed at the beginning of the buffer.<br>
+ (<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>b</font></tt>[<tt><font size=+1>+&#8722;</font></tt>][<i>pagesize</i>][<tt><font size=+1>pln</font></tt>]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Browse. Print a &#8216;page&#8217;, normally 20 lines. The optional <tt><font size=+1>+</font></tt> (default)
+ or <tt><font size=+1>&#8722;</font></tt> specifies whether the next or previous page is to be printed.
+ The optional <i>pagesize</i> is the number of lines in a page. The optional
+ <tt><font size=+1>p</font></tt>, <tt><font size=+1>n</font></tt>, or <tt><font size=+1>l</font></tt> causes printing in the specified format, initially
+ <tt><font size=+1>p</font></tt>. Pagesize and format are remembered between <tt><font size=+1>b
+ </font></tt>commands. Dot is left at the last line displayed.<br>
+
+ </table>
+ (<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>c<br>
+ </font></tt>&lt;text&gt;<br>
+ <tt><font size=+1>.</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change. Delete the addressed lines, then accept input text to
+ replace these lines. Dot is left at the last line input; if there
+ were none, it is left at the line preceding the deleted lines.<br>
+ (<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>d<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Delete the addressed lines from the buffer. Dot is set to the
+ line following the last line deleted, or to the last line of the
+ buffer if the deleted lines had no successor.<br>
+
+ </table>
+ <tt><font size=+1>e</font></tt> <i>filename<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Edit. Delete the entire contents of the buffer; then read the
+ named file into the buffer. Dot is set to the last line of the
+ buffer. The number of characters read is typed. The file name
+ is remembered for possible use in later <tt><font size=+1>e</font></tt>, <tt><font size=+1>r</font></tt>, or <tt><font size=+1>w</font></tt> commands. If
+ <i>filename</i> is missing, the remembered name is used.
+
+ </table>
+ <tt><font size=+1>E</font></tt> <i>filename<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Unconditional <tt><font size=+1>e</font></tt>; see &#8216;<tt><font size=+1>q</font></tt>&#8217; below.<br>
+
+ </table>
+ <tt><font size=+1>f</font></tt> <i>filename<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the currently remembered file name. If <i>filename</i> is given,
+ the currently remembered file name is first changed to <i>filename</i>.<br>
+
+ </table>
+ (<tt><font size=+1>1,$</font></tt>)<tt><font size=+1>g/</font></tt><i>regular expression</i><tt><font size=+1>/</font></tt><i>command list<br>
+ </i>(<tt><font size=+1>1,$</font></tt>)<tt><font size=+1>g/</font></tt><i>regular expression</i><tt><font size=+1>/<br>
+ </font></tt>(<tt><font size=+1>1,$</font></tt>)<tt><font size=+1>g/</font></tt><i>regular expression<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Global. First mark every line which matches the given <i>regular</i>expression<i>.</i>
+ Then for every such line, execute the <i>command list</i> with dot initially
+ set to that line. A single command or the first of multiple commands
+ appears on the same line with the global command. All lines of
+ a multi-line list except the last line
+ must end with <tt><font size=+1>\</font></tt>. The &#8216;<tt><font size=+1>.</font></tt>&#8217; terminating input mode for an <tt><font size=+1>a</font></tt>, <tt><font size=+1>i</font></tt>, <tt><font size=+1>c</font></tt>
+ command may be omitted if it would be on the last line of the
+ command list. The commands <tt><font size=+1>g</font></tt> and <tt><font size=+1>v</font></tt> are not permitted in the command
+ list. Any character other than space or newline may be used instead
+ of <tt><font size=+1>/</font></tt> to delimit the regular expression.
+ The second and third forms mean <tt><font size=+1>g/</font></tt><i>regular expression</i><tt><font size=+1>/p</font></tt>.<br>
+
+ </table>
+ (<tt><font size=+1>.</font></tt>)<tt><font size=+1>i<br>
+ </font></tt>&lt;text&gt;<br>
+ <tt><font size=+1>.</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert the given text before the addressed line. Dot is left
+ at the last line input, or, if there were none, at the line before
+ the addressed line. This command differs from the <i>a</i> command only
+ in the placement of the text.<br>
+ (<tt><font size=+1>.,.+1</font></tt>)<tt><font size=+1>j<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Join the addressed lines into a single line; intermediate newlines
+ are deleted. Dot is left at the resulting line.<br>
+
+ </table>
+ (<tt><font size=+1>.</font></tt>)<tt><font size=+1>k</font></tt><i>x</i>Mark the addressed line with name <i>x</i>, which must be a lower-case
+ letter. The address form <tt><font size=+1>'</font></tt><i>x</i> then addresses this line.<br>
+ (<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>l<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ List. Print the addressed lines in an unambiguous way: a tab is
+ printed as <tt><font size=+1>\t</font></tt>, a backspace as <tt><font size=+1>\b</font></tt>, backslashes as <tt><font size=+1>\\</font></tt>, and non-printing
+ characters as a backslash, an <tt><font size=+1>x</font></tt>, and four hexadecimal digits.
+ Long lines are folded, with the second and subsequent sub-lines
+ indented one tab stop. If the last character in
+ the line is a blank, it is followed by <tt><font size=+1>\n</font></tt>. An <tt><font size=+1>l</font></tt> may be appended,
+ like <tt><font size=+1>p</font></tt>, to any non-I/O command.<br>
+
+ </table>
+ (<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>m</font></tt><i>a<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Move. Reposition the addressed lines after the line addressed
+ by <i>a</i>. Dot is left at the last moved line.<br>
+
+ </table>
+ (<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>n<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Number. Perform <tt><font size=+1>p</font></tt>, prefixing each line with its line number and
+ a tab. An <tt><font size=+1>n</font></tt> may be appended, like <tt><font size=+1>p</font></tt>, to any non-I/O command.<br>
+
+ </table>
+ (<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>p<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the addressed lines. Dot is left at the last line printed.
+ A <tt><font size=+1>p</font></tt> appended to any non-I/O command causes the then current line
+ to be printed after the command is executed.<br>
+
+ </table>
+ (<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>P<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This command is a synonym for <tt><font size=+1>p</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quit the editor. No automatic write of a file is done. A <tt><font size=+1>q</font></tt> or
+ <tt><font size=+1>e</font></tt> command is considered to be in error if the buffer has been
+ modified since the last <tt><font size=+1>w</font></tt>, <tt><font size=+1>q</font></tt>, or <tt><font size=+1>e</font></tt> command.<br>
+ <tt><font size=+1>Q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quit unconditionally.<br>
+ (<tt><font size=+1>$</font></tt>)r <i>filename<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Read in the given file after the addressed line. If no <i>filename</i>
+ is given, the remembered file name is used. The file name is remembered
+ if there were no remembered file name already. If the read is
+ successful, the number of characters read is printed. Dot is left
+ at the last line read from the file.
+
+ </table>
+ (<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>s</font></tt><i>n</i><tt><font size=+1>/</font></tt><i>regular expression</i><tt><font size=+1>/</font></tt><i>replacement</i><tt><font size=+1>/<br>
+ </font></tt>(<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>s</font></tt><i>n</i><tt><font size=+1>/</font></tt><i>regular expression</i><tt><font size=+1>/</font></tt><i>replacement</i><tt><font size=+1>/g<br>
+ </font></tt>(<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>s</font></tt><i>n</i><tt><font size=+1>/</font></tt><i>regular expression</i><tt><font size=+1>/</font></tt><i>replacement<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Substitute. Search each addressed line for an occurrence of the
+ specified regular expression. On each line in which <i>n</i> matches
+ are found (<i>n</i> defaults to 1 if missing), the <i>n</i>th matched string
+ is replaced by the replacement specified. If the global replacement
+ indicator <tt><font size=+1>g</font></tt> appears after the command, all subsequent
+ matches on the line are also replaced. It is an error for the
+ substitution to fail on all addressed lines. Any character other
+ than space or newline may be used instead of <tt><font size=+1>/</font></tt> to delimit the
+ regular expression and the replacement. Dot is left at the last
+ line substituted. The third form means
+ <tt><font size=+1>s</font></tt><i>n</i><tt><font size=+1>/</font></tt><i>regular expression</i><tt><font size=+1>/</font></tt><i>replacement</i><tt><font size=+1>/p</font></tt>. The second <tt><font size=+1>/</font></tt> may be omitted
+ if the replacement is empty.<br>
+ An ampersand <tt><font size=+1>&amp;</font></tt> appearing in the replacement is replaced by the
+ string matching the regular expression. The characters <tt><font size=+1>\</font></tt><i>n</i>, where
+ <i>n</i> is a digit, are replaced by the text matched by the <i>n</i>-th regular
+ subexpression enclosed between <tt><font size=+1>(</font></tt> and <tt><font size=+1>)</font></tt>. When nested parenthesized
+ subexpressions are present, <i>n</i> is
+ determined by counting occurrences of <tt><font size=+1>(</font></tt> starting from the left.<br>
+ A literal <tt><font size=+1>&amp;</font></tt>, <tt><font size=+1>/</font></tt>, <tt><font size=+1>\</font></tt> or newline may be included in a replacement by
+ prefixing it with <tt><font size=+1>\</font></tt>.<br>
+
+ </table>
+ (<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>t</font></tt><i>a<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Transfer. Copy the addressed lines after the line addressed by
+ <i>a</i>. Dot is left at the last line of the copy.<br>
+
+ </table>
+ (<tt><font size=+1>.,.</font></tt>)<tt><font size=+1>u<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Undo. Restore the preceding contents of the first addressed line
+ (sic), which must be the last line in which a substitution was
+ made (double sic).<br>
+
+ </table>
+ (<tt><font size=+1>1,$</font></tt>)<tt><font size=+1>v/</font></tt><i>regular expression</i><tt><font size=+1>/</font></tt><i>command list<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This command is the same as the global command <tt><font size=+1>g</font></tt> except that the
+ command list is executed with dot initially set to every line
+ <i>except</i> those matching the regular expression.<br>
+
+ </table>
+ (<tt><font size=+1>1,$</font></tt>)<tt><font size=+1>w</font></tt> <i>filename<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Write the addressed lines to the given file. If the file does
+ not exist, it is created with mode 666 (readable and writable
+ by everyone). If no <i>filename</i> is given, the remembered file name,
+ if any, is used. The file name is remembered if there were no
+ remembered file name already. Dot is unchanged. If the write is
+ successful, the number of characters written is printed.<br>
+
+ </table>
+ (<tt><font size=+1>1,$</font></tt>)<tt><font size=+1>W</font></tt> <i>filename<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Perform <tt><font size=+1>w</font></tt>, but append to, instead of overwriting, any existing
+ file contents.<br>
+
+ </table>
+ (<tt><font size=+1>$</font></tt>)<tt><font size=+1>=</font></tt>&nbsp;&nbsp;&nbsp;Print the line number of the addressed line. Dot is unchanged.<br>
+ <tt><font size=+1>!</font></tt><i>shell command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Send the remainder of the line after the <tt><font size=+1>!</font></tt> to <a href="../man1/rc.html"><i>rc</i>(1)</a> to be interpreted
+ as a command. Dot is unchanged.<br>
+
+ </table>
+ (<tt><font size=+1>.+1</font></tt>)&lt;newline&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ An address without a command is taken as a <tt><font size=+1>p</font></tt> command. A terminal
+ <tt><font size=+1>/</font></tt> may be omitted from the address. A blank line alone is equivalent
+ to <tt><font size=+1>.+1p</font></tt>; it is useful for stepping through text.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ If an interrupt signal (DEL) is sent, <i>ed</i> prints a <tt><font size=+1>?</font></tt> and returns
+ to its command level.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When reading a file, <i>ed</i> discards NUL characters and all characters
+ after the last newline.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/tmp/e*<br>
+ ed.hup</font></tt> work is saved here if terminal hangs up<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/ed.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/sam.html"><i>sam</i>(1)</a>, <a href="../man1/sed.html"><i>sed</i>(1)</a>, <a href="../man7/regexp.html"><i>regexp</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>?</font></tt><i>name</i> for inaccessible file; <tt><font size=+1>?TMP</font></tt> for temporary file overflow;
+ <tt><font size=+1>?</font></tt> for errors in commands or other overflows.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/eqn.html b/man/man1/eqn.html
new file mode 100644
index 00000000..3d819235
--- /dev/null
+++ b/man/man1/eqn.html
@@ -0,0 +1,203 @@
+<head>
+<title>eqn(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>EQN(1)</b><td align=right><b>EQN(1)</b>
+<tr><td width=20><td colspan=2>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ delim $$<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ eqn &ndash; typeset mathematics<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>eqn</font></tt> [ <i>option ...</i> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Eqn</i> is a <a href="../man1/troff.html"><i>troff</i>(1)</a> preprocessor for typesetting mathematics on
+ a typesetter. Usage is almost always<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>eqn file ... | troff
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ If no files are specified, <i>eqn</i> reads from the standard input.
+ <i>Eqn</i> prepares output for the typesetter named in the <tt><font size=+1>&#8722;T</font></tt><i>dest</i> option
+ (default <tt><font size=+1>&#8722;Tutf</font></tt>; see <a href="../man1/troff.html"><i>troff</i>(1)</a>). When run with other preprocessor
+ filters, <i>eqn</i> usually comes last.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A line beginning with <tt><font size=+1>.EQ</font></tt> marks the start of an equation; the
+ end of an equation is marked by a line beginning with <tt><font size=+1>.EN</font></tt>. Neither
+ of these lines is altered, so they may be defined in macro packages
+ to get centering, numbering, etc. It is also possible to set two
+ characters as &#8216;delimiters&#8217;; text between delimiters is also
+ <i>eqn</i> input. Delimiters may be set to characters <i>x</i> and <i>y</i> with the
+ option <tt><font size=+1>&#8722;d</font></tt><i>xy</i> or (more commonly) with <tt><font size=+1>delim</font></tt> <i>xy</i> between <tt><font size=+1>.EQ</font></tt> and <tt><font size=+1>.EN</font></tt>.
+ Left and right delimiters may be identical. (They are customarily
+ taken to be $font L &quot;$$&quot; )$. Delimiters are turned off by <tt><font size=+1>delim
+ off</font></tt>. All text that is neither between delimiters
+ nor between <tt><font size=+1>.EQ</font></tt> and <tt><font size=+1>.EN</font></tt> is passed through untouched.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Tokens within <i>eqn</i> are separated by spaces, tabs, newlines, braces,
+ double quotes, tildes or circumflexes. Braces {} are used for
+ grouping; generally speaking, anywhere a single character like
+ <tt><font size=+1>x</font></tt> could appear, a complicated construction enclosed in braces
+ may be used instead. Tilde <tt><font size=+1>~</font></tt> represents a full space in the
+ output, circumflex <tt><font size=+1>^</font></tt> half as much.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Subscripts and superscripts are produced with the keywords <tt><font size=+1>sub</font></tt>
+ and <tt><font size=+1>sup</font></tt>. Thus <tt><font size=+1>x sub i</font></tt> makes $x sub i$, <tt><font size=+1>a sub i sup 2</font></tt> produces
+ $a sub i sup 2$, and <tt><font size=+1>e sup {x sup 2 + y sup 2}</font></tt> gives $e sup {x
+ sup 2 + y sup 2}$.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Over</font></tt> makes fractions: <tt><font size=+1>a over b</font></tt> yields $a over b$.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Sqrt</font></tt> produces square roots: <tt><font size=+1>1 over sqrt {ax sup 2 +bx+c}</font></tt> results
+ in $1 over sqrt {ax sup 2 +bx+c}$ .
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The keywords <tt><font size=+1>from</font></tt> and <tt><font size=+1>to</font></tt> introduce lower and upper limits on arbitrary
+ things: $lim from {n -&gt; inf} sum from 0 to n x sub i$ is made with
+ <tt><font size=+1>lim from {n &#8722;&gt; inf} sum from 0 to n x sub i</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Left and right brackets, braces, etc., of the right height are
+ made with <tt><font size=+1>left</font></tt> and <tt><font size=+1>right</font></tt>: <tt><font size=+1>left [ x sup 2 + y sup 2 over alpha
+ right ] ~=~1</font></tt> produces $left [ x sup 2 + y sup 2 over alpha right
+ ] ~=~1$. The <tt><font size=+1>right</font></tt> clause is optional. Legal characters after
+ <tt><font size=+1>left</font></tt> and <tt><font size=+1>right</font></tt> are braces, brackets,
+ bars, <tt><font size=+1>c</font></tt> and <tt><font size=+1>f</font></tt> for ceiling and floor, and <tt><font size=+1>&quot;&quot;</font></tt> for nothing at all (useful
+ for a right-side-only bracket).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Vertical piles of things are made with <tt><font size=+1>pile</font></tt>, <tt><font size=+1>lpile</font></tt>, <tt><font size=+1>cpile</font></tt>, and
+ <tt><font size=+1>rpile</font></tt>: <tt><font size=+1>pile {a above b above c}</font></tt> produces $pile {a above b above
+ c}$. There can be an arbitrary number of elements in a pile. <tt><font size=+1>lpile</font></tt>
+ left-justifies, <tt><font size=+1>pile</font></tt> and <tt><font size=+1>cpile</font></tt> center, with different vertical
+ spacing, and <tt><font size=+1>rpile</font></tt> right justifies.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Matrices are made with <tt><font size=+1>matrix</font></tt>: <tt><font size=+1>matrix { lcol { x sub i above y
+ sub 2 } ccol { 1 above 2 } }</font></tt> produces $matrix { lcol { x sub i
+ above y sub 2 } ccol { 1 above 2 } }$. In addition, there is <tt><font size=+1>rcol</font></tt>
+ for a right-justified column.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Diacritical marks are made with <tt><font size=+1>prime</font></tt>, <tt><font size=+1>dot</font></tt>, <tt><font size=+1>dotdot</font></tt>, <tt><font size=+1>hat</font></tt>, <tt><font size=+1>tilde</font></tt>,
+ <tt><font size=+1>bar</font></tt>, <tt><font size=+1>under</font></tt>, <tt><font size=+1>vec</font></tt>, <tt><font size=+1>dyad</font></tt>, and <tt><font size=+1>under</font></tt>: <tt><font size=+1>x sub 0 sup prime = f(t) bar
+ + g(t) under</font></tt> is $x sub 0 sup prime = f(t) bar + g(t) under$, and
+ <tt><font size=+1>x vec = y dyad</font></tt> is $x vec = y dyad$.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Sizes and fonts can be changed with prefix operators <tt><font size=+1>size</font></tt> <i>n</i>, <tt><font size=+1>size
+ &plusmn;</font></tt><i>n</i>, <tt><font size=+1>fat</font></tt>, <tt><font size=+1>roman</font></tt>, <tt><font size=+1>italic</font></tt>, <tt><font size=+1>bold</font></tt>, or <tt><font size=+1>font</font></tt> <i>n</i>. Size and fonts can be
+ changed globally in a document by <tt><font size=+1>gsize</font></tt> <i>n</i> and <tt><font size=+1>gfont</font></tt> <i>n</i>, or by the
+ command-line arguments <tt><font size=+1>&#8722;s</font></tt><i>n</i> and <tt><font size=+1>&#8722;f</font></tt><i>n</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Normally subscripts and superscripts are reduced by 3 point sizes
+ from the previous size; this may be changed by the command-line
+ argument <tt><font size=+1>&#8722;p</font></tt><i>n</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Successive display arguments can be lined up. Place <tt><font size=+1>mark</font></tt> before
+ the desired lineup point in the first equation; place <tt><font size=+1>lineup</font></tt> at
+ the place that is to line up vertically in subsequent equations.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Shorthands may be defined or existing keywords redefined with
+ <tt><font size=+1>define</font></tt>: <tt><font size=+1>define</font></tt> <i>thing</i> <tt><font size=+1>%</font></tt> <i>replacement</i> <tt><font size=+1>%</font></tt> defines a new token called
+ <i>thing</i> which will be replaced by <i>replacement</i> whenever it appears
+ thereafter. The <tt><font size=+1>%</font></tt> may be any character that does not occur in
+ <tt><font size=+1>replacement</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Keywords like <tt><font size=+1>sum</font></tt> ( sum ), <tt><font size=+1>int</font></tt> ( int ), <tt><font size=+1>inf</font></tt> ( inf ), and shorthands
+ like <tt><font size=+1>&gt;=</font></tt> (&gt;=), <tt><font size=+1>&#8722;&gt;</font></tt> (-&gt;), and <tt><font size=+1>!=</font></tt> ( != ) are recognized. Greek letters
+ are spelled out in the desired case, as in <tt><font size=+1>alpha</font></tt> or <tt><font size=+1>GAMMA</font></tt>. Mathematical
+ words like <tt><font size=+1>sin</font></tt>, <tt><font size=+1>cos</font></tt>, <tt><font size=+1>log</font></tt> are made Roman automatically. <a href="../man1/Troff.html"><i>Troff</i>(1)</a>
+ four-character escapes like <tt><font size=+1>\(lh</font></tt> (<=) can
+ be used anywhere. Strings enclosed in double quotes &quot; &quot; are passed
+ through untouched; this permits keywords to be entered as text,
+ and can be used to communicate with <i>troff</i> when all else fails.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/sys/lib/troff/font/devutf</font></tt>&nbsp;&nbsp;&nbsp;font descriptions for PostScript<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/eqn<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/troff.html"><i>troff</i>(1)</a>, <a href="../man1/tbl.html"><i>tbl</i>(1)</a><br>
+ J. F. Ossanna and B. W. Kernighan, &#8220;Troff User&#8217;s Manual&#8221;.<br>
+ B. W. Kernighan and L. L. Cherry, &#8220;Typesetting Mathematics--User&#8217;s
+ Guide&#8221;, <i>Unix Research System Programmer&#8217;s Manual,</i> Tenth Edition,
+ Volume 2.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To embolden digits, parens, etc., it is necessary to quote them,
+ as in <tt><font size=+1>bold &quot;12.3&quot;</font></tt>. delim off<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/factor.html b/man/man1/factor.html
new file mode 100644
index 00000000..893f2ad9
--- /dev/null
+++ b/man/man1/factor.html
@@ -0,0 +1,73 @@
+<head>
+<title>factor(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FACTOR(1)</b><td align=right><b>FACTOR(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ factor, primes &ndash; factor a number, generate large primes<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>factor</font></tt> [ <i>number</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>primes</font></tt> [ <i>start</i> [ <i>finish</i> ] ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Factor</i> prints <i>number</i> and its prime factors, each repeated the
+ proper number of times. The number must be positive and less than
+ 254 (about 1.8&#215;1016).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If no <i>number</i> is given, <i>factor</i> reads a stream of numbers from the
+ standard input and factors them. It exits on any input not a positive
+ integer. Maximum running time is proportional to <i>-/n </i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Primes</i> prints the prime numbers ranging from <i>start</i> to <i>finish</i>,
+ where <i>start</i> and <i>finish</i> are positive numbers less than 256. If
+ <i>finish</i> is missing, <i>primes</i> prints without end; if <i>start</i> is missing,
+ it reads the starting number from the standard input.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/factor.c<br>
+ /usr/local/plan9/src/cmd/primes.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/fmt.html b/man/man1/fmt.html
new file mode 100644
index 00000000..28d339a4
--- /dev/null
+++ b/man/man1/fmt.html
@@ -0,0 +1,100 @@
+<head>
+<title>fmt(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FMT(1)</b><td align=right><b>FMT(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ fmt, htmlfmt &ndash; simple text formatters<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>fmt</font></tt> [ <i>option ...</i> ] [ <i>file ...</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>htmlfmt</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> ] [ <tt><font size=+1>&#8722;c</font></tt> <i>charset</i> ] [ <tt><font size=+1>&#8722;u</font></tt> <i>url</i> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fmt</i> copies the given <i>files</i> (standard input by default) to its
+ standard output, filling and indenting lines. The options are<br>
+ <tt><font size=+1>&#8722;l</font></tt> <i>n</i>&nbsp;&nbsp;&nbsp;Output line length is <i>n</i>, including indent (default 70).<br>
+ <tt><font size=+1>&#8722;w</font></tt> <i>n</i>&nbsp;&nbsp;&nbsp;A synonym for <tt><font size=+1>&#8722;l</font></tt>.<br>
+ <tt><font size=+1>&#8722;i</font></tt> <i>n</i>&nbsp;&nbsp;&nbsp;Indent <i>n</i> spaces (default 0).<br>
+ <tt><font size=+1>&#8722;j</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Do not join short lines: only fold long lines.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Empty lines and initial white space in input lines are preserved.
+ Empty lines are inserted between input files.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fmt</i> is idempotent: it leaves already formatted text unchanged.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Htmlfmt</i> performs a similar service, but accepts as input text
+ formatted with HTML tags. It accepts <i>fmt</i>&#8217;s <tt><font size=+1>&#8722;l</font></tt> and <tt><font size=+1>&#8722;w</font></tt> flags and
+ also:<br>
+ <tt><font size=+1>&#8722;a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Normally <i>htmlfmt</i> suppresses the contents of form fields and
+ anchors (URLs and image files); this flag causes it to print them,
+ in square brackets.<br>
+ <tt><font size=+1>&#8722;c</font></tt> <i>charset<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ change the default character set from iso-8859-1 to <i>charset</i>. This
+ is the character set assumed if there isn&#8217;t one specified by the
+ html itself in a &lt;meta&gt; directive.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;u</font></tt> <i>url</i>Use <i>url</i> as the base URL for the document when displaying
+ anchors; sets <tt><font size=+1>&#8722;a</font></tt><i>.<br>
+ </i>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/fmt.c
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>/usr/local/plan9/src/cmd/htmlfmt<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Htmlfmt</i> makes no attempt to render the two-dimensional geometry
+ of tables; it just treats the table entries as plain, to-be-formatted
+ text.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/fortune.html b/man/man1/fortune.html
new file mode 100644
index 00000000..2793ee92
--- /dev/null
+++ b/man/man1/fortune.html
@@ -0,0 +1,64 @@
+<head>
+<title>fortune(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FORTUNE(1)</b><td align=right><b>FORTUNE(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ fortune &ndash; sample lines from a file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>fortune</font></tt> [ <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fortune</i> prints a one-line aphorism chosen at random. If a <i>file</i>
+ is specified, the saying is taken from that file; otherwise it
+ is selected from <tt><font size=+1>/usr/local/plan9/lib/fortunes</font></tt>.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/lib/fortunes<br>
+ /usr/local/plan9/lib/fortunes.index</font></tt> fast lookup table, maintained
+ automatically<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/fortune.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/freq.html b/man/man1/freq.html
new file mode 100644
index 00000000..6a4b82d0
--- /dev/null
+++ b/man/man1/freq.html
@@ -0,0 +1,69 @@
+<head>
+<title>freq(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FREQ(1)</b><td align=right><b>FREQ(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ freq &ndash; print histogram of character frequencies<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>freq</font></tt> [ <tt><font size=+1>&#8722;dxocr</font></tt> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Freq</i> reads the given files (default standard input) and prints
+ histograms of the character frequencies. By default, <i>freq</i> counts
+ each byte as a character; under the <tt><font size=+1>&#8722;r</font></tt> option it instead counts
+ UTF sequences, that is, runes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each non-zero entry of the table is printed preceded by the byte
+ value, in decimal, octal, hex, and Unicode character (if printable).
+ If any options are given, the <tt><font size=+1>&#8722;d</font></tt>, <tt><font size=+1>&#8722;x</font></tt>, <tt><font size=+1>&#8722;o</font></tt>, <tt><font size=+1>&#8722;c</font></tt> flags specify a subset
+ of value formats: decimal, hex, octal, and character, respectively.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/freq.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man7/utf.html"><i>utf</i>(7)</a>, <a href="../man1/wc.html"><i>wc</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/fsize.html b/man/man1/fsize.html
new file mode 100644
index 00000000..871ef383
--- /dev/null
+++ b/man/man1/fsize.html
@@ -0,0 +1,68 @@
+<head>
+<title>fsize(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FSIZE(1)</b><td align=right><b>FSIZE(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ fsize, mtime &ndash; print file information<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>fsize</font></tt> <i>file ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>mtime</font></tt> <i>file ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fsize</i> prints the name and size of each of the files.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mtime</i> prints the name and modification time (in seconds since
+ the epoch) of each of the files.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/fsize.c<br>
+ /usr/local/plan9/src/cmd/mtime.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The output formats of the two programs are different.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/grap.html b/man/man1/grap.html
new file mode 100644
index 00000000..e4e9c3c4
--- /dev/null
+++ b/man/man1/grap.html
@@ -0,0 +1,232 @@
+<head>
+<title>grap(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GRAP(1)</b><td align=right><b>GRAP(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ grap &ndash; pic preprocessor for drawing graphs<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>grap</font></tt> [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Grap</i> is a <a href="../man1/pic.html"><i>pic</i>(1)</a> preprocessor for drawing graphs on a typesetter.
+ Graphs are surrounded by the <i>troff</i> &#8216;commands&#8217; <tt><font size=+1>.G1</font></tt> and <tt><font size=+1>.G2</font></tt>. Data
+ are scaled and plotted, with tick marks supplied automatically.
+ Commands exist to modify the frame, add labels, override the default
+ ticks, change the plotting style, define coordinate
+ ranges and transformations, and include data from files. In addition,
+ <i>grap</i> provides the same loops, conditionals, and macro processing
+ that <i>pic</i> does.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>frame ht</font></tt> <i>e</i> <tt><font size=+1>wid</font></tt> <i>e</i> <tt><font size=+1>top dotted</font></tt> <i>...</i>: Set the frame around the graph
+ to specified <tt><font size=+1>ht</font></tt> and <tt><font size=+1>wid</font></tt>; default is 2 by 3 (inches). The line
+ <i>styles</i> (<tt><font size=+1>dotted</font></tt>, <tt><font size=+1>dashed</font></tt>, <tt><font size=+1>invis</font></tt>, <tt><font size=+1>solid</font></tt> (default)) of the <i>sides</i> (<tt><font size=+1>top</font></tt>,
+ <tt><font size=+1>bot</font></tt>, <tt><font size=+1>left</font></tt>, <tt><font size=+1>right</font></tt>) of the frame can be set independently.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>label</font></tt> <i>side </i><tt><font size=+1>&quot;a label&quot; &quot;as a set of strings&quot;</font></tt> <i>adjust</i>: Place label on
+ specified side; default side is bottom. <i>adjust</i> is <tt><font size=+1>up</font></tt> (or <tt><font size=+1>down
+ left right</font></tt>) <i>expr</i> to shift default position; <tt><font size=+1>width</font></tt> <i>expr</i> sets the
+ width explicitly.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>ticks</font></tt> <i>side</i> <tt><font size=+1>in at</font></tt> <i>optname expr, expr, ...</i>: Put ticks on <i>side</i> at
+ <i>expr, ...,</i> and label with <i>&quot;expr&quot;</i>. If any <i>expr</i> is followed by &quot;...&quot;,
+ label tick with &quot;...&quot;, and turn off all automatic labels. If &quot;...&quot;
+ contains <tt><font size=+1>%f</font></tt>&#8217;s, they will be interpreted as <tt><font size=+1>printf</font></tt> formatting instructions
+ for the tick value. Ticks point <tt><font size=+1>in</font></tt> or <tt><font size=+1>out</font></tt> (default out). Tick
+ iterator: instead of <tt><font size=+1>at</font></tt> <i>...</i>, use <tt><font size=+1>from</font></tt> <i>expr</i> <tt><font size=+1>to</font></tt> <i>expr</i> <tt><font size=+1>by</font></tt> <i>op expr</i>
+ where <i>op</i> is optionally <tt><font size=+1>+&#8722;*/</font></tt> for additive or multiplicative steps.
+ <tt><font size=+1>by</font></tt> can be omitted, to give steps of size 1. If no ticks are requested,
+ they are supplied automatically; suppress this with <tt><font size=+1>ticks off</font></tt>.
+ Automatic ticks normally leave a margin of 7% on each
+ side; set this to anything by <tt><font size=+1>margin =</font></tt> <i>expr</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>grid</font></tt> <i>side linedesc</i> <tt><font size=+1>at</font></tt> <i>optname expr, expr, ...</i>: Draw grids perpendicular
+ to <i>side</i> in style <i>linedesc</i> at <i>expr, ....</i> Iterators and labels work
+ as with ticks.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>coord</font></tt> <i>optname</i> <tt><font size=+1>x</font></tt> <i>min, max</i> <tt><font size=+1>y</font></tt> <i>min, max</i> <tt><font size=+1>log x &nbsp;&nbsp;&nbsp;log y</font></tt>: Set range of
+ coords and optional log scaling on either or both. This overrides
+ computation of data range. Default value of <i>optname</i> is current
+ coordinate system (each <tt><font size=+1>coord</font></tt> defines a new coordinate system).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>plot </font></tt><i>&quot;str&quot;</i> <tt><font size=+1>at</font></tt> <i>point</i>; <i>&quot;str&quot;</i> <tt><font size=+1>at</font></tt> <i>point</i>: Put <i>str</i> at <i>point</i>. Text position
+ can be qualified with <tt><font size=+1>rjust</font></tt>, <tt><font size=+1>ljust</font></tt>, <tt><font size=+1>above</font></tt>, <tt><font size=+1>below</font></tt> after &quot;...&quot;.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>line from</font></tt> <i>point</i> <tt><font size=+1>to</font></tt> <i>point linedesc</i>: Draw line from here to there.
+ <tt><font size=+1>arrow</font></tt> works in place of <tt><font size=+1>line</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>next</font></tt> <i>optname</i> <tt><font size=+1>at</font></tt> <i>point linedesc</i>: Continue plot of data in <i>optname
+ to point</i>; default is current.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>draw</font></tt> <i>optname linedesc ...</i>: Set mode for <tt><font size=+1>next</font></tt>: use this style from
+ now on, and plot &quot;...&quot; at each point (if given).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>new</font></tt> <i>optname linedesc ...</i>: Set mode for <tt><font size=+1>next</font></tt>, but disconnect from
+ previous.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A list of numbers <i>x y1 y2 y3 ...</i> is treated as <tt><font size=+1>plot bullet at</font></tt>
+ <i>x,y1</i>; <tt><font size=+1>plot bullet at</font></tt> <i>x,y2</i>; etc., or as <tt><font size=+1>next at</font></tt> <i>x,y1</i> etc., if <tt><font size=+1>draw</font></tt>
+ is specified. Abscissae of 1,2,3,... are provided if there is
+ only one input number per line.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A point <i>optname expr, expr</i> maps the point to the named coordinate
+ system. A <i>linedesc</i> is one of <tt><font size=+1>dot dash invis solid</font></tt> optionally followed
+ by an expression.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>define</font></tt> <i>name</i> <tt><font size=+1>{</font></tt><i>whatever</i><tt><font size=+1>}</font></tt>: Define a macro. There are macros already
+ defined for standard plotting symbols like <tt><font size=+1>bullet</font></tt>, <tt><font size=+1>circle</font></tt>, <tt><font size=+1>star</font></tt>,
+ <tt><font size=+1>plus</font></tt>, etc., in <tt><font size=+1>/usr/local/plan9/lib/grap.defines</font></tt>, which is included
+ if it exists.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>var</i> <tt><font size=+1>=</font></tt> <i>expr</i>: Evaluate an expression. Operators are <tt><font size=+1>+ &#8722; *</font></tt> and <tt><font size=+1>/</font></tt>.
+ Functions are <tt><font size=+1>log</font></tt> and <tt><font size=+1>exp</font></tt> (both base 10), <tt><font size=+1>sin</font></tt>, <tt><font size=+1>cos</font></tt>, <tt><font size=+1>sqrt</font></tt>; <tt><font size=+1>rand</font></tt>
+ returns random number on [0,1); <tt><font size=+1>max(</font></tt><i>e</i><tt><font size=+1>,</font></tt><i>e</i><tt><font size=+1>)</font></tt>, <tt><font size=+1>min(</font></tt><i>e</i><tt><font size=+1>,</font></tt><i>e</i><tt><font size=+1>)</font></tt>, <tt><font size=+1>int(</font></tt><i>e</i><tt><font size=+1>)</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>print</font></tt> <i>expr</i>; <tt><font size=+1>print &quot;</font></tt><i>...</i><tt><font size=+1>&quot;</font></tt>: As a debugging aid, print <i>expr</i> or <i>string</i>
+ on the standard error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>copy &quot;</font></tt><i>file name</i><tt><font size=+1>&quot;</font></tt>: Include this file right here.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>copy thru</font></tt> <i>macro</i>: Pass rest of input (until <tt><font size=+1>.G2</font></tt>) through <i>macro</i>,
+ treating each field (non-blank, or &quot;...&quot;) as an argument. <i>macro</i>
+ can be the name of a macro previously defined, or the body of
+ one in place, like <tt><font size=+1>/plot $1 at $2,$3/</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>copy thru</font></tt> <i>macro</i> <tt><font size=+1>until &quot;</font></tt><i>string</i><tt><font size=+1>&quot;</font></tt>: Stop copy when input is <i>string</i> (left-justified).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>pic</font></tt> <i>remainder of line</i>: Copy to output with leading blanks removed.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>graph</font></tt> <i>Name pic-position</i>: Start a new frame, place it at specified
+ position, e.g., <tt><font size=+1>graph Thing2 with .sw at Thing1.se + (0.1,0)</font></tt>.
+ <i>Name</i> must be capitalized to keep <i>pic</i> happy.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>.</font></tt><i>anything at beginning of line</i>: Copied verbatim.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>sh %</font></tt><i>anything</i> <tt><font size=+1>%</font></tt>: Pass everything between the <tt><font size=+1>%</font></tt>&#8217;s to the shell;
+ as with macros, <tt><font size=+1>%</font></tt> may be any character and <i>anything</i> may include
+ newlines.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>#</font></tt> <i>anything</i>: A comment, which is discarded.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Order is mostly irrelevant; no category is mandatory. Any arguments
+ on the <tt><font size=+1>.G1</font></tt> line are placed on the generated <tt><font size=+1>.PS</font></tt> line for <i>pic</i>.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>.G1<br>
+ frame ht 1 top invis right invis<br>
+ coord x 0, 10 y 1, 3 log y<br>
+ ticks left in at 1 &quot;bottommost tick&quot;, 2,3 &quot;top tick&quot;<br>
+ ticks bot in from 0 to 10 by 2<br>
+ label bot &quot;silly graph&quot;<br>
+ label left &quot;left side label&quot; &quot;here&quot;<br>
+ grid left dashed at 2.5<br>
+ copy thru / circle at $1,$2 /<br>
+ 1 1<br>
+ 2 1.5<br>
+ 3 2<br>
+ 4 1.5<br>
+ 10 3<br>
+ .G2<br>
+ frame ht 1 top invis right invis<br>
+ coord x 0, 10 y 1, 3 log y<br>
+ ticks left in at 1 &quot;bottommost tick&quot;, 2,3 &quot;top tick&quot;<br>
+ ticks bot in from 0 to 10 by 2<br>
+ label bot &quot;silly graph&quot;<br>
+ label left &quot;left side label&quot; &quot;here&quot;<br>
+ grid left dashed at 2.5<br>
+ copy thru / circle at $1,$2 /<br>
+ 1 1<br>
+ 2 1.5<br>
+ 3 2<br>
+ 4 1.5<br>
+ 10 3<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/lib/grap.defines</font></tt>&nbsp;&nbsp;&nbsp;definitions of standard plotting
+ characters, e.g., bullet<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/grap<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/pic.html"><i>pic</i>(1)</a>, <a href="../man1/troff.html"><i>troff</i>(1)</a><br>
+ J. L. Bentley and B. W. Kernighan, &#8220;GRAP--A Language for Typesetting
+ Graphs&#8221;, <i>Unix Research System Programmer&#8217;s Manual,</i> Tenth Edition,
+ Volume 2.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/graph.html b/man/man1/graph.html
new file mode 100644
index 00000000..af80b3d4
--- /dev/null
+++ b/man/man1/graph.html
@@ -0,0 +1,117 @@
+<head>
+<title>graph(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GRAPH(1)</b><td align=right><b>GRAPH(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ graph &ndash; draw a graph<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>graph</font></tt> [ <i>option ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Graph</i> with no options takes pairs of numbers from the standard
+ input as abscissas (<i>x</i>-values) and ordinates (<i>y</i>-values) of a graph.
+ Successive points are connected by straight lines. The graph is
+ encoded on the standard output for display by <a href="../man1/plot.html"><i>plot</i>(1)</a> filters.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If an ordinate is followed by a nonnumeric string, that string
+ is printed as a label beginning on the point. Labels may be surrounded
+ with quotes <tt><font size=+1>&quot; &quot;</font></tt> in which case they may be empty or contain blanks
+ and numbers; labels never contain newlines.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The following options are recognized, each as a separate argument.<br>
+ <tt><font size=+1>&#8722;a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Supply abscissas automatically; no <i>x</i>-values appear in the input.
+ Spacing is given by the next argument (default 1). A second optional
+ argument is the starting point for automatic abscissas (default
+ 0, or 1 with a log scale in <i>x</i>, or the lower limit given by <tt><font size=+1>&#8722;x</font></tt>).<br>
+ <tt><font size=+1>&#8722;b</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Break (disconnect) the graph after each label in the input.<br>
+ <tt><font size=+1>&#8722;c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Character string given by next argument is default label for
+ each point.<br>
+ <tt><font size=+1>&#8722;g</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Next argument is grid style, 0 no grid, 1 frame with ticks,
+ 2 full grid (default).<br>
+ <tt><font size=+1>&#8722;l</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Next argument is a legend to title the graph. Grid ranges are
+ automatically printed as part of the title unless a <tt><font size=+1>&#8722;s</font></tt> option
+ is present.<br>
+ <tt><font size=+1>&#8722;m</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Next argument is mode (style) of connecting lines: 0 disconnected,
+ 1 connected. Some devices give distinguishable line styles for
+ other small integers. Mode &ndash;1 (default) begins with style 1 and
+ rotates styles for successive curves under option <tt><font size=+1>&#8722;o</font></tt>.<br>
+ <tt><font size=+1>&#8722;o</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;(Overlay.) The ordinates for <i>n</i> superposed curves appear in the
+ input with each abscissa value. The next argument is <i>n</i>.<br>
+ <tt><font size=+1>&#8722;s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Save screen; no new page for this graph.<br>
+ <tt><font size=+1>&#8722;x l</font></tt>If <tt><font size=+1>l</font></tt> is present, <i>x</i>-axis is logarithmic. Next 1 (or 2) arguments
+ are lower (and upper) <i>x</i> limits. Third argument, if present, is
+ grid spacing on <i>x</i> axis. Normally these quantities are determined
+ automatically.<br>
+ <tt><font size=+1>&#8722;y l</font></tt>Similarly for <i>y</i>.<br>
+ <tt><font size=+1>&#8722;e</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Make automatically determined <i>x</i> and <i>y</i> scales equal.<br>
+ <tt><font size=+1>&#8722;h</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Next argument is fraction of space for height.<br>
+ <tt><font size=+1>&#8722;w</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Similarly for width.<br>
+ <tt><font size=+1>&#8722;r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Next argument is fraction of space to move right before plotting.<br>
+ <tt><font size=+1>&#8722;u</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Similarly to move up before plotting.<br>
+ <tt><font size=+1>&#8722;t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Transpose horizontal and vertical axes. (Option <tt><font size=+1>&#8722;a</font></tt> now applies
+ to the vertical axis.)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If a specified lower limit exceeds the upper limit, the axis is
+ reversed.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/graph<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/plot.html"><i>plot</i>(1)</a>, <a href="../man1/grap.html"><i>grap</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Segments that run out of bounds are dropped, not windowed. Logarithmic
+ axes may not be reversed. Option <tt><font size=+1>&#8722;e</font></tt> actually makes automatic limits,
+ rather than automatic scaling, equal.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/grep.html b/man/man1/grep.html
new file mode 100644
index 00000000..e9682561
--- /dev/null
+++ b/man/man1/grep.html
@@ -0,0 +1,117 @@
+<head>
+<title>grep(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GREP(1)</b><td align=right><b>GREP(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ grep, g &ndash; search a file for a pattern<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>grep</font></tt> [ <i>option ...</i> ] <i>pattern</i> [ <i>file ...</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>g</font></tt> [ <i>option ...</i> ] <i>pattern</i> [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Grep</i> searches the input <i>files</i> (standard input default) for lines
+ that match the <i>pattern</i>, a regular expression as defined in <a href="../man7/regexp.html"><i>regexp</i>(7)</a>
+ with the addition of a newline character as an alternative (substitute
+ for <tt><font size=+1>|</font></tt>) with lowest precedence. Normally, each line matching the
+ pattern is &#8216;selected&#8217;, and each selected line is copied to
+ the standard output. The options are<br>
+ <tt><font size=+1>&#8722;c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print only a count of matching lines.<br>
+ <tt><font size=+1>&#8722;h</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Do not print file name tags (headers) with output lines.<br>
+ <tt><font size=+1>&#8722;e</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;The following argument is taken as a <i>pattern</i>. This option makes
+ it easy to specify patterns that might confuse argument parsing,
+ such as <tt><font size=+1>&#8722;n</font></tt>.<br>
+ <tt><font size=+1>&#8722;i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Ignore alphabetic case distinctions. The implementation folds
+ into lower case all letters in the pattern and input before interpretation.
+ Matched lines are printed in their original form.<br>
+ <tt><font size=+1>&#8722;l</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;(ell) Print the names of files with selected lines; don&#8217;t print
+ the lines.<br>
+ <tt><font size=+1>&#8722;L</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print the names of files with no selected lines; the converse
+ of <tt><font size=+1>&#8722;l</font></tt>.<br>
+ <tt><font size=+1>&#8722;n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Mark each printed line with its line number counted in its file.<br>
+ <tt><font size=+1>&#8722;s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Produce no output, but return status.<br>
+ <tt><font size=+1>&#8722;v</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Reverse: print lines that do not match the pattern.<br>
+ <tt><font size=+1>&#8722;f</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;The pattern argument is the name of a file containing regular
+ expressions one per line.<br>
+ <tt><font size=+1>&#8722;b</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Don&#8217;t buffer the output: write each output line as soon as it
+ is discovered.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Output lines are tagged by file name when there is more than one
+ input file. (To force this tagging, include <tt><font size=+1>/dev/null</font></tt> as a file
+ name argument.)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Care should be taken when using the shell metacharacters <tt><font size=+1>$*[^|()=\</font></tt>
+ and newline in <i>pattern</i>; it is safest to enclose the entire expression
+ in single quotes <tt><font size=+1>'</font></tt>...<tt><font size=+1>'</font></tt>. An expression starting with &#8217;*&#8217; will treat
+ the rest of the expression as literal characters.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>G</i> invokes grep with <tt><font size=+1>&#8722;n</font></tt> and forces tagging of output lines by file
+ name. If no files are listed, it searches all files matching<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>*.C *.b *.c *.h *.m *.cc *.java *.py *.tex *.ms<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/grep<br>
+ /usr/local/plan9/bin/g<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/ed.html"><i>ed</i>(1)</a>, <a href="../man1/awk.html"><i>awk</i>(1)</a>, <a href="../man1/sed.html"><i>sed</i>(1)</a>, <a href="../man1/sam.html"><i>sam</i>(1)</a>, <a href="../man7/regexp.html"><i>regexp</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Exit status is null if any lines are selected, or non-null when
+ no lines are selected or an error occurs.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/gview.html b/man/man1/gview.html
new file mode 100644
index 00000000..6abdc7da
--- /dev/null
+++ b/man/man1/gview.html
@@ -0,0 +1,155 @@
+<head>
+<title>gview(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GVIEW(1)</b><td align=right><b>GVIEW(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ gview &ndash; interactive graph viewer<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>gview</font></tt> [ <tt><font size=+1>&#8722;l</font></tt> <i>logfile</i> ] [ <tt><font size=+1>&#8722;m</font></tt> ] [ <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Gview</i> reads polygonal lines or a polygonal line drawing from an
+ <tt><font size=+1>ASCII</font></tt> input file (which defaults to standard input), and views
+ it interactively, with commands to zoom in and out, perform simple
+ editing operations, and display information about points and polylines.
+ The editing commands can change the color and
+ thickness of the polylines, delete (or undelete) some of them,
+ and optionally rotate and move them. It is also possible to generate
+ an output file that reflects these changes and is in the same
+ format as the input.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Since the <tt><font size=+1>move</font></tt> and <tt><font size=+1>rotate</font></tt> commands are undesirable when just viewing
+ a graph, they are only enabled if <i>gview</i> is invoked with the <tt><font size=+1>&#8722;m</font></tt>
+ option.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Clicking on a polyline with button 1 displays the coordinates
+ and a <i>t</i> value that tells how far along the polyline. <i>(t</i>=0 at the
+ first vertex, <i>t</i>=1 at the first vertex, <i>t</i>=1.5 halfway between the
+ second and third vertices, etc.) The <tt><font size=+1>&#8722;l</font></tt> option generates a log
+ file that lists all points selected in this manner.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The most important interactive operations are to <i>zoom in</i> by sweeping
+ out a rectangle, or to <i>zoom out</i> so that everything currently being
+ displayed shrinks to fit in the swept-out rectangle. Other options
+ on the button 3 menu are <i>unzoom</i> which restores the coordinate
+ system to the default state where everything fits on
+ the screen, <i>recenter</i> which takes a point and makes it the center
+ of the window, and <i>square up</i> which makes the horizontal and vertical
+ scale factors equal.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To take a graph of a function where some part is almost linear
+ and see how it deviates from a straight line, select two points
+ on this part of the graph (i.e., select one with button 1 and
+ then select the other) and then use the <i>slant</i> command on the button
+ 3 menu. This slants the coordinate system so that the line
+ between the two selected points appears horizontal (but vertical
+ still means positive <i>y</i>). Then the <i>zoom in</i> command can be used
+ to accentuate deviations from horizontal. There is also an <i>unslant</i>
+ command that undoes all of this and goes back to an unslanted
+ coordinate system.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There is a <i>recolor</i> command on button 3 that lets you select a
+ color and change everything to have that color, and a similar
+ command on button 2 that only affects the selected polyline. The
+ <i>thick</i> or <i>thin</i> command on button 2 changes the thickness of the
+ selected polyline and there is also an undo command for such
+ edits.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Finally, button 3 had commands to <i>read</i> a new input file and display
+ it on top of everything else, <i>restack</i> the drawing order (in case
+ lines of different color are drawn on top of each other), <i>write</i>
+ everything into an output file, or <i>exit</i> the program.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each polyline in an input or output file is a space-delimited
+ <i>x y</i> coordinate pair on a line by itself, and the polyline is a
+ sequence of such vertices followed by a label. The label could
+ be just a blank line or it could be a string in double quotes,
+ or virtually any text that does not contain spaces and is on a
+ line by itself. The
+ label at the end of the last polyline is optional. It is not legal
+ to have two consecutive labels, since that would denote a zero-vertex
+ polyline and each polyline must have at least one vertex. (One-vertex
+ polylines are useful for scatter plots.)<br>
+ If the label after a polyline can contains the word <tt><font size=+1>Thick</font></tt> or a
+ color name <tt><font size=+1>(Red</font></tt>, <tt><font size=+1>Pink</font></tt>, <tt><font size=+1>Dkred</font></tt>, <tt><font size=+1>Orange</font></tt>, <tt><font size=+1>Yellow</font></tt>, <tt><font size=+1>Dkyellow</font></tt>, <tt><font size=+1>Green</font></tt>,
+ <tt><font size=+1>Dkgreen</font></tt>, <tt><font size=+1>Cyan</font></tt>, <tt><font size=+1>Blue</font></tt>, <tt><font size=+1>Ltblue</font></tt>, <tt><font size=+1>Magenta</font></tt>, <tt><font size=+1>Violet</font></tt>, <tt><font size=+1>Gray</font></tt>, <tt><font size=+1>Black</font></tt>, <tt><font size=+1>White</font></tt>),
+ whichever color name comes first will be used to color the polyline.
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To see a graph of the function <i>y</i>=<i>sin(</i>x<i>)/</i>x generate input with
+ an awk script and pipe it into <i>gview</i>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>awk 'BEGIN{for(x=.1;x&lt;500;x+=.1)print x,sin(x)/x}' | gview<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/draw/gview.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/awk.html"><i>awk</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The user interface for the <i>slant</i> command is counter-intuitive.
+ Perhaps it would be better to have a scheme for sweeping out a
+ parallelogram.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/gzip.html b/man/man1/gzip.html
new file mode 100644
index 00000000..3f476f15
--- /dev/null
+++ b/man/man1/gzip.html
@@ -0,0 +1,135 @@
+<head>
+<title>gzip(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GZIP(1)</b><td align=right><b>GZIP(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ gzip, gunzip, bzip2, bunzip2, zip, unzip, &ndash; compress and expand
+ data<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>gzip</font></tt> [<tt><font size=+1>&#8722;cvD</font></tt>[<tt><font size=+1>1&#8722;9</font></tt>]] [<i>file</i> <tt><font size=+1>...</font></tt>]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>gunzip</font></tt> [<tt><font size=+1>&#8722;ctTvD</font></tt>] [<i>file</i> <tt><font size=+1>...</font></tt>]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>bzip2</font></tt> [<tt><font size=+1>&#8722;cvD</font></tt>[<tt><font size=+1>1&#8722;9</font></tt>]] [<i>file</i> <tt><font size=+1>...</font></tt>]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>bunzip2</font></tt> [<tt><font size=+1>&#8722;cvD</font></tt>] [<i>file</i> <tt><font size=+1>...</font></tt>]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>zip</font></tt> [<tt><font size=+1>&#8722;vD</font></tt>[<tt><font size=+1>1&#8722;9</font></tt>]] [<tt><font size=+1>&#8722;f</font></tt> <i>zipfile</i>] <i>file</i> [<tt><font size=+1>...</font></tt>]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>unzip</font></tt> [<tt><font size=+1>&#8722;cistTvD</font></tt>] [<tt><font size=+1>&#8722;f</font></tt> <i>zipfile</i>] <i>[</i>file <tt><font size=+1>...</font></tt>]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Gzip</i> encodes files with a hybrid Lempel-Ziv 1977 and Huffman compression
+ algorithm known as <tt><font size=+1>deflate</font></tt>. Most of the time, the resulting file
+ is smaller, and will never be much bigger. Output files are named
+ by taking the last path element of each file argument and appending
+ <tt><font size=+1>.gz</font></tt>; if the resulting name ends with
+ <tt><font size=+1>.tar.gz</font></tt>, it is converted to <tt><font size=+1>.tgz</font></tt> instead. <i>Gunzip</i> reverses the
+ process. Its output files are named by taking the last path element
+ of each file argument, converting <tt><font size=+1>.tgz</font></tt> to <tt><font size=+1>.tar.gz</font></tt>, and stripping
+ any <tt><font size=+1>.gz</font></tt>; the resulting name must be different from the original
+ name.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bzip2</i> and <i>bunzip2</i> are similar in interface to <i>gzip</i> and <i>gunzip</i>,
+ but use a modified Burrows-Wheeler block sorting compression algorithm.
+ The default suffix for output files is <tt><font size=+1>.bz2</font></tt>, with <tt><font size=+1>.tar.bz2</font></tt> becoming
+ <tt><font size=+1>.tbz</font></tt>. <i>Bunzip2</i> recognizes the extension <tt><font size=+1>.tbz2</font></tt> as a synonym for
+ <tt><font size=+1>.tbz</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Zip</i> encodes the named files and places the results into the archive
+ <i>zipfile</i>, or the standard output if no file is given. <i>Unzip</i> extracts
+ files from an archive created by <i>zip</i>. If no files are named as
+ arguments, all of files in the archive are extracted. A directory&#8217;s
+ name implies all recursively contained files and subdirectories.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ None of these programs removes the original files. If the process
+ fails, the faulty output files are removed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The options are:<br>
+ <tt><font size=+1>&#8722;c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write to standard output rather than creating an output file.<br>
+ <tt><font size=+1>&#8722;i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert all archive file names to lower case.<br>
+ <tt><font size=+1>&#8722;s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Streaming mode. Looks at the file data adjacent to each compressed
+ file rather than seeking in the central file directory. This is
+ the mode used by <i>unzip</i> if no <i>zipfile</i> is specified. If <tt><font size=+1>&#8722;s</font></tt> is given,
+ <tt><font size=+1>&#8722;T</font></tt> is ignored.<br>
+ <tt><font size=+1>&#8722;t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List matching files in the archive rather than extracting them.<br>
+ <tt><font size=+1>&#8722;T</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the output time to that specified in the archive.<br>
+ <tt><font size=+1>&#8722;1</font></tt> .. <tt><font size=+1>&#8722;9</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the compression level. <tt><font size=+1>&#8722;1</font></tt> is tuned for speed, <tt><font size=+1>&#8722;9</font></tt>
+ for minimal output size. The best compromise is <tt><font size=+1>&#8722;6</font></tt>, the default.<br>
+ <tt><font size=+1>&#8722;v</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Produce more descriptive output. With <tt><font size=+1>&#8722;t</font></tt>, adds the uncompressed
+ size in bytes and the modification time to the output. Without
+ <tt><font size=+1>&#8722;t</font></tt>, prints the names of files on standard error as they are compressed
+ or decompressed.<br>
+ <tt><font size=+1>&#8722;D</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Produce debugging output.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/gzip<br>
+ /usr/local/plan9/src/cmd/bzip2<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/tar.html"><i>tar</i>(1)</a>, <a href="../man1/compress.html"><i>compress</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Unzip</i> can only extract files which are uncompressed or compressed
+ with the <tt><font size=+1>deflate</font></tt> compression scheme. Recent zip files fall into
+ this category.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/hoc.html b/man/man1/hoc.html
new file mode 100644
index 00000000..21107e8e
--- /dev/null
+++ b/man/man1/hoc.html
@@ -0,0 +1,136 @@
+<head>
+<title>hoc(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>HOC(1)</b><td align=right><b>HOC(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ hoc &ndash; interactive floating point language<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>hoc</font></tt> [ <i>file ...</i> ] [ <tt><font size=+1>&#8722;e</font></tt> <i>expression</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Hoc</i> interprets a simple language for floating point arithmetic,
+ at about the level of BASIC, with C-like syntax and functions.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The named <i>files</i> are read and interpreted in order. If no <i>file</i>
+ is given or if <i>file</i> is <tt><font size=+1>&#8722;</font></tt> <i>hoc</i> interprets the standard input. The
+ <tt><font size=+1>&#8722;e</font></tt> option allows input to <i>hoc</i> to be specified on the command line,
+ to be treated as if it appeared in a file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Hoc</i> input consists of <i>expressions</i> and <i>statements</i>. Expressions
+ are evaluated and their results printed. Statements, typically
+ assignments and function or procedure definitions, produce no
+ output unless they explicitly call <i>print</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Variable names have the usual syntax, including <tt><font size=+1>_</font></tt>; the name <tt><font size=+1>_</font></tt>
+ by itself contains the value of the last expression evaluated.
+ The variables <tt><font size=+1>E</font></tt>, <tt><font size=+1>PI</font></tt>, <tt><font size=+1>PHI</font></tt>, <tt><font size=+1>GAMMA</font></tt> and <tt><font size=+1>DEG</font></tt> are predefined; the last
+ is 59.25..., degrees per radian.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Expressions are formed with these C-like operators, listed by
+ decreasing precedence.<br>
+ <tt><font size=+1>^</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exponentiation<br>
+ <tt><font size=+1>! &#8722; ++ &#8722;&#8722;<br>
+ * / %<br>
+ + &#8722;<br>
+ &gt; &gt;= &lt; &lt;= == !=<br>
+ &amp;&amp;<br>
+ ||<br>
+ = += &#8722;= *= /= %=<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ Built in functions are <tt><font size=+1>abs</font></tt>, <tt><font size=+1>acos</font></tt>, <tt><font size=+1>asin</font></tt>, <tt><font size=+1>atan</font></tt> (one argument), <tt><font size=+1>cos</font></tt>,
+ <tt><font size=+1>cosh</font></tt>, <tt><font size=+1>exp</font></tt>, <tt><font size=+1>int</font></tt>, <tt><font size=+1>log</font></tt>, <tt><font size=+1>log10</font></tt>, <tt><font size=+1>sin</font></tt>, <tt><font size=+1>sinh</font></tt>, <tt><font size=+1>sqrt</font></tt>, <tt><font size=+1>tan</font></tt>, and <tt><font size=+1>tanh</font></tt>. The
+ function <tt><font size=+1>read(x)</font></tt> reads a value into the variable <tt><font size=+1>x</font></tt> and returns
+ 0 at EOF; the statement <tt><font size=+1>print</font></tt> prints a list of expressions that
+ may include string constants such as
+ <tt><font size=+1>&quot;hello\n&quot;</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ <tt><font size=+1>
+ </font></tt>Control flow statements are <tt><font size=+1>if</font></tt>-<tt><font size=+1>else</font></tt>, <tt><font size=+1>while</font></tt>, and <tt><font size=+1>for</font></tt>, with braces
+ for grouping. Newline ends a statement. Backslash-newline is equivalent
+ to a space.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Functions and procedures are introduced by the words <tt><font size=+1>func</font></tt> and
+ <tt><font size=+1>proc</font></tt>; <tt><font size=+1>return</font></tt> is used to return with a value from a function.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>func gcd(a, b) {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ temp = abs(a) % abs(b)<br>
+ if(temp == 0) return abs(b)<br>
+ return gcd(b, temp)<br>
+
+ </table>
+ }<br>
+ for(i=1; i&lt;12; i++) print gcd(i,12)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/hoc<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/bc.html"><i>bc</i>(1)</a>, <a href="../man1/dc.html"><i>dc</i>(1)</a><br>
+ B. W. Kernighan and R. Pike, <i>The Unix Programming Environment,</i>
+ Prentice-Hall, 1984<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Error recovery is imperfect within function and procedure definitions.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/idiff.html b/man/man1/idiff.html
new file mode 100644
index 00000000..15296a37
--- /dev/null
+++ b/man/man1/idiff.html
@@ -0,0 +1,87 @@
+<head>
+<title>idiff(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>IDIFF(1)</b><td align=right><b>IDIFF(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ idiff &ndash; interactive diff<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>idiff</font></tt> [ <tt><font size=+1>&#8722;bw</font></tt> ] <i>file1 file2<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Idiff</i> interactively merges <i>file1</i> and <i>file2</i> onto standard output.
+ Wherever <i>file1</i> and <i>file2</i> differ, <i>idiff</i> displays the differences
+ in the style of &#8220;<tt><font size=+1>diff &#8722;n</font></tt>&#8221; on standard error and prompts the user
+ to select a chunk. Valid responses are:<br>
+ <tt><font size=+1>&lt;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use the chunk from <i>file1</i>.<br>
+ <tt><font size=+1>&gt;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use the chunk from <i>file2</i>.<br>
+ <tt><font size=+1>=</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use the diff output itself.<br>
+ <tt><font size=+1>q&lt;</font></tt>, <tt><font size=+1>q&gt;</font></tt>, <tt><font size=+1>q=<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Use the given response for all future questions.<br>
+
+ </table>
+ <tt><font size=+1>!</font></tt><i>cmd</i>Execute <i>cmd</i> and prompt again.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Idiff</i> invokes <a href="../man1/diff.html"><i>diff</i>(1)</a> to compare the files. The <tt><font size=+1>&#8722;b</font></tt> and <tt><font size=+1>&#8722;w</font></tt> flags,
+ if passed, are passed to <i>diff</i>.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/tmp/idiff.*<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/idiff.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/diff.html"><i>diff</i>(1)</a><br>
+ Kernighan and Pike, <i>The Unix Programming Environment</i>, Prentice-Hall,
+ 1984.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/index.html b/man/man1/index.html
new file mode 100644
index 00000000..c35ab541
--- /dev/null
+++ b/man/man1/index.html
@@ -0,0 +1,449 @@
+<html>
+<head>
+<title>Manual Section 1 - Plan 9 from User Space</title>
+</head>
+<body>
+<table width=100%>
+<tr><td width=20><td>
+<center>
+<table border=0 cellspacing=0 cellpadding=0 width=100%>
+<tr height=1><td width=200><td>
+<tr><td colspan=2>
+ <center>
+ <b>Manual Section 1 - Plan 9 from User Space</b>
+ </center>
+<tr height=10><td>
+<tr><td valign=top><a href="intro.html">intro(1)</a><td>intro &ndash; introduction to Plan 9 from User Space
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="9.html">9(1)</a><td>9 &ndash; run Plan 9 commands
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="9c.html">9c(1)</a><td>9c, 9a, 9l, 9ar &ndash; C compiler, assembler, linker, archiver
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="9p.html">9p(1)</a><td>9p &ndash; read and write files on a 9P server
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="9term.html">9term(1)</a><td>9term &ndash; terminal windows
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="acid.html">acid(1)</a><td>acid, acidtypes &ndash; debugger
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="acme.html">acme(1)</a><td>acme, win, awd &ndash; interactive text windows
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="acmeevent.html">acmeevent(1)</a><td>acmeevent, acme.rc &ndash; shell script support for acme clients
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="ascii.html">ascii(1)</a><td>ascii, unicode &ndash; interpret ASCII, Unicode characters
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="astro.html">astro(1)</a><td>astro &ndash; print astronomical information
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="basename.html">basename(1)</a><td>basename &ndash; strip file name affixes
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="bc.html">bc(1)</a><td>bc &ndash; arbitrary-precision arithmetic language
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="bundle.html">bundle(1)</a><td>bundle &ndash; collect files for distribution
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="cal.html">cal(1)</a><td>cal &ndash; print calendar
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="calendar.html">calendar(1)</a><td>calendar &ndash; print upcoming events
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="cat.html">cat(1)</a><td>cat, read, nobs &ndash; catenate files
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="cleanname.html">cleanname(1)</a><td>cleanname &ndash; clean a path name
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="clog.html">clog(1)</a><td>auxclog &ndash; create date-stamped console log
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="cmp.html">cmp(1)</a><td>cmp &ndash; compare two files
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="colors.html">colors(1)</a><td>colors, cmapcube &ndash; display color map
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="comm.html">comm(1)</a><td>comm &ndash; select or reject lines common to two sorted files
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="core.html">core(1)</a><td>core &ndash; print information about dead processes
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="crop.html">crop(1)</a><td>crop, iconv &ndash; frame, crop, and convert image
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="date.html">date(1)</a><td>date &ndash; date and time
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="db.html">db(1)</a><td>db &ndash; debugger
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="dc.html">dc(1)</a><td>dc &ndash; desk calculator
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="deroff.html">deroff(1)</a><td>deroff, delatex &ndash; remove formatting requests
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="dial.html">dial(1)</a><td>dial &ndash; connect to a remote service
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="dict.html">dict(1)</a><td>dict, adict &ndash; dictionary browser
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="diff.html">diff(1)</a><td>diff &ndash; differential file comparator
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="doctype.html">doctype(1)</a><td>doctype &ndash; intuit command line for formatting a document
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="echo.html">echo(1)</a><td>echo &ndash; print arguments
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="ed.html">ed(1)</a><td>ed &ndash; text editor
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="eqn.html">eqn(1)</a><td>eqn &ndash; typeset mathematics
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="factor.html">factor(1)</a><td>factor, primes &ndash; factor a number, generate large primes
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="fmt.html">fmt(1)</a><td>fmt, htmlfmt &ndash; simple text formatters
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="fortune.html">fortune(1)</a><td>fortune &ndash; sample lines from a file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="freq.html">freq(1)</a><td>freq &ndash; print histogram of character frequencies
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="fsize.html">fsize(1)</a><td>fsize, mtime &ndash; print file information
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="grap.html">grap(1)</a><td>grap &ndash; pic preprocessor for drawing graphs
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="graph.html">graph(1)</a><td>graph &ndash; draw a graph
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="grep.html">grep(1)</a><td>grep, g &ndash; search a file for a pattern
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="gview.html">gview(1)</a><td>gview &ndash; interactive graph viewer
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="gzip.html">gzip(1)</a><td>gzip, gunzip, bzip2, bunzip2, zip, unzip, &ndash; compress and expand data
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="hoc.html">hoc(1)</a><td>hoc &ndash; interactive floating point language
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="idiff.html">idiff(1)</a><td>idiff &ndash; interactive diff
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="join.html">join(1)</a><td>join &ndash; relational database operator
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="jpg.html">jpg(1)</a><td>jpg, gif, png, ppm, bmp, yuv, ico, togif, toppm, topng, toico &ndash; view and convert pictures
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="kill.html">kill(1)</a><td>kill, slay, start, stop &ndash; print commands to manipulate processes
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="label.html">label(1)</a><td>label, awd &ndash; set window label
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="lex.html">lex(1)</a><td>lex &ndash; generator of lexical analysis programs
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="look.html">look(1)</a><td>look &ndash; find lines in a sorted list
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="ls.html">ls(1)</a><td>ls, lc &ndash; list contents of directory
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="man.html">man(1)</a><td>man, lookman, sig &ndash; print or find pages of this manual
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="map.html">map(1)</a><td>map, mapdemo, mapd &ndash; draw maps on various projections
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mc.html">mc(1)</a><td>mc &ndash; multicolumn print
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mk.html">mk(1)</a><td>mk &ndash; maintain (make) related files
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mkdir.html">mkdir(1)</a><td>mkdir &ndash; make a directory
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="namespace.html">namespace(1)</a><td>namespace &ndash; print name space directory
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="news.html">news(1)</a><td>news &ndash; print news items
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="p.html">p(1)</a><td>p &ndash; paginate
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="page.html">page(1)</a><td>img, psv &ndash; view
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="pic.html">pic(1)</a><td>pic, tpic &ndash; troff and tex preprocessors for drawing pictures
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="plot.html">plot(1)</a><td>plot &ndash; graphics filter
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="plumb.html">plumb(1)</a><td>plumb &ndash; send message to plumber
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="pr.html">pr(1)</a><td>pr &ndash; print file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="proof.html">proof(1)</a><td>proof &ndash; troff output interpreter
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="ps.html">ps(1)</a><td>ps, psu &ndash; process status
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="psfonts.html">psfonts(1)</a><td>psfonts, psdownload &ndash; add necessary fonts to PostScript document for printing
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="pwd.html">pwd(1)</a><td>pwd, pbd &ndash; working directory
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="rc.html">rc(1)</a><td>rc, cd, eval, exec, exit, flag, rfork, shift, wait, whatis, ., ~ &ndash; command language
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="rio.html">rio(1)</a><td>rio &ndash; rio-like Window Manager for X
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="rm.html">rm(1)</a><td>rm &ndash; remove files
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="sam.html">sam(1)</a><td>sam, B, E, sam.save, samterm, samsave &ndash; screen editor with structural regular expressions
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="scat.html">scat(1)</a><td>scat &ndash; sky catalogue and Digitized Sky Survey
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="secstore.html">secstore(1)</a><td>aescbc, secstore, ipso &ndash; secstore commands
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="sed.html">sed(1)</a><td>sed &ndash; stream editor
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="seq.html">seq(1)</a><td>seq &ndash; print sequences of numbers
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="sleep.html">sleep(1)</a><td>sleep &ndash; suspend execution for an interval
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="sort.html">sort(1)</a><td>sort &ndash; sort and/or merge files
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="spell.html">spell(1)</a><td>spell, sprog &ndash; find spelling errors
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="split.html">split(1)</a><td>split &ndash; split a file into pieces
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="src.html">src(1)</a><td>src &ndash; find source code for executable
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="stats.html">stats(1)</a><td>stats, auxstats &ndash; display graphs of system activity
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="strings.html">strings(1)</a><td>strings &ndash; extract printable strings
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="sum.html">sum(1)</a><td>sum, md5sum, sha1sum &ndash; sum and count blocks in a file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="tail.html">tail(1)</a><td>tail &ndash; deliver the last part of a file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="tbl.html">tbl(1)</a><td>tbl &ndash; format tables for nroff or troff
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="tcs.html">tcs(1)</a><td>tcs &ndash; translate character sets
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="tee.html">tee(1)</a><td>tee &ndash; pipe fitting
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="test.html">test(1)</a><td>test &ndash; set status according to condition
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="time.html">time(1)</a><td>time &ndash; time a command
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="touch.html">touch(1)</a><td>touch &ndash; set modification date of a file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="tr.html">tr(1)</a><td>tr &ndash; translate characters
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="tr2post.html">tr2post(1)</a><td>tr2post &ndash; convert troff intermediate to PostScript
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="troff.html">troff(1)</a><td>troff, nroff &ndash; text formatting and typesetting
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="troff2html.html">troff2html(1)</a><td>troff2html &ndash; convert troff output into HTML
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="tweak.html">tweak(1)</a><td>tweak &ndash; edit image files, subfont files, face files, etc.
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="uniq.html">uniq(1)</a><td>uniq &ndash; report repeated lines in a file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="units.html">units(1)</a><td>units &ndash; conversion program
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="vac.html">vac(1)</a><td>vac &ndash; create a vac archive on Venti
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="wc.html">wc(1)</a><td>wc &ndash; word count
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="web.html">web(1)</a><td>web, wmail &ndash; handle web page, mail message for plumber
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="wintext.html">wintext(1)</a><td>wintext, ", "" &ndash; access text in current window
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="xd.html">xd(1)</a><td>xd &ndash; hex, octal, decimal, or ASCII dump
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="yacc.html">yacc(1)</a><td>yacc &ndash; yet another compiler-compiler
+</table>
+</center>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<td width=20>
+</table>
+</body>
+</html>
diff --git a/man/man1/intro.html b/man/man1/intro.html
new file mode 100644
index 00000000..fc628e5a
--- /dev/null
+++ b/man/man1/intro.html
@@ -0,0 +1,221 @@
+<head>
+<title>intro(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>INTRO(1)</b><td align=right><b>INTRO(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ intro &ndash; introduction to Plan 9 from User Space<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Plan 9 is a distributed computing environment built at Bell Labs
+ starting in the late 1980s. The system can be obtained from Bell
+ Labs at <tt><font size=+1>http://plan9.bell&#8722;labs.com/plan9</font></tt> and runs on PCs and a
+ variety of other platforms. Plan 9 became a convenient platform
+ for experimenting with new ideas,
+ applications, and services.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Plan 9 from User Space provides many of the ideas, applications,
+ and services from Plan 9 on Unix-like systems. It runs on FreeBSD
+ (x86), Linux (x86 and PowerPC), Mac OS X (PowerPC), OpenBSD (x86),
+ and SunOS (Sparc).<br>
+ <p><font size=+1><b>Commands </b></font><br>
+ Plan 9 from User Space expects its own directory tree, conventionally
+ <tt><font size=+1>/usr/local/plan9</font></tt>. When programs need to access files in the tree,
+ they expect the <tt><font size=+1>$PLAN9</font></tt> environment variable to contain the name
+ of the root of the tree. See <a href="../man1/install.html"><i>install</i>(1)</a> for details about installation.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Many of the familiar Unix commands, for example <a href="../man1/cat.html"><i>cat</i>(1)</a>, <a href="../man1/ls.html"><i>ls</i>(1)</a>,
+ and <a href="../man1/wc.html"><i>wc</i>(1)</a>, are present, but in their Plan 9 forms: <i>cat</i> takes no
+ arguments, <i>ls</i> does not columnate its output when printing to a
+ terminal, and <i>wc</i> counts UTF characters. In some cases, the differences
+ are quite noticeable: <a href="../man1/grep.html"><i>grep</i>(1)</a> and <a href="../man1/sed.html"><i>sed</i>(1)</a> expect Plan 9
+ regular expressions (see <a href="../man7/regexp.html"><i>regexp</i>(7)</a>), which are closest to what
+ Unix calls extended regular expressions. Because of these differences,
+ it is not recommended to put <tt><font size=+1>$PLAN9/bin</font></tt> before the usual system
+ <tt><font size=+1>bin</font></tt> directories in your search path. Instead, put it at the end
+ of your path and use the <a href="../man1/9.html"><i>9</i>(1)</a> script when you want to
+ invoke the Plan 9 version of a traditional Unix command.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Occasionally the Plan 9 programs have been changed to adapt to
+ Unix. <a href="../man1/Mk.html"><i>Mk</i>(1)</a> now allows mkfiles to choose their own shell, and
+ <a href="../man1/rc.html"><i>rc</i>(1)</a> has a <i>ulimit</i> builtin and manages <tt><font size=+1>$PATH</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Many of the graphical programs from Plan 9 are present, including
+ <a href="../man1/sam.html"><i>sam</i>(1)</a> and <a href="../man1/acme.html"><i>acme</i>(1)</a>. An X11 window manager <a href="../man1/rio.html"><i>rio</i>(1)</a> mimics Plan 9&#8217;s
+ window system, with command windows implemented by the external
+ program <a href="../man1/9term.html"><i>9term</i>(1)</a>. Following the style of X Windows, these programs
+ run in new windows rather than the one in
+ which they are invoked. They all take a <tt><font size=+1>&#8722;W</font></tt> option to specify the
+ size and placement of the new window. The argument is one of <i>width</i><tt><font size=+1>x</font></tt><i>height</i>,
+ <i>width</i><tt><font size=+1>x</font></tt><i>height</i><tt><font size=+1>@</font></tt><i>xmin</i><tt><font size=+1>,</font></tt><i>xmax</i>, or <i>xmin</i><tt><font size=+1>,</font></tt><i>ymin</i><tt><font size=+1>,</font></tt><i>xmax</i><tt><font size=+1>,</font></tt><i>ymax</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <a href="../man4/plumber.html"><i>plumber</i>(4)</a> helps to connect the various Plan 9 programs together,
+ and fittings like <a href="../man1/web.html"><i>web</i>(1)</a> connect it to external programs such
+ as web browsers; one can click on a URL in <i>acme</i> and see the page
+ load in <i>Firefox</i>.<br>
+ <p><font size=+1><b>User-level file servers </b></font><br>
+ In Plan 9, user-level file servers present file trees via the
+ Plan 9 file protocol, 9P. Processes can mount arbitrary file servers
+ and customize their own name spaces. These facilities are used
+ to connect programs. Clients interact with file servers by reading
+ and writing files.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ This cannot be done directly on Unix. Instead the servers listen
+ for 9P connections on Unix domain sockets; clients connect to
+ these sockets and speak 9P directly using the <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a> library.
+ <a href="../man4/Intro.html"><i>Intro</i>(4)</a> tells more of the story. The effect is not as clean as
+ on Plan 9, but it gets the job done and still provides a uniform
+ and
+ easy-to-understand mechanism. The <a href="../man1/9p.html"><i>9p</i>(1)</a> client can be used in
+ shell scripts or by hand to carry out simple interactions with
+ servers.<br>
+ <p><font size=+1><b>External databases </b></font><br>
+ Some programs rely on large databases that would be cumbersome
+ to include in every release. Scripts are provided that download
+ these databases separately. These databases can be downloaded
+ separately. See <tt><font size=+1>$PLAN9/dict/README</font></tt> and <tt><font size=+1>$PLAN9/sky/README</font></tt>.<br>
+ <p><font size=+1><b>Programming </b></font><br>
+ The shell scripts <i>9c</i> and <i>9l</i> (see <a href="../man1/9c.html"><i>9c</i>(1)</a>) provide a simple interface
+ to the underlying system compiler and linker, similar to the <i>2c</i>
+ and <i>2l</i> families on Plan 9. <i>9c</i> compiles source files, and <i>9l</i> links
+ object files into executables. When using Plan 9 libraries, <i>9l</i>
+ infers the correct set of libraries from the object files, so
+ that no <tt><font size=+1>&#8722;l
+ </font></tt>options are needed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The only way to write multithreaded programs is to use the <a href="../man3/thread.html"><i>thread</i>(3)</a>
+ library. <a href="../man3/Rfork.html"><i>Rfork</i>(3)</a> exists but is not as capable as on Plan 9. There
+ are many unfortunate by necessary preprocessor diversions to make
+ Plan 9 and Unix libraries coexist. See <a href="../man3/intro.html"><i>intro</i>(3)</a> for details.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The debuggers <a href="../man1/acid.html"><i>acid</i>(1)</a> and <a href="../man1/db.html"><i>db</i>(1)</a> and the debugging library <a href="../man3/mach.html"><i>mach</i>(3)</a>
+ are works in progress. They are platform-independent, so that
+ x86 Linux core dumps can be inspected on PowerPC Mac OS X machines,
+ but they are also fairly incomplete. The x86 target is the most
+ mature; initial PowerPC support exists; and other
+ targets are unimplemented. The debuggers can only inspect, not
+ manipulate, target processes. Support for operating system threads
+ and for 64-bit architectures needs to be rethought. On x86 Linux
+ systems, <i>acid</i> and <i>db</i> can be relied upon to produce reasonable
+ stack traces (often in cases when GNU <i>gdb</i> cannot) and
+ dump data structures, but that it is the extent to which they
+ have been developed and exercised.<br>
+ <p><font size=+1><b>Porting programs </b></font><br>
+ The vast majority of the familiar Plan 9 programs have been ported,
+ including the Unicode-aware <a href="../man1/troff.html"><i>troff</i>(1)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Of the more recent additions to Plan 9, the <a href="../man1/secstore.html"><i>secstore</i>(1)</a> client
+ has been ported, though <i>secstored</i> has not. <a href="../man1/Vac.html"><i>Vac</i>(1)</a> has been ported,
+ though <i>vacfs</i> has not. <i>Factotum</i> and <i>venti</i> are in progress.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A backup system providing a dump file system built atop Venti
+ is also in progress.<br>
+ <p><font size=+1><b>Porting to new systems </b></font><br>
+ Porting the tree to new operating systems or architectures should
+ be straightforward, as system-specific code has been kept to a
+ minimum. The largest pieces of system-specific code are <tt><font size=+1>&lt;u.h&gt;</font></tt>, which
+ must include the right system files and set up the right integer
+ type definitions, and <i>libthread</i>, which must implement
+ spin locks, operating system thread creation, and context switching
+ routines. Portable implementations of these using <tt><font size=+1>&lt;pthread.h&gt;</font></tt> and
+ <tt><font size=+1>&lt;ucontext.h&gt;</font></tt> already exist. If your system supports them, you may
+ not need to write any system specific code at all.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There are other smaller system dependencies, such as the terminal
+ handling code in <a href="../man1/9term.html"><i>9term</i>(1)</a> and the implementation of <a href="../man3/getcallerpc.html"><i>getcallerpc</i>(3)</a>,
+ but these are usually simple and are not on the critical path
+ for getting the system up and running.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The rest of this manual describes Plan 9 from User Space. Many
+ of the man pages have been brought from Plan 9, but they have
+ been updated, and others have been written from scratch.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The manual pages are in a Unix style tree, with names like <tt><font size=+1>$PLAN9/man/man1/cat.1</font></tt>
+ instead of Plan 9&#8217;s simpler <tt><font size=+1>$PLAN9/man/1/cat</font></tt>, so that the Unix
+ <a href="../man1/man.html"><i>man</i>(1)</a> utility can handle it. Some systems, for example Debian
+ Linux, deduce the man page locations from the search path, so
+ that adding <tt><font size=+1>$PLAN9/bin</font></tt> to
+ your path is sufficient to cause <tt><font size=+1>$PLAN9/man</font></tt> to be consulted for
+ manual pages using the system <i>man</i>. On other systems, or to look
+ at manual pages with the same name as a system page, invoke the
+ Plan 9 <i>man</i> directly, as in <tt><font size=+1>9 man cat</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The manual sections follow the Unix numbering conventions, not
+ the Plan 9 ones.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man1">Section (1)</a> describes general publicly accessible commands.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man3">Section (3)</a> describes C library functions.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man4">Section (4)</a> describes user-level file servers.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man7">Section (7)</a> describes file formats and protocols. (On Unix, section
+ (5) is technically for file formats but seems now to be used for
+ describing specific files.)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man9">Section (9p)</a> describes the Plan 9 file protocol 9P.<br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ In Plan 9, a program&#8217;s exit status is an arbitrary text string,
+ while on Unix it is an integer. Section (1) of this manual describes
+ commands as though they exit with string statuses. In fact, exiting
+ with an empty status corresponds to exiting with status 0, and
+ exiting with any non-empty string corresponds to exiting with
+ status 1. See <a href="../man3/exits.html"><i>exits</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/join.html b/man/man1/join.html
new file mode 100644
index 00000000..704837e4
--- /dev/null
+++ b/man/man1/join.html
@@ -0,0 +1,144 @@
+<head>
+<title>join(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>JOIN(1)</b><td align=right><b>JOIN(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ join &ndash; relational database operator<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>join</font></tt> [ <i>options</i> ] <i>file1 file2<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Join</i> forms, on the standard output, a join of the two relations
+ specified by the lines of <i>file1</i> and <i>file2</i>. If one of the file
+ names is <tt><font size=+1>&#8722;</font></tt>, the standard input is used.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>File1</i> and <i>file2</i> must be sorted in increasing ASCII collating sequence
+ on the fields on which they are to be joined, normally the first
+ in each line.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There is one line in the output for each pair of lines in <i>file1</i>
+ and <i>file2</i> that have identical join fields. The output line normally
+ consists of the common field, then the rest of the line from <i>file1</i>,
+ then the rest of the line from <i>file2</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Input fields are normally separated spaces or tabs; output fields
+ by space. In this case, multiple separators count as one, and
+ leading separators are discarded.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The following options are recognized, with POSIX syntax.<br>
+ <tt><font size=+1>&#8722;a</font></tt> <i>n</i>&nbsp;&nbsp;&nbsp;In addition to the normal output, produce a line for each
+ unpairable line in file <i>n</i>, where <i>n</i> is 1 or 2.<br>
+ <tt><font size=+1>&#8722;v</font></tt> <i>n</i>&nbsp;&nbsp;&nbsp;Like <tt><font size=+1>&#8722;a</font></tt>, omitting output for paired lines.<br>
+ <tt><font size=+1>&#8722;e</font></tt> <i>s</i>&nbsp;&nbsp;&nbsp;Replace empty output fields by string <i>s</i>.<br>
+ <tt><font size=+1>&#8722;1</font></tt> <i>m<br>
+ </i><tt><font size=+1>&#8722;2</font></tt> <i>m</i>&nbsp;&nbsp;&nbsp;Join on the <i>m</i>th field of <i>file1</i> or <i>file2</i>.<br>
+ <tt><font size=+1>&#8722;j</font></tt><i>n m<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Archaic equivalent for <tt><font size=+1>&#8722;</font></tt><i>n</i> <tt><font size=+1>m</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;o</font></tt><i>fields<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Each output line comprises the designated fields. The comma-separated
+ field designators are either <tt><font size=+1>0</font></tt>, meaning the join field, or have
+ the form <i>n</i>.<i>m</i>, where <i>n</i> is a file number and <i>m</i> is a field number.
+ Archaic usage allows separate arguments for field designators.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <tt><font size=+1>&#8722;t</font></tt><i>c</i>&nbsp;&nbsp;&nbsp;Use character <i>c</i> as the only separator (tab character) on input
+ and output. Every appearance of <i>c</i> in a line is significant.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>sort /etc/passwd | join &#8722;t: &#8722;1 1 &#8722;a 1 &#8722;e &quot;&quot; &#8722; bdays<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Add birthdays to the <tt><font size=+1>/etc/passwd</font></tt> file, leaving unknown birthdays
+ empty. The layout of <tt><font size=+1>/adm/users</font></tt> is given in <a href="../man5/passwd.html"><i>passwd</i>(5)</a>; <tt><font size=+1>bdays</font></tt> contains
+ sorted lines like <tt><font size=+1>ken:Feb 4, 1953</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>tr : ' ' &lt;/etc/passwd | sort &#8722;k 3 3 &gt;temp<br>
+ join &#8722;1 3 &#8722;2 3 &#8722;o 1.1,2.1 temp temp | awk '$1 &lt; $2'<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print all pairs of users with identical userids.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/join.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/sort.html"><i>sort</i>(1)</a>, <a href="../man1/comm.html"><i>comm</i>(1)</a>, <a href="../man1/awk.html"><i>awk</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ With default field separation, the collating sequence is that
+ of <tt><font size=+1>sort &#8722;b &#8722;k</font></tt><i>y</i><tt><font size=+1>,</font></tt><i>y</i>; with <tt><font size=+1>&#8722;t</font></tt>, the sequence is that of <tt><font size=+1>sort &#8722;t</font></tt><i>x</i> <tt><font size=+1>&#8722;k</font></tt><i>y</i><tt><font size=+1>,</font></tt><i>y</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ One of the files must be randomly accessible.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/jpg.html b/man/man1/jpg.html
new file mode 100644
index 00000000..30629c7c
--- /dev/null
+++ b/man/man1/jpg.html
@@ -0,0 +1,175 @@
+<head>
+<title>jpg(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>JPG(1)</b><td align=right><b>JPG(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ jpg, gif, png, ppm, bmp, yuv, ico, togif, toppm, topng, toico
+ &ndash; view and convert pictures<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>jpg</font></tt> [ <tt><font size=+1>&#8722;39cdefFkJrtv</font></tt> ] [ <i>file ...</i> ]<br>
+ <tt><font size=+1>gif</font></tt> [ <tt><font size=+1>&#8722;39cdektv</font></tt> ] [ <i>file ...</i> ]<br>
+ <tt><font size=+1>png</font></tt> [ <tt><font size=+1>&#8722;39cdektv</font></tt> ] [ <i>file ...</i> ]<br>
+ <tt><font size=+1>ppm</font></tt> [ <tt><font size=+1>&#8722;39cdektv</font></tt> ] [ <i>file ...</i> ]<br>
+ <tt><font size=+1>bmp</font></tt> [ <i>file</i> ]<br>
+ <tt><font size=+1>yuv</font></tt> [ <i>file</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>togif</font></tt> [ <tt><font size=+1>&#8722;c</font></tt> <i>comment</i> ] [ <tt><font size=+1>&#8722;l</font></tt> <i>loopcount</i> ] [ <tt><font size=+1>&#8722;d</font></tt> <i>msec</i> ] [ <tt><font size=+1>&#8722;t</font></tt> <i>transindex</i>
+ ] [ <i>file ...</i> [ <tt><font size=+1>&#8722;d</font></tt> <i>msec</i> ] <i>file ...</i> ]<br>
+ <tt><font size=+1>toppm</font></tt> [ <tt><font size=+1>&#8722;c</font></tt> <i>comment</i> ] [ <i>file</i> ]<br>
+ <tt><font size=+1>topng</font></tt> [ <tt><font size=+1>&#8722;c</font></tt> <i>comment</i> ] [ [ <tt><font size=+1>&#8722;g</font></tt> <i>gamma</i> ] [ <i>file</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>ico</font></tt> [ <i>file</i> ]<br>
+ <tt><font size=+1>toico</font></tt> [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These programs read, display, and write image files in public
+ formats. <i>Jpg</i>, <i>gif</i>, <i>png</i>, <i>ppm</i>, <i>bmp</i>, and <i>yuv</i>. read files in the corresponding
+ formats and, by default, display them in the current window; options
+ cause them instead to convert the images to Plan 9 image format
+ and write them to standard output. <i>Togif</i>,
+ <i>Toppm</i>, and <i>topng</i> read Plan 9 images files, convert them to GIF,
+ PPM, or PNG, and write them to standard output.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The default behavior of <i>jpg</i>, <i>gif</i>, and <i>ppm</i> is to display the <i>file</i>,
+ or standard input if no file is named. Once a file is displayed,
+ typing a character causes the program to display the next image.
+ Typing a <tt><font size=+1>q</font></tt>, DEL, or control-D exits the program. For a more user-friendly
+ interface, use <a href="../man1/page.html"><i>page</i>(1)</a>, which invokes these
+ programs to convert the images to standard format, displays them,
+ and offers scrolling, panning, and menu-driven navigation among
+ the files.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ These programs share many options:<br>
+ <tt><font size=+1>&#8722;e</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Disable Floyd-Steinberg error diffusion, which is used to improve
+ the appearance of images on color-mapped displays, typically with
+ 8 bits per pixel. Primarily useful for debugging; if the display
+ has true RGB color, the image will be displayed in full glory.<br>
+ <tt><font size=+1>&#8722;k</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Convert and display the image as a black and white (really grey-scale)
+ image.<br>
+ <tt><font size=+1>&#8722;v</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Convert the image to an RGBV color-mapped image, even if the
+ display has true RGB color.<br>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Suppress display of the image; this is set automatically by
+ any of the following options:<br>
+ <tt><font size=+1>&#8722;c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Convert the image to a Plan 9 representation, as defined by
+ <a href="../man7/image.html"><i>image</i>(7)</a>, and write it to standard output.<br>
+ <tt><font size=+1>&#8722;9</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Like <tt><font size=+1>&#8722;c</font></tt>, but produce an uncompressed image. This saves processing
+ time, particularly when the output is being piped to another program
+ such as <a href="../man1/page.html"><i>page</i>(1)</a>, since it avoids compression and decompression.<br>
+ <tt><font size=+1>&#8722;t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Convert the image, if it is in color, to a true color RGB image.<br>
+ <tt><font size=+1>&#8722;3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Like <tt><font size=+1>&#8722;t</font></tt>, but force the image to RGB even if it is originally
+ grey-scale.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Jpg</i> has two extra options used to process the output of the LML
+ video card:<br>
+ <tt><font size=+1>&#8722;f</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Merge two adjacent images, which represent the two fields of
+ a video picture, into a single image.<br>
+ <tt><font size=+1>&#8722;F</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;The input is a motion JPEG file, with multiple images representing
+ frames of the movie. Sets <tt><font size=+1>&#8722;f</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>togif</i> and <i>toppm</i> programs go the other way: they convert from
+ Plan 9 images to GIF and PPM, and have no display capability.
+ Both accept an option <tt><font size=+1>&#8722;c</font></tt> to set the comment field of the resulting
+ file. If there is only one input picture, <i>togif</i> converts the image
+ to GIF format. If there are many <i>files</i>, though, it will
+ assemble them into an animated GIF file. The options control this
+ process:<br>
+ <tt><font size=+1>&#8722;l</font></tt><i>loopcount<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ By default, the animation will loop forever; <i>loopcount</i> specifies
+ how many times to loop. A value of zero means loop forever and
+ a negative value means to stop after playing the sequence once.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;d</font></tt><i>msec<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ By default, the images are displayed as fast as they can be rendered.
+ This option specifies the time, in milliseconds, to pause while
+ displaying the next named <i>file</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <i>Gif</i> translates files that contain a &#8216;transparency&#8217; index by attaching
+ an alpha channel to the converted image.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ico</i> displays a Windows icon (.ico) file. If no file is specified,
+ <i>ico</i> reads from standard input. Icon files contain sets of icons
+ represeted by an image and a mask. Clicking the right button pops
+ up a menu that lets you write any icon&#8217;s image as a Plan 9 image
+ (<i>width</i>x<i>height</i>.image), write any icon&#8217;s mask as a Plan 9
+ image (<i>width</i>x<i>height</i>.mask), or exit. Selecting one of the write
+ menu items yields a sight cursor. Move the sight over the icon
+ and right click again to write.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Toico</i> takes a list of Plan 9 image files (or standard input) and
+ creates a single icon file. The masks in the icon file will be
+ the white space in the image. The icon file is written to standard
+ output.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/jpg<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/page.html"><i>page</i>(1)</a>, <a href="../man7/image.html"><i>image</i>(7)</a>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Writing an animated GIF using <i>togif</i> is a clumsy undertaking.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/kill.html b/man/man1/kill.html
new file mode 100644
index 00000000..107e438d
--- /dev/null
+++ b/man/man1/kill.html
@@ -0,0 +1,96 @@
+<head>
+<title>kill(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>KILL(1)</b><td align=right><b>KILL(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ kill, slay, start, stop &ndash; print commands to manipulate processes<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>kill</font></tt> <i>name ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>slay</font></tt> <i>name ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>start</font></tt> <i>name ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>stop</font></tt> <i>name ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Kill</i> prints commands that will cause all processes with <i>name</i> and
+ owned by the current user to be terminated. Each command is commented
+ with an output line from <a href="../man1/ps.html"><i>ps</i>(1)</a> describing the process that would
+ be killed. Use the <tt><font size=+1>send</font></tt> command of <a href="../man1/9term.html"><i>9term</i>(1)</a>, or pipe the output
+ of <i>kill</i> into <a href="../man1/rc.html"><i>rc</i>(1)</a> or <a href="../man1/sh.html"><i>sh</i>(1)</a> to execute the
+ commands.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Kill</i> suggests sending a Unix <tt><font size=+1>TERM</font></tt> signal to the process; sending
+ a <tt><font size=+1>KILL</font></tt> signal is a surer, if heavy handed, kill, but is necessary
+ if the offending process is ignoring signals. The <i>slay</i> command
+ prints commands to do this.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Stop</i> prints commands to pause execution of processes by sending
+ them the <tt><font size=+1>STOP</font></tt> signal.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Start</i> prints commands to restart stopped processes by sending
+ them the <tt><font size=+1>CONT</font></tt> signal.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/ps.html"><i>ps</i>(1)</a>, <a href="../man3/notify.html"><i>notify</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Stop</i> and <i>start</i> should limit themselves to currently running or
+ stopped processes.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/label.html b/man/man1/label.html
new file mode 100644
index 00000000..8c7999d4
--- /dev/null
+++ b/man/man1/label.html
@@ -0,0 +1,117 @@
+<head>
+<title>label(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>LABEL(1)</b><td align=right><b>LABEL(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ label, awd &ndash; set window label<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>label</font></tt> <i>string<br>
+ </i><tt><font size=+1>awd<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Label</i> sets the label of the current <i>win</i> (see <a href="../man1/acme.html"><i>acme</i>(1)</a>) or X terminal
+ window (<i>e.g., <a href="../man1/9term.html">9term</a></i><a href="../man1/9term.html">(1)</a> or <a href="../man1/xterm.html"><i>xterm</i>(1)</a>) by echoing a special control
+ sequence to standard output.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Acme</i> and <i>9term</i> windows assume the label is a directory name. When
+ unrooted file names are plumbed in the window, they are evaluated
+ relative to the directory named in the label.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ One can use the following <a href="../man1/sh.html"><i>sh</i>(1)</a> function to keep the label up-to-date
+ in response to <i>cd</i> commands:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>_cd () {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ \cd &quot;$@&quot; &amp;&amp;<br>
+ case $&#8722; in<br>
+ *i*)<br>
+ awd<br>
+ esac<br>
+
+ </table>
+ }<br>
+ alias cd=_cd<br>
+ cd .<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <a href="../man1/Rc.html"><i>Rc</i>(1)</a> installs a similar <tt><font size=+1>fn cd</font></tt> at startup if there is not already
+ a function named <tt><font size=+1>cd</font></tt>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>fn cd {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ builtin cd $1 &amp;&amp; flag i &amp;&amp; awd<br>
+
+ </table>
+ }<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin/label<br>
+ /usr/local/plan9/bin/awd<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Awd</i> is also documented in <a href="../man1/acme.html"><i>acme</i>(1)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Awd</i> does not append the <tt><font size=+1>&#8722;</font></tt><i>label</i> suffix that it does on Plan 9.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/lex.html b/man/man1/lex.html
new file mode 100644
index 00000000..e0f84d1e
--- /dev/null
+++ b/man/man1/lex.html
@@ -0,0 +1,110 @@
+<head>
+<title>lex(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>LEX(1)</b><td align=right><b>LEX(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ lex &ndash; generator of lexical analysis programs<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>lex</font></tt> [ <tt><font size=+1>&#8722;tvn9</font></tt> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Lex</i> generates programs to be used in simple lexical analysis of
+ text. The input <i>files</i> (standard input default) contain regular
+ expressions to be searched for and actions written in C to be
+ executed when expressions are found.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A C source program, <tt><font size=+1>lex.yy.c</font></tt> is generated. This program, when
+ run, copies unrecognized portions of the input to the output,
+ and executes the associated C action for each regular expression
+ that is recognized.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The options have the following meanings.<br>
+ <tt><font size=+1>&#8722;t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Place the result on the standard output instead of in file <tt><font size=+1>lex.yy.c</font></tt>.<br>
+ <tt><font size=+1>&#8722;v</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print a one-line summary of statistics of the generated analyzer.<br>
+ <tt><font size=+1>&#8722;n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Opposite of <tt><font size=+1>&#8722;v</font></tt>; <tt><font size=+1>&#8722;n</font></tt> is default.<br>
+ <tt><font size=+1>&#8722;9</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Adds code to be able to compile through the native C compilers.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This program converts upper case to lower, removes blanks at the
+ end of lines, and replaces multiple blanks by single blanks.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>%%<br>
+ [A&#8722;Z] &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;putchar(yytext[0]+'a'&#8722;'A');<br>
+ [ ]+$<br>
+ [ ]+ putchar(' ');<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>lex.yy.c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output<br>
+ <tt><font size=+1>/sys/lib/lex/ncform</font></tt>&nbsp;&nbsp;&nbsp;template<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/yacc.html"><i>yacc</i>(1)</a>, <a href="../man1/sed.html"><i>sed</i>(1)</a><br>
+ M. E. Lesk and E. Schmidt, &#8216;LEX--Lexical Analyzer Generator&#8217;, <i>Unix
+ Research System Programmer&#8217;s Manual,</i> Tenth Edition, Volume 2.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/lex<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Cannot handle UTF.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The asteroid to kill this dinosaur is still in orbit.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/look.html b/man/man1/look.html
new file mode 100644
index 00000000..cc8686d0
--- /dev/null
+++ b/man/man1/look.html
@@ -0,0 +1,96 @@
+<head>
+<title>look(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>LOOK(1)</b><td align=right><b>LOOK(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ look &ndash; find lines in a sorted list<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>look</font></tt> [ <tt><font size=+1>&#8722;dfnixt</font></tt><i>c</i> ] [ <i>string</i> ] [ <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Look</i> consults a sorted <i>file</i> and prints all lines that begin with
+ <i>string</i>. It uses binary search.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The following options are recognized. Options <tt><font size=+1>dfnt</font></tt> affect comparisons
+ as in <a href="../man1/sort.html"><i>sort</i>(1)</a>.<br>
+ <tt><font size=+1>&#8722;i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Interactive. There is no <i>string</i> argument; instead <i>look</i> takes
+ lines from the standard input as strings to be looked up.<br>
+ <tt><font size=+1>&#8722;x</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Exact. Print only lines of the file whose key matches <i>string</i>
+ exactly.<br>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&#8216;Directory&#8217; order: only letters, digits, tabs and blanks participate
+ in comparisons.<br>
+ <tt><font size=+1>&#8722;f</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Fold. Upper case letters compare equal to lower case.<br>
+ <tt><font size=+1>&#8722;n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Numeric comparison with initial string of digits, optional minus
+ sign, and optional decimal point.<br>
+ <tt><font size=+1>&#8722;t</font></tt>[<i>c</i>]Character <i>c</i> terminates the sort key in the <i>file</i>. By default,
+ tab terminates the key. If <i>c</i> is missing the entire line comprises
+ the key.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If no <i>file</i> is specified, <tt><font size=+1>/lib/words</font></tt> is assumed, with collating
+ sequence <tt><font size=+1>df</font></tt>.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/lib/words<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/look.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/sort.html"><i>sort</i>(1)</a>, <a href="../man1/grep.html"><i>grep</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The exit status is &#8220;<tt><font size=+1>not found</font></tt>&#8221; if no match is found, and &#8220;<tt><font size=+1>no dictionary</font></tt>&#8221;
+ if <i>file</i> or the default dictionary cannot be opened.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/ls.html b/man/man1/ls.html
new file mode 100644
index 00000000..e5ed5566
--- /dev/null
+++ b/man/man1/ls.html
@@ -0,0 +1,121 @@
+<head>
+<title>ls(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>LS(1)</b><td align=right><b>LS(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ls, lc &ndash; list contents of directory<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>ls</font></tt> [ <tt><font size=+1>&#8722;dlmnpqrstuFQ</font></tt> ] <i>name ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>lc</font></tt> [ <tt><font size=+1>&#8722;dlmnpqrstuFQ</font></tt> ] <i>name ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ For each directory argument, <i>ls</i> lists the contents of the directory;
+ for each file argument, <i>ls</i> repeats its name and any other information
+ requested. When no argument is given, the current directory is
+ listed. By default, the output is sorted alphabetically by name.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Lc</i> is the same as <i>ls</i>, but sets the <tt><font size=+1>&#8722;p</font></tt> option and pipes the output
+ through <a href="../man1/mc.html"><i>mc</i>(1)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There are a number of options:<br>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;If argument is a directory, list it, not its contents.<br>
+ <tt><font size=+1>&#8722;l</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;List in long format, giving mode (see below), file system type
+ (e.g., for devices, the <tt><font size=+1>#</font></tt> code letter that names it; see <a href="../man3/intro.html"><i>intro</i>(3)</a>),
+ the instance or subdevice number, owner, group, size in bytes,
+ and time of last modification for each file.<br>
+ <tt><font size=+1>&#8722;m</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;List the name of the user who most recently modified the file.<br>
+ <tt><font size=+1>&#8722;n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Don&#8217;t sort the listing.<br>
+ <tt><font size=+1>&#8722;p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print only the final path element of each file name.<br>
+ <tt><font size=+1>&#8722;q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;List the <i>qid</i> (see <a href="../man3/stat.html"><i>stat</i>(3)</a>) of each file; the printed fields
+ are in the order path, version, and type.<br>
+ <tt><font size=+1>&#8722;r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Reverse the order of sort.<br>
+ <tt><font size=+1>&#8722;s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Give size in Kbytes for each entry.<br>
+ <tt><font size=+1>&#8722;t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Sort by time modified (latest first) instead of by name.<br>
+ <tt><font size=+1>&#8722;u</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Under <tt><font size=+1>&#8722;t</font></tt> sort by time of last access; under <tt><font size=+1>&#8722;l</font></tt> print time of
+ last access.<br>
+ <tt><font size=+1>&#8722;F</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Add the character <tt><font size=+1>/</font></tt> after all directory names and the character
+ <tt><font size=+1>*</font></tt> after all executable files.<br>
+ <tt><font size=+1>&#8722;L</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print the character <tt><font size=+1>t</font></tt> before each file if it has the temporary
+ flag set, and <tt><font size=+1>&#8722;</font></tt> otherwise.<br>
+ <tt><font size=+1>&#8722;Q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;By default, printed file names are quoted if they contain characters
+ special to <a href="../man1/rc.html"><i>rc</i>(1)</a>. The <tt><font size=+1>&#8722;Q</font></tt> flag disables this behavior.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The mode printed under the <tt><font size=+1>&#8722;l</font></tt> option contains 11 characters, interpreted
+ as follows: the first character is<br>
+ <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if the entry is a directory;<br>
+ <tt><font size=+1>a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if the entry is an append-only file;<br>
+ <tt><font size=+1>&#8722;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if the entry is a plain file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The next letter is <tt><font size=+1>l</font></tt> if the file is exclusive access (one writer
+ or reader at a time).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The last 9 characters are interpreted as three sets of three bits
+ each. The first set refers to owner permissions; the next to permissions
+ to others in the same user-group; and the last to all others.
+ Within each set the three characters indicate permission respectively
+ to read, to write, or to execute the file as a program.
+ For a directory, &#8216;execute&#8217; permission is interpreted to mean permission
+ to search the directory for a specified file. The permissions
+ are indicated as follows:<br>
+ <tt><font size=+1>r</font></tt>if the file is readable;<br>
+ <tt><font size=+1>w</font></tt>if the file is writable;<br>
+ <tt><font size=+1>x</font></tt>if the file is executable;<br>
+ <tt><font size=+1>&#8722;</font></tt>if none of the above permissions is granted.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/ls.c<br>
+ /usr/local/plan9/bin/lc<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/stat.html"><i>stat</i>(3)</a>, <a href="../man1/mc.html"><i>mc</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/man.html b/man/man1/man.html
new file mode 100644
index 00000000..41f472ab
--- /dev/null
+++ b/man/man1/man.html
@@ -0,0 +1,139 @@
+<head>
+<title>man(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MAN(1)</b><td align=right><b>MAN(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ man, lookman, sig &ndash; print or find pages of this manual<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>man</font></tt> [ <i>option ...</i> ] [ <i>section ...</i> ] <i>title ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>lookman</font></tt> <i>key ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>sig</font></tt> <i>function ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Man</i> locates and prints pages of this manual named <i>title</i> in the
+ specified <i>sections</i>. <i>Title</i> is given in lower case. Each <i>section</i>
+ is a number; pages marked (2S), for example, belong to chapter
+ 2. If no <i>section</i> is specified, pages in all sections are printed.
+ Any name from the NAME section at the top of the page will serve
+ as a
+ <i>title</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The options are:<br>
+ <tt><font size=+1>&#8722;p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Run <a href="../man1/proof.html"><i>proof</i>(1)</a> on the specified man pages.<br>
+ <tt><font size=+1>&#8722;P</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Run <a href="../man1/page.html"><i>page</i>(1)</a> on the specified man pages.<br>
+ <tt><font size=+1>&#8722;t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Run <i>troff</i> and send its output to standard output.<br>
+ <tt><font size=+1>&#8722;n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;(Default) Print the pages on the standard output using <i>nroff</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Lookman</font></tt> prints the names of all manual sections that contain all
+ of the <i>key</i> words given on the command line.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Sig</font></tt> prints the signature (i.e. C definition) of the <i>function</i>&#8217;s
+ given on the command line.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/man?/*<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>troff</i> source for manual; this page is <tt><font size=+1>/usr/local/plan9/man/man1/man.1<br>
+ </font></tt>
+ </table>
+ <tt><font size=+1>/usr/local/plan9/man/man?/INDEX<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ indices searched to find pages corresponding to titles<br>
+
+ </table>
+ <tt><font size=+1>/usr/local/plan9/man/secindex<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ command to make an index for a given section<br>
+
+ </table>
+ <tt><font size=+1>/usr/local/plan9/man/lookman/index<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ index for <i>lookman<br>
+ </i>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin/man<br>
+ /usr/local/plan9/bin/lookman<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/page.html"><i>page</i>(1)</a>, <a href="../man1/proof.html"><i>proof</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The manual was intended to be typeset; some detail is sacrificed
+ on text terminals.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There is no automatic mechanism to keep the indices up to date.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Except for special cases, <i>man</i> doesn&#8217;t recognize things that should
+ be run through <i>tbl</i> and/or <i>eqn</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/map.html b/man/man1/map.html
new file mode 100644
index 00000000..6ed18ccb
--- /dev/null
+++ b/man/man1/map.html
@@ -0,0 +1,483 @@
+<head>
+<title>map(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MAP(1)</b><td align=right><b>MAP(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ map, mapdemo, mapd &ndash; draw maps on various projections<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>map</font></tt> <i>projection</i> [ <i>option ...</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>mapdemo
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Map</i> prepares on the standard output a map suitable for display
+ by any plotting filter described in <a href="../man1/plot.html"><i>plot</i>(1)</a>. A menu of projections
+ is produced in response to an unknown <i>projection</i>. <i>Mapdemo</i> is a
+ short course in mapping.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The default data for <i>map</i> are world shorelines. Option <tt><font size=+1>&#8722;f</font></tt> accesses
+ more detailed data classified by feature.<br>
+ <tt><font size=+1>&#8722;f</font></tt> [ <i>feature</i> ... ]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Features are ranked 1 (default) to 4 from major to minor. Higher-numbered
+ ranks include all lower-numbered ones. Features are<br>
+ <tt><font size=+1>shore</font></tt>[<tt><font size=+1>1</font></tt>-<tt><font size=+1>4</font></tt>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;seacoasts, lakes, and islands; option <tt><font size=+1>&#8722;f</font></tt> always shows
+ <tt><font size=+1>shore1<br>
+ ilake</font></tt>[<tt><font size=+1>1</font></tt>-<tt><font size=+1>2</font></tt>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intermittent lakes<br>
+ <tt><font size=+1>river</font></tt>[<tt><font size=+1>1</font></tt>-<tt><font size=+1>4</font></tt>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rivers<br>
+ <tt><font size=+1>iriver</font></tt>[<tt><font size=+1>1</font></tt>-<tt><font size=+1>3</font></tt>]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intermittent rivers<br>
+ <tt><font size=+1>canal</font></tt>[<tt><font size=+1>1</font></tt>-<tt><font size=+1>3</font></tt>]<tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3</font></tt>=irrigation canals<br>
+ <tt><font size=+1>glacier<br>
+ iceshelf</font></tt>[<tt><font size=+1>12</font></tt>]<br>
+ <tt><font size=+1>reef<br>
+ saltpan</font></tt>[<tt><font size=+1>12</font></tt>]<br>
+ <tt><font size=+1>country</font></tt>[<tt><font size=+1>1</font></tt>-<tt><font size=+1>3</font></tt>]<tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;2</font></tt>=disputed boundaries, <tt><font size=+1>3</font></tt>=indefinite boundaries<br>
+ <tt><font size=+1>state</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;states and provinces (US and Canada only)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ In other options coordinates are in degrees, with north latitude
+ and west longitude counted as positive.<br>
+ <tt><font size=+1>&#8722;l</font></tt> <i>S N E W<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set the southern and northern latitude and the eastern and western
+ longitude limits. Missing arguments are filled out from the list
+ &ndash;90, 90, &ndash;180, 180, or lesser limits suitable to the projection
+ at hand.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;k</font></tt> <i>S N E W<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set the scale as if for a map with limits <tt><font size=+1>&#8722;l</font></tt> <i>S N E W</i> . Do not
+ consider any <tt><font size=+1>&#8722;l</font></tt> or <tt><font size=+1>&#8722;w</font></tt> option in setting scale.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;o</font></tt> <i>lat lon rot<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Orient the map in a nonstandard position. Imagine a transparent
+ gridded sphere around the globe. Turn the overlay about the North
+ Pole so that the Prime Meridian (longitude 0) of the overlay coincides
+ with meridian <i>lon</i> on the globe. Then tilt the North Pole of the
+ overlay along its Prime Meridian to latitude <i>lat
+ </i>on the globe. Finally again turn the overlay about its &#8216;North
+ Pole&#8217; so that its Prime Meridian coincides with the previous position
+ of meridian <i>rot</i>. Project the map in the standard form appropriate
+ to the overlay, but presenting information from the underlying
+ globe. Missing arguments are filled out from the list
+ 90, 0, 0. In the absence of <tt><font size=+1>&#8722;</font></tt>o<tt><font size=+1>,</font></tt> the orientation is 90, 0, <i>m</i>, where
+ <i>m</i> is the middle of the longitude range.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;w</font></tt> <i>S N E W<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Window the map by the specified latitudes and longitudes in the
+ tilted, rotated coordinate system. Missing arguments are filled
+ out from the list &ndash;90, 90, &ndash;180, 180. (It is wise to give an encompassing
+ <tt><font size=+1>&#8722;l</font></tt> option with <tt><font size=+1>&#8722;w</font></tt>. Otherwise for small windows computing time
+ varies inversely with area!)
+
+ </table>
+ <tt><font size=+1>&#8722;d</font></tt> <i>n</i>&nbsp;&nbsp;&nbsp;For speed, plot only every <i>n</i>th point.<br>
+ <tt><font size=+1>&#8722;r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Reverse left and right (good for star charts and inside-out
+ views).<br>
+ <tt><font size=+1>&#8722;v</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Verso. Switch to a normally suppressed sheet of the map, such
+ as the back side of the earth in orthographic projection.<br>
+ <tt><font size=+1>&#8722;s1<br>
+ &#8722;s2</font></tt>&nbsp;&nbsp;&nbsp;Superpose; outputs for a <tt><font size=+1>&#8722;s1</font></tt> map (no closing) and a <tt><font size=+1>&#8722;s2</font></tt> map
+ (no opening) may be concatenated.<br>
+ <tt><font size=+1>&#8722;g</font></tt> <i>dlat dlon res<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Grid spacings are <i>dlat</i>, <i>dlon</i>. Zero spacing means no grid. Missing
+ <i>dlat</i> is taken to be zero. Missing <i>dlon</i> is taken the same as <i>dlat</i>.
+ Grid lines are drawn to a resolution of <i>res</i> (2&deg; or less by default).
+ In the absence of <tt><font size=+1>&#8722;</font></tt>g<tt><font size=+1>,</font></tt> grid spacing is 10&deg;.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;p</font></tt> <i>lat lon extent<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Position the point <i>lat, lon</i> at the center of the plotting area.
+ Scale the map so that the height (and width) of the nominal plotting
+ area is <i>extent</i> times the size of one degree of latitude at the
+ center. By default maps are scaled and positioned to fit within
+ the plotting area. An <i>extent</i> overrides option <tt><font size=+1>&#8722;k</font></tt>.
+
+ </table>
+ <tt><font size=+1>&#8722;c</font></tt> <i>x y rot<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ After all other positioning and scaling operations have been performed,
+ rotate the image <i>rot</i> degrees counterclockwise about the center
+ and move the center to position <i>x</i>, <i>y</i>, where the nominal plotting
+ area is &ndash;1&le;<i>x</i>&le;1, &ndash;1&le;<i>y</i>&le;1. Missing arguments are taken to be 0. <tt><font size=+1>&#8722;x</font></tt> Allow
+ the map to extend outside the
+ nominal plotting area.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;m</font></tt> [ <i>file</i> ... ]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Use map data from named files. If no files are named, omit map
+ data. Names that do not exist as pathnames are looked up in a
+ standard directory, which contains, in addition to the data for
+ <tt><font size=+1>&#8722;f</font></tt>,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>world</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;World Data Bank I (default)<br>
+ <tt><font size=+1>states</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;US map from Census Bureau<br>
+ <tt><font size=+1>counties</font></tt>&nbsp;&nbsp;&nbsp;US map from Census Bureau<br>
+ The environment variables <tt><font size=+1>MAP</font></tt> and <tt><font size=+1>MAPDIR</font></tt> change the default map
+ and default directory.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;b</font></tt> [<i>lat0 lon0 lat1 lon1</i>... ]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Suppress the drawing of the normal boundary (defined by options
+ <tt><font size=+1>&#8722;l</font></tt> and <tt><font size=+1>&#8722;w</font></tt>). Coordinates, if present, define the vertices of a
+ polygon to which the map is clipped. If only two vertices are
+ given, they are taken to be the diagonal of a rectangle. To draw
+ the polygon, give its vertices as a <tt><font size=+1>&#8722;u</font></tt> track.
+
+ </table>
+ <tt><font size=+1>&#8722;t</font></tt> <i>file ...<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>files</i> contain lists of points, given as latitude-longitude
+ pairs in degrees. If the first file is named <tt><font size=+1>&#8722;</font></tt>, the standard input
+ is taken instead. The points of each list are plotted as connected
+ &#8216;tracks&#8217;.<br>
+ Points in a track file may be followed by label strings. A label
+ breaks the track. A label may be prefixed by <tt><font size=+1>&quot;</font></tt>, <tt><font size=+1>:</font></tt>, or <tt><font size=+1>!</font></tt> and is
+ terminated by a newline. An unprefixed string or a string prefixed
+ with <tt><font size=+1>&quot;</font></tt> is displayed at the designated point. The first word of
+ a <tt><font size=+1>:</font></tt> or <tt><font size=+1>!</font></tt> string names a special symbol (see option <tt><font size=+1>&#8722;y</font></tt>).
+ An optional numerical second word is a scale factor for the size
+ of the symbol, 1 by default. A <tt><font size=+1>:</font></tt> symbol is aligned with its top
+ to the north; a <tt><font size=+1>!</font></tt> symbol is aligned vertically on the page.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;u</font></tt> <i>file ...<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Same as <tt><font size=+1>&#8722;t</font></tt>, except the tracks are unbroken lines. (<tt><font size=+1>&#8722;t</font></tt> tracks appear
+ as dot-dashed lines if the plotting filter supports them.)<br>
+
+ </table>
+ <tt><font size=+1>&#8722;y</font></tt> <i>file<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>file</i> contains <a href="../man7/plot.html"><i>plot</i>(7)</a>-style data for <tt><font size=+1>:</font></tt> or <tt><font size=+1>!</font></tt> labels in <tt><font size=+1>&#8722;t</font></tt> or
+ <tt><font size=+1>&#8722;u</font></tt> files. Each symbol is defined by a comment <tt><font size=+1>:</font></tt><i>name</i> then a sequence
+ of <tt><font size=+1>m</font></tt> and <tt><font size=+1>v</font></tt> commands. Coordinates (0,0) fall on the plotting point.
+ Default scaling is as if the nominal plotting range were <tt><font size=+1>ra &#8722;1
+ &#8722;1 1 1</font></tt>; <tt><font size=+1>ra</font></tt> commands in <i>file</i> change the
+ scaling.<br>
+
+ </table>
+ <p><font size=+1><b>Projections </b></font><br>
+ Equatorial projections centered on the Prime Meridian (longitude
+ 0). Parallels are straight horizontal lines.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>mercator</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equally spaced straight meridians, conformal, straight
+ compass courses<br>
+ <tt><font size=+1>sinusoidal</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equally spaced parallels, equal-area, same as <tt><font size=+1>bonne
+ 0</font></tt>.<br>
+ <tt><font size=+1>cylequalarea</font></tt> <i>lat0</i>&nbsp;&nbsp;&nbsp;equally spaced straight meridians, equal-area,
+ true scale on <i>lat0<br>
+ </i><tt><font size=+1>cylindrical</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;central projection on tangent cylinder<br>
+ <tt><font size=+1>rectangular</font></tt> <i>lat0</i>&nbsp;&nbsp;&nbsp;equally spaced parallels, equally spaced straight
+ meridians, true scale on <i>lat0<br>
+ </i><tt><font size=+1>gall</font></tt> <i>lat0</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parallels spaced stereographically on prime meridian,
+ equally spaced straight meridians, true scale on <i>lat0<br>
+ </i><tt><font size=+1>mollweide</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(homalographic) equal-area, hemisphere is a circle<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>gilbert()</font></tt> sphere conformally mapped on hemisphere and viewed orthographically<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>gilbert</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;globe mapped conformally on hemisphere, viewed orthographically
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Azimuthal projections centered on the North Pole. Parallels are
+ concentric circles. Meridians are equally spaced radial lines.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>azequidistant</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equally spaced parallels, true distances from pole<br>
+ <tt><font size=+1>azequalarea</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equal-area<br>
+ <tt><font size=+1>gnomonic</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;central projection on tangent plane, straight great circles<br>
+ <tt><font size=+1>perspective</font></tt> <i>dist</i>&nbsp;&nbsp;&nbsp;viewed along earth&#8217;s axis <i>dist</i> earth radii from
+ center of earth<br>
+ <tt><font size=+1>orthographic</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;viewed from infinity<br>
+ <tt><font size=+1>stereographic</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;conformal, projected from opposite pole<br>
+ <tt><font size=+1>laue</font></tt><i>radius</i> = tan(2&#215;<i>colatitude</i>), used in X-ray crystallography<br>
+ <tt><font size=+1>fisheye</font></tt> <i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stereographic seen from just inside medium with refractive
+ index <i>n<br>
+ </i><tt><font size=+1>newyorker</font></tt> <i>rradius</i> = log(<i>colatitude</i>/<i>r</i>): <i>New Yorker</i> map from viewing
+ pedestal of radius <i>r</i> degrees
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Polar conic projections symmetric about the Prime Meridian. Parallels
+ are segments of concentric circles. Except in the Bonne projection,
+ meridians are equally spaced radial lines orthogonal to the parallels.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>conic</font></tt> <i>lat0</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;central projection on cone tangent at <i>lat0<br>
+ </i><tt><font size=+1>simpleconic</font></tt> <i>lat0 lat1<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ equally spaced parallels, true scale on <i>lat0</i> and <i>lat1<br>
+ </i>
+ </table>
+
+ </table>
+ <tt><font size=+1>lambert</font></tt> <i>lat0 lat1</i>&nbsp;&nbsp;&nbsp;&nbsp;conformal, true scale on <i>lat0</i> and <i>lat1<br>
+ </i><tt><font size=+1>albers</font></tt> <i>lat0 lat1</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equal-area, true scale on <i>lat0</i> and <i>lat1<br>
+ </i><tt><font size=+1>bonne</font></tt> <i>lat0</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equally spaced parallels, equal-area, parallel <i>lat0</i>
+ developed from tangent cone
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Projections with bilateral symmetry about the Prime Meridian and
+ the equator.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>polyconic</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parallels developed from tangent cones, equally spaced
+ along Prime Meridian<br>
+ <tt><font size=+1>aitoff</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equal-area projection of globe onto 2-to-1 ellipse, based
+ on <i>azequalarea<br>
+ </i><tt><font size=+1>lagrange</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;conformal, maps whole sphere into a circle<br>
+ <tt><font size=+1>bicentric</font></tt> <i>lon0</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;points plotted at true azimuth from two centers
+ on the equator at longitudes <i>&plusmn;lon0</i>, great circles are straight
+ lines (a stretched <i>gnomonic</i> )<br>
+ <tt><font size=+1>elliptic</font></tt> <i>lon0</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;points plotted at true distance from two centers
+ on the equator at longitudes <i>&plusmn;lon0<br>
+ </i><tt><font size=+1>globular</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hemisphere is circle, circular arc meridians equally spaced
+ on equator, circular arc parallels equally spaced on 0- and 90-degree
+ meridians<br>
+ <tt><font size=+1>vandergrinten</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sphere is circle, meridians as in <i>globular</i>, circular
+ arc parallels resemble <i>mercator
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ Doubly periodic conformal projections.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>guyou</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;W and E hemispheres are square<br>
+ <tt><font size=+1>square</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;world is square with Poles at diagonally opposite corners<br>
+ <tt><font size=+1>tetra</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;map on tetrahedron with edge tangent to Prime Meridian at
+ S Pole, unfolded into equilateral triangle<br>
+ <tt><font size=+1>hex</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;world is hexagon centered on N Pole, N and S hemispheres are
+ equilateral triangles
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Miscellaneous projections.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>harrison</font></tt> <i>dist angle</i>oblique perspective from above the North Pole,
+ <i>dist</i> earth radii from center of earth, looking along the Date
+ Line <i>angle</i> degrees off vertical<br>
+ <tt><font size=+1>trapezoidal</font></tt> <i>lat0 lat1<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ equally spaced parallels, straight meridians equally spaced along
+ parallels, true scale at <i>lat0</i> and <i>lat1</i> on Prime Meridian<br>
+ <tt><font size=+1>lune(lat,angle)</font></tt> conformal, polar cap above latitude <i>lat</i> maps to
+ convex lune with given <i>angle</i> at 90&#176;E and 90&#176;W
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Retroazimuthal projections. At every point the angle between vertical
+ and a straight line to &#8216;Mecca&#8217;, latitude <i>lat0</i> on the prime meridian,
+ is the true bearing of Mecca.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>mecca</font></tt> <i>lat0</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;equally spaced vertical meridians<br>
+ <tt><font size=+1>homing</font></tt> <i>lat0</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;distances to Mecca are true
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Maps based on the spheroid. Of geodetic quality, these projections
+ do not make sense for tilted orientations. For descriptions, see
+ corresponding maps above.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>sp_mercator<br>
+ sp_albers</font></tt> <i>lat0 lat1<br>
+ </i>
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>map perspective 1.025 &#8722;o 40.75 74<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A view looking down on New York from 100 miles (0.025 of the 4000-mile
+ earth radius) up. The job can be done faster by limiting the map
+ so as not to &#8216;plot&#8217; the invisible part of the world: <tt><font size=+1>map perspective
+ 1.025 &#8722;o 40.75 74 &#8722;l 20 60 30 100</font></tt>. A circular border can be forced
+ by adding option
+ <tt><font size=+1>&#8722;w 77.33</font></tt>. (Latitude 77.33&deg; falls just inside a polar cap of opening
+ angle arccos(1/1.025) = 12.6804&deg;.)<br>
+
+ </table>
+ <tt><font size=+1>map mercator &#8722;o 49.25 &#8722;106 180<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ An &#8216;equatorial&#8217; map of the earth centered on New York. The pole
+ of the map is placed 90&#176; away (40.75+49.25=90) on the other side
+ of the earth. A 180&deg; twist around the pole of the map arranges
+ that the &#8216;Prime Meridian&#8217; of the map runs from the pole of the
+ map over the North Pole to New York instead of
+ down the back side of the earth. The same effect can be had from
+ <tt><font size=+1>&nbsp;&nbsp;&nbsp;map mercator &#8722;o 130.75 74<br>
+ </font></tt>
+ </table>
+ <tt><font size=+1>map albers 28 45 &#8722;l 20 50 60 130 &#8722;m states<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A customary curved-latitude map of the United States.<br>
+
+ </table>
+ <tt><font size=+1>map harrison 2 30 &#8722;l &#8722;90 90 120 240 &#8722;o 90 0 0<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A fan view covering 60&deg; on either side of the Date Line, as seen
+ from one earth radius above the North Pole gazing at the earth&#8217;s
+ limb, which is 30&deg; off vertical. The <tt><font size=+1>&#8722;o</font></tt> option overrides the default
+ <tt><font size=+1>&#8722;o 90 0 180</font></tt>, which would rotate the scene to behind the observer.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/lib/map/[1&#8722;4]??</font></tt>&nbsp;&nbsp;&nbsp;World Data Bank II, for <tt><font size=+1>&#8722;f<br>
+ /lib/map/*</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maps for <tt><font size=+1>&#8722;m<br>
+ /lib/map/*.x</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;map indexes<br>
+ <tt><font size=+1>mapd</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Map driver program<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/map<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man7/map.html"><i>map</i>(7)</a>, <a href="../man1/plot.html"><i>plot</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ &#8216;Map seems to be empty&#8217;--a coarse survey found zero extent within
+ the <tt><font size=+1>&#8722;l</font></tt> and <tt><font size=+1>&#8722;w</font></tt> bounds; for maps of limited extent the grid resolution,
+ <i>res</i>, or the limits may have to be refined.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Windows (option <tt><font size=+1>&#8722;w</font></tt>) cannot cross the Date Line. No borders appear
+ along edges arising from visibility limits. Segments that cross
+ a border are dropped, not clipped. Excessively large scale or
+ <tt><font size=+1>&#8722;d</font></tt> setting may cause long line segments to be dropped. <i>Map</i> tries
+ to draw grid lines dotted and <tt><font size=+1>&#8722;t</font></tt> tracks dot-dashed. As
+ very few plotting filters properly support curved textured lines,
+ these lines are likely to appear solid. The west-longitude-positive
+ convention betrays Yankee chauvinism. <i>Gilbert</i> should be a map
+ from sphere to sphere, independent of the mapping from sphere
+ to plane.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/mc.html b/man/man1/mc.html
new file mode 100644
index 00000000..1c133aec
--- /dev/null
+++ b/man/man1/mc.html
@@ -0,0 +1,64 @@
+<head>
+<title>mc(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MC(1)</b><td align=right><b>MC(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ mc &ndash; multicolumn print<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>mc</font></tt> [ <tt><font size=+1>&#8722;</font></tt> ] [ <tt><font size=+1>&#8722;</font></tt><i>N</i> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Mc</i> splits the input into as many columns as will fit in <i>N</i> print
+ positions. If run in a <a href="../man1/9term.html"><i>9term</i>(1)</a>, <a href="../man1/xterm.html"><i>xterm</i>(1)</a>, or <a href="../man1/acme.html"><i>acme</i>(1)</a> window,
+ the default <i>N</i> is the number of blanks that will fit across the
+ window; otherwise the default <i>N</i> is 80. Under option <tt><font size=+1>&#8722;</font></tt> each input
+ line ending in a colon <tt><font size=+1>:</font></tt> is printed separately.
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/draw/mc.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/9term.html"><i>9term</i>(1)</a>, <a href="../man1/acme.html"><i>acme</i>(1)</a>, <a href="../man4/acme.html"><i>acme</i>(4)</a>, <a href="../man1/xterm.html"><i>xterm</i>(1)</a>, <a href="../man1/pr.html"><i>pr</i>(1)</a>, <i>lc</i> in <a href="../man1/ls.html"><i>ls</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/mk.html b/man/man1/mk.html
new file mode 100644
index 00000000..3dde6143
--- /dev/null
+++ b/man/man1/mk.html
@@ -0,0 +1,621 @@
+<head>
+<title>mk(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MK(1)</b><td align=right><b>MK(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ mk &ndash; maintain (make) related files<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>mk</font></tt> [ <tt><font size=+1>&#8722;f</font></tt> <i>mkfile</i> ] ... [ <i>option ...</i> ] [ <i>target ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Mk</i> uses the dependency rules specified in <i>mkfile</i> to control the
+ update (usually by compilation) of <i>targets</i> (usually files) from
+ the source files upon which they depend. The <i>mkfile</i> (default <tt><font size=+1>mkfile</font></tt>)
+ contains a <i>rule</i> for each target that identifies the files and
+ other targets upon which it depends and an <a href="../man1/sh.html"><i>sh</i>(1)</a> script, a
+ <i>recipe</i>, to update the target. The script is run if the target
+ does not exist or if it is older than any of the files it depends
+ on. <i>Mkfile</i> may also contain <i>meta-rules</i> that define actions for
+ updating implicit targets. If no <i>target</i> is specified, the target
+ of the first rule (not meta-rule) in <i>mkfile</i> is updated.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The environment variable <tt><font size=+1>$NPROC</font></tt> determines how many targets may
+ be updated simultaneously; Some operating systems, e.g., Plan
+ 9, set <tt><font size=+1>$NPROC</font></tt> automatically to the number of CPUs on the current
+ machine.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Options are:<br>
+ <tt><font size=+1>&#8722;a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Assume all targets to be out of date. Thus, everything is updated.<br>
+ <tt><font size=+1>&#8722;d</font></tt>[<tt><font size=+1>egp</font></tt>]&nbsp;&nbsp;&nbsp;Produce debugging output (<tt><font size=+1>p</font></tt> is for parsing, <tt><font size=+1>g</font></tt> for graph
+ building, <tt><font size=+1>e</font></tt> for execution).<br>
+ <tt><font size=+1>&#8722;e</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Explain why each target is made.<br>
+ <tt><font size=+1>&#8722;i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Force any missing intermediate targets to be made.<br>
+ <tt><font size=+1>&#8722;k</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do as much work as possible in the face of errors.<br>
+ <tt><font size=+1>&#8722;n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print, but do not execute, the commands needed to update the
+ targets.<br>
+ <tt><font size=+1>&#8722;s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make the command line arguments sequentially rather than in
+ parallel.<br>
+ <tt><font size=+1>&#8722;t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Touch (update the modified date of) file targets, without executing
+ any recipes.<br>
+ <tt><font size=+1>&#8722;w</font></tt><i>target1</i><tt><font size=+1>,</font></tt><i>target2,...<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Pretend the modify time for each <i>target</i> is the current time; useful
+ in conjunction with <tt><font size=+1>&#8722;n</font></tt> to learn what updates would be triggered
+ by modifying the <i>targets</i>.<br>
+
+ </table>
+
+ </table>
+ <p><font size=+1><b>The <tt><font size=+1>mkfile </font></tt></b></font><br>
+ A <i>mkfile</i> consists of <i>assignments</i> (described under &#8216;Environment&#8217;)
+ and <i>rules</i>. A rule contains <i>targets</i> and a <i>tail</i>. A target is a literal
+ string and is normally a file name. The tail contains zero or
+ more <i>prerequisites</i> and an optional <i>recipe</i>, which is an <tt><font size=+1>shell</font></tt> script.
+ Each line of the recipe must begin with white space. A rule
+ takes the form<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>target: prereq1 prereq2<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>recipe using</i> <tt><font size=+1>prereq1, prereq2</font></tt> <i>to build</i> <tt><font size=+1>target<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+
+ </table>
+ When the recipe is executed, the first character on every line
+ is elided.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ After the colon on the target line, a rule may specify <i>attributes</i>,
+ described below.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <i>meta-rule</i> has a target of the form <i>A</i><tt><font size=+1>%</font></tt><i>B</i> where <i>A</i> and <i>B</i> are (possibly
+ empty) strings. A meta-rule acts as a rule for any potential target
+ whose name matches <i>A</i><tt><font size=+1>%</font></tt><i>B</i> with <tt><font size=+1>%</font></tt> replaced by an arbitrary string,
+ called the <i>stem</i>. In interpreting a meta-rule, the stem is substituted
+ for all occurrences of <tt><font size=+1>%</font></tt> in the prerequisite
+ names. In the recipe of a meta-rule, the environment variable
+ <tt><font size=+1>$stem</font></tt> contains the string matched by the <tt><font size=+1>%</font></tt>. For example, a meta-rule
+ to compile a C program using <a href="../man1/9c.html"><i>9c</i>(1)</a> might be:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>%: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;%.c<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ 9c &#8722;c $stem.c<br>
+ 9l &#8722;o $stem $stem.o<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ Meta-rules may contain an ampersand <tt><font size=+1>&amp;</font></tt> rather than a percent sign
+ <tt><font size=+1>%</font></tt>. A <tt><font size=+1>%</font></tt> matches a maximal length string of any characters; an <tt><font size=+1>&amp;</font></tt>
+ matches a maximal length string of any characters except period
+ or slash.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The text of the <i>mkfile</i> is processed as follows. Lines beginning
+ with <tt><font size=+1>&lt;</font></tt> followed by a file name are replaced by the contents of
+ the named file. Lines beginning with <tt><font size=+1>&lt;|</font></tt> followed by a file name
+ are replaced by the output of the execution of the named file.
+ Blank lines and comments, which run from unquoted <tt><font size=+1>#</font></tt> characters
+ to the following newline, are deleted. The character sequence
+ backslash-newline is deleted, so long lines in <i>mkfile</i> may be folded.
+ Non-recipe lines are processed by substituting for <tt><font size=+1>`{</font></tt><i>command</i><tt><font size=+1>}</font></tt>
+ the output of the <i>command</i> when run by <i>sh</i>. References to variables
+ are replaced by the variables&#8217; values. Special
+ characters may be quoted using single quotes <tt><font size=+1>''</font></tt> as in <a href="../man1/sh.html"><i>sh</i>(1)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Assignments and rules are distinguished by the first unquoted
+ occurrence of <tt><font size=+1>:</font></tt> (rule) or <tt><font size=+1>=</font></tt> (assignment).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A later rule may modify or override an existing rule under the
+ following conditions:<br>
+ &ndash;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the targets of the rules exactly match and one rule contains
+ only a prerequisite clause and no recipe, the clause is added
+ to the prerequisites of the other rule. If either or both targets
+ are virtual, the recipe is always executed.<br>
+ &ndash;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the targets of the rules match exactly and the prerequisites
+ do not match and both rules contain recipes, <i>mk</i> reports an &#8220;ambiguous
+ recipe&#8221; error.<br>
+ &ndash;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the target and prerequisites of both rules match exactly, the
+ second rule overrides the first.<br>
+ <p><font size=+1><b>Environment </b></font><br>
+ Rules may make use of shell environment variables. A legal reference
+ of the form <tt><font size=+1>$OBJ</font></tt> or <tt><font size=+1>${name}</font></tt> is expanded as in <a href="../man1/sh.html"><i>sh</i>(1)</a>. A reference
+ of the form <tt><font size=+1>${name:</font></tt><i>A</i><tt><font size=+1>%</font></tt><i>B</i><tt><font size=+1>=</font></tt><i>C</i><tt><font size=+1>%</font></tt><i>D</i><tt><font size=+1>}</font></tt>, where <i>A, B, C, D</i> are (possibly empty)
+ strings, has the value formed by expanding <tt><font size=+1>$name</font></tt> and substituting
+ <i>C</i> for <i>A</i> and <i>D</i> for <i>B</i> in each word in
+ <tt><font size=+1>$name</font></tt> that matches pattern <i>A</i><tt><font size=+1>%</font></tt><i>B</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Variables can be set by assignments of the form<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>var</i><tt><font size=+1>=</font></tt>[<i>attr</i><tt><font size=+1>=</font></tt>]<i>value<br>
+ </i>
+ </table>
+ Blanks in the <i>value</i> break it into words. Such variables are exported
+ to the environment of recipes as they are executed, unless <tt><font size=+1>U</font></tt>,
+ the only legal attribute <i>attr</i>, is present. The initial value of
+ a variable is taken from (in increasing order of precedence) the
+ default values below, <i>mk&#8217;s</i> environment, the <i>mkfiles</i>, and any
+ command line assignment as an argument to <i>mk</i>. A variable assignment
+ argument overrides the first (but not any subsequent) assignment
+ to that variable.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The variable <tt><font size=+1>MKFLAGS</font></tt> contains all the option arguments (arguments
+ starting with <tt><font size=+1>&#8722;</font></tt> or containing <tt><font size=+1>=</font></tt>) and <tt><font size=+1>MKARGS</font></tt> contains all the targets
+ in the call to <i>mk</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The variable <tt><font size=+1>MKSHELL</font></tt> contains the shell command line <i>mk</i> uses to
+ run recipes. If the first word of the command ends in <tt><font size=+1>rc</font></tt> or <tt><font size=+1>rcsh</font></tt>,
+ <i>mk</i> uses <a href="../man1/rc.html"><i>rc</i>(1)</a>&#8217;s quoting rules; otherwise it uses <a href="../man1/sh.html"><i>sh</i>(1)</a>&#8217;s. The
+ <tt><font size=+1>MKSHELL</font></tt> variable is consulted when the mkfile is read, not when
+ it is executed, so that different shells can be used within
+ a single mkfile:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>MKSHELL=$PLAN9/bin/rc<br>
+ use&#8722;rc:V:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ for(i in a b c) echo $i<br>
+
+ </table>
+ MKSHELL=sh<br>
+ use&#8722;sh:V:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ for i in a b c; do echo $i; done<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ Mkfiles included via <tt><font size=+1>&lt;</font></tt> or <tt><font size=+1>&lt;|</font></tt> (<i>q.v.</i>) see their own private copy of
+ <tt><font size=+1>MKSHELL</font></tt>, which always starts set to <tt><font size=+1>sh .
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ Dynamic information may be included in the mkfile by using a line
+ of the form<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ &lt;|<i>command args
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+
+ </table>
+ This runs the command <i>command</i> with the given arguments <i>args</i> and
+ pipes its standard output to <i>mk</i> to be included as part of the
+ mkfile. For instance, the Inferno kernels use this technique to
+ run a shell command with an awk script and a configuration file
+ as arguments in order for the <i>awk</i> script to process the file
+ and output a set of variables and their values.<br>
+ <p><font size=+1><b>Execution </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ During execution, <i>mk</i> determines which targets must be updated,
+ and in what order, to build the <i>names</i> specified on the command
+ line. It then runs the associated recipes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A target is considered up to date if it has no prerequisites or
+ if all its prerequisites are up to date and it is newer than all
+ its prerequisites. Once the recipe for a target has executed,
+ the target is considered up to date.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The date stamp used to determine if a target is up to date is
+ computed differently for different types of targets. If a target
+ is <i>virtual</i> (the target of a rule with the <tt><font size=+1>V</font></tt> attribute), its date
+ stamp is initially zero; when the target is updated the date stamp
+ is set to the most recent date stamp of its prerequisites. Otherwise,
+ if a
+ target does not exist as a file, its date stamp is set to the
+ most recent date stamp of its prerequisites, or zero if it has
+ no prerequisites. Otherwise, the target is the name of a file
+ and the target&#8217;s date stamp is always that file&#8217;s modification
+ date. The date stamp is computed when the target is needed in
+ the execution of
+ a rule; it is not a static value.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Nonexistent targets that have prerequisites and are themselves
+ prerequisites are treated specially. Such a target <i>t</i> is given
+ the date stamp of its most recent prerequisite and if this causes
+ all the targets which have <i>t</i> as a prerequisite to be up to date,
+ <i>t</i> is considered up to date. Otherwise, <i>t</i> is made in the normal
+ fashion.
+ The <tt><font size=+1>&#8722;i</font></tt> flag overrides this special treatment.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Files may be made in any order that respects the preceding restrictions.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A recipe is executed by supplying the recipe as standard input
+ to the command <tt><font size=+1>/bin/sh</font></tt>. (Note that unlike <i>make</i>, <i>mk</i> feeds the entire
+ recipe to the shell rather than running each line of the recipe
+ separately.) The environment is augmented by the following variables:<br>
+ <tt><font size=+1>$alltarget<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ all the targets of this rule.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>$newprereq<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the prerequisites that caused this rule to execute.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>$newmember<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the prerequisites that are members of an aggregate that caused
+ this rule to execute. When the prerequisites of a rule are members
+ of an aggregate, <tt><font size=+1>$newprereq</font></tt> contains the name of the aggregate
+ and out of date members, while <tt><font size=+1>$newmember</font></tt> contains only the name
+ of the members.
+
+ </table>
+
+ </table>
+ <tt><font size=+1>$nproc</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the process slot for this recipe. It satisfies 0&le;<tt><font size=+1>$nproc</font></tt>&lt;<tt><font size=+1>$NPROC</font></tt>.<br>
+ <tt><font size=+1>$pid</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the process id for the <i>mk</i> executing the recipe.<br>
+ <tt><font size=+1>$prereq</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;all the prerequisites for this rule.<br>
+ <tt><font size=+1>$stem</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if this is a meta-rule, <tt><font size=+1>$stem</font></tt> is the string that matched
+ <tt><font size=+1>%</font></tt> or <tt><font size=+1>&amp;</font></tt>. Otherwise, it is empty. For regular expression meta-rules
+ (see below), the variables <tt><font size=+1>stem0</font></tt>, ..., <tt><font size=+1>stem9</font></tt> are set to the corresponding
+ subexpressions.<br>
+ <tt><font size=+1>$target</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;the targets for this rule that need to be remade.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ These variables are available only during the execution of a recipe,
+ not while evaluating the <i>mkfile</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Unless the rule has the <tt><font size=+1>Q</font></tt> attribute, the recipe is printed prior
+ to execution with recognizable environment variables expanded.
+ Commands returning error status cause <i>mk</i> to terminate.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Recipes and backquoted <tt><font size=+1>rc</font></tt> commands in places such as assignments
+ execute in a copy of <i>mk&#8217;s</i> environment; changes they make to environment
+ variables are not visible from <i>mk</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Variable substitution in a rule is done when the rule is read;
+ variable substitution in the recipe is done when the recipe is
+ executed. For example:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>bar=a.c<br>
+ foo: $bar<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ $CC &#8722;o foo $bar<br>
+
+ </table>
+ bar=b.c<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ will compile <tt><font size=+1>b.c</font></tt> into <tt><font size=+1>foo</font></tt>, if <tt><font size=+1>a.c</font></tt> is newer than <tt><font size=+1>foo</font></tt>.<br>
+ <p><font size=+1><b>Aggregates </b></font><br>
+ Names of the form <i>a</i>(<i>b</i>) refer to member <i>b</i> of the aggregate <i>a</i>. Currently,
+ the only aggregates supported are <i>9ar</i> (see <a href="../man1/9c.html"><i>9c</i>(1)</a>) archives.<br>
+ <p><font size=+1><b>Attributes </b></font><br>
+ The colon separating the target from the prerequisites may be
+ immediately followed by <i>attributes</i> and another colon. The attributes
+ are:<br>
+ <tt><font size=+1>D</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the recipe exits with a non-null status, the target is deleted.<br>
+ <tt><font size=+1>E</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Continue execution if the recipe draws errors.<br>
+ <tt><font size=+1>N</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If there is no recipe, the target has its time updated.<br>
+ <tt><font size=+1>n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The rule is a meta-rule that cannot be a target of a virtual
+ rule. Only files match the pattern in the target.<br>
+ <tt><font size=+1>P</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The characters after the <tt><font size=+1>P</font></tt> until the terminating <tt><font size=+1>:</font></tt> are taken
+ as a program name. It will be invoked as <tt><font size=+1>sh &#8722;c prog 'arg1' 'arg2'</font></tt>
+ and should return a zero exit status if and only if arg1 is up
+ to date with respect to arg2. Date stamps are still propagated
+ in the normal way.<br>
+ <tt><font size=+1>Q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The recipe is not printed prior to execution.<br>
+ <tt><font size=+1>R</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The rule is a meta-rule using regular expressions. In the rule,
+ <tt><font size=+1>%</font></tt> has no special meaning. The target is interpreted as a regular
+ expression as defined in <a href="../man7/regexp.html"><i>regexp</i>(7)</a>. The prerequisites may contain
+ references to subexpressions in form <tt><font size=+1>\</font></tt><i>n</i>, as in the substitute
+ command of <a href="../man1/sed.html"><i>sed</i>(1)</a>.<br>
+ <tt><font size=+1>U</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The targets are considered to have been updated even if the recipe
+ did not do so.<br>
+ <tt><font size=+1>V</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The targets of this rule are marked as virtual. They are distinct
+ from files of the same name.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A simple mkfile to compile a program:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>&lt;/$objtype/mkfile<br>
+ prog: a.$O b.$O c.$O<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ $LD $LDFLAGS &#8722;o $target $prereq<br>
+
+ </table>
+ %.$O: %.c<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ $CC $CFLAGS $stem.c<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ Override flag settings in the mkfile:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>% mk target 'CFLAGS=&#8722;S &#8722;w'<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Maintain a library:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>libc.a(%.$O):N: &nbsp;&nbsp;&nbsp;%.$O<br>
+ libc.a: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;libc.a(abs.$O) libc.a(access.$O) libc.a(alarm.$O) ...<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ar r libc.a $newmember<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ String expression variables to derive names from a master list:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>NAMES=alloc arc bquote builtins expand main match mk var word<br>
+ OBJ=${NAMES:%=%.$O}<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Regular expression meta-rules:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>([^/]*)/(.*)\.$O:R: &nbsp;&nbsp;&nbsp;\1/\2.c<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ cd $stem1; $CC $CFLAGS $stem2.c<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ A correct way to deal with <a href="../man1/yacc.html"><i>yacc</i>(1)</a> grammars. The file <tt><font size=+1>lex.c</font></tt> includes
+ the file <tt><font size=+1>x.tab.h</font></tt> rather than <tt><font size=+1>y.tab.h</font></tt> in order to reflect changes
+ in content, not just modification time.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>lex.$O: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x.tab.h<br>
+ x.tab.h: &nbsp;&nbsp;&nbsp;&nbsp;y.tab.h<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ cmp &#8722;s x.tab.h y.tab.h || cp y.tab.h x.tab.h<br>
+
+ </table>
+ y.tab.c y.tab.h: gram.y<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ $YACC &#8722;d gram.y<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ The above example could also use the <tt><font size=+1>P</font></tt> attribute for the <tt><font size=+1>x.tab.h</font></tt>
+ rule:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>x.tab.h:Pcmp &#8722;s: y.tab.h<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ cp y.tab.h x.tab.h<br>
+
+ </table>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/mk<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/sh.html"><i>sh</i>(1)</a>, <a href="../man7/regexp.html"><i>regexp</i>(7)</a>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A. Hume, &#8220;Mk: a Successor to Make&#8221; (Tenth Edition Research Unix
+ Manuals).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Andrew G. Hume and Bob Flandrena, &#8220;Maintaining Files on Plan 9
+ with Mk&#8221;. DOCPREFIX/doc/mk.pdf<br>
+
+</table>
+<p><font size=+1><b>HISTORY </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Andrew Hume wrote <i>mk</i> for Tenth Edition Research Unix. It was later
+ ported to Plan 9. This software is a port of the Plan 9 version
+ back to Unix.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Identical recipes for regular expression meta-rules only have
+ one target.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Seemingly appropriate input like <tt><font size=+1>CFLAGS=&#8722;DHZ=60</font></tt> is parsed as an
+ erroneous attribute; correct it by inserting a space after the
+ first <tt><font size=+1>=</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The recipes printed by <i>mk</i> before being passed to the shell for
+ execution are sometimes erroneously expanded for printing. Don&#8217;t
+ trust what&#8217;s printed; rely on what the shell does.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/mk9660.1 b/man/man1/mk9660.1
new file mode 100644
index 00000000..0d655cf0
--- /dev/null
+++ b/man/man1/mk9660.1
@@ -0,0 +1,232 @@
+.TH MK9660 1
+.SH NAME
+dump9660, mk9660 \- create an ISO-9660 CD image
+.SH SYNOPSIS
+.B mk9660
+[
+.B -:D
+]
+[
+.B -9cjr
+]
+[
+.B -b
+.I bootfile
+]
+[
+.B -p
+.I proto
+]
+[
+.B -s
+src
+]
+[
+.B -v
+volume
+]
+.I image
+.PP
+.B dump9660
+[
+.B -:D
+]
+[
+.B -9cjr
+]
+[
+.B -p
+.I proto
+]
+[
+.B -s
+src
+]
+[
+.B -v
+volume
+]
+[
+.B -m
+.I maxsize
+]
+[
+.B -n
+.I now
+]
+.I image
+.SH DESCRIPTION
+.I Mk9660
+writes to the random access file
+.I image
+an ISO-9660 CD image containing the
+files named in
+.I proto
+(by default,
+.BR \*9/proto/allproto )
+from the file tree
+.I src
+(by default,
+the current directory).
+The
+.I proto
+file is formatted as described in
+.IR proto (3).
+.PP
+The created CD image will be in ISO-9660
+format, but by default the file names will
+be stored in UTF-8 with no imposed length
+or character restrictions.
+The
+.B -c
+flag causes
+.I mk9660
+to use only file names in ``8.3'' form
+that use digits, letters, and underscore.
+File names that do not conform are changed
+to
+.BI D nnnnnn
+(for directories)
+or
+.BI F nnnnnn
+(for files);
+a key file
+.B _CONFORM.MAP
+is created in the root
+directory to ease the reverse process.
+.PP
+If the
+.B -9
+flag is given, the system use fields at the end of
+each directory entry will be populated with
+Plan directory information (owner, group, mode,
+full name); this is interpreted by
+.IR 9660srv .
+.PP
+If the
+.B -j
+flag is given, the usual directory tree is written,
+but an additional tree in Microsoft Joliet format is
+also added.
+This second tree can contain long Unicode file names,
+and can be read by
+.I 9660srv
+as well as most versions of Windows
+and many Unix clones.
+The characters
+.BR * ,
+.BR : ,
+.BR ; ,
+.BR ? ,
+and
+.B \e
+are allowed in Plan 9 file names but not in Joliet file names;
+non-conforming file names are translated
+and a
+.B _CONFORM.MAP
+file written
+as in the case of the
+.B -c
+option.
+.PP
+If the
+.B -r
+flag is given, Rock Ridge extensions are written in the
+format of the system use sharing protocol;
+this format provides Posix-style file metadata and is
+common on Unix platforms.
+.PP
+The options
+.BR -c ,
+.BR -9 ,
+.BR -j ,
+and
+.B -r
+may be mixed freely with the exception that
+.B -9
+and
+.B -r
+are mutually exclusive.
+.PP
+The
+.B -v
+flag sets the volume title;
+if unspecified, the base name of
+.I proto
+is used.
+.PP
+The
+.B -:
+flag causes
+.B mk9660
+to replace colons in scanned file names with spaces;
+this is the inverse of the map applied by Plan 9's
+\fIdossrv\fR(4)
+and is useful for writing Joliet CDs containing data
+from FAT file systems.
+.PP
+The
+.B -b
+option creates a bootable CD.
+Bootable CDs contain pointers to floppy images which are
+loaded and booted by the BIOS.
+.I Bootfile
+should be the name of the floppy image to use;
+it is a path relative to the root of the created CD.
+That is, the boot floppy image must be listed in the
+.I proto
+file already:
+the
+.B -b
+flag just creates a pointer to it.
+.PP
+The
+.B -D
+flag creates immense amounts of debugging output
+on standard error.
+.PP
+.I Dump9660
+is similar in specification to
+.I mk9660
+but creates and updates backup CD images in the style of
+the
+.I dump
+file system
+(see Plan 9's \fIfs\fR(4)).
+The dump is file-based rather than block-based:
+if a file's contents have not changed since the last
+backup, only its directory entry will be rewritten.
+.PP
+The
+.B -n
+option specifies a time (in seconds since January 1, 1970)
+to be used for naming the dump directory.
+.PP
+The
+.B -m
+option specifies a maximum size for the image;
+if a backup would cause the image to grow larger than
+.IR maxsize ,
+it will not be written, and
+.I dump9660
+will exit with a non-empty status.
+.SH EXAMPLE
+.PP
+Create an image of the Plan 9 source tree,
+including a conformant ISO-9660 directory tree,
+Plan 9 extensions in the system use fields, and
+a Joliet directory tree.
+.IP
+.EX
+mk9660 -9cj -s /n/bootes -p srcproto cdimage
+.EE
+.SH SOURCE
+\*9/src/cmd/9660
+.SH "SEE ALSO
+.IR proto (3)
+.\" .SH "SEE ALSO"
+.\" .I 9660srv
+.\" (in
+.\" .IR dossrv (4)),
+.\" .IR cdfs (4),
+.\" .IR proto (3)
diff --git a/man/man1/mkdir.html b/man/man1/mkdir.html
new file mode 100644
index 00000000..489d8b91
--- /dev/null
+++ b/man/man1/mkdir.html
@@ -0,0 +1,79 @@
+<head>
+<title>mkdir(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MKDIR(1)</b><td align=right><b>MKDIR(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ mkdir &ndash; make a directory<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>mkdir</font></tt> [ <tt><font size=+1>&#8722;p</font></tt> ] [ <tt><font size=+1>&#8722;m</font></tt> <i>mode</i> ] <i>dirname ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Mkdir</i> creates the specified directories. It requires write permission
+ in the parent directory.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the <tt><font size=+1>&#8722;p</font></tt> flag is given, <i>mkdir</i> creates any necessary parent directories
+ and does not complain if the target directory already exists.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;m</font></tt> flag sets the permissions to be used when creating the
+ directory. The default is 0777.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/rm.html"><i>rm</i>(1)</a><br>
+ <i>cd</i> in <a href="../man1/rc.html"><i>rc</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/mkdir.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Mkdir</i> returns null exit status if all directories were successfully
+ made. Otherwise it prints a diagnostic and returns <tt><font size=+1>&quot;error&quot;</font></tt> status.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/namespace.html b/man/man1/namespace.html
new file mode 100644
index 00000000..45ae83bc
--- /dev/null
+++ b/man/man1/namespace.html
@@ -0,0 +1,61 @@
+<head>
+<title>namespace(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>NAMESPACE(1)</b><td align=right><b>NAMESPACE(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ namespace &ndash; print name space directory<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>namespace<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Namespace</i> prints the directory representing the current name space.
+ See <a href="../man4/intro.html"><i>intro</i>(4)</a>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/namespace.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/getns.html"><i>getns</i>(3)</a>, <a href="../man4/intro.html"><i>intro</i>(4)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/news.html b/man/man1/news.html
new file mode 100644
index 00000000..29cede42
--- /dev/null
+++ b/man/man1/news.html
@@ -0,0 +1,91 @@
+<head>
+<title>news(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>NEWS(1)</b><td align=right><b>NEWS(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ news &ndash; print news items<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>news</font></tt> [ <tt><font size=+1>&#8722;a</font></tt> ] [ <tt><font size=+1>&#8722;n</font></tt> ] [ <i>item ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ When invoked without options, this simple local news service prints
+ files that have appeared in <tt><font size=+1>/lib/news</font></tt> since last reading, most
+ recent first, with each preceded by an appropriate header. The
+ time of reading is recorded. The options are<br>
+ <tt><font size=+1>&#8722;a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print all items, regardless of currency. The recorded time is
+ not changed.<br>
+ <tt><font size=+1>&#8722;n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Report the names of the current items without printing their
+ contents, and without changing the recorded time.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Other arguments select particular news items.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To post a news item, create a file in <tt><font size=+1>/usr/local/plan9/news</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Empty news items, and news items named <tt><font size=+1>core</font></tt> or <tt><font size=+1>dead.letter</font></tt> are
+ ignored.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/news/*<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ articles<br>
+
+ </table>
+ <tt><font size=+1>$HOME/lib/newstime<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ modify time is time news was last read who gets news mailed to
+ them<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/news.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/p.html b/man/man1/p.html
new file mode 100644
index 00000000..a2339d2f
--- /dev/null
+++ b/man/man1/p.html
@@ -0,0 +1,63 @@
+<head>
+<title>p(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>P(1)</b><td align=right><b>P(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ p &ndash; paginate<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>p</font></tt> [ <tt><font size=+1>&#8722;</font></tt><i>number</i> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>P</i> copies its standard input, or the named files if given, to its
+ standard output, stopping at the end of every 22nd line, and between
+ files, to wait for a newline from the user. The option sets the
+ <i>number</i> of lines on a page.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ While waiting for a newline, <i>p</i> interprets the commands:<br>
+ <tt><font size=+1>!</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pass the rest of the line to the shell as a command.<br>
+ <tt><font size=+1>q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quit.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/p.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/page.html b/man/man1/page.html
new file mode 100644
index 00000000..91b48993
--- /dev/null
+++ b/man/man1/page.html
@@ -0,0 +1,97 @@
+<head>
+<title>page(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PAGE(1)</b><td align=right><b>PAGE(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ img, psv &ndash; view FAX, image, graphic, PostScript, PDF, and typesetter
+ output files<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>page</font></tt> [ <i>file</i>... ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>img</font></tt> <i>file.bit
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>psv</font></tt> <i>file.ps
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>psv</font></tt> <i>file.pdf<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Plan 9&#8217;s <a href="../man1/page.html"><i>page</i>(1)</a> is not ported. Instead, <i>page</i> is a script that
+ invokes <a href="../man1/qiv.html"><i>qiv</i>(1)</a> to view graphic files or <i>psv</i> to view PostScript
+ and PDF. On Mac OS X, <i>page</i> invokes Preview to handle all files.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Img</i> is a simple image viewer for Plan 9 images (see <a href="../man7/image.html"><i>image</i>(7)</a>).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Psv</i> is a PostScript and PDF viewer. It is a streamlined interface
+ to <a href="../man1/gv.html"><i>gv</i>(1)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To view troff output, use <a href="../man1/proof.html"><i>proof</i>(1)</a>.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/gs.html"><i>gs</i>(1)</a>, <a href="../man1/gv.html"><i>gv</i>(1)</a>, <a href="../man1/jpg.html"><i>jpg</i>(1)</a>, <a href="../man1/proof.html"><i>proof</i>(1)</a>, <a href="../man1/tex.html"><i>tex</i>(1)</a>, <a href="../man1/troff.html"><i>troff</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/draw/img.c<br>
+ /usr/local/plan9/bin/psv<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ When using Preview on Mac OS X, <i>page</i> leaves temporary files in
+ <tt><font size=+1>/var/tmp</font></tt>, since it has no way to know when the viewer has exited.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Page</i> does not handle Plan 9 <a href="../man7/image.html"><i>image</i>(7)</a> files; use <i>img</i> explicitly.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/pic.html b/man/man1/pic.html
new file mode 100644
index 00000000..acba241b
--- /dev/null
+++ b/man/man1/pic.html
@@ -0,0 +1,435 @@
+<head>
+<title>pic(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PIC(1)</b><td align=right><b>PIC(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ pic, tpic &ndash; troff and tex preprocessors for drawing pictures<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>pic</font></tt> [ <i>files</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>tpic</font></tt> [ <i>files</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Pic</i> is a <a href="../man1/troff.html"><i>troff</i>(1)</a> preprocessor for drawing figures on a typesetter.
+ <i>Pic</i> code is contained between <tt><font size=+1>.PS</font></tt> and <tt><font size=+1>.PE</font></tt> lines:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>.PS</font></tt> <i>optional-width optional-height<br>
+ element-list<br>
+ </i><tt><font size=+1>.PE<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ or in a file mentioned in a <tt><font size=+1>.PS</font></tt> line:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>.PS &lt;</font></tt><i>file
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+
+ </table>
+ If <i>optional-width</i> is present, the picture is made that many inches
+ wide, regardless of any dimensions used internally. The height
+ is scaled in the same proportion unless <i>optional-height</i> is present.
+ If <tt><font size=+1>.PF</font></tt> is used instead of <tt><font size=+1>.PE</font></tt>, the typesetting position after
+ printing is restored to what it was upon entry.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An <i>element-list</i> is a list of elements:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>primitive attribute-list<br>
+ placename</i> <tt><font size=+1>:</font></tt> <i>element<br>
+ placename</i> <tt><font size=+1>:</font></tt> <i>position<br>
+ var</i> <tt><font size=+1>=</font></tt> <i>expr<br>
+ direction<br>
+ </i><tt><font size=+1>{</font></tt> <i>element-list</i> <tt><font size=+1>}<br>
+ [</font></tt> <i>element-list</i> <tt><font size=+1>]<br>
+ for</font></tt> <i>var</i> <tt><font size=+1>=</font></tt> <i>expr</i> <tt><font size=+1>to</font></tt> <i>expr</i> <tt><font size=+1>by</font></tt> <i>expr</i> <tt><font size=+1>do {</font></tt> <i>anything</i> <tt><font size=+1>}<br>
+ if</font></tt> <i>expr</i> <tt><font size=+1>then {</font></tt> <i>anything</i> <tt><font size=+1>} else {</font></tt> <i>anything</i> <tt><font size=+1>}<br>
+ copy</font></tt> <i>file, </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;copy thru</font></tt> <i>macro, </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;copy</font></tt> <i>file</i> <tt><font size=+1>thru</font></tt> <i>macro<br>
+ </i><tt><font size=+1>sh {</font></tt> <i>commandline</i> <tt><font size=+1>}<br>
+ print</font></tt> <i>expr<br>
+ </i><tt><font size=+1>reset</font></tt> <i>optional var-list<br>
+ troff-command<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+
+ </table>
+ Elements are separated by newlines or semicolons; a long element
+ may be continued by ending the line with a backslash. Comments
+ are introduced by a <tt><font size=+1>#</font></tt> and terminated by a newline. Variable names
+ begin with a lower case letter; place names begin with upper case.
+ Place and variable names retain their values from
+ one picture to the next.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ After each primitive the current position moves in the current
+ direction (<tt><font size=+1>up</font></tt>,<tt><font size=+1>down</font></tt>, <tt><font size=+1>left</font></tt>,<tt><font size=+1>right</font></tt> (default)) by the size of the primitive.
+ The current position and direction are saved upon entry to a <tt><font size=+1>{</font></tt>...<tt><font size=+1>}</font></tt>
+ block and restored upon exit. Elements within a block enclosed
+ in <tt><font size=+1>[</font></tt>...<tt><font size=+1>]</font></tt> are treated as a unit; the dimensions are
+ determined by the extreme points of the contained objects. Names,
+ variables, and direction of motion within a block are local to
+ that block.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Troff-command</i> is any line that begins with a period. Such a line
+ is assumed to make sense in the context where it appears; generally,
+ this means only size and font changes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>primitive</i> objects are:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>box &nbsp;&nbsp;&nbsp;circle &nbsp;&nbsp;&nbsp;ellipse &nbsp;&nbsp;&nbsp;arc &nbsp;&nbsp;&nbsp;line &nbsp;&nbsp;&nbsp;arrow &nbsp;&nbsp;&nbsp;spline &nbsp;&nbsp;&nbsp;move </font></tt><i>&nbsp;&nbsp;&nbsp;text-list<br>
+ </i>
+ </table>
+ <tt><font size=+1>arrow</font></tt> is a synonym for <tt><font size=+1>line &#8722;&gt;</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An <i>attribute-list</i> is a sequence of zero or more attributes; each
+ attribute consists of a keyword, perhaps followed by a value.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>h(eigh)t</font></tt> <i>expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wid(th)</font></tt> <i>expr<br>
+ </i><tt><font size=+1>rad(ius)</font></tt> <i>expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;diam(eter)</font></tt> <i>expr<br>
+ </i><tt><font size=+1>up</font></tt> <i>opt-expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;down</font></tt> <i>opt-expr<br>
+ </i><tt><font size=+1>right</font></tt> <i>opt-expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left</font></tt> <i>opt-expr<br>
+ </i><tt><font size=+1>from</font></tt> <i>position </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to</font></tt> <i>position<br>
+ </i><tt><font size=+1>at</font></tt> <i>position </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with</font></tt> <i>corner<br>
+ </i><tt><font size=+1>by</font></tt> <i>expr, expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br>
+ dotted</font></tt> <i>opt-expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dashed</font></tt> <i>opt-expr<br>
+ </i><tt><font size=+1>chop</font></tt> <i>opt-expr </i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8722;&gt; &nbsp;&nbsp;&nbsp;&lt;&#8722; &nbsp;&nbsp;&nbsp;&lt;&#8722;&gt;<br>
+ invis &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;same<br>
+ fill</font></tt> <i>opt-expr<br>
+ text-list &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expr<br>
+ </i>
+ </table>
+
+ </table>
+ Missing attributes and values are filled in from defaults. Not
+ all attributes make sense for all primitives; irrelevant ones
+ are silently ignored. The attribute <tt><font size=+1>at</font></tt> causes the geometrical
+ center to be put at the specified place; <tt><font size=+1>with</font></tt> causes the position
+ on the object to be put at the specified place. For lines, splines
+ and
+ arcs, <tt><font size=+1>height</font></tt> and <tt><font size=+1>width</font></tt> refer to arrowhead size. A bare <i>expr</i> implies
+ motion in the current direction.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Text is normally an attribute of some primitive; by default it
+ is placed at the geometrical center of the object. Stand-alone
+ text is also permitted. A text list is a list of text items:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>text-item</i><tt><font size=+1>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ &quot;...&quot;
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>positioning ...<br>
+ </i><tt><font size=+1>sprintf(&quot;</font></tt><i>format</i><tt><font size=+1>&quot;,</font></tt> <i>expr</i><tt><font size=+1>,</font></tt> <i>...</i><tt><font size=+1>)</font></tt> <i>positioning ...<br>
+ </i>
+ </table>
+ <i> positioning</i><tt><font size=+1>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ center &nbsp;&nbsp;&nbsp;ljust &nbsp;&nbsp;&nbsp;rjust &nbsp;&nbsp;&nbsp;above &nbsp;&nbsp;&nbsp;below<br>
+
+ </table>
+ </font></tt>
+ </table>
+ If there are multiple text items for some primitive, they are
+ arranged vertically and centered except as qualified. Positioning
+ requests apply to each item independently. Text items may contain
+ <i>troff</i> commands for size and font changes, local motions, etc.,
+ but make sure that these are balanced so that the entering state
+ is restored before exiting.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A position is ultimately an <i>x,y</i> coordinate pair, but it may be
+ specified in other ways.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>position</i><tt><font size=+1>:<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>expr, expr<br>
+ place </i><tt><font size=+1>&plusmn;</font></tt> <i>expr, expr<br>
+ place </i><tt><font size=+1>&plusmn; (</font></tt> <i>expr, expr</i> <tt><font size=+1>)<br>
+ (</font></tt> <i>position</i><tt><font size=+1>,</font></tt> <i>position</i> <tt><font size=+1>) </font></tt><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x</i> from one, <i>y</i> the other<br>
+ <i>expr</i> [<tt><font size=+1>of the way</font></tt>] between <i>position</i> and <i>position<br>
+ expr </i>&lt; <i>position</i> , <i>position </i>&gt;<br>
+ ( <i>position</i> )<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <i>place</i><tt><font size=+1>:<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>placename optional-corner<br>
+ corner</i> <tt><font size=+1>of</font></tt> <i>placename<br>
+ nth primitive optional-corner<br>
+ corner</i> <tt><font size=+1>of</font></tt> <i>nth primitive<br>
+ </i><tt><font size=+1>Here<br>
+ </font></tt>
+ </table>
+
+ </table>
+ An <i>optional-corner</i> is one of the eight compass points or the center
+ or the start or end of a primitive.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>optional-corner</i><tt><font size=+1>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ .n &nbsp;&nbsp;&nbsp;.e &nbsp;&nbsp;&nbsp;.w &nbsp;&nbsp;&nbsp;.s &nbsp;&nbsp;&nbsp;.ne &nbsp;&nbsp;&nbsp;.se &nbsp;&nbsp;&nbsp;.nw &nbsp;&nbsp;&nbsp;.sw &nbsp;&nbsp;&nbsp;.c &nbsp;&nbsp;&nbsp;.start &nbsp;&nbsp;&nbsp;.end<br>
+
+ </table>
+ </font></tt> <i>corner</i><tt><font size=+1>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ top &nbsp;&nbsp;&nbsp;bot &nbsp;&nbsp;&nbsp;left &nbsp;&nbsp;&nbsp;right &nbsp;&nbsp;&nbsp;start &nbsp;&nbsp;&nbsp;end<br>
+
+ </table>
+ </font></tt>
+ </table>
+ Each object in a picture has an ordinal number; <i>nth</i> refers to
+ this.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>nth</i><tt><font size=+1>:<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>n</i><tt><font size=+1>th</font></tt><i>, &nbsp;&nbsp;&nbsp;n</i><tt><font size=+1>th last<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+
+ </table>
+ The built-in variables and their default values are:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>boxwid 0.75 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;boxht 0.5<br>
+ circlerad 0.25 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arcrad 0.25<br>
+ ellipsewid 0.75 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ellipseht 0.5<br>
+ linewid 0.5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lineht 0.5<br>
+ movewid 0.5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;moveht 0.5<br>
+ textwid 0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;textht 0<br>
+ arrowwid 0.05 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arrowht 0.1<br>
+ dashwid 0.1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arrowhead 2<br>
+ scale 1<br>
+ </font></tt>
+ </table>
+
+ </table>
+ These may be changed at any time, and the new values remain in
+ force from picture to picture until changed again or reset by
+ a <tt><font size=+1>reset</font></tt> statement. Variables changed within <tt><font size=+1>[</font></tt> and <tt><font size=+1>]</font></tt> revert to
+ their previous value upon exit from the block. Dimensions are
+ divided by <tt><font size=+1>scale</font></tt> during output.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Expressions in <i>pic</i> are evaluated in floating point. All numbers
+ representing dimensions are taken to be in inches.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>expr</i><tt><font size=+1>:<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>expr op expr<br>
+ </i><tt><font size=+1>&#8722;</font></tt> <i>expr<br>
+ </i><tt><font size=+1>!</font></tt> <i>expr<br>
+ </i><tt><font size=+1>(</font></tt> <i>expr</i> <tt><font size=+1>)<br>
+ variable<br>
+ number<br>
+ </font></tt><i>place</i> <tt><font size=+1>.x </font></tt><i>&nbsp;&nbsp;&nbsp;place</i> <tt><font size=+1>.y </font></tt><i>&nbsp;&nbsp;&nbsp;place</i> <tt><font size=+1>.ht </font></tt><i>&nbsp;&nbsp;&nbsp;place</i> <tt><font size=+1>.wid </font></tt><i>&nbsp;&nbsp;&nbsp;place</i> <tt><font size=+1>.rad<br>
+ sin(</font></tt><i>expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;cos(</font></tt><i>expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;atan2(</font></tt><i>expr,expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;log(</font></tt><i>expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;exp(</font></tt><i>expr</i><tt><font size=+1>)<br>
+ sqrt(</font></tt><i>expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;max(</font></tt><i>expr,expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;min(</font></tt><i>expr,expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;int(</font></tt><i>expr</i><tt><font size=+1>) &nbsp;&nbsp;&nbsp;rand()<br>
+ </font></tt>
+ </table>
+ <i>op</i><tt><font size=+1>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ + &nbsp;&nbsp;&nbsp;&#8722; &nbsp;&nbsp;&nbsp;* &nbsp;&nbsp;&nbsp;/ &nbsp;&nbsp;&nbsp;% &nbsp;&nbsp;&nbsp;&lt; &nbsp;&nbsp;&nbsp;&lt;= &nbsp;&nbsp;&nbsp;&gt; &nbsp;&nbsp;&nbsp;&gt;= &nbsp;&nbsp;&nbsp;== &nbsp;&nbsp;&nbsp;!= &nbsp;&nbsp;&nbsp;&amp;&amp; &nbsp;&nbsp;&nbsp;||<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ The <tt><font size=+1>define</font></tt> and <tt><font size=+1>undef</font></tt> statements are not part of the grammar.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>define</font></tt> <i>name</i> <tt><font size=+1>{</font></tt> <i>replacement text</i> <tt><font size=+1>}<br>
+ undef</font></tt> <i>name<br>
+ </i>
+ </table>
+
+ </table>
+ Occurrences of <tt><font size=+1>$1</font></tt>, <tt><font size=+1>$2</font></tt>, etc., in the replacement text will be replaced
+ by the corresponding arguments if <i>name</i> is invoked as<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>name</i><tt><font size=+1>(</font></tt><i>arg1</i><tt><font size=+1>,</font></tt> <i>arg2</i><tt><font size=+1>, ...)<br>
+ </font></tt>
+ </table>
+
+ </table>
+ Non-existent arguments are replaced by null strings. Replacement
+ text may contain newlines. The <tt><font size=+1>undef</font></tt> statement removes the definition
+ of a macro.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Tpic</i> is a <a href="../man1/tex.html"><i>tex</i>(1)</a> preprocessor that accepts <i>pic</i> language. It produces
+ Tex commands that define a box called <tt><font size=+1>\graph</font></tt>, which contains the
+ picture. The box may be output this way:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>\centerline{\box\graph}<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>arrow &quot;input&quot; above; box &quot;process&quot;; arrow &quot;output&quot; above<br>
+ move<br>
+ A: ellipse <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ circle rad .1 with .w at A.e<br>
+ circle rad .05 at 0.5 &lt;A.c, A.ne&gt;<br>
+ circle rad .065 at 0.5 &lt;A.c, A.ne&gt;<br>
+ spline from last circle.nw left .25 then left .05 down .05<br>
+ arc from A.c to A.se rad 0.5<br>
+ for i = 1 to 10 do { line from A.s+.025*i,.01*i down i/50 } <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+ arrow &quot;input&quot; above; box &quot;process&quot;; arrow &quot;output&quot; above move A: ellipse<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ circle rad .1 with .w at A.e<br>
+ circle rad .05 at 0.5 &lt;A.c, A.ne&gt;<br>
+ circle rad .065 at 0.5 &lt;A.c, A.ne&gt;<br>
+ spline from last circle.nw left .25 then left .05 down .05<br>
+ arc from A.c to A.se rad 0.5<br>
+ for i = 1 to 10 do { line from A.s+.025*i,.01*i down i/50 }<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/pic<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/grap.html"><i>grap</i>(1)</a>, <a href="../man1/doctype.html"><i>doctype</i>(1)</a>, <a href="../man1/troff.html"><i>troff</i>(1)</a><br>
+ B. W. Kernighan, &#8220;PIC--a Graphics Language for Typesetting&#8221;, <i>Unix
+ Research System Programmer&#8217;s Manual,</i> Tenth Edition, Volume 2<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/plot.html b/man/man1/plot.html
new file mode 100644
index 00000000..b93d6d34
--- /dev/null
+++ b/man/man1/plot.html
@@ -0,0 +1,88 @@
+<head>
+<title>plot(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PLOT(1)</b><td align=right><b>PLOT(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ plot &ndash; graphics filter<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>plot</font></tt> [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Plot</i> interprets plotting instructions (see <a href="../man7/plot.html"><i>plot</i>(7)</a>) from the <i>files</i>
+ or standard input, drawing the results in a newly created <a href="../man1/rio.html"><i>rio</i>(1)</a>
+ window. Plot persists until a newline is typed in the window.
+ Various options may be interspersed with the <i>file</i> arguments; they
+ take effect at the given point in processing. Options are:
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Double buffer: accumulate the plot off-screen and write to the
+ screen all at once when an erase command is encountered or at
+ end of file.<br>
+ <tt><font size=+1>&#8722;e</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Erase the screen.<br>
+ <tt><font size=+1>&#8722;c</font></tt> <i>col</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the foreground color (see <a href="../man7/plot.html"><i>plot</i>(7)</a> for color names).<br>
+ <tt><font size=+1>&#8722;f</font></tt> <i>fill</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the background color.<br>
+ <tt><font size=+1>&#8722;g</font></tt> <i>grade</i>&nbsp;&nbsp;&nbsp;Set the quality factor for arcs. Higher grades give better
+ quality.<br>
+ <tt><font size=+1>&#8722;p</font></tt> <i>col</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the pen color.<br>
+ <tt><font size=+1>&#8722;w</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pause until a newline is typed on standard input.<br>
+ <tt><font size=+1>&#8722;C</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close the current plot.<br>
+ <tt><font size=+1>&#8722;W &nbsp;&nbsp;&nbsp;x0,y0,x1,y1<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Specify the bounding rectangle of plot&#8217;s window. By default it
+ uses a 512x512 window in the middle of the screen.<br>
+
+ </table>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/plot<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/rio.html"><i>rio</i>(1)</a>, <a href="../man7/plot.html"><i>plot</i>(7)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/plumb.html b/man/man1/plumb.html
new file mode 100644
index 00000000..2a868f7a
--- /dev/null
+++ b/man/man1/plumb.html
@@ -0,0 +1,80 @@
+<head>
+<title>plumb(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PLUMB(1)</b><td align=right><b>PLUMB(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ plumb &ndash; send message to plumber<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>plumb</font></tt> [ <tt><font size=+1>&#8722;p</font></tt> <i>plumbfile</i> ] [ <tt><font size=+1>&#8722;a</font></tt> <i>attributes</i> ] [ <tt><font size=+1>&#8722;s</font></tt> <i>source</i> ] [ <tt><font size=+1>&#8722;d</font></tt> <i>destination</i>
+ ] [ <tt><font size=+1>&#8722;t</font></tt> <i>type</i> ] [ <tt><font size=+1>&#8722;w</font></tt> <i>directory</i> ] <tt><font size=+1>&#8722;i</font></tt> | <i>data...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>plumb</i> command formats and sends a plumbing message whose data
+ is, by default, the concatenation of the argument strings separated
+ by blanks. The options are:<br>
+ <tt><font size=+1>&#8722;p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;write the message to <i>plumbfile</i> (default <tt><font size=+1>/mnt/plumb/send</font></tt>).<br>
+ <tt><font size=+1>&#8722;a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;set the <tt><font size=+1>attr</font></tt> field of the message (default is empty).<br>
+ <tt><font size=+1>&#8722;s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;set the <tt><font size=+1>src</font></tt> field of the message (default is <tt><font size=+1>plumb</font></tt>).<br>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;set the <tt><font size=+1>dst</font></tt> field of the message (default is empty).<br>
+ <tt><font size=+1>&#8722;t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;set the <tt><font size=+1>type</font></tt> field of the message (default is <tt><font size=+1>text</font></tt>).<br>
+ <tt><font size=+1>&#8722;w</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;set the <tt><font size=+1>wdir</font></tt> field of the message (default is the current working
+ directory of <i>plumb</i>).<br>
+ <tt><font size=+1>&#8722;i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;take the data from standard input rather than the argument strings.
+ If an <tt><font size=+1>action=</font></tt> attribute is not otherwise specified, <i>plumb</i> will
+ add an <tt><font size=+1>action=showdata</font></tt> attribute to the message.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>$HOME/lib/plumbing</font></tt>&nbsp;&nbsp;&nbsp;default rules file<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/plumb<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/plumb.html"><i>plumb</i>(3)</a>, <a href="../man4/plumber.html"><i>plumber</i>(4)</a>, <a href="../man7/plumb.html"><i>plumb</i>(7)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/pr.html b/man/man1/pr.html
new file mode 100644
index 00000000..ca8772b2
--- /dev/null
+++ b/man/man1/pr.html
@@ -0,0 +1,90 @@
+<head>
+<title>pr(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PR(1)</b><td align=right><b>PR(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ pr &ndash; print file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>pr</font></tt> [ <i>option ...</i> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Pr</i> produces a printed listing of one or more <i>files</i> on its standard
+ output. The output is separated into pages headed by a date, the
+ name of the file or a specified header, and the page number. With
+ no file arguments, <i>pr</i> prints its standard input.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Options apply to all following files but may be reset between
+ files:<br>
+ <tt><font size=+1>&#8722;</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;Produce <i>n</i>-column output.<br>
+ <tt><font size=+1>+</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;Begin printing with page <i>n</i>.<br>
+ <tt><font size=+1>&#8722;b</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Balance columns on last page, in case of multi-column output.<br>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Double space.<br>
+ <tt><font size=+1>&#8722;e</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;Set the tab stops for input text every <i>n</i> spaces.<br>
+ <tt><font size=+1>&#8722;h</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Take the next argument as a page header (<i>file</i> by default).<br>
+ <tt><font size=+1>&#8722;i</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;Replace sequences of blanks in the output by tabs, using tab
+ stops set every <i>n</i> spaces.<br>
+ <tt><font size=+1>&#8722;f</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Use form feeds to separate pages.<br>
+ <tt><font size=+1>&#8722;l</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;Take the length of the page to be <i>n</i> lines instead of the default
+ 66.<br>
+ <tt><font size=+1>&#8722;m</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print all <i>files</i> simultaneously, each in one column.<br>
+ <tt><font size=+1>&#8722;n</font></tt><i>m</i>&nbsp;&nbsp;&nbsp;Number the lines of each <i>file</i>. The numeric argument <i>m</i>, default
+ 5, sets the width of the line-number field.<br>
+ <tt><font size=+1>&#8722;o</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;Offset the left margin <i>n</i> character positions.<br>
+ <tt><font size=+1>&#8722;p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Pad each file printed to an odd number of pages. For two-sided
+ printers, this will ensure each file will start a new page.<br>
+ <tt><font size=+1>&#8722;s</font></tt><i>c</i>&nbsp;&nbsp;&nbsp;Separate columns by the single character <i>c</i> instead of aligning
+ them with white space. A missing <i>c</i> is taken to be a tab.<br>
+ <tt><font size=+1>&#8722;t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Do not print the 5-line header or the 5-line trailer normally
+ supplied for each page.<br>
+ <tt><font size=+1>&#8722;w</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;For multi-column output, take the width of the page to be <i>n</i>
+ characters instead of the default 72.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/pr.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/cat.html"><i>cat</i>(1)</a>, <a href="../man1/lp.html"><i>lp</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/proof.html b/man/man1/proof.html
new file mode 100644
index 00000000..a442fd71
--- /dev/null
+++ b/man/man1/proof.html
@@ -0,0 +1,119 @@
+<head>
+<title>proof(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PROOF(1)</b><td align=right><b>PROOF(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ proof &ndash; troff output interpreter<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>proof</font></tt> [ <tt><font size=+1>&#8722;m</font></tt><i>mag</i> ] [ <tt><font size=+1>&#8722;/</font></tt><i>nview</i> ] [ <tt><font size=+1>&#8722;F</font></tt> <i>dir</i> ] [ <tt><font size=+1>&#8722;d</font></tt> ] [ <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Proof</i> reads <a href="../man1/troff.html"><i>troff</i>(1)</a> intermediate language from <i>file</i> or standard
+ input and simulates the resulting pages on the screen.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ After a page of text is displayed, <i>proof</i> pauses for a command
+ from the keyboard. The typed commands are:<br>
+ newlineGo on to next page of text.<br>
+ <tt><font size=+1>&#8722;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Go back to the previous page.<br>
+ <tt><font size=+1>q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quit.<br>
+ <tt><font size=+1>p</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print page <i>n</i>. An out-of-bounds page number means the end nearer
+ to that number; a missing number means the current page; a signed
+ number means an offset to the current page.<br>
+ <i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Same as <tt><font size=+1>p</font></tt><i>n</i>.<br>
+ <tt><font size=+1>c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clear the screen, then wait for another command.<br>
+ <tt><font size=+1>m</font></tt><i>mag</i>&nbsp;&nbsp;&nbsp;Change the magnification at which the output is printed. Normally
+ it is printed with magnification .9; <i>mag</i>=.5 shrinks it to half
+ size; <i>mag</i>=2 doubles the size.<br>
+ <tt><font size=+1>x</font></tt><i>val</i>&nbsp;&nbsp;&nbsp;&nbsp;Move everything <i>val</i> screen pixels to the right (left, if <i>val</i>
+ is negative).<br>
+ <tt><font size=+1>y</font></tt><i>val</i>&nbsp;&nbsp;&nbsp;&nbsp;Move everything <i>val</i> screen pixels down (up, if <i>val</i> is negative).<br>
+ <tt><font size=+1>/</font></tt><i>nview</i>&nbsp;&nbsp;&nbsp;Split the window into <i>nview</i> pieces. The current page goes
+ into the rightmost, bottommost piece, and previous pages are shown
+ in the other pieces.<br>
+ <tt><font size=+1>&#8722;F</font></tt> <i>dir</i>Use <i>dir</i> for fonts instead of <tt><font size=+1>/lib/font/bit</font></tt>.<br>
+ <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Toggle the debug flag.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ These commands are also available, under slightly different form,
+ from a menu on button 3. The <tt><font size=+1>pan</font></tt> menu item allows arbitrary positioning
+ of the page: after selecting <tt><font size=+1>pan</font></tt>, press the mouse button again
+ and hold it down while moving the page to the desired location.
+ The page will be redisplayed in its entirety when
+ the button is released. Mouse button 1 also pans, without the
+ need for selecting from a menu.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>m</font></tt>, <tt><font size=+1>x</font></tt>, <tt><font size=+1>y</font></tt>, <tt><font size=+1>F</font></tt>, <tt><font size=+1>/</font></tt>, and <tt><font size=+1>d</font></tt> commands are also available as command
+ line options.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/font/*<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ fonts<br>
+
+ </table>
+ <tt><font size=+1>/usr/local/plan9/font/MAP<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ how to convert troff output fonts and character names into screen
+ fonts and character numbers<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/proof<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/lp.html"><i>lp</i>(1)</a>, <a href="../man1/gs.html"><i>gs</i>(1)</a>, <a href="../man1/page.html"><i>page</i>(1)</a><br>
+ J. F. Ossanna and B. W. Kernighan, &#8220;Troff User&#8217;s Manual&#8221;<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/ps.html b/man/man1/ps.html
new file mode 100644
index 00000000..bf19c676
--- /dev/null
+++ b/man/man1/ps.html
@@ -0,0 +1,95 @@
+<head>
+<title>ps(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PS(1)</b><td align=right><b>PS(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ps, psu &ndash; process status<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>ps</font></tt> [ <tt><font size=+1>&#8722;pa</font></tt> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>psu</font></tt> [ <tt><font size=+1>&#8722;pa</font></tt> ] [ <i>user</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Ps</i> prints information about processes. <i>Psu</i> prints only information
+ about processes started by <i>user</i> (default <tt><font size=+1>$USER</font></tt>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For each process reported, the user, process id, user time, system
+ time, size, state, and command name are printed. State is one
+ of the following:<br>
+ <tt><font size=+1>Moribund</font></tt>&nbsp;&nbsp;&nbsp;Process has exited and is about to have its resources
+ reclaimed.<br>
+ <tt><font size=+1>Ready</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;on the queue of processes ready to be run.<br>
+ <tt><font size=+1>Scheding</font></tt>&nbsp;&nbsp;&nbsp;about to be run.<br>
+ <tt><font size=+1>Running</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;running.<br>
+ <tt><font size=+1>Queueing</font></tt>&nbsp;&nbsp;&nbsp;waiting on a queue for a resource.<br>
+ <tt><font size=+1>Wakeme</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;waiting for I/O or some other kernel event to wake it up.<br>
+ <tt><font size=+1>Broken</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dead of unnatural causes; lingering so that it can be examined.<br>
+ <tt><font size=+1>Stopped</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;stopped.<br>
+ <tt><font size=+1>Stopwait</font></tt>&nbsp;&nbsp;&nbsp;waiting for another process to stop.<br>
+ <tt><font size=+1>Fault</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;servicing a page fault.<br>
+ <tt><font size=+1>Idle</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;waiting for something to do (kernel processes only).<br>
+ <tt><font size=+1>New</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;being created.<br>
+ <tt><font size=+1>Pageout</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;paging out some other process.<br>
+ <i>Syscall</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;performing the named system call.<br>
+ <tt><font size=+1>no</font></tt> <i>resource</i>&nbsp;&nbsp;&nbsp;waiting for more of a critical <i>resource</i>.<br>
+ <i>wchan</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;waiting on the named wait channel (on a Unix kernel).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ With the <tt><font size=+1>&#8722;p</font></tt> flag, <i>ps</i> also prints, after the system time, the baseline
+ and current priorities of each process.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;a</font></tt> flag causes <i>ps</i> to print the arguments for the process.
+ Newlines in arguments will be translated to spaces for display.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin/ps<br>
+ /usr/local/plan9/bin/psu<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/acid.html"><i>acid</i>(1)</a>, <a href="../man1/db.html"><i>db</i>(1)</a>, <a href="../man1/kill.html"><i>kill</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/psfonts.html b/man/man1/psfonts.html
new file mode 100644
index 00000000..b0510a81
--- /dev/null
+++ b/man/man1/psfonts.html
@@ -0,0 +1,148 @@
+<head>
+<title>psfonts(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PSFONTS(1)</b><td align=right><b>PSFONTS(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ psfonts, psdownload &ndash; add necessary fonts to PostScript document
+ for printing<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>psfonts</font></tt> [ <i>files ...</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>psdownload</font></tt> [ <tt><font size=+1>options</font></tt> ] [ <i>files ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Plan 9&#8217;s <a href="../man1/troff.html"><i>troff</i>(1)</a> and <a href="../man1/tr2post.html"><i>tr2post</i>(1)</a> use non-standard PostScript fonts
+ (found in <tt><font size=+1>/usr/local/plan9/postscript/font</font></tt>). Before sending PostScript
+ output from <i>tr2post</i> to a standard printer, code implementing the
+ non-standard fonts must be added to the PostScript.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Psfonts</i> copies <i>files</i> (or standard input) to standard output, adding
+ necessary PostScript fonts.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Psdownload</i> is the more general program used to implement <i>psfonts</i>.
+ The options are:<br>
+ <tt><font size=+1>&#8722;c</font></tt> <i>comment<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Expect the fonts used in the document to be listed in a comment
+ beginning with this string (default <tt><font size=+1>%%DocumentFonts:</font></tt>).<br>
+
+ </table>
+ <tt><font size=+1>&#8722;f</font></tt> <i>atend<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Expect extra fonts comments at the end of the document, so read
+ the entire input before starting output (by default this only
+ happens if a <tt><font size=+1>%%DocumentFonts: (atend)</font></tt> comment is encountered).<br>
+
+ </table>
+ <tt><font size=+1>&#8722;m</font></tt> <i>mapfile<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Use <i>mapfile</i> to translate from PostScript font names to files.
+ Each line in the map has two white space-separated fields: a font
+ name and the corresponding file. If <i>mapfile</i> is not a rooted path,
+ it is evaluated relative to the <i>fontdir</i> (see <tt><font size=+1>&#8722;H</font></tt> below).<br>
+
+ </table>
+ <tt><font size=+1>&#8722;p</font></tt> <i>printer<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set the name of the printer. This option is deprecated. Its only
+ effect is to override the <tt><font size=+1>&#8722;r</font></tt> option, causing <i>fontdir</i><tt><font size=+1>/printers/</font></tt><i>printer</i>
+ to be used as the resident fonts list.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;r</font></tt> <i>residentfonts<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Read a list of fonts assumed to be on the printer (not necessary
+ to re-download) from the file <i>residentfonts</i>. If <i>residentfonts</i>
+ is not a rooted path, it is evaluated relative to the <i>fontdir</i>
+ (see <tt><font size=+1>&#8722;H</font></tt> below).<br>
+
+ </table>
+ <tt><font size=+1>&#8722;H</font></tt> <i>fontdir<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set the directory that is assumed to contain the PostScript fonts
+ and information about printers (see <tt><font size=+1>&#8722;m</font></tt>, <tt><font size=+1>&#8722;p</font></tt>, and <tt><font size=+1>&#8722;r</font></tt> above; default
+ <tt><font size=+1>/usr/local/plan9/postscript/font</font></tt>).<br>
+
+ </table>
+ <tt><font size=+1>&#8722;T</font></tt> <i>tmpdir<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Use <i>tmpdir</i> for storing temporary files (default <tt><font size=+1>/var/tmp</font></tt>).<br>
+
+ </table>
+ <tt><font size=+1>&#8722;D</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Produce copious amounts of debugging information on standard
+ error.<br>
+ <tt><font size=+1>&#8722;I</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Continue running even after fatal errors occur.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ See <a href="../man1/tr2post.html"><i>tr2post</i>(1)</a> for an example.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin/psfonts<br>
+ /usr/local/plan9/src/cmd/postscript/download<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/troff.html"><i>troff</i>(1)</a>, <a href="../man1/tr2post.html"><i>tr2post</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/pwd.html b/man/man1/pwd.html
new file mode 100644
index 00000000..ab8b8c3d
--- /dev/null
+++ b/man/man1/pwd.html
@@ -0,0 +1,73 @@
+<head>
+<title>pwd(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PWD(1)</b><td align=right><b>PWD(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ pwd, pbd &ndash; working directory<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>pwd<br>
+ pbd<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Pwd</i> prints the path name of the working (current) directory.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Pbd</i> prints the base name of the working (current) directory. It
+ prints no final newline and is intended for applications such
+ as constructing shell prompts.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/pbd.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>cd</i> in <a href="../man1/rc.html"><i>rc</i>(1)</a>, <a href="../man3/getwd.html"><i>getwd</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Pwd</i> is not provided. Unix already provides one.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/rc.html b/man/man1/rc.html
new file mode 100644
index 00000000..a599adfd
--- /dev/null
+++ b/man/man1/rc.html
@@ -0,0 +1,655 @@
+<head>
+<title>rc(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>RC(1)</b><td align=right><b>RC(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ rc, cd, eval, exec, exit, flag, rfork, shift, wait, whatis, .,
+ ~ &ndash; command language<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>rc</font></tt> [ <tt><font size=+1>&#8722;srdiIlxepvV</font></tt> ] [ <tt><font size=+1>&#8722;c command</font></tt> ] [ <i>file</i> [ <i>arg ...</i> ]]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Rc</i> is the Plan 9 shell. It executes command lines read from a
+ terminal or a file or, with the <tt><font size=+1>&#8722;c</font></tt> flag, from <i>rc&#8217;s</i> argument list.<br>
+ <p><font size=+1><b>Command Lines </b></font><br>
+ A command line is a sequence of commands, separated by ampersands
+ or semicolons (<tt><font size=+1>&amp;</font></tt> or <tt><font size=+1>;</font></tt>), terminated by a newline. The commands are
+ executed in sequence from left to right. <i>Rc</i> does not wait for
+ a command followed by <tt><font size=+1>&amp;</font></tt> to finish executing before starting the
+ following command. Whenever a command
+ followed by <tt><font size=+1>&amp;</font></tt> is executed, its process id is assigned to the <i>rc</i>
+ variable <tt><font size=+1>$apid</font></tt>. Whenever a command <i>not</i> followed by <tt><font size=+1>&amp;</font></tt> exits or is
+ terminated, the <i>rc</i> variable <tt><font size=+1>$status</font></tt> gets the process&#8217;s wait message
+ (see <a href="../man3/wait.html"><i>wait</i>(3)</a>); it will be the null string if the command was successful.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A long command line may be continued on subsequent lines by typing
+ a backslash (<tt><font size=+1>\</font></tt>) followed by a newline. This sequence is treated
+ as though it were a blank. Backslash is not otherwise a special
+ character.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A number-sign (<tt><font size=+1>#</font></tt>) and any following characters up to (but not
+ including) the next newline are ignored, except in quotation marks.<br>
+ <p><font size=+1><b>Simple Commands </b></font><br>
+ A simple command is a sequence of arguments interspersed with
+ I/O redirections. If the first argument is the name of an <i>rc</i> function
+ or of one of <i>rc&#8217;s</i> built-in commands, it is executed by <i>rc</i>. Otherwise
+ if the name starts with a slash (<tt><font size=+1>/</font></tt>), it must be the path name
+ of the program to be executed. Names containing no
+ initial slash are searched for in a list of directory names stored
+ in <tt><font size=+1>$path</font></tt>. The first executable file of the given name found in
+ a directory in <tt><font size=+1>$path</font></tt> is the program to be executed. To be executable,
+ the user must have execute permission (see <a href="../man3/stat.html"><i>stat</i>(3)</a>) and the file
+ must be either an executable binary for the current
+ machine&#8217;s CPU type, or a shell script. Shell scripts begin with
+ a line containing the full path name of a shell (usually <tt><font size=+1>/bin/rc</font></tt>),
+ prefixed by <tt><font size=+1>#!</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The first word of a simple command cannot be a keyword unless
+ it is quoted or otherwise disguised. The keywords are<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>for in while if not switch fn ~ ! @<br>
+ </font></tt>
+ </table>
+ <p><font size=+1><b>Arguments and Variables </b></font><br>
+ A number of constructions may be used where <i>rc&#8217;s</i> syntax requires
+ an argument to appear. In many cases a construction&#8217;s value will
+ be a list of arguments rather than a single string.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The simplest kind of argument is the unquoted word: a sequence
+ of one or more characters none of which is a blank, tab, newline,
+ or any of the following:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1># ; &amp; | ^ $ = ` ' { } ( ) &lt; &gt;<br>
+ </font></tt>
+ </table>
+ An unquoted word that contains any of the characters <tt><font size=+1>* ? [</font></tt> is
+ a pattern for matching against file names. The character <tt><font size=+1>*</font></tt> matches
+ any sequence of characters, <tt><font size=+1>?</font></tt> matches any single character, and
+ <tt><font size=+1>[</font></tt><i>class</i><tt><font size=+1>]</font></tt> matches any character in the <i>class</i>. If the first character
+ of <i>class</i> is <tt><font size=+1>~</font></tt>, the class is complemented. The <i>class</i> may
+ also contain pairs of characters separated by <tt><font size=+1>&#8722;</font></tt>, standing for
+ all characters lexically between the two. The character <tt><font size=+1>/</font></tt> must
+ appear explicitly in a pattern, as must the first character of
+ the path name components <tt><font size=+1>.</font></tt> and <tt><font size=+1>..</font></tt>. A pattern is replaced by a
+ list of arguments, one for each path name matched, except that
+ a
+ pattern matching no names is not replaced by the empty list, but
+ rather stands for itself. Pattern matching is done after all other
+ operations. Thus,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>x=/tmp echo $x^/*.c<br>
+ </font></tt>
+ </table>
+ matches <tt><font size=+1>/tmp/*.c</font></tt>, rather than matching <tt><font size=+1>/*.c</font></tt> and then prefixing
+ <tt><font size=+1>/tmp</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A quoted word is a sequence of characters surrounded by single
+ quotes (<tt><font size=+1>'</font></tt>). A single quote is represented in a quoted word by
+ a pair of quotes (<tt><font size=+1>''</font></tt>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each of the following is an argument.<br>
+ <tt><font size=+1>(</font></tt><i>arguments</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The value of a sequence of arguments enclosed in parentheses is
+ a list comprising the members of each element of the sequence.
+ Argument lists have no recursive structure, although their syntax
+ may suggest it. The following are entirely equivalent:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>echo hi there everybody<br>
+ ((echo) (hi there) everybody)<br>
+ </font></tt>
+ </table>
+
+ </table>
+ <tt><font size=+1>$</font></tt><i>argument<br>
+ </i><tt><font size=+1>$</font></tt><i>argument</i><tt><font size=+1>(</font></tt><i>subscript</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>argument</i> after the <tt><font size=+1>$</font></tt> is the name of a variable whose value
+ is substituted. Multiple levels of indirection are possible, but
+ of questionable utility. Variable values are lists of strings.
+ If <i>argument</i> is a number <i>n</i>, the value is the <i>n</i>th element of <tt><font size=+1>$*</font></tt>,
+ unless <tt><font size=+1>$*</font></tt> doesn&#8217;t have <i>n</i> elements, in which case the value is
+ empty. If <i>argument</i> is followed by a parenthesized list of subscripts,
+ the value substituted is a list composed of the requested elements
+ (origin 1). The parenthesis must follow the variable name with
+ no spaces. Assignments to variables are described below.<br>
+
+ </table>
+ <tt><font size=+1>$#</font></tt><i>argument<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The value is the number of elements in the named variable. A variable
+ never assigned a value has zero elements.<br>
+
+ </table>
+ $&quot;<i>argument<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The value is a single string containing the components of the
+ named variable separated by spaces. A variable with zero elements
+ yields the empty string.<br>
+
+ </table>
+ <tt><font size=+1>`{</font></tt><i>command</i><tt><font size=+1>}<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>rc</i> executes the <i>command</i> and reads its standard output, splitting
+ it into a list of arguments, using characters in <tt><font size=+1>$ifs</font></tt> as separators.
+ If <tt><font size=+1>$ifs</font></tt> is not otherwise set, its value is <tt><font size=+1>' \t\n'</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>&lt;{</font></tt><i>command</i><tt><font size=+1>}<br>
+ &gt;{</font></tt><i>command</i><tt><font size=+1>}<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>command</i> is executed asynchronously with its standard output
+ or standard input connected to a pipe. The value of the argument
+ is the name of a file referring to the other end of the pipe.
+ This allows the construction of non-linear pipelines. For example,
+ the following runs two commands <tt><font size=+1>old</font></tt> and <tt><font size=+1>new
+ </font></tt>and uses <tt><font size=+1>cmp</font></tt> to compare their outputs<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>cmp &lt;{old} &lt;{new}<br>
+ </font></tt>
+ </table>
+
+ </table>
+ <i>argument</i><tt><font size=+1>^</font></tt><i>argument<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>^</font></tt> operator concatenates its two operands. If the two operands
+ have the same number of components, they are concatenated pairwise.
+ If not, then one operand must have one component, and the other
+ must be non-empty, and concatenation is distributive.<br>
+
+ </table>
+ <p><font size=+1><b>Free Carets </b></font><br>
+ In most circumstances, <i>rc</i> will insert the <tt><font size=+1>^</font></tt> operator automatically
+ between words that are not separated by white space. Whenever
+ one of <tt><font size=+1>$ ' `</font></tt> follows a quoted or unquoted word or an unquoted
+ word follows a quoted word with no intervening blanks or tabs,
+ a <tt><font size=+1>^</font></tt> is inserted between the two. If an unquoted word
+ immediately follows a <tt><font size=+1>$</font></tt> and contains a character other than an
+ alphanumeric, underscore, or <tt><font size=+1>*</font></tt>, a <tt><font size=+1>^</font></tt> is inserted before the first
+ such character. Thus<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>cc &#8722;$flags $stem.c
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ is equivalent to<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>cc &#8722;^$flags $stem^.c<br>
+ </font></tt>
+ </table>
+ <p><font size=+1><b>I/O Redirections </b></font><br>
+ The sequence <tt><font size=+1>&gt;</font></tt><i>file</i> redirects the standard output file (file descriptor
+ 1, normally the terminal) to the named <i>file</i>; <tt><font size=+1>&gt;&gt;</font></tt><i>file</i> appends standard
+ output to the file. The standard input file (file descriptor 0,
+ also normally the terminal) may be redirected from a file by the
+ sequence <tt><font size=+1>&lt;</font></tt><i>file</i>, or from an inline &#8216;here document&#8217; by the
+ sequence <tt><font size=+1>&lt;&lt;</font></tt><i>eof-marker</i>. The contents of a here document are lines
+ of text taken from the command input stream up to a line containing
+ nothing but the <i>eof-marker</i>, which may be either a quoted or unquoted
+ word. If <i>eof-marker</i> is unquoted, variable names of the form <tt><font size=+1>$</font></tt><i>word</i>
+ have their values substituted from <i>rc&#8217;s
+ </i>environment. If <tt><font size=+1>$</font></tt><i>word</i> is followed by a caret (<tt><font size=+1>^</font></tt>), the caret is
+ deleted. If <i>eof-marker</i> is quoted, no substitution occurs.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Redirections may be applied to a file-descriptor other than standard
+ input or output by qualifying the redirection operator with a
+ number in square brackets. For example, the diagnostic output
+ (file descriptor 2) may be redirected by writing <tt><font size=+1>cc junk.c &gt;[2]junk</font></tt>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A file descriptor may be redirected to an already open descriptor
+ by writing <tt><font size=+1>&gt;[</font></tt><i>fd0</i><tt><font size=+1>=</font></tt><i>fd1</i><tt><font size=+1>]</font></tt> or <tt><font size=+1>&lt;[</font></tt><i>fd0</i><tt><font size=+1>=</font></tt><i>fd1</i><tt><font size=+1>]</font></tt>. <i>Fd1</i> is a previously opened
+ file descriptor and <i>fd0</i> becomes a new copy (in the sense of <a href="../man3/dup.html"><i>dup</i>(3)</a>)
+ of it. A file descriptor may be closed by writing <tt><font size=+1>&gt;[</font></tt><i>fd0</i><tt><font size=+1>=]</font></tt> or <tt><font size=+1>&lt;[</font></tt><i>fd0</i><tt><font size=+1>=]</font></tt>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Redirections are executed from left to right. Therefore, <tt><font size=+1>cc junk.c
+ &gt;/dev/null &gt;[2=1]</font></tt> and <tt><font size=+1>cc junk.c &gt;[2=1] &gt;/dev/null</font></tt> have different effects:
+ the first puts standard output in <tt><font size=+1>/dev/null</font></tt> and then puts diagnostic
+ output in the same place, where the second directs diagnostic
+ output to the
+ terminal and sends standard output to <tt><font size=+1>/dev/null</font></tt>.<br>
+ <p><font size=+1><b>Compound Commands </b></font><br>
+ A pair of commands separated by a pipe operator (<tt><font size=+1>|</font></tt>) is a command.
+ The standard output of the left command is sent through a pipe
+ to the standard input of the right command. The pipe operator
+ may be decorated to use different file descriptors. <tt><font size=+1>|[</font></tt><i>fd</i><tt><font size=+1>]</font></tt> connects
+ the output end of the pipe to file descriptor <i>fd</i> rather
+ than 1. <tt><font size=+1>|[</font></tt><i>fd0</i><tt><font size=+1>=</font></tt><i>fd1</i><tt><font size=+1>]</font></tt> connects output to <i>fd1</i> of the left command
+ and input to <i>fd0</i> of the right command.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A pair of commands separated by <tt><font size=+1>&amp;&amp;</font></tt> or <tt><font size=+1>||</font></tt> is a command. In either
+ case, the left command is executed and its exit status examined.
+ If the operator is <tt><font size=+1>&amp;&amp;</font></tt> the right command is executed if the left
+ command&#8217;s status is null. <tt><font size=+1>||</font></tt> causes the right command to be executed
+ if the left command&#8217;s status is non-null.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The exit status of a command may be inverted (non-null is changed
+ to null, null is changed to non-null) by preceding it with a <tt><font size=+1>!</font></tt>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>|</font></tt> operator has highest precedence, and is left-associative
+ (i.e. binds tighter to the left than the right). <tt><font size=+1>!</font></tt> has intermediate
+ precedence, and <tt><font size=+1>&amp;&amp;</font></tt> and <tt><font size=+1>||</font></tt> have the lowest precedence.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The unary <tt><font size=+1>@</font></tt> operator, with precedence equal to <tt><font size=+1>!</font></tt>, causes its operand
+ to be executed in a subshell.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each of the following is a command.<br>
+ <tt><font size=+1>if (</font></tt> <i>list</i> <tt><font size=+1>)</font></tt> <i>command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A <i>list</i> is a sequence of commands, separated by <tt><font size=+1>&amp;</font></tt>, <tt><font size=+1>;</font></tt>, or newline.
+ It is executed and if its exit status is null, the <i>command</i> is
+ executed.<br>
+
+ </table>
+ <tt><font size=+1>if not</font></tt> <i>command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The immediately preceding command must have been <tt><font size=+1>if(</font></tt><i>list</i><tt><font size=+1>)</font></tt> <i>command</i>.
+ If its condition was non-zero, the <i>command</i> is executed.<br>
+
+ </table>
+ <tt><font size=+1>for(</font></tt><i>name</i> <tt><font size=+1>in</font></tt> <i>arguments</i><tt><font size=+1>)</font></tt> <i>command<br>
+ </i><tt><font size=+1>for(</font></tt><i>name</i><tt><font size=+1>)</font></tt> <i>command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>command</i> is executed once for each <i>argument</i> with that argument
+ assigned to <i>name</i>. If the argument list is omitted, <tt><font size=+1>$*</font></tt> is used.<br>
+
+ </table>
+ <tt><font size=+1>while(</font></tt><i>list</i><tt><font size=+1>)</font></tt> <i>command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>list</i> is executed repeatedly until its exit status is non-null.
+ Each time it returns null status, the <i>command</i> is executed. An
+ empty <i>list</i> is taken to give null status.<br>
+
+ </table>
+ <tt><font size=+1>switch(</font></tt><i>argument</i><tt><font size=+1>){</font></tt><i>list</i><tt><font size=+1>}<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>list</i> is searched for simple commands beginning with the word
+ <tt><font size=+1>case</font></tt>. (The search is only at the &#8216;top level&#8217; of the <i>list</i>. That
+ is, <tt><font size=+1>cases</font></tt> in nested constructs are not found.) <i>Argument</i> is matched
+ against each word following <tt><font size=+1>case</font></tt> using the pattern-matching algorithm
+ described above, except that <tt><font size=+1>/</font></tt> and the
+ first characters of <tt><font size=+1>.</font></tt> and <tt><font size=+1>..</font></tt> need not be matched explicitly. When
+ a match is found, commands in the list are executed up to the
+ next following <tt><font size=+1>case</font></tt> command (at the top level) or the closing
+ brace.<br>
+
+ </table>
+ <tt><font size=+1>{</font></tt><i>list</i><tt><font size=+1>}<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Braces serve to alter the grouping of commands implied by operator
+ priorities. The <i>body</i> is a sequence of commands separated by <tt><font size=+1>&amp;</font></tt>,
+ <tt><font size=+1>;</font></tt>, or newline.<br>
+
+ </table>
+ <tt><font size=+1>fn</font></tt> <i>name</i><tt><font size=+1>{</font></tt><i>list</i><tt><font size=+1>}<br>
+ fn</font></tt> <i>name<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The first form defines a function with the given <i>name</i>. Subsequently,
+ whenever a command whose first argument is <i>name</i> is encountered,
+ the current value of the remainder of the command&#8217;s argument list
+ will be assigned to <tt><font size=+1>$*</font></tt>, after saving its current value, and <i>rc</i>
+ will execute the <i>list</i>. The second form removes
+ <i>name</i>&#8217;s function definition.<br>
+
+ </table>
+ <tt><font size=+1>fn</font></tt> <i>note</i><tt><font size=+1>{</font></tt><i>list</i><tt><font size=+1>}<br>
+ fn</font></tt> <i>note<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A function with a special name will be called when <i>rc</i> receives
+ a corresponding note; see <a href="../man3/notify.html"><i>notify</i>(3)</a>. The valid note names (and
+ corresponding notes) are <tt><font size=+1>sighup</font></tt> (<tt><font size=+1>hangup</font></tt>), <tt><font size=+1>sigint</font></tt> (<tt><font size=+1>interrupt</font></tt>),
+ <tt><font size=+1>sigalrm</font></tt> (<tt><font size=+1>alarm</font></tt>), and <tt><font size=+1>sigfpe</font></tt> (floating point trap). By default
+ <i>rc</i> exits on receiving any signal, except when
+ run interactively, in which case interrupts and quits normally
+ cause <i>rc</i> to stop whatever it&#8217;s doing and start reading a new command.
+ The second form causes <i>rc</i> to handle a signal in the default manner.
+ <i>Rc</i> recognizes an artificial note, <tt><font size=+1>sigexit</font></tt>, which occurs when <i>rc</i>
+ is about to finish executing.
+
+ </table>
+ <i>name</i><tt><font size=+1>=</font></tt><i>argument command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Any command may be preceded by a sequence of assignments interspersed
+ with redirections. The assignments remain in effect until the
+ end of the command, unless the command is empty (i.e. the assignments
+ stand alone), in which case they are effective until rescinded
+ by later assignments.
+
+ </table>
+ <p><font size=+1><b>Built-in Commands </b></font><br>
+ These commands are executed internally by <i>rc</i>, usually because
+ their execution changes or depends on <i>rc</i>&#8217;s internal state.<br>
+ <tt><font size=+1>.</font></tt> <i>file ...<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Execute commands from <i>file</i>. <tt><font size=+1>$*</font></tt> is set for the duration to the
+ remainder of the argument list following <i>file</i>. <i>File</i> is searched
+ for using <tt><font size=+1>$path</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>builtin</font></tt> <i>command ...<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Execute <i>command</i> as usual except that any function named <i>command</i>
+ is ignored in favor of the built-in meaning.<br>
+
+ </table>
+ <tt><font size=+1>cd [</font></tt><i>dir</i><tt><font size=+1>]<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Change the current directory to <i>dir</i>. The default argument is <tt><font size=+1>$home</font></tt>.
+ <i>dir</i> is searched for in each of the directories mentioned in <tt><font size=+1>$cdpath</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>eval [</font></tt><i>arg ...</i><tt><font size=+1>]<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The arguments are concatenated separated by spaces into a single
+ string, read as input to <i>rc</i>, and executed.<br>
+
+ </table>
+ <tt><font size=+1>exec [</font></tt><i>command ...</i><tt><font size=+1>]<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This instance of <i>rc</i> replaces itself with the given (non-built-in)
+ <i>command</i>.<br>
+
+ </table>
+ <tt><font size=+1>flag</font></tt> <i>f</i> <tt><font size=+1>[+&#8722;]<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Either set (<tt><font size=+1>+</font></tt>), clear (<tt><font size=+1>&#8722;</font></tt>), or test (neither <tt><font size=+1>+</font></tt> nor <tt><font size=+1>&#8722;</font></tt>) the flag
+ <i>f</i>, where <i>f</i> is a single character, one of the command line flags
+ (see Invocation, below).<br>
+
+ </table>
+ <tt><font size=+1>exit [</font></tt><i>status</i><tt><font size=+1>]<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Exit with the given exit status. If none is given, the current
+ value of <tt><font size=+1>$status</font></tt> is used.<br>
+
+ </table>
+ <tt><font size=+1>rfork</font></tt> [<tt><font size=+1>nNeEsfFm</font></tt>]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Become a new process group using <tt><font size=+1>rfork(</font></tt><i>flags</i><tt><font size=+1>)</font></tt> where <i>flags</i> is composed
+ of the bitwise OR of the <tt><font size=+1>rfork</font></tt> flags specified by the option letters
+ (see <a href="../man2/fork.html"><i>fork</i>(2)</a>). If no <i>flags</i> are given, they default to <tt><font size=+1>ens</font></tt>. The
+ <i>flags</i> and their meanings are: <tt><font size=+1>n</font></tt> is <tt><font size=+1>RFNAMEG</font></tt>; <tt><font size=+1>N</font></tt> is <tt><font size=+1>RFCNAMEG</font></tt>; <tt><font size=+1>e</font></tt> is
+ <tt><font size=+1>RFENVG</font></tt>; <tt><font size=+1>E</font></tt> is <tt><font size=+1>RFCENVG</font></tt>; <tt><font size=+1>s</font></tt> is
+ <tt><font size=+1>RFNOTEG</font></tt>; <tt><font size=+1>f</font></tt> is <tt><font size=+1>RFFDG</font></tt>; <tt><font size=+1>F</font></tt> is <tt><font size=+1>RFCFDG</font></tt>; and <tt><font size=+1>m</font></tt> is <tt><font size=+1>RFNOMNT</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>shift [</font></tt><i>n</i><tt><font size=+1>]<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Delete the first <i>n</i> (default 1) elements of <tt><font size=+1>$*</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>wait [</font></tt><i>pid</i><tt><font size=+1>]<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Wait for the process with the given <i>pid</i> to exit. If no <i>pid</i> is
+ given, all outstanding processes are waited for.<br>
+
+ </table>
+ <tt><font size=+1>whatis</font></tt> <i>name ...<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the value of each <i>name</i> in a form suitable for input to <i>rc</i>.
+ The output is an assignment to any variable, the definition of
+ any function, a call to <tt><font size=+1>builtin</font></tt> for any built-in command, or the
+ completed pathname of any executable file.<br>
+
+ </table>
+ <tt><font size=+1>~</font></tt> <i>subject pattern ...<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>subject</i> is matched against each <i>pattern</i> in sequence. If it
+ matches any pattern, <tt><font size=+1>$status</font></tt> is set to zero. Otherwise, <tt><font size=+1>$status</font></tt>
+ is set to one. Patterns are the same as for file name matching,
+ except that <tt><font size=+1>/</font></tt> and the first character of <tt><font size=+1>.</font></tt> and <tt><font size=+1>..</font></tt> need not be
+ matched explicitly. The <i>patterns</i> are not subjected to
+ file name matching before the <tt><font size=+1>~</font></tt> command is executed, so they need
+ not be enclosed in quotation marks.<br>
+
+ </table>
+ <p><font size=+1><b>Environment </b></font><br>
+ The <i>environment</i> is a list of strings made available to executing
+ binaries by the kernel. <i>Rc</i> creates an environment entry for each
+ variable whose value is non-empty, and for each function. The
+ string for a variable entry has the variable&#8217;s name followed by
+ <tt><font size=+1>=</font></tt> and its value. If the value has more than one component,
+ these are separated by SOH (001) characters. The string for a
+ function is just the <i>rc</i> input that defines the function. The name
+ of a function in the environment is the function name preceded
+ by <tt><font size=+1>fn#</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When <i>rc</i> starts executing it reads variable and function definitions
+ from its environment.<br>
+ <p><font size=+1><b>Special Variables </b></font><br>
+ The following variables are set or used by <i>rc</i>.<br>
+ <tt><font size=+1>$*</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set to <i>rc</i>&#8217;s argument list during initialization. Whenever a
+ <tt><font size=+1>.</font></tt> command or a function is executed, the current value is saved
+ and <tt><font size=+1>$*</font></tt> receives the new argument list. The saved value is restored
+ on completion of the <tt><font size=+1>.</font></tt> or function.<br>
+ <tt><font size=+1>$apid</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whenever a process is started asynchronously with <tt><font size=+1>&amp;</font></tt>, <tt><font size=+1>$apid</font></tt>
+ is set to its process id.<br>
+ <tt><font size=+1>$home</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default directory for <tt><font size=+1>cd</font></tt>.<br>
+ <tt><font size=+1>$ifs</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The input field separators used in backquote substitutions.
+ If <tt><font size=+1>$ifs</font></tt> is not set in <i>rc</i>&#8217;s environment, it is initialized to blank,
+ tab and newline.<br>
+ <tt><font size=+1>$path</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The search path used to find commands and input files for
+ the <tt><font size=+1>.</font></tt> command. If not set in the environment, it is initialized
+ by parsing the <tt><font size=+1>$PATH</font></tt> variable (as in <a href="../man1/sh.html"><i>sh</i>(1)</a>) or by <tt><font size=+1>path=(. /bin)</font></tt>.
+ The variables <tt><font size=+1>$path</font></tt> and <tt><font size=+1>$PATH</font></tt> are maintained together: changes
+ to one will be reflected in the other.
+ <tt><font size=+1>$pid</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set during initialization to <i>rc</i>&#8217;s process id.<br>
+ <tt><font size=+1>$prompt</font></tt>&nbsp;&nbsp;&nbsp;When <i>rc</i> is run interactively, the first component of <tt><font size=+1>$prompt</font></tt>
+ is printed before reading each command. The second component is
+ printed whenever a newline is typed and more lines are required
+ to complete the command. If not set in the environment, it is
+ initialized by <tt><font size=+1>prompt=('% ' ' ')</font></tt>.
+ <tt><font size=+1>$status</font></tt>&nbsp;&nbsp;&nbsp;Set to the wait message of the last-executed program. (unless
+ started with <tt><font size=+1>&amp;). !</font></tt> and <tt><font size=+1>~</font></tt> also change <tt><font size=+1>$status</font></tt>. Its value is used
+ to control execution in <tt><font size=+1>&amp;&amp;</font></tt>, <tt><font size=+1>||</font></tt>, <tt><font size=+1>if</font></tt> and <tt><font size=+1>while</font></tt> commands. When <i>rc</i> exits
+ at end-of-file of its input or on executing an <tt><font size=+1>exit</font></tt> command with
+ no argument, <tt><font size=+1>$status</font></tt> is its
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ exit status.<br>
+
+ </table>
+
+ </table>
+ <p><font size=+1><b>Invocation </b></font><br>
+ If <i>rc</i> is started with no arguments it reads commands from standard
+ input. Otherwise its first non-flag argument is the name of a
+ file from which to read commands (but see <tt><font size=+1>&#8722;c</font></tt> below). Subsequent
+ arguments become the initial value of <tt><font size=+1>$*</font></tt>. <i>Rc</i> accepts the following
+ command-line flags.<br>
+ <tt><font size=+1>&#8722;c</font></tt> <i>string</i>&nbsp;&nbsp;&nbsp;Commands are read from <i>string</i>.<br>
+ <tt><font size=+1>&#8722;s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print out exit status after any command where the status is
+ non-null.<br>
+ <tt><font size=+1>&#8722;e</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exit if <tt><font size=+1>$status</font></tt> is non-null after executing a simple command.<br>
+ <tt><font size=+1>&#8722;i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <tt><font size=+1>&#8722;i</font></tt> is present, or <i>rc</i> is given no arguments and its standard
+ input is a terminal, it runs interactively. Commands are prompted
+ for using <tt><font size=+1>$prompt</font></tt>.<br>
+ <tt><font size=+1>&#8722;I</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makes sure <i>rc</i> is not run interactively.<br>
+ <tt><font size=+1>&#8722;l</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If <tt><font size=+1>&#8722;l</font></tt> is given or the first character of argument zero is <tt><font size=+1>&#8722;</font></tt>,
+ <i>rc</i> reads commands from <tt><font size=+1>$home/lib/profile</font></tt>, if it exists, before
+ reading its normal input.<br>
+ <tt><font size=+1>&#8722;p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A no-op.<br>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A no-op.<br>
+ <tt><font size=+1>&#8722;v</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Echo input on file descriptor 2 as it is read.<br>
+ <tt><font size=+1>&#8722;x</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print each simple command before executing it.<br>
+ <tt><font size=+1>&#8722;r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print debugging information (internal form of commands as they
+ are executed).<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/rc<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Tom Duff, &#8220;Rc &ndash; The Plan 9 Shell&#8221;.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ There should be a way to match patterns against whole lists rather
+ than just single strings.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Using <tt><font size=+1>~</font></tt> to check the value of <tt><font size=+1>$status</font></tt> changes <tt><font size=+1>$status</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Functions that use here documents don&#8217;t work.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Free carets don&#8217;t get inserted next to keywords.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&lt;{</font></tt><i>command</i><tt><font size=+1>}</font></tt> syntax depends on the underlying operating system
+ providing a file descriptor device tree at <tt><font size=+1>/dev/fd</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ By default, FreeBSD 5 does not provide file descriptors greater
+ than 2 in <tt><font size=+1>/dev/fd</font></tt>. To fix this, add<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/fdescfs &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/dev/fd &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fdescfs &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rw &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ to <tt><font size=+1>/etc/fstab</font></tt>, and then <tt><font size=+1>mount /dev/fd</font></tt>. (Adding the line to <tt><font size=+1>fstab</font></tt>
+ ensures causes FreeBSD to mount the file system automatically
+ at boot time.)<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/rio.html b/man/man1/rio.html
new file mode 100644
index 00000000..ad3f9adc
--- /dev/null
+++ b/man/man1/rio.html
@@ -0,0 +1,172 @@
+<head>
+<title>rio(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>RIO(1)</b><td align=right><b>RIO(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ rio &ndash; rio-like Window Manager for X<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>rio</font></tt> [ <tt><font size=+1>&ndash;font</font></tt> <i>fontname</i> ] [ <tt><font size=+1>&ndash;grey</font></tt> ] [ <tt><font size=+1>&ndash;s</font></tt> ] [ <tt><font size=+1>&ndash;term</font></tt> <i>termprog</i> ] [ <tt><font size=+1>&ndash;version</font></tt>
+ ] [ <tt><font size=+1>&ndash;virtuals</font></tt> <i>num</i> ] [ <tt><font size=+1>exit</font></tt> | <tt><font size=+1>restart</font></tt> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Rio</i> is a window manager for X which attempts to emulate the window
+ management policies of Plan 9&#8217;s <i>rio</i> window manager. Rio is derived
+ from David Hogan&#8217;s 8&#189;.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&ndash;grey</font></tt> option makes the background stippled grey, the default
+ X11 background, instead of solid grey, the Plan 9 background.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&ndash;font</font></tt> option sets the font in <i>rio</i>&#8217;s menu to <i>fname</i>, overriding
+ the default. Unlike the other programs in the Plan 9 ports, rio
+ expects this font to be an X11 font rather than a Plan 9 font.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&ndash;term</font></tt> option specifies an alternative program to run when the
+ <i>New</i> menu item is selected. The default is to try <a href="../man1/9term.html"><i>9term</i>(1)</a> and
+ then to fall back to <a href="../man1/xterm.html"><i>xterm</i>(1)</a>. The <tt><font size=+1>&ndash;s</font></tt> option causes <i>rio</i> to add
+ <tt><font size=+1>&#8722;s</font></tt> to <i>9term</i>&#8217;s command-line, starting the window in scrolling mode.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&ndash;version</font></tt> option prints the current version on standard error,
+ then exits.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&ndash;virtuals</font></tt> option sets the number of virtual screens (the default
+ is 1, and the maximum is 12).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the argument <tt><font size=+1>exit</font></tt> or <tt><font size=+1>restart</font></tt> is given, it is sent to an already-running
+ <i>rio</i>, causing the extant <i>rio</i> to exit or restart.<br>
+ <p><font size=+1><b>Using rio </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ One window is <i>current</i>, and is indicated with a dark border and
+ text; characters typed on the keyboard are available in the <tt><font size=+1>/dev/cons</font></tt>
+ file of the process in the current window. Characters written
+ on <tt><font size=+1>/dev/cons</font></tt> appear asynchronously in the associated window whether
+ or not the window is current.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Windows are created, deleted and rearranged using the mouse. Clicking
+ (pressing and releasing) mouse button 1 in a non-current window
+ makes that window current and brings it in front of any windows
+ that happen to be overlapping it. When the mouse cursor points
+ to the background area or is in a window that has
+ not claimed the mouse for its own use, pressing mouse button 3
+ activates a menu of window operations provided by <i>rio</i>. Releasing
+ button 3 then selects an operation. At this point, a gunsight
+ or cross cursor indicates that an operation is pending. The button
+ 3 menu operations are:<br>
+ <tt><font size=+1>New</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a window. Press button 3 where one corner of the new
+ rectangle should appear (cross cursor), and move the mouse, while
+ holding down button 3, to the diagonally opposite corner. Releasing
+ button 3 creates the window, and makes it current. Very small
+ windows may not be created. The new
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ window is created running <i>termprog</i>, by default <a href="../man1/9term.html"><i>9term</i>(1)</a> or, if
+ <i>9term</i> is not available, <a href="../man1/xterm.html"><i>xterm</i>(1)</a>.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>Resize</font></tt>&nbsp;&nbsp;&nbsp;Change the size and location of a window. First click button
+ 3 in the window to be changed (gunsight cursor). Then sweep out
+ a window as for the <tt><font size=+1>New</font></tt> operation. The window is made current.<br>
+ <tt><font size=+1>Move</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Move a window to another location. After pressing and holding
+ button 3 over the window to be moved (gunsight cursor), indicate
+ the new position by dragging the rectangle to the new location.
+ The window is made current. Windows may be moved partially off-screen.<br>
+ <tt><font size=+1>Delete</font></tt>&nbsp;&nbsp;&nbsp;Delete a window. Click in the window to be deleted (gunsight
+ cursor). Deleting a window causes a <tt><font size=+1>hangup</font></tt> note to be sent to
+ all processes in the window&#8217;s process group (see <a href="../man3/notify.html"><i>notify</i>(3)</a>).<br>
+ <tt><font size=+1>Hide</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hide a window. Click in the window to be hidden (gunsight
+ cursor); it will be moved off-screen. Each hidden window is given
+ a menu entry in the button 3 menu according to its current window
+ system label.<br>
+ <i>label</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Restore a hidden window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Windows may also be arranged by dragging their borders. Pressing
+ button 1 or 2 over a window&#8217;s border allows one to move the corresponding
+ edge or corner, while button 3 moves the whole window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When the mouse cursor points to the background area and <i>rio</i> has
+ been started with multiple virtual screens using the <tt><font size=+1>&ndash;virtuals</font></tt>
+ option, clicking button 2 brings up a menu to select a virtual
+ screen to view. Scrolling the mouse wheel while the cursor points
+ at the background will cycle through the virtual screens.
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ In Plan 9&#8217;s <i>rio</i>, clicking button 2 or button 3 to select a window
+ also sends that event to the window itself. This <i>rio</i> does not.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The command-line syntax is non-standard.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In Plan 9&#8217;s <i>rio</i>, newly started applications take over the current
+ window. This <i>rio</i> starts a new window for each program. (In X11,
+ it appears to be impossible to know which window starts a particular
+ program.)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There is a currently a compiled-in limit of 128 hidden windows.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/9term.html"><i>9term</i>(1)</a>, <a href="../man1/xterm.html"><i>xterm</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/rm.html b/man/man1/rm.html
new file mode 100644
index 00000000..a19b3d3c
--- /dev/null
+++ b/man/man1/rm.html
@@ -0,0 +1,66 @@
+<head>
+<title>rm(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>RM(1)</b><td align=right><b>RM(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ rm &ndash; remove files<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>rm</font></tt> [ <tt><font size=+1>&#8722;fr</font></tt> ] <i>file ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Rm</i> removes files or directories. A directory is removed only if
+ it is empty. Removal of a file requires write permission in its
+ directory, but neither read nor write permission on the file itself.
+ The options are<br>
+ <tt><font size=+1>&#8722;f</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Don&#8217;t report files that can&#8217;t be removed.<br>
+ <tt><font size=+1>&#8722;r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Recursively delete the entire contents of a directory and the
+ directory itself.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/rm.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/remove.html"><i>remove</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/sam.html b/man/man1/sam.html
new file mode 100644
index 00000000..c27afa63
--- /dev/null
+++ b/man/man1/sam.html
@@ -0,0 +1,577 @@
+<head>
+<title>sam(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SAM(1)</b><td align=right><b>SAM(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sam, B, E, sam.save, samterm, samsave &ndash; screen editor with structural
+ regular expressions<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>sam</font></tt> [ <i>option ...</i> ] [ <i>files</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>sam &#8722;r</font></tt> <i>machine
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>sam.save
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>B</font></tt> <i>file</i>[<tt><font size=+1>:</font></tt><i>line</i>] ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>E</font></tt> <i>file<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Sam</i> is a multi-file editor. It modifies a local copy of an external
+ file. The copy is here called a <i>file</i>. The files are listed in
+ a menu available through mouse button 3 or the <tt><font size=+1>n</font></tt> command. Each
+ file has an associated name, usually the name of the external
+ file from which it was read, and a &#8216;modified&#8217; bit that indicates
+ whether the editor&#8217;s file agrees with the external file. The external
+ file is not read into the editor&#8217;s file until it first becomes
+ the current file--that to which editing commands apply--whereupon
+ its menu entry is printed. The options are<br>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do not &#8216;download&#8217; the terminal part of <i>sam</i>. Editing will be
+ done with the command language only, as in <a href="../man1/ed.html"><i>ed</i>(1)</a>.<br>
+ <tt><font size=+1>&#8722;r</font></tt> <i>machine</i>&nbsp;&nbsp;&nbsp;&nbsp;Run the host part remotely on the specified machine,
+ the terminal part locally.<br>
+ <tt><font size=+1>&#8722;s</font></tt> <i>path</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start the host part from the specified file on the remote
+ host. Only meaningful with the <tt><font size=+1>&#8722;r</font></tt> option.<br>
+ <tt><font size=+1>&#8722;t</font></tt> <i>path</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start the terminal part from the specified file. Useful
+ for debugging.<br>
+ <p><font size=+1><b>Regular expressions </b></font><br>
+ Regular expressions are as in <a href="../man7/regexp.html"><i>regexp</i>(7)</a> with the addition of <tt><font size=+1>\n</font></tt>
+ to represent newlines. A regular expression may never contain
+ a literal newline character. The empty regular expression stands
+ for the last complete expression encountered. A regular expression
+ in <i>sam</i> matches the longest leftmost substring formally
+ matched by the expression. Searching in the reverse direction
+ is equivalent to searching backwards with the catenation operations
+ reversed in the expression.<br>
+ <p><font size=+1><b>Addresses </b></font><br>
+ An address identifies a substring in a file. In the following,
+ &#8216;character <i>n</i>&#8217; means the null string after the <i>n</i>-th character in
+ the file, with 1 the first character in the file. &#8216;Line <i>n</i>&#8217; means
+ the <i>n</i>-th match, starting at the beginning of the file, of the
+ regular expression <tt><font size=+1>.*\n?</font></tt>. All files always have a current substring,
+ called
+ dot, that is the default address.<br>
+ <p><font size=+1><b>Simple Addresses </b></font><br>
+ <tt><font size=+1>#</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;The empty string after character <i>n</i>; <tt><font size=+1>#0</font></tt> is the beginning of the
+ file.<br>
+ <i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Line <i>n</i>; <tt><font size=+1>0</font></tt> is the beginning of the file.<br>
+ <tt><font size=+1>/</font></tt><i>regexp</i><tt><font size=+1>/<br>
+ ?</font></tt><i>regexp</i><tt><font size=+1>?<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The substring that matches the regular expression, found by looking
+ toward the end (<tt><font size=+1>/</font></tt>) or beginning (<tt><font size=+1>?</font></tt>) of the file, and if necessary
+ continuing the search from the other end to the starting point
+ of the search. The matched substring may straddle the starting
+ point. When entering a pattern containing a literal
+ question mark for a backward search, the question mark should
+ be specified as a member of a class.<br>
+
+ </table>
+ <tt><font size=+1>0</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The string before the first full line. This is not necessarily
+ the null string; see <tt><font size=+1>+</font></tt> and <tt><font size=+1>&#8722;</font></tt> below.<br>
+ <tt><font size=+1>$</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The null string at the end of the file.<br>
+ <tt><font size=+1>.</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dot.<br>
+ <tt><font size=+1>'</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The mark in the file (see the <tt><font size=+1>k</font></tt> command below).<br>
+ &quot;<i>regexp</i>&quot;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Preceding a simple address (default <tt><font size=+1>.</font></tt>), refers to the address
+ evaluated in the unique file whose menu line matches the regular
+ expression.<br>
+
+ </table>
+ <p><font size=+1><b>Compound Addresses </b></font><br>
+ In the following, <i>a1</i> and <i>a2</i> are addresses.<br>
+ <i>a1</i><tt><font size=+1>+</font></tt><i>a2</i>&nbsp;&nbsp;&nbsp;The address <i>a2</i> evaluated starting at the end of <i>a1</i>.<br>
+ <i>a1</i><tt><font size=+1>&#8722;</font></tt><i>a2</i>&nbsp;&nbsp;&nbsp;The address <i>a2</i> evaluated looking in the reverse direction
+ starting at the beginning of <i>a1</i>.<br>
+ <i>a1</i><tt><font size=+1>,</font></tt><i>a2</i>&nbsp;&nbsp;&nbsp;The substring from the beginning of <i>a1</i> to the end of <i>a2</i>.
+ If <i>a1</i> is missing, <tt><font size=+1>0</font></tt> is substituted. If <i>a2</i> is missing, <tt><font size=+1>$</font></tt> is substituted.<br>
+ <i>a1</i><tt><font size=+1>;</font></tt><i>a2</i>&nbsp;&nbsp;&nbsp;Like <i>a1</i><tt><font size=+1>,</font></tt><i>a2</i>, but with <i>a2</i> evaluated at the end of, and dot
+ set to, <i>a1</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The operators <tt><font size=+1>+</font></tt> and <tt><font size=+1>&#8722;</font></tt> are high precedence, while <tt><font size=+1>,</font></tt> and <tt><font size=+1>;</font></tt> are low
+ precedence.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In both <tt><font size=+1>+</font></tt> and <tt><font size=+1>&#8722;</font></tt> forms, if <i>a2</i> is a line or character address with
+ a missing number, the number defaults to 1. If <i>a1</i> is missing,
+ <tt><font size=+1>.</font></tt> is substituted. If both <i>a1</i> and <i>a2</i> are present and distinguishable,
+ <tt><font size=+1>+</font></tt> may be elided. <i>a2</i> may be a regular expression; if it is delimited
+ by <tt><font size=+1>?</font></tt>&#8217;s, the effect of the <tt><font size=+1>+</font></tt> or <tt><font size=+1>&#8722;</font></tt> is reversed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ It is an error for a compound address to represent a malformed
+ substring. Some useful idioms: <i>a1</i><tt><font size=+1>+&#8722;</font></tt> (<i>a1</i>-+) selects the line containing
+ the end (beginning) of a1. <tt><font size=+1>0/</font></tt><i>regexp</i><tt><font size=+1>/</font></tt> locates the first match of
+ the expression in the file. (The form <tt><font size=+1>0;//</font></tt> sets dot unnecessarily.)
+ <tt><font size=+1>./</font></tt><i>regexp</i><tt><font size=+1>///</font></tt> finds the second following
+ occurrence of the expression, and <tt><font size=+1>.,/</font></tt><i>regexp</i><tt><font size=+1>/</font></tt> extends dot.<br>
+ <p><font size=+1><b>Commands </b></font><br>
+ In the following, text demarcated by slashes represents text delimited
+ by any printable character except alphanumerics. Any number of
+ trailing delimiters may be elided, with multiple elisions then
+ representing null strings, but the first delimiter must always
+ be present. In any delimited text, newline may not appear
+ literally; <tt><font size=+1>\n</font></tt> may be typed for newline; and <tt><font size=+1>\/</font></tt> quotes the delimiter,
+ here <tt><font size=+1>/</font></tt>. Backslash is otherwise interpreted literally, except in
+ <tt><font size=+1>s</font></tt> commands.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Most commands may be prefixed by an address to indicate their
+ range of operation. Those that may not are marked with a <tt><font size=+1>*</font></tt> below.
+ If a command takes an address and none is supplied, dot is used.
+ The sole exception is the <tt><font size=+1>w</font></tt> command, which defaults to <tt><font size=+1>0,$</font></tt>. In
+ the description, &#8216;range&#8217; is used to represent whatever
+ address is supplied. Many commands set the value of dot as a side
+ effect. If so, it is always set to the &#8216;result&#8217; of the change:
+ the empty string for a deletion, the new text for an insertion,
+ etc. (but see the <tt><font size=+1>s</font></tt> and <tt><font size=+1>e</font></tt> commands).<br>
+ <p><font size=+1><b>Text commands </b></font><br>
+ <tt><font size=+1>a/</font></tt><i>text</i><tt><font size=+1>/<br>
+ </font></tt>or<br>
+ <tt><font size=+1>a<br>
+ </font></tt><i>lines of text<br>
+ </i><tt><font size=+1>.</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert the text into the file after the range. Set dot.<br>
+ <tt><font size=+1>c<br>
+ i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Same as <tt><font size=+1>a</font></tt>, but <tt><font size=+1>c</font></tt> replaces the text, while <tt><font size=+1>i</font></tt> inserts <i>before</i> the
+ range.<br>
+ <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete the text in the range. Set dot.<br>
+ <tt><font size=+1>s/</font></tt><i>regexp</i><tt><font size=+1>/</font></tt><i>text</i><tt><font size=+1>/<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Substitute <i>text</i> for the first match to the regular expression
+ in the range. Set dot to the modified range. In <i>text</i> the character
+ <tt><font size=+1>&amp;</font></tt> stands for the string that matched the expression. Backslash
+ behaves as usual unless followed by a digit: <tt><font size=+1>\</font></tt><i>d</i> stands for the
+ string that matched the subexpression begun by the <i>d</i>-th left
+ parenthesis. If <i>s</i> is followed immediately by a number <i>n</i>, as in
+ <tt><font size=+1>s2/x/y/</font></tt>, the <i>n</i>-th match in the range is substituted. If the command
+ is followed by a <tt><font size=+1>g</font></tt>, as in <tt><font size=+1>s/x/y/g</font></tt>, all matches in the range are
+ substituted.<br>
+
+ </table>
+ <tt><font size=+1>m</font></tt> <i>a1<br>
+ </i><tt><font size=+1>t</font></tt> <i>a1</i>&nbsp;&nbsp;&nbsp;Move (<tt><font size=+1>m</font></tt>) or copy (<tt><font size=+1>t</font></tt>) the range to after <i>a1</i>. Set dot.<br>
+ <p><font size=+1><b>Display commands </b></font><br>
+ <tt><font size=+1>p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the text in the range. Set dot.<br>
+ <tt><font size=+1>=</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the line address and character address of the range.<br>
+ <tt><font size=+1>=#</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print just the character address of the range.<br>
+ <p><font size=+1><b>File commands </b></font><br>
+ * <tt><font size=+1>b</font></tt> <i>file-list<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set the current file to the first file named in the list that
+ <i>sam</i> also has in its menu. The list may be expressed <tt><font size=+1>&lt;</font></tt><i>Plan 9 command</i>
+ in which case the file names are taken as words (in the shell
+ sense) generated by the Plan 9 command.<br>
+
+ </table>
+ * <tt><font size=+1>B</font></tt> <i>file-list<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Same as <tt><font size=+1>b</font></tt>, except that file names not in the menu are entered
+ there, and all file names in the list are examined.<br>
+
+ </table>
+ * <tt><font size=+1>n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print a menu of files. The format is:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>'</font></tt> or blankindicating the file is modified or clean,<br>
+ <tt><font size=+1>&#8722;</font></tt> or <tt><font size=+1>+</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;indicating the file is unread or has been read (in the terminal,
+ <tt><font size=+1>*</font></tt> means more than one window is open),<br>
+ <tt><font size=+1>.</font></tt> or blankindicating the current file,<br>
+ a blank,<br>
+ and the file name.<br>
+
+ </table>
+ * <tt><font size=+1>D</font></tt> <i>file-list<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Delete the named files from the menu. If no files are named, the
+ current file is deleted. It is an error to <tt><font size=+1>D</font></tt> a modified file,
+ but a subsequent <tt><font size=+1>D</font></tt> will delete such a file.<br>
+
+ </table>
+ <p><font size=+1><b>I/O Commands </b></font><br>
+ * <tt><font size=+1>e</font></tt> <i>filename<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Replace the file by the contents of the named external file. Set
+ dot to the beginning of the file.<br>
+
+ </table>
+ <tt><font size=+1>r</font></tt> <i>filename<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Replace the text in the range by the contents of the named external
+ file. Set dot.<br>
+
+ </table>
+ <tt><font size=+1>w</font></tt> <i>filename<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Write the range (default <tt><font size=+1>0,$</font></tt>) to the named external file.<br>
+
+ </table>
+ * <tt><font size=+1>f</font></tt> <i>filename<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set the file name and print the resulting menu entry.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ If the file name is absent from any of these, the current file
+ name is used. <tt><font size=+1>e</font></tt> always sets the file name; <tt><font size=+1>r</font></tt> and <tt><font size=+1>w</font></tt> do so if the
+ file has no name.<br>
+ <tt><font size=+1>&lt;</font></tt> <i>Plan 9-command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Replace the range by the standard output of the Plan 9 command.<br>
+
+ </table>
+ <tt><font size=+1>&gt;</font></tt> <i>Plan 9-command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Send the range to the standard input of the Plan 9 command.<br>
+
+ </table>
+ <tt><font size=+1>|</font></tt> <i>Plan 9-command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Send the range to the standard input, and replace it by the standard
+ output, of the Plan 9 command.<br>
+
+ </table>
+ * <tt><font size=+1>!</font></tt> <i>Plan 9-command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Run the Plan 9 command.<br>
+
+ </table>
+ * <tt><font size=+1>cd</font></tt> <i>directory<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Change working directory. If no directory is specified, <tt><font size=+1>$home</font></tt>
+ is used.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ In any of <tt><font size=+1>&lt;</font></tt>, <tt><font size=+1>&gt;</font></tt>, <tt><font size=+1>|</font></tt> or <tt><font size=+1>!</font></tt>, if the <i>Plan 9 command</i> is omitted the last
+ <i>Plan 9 command</i> (of any type) is substituted. If <i>sam</i> is <i>downloaded</i>
+ (using the mouse and raster display, i.e. not using option <tt><font size=+1>&#8722;d</font></tt>),
+ <tt><font size=+1>!</font></tt> sets standard input to <tt><font size=+1>/dev/null</font></tt>, and otherwise unassigned output
+ (<tt><font size=+1>stdout</font></tt> for <tt><font size=+1>!</font></tt> and <tt><font size=+1>&gt;</font></tt>, <tt><font size=+1>stderr</font></tt> for all) is placed in
+ <tt><font size=+1>/tmp/sam.err</font></tt> and the first few lines are printed.<br>
+ <p><font size=+1><b>Loops and Conditionals </b></font><br>
+ <tt><font size=+1>x/</font></tt><i>regexp</i><tt><font size=+1>/</font></tt> <i>command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ For each match of the regular expression in the range, run the
+ command with dot set to the match. Set dot to the last match.
+ If the regular expression and its slashes are omitted, <tt><font size=+1>/.*\n/</font></tt>
+ is assumed. Null string matches potentially occur before every
+ character of the range and at the end of the range.
+
+ </table>
+ <tt><font size=+1>y/</font></tt><i>regexp</i><tt><font size=+1>/</font></tt> <i>command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Like <tt><font size=+1>x</font></tt>, but run the command for each substring that lies before,
+ between, or after the matches that would be generated by <tt><font size=+1>x</font></tt>. There
+ is no default regular expression. Null substrings potentially
+ occur before every character in the range.<br>
+
+ </table>
+ * <tt><font size=+1>X/</font></tt><i>regexp</i><tt><font size=+1>/</font></tt> <i>command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ For each file whose menu entry matches the regular expression,
+ make that the current file and run the command. If the expression
+ is omitted, the command is run in every file.<br>
+
+ </table>
+ * <tt><font size=+1>Y/</font></tt><i>regexp</i><tt><font size=+1>/</font></tt> <i>command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Same as <tt><font size=+1>X</font></tt>, but for files that do not match the regular expression,
+ and the expression is required.<br>
+
+ </table>
+ <tt><font size=+1>g/</font></tt><i>regexp</i><tt><font size=+1>/</font></tt> <i>command<br>
+ </i><tt><font size=+1>v/</font></tt><i>regexp</i><tt><font size=+1>/</font></tt> <i>command<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If the range contains (<tt><font size=+1>g</font></tt>) or does not contain (<tt><font size=+1>v</font></tt>) a match for
+ the expression, set dot to the range and run the command.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ These may be nested arbitrarily deeply, but only one instance
+ of either <tt><font size=+1>X</font></tt> or <tt><font size=+1>Y</font></tt> may appear in a single command. An empty command
+ in an <tt><font size=+1>x</font></tt> or <tt><font size=+1>y</font></tt> defaults to <tt><font size=+1>p</font></tt>; an empty command in <tt><font size=+1>X</font></tt> or <tt><font size=+1>Y</font></tt> defaults
+ to <tt><font size=+1>f</font></tt>. <tt><font size=+1>g</font></tt> and <tt><font size=+1>v</font></tt> do not have defaults.<br>
+ <p><font size=+1><b>Miscellany </b></font><br>
+ <tt><font size=+1>k</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the current file&#8217;s mark to the range. Does not set dot.<br>
+ * <tt><font size=+1>q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quit. It is an error to quit with modified files, but a second
+ <tt><font size=+1>q</font></tt> will succeed.<br>
+ * <tt><font size=+1>u</font></tt> <i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Undo the last <i>n</i> (default 1) top-level commands that changed
+ the contents or name of the current file, and any other file whose
+ most recent change was simultaneous with the current file&#8217;s change.
+ Successive <tt><font size=+1>u</font></tt>&#8217;s move further back in time. The only commands for
+ which u is ineffective are <tt><font size=+1>cd</font></tt>, <tt><font size=+1>u</font></tt>, <tt><font size=+1>q</font></tt>, <tt><font size=+1>w</font></tt> and
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>D</font></tt>. If <i>n</i> is negative, <tt><font size=+1>u</font></tt> &#8216;redoes,&#8217; undoing the undo, going forwards
+ in time again.<br>
+
+ </table>
+
+ </table>
+ (empty)&nbsp;&nbsp;&nbsp;&nbsp;If the range is explicit, set dot to the range. If <i>sam</i>
+ is downloaded, the resulting dot is selected on the screen; otherwise
+ it is printed. If no address is specified (the command is a newline)
+ dot is extended in either direction to line boundaries and printed.
+ If dot is thereby unchanged, it is set to <tt><font size=+1>.+1</font></tt> and
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ printed.<br>
+
+ </table>
+
+ </table>
+ <p><font size=+1><b>Grouping and multiple changes </b></font><br>
+ Commands may be grouped by enclosing them in braces <tt><font size=+1>{}</font></tt>. Commands
+ within the braces must appear on separate lines (no backslashes
+ are required between commands). Semantically, an opening brace
+ is like a command: it takes an (optional) address and sets dot
+ for each sub-command. Commands within the
+ braces are executed sequentially, but changes made by one command
+ are not visible to other commands (see the next paragraph). Braces
+ may be nested arbitrarily.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When a command makes a number of changes to a file, as in <tt><font size=+1>x/re/c/text/</font></tt>,
+ the addresses of all changes to the file are computed in the original
+ file. If the changes are in sequence, they are applied to the
+ file. Successive insertions at the same address are catenated
+ into a single insertion composed of the several
+ insertions in the order applied.<br>
+ <p><font size=+1><b>The terminal </b></font><br>
+ What follows refers to behavior of <i>sam</i> when downloaded, that is,
+ when operating as a display editor on a raster display. This is
+ the default behavior; invoking <i>sam</i> with the <tt><font size=+1>&#8722;d</font></tt> (no download) option
+ provides access to the command language only.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each file may have zero or more windows open. Each window is equivalent
+ and is updated simultaneously with changes in other windows on
+ the same file. Each window has an independent value of dot, indicated
+ by a highlighted substring on the display. Dot may be in a region
+ not within the window. There is usually
+ a &#8216;current window&#8217;, marked with a dark border, to which typed
+ text and editing commands apply. Text may be typed and edited
+ as in <a href="../man1/rio.html"><i>rio</i>(1)</a>; also the escape key (ESC) selects (sets dot to)
+ text typed since the last mouse button hit.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The button 3 menu controls window operations. The top of the menu
+ provides the following operators, each of which uses one or more
+ <i>rio</i>-like cursors to prompt for selection of a window or sweeping
+ of a rectangle. &#8216;Sweeping&#8217; a null rectangle gets a large window,
+ disjoint from the command window or the whole
+ screen, depending on where the null rectangle is.<br>
+ <tt><font size=+1>new</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new, empty file.<br>
+ <tt><font size=+1>zerox</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Create a copy of an existing window.<br>
+ <tt><font size=+1>resize</font></tt>&nbsp;&nbsp;&nbsp;As in <i>rio</i>.<br>
+ <tt><font size=+1>close</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Delete the window. In the last window of a file, <tt><font size=+1>close</font></tt> is
+ equivalent to a <tt><font size=+1>D</font></tt> for the file.<br>
+ <tt><font size=+1>write</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to a <tt><font size=+1>w</font></tt> for the file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Below these operators is a list of available files, starting with
+ <tt><font size=+1>~~sam~~</font></tt>, the command window. Selecting a file from the list makes
+ the most recently used window on that file current, unless it
+ is already current, in which case selections cycle through the
+ open windows. If no windows are open on the file, the user is
+ prompted to open one. Files other than <tt><font size=+1>~~sam~~</font></tt> are marked with
+ one of the characters <tt><font size=+1>&#8722;+*</font></tt> according as zero, one, or more windows
+ are open on the file. A further mark <tt><font size=+1>.</font></tt> appears on the file in
+ the current window and a single quote, <tt><font size=+1>'</font></tt>, on a file modified since
+ last write.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The command window, created automatically when <tt><font size=+1>sam</font></tt> starts, is
+ an ordinary window except that text typed to it is interpreted
+ as commands for the editor rather than passive text, and text
+ printed by editor commands appears in it. The behavior is like
+ <i>rio</i>, with an &#8216;output point&#8217; that separates commands being typed
+ from previous output. Commands typed in the command window apply
+ to the current open file--the file in the most recently current
+ window.<br>
+ <p><font size=+1><b>Manipulating text </b></font><br>
+ Button 1 changes selection, much like <i>rio</i>. Pointing to a non-current
+ window with button 1 makes it current; within the current window,
+ button 1 selects text, thus setting dot. Double-clicking selects
+ text to the boundaries of words, lines, quoted strings or bracketed
+ strings, depending on the text at the click.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Button 2 provides a menu of editing commands:<br>
+ <tt><font size=+1>cut</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete dot and save the deleted text in the snarf buffer.<br>
+ <tt><font size=+1>paste</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replace the text in dot by the contents of the snarf buffer.<br>
+ <tt><font size=+1>snarf</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save the text in dot in the snarf buffer.<br>
+ <tt><font size=+1>plumb</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Send the text in the selection as a plumb message. If the
+ selection is empty, the white-space-delimited block of text is
+ sent as a plumb message with a <tt><font size=+1>click</font></tt> attribute defining where
+ the selection lies (see <a href="../man7/plumb.html"><i>plumb</i>(7)</a>).<br>
+ <tt><font size=+1>look</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search forward for the next occurrence of the literal text
+ in dot. If dot is the null string, the text in the snarf buffer
+ is used. The snarf buffer is unaffected.<br>
+ <tt><font size=+1>&lt;rio&gt;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exchange snarf buffers with <i>rio</i>.<br>
+ <tt><font size=+1>/</font></tt><i>regexp</i>&nbsp;&nbsp;&nbsp;&nbsp;Search forward for the next match of the last regular expression
+ typed in a command. (Not in command window.)<br>
+ <tt><font size=+1>send</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Send the text in dot, or the snarf buffer if dot is the null
+ string, as if it were typed to the command window. Saves the sent
+ text in the snarf buffer. (Command window only.)<br>
+ <p><font size=+1><b>External communication </b></font><br>
+ <i>Sam</i> listens to the <tt><font size=+1>edit</font></tt> plumb port. If plumbing is not active,
+ on invocation <i>sam</i> creates a named pipe <tt><font size=+1>/srv/sam.</font></tt><i>user</i> which acts
+ as an additional source of commands. Characters written to the
+ named pipe are treated as if they had been typed in the command
+ window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>B</i> is a shell-level command that causes an instance of <i>sam</i> running
+ on the same terminal to load the named <i>files</i>. <i>B</i> uses either plumbing
+ or the named pipe, whichever service is available. If plumbing
+ is not enabled, the option allows a line number to be specified
+ for the initial position to display in the last named file
+ (plumbing provides a more general mechanism for this ability).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>E</i> is a shell-level command that can be used as <tt><font size=+1>$EDITOR</font></tt> in a Unix
+ environment. It runs <i>B</i> on <i>file</i> and then does not exit until <i>file</i>
+ is changed, which is taken as a signal that <i>file</i> is done being
+ edited.<br>
+ <p><font size=+1><b>Abnormal termination </b></font><br>
+ If <i>sam</i> terminates other than by a <tt><font size=+1>q</font></tt> command (by hangup, deleting
+ its window, etc.), modified files are saved in an executable file,
+ <tt><font size=+1>$HOME/sam.save</font></tt>. This program, when executed, asks whether to write
+ each file back to a external file. The answer <tt><font size=+1>y</font></tt> causes writing;
+ anything else skips the file.
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>$HOME/sam.save<br>
+ $HOME/sam.err<br>
+ /usr/local/plan9/bin/samsave<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the program called to unpack <tt><font size=+1>$HOME/sam.save</font></tt>.<br>
+
+ </table>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/sam</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;source for <i>sam</i> itself<br>
+ <tt><font size=+1>/usr/local/plan9/src/cmd/samterm</font></tt>&nbsp;&nbsp;&nbsp;source for the separate terminal
+ part<br>
+ <tt><font size=+1>/usr/local/plan9/bin/B<br>
+ /usr/local/plan9/bin/E<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/ed.html"><i>ed</i>(1)</a>, <a href="../man1/sed.html"><i>sed</i>(1)</a>, <a href="../man1/grep.html"><i>grep</i>(1)</a>, <a href="../man1/rio.html"><i>rio</i>(1)</a>, <a href="../man7/regexp.html"><i>regexp</i>(7)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Rob Pike, &#8220;The text editor sam&#8221;.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/scat.html b/man/man1/scat.html
new file mode 100644
index 00000000..d5cf2007
--- /dev/null
+++ b/man/man1/scat.html
@@ -0,0 +1,385 @@
+<head>
+<title>scat(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SCAT(1)</b><td align=right><b>SCAT(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ scat &ndash; sky catalogue and Digitized Sky Survey<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>scat<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Scat</i> looks up items in catalogues of objects outside the solar
+ system and implements database-like manipulations on sets of such
+ objects. It also provides an interface to <a href="../man1/astro.html"><i>astro</i>(1)</a> to plot the
+ locations of solar system objects. Finally, it displays images
+ from the Space Telescope Science Institute&#8217;s Digitized Sky Survey,
+ keyed to the catalogues.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Items are read, one per line, from the standard input and looked
+ up in the catalogs. Input is case-insensitive. The result of the
+ lookup becomes the set of objects available to the database commands.
+ After each lookup or command, if more than two objects are in
+ the set, <i>scat</i> prints how many objects are in the set;
+ otherwise it prints the objects&#8217; descriptions or cross-index listings
+ (suitable for input to <i>scat</i>). An item is in one of the following
+ formats:<br>
+ <tt><font size=+1>ngc1234<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Number 1234 in the New General Catalogue of Nonstellar Objects,
+ NGC2000.0. The output identifies the type (<tt><font size=+1>Gx</font></tt>=galaxy, <tt><font size=+1>Pl</font></tt>=planetary
+ nebula, <tt><font size=+1>OC</font></tt>=open cluster, <tt><font size=+1>Gb</font></tt>=globular cluster, <tt><font size=+1>Nb</font></tt>=bright nebula,
+ <tt><font size=+1>C+N</font></tt>=cluster associated with nebulosity, <tt><font size=+1>Ast</font></tt>=asterism, <tt><font size=+1>Kt</font></tt>=knot
+ or nebulous region in a galaxy,
+ <tt><font size=+1>***</font></tt>=triple star, <tt><font size=+1>D*</font></tt>=double star, <tt><font size=+1>?</font></tt>=uncertain, <tt><font size=+1>&#8722;</font></tt>=nonexistent, <tt><font size=+1>PD</font></tt>=plate
+ defect, and (blank)=unverified or unknown), its position in 2000.0
+ coordinates, its size in minutes of arc, a brief description,
+ and popular names.<br>
+
+ </table>
+ <tt><font size=+1>ic1234<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Like NGC references, but from the Index Catalog.<br>
+
+ </table>
+ <tt><font size=+1>sao12345<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Number 12345 in the Smithsonian Astrophysical Star Catalogue.
+ Output identifies the visual and photographic magnitudes, 2000.0
+ coordinates, proper motion, spectral type, multiplicity and variability
+ class, and HD number.<br>
+
+ </table>
+ <tt><font size=+1>m4</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Catalog number 4 in Messier&#8217;s catalog. The output is the NGC
+ number.<br>
+ <tt><font size=+1>abell1701<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Catalog number 1701 in the Abell and Zwicky catalog of clusters
+ of galaxies. Output identifies the magnitude of the tenth brightest
+ member of the cluster, radius of the cluster in degrees, its distance
+ in megaparsecs, 2000.0 coordinates, galactic latitude and longitude,
+ magnitude range of the cluster (the
+ &#8216;distance group&#8217;), number of members (the &#8216;richness group&#8217;), population
+ per square degree, and popular names.<br>
+
+ </table>
+ <tt><font size=+1>planetarynebula<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The set of NGC objects of the specified type. The type may be
+ a compact NGC code or a full name, as above, with no blank.<br>
+
+ </table>
+ <tt><font size=+1>&quot;&#945; umi&quot;<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Names are provided in double quotes. Known names are the Greek
+ letter designations, proper names such as Betelgeuse, bright variable
+ stars, and some proper names of stars, NGC objects, and Abell
+ clusters. Greek letters may be spelled out, e.g. <tt><font size=+1>alpha</font></tt>. Constellation
+ names must be the three-letter
+ abbreviations. The output is the SAO number. For non-Greek names,
+ catalog numbers and names are listed for all objects with names
+ for which the given name is a prefix.<br>
+
+ </table>
+ <tt><font size=+1>12h34m &#8722;16<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Coordinates in the sky are translated to the nearest &#8216;patch&#8217;,
+ approximately one square degree of sky. The output is the coordinates
+ identifying the patch, the constellations touching the patch,
+ and the Abell, NGC, and SAO objects in the patch. The program
+ prints sky positions in several formats corresponding to
+ different precisions; any output format is understood as input.<br>
+
+ </table>
+ <tt><font size=+1>umi</font></tt>&nbsp;&nbsp;&nbsp;All the patches in the named constellation.<br>
+ <tt><font size=+1>mars</font></tt>The planets are identified by their names. The names <tt><font size=+1>shadow</font></tt>
+ and <tt><font size=+1>comet</font></tt> refer to the earth&#8217;s penumbra at lunar distance and
+ the comet installed in the current <a href="../man1/astro.html"><i>astro</i>(1)</a>. The output is the
+ planet&#8217;s name, right ascension and declination, azimuth and altitude,
+ and phase for the moon and sun, as shown by
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>astro</font></tt>. The positions are current at the start of <i>scat</i>&#8217;s execution;
+ see the <tt><font size=+1>astro</font></tt> command in the next section for more information.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ The commands are:<br>
+ <tt><font size=+1>add</font></tt> <i>item</i>Add the named item to the set.<br>
+ <tt><font size=+1>keep</font></tt> <i>class ...<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Flatten the set and cull it, keeping only the specified classes.
+ The classes may be specific NGC types, all stars (<tt><font size=+1>sao</font></tt>), all NGC
+ objects (<tt><font size=+1>ngc</font></tt>), all M objects (<tt><font size=+1>m</font></tt>), all Abell clusters (<tt><font size=+1>abell</font></tt>),
+ or a specified brightness range. Brightness ranges are specified
+ by a leading <tt><font size=+1>&gt;</font></tt> or <tt><font size=+1>&lt;</font></tt> followed by a magnitude. Remember
+ that brighter objects have lesser magnitudes.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>drop</font></tt> <i>class ...<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Complement to <tt><font size=+1>keep</font></tt>.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>flat</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Some items such as patches represents sets of items. <i>Flat</i>
+ flattens the set so <i>scat</i> holds all the information available for
+ the objects in the set.<br>
+ <tt><font size=+1>print</font></tt>&nbsp;&nbsp;&nbsp;Print the contents of the set. If the information seems meager,
+ try flattening the set.<br>
+ <tt><font size=+1>expand</font></tt> <i>n<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Flatten the set, expand the area of the sky covered by the set
+ to be <i>n</i> degrees wider, and collect all the objects in that area.
+ If <i>n</i> is zero, <i>expand</i> collects all objects in the patches that
+ cover the current set.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>astro</font></tt> <i>option<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Run <a href="../man1/astro.html"><i>astro</i>(1)</a> with the specified <i>options</i> (to which will be appended
+ <tt><font size=+1>&#8722;p</font></tt>), to discover the positions of the planets. <tt><font size=+1>Astro</font></tt>&#8217;s <tt><font size=+1>&#8722;d</font></tt> and
+ <tt><font size=+1>&#8722;l</font></tt> options can be used to set the time and place; by default,
+ it&#8217;s right now at the coordinates in <tt><font size=+1>/lib/sky/here</font></tt>. Running <tt><font size=+1>astro</font></tt>
+ does not change the positions of planets
+ already in the display set, so <tt><font size=+1>astro</font></tt> may be run multiple times,
+ executing e.g. <tt><font size=+1>add mars</font></tt> each time, to plot a series of planetary
+ positions.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>plot</font></tt> <i>option<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Expand and plot the set in a new window on the screen. Symbols
+ for NGC objects are as in Sky Atlas 2000.0, except that open clusters
+ are shown as stippled disks rather than circles. Abell clusters
+ are plotted as a triangle of ellipses. The planets are drawn as
+ disks of representative color with the first letter
+ of the name in the disk (lower case for inferior planets; upper
+ case for superior); the sun, moon, and earth&#8217;s shadow are unlabeled
+ disks. Objects larger than a few pixels are plotted to scale;
+ however, <i>scat</i> does not have the information necessary to show
+ the correct orientation for galaxies.
+ The option <tt><font size=+1>nogrid</font></tt> suppresses the lines of declination and right
+ ascension. By default, <i>scat</i> labels NGC objects, Abell clusters,
+ and bright stars; option <tt><font size=+1>nolabel</font></tt> suppresses these while <tt><font size=+1>alllabel</font></tt>
+ labels stars with their SAO number as well. The default size is
+ 512x512; options <tt><font size=+1>dx</font></tt> <i>n</i> and <tt><font size=+1>dy</font></tt> <i>n</i> set the <i>x</i> and
+ <i>y</i> extent. The option <tt><font size=+1>zenithup</font></tt> orients the map so it appears as
+ it would in the sky at the time and location used by the <tt><font size=+1>astro</font></tt>
+ command (<i>q.v.</i>).<br>
+ The output is designed to look best on an LCD display. CRTs have
+ trouble with the thin, grey lines and dim stars. The option <tt><font size=+1>nogrey</font></tt>
+ uses white instead of grey for these details, improving visibility
+ at the cost of legibility when plotting on CRTs.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>plate</font></tt> [[<i>ra dec</i>] <i>rasize</i> [<i>decsize</i>]]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Display the section of the Digitized Sky Survey (plate scale approximately
+ 1.7 arcseconds per pixel) centered on the given right ascension
+ and declination or, if no position is specified, the current set
+ of objects. The maximum area that will be displayed is one degree
+ on a side. The horizontal and vertical sizes
+ may be specified in the usual notation for angles. If the second
+ size is omitted, a square region is displayed. If no size is specified,
+ the size is sufficient to display the centers of all the objects
+ in the current set. If a single object is in the set, the 500x500
+ pixel block from the survey containing the center of
+ the object is displayed. The survey is stored in the CD-ROM juke
+ box; run <tt><font size=+1>9fs juke</font></tt> before running <i>scat</i>.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>gamma</font></tt> <i>value<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set the gamma for converting plates to images. Default is &ndash;1.0.
+ Negative values display white stars, positive black. The images
+ look best on displays with depth 8 or greater. <i>Scat</i> does not change
+ the hardware color map, which should be set externally to a grey
+ scale; try the command <tt><font size=+1>getmap gamma</font></tt> (see
+ <i>getmap</i>(9.1)) on an 8-bit color-mapped display.<br>
+
+ </table>
+
+ </table>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Plot the Messier objects and naked-eye stars in Orion.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>ori<br>
+ keep m &lt;6<br>
+ plot nogrid<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Draw a finder chart for Uranus:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>uranus<br>
+ expand 5<br>
+ plot<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Show a partial lunar eclipse:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>astro &#8722;d<br>
+ 2000 07 16 12 45<br>
+ moon<br>
+ add shadow<br>
+ expand 2<br>
+ plot<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Draw a map of the Pleiades.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>&quot;alcyone&quot;<br>
+ expand 1<br>
+ plot<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/sky/*.scat<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/scat<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/astro.html"><i>astro</i>(1)</a><br>
+ <tt><font size=+1>/usr/local/plan9/sky/constelnames </font></tt> the three-letter abbreviations
+ of the constellation names.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The data was provided by the Astronomical Data Center at the NASA
+ Goddard Space Flight Center, except for NGC2000.0, which is Copyright
+ &copy; 1988, Sky Publishing Corporation, used (but not distributed)
+ by permission. The Digitized Sky Survey, 102 CD-ROMs, is not distributed
+ with the system.
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/secstore.html b/man/man1/secstore.html
new file mode 100644
index 00000000..1b9a3a89
--- /dev/null
+++ b/man/man1/secstore.html
@@ -0,0 +1,145 @@
+<head>
+<title>secstore(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SECSTORE(1)</b><td align=right><b>SECSTORE(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ aescbc, secstore, ipso &ndash; secstore commands<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>secstore</font></tt> [ <tt><font size=+1>&#8722;s</font></tt> <i>server</i> ] [ <tt><font size=+1>&#8722;(g|G)</font></tt> <i>getfile</i> ] [ <tt><font size=+1>&#8722;p</font></tt> <i>putfile</i> ] [ <tt><font size=+1>&#8722;r</font></tt>
+ <i>rmfile</i> ] [ <tt><font size=+1>&#8722;c</font></tt> ] [ <tt><font size=+1>&#8722;u</font></tt> <i>user</i> ] [ <tt><font size=+1>&#8722;v</font></tt> ] [ <tt><font size=+1>&#8722;i</font></tt> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>aescbc</font></tt> -e <i>&lt;cleartext &gt;ciphertext<br>
+ </i><tt><font size=+1>aescbc</font></tt> -d <i>&lt;ciphertext &gt;cleartext
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>ipso</font></tt> [ <tt><font size=+1>&#8722;a &#8722;e &#8722;l &#8722;f &#8722;s</font></tt> ] [ <i>file</i> ... ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Secstore</i> authenticates to the server using a password and optionally
+ a hardware token, then saves or retrieves a file. This is intended
+ to be a credentials store (public/private keypairs, passwords,
+ and other secrets) for a factotum.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Option <tt><font size=+1>&#8722;p</font></tt> stores a file on the secstore.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Option <tt><font size=+1>&#8722;g</font></tt> retrieves a file to the local directory; option <tt><font size=+1>&#8722;G</font></tt> writes
+ it to standard output instead. Specifying <i>getfile</i> of . will send
+ to standard output a list of remote files with dates, lengths
+ and SHA1 hashes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Option <tt><font size=+1>&#8722;r</font></tt> removes a file from the secstore.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Option <tt><font size=+1>&#8722;c</font></tt> prompts for a password change.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Option <tt><font size=+1>&#8722;v</font></tt> produces more verbose output, in particular providing
+ a few bits of feedback to help the user detect mistyping.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Option <tt><font size=+1>&#8722;i</font></tt> says that the password should be read from standard
+ input instead of from <tt><font size=+1>/dev/cons</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Option <tt><font size=+1>&#8722;n</font></tt> says that the password should be read from NVRAM instead
+ of from <tt><font size=+1>/dev/cons</font></tt>. This option is unsupported.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The server is <tt><font size=+1>tcp!$auth!5356</font></tt>, or the server specified by option
+ <tt><font size=+1>&#8722;s</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For example, to add a secret to the file read by <a href="../man4/factotum.html"><i>factotum</i>(4)</a> at
+ startup, open a new window, type<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>% ramfs &#8722;p; cd /tmp<br>
+ % auth/secstore &#8722;g factotum<br>
+ secstore password:<br>
+ % echo 'key proto=apop dom=x.com user=ehg !password=hi' &gt;&gt; factotum<br>
+ % auth/secstore &#8722;p factotum<br>
+ secstore password:<br>
+ % read &#8722;m factotum &gt; /mnt/factotum/ctl<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ and delete the window. The first line creates an ephemeral memory-resident
+ workspace, invisible to others and automatically removed when
+ the window is deleted. The next three commands fetch the persistent
+ copy of the secrets, append a new secret, and save the updated
+ file back to secstore. The final command
+ loads the new secret into the running factotum.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Aescbc</i> encrypts and decrypts using AES (Rijndael) in cipher block
+ chaining (CBC) mode.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/secstore<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man4/factotum.html"><i>factotum</i>(4)</a>, Plan 9&#8217;s <i>secstore</i>(8)<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ There is deliberately no backup of files on the secstore, so <tt><font size=+1>&#8722;r</font></tt>
+ (or a disk crash) is irrevocable. You are advised to store important
+ secrets in a second location.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/sed.html b/man/man1/sed.html
new file mode 100644
index 00000000..c40874ad
--- /dev/null
+++ b/man/man1/sed.html
@@ -0,0 +1,300 @@
+<head>
+<title>sed(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SED(1)</b><td align=right><b>SED(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sed &ndash; stream editor<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>sed</font></tt> [ <tt><font size=+1>&#8722;n</font></tt> ] [ <tt><font size=+1>&#8722;g</font></tt> ] [ <tt><font size=+1>&#8722;e</font></tt> <i>script</i> ] [ <tt><font size=+1>&#8722;f</font></tt> <i>sfile</i> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Sed</i> copies the named <i>files</i> (standard input default) to the standard
+ output, edited according to a script of commands. The <tt><font size=+1>&#8722;f</font></tt> option
+ causes the script to be taken from file <i>sfile</i>; these options accumulate.
+ If there is just one <tt><font size=+1>&#8722;e</font></tt> option and no <tt><font size=+1>&#8722;f</font></tt>&#8217;s, the flag <tt><font size=+1>&#8722;e</font></tt> may be
+ omitted. The <tt><font size=+1>&#8722;n</font></tt> option suppresses the default
+ output; <tt><font size=+1>&#8722;g</font></tt> causes all substitutions to be global, as if suffixed
+ <tt><font size=+1>g</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A script consists of editing commands, one per line, of the following
+ form:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ [<i>address</i> [<tt><font size=+1>,</font></tt> <i>address</i>] ] <i>function</i> [<i>argument</i> ...]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ In normal operation <i>sed</i> cyclically copies a line of input into
+ a <i>pattern space</i> (unless there is something left after a <tt><font size=+1>D</font></tt> command),
+ applies in sequence all commands whose <i>addresses</i> select that pattern
+ space, and at the end of the script copies the pattern space to
+ the standard output (except under <tt><font size=+1>&#8722;n</font></tt>) and deletes the
+ pattern space.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An <i>address</i> is either a decimal number that counts input lines
+ cumulatively across files, a <tt><font size=+1>$</font></tt> that addresses the last line of
+ input, or a context address, <tt><font size=+1>/</font></tt><i>regular-expression</i><tt><font size=+1>/</font></tt>, in the style
+ of <a href="../man7/regexp.html"><i>regexp</i>(7)</a>, with the added convention that <tt><font size=+1>\n</font></tt> matches a newline
+ embedded in the pattern space.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A command line with no addresses selects every pattern space.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A command line with one address selects each pattern space that
+ matches the address.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A command line with two addresses selects the inclusive range
+ from the first pattern space that matches the first address through
+ the next pattern space that matches the second. (If the second
+ address is a number less than or equal to the line number first
+ selected, only one line is selected.) Thereafter the process is
+ repeated, looking again for the first address.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Editing commands can be applied to non-selected pattern spaces
+ by use of the negation function <tt><font size=+1>!</font></tt> (below).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An argument denoted <i>text</i> consists of one or more lines, all but
+ the last of which end with <tt><font size=+1>\</font></tt> to hide the newline. Backslashes
+ in text are treated like backslashes in the replacement string
+ of an <tt><font size=+1>s</font></tt> command, and may be used to protect initial blanks and
+ tabs against the stripping that is done on every script line.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An argument denoted <i>rfile</i> or <i>wfile</i> must terminate the command
+ line and must be preceded by exactly one blank. Each <i>wfile</i> is
+ created before processing begins. There can be at most 120 distinct
+ <i>wfile</i> arguments.<br>
+ <tt><font size=+1>a\<br>
+ </font></tt><i>text</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append. Place <i>text</i> on the output before reading the next input
+ line.<br>
+ <tt><font size=+1>b</font></tt> <i>label</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Branch to the <tt><font size=+1>:</font></tt> command bearing the <i>label</i>. If <i>label</i> is
+ empty, branch to the end of the script.<br>
+ <tt><font size=+1>c\<br>
+ </font></tt><i>text</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change. Delete the pattern space. With 0 or 1 address or at
+ the end of a 2-address range, place <i>text</i> on the output. Start
+ the next cycle.<br>
+ <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete the pattern space. Start the next cycle.<br>
+ <tt><font size=+1>D</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete the initial segment of the pattern space through the first
+ newline. Start the next cycle.<br>
+ <tt><font size=+1>g</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replace the contents of the pattern space by the contents of
+ the hold space.<br>
+ <tt><font size=+1>G</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append the contents of the hold space to the pattern space.<br>
+ <tt><font size=+1>h</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replace the contents of the hold space by the contents of the
+ pattern space.<br>
+ <tt><font size=+1>H</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append the contents of the pattern space to the hold space.<br>
+ <tt><font size=+1>i\<br>
+ </font></tt><i>text</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert. Place <i>text</i> on the standard output.<br>
+ <tt><font size=+1>n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy the pattern space to the standard output. Replace the pattern
+ space with the next line of input.<br>
+ <tt><font size=+1>N</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Append the next line of input to the pattern space with an embedded
+ newline. (The current line number changes.)<br>
+ <tt><font size=+1>p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print. Copy the pattern space to the standard output.<br>
+ <tt><font size=+1>P</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy the initial segment of the pattern space through the first
+ newline to the standard output.<br>
+ <tt><font size=+1>q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quit. Branch to the end of the script. Do not start a new cycle.<br>
+ <tt><font size=+1>r</font></tt> <i>rfile</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read the contents of <i>rfile</i>. Place them on the output before
+ reading the next input line.<br>
+ <tt><font size=+1>s/</font></tt><i>regular-expression</i><tt><font size=+1>/</font></tt><i>replacement</i><tt><font size=+1>/</font></tt><i>flags<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Substitute the <i>replacement</i> string for instances of the <i>regular-expression</i>
+ in the pattern space. Any character may be used instead of <tt><font size=+1>/</font></tt>.
+ For a fuller description see <a href="../man7/regexp.html"><i>regexp</i>(7)</a>. <i>Flags</i> is zero or more
+ of<br>
+ <tt><font size=+1>g</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Global. Substitute for all non-overlapping instances of the <i>regular
+ expression</i> rather than just the first one.<br>
+ <tt><font size=+1>p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print the pattern space if a replacement was made.<br>
+ <tt><font size=+1>w</font></tt> <i>wfile<br>
+ </i>Write. Append the pattern space to <i>wfile</i> if a replacement was
+ made.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>t</font></tt> <i>label</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test. Branch to the <tt><font size=+1>:</font></tt> command bearing the <i>label</i> if any
+ substitutions have been made since the most recent reading of
+ an input line or execution of a <tt><font size=+1>t</font></tt>. If <i>label</i> is empty, branch to
+ the end of the script.<br>
+ <tt><font size=+1>w</font></tt><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wfile<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Write. Append the pattern space to <i>wfile</i>.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>x</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Exchange the contents of the pattern and hold spaces.<br>
+ <tt><font size=+1>y/</font></tt><i>string1</i><tt><font size=+1>/</font></tt><i>string2</i><tt><font size=+1>/<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Transform. Replace all occurrences of characters in <i>string1</i> with
+ the corresponding character in <i>string2</i>. The lengths of <i>string1</i>
+ and <i>string2</i> must be equal.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>!</font></tt><i>function</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Don&#8217;t. Apply the <i>function</i> (or group, if <i>function</i> is <tt><font size=+1>{</font></tt>)
+ only to lines <i>not</i> selected by the address(es).<br>
+ <tt><font size=+1>:</font></tt> <i>label</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This command does nothing; it bears a <i>label</i> for <tt><font size=+1>b</font></tt> and <tt><font size=+1>t</font></tt>
+ commands to branch to.<br>
+ <tt><font size=+1>=</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Place the current line number on the standard output as a line.<br>
+ <tt><font size=+1>{</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Execute the following commands through a matching <tt><font size=+1>}</font></tt> only when
+ the pattern space is selected.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ An empty command is ignored.<br>
+
+ </table>
+
+ </table>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>sed 10q file<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the first 10 lines of the file.<br>
+
+ </table>
+ <tt><font size=+1>sed '/^$/d'<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Delete empty lines from standard input.<br>
+
+ </table>
+ <tt><font size=+1>sed 's/UNIX/&amp; system/g'<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Replace every instance of <tt><font size=+1>UNIX</font></tt> by <tt><font size=+1>UNIX system</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <tt><font size=+1>sed 's/ *$// </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;drop trailing blanks<br>
+ <tt><font size=+1>/^$/d </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drop empty lines<br>
+ <tt><font size=+1>s/ &nbsp;&nbsp;&nbsp;*/\ </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;replace blanks by newlines<br>
+ <tt><font size=+1>/g<br>
+ /^$/d' chapter*<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the files <tt><font size=+1>chapter1</font></tt>, <tt><font size=+1>chapter2</font></tt>, etc. one word to a line.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <tt><font size=+1>nroff &#8722;ms manuscript | sed '<br>
+ ${<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ /^$/p
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if last line of file is empty, print it<br>
+
+ </table>
+ <tt><font size=+1>}<br>
+ //N </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if current line is empty, append next line<br>
+ <tt><font size=+1>/^\n$/D' </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if two lines are empty, delete the first<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Delete all but one of each group of empty lines from a formatted
+ manuscript.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/sed.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/ed.html"><i>ed</i>(1)</a>, <a href="../man1/grep.html"><i>grep</i>(1)</a>, <a href="../man1/awk.html"><i>awk</i>(1)</a>, <a href="../man1/lex.html"><i>lex</i>(1)</a>, <a href="../man1/sam.html"><i>sam</i>(1)</a>, <a href="../man7/regexp.html"><i>regexp</i>(7)</a><br>
+ L. E. McMahon, &#8216;SED -- A Non-interactive Text Editor&#8217;, Unix Research
+ System Programmer&#8217;s Manual, Volume 2.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If input is from a pipe, buffering may consume characters beyond
+ a line on which a <tt><font size=+1>q</font></tt> command is executed.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/seq.html b/man/man1/seq.html
new file mode 100644
index 00000000..c04a08e5
--- /dev/null
+++ b/man/man1/seq.html
@@ -0,0 +1,99 @@
+<head>
+<title>seq(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SEQ(1)</b><td align=right><b>SEQ(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ seq &ndash; print sequences of numbers<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>seq</font></tt> [ <tt><font size=+1>&#8722;w</font></tt> ] [ <tt><font size=+1>&#8722;f</font></tt><i>format</i> ] [ <i>first</i> [ <i>incr</i> ] ] <i>last<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Seq</i> prints a sequence of numbers, one per line, from <i>first</i> (default
+ 1) to as near <i>last</i> as possible, in increments of <i>incr</i> (default
+ 1). The loop is:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>for(val = min; val &lt;= max; val += incr) print val;<br>
+ </font></tt>
+ </table>
+ The numbers are interpreted as floating point.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Normally integer values are printed as decimal integers. The options
+ are<br>
+ <tt><font size=+1>&#8722;f</font></tt><i>format</i>&nbsp;&nbsp;&nbsp;&nbsp;Use the <a href="../man3/print.html"><i>print</i>(3)</a>-style <i>format print</i> for printing each
+ (floating point) number. The default is <tt><font size=+1>%g</font></tt>.<br>
+ <tt><font size=+1>&#8722;w</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equalize the widths of all numbers by padding with leading zeros
+ as necessary. Not effective with option <tt><font size=+1>&#8722;f</font></tt>, nor with numbers in
+ exponential notation.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>seq 0 .05 .1<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print <tt><font size=+1>0 0.05 0.1</font></tt> (on separate lines).<br>
+
+ </table>
+ <tt><font size=+1>seq &#8722;w 0 .05 .1<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print <tt><font size=+1>0.00 0.05 0.10</font></tt>.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/seq.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Option <tt><font size=+1>&#8722;w</font></tt> always surveys every value in advance. Thus <tt><font size=+1>seq &#8722;w 1000000000</font></tt>
+ is a painful way to get an &#8216;infinite&#8217; sequence.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/sleep.html b/man/man1/sleep.html
new file mode 100644
index 00000000..622bca9a
--- /dev/null
+++ b/man/man1/sleep.html
@@ -0,0 +1,91 @@
+<head>
+<title>sleep(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SLEEP(1)</b><td align=right><b>SLEEP(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sleep &ndash; suspend execution for an interval<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>sleep</font></tt> <i>time<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Sleep</i> suspends execution for <i>time</i> seconds.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Execute a command 100 seconds hence.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>{sleep 100; command}&amp;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Repeat a command every 30 seconds.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>while (){<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ command<br>
+ sleep 30<br>
+
+ </table>
+ }<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/sleep.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/sleep.html"><i>sleep</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/sort.html b/man/man1/sort.html
new file mode 100644
index 00000000..2f6de1b7
--- /dev/null
+++ b/man/man1/sort.html
@@ -0,0 +1,200 @@
+<head>
+<title>sort(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SORT(1)</b><td align=right><b>SORT(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sort &ndash; sort and/or merge files<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>sort</font></tt> [ <tt><font size=+1>&#8722;cmuMbdfinrwt</font></tt><i>x</i> ] [ <tt><font size=+1>+</font></tt><i>pos1</i> [ <tt><font size=+1>&#8722;</font></tt><i>pos2</i> ] ... ] ... [ <tt><font size=+1>&#8722;k</font></tt> <i>pos1</i>
+ [ <i>,pos2</i> ] ] ...<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ &#8217; [ <tt><font size=+1>&#8722;o</font></tt> <i>output</i> ] [ <tt><font size=+1>&#8722;T</font></tt> <i>dir</i> ... ] [ <i>option</i> ... ] [ <i>file</i> ... ]<br>
+
+ </table>
+
+ </table>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Sort</i> sorts lines of all the <i>files</i> together and writes the result
+ on the standard output. If no input files are named, the standard
+ input is sorted.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The default sort key is an entire line. Default ordering is lexicographic
+ by runes. The ordering is affected globally by the following options,
+ one or more of which may appear.<br>
+ <tt><font size=+1>&#8722;M</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Compare as months. The first three non-white space characters
+ of the field are folded to upper case and compared so that <tt><font size=+1>JAN</font></tt>
+ precedes <tt><font size=+1>FEB</font></tt>, etc. Invalid fields compare low to <tt><font size=+1>JAN</font></tt>.<br>
+ <tt><font size=+1>&#8722;b</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Ignore leading white space (spaces and tabs) in field comparisons.<br>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&#8216;Phone directory&#8217; order: only letters, accented letters, digits
+ and white space are significant in comparisons.<br>
+ <tt><font size=+1>&#8722;f</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Fold lower case letters onto upper case. Accented characters
+ are folded to their non-accented upper case form.<br>
+ <tt><font size=+1>&#8722;i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Ignore characters outside the ASCII range 040-0176 in non-numeric
+ comparisons.<br>
+ <tt><font size=+1>&#8722;w</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Like <tt><font size=+1>&#8722;i</font></tt>, but ignore only tabs and spaces.<br>
+ <tt><font size=+1>&#8722;n</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;An initial numeric string, consisting of optional white space,
+ optional plus or minus sign, and zero or more digits with optional
+ decimal point, is sorted by arithmetic value.<br>
+ <tt><font size=+1>&#8722;g</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Numbers, like <tt><font size=+1>&#8722;n</font></tt> but with optional <tt><font size=+1>e</font></tt>-style exponents, are sorted
+ by value.<br>
+ <tt><font size=+1>&#8722;r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Reverse the sense of comparisons.<br>
+ <tt><font size=+1>&#8722;t</font></tt><i>x</i>&nbsp;&nbsp;&nbsp;&#8216;Tab character&#8217; separating fields is <i>x</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The notation <tt><font size=+1>+</font></tt><i>pos1</i> <tt><font size=+1>&#8722;</font></tt><i>pos2</i> restricts a sort key to a field beginning
+ at <i>pos1</i> and ending just before <i>pos2</i>. <i>Pos1</i> and <i>pos2</i> each have the
+ form <i>m</i><tt><font size=+1>.</font></tt><i>n</i>, optionally followed by one or more of the flags <tt><font size=+1>Mbdfginr</font></tt>,
+ where <i>m</i> tells a number of fields to skip from the beginning of
+ the line and <i>n</i> tells a number of characters to skip
+ further. If any flags are present they override all the global
+ ordering options for this key. A missing <tt><font size=+1>.</font></tt><i>n</i> means <tt><font size=+1>.0</font></tt>; a missing
+ <tt><font size=+1>&#8722;</font></tt><i>pos2</i> means the end of the line. Under the <tt><font size=+1>&#8722;t</font></tt><i>x</i> option, fields
+ are strings separated by <i>x</i>; otherwise fields are non-empty strings
+ separated by white space. White space before a field is part of
+ the field, except under option <tt><font size=+1>&#8722;b</font></tt>. A <tt><font size=+1>b</font></tt> flag may be attached independently
+ to <i>pos1</i> and <i>pos2.</i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The notation <tt><font size=+1>&#8722;k</font></tt> <i>pos1</i>[,<i>pos2</i>] is how POSIX <i>sort</i> defines fields:
+ <i>pos1</i> and <i>pos2</i> have the same format but different meanings. The
+ value of <i>m</i> is origin 1 instead of origin 0 and a missing <tt><font size=+1>.</font></tt><i>n</i> in
+ <i>pos2</i> is the end of the field.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When there are multiple sort keys, later keys are compared only
+ after all earlier keys compare equal. Lines that otherwise compare
+ equal are ordered with all bytes significant.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ These option arguments are also understood:<br>
+ <tt><font size=+1>&#8722;c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check that the single input file is sorted according to the
+ ordering rules; give no output unless the file is out of sort.<br>
+ <tt><font size=+1>&#8722;m</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Merge; assume the input files are already sorted.<br>
+ <tt><font size=+1>&#8722;u</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Suppress all but one in each set of equal lines. Ignored bytes
+ and bytes outside keys do not participate in this comparison.<br>
+ <tt><font size=+1>&#8722;o</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The next argument is the name of an output file to use instead
+ of the standard output. This file may be the same as one of the
+ inputs.<br>
+ <tt><font size=+1>&#8722;T</font></tt><i>dir</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Put temporary files in <i>dir</i> rather than in <tt><font size=+1>/var/tmp</font></tt>.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>sort &#8722;u +0f +0 list<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print in alphabetical order all the unique spellings in a list
+ of words where capitalized words differ from uncapitalized.<br>
+
+ </table>
+ <tt><font size=+1>sort &#8722;t: +1 /adm/users<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the users file sorted by user name (the second colon-separated
+ field).<br>
+
+ </table>
+ <tt><font size=+1>sort &#8722;umM dates<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the first instance of each month in an already sorted file.
+ Options <tt><font size=+1>&#8722;um</font></tt> with just one input file make the choice of a unique
+ representative from a set of equal lines predictable.<br>
+
+ </table>
+ <tt><font size=+1>grep &#8722;n '^' input | sort &#8722;t: +1f +0n | sed 's/[0&#8722;9]*://'<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A stable sort: input lines that compare equal will come out in
+ their original order.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/var/tmp/sort.</font></tt><i>&lt;pid&gt;.&lt;ordinal&gt;<br>
+ </i>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/sort.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/uniq.html"><i>uniq</i>(1)</a>, <a href="../man1/look.html"><i>look</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Sort</i> comments and exits with non-null status for various trouble
+ conditions and for disorder discovered under option <tt><font size=+1>&#8722;c</font></tt>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ An external null character can be confused with an internally
+ generated end-of-field character. The result can make a sub-field
+ not sort less than a longer field.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Some of the options, e.g. <tt><font size=+1>&#8722;i</font></tt> and <tt><font size=+1>&#8722;M</font></tt>, are hopelessly provincial.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/spell.html b/man/man1/spell.html
new file mode 100644
index 00000000..9f412d2c
--- /dev/null
+++ b/man/man1/spell.html
@@ -0,0 +1,125 @@
+<head>
+<title>spell(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SPELL(1)</b><td align=right><b>SPELL(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ spell, sprog &ndash; find spelling errors<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>spell</font></tt> [ <i>options</i> ] ... [ <i>file</i> ] ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>sprog</font></tt> [ <i>options</i> ] [ <tt><font size=+1>&#8722;f</font></tt> <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Spell</i> looks up words from the named <i>files</i> (standard input default)
+ in a spelling list and places possible misspellings--words not sanctioned
+ there--on the standard output.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Spell</i> ignores constructs of <a href="../man1/troff.html"><i>troff</i>(1)</a> and its standard preprocessors.
+ It understands these options:<br>
+ <tt><font size=+1>&#8722;b</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Check British spelling.<br>
+ <tt><font size=+1>&#8722;v</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print all words not literally in the spelling list, with derivations.<br>
+ <tt><font size=+1>&#8722;x</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print, marked with <tt><font size=+1>=</font></tt>, every stem as it is looked up in the spelling
+ list, along with its affix classes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ As a matter of policy, <i>spell</i> does not admit multiple spellings
+ of the same word. Variants that follow general rules are preferred
+ over those that don&#8217;t, even when the unruly spelling is more common.
+ Thus, in American usage, &#8216;modelled&#8217;, &#8216;sizeable&#8217;, and &#8216;judgment&#8217;
+ are rejected in favor of &#8216;modeled&#8217;, &#8216;sizable&#8217;, and
+ &#8216;judgement&#8217;. Agglutinated variants are shunned: &#8216;crewmember&#8217; and
+ &#8216;backyard&#8217; cede to &#8216;crew member&#8217; and &#8216;back yard&#8217; (noun) or &#8216;back-yard&#8217;
+ (adjective).<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/lib/amspell<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ American spelling list<br>
+
+ </table>
+ <tt><font size=+1>/usr/local/plan9/lib/brspell<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ British spelling list<br>
+
+ </table>
+ <tt><font size=+1>/usr/local/plan9/bin/sprog<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The actual spelling checker. It expects one word per line on standard
+ input, and takes the same arguments as <i>spell</i>.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin/spell</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the script<br>
+ <tt><font size=+1>/usr/local/plan9/src/cmd/spell</font></tt>&nbsp;&nbsp;&nbsp;source for <i>sprog<br>
+ </i>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/deroff.html"><i>deroff</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The heuristics of <a href="../man1/deroff.html"><i>deroff</i>(1)</a> used to excise formatting information
+ are imperfect.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The spelling list&#8217;s coverage is uneven; in particular biology,
+ medicine, and chemistry, and perforce proper names, not to mention
+ languages other than English, are covered very lightly.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/split.html b/man/man1/split.html
new file mode 100644
index 00000000..ff3a3d38
--- /dev/null
+++ b/man/man1/split.html
@@ -0,0 +1,91 @@
+<head>
+<title>split(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SPLIT(1)</b><td align=right><b>SPLIT(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ split &ndash; split a file into pieces<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>split</font></tt> [ <i>option ...</i> ] [ <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Split</i> reads <i>file</i> (standard input by default) and writes it in
+ pieces of 1000 lines per output file. The names of the output
+ files are <tt><font size=+1>xaa</font></tt>, <tt><font size=+1>xab</font></tt>, and so on to <tt><font size=+1>xzz</font></tt>. The options are<br>
+ <tt><font size=+1>&#8722;n</font></tt> <i>n</i>&nbsp;&nbsp;&nbsp;Split into <i>n</i>-line pieces.<br>
+ <tt><font size=+1>&#8722;l</font></tt> <i>n</i>&nbsp;&nbsp;&nbsp;Synonym for <tt><font size=+1>&#8722;n</font></tt> <i>n</i>, a nod to Unix&#8217;s syntax.<br>
+ <tt><font size=+1>&#8722;e</font></tt> <i>expression<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ File divisions occur at each line that matches a regular <i>expression</i>;
+ see <a href="../man7/regexp.html"><i>regexp</i>(7)</a>. Multiple <tt><font size=+1>&#8722;e</font></tt> options may appear. If a subexpression
+ of <i>expression</i> is contained in parentheses <tt><font size=+1>(</font></tt>...<tt><font size=+1>)</font></tt>, the output file
+ name is the portion of the line which matches the subexpression.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;f</font></tt> <i>stem<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Use <i>stem</i> instead of <tt><font size=+1>x</font></tt> in output file names.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;s</font></tt> <i>suffix<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Append <i>suffix</i> to names identified under <tt><font size=+1>&#8722;e</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;x</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Exclude the matched input line from the output file.<br>
+ <tt><font size=+1>&#8722;i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Ignore case in option <tt><font size=+1>&#8722;e</font></tt>; force output file names (excluding
+ the suffix) to lower case.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/split.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/sed.html"><i>sed</i>(1)</a>, <a href="../man1/awk.html"><i>awk</i>(1)</a>, <a href="../man1/grep.html"><i>grep</i>(1)</a>, <a href="../man7/regexp.html"><i>regexp</i>(7)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/src.html b/man/man1/src.html
new file mode 100644
index 00000000..cd8334ec
--- /dev/null
+++ b/man/man1/src.html
@@ -0,0 +1,99 @@
+<head>
+<title>src(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SRC(1)</b><td align=right><b>SRC(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ src &ndash; find source code for executable<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>src</font></tt> [ <tt><font size=+1>&#8722;n</font></tt> ] [ <tt><font size=+1>&#8722;s</font></tt> <i>symbol</i> ] <i>file</i> <tt><font size=+1>...<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Src</i> examines the named <i>files</i> to find the corresponding source
+ code, which is then sent to the editor using <tt><font size=+1>B</font></tt> (see <a href="../man1/sam.html"><i>sam</i>(1)</a>). If
+ <i>file</i> is an <a href="../man1/rc.html"><i>rc</i>(1)</a> script, the source is the file itself. If <i>file</i>
+ is an executable, the source is defined to be the single file
+ containing the definition of <tt><font size=+1>main</font></tt> and <i>src</i> will point the editor
+ at the line that
+ begins the definition. <i>Src</i> uses <a href="../man1/db.html"><i>db</i>(1)</a> to extract the symbol table
+ information that identifies the source.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Src</i> looks for each <i>file</i> in the current directory, in <tt><font size=+1>/bin</font></tt>, and
+ in the subdirectories of <tt><font size=+1>/bin</font></tt>, in that order.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;n</font></tt> flag causes <tt><font size=+1>src</font></tt> to print the file name but not send it
+ to the editor. The <tt><font size=+1>&#8722;s</font></tt> flag identifies a <i>symbol</i> other than <tt><font size=+1>main</font></tt>
+ to locate.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Find the source to the <tt><font size=+1>main</font></tt> routine in <tt><font size=+1>/bin/ed</font></tt>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>src ed<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Find the source for <tt><font size=+1>strcmp</font></tt>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>src &#8722;s strcmp rc<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin/src<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/db.html"><i>db</i>(1)</a>, <a href="../man1/plumb.html"><i>plumb</i>(1)</a>, <a href="../man1/sam.html"><i>sam</i>(1)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/stats.html b/man/man1/stats.html
new file mode 100644
index 00000000..77b598d5
--- /dev/null
+++ b/man/man1/stats.html
@@ -0,0 +1,214 @@
+<head>
+<title>stats(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>STATS(1)</b><td align=right><b>STATS(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ stats, auxstats &ndash; display graphs of system activity<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>stats</font></tt> [ <tt><font size=+1>&#8722;</font></tt><i>option</i> ] [ <i>machine</i>[<tt><font size=+1>:</font></tt><i>path</i>] ... ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>auxstats</font></tt> [ <i>machine</i> [ <i>path</i> ] ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Stats</i> displays a rolling graph of various statistics collected
+ by the operating system and updated once per second. The statistics
+ may be from a remote <i>machine</i> or multiple <i>machines</i>, whose graphs
+ will appear in adjacent columns. The columns are labeled by the
+ machine names and the number of processors on the
+ machine if it is a multiprocessor.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Auxstats</i> collects the machine statistics for display by <i>stats</i>.
+ With no arguments, it collects statistics from the local machine.
+ If <i>machine</i> is named, it executes <tt><font size=+1>ssh</font></tt> <i>machine path</i>; when <i>ssh</i> finishes,
+ <i>auxstats</i> sleeps for one minute and runs it again. The default
+ <i>path</i> is simply <tt><font size=+1>auxstats</font></tt>, but since some shells do not
+ execute any sort of user profile when run as a non-login shell,
+ it is often necessary to specify an exact path.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The right mouse button presents a menu to enable and disable the
+ display of various statistics; by default, <i>stats</i> begins by showing
+ the load average on the executing machine.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The lower-case <i>options</i> choose the initial set to display:<br>
+ <tt><font size=+1>b battery</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;percentage battery life remaining.<br>
+ <tt><font size=+1>c context</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number of process context switches per second.<br>
+ <tt><font size=+1>e ether</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;total number of packets sent and received per second.<br>
+ <tt><font size=+1>E etherin,out<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ number of packets sent and received per second, displayed as separate
+ graphs.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>f fault</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number of page faults per second.<br>
+ <tt><font size=+1>i intr</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number of interrupts per second.<br>
+ <tt><font size=+1>l load</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(default) system load average. The load is computed as a
+ running average of the number of processes ready to run, multiplied
+ by 1000. On most systems, it changes only every five seconds and
+ has limited accuracy.<br>
+ <tt><font size=+1>m mem</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;total pages of active memory. The graph displays the fraction
+ of the machine&#8217;s total memory in use.<br>
+ <tt><font size=+1>n etherin,out,err<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ number of packets sent and received per second, and total number
+ of errors, displayed as separate graphs.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>s syscall</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number of system calls per second.<br>
+ <tt><font size=+1>w swap</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number of valid pages on the swap device. The swap is displayed
+ as a fraction of the number of swap pages configured by the machine.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The graphs are plotted with time on the horizontal axis. The vertical
+ axes range from 0 to 1000*sleepsecs, multiplied by the number
+ of processors on the machine when appropriate. The only exceptions
+ are memory, and swap space, which display fractions of the total
+ available, system load, which displays a number
+ between 0 and 1000, idle and intr, which display percentages and
+ the Ethernet error count, which goes from 0 to 10.. If the value
+ of the parameter is too large for the visible range, its value
+ is shown in decimal in the upper left corner of the graph.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Upper-case options control details of the display. All graphs
+ are affected; there is no mechanism to affect only one graph.<br>
+ <tt><font size=+1>&#8722;T</font></tt> <i>sleepsecs<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set the number of seconds between samples to <i>sleepsecs</i> (default
+ one second).<br>
+
+ </table>
+ <tt><font size=+1>&#8722;S</font></tt> <i>scale<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Sets a scale factor for the displays. A value of 2, for example,
+ means that the highest value plotted will be twice as large as
+ the default.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;L</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Plot all graphs with logarithmic <i>y</i> axes. The graph is plotted
+ so the maximum value that would be displayed on a linear graph
+ is 2/3 of the way up the <i>y</i> axis and the total range of the graph
+ is a factor of 1000; thus the <i>y</i> origin is 1/100 of the default
+ maximum value and the top of the graph is 10 times the
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ default maximum.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;Y</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;If the display is large enough to show them, place value markers
+ along the <i>y</i> axes of the graphs. Since one set of markers serves
+ for all machines across the display, the values in the markers
+ disregard scaling factors due to multiple processors on the machines.
+ On a graph for a multiprocessor, the displayed
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ values will be larger than the markers indicate. The markers appear
+ along the right, and the markers show values appropriate to the
+ rightmost machine; this only matters for graphs such as memory
+ that have machine-specific maxima.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ Typing &#8216;q&#8217; or DEL causes <i>stats</i> to exit.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Show the load, memory, interrupts, system calls, context switches,
+ and ethernet packets for the local machine, a remote BSD machine
+ <i>daemon</i>, and a remote Linux machine <i>tux</i>. <i>Auxstats</i> is not in <i>tux</i>&#8217;s
+ path, so the full path must be given.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>stats &#8722;lmisce `hostname` daemon \<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ tux:/usr/local/plan9/bin/auxstats<br>
+
+ </table>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/draw/stats.c
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>/usr/local/plan9/src/cmd/auxstats<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>auxstats</i> binary needs read access to <tt><font size=+1>/dev/kmem</font></tt> in order to
+ collect network statistics on non-Linux systems. Typically this
+ can be arranged by setting the <i>auxstat</i> binary&#8217;s group to <tt><font size=+1>kmem</font></tt>
+ and then turning on its set-gid bit.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/strings.html b/man/man1/strings.html
new file mode 100644
index 00000000..3b1f4eff
--- /dev/null
+++ b/man/man1/strings.html
@@ -0,0 +1,69 @@
+<head>
+<title>strings(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>STRINGS(1)</b><td align=right><b>STRINGS(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ strings &ndash; extract printable strings<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>strings</font></tt> [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Strings</i> finds and prints strings containing 6 or more consecutive
+ printable UTF-encoded characters in a (typically) binary file,
+ default standard input. Printable characters are taken to be ASCII
+ characters from blank through tilde (hexadecimal 20 through 7E),
+ inclusive, and all other characters from value 00A0 to FFFF.
+ Strings reports the decimal offset within the file at which the
+ string starts and the text of the string. If the string is longer
+ than 70 runes the line is terminated by three dots and the printing
+ is resumed on the next line with the offset of the continuation
+ line.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/strings.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/nm.html"><i>nm</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/sum.html b/man/man1/sum.html
new file mode 100644
index 00000000..2b86af65
--- /dev/null
+++ b/man/man1/sum.html
@@ -0,0 +1,92 @@
+<head>
+<title>sum(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SUM(1)</b><td align=right><b>SUM(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sum, md5sum, sha1sum &ndash; sum and count blocks in a file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>sum</font></tt> [ <tt><font size=+1>&#8722;5r</font></tt> ] [ <i>file ...</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>md5sum</font></tt> [ <i>file ...</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>sha1sum</font></tt> [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ By default, <i>sum</i> calculates and prints a 32-bit hexadecimal checksum,
+ a byte count, and the name of each <i>file</i>. The checksum is also
+ a function of the input length. If no files are given, the standard
+ input is summed. Other summing algorithms are available. The options
+ are<br>
+ <tt><font size=+1>&#8722;r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Sum with the algorithm of System V&#8217;s <tt><font size=+1>sum &#8722;r</font></tt> and print the length
+ (in 1K blocks) of the input.<br>
+ <tt><font size=+1>&#8722;5</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Sum with System V&#8217;s default algorithm and print the length (in
+ 512-byte blocks) of the input.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Sum</i> is typically used to look for bad spots, to validate a file
+ communicated over some transmission line or as a quick way to
+ determine if two files on different machines might be the same.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Md5sum</font></tt> computes the 32 hex digit RSA Data Security, Inc. MD5 Message-Digest
+ Algorithm described in RFC1321. If no <i>files</i> are given, the standard
+ input is summed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Sha1sum</font></tt> computes the 40 hex digit National Institute of Standards
+ and Technology SHA1 secure hash algorithm described in FIPS PUB
+ 180-1. If no <i>files</i> are given, the standard input is summed.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/sum.c<br>
+ /usr/local/plan9/src/cmd/md5sum.c<br>
+ /usr/local/plan9/src/cmd/sha1sum.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/cmp.html"><i>cmp</i>(1)</a>, <a href="../man1/wc.html"><i>wc</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/tail.html b/man/man1/tail.html
new file mode 100644
index 00000000..781f3333
--- /dev/null
+++ b/man/man1/tail.html
@@ -0,0 +1,116 @@
+<head>
+<title>tail(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TAIL(1)</b><td align=right><b>TAIL(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ tail &ndash; deliver the last part of a file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>tail</font></tt> [ <tt><font size=+1>+&#8722;</font></tt><i>number</i>[<tt><font size=+1>lbc</font></tt>][<tt><font size=+1>rf</font></tt>] ] [ <i>file</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>tail</font></tt> [ <tt><font size=+1>&#8722;fr</font></tt> ] [ <tt><font size=+1>&#8722;n</font></tt> <i>nlines</i> ] [ <tt><font size=+1>&#8722;c</font></tt> <i>nbytes</i> ] [ <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Tail</i> copies the named file to the standard output beginning at
+ a designated place. If no file is named, the standard input is
+ copied.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Copying begins at position <tt><font size=+1>+</font></tt><i>number</i> measured from the beginning,
+ or <tt><font size=+1>&#8722;</font></tt><i>number</i> from the end of the input. <i>Number</i> is counted in lines,
+ 1K blocks or bytes, according to the appended flag <tt><font size=+1>l</font></tt>, <tt><font size=+1>b</font></tt>, or <tt><font size=+1>c</font></tt>.
+ Default is <tt><font size=+1>&#8722;10l</font></tt> (ten ell).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The further flag <tt><font size=+1>r</font></tt> causes tail to print lines from the end of
+ the file in reverse order; <tt><font size=+1>f</font></tt> (follow) causes <i>tail</i>, after printing
+ to the end, to keep watch and print further data as it appears.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The second syntax is that promulgated by POSIX, where the <i>numbers</i>
+ rather than the options are signed.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>tail file<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the last 10 lines of a file.<br>
+
+ </table>
+ <tt><font size=+1>tail +0f file<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print a file, and continue to watch data accumulate as it grows.<br>
+
+ </table>
+ <tt><font size=+1>sed 10q file<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the first 10 lines of a file.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/tail.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Tails relative to the end of the file are treasured up in a buffer,
+ and thus are limited in length.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ According to custom, option <tt><font size=+1>+</font></tt><i>number</i> counts lines from 1, and counts
+ blocks and bytes from 0.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Tail</i> is ignorant of UTF.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/tbl.html b/man/man1/tbl.html
new file mode 100644
index 00000000..a50e8939
--- /dev/null
+++ b/man/man1/tbl.html
@@ -0,0 +1,187 @@
+<head>
+<title>tbl(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TBL(1)</b><td align=right><b>TBL(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ tbl &ndash; format tables for nroff or troff<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>tbl</font></tt> [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Tbl</i> is a preprocessor for formatting tables for <i>nroff</i> or <a href="../man1/troff.html"><i>troff</i>(1)</a>.
+ The input <i>files</i> are copied to the standard output, except for
+ segments of the form<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>.TS <br>
+ </font></tt><i>options</i> <tt><font size=+1>;<br>
+ </font></tt><i>format</i> <tt><font size=+1>.<br>
+ </font></tt><i>data <br>
+ </i><tt><font size=+1>.T&amp; <br>
+ </font></tt><i>format</i> <tt><font size=+1>.<br>
+ </font></tt><i>data <br>
+ </i>. . .<br>
+ <tt><font size=+1>.TE <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ which describe tables and are replaced by <i>troff</i> requests to lay
+ out the tables. If no arguments are given, <i>tbl</i> reads the standard
+ input.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The (optional) <i>options</i> line is terminated by a semicolon and contains
+ one or more of<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>center</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;center the table; default is left-adjust<br>
+ <tt><font size=+1>expand</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;make table as wide as current line length<br>
+ <tt><font size=+1>box<br>
+ doublebox</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enclose the table in a box or double box<br>
+ <tt><font size=+1>allbox</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enclose every item in a box<br>
+ <tt><font size=+1>tab(</font></tt><i>x</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;use <i>x</i> to separate input items; default is tab<br>
+ <tt><font size=+1>linesize(</font></tt><i>n</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;set rules in <i>n</i>-point type<br>
+ <tt><font size=+1>delim(</font></tt><i>xy</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recognize <i>x</i> and <i>y</i> as <a href="../man1/eqn.html"><i>eqn</i>(1)</a> delimiters<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ Each line, except the last, of the obligatory <i>format</i> describes
+ one row of the table. The last line describes all rows until the
+ next <tt><font size=+1>.T&amp;</font></tt>, where the format changes, or the end of the table at
+ <tt><font size=+1>.TE</font></tt>. A format is specified by key letters, one per column, either
+ upper or lower case:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>L</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Left justify: the default for columns without format keys.<br>
+ <tt><font size=+1>R</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right justify.<br>
+ <tt><font size=+1>C</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Center.<br>
+ <tt><font size=+1>N</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Numeric: align at decimal point (inferred for integers) or at
+ <tt><font size=+1>\&amp;</font></tt>.<br>
+ <tt><font size=+1>S</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Span: extend previous column across this one.<br>
+ <tt><font size=+1>A</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Alphabetic: left-aligned within column, widest item centered,
+ indented relative to <tt><font size=+1>L</font></tt> rows.<br>
+ <tt><font size=+1>^</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vertical span: continue item from previous row into this row.<br>
+ <tt><font size=+1>&#8722;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw a horizontal rule in this column.<br>
+ <tt><font size=+1>=</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw a double horizontal rule in this column.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ Key letters may be followed by modifiers, also either case:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>|</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw vertical rule between columns.<br>
+ <tt><font size=+1>||</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw a double vertical rule between columns.<br>
+ <i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gap between column is <i>n</i> ens wide. Default is 3.<br>
+ <tt><font size=+1>F</font></tt><i>font</i>&nbsp;&nbsp;&nbsp;Use specified <i>font</i>. <tt><font size=+1>B</font></tt> and <tt><font size=+1>I</font></tt> mean <tt><font size=+1>FB</font></tt> and <tt><font size=+1>FI</font></tt>.<br>
+ <tt><font size=+1>T</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Begin vertically-spanned item at top row of range; default is
+ vertical centering (with <tt><font size=+1>^</font></tt>).<br>
+ <tt><font size=+1>P</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use point size <i>n</i>.<br>
+ <tt><font size=+1>V</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use <i>n</i>-point vertical spacing in text block; signed <i>n</i> means relative
+ change.<br>
+ <tt><font size=+1>W(</font></tt><i>n</i><tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;Column width as a <i>troff</i> width specification. Parens are optional
+ if <i>n</i> is a simple integer.<br>
+ <tt><font size=+1>E</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equalize the widths of all columns marked <tt><font size=+1>E</font></tt>.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ Each line of <i>data</i> becomes one row of the table; tabs separate
+ items. Lines beginning with <tt><font size=+1>.</font></tt> are <i>troff</i> requests. Certain special
+ data items are recognized:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>_</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw a horizontal rule in this column.<br>
+ <tt><font size=+1>=</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draw a double horizontal rule in this column. A data line consisting
+ of a single <tt><font size=+1>_</font></tt> or <tt><font size=+1>=</font></tt> draws the rule across the whole table.<br>
+ <tt><font size=+1>\_</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Draw a rule only as wide as the contents of the column.<br>
+ <tt><font size=+1>\R</font></tt><i>x</i>&nbsp;&nbsp;&nbsp;Repeat character <i>x</i> across the column.<br>
+ <tt><font size=+1>\^</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Span the previous item in this column down into this row.<br>
+ <tt><font size=+1>T{</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;The item is a text block to be separately formatted by <i>troff</i>
+ and placed in the table. The block continues to the next line
+ beginning with <tt><font size=+1>T}</font></tt>. The remainder of the data line follows at that
+ point.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ When it is used in a pipeline with <i>eqn</i>, the <i>tbl</i> command should
+ be first, to minimize the volume of data passed through pipes.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Let &lt;tab&gt; represent a tab (which should be typed as a genuine tab).<br>
+ <tt><font size=+1>.TS<br>
+ c s s<br>
+ c c s<br>
+ c c c<br>
+ l n n.<br>
+ Household Population<br>
+ Town</font></tt>&lt;tab&gt;<tt><font size=+1>Households<br>
+ </font></tt>&lt;tab&gt;<tt><font size=+1>Number</font></tt>&lt;tab&gt;<tt><font size=+1>Size<br>
+ </font></tt>
+</table>
+Bedminster&lt;tab&gt;789&lt;tab&gt;3.26<br>
+Bernards Twp.&lt;tab&gt;3087&lt;tab&gt;3.74<br>
+Bernardsville&lt;tab&gt;2018&lt;tab&gt;3.30<br>
+.TE<br>
+ <br>
+ <br>
+<br>
+c s s<br>
+c c s<br>
+c c c<br>
+l n n.<br>
+Household Population<br>
+Town Households<br>
+Number &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Size<br>
+Bedminster &nbsp;&nbsp;&nbsp;789 &nbsp;&nbsp;&nbsp;3.26<br>
+Bernards Twp. 3087 &nbsp;&nbsp;&nbsp;3.74<br>
+Bernardsville 2018 &nbsp;&nbsp;&nbsp;3.30<br>
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/tcs.html b/man/man1/tcs.html
new file mode 100644
index 00000000..50919607
--- /dev/null
+++ b/man/man1/tcs.html
@@ -0,0 +1,131 @@
+<head>
+<title>tcs(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TCS(1)</b><td align=right><b>TCS(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ tcs &ndash; translate character sets<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>tcs</font></tt> [ <tt><font size=+1>&#8722;slcv</font></tt> ] [ <tt><font size=+1>&#8722;f</font></tt> <i>ics</i> ] [ <tt><font size=+1>&#8722;t</font></tt> <i>ocs</i> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Tcs</i> interprets the named <i>file(s)</i> (standard input default) as a
+ stream of characters from the <i>ics</i> character set or format, converts
+ them to runes, and then converts them into a stream of characters
+ from the <i>ocs</i> character set or format on the standard output. The
+ default value for <i>ics</i> and <i>ocs</i> is <tt><font size=+1>utf</font></tt>, the UTF encoding
+ described in <a href="../man7/utf.html"><i>utf</i>(7)</a>. The <tt><font size=+1>&#8722;l</font></tt> option lists the character sets known
+ to <i>tcs</i>. Processing continues in the face of conversion errors
+ (the <tt><font size=+1>&#8722;s</font></tt> option prevents reporting of these errors). The <tt><font size=+1>&#8722;c</font></tt> option
+ forces the output to contain only correctly converted characters;
+ otherwise, <tt><font size=+1>0x80</font></tt> characters will be substituted for UTF
+ encoding errors and <tt><font size=+1>0xFFFD</font></tt> characters will substituted for unknown
+ characters.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;v</font></tt> option generates various diagnostic and summary information
+ on standard error, or makes the <tt><font size=+1>&#8722;l</font></tt> output more verbose.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Tcs</i> recognizes an ever changing list of character sets. In particular,
+ it supports a variety of Russian and Japanese encodings. Some
+ of the supported encodings are<br>
+ <tt><font size=+1>utf</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Plan 9 UTF encoding, known by ISO as UTF-8<br>
+ <tt><font size=+1>utf1</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The deprecated original UTF encoding from ISO 10646<br>
+ <tt><font size=+1>ascii</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7-bit ASCII<br>
+ <tt><font size=+1>8859&#8722;1</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Latin-1 (Central European)<br>
+ <tt><font size=+1>8859&#8722;2</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Latin-2 (Czech .. Slovak)<br>
+ <tt><font size=+1>8859&#8722;3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Latin-3 (Dutch .. Turkish)<br>
+ <tt><font size=+1>8859&#8722;4</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Latin-4 (Scandinavian)<br>
+ <tt><font size=+1>8859&#8722;5</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Part 5 (Cyrillic)<br>
+ <tt><font size=+1>8859&#8722;6</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Part 6 (Arabic)<br>
+ <tt><font size=+1>8859&#8722;7</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Part 7 (Greek)<br>
+ <tt><font size=+1>8859&#8722;8</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Part 8 (Hebrew)<br>
+ <tt><font size=+1>8859&#8722;9</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Latin-5 (Finnish .. Portuguese)<br>
+ <tt><font size=+1>koi8</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;KOI-8 (GOST 19769-74)<br>
+ <tt><font size=+1>jis&#8722;kanji</font></tt>&nbsp;&nbsp;&nbsp;ISO 2022-JP<br>
+ <tt><font size=+1>ujis</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EUC-JX: JIS 0208<br>
+ <tt><font size=+1>ms&#8722;kanji</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Microsoft, or Shift-JIS<br>
+ <tt><font size=+1>jis</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(from only) guesses between ISO 2022-JP, EUC or Shift-Jis<br>
+ <tt><font size=+1>gb</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Chinese national standard (GB2312-80)<br>
+ <tt><font size=+1>big5</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Big 5 (HKU version)<br>
+ <tt><font size=+1>unicode</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unicode Standard 1.0<br>
+ <tt><font size=+1>tis</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thai character set plus ASCII (TIS 620-1986)<br>
+ <tt><font size=+1>msdos</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IBM PC: CP 437<br>
+ <tt><font size=+1>atari</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Atari-ST character set<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>tcs &#8722;f 8859&#8722;1<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Convert 8859-1 (Latin-1) characters into UTF format.<br>
+
+ </table>
+ <tt><font size=+1>tcs &#8722;s &#8722;f jis<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Convert characters encoded in one of several shift JIS encodings
+ into UTF format. Unknown Kanji will be converted into <tt><font size=+1>0xFFFD</font></tt> characters.<br>
+
+ </table>
+ <tt><font size=+1>tcs &#8722;lv<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print an up to date list of the supported character sets.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/tcs<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/ascii.html"><i>ascii</i>(1)</a>, <a href="../man3/rune.html"><i>rune</i>(3)</a>, <a href="../man7/utf.html"><i>utf</i>(7)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/tee.html b/man/man1/tee.html
new file mode 100644
index 00000000..2ece532f
--- /dev/null
+++ b/man/man1/tee.html
@@ -0,0 +1,56 @@
+<head>
+<title>tee(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TEE(1)</b><td align=right><b>TEE(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ tee &ndash; pipe fitting<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>tee</font></tt> [ <tt><font size=+1>&#8722;i</font></tt> ] [ <tt><font size=+1>&#8722;a</font></tt> ] <i>files<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Tee</i> transcribes the standard input to the standard output and
+ makes copies in the <i>files</i>. The options are<br>
+ <tt><font size=+1>&#8722;i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Ignore interrupts.<br>
+ <tt><font size=+1>&#8722;a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Append the output to the <i>files</i> rather than rewriting them.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/tee.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/test.html b/man/man1/test.html
new file mode 100644
index 00000000..0f3fa85d
--- /dev/null
+++ b/man/man1/test.html
@@ -0,0 +1,156 @@
+<head>
+<title>test(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TEST(1)</b><td align=right><b>TEST(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ test &ndash; set status according to condition<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>test</font></tt> <i>expr<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Test</i> evaluates the expression <i>expr</i>. If the value is true the exit
+ status is null; otherwise the exit status is non-null. If there
+ are no arguments the exit status is non-null.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The following primitives are used to construct <i>expr</i>.<br>
+ <tt><font size=+1>&#8722;r</font></tt> <i>file</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the file exists (is accessible) and is readable.<br>
+ <tt><font size=+1>&#8722;w</font></tt> <i>file</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the file exists and is writable.<br>
+ <tt><font size=+1>&#8722;x</font></tt> <i>file</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the file exists and has execute permission.<br>
+ <tt><font size=+1>&#8722;e</font></tt> <i>file</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the file exists.<br>
+ <tt><font size=+1>&#8722;f</font></tt> <i>file</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the file exists and is a plain file.<br>
+ <tt><font size=+1>&#8722;d</font></tt> <i>file</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the file exists and is a directory.<br>
+ <tt><font size=+1>&#8722;s</font></tt> <i>file</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the file exists and has a size greater than zero.<br>
+ <tt><font size=+1>&#8722;t</font></tt> <i>fildes</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the open file whose file descriptor number is
+ <i>fildes</i> (1 by default) is the same file as <tt><font size=+1>/dev/cons</font></tt>.<br>
+ <tt><font size=+1>&#8722;A</font></tt> <i>file</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the file exists and is append-only.<br>
+ <tt><font size=+1>&#8722;L</font></tt> <i>file</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the file exists and is exclusive-use.<br>
+ <tt><font size=+1>&#8722;T</font></tt><i>file</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the file exists and is temporary.<br>
+ <i>s1</i> <tt><font size=+1>=</font></tt> <i>s2</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the strings <i>s1</i> and <i>s2</i> are identical.<br>
+ <i>s1</i> <tt><font size=+1>!=</font></tt> <i>s2</i>&nbsp;&nbsp;&nbsp;&nbsp;True if the strings <i>s1</i> and <i>s2</i> are not identical.<br>
+ s1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if <i>s1</i> is not the null string. (Deprecated.)<br>
+ <tt><font size=+1>&#8722;n</font></tt> <i>s1</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the length of string <i>s1</i> is non-zero.<br>
+ <tt><font size=+1>&#8722;z</font></tt> <i>s1</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;True if the length of string <i>s1</i> is zero.<br>
+ <i>n1</i> <tt><font size=+1>&#8722;eq</font></tt> <i>n2</i>True if the integers <i>n1</i> and <i>n2</i> are arithmetically equal.
+ Any of the comparisons <tt><font size=+1>&#8722;ne</font></tt>, <tt><font size=+1>&#8722;gt</font></tt>, <tt><font size=+1>&#8722;ge</font></tt>, <tt><font size=+1>&#8722;lt</font></tt>, or <tt><font size=+1>&#8722;le</font></tt> may be used
+ in place of <tt><font size=+1>&#8722;eq</font></tt>. The (nonstandard) construct <tt><font size=+1>&#8722;l</font></tt> <i>string</i>, meaning
+ the length of <i>string</i>, may be used in place of an integer.<br>
+ <i>a</i> <tt><font size=+1>&#8722;nt</font></tt> <i>b</i>&nbsp;&nbsp;&nbsp;&nbsp;True if file <i>a</i> is newer than (modified after) file <i>b</i>.<br>
+ <i>a</i> <tt><font size=+1>&#8722;ot</font></tt> <i>b</i>&nbsp;&nbsp;&nbsp;&nbsp;True if file <i>a</i> is older than (modified before) file <i>b</i>.<br>
+ <i>f</i> <tt><font size=+1>&#8722;older</font></tt> <i>t</i>True if file <i>f</i> is older than (modified before) time
+ <i>t</i>. If <i>t</i> is a integer followed by the letters <tt><font size=+1>y</font></tt>(years), <tt><font size=+1>M</font></tt>(months),
+ <tt><font size=+1>d</font></tt>(days), <tt><font size=+1>h</font></tt>(hours), <tt><font size=+1>m</font></tt>(minutes), or <tt><font size=+1>s</font></tt>(seconds), it represents current
+ time minus the specified time. If there is no letter, it represents
+ seconds since epoch. You can also concatenate mixed units.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ For example, <tt><font size=+1>3d12h</font></tt> means three days and twelve hours ago.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ These primaries may be combined with the following operators:<br>
+ <tt><font size=+1>!</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unary negation operator<br>
+ <tt><font size=+1>&#8722;o</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;binary <i>or</i> operator<br>
+ <tt><font size=+1>&#8722;a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;binary <i>and</i> operator; higher precedence than <tt><font size=+1>&#8722;o<br>
+ (</font></tt> <i>expr</i> <tt><font size=+1>)</font></tt>&nbsp;&nbsp;&nbsp;parentheses for grouping.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The primitives <tt><font size=+1>&#8722;b</font></tt>, <tt><font size=+1>&#8722;u</font></tt>, <tt><font size=+1>&#8722;g</font></tt>, and <tt><font size=+1>&#8722;s</font></tt> return false; they are recognized
+ for compatibility with POSIX.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Notice that all the operators and flags are separate arguments
+ to <i>test</i>. Notice also that parentheses and equal signs are meaningful
+ to <i>rc</i> and must be enclosed in quotes.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Test</i> is a dubious way to check for specific character strings:
+ it uses a process to do what an <a href="../man1/rc.html"><i>rc</i>(1)</a> match or switch statement
+ can do. The first example is not only inefficient but wrong, because
+ <i>test</i> understands the purported string <tt><font size=+1>&quot;&#8722;c&quot;</font></tt> as an option.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>if (test $1 '=' &quot;&#8722;c&quot;) echo OK # wrong!<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ A better way is<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>if (~ $1 &#8722;c) echo OK<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Test whether <tt><font size=+1>abc</font></tt> is in the current directory.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>test &#8722;f abc &#8722;o &#8722;d abc<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/test.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/rc.html"><i>rc</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/time.html b/man/man1/time.html
new file mode 100644
index 00000000..4646754f
--- /dev/null
+++ b/man/man1/time.html
@@ -0,0 +1,63 @@
+<head>
+<title>time(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TIME(1)</b><td align=right><b>TIME(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ time &ndash; time a command<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>time</font></tt> <i>command</i> [ <i>arg ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>command</i> is executed with the given arguments; after it is
+ complete, <i>time</i> reports on standard error the program&#8217;s elapsed
+ user time, system time, and real time, in seconds, followed by
+ the command line.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/time.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/prof.html"><i>prof</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/touch.html b/man/man1/touch.html
new file mode 100644
index 00000000..6e2f7f91
--- /dev/null
+++ b/man/man1/touch.html
@@ -0,0 +1,69 @@
+<head>
+<title>touch(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TOUCH(1)</b><td align=right><b>TOUCH(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ touch &ndash; set modification date of a file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>touch</font></tt> [ <tt><font size=+1>&#8722;c</font></tt> ] [ <tt><font size=+1>&#8722;t</font></tt> <i>time</i> ] <i>file ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Touch</i> attempts to set the modification time of the <i>files</i> to <i>time</i>
+ (by default, the current time). If a <i>file</i> does not exist, it will
+ be created unless option <tt><font size=+1>&#8722;c</font></tt> is present.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/touch.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/ls.html"><i>ls</i>(1)</a>, <a href="../man3/stat.html"><i>stat</i>(3)</a>, <a href="../man1/chmod.html"><i>chmod</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Touch</i> will not touch directories.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/tr.html b/man/man1/tr.html
new file mode 100644
index 00000000..dc827b3f
--- /dev/null
+++ b/man/man1/tr.html
@@ -0,0 +1,107 @@
+<head>
+<title>tr(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TR(1)</b><td align=right><b>TR(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ tr &ndash; translate characters<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>tr</font></tt> [ <tt><font size=+1>&#8722;cds</font></tt> ] [ <i>string1</i> [ <i>string2</i> ] ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Tr</i> copies the standard input to the standard output with substitution
+ or deletion of selected characters (runes). Input characters found
+ in <i>string1</i> are mapped into the corresponding characters of <i>string2</i>.
+ When <i>string2</i> is short it is padded to the length of <i>string1</i> by
+ duplicating its last character. Any combination of the
+ options <tt><font size=+1>&#8722;cds</font></tt> may be used:<br>
+ <tt><font size=+1>&#8722;c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Complement <i>string1</i>: replace it with a lexicographically ordered
+ list of all other characters.<br>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Delete from input all characters in <i>string1</i>.<br>
+ <tt><font size=+1>&#8722;s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Squeeze repeated output characters that occur in <i>string2</i> to
+ single characters.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In either string a noninitial sequence <tt><font size=+1>&#8722;</font></tt><i>x</i>, where <i>x</i> is any character
+ (possibly quoted), stands for a range of characters: a possibly
+ empty sequence of codes running from the successor of the previous
+ code up through the code for <i>x</i>. The character <tt><font size=+1>\</font></tt> followed by 1,
+ 2 or 3 octal digits stands for the character whose 16-bit
+ value is given by those digits. The character sequence <tt><font size=+1>\x</font></tt> followed
+ by 1, 2, 3, or 4 hexadecimal digits stands for the character whose
+ 16-bit value is given by those digits. A <tt><font size=+1>\</font></tt> followed by any other
+ character stands for that character.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Replace all upper-case ASCII letters by lower-case.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>tr A&#8722;Z a&#8722;z &lt;mixed &gt;lower<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Create a list of all the words in <tt><font size=+1>file1</font></tt> one per line in <tt><font size=+1>file2</font></tt>,
+ where a word is taken to be a maximal string of alphabetics. <i>String2</i>
+ is given as a quoted newline.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>tr &#8722;cs A&#8722;Za&#8722;z '<br>
+ ' &lt;file1 &gt;file2<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/tr.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/sed.html"><i>sed</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/tr2post.html b/man/man1/tr2post.html
new file mode 100644
index 00000000..808c329b
--- /dev/null
+++ b/man/man1/tr2post.html
@@ -0,0 +1,152 @@
+<head>
+<title>tr2post(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TR2POST(1)</b><td align=right><b>TR2POST(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ tr2post &ndash; convert troff intermediate to PostScript<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>tr2post</font></tt> [ <tt><font size=+1>options</font></tt> ] [ <i>files ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Tr2post</i> converts <i>files</i> (or standard input), which should be the
+ device-independent output of <a href="../man1/troff.html"><i>troff</i>(1)</a>, into the PostScript printer
+ language.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The options are:<br>
+ <tt><font size=+1>&#8722;a</font></tt> <i>aspectratio<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set an aspect ratio (<i>y</i>/<i>x</i>) to stretch the PostScript output (default
+ 1.0).<br>
+
+ </table>
+ <tt><font size=+1>&#8722;c</font></tt> <i>copies<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set a comment in the PostScript output marking the number of copies
+ that should be printed. The comment is intended for ancient versions
+ of the Unix <i>lp</i>(1) and is not recognized by any current printer
+ or print spooler.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Emit volumes of debugging output on standard error.<br>
+ <tt><font size=+1>&#8722;m</font></tt> <i>magnification<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Magnify the PostScript output (default 1.0).<br>
+
+ </table>
+ <tt><font size=+1>&#8722;n</font></tt> <i>formsperpage<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the PostScript with <i>formsperpage</i> logical pages per physical
+ page (default 1). Using this option emits PostScript with invalid
+ document structuring comments. It will print fine but will not
+ view correctly in <a href="../man1/gv.html"><i>gv</i>(1)</a> or <i>psv</i> (see <a href="../man1/page.html"><i>page</i>(1)</a>).<br>
+
+ </table>
+ <tt><font size=+1>&#8722;o</font></tt> <i>pagelist<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print only the pages in the <i>pagelist</i>, which is a comma-separated
+ list of ranges. Each range is of the form <i>p</i> (just page <i>p</i>), <i>p</i><tt><font size=+1>&#8722;</font></tt><i>q</i>
+ (pages <i>p</i> through <i>q</i>), <tt><font size=+1>&#8722;</font></tt><i>p</i> (pages 1 through <i>p</i>), or <i>p</i><tt><font size=+1>&#8722;</font></tt> (pages <i>p</i> through
+ the end of the document).<br>
+
+ </table>
+ <tt><font size=+1>&#8722;p l</font></tt>&nbsp;&nbsp;&nbsp;Print the document in landscape mode. An argument that does
+ not begin with <tt><font size=+1>l</font></tt> will print the document in portrait mode.<br>
+ <tt><font size=+1>&#8722;x</font></tt> <i>xoffset<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Translate the page output by <i>xoffset</i> inches to the right. (Negative
+ offsets translate to the left.)<br>
+
+ </table>
+ <tt><font size=+1>&#8722;y</font></tt> <i>yoffset<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Translate the page output by <i>yoffset</i> inches down. (Negative offsets
+ translate up.)<br>
+
+ </table>
+ <tt><font size=+1>&#8722;P</font></tt> <i>pscode<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Emit the text <i>pscode</i> at the end of the usual PostScript header.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Preview this manual page:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>troff &#8722;man /usr/local/plan9/man/man1/tr2post.1 |<br>
+ tr2post |<br>
+ psfonts &gt;/tmp/a.ps<br>
+ psv /tmp/a.ps<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/postscript/tr2post<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/troff.html"><i>troff</i>(1)</a>, <a href="../man1/psfonts.html"><i>psfonts</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/troff.html b/man/man1/troff.html
new file mode 100644
index 00000000..a3d8477f
--- /dev/null
+++ b/man/man1/troff.html
@@ -0,0 +1,126 @@
+<head>
+<title>troff(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TROFF(1)</b><td align=right><b>TROFF(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ troff, nroff &ndash; text formatting and typesetting<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>troff</font></tt> [ <i>option ...</i> ] [ <i>file ...</i> ]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>nroff</font></tt> [ <i>option ...</i> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Troff</i> formats text in the named <i>files</i> for printing on a typesetter.
+ <i>Nroff</i> does the same, but produces output suitable for typewriter-like
+ devices.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If no <i>file</i> argument is present, the standard input is read. An
+ argument consisting of a single minus (<tt><font size=+1>&#8722;</font></tt>) is taken to be a file
+ name corresponding to the standard input. The options are:<br>
+ <tt><font size=+1>&#8722;o</font></tt><i>list</i>&nbsp;&nbsp;&nbsp;Print pages in the comma-separated <i>list</i> of numbers and ranges.
+ A range <i>N</i><tt><font size=+1>&#8722;</font></tt><i>M</i> means <i>N</i> through <i>M</i>; initial <tt><font size=+1>&#8722;</font></tt><i>M</i> means up to <i>M</i>; final
+ <i>N</i><tt><font size=+1>&#8722;</font></tt> means from <i>N</i> to the end.<br>
+ <tt><font size=+1>&#8722;n</font></tt><i>N</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Number first generated page <i>N</i>.<br>
+ <tt><font size=+1>&#8722;m</font></tt><i>name</i>Process the macro file <tt><font size=+1>/sys/lib/tmac/tmac.</font></tt><i>name</i> before the
+ input <i>files</i>.<br>
+ <tt><font size=+1>&#8722;r</font></tt><i>aN</i>&nbsp;&nbsp;&nbsp;&nbsp;Set register <i>a</i> (one character name) to <i>N</i>.<br>
+ <tt><font size=+1>&#8722;i</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read standard input after the input files are exhausted.<br>
+ <tt><font size=+1>&#8722;q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invoke the simultaneous input-output mode of the <tt><font size=+1>rd</font></tt> request.<br>
+ <tt><font size=+1>&#8722;N</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Produce output suitable for typewriter-like devices.<br>
+ <p><font size=+1><b>Typesetter devices (not <tt><font size=+1>&#8722;N</font></tt>) only </b></font><br>
+ <tt><font size=+1>&#8722;a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Send a printable textual approximation of the results to the
+ standard output.<br>
+ <tt><font size=+1>&#8722;T</font></tt><i>dest</i>&nbsp;&nbsp;&nbsp;Prepare output for typesetter <i>dest</i>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>&#8722;Tutf</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(The default.) PostScript printers with preprocessing to
+ handle Unicode characters encoded in UTF<br>
+ <tt><font size=+1>&#8722;Tpost</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Regular PostScript printers<br>
+ <tt><font size=+1>&#8722;T202</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mergenthaler Linotron 202<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>&#8722;F</font></tt><i>dir</i>&nbsp;&nbsp;&nbsp;Take font information from directory <i>dir</i>.<br>
+ <p><font size=+1><b>Typewriter (<tt><font size=+1>&#8722;N</font></tt>) output only </b></font><br>
+ <tt><font size=+1>&#8722;s</font></tt><i>N</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Halt prior to every <i>N</i> pages (default <i>N</i>=1) to allow paper loading
+ or changing.<br>
+ <tt><font size=+1>&#8722;T</font></tt><i>name</i>Prepare output for specified terminal. Known <i>names</i> include
+ <tt><font size=+1>utf</font></tt> for the normal Plan 9 UTF encoding of the Unicode Standard
+ character set (default), <tt><font size=+1>37</font></tt> for the Teletype model 37, <tt><font size=+1>lp</font></tt> (&#8216;line-printer&#8217;)
+ for any terminal without half-line capability, <tt><font size=+1>450</font></tt> for the DASI-450
+ (Diablo Hyterm), and <tt><font size=+1>think</font></tt> (HP ThinkJet).
+ <tt><font size=+1>&#8722;e</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Produce equally-spaced words in adjusted lines, using full terminal
+ resolution.<br>
+ <tt><font size=+1>&#8722;h</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use output tabs during horizontal spacing to speed output and
+ reduce output character count. Tab settings are assumed to be
+ every 8 nominal character widths.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/tmp/trtmp*</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;temporary file<br>
+ <tt><font size=+1>/usr/local/plan9/tmac/tmac.*</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;standard macro files<br>
+ <tt><font size=+1>/usr/local/plan9/troff/term/*</font></tt>&nbsp;&nbsp;&nbsp;terminal driving tables for <i>nroff<br>
+ </i><tt><font size=+1>/usr/local/plan9/troff/font/*</font></tt>&nbsp;&nbsp;&nbsp;font width tables for <i>troff<br>
+ </i>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/troff<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/lpr.html"><i>lpr</i>(1)</a>, <a href="../man1/proof.html"><i>proof</i>(1)</a>, <a href="../man1/tr2post.html"><i>tr2post</i>(1)</a>, <a href="../man1/eqn.html"><i>eqn</i>(1)</a>, <a href="../man1/tbl.html"><i>tbl</i>(1)</a>, <a href="../man1/pic.html"><i>pic</i>(1)</a>, <a href="../man1/grap.html"><i>grap</i>(1)</a>,
+ <a href="../man1/doctype.html"><i>doctype</i>(1)</a>, <a href="../man7/ms.html"><i>ms</i>(7)</a>, <a href="../man7/image.html"><i>image</i>(7)</a>, <a href="../man1/tex.html"><i>tex</i>(1)</a>, <a href="../man1/deroff.html"><i>deroff</i>(1)</a><br>
+ J. F. Ossanna and B. W. Kernighan, &#8220;Troff User&#8217;s Manual&#8221;<br>
+ B. W. Kernighan, &#8220;A TROFF Tutorial&#8221;, <i>Unix Research System Programmer&#8217;s
+ Manual,</i> Tenth Edition, Volume 2.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/troff2html.1 b/man/man1/troff2html.1
new file mode 100644
index 00000000..01bd0681
--- /dev/null
+++ b/man/man1/troff2html.1
@@ -0,0 +1,96 @@
+.TH TROFF2HTML 1
+.SH NAME
+troff2html \- convert troff output into HTML
+.SH SYNOPSIS
+.B troff2html
+[
+.B -t
+.I title
+] [
+.I file
+\ ...
+]
+.SH DESCRIPTION
+.I Troff2html
+reads the
+.IR troff (1)
+output in the named
+.IR files ,
+default standard input,
+and converts them into HTML.
+.PP
+.I Troff2html
+does a tolerable job with straight
+.B troff
+output, but it is helped by annotations, described below.
+Its main use is for
+.B man2html
+(see Plan 9's \fIhttpd\fR(8)),
+which converts
+.IR man (1)
+pages into HTML
+and depends on a specially annotated set of
+.IR man (6)
+macros, invoked by
+.B troff
+.BR -manhtml .
+.PP
+.B Troff
+output lines beginning
+.IP
+.EX
+x X html \f1...
+.EE
+.LP
+which are introduced by placing
+.B \eX'html\ \f1...\fP'
+in the
+.IR input ,
+cause the rest of the line to be interpolated into the HTML produced.
+Several such lines are recognized specially by
+.IR troff2html .
+The most important are the pair
+.IP
+.EX
+x X html manref start cp 1
+x X html manref end cp 1
+.EE
+.PP
+which are used to create HTML hyperlinks around text of the form
+.IR cp (1)
+pointing to
+.BR /magic/man2html/1/cp .
+.PP
+.I Troff2html
+is new and experimental; in time, it may improve and subsume
+.IR ms2html (1).
+On the one hand, because it uses the input,
+.B ms2html
+can handle
+.IR pic (1),
+.IR eqn (1),
+etc., which
+.I troff2html
+does not handle at all; on the other hand,
+.B ms2html
+understands only
+.IR ms (6)
+documents and is easily confused by complex
+.B troff
+constructions.
+.I Troff2html
+has the reverse properties: it does not handle the preprocessors but its output
+is reliable and (modulo helper annotations) is independent of macro package.
+.SH SEE ALSO
+.IR troff (1),
+.IR ms2html (1),
+.B man2html
+in
+.IR httpd (8).
+.SH BUGS
+.B Troff
+and HTML have different models, and they don't mesh well in all cases.
+.BR Troff 's
+indented paragraphs are not well served in HTML, and the output of
+.I troff2html
+shows this.
diff --git a/man/man1/troff2html.html b/man/man1/troff2html.html
new file mode 100644
index 00000000..77dff2d7
--- /dev/null
+++ b/man/man1/troff2html.html
@@ -0,0 +1,108 @@
+<head>
+<title>troff2html(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TROFF2HTML(1)</b><td align=right><b>TROFF2HTML(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ troff2html &ndash; convert troff output into HTML<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>troff2html</font></tt> [ <tt><font size=+1>&#8722;t</font></tt> <i>title</i> ] [ <i>file</i> ... ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Troff2html</i> reads the <a href="../man1/troff.html"><i>troff</i>(1)</a> output in the named <i>files</i>, default
+ standard input, and converts them into HTML.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Troff2html</i> does a tolerable job with straight <tt><font size=+1>troff</font></tt> output, but
+ it is helped by annotations, described below. Its main use is
+ for <tt><font size=+1>man2html</font></tt> (see Plan 9&#8217;s <i>httpd</i>(8)), which converts <a href="../man1/man.html"><i>man</i>(1)</a> pages
+ into HTML and depends on a specially annotated set of <a href="../man6/man.html"><i>man</i>(6)</a> macros,
+ invoked by <tt><font size=+1>troff &#8722;manhtml</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Troff</font></tt> output lines beginning<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>x X html</font></tt> ...<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ which are introduced by placing <tt><font size=+1>\X'html</font></tt> ...<tt><font size=+1>'</font></tt> in the <i>input</i>, cause
+ the rest of the line to be interpolated into the HTML produced.
+ Several such lines are recognized specially by <i>troff2html</i>. The
+ most important are the pair<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>x X html manref start cp 1<br>
+ x X html manref end cp 1<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ which are used to create HTML hyperlinks around text of the form
+ <a href="../man1/cp.html"><i>cp</i>(1)</a> pointing to <tt><font size=+1>/magic/man2html/1/cp</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Troff2html</i> is new and experimental; in time, it may improve and
+ subsume <a href="../man1/ms2html.html"><i>ms2html</i>(1)</a>. On the one hand, because it uses the input,
+ <tt><font size=+1>ms2html</font></tt> can handle <a href="../man1/pic.html"><i>pic</i>(1)</a>, <a href="../man1/eqn.html"><i>eqn</i>(1)</a>, etc., which <i>troff2html</i> does
+ not handle at all; on the other hand, <tt><font size=+1>ms2html</font></tt> understands only
+ <a href="../man6/ms.html"><i>ms</i>(6)</a> documents and is easily confused by complex
+ <tt><font size=+1>troff</font></tt> constructions. <i>Troff2html</i> has the reverse properties: it
+ does not handle the preprocessors but its output is reliable and
+ (modulo helper annotations) is independent of macro package.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/troff.html"><i>troff</i>(1)</a>, <a href="../man1/ms2html.html"><i>ms2html</i>(1)</a>, <tt><font size=+1>man2html</font></tt> in <a href="../man8/httpd.html"><i>httpd</i>(8)</a>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>Troff</font></tt> and HTML have different models, and they don&#8217;t mesh well
+ in all cases. <tt><font size=+1>Troff</font></tt>&#8217;s indented paragraphs are not well served
+ in HTML, and the output of <i>troff2html</i> shows this.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/tweak.html b/man/man1/tweak.html
new file mode 100644
index 00000000..9d63dcd4
--- /dev/null
+++ b/man/man1/tweak.html
@@ -0,0 +1,194 @@
+<head>
+<title>tweak(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TWEAK(1)</b><td align=right><b>TWEAK(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ tweak &ndash; edit image files, subfont files, face files, etc.<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>tweak</font></tt> [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Tweak</i> edits existing files holding various forms of images. To
+ create original images, start from an existing image, subfont,
+ etc.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Tweak</i> reads its argument <i>files</i> and displays the resulting images
+ in a vertical column. If the image is too wide to fit across the
+ display, it is folded much like a long line of text in an <i>rio</i>
+ window. Under each image is displayed one or two lines of text
+ presenting its parameters. The first line shows the image&#8217;s <tt><font size=+1>depth</font></tt>,
+ the number of bits per pixel; <tt><font size=+1>r</font></tt>, the rectangle covered by the
+ image; and the name of the <tt><font size=+1>file</font></tt> from which it was read. If the
+ file is a subfont, a second line presents a hexadecimal 16-bit
+ <tt><font size=+1>offset</font></tt> to be applied to character values from the subfont (typically
+ as stored in a font file; see <a href="../man7/font.html"><i>font</i>(7)</a>); and the subfont&#8217;s <tt><font size=+1>n</font></tt>,
+ <tt><font size=+1>height</font></tt>, and <tt><font size=+1>ascent</font></tt> as defined in <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ By means described below, magnified views of portions of the images
+ may be displayed. The text associated with such a view includes
+ <tt><font size=+1>mag</font></tt>, the magnification. If the view is of a single character from
+ a subfont, the second line of text shows the character&#8217;s value
+ (including the subfont&#8217;s offset) in hexadecimal and as a
+ character in <i>tweak&#8217;s</i> default font; the character&#8217;s <tt><font size=+1>x</font></tt>, <tt><font size=+1>top</font></tt>, <tt><font size=+1>bottom</font></tt>,
+ <tt><font size=+1>left</font></tt>, and <tt><font size=+1>width</font></tt> as defined in <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>; and <tt><font size=+1>iwidth</font></tt>, the physical
+ width of the image in the subfont&#8217;s image.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There are two methods to obtain a magnified view of a character
+ from a subfont. The first is to click mouse button 1 over the
+ image of the character in the subfont. The second is to select
+ the <tt><font size=+1>char</font></tt> entry on the button 3 menu, point the resulting gunsight
+ cursor at the desired subfont and click button 3, and then type
+ at the text prompt at the bottom of the screen the character value,
+ either as a multi-digit hexadecimal number or as a single rune
+ representing the character.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To magnify a portion of other types of image files, click button
+ 1 over the unmagnified file. The cursor will switch to a cross.
+ Still with button 1, sweep a rectangle, as in <tt><font size=+1>rio</font></tt>, that encloses
+ the portion of the image to be magnified. (If the file is 16x16
+ or smaller, <i>tweak</i> will just magnify the entire file; no sweeping
+ is
+ necessary.)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Pressing buttons 1 and 2 within magnified images changes pixel
+ values. By default, button 1 sets the pixel to all zeros and button
+ 2 sets the pixel to all ones.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Across the top of the screen is a textual display of global parameters.
+ These values, as well as many of the textual values associated
+ with the images, may be edited by clicking button 1 on the displayed
+ value and typing a new value. The values along the top of the
+ screen are:<br>
+ <tt><font size=+1>mag</font></tt>&nbsp;&nbsp;&nbsp;Default magnification.<br>
+ <tt><font size=+1>val(hex)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The value used to modify pixels within magnified images. The value
+ must be in hexadecimal, optionally preceded by a tilde for bitwise
+ negation.<br>
+
+ </table>
+ <tt><font size=+1>but1<br>
+ but2</font></tt>The pixel value written when the corresponding button is pressed
+ over a pixel.<br>
+ <tt><font size=+1>invert&#8722;on&#8722;copy<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Whether the pixel values are inverted when a <tt><font size=+1>copy</font></tt> operation is
+ performed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ Under button 3 is a menu holding a variety of functions. Many
+ of these functions prompt for the image upon which to act by switching
+ to a gunsight cursor; click button 3 over the selection, or click
+ a different button to cancel the action.<br>
+ <tt><font size=+1>open</font></tt>Read and display a file. The name of the file is typed to
+ the prompt on the bottom line.<br>
+ <tt><font size=+1>read</font></tt>Reread a file.<br>
+ <tt><font size=+1>write<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Write a file.<br>
+
+ </table>
+ <tt><font size=+1>copy</font></tt>Use the copy function, default <tt><font size=+1>S</font></tt>, to transfer a rectangle
+ of pixels from one image to another. The program prompts with
+ a cross cursor; sweep out a rectangle in one image or just click
+ button 3 to select the whole image. The program will leave that
+ rectangle in place and attach another one to the cursor. Move
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ that rectangle to the desired place in any image and click button
+ 3, or another button to cancel the action.<br>
+
+ </table>
+ <tt><font size=+1>char</font></tt>As described above, open a magnified view of a character image
+ in a subfont.<br>
+ <tt><font size=+1>pixels<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Report the coordinate and value of individual pixels indicated
+ by pressing button 3. This is a mode of operation canceled by
+ pressing button 1 or 2.<br>
+
+ </table>
+ <tt><font size=+1>close<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Close the specified image. If the image is the unmagnified file,
+ also close any magnified views of that file.<br>
+
+ </table>
+ <tt><font size=+1>exit</font></tt>Quit <i>tweak</i>. The program will complain once about modified
+ but unwritten files.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/draw/tweak.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>, <a href="../man7/image.html"><i>image</i>(7)</a>, <a href="../man7/font.html"><i>font</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ For a program written to adjust width tables in fonts, <i>tweak</i> has
+ been pushed unreasonably far.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/uniq.html b/man/man1/uniq.html
new file mode 100644
index 00000000..7f0e4377
--- /dev/null
+++ b/man/man1/uniq.html
@@ -0,0 +1,79 @@
+<head>
+<title>uniq(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>UNIQ(1)</b><td align=right><b>UNIQ(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uniq &ndash; report repeated lines in a file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>uniq</font></tt> [ <tt><font size=+1>&#8722;udc</font></tt> [ <tt><font size=+1>+&#8722;</font></tt><i>num</i> ] ] [ <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Uniq</i> copies the input <i>file</i>, or the standard input, to the standard
+ output, comparing adjacent lines. In the normal case, the second
+ and succeeding copies of repeated lines are removed. Repeated
+ lines must be adjacent in order to be found.<br>
+ <tt><font size=+1>&#8722;u</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print unique lines.<br>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print (one copy of) duplicated lines.<br>
+ <tt><font size=+1>&#8722;c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Prefix a repetition count and a tab to each output line. Implies
+ <tt><font size=+1>&#8722;u</font></tt> and <tt><font size=+1>&#8722;d</font></tt>.<br>
+ <tt><font size=+1>&#8722;</font></tt><i>num</i>The first <i>num</i> fields together with any blanks before each
+ are ignored. A field is defined as a string of non-space, non-tab
+ characters separated by tabs and spaces from its neighbors.<br>
+ <tt><font size=+1>+</font></tt><i>num</i>The first <i>num</i> characters are ignored. Fields are skipped before
+ characters.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/uniq.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/sort.html"><i>sort</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Field selection and comparison should be compatible with <a href="../man1/sort.html"><i>sort</i>(1)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/units.html b/man/man1/units.html
new file mode 100644
index 00000000..fed0c287
--- /dev/null
+++ b/man/man1/units.html
@@ -0,0 +1,156 @@
+<head>
+<title>units(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>UNITS(1)</b><td align=right><b>UNITS(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ units &ndash; conversion program<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>units</font></tt> [ <tt><font size=+1>&#8722;v</font></tt> ] [ <i>file</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Units</i> converts quantities expressed in various standard scales
+ to their equivalents in other scales. It works interactively in
+ this fashion:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>you have: inch<br>
+ you want: cm<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ * 2.54<br>
+ / 0.393701<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ A quantity is specified as a multiplicative combination of units
+ and floating point numbers. Operators have the following precedence:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>+ &#8722; </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add and subtract<br>
+ <tt><font size=+1>* / x &#247; </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;multiply and divide<br>
+ catenation &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;multiply<br>
+ <tt><font size=+1>&sup2; &sup3; ^ </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exponentiation<br>
+ <tt><font size=+1>| </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;divide<br>
+ <tt><font size=+1>(</font></tt> ... <tt><font size=+1>) </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;grouping<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ Most familiar units, abbreviations, and metric prefixes are recognized,
+ together with a generous leavening of exotica and a few constants
+ of nature including:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>pi,</font></tt>&#960; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ratio of circumference to diameter<br>
+ <tt><font size=+1>c </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;speed of light <br>
+ <tt><font size=+1>e </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;charge on an electron <br>
+ <tt><font size=+1>g </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;acceleration of gravity <br>
+ <tt><font size=+1>force </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;same as <tt><font size=+1>g <br>
+ mole </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Avogadro&#8217;s number <br>
+ <tt><font size=+1>water </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;pressure head per unit height of water <br>
+ <tt><font size=+1>au </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;astronomical unit <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ The <tt><font size=+1>pound</font></tt> is a unit of mass. Compound names are run together,
+ e.g. <tt><font size=+1>lightyear</font></tt>. British units that differ from their US counterparts
+ are prefixed thus: <tt><font size=+1>brgallon</font></tt>. Currency is denoted <tt><font size=+1>belgiumfranc</font></tt>,
+ <tt><font size=+1>britainpound</font></tt>, etc.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The complete list of units can be found in <tt><font size=+1>/usr/local/plan9/lib/units</font></tt>.
+ A <i>file</i> argument to <i>units</i> specifies a file to be used instead of
+ <tt><font size=+1>/usr/local/plan9/lib/units.</font></tt> The <tt><font size=+1>&#8722;v</font></tt> flag causes <i>units</i> to print
+ its entire database.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>you have: 15 pounds force/in&sup2;<br>
+ you want: atm<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ * 1.02069<br>
+ / .97973<br>
+
+ </table>
+ </font></tt>
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/lib/units<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/units.y<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Since <i>units</i> does only multiplicative scale changes, it can convert
+ Kelvin to Rankine but not Centigrade to Fahrenheit.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Currency conversions are only as accurate as the last time someone
+ updated the database.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/vac.html b/man/man1/vac.html
new file mode 100644
index 00000000..71f121ff
--- /dev/null
+++ b/man/man1/vac.html
@@ -0,0 +1,160 @@
+<head>
+<title>vac(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>VAC(1)</b><td align=right><b>VAC(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ vac &ndash; create a vac archive on Venti<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>vac</font></tt> [ <tt><font size=+1>&#8722;mqsv</font></tt> ] [ <tt><font size=+1>&#8722;b</font></tt> <i>blocksize</i> ] [ <tt><font size=+1>&#8722;d</font></tt> <i>oldvacfile</i> ] [ <tt><font size=+1>&#8722;e</font></tt> <i>exclude</i>
+ ] [ <tt><font size=+1>&#8722;f</font></tt> <i>vacfile</i> ] [ <tt><font size=+1>&#8722;i</font></tt> <i>name</i> ] [ <tt><font size=+1>&#8722;h</font></tt> <i>host</i> ] <i>file ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Vac</i> creates an archival copy of Plan 9 file trees on Venti. It
+ can be used to build a simple backup system. One of the unusual
+ properties of Venti is that duplicate blocks are detected and
+ coalesced. When <i>vac</i> is used on a file tree that shares data with
+ an existing archive, the consumption of storage will be approximately
+ equal to an incremental backup. This reduction in storage consumption
+ occurs transparently to the user.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ As an optimization, the <tt><font size=+1>&#8722;d</font></tt> and <tt><font size=+1>&#8722;q</font></tt> options, described below, can
+ be used to explicitly create an archive relative to an existing
+ archive. These options do not change the resulting archive generated
+ by <i>vac</i>, but simply reduce the number of write operations to Venti.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The output of <i>vac</i> is the hexadecimal representation of the Sha1
+ fingerprint of the root of the archive, in this format:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>vac:64daefaecc4df4b5cb48a368b361ef56012a4f46<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Option to <i>vac</i> are:<br>
+ <tt><font size=+1>&#8722;b</font></tt> <i>blocksize<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Specifies the block size that data will be broken into. The units
+ for the size can be specified by appending <tt><font size=+1>k</font></tt> to indicate kilobytes.
+ The default is 8k. The size must be in the range of 512 bytes
+ to 52k.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;d</font></tt> <i>oldvacfile<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Reduce the number of blocks written to Venti by comparing the
+ files to be stored with the contents of an existing <i>vac</i> file tree
+ given by <i>oldvacfile</i>.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;e</font></tt> <i>exclude<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Do not include the file or directory specified by <i>exclude</i>. This
+ option may be repeated multiple times.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;f</font></tt> <i>vacfile<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The results of <i>vac</i> are place in <i>vacfile</i>, or the standard output
+ if no file is given.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;i</font></tt> <i>name<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Include standard input as one of the input files, storing it in
+ the archive with the specified <i>name</i>.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;h</font></tt> <i>host<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The network address of the Venti server. The default is taken
+ from the environment variable <tt><font size=+1>venti</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;m</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Expand and merge any <i>vac</i> archives that are found while reading
+ the input files. This option is useful for building an archive
+ from a collection of existing archives. Each archive is inserted
+ into the new archive as if it had been unpacked in the directory
+ in which it was found. Multiple archives can be unpacked in
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ a single directory and the contents will be merged. To be detected,
+ the archives must end in <tt><font size=+1>.vac</font></tt>. Note, an archive is inserted by
+ simply copying the root fingerprint and does not require the archive
+ to be unpacked.<br>
+
+ </table>
+ <tt><font size=+1>&#8722;q</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Increase the performance of the <tt><font size=+1>&#8722;d</font></tt> option by detecting unchanged
+ files based on a match of the files name and other meta data,
+ rather than examining the contents of the files.<br>
+ <tt><font size=+1>&#8722;s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Print out various statistics on standard error.<br>
+ <tt><font size=+1>&#8722;v</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Produce more verbose output on standard error, including the
+ name of the files added to the archive and the vac archives that
+ are expanded and merged.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/vac<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Plan 9&#8217;s <i>vacfs</i>(4) and <i>venti</i>(8)<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/wc.html b/man/man1/wc.html
new file mode 100644
index 00000000..677c2937
--- /dev/null
+++ b/man/man1/wc.html
@@ -0,0 +1,75 @@
+<head>
+<title>wc(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>WC(1)</b><td align=right><b>WC(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ wc &ndash; word count<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>wc</font></tt> [ <tt><font size=+1>&#8722;lwrbc</font></tt> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Wc</i> counts lines, words, runes, syntactically-invalid UTF codes
+ and bytes in the named <i>files</i>, or in the standard input if no file
+ is named. A word is a maximal string of characters delimited by
+ spaces, tabs or newlines. The count of runes includes invalid
+ codes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the optional argument is present, just the specified counts
+ (lines, words, runes, broken UTF codes or bytes) are selected
+ by the letters <tt><font size=+1>l</font></tt>, <tt><font size=+1>w</font></tt>, <tt><font size=+1>r</font></tt>, <tt><font size=+1>b</font></tt>, or <tt><font size=+1>c</font></tt>. Otherwise, lines, words and bytes
+ (<tt><font size=+1>&#8722;lwc</font></tt>) are reported.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/wc.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The Unicode Standard has many blank characters scattered through
+ it, but <i>wc</i> looks for only ASCII space, tab and newline.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Wc</i> should have options to count suboptimal UTF codes and bytes
+ that cannot occur in any UTF code.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/web.html b/man/man1/web.html
new file mode 100644
index 00000000..cb0ad0b4
--- /dev/null
+++ b/man/man1/web.html
@@ -0,0 +1,115 @@
+<head>
+<title>web(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>WEB(1)</b><td align=right><b>WEB(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ web, wmail &ndash; handle web page, mail message for plumber<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>web</font></tt> <i>url</i> ...<br>
+ <tt><font size=+1>wmail</font></tt> <i>address<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Web</i> opens each of the named <i>urls</i> in a new web browser window.
+ Any of the <i>urls</i> may be relative paths to files in the file system;
+ they will be translated into <tt><font size=+1>file://</font></tt> URLs before being passed
+ to the web browser.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Web</i> uses the web browser&#8217;s <tt><font size=+1>&#8722;remote</font></tt> option command-line option,
+ which requires an instance of the web browser to be already running.
+ The choice of browser is determined by the <tt><font size=+1>$BROWSER</font></tt> environment
+ variable, which should be the name of the executable for your
+ choice of web browser. The default is
+ <tt><font size=+1>firefox</font></tt>. Since the various browsers all use different syntaxes
+ in their <tt><font size=+1>&#8722;remote</font></tt> options, the executable name is inspected to
+ determine the type of browser. The supported browsers are Opera,
+ Mozilla Firefox, Mozilla Firebird, and Mozilla. When possible,
+ <i>web</i> opens each URL in a new tab rather than a new window.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When run under Mac OS X, <tt><font size=+1>$BROWSER</font></tt> should be set to the string
+ <tt><font size=+1>safari</font></tt> or <tt><font size=+1>firefox</font></tt>. <i>Web</i> uses AppleScript to talk to the browser.
+ If <tt><font size=+1>$BROWSER</font></tt> is not set, <i>web</i> looks for Firefox in <tt><font size=+1>/Applications/Firefox.app</font></tt>
+ and uses it if found; otherwise it uses Safari.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Wmail</i> starts the composition of a new mail message to <i>address</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The choice of mailer is determined by the <tt><font size=+1>$MAILER</font></tt> environment
+ variable. The supported mailers are:<br>
+ <tt><font size=+1>browser<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ invoke the mailer via a <tt><font size=+1>mailto://</font></tt> URL passed to <i>web
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+
+ </table>
+ <i>Web</i> and <i>wmail</i> are invoked as start commands in the <a href="../man4/plumber.html"><i>plumber</i>(4)</a>&#8217;s
+ rules for opening web pages and writing mail messages.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/plumb/basic<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ plumbing rules using <i>web</i> and <i>wmail<br>
+ </i>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man4/plumber.html"><i>plumber</i>(4)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/wintext.html b/man/man1/wintext.html
new file mode 100644
index 00000000..d4de3349
--- /dev/null
+++ b/man/man1/wintext.html
@@ -0,0 +1,124 @@
+<head>
+<title>wintext(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>WINTEXT(1)</b><td align=right><b>WINTEXT(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ wintext, &quot;, &quot;&quot; &ndash; access text in current window<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>wintext<br>
+ ?? </font></tt> [ <i>prefix</i> ]<br>
+ <tt><font size=+1>???? </font></tt> [ <i>prefix</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Wintext</i> prints the text of the current <i>win</i> (see <a href="../man1/acme.html"><i>acme</i>(1)</a>) or <a href="../man1/9term.html"><i>9term</i>(1)</a>
+ window to standard output.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>?? </i> searches the window text for commands typed with a particular
+ prefix and prints them, indented, to standard output. <i>Prefix</i> is
+ a regular expression that is matched against the beginning of
+ the command-line. If <i>prefix</i> is omitted, <i>?? </i> prints the last command
+ executed. <i>???? </i> prints the last command that <i>?? </i> would print and
+ then executes it by piping it into <a href="../man1/rc.html"><i>rc</i>(1)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Both <i>?? </i> and <i>???? </i> identify commands in the window text by looking for
+ lines beginning with a shell prompt. Prompts are assumed to be
+ an unindented sequence of non-whitespace characters followed by
+ one of the characters <tt><font size=+1>%</font></tt>, <tt><font size=+1>;</font></tt>, <tt><font size=+1>$</font></tt>, or <tt><font size=+1>#</font></tt>.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Print the <a href="../man1/ls.html"><i>ls</i>(1)</a> and <i>lc</i> commands executed in this window:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>% ?? 'l[sc]'<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ % ls &#8722;l /tmp/qq*<br>
+ # ls &#8722;lrt /etc<br>
+ % lc r*<br>
+
+ </table>
+ %<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Execute the most recent <i>lc</i> command again:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>% ???? lc<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ % lc r*<br>
+
+ </table>
+ ramfs &nbsp;&nbsp;&nbsp;&nbsp;rc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;read &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rio &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rm<br>
+ % <br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/9term.html"><i>9term</i>(1)</a>, <a href="../man1/acme.html"><i>acme</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/bin<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>?? </i> and <i>???? </i> are hard to type in shells other than <a href="../man1/rc.html"><i>rc</i>(1)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/xd.html b/man/man1/xd.html
new file mode 100644
index 00000000..86e6152e
--- /dev/null
+++ b/man/man1/xd.html
@@ -0,0 +1,99 @@
+<head>
+<title>xd(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>XD(1)</b><td align=right><b>XD(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ xd &ndash; hex, octal, decimal, or ASCII dump<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>xd</font></tt> [ <i>option ...</i> ] [ <tt><font size=+1>&#8722;</font></tt><i>format ...</i> ] [ <i>file ...</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Xd</i> concatenates and dumps the <i>files</i> (standard input by default)
+ in one or more formats. Groups of 16 bytes are printed in each
+ of the named formats, one format per line. Each line of output
+ is prefixed by its address (byte offset) in the input file. The
+ first line of output for each group is zero-padded; subsequent
+ are
+ blank-padded.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Formats other than <tt><font size=+1>&#8722;c</font></tt> are specified by pairs of characters telling
+ size and style, <tt><font size=+1>4x</font></tt> by default. The sizes are<br>
+ <tt><font size=+1>1</font></tt> or <tt><font size=+1>b</font></tt>&nbsp;&nbsp;&nbsp;1-byte units.<br>
+ <tt><font size=+1>2</font></tt> or <tt><font size=+1>w</font></tt>&nbsp;&nbsp;&nbsp;2-byte big-endian units.<br>
+ <tt><font size=+1>4</font></tt> or <tt><font size=+1>l</font></tt>&nbsp;&nbsp;&nbsp;4-byte big-endian units.<br>
+ <tt><font size=+1>8</font></tt> or <tt><font size=+1>v</font></tt>&nbsp;&nbsp;&nbsp;8-byte big-endian units.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The styles are<br>
+ <tt><font size=+1>o</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Octal.<br>
+ <tt><font size=+1>x</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hexadecimal.<br>
+ <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decimal.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Other options are<br>
+ <tt><font size=+1>&#8722;c</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Format as <tt><font size=+1>1x</font></tt> but print ASCII representations or C escape sequences
+ where possible.<br>
+ <tt><font size=+1>&#8722;a</font></tt><i>style</i>&nbsp;&nbsp;&nbsp;Print file addresses in the given style (and size 4).<br>
+ <tt><font size=+1>&#8722;u</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Unbuffered) Flush the output buffer after each 16-byte sequence.<br>
+ <tt><font size=+1>&#8722;s</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reverse (swab) the order of bytes in each group of 4 before
+ printing.<br>
+ <tt><font size=+1>&#8722;r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print repeating groups of identical 16-byte sequences as the
+ first group followed by an asterisk.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/xd.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/db.html"><i>db</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The various output formats don&#8217;t line up properly in the output
+ of <i>xd</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man1/yacc.html b/man/man1/yacc.html
new file mode 100644
index 00000000..1a485ce6
--- /dev/null
+++ b/man/man1/yacc.html
@@ -0,0 +1,170 @@
+<head>
+<title>yacc(1) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>YACC(1)</b><td align=right><b>YACC(1)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ yacc &ndash; yet another compiler-compiler<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>yacc</font></tt> [ <i>option ...</i> ] <i>grammar<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Yacc</i> converts a context-free grammar and translation code into
+ a set of tables for an LR(1) parser and translator. The grammar
+ may be ambiguous; specified precedence rules are used to break
+ ambiguities.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The output file, <tt><font size=+1>y.tab.c</font></tt>, must be compiled by the C compiler to
+ produce a program <tt><font size=+1>yyparse</font></tt>. This program must be loaded with a
+ lexical analyzer function, <tt><font size=+1>yylex(void)</font></tt> (often generated by <a href="../man1/lex.html"><i>lex</i>(1)</a>),
+ with a <tt><font size=+1>main(int &nbsp;&nbsp;&nbsp;argc, &nbsp;&nbsp;&nbsp;char &nbsp;&nbsp;&nbsp;*argv[])</font></tt> program, and with an error
+ handling routine,
+ <tt><font size=+1>yyerror(char*)</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The options are<br>
+ <tt><font size=+1>&#8722;o</font></tt> <i>output</i>&nbsp;&nbsp;&nbsp;Direct output to the specified file instead of <tt><font size=+1>y.tab.c</font></tt>.<br>
+ <tt><font size=+1>&#8722;D</font></tt><i>n</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create file <tt><font size=+1>y.debug</font></tt>, containing diagnostic messages. To incorporate
+ them in the parser, compile it with preprocessor symbol <tt><font size=+1>yydebug</font></tt>
+ defined. The amount of diagnostic output from the parser is regulated
+ by value <i>n</i>. The value 0 reports errors; 1 reports reductions;
+ higher values (up to 4) include
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ more information about state transitions.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>&#8722;v</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create file <tt><font size=+1>y.output</font></tt>, containing a description of the parsing
+ tables and of conflicts arising from ambiguities in the grammar.<br>
+ <tt><font size=+1>&#8722;d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create file <tt><font size=+1>y.tab.h</font></tt>, containing <tt><font size=+1>#define</font></tt> statements that associate
+ <i>yacc</i>-assigned &#8216;token codes&#8217; with user-declared &#8216;token names&#8217;.
+ Include it in source files other than <tt><font size=+1>y.tab.c</font></tt> to give access to
+ the token codes.<br>
+ <tt><font size=+1>&#8722;s</font></tt> <i>stem</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change the prefix <tt><font size=+1>y</font></tt> of the file names <tt><font size=+1>y.tab.c</font></tt>, <tt><font size=+1>y.tab.h</font></tt>,
+ <tt><font size=+1>y.debug</font></tt>, and <tt><font size=+1>y.output</font></tt> to <i>stem</i>.<br>
+ <tt><font size=+1>&#8722;S</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write a parser that uses Stdio instead of the <tt><font size=+1>print</font></tt> routines
+ in libc.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The specification of <i>yacc</i> itself is essentially the same as the
+ UNIX version described in the references mentioned below. Besides
+ the <tt><font size=+1>&#8722;D</font></tt> option, the main relevant differences are:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The interface to the C environment is by default through <tt><font size=+1>&lt;libc.h&gt;</font></tt>
+ rather than <tt><font size=+1>&lt;stdio.h&gt;</font></tt>; the <tt><font size=+1>&#8722;S</font></tt> option reverses this.<br>
+ The parser accepts UTF input text (see <a href="../man7/utf.html"><i>utf</i>(7)</a>), which has a couple
+ of effects. First, the return value of <tt><font size=+1>yylex()</font></tt> no longer fits
+ in a <tt><font size=+1>short</font></tt>; second, the starting value for non-terminals is now
+ 0xE000 rather than 257.<br>
+ The generated parser can be recursive: actions can call <i>yyparse</i>,
+ for example to implement a sort of <tt><font size=+1>#include</font></tt> statement in an interpreter.<br>
+ Finally, some undocumented inner workings of the parser have been
+ changed, which may affect programs that know too much about its
+ structure.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>y.output<br>
+ y.tab.c<br>
+ y.tab.h<br>
+ y.debug<br>
+ y.tmp.*</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;temporary file<br>
+ <tt><font size=+1>y.acts.*</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;temporary file<br>
+ <tt><font size=+1>/usr/local/plan9/lib/yaccpar<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ parser prototype<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>/usr/local/plan9/lib/yaccpars<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ parser prototype using stdio<br>
+
+ </table>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/yacc.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/lex.html"><i>lex</i>(1)</a><br>
+ S. C. Johnson and R. Sethi, &#8220;Yacc: A parser generator&#8221;, <i>Unix Research
+ System Programmer&#8217;s Manual,</i> Tenth Edition, Volume 2<br>
+ B. W. Kernighan and Rob Pike, <i>The UNIX Programming Environment,</i>
+ Prentice Hall, 1984<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The parser may not have full information when it writes to <tt><font size=+1>y.debug</font></tt>
+ so that the names of the tokens returned by <tt><font size=+1>yylex</font></tt> may be missing.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/9p-cmdbuf.html b/man/man3/9p-cmdbuf.html
new file mode 100644
index 00000000..122a5857
--- /dev/null
+++ b/man/man3/9p-cmdbuf.html
@@ -0,0 +1,128 @@
+<head>
+<title>9p-cmdbuf(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>9P-CMDBUF(3)</b><td align=right><b>9P-CMDBUF(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Cmdbuf, parsecmd, respondcmderror, lookupcmd &ndash; control message
+ parsing<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;fcall.h&gt;<br>
+ #include &lt;thread.h&gt;<br>
+ #include &lt;9p.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ typedef struct Cmdbuf<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*buf;<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**f;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nf;<br>
+
+ </table>
+ } Cmdbuf;<br>
+ typedef struct Cmdtab<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;index;<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*cmd;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;narg;<br>
+
+ </table>
+ };<br>
+ Cmdbuf &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*parsecmd(char *p, int n)<br>
+ Cmdtab &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*lookupcmd(Cmdbuf *cb, Cmdtab *tab, int ntab)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;respondcmderror(Req *r, Cmdbuf *cb, char *fmt, ...)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These data structures and functions provide parsing of textual
+ control messages.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Parsecmd</i> treats the <i>n</i> bytes at <i>p</i> (which need not be NUL-terminated)
+ as a UTF string and splits it using <i>tokenize</i> (see <a href="../man3/getfields.html"><i>getfields</i>(3)</a>).
+ It returns a <tt><font size=+1>Cmdbuf</font></tt> structure holding pointers to each field in
+ the message.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Lookupcmd</i> walks through the array <i>ctab</i>, which has <i>ntab</i> entries,
+ looking for the first <tt><font size=+1>Cmdtab</font></tt> that matches the parsed command.
+ (If the parsed command is empty, <i>lookupcmd</i> returns nil immediately.)
+ A <tt><font size=+1>Cmdtab</font></tt> matches the command if <i>cmd</i> is equal to <i>cb</i><tt><font size=+1>&#8722;&gt;</font></tt><i>f</i><tt><font size=+1>[0]</font></tt> or if
+ <i>cmd</i> is <tt><font size=+1>*</font></tt>. Once a matching <tt><font size=+1>Cmdtab</font></tt> has been
+ found, if <i>narg</i> is not zero, then the parsed command must have
+ exactly <i>narg</i> fields (including the command string itself). If
+ the command has the wrong number of arguments, <i>lookupcmd</i> returns
+ nil. Otherwise, it returns a pointer to the <tt><font size=+1>Cmdtab</font></tt> entry. If <i>lookupcmd</i>
+ does not find a matching command at all, it returns
+ nil. Whenever <i>lookupcmd</i> returns nil, it sets the system error
+ string.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Respondcmderror</i> resoponds to request <i>r</i> with an error of the form
+ &#8216;<i>fmt</i>: <i>cmd</i>,&#8217; where <i>fmt</i> is the formatted string and <i>cmd</i> is a reconstruction
+ of the parsed command. Fmt is often simply <tt><font size=+1>%r .<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This interface is not used in any distributed 9P servers. It was
+ lifted from the Plan 9 kernel. Almost any Plan 9 kernel driver
+ (<tt><font size=+1>/sys/src/9/*/dev*.c</font></tt> on Plan 9) is a good example.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9p/parse.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/9p.html"><i>9p</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/9p-fid.html b/man/man3/9p-fid.html
new file mode 100644
index 00000000..44bca53c
--- /dev/null
+++ b/man/man3/9p-fid.html
@@ -0,0 +1,170 @@
+<head>
+<title>9p-fid(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>9P-FID(3)</b><td align=right><b>9P-FID(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Fid, Fidpool, allocfidpool, freefidpool, allocfid, closefid, lookupfid,
+ removefid, Req, Reqpool, allocreqpool, freereqpool, allocreq,
+ closereq, lookupreq, removereq &ndash; 9P fid, request tracking<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;fcall.h&gt;<br>
+ #include &lt;thread.h&gt;<br>
+ #include &lt;9p.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ typedef struct Fid<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ulong fid;<br>
+ char &nbsp;&nbsp;&nbsp;omode; &nbsp;&nbsp;&nbsp;/* &#8722;1 if not open */<br>
+ char &nbsp;&nbsp;&nbsp;*uid;<br>
+ Qid &nbsp;&nbsp;&nbsp;&nbsp;qid;<br>
+ File &nbsp;&nbsp;&nbsp;*file;<br>
+ void &nbsp;&nbsp;&nbsp;*aux;<br>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>...<br>
+ </i>
+ </table>
+ <tt><font size=+1>} Fid;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ typedef struct Req<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ulong tag;<br>
+ Fcall ifcall;<br>
+ Fcall ofcall;<br>
+ Req &nbsp;&nbsp;&nbsp;&nbsp;*oldreq;<br>
+ void &nbsp;&nbsp;&nbsp;*aux;<br>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>...<br>
+ </i>
+ </table>
+ <tt><font size=+1>} Req;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Fidpool* allocfidpool(void (*destroy)(Fid*))<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;freefidpool(Fidpool *p)<br>
+ Fid* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;allocfid(Fidpool *p, ulong fid)<br>
+ Fid* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lookupfid(Fidpool *p, ulong fid)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;closefid(Fid *f)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;removefid(Fid *f)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Reqpool* allocreqpool(void (*destroy)(Req*))<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;freereqpool(Reqpool *p)<br>
+ Req* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;allocreq(Reqpool *p, ulong tag)<br>
+ Req* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lookupreq(Reqpool *p, ulong tag)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;closereq(Req *f)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;removereq(Req *r)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines provide management of <tt><font size=+1>Fid</font></tt> and <tt><font size=+1>Req</font></tt> structures from
+ <tt><font size=+1>Fidpool</font></tt>s and <tt><font size=+1>Reqpool</font></tt>s. They are primarily used by the 9P server
+ loop described in <a href="../man3/9p.html"><i>9p</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Fid</font></tt> structures are intended to represent active fids in a 9P connection,
+ as <tt><font size=+1>Chan</font></tt> structures do in the Plan 9 kernel. The <tt><font size=+1>fid</font></tt> element is
+ the integer fid used in the 9P connection. <tt><font size=+1>Omode</font></tt> is the mode under
+ which the fid was opened, or <tt><font size=+1>&#8722;1</font></tt> if this fid has not been opened
+ yet. Note that in addition to the values <tt><font size=+1>OREAD</font></tt>,
+ <tt><font size=+1>OWRITE</font></tt>, and <tt><font size=+1>ORDWR</font></tt>, <tt><font size=+1>omode</font></tt> can contain the various flags permissible
+ in an open call. To ignore the flags, use <tt><font size=+1>omode&amp;OMASK</font></tt>. <tt><font size=+1>Omode</font></tt> should
+ not be changed by the client. The fid derives from a successful
+ authentication by <tt><font size=+1>uid</font></tt>. <tt><font size=+1>Qid</font></tt> contains the qid returned in the last
+ successful <tt><font size=+1>walk</font></tt> or <tt><font size=+1>create</font></tt> transaction
+ involving the fid. In a file tree-based server, the <tt><font size=+1>Fid</font></tt>&#8217;s <tt><font size=+1>file</font></tt>
+ element points at a <tt><font size=+1>File</font></tt> structure (see <a href="../man3/9p-file.html"><i>9p-file</i>(3)</a>) corresponding
+ to the fid. The <tt><font size=+1>aux</font></tt> member is intended for use by the client to
+ hold information specific to a particular <tt><font size=+1>Fid</font></tt>. With the exception
+ of <tt><font size=+1>aux</font></tt>, these elements should be treated as read-only by
+ the client.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Allocfidpool</i> creates a new <tt><font size=+1>Fidpool</font></tt>. <i>Freefidpool</i> destroys such
+ a pool. <i>Allocfid</i> returns a new <tt><font size=+1>Fid</font></tt> whose fid number is <i>fid</i>. There
+ must not already be an extant <tt><font size=+1>Fid</font></tt> with that number in the pool.
+ Once a <tt><font size=+1>Fid</font></tt> has been allocated, it can be looked up by fid number
+ using <i>lookupfid</i>. <tt><font size=+1>Fid</font></tt>s are reference counted: both
+ <i>allocfid</i> and <i>lookupfid</i> increment the reference count on the <tt><font size=+1>Fid</font></tt>
+ structure before returning. When a reference to a <tt><font size=+1>Fid</font></tt> is no longer
+ needed, <i>closefid</i> should be called to note the destruction of the
+ reference. When the last reference to a <tt><font size=+1>Fid</font></tt> is removed, if <i>destroy</i>
+ (supplied when creating the fid pool) is not zero, it is
+ called with the <tt><font size=+1>Fid</font></tt> as a parameter. It should perform whatever
+ cleanup is necessary regarding the <tt><font size=+1>aux</font></tt> element. <i>Removefid</i> is equivalent
+ to <i>closefid</i> but also removes the <tt><font size=+1>Fid</font></tt> from the pool. Note that
+ due to lingering references, the return of <i>removefid</i> may not mean
+ that <i>destroy</i> has been called.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Allocreqpool</i>, <i>freereqpool</i>, <i>allocreq</i>, <i>lookupreq</i>, <i>closereq</i>, and
+ <i>removereq</i> are analogous but operate on <tt><font size=+1>Reqpool</font></tt>s and <tt><font size=+1>Req</font></tt> structures.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9p<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/9p.html"><i>9p</i>(3)</a>, <a href="../man3/9p-file.html"><i>9p-file</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/9p-file.html b/man/man3/9p-file.html
new file mode 100644
index 00000000..63ae5042
--- /dev/null
+++ b/man/man3/9p-file.html
@@ -0,0 +1,258 @@
+<head>
+<title>9p-file(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>9P-FILE(3)</b><td align=right><b>9P-FILE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Tree, alloctree, freetree, File, createfile, closefile, removefile,
+ walkfile, opendirfile, readdirfile, closedirfile, hasperm &ndash; in-memory
+ file hierarchy<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;fcall.h&gt;<br>
+ #include &lt;thread.h&gt;<br>
+ #include &lt;9p.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ typedef struct File<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Ref;<br>
+ Dir;<br>
+ void*aux;<br>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>...<br>
+ </i>
+ </table>
+
+ </table>
+ <tt><font size=+1>} File;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ typedef struct Tree<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ File *root;<br>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>...<br>
+ </i>
+ </table>
+
+ </table>
+ <tt><font size=+1>} Tree;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Tree* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alloctree(char *uid, char *gid, ulong mode,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ void (*destroy)(File*))<br>
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;freetree(Tree *tree)<br>
+ File* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;createfile(File *dir, char *name, char *uid,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ulong mode, void *aux)<br>
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;removefile(File *file)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;closefile(File *file)<br>
+ File* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;walkfile(File *dir, char *path)<br>
+ Readdir* opendirfile(File *dir)<br>
+ long &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;readdirfile(Readdir *rdir, char *buf, long n)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;closedirfile(Readdir *rdir)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hasperm(File *file, char *uid, int p)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>File</font></tt>s and <tt><font size=+1>Tree</font></tt>s provide an in-memory file hierarchy intended for
+ use in 9P file servers.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Alloctree</i> creates a new tree of files, and <i>freetree</i> destroys it.
+ The root of the tree (also the <tt><font size=+1>root</font></tt> element in the structure)
+ will have mode <i>mode</i> and be owned by user <i>uid</i> and group <i>gid</i>. <i>Destroy</i>
+ is used when freeing <tt><font size=+1>File</font></tt> structures and is described later.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>File</font></tt>s (including directories) other than the root are created
+ using <i>createfile</i>, which attempts to create a file named <i>name</i> in
+ the directory <i>dir</i>. If created, the file will have owner <i>uid</i> and
+ have a group inherited from the directory. <i>Mode</i> and the permissions
+ of <i>dir</i> are used to calculate the permission bits for the file
+ as
+ described in <i>open</i>(9p). It is permissible for <i>name</i> to be a slash-separated
+ path rather than a single element.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Removefile</i> removes a file from the file tree. The file will not
+ be freed until the last reference to it has been removed. Directories
+ may only be removed when empty. <i>Removefile</i> returns zero on success,
+ &ndash;1 on error. It is correct to consider <i>removefile</i> to be <i>closefile</i>
+ with the side effect of removing the file when possible.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Walkfile</i> evaluates <i>path</i> relative to the directory <i>dir</i>, returning
+ the resulting file, or zero if the named file or any intermediate
+ element does not exist.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>File</font></tt> structure&#8217;s <tt><font size=+1>aux</font></tt> pointer may be used by the client for
+ per-<tt><font size=+1>File</font></tt> storage. <tt><font size=+1>File</font></tt>s are reference-counted: if not zero, <i>destroy</i>
+ (specified in the call to <i>alloctree</i>) will be called for each file
+ when its last reference is removed or when the tree is freed.
+ <i>Destroy</i> should take care of any necessary cleanup related to
+ <tt><font size=+1>aux</font></tt>. When creating new file references by copying pointers, call
+ <i>incref</i> (see <a href="../man3/lock.html"><i>lock</i>(3)</a>) to update the reference count. To note the
+ removal of a reference to a file, call <i>closefile</i>. <i>Createfile</i> and
+ <i>walkfile</i> return new references. <i>Removefile</i>, <i>closefile</i>, and <i>walkfile</i>
+ (but not <i>createfile</i>) consume the passed reference.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Directories may be read, yielding a directory entry structure
+ (see <i>stat</i>(9p)) for each file in the directory. In order to allow
+ concurrent reading of directories, clients must obtain a <tt><font size=+1>Readdir</font></tt>
+ structure by calling <i>opendirfile</i> on a directory. Subsequent calls
+ to <i>readdirfile</i> will each yield an integral number of machine-
+ independent stat buffers, until end of directory. When finished,
+ call <i>closedirfile</i> to free the <tt><font size=+1>Readdir</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Hasperm</i> does simplistic permission checking; it assumes only one-user
+ groups named by uid and returns non-zero if <i>uid</i> has permission
+ <i>p</i> (a bitwise-or of <tt><font size=+1>AREAD</font></tt>, <tt><font size=+1>AWRITE</font></tt> and <tt><font size=+1>AEXEC</font></tt>) according to <i>file</i><tt><font size=+1>&#8722;&gt;mode</font></tt>.
+ 9P servers written using <tt><font size=+1>File</font></tt> trees will do standard permission
+ checks automatically; <i>hasperm</i> may be
+ called explicitly to do additional checks. A 9P server may link
+ against a different <i>hasperm</i> implementation to provide more complex
+ groups.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The following code correctly handles references when elementwise
+ walking a path and creating a file.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>f = tree&#8722;&gt;root;<br>
+ incref(f);<br>
+ for(i=0; i&lt;n &amp;&amp; f!=nil; i++)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ f = walkfile(f, elem[i]);<br>
+
+ </table>
+ if(f == nil)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return nil;<br>
+
+ </table>
+ nf = createfile(f, &quot;foo&quot;, &quot;nls&quot;, 0666, nil);<br>
+ closefile(f);<br>
+ return nf;<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9p/file.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/9p.html"><i>9p</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The reference counting is cumbersome.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/9p-intmap.html b/man/man3/9p-intmap.html
new file mode 100644
index 00000000..f6d1822f
--- /dev/null
+++ b/man/man3/9p-intmap.html
@@ -0,0 +1,110 @@
+<head>
+<title>9p-intmap(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>9P-INTMAP(3)</b><td align=right><b>9P-INTMAP(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Intmap, allocmap, freemap, insertkey, caninsertkey, lookupkey,
+ deletekey &ndash; integer to data structure maps<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;fcall.h&gt;<br>
+ #include &lt;thread.h&gt;<br>
+ #include &lt;9p.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Intmap* allocmap(void (*inc)(void*))<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;freemap(Intmap *map, void (*dec)(void*))<br>
+ void* &nbsp;&nbsp;&nbsp;&nbsp;lookupkey(Intmap *map, ulong key)<br>
+ void* &nbsp;&nbsp;&nbsp;&nbsp;insertkey(Intmap *map, ulong key, void *val)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;caninsertkey(Intmap *map, ulong key, void *val)<br>
+ void* &nbsp;&nbsp;&nbsp;&nbsp;lookupkey(Intmap *map, ulong key)<br>
+ void* &nbsp;&nbsp;&nbsp;&nbsp;deletekey(Intmap *map, ulong key)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ An <tt><font size=+1>Intmap</font></tt> is an arbitrary mapping from integers to pointers. <i>Allocmap</i>
+ creates a new map, and <i>freemap</i> destroys it. The <i>inc</i> function is
+ called each time a new pointer is added to the map; similarly,
+ <i>dec</i> is called on each pointer left in the map when it is being
+ freed. Typically these functions maintain reference counts.
+ New entries are added to the map by calling <i>insertkey</i>, which will
+ return the previous value associated with the given <i>key</i>, or zero
+ if there was no previous value. <i>Caninsertkey</i> is like <i>insertkey</i>
+ but only inserts <i>val</i> if there is no current mapping. It returns
+ 1 if <i>val</i> was inserted, 0 otherwise. <i>Lookupkey</i> returns the pointer
+ associated with <i>key</i>, or zero if there is no such pointer. <i>Deletekey</i>
+ removes the entry for <i>id</i> from the map, returning the associated
+ pointer, if any.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Concurrent access to <tt><font size=+1>Intmap</font></tt>s is safe, moderated via a <tt><font size=+1>QLock</font></tt> stored
+ in the <tt><font size=+1>Intmap</font></tt> structure.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In anticipation of the storage of reference-counted structures,
+ an increment function <i>inc</i> may be specified at map creation time.
+ <i>Lookupkey</i> calls <i>inc</i> (if non-zero) on pointers before returning
+ them. If the reference count adjustments were left to the caller
+ (and thus not protected by the lock), it would be possible to
+ accidentally reclaim a structure if, for example, it was deleted
+ from the map and its reference count decremented between the return
+ of <i>insertkey</i> and the external increment. <i>Insertkey</i> and <i>caninsertkey</i>
+ do <i>not</i> call <i>inc</i> when inserting <i>val</i> into the map, nor do <i>insertkey</i>
+ or <i>deletekey</i> call <i>inc</i> when returning old map entries.
+ The rationale is that calling an insertion function transfers
+ responsibility for the reference to the map, and responsibility
+ is given back via the return value of <i>deletekey</i> or the next <i>insertkey</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Intmap</font></tt>s are used by the 9P library to implement <tt><font size=+1>Fidpool</font></tt>s and <tt><font size=+1>Reqpool</font></tt>s.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9p/intmap.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/9p.html"><i>9p</i>(3)</a>, <a href="../man3/9p-fid.html"><i>9p-fid</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/9p.html b/man/man3/9p.html
new file mode 100644
index 00000000..9896b0b7
--- /dev/null
+++ b/man/man3/9p.html
@@ -0,0 +1,434 @@
+<head>
+<title>9p(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>9P(3)</b><td align=right><b>9P(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Srv, dirread9p, emalloc9p, erealloc9p, estrdup9p, postfd, postmountsrv,
+ readbuf, readstr, respond, srv, threadpostmountsrv, walkandclone
+ &ndash; 9P file service<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;fcall.h&gt;<br>
+ #include &lt;thread.h&gt;<br>
+ #include &lt;9p.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ typedef struct Srv {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Tree* tree;<br>
+ void &nbsp;&nbsp;&nbsp;(*attach)(Req *r);<br>
+ void &nbsp;&nbsp;&nbsp;(*auth)(Req *r);<br>
+ void &nbsp;&nbsp;&nbsp;(*open)(Req *r);<br>
+ void &nbsp;&nbsp;&nbsp;(*create)(Req *r);<br>
+ void &nbsp;&nbsp;&nbsp;(*read)(Req *r);<br>
+ void &nbsp;&nbsp;&nbsp;(*write)(Req *r);<br>
+ void &nbsp;&nbsp;&nbsp;(*remove)(Req *r);<br>
+ void &nbsp;&nbsp;&nbsp;(*flush)(Req *r);<br>
+ void &nbsp;&nbsp;&nbsp;(*stat)(Req *r);<br>
+ void &nbsp;&nbsp;&nbsp;(*wstat)(Req *r);<br>
+ void &nbsp;&nbsp;&nbsp;(*walk)(Req *r);<br>
+ char* (*walk1)(Fid *fid, char *name, Qid *qid);<br>
+ char* (*clone)(Fid *oldfid, Fid *newfid);<br>
+ void &nbsp;&nbsp;&nbsp;(*destroyfid)(Fid *fid);<br>
+ void &nbsp;&nbsp;&nbsp;(*destroyreq)(Req *r);<br>
+ void &nbsp;&nbsp;&nbsp;(*end)(Srv *s);<br>
+ void* aux;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;infd;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;outfd;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;srvfd;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;nopipe;<br>
+
+ </table>
+ } Srv;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;srv(Srv *s)<br>
+ void &nbsp;&nbsp;&nbsp;postmountsrv(Srv *s, char *name, char *mtpt, int flag)<br>
+ void &nbsp;&nbsp;&nbsp;threadpostmountsrv(Srv *s, char *name, char *mtpt, int flag)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;postfd(char *srvname, int fd)<br>
+ void &nbsp;&nbsp;&nbsp;respond(Req *r, char *error)<br>
+ ulong readstr(Req *r, char *src)<br>
+ ulong readbuf(Req *r, void *src, ulong nsrc)<br>
+ typedef int Dirgen(int n, Dir *dir, void *aux)<br>
+ void &nbsp;&nbsp;&nbsp;dirread9p(Req *r, Dirgen *gen, void *aux)<br>
+ void &nbsp;&nbsp;&nbsp;walkandclone(Req *r, char *(*walk1)(Fid *old, char *name,
+ void *v),<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char *(*clone)(Fid *old, Fid *new, void *v), void *v)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void* emalloc9p(ulong n)<br>
+ void* erealloc9p(void *v, ulong n)<br>
+ char* estrdup9p(char *s)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ extern int chatty9p;<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The function <i>srv</i> serves a 9P session by reading requests from
+ <tt><font size=+1>s&#8722;&gt;infd</font></tt>, dispatching them to the function pointers kept in <tt><font size=+1>Srv</font></tt>,
+ and writing the responses to <tt><font size=+1>s&#8722;&gt;outfd</font></tt>. (Typically, <i>postmountsrv</i>
+ or <i>threadpostmountsrv</i> initializes the <tt><font size=+1>infd</font></tt> and <tt><font size=+1>outfd</font></tt> structure
+ members. See the description below.)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Req</font></tt> and <tt><font size=+1>Fid</font></tt> structures are allocated one-to-one with uncompleted
+ requests and active fids, and are described in <a href="../man3/9p-fid.html"><i>9p-fid</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The behavior of <i>srv</i> depends on whether there is a file tree (see
+ <a href="../man3/9p-file.html"><i>9p-file</i>(3)</a>) associated with the server, that is, whether the <tt><font size=+1>tree</font></tt>
+ element is nonzero. The differences are made explicit in the discussion
+ of the service loop below. The <tt><font size=+1>aux</font></tt> element is the client&#8217;s, to
+ do with as it pleases.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Srv</i> does not return until the 9P conversation is finished. Since
+ it is usually run in a separate process so that the caller can
+ exit, the service loop has little chance to return gracefully
+ on out of memory errors. It calls <i>emalloc9p</i>, <i>erealloc9p</i>, and <i>estrdup9p</i>
+ to obtain its memory. The default implementations of these
+ functions act as <i>malloc</i>, <i>realloc</i>, and <i>strdup</i> but abort the program
+ if they run out of memory. If alternate behavior is desired, clients
+ can link against alternate implementations of these functions.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Postmountsrv</i> and <i>threadpostmountsrv</i> are wrappers that create a
+ separate process in which to run <i>srv</i>. They do the following:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If <i>s</i><tt><font size=+1>&#8722;&gt;</font></tt><i>nopipe</i> is zero (the common case), initialize <i>s</i><tt><font size=+1>&#8722;&gt;</font></tt><i>infd</i> and <i>s</i><tt><font size=+1>&#8722;&gt;</font></tt><i>outfd</i>
+ to be one end of a freshly allocated pipe, with <i>s</i><tt><font size=+1>&#8722;&gt;</font></tt><i>srvfd</i> initialized
+ as the other end.<br>
+ If <tt><font size=+1>name</font></tt> is non-nil, call <tt><font size=+1>postfd(</font></tt><i>s</i><tt><font size=+1>&#8722;&gt;</font></tt><i>srvfd</i><tt><font size=+1>,</font></tt> <i>name</i><tt><font size=+1>)</font></tt> to post <i>s</i><tt><font size=+1>&#8722;&gt;</font></tt><i>srvfd</i>
+ as <tt><font size=+1>/srv/</font></tt><i>name</i><tt><font size=+1>.<br>
+ </font></tt>Fork a child process via <a href="../man3/rfork.html"><i>rfork</i>(3)</a> or <i>procrfork</i> (see <a href="../man3/thread.html"><i>thread</i>(3)</a>),
+ using the <tt><font size=+1>RFFDG</font></tt>, <tt><font size=+1>RFNAMEG</font></tt>, and <tt><font size=+1>RFMEM</font></tt> flags. The child process calls
+ <i>close(</i><tt><font size=+1>s</font></tt><i>-&gt;</i><tt><font size=+1>srvfd</font></tt><i>)</i> and then <i>srv(</i><tt><font size=+1>s</font></tt><i>)</i>; it will exit once <i>srv</i> returns.<br>
+ If <i>mtpt</i> is non-nil, call <tt><font size=+1>amount(</font></tt><i>s</i><tt><font size=+1>&#8722;&gt;</font></tt><i>srvfd, mtpt</i><tt><font size=+1>,</font></tt> <i>flag</i><tt><font size=+1>, </font></tt>&quot;&quot;); otherwise,
+ close <i>s</i><tt><font size=+1>&#8722;&gt;</font></tt><i>srvfd</i>.<br>
+ The parent returns to the caller.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ If any error occurs during this process, the entire process is
+ terminated by calling <a href="../man3/sysfatal.html"><i>sysfatal</i>(3)</a>.<br>
+ <p><font size=+1><b>Service functions </b></font><br>
+ The functions in a <tt><font size=+1>Srv</font></tt> structure named after 9P transactions are
+ called to satisfy requests as they arrive. If a function is provided,
+ it <i>must</i> arrange for <i>respond</i> to be called when the request is satisfied.
+ The only parameter of each service function is a <tt><font size=+1>Req*</font></tt> parameter
+ (say <i>r</i>). The incoming request parameters are
+ stored in <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall</i>; <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>fid</i> and <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>newfid</i> are pointers to <tt><font size=+1>Fid</font></tt> structures
+ corresponding to the numeric fids in <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall</i>; similarly, <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>oldreq</i>
+ is the <tt><font size=+1>Req</font></tt> structure corresponding to <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall.oldtag</i>. The outgoing
+ response data should be stored in <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ofcall</i>. The one exception
+ to this rule is that <i>stat</i> should fill in
+ <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>d</i> rather than <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ofcall.stat</i>: the library will convert the structure
+ into the machine-independent wire representation. Similarly, <i>wstat</i>
+ may consult <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>d</i> rather than decoding <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall</i><tt><font size=+1>.</font></tt><i>stat</i> itself. When
+ a request has been handled, <i>respond</i> should be called with <i>r</i> and
+ an error string. If the request was satisfied
+ successfully, the error string should be a nil pointer. Note that
+ it is permissible for a function to return without itself calling
+ <i>respond</i>, as long as it has arranged for <i>respond</i> to be called at
+ some point in the future by another proc sharing its address space,
+ but see the discussion of <i>flush</i> below. Once <i>respond</i> has been
+ called, the <tt><font size=+1>Req*</font></tt> as well as any pointers it once contained must
+ be considered freed and not referenced.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the service loop detects an error in a request (e.g., an attempt
+ to reuse an extant fid, an open of an already open fid, a read
+ from a fid opened for write, etc.) it will reply with an error
+ without consulting the service functions.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The service loop provided by <i>srv</i> (and indirectly by <i>postmountsrv</i>
+ and <i>threadpostmountsrv</i>) is single-threaded. If it is expected
+ that some requests might block, arranging for alternate processes
+ to handle them is suggested.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The constraints on the service functions are as follows. These
+ constraints are checked while the server executes. If a service
+ function fails to do something it ought to have, <i>srv</i> will call
+ <i>endsrv</i> and then abort.<br>
+ <i>Auth</i>&nbsp;&nbsp;&nbsp;If authentication is desired, the <i>auth</i> function should record
+ that <i>afid</i> is the new authentication fid and set <i>afid-&gt;qid</i> and <i>ofcall.qid</i>.
+ <i>Auth</i> may be nil, in which case it will be treated as having responded
+ with the error &#8220;<i>argv0: authentication not required</i>,&#8221; where <i>argv0</i>
+ is the program name variable as set by
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>ARGBEGIN</i> (see <a href="../man3/arg.html"><i>arg</i>(3)</a>).<br>
+
+ </table>
+ <i>Attach</i>The <i>attach</i> function should check the authentication state
+ of <i>afid</i> if desired, and set <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>fid</i><tt><font size=+1>&#8722;&gt;</font></tt><i>qid</i> and <i>ofcall.qid</i> to the qid
+ of the file system root. <i>Attach</i> may be nil only if file trees
+ are in use; in this case, the qid will be filled from the root
+ of the tree, and no authentication will be done.
+ <i>Walk</i>&nbsp;&nbsp;&nbsp;If file trees are in use, <i>walk</i> is handled internally, and
+ <i>srv</i><tt><font size=+1>&#8722;&gt;</font></tt><i>walk</i> is never called.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If file trees are not in use, <i>walk</i> should consult <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall</i><tt><font size=+1>.</font></tt><i>wname</i>
+ and <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall</i><tt><font size=+1>.</font></tt><i>nwname</i>, filling in <i>ofcall</i><tt><font size=+1>.</font></tt><i>qid</i> and <i>ofcall</i><tt><font size=+1>.</font></tt><i>nqid</i>, and
+ also copying any necessary <i>aux</i> state from <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>fid</i> to <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>newfid</i> when
+ the two are different. As long as <i>walk</i> sets <i>ofcall</i><tt><font size=+1>.</font></tt><i>nqid</i> appropriately,
+ it can <i>respond</i> with a nil error string
+ even when 9P demands an error (<i>e.g.</i>, in the case of a short walk);
+ the library detects error conditions and handles them appropriately.<br>
+ Because implementing the full walk message is intricate and prone
+ to error, the helper routine <i>walkandclone</i> will handle the request
+ given pointers to two functions <i>walk1</i> and (optionally) <i>clone .
+ Clone</i>, if non-nil, is called to signal the creation of <i>newfid</i>
+ from <i>oldfid</i>. Typically a <i>clone</i> routine will copy or increment
+ a reference count in <i>oldfid</i>&#8217;s <i>aux</i> element. <i>Walk1</i> should walk <i>fid</i>
+ to <i>name</i>, initializing <i>fid</i><tt><font size=+1>&#8722;&gt;</font></tt><i>qid</i> to the new path&#8217;s qid. Both should
+ return nil on success or an error message on error. <i>Walkandclone</i>
+ will call <i>respond</i> after handling the request.<br>
+
+ </table>
+ <i>Walk1</i>, <i>Clone<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If the client provides functions <i>srv</i><tt><font size=+1>&#8722;&gt;</font></tt><i>walk1</i> and (optionally) <i>srv</i><tt><font size=+1>&#8722;&gt;</font></tt><i>clone</i>,
+ the 9P service loop will call <i>walkandclone</i> with these functions
+ to handle the request. Unlike the <i>walk1</i> above, <i>srv</i><tt><font size=+1>&#8722;&gt;</font></tt><i>walk1</i> must
+ fill in both <i>fid</i><tt><font size=+1>&#8722;&gt;</font></tt><i>qid</i> and <tt><font size=+1>*</font></tt><i>qid</i> with the new qid on a successful
+ walk.<br>
+
+ </table>
+ <i>Open</i>&nbsp;&nbsp;&nbsp;If file trees are in use, the file metadata will be consulted
+ on open, create, remove, and wstat to see if the requester has
+ the appropriate permissions. If not, an error will be sent back
+ without consulting a service function.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If not using file trees or the user has the appropriate permissions,
+ <i>open</i> is called with <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ofcall</i><tt><font size=+1>.</font></tt><i>qid</i> already initialized to the one
+ stored in the <tt><font size=+1>Fid</font></tt> structure (that is, the one returned in the
+ previous walk). If the qid changes, both should be updated.<br>
+ <i>Create</i>The <i>create</i> function must fill in both <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>fid</i><tt><font size=+1>&#8722;&gt;</font></tt><i>qid</i> and <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ofcall</i><tt><font size=+1>.</font></tt><i>qid</i>
+ on success. When using file trees, <i>create</i> should allocate a new
+ <tt><font size=+1>File</font></tt> with <i>createfile</i>; note that <i>createfile</i> may return nil (because,
+ say, the file already exists). If the <i>create</i> function is nil,
+ <i>srv</i> behaves as though it were a function that always
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ responded with the error &#8220;create prohibited&#8221;.<br>
+
+ </table>
+ <i>Remove<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Remove
+ </table>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ should mark the file as removed, whether by calling <i>removefile</i>
+ when using file trees, or by updating an internal data structure.
+ In general it is not a good idea to clean up the <i>aux</i> information
+ associated with the corresponding <tt><font size=+1>File</font></tt> at this time, to avoid
+ memory errors if other fids have references to that
+ file. Instead, it is suggested that <i>remove</i> simply mark the file
+ as removed (so that further operations on it know to fail) and
+ wait until the file tree&#8217;s destroy function is called to reclaim
+ the <i>aux</i> pointer. If not using file trees, it is prudent to take
+ the analogous measures. If <i>remove</i> is not provided, all remove
+ requests will draw &#8220;remove prohibited&#8221; errors.<br>
+
+ </table>
+ <i>Read</i>&nbsp;&nbsp;&nbsp;The <i>read</i> function must be provided; it fills <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ofcall</i><tt><font size=+1>.</font></tt><i>data</i>
+ with at most <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall</i><tt><font size=+1>.</font></tt><i>count</i> bytes of data from offset <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall</i><tt><font size=+1>.</font></tt><i>offset</i>
+ of the file. It also sets <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ofcall</i><tt><font size=+1>.</font></tt><i>count</i> to the number of bytes
+ being returned. If using file trees, <i>srv</i> will handle reads of
+ directories internally, only calling <i>read</i> for requests on
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ files. <i>Readstr</i> and <i>readbuf</i> are useful for satisfying read requests
+ on a string or buffer. Consulting the request in <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall</i>, they
+ fill <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ofcall</i><tt><font size=+1>.</font></tt><i>data</i> and set <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ofcall</i><tt><font size=+1>.</font></tt><i>count</i>; they do not call <i>respond</i><tt><font size=+1>.</font></tt>
+ Similarly, <i>dirread9p</i> can be used to handle directory reads in
+ servers not using file trees. The passed <i>gen
+ </i>function will be called as necessary to fill <i>dir</i> with information
+ for the <i>n</i>th entry in the directory. The string pointers placed
+ in <i>dir</i> should be fresh copies made with <i>estrdup9p</i>; they will be
+ freed by <i>dirread9p</i> after each successful call to <i>gen</i>. <i>Gen</i> should
+ return zero if it successfully filled <i>dir</i>, minus one on end of
+ directory.<br>
+
+ </table>
+ <i>Write</i>The <i>write</i> function is similar but need not be provided. If
+ it is not, all writes will draw &#8220;write prohibited&#8221; errors. Otherwise,
+ <i>write</i> should attempt to write the <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall</i><tt><font size=+1>.</font></tt><i>count</i> bytes of <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall</i><tt><font size=+1>.</font></tt><i>data</i>
+ to offset <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ifcall</i><tt><font size=+1>.</font></tt><i>offset</i> of the file, setting <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>ofcall</i><tt><font size=+1>.</font></tt><i>count</i>
+ to the number of bytes actually written. Most
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ programs consider it an error to write less than the requested
+ amount.<br>
+
+ </table>
+ <i>Stat&nbsp;&nbsp;&nbsp;Stat</i> should fill <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>d</i> with the stat information for <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>fid</i>.
+ If using file trees, <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>d</i> will have been initialized with the stat
+ info from the tree, and <i>stat</i> itself may be nil.<br>
+ <i>Wstat</i>The <i>wstat</i> consults <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>d</i> in changing the metadata for <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>fid</i>
+ as described in <i>stat</i>(9p). When using file trees, <i>srv</i> will take
+ care to check that the request satisfies the permissions outlined
+ in <i>stat</i>(9p). Otherwise <i>wstat</i> should take care to enforce permissions
+ where appropriate.<br>
+ <i>Flush</i>&nbsp;&nbsp;&nbsp;Single-threaded servers, which always call <i>respond</i> before
+ returning from the service functions, need not provide a <i>flush</i>
+ implementation: <i>flush</i> is only necessary in multithreaded programs,
+ which arrange for <i>respond</i> to be called asynchronously. <i>Flush</i> should
+ cause the request <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>oldreq</i> to be cancelled or
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ hurried along. If <i>oldreq</i> is cancelled, this should be signalled
+ by calling <i>respond</i> on <i>oldreq</i> with error string &#8216;<tt><font size=+1>interrupted</font></tt>&#8217;.
+ <i>Flush</i> must respond to <i>r</i> with a nil error string. <i>Flush</i> may respond
+ to <i>r</i> before forcing a response to <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>oldreq</i>. In this case, the
+ library will delay sending the <i>Rflush</i> message until the
+ response to <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>oldreq</i> has been sent.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <i>Destroyfid</i>, <i>destroyreq</i>, and <i>end</i> are auxiliary functions, not called
+ in direct response to 9P requests.<br>
+ <i>Destroyfid<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ When a <tt><font size=+1>Fid</font></tt>&#8217;s reference count drops to zero (<i>i.e.,</i> it has been
+ clunked and there are no outstanding requests referring to it),
+ <i>destroyfid</i> is called to allow the program to dispose of the <i>fid</i><tt><font size=+1>&#8722;&gt;</font></tt><i>aux</i>
+ pointer.<br>
+
+ </table>
+ <i>Destroyreq<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Similarly, when a <tt><font size=+1>Req</font></tt>&#8217;s reference count drops to zero (<i>i.e.</i>, it
+ has been handled via <i>respond</i> and other outstanding pointers to
+ it have been closed), <i>destroyreq</i> is called to allow the program
+ to dispose of the <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>aux</i> pointer.<br>
+
+ </table>
+ <i>End</i>&nbsp;&nbsp;&nbsp;&nbsp;Once the 9P service loop has finished (end of file been reached
+ on the service pipe or a bad message has been read), <i>end</i> is called
+ (if provided) to allow any final cleanup. For example, it was
+ used by the Palm Pilot synchronization file system (never finished)
+ to gracefully terminate the serial conversation once the
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ file system had been unmounted. After calling <i>end</i>, the service
+ loop (which runs in a separate process from its caller) terminates
+ using <i>_exits</i> (see <a href="../man3/exits.html"><i>exits</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ If the <tt><font size=+1>chatty9p</font></tt> flag is at least one, a transcript of the 9P session
+ is printed on standard error. If the <tt><font size=+1>chatty9p</font></tt> flag is greater
+ than one, additional unspecified debugging output is generated.
+ By convention, servers written using this library accept the <tt><font size=+1>&#8722;D</font></tt>
+ option to increment <tt><font size=+1>chatty9p</font></tt>.
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9p/ramfs.c</font></tt> is an example of a simple single-threaded
+ file server. On Plan 9, see <i>archfs</i>, <i>cdfs</i>, <i>nntpfs</i>, <i>webfs</i>, and <i>sshnet</i>
+ for more examples.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In general, the <tt><font size=+1>File</font></tt> interface is appropriate for maintaining
+ arbitrary file trees (as in <i>ramfs</i>). The <tt><font size=+1>File</font></tt> interface is best
+ avoided when the tree structure is easily generated as necessary;
+ this is true when the tree is highly structured (as in <i>cdfs</i> and
+ <i>nntpfs</i>) or is maintained elsewhere.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9p<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/9p-fid.html"><i>9p-fid</i>(3)</a>, <a href="../man3/9p-file.html"><i>9p-file</i>(3)</a>, <i>intro</i>(9p)<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/9pclient.html b/man/man3/9pclient.html
new file mode 100644
index 00000000..4ae50c21
--- /dev/null
+++ b/man/man3/9pclient.html
@@ -0,0 +1,250 @@
+<head>
+<title>9pclient(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>9PCLIENT(3)</b><td align=right><b>9PCLIENT(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ CFid, CFsys, fsinit, fsmount, fsroot, fssetroot, fsunmount, nsmount,
+ fsversion, fsauth, fsattach, fsclose, fscreate, fsdirread, fsdirreadall,
+ fsdirstat, fsdirfstat, fsdirwstat, fsdirfwstat, fsopen, fsopenfd,
+ fspread, fspwrite, fsread, fsreadn, fswrite &ndash; 9P client library<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;fcall.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;9pclient.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>CFsys* fsmount(int fd, char *aname)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>CFsys* nsmount(char *name, char *aname)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>CFid* &nbsp;&nbsp;&nbsp;fsroot(CFsys *fsys)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;fsunmount(CFsys *fsys)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>CFsys* fsinit(int fd)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fsversion(CFsys *fsys, int msize, char *version, int nversion)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>CFid &nbsp;&nbsp;&nbsp;&nbsp;*fsauth(CFsys *fsys, char *uname, char *aname)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>CFid &nbsp;&nbsp;&nbsp;&nbsp;*fsattach(CFsys *fsys, CFid *afid, char *uname, char *aname)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;fssetroot(CFsys *fsys, CFid *fid)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;fsclose(CFid *fid)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>CFid &nbsp;&nbsp;&nbsp;&nbsp;*fscreate(CFsys *fs, char *path, int mode, ulong perm)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>CFid* &nbsp;&nbsp;&nbsp;fsopen(CFsys *fs, char *path, int mode)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;fspread(CFid *fid, void *buf, long n, vlong offset)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;fspwrite(CFid *fid, void *buf, long n, vlong offset)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;fsread(CFid *fid, void *buf, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;fsreadn(CFid *fid, void *buf, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;fswrite(CFid *fid, void *buf, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;fsdirread(CFid *fid, Dir **d)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;fsdirreadall(CFid *fid, Dir **d)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Dir* &nbsp;&nbsp;&nbsp;&nbsp;fsdirstat(CFsys *fs, char *path)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Dir* &nbsp;&nbsp;&nbsp;&nbsp;fsdirfstat(CFid *fid)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fsdirwstat(CFsys *fs, char *path, Dir *d)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fsdirfwstat(CFid *fid, Dir *d)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fsopenfd(CFsys *fs, char *path, int mode)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>9pclient</i> library helps client programs interact with 9P servers.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>CFsys*</font></tt> represents a connection to a 9P server. A <tt><font size=+1>CFid*</font></tt> represents
+ an active fid on some connection; see <i>intro</i>(9p).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A new connection to a 9P server is typically established by <i>fsmount</i>
+ or <i>nsmount</i>. <i>Fsmount</i> initializes a new 9P conversation on the open
+ file descriptor <i>fd</i>; <i>nsmount</i> connects to a service named <i>name</i> in
+ the current name space directory (see <a href="../man4/intro.html"><i>intro</i>(4)</a>). Both attach to
+ the root of the file system using the attach name <i>aname</i>.
+ <i>Fsroot</i> returns the <tt><font size=+1>CFid*</font></tt> corresponding to this root.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fsinit</i>, <i>fsversion</i>, <i>fsauth</i>, <i>fsattach</i>, and <i>fssetroot</i> provide more
+ detailed control over the file system connection than <i>fsmount</i>
+ and <i>nsmount</i>. <i>Fsinit</i> allocates a new <tt><font size=+1>CFsys*</font></tt> corresponding to a
+ 9P conversation on the file descriptor <i>fd</i>. <i>Fsversion</i> executes
+ a <i>version</i>(9p) transaction to establish maximum message size and
+ 9P
+ version. <i>Fsauth</i> executes an <i>auth</i>(9p) transaction, returning the
+ new auth fid. (<i>Fsread</i> and <i>fswrite</i> can then be used to run the
+ authentication protocol over the fid.) <i>Fsattach</i> executes an <i>attach</i>(9p)
+ transaction to connect to the root of a file tree served by the
+ server. It presents <i>afid</i> (which may be nil) to establish
+ identity. <i>Fssetroot</i> sets the root fid used by <i>fsopen</i>, <i>fsopenfd</i>,
+ <i>fsdirstat</i>, and <i>fsdirwstat</i>, which evaluate rooted path names.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When a fid is no longer needed, it should be clunked by calling
+ <i>fsclose</i> and then considered freed. Similarly, when the connection
+ to the server is no longer needed, it should be closed by calling
+ <i>fsunmount</i>, which will take care of calling <i>fsclose</i> on the current
+ root fid. Once all fids have been clunked <i>and</i> the connection
+ has been closed (the order is not important), the allocated structures
+ will be freed and the file descriptor corresponding to the connection
+ will be closed (see <a href="../man2/close.html"><i>close</i>(2)</a>). Fids are not reference counted:
+ when <i>fsclose</i> is called, the clunk transaction and freeing of storage
+ happen immediately.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fscreate</i> and <i>fsopen</i> establish new fids using the <i>walk</i>, <i>create</i>
+ and <i>open</i> transactions (see <i>walk</i>(9p) and <i>open</i>(9p)). The <i>path</i> argument
+ is evaluated relative to the <tt><font size=+1>CFsys</font></tt> root (see <i>fsroot</i> and <i>fssetroot</i>
+ above). The path is parsed as a slash-separated sequence of path
+ elements, as on Unix and Plan 9. Elements that are
+ empty or dot (<tt><font size=+1>.</font></tt>) are ignored.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Once opened, these fids can be read and written using <i>fspread</i>
+ and <i>fspwrite</i>, which execute <i>read</i> and <i>write</i> transactions (see <i>read</i>(9p)).
+ The library maintains an offset for each fid, analagous to the
+ offset maintained by the kernel for each open file descriptor.
+ <i>Fsread</i> and <i>fswrite</i> read and write from this offset, and
+ update it after successful calls. Calling <i>fspread</i> or <i>fspwrite</i>
+ with an <i>offset</i> of &ndash;1 is identical to calling <i>fsread</i> or <i>fswrite</i>.
+ <i>Fsreadn</i> calls <i>fsread</i> repeatedly to obtain exactly <i>n</i> bytes of data,
+ unless it encounters end-of-file or an error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Reading an open a directory returns directory entries encoded
+ as described in <i>stat</i>(9p). <i>Fsdirread</i> calls <i>fsread</i> and then parses
+ the encoded entries into an array of <tt><font size=+1>Dir*</font></tt> data structures, storing
+ a pointer to the array in <tt><font size=+1>*d</font></tt> and returning the number of entries.
+ <i>Fsdirreadall</i> is similar but reads the entire directory. The
+ returned pointer should be freed with <i>free</i> (see <a href="../man3/malloc.html"><i>malloc</i>(3)</a>) when
+ no longer needed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fsdirfstat</i> and <i>fsdirfwstat</i> execute <i>stat</i> and <i>wstat</i> (see <i>stat</i>(9p))
+ transactions. The <tt><font size=+1>Dir</font></tt> structure returned by <i>fsdirfstat</i> should
+ be freed with <i>free</i> (see <a href="../man3/malloc.html"><i>malloc</i>(3)</a>) when no longer needed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fsdirstat</i> and <i>fsdirwstat</i> are similar to <i>fsdirfstat</i> and <i>fsdirfwstat</i>
+ but operate on paths relative to the file system root (see <i>fsopen</i>
+ and <i>fscreate</i> above).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fsopenfd</i> opens a file on the 9P server for reading or writing
+ but returns a Unix file descriptor instead of a fid structure.
+ The file descriptor is actually one end of a <a href="../man2/pipe.html"><i>pipe</i>(2)</a>. A proxy
+ process on the other end is ferrying data between the pipe and
+ the 9P fid. Because of the implementation as a pipe, the only
+ signal of a
+ read or write error is the closing of the pipe. The file descriptor
+ remains valid even after the <tt><font size=+1>CFsys</font></tt> is unmounted.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9pclient<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man4/intro.html"><i>intro</i>(4)</a>, <i>intro</i>(9p)<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The implementation should use a special version string to distinguish
+ between servers that support <i>openfd</i>(9p) and servers that do not.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The interface does not provide access to the <i>walk</i>(9p) transaction,
+ or to <i>open</i> and <i>create</i> on already-established fids.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There is no <i>fsseek</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/addpt.html b/man/man3/addpt.html
new file mode 100644
index 00000000..1c327aaa
--- /dev/null
+++ b/man/man3/addpt.html
@@ -0,0 +1,174 @@
+<head>
+<title>addpt(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ADDPT(3)</b><td align=right><b>ADDPT(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ addpt, subpt, mulpt, divpt, rectaddpt, rectsubpt, insetrect, canonrect,
+ eqpt, eqrect, ptinrect, rectinrect, rectXrect, rectclip, combinerect,
+ Dx, Dy, Pt, Rect, Rpt &ndash; arithmetic on points and rectangles<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;draw.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;addpt(Point p, Point q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;subpt(Point p, Point q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mulpt(Point p, int a)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;divpt(Point p, int a)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rectangle rectaddpt(Rectangle r, Point p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rectangle rectsubpt(Rectangle r, Point p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rectangle insetrect(Rectangle r, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rectangle canonrect(Rectangle r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eqpt(Point p, Point q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eqrect(Rectangle r, Rectangle s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ptinrect(Point p, Rectangle r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rectinrect(Rectangle r, Rectangle s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rectXrect(Rectangle r, Rectangle s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rectclip(Rectangle *rp, Rectangle b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;combinerect(Rectangle *rp, Rectangle b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dx(Rectangle r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dy(Rectangle r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pt(int x, int y)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rectangle Rect(int x0, int y0, int x1, int y1)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rectangle Rpt(Point p, Point q)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The functions <i>Pt</i>, <i>Rect</i> and <i>Rpt</i> construct geometrical data types
+ from their components.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Addpt</i> returns the Point sum of its arguments: <tt><font size=+1>Pt(</font></tt><i>p</i><tt><font size=+1>.x+</font></tt><i>q</i><tt><font size=+1>.x,</font></tt> <i>p</i><tt><font size=+1>.y+</font></tt><i>q</i><tt><font size=+1>.y)</font></tt>.
+ <i>Subpt</i> returns the Point difference of its arguments: <tt><font size=+1>Pt(</font></tt><i>p</i><tt><font size=+1>.x&#8722;</font></tt><i>q</i><tt><font size=+1>.x,</font></tt>
+ <i>p</i><tt><font size=+1>.y&#8722;</font></tt><i>q</i><tt><font size=+1>.y)</font></tt>. <i>Mulpt</i> returns the Point <tt><font size=+1>Pt(</font></tt><i>p</i><tt><font size=+1>.x*</font></tt><i>a</i><tt><font size=+1>,</font></tt> <i>p</i><tt><font size=+1>.y*</font></tt><i>a</i><tt><font size=+1>)</font></tt>. <i>Divpt</i> returns
+ the Point <tt><font size=+1>Pt(</font></tt><i>p</i><tt><font size=+1>.x/</font></tt><i>a</i><tt><font size=+1>,</font></tt> <i>p</i><tt><font size=+1>.y/</font></tt><i>a</i><tt><font size=+1>)</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Rectaddpt</i> returns the Rectangle <tt><font size=+1>Rect(add(</font></tt><i>r</i><tt><font size=+1>.min,</font></tt> <i>p</i><tt><font size=+1>)</font></tt>, <tt><font size=+1>add(</font></tt><i>r</i><tt><font size=+1>.max,</font></tt>
+ <i>p</i><tt><font size=+1>))</font></tt>; <i>rectsubpt</i> returns the Rectangle <tt><font size=+1>Rpt(sub(</font></tt><i>r</i><tt><font size=+1>.min,</font></tt> <i>p</i><tt><font size=+1>), sub(</font></tt><i>r</i><tt><font size=+1>.max,</font></tt>
+ <i>p</i><tt><font size=+1>))</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Insetrect</i> returns the Rectangle <tt><font size=+1>Rect(</font></tt><i>r</i><tt><font size=+1>.min.x+</font></tt><i>n</i>, <i>r</i><tt><font size=+1>.min.y+</font></tt><i>n</i>, <i>r</i><tt><font size=+1>.max.x&#8722;</font></tt><i>n</i>,
+ <i>r</i><tt><font size=+1>.max.y&#8722;</font></tt><i>n</i><tt><font size=+1>)</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Canonrect</i> returns a rectangle with the same extent as <i>r</i>, canonicalized
+ so that <tt><font size=+1>min.x </font></tt>&le; <tt><font size=+1>max.x</font></tt>, and <tt><font size=+1>min.y </font></tt>&le; <tt><font size=+1>max.y</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Eqpt</i> compares its argument Points and returns 0 if unequal, 1
+ if equal. <i>Eqrect</i> does the same for its argument Rectangles.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ptinrect</i> returns 1 if <i>p</i> is a point within <i>r</i>, and 0 otherwise.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Rectinrect</i> returns 1 if all the pixels in <i>r</i> are also in <i>s</i>, and
+ 0 otherwise.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>RectXrect</i> returns 1 if <i>r</i> and <i>s</i> share any point, and 0 otherwise.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Rectclip</i> clips in place the Rectangle pointed to by <i>rp</i> so that
+ it is completely contained within <i>b</i>. The return value is 1 if
+ any part of *<i>rp</i> is within <i>b</i>. Otherwise, the return value is 0
+ and *<i>rp</i> is unchanged.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Combinerect</i> overwrites <tt><font size=+1>*rp</font></tt> with the smallest rectangle sufficient
+ to cover all the pixels of <tt><font size=+1>*rp</font></tt> and <tt><font size=+1>b</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The functions <i>Dx</i> and <i>Dy</i> give the width (&#916;x) and height (&#916;y) of
+ a Rectangle. They are implemented as macros.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/aes.html b/man/man3/aes.html
new file mode 100644
index 00000000..1a455c2f
--- /dev/null
+++ b/man/man3/aes.html
@@ -0,0 +1,85 @@
+<head>
+<title>aes(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>AES(3)</b><td align=right><b>AES(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ setupAESstate, aesCBCencrypt, aesCBCdecrypt - advanced encryption
+ standard (rijndael)<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void setupAESstate(AESstate *s, uchar key[], int keybytes, uchar
+ *ivec)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void aesCBCencrypt(uchar*, int, AESstate*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void aesCBCdecrypt(uchar*, int, AESstate*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ DES is being replaced by Rijndael, also known as AES, as the preferred
+ block ciper. <i>setupAESstate</i>, <i>aesCBCencrypt</i>, and <i>aesCBCdecrypt</i> implement
+ cipher block chaining encryption. <i>Keybytes</i> should be 16, 24, or
+ 32. The initialization vector <i>ivec</i> of <i>AESbsize</i> bytes should random
+ enough to be unlikely to be reused but
+ does not need to be cryptographically strongly unpredictable.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libsec<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mp.html"><i>mp</i>(3)</a>, <a href="../man3/blowfish.html"><i>blowfish</i>(3)</a>, <a href="../man3/des.html"><i>des</i>(3)</a>, <a href="../man3/dsa.html"><i>dsa</i>(3)</a>, <a href="../man3/elgamal.html"><i>elgamal</i>(3)</a>, <a href="../man3/rc4.html"><i>rc4</i>(3)</a>, <a href="../man3/rsa.html"><i>rsa</i>(3)</a>,
+ <a href="../man3/sechash.html"><i>sechash</i>(3)</a>, <a href="../man3/prime.html"><i>prime</i>(3)</a>, <a href="../man3/rand.html"><i>rand</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/allocimage.html b/man/man3/allocimage.html
new file mode 100644
index 00000000..d36fb0eb
--- /dev/null
+++ b/man/man3/allocimage.html
@@ -0,0 +1,321 @@
+<head>
+<title>allocimage(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ALLOCIMAGE(3)</b><td align=right><b>ALLOCIMAGE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ allocimage, allocimagemix, freeimage, nameimage, namedimage, setalpha,
+ loadimage, cloadimage, unloadimage, readimage, writeimage, bytesperline,
+ wordsperline &ndash; allocating, freeing, reading, writing images<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;draw.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Image *allocimage(Display *d, Rectangle r, <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ulong chan, int repl, int col)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>Image *allocimagemix(Display *d, ulong one, ulong three)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;freeimage(Image *i)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;nameimage(Image *i, char *name, int in)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Image *namedimage(Display *d, char *name)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong setalpha(ulong color, uchar alpha)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;loadimage(Image *i, Rectangle r, uchar *data, int ndata)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;cloadimage(Image *i, Rectangle r, uchar *data, int ndata)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;unloadimage(Image *i, Rectangle r, uchar *data, int ndata)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Image *readimage(Display *d, int fd, int dolock)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;writeimage(int fd, Image *i, int dolock)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;bytesperline(Rectangle r, int d)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;wordsperline(Rectangle r, int d)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>enum<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ DOpaque &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0xFFFFFFFF,<br>
+ DTransparent &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x00000000,<br>
+ DBlack &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x000000FF,<br>
+ DWhite &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0xFFFFFFFF,<br>
+ DRed &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0xFF0000FF,<br>
+ DGreen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x00FF00FF,<br>
+ DBlue &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x0000FFFF,<br>
+ DCyan &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x00FFFFFF,<br>
+ DMagenta &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0xFF00FFFF,<br>
+ DYellow &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0xFFFF00FF,<br>
+ DPaleyellow &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0xFFFFAAFF,<br>
+ DDarkyellow &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0xEEEE9EFF,<br>
+ DDarkgreen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x448844FF,<br>
+ DPalegreen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0xAAFFAAFF,<br>
+ DMedgreen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x88CC88FF,<br>
+ DDarkblue &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x000055FF,<br>
+ DPalebluegreen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0xAAFFFFFF,<br>
+ DPaleblue &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x0000BBFF,<br>
+ DBluegreen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x008888FF,<br>
+ DGreygreen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x55AAAAFF,<br>
+ DPalegreygreen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x9EEEEEFF,<br>
+ DYellowgreen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x99994CFF,<br>
+ DMedblue &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x000099FF,<br>
+ DGreyblue &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x005DBBFF,<br>
+ DPalegreyblue &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x4993DDFF,<br>
+ DPurpleblue &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x8888CCFF,<br>
+ DNotacolor &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0xFFFFFF00,<br>
+ DNofill &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= DNotacolor,<br>
+ <br>
+
+ </table>
+ };<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A new <tt><font size=+1>Image</font></tt> on <tt><font size=+1>Display d</font></tt> is allocated with <tt><font size=+1>allocimage</font></tt>; it will
+ have the rectangle, pixel channel format, and replication flag
+ given by its arguments. Convenient pixel channels like <tt><font size=+1>GREY1</font></tt>,
+ <tt><font size=+1>GREY2</font></tt>, <tt><font size=+1>CMAP8</font></tt>, <tt><font size=+1>RGB16</font></tt>, <tt><font size=+1>RGB24</font></tt>, and <tt><font size=+1>RGBA32</font></tt> are predefined. All the
+ new image&#8217;s pixels will have initial value <i>col</i>. If <i>col
+ </i>is <tt><font size=+1>DNofill</font></tt>, no initialization is done. Representative useful values
+ of color are predefined: <tt><font size=+1>DBlack</font></tt>, <tt><font size=+1>DWhite</font></tt>, <tt><font size=+1>DRed</font></tt>, and so on. Colors
+ are specified by 32-bit numbers comprising, from most to least
+ significant byte, 8-bit values for red, green, blue, and alpha.
+ The values correspond to illumination, so 0 is black
+ and 255 is white. Similarly, for alpha 0 is transparent and 255
+ is opaque. The <i>id</i> field will have been set to the identifying
+ number used by <tt><font size=+1>/dev/draw</font></tt> (see <a href="../man3/draw.html"><i>draw</i>(3)</a>), and the <i>cache</i> field will
+ be zero. If <i>repl</i> is true, the clip rectangle is set to a very
+ large region; if false, it is set to <i>r</i>. The <i>depth</i> field will be
+ set to the
+ number of bits per pixel specified by the channel descriptor (see
+ <a href="../man7/image.html"><i>image</i>(7)</a>). <i>Allocimage</i> returns 0 if the server has run out of image
+ memory.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Allocimagemix</i> is used to allocate background colors. On 8-bit
+ color-mapped displays, it returns a 2x2 replicated image with one
+ pixel colored the color <i>one</i> and the other three with <i>three</i>. (This
+ simulates a wider range of tones than can be represented by a
+ single pixel value on a color-mapped display.) On true color
+ displays, it returns a 1x1 replicated image whose pixel is the
+ result of mixing the two colors in a one to three ratio.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Freeimage</i> frees the resources used by its argument image.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Nameimage</i> publishes in the server the image <i>i</i> under the given
+ <i>name</i>. If <i>in</i> is non-zero, the image is published; otherwise <i>i</i> must
+ be already named <i>name</i> and it is withdrawn from publication. <i>Namedimage</i>
+ returns a reference to the image published under the given <i>name</i>
+ on <tt><font size=+1>Display</font></tt> <i>d</i>. These routines permit
+ unrelated applications sharing a display to share an image; for
+ example they provide the mechanism behind <tt><font size=+1>getwindow</font></tt> (see <a href="../man3/graphics.html"><i>graphics</i>(3)</a>).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The RGB values in a color are <i>premultiplied</i> by the alpha value;
+ for example, a 50% red is <tt><font size=+1>0x7F00007F</font></tt> not <tt><font size=+1>0xFF00007F</font></tt>. The function
+ <i>setalpha</i> performs the alpha computation on a given <tt><font size=+1>color</font></tt>, ignoring
+ its initial alpha value, multiplying the components by the supplied
+ <tt><font size=+1>alpha</font></tt>. For example, to make a 50% red
+ color value, one could execute <tt><font size=+1>setalpha(DRed, 0x7F)</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The remaining functions deal with moving groups of pixel values
+ between image and user space or external files. There is a fixed
+ format for the exchange and storage of image data (see <a href="../man7/image.html"><i>image</i>(7)</a>).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Unloadimage</i> reads a rectangle of pixels from image <i>i</i> into <i>data</i>,
+ whose length is specified by <i>ndata</i>. It is an error if <i>ndata</i> is
+ too small to accommodate the pixels.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Loadimage</i> replaces the specified rectangle in image <i>i</i> with the
+ <i>ndata</i> bytes of <i>data</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The pixels are presented one horizontal line at a time, starting
+ with the top-left pixel of <i>r</i>. In the data processed by these routines,
+ each scan line starts with a new byte in the array, leaving the
+ last byte of the previous line partially empty, if necessary.
+ Pixels are packed as tightly as possible within <i>data</i>, regardless
+ of
+ the rectangle being extracted. Bytes are filled from most to least
+ significant bit order, as the <i>x</i> coordinate increases, aligned
+ so <i>x</i>=0 would appear as the leftmost pixel of its byte. Thus, for
+ <tt><font size=+1>depth</font></tt> 1, the pixel at <i>x</i> offset 165 within the rectangle will be
+ in a <i>data</i> byte at bit-position <tt><font size=+1>0x04</font></tt> regardless of the overall
+ rectangle: 165 mod 8 equals 5, and <tt><font size=+1>0x80 &gt;&gt; 5</font></tt> equals <tt><font size=+1>0x04</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Cloadimage</font></tt> does the same as <i>loadimage</i>, but for <i>ndata</i> bytes of
+ compressed image <i>data</i> (see <a href="../man7/image.html"><i>image</i>(7)</a>). On each call to <i>cloadimage,</i>
+ the <i>data</i> must be at the beginning of a compressed data block,
+ in particular, it should start with the <tt><font size=+1>y</font></tt> coordinate and data
+ length for the block.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Loadimage</i>, <i>cloadimage</i>, and <i>unloadimage</i> return the number of bytes
+ copied.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Readimage</i> creates an image from data contained in an external
+ file (see <a href="../man7/image.html"><i>image</i>(7)</a> for the file format); <i>fd</i> is a file descriptor
+ obtained by opening such a file for reading. The returned image
+ is allocated using <i>allocimage</i>. The <i>dolock</i> flag specifies whether
+ the <tt><font size=+1>Display</font></tt> should be synchronized for multithreaded access;
+ single-threaded programs can leave it zero.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Writeimage</i> writes image <i>i</i> onto file descriptor <i>fd</i>, which should
+ be open for writing. The format is as described for <i>readimage</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Readimage</i> and <i>writeimage</i> do not close <i>fd</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bytesperline</i> and <i>wordsperline</i> return the number of bytes or words
+ occupied in memory by one scan line of rectangle <i>r</i> in an image
+ with <i>d</i> bits per pixel.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To allocate a single-pixel replicated image that may be used to
+ paint a region red,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>red = allocimage(display, Rect(0, 0, 1, 1), RGB24, 1, DRed);<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man7/image.html"><i>image</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions return pointer 0 or integer &ndash;1 on failure, usually
+ due to insufficient memory.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ May set <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>Depth</font></tt> must be a divisor or multiple of 8.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/arg.html b/man/man3/arg.html
new file mode 100644
index 00000000..8ca66c80
--- /dev/null
+++ b/man/man3/arg.html
@@ -0,0 +1,152 @@
+<head>
+<title>arg(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ARG(3)</b><td align=right><b>ARG(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ARGBEGIN, ARGEND, ARGC, ARGF, EARGF, arginit, argopt &ndash; process
+ option letters from argv<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ARGBEGIN { <br>
+ char *ARGF(); <br>
+ char *EARGF(code); <br>
+ Rune ARGC(); <br>
+ } ARGEND <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>extern char *argv0; <br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These macros assume the names <i>argc</i> and <i>argv</i> are in scope; see
+ <a href="../man3/exec.html"><i>exec</i>(3)</a>. <i>ARGBEGIN</i> and <i>ARGEND</i> surround code for processing program
+ options. The code should be the cases of a C switch on option
+ characters; it is executed once for each option character. Options
+ end after an argument <tt><font size=+1>&#8722;&#8722;</font></tt>, before an argument <tt><font size=+1>&#8722;</font></tt>, or
+ before an argument that doesn&#8217;t begin with <tt><font size=+1>&#8722;</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The function macro <i>ARGC</i> returns the current option character,
+ as an integer.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The function macro <i>ARGF</i> returns the current option argument: a
+ pointer to the rest of the option string if not empty, or the
+ next argument in <i>argv</i> if any, or 0. <i>ARGF</i> must be called just once
+ for each option that takes an argument. The macro <i>EARGF</i> is like
+ <i>ARGF</i> but instead of returning zero runs <i>code</i> and, if that
+ returns, calls <a href="../man3/abort.html"><i>abort</i>(3)</a>. A typical value for <i>code</i> is <tt><font size=+1>usage()</font></tt>,
+ as in <tt><font size=+1>EARGF(usage())</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ After <i>ARGBEGIN</i>, <i>argv0</i> is a copy of <tt><font size=+1>argv[0]</font></tt> (conventionally the
+ name of the program).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ After <i>ARGEND</i>, <i>argv</i> points at a zero-terminated list of the remaining
+ <i>argc</i> arguments.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This C program can take option <tt><font size=+1>b</font></tt> and option <tt><font size=+1>f</font></tt>, which requires
+ an argument.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ void<br>
+ main(int argc, char *argv[])<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char *f;<br>
+ print(&quot;%s&quot;, argv[0]);<br>
+ ARGBEGIN {<br>
+ case 'b':<br>
+ print(&quot; &#8722;b&quot;);<br>
+ break;<br>
+ case 'f':<br>
+ print(&quot; &#8722;f(%s)&quot;, (f=ARGF())? f: &quot;no arg&quot;);<br>
+ break;<br>
+ default:<br>
+ print(&quot; badflag('%c')&quot;, ARGC());<br>
+ } ARGEND<br>
+ print(&quot; %d args:&quot;, argc);<br>
+ while(*argv)<br>
+ print(&quot; '%s'&quot;, *argv++);<br>
+ print(&quot;\n&quot;);<br>
+ exits(nil);<br>
+
+ </table>
+ }<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Here is the output from running the command <tt><font size=+1>prog &#8722;bffile1 &#8722;r &#8722;f
+ file2 arg1 arg2<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ prog &#8722;b &#8722;f(file1) badflag('r') &#8722;f(file2) 2 args: 'arg1' 'arg2'
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/include/libc.h<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/arith3.html b/man/man3/arith3.html
new file mode 100644
index 00000000..71cf815c
--- /dev/null
+++ b/man/man3/arith3.html
@@ -0,0 +1,216 @@
+<head>
+<title>arith3(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ARITH3(3)</b><td align=right><b>ARITH3(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ add3, sub3, neg3, div3, mul3, eqpt3, closept3, dot3, cross3, len3,
+ dist3, unit3, midpt3, lerp3, reflect3, nearseg3, pldist3, vdiv3,
+ vrem3, pn2f3, ppp2f3, fff2p3, pdiv4, add4, sub4 &ndash; operations on
+ 3-d points and planes<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;draw.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;geometry.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 add3(Point3 a, Point3 b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 sub3(Point3 a, Point3 b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 neg3(Point3 a)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 div3(Point3 a, double b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 mul3(Point3 a, double b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int eqpt3(Point3 p, Point3 q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int closept3(Point3 p, Point3 q, double eps)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double dot3(Point3 p, Point3 q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 cross3(Point3 p, Point3 q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double len3(Point3 p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double dist3(Point3 p, Point3 q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 unit3(Point3 p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 midpt3(Point3 p, Point3 q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 lerp3(Point3 p, Point3 q, double alpha)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 reflect3(Point3 p, Point3 p0, Point3 p1)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 nearseg3(Point3 p0, Point3 p1, Point3 testp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double pldist3(Point3 p, Point3 p0, Point3 p1)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double vdiv3(Point3 a, Point3 b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 vrem3(Point3 a, Point3 b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 pn2f3(Point3 p, Point3 n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 ppp2f3(Point3 p0, Point3 p1, Point3 p2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 fff2p3(Point3 f0, Point3 f1, Point3 f2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 pdiv4(Point3 a)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 add4(Point3 a, Point3 b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 sub4(Point3 a, Point3 b)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines do arithmetic on points and planes in affine or
+ projective 3-space. Type <tt><font size=+1>Point3</font></tt> is<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct Point3 Point3;<br>
+ struct Point3{<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ double x, y, z, w;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Routines whose names end in <tt><font size=+1>3</font></tt> operate on vectors or ordinary points
+ in affine 3-space, represented by their Euclidean <tt><font size=+1>(x,y,z)</font></tt> coordinates.
+ (They assume <tt><font size=+1>w=1</font></tt> in their arguments, and set <tt><font size=+1>w=1</font></tt> in their results.)<br>
+ Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Description<br>
+ <tt><font size=+1>add3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add the coordinates of two points.<br>
+ <tt><font size=+1>sub3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subtract coordinates of two points.<br>
+ <tt><font size=+1>neg3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Negate the coordinates of a point.<br>
+ <tt><font size=+1>mul3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Multiply coordinates by a scalar.<br>
+ <tt><font size=+1>div3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Divide coordinates by a scalar.<br>
+ <tt><font size=+1>eqpt3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test two points for exact equality.<br>
+ <tt><font size=+1>closept3</font></tt>&nbsp;&nbsp;&nbsp;Is the distance between two points smaller than <i>eps</i>?<br>
+ <tt><font size=+1>dot3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dot product.<br>
+ <tt><font size=+1>cross3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cross product.<br>
+ <tt><font size=+1>len3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Distance to the origin.<br>
+ <tt><font size=+1>dist3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Distance between two points.<br>
+ <tt><font size=+1>unit3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A unit vector parallel to <i>p</i>.<br>
+ <tt><font size=+1>midpt3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The midpoint of line segment <i>pq</i>.<br>
+ <tt><font size=+1>lerp3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Linear interpolation between <i>p</i> and <i>q</i>.<br>
+ <tt><font size=+1>reflect3</font></tt>&nbsp;&nbsp;&nbsp;The reflection of point <i>p</i> in the segment joining <i>p0</i> and
+ <i>p1</i>.<br>
+ <tt><font size=+1>nearseg3</font></tt>&nbsp;&nbsp;&nbsp;The closest point to <i>testp</i> on segment <i>p0 p1</i>.<br>
+ <tt><font size=+1>pldist3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;The distance from <i>p</i> to segment <i>p0 p1</i>.<br>
+ <tt><font size=+1>vdiv3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vector divide -- the length of the component of <i>a</i> parallel
+ to <i>b</i>, in units of the length of <i>b</i>.<br>
+ <tt><font size=+1>vrem3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vector remainder -- the component of <i>a</i> perpendicular to <i>b</i>.
+ Ignoring roundoff, we have <tt><font size=+1>eqpt3(add3(mul3(b, vdiv3(a, b)), vrem3(a,
+ b)), a)</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The following routines convert amongst various representations
+ of points and planes. Planes are represented identically to points,
+ by duality; a point <tt><font size=+1>p</font></tt> is on a plane <tt><font size=+1>q</font></tt> whenever <tt><font size=+1>p.x*q.x+p.y*q.y+p.z*q.z+p.w*q.w=0</font></tt>.
+ Although when dealing with affine points we assume <tt><font size=+1>p.w=1</font></tt>, we can&#8217;t
+ make the same
+ assumption for planes. The names of these routines are extra-cryptic.
+ They contain an <tt><font size=+1>f</font></tt> (for &#8216;face&#8217;) to indicate a plane, <tt><font size=+1>p</font></tt> for a point
+ and <tt><font size=+1>n</font></tt> for a normal vector. The number <tt><font size=+1>2</font></tt> abbreviates the word &#8216;to.&#8217;
+ The number <tt><font size=+1>3</font></tt> reminds us, as before, that we&#8217;re dealing with affine
+ points. Thus <tt><font size=+1>pn2f3</font></tt> takes a point and a normal
+ vector and returns the corresponding plane.<br>
+ Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Description<br>
+ <tt><font size=+1>pn2f3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the plane passing through <i>p</i> with normal <i>n</i>.<br>
+ <tt><font size=+1>ppp2f3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the plane passing through three points.<br>
+ <tt><font size=+1>fff2p3</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the intersection point of three planes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The names of the following routines end in <tt><font size=+1>4</font></tt> because they operate
+ on points in projective 4-space, represented by their homogeneous
+ coordinates.<br>
+ pdiv4Perspective division. Divide <tt><font size=+1>p.w</font></tt> into <i>p</i>&#8217;s coordinates, converting
+ to affine coordinates. If <tt><font size=+1>p.w</font></tt> is zero, the result is the same
+ as the argument.<br>
+ add4&nbsp;&nbsp;&nbsp;Add the coordinates of two points.<br>
+ sub4&nbsp;&nbsp;&nbsp;Subtract the coordinates of two points.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libgeometry<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/matrix.html"><i>matrix</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/atof.html b/man/man3/atof.html
new file mode 100644
index 00000000..ef464d0a
--- /dev/null
+++ b/man/man3/atof.html
@@ -0,0 +1,170 @@
+<head>
+<title>atof(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ATOF(3)</b><td align=right><b>ATOF(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ atof, atoi, atol, atoll, charstod, strtod, strtol, strtoll, strtoul,
+ strtoull &ndash; convert text to numbers<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double atof(char *nptr)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;atoi(char *nptr)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;atol(char *nptr)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>vlong &nbsp;&nbsp;&nbsp;atoll(char *nptr)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double charstod(int (*f)(void *), void *a)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double strtod(char *nptr, char **rptr)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;strtol(char *nptr, char **rptr, int base)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>vlong &nbsp;&nbsp;&nbsp;strtoll(char *nptr, char **rptr, int base)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;strtoul(char *nptr, char **rptr, int base)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>vlong &nbsp;&nbsp;&nbsp;strtoull(char *nptr, char **rptr, int base)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Atof</i>, <i>atoi</i>, <i>atol</i>, and <i>atoll</i> convert a string pointed to by <i>nptr</i>
+ to floating, integer, long integer, and long long integer (<tt><font size=+1>vlong</font></tt>)
+ representation respectively. The first unrecognized character
+ ends the string. Leading C escapes are understood, as in <i>strtol</i>
+ with <i>base</i> zero (described below).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Atof</i> recognizes an optional string of tabs and spaces, then an
+ optional sign, then a string of digits optionally containing a
+ decimal point, then an optional <tt><font size=+1>e</font></tt> or <tt><font size=+1>E</font></tt> followed by an optionally
+ signed integer.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Atoi</i> and <i>atol</i> recognize an optional string of tabs and spaces,
+ then an optional sign, then a string of decimal digits.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strtod</i>, <i>strtol</i>, <i>strtoll</i>, <i>strtoul</i>, and <i>strtoull</i> behave similarly
+ to <i>atof</i> and <i>atol</i> and, if <i>rptr</i> is not zero, set <i>*rptr</i> to point
+ to the input character immediately after the string converted.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strtol</i>, <i>strtoll</i>, <i>strtoul</i>, and <i>strtoull</i> interpret the digit string
+ in the specified <i>base</i>, from 2 to 36, each digit being less than
+ the base. Digits with value over 9 are represented by letters,
+ a-z or A-Z. If <i>base</i> is 0, the input is interpreted as an integral
+ constant in the style of C (with no suffixed type indicators):
+ numbers are
+ octal if they begin with <tt><font size=+1>0</font></tt>, hexadecimal if they begin with <tt><font size=+1>0x</font></tt>
+ or <tt><font size=+1>0X</font></tt>, otherwise decimal.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Charstod</i> interprets floating point numbers in the manner of <i>atof</i>,
+ but gets successive characters by calling <tt><font size=+1>(*</font></tt><i>f</i><tt><font size=+1>)(a)</font></tt>. The last call
+ to <i>f</i> terminates the scan, so it must have returned a character
+ that is not a legal continuation of a number. Therefore, it may
+ be necessary to back up the input stream one character after
+ calling <i>charstod</i>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/fscanf.html"><i>fscanf</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Zero is returned if the beginning of the input string is not interpretable
+ as a number; even in this case, <i>rptr</i> will be updated.<br>
+ These routines set <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Atoi</i> and <i>atol</i> accept octal and hexadecimal numbers in the style
+ of C, contrary to the ANSI specification.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Atof</i>, <i>strtod</i>, <i>strtol</i>, <i>strtoul</i>, <i>strtoll</i>, and <i>strtoull</i> are not provided:
+ they are expected to be provided by the underlying system.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Because they are implemented in the fmt library, <i>charstod</i> and
+ <i>strtod</i> are preprocessor macros defined as <i>fmtcharstod</i> and <i>fmtstrtod</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To avoid name conflicts with the underlying system, <i>atoi</i>, <i>atol</i>,
+ and <i>atoll</i> are preprocessor macros defined as <i>p9atoi</i>, <i>p9atol</i>, and
+ <i>p9atoll</i>; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/bin.html b/man/man3/bin.html
new file mode 100644
index 00000000..f016622f
--- /dev/null
+++ b/man/man3/bin.html
@@ -0,0 +1,131 @@
+<head>
+<title>bin(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>BIN(3)</b><td align=right><b>BIN(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ binalloc, bingrow, binfree &ndash; grouped memory allocation<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;bin.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct BinBin;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;*binalloc(Bin **bp, ulong size, int clr);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;*bingrow(Bin **bp, void *op, ulong osize,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ulong size, int clr);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;binfree(Bin **bp);<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines provide simple grouped memory allocation and deallocation.
+ Items allocated with <i>binalloc</i> are added to the <i>Bin</i> pointed to
+ by <i>bp</i>. All items in a bin may be freed with one call to <i>binfree</i>;
+ there is no way to free a single item.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Binalloc</i> returns a pointer to a new block of at least <i>size</i> bytes.
+ The block is suitably aligned for storage of any type of object.
+ No two active pointers from <i>binalloc</i> will have the same value.
+ The call <tt><font size=+1>binalloc(0)</font></tt> returns a valid pointer rather than null.
+ If <i>clr</i> is non-zero, the allocated memory is set to 0; otherwise,
+ the contents are undefined.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bingrow</i> is used to extend the size of a block of memory returned
+ by <i>binalloc</i>. <i>Bp</i> must point to the same bin group used to allocate
+ the original block, and <i>osize</i> must be the last size used to allocate
+ or grow the block. A pointer to a block of at least <i>size</i> bytes
+ is returned, with the same contents in the first <i>osize
+ </i>locations. If <i>clr</i> is non-zero, the remaining bytes are set to
+ 0, and are undefined otherwise. If <i>op</i> is <tt><font size=+1>nil</font></tt>, it and <i>osize</i> are
+ ignored, and the result is the same as calling <i>binalloc</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Binalloc</i> and <i>bingrow</i> allocate large chunks of memory using <a href="../man3/malloc.html"><i>malloc</i>(3)</a>
+ and return pieces of these chunks. The chunks are <i>free</i>&#8217;d upon
+ a call to <i>binfree</i>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libbin<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/malloc.html"><i>malloc</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>binalloc</i> and <i>bingrow</i> return 0 if there is no available memory.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/bio.html b/man/man3/bio.html
new file mode 100644
index 00000000..78259922
--- /dev/null
+++ b/man/man3/bio.html
@@ -0,0 +1,293 @@
+<head>
+<title>bio(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>BIO(3)</b><td align=right><b>BIO(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Bopen, Bfdopen, Binit, Binits, Brdline, Brdstr, Bgetc, Bgetrune,
+ Bgetd, Bungetc, Bungetrune, Bread, Bseek, Boffset, Bfildes, Blinelen,
+ Bputc, Bputrune, Bprint, Bvprint, Bwrite, Bflush, Bterm, Bbuffered
+ &ndash; buffered input/output<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;bio.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Biobuf* Bopen(char *file, int mode)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Biobuf* Bfdopen(int fd, int mode)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binit(Biobuf *bp, int fd, int mode)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binits(Biobufhdr *bp, int fd, int mode, uchar *buf, int size)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bterm(Biobufhdr *bp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bprint(Biobufhdr *bp, char *format, ...)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bvprint(Biobufhdr *bp, char *format, va_list arglist);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void* &nbsp;&nbsp;&nbsp;&nbsp;Brdline(Biobufhdr *bp, int delim)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;Brdstr(Biobufhdr *bp, int delim, int nulldelim)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Blinelen(Biobufhdr *bp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>vlong &nbsp;&nbsp;&nbsp;&nbsp;Boffset(Biobufhdr *bp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bfildes(Biobufhdr *bp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bgetc(Biobufhdr *bp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bgetrune(Biobufhdr *bp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bgetd(Biobufhdr *bp, double *d)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bungetc(Biobufhdr *bp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bungetrune(Biobufhdr *bp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>vlong &nbsp;&nbsp;&nbsp;&nbsp;Bseek(Biobufhdr *bp, vlong n, int type)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bputc(Biobufhdr *bp, int c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bputrune(Biobufhdr *bp, long c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bread(Biobufhdr *bp, void *addr, long nbytes)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bwrite(Biobufhdr *bp, void *addr, long nbytes)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bflush(Biobufhdr *bp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bbuffered(Biobufhdr *bp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines implement fast buffered I/O. I/O on different file
+ descriptors is independent.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bopen</i> opens <i>file</i> for mode <tt><font size=+1>OREAD</font></tt> or creates for mode <tt><font size=+1>OWRITE</font></tt>. It
+ calls <a href="../man3/malloc.html"><i>malloc</i>(3)</a> to allocate a buffer.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bfdopen</i> allocates a buffer for the already-open file descriptor
+ <i>fd</i> for mode <tt><font size=+1>OREAD</font></tt> or <tt><font size=+1>OWRITE</font></tt>. It calls <a href="../man3/malloc.html"><i>malloc</i>(3)</a> to allocate a
+ buffer.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Binit</i> initializes a standard size buffer, type <i>Biobuf</i>, with the
+ open file descriptor passed in by the user. <i>Binits</i> initializes
+ a non-standard size buffer, type <i>Biobufhdr</i>, with the open file
+ descriptor, buffer area, and buffer size passed in by the user.
+ <i>Biobuf</i> and <i>Biobufhdr</i> are related by the declaration:
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct Biobuf Biobuf;<br>
+ struct Biobuf<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Biobufhdr;<br>
+ uchar b[Bungetsize+Bsize];<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Arguments of types pointer to Biobuf and pointer to Biobufhdr
+ can be used interchangeably in the following routines.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bopen</i>, <i>Binit</i>, or <i>Binits</i> should be called before any of the other
+ routines on that buffer. <i>Bfildes</i> returns the integer file descriptor
+ of the associated open file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bterm</i> flushes the buffer for <i>bp</i>. If the buffer was allocated by
+ <i>Bopen</i>, the buffer is <i>freed</i> and the file is closed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Brdline</i> reads a string from the file associated with <i>bp</i> up to
+ and including the first <i>delim</i> character. The delimiter character
+ at the end of the line is not altered. <i>Brdline</i> returns a pointer
+ to the start of the line or <tt><font size=+1>0</font></tt> on end-of-file or read error. <i>Blinelen</i>
+ returns the length (including the delimiter) of the most recent
+ string
+ returned by <i>Brdline</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Brdstr</i> returns a <a href="../man3/malloc.html"><i>malloc</i>(3)</a>-allocated buffer containing the next
+ line of input delimited by <i>delim</i>, terminated by a NUL (0) byte.
+ Unlike <i>Brdline</i>, which returns when its buffer is full even if
+ no delimiter has been found, <i>Brdstr</i> will return an arbitrarily
+ long line in a single call. If <i>nulldelim</i> is set, the terminal
+ delimiter will be
+ overwritten with a NUL. After a successful call to <i>Brdstr</i>, the
+ return value of <i>Blinelen</i> will be the length of the returned buffer,
+ excluding the NUL.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bgetc</i> returns the next character from <i>bp</i>, or a negative value
+ at end of file. <i>Bungetc</i> may be called immediately after <i>Bgetc</i>
+ to allow the same character to be reread.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bgetrune</i> calls <i>Bgetc</i> to read the bytes of the next UTF sequence
+ in the input stream and returns the value of the rune represented
+ by the sequence. It returns a negative value at end of file. <i>Bungetrune</i>
+ may be called immediately after <i>Bgetrune</i> to allow the same UTF
+ sequence to be reread as either bytes or a rune.
+ <i>Bungetc</i> and <i>Bungetrune</i> may back up a maximum of five bytes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bgetd</i> uses <i>charstod</i> (see <a href="../man3/atof.html"><i>atof</i>(3)</a>) and <i>Bgetc</i> to read the formatted
+ floating-point number in the input stream, skipping initial blanks
+ and tabs. The value is stored in <tt><font size=+1>*d.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <i>Bread</i> reads <i>nbytes</i> of data from <i>bp</i> into memory starting at <i>addr</i>.
+ The number of bytes read is returned on success and a negative
+ value is returned if a read error occurred.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bseek</i> applies <a href="../man3/seek.html"><i>seek</i>(3)</a> to <i>bp</i>. It returns the new file offset. <i>Boffset</i>
+ returns the file offset of the next character to be processed.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bputc</i> outputs the low order 8 bits of <i>c</i> on <i>bp</i>. If this causes
+ a <i>write</i> to occur and there is an error, a negative value is returned.
+ Otherwise, a zero is returned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bputrune</i> calls <i>Bputc</i> to output the low order 16 bits of <i>c</i> as a
+ rune in UTF format on the output stream.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bprint</i> is a buffered interface to <a href="../man3/print.html"><i>print</i>(3)</a>. If this causes a <i>write</i>
+ to occur and there is an error, a negative value (<tt><font size=+1>Beof</font></tt>) is returned.
+ Otherwise, the number of bytes output is returned. <i>Bvprint</i> does
+ the same except it takes as argument a <tt><font size=+1>va_list</font></tt> parameter, so it
+ can be called within a variadic function.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bwrite</i> outputs <i>nbytes</i> of data starting at <i>addr</i> to <i>bp</i>. If this
+ causes a <i>write</i> to occur and there is an error, a negative value
+ is returned. Otherwise, the number of bytes written is returned.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bflush</i> causes any buffered output associated with <i>bp</i> to be written.
+ The return is as for <i>Bputc</i>. <i>Bflush</i> is called on exit for every
+ buffer still open for writing.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bbuffered</i> returns the number of bytes in the buffer. When reading,
+ this is the number of bytes still available from the last read
+ on the file; when writing, it is the number of bytes ready to
+ be written.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libbio<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/open.html"><i>open</i>(3)</a>, <a href="../man3/print.html"><i>print</i>(3)</a>, <a href="../man3/exits.html"><i>exits</i>(3)</a>, <a href="../man7/utf.html"><i>utf</i>(7)</a>,<br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Bio</i> routines that return integers yield <tt><font size=+1>Beof</font></tt> if <i>bp</i> is not the
+ descriptor of an open file. <i>Bopen</i> returns zero if the file cannot
+ be opened in the given mode. All routines set <i>errstr</i> on error.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Brdline</i> returns an error on strings longer than the buffer associated
+ with the file and also if the end-of-file is encountered before
+ a delimiter. <i>Blinelen</i> will tell how many characters are available
+ in these cases. In the case of a true end-of-file, <i>Blinelen</i> will
+ return zero. At the cost of allocating a buffer, <i>Brdstr</i> sidesteps
+ these issues.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The data returned by <i>Brdline</i> may be overwritten by calls to any
+ other <i>bio</i> routine on the same <i>bp.</i><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/blowfish.html b/man/man3/blowfish.html
new file mode 100644
index 00000000..d8da66de
--- /dev/null
+++ b/man/man3/blowfish.html
@@ -0,0 +1,95 @@
+<head>
+<title>blowfish(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>BLOWFISH(3)</b><td align=right><b>BLOWFISH(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ setupBFstate, bfCBCencrypt, bfCBCdecrypt, bfECBencrypt, bfECBdecrypt
+ - blowfish encryption<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void setupBFstate(BFstate *s, uchar key[], int keybytes, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uchar
+ *ivec)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void bfCBCencrypt(uchar *data, int len, BFstate *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void bfCBCdecrypt(uchar *data, int len, BFstate *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void bfECBencrypt(uchar *data, int len, BFstate *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void bfECBdecrypt(uchar *data, int len, BFstate *s)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Blowfish is Bruce Schneier&#8217;s symmetric block cipher. It supports
+ variable length keys from 32 to 448 bits and has a block size
+ of 64 bits. Both CBC and ECB modes are supported.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ setupBFstate takes a BFstate structure, a key of at most 56 bytes,
+ the length of the key in bytes, and an initialization vector of
+ 8 bytes (set to all zeroes if argument is nil). The encryption
+ and decryption functions take a BFstate structure, a data buffer,
+ and a length, which must be a multiple of eight bytes as padding
+ is
+ currently unsupported.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libsec<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mp.html"><i>mp</i>(3)</a>, <a href="../man3/aes.html"><i>aes</i>(3)</a>, <a href="../man3/des.html"><i>des</i>(3)</a>, <a href="../man3/dsa.html"><i>dsa</i>(3)</a>, <a href="../man3/elgamal.html"><i>elgamal</i>(3)</a>, <a href="../man3/rc4.html"><i>rc4</i>(3)</a>, <a href="../man3/rsa.html"><i>rsa</i>(3)</a>, <a href="../man3/sechash.html"><i>sechash</i>(3)</a>,
+ <a href="../man3/prime.html"><i>prime</i>(3)</a>, <a href="../man3/rand.html"><i>rand</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/cachechars.html b/man/man3/cachechars.html
new file mode 100644
index 00000000..382b5e7e
--- /dev/null
+++ b/man/man3/cachechars.html
@@ -0,0 +1,292 @@
+<head>
+<title>cachechars(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CACHECHARS(3)</b><td align=right><b>CACHECHARS(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ cachechars, agefont, loadchar, Subfont, Fontchar, Font &ndash; font utilities<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;draw.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;cachechars(Font *f, char **s, Rune **r, ushort *c, int max,
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>int *widp, char **sfname)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;loadchar(Font *f, Rune r, Cacheinfo *c, int h,
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>int noclr, char **sfname)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>void agefont(Font *f)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A <i>Font</i> may contain too many characters to hold in memory simultaneously.
+ The graphics library and draw device (see <a href="../man3/draw.html"><i>draw</i>(3)</a>) cooperate to
+ solve this problem by maintaining a cache of recently used character
+ images. The details of this cooperation need not be known by most
+ programs: <i>initdraw</i> and its associated
+ <i>font</i> variable, <i>openfont</i>, <i>stringwidth</i>, <i>string</i>, and <i>freefont</i> are
+ sufficient for most purposes. The routines described below are
+ used internally by the graphics library to maintain the font cache.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>Subfont</font></tt> is a set of images for a contiguous range of characters,
+ stored as a single image with the characters placed side-by-side
+ on a common baseline. It is described by the following data structures.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef<br>
+ struct Fontchar {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* left edge of bits */<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;top; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* first non&#8722;zero scan&#8722;line */<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bottom; &nbsp;&nbsp;&nbsp;&nbsp;/* last non&#8722;zero scan&#8722;line */<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* offset of baseline */<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* width of baseline */<br>
+
+ </table>
+ } Fontchar;<br>
+ typedef<br>
+ struct Subfont {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*name;<br>
+ short &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* number of chars in subfont */<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height; &nbsp;&nbsp;&nbsp;&nbsp;/* height of image */<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ascent; &nbsp;&nbsp;&nbsp;&nbsp;/* top of image to baseline */<br>
+ Fontchar *info; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* n+1 Fontchars */<br>
+ Image &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*bits; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* of font */<br>
+
+ </table>
+ } Subfont;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The image fills the rectangle <tt><font size=+1>(0, 0,</font></tt> <i>w</i><tt><font size=+1>, height)</font></tt>, where <i>w</i> is the
+ sum of the horizontal extents (of non-zero pixels) for all characters.
+ The pixels to be displayed for character <i>c</i> are in the rectangle
+ <tt><font size=+1>(</font></tt><i>i</i><tt><font size=+1>&#8722;&gt;x,</font></tt> <i>i</i><tt><font size=+1>&#8722;&gt;top, (</font></tt><i>i</i><tt><font size=+1>+1)&#8722;&gt;x,</font></tt> <i>i</i><tt><font size=+1>&#8722;&gt;bottom)</font></tt> where <i>i</i> is <tt><font size=+1>&amp;subfont&#8722;&gt;info[</font></tt><i>c</i><tt><font size=+1>]</font></tt>. When
+ a character is displayed
+ at <tt><font size=+1>Point p</font></tt> in an image, the character rectangle is placed at <tt><font size=+1>(p.x+</font></tt><i>i</i><tt><font size=+1>&#8722;&gt;left,
+ p.y)</font></tt> and the next character of the string is displayed at <tt><font size=+1>(p.x+</font></tt><i>i</i><tt><font size=+1>&#8722;&gt;width,
+ p.y)</font></tt>. The baseline of the characters is <tt><font size=+1>ascent</font></tt> rows down from
+ the top of the subfont image. The <tt><font size=+1>info</font></tt> array has <tt><font size=+1>n+1</font></tt> elements,
+ one each for characters 0
+ to <tt><font size=+1>n&#8722;1</font></tt> plus an additional entry so the size of the last character
+ can be calculated. Thus the width, <i>w</i>, of the <tt><font size=+1>Image</font></tt> associated
+ with a <tt><font size=+1>Subfont s</font></tt> is <tt><font size=+1>s&#8722;&gt;info[s&#8722;&gt;n].x</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>Font</font></tt> consists of an overall height and ascent and a collection
+ of subfonts together with the ranges of runes (see <a href="../man7/utf.html"><i>utf</i>(7)</a>) they
+ represent. Fonts are described by the following structures.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef<br>
+ struct Cachefont {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Rune &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* value of 0th char in subfont */<br>
+ Rune &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* value+1 of last char in subfont */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;offset; &nbsp;&nbsp;&nbsp;&nbsp;/* posn in subfont of char at min */<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*name; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* stored in font */<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*subfontname;/* to access subfont */<br>
+
+ </table>
+ } Cachefont;<br>
+ typedef<br>
+ struct Cacheinfo {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* left edge of bits */<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* width of baseline */<br>
+ schar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;left; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* offset of baseline */<br>
+ Rune &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* of char at this slot in cache */<br>
+ ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;age;<br>
+
+ </table>
+ } Cacheinfo;<br>
+ typedef<br>
+ struct Cachesubf {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;age; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* for replacement */<br>
+ Cachefont *cf; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* font info that owns us */<br>
+ Subfont &nbsp;&nbsp;&nbsp;&nbsp;*f; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* attached subfont */<br>
+
+ </table>
+ } Cachesubf;<br>
+ typedef<br>
+ struct Font {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*name;<br>
+ Display &nbsp;&nbsp;&nbsp;&nbsp;*display;<br>
+ short &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height; &nbsp;&nbsp;&nbsp;&nbsp;/* max ht of image;interline space*/<br>
+ short &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ascent; &nbsp;&nbsp;&nbsp;&nbsp;/* top of image to baseline */<br>
+ short &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* widest so far; used in caching */<br>
+ short &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nsub; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* number of subfonts */<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;age; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* increasing counter; for LRU */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ncache; &nbsp;&nbsp;&nbsp;&nbsp;/* size of cache */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nsubf; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* size of subfont list */<br>
+ Cacheinfo *cache;<br>
+ Cachesubf *subf;<br>
+ Cachefont **sub; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* as read from file */<br>
+ Image &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*cacheimage;<br>
+
+ </table>
+ } Font;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The <tt><font size=+1>height</font></tt> and <tt><font size=+1>ascent</font></tt> fields of Font are described in <a href="../man3/graphics.html"><i>graphics</i>(3)</a>.
+ <tt><font size=+1>Sub</font></tt> contains <tt><font size=+1>nsub</font></tt> pointers to <tt><font size=+1>Cachefonts</font></tt>. A <tt><font size=+1>Cachefont</font></tt> connects
+ runes <tt><font size=+1>min</font></tt> through <tt><font size=+1>max</font></tt>, inclusive, to the subfont with file name
+ <tt><font size=+1>name</font></tt>; it corresponds to a line of the file describing the font.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The characters are taken from the subfont starting at character
+ number <tt><font size=+1>offset</font></tt> (usually zero) in the subfont, permitting selection
+ of parts of subfonts. Thus the image for rune <i>r</i> is found in position
+ <i>r</i><tt><font size=+1>&#8722;min+offset</font></tt> of the subfont.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For each font, the library, with support from the graphics server,
+ maintains a cache of subfonts and a cache of recently used character
+ images. The <tt><font size=+1>subf</font></tt> and <tt><font size=+1>cache</font></tt> fields are used by the library to maintain
+ these caches. The <tt><font size=+1>width</font></tt> of a font is the maximum of the horizontal
+ extents of the characters in the cache.
+ <i>String</i> draws a string by loading the cache and emitting a sequence
+ of cache indices to draw. <i>Cachechars</i> guarantees the images for
+ the characters pointed to by <i>*s</i> or <i>*r</i> (one of these must be nil
+ in each call) are in the cache of <i>f</i>. It calls <i>loadchar</i> to put
+ missing characters into the cache. <i>Cachechars</i> translates the
+ character string into a set of cache indices which it loads into
+ the array <i>c</i>, up to a maximum of <i>n</i> indices or the length of the
+ string. <i>Cachechars</i> returns in <i>c</i> the number of cache indices emitted,
+ updates <i>*s</i> to point to the next character to be processed, and
+ sets <i>*widp</i> to the total width of the characters processed.
+ <i>Cachechars</i> may return before the end of the string if it cannot
+ proceed without destroying active data in the caches. If it needs
+ to load a new subfont, it will fill <tt><font size=+1>*sfname</font></tt> with the name of the
+ subfont it needs and return &ndash;1. It can return zero if it is unable
+ to make progress because it cannot resize the caches.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Loadchar</i> loads a character image into the character cache. Then
+ it tells the graphics server to copy the character into position
+ <i>h</i> in the character cache. If the current font <tt><font size=+1>width</font></tt> is smaller
+ than the horizontal extent of the character being loaded, <i>loadfont</i>
+ clears the cache and resets it to accept characters with the
+ bigger width, unless <i>noclr</i> is set, in which case it just returns
+ &ndash;1. If the character does not exist in the font at all, <i>loadfont</i>
+ returns 0; if it is unable to load the character without destroying
+ cached information, it returns &ndash;1, updating <tt><font size=+1>*sfname</font></tt> as described
+ above. It returns 1 to indicate success.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>age</font></tt> fields record when subfonts and characters have been used.
+ The font <tt><font size=+1>age</font></tt> is increased every time the font is used (<i>agefont</i>
+ does this). A character or subfont <tt><font size=+1>age</font></tt> is set to the font age
+ at each use. Thus, characters or subfonts with small ages are
+ the best candidates for replacement when the cache is full.
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/subfont.html"><i>subfont</i>(3)</a>, <a href="../man7/image.html"><i>image</i>(7)</a>, <a href="../man7/font.html"><i>font</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ All of the functions use the graphics error function (see <a href="../man3/graphics.html"><i>graphics</i>(3)</a>).<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/cleanname.html b/man/man3/cleanname.html
new file mode 100644
index 00000000..eba39965
--- /dev/null
+++ b/man/man3/cleanname.html
@@ -0,0 +1,71 @@
+<head>
+<title>cleanname(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CLEANNAME(3)</b><td align=right><b>CLEANNAME(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ cleanname &ndash; clean a path name<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cleanname(char *filename)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Cleanname</i> takes a <i>filename</i> and by lexical processing only returns
+ the shortest string that names the same (possibly hypothetical)
+ file. It eliminates multiple and trailing slashes, and it lexically
+ interprets <tt><font size=+1>.</font></tt> and <tt><font size=+1>..</font></tt> directory components in the name. The string
+ is overwritten in place.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The shortest string <i>cleanname</i> can return is two bytes: the null-terminated
+ string <tt><font size=+1>&quot;.&quot;</font></tt>. Therefore <i>filename</i> must contain room for at least two
+ bytes.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/cleanname.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/cleanname.html"><i>cleanname</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/color.html b/man/man3/color.html
new file mode 100644
index 00000000..a8274707
--- /dev/null
+++ b/man/man3/color.html
@@ -0,0 +1,89 @@
+<head>
+<title>color(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>COLOR(3)</b><td align=right><b>COLOR(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ cmap2rgb, cmap2rgba, rgb2cmap &ndash; colors and color maps<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;draw.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;rgb2cmap(int red, int green, int blue)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;cmap2rgb(int col)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;cmap2rgba(int col)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines convert between &#8216;true color&#8217; red/green/blue triples
+ and the Plan 9 color map. See <a href="../man7/color.html"><i>color</i>(7)</a> for a description of RGBV,
+ the standard color map.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Rgb2cmap</i> takes a trio of color values, scaled from 0 (no intensity)
+ to 255 (full intensity), and returns the index of the color in
+ RGBV closest to that represented by those values.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Cmap2rgb</i> decomposes the color of RGBV index <i>col</i> and returns a
+ 24-bit integer with the low 8 bits representing the blue value,
+ the next 8 representing green, and the next 8 representing red.
+ <i>Cmap2rgba</i> decomposes the color of RGBV index <i>col</i> and returns a
+ 32-bit integer with the low 8 bits representing an alpha
+ value, defined to be 255, and the next 8 representing blue, then
+ green, then red, as for <i>cmap2rgba</i> shifted up 8 bits. This 32-bit
+ representation is the format used by <a href="../man3/draw.html"><i>draw</i>(3)</a> and <a href="../man3/memdraw.html"><i>memdraw</i>(3)</a> library
+ routines that take colors as arguments.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man7/image.html"><i>image</i>(7)</a>, <a href="../man7/color.html"><i>color</i>(7)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/complete.html b/man/man3/complete.html
new file mode 100644
index 00000000..29453752
--- /dev/null
+++ b/man/man3/complete.html
@@ -0,0 +1,136 @@
+<head>
+<title>complete(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>COMPLETE(3)</b><td align=right><b>COMPLETE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ complete, freecompletion &ndash; file name completion<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;complete.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>typedef struct CompletionCompletion;<br>
+ struct Completion{<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar advance;<br>
+ uchar complete;<br>
+ char *string;<br>
+ int nmatch;<br>
+ int nfile;<br>
+ char **filename;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Completion* complete(char *dir, char *s);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void freecompletion(Completion *c);<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>complete</i> function implements file name completion. Given a
+ directory <i>dir</i> and a string <i>s</i>, it returns an analysis of the file
+ names in that directory that begin with the string <i>s</i>. The fields
+ <tt><font size=+1>nmatch</font></tt> and <tt><font size=+1>nfile</font></tt> will be set to the number of files that match
+ the prefix and <tt><font size=+1>filename</font></tt> will be filled in with their names. If
+ the file named is a directory, a slash character will be appended
+ to it.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If no files match the string, <tt><font size=+1>nmatch</font></tt> will be zero, but <i>complete</i>
+ will return the full set of files in the directory, with <i>nfile</i>
+ set to their number.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The flag <tt><font size=+1>advance</font></tt> reports whether the string <i>s</i> can be extended
+ without changing the set of files that match. If true, <tt><font size=+1>string</font></tt>
+ will be set to the extension; that is, the value of <tt><font size=+1>string</font></tt> may
+ be appended to <i>s</i> by the caller to extend the embryonic file name
+ unambiguously.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The flag <tt><font size=+1>complete</font></tt> reports whether the extended file name uniquely
+ identifies a file. If true, <tt><font size=+1>string</font></tt> will be suffixed with a blank,
+ or a slash and a blank, depending on whether the resulting file
+ name identifies a plain file or a directory.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>freecompletion</i> function frees a <tt><font size=+1>Completion</font></tt> structure and its
+ contents.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In <a href="../man1/rio.html"><i>rio</i>(1)</a> and <a href="../man1/acme.html"><i>acme</i>(1)</a>, file name completion is triggered by a
+ control-F character or an Insert character.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libcomplete<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/rio.html"><i>rio</i>(1)</a>, <a href="../man1/acme.html"><i>acme</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>complete</i> function returns a null pointer and sets <i>errstr</i> if
+ the directory is unreadable or there is some other error.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The behavior of file name completion should be controlled by the
+ plumber.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/cputime.html b/man/man3/cputime.html
new file mode 100644
index 00000000..fafc7f57
--- /dev/null
+++ b/man/man3/cputime.html
@@ -0,0 +1,65 @@
+<head>
+<title>cputime(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CPUTIME(3)</b><td align=right><b>CPUTIME(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ cputime, times &ndash; cpu time in this process and children<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;times(long t[4])
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double cputime(void)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If <i>t</i> is non-null, <i>times</i> fills it in with the number of milliseconds
+ spent in user code, system calls, child processes in user code,
+ and child processes in system calls. <i>Cputime</i> returns the sum of
+ those same times, converted to seconds. <i>Times</i> returns the elapsed
+ real time, in milliseconds, that the process has been
+ running.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/time.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/ctime.html b/man/man3/ctime.html
new file mode 100644
index 00000000..4c162391
--- /dev/null
+++ b/man/man3/ctime.html
@@ -0,0 +1,150 @@
+<head>
+<title>ctime(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CTIME(3)</b><td align=right><b>CTIME(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ctime, localtime, gmtime, asctime, tm2sec, timezone &ndash; convert date
+ and time<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* ctime(long clock)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Tm* &nbsp;&nbsp;&nbsp;&nbsp;localtime(long clock)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Tm* &nbsp;&nbsp;&nbsp;&nbsp;gmtime(long clock)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* asctime(Tm *tm)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;tm2sec(Tm *tm)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Ctime</i> converts a time <i>clock</i> such as returned by <a href="../man3/time.html"><i>time</i>(3)</a> into ASCII
+ (sic) and returns a pointer to a 30-byte string in the following
+ form. All the fields have constant width.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>Wed Aug &nbsp;&nbsp;&nbsp;5 01:07:47 EST 1973\n\0
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+
+ </table>
+ <i>Localtime</i> and <i>gmtime</i> return pointers to structures containing
+ the broken-down time. <i>Localtime</i> corrects for the time zone and
+ possible daylight savings time; <i>gmtime</i> converts directly to GMT.
+ <i>Asctime</i> converts a broken-down time to ASCII and returns a pointer
+ to a 30-byte string.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef<br>
+ struct {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int &nbsp;&nbsp;&nbsp;sec; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* seconds (range 0..59) */<br>
+ int &nbsp;&nbsp;&nbsp;min; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* minutes (0..59) */<br>
+ int &nbsp;&nbsp;&nbsp;hour; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* hours (0..23) */<br>
+ int &nbsp;&nbsp;&nbsp;mday; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* day of the month (1..31) */<br>
+ int &nbsp;&nbsp;&nbsp;mon; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* month of the year (0..11) */<br>
+ int &nbsp;&nbsp;&nbsp;year; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* year A.D. &ndash; 1900 */<br>
+ int &nbsp;&nbsp;&nbsp;wday; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* day of week (0..6, Sunday = 0) */<br>
+ int &nbsp;&nbsp;&nbsp;yday; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* day of year (0..365) */<br>
+ char zone[4]; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* time zone name */<br>
+ int &nbsp;&nbsp;&nbsp;tzoff; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* time zone delta from GMT */<br>
+
+ </table>
+ } Tm;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <i>Tm2sec</i> converts a broken-down time to seconds since the start
+ of the epoch. It ignores <tt><font size=+1>wday</font></tt>, and assumes the local time zone
+ if <tt><font size=+1>zone</font></tt> is not <tt><font size=+1>GMT</font></tt>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/date.c<br>
+ /usr/local/plan9/src/lib9/ctime.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/date.html"><i>date</i>(1)</a>, <a href="../man3/time.html"><i>time</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The return values point to static data whose content is overwritten
+ by each call.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Daylight Savings Time is &#8220;normal&#8221; in the Southern hemisphere.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ These routines are not equipped to handle non-ASCII text, and
+ are provincial anyway.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To avoid name conflicts with the underlying system, <i>ctime</i>, <i>localtime</i>,
+ <i>gmtime</i>, <i>asctime</i>, and <i>tm2sec</i> are preprocessor macros defined as
+ <i>p9ctime</i>, <i>p9localtime</i>, <i>p9gmtime</i>, <i>p9asctime</i>, and <i>p9tm2sec</i>; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/des.html b/man/man3/des.html
new file mode 100644
index 00000000..0752e8c8
--- /dev/null
+++ b/man/man3/des.html
@@ -0,0 +1,170 @@
+<head>
+<title>des(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DES(3)</b><td align=right><b>DES(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ setupDESstate, des_key_setup, block_cipher, desCBCencrypt, desCBCdecrypt,
+ desECBencrypt, desECBdecrypt, des3CBCencrypt, des3CBCdecrypt,
+ des3ECBencrypt, des3ECBdecrypt, key_setup, des56to64, des64to56,
+ setupDES3state, triple_block_cipher, - single and triple digital
+ encryption standard
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void des_key_setup(uchar key[8], ulong schedule[32])
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void block_cipher(ulong *schedule, uchar *data, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int decrypting)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void setupDESstate(DESstate *s, uchar key[8], uchar *ivec)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void desCBCencrypt(uchar*, int, DESstate*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void desCBCdecrypt(uchar*, int, DESstate*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void desECBencrypt(uchar*, int, DESstate*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void desECBdecrypt(uchar*, int, DESstate*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void triple_block_cipher(ulong keys[3][32], uchar*, int)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void setupDES3state(DES3state *s, uchar key[3][8], &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uchar *ivec)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void des3CBCencrypt(uchar*, int, DES3state*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void des3CBCdecrypt(uchar*, int, DES3state*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void des3ECBencrypt(uchar*, int, DES3state*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void des3ECBdecrypt(uchar*, int, DES3state*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void key_setup(uchar[7], ulong[32])
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void des56to64(uchar *k56, uchar *k64)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void des64to56(uchar *k64, uchar *k56)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The Digital Encryption Standard (DES) is a shared key or symmetric
+ encryption using either a 56 bit key for single DES or three 56
+ bit keys for triple des. The keys are encoded into 64 bits where
+ every eight bit is parity.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The basic DES function, <i>block_cipher</i>, works on a block of 8 bytes,
+ converting them in place. It takes a key schedule, a pointer to
+ the block, and a flag indicating encrypting (0) or decrypting
+ (1). The key schedule is created from the key using <i>des_key_setup</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Since it is a bit awkward, <i>block_cipher</i> is rarely called directly.
+ Instead, one normally uses routines that encrypt larger buffers
+ of data and which may chain the encryption state from one buffer
+ to the next. These routines keep track of the state of the encryption
+ using a <tt><font size=+1>DESstate</font></tt> structure that contains the key
+ schedule and any chained state. <i>SetupDESstate</i> sets up the <tt><font size=+1>DESstate</font></tt>
+ structure using the key and an 8 byte initialization vector.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Electronic code book, using <i>desECBencrypt</i> and <i>desECBdecrypt</i>, is
+ the less secure mode. The encryption of each 8 bytes does not
+ depend on the encryption of any other. Hence the encryption is
+ a substitution cipher using 64 bit characters.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Cipher block chaining mode, using <i>desCBCencrypt</i> and <i>desCBCdecrypt</i>,
+ is more secure. Every block encrypted depends on the initialization
+ vector and all blocks encrypted before it.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For both CBC and ECB modes, a stream of data can be encrypted
+ as multiple buffers. However, all buffers except the last must
+ be a multiple of 8 bytes to ensure successful decryption of the
+ stream.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There are equivalent triple DES functions for each of the DES
+ functions.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In the past Plan 9 used a 56 bit or 7 byte format for DES keys.
+ To be compatible with the rest of the world, we&#8217;ve abandoned this
+ format. There are two functions: <i>des56to64</i> and <i>des64to56</i> to convert
+ back and forth between the two formats. Also a key schedule can
+ be set up from the 7 byte format using <i>key_setup</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libsec<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mp.html"><i>mp</i>(3)</a>, <a href="../man3/aes.html"><i>aes</i>(3)</a>, <a href="../man3/blowfish.html"><i>blowfish</i>(3)</a>, <a href="../man3/dsa.html"><i>dsa</i>(3)</a>, <a href="../man3/elgamal.html"><i>elgamal</i>(3)</a>, <a href="../man3/rc4.html"><i>rc4</i>(3)</a>, <a href="../man3/rsa.html"><i>rsa</i>(3)</a>,
+ <a href="../man3/sechash.html"><i>sechash</i>(3)</a>, <a href="../man3/prime.html"><i>prime</i>(3)</a>, <a href="../man3/rand.html"><i>rand</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/dial.html b/man/man3/dial.html
new file mode 100644
index 00000000..e1014859
--- /dev/null
+++ b/man/man3/dial.html
@@ -0,0 +1,241 @@
+<head>
+<title>dial(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DIAL(3)</b><td align=right><b>DIAL(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ dial, announce, listen, accept, reject, netmkaddr, dialparse &ndash;
+ make and break network connections<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;dial(char *addr, char *local, char *dir, int *cfdp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;announce(char *addr, char *dir)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;listen(char *dir, char *newdir)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;accept(int ctl, char *dir)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;reject(int ctl, char *dir, char *cause)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* netmkaddr(char *addr, char *defnet, char *defservice)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;dialparse(char *addr, char **net, char **unix,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ u32int *host, int *port)<br>
+
+ </table>
+
+ </table>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ For these routines, <i>addr</i> is a network address of the form <i>network</i><tt><font size=+1>!</font></tt><i>netaddr</i><tt><font size=+1>!</font></tt><i>service</i>,
+ <i>network</i><tt><font size=+1>!</font></tt><i>netaddr</i>, or simply <i>netaddr</i>. <i>Network</i> is <tt><font size=+1>tcp</font></tt>, <tt><font size=+1>udp</font></tt>, <tt><font size=+1>unix</font></tt>,
+ or the special token, <tt><font size=+1>net</font></tt>. <tt><font size=+1>Net</font></tt> is a free variable that stands
+ for any network in common between the source and the host <i>netaddr</i>.
+ <i>Netaddr</i> can be a host name, a
+ domain name, or a network address.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ On Plan 9, the <i>dir</i> argument is a path name to a <i>line directory</i>
+ that has files for accessing the connection. To keep the same
+ function signatures, the Unix port of these routines uses strings
+ of the form <tt><font size=+1>/dev/fd/</font></tt><i>n</i> instead of line directory paths. These strings
+ should be treated as opaque data and ignored.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Dial</i> makes a call to destination <i>addr</i> on a multiplexed network.
+ If the network in <i>addr</i> is <tt><font size=+1>net</font></tt>, <i>dial</i> will try in succession all
+ networks in common between source and destination until a call
+ succeeds. It returns a file descriptor open for reading and writing
+ the <tt><font size=+1>data</font></tt> file in the line directory. The <tt><font size=+1>addr</font></tt> file in the line
+ directory contains the address called. <i>Dial</i>&#8217;s <i>local</i>, <i>dir</i>, and
+ <i>cfdp</i> arguments are not supported and must be zero.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Announce</i> and <i>listen</i> are the complements of <i>dial</i>. <i>Announce</i> establishes
+ a network name to which calls can be made. Like <i>dial</i>, <i>announce</i>
+ returns an open <tt><font size=+1>ctl</font></tt> file. The <i>netaddr</i> used in announce may be
+ a local address or an asterisk, to indicate all local addresses,
+ e.g. <tt><font size=+1>tcp!*!echo</font></tt>. The <i>listen</i> routine takes as its
+ first argument the <i>dir</i> of a previous <i>announce</i>. When a call is
+ received, <i>listen</i> returns an open <tt><font size=+1>ctl</font></tt> file for the line the call
+ was received on. It sets <i>newdir</i> to the path name of the new line
+ directory. <i>Accept</i> accepts a call received by <i>listen</i>, while <i>reject</i>
+ refuses the call because of <i>cause</i>. <i>Accept</i> returns a file descriptor
+ for
+ the data file opened <tt><font size=+1>ORDWR</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Netmkaddr</i> makes an address suitable for dialing or announcing.
+ It takes an address along with a default network and service to
+ use if they are not specified in the address. It returns a pointer
+ to static data holding the actual address to use.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Dialparse</i> parses a network address as described above into a network
+ name, a Unix domain socket address, an IPv4 host address, and
+ an IPv4 port number.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Make a call and return an open file descriptor to use for communications:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>int callkremvax(void)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return dial(&quot;kremvax&quot;, 0, 0, 0);<br>
+
+ </table>
+ }<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Connect to a Unix socket served by <a href="../man4/acme.html"><i>acme</i>(4)</a>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>int dialacme(void)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return dial(&quot;unix!/tmp/ns.ken.:0/acme&quot;, 0, 0, 0);<br>
+
+ </table>
+ }<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Announce as <tt><font size=+1>kremvax</font></tt> on TCP/IP and loop forever receiving calls
+ and echoing back to the caller anything sent:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>int<br>
+ bekremvax(void)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int dfd, acfd, lcfd;<br>
+ char adir[40], ldir[40];<br>
+ int n;<br>
+ char buf[256];<br>
+ acfd = announce(&quot;tcp!*!7&quot;, adir);<br>
+ if(acfd &lt; 0)<br>
+ return &#8722;1;<br>
+ for(;;){<br>
+ /* listen for a call */<br>
+ lcfd = listen(adir, ldir);<br>
+ if(lcfd &lt; 0)<br>
+ return &#8722;1;<br>
+ /* fork a process to echo */<br>
+ switch(fork()){<br>
+ case &#8722;1:<br>
+ perror(&quot;forking&quot;);<br>
+ close(lcfd);<br>
+ break;<br>
+ case 0:<br>
+ /* accept the call and open the data file */<br>
+ dfd = accept(lcfd, ldir);<br>
+ if(dfd &lt; 0)<br>
+ return &#8722;1;<br>
+ /* echo until EOF */<br>
+ while((n = read(dfd, buf, sizeof(buf))) &gt; 0)<br>
+ write(dfd, buf, n);<br>
+ exits(0);<br>
+ default:<br>
+ close(lcfd);<br>
+ break;<br>
+ }<br>
+ }<br>
+
+ </table>
+ }<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/dial.c<br>
+ /usr/local/plan9/src/lib9/announce.c<br>
+ /usr/local/plan9/src/lib9/_p9dialparse.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Dial</i>, <i>announce</i>, and <i>listen</i> return &ndash;1 if they fail.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To avoid name conflicts with the underlying system, <i>dial</i>, <i>announce</i>,
+ <i>listen</i>, <i>netmkaddr</i>, and <i>reject</i> are preprocessor macros defined
+ as <i>p9dial</i>, <i>p9announce</i>, and so on; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/dirread.html b/man/man3/dirread.html
new file mode 100644
index 00000000..7c5ba4ed
--- /dev/null
+++ b/man/man3/dirread.html
@@ -0,0 +1,114 @@
+<head>
+<title>dirread(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DIRREAD(3)</b><td align=right><b>DIRREAD(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ dirread, dirreadall &ndash; read directory<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long dirread(int fd, Dir **buf)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long dirreadall(int fd, Dir **buf)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#define &nbsp;&nbsp;&nbsp;&nbsp;STATMAX &nbsp;&nbsp;&nbsp;&nbsp;65535U
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#define &nbsp;&nbsp;&nbsp;&nbsp;DIRMAX &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(sizeof(Dir)+STATMAX)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The data returned by a <a href="../man3/read.html"><i>read</i>(3)</a> on a directory is a set of complete
+ directory entries in a machine-independent format, exactly equivalent
+ to the result of a <a href="../man3/stat.html"><i>stat</i>(3)</a> on each file or subdirectory in the
+ directory. <i>Dirread</i> decodes the directory entries into a machine-dependent
+ form. It reads from <i>fd</i> and unpacks the data
+ into an array of <tt><font size=+1>Dir</font></tt> structures whose address is returned in <tt><font size=+1>*buf</font></tt>
+ (see <a href="../man3/stat.html"><i>stat</i>(3)</a> for the layout of a <tt><font size=+1>Dir</font></tt>). The array is allocated
+ with <a href="../man3/malloc.html"><i>malloc</i>(3)</a> each time <i>dirread</i> is called.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Dirreadall</i> is like <i>dirread</i>, but reads in the entire directory;
+ by contrast, <i>dirread</i> steps through a directory one <a href="../man3/read.html"><i>read</i>(3)</a> at
+ a time.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Directory entries have variable length. A successful <i>read</i> of a
+ directory always returns an integral number of complete directory
+ entries; <i>dirread</i> always returns complete <tt><font size=+1>Dir</font></tt> structures. See <i>read</i>(9p)
+ for more information.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The constant <tt><font size=+1>STATMAX</font></tt> is the maximum size that a directory entry
+ can occupy. The constant <tt><font size=+1>DIRMAX</font></tt> is an upper limit on the size
+ necessary to hold a <tt><font size=+1>Dir</font></tt> structure and all the associated data.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Dirread</i> and <i>dirreadall</i> return the number of <tt><font size=+1>Dir</font></tt> structures filled
+ in <tt><font size=+1>buf</font></tt>. The file offset is advanced by the number of bytes actually
+ read.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/dirread.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a>, <a href="../man3/open.html"><i>open</i>(3)</a>, <a href="../man3/read.html"><i>read</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Dirread</i> and <i>Dirreadall</i> return zero for end of file and a negative
+ value for error. In either case, <tt><font size=+1>*buf</font></tt> is set to <tt><font size=+1>nil</font></tt> so the pointer
+ can always be freed with impunity.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ These functions set <i>errstr</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/draw.html b/man/man3/draw.html
new file mode 100644
index 00000000..f90b16fc
--- /dev/null
+++ b/man/man3/draw.html
@@ -0,0 +1,1174 @@
+<head>
+<title>draw(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DRAW(3)</b><td align=right><b>DRAW(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image, draw, drawop, gendraw, gendrawop, drawreplxy, drawrepl,
+ replclipr, line, lineop, poly, polyop, fillpoly, fillpolyop, bezier,
+ bezierop, bezspline, bezsplineop, bezsplinepts, fillbezier, fillbezierop,
+ fillbezspline, fillbezsplineop, ellipse, ellipseop, fillellipse,
+ fillellipseop, arc, arcop, fillarc, fillarcop, icossin, icossin2,
+ border, string, stringop, stringn, stringnop, runestring, runestringop,
+ runestringn, runestringnop, stringbg, stringbgop, stringnbg, stringnbgop,
+ runestringbg, runestringbgop, runestringnbg, runestringnbgop,
+ _string, ARROW, drawsetdebug &ndash; graphics functions<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;draw.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ typedef<br>
+ struct Image<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Display &nbsp;&nbsp;&nbsp;&nbsp;*display; /* display holding data */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* id of system&#8722;held Image */<br>
+ Rectangle r; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* rectangle in data area, local coords */<br>
+ Rectangle clipr; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* clipping region */<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chan; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* pixel channel format descriptor */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;depth; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* number of bits per pixel */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;repl; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* flag: data replicates to tile clipr */<br>
+ Screen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*screen; &nbsp;&nbsp;&nbsp;/* 0 if not a window */<br>
+ Image &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*next; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* next in list of windows */<br>
+
+ </table>
+ } Image;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ typedef enum<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ /* Porter&#8722;Duff compositing operators */<br>
+ Clear &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0,<br>
+ SinD = 8,<br>
+ DinS = 4,<br>
+ SoutD &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 2,<br>
+ DoutS &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 1,<br>
+ S &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= SinD|SoutD,<br>
+ SoverD &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= SinD|SoutD|DoutS,<br>
+ SatopD &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= SinD|DoutS,<br>
+ SxorD &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= SoutD|DoutS,<br>
+ D &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= DinS|DoutS,<br>
+ DoverS &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= DinS|DoutS|SoutD,<br>
+ DatopS &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= DinS|SoutD,<br>
+ DxorS &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= DoutS|SoutD, /* == SxorD */<br>
+ Ncomp = 12,<br>
+
+ </table>
+ } Drawop;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void &nbsp;&nbsp;&nbsp;draw(Image *dst, Rectangle r, Image *src,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *mask, Point p)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;drawop(Image *dst, Rectangle r, Image *src,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *mask, Point p, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;gendraw(Image *dst, Rectangle r, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *mask, Point mp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;gendrawop(Image *dst, Rectangle r, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *mask, Point mp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;drawreplxy(int min, int max, int x)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Point drawrepl(Rectangle r, Point p)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void &nbsp;&nbsp;&nbsp;replclipr(Image *i, int repl, Rectangle clipr)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void &nbsp;&nbsp;&nbsp;line(Image *dst, Point p0, Point p1, int end0, int end1,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int radius, Image *src, Point sp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;lineop(Image *dst, Point p0, Point p1, int end0, int end1,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int radius, Image *src, Point sp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;poly(Image *dst, Point *p, int np, int end0, int end1,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int radius, Image *src, Point sp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;polyop(Image *dst, Point *p, int np, int end0, int end1,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int radius, Image *src, Point sp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;fillpoly(Image *dst, Point *p, int np, int wind,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *src, Point sp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;fillpolyop(Image *dst, Point *p, int np, int wind,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *src, Point sp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;bezier(Image *dst, Point p0, Point p1, Point p2, Point p3,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int end0, int end1, int radius, Image *src, Point sp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;bezierop(Image *dst, Point p0, Point p1, Point p2, Point p3,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int end0, int end1, int radius, Image *src, Point sp,<br>
+ Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;bezspline(Image *dst, Point *pt, int npt, int end0, int end1,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int radius, Image *src, Point sp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;bezsplineop(Image *dst, Point *pt, int npt, int end0, int
+ end1,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int radius, Image *src, Point sp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;bezsplinepts(Point *pt, int npt, Point **pp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;fillbezier(Image *dst, Point p0, Point p1, Point p2, Point
+ p3,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int w, Image *src, Point sp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;fillbezierop(Image *dst, Point p0, Point p1, Point p2, Point
+ p3,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int w, Image *src, Point sp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;fillbezspline(Image *dst, Point *pt, int npt, int w,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *src, Point sp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;fillbezsplineop(Image *dst, Point *pt, int npt, int w,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *src, Point sp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;ellipse(Image *dst, Point c, int a, int b, int thick,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *src, Point sp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;ellipseop(Image *dst, Point c, int a, int b, int thick,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *src, Point sp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;fillellipse(Image *dst, Point c, int a, int b,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *src, Point sp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;fillellipseop(Image *dst, Point c, int a, int b,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *src, Point sp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;arc(Image *dst, Point c, int a, int b, int thick,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *src, Point sp, int alpha, int phi)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;arcop(Image *dst, Point c, int a, int b, int thick,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *src, Point sp, int alpha, int phi, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;fillarc(Image *dst, Point c, int a, int b, Image *src,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Point sp, int alpha, int phi)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;fillarcop(Image *dst, Point c, int a, int b, Image *src,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Point sp, int alpha, int phi, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;icossin(int deg, int *cosp, int *sinp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;icossin2(int x, int y, int *cosp, int *sinp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void &nbsp;&nbsp;&nbsp;border(Image *dst, Rectangle r, int i, Image *color, Point
+ sp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Point string(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, char *s)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point stringop(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, char *s, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point stringn(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, char *s, int len)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point stringnop(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, char *s, int len, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point runestring(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, Rune *r)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point runestringop(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, Rune *r, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point runestringn(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, Rune *r, int len)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point runestringnop(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, Rune *r, int len, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point stringbg(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, char *s, Image *bg, Point bgp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point stringbgop(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, char *s, Image *bg, Point bgp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point stringnbg(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, char *s, int len, Image *bg, Point bgp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point stringnbgop(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, char *s, int len, Image *bg, Point bgp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point runestringbg(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, Rune *r, Image *bg, Point bgp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point runestringbgop(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, Rune *r, Image *bg, Point bgp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point runestringnbg(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, Rune *r, int len, Image *bg, Point bgp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point runestringnbgop(Image *dst, Point p, Image *src, Point sp,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font *f, Rune *r, int len, Image *bg, Point bgp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Point _string(Image *dst, Point p, Image *src,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Point sp, Font *f, char *s, Rune *r, int len,<br>
+ Rectangle clipr, Image *bg, Point bgp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;drawsetdebug(int on)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ enum<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ /* line ends */<br>
+ Endsquare &nbsp;&nbsp;&nbsp;= 0,<br>
+ Enddisc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 1,<br>
+ Endarrow = 2,<br>
+ Endmask &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 0x1F<br>
+
+ </table>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ #define ARROW(a, b, c) (Endarrow|((a)&lt;&lt;5)|((b)&lt;&lt;14)|((c)&lt;&lt;23))<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>Image</font></tt> type defines rectangular pictures and the methods to
+ draw upon them; it is also the building block for higher level
+ objects such as windows and fonts. In particular, a window is
+ represented as an <tt><font size=+1>Image</font></tt>; no special operators are needed to draw
+ on a window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>r</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The coordinates of the rectangle in the plane for which the <tt><font size=+1>Image</font></tt>
+ has defined pixel values. It should not be modified after the
+ image is created.<br>
+ <tt><font size=+1>clipr</font></tt>&nbsp;&nbsp;&nbsp;The clipping rectangle: operations that read or write the
+ image will not access pixels outside <tt><font size=+1>clipr</font></tt>. Frequently, <tt><font size=+1>clipr</font></tt>
+ is the same as <tt><font size=+1>r</font></tt>, but it may differ; see in particular the discussion
+ of <tt><font size=+1>repl</font></tt>. The clipping region may be modified dynamically using
+ <i>replclipr</i> (<i>q.v.</i>).<br>
+ <tt><font size=+1>chan</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;The pixel channel format descriptor, as described in <a href="../man7/image.html"><i>image</i>(7)</a>.
+ The value should not be modified after the image is created.<br>
+ <tt><font size=+1>depth</font></tt>&nbsp;&nbsp;&nbsp;The number of bits per pixel in the picture; it is identically
+ <tt><font size=+1>chantodepth(chan)</font></tt> (see <a href="../man3/graphics.html"><i>graphics</i>(3)</a>) and is provided as a convenience.
+ The value should not be modified after the image is created.<br>
+ <tt><font size=+1>repl</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;A boolean value specifying whether the image is tiled to cover
+ the plane when used as a source for a drawing operation. If <tt><font size=+1>repl</font></tt>
+ is zero, operations are restricted to the intersection of <tt><font size=+1>r</font></tt> and
+ <tt><font size=+1>clipr</font></tt>. If <tt><font size=+1>repl</font></tt> is set, <tt><font size=+1>r</font></tt> defines the tile to be replicated and
+ <tt><font size=+1>clipr</font></tt> defines the portion of the plane covered by the
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ tiling, in other words, <tt><font size=+1>r</font></tt> is replicated to cover <tt><font size=+1>clipr</font></tt>; in such
+ cases <tt><font size=+1>r</font></tt> and <tt><font size=+1>clipr</font></tt> are independent.<br>
+ For example, a replicated image with <tt><font size=+1>r</font></tt> set to ((0, 0), (1, 1))
+ and <tt><font size=+1>clipr</font></tt> set to ((0, 0), (100, 100)), with the single pixel of
+ <tt><font size=+1>r</font></tt> set to blue, behaves identically to an image with <tt><font size=+1>r</font></tt> and <tt><font size=+1>clipr</font></tt>
+ both set to ((0, 0), (100, 100)) and all pixels set to blue. However,
+ the first image requires far less memory. The
+ replication flag may be modified dynamically using <i>replclipr</i> (<i>q.v.</i>).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ Most of the drawing functions come in two forms: a basic form,
+ and an extended form that takes an extra <tt><font size=+1>Drawop</font></tt> to specify a Porter-Duff
+ compositing operator to use. The basic forms assume the operator
+ is <tt><font size=+1>SoverD</font></tt>, which suffices for the vast majority of applications.
+ The extended forms are named by adding an
+ -<tt><font size=+1>op</font></tt> suffix to the basic form. Only the basic forms are listed
+ below.<br>
+ <tt><font size=+1>draw(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>r</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>mask</i><tt><font size=+1>,</font></tt> <i>p</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Draw</i> is the standard drawing function. Only those pixels within
+ the intersection of <i>dst</i><tt><font size=+1>&#8722;&gt;r</font></tt> and <i>dst</i><tt><font size=+1>&#8722;&gt;clipr</font></tt> will be affected; <i>draw</i>
+ ignores <i>dst</i><tt><font size=+1>&#8722;&gt;repl</font></tt>. The operation proceeds as follows (this is a
+ description of the behavior, not the implementation):<br>
+ 1.&nbsp;&nbsp;&nbsp;&nbsp;If <tt><font size=+1>repl</font></tt> is set in <i>src</i> or <i>mask</i>, replicate their contents to fill
+ their clip rectangles.<br>
+ 2.&nbsp;&nbsp;&nbsp;&nbsp;Translate <i>src</i> and <i>mask</i> so <i>p</i> is aligned with <i>r</i><tt><font size=+1>.min</font></tt>.<br>
+ 3.&nbsp;&nbsp;&nbsp;&nbsp;Set <i>r</i> to the intersection of <i>r</i> and <i>dst</i><tt><font size=+1>&#8722;&gt;r</font></tt>.<br>
+ 4.&nbsp;&nbsp;&nbsp;&nbsp;Intersect <i>r</i> with <i>src</i><tt><font size=+1>&#8722;&gt;clipr</font></tt>. If <i>src</i><tt><font size=+1>&#8722;&gt;repl</font></tt> is false, also intersect
+ <i>r</i> with <i>src</i><tt><font size=+1>&#8722;&gt;r</font></tt>.<br>
+ 5.&nbsp;&nbsp;&nbsp;&nbsp;Intersect <i>r</i> with <i>mask</i><tt><font size=+1>&#8722;&gt;clipr</font></tt>. If <i>mask</i><tt><font size=+1>&#8722;&gt;repl</font></tt> is false, also intersect
+ <i>r</i> with <i>mask</i><tt><font size=+1>&#8722;&gt;r</font></tt>.<br>
+ 6.&nbsp;&nbsp;&nbsp;&nbsp;For each location in <i>r</i>, combine the <i>dst</i> pixel with the <i>src</i> pixel
+ using the alpha value corresponding to the <i>mask</i> pixel. If the
+ <i>mask</i> has an explicit alpha channel, the alpha value corresponding
+ to the <i>mask</i> pixel is simply that pixel&#8217;s alpha channel. Otherwise,
+ the alpha value is the NTSC greyscale
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ equivalent of the color value, with white meaning opaque and black
+ transparent. In terms of the Porter-Duff compositing algebra,
+ <i>draw</i> replaces the <i>dst</i> pixels with (<i>src</i> in <i>mask</i>) over <i>dst</i>. (In
+ the extended form, &#8220;over&#8221; is replaced by <i>op</i>).<br>
+
+ </table>
+ The various pixel channel formats involved need not be identical.
+ If the channels involved are smaller than 8-bits, they will be
+ promoted before the calculation by replicating the extant bits;
+ after the calculation, they will be truncated to their proper
+ sizes.<br>
+
+ </table>
+ <tt><font size=+1>gendraw(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>r</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>p0</i><tt><font size=+1>,</font></tt> <i>mask</i><tt><font size=+1>,</font></tt> <i>p1</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Similar to <i>draw</i> except that <i>gendraw</i> aligns the source and mask
+ differently: <i>src</i> is aligned so <i>p0</i> corresponds to <i>r</i><tt><font size=+1>.min</font></tt> and <i>mask</i>
+ is aligned so <i>p1</i> corresponds to <i>r</i><tt><font size=+1>.min</font></tt><i>.</i> For most purposes with
+ simple masks and source images, <tt><font size=+1>draw</font></tt> is sufficient, but <tt><font size=+1>gendraw</font></tt>
+ is the general operator and the one all other
+ drawing primitives are built upon.<br>
+
+ </table>
+ <tt><font size=+1>drawreplxy(</font></tt><i>min</i><tt><font size=+1>,</font></tt><i>max</i><tt><font size=+1>,</font></tt><i>x</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Clips <i>x</i> to be in the half-open interval [<i>min</i>, <i>max</i>) by adding or
+ subtracting a multiple of <i>max-min</i>.<br>
+
+ </table>
+ <tt><font size=+1>drawrepl(</font></tt><i>r</i><tt><font size=+1>,</font></tt><i>p</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Clips the point <i>p</i> to be within the rectangle <i>r</i> by translating
+ the point horizontally by an integer multiple of rectangle width
+ and vertically by the height.<br>
+
+ </table>
+ <tt><font size=+1>replclipr(</font></tt><i>i</i><tt><font size=+1>,</font></tt><i>repl</i><tt><font size=+1>,</font></tt><i>clipr</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Because the image data is stored on the server, local modifications
+ to the <tt><font size=+1>Image</font></tt> data structure itself will have no effect. <i>Repclipr</i>
+ modifies the local <tt><font size=+1>Image</font></tt> data structure&#8217;s <tt><font size=+1>repl</font></tt> and <tt><font size=+1>clipr</font></tt> fields,
+ and notifies the server of their modification.<br>
+
+ </table>
+ <tt><font size=+1>line(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>p0</i><tt><font size=+1>,</font></tt> <i>p1</i><tt><font size=+1>,</font></tt> <i>end0</i><tt><font size=+1>,</font></tt> <i>end1</i><tt><font size=+1>,</font></tt> <i>thick</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Line draws in <i>dst</i> a line of width 1+2*<i>thick</i> pixels joining points
+ <i>p0</i> and <i>p1</i>. The line is drawn using pixels from the <i>src</i> image aligned
+ so <i>sp</i> in the source corresponds to <i>p0</i> in the destination. The
+ line touches both <i>p0</i> and <i>p1</i>, and <i>end0</i> and <i>end1</i> specify how the
+ ends of the line are drawn. <tt><font size=+1>Endsquare
+ </font></tt>terminates the line perpendicularly to the direction of the line;
+ a thick line with <tt><font size=+1>Endsquare</font></tt> on both ends will be a rectangle.
+ <tt><font size=+1>Enddisc</font></tt> terminates the line by drawing a disc of diameter 1+2*<i>thick</i>
+ centered on the end point. <tt><font size=+1>Endarrow</font></tt> terminates the line with an
+ arrowhead whose tip touches the endpoint.
+ The macro <tt><font size=+1>ARROW</font></tt> permits explicit control of the shape of the arrow.
+ If all three parameters are zero, it produces the default arrowhead,
+ otherwise, <i>a</i> sets the distance along line from end of the regular
+ line to tip, <i>b</i> sets the distance along line from the barb to the
+ tip, and <i>c</i> sets the distance perpendicular to the
+ line from edge of line to the tip of the barb, all in pixels.<br>
+ <i>Line</i> and the other geometrical operators are equivalent to calls
+ to <i>gendraw</i> using a mask produced by the geometric procedure.<br>
+
+ </table>
+ <tt><font size=+1>poly(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>p</i><tt><font size=+1>,</font></tt> <i>np</i><tt><font size=+1>,</font></tt> <i>end0</i><tt><font size=+1>,</font></tt> <i>end1</i><tt><font size=+1>,</font></tt> <i>thick</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Poly</i> draws a general polygon; it is conceptually equivalent to
+ a series of calls to <i>line</i> joining adjacent points in the array
+ of <tt><font size=+1>Points</font></tt> <i>p</i>, which has <i>np</i> elements. The ends of the polygon are
+ specified as in <i>line</i>; interior lines are terminated with <tt><font size=+1>Enddisc</font></tt>
+ to make smooth joins. The source is aligned so <i>sp
+ </i>corresponds to <i>p</i><tt><font size=+1>[0]</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>fillpoly(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>p</i><tt><font size=+1>,</font></tt> <i>np</i><tt><font size=+1>,</font></tt> <i>wind</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fillpoly</i> is like <i>poly</i> but fills in the resulting polygon rather
+ than outlining it. The source is aligned so <i>sp</i> corresponds to
+ <i>p</i><tt><font size=+1>[0]</font></tt>. The winding rule parameter <i>wind</i> resolves ambiguities about
+ what to fill if the polygon is self-intersecting. If <i>wind</i> is <tt><font size=+1>~0</font></tt>,
+ a pixel is inside the polygon if the polygon&#8217;s winding number
+ about the point is non-zero. If <i>wind</i> is <tt><font size=+1>1</font></tt>, a pixel is inside if
+ the winding number is odd. Complementary values (0 or ~1) cause
+ outside pixels to be filled. The meaning of other values is undefined.
+ The polygon is closed with a line if necessary.<br>
+
+ </table>
+ <tt><font size=+1>bezier(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>a</i><tt><font size=+1>,</font></tt> <i>b</i><tt><font size=+1>,</font></tt> <i>c</i><tt><font size=+1>,</font></tt> <i>d</i><tt><font size=+1>,</font></tt> <i>end0</i><tt><font size=+1>,</font></tt> <i>end1</i><tt><font size=+1>,</font></tt> <i>thick</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Bezier</i> draws the cubic Bezier curve defined by <tt><font size=+1>Points</font></tt> <i>a</i>, <i>b</i>, <i>c</i>,
+ and <i>d</i>. The end styles are determined by <i>end0</i> and <i>end1</i>; the thickness
+ of the curve is 1+2*<i>thick</i>. The source is aligned so <i>sp</i> in <i>src</i>
+ corresponds to <i>a</i> in <i>dst</i>.<br>
+
+ </table>
+ <tt><font size=+1>bezspline(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>p</i><tt><font size=+1>,</font></tt> <i>end0</i><tt><font size=+1>,</font></tt> <i>end1</i><tt><font size=+1>,</font></tt> <i>thick</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Bezspline</i> takes the same arguments as <i>poly</i> but draws a quadratic
+ B-spline (despite its name) rather than a polygon. If the first
+ and last points in <i>p</i> are equal, the spline has periodic end conditions.<br>
+
+ </table>
+ <tt><font size=+1>bezsplinepts(</font></tt><i>pt</i><tt><font size=+1>,</font></tt> <i>npt</i><tt><font size=+1>,</font></tt> <i>pp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Bezsplinepts</i> returns in <i>pp</i> a list of points making up the open
+ polygon that <i>bezspline</i> would draw. The caller is responsible for
+ freeing <i>*pp</i>.<br>
+
+ </table>
+ <tt><font size=+1>fillbezier(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>a</i><tt><font size=+1>,</font></tt> <i>b</i><tt><font size=+1>,</font></tt> <i>c</i><tt><font size=+1>,</font></tt> <i>d</i><tt><font size=+1>,</font></tt> <i>wind</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fillbezier</i> is to <i>bezier</i> as <i>fillpoly</i> is to <i>poly</i>.<br>
+
+ </table>
+ <tt><font size=+1>fillbezspline(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>p</i><tt><font size=+1>,</font></tt> <i>wind</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fillbezspline</i> is like <i>fillpoly</i> but fills the quadratic B-spline
+ rather than the polygon outlined by <i>p</i>. The spline is closed with
+ a line if necessary.<br>
+
+ </table>
+ <tt><font size=+1>ellipse(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>c</i><tt><font size=+1>,</font></tt> <i>a</i><tt><font size=+1>,</font></tt> <i>b</i><tt><font size=+1>,</font></tt> <i>thick</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Ellipse</i> draws in <i>dst</i> an ellipse centered on <i>c</i> with horizontal
+ and vertical semiaxes <i>a</i> and <i>b</i>. The source is aligned so <i>sp</i> in
+ <i>src</i> corresponds to <i>c</i> in <i>dst</i>. The ellipse is drawn with thickness
+ 1+2*<i>thick</i>.<br>
+
+ </table>
+ <tt><font size=+1>fillellipse(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>c</i><tt><font size=+1>,</font></tt> <i>a</i><tt><font size=+1>,</font></tt> <i>b</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fillellipse</i> is like <i>ellipse</i> but fills the ellipse rather than
+ outlining it.<br>
+
+ </table>
+ <tt><font size=+1>arc(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>c</i><tt><font size=+1>,</font></tt> <i>a</i><tt><font size=+1>,</font></tt> <i>b</i><tt><font size=+1>,</font></tt> <i>thick</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>,</font></tt> <i>alpha</i><tt><font size=+1>,</font></tt> <i>phi</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Arc</i> is like <i>ellipse</i>, but draws only that portion of the ellipse
+ starting at angle <i>alpha</i> and extending through an angle of <i>phi</i>.
+ The angles are measured in degrees counterclockwise from the positive
+ <i>x</i> axis.<br>
+
+ </table>
+ <tt><font size=+1>fillarc(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>c</i><tt><font size=+1>,</font></tt> <i>a</i><tt><font size=+1>,</font></tt> <i>b</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>,</font></tt> <i>alpha</i><tt><font size=+1>,</font></tt> <i>phi</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fillarc</i> is like <i>arc</i>, but fills the sector with the source color.<br>
+
+ </table>
+ <tt><font size=+1>icossin(</font></tt><i>deg</i><tt><font size=+1>,</font></tt> <i>cosp</i><tt><font size=+1>,</font></tt> <i>sinp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Icossin</i> stores in <tt><font size=+1>*</font></tt><i>cosp</i> and <tt><font size=+1>*</font></tt><i>sinp</i> scaled integers representing
+ the cosine and sine of the angle <i>deg</i>, measured in integer degrees.
+ The values are scaled so cos(0) is 1024.<br>
+
+ </table>
+ <tt><font size=+1>icossin2(</font></tt><i>x</i><tt><font size=+1>,</font></tt> <i>y</i><tt><font size=+1>,</font></tt> <i>cosp</i><tt><font size=+1>,</font></tt> <i>sinp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Icossin2</i> is analogous to <i>icossin,</i> with the angle represented not
+ in degrees but implicitly by the point (<i>x</i>,<i>y</i>). It is to <i>icossin</i>
+ what <tt><font size=+1>atan2</font></tt> is to <tt><font size=+1>atan</font></tt> (see <a href="../man3/sin.html"><i>sin</i>(3)</a>).<br>
+
+ </table>
+ <tt><font size=+1>border(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>r</i><tt><font size=+1>,</font></tt> <i>i</i><tt><font size=+1>,</font></tt> <i>color</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Border</i> draws an outline of rectangle <i>r</i> in the specified <i>color</i>.
+ The outline has width <i>i</i>; if positive, the border goes inside the
+ rectangle; negative, outside. The source is aligned so <i>sp</i> corresponds
+ to <i>r</i><tt><font size=+1>.min</font></tt><i>.<br>
+ </i>
+ </table>
+ <tt><font size=+1>string(</font></tt><i>dst</i><tt><font size=+1>,</font></tt> <i>p</i><tt><font size=+1>,</font></tt> <i>src</i><tt><font size=+1>,</font></tt> <i>sp</i><tt><font size=+1>,</font></tt> <i>font</i><tt><font size=+1>,</font></tt> <i>s</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>String</i> draws in <i>dst</i> characters specified by the string <i>s</i> and <i>font</i>;
+ it is equivalent to a series of calls to <i>gendraw</i> using source
+ <i>src</i> and masks determined by the character shapes. The text is
+ positioned with the left of the first character at <i>p</i><tt><font size=+1>.x</font></tt> and the
+ top of the line of text at <i>p</i><tt><font size=+1>.y</font></tt>. The source is positioned so <i>sp</i>
+ in
+ <i>src</i> corresponds to <i>p</i> in <i>dst</i>. <i>String</i> returns a <tt><font size=+1>Point</font></tt> that is the
+ position of the next character that would be drawn if the string
+ were longer.<br>
+ For characters with undefined or zero-width images in the font,
+ the character at font position 0 (NUL) is drawn.<br>
+ The other string routines are variants of this basic form, and
+ have names that encode their variant behavior. Routines whose
+ names contain <tt><font size=+1>rune</font></tt> accept a string of Runes rather than UTF-encoded
+ bytes. Routines ending in <tt><font size=+1>n</font></tt> accept an argument, <i>n</i>, that defines
+ the number of characters to draw rather than
+ accepting a NUL-terminated string. Routines containing <tt><font size=+1>bg</font></tt> draw
+ the background behind the characters in the specified color (<i>bg</i>)
+ and alignment (<i>bgp</i>); normally the text is drawn leaving the background
+ intact.<br>
+ The routine <i>_string</i> captures all this behavior into a single operator.
+ Whether it draws a UTF string or Rune string depends on whether
+ <i>s</i> or <i>r</i> is null (the string length is always determined by <i>len</i>).
+ If <i>bg</i> is non-null, it is used as a background color. The <i>clipr</i>
+ argument allows further management of clipping when
+ drawing the string; it is intersected with the usual clipping
+ rectangles to further limit the extent of the text.<br>
+
+ </table>
+ <tt><font size=+1>drawsetdebug(</font></tt><i>on</i><tt><font size=+1>)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Turns on or off debugging output (usually to a serial line) according
+ to whether <i>on</i> is non-zero.<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/stringsize.html"><i>stringsize</i>(3)</a>, <a href="../man7/color.html"><i>color</i>(7)</a>, <a href="../man7/utf.html"><i>utf</i>(7)</a>, <a href="../man3/addpt.html"><i>addpt</i>(3)</a>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ T. Porter, T. Duff. &#8220;Compositing Digital Images&#8221;, <i>Computer Graphics</i>
+ (Proc. SIGGRAPH), 18:3, pp. 253-259, 1984.<br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines call the graphics error function on fatal errors.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Anti-aliased characters can be drawn by defining a font with multiple
+ bits per pixel, but there are no anti-aliasing geometric primitives.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/dsa.html b/man/man3/dsa.html
new file mode 100644
index 00000000..765ddd7c
--- /dev/null
+++ b/man/man3/dsa.html
@@ -0,0 +1,172 @@
+<head>
+<title>dsa(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DSA(3)</b><td align=right><b>DSA(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ dsagen, dsasign, dsaverify, dsapuballoc, dsapubfree, dsaprivalloc,
+ dsaprivfree, dsasigalloc, dsasigfree, dsaprivtopub - digital signature
+ algorithm<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>DSApriv* &nbsp;&nbsp;&nbsp;dsagen(DSApub *opub)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>DSAsig* &nbsp;&nbsp;&nbsp;&nbsp;dsasign(DSApriv *k, mpint *m)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dsaverify(DSApub *k, DSAsig *sig, mpint *m)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>DSApub* &nbsp;&nbsp;&nbsp;&nbsp;dsapuballoc(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dsapubfree(DSApub*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>DSApriv* &nbsp;&nbsp;&nbsp;dsaprivalloc(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dsaprivfree(DSApriv*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>DSAsig* &nbsp;&nbsp;&nbsp;&nbsp;dsasigalloc(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dsasigfree(DSAsig*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>DSApub* &nbsp;&nbsp;&nbsp;&nbsp;dsaprivtopub(DSApriv*)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ DSA is the NIST approved digital signature algorithm. The owner
+ of a key publishes the public part of the key:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>struct DSApub<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*p; &nbsp;&nbsp;&nbsp;// modulus<br>
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*q; &nbsp;&nbsp;&nbsp;// group order, q divides p&#8722;1<br>
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*alpha; &nbsp;&nbsp;&nbsp;&nbsp;// group generator<br>
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*key; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// alpha**secret mod p<br>
+
+ </table>
+ };<br>
+ </font></tt>
+ </table>
+ This part can be used for verifying signatures (with <i>dsaverify</i>)
+ created by the owner. The owner signs (with <i>dsasign</i>) using his
+ private key:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>struct DSApriv<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ DSApub &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pub;<br>
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*secret; // (decryption key)<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Keys are generated using <i>dsagen</i>. If <i>dsagen</i>&#8217;s argument <i>opub</i> is
+ <tt><font size=+1>nil</font></tt>, a key is created using a new <tt><font size=+1>p</font></tt> and <tt><font size=+1>q</font></tt> generated by <i>DSAprimes</i>
+ (see <a href="../man3/prime.html"><i>prime</i>(3)</a>). Otherwise, <tt><font size=+1>p</font></tt> and <tt><font size=+1>q</font></tt> are copied from the old key.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Dsaprivtopub</i> returns a newly allocated copy of the public key
+ corresponding to the private key.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routines <i>dsapuballoc</i>, <i>dsapubfree</i>, <i>dsaprivalloc</i>, and <i>dsaprivfree</i>
+ are provided to manage key storage.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Dsasign</i> signs message <i>m</i> using a private key <i>k</i> yielding a<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>struct DSAsig<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*r, *s;<br>
+
+ </table>
+ };<br>
+ </font></tt>
+ </table>
+ <i>Dsaverify</i> returns 0 if the signature is valid and &ndash;1 if not.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routines <i>dsasigalloc</i> and <i>dsasigfree</i> are provided to manage
+ signature storage.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libsec<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mp.html"><i>mp</i>(3)</a>, <a href="../man3/aes.html"><i>aes</i>(3)</a>, <a href="../man3/blowfish.html"><i>blowfish</i>(3)</a>, <a href="../man3/des.html"><i>des</i>(3)</a>, <a href="../man3/rc4.html"><i>rc4</i>(3)</a>, <a href="../man3/rsa.html"><i>rsa</i>(3)</a>, <a href="../man3/sechash.html"><i>sechash</i>(3)</a>,
+ <a href="../man3/prime.html"><i>prime</i>(3)</a>, <a href="../man3/rand.html"><i>rand</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/dup.html b/man/man3/dup.html
new file mode 100644
index 00000000..c601e3b2
--- /dev/null
+++ b/man/man3/dup.html
@@ -0,0 +1,78 @@
+<head>
+<title>dup(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>DUP(3)</b><td align=right><b>DUP(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ dup &ndash; duplicate an open file descriptor<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int dup(int oldfd, int newfd)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Given a file descriptor, <i>oldfd</i>, referring to an open file, <i>dup</i>
+ returns a new file descriptor referring to the same file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If <i>newfd</i> is &ndash;1 the system chooses the lowest available file descriptor.
+ Otherwise, <i>dup</i> will use <i>newfd</i> for the new file descriptor (closing
+ any old file associated with <i>newfd</i>).<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/dup.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Sets <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To avoid name conflicts with the underlying system, <i>dup</i> is a preprocessor
+ macro defined as <i>p9dup</i>; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/elgamal.html b/man/man3/elgamal.html
new file mode 100644
index 00000000..a6518468
--- /dev/null
+++ b/man/man3/elgamal.html
@@ -0,0 +1,174 @@
+<head>
+<title>elgamal(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ELGAMAL(3)</b><td align=right><b>ELGAMAL(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ eggen, egencrypt, egdecrypt, egsign, egverify, egpuballoc, egpubfree,
+ egprivalloc, egprivfree, egsigalloc, egsigfree, egprivtopub -
+ elgamal encryption<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>EGpriv* &nbsp;&nbsp;&nbsp;&nbsp;eggen(int nlen, int nrep)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;egencrypt(EGpub *k, mpint *in, mpint *out)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;egdecrypt(EGpriv *k, mpint *in, mpint *out)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>EGsig* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;egsign(EGpriv *k, mpint *m)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;egverify(EGpub *k, EGsig *sig, mpint *m)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>EGpub* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;egpuballoc(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;egpubfree(EGpub*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>EGpriv* &nbsp;&nbsp;&nbsp;&nbsp;egprivalloc(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;egprivfree(EGpriv*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>EGsig* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;egsigalloc(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;egsigfree(EGsig*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>EGpub* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;egprivtopub(EGpriv*)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Elgamal is a public key encryption and signature algorithm. The
+ owner of a key publishes the public part of the key:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>struct EGpub<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*p; &nbsp;&nbsp;&nbsp;// modulus<br>
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*alpha; &nbsp;&nbsp;&nbsp;&nbsp;// generator<br>
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*key; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// (encryption key) alpha**secret mod p<br>
+
+ </table>
+ };<br>
+ </font></tt>
+ </table>
+ This part can be used for encrypting data (with <i>egencrypt</i>) to
+ be sent to the owner. The owner decrypts (with <i>egdecrypt</i>) using
+ his private key:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>struct EGpriv<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ EGpub &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pub;<br>
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*secret; // (decryption key)<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Keys are generated using <i>eggen</i>. <i>Eggen</i> takes both bit length of
+ the modulus and the number of repetitions of the Miller-Rabin
+ primality test to run. If the latter is 0, it does the default
+ number of rounds. <i>Egprivtopub</i> returns a newly allocated copy of
+ the public key corresponding to the private key.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routines <i>egpuballoc</i>, <i>egpubfree</i>, <i>egprivalloc</i>, and <i>egprivfree</i>
+ are provided to manage key storage.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Egsign</i> signs message <i>m</i> using a private key <i>k</i> yielding a<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>struct EGsig<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*r, *s;<br>
+
+ </table>
+ };<br>
+ </font></tt>
+ </table>
+ <i>Egverify</i> returns 0 if the signature is valid and &ndash;1 if not.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routines <i>egsigalloc</i> and <i>egsigfree</i> are provided to manage signature
+ storage.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libsec<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mp.html"><i>mp</i>(3)</a>, <a href="../man3/aes.html"><i>aes</i>(3)</a>, <a href="../man3/blowfish.html"><i>blowfish</i>(3)</a>, <a href="../man3/des.html"><i>des</i>(3)</a>, <a href="../man3/dsa.html"><i>dsa</i>(3)</a>, <a href="../man3/rc4.html"><i>rc4</i>(3)</a>, <a href="../man3/rsa.html"><i>rsa</i>(3)</a>, <a href="../man3/sechash.html"><i>sechash</i>(3)</a>,
+ <a href="../man3/prime.html"><i>prime</i>(3)</a>, <a href="../man3/rand.html"><i>rand</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/encode.html b/man/man3/encode.html
new file mode 100644
index 00000000..c7a8132c
--- /dev/null
+++ b/man/man3/encode.html
@@ -0,0 +1,109 @@
+<head>
+<title>encode(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ENCODE(3)</b><td align=right><b>ENCODE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ dec64, enc64, dec32, enc32, dec16, enc16, encodefmt &ndash; encoding
+ byte arrays as strings<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;dec64(uchar *out, int lim, char *in, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;enc64(char *out, int lim, uchar *in, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;dec32(uchar *out, int lim, char *in, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;enc32(char *out, int lim, uchar *in, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;dec16(uchar *out, int lim, char *in, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;enc16(char *out, int lim, uchar *in, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;encodefmt(Fmt*)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Enc16</i>, <i>enc32</i> and <i>enc64</i> create null terminated strings. They return
+ the size of the encoded string (without the null) or -1 if the
+ encoding fails. The encoding fails if <i>lim</i>, the length of the output
+ buffer, is too small.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Dec16</i>, <i>dec32</i> and <i>dec64</i> return the number of bytes decoded or -1
+ if the decoding fails. The decoding fails if the output buffer
+ is not large enough or, for base 32, if the input buffer length
+ is not a multiple of 8.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Encodefmt</i> can be used with <a href="../man3/fmtinstall.html"><i>fmtinstall</i>(3)</a> and <a href="../man3/print.html"><i>print</i>(3)</a> to print
+ encoded representations of byte arrays. The verbs are<br>
+ <tt><font size=+1>H</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;base 16 (i.e. hexadecimal). The default encoding is in upper
+ case. The <tt><font size=+1>l</font></tt> flag forces lower case.<br>
+ <tt><font size=+1>&lt;</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;base 32<br>
+ <tt><font size=+1>[</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;base 64 (same as MIME)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The length of the array is specified as <i>f2</i>. For example, to display
+ a 15 byte array as hex:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>char x[15];<br>
+ fmtinstall('H', encodefmt);<br>
+ print(&quot;%.*H\n&quot;, sizeof x, x);<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/u32.c<br>
+ /usr/local/plan9/src/lib9/u64.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/errstr.html b/man/man3/errstr.html
new file mode 100644
index 00000000..547efc8d
--- /dev/null
+++ b/man/man3/errstr.html
@@ -0,0 +1,121 @@
+<head>
+<title>errstr(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ERRSTR(3)</b><td align=right><b>ERRSTR(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ errstr, rerrstr, werrstr &ndash; description of last system call error<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int errstr(char *err, uint nerr)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void rerrstr(char *err, uint nerr)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void werrstr(char *fmt, ...)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ When a system call fails it returns &ndash;1 and records a null terminated
+ string describing the error in a per-process buffer. <i>Errstr</i> swaps
+ the contents of that buffer with the contents of the array <i>err</i>.
+ <i>Errstr</i> will write at most <i>nerr</i> bytes into <i>err</i>; if the per-process
+ error string does not fit, it is silently truncated at a UTF
+ character boundary. The returned string is NUL-terminated. Usually
+ <i>errstr</i> will be called with an empty string, but the exchange property
+ provides a mechanism for libraries to set the return value for
+ the next call to <i>errstr</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The per-process buffer is <tt><font size=+1>ERRMAX</font></tt> bytes long. Any error string
+ provided by the user will be truncated at <tt><font size=+1>ERRMAX&#8722;1</font></tt> bytes. <tt><font size=+1>ERRMAX</font></tt>
+ is defined in <tt><font size=+1>&lt;libc.h&gt;</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If no system call has generated an error since the last call to
+ <i>errstr</i> with an empty string, the result is an empty string.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The verb <tt><font size=+1>r</font></tt> in <a href="../man3/print.html"><i>print</i>(3)</a> calls <i>errstr</i> and outputs the error string.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Rerrstr</i> reads the error string but does not modify the per-process
+ buffer, so a subsequent <i>errstr</i> will recover the same string.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Werrstr</i> takes a <i>print</i> style format as its argument and uses it
+ to format a string to pass to <i>errstr</i>. The string returned from
+ <i>errstr</i> is discarded.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The error string is maintained in parallel with the Unix error
+ number <i>errno</i>. Changing <i>errno</i> will reset the error string, and
+ changing the error string via <i>errstr</i> or <i>werrstr</i> will reset <i>errno</i>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/errstr.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Errstr</i> always returns 0.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a>, <a href="../man3/perror.html"><i>perror</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The implementation sets <i>errno</i> to the (somewhat arbitrary) constant
+ 0x19283745 when the error string is valid. When <i>errno</i> is set to
+ other values, the error string is synthesized using <a href="../man3/strerror.html"><i>strerror</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/event.html b/man/man3/event.html
new file mode 100644
index 00000000..87cff2fd
--- /dev/null
+++ b/man/man3/event.html
@@ -0,0 +1,390 @@
+<head>
+<title>event(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>EVENT(3)</b><td align=right><b>EVENT(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ event, einit, estart, estartfn, etimer, eread, emouse, ekbd, ecanread,
+ ecanmouse, ecankbd, ereadmouse, eatomouse, eresized, egetrect,
+ edrawgetrect, emenuhit, emoveto, esetcursor, Event, Mouse, Menu
+ &ndash; graphics events<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &nbsp;&nbsp;&nbsp;&lt;u.h&gt;<br>
+ #include &nbsp;&nbsp;&nbsp;&lt;libc.h&gt;<br>
+ #include &nbsp;&nbsp;&nbsp;&lt;draw.h&gt;<br>
+ #include &nbsp;&nbsp;&nbsp;&lt;event.h&gt;<br>
+ #include &nbsp;&nbsp;&nbsp;&lt;cursor.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;einit(ulong keys)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;event(Event *e)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Mouse &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;emouse(void)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ekbd(void)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ecanmouse(void)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ecankbd(void)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ereadmouse(Mouse *m)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eatomouse(Mouse *m, char *buf, int n)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;estart(ulong key, int fd, int n)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;estartfn(int id, ulong key, int fd, int n,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int (*fn)(Event*, uchar*, int))<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;etimer(ulong key, int n)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eread(ulong keys, Event *e)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ecanread(ulong keys)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eresized(int new)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rectangle egetrect(int but, Mouse *m)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;edrawgetrect(Rectangle r, int up)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;emenuhit(int but, Mouse *m, Menu *menu)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;emoveto(Point p)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;esetcursor(Cursor *c)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>extern Mouse &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*mouse<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>enum{<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Emouse = 1,<br>
+ Ekeyboard = 2,<br>
+
+ </table>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines provide an interface to multiple sources of input
+ for unthreaded programs. Threaded programs (see <a href="../man3/thread.html"><i>thread</i>(3)</a>) should
+ instead use the threaded mouse and keyboard interface described
+ in <a href="../man3/mouse.html"><i>mouse</i>(3)</a> and <a href="../man3/keyboard.html"><i>keyboard</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Einit</i> must be called first. If the argument to <i>einit</i> has the <tt><font size=+1>Emouse</font></tt>
+ and <tt><font size=+1>Ekeyboard</font></tt> bits set, the mouse and keyboard events will be
+ enabled; in this case, <i>initdraw</i> (see <a href="../man3/graphics.html"><i>graphics</i>(3)</a>) must have already
+ been called. The user must provide a function called <i>eresized</i>
+ to be called whenever the window in which the process
+ is running has been resized; the argument <i>new</i> is a flag specifying
+ whether the program must call <i>getwindow</i> (see <a href="../man3/graphics.html"><i>graphics</i>(3)</a>) to re-establish
+ a connection to its window. After resizing (and perhaps calling
+ <i>getwindow</i>), the global variable <tt><font size=+1>screen</font></tt> will be updated to point
+ to the new window&#8217;s <tt><font size=+1>Image</font></tt> structure.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ As characters are typed on the keyboard, they are read by the
+ event mechanism and put in a queue. <i>Ekbd</i> returns the next rune
+ from the queue, blocking until the queue is non-empty. The characters
+ are read in raw mode, so they are available as soon as a complete
+ rune is typed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When the mouse moves or a mouse button is pressed or released,
+ a new mouse event is queued by the event mechanism. <i>Emouse</i> returns
+ the next mouse event from the queue, blocking until the queue
+ is non-empty. <i>Emouse</i> returns a <tt><font size=+1>Mouse</font></tt> structure:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>struct Mouse<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;buttons;<br>
+ Point xy;<br>
+ ulong msec;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <tt><font size=+1>Buttons&amp;1</font></tt> is set when the left mouse button is pressed, <tt><font size=+1>buttons&amp;2</font></tt>
+ when the middle button is pressed, and <tt><font size=+1>buttons&amp;4</font></tt> when the right
+ button is pressed. The current mouse position is always returned
+ in <tt><font size=+1>xy</font></tt>. <tt><font size=+1>Msec</font></tt> is a time stamp in units of milliseconds.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ecankbd</i> and <i>ecanmouse</i> return non-zero when there are keyboard
+ or mouse events available to be read.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ereadmouse</i> reads the next mouse event from the file descriptor
+ connected to the mouse, converts the textual data into a <tt><font size=+1>Mouse</font></tt>
+ structure by calling <i>eatomouse</i> with the buffer and count from
+ the read call, and returns the number of bytes read, or &ndash;1 for
+ an error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Estart</i> can be used to register additional file descriptors to
+ scan for input. It takes as arguments the file descriptor to register,
+ the maximum length of an event message on that descriptor, and
+ a key to be used in accessing the event. The key must be a power
+ of 2 and must not conflict with any previous keys. If a zero
+ key is given, a key will be allocated and returned. <i>Estartfn</i> is
+ similar to <i>estart</i>, but processes the data received by calling
+ <i>fn</i> before returning the event to the user. The function <i>fn</i> is
+ called with the <tt><font size=+1>id</font></tt> of the event; it should return <tt><font size=+1>id</font></tt> if the event
+ is to be passed to the user, <tt><font size=+1>0</font></tt> if it is to be ignored. The variable
+ <tt><font size=+1>Event.v
+ </font></tt>can be used by <i>fn</i> to attach an arbitrary data item to the returned
+ <tt><font size=+1>Event</font></tt> structure. <tt><font size=+1>&nbsp;&nbsp;&nbsp;Ekeyboard</font></tt> and <tt><font size=+1>Emouse</font></tt> are the keyboard and mouse
+ event keys.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Etimer</i> starts a repeating timer with a period of <i>n</i> milliseconds;
+ it returns the timer event key, or zero if it fails. Only one
+ timer can be started. Extra timer events are not queued and the
+ timer channel has no associated data.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Eread</i> waits for the next event specified by the mask <i>keys</i> of event
+ keys submitted to <i>estart</i>. It fills in the appropriate field of
+ the argument <tt><font size=+1>Event</font></tt> structure, which looks like:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>struct Event<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;kbdc;<br>
+ Mouse mouse;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;n;<br>
+ void &nbsp;&nbsp;&nbsp;*v;<br>
+ uchar data[EMAXMSG];<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <tt><font size=+1>Data</font></tt> is an array which is large enough to hold a 9P message. <i>Eread</i>
+ returns the key for the event which was chosen. For example, if
+ a mouse event was read, <tt><font size=+1>Emouse</font></tt> will be returned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Event</i> waits for the next event of any kind. The return is the
+ same as for <i>eread</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ As described in <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, the graphics functions are buffered.
+ <i>Event</i>, <i>eread</i>, <i>emouse</i>, and <i>ekbd</i> all cause a buffer flush unless
+ there is an event of the appropriate type already queued.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ecanread</i> checks whether a call to <tt><font size=+1>eread(keys)</font></tt> would block, returning
+ 0 if it would, 1 if it would not.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Getrect</i> prompts the user to sweep a rectangle. It should be called
+ with <i>m</i> holding the mouse event that triggered the <i>egetrect</i> (or,
+ if none, a <tt><font size=+1>Mouse</font></tt> with <tt><font size=+1>buttons</font></tt> set to 7). It changes to the sweep
+ cursor, waits for the buttons all to be released, and then waits
+ for button number <i>but</i> to be pressed, marking the initial
+ corner. If another button is pressed instead, <i>egetrect</i> returns
+ a rectangle with zero for both corners, after waiting for all
+ the buttons to be released. Otherwise, <i>egetrect</i> continually draws
+ the swept rectangle until the button is released again, and returns
+ the swept rectangle. The mouse structure pointed to by <i>m</i> will
+ contain the final mouse event.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Egetrect</i> uses successive calls to <i>edrawgetrect</i> to maintain the
+ red rectangle showing the sweep-in-progress. The rectangle to
+ be drawn is specified by <i>rc</i> and the <i>up</i> parameter says whether
+ to draw (1) or erase (0) the rectangle.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Emenuhit</i> displays a menu and returns a selected menu item number.
+ It should be called with <i>m</i> holding the mouse event that triggered
+ the <i>emenuhit</i>; it will call <i>emouse</i> to update it. A <tt><font size=+1>Menu</font></tt> is a structure:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>struct Menu<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char &nbsp;&nbsp;&nbsp;**item;<br>
+ char &nbsp;&nbsp;&nbsp;*(*gen)(int);<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;lasthit;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ If <tt><font size=+1>item</font></tt> is nonzero, it should be a null-terminated array of the
+ character strings to be displayed as menu items. Otherwise, <tt><font size=+1>gen</font></tt>
+ should be a function that, given an item number, returns the character
+ string for that item, or zero if the number is past the end of
+ the list. Items are numbered starting at zero. <i>Menuhit
+ </i>waits until <i>but</i> is released, and then returns the number of the
+ selection, or &ndash;1 for no selection. The <i>m</i> argument is filled in
+ with the final mouse event.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Emoveto</i> moves the mouse cursor to the position <tt><font size=+1>p</font></tt> on the screen.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Esetcursor</i> changes the cursor image to that described by the <tt><font size=+1>Cursor</font></tt>
+ <i>c</i> (see <a href="../man3/mouse.html"><i>mouse</i>(3)</a>). If <tt><font size=+1>c</font></tt> is nil, it restores the image to the default
+ arrow.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/rio.html"><i>rio</i>(1)</a>, <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/plumb.html"><i>plumb</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Etimer</i> and <i>estart</i> are unimplemented.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/exec.html b/man/man3/exec.html
new file mode 100644
index 00000000..e5397352
--- /dev/null
+++ b/man/man3/exec.html
@@ -0,0 +1,146 @@
+<head>
+<title>exec(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>EXEC(3)</b><td align=right><b>EXEC(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ exec, execl &ndash; execute a file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int exec(char *name, char* argv[])<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int execl(char *name, ...)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Exec</i> and <i>execl</i> overlay the calling process with the named file,
+ then transfer to the entry point of the image of the file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Name</i> points to the name of the file to be executed; it must not
+ be a directory, and the permissions must allow the current user
+ to execute it (see <a href="../man3/stat.html"><i>stat</i>(3)</a>). It should also be a valid binary
+ image, as defined by the local operating system, or a shell script
+ (see <a href="../man1/rc.html"><i>rc</i>(1)</a>). The first line of a shell script must begin with
+ <tt><font size=+1>#!</font></tt> followed
+ by the name of the program to interpret the file and any initial
+ arguments to that program, for example<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#!/bin/rc<br>
+ ls | mc<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ When a C program is executed, it is called as follows:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>void main(int argc, char *argv[])<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <i>Argv</i> is a copy of the array of argument pointers passed to <i>exec</i>;
+ that array must end in a null pointer, and <i>argc</i> is the number
+ of elements before the null pointer. By convention, the first
+ argument should be the name of the program to be executed. <i>Execl</i>
+ is like <i>exec</i> except that <i>argv</i> will be an array of the parameters
+ that follow <i>name</i> in the call. The last argument to <i>execl</i> must
+ be a null pointer.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For a file beginning <tt><font size=+1>#!</font></tt>, the arguments passed to the program (<tt><font size=+1>/bin/rc</font></tt>
+ in the example above) will be the name of the file being executed,
+ any arguments on the <tt><font size=+1>#!</font></tt> line, the name of the file again, and
+ finally the second and subsequent arguments given to the original
+ <i>exec</i> call. The result honors the two conventions
+ of a program accepting as argument a file to be interpreted and
+ <tt><font size=+1>argv[0]</font></tt> naming the file being executed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Most attributes of the calling process are carried into the result;
+ in particular, files remain open across <i>exec</i> (except those opened
+ with <tt><font size=+1>OCEXEC</font></tt> OR&#8217;d into the open mode; see <a href="../man3/open.html"><i>open</i>(3)</a>); and the working
+ directory and environment (see <a href="../man3/getenv.html"><i>getenv</i>(3)</a>) remain the same. However,
+ a newly <i>exec&#8217;ed</i> process has no notification
+ handlers (see <a href="../man3/notify.html"><i>notify</i>(3)</a>).<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/exec.c<br>
+ /usr/local/plan9/src/lib9/execl.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/prof.html"><i>prof</i>(1)</a>, <a href="../man3/intro.html"><i>intro</i>(3)</a>, <a href="../man3/stat.html"><i>stat</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If these functions fail, they return and set <i>errstr</i>. There can
+ be no return from a successful <i>exec</i> or <i>execl</i>; the calling image
+ is lost.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ On Unix, unlike on Plan 9, <i>exec</i> and <i>execl</i> use the user&#8217;s current
+ path to locate <i>prog</i>. This is a clumsy way to deal with Unix&#8217;s
+ lack of a union directory for <tt><font size=+1>/bin</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To avoid name conflicts with the underlying system, <i>exec</i> and <i>execl</i>
+ are preprocessor macros defined as <i>p9exec</i> and <i>p9execl</i>; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/exits.html b/man/man3/exits.html
new file mode 100644
index 00000000..cc94a468
--- /dev/null
+++ b/man/man3/exits.html
@@ -0,0 +1,126 @@
+<head>
+<title>exits(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>EXITS(3)</b><td align=right><b>EXITS(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ exits, _exits, atexit, atexitdont, terminate &ndash; terminate process,
+ process cleanup<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void _exits(char *msg)<br>
+ void exits(char *msg)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;atexit(void(*)(void))<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void atexitdont(void(*)(void))<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Exits</i> is the conventional way to terminate a process. <i>_Exits</i> also
+ terminates a process but does not call the registered <i>atexit</i> handlers
+ (<i>q.v.</i>). They can never return.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Msg</i> conventionally includes a brief (maximum length <tt><font size=+1>ERRLEN</font></tt>) explanation
+ of the reason for exiting, or a null pointer or empty string to
+ indicate normal termination. The string is passed to the parent
+ process, prefixed by the name and process id of the exiting process,
+ when the parent does a <a href="../man3/wait.html"><i>wait</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Before calling <i>_exits</i> with <i>msg</i> as an argument, <i>exits</i> calls in
+ reverse order all the functions recorded by <i>atexit</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Atexit</i> records <i>fn</i> as a function to be called by <i>exits</i>. It returns
+ zero if it failed, nonzero otherwise. A typical use is to register
+ a cleanup routine for an I/O package. To simplify programs that
+ fork or share memory, <i>exits</i> only calls those <i>atexit</i>-registered
+ functions that were registered by the same process as that calling
+ <i>exits</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Calling <i>atexit</i> twice (or more) with the same function argument
+ causes <i>exits</i> to invoke the function twice (or more).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There is a limit to the number of exit functions that will be
+ recorded; <i>atexit</i> returns 0 if that limit has been reached.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Atexitdont</i> cancels a previous registration of an exit function.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/atexit.c<br>
+ /usr/local/plan9/src/lib9/_exits.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man2/fork.html"><i>fork</i>(2)</a>, <a href="../man3/wait.html"><i>wait</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Because of limitations of Unix, the exit status of a process can
+ only be an 8-bit integer. Exit status 0 is used for empty exit
+ messages, and 1 for non-empty messages.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Exit codes 97 through 99 are used by the thread library to signal
+ internal synchronization errors between the main program and a
+ proxy process that implements backgrounding.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To avoid name conflicts with the underlying system, <i>atexit</i> and
+ <i>atexitdont</i> are preprocessor macros defined as <i>p9atexit</i> and <i>p9atexitdont</i>;
+ see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/fcall.html b/man/man3/fcall.html
new file mode 100644
index 00000000..926b47dc
--- /dev/null
+++ b/man/man3/fcall.html
@@ -0,0 +1,274 @@
+<head>
+<title>fcall(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FCALL(3)</b><td align=right><b>FCALL(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Fcall, convS2M, convD2M, convM2S, convM2D, fcallfmt, dirfmt, dirmodefmt,
+ read9pmsg, statcheck, sizeS2M, sizeD2M &ndash; interface to Plan 9 File
+ protocol<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;fcall.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uint convS2M(Fcall *f, uchar *ap, uint nap)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uint convD2M(Dir *d, uchar *ap, uint nap)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uint convM2S(uchar *ap, uint nap, Fcall *f)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uint convM2D(uchar *ap, uint nap, Dir *d, char *strs)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int dirfmt(Fmt*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int fcallfmt(Fmt*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int dirmodefmt(Fmt*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int read9pmsg(int fd, uchar *buf, uint nbuf)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int statcheck(uchar *buf, uint nbuf)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uint sizeS2M(Fcall *f)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uint sizeD2M(Dir *d)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines convert messages in the machine-independent format
+ of the Plan 9 file protocol, 9P, to and from a more convenient
+ form, an <tt><font size=+1>Fcall</font></tt> structure:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>#define MAXWELEM 16<br>
+ typedef<br>
+ struct Fcall<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar type;<br>
+ u32int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fid;<br>
+ ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tag;<br>
+ union {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ struct {<br>
+ u32int msize; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tversion, Rversion */<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;*version; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tversion, Rversion */<br>
+ };<br>
+ struct {<br>
+ ushort oldtag; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tflush */<br>
+ };<br>
+ struct {<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;*ename; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Rerror */<br>
+ };<br>
+ struct {<br>
+ Qid &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;qid; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Rattach, Ropen, Rcreate */<br>
+ u32int iounit; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Ropen, Rcreate */<br>
+ };<br>
+ struct {<br>
+ Qid &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aqid; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Rauth */<br>
+ };<br>
+ struct {<br>
+ u32int afid; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tauth, Tattach */<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;*uname; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tauth, Tattach */<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;*aname; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tauth, Tattach */<br>
+ };<br>
+ struct {<br>
+ u32int perm; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tcreate */ <br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;*name; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tcreate */<br>
+ uchar &nbsp;&nbsp;&nbsp;mode; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tcreate, Topen */<br>
+ };<br>
+ struct {<br>
+ u32int newfid; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Twalk */<br>
+ ushort nwname; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Twalk */<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;*wname[MAXWELEM]; &nbsp;&nbsp;&nbsp;/* Twalk */<br>
+ };<br>
+ struct {<br>
+ ushort nwqid; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Rwalk */<br>
+ Qid &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wqid[MAXWELEM]; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Rwalk */<br>
+ };<br>
+ struct {<br>
+ vlong &nbsp;&nbsp;&nbsp;offset; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tread, Twrite */<br>
+ u32int count; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tread, Twrite, Rread */<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;*data; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Twrite, Rread */<br>
+ };<br>
+ struct {<br>
+ ushort nstat; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Twstat, Rstat */<br>
+ uchar &nbsp;&nbsp;&nbsp;*stat; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Twstat, Rstat */<br>
+ };<br>
+
+ </table>
+ };<br>
+
+ </table>
+ } Fcall;<br>
+ /* these are implemented as macros */<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GBIT8(uchar*)<br>
+ ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GBIT16(uchar*)<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GBIT32(uchar*)<br>
+ vlong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GBIT64(uchar*)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PBIT8(uchar*, uchar)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PBIT16(uchar*, ushort)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PBIT32(uchar*, ulong)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PBIT64(uchar*, vlong)<br>
+ #define &nbsp;&nbsp;&nbsp;&nbsp;BIT8SZ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1<br>
+ #define &nbsp;&nbsp;&nbsp;&nbsp;BIT16SZ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2<br>
+ #define &nbsp;&nbsp;&nbsp;&nbsp;BIT32SZ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4<br>
+ #define &nbsp;&nbsp;&nbsp;&nbsp;BIT64SZ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ This structure is defined in <tt><font size=+1>&lt;fcall.h&gt;</font></tt>. See section 5 for a full
+ description of 9P messages and their encoding. For all message
+ types, the <tt><font size=+1>type</font></tt> field of an <tt><font size=+1>Fcall</font></tt> holds one of <tt><font size=+1>Tversion</font></tt>, <tt><font size=+1>Rversion</font></tt>,
+ <tt><font size=+1>Tattach</font></tt>, <tt><font size=+1>Rattach</font></tt>, etc. (defined in an enumerated type in <tt><font size=+1>&lt;fcall.h&gt;</font></tt>).
+ <tt><font size=+1>Fid</font></tt> is used by most messages, and
+ <tt><font size=+1>tag</font></tt> is used by all messages. The other fields are used selectively
+ by the message types given in comments.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>ConvM2S</i> takes a 9P message at <i>ap</i> of length <i>nap</i>, and uses it to
+ fill in <tt><font size=+1>Fcall</font></tt> structure <i>f</i>. If the passed message including any
+ data for <tt><font size=+1>Twrite</font></tt> and <tt><font size=+1>Rread</font></tt> messages is formatted properly, the
+ return value is the number of bytes the message occupied in the
+ buffer <i>ap</i>, which will always be less than or equal to <i>nap</i>;
+ otherwise it is 0. For <tt><font size=+1>Twrite</font></tt> and <tt><font size=+1>Tread</font></tt> messages, <tt><font size=+1>data</font></tt> is set
+ to a pointer into the argument message, not a copy.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>ConvS2M</i> does the reverse conversion, turning <i>f</i> into a message
+ starting at <i>ap</i>. The length of the resulting message is returned.
+ For <tt><font size=+1>Twrite</font></tt> and <tt><font size=+1>Rread</font></tt> messages, <tt><font size=+1>count</font></tt> bytes starting at <tt><font size=+1>data</font></tt> are
+ copied into the message.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The constant <tt><font size=+1>IOHDRSZ</font></tt> is a suitable amount of buffer to reserve
+ for storing the 9P header; the data portion of a <tt><font size=+1>Twrite</font></tt> or <tt><font size=+1>Rread</font></tt>
+ will be no more than the buffer size negotiated in the <tt><font size=+1>Tversion/Rversion</font></tt>
+ exchange, minus <tt><font size=+1>IOHDRSZ</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routine <i>sizeS2M</i> returns the number of bytes required to store
+ the machine-independent representation of the <tt><font size=+1>Fcall</font></tt> structure
+ <i>f</i>, including its initial 32-bit size field. In other words, it
+ reports the number of bytes produced by a successful call to <i>convS2M</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Another structure is <tt><font size=+1>Dir</font></tt>, used by the routines described in <a href="../man3/stat.html"><i>stat</i>(3)</a>.
+ <i>ConvM2D</i> converts the machine-independent form starting at <i>ap</i> into
+ <i>d</i> and returns the length of the machine-independent encoding.
+ The strings in the returned <tt><font size=+1>Dir</font></tt> structure are stored at successive
+ locations starting at <tt><font size=+1>strs</font></tt>. Usually <tt><font size=+1>strs</font></tt> will
+ point to storage immediately after the <tt><font size=+1>Dir</font></tt> itself. It can also
+ be a <tt><font size=+1>nil</font></tt> pointer, in which case the string pointers in the returned
+ <tt><font size=+1>Dir</font></tt> are all <tt><font size=+1>nil</font></tt>; however, the return value still includes their
+ length.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>ConvD2M</i> does the reverse translation, also returning the length
+ of the encoding. If the buffer is too short, the return value
+ will be <tt><font size=+1>BIT16SZ</font></tt> and the correct size will be returned in the first
+ <tt><font size=+1>BIT16SZ</font></tt> bytes. (If the buffer is less that <tt><font size=+1>BIT16SZ</font></tt>, the return
+ value is zero; therefore a correct test for complete packing of
+ the
+ message is that the return value is greater than <tt><font size=+1>BIT16SZ</font></tt>). The
+ macro <tt><font size=+1>GBIT16</font></tt> can be used to extract the correct value. The related
+ macros with different sizes retrieve the corresponding-sized quantities.
+ <tt><font size=+1>PBIT16</font></tt> and its brethren place values in messages. With the exception
+ of handling short buffers in <i>convD2M</i>,
+ these macros are not usually needed except by internal routines.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Analogous to <i>sizeS2M</i>, <i>sizeD2M</i> returns the number of bytes required
+ to store the machine-independent representation of the <tt><font size=+1>Dir</font></tt> structure
+ <i>d</i>, including its initial 16-bit size field.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routine <tt><font size=+1>statcheck</font></tt> checks whether the <i>nbuf</i> bytes of <i>buf</i> contain
+ a validly formatted machine-independent <tt><font size=+1>Dir</font></tt> entry suitable as
+ an argument, for example, for the <tt><font size=+1>wstat</font></tt> (see <a href="../man3/stat.html"><i>stat</i>(3)</a>) system call.
+ It checks that the sizes of all the elements of the the entry
+ sum to exactly <i>nbuf</i>, which is a simple but effective test
+ of validity. <i>Nbuf</i> and <i>buf</i> should include the second two-byte (16-bit)
+ length field that precedes the entry when formatted in a 9P message
+ (see <i>stat</i>(9p)); in other words, <i>nbuf</i> is 2 plus the sum of the
+ sizes of the entry itself. <i>Statcheck</i> also verifies that the length
+ field has the correct value (that is, <i>nbuf</i><tt><font size=+1>&#8722;2</font></tt>). It returns <tt><font size=+1>0
+ </font></tt>for a valid entry and <tt><font size=+1>&#8722;1</font></tt> for an incorrectly formatted entry.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Dirfmt</i>, <i>fcallfmt</i>, and <i>dirmodefmt</i> are formatting routines, suitable
+ for <a href="../man3/fmtinstall.html"><i>fmtinstall</i>(3)</a>. They convert <tt><font size=+1>Dir*</font></tt>, <tt><font size=+1>Fcall*</font></tt>, and <tt><font size=+1>long</font></tt> values
+ into string representations of the directory buffer, <tt><font size=+1>Fcall</font></tt> buffer,
+ or file mode value. <i>Fcallfmt</i> assumes that <i>dirfmt</i> has been installed
+ with format letter <tt><font size=+1>D</font></tt> and <i>dirmodefmt</i> with format
+ letter <tt><font size=+1>M</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Read9pmsg</i> calls <a href="../man3/read.html"><i>read</i>(3)</a> multiple times, if necessary, to read
+ an entire 9P message into <tt><font size=+1>buf</font></tt>. The return value is 0 for end of
+ file, or -1 for error; it does not return partial messages.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a>, <a href="../man3/9p.html"><i>9p</i>(3)</a>, <a href="../man3/stat.html"><i>stat</i>(3)</a>, <i>intro</i>(9p)<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/flate.html b/man/man3/flate.html
new file mode 100644
index 00000000..41591034
--- /dev/null
+++ b/man/man3/flate.html
@@ -0,0 +1,333 @@
+<head>
+<title>flate(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FLATE(3)</b><td align=right><b>FLATE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ deflateinit, deflate, deflatezlib, deflateblock, deflatezlibblock,
+ inflateinit, inflate, inflatezlib, inflateblock, inflatezlibblock,
+ flateerr, mkcrctab, blockcrc, adler32 &ndash; deflate compression<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;flate.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deflateinit(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deflate(void *wr, int (*w)(void*,void*,int),<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ void *rr, int (*r)(void*,void*,int),<br>
+ int level, int debug)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deflatezlib(void *wr, int (*w)(void*,void*,int),<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ void *rr, int (*r)(void*,void*,int),<br>
+ int level, int debug)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deflateblock(uchar *dst, int dsize,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *src, int ssize,<br>
+ int level, int debug)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deflatezlibblock(uchar *dst, int dsize,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *src, int ssize,<br>
+ int level, int debug)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inflateinit(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inflate(void *wr, int (*w)(void*, void*, int),<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ void *getr, int (*get)(void*))
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inflatezlib(void *wr, int (*w)(void*, void*, int),<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ void *getr, int (*get)(void*))
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inflateblock(uchar *dst, int dsize,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *src, int ssize)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inflatezlibblock(uchar *dst, int dsize,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *src, int ssize)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>char &nbsp;&nbsp;&nbsp;&nbsp;*flateerr(int error)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;*mkcrctab(ulong poly)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;blockcrc(ulong *tab, ulong crc, void *buf, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;adler32(ulong adler, void *buf, int n)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines compress and decompress data using the deflate
+ compression algorithm, which is used for most gzip, zip, and zlib
+ files.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Deflate</i> compresses input data retrieved by calls to <i>r</i> with arguments
+ <i>rr</i>, an input buffer, and a count of bytes to read. <i>R</i> should return
+ the number of bytes read; end of input is signaled by returning
+ zero, an input error by returning a negative number. The compressed
+ output is written to <i>w</i> with arguments <i>wr</i>, the
+ output data, and the number of bytes to write. <i>W</i> should return
+ the number of bytes written; writing fewer than the requested
+ number of bytes is an error. <i>Level</i> indicates the amount of computation
+ deflate should do while compressing the data. Higher <i>levels</i> usually
+ take more time and produce smaller outputs. Valid
+ values are 1 to 9, inclusive; 6 is a good compromise. If <i>debug</i>
+ is non-zero, cryptic debugging information is produced on standard
+ error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Inflate</i> reverses the process, converting compressed data into
+ uncompressed output. Input is retrieved one byte at a time by
+ calling <i>get</i> with the argument <i>getr</i>. End of input of signaled by
+ returning a negative value. The uncompressed output is written
+ to <i>w</i>, which has the same interface as for <i>deflate</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Deflateblock</i> and <i>inflateblock</i> operate on blocks of memory but
+ are otherwise similar to <i>deflate</i> and <i>inflate</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The zlib functions are similar, but operate on files with a zlib
+ header and trailer.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Deflateinit</i> or <i>inflateinit</i> must be called once before any call
+ to the corresponding routines.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the above routines fail, they return a negative number indicating
+ the problem. The possible values are <i>FlateNoMem</i>, <i>FlateInputFail</i>,
+ <i>FlateOutputFail</i>, <i>FlateCorrupted</i>, and <i>FlateInternal</i>. <i>Flateerr</i> converts
+ the number into a printable message. <i>FlateOk</i> is defined to be
+ zero, the successful return value for <i>deflateinit</i>,
+ <i>deflate</i>, <i>deflatezlib</i>, <i>inflateinit</i>, <i>inflate</i>, and <i>inflatezlib</i>. The
+ block functions return the number of bytes produced when they
+ succeed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mkcrctab</i> allocates (using <a href="../man3/malloc.html"><i>malloc</i>(3)</a>), initializes, and returns
+ a table for rapid computation of 32 bit CRC values using the polynomial
+ <i>poly</i>. <i>Blockcrc</i> uses <i>tab</i>, a table returned by <i>mkcrctab</i>, to update
+ <i>crc</i> for the <i>n</i> bytes of data in <i>buf</i>, and returns the new value.
+ <i>Crc</i> should initially be zero. <i>Blockcrc</i> pre-conditions and
+ post-conditions <i>crc</i> by ones complementation.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Adler32</i> updates the Adler 32-bit checksum of the <i>n</i> butes of data
+ in <i>buf.</i> The initial value of <i>adler</i> (that is, its value after seeing
+ zero bytes) should be 1.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libflate<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/fmtinstall.html b/man/man3/fmtinstall.html
new file mode 100644
index 00000000..848c1333
--- /dev/null
+++ b/man/man3/fmtinstall.html
@@ -0,0 +1,339 @@
+<head>
+<title>fmtinstall(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FMTINSTALL(3)</b><td align=right><b>FMTINSTALL(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ fmtinstall, dofmt, dorfmt, fmtprint, fmtvprint, fmtrune, fmtstrcpy,
+ fmtrunestrcpy, fmtfdinit, fmtfdflush, fmtstrinit, fmtstrflush,
+ runefmtstrinit, runefmtstrflush, errfmt &ndash; support for user-defined
+ print formats and output routines<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>typedef struct Fmt &nbsp;&nbsp;&nbsp;Fmt;<br>
+ struct Fmt{<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;runes; &nbsp;&nbsp;&nbsp;/* output buffer is runes or chars? */<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*start; /* of buffer */<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*to; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* current place in the buffer */<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*stop; &nbsp;&nbsp;&nbsp;/* end of the buffer; overwritten if flush fails */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(*flush)(Fmt*);/* called when to == stop */<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*farg; &nbsp;&nbsp;&nbsp;/* to make flush a closure */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nfmt; &nbsp;&nbsp;&nbsp;&nbsp;/* num chars formatted so far */<br>
+ va_list args; &nbsp;&nbsp;&nbsp;&nbsp;/* args passed to dofmt */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;r; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* % format Rune */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prec;<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;flags;<br>
+
+ </table>
+ };<br>
+ enum{<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ FmtWidth &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 1,<br>
+ FmtLeft &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= FmtWidth &lt;&lt; 1,<br>
+ FmtPrec &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= FmtLeft &lt;&lt; 1,<br>
+ FmtSharp &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= FmtPrec &lt;&lt; 1,<br>
+ FmtSpace &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= FmtSharp &lt;&lt; 1,<br>
+ FmtSign &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= FmtSpace &lt;&lt; 1,<br>
+ FmtZero &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= FmtSign &lt;&lt; 1,<br>
+ FmtUnsigned = FmtZero &lt;&lt; 1,<br>
+ FmtShort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= FmtUnsigned &lt;&lt; 1,<br>
+ FmtLong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= FmtShort &lt;&lt; 1,<br>
+ FmtVLong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= FmtLong &lt;&lt; 1,<br>
+ FmtComma &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= FmtVLong &lt;&lt; 1,<br>
+ FmtFlag &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= FmtComma &lt;&lt; 1<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;fmtfdinit(Fmt *f, int fd, char *buf, int nbuf);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;fmtfdflush(Fmt *f);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;fmtstrinit(Fmt *f);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* fmtstrflush(Fmt *f);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;runefmtstrinit(Fmt *f);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runefmtstrflush(Fmt *f);<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;fmtinstall(int c, int (*fn)(Fmt*));
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;dofmt(Fmt *f, char *fmt);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;dorfmt(Fmt*, Rune *fmt);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;fmtprint(Fmt *f, char *fmt, ...);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;fmtvprint(Fmt *f, char *fmt, va_list v);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;fmtrune(Fmt *f, int r);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;fmtstrcpy(Fmt *f, char *s);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;fmtrunestrcpy(Fmt *f, Rune *s);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;errfmt(Fmt *f);<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The interface described here allows the construction of custom
+ <a href="../man3/print.html"><i>print</i>(3)</a> verbs and output routines. In essence, they provide access
+ to the workings of the formatted print code.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <a href="../man3/print.html"><i>print</i>(3)</a> suite maintains its state with a data structure called
+ <tt><font size=+1>Fmt</font></tt>. A typical call to <a href="../man3/print.html"><i>print</i>(3)</a> or its relatives initializes a
+ <tt><font size=+1>Fmt</font></tt> structure, passes it to subsidiary routines to process the
+ output, and finishes by emitting any saved state recorded in the
+ <tt><font size=+1>Fmt</font></tt>. The details of the <tt><font size=+1>Fmt</font></tt> are unimportant to outside users,
+ except
+ insofar as the general design influences the interface. The <tt><font size=+1>Fmt</font></tt>
+ records whether the output is in runes or bytes, the verb being
+ processed, its precision and width, and buffering parameters.
+ Most important, it also records a <i>flush</i> routine that the library
+ will call if a buffer overflows. When printing to a file descriptor,
+ the
+ flush routine will emit saved characters and reset the buffer;
+ when printing to an allocated string, it will resize the string
+ to receive more output. The flush routine is nil when printing
+ to fixed-size buffers. User code need never provide a flush routine;
+ this is done internally by the library.<br>
+ <p><font size=+1><b>Custom output routines </b></font><br>
+ To write a custom output routine, such as an error handler that
+ formats and prints custom error messages, the output sequence
+ can be run from outside the library using the routines described
+ here. There are two main cases: output to an open file descriptor
+ and output to a string.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To write to a file descriptor, call <i>fmtfdinit</i> to initialize the
+ local <tt><font size=+1>Fmt</font></tt> structure <i>f</i>, giving the file descriptor <i>fd</i>, the buffer
+ <i>buf</i>, and its size <i>nbuf</i>. Then call <i>fmtprint</i> or <i>fmtvprint</i> to generate
+ the output. These behave like <tt><font size=+1>fprint</font></tt> (see <a href="../man3/print.html"><i>print</i>(3)</a>) or <tt><font size=+1>vfprint</font></tt>
+ except that the characters are buffered until <i>fmtfdflush</i> is called
+ and the return value is either 0 or &ndash;1. A typical example of this
+ sequence appears in the Examples section.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The same basic sequence applies when outputting to an allocated
+ string: call <i>fmtstrinit</i> to initialize the <tt><font size=+1>Fmt</font></tt>, then call <i>fmtprint</i>
+ and <i>fmtvprint</i> to generate the output. Finally, <i>fmtstrflush</i> will
+ return the allocated string, which should be freed after use.
+ To output to a rune string, use <i>runefmtstrinit</i> and <i>runefmtstrflush</i>.
+ Regardless of the output style or type, <i>fmtprint</i> or <i>fmtvprint</i>
+ generates the characters.<br>
+ <p><font size=+1><b>Custom format verbs </b></font><br>
+ <i>Fmtinstall</i> is used to install custom verbs and flags labeled by
+ character <i>c</i>, which may be any non-zero Unicode character. <i>Fn</i> should
+ be declared as<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;fn(Fmt*)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <i>Fp</i><tt><font size=+1>&#8722;&gt;r</font></tt> is the flag or verb character to cause <i>fn</i> to be called. In
+ <i>fn</i>, <i>fp</i><tt><font size=+1>&#8722;&gt;width</font></tt><i>, fp</i><tt><font size=+1>&#8722;&gt;prec</font></tt> are the width and precision, and <i>fp</i><tt><font size=+1>&#8722;&gt;flags</font></tt>
+ the decoded flags for the verb (see <a href="../man3/print.html"><i>print</i>(3)</a> for a description
+ of these items). The standard flag values are: <tt><font size=+1>FmtSign</font></tt> (<tt><font size=+1>+</font></tt>), <tt><font size=+1>FmtLeft</font></tt>
+ (<tt><font size=+1>&#8722;</font></tt>), <tt><font size=+1>FmtSpace</font></tt> (<tt><font size=+1>' '</font></tt>), <tt><font size=+1>FmtSharp</font></tt> (<tt><font size=+1>#</font></tt>),
+ <tt><font size=+1>FmtComma</font></tt> (<tt><font size=+1>,</font></tt>), <tt><font size=+1>FmtLong</font></tt> (<tt><font size=+1>l</font></tt>), <tt><font size=+1>FmtShort</font></tt> (<tt><font size=+1>h</font></tt>), <tt><font size=+1>FmtUnsigned</font></tt> (<tt><font size=+1>u</font></tt>), and
+ <tt><font size=+1>FmtVLong</font></tt> (<tt><font size=+1>ll</font></tt>). The flag bits <tt><font size=+1>FmtWidth</font></tt> and <tt><font size=+1>FmtPrec</font></tt> identify whether
+ a width and precision were specified.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fn</i> is passed a pointer to the <tt><font size=+1>Fmt</font></tt> structure recording the state
+ of the output. If <i>fp</i><tt><font size=+1>&#8722;&gt;r</font></tt> is a verb (rather than a flag), <i>fn</i> should
+ use <tt><font size=+1>Fmt&#8722;&gt;args</font></tt> to fetch its argument from the list, then format
+ it, and return zero. If <i>fp</i><tt><font size=+1>&#8722;&gt;r</font></tt> is a flag, <i>fn</i> should return one.
+ All interpretation of <i>fp</i><tt><font size=+1>&#8722;&gt;width</font></tt>, <i>fp</i><tt><font size=+1>&#8722;&gt;prec</font></tt>, and <i>fp-&gt;</i><tt><font size=+1>flags</font></tt> is
+ left up to the conversion routine. <i>Fmtinstall</i> returns 0 if the
+ installation succeeds, &ndash;1 if it fails.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fmtprint</i> and <i>fmtvprint</i> may be called to help prepare output in
+ custom conversion routines. However, these functions clear the
+ width, precision, and flags. Both functions return 0 for success
+ and &ndash;1 for failure.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The functions <i>dofmt</i> and <i>dorfmt</i> are the underlying formatters;
+ they use the existing contents of <tt><font size=+1>Fmt</font></tt> and should be called only
+ by sophisticated conversion routines. These routines return the
+ number of characters (bytes of UTF or runes) produced.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Some internal functions may be useful to format primitive types.
+ They honor the width, precision and flags as described in <a href="../man3/print.html"><i>print</i>(3)</a>.
+ <i>Fmtrune</i> formats a single character <tt><font size=+1>r</font></tt>. <i>Fmtstrcpy</i> formats a string
+ <tt><font size=+1>s</font></tt>; <i>fmtrunestrcpy</i> formats a rune string <tt><font size=+1>s</font></tt>. <i>Errfmt</i> formats the system
+ error string. All these routines return zero for
+ successful execution. Conversion routines that call these functions
+ will work properly regardless of whether the output is bytes or
+ runes.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This function prints an error message with a variable number of
+ arguments and then quits. Compared to the corresponding example
+ in <a href="../man3/print.html"><i>print</i>(3)</a>, this version uses a smaller buffer, will never truncate
+ the output message, but might generate multiple <tt><font size=+1>write</font></tt> system calls
+ to produce its output.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#pragma &nbsp;&nbsp;&nbsp;varargck argpos &nbsp;&nbsp;&nbsp;error &nbsp;&nbsp;&nbsp;&nbsp;1<br>
+ void fatal(char *fmt, ...)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Fmt f;<br>
+ char buf[64];<br>
+ va_list arg;<br>
+ fmtfdinit(&amp;f, 1, buf, sizeof buf);<br>
+ fmtprint(&amp;f, &quot;fatal: &quot;);<br>
+ va_start(arg, fmt);<br>
+ fmtvprint(&amp;f, fmt, arg);<br>
+ va_end(arg);<br>
+ fmtprint(&amp;f, &quot;\n&quot;);<br>
+ fmtfdflush(&amp;f);<br>
+ exits(&quot;fatal error&quot;);<br>
+
+ </table>
+ }<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ This example adds a verb to print complex numbers.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef<br>
+ struct {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ double &nbsp;&nbsp;&nbsp;r, i;<br>
+
+ </table>
+ } Complex;<br>
+ #pragma &nbsp;&nbsp;&nbsp;varargck type &quot;X&quot; Complex<br>
+ int<br>
+ Xfmt(Fmt *f)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Complex c;<br>
+ c = va_arg(f&#8722;&gt;args, Complex);<br>
+ return fmtprint(f, &quot;(%g,%g)&quot;, c.r, c.i);<br>
+
+ </table>
+ }<br>
+ main(...)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Complex x = (Complex){ 1.5, &#8722;2.3 };<br>
+ fmtinstall('X', Xfmt);<br>
+ print(&quot;x = %X\n&quot;, x);<br>
+
+ </table>
+ }<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/fmt<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/print.html"><i>print</i>(3)</a>, <a href="../man7/utf.html"><i>utf</i>(7)</a>, <a href="../man3/errstr.html"><i>errstr</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines return negative numbers or nil for errors and set
+ <i>errstr</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/frame.html b/man/man3/frame.html
new file mode 100644
index 00000000..4a80453c
--- /dev/null
+++ b/man/man3/frame.html
@@ -0,0 +1,325 @@
+<head>
+<title>frame(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FRAME(3)</b><td align=right><b>FRAME(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ frinit, frsetrects, frinittick, frclear, frcharofpt, frptofchar,
+ frinsert, frdelete, frselect, frtick, frselectpaint, frdrawsel,
+ frdrawsel0, frgetmouse &ndash; frames of text<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;draw.h&gt;<br>
+ #include &lt;thread.h&gt;<br>
+ #include &lt;mouse.h&gt;<br>
+ #include &lt;frame.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;frinit(Frame *f, Rectangle r, Font *ft, Image *b, Image **cols)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;frsetrects(Frame *f, Rectangle r, Image *b)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;frinittick(Frame *f)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;frclear(Frame *f, int resize)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong frcharofpt(Frame *f, Point pt)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point frptofchar(Frame *f, ulong p)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;frinsert(Frame *f, Rune *r0, Rune *r1, ulong p)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;frdelete(Frame *f, ulong p0, ulong p1)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;frselect(Frame *f, Mousectl *m)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;frtick(Frame *f, Point pt, int up)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;frselectpaint(Frame *f, Point p0, Point p1, Image *col)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;frdrawsel(Frame *f, Point pt0, ulong p0, ulong p1,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int highlighted)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;frdrawsel0(Frame *f, Point pt0, ulong p0, ulong p1,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *back, Image *text)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>enum{<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ BACK,<br>
+ HIGH,<br>
+ BORD,<br>
+ TEXT,<br>
+ HTEXT,<br>
+ NCOL<br>
+
+ </table>
+ };<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This library supports <i>frames</i> of editable text in a single font
+ on raster displays, such as in <a href="../man1/sam.html"><i>sam</i>(1)</a> and <a href="../man1/9term.html"><i>9term</i>(1)</a>. Frames may
+ hold any character except NUL (0). Long lines are folded and tabs
+ are at fixed intervals.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The user-visible data structure, a <tt><font size=+1>Frame</font></tt>, is defined in <tt><font size=+1>&lt;frame.h&gt;</font></tt>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct Frame Frame;<br>
+ struct Frame<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Font &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*font; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* of chars in the frame */<br>
+ Display &nbsp;&nbsp;&nbsp;&nbsp;*display; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* on which frame appears */<br>
+ Image &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*b; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* on which frame appears */<br>
+ Image &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*cols[NCOL]; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* text and background colors */<br>
+ Rectangle r; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* in which text appears */<br>
+ Rectangle entire; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* of full frame */<br>
+ Frbox &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*box;<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p0, p1; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* selection */<br>
+ ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nbox, nalloc;<br>
+ ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maxtab; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* max size of tab, in pixels */<br>
+ ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nchars; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* # runes in frame */<br>
+ ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nlines; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* # lines with text */<br>
+ ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maxlines; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* total # lines in frame */<br>
+ ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lastlinefull; &nbsp;&nbsp;&nbsp;&nbsp;/* last line fills frame */<br>
+ ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;modified; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* changed since frselect() */<br>
+ Image &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*tick; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* typing tick */<br>
+ Image &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*tickback; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* saved image under tick */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ticked; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* flag: is tick onscreen? */<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <tt><font size=+1>Frbox</font></tt> is an internal type and is not used by the interface. <tt><font size=+1>P0</font></tt>
+ and <tt><font size=+1>p1</font></tt> may be changed by the application provided the selection
+ routines are called afterwards to maintain a consistent display.
+ <i>Maxtab</i> determines the size of tab stops. <i>Frinit</i> sets it to 8 times
+ the width of a <tt><font size=+1>0</font></tt> (zero) character in the font; it may be
+ changed before any text is added to the frame. The other elements
+ of the structure are maintained by the library and should not
+ be modified directly.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The text within frames is not directly addressable; instead frames
+ are designed to work alongside another structure that holds the
+ text. The typical application is to display a section of a longer
+ document such as a text file or terminal session. Usually the
+ program will keep its own copy of the text in the window
+ (probably as an array of <tt><font size=+1>Runes</font></tt>) and pass components of this text
+ to the frame routines to display the visible portion. Only the
+ text that is visible is held by the <tt><font size=+1>Frame</font></tt>; the application must
+ check <tt><font size=+1>maxlines</font></tt>, <tt><font size=+1>nlines</font></tt>, and <tt><font size=+1>lastlinefull</font></tt> to determine, for example,
+ whether new text needs to be appended at the
+ end of the <tt><font size=+1>Frame</font></tt> after calling <i>frdelete</i> (q.v.).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There are no routines in the library to allocate <tt><font size=+1>Frames</font></tt>; instead
+ the interface assumes that <tt><font size=+1>Frames</font></tt> will be components of larger
+ structures. <i>Frinit</i> prepares the <tt><font size=+1>Frame</font></tt> <i>f</i> so characters drawn in
+ it will appear in the single <tt><font size=+1>Font</font></tt> <i>ft</i>. It then calls <i>frsetrects</i>
+ and <i>frinittick</i> to initialize the geometry for the <tt><font size=+1>Frame</font></tt>. The <tt><font size=+1>Image
+ </font></tt><i>b</i> is where the <tt><font size=+1>Frame</font></tt> is to be drawn; <tt><font size=+1>Rectangle</font></tt> <i>r</i> defines the limit
+ of the portion of the <tt><font size=+1>Image</font></tt> the text will occupy. The <tt><font size=+1>Image</font></tt> pointer
+ may be null, allowing the other routines to be called to maintain
+ the associated data structure in, for example, an obscured window.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The array of <tt><font size=+1>Images</font></tt> cols sets the colors in which text and borders
+ will be drawn. The background of the frame will be drawn in <tt><font size=+1>cols[BACK]</font></tt>;
+ the background of highlighted text in <tt><font size=+1>cols[HIGH]</font></tt>; borders and
+ scroll bar in <tt><font size=+1>cols[BORD]</font></tt>; regular text in <tt><font size=+1>cols[TEXT]</font></tt>; and highlighted
+ text in <tt><font size=+1>cols[HTEXT]</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Frclear</i> frees the internal structures associated with <i>f</i>, permitting
+ another <i>frinit</i> or <i>frsetrects</i> on the <tt><font size=+1>Frame</font></tt>. It does not clear the
+ associated display. If <i>f</i> is to be deallocated, the associated
+ <tt><font size=+1>Font</font></tt> and <tt><font size=+1>Image</font></tt> must be freed separately. The <tt><font size=+1>resize</font></tt> argument should
+ be non-zero if the frame is to be redrawn with a
+ different font; otherwise the frame will maintain some data structures
+ associated with the font.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To resize a <tt><font size=+1>Frame</font></tt>, use <i>frclear</i> and <i>frinit</i> and then <i>frinsert</i> (q.v.)
+ to recreate the display. If a <tt><font size=+1>Frame</font></tt> is being moved but not resized,
+ that is, if the shape of its containing rectangle is unchanged,
+ it is sufficient to use <a href="../man3/draw.html"><i>draw</i>(3)</a> to copy the containing rectangle
+ from the old to the new location and then call <i>frsetrects</i> to
+ establish the new geometry. (It is unnecessary to call <i>frinittick</i>
+ unless the font size has changed.) No redrawing is necessary.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Frames</font></tt> hold text as runes, not as bytes. <i>Frptofchar</i> returns the
+ location of the upper left corner of the <i>p&#8217;th</i> rune, starting from
+ 0, in the <tt><font size=+1>Frame</font></tt> <i>f</i>. If <i>f</i> holds fewer than <i>p</i> runes, <i>frptofchar</i> returns
+ the location of the upper right corner of the last character in
+ <i>f</i>. <i>Frcharofpt</i> is the inverse: it returns the index of the closest
+ rune whose image&#8217;s upper left corner is up and to the left of
+ <i>pt</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Frinsert</i> inserts into <tt><font size=+1>Frame</font></tt> <i>f</i> starting at rune index <i>p</i> the runes
+ between <i>r0</i> and <i>r1</i>. If a NUL (0) character is inserted, chaos will
+ ensue. Tabs and newlines are handled by the library, but all other
+ characters, including control characters, are just displayed.
+ For example, backspaces are printed; to erase a character, use
+ <i>frdelete</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Frdelete</i> deletes from the <tt><font size=+1>Frame</font></tt> the text between <i>p0</i> and <i>p1</i>; <i>p1</i>
+ points at the first rune beyond the deletion.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Frselect</i> tracks the mouse to select a contiguous string of text
+ in the <tt><font size=+1>Frame</font></tt>. When called, a mouse button is typically down. <i>Frselect</i>
+ will return when the button state has changed (some buttons may
+ still be down) and will set <i>f</i><tt><font size=+1>&#8722;&gt;p0</font></tt> and <i>f</i><tt><font size=+1>&#8722;&gt;p1</font></tt> to the selected range
+ of text.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Programs that wish to manage the selection themselves have several
+ routines to help. They involve the maintenance of the &#8216;tick&#8217;,
+ the vertical line indicating a null selection between characters,
+ and the colored region representing a non-null selection. <i>Frtick</i>
+ draws (if <i>up</i> is non-zero) or removes (if <i>up</i> is zero) the tick
+ at
+ the screen position indicated by <i>pt</i>. <i>Frdrawsel</i> repaints a section
+ of the frame, delimited by character positions <i>p0</i> and <i>p1</i>, either
+ with plain background or entirely highlighted, according to the
+ flag <i>highlighted</i>, managing the tick appropriately. The point <i>pt0</i>
+ is the geometrical location of <i>p0</i> on the screen; like all of the
+ selection-helper routines&#8217; <tt><font size=+1>Point</font></tt> arguments, it must be a value
+ generated by <i>frptofchar</i>. <i>Frdrawsel0</i> is a lower-level routine,
+ taking as arguments a background color, <i>back</i>, and text color,
+ <i>text</i>. It assumes that the tick is being handled (removed beforehand,
+ replaced afterwards, as required) by its caller. <i>Frselectpaint
+ </i>uses a solid color, <i>col</i>, to paint a region of the frame defined
+ by the <tt><font size=+1>Points</font></tt> <i>p0</i> and <i>p1</i>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libframe<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/genrandom.html b/man/man3/genrandom.html
new file mode 100644
index 00000000..0cddd21d
--- /dev/null
+++ b/man/man3/genrandom.html
@@ -0,0 +1,84 @@
+<head>
+<title>genrandom(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GENRANDOM(3)</b><td align=right><b>GENRANDOM(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ genrandom, prng &ndash; random number generation<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void genrandom(uchar *buf, int nbytes)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void prng(uchar *buf, int nbytes)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Most security software requires a source of random or, at the
+ very least, unguessable numbers.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Genrandom</i> fills a buffer with bytes from the X9.17 pseudo-random
+ number generator. The X9.17 generator is seeded by 24 truly random
+ bytes read via <i>truerand</i> (see <a href="../man3/rand.html"><i>rand</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Prng</i> uses the native <a href="../man3/rand.html"><i>rand</i>(3)</a> pseudo-random number generator to
+ fill the buffer. Used with <i>srand</i>, this function can produce a
+ reproducible stream of pseudo random numbers useful in testing.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Both functions may be passed to <i>mprand</i> (see <a href="../man3/mp.html"><i>mp</i>(3)</a>).<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libsec<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mp.html"><i>mp</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/get9root.html b/man/man3/get9root.html
new file mode 100644
index 00000000..6ca02c02
--- /dev/null
+++ b/man/man3/get9root.html
@@ -0,0 +1,109 @@
+<head>
+<title>get9root(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GET9ROOT(3)</b><td align=right><b>GET9ROOT(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ get9root, unsharp &ndash; get path to root of Plan 9 tree<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;get9root(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unsharp(char *path)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This tree of Plan 9 software is conventionally installed in <tt><font size=+1>/usr/local/plan9</font></tt>
+ but may be installed in other places (for example, users without
+ the ability to write to <tt><font size=+1>/usr/local</font></tt> may with to install it in their
+ own home directories). The environment variable <tt><font size=+1>$PLAN9</font></tt> should
+ contain the path to the root. <i>Get9root
+ </i>returns a static pointer to the pathname of root, first checking
+ <tt><font size=+1>$PLAN9</font></tt> and defaulting to <tt><font size=+1>/usr/local/plan9</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The lack of a fixed location for the Plan 9 tree makes it difficult
+ to hard-code paths to files. <i>Unsharp</i> replaces a leading <tt><font size=+1>#9</font></tt> in
+ <i>path</i> with the root of the tree. <i>Unsharp</i> also replaces a leading
+ <tt><font size=+1>#d</font></tt> with the path to the underlying system&#8217;s file descriptor dup
+ device, typically <tt><font size=+1>/dev/fd</font></tt>. The string returned from <i>unsharp</i>, if
+ different from <i>path</i>, should be freed with <i>free</i> (see <a href="../man3/malloc.html"><i>malloc</i>(3)</a>)
+ when no longer needed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ As a convention, programs should never <i>unsharp</i> paths obtained
+ from user input.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <a href="../man4/plumber.html"><i>plumber</i>(4)</a> uses this code to find unrooted file names included
+ by plumb rules.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>snprint(buf, sizeof buf, &quot;#9/plumb/%s&quot;, name);<br>
+ fd = open(unsharp(buf), OREAD);<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/getns.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man4/intro.html"><i>intro</i>(4)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Get9root</i> could be smarter about finding the tree when <tt><font size=+1>$PLAN9</font></tt> is
+ not set.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/getcallerpc.html b/man/man3/getcallerpc.html
new file mode 100644
index 00000000..72a835d1
--- /dev/null
+++ b/man/man3/getcallerpc.html
@@ -0,0 +1,99 @@
+<head>
+<title>getcallerpc(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GETCALLERPC(3)</b><td align=right><b>GETCALLERPC(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ getcallerpc &ndash; fetch return PC of current function<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong getcallerpc(void *firstarg)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Getcallerpc</i> is a portable way to discover the PC to which the
+ current function will return. <i>Firstarg</i> should be a pointer to
+ the first argument to the function in question.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>void<br>
+ printpc(ulong arg)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ print(&quot;Called from %.8lux\n&quot;, getcallerpc(&amp;arg));<br>
+
+ </table>
+ }<br>
+ void<br>
+ main(int argc, char *argv[])<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ printpc(0);<br>
+ printpc(0);<br>
+ printpc(0);<br>
+
+ </table>
+ }<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>firstarg</i> parameter should not be necessary.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/getenv.html b/man/man3/getenv.html
new file mode 100644
index 00000000..5b51354c
--- /dev/null
+++ b/man/man3/getenv.html
@@ -0,0 +1,79 @@
+<head>
+<title>getenv(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GETENV(3)</b><td align=right><b>GETENV(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ getenv, putenv &ndash; access environment variables<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* getenv(char *name)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;putenv(char *name, char *val)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Getenv</i> fetches the environment value associated with <i>name</i> into
+ memory allocated with <a href="../man3/malloc.html"><i>malloc</i>(3)</a>, 0-terminates it, and returns
+ a pointer to that area. If no file exists, 0 is returned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Putenv</i> sets the environment value associated with <i>name</i> to <i>val</i>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/getenv.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Sets <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To avoid name conflicts with the underlying system, <i>getenv</i> and
+ <i>putenv</i> are preprocessor macros defined as <i>p9getenv</i> and <i>p9putenv</i>;
+ see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/getfields.html b/man/man3/getfields.html
new file mode 100644
index 00000000..7c1d8f64
--- /dev/null
+++ b/man/man3/getfields.html
@@ -0,0 +1,136 @@
+<head>
+<title>getfields(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GETFIELDS(3)</b><td align=right><b>GETFIELDS(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ getfields, gettokens, tokenize &ndash; break a string into fields<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;getfields(char *str, char **args, int maxargs, int multiflag,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char *delims)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;gettokens(char *str, char **args, int maxargs, char *delims)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;tokenize(char *str, char **args, int maxargs)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Getfields</i> places into the array <i>args</i> pointers to the first <i>maxargs</i>
+ fields of the null terminated UTF string <i>str</i>. Delimiters between
+ these fields are set to null.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Fields are substrings of <i>str</i> whose definition depends on the value
+ of <i>multiflag.</i> If <i>multiflag</i> is zero, adjacent fields are separated
+ by exactly one delimiter. For example<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>getfields(&quot;#alice#bob##charles###&quot;, arg, 3, 0, &quot;#&quot;);<br>
+ </font></tt>
+ </table>
+
+ </table>
+ yields three substrings: null-string , <tt><font size=+1>alice</font></tt>, and <tt><font size=+1>bob##charles###</font></tt>.
+ If the <i>multiflag</i> argument is not zero, a field is a non-empty
+ string of non-delimiters. For example<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>getfields(&quot;#alice#bob##charles###&quot;, arg, 3, 1, &quot;#&quot;);<br>
+ </font></tt>
+ </table>
+
+ </table>
+ yields the three substrings: <tt><font size=+1>alice</font></tt>, <tt><font size=+1>bob</font></tt>, and <tt><font size=+1>charles###</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Getfields returns the number of fields pointed to.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Gettokens</i> is the same as <i>getfields</i> with <i>multiflag</i> non-zero, except
+ that fields may be quoted using single quotes, in the manner of
+ <a href="../man1/rc.html"><i>rc</i>(1)</a>. See <a href="../man3/quote.html"><i>quote</i>(3)</a> for related quote-handling software.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Tokenize</i> is <i>gettokens</i> with <i>delims</i> set to <tt><font size=+1>&quot;\t\r\n &quot;</font></tt>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/tokenize.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>strtok</i> in <a href="../man3/strcat.html"><i>strcat</i>(3)</a>, <a href="../man3/quote.html"><i>quote</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/getns.html b/man/man3/getns.html
new file mode 100644
index 00000000..e5da2bb2
--- /dev/null
+++ b/man/man3/getns.html
@@ -0,0 +1,67 @@
+<head>
+<title>getns(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GETNS(3)</b><td align=right><b>GETNS(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ getns &ndash; get path to name space directory<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getns(void)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Getns</i> returns a pointer to a malloced string that contains the
+ path to the name space directory for the current process. The
+ name space directory is a clumsy substitute for Plan 9&#8217;s per-process
+ name spaces; see <a href="../man4/intro.html"><i>intro</i>(4)</a> for details.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/getns.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man4/intro.html"><i>intro</i>(4)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/getsnarf.html b/man/man3/getsnarf.html
new file mode 100644
index 00000000..3f3e7512
--- /dev/null
+++ b/man/man3/getsnarf.html
@@ -0,0 +1,73 @@
+<head>
+<title>getsnarf(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GETSNARF(3)</b><td align=right><b>GETSNARF(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ getsnarf, putsnarf &ndash; window system snarf (cut and paste) buffer<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;draw.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char *getsnarf(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void putsnarf(char *text)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Getsnarf</i> and <i>putsnarf</i> access the window system&#8217;s snarf (cut and
+ paste) buffer.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Getsnarf</i> returns a copy of the current buffer; the returned pointer
+ should be freed with <i>free</i> (see <a href="../man3/malloc.html"><i>malloc</i>(3)</a>) when no longer needed.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Putsnarf</i> sets the buffer to the text string <i>text</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Callers should assume that the snarf buffer is UTF. If the window
+ system does not keep the buffer in UTF, <i>getsnarf</i> and <i>putsnarf</i>
+ will convert as necessary.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw/x11&#8722;itrans.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/getuser.html b/man/man3/getuser.html
new file mode 100644
index 00000000..c34b23cf
--- /dev/null
+++ b/man/man3/getuser.html
@@ -0,0 +1,75 @@
+<head>
+<title>getuser(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GETUSER(3)</b><td align=right><b>GETUSER(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ getuser, sysname &ndash; get user or system name<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getuser(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sysname(void)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Getuser</i> returns a pointer to static data which contains the null-terminated
+ name of the user who owns the current process. <i>Getuser</i> calls <a href="../man2/getuid.html"><i>getuid</i>(2)</a>
+ and then reads <tt><font size=+1>/etc/passwd</font></tt> to find the corresponding name.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Sysname</i> returns a pointer to static data which contains the name
+ of the machine on which the current process is running. <i>Sysname</i>
+ looks first for an environment variable <tt><font size=+1>$sysname</font></tt>. If there is
+ no such variable, <i>sysname</i> calls <a href="../man2/gethostname.html"><i>gethostname</i>(2)</a> and truncates the
+ returned name at the first dot. If <i>gethostname</i> fails,
+ <i>sysname</i> returns the default name <tt><font size=+1>gnot</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Unlike <i>getuser</i>, <i>sysname</i> caches the string, deriving the host name
+ only once.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/getuser.c<br>
+ /usr/local/plan9/src/lib9/sysname.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/getwd.html b/man/man3/getwd.html
new file mode 100644
index 00000000..1f5d2288
--- /dev/null
+++ b/man/man3/getwd.html
@@ -0,0 +1,84 @@
+<head>
+<title>getwd(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GETWD(3)</b><td align=right><b>GETWD(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ getwd &ndash; get current directory<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* getwd(char *buf, int size)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Getwd</i> fills <i>buf</i> with a null-terminated string representing the
+ current directory and returns <i>buf</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Getwd</i> places no more than <i>size</i> bytes in the buffer provided.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/getwd.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/pwd.html"><i>pwd</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ On error, zero is returned. <a href="../man3/Errstr.html"><i>Errstr</i>(3)</a> may be consulted for more
+ information.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To avoid name conflicts with the underlying system, <i>getwd</i> is a
+ preprocessor macro defined as <i>p9getwd</i>; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/graphics.html b/man/man3/graphics.html
new file mode 100644
index 00000000..92f08c00
--- /dev/null
+++ b/man/man3/graphics.html
@@ -0,0 +1,592 @@
+<head>
+<title>graphics(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>GRAPHICS(3)</b><td align=right><b>GRAPHICS(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Display, Point, Rectangle, Cursor, initdraw, geninitdraw, drawerror,
+ initdisplay, closedisplay, getdefont, getwindow, gengetwindow,
+ flushimage, bufimage, lockdisplay, unlockdisplay, cursorswitch,
+ cursorset, openfont, buildfont, freefont, Pfmt, Rfmt, strtochan,
+ chantostr, chantodepth &ndash; interactive graphics
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;draw.h&gt;<br>
+ #include &lt;cursor.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;initdraw(void (*errfun)(Display*, char*), char *font,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char *label)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;geninitdraw(char *devdir, void(*errfun)(Display*, char*),<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>char *font, char *label, char *mousedir, char *windir,<br>
+ int ref)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;newwindow(char *str)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;drawerror(Display *d, char *msg)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Display*initdisplay(char *devdir, char *win, void(*errfun)(Display*,
+ char*))<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;closedisplay(Display *d)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Font* getdefont(Display *d)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;flushimage(Display *d, int vis)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;bufimage(Display *d, int n)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;lockdisplay(Display *d)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;unlockdisplay(Display *d)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;getwindow(Display *d, int ref)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;gengetwindow(Display *d, char *winname,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image **ip, Screen **sp, int ref)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;cursorswitch(Cursor *curs)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;cursorset(Point p)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Font* openfont(Display *d, char *name)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Font* buildfont(Display *d, char *desc, char *name)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;freefont(Font *f)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;Pfmt(Fmt*)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;Rfmt(Fmt*)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong strtochan(char *s)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* chantostr(char *s, ulong chan)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;chantodepth(ulong chan)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>extern Display *display<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>extern Image &nbsp;&nbsp;&nbsp;&nbsp;*screen<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>extern Screen &nbsp;&nbsp;&nbsp;&nbsp;*_screen<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>extern Font &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*font<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A <tt><font size=+1>Display</font></tt> structure represents a connection to the graphics device,
+ <a href="../man3/draw.html"><i>draw</i>(3)</a>, holding all graphics resources associated with the connection,
+ including in particular raster image data in use by the client
+ program. The structure is defined (in part) as:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef<br>
+ struct Display<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ...<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;(*error)(Display*, char*);<br>
+ ...<br>
+ Image &nbsp;&nbsp;&nbsp;*black;<br>
+ Image &nbsp;&nbsp;&nbsp;*white;<br>
+ Image &nbsp;&nbsp;&nbsp;*opaque;<br>
+ Image &nbsp;&nbsp;&nbsp;*transparent;<br>
+ Image &nbsp;&nbsp;&nbsp;*image;<br>
+ Font &nbsp;&nbsp;&nbsp;&nbsp;*defaultfont;<br>
+ Subfont*defaultsubfont;<br>
+ ...<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ A <tt><font size=+1>Point</font></tt> is a location in an Image (see below and <a href="../man3/draw.html"><i>draw</i>(3)</a>), such
+ as the display, and is defined as:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef<br>
+ struct Point {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int x;<br>
+ int y;<br>
+
+ </table>
+ } Point;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The coordinate system has <i>x</i> increasing to the right and <i>y</i> increasing
+ down.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>Rectangle</font></tt> is a rectangular area in an image.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef<br>
+ struct Rectangle {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Point min; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* upper left */<br>
+ Point max; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* lower right */<br>
+
+ </table>
+ } Rectangle;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ By definition, <tt><font size=+1>min.x</font></tt>&le;<tt><font size=+1>max.x</font></tt> and <tt><font size=+1>min.y</font></tt>&le;<tt><font size=+1>max.y</font></tt>. By convention, the right
+ (maximum <i>x</i>) and bottom (maximum <i>y</i>) edges are excluded from the
+ represented rectangle, so abutting rectangles have no points in
+ common. Thus, <tt><font size=+1>max</font></tt> contains the coordinates of the first point
+ beyond the rectangle.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>Image</font></tt> data structure is defined in <a href="../man3/draw.html"><i>draw</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>Font</font></tt> is a set of character images, indexed by runes (see <a href="../man7/utf.html"><i>utf</i>(7)</a>).
+ The images are organized into <tt><font size=+1>Subfonts</font></tt>, each containing the images
+ for a small, contiguous set of runes. The detailed format of these
+ data structures, which are described in detail in <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>,
+ is immaterial for most applications. <tt><font size=+1>Font</font></tt> and
+ <tt><font size=+1>Subfont</font></tt> structures contain two interrelated fields: <tt><font size=+1>ascent</font></tt>, the
+ distance from the top of the highest character (actually the top
+ of the image holding all the characters) to the baseline, and
+ <tt><font size=+1>height</font></tt>, the distance from the top of the highest character to
+ the bottom of the lowest character (and hence, the interline
+ spacing). See <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a> for more details.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Buildfont</i> parses the font description in the buffer <tt><font size=+1>desc</font></tt>, returning
+ a <tt><font size=+1>Font*</font></tt> pointer that can be used by <tt><font size=+1>string</font></tt> (see <a href="../man3/draw.html"><i>draw</i>(3)</a>) to draw
+ characters from the font. <i>Openfont</i> does the same, but reads the
+ description from the named file. <i>Freefont</i> frees a font. The convention
+ for naming font files is:
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/lib/font/bit/</font></tt><i>name</i><tt><font size=+1>/</font></tt><i>range</i><tt><font size=+1>.</font></tt><i>size</i><tt><font size=+1>.font
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ where <i>size</i> is approximately the height in pixels of the lower
+ case letters (without ascenders or descenders). <i>Range</i> gives some
+ indication of which characters will be available: for example
+ <tt><font size=+1>ascii</font></tt>, <tt><font size=+1>latin1</font></tt>, <tt><font size=+1>euro</font></tt>, or <tt><font size=+1>unicode</font></tt>. <tt><font size=+1>Euro</font></tt> includes most European languages,
+ punctuation marks, the International Phonetic
+ Alphabet, etc., but no Oriental languages. <tt><font size=+1>Unicode</font></tt> includes every
+ character for which appropriate-sized images exist on the system.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <i>Cursor</i> is defined:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct<br>
+ Cursor {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Point offset;<br>
+ uchar clr[2*16];<br>
+ uchar set[2*16];<br>
+
+ </table>
+ } Cursor;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The arrays are arranged in rows, two bytes per row, left to right
+ in big-endian order to give 16 rows of 16 bits each. A cursor
+ is displayed on the screen by adding <tt><font size=+1>offset</font></tt> to the current mouse
+ position, using <tt><font size=+1>clr</font></tt> as a mask to draw white at the pixels where
+ <tt><font size=+1>clr</font></tt> is one, and then drawing black at the pixels where <tt><font size=+1>set
+ </font></tt>is one.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routine <i>initdraw</i> connects to the display; it returns &ndash;1 if
+ it fails and sets the error string. <i>Initdraw</i> sets up the global
+ variables <tt><font size=+1>display</font></tt> (the <tt><font size=+1>Display</font></tt> structure representing the connection),
+ <tt><font size=+1>screen</font></tt> (an <tt><font size=+1>Image</font></tt> representing the display memory itself or, if
+ <a href="../man1/rio.html"><i>rio</i>(1)</a> is running, the client&#8217;s window), and <tt><font size=+1>font</font></tt> (the
+ default font for text). The arguments to <i>initdraw</i> include a <i>label</i>,
+ which is written to <tt><font size=+1>/dev/label</font></tt> if non-nil so that it can be used
+ to identify the window when hidden (see <a href="../man1/rio.html"><i>rio</i>(1)</a>). The font is created
+ by reading the named <i>font</i> file. If <tt><font size=+1>font</font></tt> is null, <i>initdraw</i> reads
+ the file named in the environment variable <tt><font size=+1>$font</font></tt>; if
+ <tt><font size=+1>$font</font></tt> is not set, it imports the default (usually minimal) font
+ from the operating system. The global <i>font</i> will be set to point
+ to the resulting <tt><font size=+1>Font</font></tt> structure. The <i>errfun</i> argument is a <i>graphics
+ error function</i> to call in the event of a fatal error in the library;
+ it must never return. Its arguments are the display pointer
+ and an error string. If <i>errfun</i> is nil, the library provides a
+ default, called <i>drawerror</i>. Another effect of <i>initdraw</i> is that
+ it installs <a href="../man3/print.html"><i>print</i>(3)</a> formats <i>Pfmt</i> and <i>Rfmt</i> as <tt><font size=+1>%P</font></tt> and <tt><font size=+1>%R</font></tt> for printing
+ <tt><font size=+1>Points</font></tt> and <tt><font size=+1>Rectangles</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>geninitdraw</i> function provides a less automated way to establish
+ a connection, for programs that wish to connect to multiple displays.
+ <i>Devdir</i> is the name of the directory containing the device files
+ for the display (if nil, default <tt><font size=+1>/dev</font></tt>); <i>errfun</i>, <i>font</i>, and <i>label</i>
+ are as in <i>initdraw</i>; <i>mousedir</i> and <i>windir</i> are the directories
+ holding the <tt><font size=+1>mouse</font></tt> and <tt><font size=+1>winname</font></tt> files; and <i>ref</i> specifies the refresh
+ function to be used to create the window, if running under <a href="../man1/rio.html"><i>rio</i>(1)</a>
+ (see <a href="../man3/window.html"><i>window</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Initdisplay</i> is part of <i>geninitdraw</i>; it sets up the display structures
+ but does not allocate any fonts or call <i>getwindow</i>. The arguments
+ are similar to those of <i>initdraw</i>; <i>win</i> names the directory, default
+ <tt><font size=+1>/dev</font></tt>, in which the files associated with the window reside. <i>Closedisplay</i>
+ disconnects the display and frees the associated
+ data structures. <i>Getdefont</i> builds a <tt><font size=+1>Font</font></tt> structure from in-core
+ data describing a default font. None of these routines is needed
+ by most programs, since <i>initdraw</i> calls them as needed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The data structures associated with the display must be protected
+ in a multi-process program, because they assume only one process
+ will be using them at a time. Multi-process programs should set
+ <tt><font size=+1>display&#8722;&gt;locking</font></tt> to <tt><font size=+1>1</font></tt>, to notify the library to use a locking protocol
+ for its own accesses, and call <i>lockdisplay</i> and
+ <i>unlockdisplay</i> around any calls to the graphics library that will
+ cause messages to be sent to the display device. <i>Initdraw</i> and
+ <i>geninitdraw</i> initialize the display to the locked state.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Getwindow</i> returns a pointer to the window associated with the
+ application; it is called automatically by <i>initdraw</i> to establish
+ the <tt><font size=+1>screen</font></tt> pointer but must be called after each resizing of the
+ window to restore the library&#8217;s connection to the window. If <tt><font size=+1>rio</font></tt>
+ is not running, it returns <tt><font size=+1>display&#8722;&gt;image</font></tt>; otherwise it
+ negotiates with <tt><font size=+1>rio</font></tt> by looking in <tt><font size=+1>/dev/winname</font></tt> to find the name
+ of the window and opening it using <tt><font size=+1>namedimage</font></tt> (see <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>).
+ The resulting window will be created using the refresh method
+ <i>ref</i> (see <a href="../man3/window.html"><i>window</i>(3)</a>); this should almost always be <tt><font size=+1>Refnone</font></tt> because
+ <tt><font size=+1>rio</font></tt> provides backing store for the window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Getwindow</i> overwrites the global variables <tt><font size=+1>screen</font></tt>, a pointer to
+ the <tt><font size=+1>Image</font></tt> defining the window (or the overall display, if no window
+ system is running); and <tt><font size=+1>_screen</font></tt>, a pointer to the <tt><font size=+1>Screen</font></tt> representing
+ the root of the window&#8217;s hierarchy. (See <a href="../man3/window.html"><i>window</i>(3)</a>. The overloading
+ of the <tt><font size=+1>screen</font></tt> word is an unfortunate
+ historical accident.) <i>Getwindow</i> arranges that <tt><font size=+1>screen</font></tt> point to
+ the portion of the window inside the border; sophisticated clients
+ may use <tt><font size=+1>_screen</font></tt> to make further subwindows. <i>Gengetwindow</i>&#8217;s extra
+ arguments are the full path of the window&#8217;s <tt><font size=+1>winname</font></tt> file and pointers
+ to be overwritten with the values of the
+ &#8216;global&#8217; <tt><font size=+1>Image</font></tt> and <tt><font size=+1>Screen</font></tt> variables for the new window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The mouse cursor is always displayed. The initial cursor is an
+ arrow. <i>Cursorswitch</i> causes the argument cursor to be displayed
+ instead. A zero argument causes a switch back to the arrow cursor.
+ <i>Cursorset</i> moves the mouse cursor to position <i>p</i>, provided (if in
+ a window) that the requesting program is executing in the
+ current window and the mouse is within the window boundaries;
+ otherwise <i>cursorset</i> is a no-op.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The graphics functions described in <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>, <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>,
+ and <a href="../man3/subfont.html"><i>subfont</i>(3)</a> are implemented by writing commands to files under
+ <tt><font size=+1>/dev/draw</font></tt> (see <a href="../man3/draw.html"><i>draw</i>(3)</a>); the writes are buffered, so the functions
+ may not take effect immediately. <i>Flushimage</i> flushes the buffer,
+ doing all pending graphics operations. If
+ <i>vis</i> is non-zero, any changes are also copied from the &#8216;soft screen&#8217;
+ (if any) in the driver to the visible frame buffer. The various
+ allocation routines in the library flush automatically, as does
+ the event package (see <a href="../man3/event.html"><i>event</i>(3)</a>); most programs do not need to
+ call <i>flushimage</i>. It returns &ndash;1 on error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Bufimage</i> is used to allocate space for <i>n</i> bytes in the display
+ buffer. It is used by all the graphics routines to send messages
+ to the display.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The functions <i>strtochan</i> and <i>chantostr</i> convert between the channel
+ descriptor strings used by <a href="../man7/image.html"><i>image</i>(7)</a> and the internal <tt><font size=+1>ulong</font></tt> representation
+ used by the graphics protocol (see <a href="../man3/draw.html"><i>draw</i>(3)</a>&#8217;s <tt><font size=+1>b</font></tt> message). <tt><font size=+1>Chantostr</font></tt>
+ writes at most nine bytes into the buffer pointed at by <i>s</i> and
+ returns <i>s</i> on success, 0 on failure.
+ <tt><font size=+1>Chantodepth</font></tt> returns the number of bits per pixel used by the format
+ specified by <i>chan</i>. Both <tt><font size=+1>chantodepth</font></tt> and <tt><font size=+1>strtochan</font></tt> return 0 when
+ presented with bad input.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To reconnect to the window after a resize event,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>if(getwindow(display, Refnone) &lt; 0)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sysfatal(&quot;resize failed: %r&quot;);<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ To create and set up a new <a href="../man1/rio.html"><i>rio</i>(1)</a> window,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>Image *screen2;<br>
+ Screen *_screen2;<br>
+ srvwsys = getenv(&quot;wsys&quot;);<br>
+ if(srvwsys == nil)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sysfatal(&quot;can't find $wsys: %r&quot;);<br>
+
+ </table>
+ rfork(RFNAMEG); /* keep mount of rio private */<br>
+ fd = open(srvwsys, ORDWR);<br>
+ if(fd &lt; 0)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sysfatal(&quot;can't open $wsys: %r&quot;);<br>
+
+ </table>
+ /* mount creates window; see</font></tt> <i>rio</i><tt><font size=+1>(4) */<br>
+ if(mount(fd, &#8722;1, &quot;/tmp&quot;, MREPL, &quot;new &#8722;dx 300&#8722;dy 200&quot;) &lt; 0)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sysfatal(&quot;can't mount new window: %r&quot;);<br>
+
+ </table>
+ if(gengetwindow(display, &quot;/tmp/winname&quot;,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ &amp;screen2, &amp;_screen2, Refnone) &lt; 0)<br>
+ sysfatal(&quot;resize failed: %r&quot;);<br>
+
+ </table>
+ /* now open /tmp/cons, /tmp/mouse */<br>
+ ...<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/font/bit </font></tt>&nbsp;&nbsp;&nbsp;directory of fonts<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/rio.html"><i>rio</i>(1)</a>, <a href="../man3/addpt.html"><i>addpt</i>(3)</a>, <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>, <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>, <a href="../man3/subfont.html"><i>subfont</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>,
+ <a href="../man3/event.html"><i>event</i>(3)</a>, <a href="../man3/frame.html"><i>frame</i>(3)</a>, <a href="../man3/print.html"><i>print</i>(3)</a>, <a href="../man3/window.html"><i>window</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man7/image.html"><i>image</i>(7)</a>, <a href="../man7/font.html"><i>font</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ An error function may call <a href="../man3/errstr.html"><i>errstr</i>(3)</a> for further diagnostics.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The names <tt><font size=+1>clr</font></tt> and <tt><font size=+1>set</font></tt> in the <tt><font size=+1>Cursor</font></tt> structure are reminders of
+ an archaic color map and might be more appropriately called <tt><font size=+1>white</font></tt>
+ and <tt><font size=+1>black</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ These manual pages contain many references to the now-fictitious
+ <tt><font size=+1>/dev/draw</font></tt>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/html.html b/man/man3/html.html
new file mode 100644
index 00000000..465edcdb
--- /dev/null
+++ b/man/man3/html.html
@@ -0,0 +1,1206 @@
+<head>
+<title>html(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>HTML(3)</b><td align=right><b>HTML(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ parsehtml, printitems, validitems, freeitems, freedocinfo, dimenkind,
+ dimenspec, targetid, targetname, fromStr, toStr &ndash; HTML parser<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;html.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Item* &nbsp;&nbsp;&nbsp;parsehtml(uchar* data, int datalen, Rune* src, int mtype,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int chset, Docinfo** pdi)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;printitems(Item* items, char* msg)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;validitems(Item* items)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;freeitems(Item* items)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;freedocinfo(Docinfo* d)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dimenkind(Dimen d)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dimenspec(Dimen d)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;targetid(Rune* s)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* &nbsp;&nbsp;&nbsp;targetname(int targid)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar* fromStr(Rune* buf, int n, int chset)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* &nbsp;&nbsp;&nbsp;toStr(uchar* buf, int n, int chset)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This library implements a parser for HTML 4.0 documents. The parsed
+ HTML is converted into an intermediate representation that describes
+ how the formatted HTML should be laid out.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Parsehtml</i> parses an entire HTML document contained in the buffer
+ <i>data</i> and having length <i>datalen</i>. The URL of the document should
+ be passed in as <i>src</i>. <i>Mtype</i> is the media type of the document,
+ which should be either <tt><font size=+1>TextHtml</font></tt> or <tt><font size=+1>TextPlain</font></tt>. The character set
+ of the document is described in <i>chset</i>, which can be
+ one of <tt><font size=+1>US_Ascii</font></tt>, <tt><font size=+1>ISO_8859_1</font></tt>, <tt><font size=+1>UTF_8</font></tt> or <tt><font size=+1>Unicode</font></tt>. The return value
+ is a linked list of <tt><font size=+1>Item</font></tt> structures, described in detail below.
+ As a side effect, <tt><font size=+1>*</font></tt><i>pdi</i> is set to point to a newly created <tt><font size=+1>Docinfo</font></tt>
+ structure, containing information pertaining to the entire document.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The library expects two allocation routines to be provided by
+ the caller, <tt><font size=+1>emalloc</font></tt> and <tt><font size=+1>erealloc</font></tt>. These routines are analogous
+ to the standard malloc and realloc routines, except that they
+ should not return if the memory allocation fails. In addition,
+ <tt><font size=+1>emalloc</font></tt> is required to zero the memory.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For debugging purposes, <i>printitems</i> may be called to display the
+ contents of an item list; individual items may be printed using
+ the <tt><font size=+1>%I</font></tt> print verb, installed on the first call to <i>parsehtml</i>. <i>validitems</i>
+ traverses the item list, checking that all of the pointers are
+ valid. It returns <tt><font size=+1>1</font></tt> is everything is ok, and <tt><font size=+1>0</font></tt> if an error was
+ found. Normally, one would not call these routines directly. Instead,
+ one sets the global variable <i>dbgbuild</i> and the library calls them
+ automatically. One can also set <i>warn</i>, to cause the library to
+ print a warning whenever it finds a problem with the input document,
+ and <i>dbglex</i>, to print debugging information in the
+ lexer.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When an item list is finished with, it should be freed with <i>freeitems</i>.
+ Then, <i>freedocinfo</i> should be called on the pointer returned in
+ <tt><font size=+1>*</font></tt><i>pdi</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Dimenkind</i> and <i>dimenspec</i> are provided to interpret the <tt><font size=+1>Dimen</font></tt> type,
+ as described in the section <i>Dimension Specifications</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Frame target names are mapped to integer ids via a global, permanent
+ mapping. To find the value for a given name, call <i>targetid</i>, which
+ allocates a new id if the name hasn&#8217;t been seen before. The name
+ of a given, known id may be retrieved using <i>targetname</i>. The library
+ predefines <tt><font size=+1>FTtop</font></tt>, <tt><font size=+1>FTself</font></tt>, <tt><font size=+1>FTparent</font></tt> and
+ <tt><font size=+1>FTblank</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The library handles all text as Unicode strings (type <tt><font size=+1>Rune*</font></tt>).
+ Character set conversion is provided by <i>fromStr</i> and <i>toStr</i>. <i>FromStr</i>
+ takes <i>n</i> Unicode characters from <i>buf</i> and converts them to the character
+ set described by <i>chset</i>. <i>ToStr</i> takes <i>n</i> bytes from <i>buf</i>, interpretted
+ as belonging to character set <i>chset</i>, and converts
+ them to a Unicode string. Both routines null-terminate the result,
+ and use <tt><font size=+1>emalloc</font></tt> to allocate space for it.<br>
+ <p><font size=+1><b>Items </b></font><br>
+ The return value of <i>parsehtml</i> is a linked list of variant structures,
+ with the generic portion described by the following definition:
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Item Item;<br>
+ struct Item<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Item* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ascent;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;anchorid;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state;<br>
+ Genattr* genattr;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tag;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ The field <tt><font size=+1>next</font></tt> points to the successor in the linked list of items,
+ while <tt><font size=+1>width</font></tt>, <tt><font size=+1>height</font></tt>, and <tt><font size=+1>ascent</font></tt> are intended for use by the caller
+ as part of the layout process. <tt><font size=+1>Anchorid</font></tt>, if non-zero, gives the
+ integer id assigned by the parser to the anchor that this item
+ is in (see section <i>Anchors</i>). <tt><font size=+1>State</font></tt> is a collection of
+ flags and values described as follows:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>enum<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ IFbrk = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x80000000,<br>
+ IFbrksp = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x40000000,<br>
+ IFnobrk = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x20000000,<br>
+ IFcleft = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x10000000,<br>
+ IFcright = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x08000000,<br>
+ IFwrap = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x04000000,<br>
+ IFhang = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x02000000,<br>
+ IFrjust = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x01000000,<br>
+ IFcjust = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x00800000,<br>
+ IFsmap = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x00400000,<br>
+ IFindentshift = 8,<br>
+ IFindentmask = &nbsp;&nbsp;&nbsp;(255&lt;&lt;IFindentshift),<br>
+ IFhangmask = &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;255<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>IFbrk</font></tt> is set if a break is to be forced before placing this item.
+ <tt><font size=+1>IFbrksp</font></tt> is set if a 1 line space should be added to the break
+ (in which case <tt><font size=+1>IFbrk</font></tt> is also set). <tt><font size=+1>IFnobrk</font></tt> is set if a break is
+ not permitted before the item. <tt><font size=+1>IFcleft</font></tt> is set if left floats should
+ be cleared (that is, if the list of pending left floats should
+ be placed) before this item is placed, and <tt><font size=+1>IFcright</font></tt> is set for
+ right floats. In both cases, IFbrk is also set. <tt><font size=+1>IFwrap</font></tt> is set
+ if the line containing this item is allowed to wrap. <tt><font size=+1>IFhang</font></tt> is
+ set if this item hangs into the left indent. <tt><font size=+1>IFrjust</font></tt> is set if
+ the line containing this item should be right justified, and <tt><font size=+1>IFcjust</font></tt>
+ is
+ set for center justified lines. <tt><font size=+1>IFsmap</font></tt> is used to indicate that
+ an image is a server-side map. The low 8 bits, represented by
+ <tt><font size=+1>IFhangmask</font></tt>, indicate the current hang into left indent, in tenths
+ of a tabstop. The next 8 bits, represented by <tt><font size=+1>IFindentmask</font></tt> and
+ <tt><font size=+1>IFindentshift</font></tt>, indicate the current indent in tab
+ stops.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The field <tt><font size=+1>genattr</font></tt> is an optional pointer to an auxiliary structure,
+ described in the section <i>Generic Attributes</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Finally, <tt><font size=+1>tag</font></tt> describes which variant type this item has. It can
+ have one of the values <tt><font size=+1>Itexttag</font></tt>, <tt><font size=+1>Iruletag</font></tt>, <tt><font size=+1>Iimagetag</font></tt>, <tt><font size=+1>Iformfieldtag</font></tt>,
+ <tt><font size=+1>Itabletag</font></tt>, <tt><font size=+1>Ifloattag</font></tt> or <tt><font size=+1>Ispacertag</font></tt>. For each of these values,
+ there is an additional structure defined, which includes Item
+ as an unnamed initial substructure,
+ and then defines additional fields.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Items of type <tt><font size=+1>Itexttag</font></tt> represent a piece of text, using the following
+ structure:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>struct Itext<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Item;<br>
+ Rune* s;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;fnt;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;fg;<br>
+ uchar voff;<br>
+ uchar ul;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ Here <tt><font size=+1>s</font></tt> is a null-terminated Unicode string of the actual characters
+ making up this text item, <tt><font size=+1>fnt</font></tt> is the font number (described in
+ the section <i>Font Numbers</i>), and <tt><font size=+1>fg</font></tt> is the RGB encoded color for
+ the text. <tt><font size=+1>Voff</font></tt> measures the vertical offset from the baseline;
+ subtract <tt><font size=+1>Voffbias</font></tt> to get the actual value (negative values
+ represent a displacement down the page). The field <tt><font size=+1>ul</font></tt> is the underline
+ style: <tt><font size=+1>ULnone</font></tt> if no underline, <tt><font size=+1>ULunder</font></tt> for conventional underline,
+ and <tt><font size=+1>ULmid</font></tt> for strike-through.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Items of type <tt><font size=+1>Iruletag</font></tt> represent a horizontal rule, as follows:
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>struct Irule<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Item;<br>
+ uchar align;<br>
+ uchar noshade;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;size;<br>
+ Dimen wspec;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ Here <tt><font size=+1>align</font></tt> is the alignment specification (described in the corresponding
+ section), <tt><font size=+1>noshade</font></tt> is set if the rule should not be shaded, <tt><font size=+1>size</font></tt>
+ is the height of the rule (as set by the size attribute), and
+ <tt><font size=+1>wspec</font></tt> is the desired width (see section <i>Dimension Specifications</i>).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Items of type <tt><font size=+1>Iimagetag</font></tt> describe embedded images, for which the
+ following structure is defined:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>struct Iimage<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Item;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;imsrc;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;imwidth;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;imheight;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;altrep;<br>
+ Map* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;map;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctlid;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;align;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;hspace;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;vspace;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;border;<br>
+ Iimage* nextimage;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ Here <tt><font size=+1>imsrc</font></tt> is the URL of the image source, <tt><font size=+1>imwidth</font></tt> and <tt><font size=+1>imheight</font></tt>,
+ if non-zero, contain the specified width and height for the image,
+ and <tt><font size=+1>altrep</font></tt> is the text to use as an alternative to the image,
+ if the image is not displayed. <tt><font size=+1>Map</font></tt>, if set, points to a structure
+ describing an associated client-side image map.
+ <tt><font size=+1>Ctlid</font></tt> is reserved for use by the application, for handling animated
+ images. <tt><font size=+1>Align</font></tt> encodes the alignment specification of the image.
+ <tt><font size=+1>Hspace</font></tt> contains the number of pixels to pad the image with on
+ either side, and <tt><font size=+1>Vspace</font></tt> the padding above and below. <tt><font size=+1>Border</font></tt> is
+ the width of the border to draw around the
+ image. <tt><font size=+1>Nextimage</font></tt> points to the next image in the document (the
+ head of this list is <tt><font size=+1>Docinfo.images</font></tt>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For items of type <tt><font size=+1>Iformfieldtag</font></tt>, the following structure is defined:
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>struct Iformfield<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Item;<br>
+ Formfield* formfield;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ This adds a single field, <tt><font size=+1>formfield</font></tt>, which points to a structure
+ describing a field in a form, described in section <i>Forms</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For items of type <tt><font size=+1>Itabletag</font></tt>, the following structure is defined:
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>struct Itable<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Item;<br>
+ Table* table;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Table</font></tt> points to a structure describing the table, described in
+ the section <i>Tables</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For items of type <tt><font size=+1>Ifloattag</font></tt>, the following structure is defined:
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>struct Ifloat<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Item;<br>
+ Item* &nbsp;&nbsp;&nbsp;&nbsp;item;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;side;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;infloats;<br>
+ Ifloat* nextfloat;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ The <tt><font size=+1>item</font></tt> points to a single item (either a table or an image)
+ that floats (the text of the document flows around it), and <tt><font size=+1>side</font></tt>
+ indicates the margin that this float sticks to; it is either <tt><font size=+1>ALleft</font></tt>
+ or <tt><font size=+1>ALright</font></tt>. <tt><font size=+1>X</font></tt> and <tt><font size=+1>y</font></tt> are reserved for use by the caller; these
+ are typically used for the coordinates of the top of the float.
+ <tt><font size=+1>Infloats</font></tt> is used by the caller to keep track of whether it has
+ placed the float. <tt><font size=+1>Nextfloat</font></tt> is used by the caller to link together
+ all of the floats that it has placed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For items of type <tt><font size=+1>Ispacertag</font></tt>, the following structure is defined:
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>struct Ispacer<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Item;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;spkind;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Spkind</font></tt> encodes the kind of spacer, and may be one of <tt><font size=+1>ISPnull</font></tt> (zero
+ height and width), <tt><font size=+1>ISPvline</font></tt> (takes on height and ascent of the
+ current font), <tt><font size=+1>ISPhspace</font></tt> (has the width of a space in the current
+ font) and <tt><font size=+1>ISPgeneral</font></tt> (for all other purposes, such as between
+ markers and lists).
+ <p><font size=+1><b>Generic Attributes </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The genattr field of an item, if non-nil, points to a structure
+ that holds the values of attributes not specific to any particular
+ item type, as they occur on a wide variety of underlying HTML
+ tags. The structure is as follows:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Genattr Genattr;<br>
+ struct Genattr<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;id;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;class;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;style;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;title;<br>
+ SEvent* events;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ Fields <tt><font size=+1>id</font></tt>, <tt><font size=+1>class</font></tt>, <tt><font size=+1>style</font></tt> and <tt><font size=+1>title</font></tt>, when non-nil, contain values
+ of correspondingly named attributes of the HTML tag associated
+ with this item. <tt><font size=+1>Events</font></tt> is a linked list of events (with corresponding
+ scripted actions) associated with the item:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct SEvent SEvent;<br>
+ struct SEvent<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ SEvent* next;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;script;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ Here, <tt><font size=+1>next</font></tt> points to the next event in the list, <tt><font size=+1>type</font></tt> is one of
+ <tt><font size=+1>SEonblur</font></tt>, <tt><font size=+1>SEonchange</font></tt>, <tt><font size=+1>SEonclick</font></tt>, <tt><font size=+1>SEondblclick</font></tt>, <tt><font size=+1>SEonfocus</font></tt>, <tt><font size=+1>SEonkeypress</font></tt>,
+ <tt><font size=+1>SEonkeyup</font></tt>, <tt><font size=+1>SEonload</font></tt>, <tt><font size=+1>SEonmousedown</font></tt>, <tt><font size=+1>SEonmousemove</font></tt>, <tt><font size=+1>SEonmouseout</font></tt>,
+ <tt><font size=+1>SEonmouseover</font></tt>, <tt><font size=+1>SEonmouseup</font></tt>, <tt><font size=+1>SEonreset</font></tt>, <tt><font size=+1>SEonselect</font></tt>,
+ <tt><font size=+1>SEonsubmit</font></tt> or <tt><font size=+1>SEonunload</font></tt>, and <tt><font size=+1>script</font></tt> is the text of the associated
+ script.<br>
+ <p><font size=+1><b>Dimension Specifications </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Some structures include a dimension specification, used where
+ a number can be followed by a <tt><font size=+1>%</font></tt> or a <tt><font size=+1>*</font></tt> to indicate percentage
+ of total or relative weight. This is encoded using the following
+ structure:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Dimen Dimen;<br>
+ struct Dimen<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int kindspec;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ Separate kind and spec values are extracted using <i>dimenkind</i> and
+ <i>dimenspec</i>. <i>Dimenkind</i> returns one of <tt><font size=+1>Dnone</font></tt>, <tt><font size=+1>Dpixels</font></tt>, <tt><font size=+1>Dpercent</font></tt> or
+ <tt><font size=+1>Drelative</font></tt>. <tt><font size=+1>Dnone</font></tt> means that no dimension was specified. In all
+ other cases, <i>dimenspec</i> should be called to find the absolute number
+ of pixels, the percentage of total, or the
+ relative weight.<br>
+ <p><font size=+1><b>Background Specifications </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ It is possible to set the background of the entire document, and
+ also for some parts of the document (such as tables). This is
+ encoded as follows:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Background Background;<br>
+ struct Background<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Rune* image;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;color;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Image</font></tt>, if non-nil, is the URL of an image to use as the background.
+ If this is nil, <tt><font size=+1>color</font></tt> is used instead, as the RGB value for a
+ solid fill color.<br>
+ <p><font size=+1><b>Alignment Specifications </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Certain items have alignment specifiers taken from the following
+ enumerated type:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>enum<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ALnone = 0, ALleft, ALcenter, ALright, ALjustify,<br>
+ ALchar, ALtop, ALmiddle, ALbottom, ALbaseline<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ These values correspond to the various alignment types named in
+ the HTML 4.0 standard. If an item has an alignment of <tt><font size=+1>ALleft</font></tt> or
+ <tt><font size=+1>ALright</font></tt>, the library automatically encapsulates it inside a float
+ item.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Tables, and the various rows, columns and cells within them, have
+ a more complex alignment specification, composed of separate vertical
+ and horizontal alignments:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Align Align;<br>
+ struct Align<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar halign;<br>
+ uchar valign;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Halign</font></tt> can be one of <tt><font size=+1>ALnone</font></tt>, <tt><font size=+1>ALleft</font></tt>, <tt><font size=+1>ALcenter</font></tt>, <tt><font size=+1>ALright</font></tt>, <tt><font size=+1>ALjustify</font></tt>
+ or <tt><font size=+1>ALchar</font></tt>. <tt><font size=+1>Valign</font></tt> can be one of <tt><font size=+1>ALnone</font></tt>, <tt><font size=+1>ALmiddle</font></tt>, <tt><font size=+1>ALbottom</font></tt>, <tt><font size=+1>ALtop</font></tt>
+ or <tt><font size=+1>ALbaseline</font></tt>.<br>
+ <p><font size=+1><b>Font Numbers </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Text items have an associated font number (the <tt><font size=+1>fnt</font></tt> field), which
+ is encoded as <tt><font size=+1>style*NumSize+size</font></tt>. Here, <tt><font size=+1>style</font></tt> is one of <tt><font size=+1>FntR</font></tt>,
+ <tt><font size=+1>FntI</font></tt>, <tt><font size=+1>FntB</font></tt> or <tt><font size=+1>FntT</font></tt>, for roman, italic, bold and typewriter font
+ styles, respectively, and size is <tt><font size=+1>Tiny</font></tt>, <tt><font size=+1>Small</font></tt>, <tt><font size=+1>Normal</font></tt>, <tt><font size=+1>Large</font></tt> or
+ <tt><font size=+1>Verylarge</font></tt>. The total number of possible
+ font numbers is <tt><font size=+1>NumFnt</font></tt>, and the default font number is <tt><font size=+1>DefFnt</font></tt>
+ (which is roman style, normal size).<br>
+ <p><font size=+1><b>Document Info </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Global information about an HTML page is stored in the following
+ structure:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Docinfo Docinfo;<br>
+ struct Docinfo<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ // stuff from HTTP headers, doc head, and body tag<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;base;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;doctitle;<br>
+ Background &nbsp;&nbsp;&nbsp;background;<br>
+ Iimage* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;backgrounditem;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;link;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vlink;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alink;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chset;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mediatype;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scripttype;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hasscripts;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;refresh;<br>
+ Kidinfo* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kidinfo;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;frameid;<br>
+ // info needed to respond to user actions<br>
+ Anchor* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;anchors;<br>
+ DestAnchor* dests;<br>
+ Form* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;forms;<br>
+ Table* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tables;<br>
+ Map* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maps;<br>
+ Iimage* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;images;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Src</font></tt> gives the URL of the original source of the document, and
+ <tt><font size=+1>base</font></tt> is the base URL. <tt><font size=+1>Doctitle</font></tt> is the document&#8217;s title, as set
+ by a <tt><font size=+1>&lt;title&gt;</font></tt> element. <tt><font size=+1>Background</font></tt> is as described in the section
+ <i>Background Specifications</i>, and <tt><font size=+1>backgrounditem</font></tt> is set to be an
+ image item for the document&#8217;s background image
+ (if given as a URL), or else nil. <tt><font size=+1>Text</font></tt> gives the default foregound
+ text color of the document, <tt><font size=+1>link</font></tt> the unvisited hyperlink color,
+ <tt><font size=+1>vlink</font></tt> the visited hyperlink color, and <tt><font size=+1>alink</font></tt> the color for highlighting
+ hyperlinks (all in 24-bit RGB format). <tt><font size=+1>Target</font></tt> is the default target
+ frame id. <tt><font size=+1>Chset</font></tt> and <tt><font size=+1>mediatype</font></tt> are as for
+ the <i>chset</i> and <i>mtype</i> parameters to <i>parsehtml</i>. <tt><font size=+1>Scripttype</font></tt> is the
+ type of any scripts contained in the document, and is always <tt><font size=+1>TextJavascript</font></tt>.
+ <tt><font size=+1>Hasscripts</font></tt> is set if the document contains any scripts. Scripting
+ is currently unsupported. <tt><font size=+1>Refresh</font></tt> is the contents of a <tt><font size=+1>&lt;meta http&#8722;equiv=Refresh
+ ...&gt;</font></tt> tag, if any. <tt><font size=+1>Kidinfo</font></tt> is set if this document is a frameset
+ (see section <i>Frames</i>). <tt><font size=+1>Frameid</font></tt> is this document&#8217;s frame id.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Anchors</font></tt> is a list of hyperlinks contained in the document, and
+ <tt><font size=+1>dests</font></tt> is a list of hyperlink destinations within the page (see
+ the following section for details). <tt><font size=+1>Forms</font></tt>, <tt><font size=+1>tables</font></tt> and <tt><font size=+1>maps</font></tt> are
+ lists of the various forms, tables and client-side maps contained
+ in the document, as described in subsequent sections.
+ <tt><font size=+1>Images</font></tt> is a list of all the image items in the document.<br>
+ <p><font size=+1><b>Anchors </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The library builds two lists for all of the <tt><font size=+1>&lt;a&gt;</font></tt> elements (anchors)
+ in a document. Each anchor is assigned a unique anchor id within
+ the document. For anchors which are hyperlinks (the <tt><font size=+1>href</font></tt> attribute
+ was supplied), the following structure is defined:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Anchor Anchor;<br>
+ struct Anchor<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Anchor* next;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;index;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;name;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;href;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Next</font></tt> points to the next anchor in the list (the head of this list
+ is <tt><font size=+1>Docinfo.anchors</font></tt>). <tt><font size=+1>Index</font></tt> is the anchor id; each item within
+ this hyperlink is tagged with this value in its <tt><font size=+1>anchorid</font></tt> field.
+ <tt><font size=+1>Name</font></tt> and <tt><font size=+1>href</font></tt> are the values of the correspondingly named attributes
+ of the anchor (in particular, href is the URL to go
+ to). <tt><font size=+1>Target</font></tt> is the value of the target attribute (if provided)
+ converted to a frame id.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Destinations within the document (anchors with the name attribute
+ set) are held in the <tt><font size=+1>Docinfo.dests</font></tt> list, using the following structure:
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct DestAnchor DestAnchor;<br>
+ struct DestAnchor<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ DestAnchor* next;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;index;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name;<br>
+ Item* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Next</font></tt> is the next element of the list, <tt><font size=+1>index</font></tt> is the anchor id,
+ <tt><font size=+1>name</font></tt> is the value of the name attribute, and <tt><font size=+1>item</font></tt> is points to
+ the item within the parsed document that should be considered
+ to be the destination.<br>
+ <p><font size=+1><b>Forms </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Any forms within a document are kept in a list, headed by <tt><font size=+1>Docinfo.forms</font></tt>.
+ The elements of this list are as follows:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Form Form;<br>
+ struct Form<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Form* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;formid;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;action;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;method;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nfields;<br>
+ Formfield* fields;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Next</font></tt> points to the next form in the list. <tt><font size=+1>Formid</font></tt> is a serial number
+ for the form within the document. <tt><font size=+1>Name</font></tt> is the value of the form&#8217;s
+ name or id attribute. <tt><font size=+1>Action</font></tt> is the value of any action attribute.
+ <tt><font size=+1>Target</font></tt> is the value of the target attribute (if any) converted
+ to a frame target id. <tt><font size=+1>Method</font></tt> is one of <tt><font size=+1>HGet</font></tt> or
+ <tt><font size=+1>HPost</font></tt>. <tt><font size=+1>Nfields</font></tt> is the number of fields in the form, and <tt><font size=+1>fields</font></tt>
+ is a linked list of the actual fields.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The individual fields in a form are described by the following
+ structure:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Formfield Formfield;<br>
+ struct Formfield<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Formfield* next;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ftype;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fieldid;<br>
+ Form* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;form;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;size;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maxlength;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rows;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cols;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flags;<br>
+ Option* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;options;<br>
+ Item* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctlid;<br>
+ SEvent* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;events;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ Here, <tt><font size=+1>next</font></tt> points to the next field in the list. <tt><font size=+1>Ftype</font></tt> is the
+ type of the field, which can be one of <tt><font size=+1>Ftext</font></tt>, <tt><font size=+1>Fpassword</font></tt>, <tt><font size=+1>Fcheckbox</font></tt>,
+ <tt><font size=+1>Fradio</font></tt>, <tt><font size=+1>Fsubmit</font></tt>, <tt><font size=+1>Fhidden</font></tt>, <tt><font size=+1>Fimage</font></tt>, <tt><font size=+1>Freset</font></tt>, <tt><font size=+1>Ffile</font></tt>, <tt><font size=+1>Fbutton</font></tt>, <tt><font size=+1>Fselect</font></tt>
+ or <tt><font size=+1>Ftextarea</font></tt>. <tt><font size=+1>Fieldid</font></tt> is a serial number for the field within
+ the form. <tt><font size=+1>Form</font></tt> points back
+ to the form containing this field. <tt><font size=+1>Name</font></tt>, <tt><font size=+1>value</font></tt>, <tt><font size=+1>size</font></tt>, <tt><font size=+1>maxlength</font></tt>,
+ <tt><font size=+1>rows</font></tt> and <tt><font size=+1>cols</font></tt> each contain the values of corresponding attributes
+ of the field, if present. <tt><font size=+1>Flags</font></tt> contains per-field flags, of which
+ <tt><font size=+1>FFchecked</font></tt> and <tt><font size=+1>FFmultiple</font></tt> are defined. <tt><font size=+1>Image</font></tt> is only used for fields
+ of type <tt><font size=+1>Fimage</font></tt>; it points to an
+ image item containing the image to be displayed. <tt><font size=+1>Ctlid</font></tt> is reserved
+ for use by the caller, typically to store a unique id of an associated
+ control used to implement the field. <tt><font size=+1>Events</font></tt> is the same as the
+ corresponding field of the generic attributes associated with
+ the item containing this field. <tt><font size=+1>Options</font></tt> is only used by
+ fields of type <tt><font size=+1>Fselect</font></tt>; it consists of a list of possible options
+ that may be selected for that field, using the following structure:
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Option Option;<br>
+ struct Option<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Option* next;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selected;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;value;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;display;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Next</font></tt> points to the next element of the list. <tt><font size=+1>Selected</font></tt> is set if
+ this option is to be displayed initially. <tt><font size=+1>Value</font></tt> is the value to
+ send when the form is submitted if this option is selected. <tt><font size=+1>Display</font></tt>
+ is the string to display on the screen for this option.<br>
+ <p><font size=+1><b>Tables </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The library builds a list of all the tables in the document, headed
+ by <tt><font size=+1>Docinfo.tables</font></tt>. Each element of this list has the following
+ format:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Table Table;<br>
+ struct Table<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Table* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;next;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tableid;<br>
+ Tablerow* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rows;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nrow;<br>
+ Tablecol* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cols;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ncol;<br>
+ Tablecell* &nbsp;&nbsp;&nbsp;&nbsp;cells;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ncell;<br>
+ Tablecell*** grid;<br>
+ Align &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;align;<br>
+ Dimen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;border;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellspacing;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellpadding;<br>
+ Background &nbsp;&nbsp;&nbsp;&nbsp;background;<br>
+ Item* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;caption;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;caption_place;<br>
+ Lay* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;caption_lay;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;totw;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;toth;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;caph;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;availw;<br>
+ Token* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tabletok;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flags;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Next</font></tt> points to the next element in the list of tables. <tt><font size=+1>Tableid</font></tt>
+ is a serial number for the table within the document. <tt><font size=+1>Rows</font></tt> is
+ an array of row specifications (described below) and <tt><font size=+1>nrow</font></tt> is the
+ number of elements in this array. Similarly, <tt><font size=+1>cols</font></tt> is an array
+ of column specifications, and <tt><font size=+1>ncol</font></tt> the size of this array.
+ <tt><font size=+1>Cells</font></tt> is a list of all cells within the table (structure described
+ below) and <tt><font size=+1>ncell</font></tt> is the number of elements in this list. Note
+ that a cell may span multiple rows and/or columns, thus <tt><font size=+1>ncell</font></tt>
+ may be smaller than <tt><font size=+1>nrow*ncol</font></tt>. <tt><font size=+1>Grid</font></tt> is a two-dimensional array
+ of cells within the table; the cell at row <tt><font size=+1>i</font></tt> and column <tt><font size=+1>j</font></tt> is
+ <tt><font size=+1>Table.grid[i][j]</font></tt>. A cell that spans multiple rows and/or columns
+ will be referenced by <tt><font size=+1>grid</font></tt> multiple times, however it will only
+ occur once in <tt><font size=+1>cells</font></tt>. <tt><font size=+1>Align</font></tt> gives the alignment specification for
+ the entire table, and <tt><font size=+1>width</font></tt> gives the requested width as a dimension
+ specification. <tt><font size=+1>Border</font></tt>, <tt><font size=+1>cellspacing
+ </font></tt>and <tt><font size=+1>cellpadding</font></tt> give the values of the corresponding attributes
+ for the table, and <tt><font size=+1>background</font></tt> gives the requested background for
+ the table. <tt><font size=+1>Caption</font></tt> is a linked list of items to be displayed as
+ the caption of the table, either above or below depending on whether
+ <tt><font size=+1>caption_place</font></tt> is <tt><font size=+1>ALtop</font></tt> or <tt><font size=+1>ALbottom</font></tt>.
+ Most of the remaining fields are reserved for use by the caller,
+ except <tt><font size=+1>tabletok</font></tt>, which is reserved for internal use. The type
+ <tt><font size=+1>Lay</font></tt> is not defined by the library; the caller can provide its
+ own definition.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>Tablecol</font></tt> structure is defined for use by the caller. The library
+ ensures that the correct number of these is allocated, but leaves
+ them blank. The fields are as follows:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Tablecol Tablecol;<br>
+ struct Tablecol<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;width;<br>
+ Align align;<br>
+ Point pos;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ The rows in the table are specified as follows:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Tablerow Tablerow;<br>
+ struct Tablerow<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Tablerow* &nbsp;&nbsp;&nbsp;next;<br>
+ Tablecell* cells;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ascent;<br>
+ Align &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;align;<br>
+ Background background;<br>
+ Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pos;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flags;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Next</font></tt> is only used during parsing; it should be ignored by the
+ caller. <tt><font size=+1>Cells</font></tt> provides a list of all the cells in a row, linked
+ through their <tt><font size=+1>nextinrow</font></tt> fields (see below). <tt><font size=+1>Height</font></tt>, <tt><font size=+1>ascent</font></tt> and
+ <tt><font size=+1>pos</font></tt> are reserved for use by the caller. <tt><font size=+1>Align</font></tt> is the alignment
+ specification for the row, and <tt><font size=+1>background</font></tt> is the
+ background to use, if specified. <tt><font size=+1>Flags</font></tt> is used by the parser;
+ ignore this field.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The individual cells of the table are described as follows:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Tablecell Tablecell;<br>
+ struct Tablecell<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Tablecell* next;<br>
+ Tablecell* nextinrow;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cellid;<br>
+ Item* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content;<br>
+ Lay* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lay;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rowspan;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;colspan;<br>
+ Align &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;align;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flags;<br>
+ Dimen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wspec;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hspec;<br>
+ Background background;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;minw;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;maxw;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ascent;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;row;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;col;<br>
+ Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pos;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Next</font></tt> is used to link together the list of all cells within a table
+ (<tt><font size=+1>Table.cells</font></tt>), whereas <tt><font size=+1>nextinrow</font></tt> is used to link together all
+ the cells within a single row (<tt><font size=+1>Tablerow.cells</font></tt>). <tt><font size=+1>Cellid</font></tt> provides
+ a serial number for the cell within the table. <tt><font size=+1>Content</font></tt> is a linked
+ list of the items to be laid out within the cell. <tt><font size=+1>Lay
+ </font></tt>is reserved for the user to describe how these items have been
+ laid out. <tt><font size=+1>Rowspan</font></tt> and <tt><font size=+1>colspan</font></tt> are the number of rows and columns
+ spanned by this cell, respectively. <tt><font size=+1>Align</font></tt> is the alignment specification
+ for the cell. <tt><font size=+1>Flags</font></tt> is some combination of <tt><font size=+1>TFparsing</font></tt>, <tt><font size=+1>TFnowrap</font></tt>
+ and <tt><font size=+1>TFisth</font></tt> or&#8217;d together. Here
+ <tt><font size=+1>TFparsing</font></tt> is used internally by the parser, and should be ignored.
+ <tt><font size=+1>TFnowrap</font></tt> means that the contents of the cell should not be wrapped
+ if they don&#8217;t fit the available width, rather, the table should
+ be expanded if need be (this is set when the nowrap attribute
+ is supplied). <tt><font size=+1>TFisth</font></tt> means that the cell was created
+ by the <tt><font size=+1>&lt;th&gt;</font></tt> element (rather than the <tt><font size=+1>&lt;td&gt;</font></tt> element), indicating that
+ it is a header cell rather than a data cell. <tt><font size=+1>Wspec</font></tt> provides a
+ suggested width as a dimension specification, and <tt><font size=+1>hspec</font></tt> provides
+ a suggested height in pixels. <tt><font size=+1>Background</font></tt> gives a background specification
+ for the individual cell. <tt><font size=+1>Minw</font></tt>, <tt><font size=+1>maxw</font></tt>,
+ <tt><font size=+1>ascent</font></tt> and <tt><font size=+1>pos</font></tt> are reserved for use by the caller during layout.
+ <tt><font size=+1>Row</font></tt> and <tt><font size=+1>col</font></tt> give the indices of the row and column of the top
+ left-hand corner of the cell within the table grid.<br>
+ <p><font size=+1><b>Client-side Maps </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The library builds a list of client-side maps, headed by <tt><font size=+1>Docinfo.maps</font></tt>,
+ and having the following structure:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Map Map;<br>
+ struct Map<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Map* &nbsp;&nbsp;&nbsp;next;<br>
+ Rune* name;<br>
+ Area* areas;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Next</font></tt> points to the next element in the list, <tt><font size=+1>name</font></tt> is the name
+ of the map (use to bind it to an image), and <tt><font size=+1>areas</font></tt> is a list of
+ the areas within the image that comprise the map, using the following
+ structure:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Area Area;<br>
+ struct Area<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Area* &nbsp;&nbsp;&nbsp;next;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shape;<br>
+ Rune* &nbsp;&nbsp;&nbsp;href;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;target;<br>
+ Dimen* coords;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ncoords;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Next</font></tt> points to the next element in the map&#8217;s list of areas. <tt><font size=+1>Shape</font></tt>
+ describes the shape of the area, and is one of <tt><font size=+1>SHrect</font></tt>, <tt><font size=+1>SHcircle</font></tt>
+ or <tt><font size=+1>SHpoly</font></tt>. <tt><font size=+1>Href</font></tt> is the URL associated with this area in its role
+ as a hypertext link, and <tt><font size=+1>target</font></tt> is the target frame it should
+ be loaded in. <tt><font size=+1>Coords</font></tt> is an array of coordinates for
+ the shape, and <tt><font size=+1>ncoords</font></tt> is the size of this array (number of elements).<br>
+ <p><font size=+1><b>Frames </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the <tt><font size=+1>Docinfo.kidinfo</font></tt> field is set, the document is a frameset.
+ In this case, it is typical for <i>parsehtml</i> to return nil, as a
+ document which is a frameset should have no actual items that
+ need to be laid out (such will appear only in subsidiary documents).
+ It is possible that items will be returned by a malformed
+ document; the caller should check for this and free any such items.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>Kidinfo</font></tt> structure itself reflects the fact that framesets
+ can be nested within a document. If is defined as follows:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Kidinfo Kidinfo;<br>
+ struct Kidinfo<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Kidinfo* next;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isframeset;<br>
+ // fields for &quot;frame&quot;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src;<br>
+ Rune* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;marginw;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;marginh;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;framebd;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flags;<br>
+ // fields for &quot;frameset&quot;<br>
+ Dimen* &nbsp;&nbsp;&nbsp;&nbsp;rows;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nrows;<br>
+ Dimen* &nbsp;&nbsp;&nbsp;&nbsp;cols;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ncols;<br>
+ Kidinfo* kidinfos;<br>
+ Kidinfo* nextframeset;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Next</font></tt> is only used if this structure is part of a containing frameset;
+ it points to the next element in the list of children of that
+ frameset. <tt><font size=+1>Isframeset</font></tt> is set when this structure represents a frameset;
+ if clear, it is an individual frame.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Some fields are used only for framesets. <tt><font size=+1>Rows</font></tt> is an array of dimension
+ specifications for rows in the frameset, and <tt><font size=+1>nrows</font></tt> is the length
+ of this array. <tt><font size=+1>Cols</font></tt> is the corresponding array for columns, of
+ length <tt><font size=+1>ncols</font></tt>. <tt><font size=+1>Kidinfos</font></tt> points to a list of components contained
+ within this frameset, each of which may be a
+ frameset or a frame. <tt><font size=+1>Nextframeset</font></tt> is only used during parsing,
+ and should be ignored.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The remaining fields are used if the structure describes a frame,
+ not a frameset. <tt><font size=+1>Src</font></tt> provides the URL for the document that should
+ be initially loaded into this frame. Note that this may be a relative
+ URL, in which case it should be interpretted using the containing
+ document&#8217;s URL as the base. <tt><font size=+1>Name</font></tt> gives the name of
+ the frame, typically supplied via a name attribute in the HTML.
+ If no name was given, the library allocates one. <tt><font size=+1>Marginw</font></tt>, <tt><font size=+1>marginh</font></tt>
+ and <tt><font size=+1>framebd</font></tt> are the values of the marginwidth, marginheight and
+ frameborder attributes, respectively. <tt><font size=+1>Flags</font></tt> can contain some combination
+ of the following: <tt><font size=+1>FRnoresize</font></tt> (the
+ frame had the noresize attribute set, and the user should not
+ be allowed to resize it), <tt><font size=+1>FRnoscroll</font></tt> (the frame should not have
+ any scroll bars), <tt><font size=+1>FRhscroll</font></tt> (the frame should have a horizontal
+ scroll bar), <tt><font size=+1>FRvscroll</font></tt> (the frame should have a vertical scroll
+ bar), <tt><font size=+1>FRhscrollauto</font></tt> (the frame should be automatically
+ given a horizontal scroll bar if its contents would not otherwise
+ fit), and <tt><font size=+1>FRvscrollauto</font></tt> (the frame gets a vertical scrollbar only
+ if required).<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libhtml<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/fmt.html"><i>fmt</i>(1)</a>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ W3C World Wide Web Consortium, &#8220;HTML 4.01 Specification&#8221;.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The entire HTML document must be loaded into memory before any
+ of it can be parsed.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/index.html b/man/man3/index.html
new file mode 100644
index 00000000..90e8d3cf
--- /dev/null
+++ b/man/man3/index.html
@@ -0,0 +1,647 @@
+<html>
+<head>
+<title>Manual Section 3 - Plan 9 from User Space</title>
+</head>
+<body>
+<table width=100%>
+<tr><td width=20><td>
+<center>
+<table border=0 cellspacing=0 cellpadding=0 width=100%>
+<tr height=1><td width=200><td>
+<tr><td colspan=2>
+ <center>
+ <b>Manual Section 3 - Plan 9 from User Space</b>
+ </center>
+<tr height=10><td>
+<tr><td valign=top><a href="intro.html">intro(3)</a><td>intro &ndash; introduction to library functions
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="9p.html">9p(3)</a><td>Srv
+dirread9p
+emalloc9p
+erealloc9p
+estrdup9p
+postfd
+postmountsrv
+readbuf
+readstr
+respond
+srv
+threadpostmountsrv
+walkandclone &ndash; 9P file service
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="9p-cmdbuf.html">9p-cmdbuf(3)</a><td>Cmdbuf, parsecmd, respondcmderror, lookupcmd &ndash; control message parsing
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="9p-fid.html">9p-fid(3)</a><td>Fid, Fidpool, allocfidpool, freefidpool, allocfid, closefid, lookupfid, removefid
+Req, Reqpool, allocreqpool, freereqpool, allocreq, closereq, lookupreq, removereq &ndash; 9P fid, request tracking
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="9p-file.html">9p-file(3)</a><td>Tree, alloctree, freetree
+File, createfile, closefile, removefile, walkfile
+opendirfile, readdirfile, closedirfile, hasperm &ndash; in-memory file hierarchy
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="9p-intmap.html">9p-intmap(3)</a><td>Intmap, allocmap, freemap, insertkey, caninsertkey, lookupkey
+deletekey &ndash; integer to data structure maps
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="9pclient.html">9pclient(3)</a><td>CFid, CFsys, fsinit, fsmount, fsroot, fssetroot, fsunmount, nsmount, fsversion, fsauth, fsattach, fsclose, fscreate, fsdirread, fsdirreadall, fsdirstat, fsdirfstat, fsdirwstat, fsdirfwstat, fsopen, fsopenfd, fspread, fspwrite, fsread, fsreadn, fswrite &ndash; 9P client library
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="addpt.html">addpt(3)</a><td>addpt, subpt, mulpt, divpt, rectaddpt, rectsubpt, insetrect, canonrect, eqpt, eqrect, ptinrect, rectinrect, rectXrect, rectclip, combinerect, Dx, Dy, Pt, Rect, Rpt &ndash; arithmetic on points and rectangles
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="aes.html">aes(3)</a><td>setupAESstate, aesCBCencrypt, aesCBCdecrypt - advanced encryption standard (rijndael)
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="allocimage.html">allocimage(3)</a><td>allocimage, allocimagemix, freeimage, nameimage, namedimage, setalpha, loadimage, cloadimage, unloadimage, readimage, writeimage, bytesperline, wordsperline &ndash; allocating, freeing, reading, writing images
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="arg.html">arg(3)</a><td>ARGBEGIN, ARGEND, ARGC, ARGF, EARGF, arginit, argopt &ndash; process option letters from argv
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="arith3.html">arith3(3)</a><td>add3, sub3, neg3, div3, mul3, eqpt3, closept3, dot3, cross3, len3, dist3, unit3, midpt3, lerp3, reflect3, nearseg3, pldist3, vdiv3, vrem3, pn2f3, ppp2f3, fff2p3, pdiv4, add4, sub4 &ndash; operations on 3-d points and planes
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="atof.html">atof(3)</a><td>atof, atoi, atol, atoll, charstod, strtod, strtol, strtoll, strtoul, strtoull &ndash; convert text to numbers
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="bin.html">bin(3)</a><td>binalloc, bingrow, binfree &ndash; grouped memory allocation
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="bio.html">bio(3)</a><td>Bopen, Bfdopen, Binit, Binits, Brdline, Brdstr, Bgetc, Bgetrune, Bgetd, Bungetc, Bungetrune, Bread, Bseek, Boffset, Bfildes, Blinelen, Bputc, Bputrune, Bprint, Bvprint, Bwrite, Bflush, Bterm, Bbuffered &ndash; buffered input/output
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="blowfish.html">blowfish(3)</a><td>setupBFstate, bfCBCencrypt, bfCBCdecrypt, bfECBencrypt, bfECBdecrypt - blowfish encryption
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="cachechars.html">cachechars(3)</a><td>cachechars, agefont, loadchar, Subfont, Fontchar, Font &ndash; font utilities
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="cleanname.html">cleanname(3)</a><td>cleanname &ndash; clean a path name
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="color.html">color(3)</a><td>cmap2rgb, cmap2rgba, rgb2cmap &ndash; colors and color maps
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="complete.html">complete(3)</a><td>complete, freecompletion &ndash; file name completion
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="cputime.html">cputime(3)</a><td>cputime, times &ndash; cpu time in this process and children
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="ctime.html">ctime(3)</a><td>ctime, localtime, gmtime, asctime, tm2sec, timezone &ndash; convert date and time
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="des.html">des(3)</a><td>setupDESstate, des_key_setup, block_cipher, desCBCencrypt, desCBCdecrypt, desECBencrypt, desECBdecrypt, des3CBCencrypt, des3CBCdecrypt, des3ECBencrypt, des3ECBdecrypt, key_setup, des56to64, des64to56, setupDES3state, triple_block_cipher, - single and triple digital encryption standard
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="dial.html">dial(3)</a><td>dial, announce, listen, accept, reject, netmkaddr, dialparse &ndash; make and break network connections
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="dirread.html">dirread(3)</a><td>dirread, dirreadall &ndash; read directory
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="draw.html">draw(3)</a><td>Image, draw, drawop, gendraw, gendrawop, drawreplxy, drawrepl
+replclipr, line, lineop, poly, polyop, fillpoly, fillpolyop, bezier, bezierop
+bezspline, bezsplineop, bezsplinepts, fillbezier, fillbezierop
+fillbezspline, fillbezsplineop, ellipse, ellipseop
+fillellipse, fillellipseop, arc, arcop, fillarc, fillarcop
+icossin, icossin2, border, string, stringop, stringn, stringnop
+runestring, runestringop, runestringn, runestringnop, stringbg
+stringbgop, stringnbg, stringnbgop, runestringbg, runestringbgop
+runestringnbg, runestringnbgop, _string, ARROW, drawsetdebug &ndash; graphics functions
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="dsa.html">dsa(3)</a><td>dsagen, dsasign, dsaverify, dsapuballoc, dsapubfree, dsaprivalloc, dsaprivfree, dsasigalloc, dsasigfree, dsaprivtopub - digital signature algorithm
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="dup.html">dup(3)</a><td>dup &ndash; duplicate an open file descriptor
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="elgamal.html">elgamal(3)</a><td>eggen, egencrypt, egdecrypt, egsign, egverify, egpuballoc, egpubfree, egprivalloc, egprivfree, egsigalloc, egsigfree, egprivtopub - elgamal encryption
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="encode.html">encode(3)</a><td>dec64, enc64, dec32, enc32, dec16, enc16, encodefmt &ndash; encoding byte arrays as strings
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="errstr.html">errstr(3)</a><td>errstr, rerrstr, werrstr &ndash; description of last system call error
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="event.html">event(3)</a><td>event, einit, estart, estartfn, etimer, eread, emouse, ekbd, ecanread, ecanmouse, ecankbd, ereadmouse, eatomouse, eresized, egetrect, edrawgetrect, emenuhit, emoveto, esetcursor, Event, Mouse, Menu &ndash; graphics events
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="exec.html">exec(3)</a><td>exec, execl &ndash; execute a file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="exits.html">exits(3)</a><td>exits, _exits, atexit, atexitdont, terminate &ndash; terminate process, process cleanup
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="fcall.html">fcall(3)</a><td>Fcall, convS2M, convD2M, convM2S, convM2D, fcallfmt, dirfmt, dirmodefmt, read9pmsg, statcheck, sizeS2M, sizeD2M &ndash; interface to Plan 9 File protocol
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="flate.html">flate(3)</a><td>deflateinit, deflate, deflatezlib, deflateblock, deflatezlibblock, inflateinit, inflate, inflatezlib, inflateblock, inflatezlibblock, flateerr, mkcrctab, blockcrc, adler32 &ndash; deflate compression
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="fmtinstall.html">fmtinstall(3)</a><td>fmtinstall, dofmt, dorfmt, fmtprint, fmtvprint, fmtrune, fmtstrcpy, fmtrunestrcpy, fmtfdinit, fmtfdflush, fmtstrinit, fmtstrflush, runefmtstrinit, runefmtstrflush, errfmt &ndash; support for user-defined print formats and output routines
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="frame.html">frame(3)</a><td>frinit, frsetrects, frinittick, frclear, frcharofpt, frptofchar, frinsert, frdelete, frselect, frtick, frselectpaint, frdrawsel, frdrawsel0, frgetmouse &ndash; frames of text
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="genrandom.html">genrandom(3)</a><td>genrandom, prng &ndash; random number generation
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="get9root.html">get9root(3)</a><td>get9root, unsharp &ndash; get path to root of Plan 9 tree
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="getcallerpc.html">getcallerpc(3)</a><td>getcallerpc &ndash; fetch return PC of current function
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="getenv.html">getenv(3)</a><td>getenv, putenv &ndash; access environment variables
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="getfields.html">getfields(3)</a><td>getfields, gettokens, tokenize &ndash; break a string into fields
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="getns.html">getns(3)</a><td>getns &ndash; get path to name space directory
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="getsnarf.html">getsnarf(3)</a><td>getsnarf, putsnarf &ndash; window system snarf (cut and paste) buffer
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="getuser.html">getuser(3)</a><td>getuser, sysname &ndash; get user or system name
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="getwd.html">getwd(3)</a><td>getwd &ndash; get current directory
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="graphics.html">graphics(3)</a><td>Display, Point, Rectangle, Cursor, initdraw, geninitdraw, drawerror, initdisplay, closedisplay, getdefont, getwindow, gengetwindow, flushimage, bufimage, lockdisplay, unlockdisplay, cursorswitch, cursorset, openfont, buildfont, freefont, Pfmt, Rfmt, strtochan, chantostr, chantodepth &ndash; interactive graphics
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="html.html">html(3)</a><td>parsehtml
+printitems
+validitems
+freeitems
+freedocinfo
+dimenkind
+dimenspec
+targetid
+targetname
+fromStr
+toStr
+&ndash; HTML parser
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="ioproc.html">ioproc(3)</a><td>closeioproc
+iocall
+ioclose
+iointerrupt
+iodial
+ioopen
+ioproc
+ioread
+ioread9pmsg
+ioreadn
+iorecvfd
+iosendfd
+iosleep
+iowrite &ndash; slave I/O processes for threaded programs
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="ip.html">ip(3)</a><td>eipfmt, parseip, parseipmask, v4parseip, v4parsecidr, parseether, myipaddr, myetheraddr, maskip, equivip, defmask, isv4, v4tov6, v6tov4, nhgetl, nhgets, nhgetv, hnputl, hnputs, hnputv, ptclbsum, readipifc &ndash; Internet protocol
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="isalpharune.html">isalpharune(3)</a><td>isalpharune, islowerrune, isspacerune, istitlerune, isupperrune, tolowerrune, totitlerune, toupperrune &ndash; Unicode character classes and cases
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="keyboard.html">keyboard(3)</a><td>initkeyboard, ctlkeyboard, closekeyboard &ndash; keyboard control
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="lock.html">lock(3)</a><td>lock, canlock, unlock
+qlock, canqlock, qunlock
+rlock, canrlock, runlock
+wlock, canwlock, wunlock
+rsleep, rwakeup, rwakeupall
+incref, decref
+&ndash; spin locks, queueing rendezvous locks, reader-writer locks, rendezvous points, and reference counts
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mach.html">mach(3)</a><td>machbytype, machbyname &ndash; machine-independent access to executables and programs
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mach-cmd.html">mach-cmd(3)</a><td>attachargs, attachcore, attachdynamic, attachproc, proctextfile &ndash; debugging processes and core files
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mach-file.html">mach-file(3)</a><td>crackhdr, uncrackhdr, mapfile, unmapfile, mapproc, unmapproc, detachproc, ctlproc
+procnotes &ndash; machine-independent access to exectuable files and running processes
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mach-map.html">mach-map(3)</a><td>allocmap, addseg, findseg, addrtoseg
+addrtosegafter, removeseg, freemap
+get1, get2, get4, get8
+put1, put2, put4, put8
+rget, rput, fpformat
+locnone, locaddr, locconst, locreg, locindir
+loccmp, loceval, locfmt, locsimplify
+lget1, lget2, lget4, lget8
+lput1, lput2, lput4, lput8 &ndash; machine-independent
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mach-stack.html">mach-stack(3)</a><td>stacktrace, localaddr, unwindframe, windindex, windreglocs &ndash; stack traces
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mach-swap.html">mach-swap(3)</a><td>beswap2, beswap4, beswap8, beieeeftoa32, beieeeftoa64, beieeeftoa80
+beload2, beload4, beload8
+leswap2, leswap4, leswap8, leieeeftoa32, leieeeftoa64, leieeeftoa80
+leload2, leload4, leload8, ieeeftoa32, ieeeftoa64 &ndash; machine-independent access to byte-ordered data
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mach-symbol.html">mach-symbol(3)</a><td>symopen, symclose, findhdr, indexsym, lookupsym, findsym
+findexsym, flookupsym, ffindsym
+lookuplsym, indexlsym, findlsym
+symoff, pc2file, file2pc, line2pc, fnbound, fileline
+pc2line &ndash; symbol table access functions
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="malloc.html">malloc(3)</a><td>malloc, mallocz, free, realloc, calloc, setmalloctag, setrealloctag, getmalloctag, getrealloctag &ndash; memory allocator
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="matrix.html">matrix(3)</a><td>ident, matmul, matmulr, determinant, adjoint, invertmat, xformpoint, xformpointd, xformplane, pushmat, popmat, rot, qrot, scale, move, xform, ixform, persp, look, viewport &ndash; Geometric transformations
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="memdraw.html">memdraw(3)</a><td>Memimage
+Memdata
+Memdrawparam
+memimageinit
+wordaddr
+byteaddr
+memimagemove
+allocmemimage
+allocmemimaged
+readmemimage
+creadmemimage
+writememimage
+freememimage
+memsetchan
+loadmemimage
+cloadmemimage
+unloadmemimage
+memfillcolor
+memarc
+mempoly
+memellipse
+memfillpoly
+memimageline
+memimagedraw
+drawclip
+memlinebbox
+memlineendsize
+allocmemsubfont
+openmemsubfont
+freememsubfont
+memsubfontwidth
+getmemdefont
+memimagestring
+iprint
+hwdraw &ndash; drawing routines for memory-resident images
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="memlayer.html">memlayer(3)</a><td>memdraw, memlalloc, memldelete, memlexpose, memlfree, memlhide, memline, memlnorefresh, memload, memunload, memlorigin, memlsetrefresh, memltofront, memltofrontn, memltorear, memltorearn &ndash; windows of memory-resident images
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="memory.html">memory(3)</a><td>memccpy, memchr, memcmp, memcpy, memmove, memset &ndash; memory operations
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mouse.html">mouse(3)</a><td>initmouse, readmouse, closemouse, moveto, cursorswitch, getrect, drawgetrect, menuhit, setcursor &ndash; mouse control
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mousescrollsize.html">mousescrollsize(3)</a><td>mousescrollsize &ndash; compute mouse scroll increment
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mp.html">mp(3)</a><td>mpsetminbits, mpnew, mpfree, mpbits, mpnorm, mpcopy, mpassign, mprand, strtomp, mpfmt,mptoa, betomp, mptobe, letomp, mptole, mptoui, uitomp, mptoi, itomp, uvtomp, mptouv, vtomp, mptov, mpdigdiv, mpadd, mpsub, mpleft, mpright, mpmul, mpexp, mpmod, mpdiv, mpfactorial, mpcmp, mpextendedgcd, mpinvert, mpsignif, mplowbits0, mpvecdigmuladd, mpvecdigmulsub, mpvecadd, mpvecsub, mpveccmp, mpvecmul, mpmagcmp, mpmagadd, mpmagsub, crtpre, crtin, crtout, crtprefree, crtresfree &ndash; extended precision arithmetic
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="muldiv.html">muldiv(3)</a><td>muldiv, umuldiv &ndash; high-precision multiplication and division
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="mux.html">mux(3)</a><td>Mux, muxinit, muxrpc, muxthreads &ndash; protocol multiplexor
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="nan.html">nan(3)</a><td>NaN, Inf, isNaN, isInf &ndash; not-a-number and infinity functions
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="needstack.html">needstack(3)</a><td>needstack &ndash; check for execution stack overflow
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="notify.html">notify(3)</a><td>notify, noted, atnotify, noteenable, notedisable, notifyon, notifyoff &ndash; handle asynchronous process notification
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="open.html">open(3)</a><td>open, create, close &ndash; open a file for reading or writing, create file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="opentemp.html">opentemp(3)</a><td>opentemp &ndash; create a uniquely-named file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="pipe.html">pipe(3)</a><td>pipe &ndash; create an interprocess channel
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="plumb.html">plumb(3)</a><td>eplumb, plumbfree, plumbopen, plumbopenfid, plumbsend, plumbsendtofid, plumbsendtext, plumblookup, plumbpack, plumbpackattr, plumbaddattr, plumbdelattr, plumbrecv, plumbrecvfid, plumbunpack, plumbunpackpartial, plumbunpackattr, Plumbmsg &ndash; plumb messages
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="post9pservice.html">post9pservice(3)</a><td>post9pservice &ndash; post 9P service for use by clients
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="postnote.html">postnote(3)</a><td>postnote &ndash; send a note to a process or process group
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="prime.html">prime(3)</a><td>genprime, gensafeprime, genstrongprime, DSAprimes, probably_prime, smallprimetest &ndash; prime number generation
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="print.html">print(3)</a><td>print, fprint, sprint, snprint, seprint, smprint, runesprint, runesnprint, runeseprint, runesmprint, vfprint, vsnprint, vseprint, vsmprint, runevsnprint, runevseprint, runevsmprint &ndash; print formatted output
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="proto.html">proto(3)</a><td>rdproto &ndash; parse and process a proto file listing
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="pushtls.html">pushtls(3)</a><td>pushtls, tlsClient, tlsServer, initThumbprints, freeThumbprints, okThumbprint, readcert, readcertchain &ndash; attach TLS1 or SSL3 encryption to a communication channel
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="qball.html">qball(3)</a><td>qball &ndash; 3-d rotation controller
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="quaternion.html">quaternion(3)</a><td>qtom, mtoq, qadd, qsub, qneg, qmul, qdiv, qunit, qinv, qlen, slerp, qmid, qsqrt &ndash; Quaternion arithmetic
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="quote.html">quote(3)</a><td>quotestrdup, quoterunestrdup, unquotestrdup, unquoterunestrdup, quotestrfmt, quoterunestrfmt, quotefmtinstall, doquote, needsrcquote &ndash; quoted character strings
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="rand.html">rand(3)</a><td>rand, lrand, frand, nrand, lnrand, srand, truerand, ntruerand, fastrand, nfastrand &ndash; random number generator
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="rc4.html">rc4(3)</a><td>setupRC4state, rc4, rc4skip, rc4back - alleged rc4 encryption
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="read.html">read(3)</a><td>read, readn, write, pread, pwrite &ndash; read or write file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="regexp.html">regexp(3)</a><td>regcomp, regcomplit, regcompnl, regexec, regsub, rregexec, rregsub, regerror &ndash; regular expression
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="rfork.html">rfork(3)</a><td>rfork &ndash; manipulate process state
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="rsa.html">rsa(3)</a><td>asn1dump
+asn1toRSApriv
+decodepem
+decodepemchain
+rsadecrypt
+rsaencrypt
+rsafill,
+rsagen
+rsaprivalloc
+rsaprivfree
+rsaprivtopub
+rsapuballoc
+rsapubfree
+X509toRSApub
+X509dump
+X509gen
+X509req
+X509verify &ndash; RSA encryption algorithm
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="rune.html">rune(3)</a><td>runetochar, chartorune, runelen, runenlen, fullrune, utfecpy, utflen, utfnlen, utfrune, utfrrune, utfutf &ndash; rune/UTF conversion
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="runestrcat.html">runestrcat(3)</a><td>runestrcat
+runestrncat
+runestrcmp
+runestrncmp
+runestrcpy
+runestrncpy
+runestrecpy
+runestrlen
+runestrchr
+runestrrchr
+runestrdup
+runestrstr &ndash; rune string operations
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="sechash.html">sechash(3)</a><td>md4, md5, sha1, hmac_md5, hmac_sha1, md5pickle, md5unpickle, sha1pickle, sha1unpickle &ndash; cryptographically secure hashes
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="seek.html">seek(3)</a><td>seek &ndash; change file offset
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="sendfd.html">sendfd(3)</a><td>sendfd, recvfd &ndash; pass file descriptors along Unix domain sockets
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="setjmp.html">setjmp(3)</a><td>setjmp, longjmp, notejmp &ndash; non-local goto
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="sleep.html">sleep(3)</a><td>sleep, alarm &ndash; delay, ask for delayed note
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="stat.html">stat(3)</a><td>stat, fstat, wstat, fwstat, dirstat, dirfstat, dirwstat, dirfwstat, nulldir &ndash; get and put file status
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="strcat.html">strcat(3)</a><td>strcat, strncat, strcmp, strncmp, cistrcmp, cistrncmp, strcpy, strncpy, strecpy, strlen, strchr, strrchr, strpbrk, strspn, strcspn, strtok, strdup, strstr, cistrstr &ndash; string operations
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="string.html">string(3)</a><td>s_alloc, s_append, s_array, s_copy, s_error, s_free, s_incref, s_memappend, s_nappend, s_new, s_newalloc, s_parse, s_reset, s_restart, s_terminate, s_tolower, s_putc, s_unique, s_grow, s_read, s_read_line, s_getline, s_allocinstack, s_freeinstack, s_rdinstack &ndash; extensible strings
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="stringsize.html">stringsize(3)</a><td>stringsize, stringwidth, stringnwidth, runestringsize, runestringwidth, runestringnwidth &ndash; graphical size of strings
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="subfont.html">subfont(3)</a><td>allocsubfont, freesubfont, installsubfont, lookupsubfont, uninstallsubfont, subfontname, readsubfont, readsubfonti, writesubfont, stringsubfont, strsubfontwidth, mkfont &ndash; subfont manipulation
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="sysfatal.html">sysfatal(3)</a><td>sysfatal &ndash; system error messages
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="thread.html">thread(3)</a><td>alt
+chancreate
+chanfree
+chaninit
+chanprint
+chansetname
+mainstacksize
+proccreate
+procdata
+recv
+recvp
+recvul
+send
+sendp
+sendul
+nbrecv
+nbrecvp
+nbrecvul
+nbsend
+nbsendp
+nbsendul
+threadcreate
+threaddata
+threadexec
+threadexecl
+threadexits
+threadexitsall
+threadgetgrp
+threadgetname
+threadint
+threadintgrp
+threadkill
+threadkillgrp
+threadmain
+threadnotify
+threadid
+threadpid
+threadsetgrp
+threadsetname
+threadsetstate
+threadspawn
+threadwaitchan
+yield &ndash; thread and proc management
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="time.html">time(3)</a><td>time, nsec &ndash; time in seconds and nanoseconds since epoch
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="udpread.html">udpread(3)</a><td>udpread, udpwrite &ndash; read and write UDP packets
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="wait.html">wait(3)</a><td>await, awaitnohang, awaitfor, wait, waitnohang, waitfor, waitpid &ndash; wait for a process to exit
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="wctl.html">wctl(3)</a><td>drawresizewindow, drawsetlabel, drawtopwindow &ndash; window management
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="window.html">window(3)</a><td>Screen, allocscreen, publicscreen, freescreen, allocwindow, bottomwindow, bottomnwindows, topwindow, topnwindows, originwindow &ndash; window management
+</table>
+</center>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<td width=20>
+</table>
+</body>
+</html>
diff --git a/man/man3/intro.html b/man/man3/intro.html
new file mode 100644
index 00000000..f6f4b311
--- /dev/null
+++ b/man/man3/intro.html
@@ -0,0 +1,288 @@
+<head>
+<title>intro(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>INTRO(3)</b><td align=right><b>INTRO(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ intro &ndash; introduction to library functions<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt; <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include</font></tt> <i>any Unix headers <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>#include &lt;libc.h&gt; <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;auth.h&gt; <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;bio.h&gt; <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;draw.h&gt; <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;fcall.h&gt; <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;frame.h&gt; <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;mach.h&gt; <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;regexp.h&gt; <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;thread.h&gt; <br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This section describes functions in various libraries. For the
+ most part, each library is defined by a single C include file,
+ such as those listed above, and a single archive file containing
+ the library proper. The name of the archive is <tt><font size=+1>/usr/local/plan9/lib/lib</font></tt><i>x</i><tt><font size=+1>.a</font></tt>,
+ where <i>x</i> is the base of the include file name,
+ stripped of a leading <tt><font size=+1>lib</font></tt> if present. For example, <tt><font size=+1>&lt;draw.h&gt;</font></tt> defines
+ the contents of library <tt><font size=+1>/usr/local/plan9/lib/libdraw.a</font></tt>, which
+ may be abbreviated when named to the loader as <tt><font size=+1>&#8722;ldraw</font></tt>. In practice,
+ each include file contains a magic pragma that directs the loader
+ to pick up the associated archive
+ automatically, so it is rarely necessary to tell the loader which
+ libraries a program needs; see <a href="../man1/9c.html"><i>9c</i>(1)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The library to which a function belongs is defined by the header
+ file that defines its interface. The &#8216;C library&#8217;, <i>libc</i>, contains
+ most of the basic subroutines such as <i>strlen</i>. Declarations for
+ all of these functions are in <tt><font size=+1>&lt;libc.h&gt;</font></tt>, which must be preceded by
+ (<i>needs</i>) an include of <tt><font size=+1>&lt;u.h&gt;</font></tt>. The graphics library, <i>draw</i>, is
+ defined by <tt><font size=+1>&lt;draw.h&gt;</font></tt>, which needs <tt><font size=+1>&lt;libc.h&gt;</font></tt> and <tt><font size=+1>&lt;u.h&gt;</font></tt>. The Buffered I/O
+ library, <i>libbio</i>, is defined by <tt><font size=+1>&lt;bio.h&gt;</font></tt>, which needs <tt><font size=+1>&lt;libc.h&gt;</font></tt> and <tt><font size=+1>&lt;u.h&gt;</font></tt>.
+ The ANSI C Standard I/O library, <i>libstdio</i>, is defined by <tt><font size=+1>&lt;stdio.h&gt;</font></tt>,
+ which needs <tt><font size=+1>&lt;u.h&gt;</font></tt>. There are a few other, less commonly used libraries
+ defined on
+ individual pages of this section.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The include file <tt><font size=+1>&lt;u.h&gt;</font></tt>, a prerequisite of several other include
+ files, declares the architecture-dependent and -independent types,
+ including: <i>uchar</i>, <i>ushort</i>, and <i>ulong</i>, the unsigned integer types;
+ <i>schar</i>, the signed char type; <i>vlong</i> and <i>uvlong</i>, the signed and
+ unsigned very long integral types; <i>Rune</i>, the Unicode
+ character type; <i>u8int</i>, <i>u16int</i>, <i>u32int</i>, and <i>u64int</i>, the unsigned
+ integral types with specific widths; <i>jmp_buf</i>, the type of the
+ argument to <i>setjmp</i> and <i>longjmp</i>, plus macros that define the layout
+ of <i>jmp_buf</i> (see <a href="../man3/setjmp.html"><i>setjmp</i>(3)</a>); and the macros <tt><font size=+1>va_arg</font></tt> and friends
+ for accessing arguments of variadic functions (identical to the
+ macros defined in <tt><font size=+1>&lt;stdarg.h&gt;</font></tt> in ANSI C).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Plan 9 and Unix use many similarly-named functions for different
+ purposes: for example, Plan 9&#8217;s <i>dup</i> is closer to (but not exactly)
+ Unix&#8217;s <i>dup2</i>. To avoid name conflicts, <tt><font size=+1>&lt;libc.h&gt;</font></tt> defines many of these
+ names as preprocessor macros to add a <i>p9</i> prefix, so that <i>dup</i> becomes
+ <i>p9dup</i>. To disable this renaming,
+ <tt><font size=+1>#define NOPLAN9DEFINES</font></tt> before including <tt><font size=+1>&lt;libc.h&gt;</font></tt>. If Unix headers
+ must be included in a program, they should be included after <tt><font size=+1>&lt;u.h&gt;</font></tt>,
+ which sets important preprocessor directives (for example, to
+ enable 64-bit file offsets), but before <tt><font size=+1>&lt;libc.h&gt;</font></tt>, to avoid renaming
+ problems.
+ <p><font size=+1><b>Name space </b></font><br>
+ Files are collected into a hierarchical organization called a
+ <i>file tree</i> starting in a <i>directory</i> called the <i>root</i>. File names,
+ also called <i>paths</i>, consist of a number of <tt><font size=+1>/</font></tt>-separated <i>path elements</i>
+ with the slashes corresponding to directories. A path element
+ must contain only printable characters (those outside the control
+ spaces of ASCII and Latin-1). A path element cannot contain a
+ slash.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When a process presents a file name to Plan 9, it is <i>evaluated</i>
+ by the following algorithm. Start with a directory that depends
+ on the first character of the path: <tt><font size=+1>/</font></tt> means the root of the main
+ hierarchy, and anything else means the process&#8217;s current working
+ directory. Then for each path element, look up the element in
+ the directory, advance to that directory, do a possible translation
+ (see below), and repeat. The last step may yield a directory or
+ regular file.<br>
+ <p><font size=+1><b>File I/O </b></font><br>
+ Files are opened for input or output by <i>open</i> or <i>create</i> (see <a href="../man3/open.html"><i>open</i>(3)</a>).
+ These calls return an integer called a <i>file descriptor</i> which identifies
+ the file to subsequent I/O calls, notably <a href="../man3/read.html"><i>read</i>(3)</a> and <i>write</i>. The
+ system allocates the numbers by selecting the lowest unused descriptor.
+ They are allocated dynamically; there is no
+ visible limit to the number of file descriptors a process may
+ have open. They may be reassigned using <a href="../man3/dup.html"><i>dup</i>(3)</a>. File descriptors
+ are indices into a kernel resident <i>file descriptor table</i>. Each
+ process has an associated file descriptor table. In threaded programs
+ (see <a href="../man3/thread.html"><i>thread</i>(3)</a>), the file descriptor table is shared by all the
+ procs.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ By convention, file descriptor 0 is the standard input, 1 is the
+ standard output, and 2 is the standard error output. With one
+ exception, the operating system is unaware of these conventions;
+ it is permissible to close file 0, or even to replace it by a
+ file open only for writing, but many programs will be confused
+ by such
+ chicanery. The exception is that the system prints messages about
+ broken processes to file descriptor 2.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Files are normally read or written in sequential order. The I/O
+ position in the file is called the <i>file offset</i> and may be set
+ arbitrarily using the <a href="../man3/seek.html"><i>seek</i>(3)</a> system call.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Directories may be opened like regular files. Instead of reading
+ them with <a href="../man3/read.html"><i>read</i>(3)</a>, use the <tt><font size=+1>Dir</font></tt> structure-based routines described
+ in <a href="../man3/dirread.html"><i>dirread</i>(3)</a>. The entry corresponding to an arbitrary file can
+ be retrieved by <i>dirstat</i> (see <a href="../man3/stat.html"><i>stat</i>(3)</a>) or <i>dirfstat</i>; <i>dirwstat</i> and
+ <i>dirfwstat</i> write back entries, thus changing the properties of
+ a
+ file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ New files are made with <i>create</i> (see <a href="../man3/open.html"><i>open</i>(3)</a>) and deleted with
+ <a href="../man3/remove.html"><i>remove</i>(3)</a>. Directories may not directly be written; <i>create</i>, <i>remove</i>,
+ <i>wstat</i>, and <i>fwstat</i> alter them.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man3/Pipe.html"><i>Pipe</i>(3)</a> creates a connected pair of file descriptors, useful for
+ bidirectional local communication.<br>
+ <p><font size=+1><b>Process execution and control </b></font><br>
+ A new process is created when an existing one calls <a href="../man2/fork.html"><i>fork</i>(2)</a>. The
+ new (child) process starts out with copies of the address space
+ and most other attributes of the old (parent) process. In particular,
+ the child starts out running the same program as the parent; <a href="../man3/exec.html"><i>exec</i>(3)</a>
+ will bring in a different one.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each process has a unique integer process id; a set of open files,
+ indexed by file descriptor; and a current working directory (changed
+ by <a href="../man2/chdir.html"><i>chdir</i>(2)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each process has a set of attributes -- memory, open files, name
+ space, etc. -- that may be shared or unique. Flags to <i>rfork</i> control
+ the sharing of these attributes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A process terminates by calling <a href="../man3/exits.html"><i>exits</i>(3)</a>. A parent process may
+ call <a href="../man3/wait.html"><i>wait</i>(3)</a> to wait for some child to terminate. A bit of status
+ information may be passed from <i>exits</i> to <i>wait</i>. On Plan 9, the status
+ information is an arbitrary text string, but on Unix it is a single
+ integer. The Plan 9 interface persists here, although the
+ functionality does not. Instead, empty strings are converted to
+ exit status 0 and non-empty strings to 1.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A process can go to sleep for a specified time by calling <a href="../man3/sleep.html"><i>sleep</i>(3)</a>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There is a <i>notification</i> mechanism for telling a process about
+ events such as address faults, floating point faults, and messages
+ from other processes. A process uses <a href="../man3/notify.html"><i>notify</i>(3)</a> to register the
+ function to be called (the <i>notification handler</i>) when such events
+ occur.<br>
+ <p><font size=+1><b>Multithreading </b></font><br>
+ Where possible according to the ANSI C standard, the main C library
+ works properly in multiprocess programs; <i>malloc</i>, <i>print</i>, and the
+ other routines use locks (see <a href="../man3/lock.html"><i>lock</i>(3)</a>) to synchronize access to
+ their data structures. The graphics library defined in <tt><font size=+1>&lt;draw.h&gt;</font></tt>
+ is also multi-process capable; details are in <a href="../man3/graphics.html"><i>graphics</i>(3)</a>.
+ In general, though, multiprocess programs should use some form
+ of synchronization to protect shared data.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The thread library, defined in <tt><font size=+1>&lt;thread.h&gt;</font></tt>, provides support for
+ multiprocess programs. It includes a data structure called a <tt><font size=+1>Channel</font></tt>
+ that can be used to send messages between processes, and coroutine-like
+ <i>threads</i>, which enable multiple threads of control within a single
+ process. The threads within a process
+ are scheduled by the library, but there is no pre-emptive scheduling
+ within a process; thread switching occurs only at communication
+ or synchronization points.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Most programs using the thread library comprise multiple processes
+ communicating over channels, and within some processes, multiple
+ threads. Since I/O calls may block, a system call may block all
+ the threads in a process. Therefore, a program that shouldn&#8217;t
+ block unexpectedly will use a process to serve the I/O
+ request, passing the result to the main processes over a channel
+ when the request completes. For examples of this design, see <a href="../man3/ioproc.html"><i>ioproc</i>(3)</a>
+ or <a href="../man3/mouse.html"><i>mouse</i>(3)</a>.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/nm.html"><i>nm</i>(1)</a>, <a href="../man1/9c.html"><i>9c</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Math functions in <i>libc</i> return special values when the function
+ is undefined for the given arguments or when the value is not
+ representable (see <a href="../man3/nan.html"><i>nan</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Some of the functions in <i>libc</i> are system calls and many others
+ employ system calls in their implementation. All system calls
+ return integers, with &ndash;1 indicating that an error occurred; <a href="../man3/errstr.html"><i>errstr</i>(3)</a>
+ recovers a string describing the error. Some user-level library
+ functions also use the <i>errstr</i> mechanism to report errors.
+ Functions that may affect the value of the error string are said
+ to &#8220;set <i>errstr</i>&#8221;; it is understood that the error string is altered
+ only if an error occurs.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/ioproc.html b/man/man3/ioproc.html
new file mode 100644
index 00000000..092bac91
--- /dev/null
+++ b/man/man3/ioproc.html
@@ -0,0 +1,211 @@
+<head>
+<title>ioproc(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>IOPROC(3)</b><td align=right><b>IOPROC(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ closeioproc, iocall, ioclose, iointerrupt, iodial, ioopen, ioproc,
+ ioread, ioread9pmsg, ioreadn, iorecvfd, iosendfd, iosleep, iowrite
+ &ndash; slave I/O processes for threaded programs<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;thread.h&gt;<br>
+ typedef struct Ioproc Ioproc;<br>
+ Ioproc* ioproc(void);<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ioclose(Ioproc *io, int fd);<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iodial(Ioproc *io, char *addr, char *local, char *dir, char
+ *cdfp);<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ioopen(Ioproc *io, char *file, int omode);<br>
+ long &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ioread(Ioproc *io, int fd, void *a, long n);<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ioread9pmsg(Ioproc *io, int fd, void *a, uint n);<br>
+ long &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ioreadn(Ioproc *io, int fd, void *a, long n);<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iorecvfd(int socket);<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iosendfd(int socket, int fd);<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iosleep(int milli);<br>
+ long &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iowrite(Ioproc *io, int fd, void *a, long n);<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iointerrupt(Ioproc *io);<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;closeioproc(Ioproc *io);<br>
+ long &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iocall(Ioproc *io, long (*op)(va_list *arg), ...);<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines provide access to I/O in slave procs. Since the
+ I/O itself is done in a slave proc, other threads in the calling
+ proc can run while the calling thread waits for the I/O to complete.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ioproc</i> forks a new slave proc and returns a pointer to the <tt><font size=+1>Ioproc</font></tt>
+ associated with it. <i>Ioproc</i> uses <i>mallocz</i> and <i>proccreate</i>; if either
+ fails, it calls <i>sysfatal</i> rather than return an error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ioclose</i>, <i>iodial</i>, <i>ioopen</i>, <i>ioread</i>, <i>ioread9pmsg</i>, <i>ioreadn</i>, <i>iorecvfd</i>,
+ <i>iosendfd</i>, <i>iosleep</i>, and <i>iowrite</i> execute the similarly named library
+ or system calls (see <a href="../man2/close.html"><i>close</i>(2)</a>, <a href="../man3/dial.html"><i>dial</i>(3)</a>, <a href="../man3/open.html"><i>open</i>(3)</a>, <a href="../man3/read.html"><i>read</i>(3)</a>, <a href="../man3/fcall.html"><i>fcall</i>(3)</a>,
+ <a href="../man3/sendfd.html"><i>sendfd</i>(3)</a>, and <a href="../man3/sleep.html"><i>sleep</i>(3)</a>) in the slave process associated with
+ <i>io</i>. It is an error to execute more than one call at a time in
+ an I/O
+ proc.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Iointerrupt</i> interrupts the call currently executing in the I/O
+ proc. If no call is executing, <i>iointerrupt</i> is a no-op.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Closeioproc</i> terminates the I/O proc and frees the associated <tt><font size=+1>Ioproc
+ .
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <i>Iocall</i> is a primitive that may be used to implement more slave
+ I/O routines. <i>Iocall</i> arranges for <i>op</i> to be called in <i>io</i>&#8217;s proc,
+ with <i>arg</i> set to the variable parameter list, returning the value
+ that <i>op</i> returns.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Relay messages between two file descriptors, counting the total
+ number of bytes seen:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>int tot;<br>
+ void<br>
+ relaythread(void *v)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int *fd, n;<br>
+ char buf[1024];<br>
+ Ioproc *io;<br>
+ fd = v;<br>
+ io = ioproc();<br>
+ while((n = ioread(io, fd[0], buf, sizeof buf)) &gt; 0){<br>
+ if(iowrite(io, fd[1], buf, n) != n)<br>
+ sysfatal(&quot;iowrite: %r&quot;);<br>
+ tot += n;<br>
+ }<br>
+ closeioproc(io);<br>
+
+ </table>
+ }<br>
+ void<br>
+ relay(int fd0, int fd1)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int fd[4];<br>
+ fd[0] = fd[3] = fd0;<br>
+ fd[1] = fd[2] = fd1;<br>
+ threadcreate(relaythread, fd, 8192);<br>
+ threadcreate(relaythread, fd+2, 8192);<br>
+
+ </table>
+ }<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ If the two <i>relaythread</i> instances were running in different procs,
+ the common access to <i>tot</i> would be unsafe.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Implement <i>ioread</i>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>static long<br>
+ _ioread(va_list *arg)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int fd;<br>
+ void *a;<br>
+ long n;<br>
+ fd = va_arg(*arg, int);<br>
+ a = va_arg(*arg, void*);<br>
+ n = va_arg(*arg, long);<br>
+ return read(fd, a, n);<br>
+
+ </table>
+ }<br>
+ long<br>
+ ioread(Ioproc *io, int fd, void *a, long n)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return iocall(io, _ioread, fd, a, n);<br>
+
+ </table>
+ }<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libthread<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/dial.html"><i>dial</i>(3)</a>, <a href="../man3/open.html"><i>open</i>(3)</a>, <a href="../man3/read.html"><i>read</i>(3)</a>, <a href="../man3/thread.html"><i>thread</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Iointerrupt</i> is currently unimplemented.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/ip.html b/man/man3/ip.html
new file mode 100644
index 00000000..0376fa95
--- /dev/null
+++ b/man/man3/ip.html
@@ -0,0 +1,345 @@
+<head>
+<title>ip(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>IP(3)</b><td align=right><b>IP(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ eipfmt, parseip, parseipmask, v4parseip, v4parsecidr, parseether,
+ myipaddr, myetheraddr, maskip, equivip, defmask, isv4, v4tov6,
+ v6tov4, nhgetl, nhgets, nhgetv, hnputl, hnputs, hnputv, ptclbsum,
+ readipifc &ndash; Internet protocol<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;ip.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;eipfmt(Fmt*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parseip(uchar *ipaddr, char *str)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parseipmask(uchar *ipaddr, char *str)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v4parseip(uchar *ipaddr, char *str)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v4parsecidr(uchar *addr, uchar *mask, char *str)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;parseether(uchar *eaddr, char *str)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;myetheraddr(uchar *eaddr, char *dev)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;myipaddr(uchar *ipaddr, char *net)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void maskip(uchar *from, uchar *mask, uchar *to)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;equivip(uchar *ipaddr1, uchar *ipaddr2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;defmask(uchar *ipaddr)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;isv4(uchar *ipaddr)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void v4tov6(uchar *ipv6, uchar *ipv4)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void v6tov4(uchar *ipv4, uchar *ipv6)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nhgets(void *p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uint nhgetl(void *p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uvlong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nhgetv(void *p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void hnputs(void *p, ushort v)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void hnputl(void *p, uint v)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void hnputv(void *p, uvlong v)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ushort &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ptclbsum(uchar *a, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Ipifc* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;readipifc(char *net, Ipifc *ifc, int index)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IPv4bcast[IPaddrlen];
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IPv4allsys[IPaddrlen];
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IPv4allrouter[IPaddrlen];
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IPallbits[IPaddrlen];
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IPnoaddr[IPaddrlen];
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v4prefix[IPaddrlen];<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines are used by Internet Protocol (IP) programs to
+ manipulate IP and Ethernet addresses. Plan 9, by default, uses
+ V6 format IP addresses. Since V4 addresses fit into the V6 space,
+ all IP addresses can be represented. IP addresses are stored as
+ a string of 16 <tt><font size=+1>unsigned chars</font></tt>, Ethernet addresses as 6
+ <tt><font size=+1>unsigned chars</font></tt>. Either V4 or V6 string representation can be used
+ for IP addresses. For V4 addresses, the representation can be
+ (up to) 4 decimal integers from 0 to 255 separated by periods.
+ For V6 addresses, the representation is (up to) 8 hex integers
+ from 0x0 to 0xFFFF separated by colons. Strings of 0
+ integers can be elided using two colons. For example, <tt><font size=+1>FFFF::1111</font></tt>
+ is equivalent to <tt><font size=+1>FFFF:0:0:0:0:0:0:1111</font></tt>. The string representation
+ for IP masks is a superset of the address representation. It includes
+ slash notation that indicates the number of leading 1 bits in
+ the mask. Thus, a V4 class C mask can be
+ represented as <tt><font size=+1>FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FF00</font></tt>, <tt><font size=+1>255.255.255.0</font></tt>,
+ or <tt><font size=+1>/120.</font></tt> The string representation of Ethernet addresses is exactly
+ 12 hexadecimal digits.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Eipfmt</i> is a <a href="../man3/print.html"><i>print</i>(3)</a> formatter for Ethernet (verb <tt><font size=+1>E</font></tt>) addresses,
+ IP V6 (verb <tt><font size=+1>I</font></tt>) addresses, IP V4 (verb <tt><font size=+1>V</font></tt>) addresses, and IP V6
+ (verb <tt><font size=+1>M</font></tt>) masks.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Parseip</i> converts a string pointed to by <i>str</i> to a 16-byte IP address
+ starting at <i>ipaddr</i>. As a concession to backwards compatibility,
+ if the string is a V4 address, the return value is an unsigned
+ long integer containing the big-endian V4 address. If not, the
+ return value is 6. <i>Parseipmask</i> converts a string pointed to by
+ <i>str
+ </i>to a 6-byte IP mask starting at <i>ipaddr</i>. It too returns an unsigned
+ long big-endian V4 address or 6. Both routines return -1 on errors.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>V4parseip</i> converts a string pointed to by <i>str</i> to a 4-byte V4 IP
+ address starting at <i>ipaddr</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>V4parsecidr</i> converts a string of the form addr/mask, pointed to
+ by <i>str</i>, to a 4-byte V4 IP address starting at <i>ipaddr</i> and a 4-byte
+ V4 IP mask starting at <i>mask</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Myipaddr</i> returns the first valid IP address in the IP stack rooted
+ at <i>net</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Parseether</i> converts a string pointed to by <i>str</i> to a 6-byte Ethernet
+ address starting at <i>eaddr</i>. <i>Myetheraddr</i> reads the Ethernet address
+ string from file <i>dev</i><tt><font size=+1>/1/stats</font></tt> and parses it into <i>eaddr</i>. Both routines
+ return a negative number on errors.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Maskip</i> places the bit-wise AND of the IP addresses pointed to
+ by its first two arguments into the buffer pointed to by the third.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Equivip</i> returns non-zero if the IP addresses pointed to by its
+ two arguments are equal.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Defmask</i> returns the standard class A, B, or C mask for <i>ipaddr</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Isv4</i> returns non-zero if the V6 address is in the V4 space, that
+ is, if it starts with <tt><font size=+1>0:0:0:0:0:0:FFFF</font></tt>. <i>V4tov6</i> converts the V4
+ address, <i>v4ip</i>, to a V6 address and puts the result in <i>v6ip</i>. <i>V6tov4</i>
+ converts the V6 address, <i>v6ip</i>, to a V4 address and puts the result
+ in <i>v4ip</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Hnputs</i>, <i>hnputl</i>, and <i>hnputv</i> are used to store 16-, 32-, and 64-bit
+ integers into IP big-endian form. <i>Nhgets</i>, <i>nhgetl</i>, and <i>nhgetv</i> convert
+ big-endian 2-, 4-, and 8-byte quantities into integers.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Pctlbsum</i> returns the one&#8217;s complement checksum used in IP protocols,
+ typically invoked as<br>
+ <tt><font size=+1>hnputs(hdr&#8722;&gt;cksum, ~ptclbsum(data, len) &amp; 0xffff);<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ A number of standard IP addresses in V6 format are also defined.
+ They are:<br>
+ <tt><font size=+1>IPv4bcast<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the V4 broadcast address<br>
+
+ </table>
+ <tt><font size=+1>IPv4allsys<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the V4 all systems multicast address<br>
+
+ </table>
+ <tt><font size=+1>IPv4allrouter<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the V4 all routers multicast address<br>
+
+ </table>
+ <tt><font size=+1>IPallbits<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the V6 all bits on address<br>
+
+ </table>
+ <tt><font size=+1>IPnoaddr<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the V6 null address, all zeros<br>
+
+ </table>
+ <tt><font size=+1>v4prefix<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the IP V6 prefix to all embedded V4 addresses
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <i>Readipifc</i> returns information about a particular interface (<i>index
+ </i>&gt;= 0) or all IP interfaces (<i>index </i>&lt; 0) configured under a mount
+ point <i>net</i>, default <tt><font size=+1>/net</font></tt>. Each interface is described by one <i>Ipifc</i>
+ structure which in turn points to a linked list of <i>Iplifc</i> structures
+ describing the addresses assigned to this interface. If the list
+ <i>ifc</i> is supplied, that list is freed. Thus, subsequent calls can
+ be used to free the list returned by the previous call. <i>Ipifc</i>
+ is:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>typedef struct Ipifc<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Ipifc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*next;<br>
+ Iplifc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*lifc; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* local addressses */<br>
+ /* per ip interface */<br>
+ int &nbsp;&nbsp;&nbsp;index; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* number of interface in ipifc dir */<br>
+ char dev[64]; &nbsp;&nbsp;&nbsp;/* associated physical device */<br>
+ int &nbsp;&nbsp;&nbsp;mtu; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* max transfer unit */<br>
+ long validlt; &nbsp;&nbsp;&nbsp;/* valid life time */<br>
+ long preflt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* preferred life time */<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sendra6; &nbsp;&nbsp;&nbsp;/* on == send router adv */<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recvra6; &nbsp;&nbsp;&nbsp;/* on == rcv router adv */<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pktin; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* packets read */<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pktout; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* packets written */<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;errin; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* read errors */<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;errout; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* write errors */<br>
+ Ipv6rp &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* route advertisement params */<br>
+
+ </table>
+ } Ipifc;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <i>Iplifc</i> is:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>struct Iplifc<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Iplifc &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*next;<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ip[IPaddrlen];<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mask[IPaddrlen];<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;net[IPaddrlen]; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* ip &amp; mask */<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;preflt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* preferred lifetime */<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;validlt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* valid lifetime */<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <i>Ipv6rp</i> is: struct Ipv6rp { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int &nbsp;&nbsp;&nbsp;&nbsp;mflag; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int &nbsp;&nbsp;&nbsp;&nbsp;oflag; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int &nbsp;&nbsp;&nbsp;&nbsp;maxraint;
+ &nbsp;&nbsp;&nbsp;&nbsp;/* max route adv interval */ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int &nbsp;&nbsp;&nbsp;&nbsp;minraint; &nbsp;&nbsp;&nbsp;&nbsp;/* min route adv interval
+ */ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int &nbsp;&nbsp;&nbsp;&nbsp;linkmtu; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int &nbsp;&nbsp;&nbsp;&nbsp;reachtime; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int &nbsp;&nbsp;&nbsp;&nbsp;rxmitra; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int &nbsp;&nbsp;&nbsp;&nbsp;ttl; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int &nbsp;&nbsp;&nbsp;&nbsp;routerlt;
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Dev</i> contains the first 64 bytes of the device configured with
+ this interface. <i>Net</i> is <i>ip</i><tt><font size=+1>&amp;</font></tt><i>mask</i> if the network is multipoint or
+ the remote address if the network is point to point.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libip<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/print.html"><i>print</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/isalpharune.html b/man/man3/isalpharune.html
new file mode 100644
index 00000000..99c2f387
--- /dev/null
+++ b/man/man3/isalpharune.html
@@ -0,0 +1,96 @@
+<head>
+<title>isalpharune(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ISALPHARUNE(3)</b><td align=right><b>ISALPHARUNE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ isalpharune, islowerrune, isspacerune, istitlerune, isupperrune,
+ tolowerrune, totitlerune, toupperrune &ndash; Unicode character classes
+ and cases<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int isalpharune(Rune c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int islowerrune(Rune c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int isspacerune(Rune c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int istitlerune(Rune c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int isupperrune(Rune c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune tolowerrune(Rune c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune totitlerune(Rune c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune toupperrune(Rune c)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines examine and operate on Unicode characters, in particular
+ a subset of their properties as defined in the Unicode standard.
+ Unicode defines some characters as alphabetic and specifies three
+ cases: upper, lower, and title. Analogously to <a href="../man3/isalpha.html"><i>isalpha</i>(3)</a> for
+ ASCII, these routines test types and modify cases for
+ Unicode characters. The names are self-explanatory.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The case-conversion routines return the character unchanged if
+ it has no case.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/utf/runetype.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/isalpha.html"><i>isalpha</i>(3)</a><i>, The Unicode Standard</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/keyboard.html b/man/man3/keyboard.html
new file mode 100644
index 00000000..19dc833d
--- /dev/null
+++ b/man/man3/keyboard.html
@@ -0,0 +1,135 @@
+<head>
+<title>keyboard(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>KEYBOARD(3)</b><td align=right><b>KEYBOARD(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ initkeyboard, ctlkeyboard, closekeyboard &ndash; keyboard control<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;thread.h&gt;<br>
+ #include &lt;keyboard.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Keyboardctl &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*initkeyboard(char *file)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctlkeyboard(Keyboardctl *kc, char *msg)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;closekeyboard(Keyboard *kc)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions access and control a keyboard interface for character-at-a-time
+ I/O in a multi-threaded environment, usually in combination with
+ <a href="../man3/mouse.html"><i>mouse</i>(3)</a>. They use the message-passing <tt><font size=+1>Channel</font></tt> interface in the
+ threads library (see <a href="../man3/thread.html"><i>thread</i>(3)</a>); programs that wish a more event-driven,
+ single-threaded approach
+ should use <a href="../man3/event.html"><i>event</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Initkeyboard</i> opens a connection to the keyboard and returns a
+ <tt><font size=+1>Keyboardctl</font></tt> structure:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct Keyboardct Keyboardctl;<br>
+ struct Keyboardctl<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Channel *c; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* chan(Rune[20]) */<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*file;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;consfd; &nbsp;&nbsp;&nbsp;&nbsp;/* to cons file */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctlfd; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* to ctl file */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pid; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* of slave proc */<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The argument to <i>initkeyboard</i> is ignored (on Plan 9, it is the
+ name of the keyboard device).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Once the <tt><font size=+1>Keyboardctl</font></tt> is set up a message containing a <tt><font size=+1>Rune</font></tt> will
+ be sent on the <tt><font size=+1>Channel Keyboardctl.c</font></tt> to report each character
+ read from the device.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ctlkeyboard</i> is used to set the state of the interface, typically
+ to turn raw mode on and off. It writes the string <i>msg</i> to the control
+ file associated with the device, which is assumed to be the regular
+ device file name with the string <tt><font size=+1>ctl</font></tt> appended.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Closekeyboard</i> closes the file descriptors associated with the
+ keyboard, kills the slave processes, and frees the <tt><font size=+1>Keyboardctl</font></tt>
+ structure.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/event.html"><i>event</i>(3)</a>, <a href="../man3/thread.html"><i>thread</i>(3)</a>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Because the interface delivers complete runes, there is no way
+ to report lesser actions such as shift keys or even individual
+ bytes.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/lock.html b/man/man3/lock.html
new file mode 100644
index 00000000..72d66e12
--- /dev/null
+++ b/man/man3/lock.html
@@ -0,0 +1,222 @@
+<head>
+<title>lock(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>LOCK(3)</b><td align=right><b>LOCK(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ lock, canlock, unlock, qlock, canqlock, qunlock, rlock, canrlock,
+ runlock, wlock, canwlock, wunlock, rsleep, rwakeup, rwakeupall
+ incref, decref &ndash; spin locks, queueing rendezvous locks, reader-writer
+ locks, rendezvous points, and reference counts<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void lock(Lock *l)<br>
+ int &nbsp;&nbsp;&nbsp;canlock(Lock *l)<br>
+ void unlock(Lock *l)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void qlock(QLock *l)<br>
+ int &nbsp;&nbsp;&nbsp;canqlock(QLock *l)<br>
+ void qunlock(QLock *l)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void rlock(RWLock *l)<br>
+ int &nbsp;&nbsp;&nbsp;canrlock(RWLock *l)<br>
+ void runlock(RWLock *l)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void wlock(RWLock *l)<br>
+ int &nbsp;&nbsp;&nbsp;canwlock(RWLock *l)<br>
+ void wunlock(RWLock *l)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ typedef struct Rendez {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ QLock *l;<br>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>...<br>
+ </i>
+ </table>
+ <tt><font size=+1>} Rendez;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void rsleep(Rendez *r)<br>
+ int &nbsp;&nbsp;&nbsp;rwakeup(Rendez *r)<br>
+ int &nbsp;&nbsp;&nbsp;rwakeupall(Rendez *r)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ #include &lt;thread.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ typedef struct Ref {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ long ref;<br>
+
+ </table>
+ } Ref;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void incref(Ref*)<br>
+ long decref(Ref*)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines are used to synchronize processes sharing memory.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Locks</font></tt> are spin locks, <tt><font size=+1>QLocks</font></tt> and <tt><font size=+1>RWLocks</font></tt> are different types of
+ queueing locks, and <tt><font size=+1>Rendezes</font></tt> are rendezvous points.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Locks and rendezvous points have trivial implementations in programs
+ not using the thread library (see <a href="../man3/thread.html"><i>thread</i>(3)</a>), since such programs
+ have no concurrency.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Used carelessly, spin locks can be expensive and can easily generate
+ deadlocks. Their use is discouraged, especially in programs that
+ use the thread library because they prevent context switches between
+ threads.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Lock</i> blocks until the lock has been obtained. <i>Canlock</i> is non-blocking.
+ It tries to obtain a lock and returns a non-zero value if it was
+ successful, 0 otherwise. <i>Unlock</i> releases a lock.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>QLocks</font></tt> have the same interface but are not spin locks; instead
+ if the lock is taken <i>qlock</i> will suspend execution of the calling
+ thread until it is released.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Although <tt><font size=+1>Locks</font></tt> are the more primitive lock, they have limitations;
+ for example, they cannot synchronize between tasks in the same
+ <i>proc</i>. Use <tt><font size=+1>QLocks</font></tt> instead.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>RWLocks</font></tt> manage access to a data structure that has distinct readers
+ and writers. <i>Rlock</i> grants read access; <i>runlock</i> releases it. <i>Wlock</i>
+ grants write access; <i>wunlock</i> releases it. <i>Canrlock</i> and <i>canwlock</i>
+ are the non-blocking versions. There may be any number of simultaneous
+ readers, but only one writer. Moreover, if
+ write access is granted no one may have read access until write
+ access is released.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ All types of lock should be initialized to all zeros before use;
+ this puts them in the unlocked state.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Rendezes</font></tt> are rendezvous points. Each <tt><font size=+1>Rendez</font></tt> <i>r</i> is protected by
+ a <tt><font size=+1>QLock</font></tt> <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>l</i>, which must be held by the callers of <i>rsleep</i>, <i>rwakeup</i>,
+ and <i>rwakeupall</i>. <i>Rsleep</i> atomically releases <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>l</i> and suspends execution
+ of the calling task. After resuming execution, <i>rsleep</i> will reacquire
+ <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>l</i> before returning. If any processes
+ are sleeping on <i>r</i>, <i>rwakeup</i> wakes one of them. it returns 1 if
+ a process was awakened, 0 if not. <i>Rwakeupall</i> wakes all processes
+ sleeping on <i>r</i>, returning the number of processes awakened. <i>Rwakeup</i>
+ and <i>rwakeupall</i> do not release <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>l</i> and do not suspend execution
+ of the current task.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Before use, <tt><font size=+1>Rendezes</font></tt> should be initialized to all zeros except
+ for <i>r</i><tt><font size=+1>&#8722;&gt;</font></tt><i>l</i> pointer, which should point at the <tt><font size=+1>QLock</font></tt> that will guard
+ <i>r</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>Ref</font></tt> contains a <tt><font size=+1>long</font></tt> that can be incremented and decremented
+ atomically: <i>Incref</i> increments the <i>Ref</i> in one atomic operation.
+ <i>Decref</i> atomically decrements the <tt><font size=+1>Ref</font></tt> and returns zero if the resulting
+ value is zero, non-zero otherwise.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/qlock.c<br>
+ /usr/local/plan9/src/libthread<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>Locks</font></tt> are not always spin locks. Instead they are usually implemented
+ using the <i>pthreads</i> library&#8217;s <tt><font size=+1>pthread_mutex_t</font></tt>, whose implementation
+ method is not defined.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ On <i>pthreads</i>-based systems, the implementation of <tt><font size=+1>Lock</font></tt> never calls
+ <i>pthread_mutex_destroy</i> to free the <tt><font size=+1>pthread_mutex_t</font></tt>&#8217;s. This leads
+ to resource leaks on FreeBSD 5 (though not on Linux 2.6, where
+ <i>pthread_mutex_destroy</i> is a no-op).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ On systems that do not have a usable <i>pthreads</i> implementation,
+ the <tt><font size=+1>Lock</font></tt> implementation provided by <i>libthread</i> is still not exactly
+ a spin lock. After each unsuccessful attempt, <i>lock</i> calls <tt><font size=+1>sleep(0)</font></tt>
+ to yield the CPU; this handles the common case where some other
+ process holds the lock. After a thousand
+ unsuccessful attempts, <i>lock</i> sleeps for 100ms between attempts.
+ Another another thousand unsuccessful attempts, <i>lock</i> sleeps for
+ a full second between attempts. <tt><font size=+1>Locks</font></tt> are not intended to be held
+ for long periods of time. The 100ms and full second sleeps are
+ only heuristics to avoid tying up the CPU when a
+ process deadlocks. As discussed above, if a lock is to be held
+ for much more than a few instructions, the queueing lock types
+ should be almost always be used.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/mach-cmd.html b/man/man3/mach-cmd.html
new file mode 100644
index 00000000..978e80b5
--- /dev/null
+++ b/man/man3/mach-cmd.html
@@ -0,0 +1,167 @@
+<head>
+<title>mach-cmd(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MACH-CMD(3)</b><td align=right><b>MACH-CMD(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ attachargs, attachcore, attachdynamic, attachproc, proctextfile
+ &ndash; debugging processes and core files<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mach.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attachcore(Fhdr *hdr)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attachproc(int pid)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attachdynamic(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;proctextfile(int pid)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attachargs(int argc, char **argv, int omode)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>extern Fhdr* symhdr;<br>
+ </font></tt>extern &nbsp;&nbsp;&nbsp;&nbsp;char* &nbsp;&nbsp;&nbsp;symfil;<br>
+ extern &nbsp;&nbsp;&nbsp;&nbsp;Map* &nbsp;&nbsp;&nbsp;symmap;<br>
+ extern &nbsp;&nbsp;&nbsp;&nbsp;Fhdr* &nbsp;&nbsp;&nbsp;fhdrlist;<br>
+ extern &nbsp;&nbsp;&nbsp;&nbsp;Fhdr* &nbsp;&nbsp;&nbsp;corhdr;<br>
+ extern &nbsp;&nbsp;&nbsp;&nbsp;char* &nbsp;&nbsp;&nbsp;corfil;<br>
+ extern &nbsp;&nbsp;&nbsp;&nbsp;Map* &nbsp;&nbsp;&nbsp;cormap;<br>
+ extern &nbsp;&nbsp;&nbsp;&nbsp;int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;corpid;<br>
+ extern &nbsp;&nbsp;&nbsp;&nbsp;Regs* &nbsp;&nbsp;&nbsp;correg;<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines provide access to the objects a typical debugger
+ manipulates: an executable binary, some number of shared libraries,
+ a memory image in the form of a core dump or active process, and
+ a register set.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The maintained state is:<br>
+ <i>symhdr<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The file header for the main binary.<br>
+
+ </table>
+ <i>symfil</i>The file name of the main binary.<br>
+ <i>symmap<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The memory map of the main binary.<br>
+
+ </table>
+ <i>fhdrlist<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A linked list (via the <tt><font size=+1>Fhdr.next</font></tt> fields) of all currently open
+ headers (see <i>symopen</i> in <a href="../man3/mach-symbol.html"><i>mach-symbol</i>(3)</a>). When dynamically linked
+ objects have been attached, they are present in this linked list,
+ and therefore included in searches by <i>indexsym</i>, <i>lookupsym</i>, and
+ <i>findsym</i> (see <a href="../man3/mach-symbol.html"><i>mach-symbol</i>(3)</a>).
+
+ </table>
+ <i>corhdr</i>The file header for the core dump, if any.<br>
+ <i>corfil</i>The file name of the core dump, if any.<br>
+ <i>cormap<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The memory map of the core dump or attached process.<br>
+
+ </table>
+ <i>corpid</i>The process id of the attached process, if any.<br>
+ <i>correg</i>The register set of the core dump or attached process. If
+ these fields are not valid, they are zeroed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Attachcore</i> and <i>attachproc</i> attach to an opened core file or an
+ executing process. They set <i>corhdr</i>, <i>corfil</i>, <i>cormap</i>, <i>corpid</i>, and
+ <i>correg</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Proctextfile</i> returns the name of the main binary for the process
+ with id <i>pid</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Attachdynamic</i> requires that the memory image already be attached.
+ It reads the dynamic linker&#8217;s internal run-time data structures
+ and then opens all the dynamic objects that are currently loaded.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Attachargs</i> uses all of these functions while parsing an argument
+ vector as would be passed to a debugger like <a href="../man1/db.html"><i>db</i>(1)</a> or <a href="../man1/acid.html"><i>acid</i>(1)</a>.
+ It expects a list of executable files, core dump files, or process
+ ids, given in any order. If extra arguments are given (for example,
+ more than one executable, or both a core dump and a
+ process id), they are ignored and diagnostics are printed to standard
+ error. If arguments are missing (for example, the process id is
+ given without an executable file), <i>attachargs</i> fills them in as
+ best it can.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libmach<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mach.html"><i>mach</i>(3)</a>, <a href="../man3/mach-file.html"><i>mach-file</i>(3)</a>, <a href="../man3/mach-map.html"><i>mach-map</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The interface needs to be changed to support multiple threads,
+ each with its own register set.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/mach-file.html b/man/man3/mach-file.html
new file mode 100644
index 00000000..7fd1a578
--- /dev/null
+++ b/man/man3/mach-file.html
@@ -0,0 +1,185 @@
+<head>
+<title>mach-file(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MACH-FILE(3)</b><td align=right><b>MACH-FILE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ crackhdr, uncrackhdr, mapfile, unmapfile, mapproc, unmapproc,
+ detachproc, ctlproc, procnotes &ndash; machine-independent access to
+ exectuable files and running processes<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mach.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ int &nbsp;&nbsp;&nbsp;&nbsp;crackhdr(int fd, Fhdr *hdr)<br>
+ void &nbsp;&nbsp;&nbsp;uncrackhdr(Fhdr *hdr)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;mapfile(Fhdr *hdr, ulong base, Map *map, Regs **regs)<br>
+ void &nbsp;&nbsp;&nbsp;unmapfile(Fhdr *hdr, Map *map)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;mapproc(int pid, Map *map, Regs **regs)<br>
+ void &nbsp;&nbsp;&nbsp;unmapproc(Map *map)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;detachproc(int pid)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;ctlproc(int pid, char *msg)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;procnotes(int pid, char ***notes)<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions parse executable files and provide access to those
+ files and to running processes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Crackhdr</i> opens and parses the named executable file. The returned
+ data structure <i>hdr</i> is initialized with a machine-independent description
+ of the header information. The following fields are the most commonly
+ used:<br>
+ <tt><font size=+1>mach</font></tt>a pointer to the <tt><font size=+1>Mach</font></tt> structure for the target architecture<br>
+ <tt><font size=+1>mname<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the name of the target architecture<br>
+
+ </table>
+ <tt><font size=+1>fname<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ a description of the kind of file (e.g., executable, core dump)<br>
+
+ </table>
+ <tt><font size=+1>aname<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ a description of the application binary interface this file uses;
+ typically it is the name of an operating system If the global
+ variable <i>mach</i> is nil, <i>crackhdr</i> points it to the same <tt><font size=+1>Mach</font></tt> structure.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <i>Mapfile</i> adds the segments found in <i>hdr</i> to <i>map</i>. If <i>hdr</i> is an executable
+ file, there are typically three segments: <i>text</i>, <i>data</i>, and a zero-backed
+ <i>bss</i>. If <i>hdr</i> is a dynamic shared library, its segments are relocated
+ by <i>base</i> before being mapping.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If <i>hdr</i> is a core file, there is one segment named <i>core</i> for each
+ contiguous section of memory recorded in the core file. There
+ are often quite a few of these, as most operating systems omit
+ clean memory pages when writing core files (Mac OS X is the only
+ exception among the supported systems). Because core files
+ have such holes, it is typically necessary to construct the core
+ map by calling <i>mapfile</i> on the executable and then calling it again
+ on the core file. Newly-added segments are mapped on top of existing
+ segments, so this arrangement will use the core file for the segments
+ it contains but fall back to the executable for the
+ rest.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Unmapfile</i> removes the mappings in <i>map</i> corresponding to <i>hdr</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mapproc</i> attaches to a running program and adds its segments to
+ the given map. It adds one segment for each contiguous section
+ of mapped memory. On systems where this information cannot be
+ determined, it adds a single segment covering the entire address
+ space. Accessing areas of this segment that are
+ actually not mapped in the process address space will cause the
+ get/put routines to return errors.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Unmapproc</i> removes the mappings in <i>map</i> corresponding to <i>pid</i>. <i>Detachproc</i>
+ detaches from all previously attached processes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ctlproc</i> manipulates the process with id <i>pid</i> according to the message
+ <i>msg</i>. Valid messages include:<br>
+ <tt><font size=+1>kill</font></tt>terminate the process<br>
+ <tt><font size=+1>startstop<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ start the process and wait for it to stop<br>
+
+ </table>
+ <tt><font size=+1>sysstop<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ arrange for the process to stop at its next system call, start
+ the process, and then wait for it to stop<br>
+
+ </table>
+ <tt><font size=+1>waitstop<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ wait for the process to stop<br>
+
+ </table>
+ <tt><font size=+1>start<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ start the process
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <i>Procnotes</i> fills <tt><font size=+1>*</font></tt><i>notes</i> with a pointer to an array of strings representing
+ pending notes waiting for the process. (On Unix, these notes are
+ textual descriptions of any pending signals.) <i>Procnotes</i> returns
+ the number of pending notes. The memory at <tt><font size=+1>*</font></tt><i>notes</i> should be freed
+ via <i>free</i> (see <a href="../man3/malloc.html"><i>malloc</i>(3)</a>) when no longer needed.
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libmach<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mach.html"><i>mach</i>(3)</a>, <a href="../man3/mach-map.html"><i>mach-map</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/mach-map.html b/man/man3/mach-map.html
new file mode 100644
index 00000000..ddf7275f
--- /dev/null
+++ b/man/man3/mach-map.html
@@ -0,0 +1,312 @@
+<head>
+<title>mach-map(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MACH-MAP(3)</b><td align=right><b>MACH-MAP(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ allocmap, addseg, findseg, addrtoseg, addrtosegafter, removeseg,
+ freemap, get1, get2, get4, get8, put1, put2, put4, put8, rget,
+ rput, fpformat, locnone, locaddr, locconst, locreg, locindir,
+ loccmp, loceval, locfmt, locsimplify, lget1, lget2, lget4, lget8,
+ lput1, lput2, lput4, lput8 &ndash; machine-independent access to address
+ spaces and register sets<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mach.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ typedef struct Map Map;<br>
+ typedef struct Seg Seg;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ struct Seg<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char &nbsp;&nbsp;&nbsp;*name;<br>
+ char &nbsp;&nbsp;&nbsp;*file;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;fd;<br>
+ ulong &nbsp;&nbsp;&nbsp;base;<br>
+ ulong &nbsp;&nbsp;&nbsp;size;<br>
+ ulong &nbsp;&nbsp;&nbsp;offset;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;(*rw)(Map*, Seg*, ulong, void*, uint, int);<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ struct Map<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Seg &nbsp;&nbsp;&nbsp;&nbsp;*seg;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;nseg;<br>
+ <i>...<br>
+ </i>
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Map &nbsp;&nbsp;&nbsp;*allocmap(void)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;addseg(Map *map, Seg seg)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;findseg(Map *map, char *name, char *file)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;addrtoseg(Map *map, ulong addr, Seg *seg)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;addrtosegafter(Map *map, ulong addr, Seg *seg)<br>
+ void &nbsp;&nbsp;&nbsp;removeseg(Map *map, int i)<br>
+ void &nbsp;&nbsp;&nbsp;freemap(Map *map)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;get1(Map *map, ulong addr, uchar *a, uint n)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;get2(Map *map, ulong addr, u16int *u)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;get4(Map *map, ulong addr, u32int *u)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;get8(Map *map, ulong addr, u64int *u)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;put1(Map *map, ulong addr, uchar *a, uint n)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;put2(Map *map, ulong addr, u16int u)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;put4(Map *map, ulong addr, u32int u)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;put8(Map *map, ulong addr, u64int u)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;rget(Regs *regs, char *reg, ulong *u)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;fpformat(Map *map, char *reg, char *a, uint n, char code);<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;rput(Regs *regs, char *name, ulong u)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Loc &nbsp;&nbsp;&nbsp;locnone(void)<br>
+ Loc &nbsp;&nbsp;&nbsp;locaddr(ulong addr)<br>
+ Loc &nbsp;&nbsp;&nbsp;locconst(ulong con)<br>
+ Loc &nbsp;&nbsp;&nbsp;locreg(char *reg)<br>
+ Loc &nbsp;&nbsp;&nbsp;locindir(char *reg, long offset)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;loccmp(Loc *a, Loc *b)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;loceval(Map *map, Loc loc, ulong *addr)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;locfmt(Fmt *fmt)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;locsimplify(Map *map, Loc *regs, Loc loc, Loc *newloc)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;lget1(Map *map, Loc loc, uchar *a, uint n)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;lget2(Map *map, Loc loc, u16int *u)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;lget4(Map *map, Loc loc, u32int *u)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;lget8(Map *map, Loc loc, u64int *u)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;lput1(Map *map, Loc loc, uchar *a, uint n)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;lput2(Map *map, Loc loc, u16int u)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;lput4(Map *map, Loc loc, u32int u)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;lput8(Map *map, Loc loc, u64int u)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions provide a processor-independent interface for
+ accessing executable files, core files, and running processes
+ via <i>maps</i>, data structures that provides access to an address space
+ and register set. The functions described in <a href="../man3/mach-file.html"><i>mach-file</i>(3)</a> are
+ typically used to construct these maps. Related library functions
+ described in <a href="../man3/mach-symbol.html"><i>mach-symbol</i>(3)</a> provide similar access to symbol tables.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each <i>map</i> comprises an optional register set and one or more <tt><font size=+1>segments</font></tt>,
+ each associating a non-overlapping range of memory addresses with
+ a logical section of an executable file or of a running process&#8217;s
+ address space. Other library functions then use a map and the
+ architecture-specific data structures to provide
+ a generic interface to the processor-dependent data.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each segment has a name (e.g., <tt><font size=+1>text</font></tt> or <tt><font size=+1>data</font></tt>) and may be associated
+ with a particular file. A segment represents a range of accessible
+ address space. Segments may be backed an arbitary access function
+ (if the <tt><font size=+1>rw</font></tt> pointer is non-nil), or by the contents of an open
+ file (using the <tt><font size=+1>fd</font></tt> file descriptor). Each range has a
+ starting address in the space (<tt><font size=+1>base</font></tt>) and an extent (<tt><font size=+1>size</font></tt>). In
+ segments mapped by files, the range begins at byte <tt><font size=+1>offset</font></tt> in the
+ file. The <tt><font size=+1>rw</font></tt> function is most commonly used to provide access
+ to executing processes via <a href="../man2/ptrace.html"><i>ptrace</i>(2)</a> and to zeroed segments.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Allocmap</i> creates an empty map; <i>freemap</i> frees a map.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Addseg</i> adds the given segment to the map, resizing the map&#8217;s <i>seg</i>
+ array if necessary. A negative return value indicates an allocation
+ error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Findseg</i> returns the index of the segment with the given name (and,
+ if <i>file</i> is non-nil, the given file), or &ndash;1 if no such segment is
+ found.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Addrtoseg</i> returns the index of the segment containing for the
+ given address, or &ndash;1 if that address is not mapped. Segments may
+ have overlapping address ranges: <i>addseg</i> appends segments to the
+ end of the <i>seg</i> array in the map, and <i>addrtoseg</i> searches the map
+ backwards from the end, so the most recently mapped
+ segment wins.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Addrtosegafter</i> returns the index of the segment containing the
+ lowest mapped address greater than <i>addr</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Removeseg</i> removes the segment at the given index.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Get1</i>, <i>get2</i>, <i>get4</i>, and <i>get8</i> retrieve the data stored at address
+ <i>addr</i> in the address space associated with <i>map</i>. <i>Get1</i> retrieves
+ <i>n</i> bytes of data beginning at <i>addr</i> into <i>buf</i>. <i>Get2</i>, <i>get4</i> and <i>get8</i>
+ retrieve 16-bit, 32-bit and 64-bit values respectively, into the
+ location pointed to by <i>u</i>. The value is byte-swapped if the source
+ byte order differs from that of the current architecture. This
+ implies that the value returned by <i>get2</i>, <i>get4</i>, and <i>get8</i> may not
+ be the same as the byte sequences returned by <i>get1</i> when <i>n</i> is two,
+ four or eight; the former may be byte-swapped, the latter reflects
+ the byte order of the target architecture. These functions
+ return the number of bytes read or a &ndash;1 when there is an error.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Put1</i>, <i>put2</i>, <i>put4</i>, and <i>put8</i> write to the address space associated
+ with <i>map</i>. The address is translated using the map parameters and
+ multi-byte quantities are byte-swapped, if necessary, before they
+ are written. <i>Put1</i> transfers <i>n</i> bytes stored at <i>buf</i>; <i>put2</i>, <i>put4</i>,
+ and <i>put8</i> write the 16-bit, 32-bit or 64-bit quantity
+ contained in <i>val</i>, respectively. The number of bytes transferred
+ is returned. A &ndash;1 return value indicates an error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When representing core files or running programs, maps also provide
+ access to the register set. <i>Rget</i> and <i>rput</i> read or write the register
+ named by <i>reg</i>. If the register is smaller than a <tt><font size=+1>ulong</font></tt>, the high
+ bits are ignored.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fpformat</i> converts the contents of a floating-point register to
+ a string. <i>Buf</i> is the address of a buffer of <i>n</i> bytes to hold the
+ resulting string. <i>Code</i> must be either <tt><font size=+1>F</font></tt> or <tt><font size=+1>f</font></tt>, selecting double
+ or single precision, respectively. If <i>code</i> is <tt><font size=+1>F</font></tt>, the contents
+ of the specified register and the following register are interpreted
+ as a
+ double-precision floating-point number; this is meaningful only
+ for architectures that implement double-precision floats by combining
+ adjacent single-precision registers.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <i>location</i> represents a place in an executing image capable of
+ storing a value. Note that locations are typically passed by value
+ rather than by reference.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Locnone</i> returns an unreadable, unwritable location. <i>Locaddr</i> returns
+ a location representing the memory address <i>addr</i>. <i>Locreg</i> returns
+ a location representing the register <i>reg</i>. <i>Locindir</i> returns an
+ location representing the memory address at <i>offset</i> added to the
+ value of <i>reg</i>. <i>Locconst</i> returns an imaginary unwritable
+ location holding the constant <i>con</i>; such locations are useful for
+ passing specific constants to functions expect locations, such
+ as <i>unwind</i> (see <a href="../man3/mach-stack.html"><i>mach-stack</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Loccmp</i> compares two locations, returning negative, zero, or positive
+ values if <tt><font size=+1>*a</font></tt> is less than, equal to, or greater than <tt><font size=+1>*b</font></tt>, respectively.
+ Register locations are ordered before memory addresses, which
+ are ordered before indirections.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Locfmt</i> is a <a href="../man3/print.html"><i>print</i>(3)</a>-verb that formats a <tt><font size=+1>Loc</font></tt> structure (<i>not</i> a
+ pointer to one).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Indirection locations are needed in some contexts (e.g., when
+ using <i>findlsym</i> (see <a href="../man3/mach-symbol.html"><i>mach-symbol</i>(3)</a>)), but bothersome in most.
+ <i>Locsimplify</i> rewrites indirections as absolute memory addresses,
+ by evaluating the register using the given map and adding the
+ offset.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The functions <i>lget1</i>, <i>lget2</i>, <i>lget4</i>, <i>lget8</i>, <i>lput1</i>, <i>lput2</i>, <i>lput4</i>,
+ and <i>lput8</i> read and write the given locations, using the <i>get</i>, <i>put</i>,
+ <i>rget</i>, and <i>rput</i> function families as necessary.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libmach<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mach.html"><i>mach</i>(3)</a>, <a href="../man3/mach-file.html"><i>mach-file</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines set <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This man page needs to describe <tt><font size=+1>Regs</font></tt> and <tt><font size=+1>Regdesc<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/mach-stack.html b/man/man3/mach-stack.html
new file mode 100644
index 00000000..d08258bd
--- /dev/null
+++ b/man/man3/mach-stack.html
@@ -0,0 +1,232 @@
+<head>
+<title>mach-stack(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MACH-STACK(3)</b><td align=right><b>MACH-STACK(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ stacktrace, localaddr, unwindframe, windindex, windreglocs &ndash; stack
+ traces<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mach.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ int &nbsp;&nbsp;&nbsp;&nbsp;stacktrace(Map *map, Rgetter rget, Tracer trace)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;localaddr(Map *map, Regs *regs, char *fn, char *val, ulong
+ *val)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;unwindframe(Map *map, Regs *regs, ulong *next, Symbol *sym)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;windindex(char *regname)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Loc* &nbsp;&nbsp;&nbsp;windreglocs(void)<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Stacktrace</i> provides machine-independent implementations of process
+ stack traces. They must retrieve data and register contents from
+ an executing image. Sometimes the desired registers are not the
+ current registers but rather a set of saved registers stored elsewhere
+ in memory. The caller may specify an initial
+ register set in the form of an <i>Rgetter</i> function, of the form
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>ulong rget(Map *map, char *name)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ It returns the contents of a register when given a map and a register
+ name. It is usually sufficient for the register function to return
+ meaningful values only for <tt><font size=+1>SP</font></tt> and <tt><font size=+1>PC</font></tt>, and for the link register
+ (usually <tt><font size=+1>LR</font></tt>) on CISC machines.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Given the map and the rgetter, <i>stacktrace</i> unwinds the stack starting
+ at the innermost function. At each level in the trace, it calls
+ the tracer function, which has the form
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>int trace(Map *map, ulong pc, ulong callerpc,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Rgetter rget, Symbol *s)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ The tracer is passed the map, the current program counter, the
+ program counter of the caller (zero if the caller is unknown),
+ a new <i>rget</i> function, and a symbol (see <a href="../man3/mach-symbol.html"><i>mach-symbol</i>(3)</a>) describing
+ the current function (nil if no symbol is known). The value returned
+ by the tracer controls whether the stack trace continues: a
+ zero or negative return value stops the trace, while a positive
+ return value continues it.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The rgetter passed to the tracer is not the rgetter passed to
+ <tt><font size=+1>stacktrace</font></tt> itself. Instead, it is a function returning the register
+ values at the time of the call, to the extent that they can be
+ reconstructed. The most common use for this rgetter is as an argument
+ to <i>lget4</i>, etc., when evaluating the locations of local
+ variables.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Localaddr</i> uses <i>stacktrace</i> to walk up the stack looking for the
+ innermost instance of a function named <i>fn ;</i> once it finds the
+ function, it looks for the parameter or local variable <i>var</i>, storing
+ the address of the variable in <i>val</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Unwindframe</i> is the low-level function on which <i>stacktrace</i> is built.
+ Given the current memory image in <i>map</i> and the current register
+ set in <i>regs , unwindframe</i> fills in <i>next</i> with the values of the
+ register set at the time of the call to the function in the current
+ program counter. <i>Sym</i> should be the symbol corresponding to
+ the current function, if available.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>next</i> array holds only the <i>winding registers</i>, typically the
+ caller-save registers and the program counter and stack pointer.
+ The order of registers in the array is called the <i>winding order</i>.
+ The winding set can be found in the array <i>mach</i><tt><font size=+1>&#8722;&gt;</font></tt><i>windreg</i>, which
+ has <i>mach</i><tt><font size=+1>&#8722;&gt;</font></tt><i>nwindreg</i> entries. <i>Windindex</i> returns the index of
+ the named register in the winding order. <i>Windreglocs</i> returns an
+ array of <i>Loc</i> structures corresponding to the winding registers,
+ in the winding order.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The following code writes a simple stack trace to standard output,
+ stopping after at most 20 stack frames.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ static int<br>
+ trace(Map *map, ulong pc, ulong callerpc,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Rgetter rget, Symbol *s, int depth)<br>
+
+ </table>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char buf[512];<br>
+ int i, first;<br>
+ u32int v;<br>
+ Symbol s2;<br>
+ if(sym)<br>
+ print(&quot;%s+%lx&quot;, s-&gt;name, pc - loceval(s-&gt;loc));<br>
+ else<br>
+ print(&quot;%lux&quot;, pc);<br>
+ print(&quot;(&quot;);<br>
+ first = 0;<br>
+ for(i=0; indexlsym(s, &amp;i, &amp;s2)&gt;=0; i++){<br>
+ if(s.class != CPARAM)<br>
+ continue;<br>
+ if(first++)<br>
+ print(&quot;, &quot;);<br>
+ if(lget4(map, rget, s-&gt;loc, &amp;v) &gt;= 0)<br>
+ print(&quot;%s=%#lux&quot;, s-&gt;name, (ulong)v);<br>
+ else<br>
+ print(&quot;%s=???&quot;, s-&gt;name);<br>
+ }<br>
+ print(&quot;) called from &quot;);<br>
+ symoff(buf, sizeof buf, callerpc, CTEXT);<br>
+ print(&quot;%s\n&quot;, buf);<br>
+ return depth &lt; 20;<br>
+
+ </table>
+ }<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ if(stacktrace(map, nil, trace) &lt;= 0)<br>
+ print(&quot;no stack frame0);<br>
+
+ </table>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libmach<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mach.html"><i>mach</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Need to talk about Regs<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/mach-swap.html b/man/man3/mach-swap.html
new file mode 100644
index 00000000..5eefd9d6
--- /dev/null
+++ b/man/man3/mach-swap.html
@@ -0,0 +1,124 @@
+<head>
+<title>mach-swap(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MACH-SWAP(3)</b><td align=right><b>MACH-SWAP(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ beswap2, beswap4, beswap8, beieeeftoa32, beieeeftoa64, beieeeftoa80,
+ beload2, beload4, beload8, leswap2, leswap4, leswap8, leieeeftoa32,
+ leieeeftoa64, leieeeftoa80, leload2, leload4, leload8, ieeeftoa32,
+ ieeeftoa64 &ndash; machine-independent access to byte-ordered data<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mach.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>u16int beswap2(u16int u)<br>
+ </font></tt>u32int &nbsp;&nbsp;&nbsp;beswap4(u32int u)<br>
+ u64int &nbsp;&nbsp;&nbsp;beswap8(u64int u)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;beieeeftoa32(char *a, uint n, void *f)<br>
+ </font></tt>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beieeeftoa64(char *a, uint n, void *f)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beieeeftoa80(char *a, uint n, void *f)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>u16int beload2(uchar *p)<br>
+ </font></tt>u32int &nbsp;&nbsp;&nbsp;beload4(uchar *p)<br>
+ u64int &nbsp;&nbsp;&nbsp;beload8(uchar *p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>u16int leswap2(u16int u)<br>
+ </font></tt>u32int &nbsp;&nbsp;&nbsp;leswap4(u32int u)<br>
+ u64int &nbsp;&nbsp;&nbsp;leswap8(u64int u)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;leieeeftoa32(char *a, uint n, void *f)<br>
+ </font></tt>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;leieeeftoa64(char *a, uint n, void *f)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;leieeeftoa80(char *a, uint n, void *f)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>u16int leload2(uchar *p)<br>
+ </font></tt>u32int &nbsp;&nbsp;&nbsp;leload4(uchar *p)<br>
+ u64int &nbsp;&nbsp;&nbsp;leload8(uchar *p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;ieeeftoa32(char *a, uint n, u32int u)<br>
+ </font></tt>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ieeeftoa64(char *a, uint n, u32int hi, u32int lo)<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions provide machine-independent access to data in
+ a particular byte order.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Beswap2</i>, <i>beswap4</i>, and <i>beswap8</i> return the 2-byte, 4-byte, and 8-byte
+ big-endian representation of the bytes in <i>val</i>, respectively.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Beload2</i>, <i>beload4</i>, and <i>beload8</i> return the 2-byte, 4-byte, and 8-byte
+ big-endian interpretation of the bytes at <i>p</i>, respectively.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Beieeeftoa32</i>, <i>beieeeftoa64</i>, and <i>beieeeftoa80</i> format the big-endian
+ 4-byte, 8-byte, or 10-byte IEEE floating-point value at <i>f</i> into
+ the <i>n</i>-byte string buffer <i>a</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Leswap2</i>, <i>leswap4</i>, etc. are the little-endian equivalents of the
+ routines just described.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ieeeftoa32</i> and <i>ieeeftoa64</i> format a local machine byte-order floating-point
+ value into the <i>n</i>-byte string buffer <i>a</i>. <i>Ieeeftoa32</i> expects a 32-bit
+ floating-point value stored in the bits of <i>u</i>. <i>Ieeeftoa64</i> expects
+ a 64-bit floating-point value whose high 32-bits are in <i>hi</i> and
+ low 32-bits are in <i>lo</i>.
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libmach<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mach.html"><i>mach</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/mach-symbol.html b/man/man3/mach-symbol.html
new file mode 100644
index 00000000..246d51b4
--- /dev/null
+++ b/man/man3/mach-symbol.html
@@ -0,0 +1,272 @@
+<head>
+<title>mach-symbol(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MACH-SYMBOL(3)</b><td align=right><b>MACH-SYMBOL(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ symopen, symclose, findhdr, indexsym, lookupsym, findsym, findexsym,
+ flookupsym, ffindsym, lookuplsym, indexlsym, findlsym, symoff,
+ pc2file, file2pc, line2pc, fnbound, fileline, pc2line &ndash; symbol
+ table access functions<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mach.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;symopen(Fhdr *hdr)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;symclose(Fhdr *hdr)<br>
+ Fhdr &nbsp;&nbsp;&nbsp;&nbsp;*findhdr(char *name)<br>
+ extern &nbsp;&nbsp;&nbsp;Fhdr* fhdrlist;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexsym(uint n, Symbol *s)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lookupsym(char *fn, char *var, Symbol *s)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;findsym(Loc loc, uint class, Symbol *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;findexsym(Fhdr *hdr, uint n, Symbol *s)<br>
+ Symbol *flookupsym(Fhdr *hdr, char *name)<br>
+ Symbol *ffindsym(Fhdr *hdr, Loc loc, uint class)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;indexlsym(Symbol *s1, uint n, Symbol *s2)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lookuplsym(Symbol *s1, char *name, Symbol *s2)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;findlsym(Symbol *s1, Loc loc, Symbol *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;symoff(char *a, uint n, ulong addr, uint class)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pc2file(ulong pc, char *file, uint n, ulong *line)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pc2line(ulong pc, ulong *line)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fileline(ulong pc, char *buf, uint n)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file2pc(char *file, ulong line, ulong *pc)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;line2pc(ulong basepc, ulong line, ulong *pc)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fnbound(ulong pc, ulong bounds[2])<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions provide machine-independent access to the symbol
+ table of an executable file or executing process. <a href="../man3/Mach.html"><i>Mach</i>(3)</a>, <a href="../man3/mach-file.html"><i>mach-file</i>(3)</a>,
+ and <a href="../man3/mach-map.html"><i>mach-map</i>(3)</a> describe additional library functions for accessing
+ executable files and executing processes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Symopen</i> uses the data in the <tt><font size=+1>Fhdr</font></tt> structure filled by <i>crackhdr</i>
+ (see <a href="../man3/mach-file.html"><i>mach-file</i>(3)</a>) to initialize in-memory structures used to
+ access the symbol tables contained in the file. <i>Symclose</i> frees
+ the structures. The rest of the functions described here access
+ a composite symbol table made up of all currently open tables.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The set of all currently open <tt><font size=+1>Fhdr</font></tt>s is maintained as a linked
+ list starting at <i>fhdrlist</i> (chained via <tt><font size=+1>Fhdr.next</font></tt>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Findhdr</i> searches the currently open <tt><font size=+1>Fhdr</font></tt>s for one whose file name
+ ends with the path <i>name</i> (that is, <tt><font size=+1>libc.so</font></tt> matches <tt><font size=+1>/usr/lib/libc.so</font></tt>
+ but not <tt><font size=+1>mylibc.so</font></tt>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>Symbol</font></tt> data structure:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ typedef struct Symbol Symbol;<br>
+ struct Symbol<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char &nbsp;&nbsp;&nbsp;*name;<br>
+ Loc &nbsp;&nbsp;&nbsp;loc;<br>
+ Loc &nbsp;&nbsp;&nbsp;hiloc;<br>
+ char &nbsp;&nbsp;&nbsp;class;<br>
+ char &nbsp;&nbsp;&nbsp;type;<br>
+ <i>...<br>
+ </i>
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ describes a symbol table entry. The <tt><font size=+1>value</font></tt> field contains the offset
+ of the symbol within its address space: global variables relative
+ to the beginning of the data segment, text beyond the start of
+ the text segment, and automatic variables and parameters relative
+ to the stack frame. The <tt><font size=+1>type</font></tt> field contains the type of
+ the symbol:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>T</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text segment symbol<br>
+ <tt><font size=+1>t</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;static text segment symbol<br>
+ <tt><font size=+1>D</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data segment symbol<br>
+ <tt><font size=+1>d</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;static data segment symbol<br>
+ <tt><font size=+1>B</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bss segment symbol<br>
+ <tt><font size=+1>b</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;static bss segment symbol<br>
+ <tt><font size=+1>a</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;automatic (local) variable symbol<br>
+ <tt><font size=+1>p</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function parameter symbol<br>
+ <tt><font size=+1>U</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;undefined symbol<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ The <tt><font size=+1>class</font></tt> field assigns the symbol to a general class; <tt><font size=+1>CTEXT</font></tt>,
+ <tt><font size=+1>CDATA</font></tt>, <tt><font size=+1>CAUTO</font></tt>, and <tt><font size=+1>CPARAM</font></tt> are the most popular.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Indexsym</i> stores information for the <i>n th</i> symbol into <i>s</i>. The symbols
+ are ordered by increasing address.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Lookupsym</i> fills a <tt><font size=+1>Symbol</font></tt> structure with symbol table information.
+ Global variables and functions are represented by a single name;
+ local variables and parameters are uniquely specified by a function
+ and variable name pair. Arguments <i>fn</i> and <i>var</i> contain the name
+ of a function and variable, respectively. If both are
+ non-zero, the symbol table is searched for a parameter or automatic
+ variable. If only <i>var</i> is zero, the text symbol table is searched
+ for function <i>fn</i>. If only <i>fn</i> is zero, the global variable table
+ is searched for <i>var</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Findsym</i> returns the symbol table entry of type <i>class</i> stored near
+ <i>addr</i>. The selected symbol is a global variable or function with
+ address nearest to and less than or equal to <i>addr</i>. Class specification
+ <tt><font size=+1>CDATA</font></tt> searches only the global variable symbol table; class <tt><font size=+1>CTEXT</font></tt>
+ limits the search to the text symbol table. Class
+ specification <tt><font size=+1>CANY</font></tt> searches the text table first, then the global
+ table.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Findexsym</i>, <i>flookupsym</i>, and <i>ffindsym</i> are similar to <i>indexsym</i>, <i>lookupsym</i>,
+ and <i>findsym</i>, but operate only on the symbols from <i>hdr</i>. <i>Flookupsym</i>
+ and <i>ffindsym</i> return pointers to data stored in the <i>hdr</i>, which
+ must not be modified or freed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Indexlsym</i>, <i>lookuplsym</i>, and <i>findlsym</i> are similar to <i>indexsym</i>, <i>lookupsym</i>,
+ and <i>findsym</i>, but operate on the smaller symbol table of parameters
+ and variables local to the function represented by symbol <i>s1</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Indexlsym</i> writes symbol information for the <i>n</i>th local symbol of
+ function <i>s1</i> to <i>s2</i>. Function parameters appear first in the ordering,
+ followed by local symbols.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Lookuplsym</i> writes symbol information for the symbol named <i>name</i>
+ in function <i>s1</i> to <i>s2</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Findlsym</i> searches for a symbol local to the function <i>s1</i> whose
+ location is exactly <i>loc</i>, writing its symbol information to <i>s2</i>.
+ <i>Loc</i> is almost always an indirection through a frame pointer register;
+ the details vary from architecture to architecture.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Symoff</i> converts a location to a symbol reference. The string containing
+ that reference is of the form &#8216;name+offset&#8217;, where &#8216;name&#8217; is the
+ name of the nearest symbol with an address less than or equal
+ to the target address, and &#8216;offset&#8217; is the hexadecimal offset
+ beyond that symbol. If &#8216;offset&#8217; is zero, only the name of the
+ symbol is printed. If no symbol is found within 4096 bytes of
+ the address, the address is formatted as a hexadecimal address.
+ <i>Buf</i> is the address of a buffer of <i>n</i> bytes to receive the formatted
+ string. <i>Addr</i> is the address to be converted. <i>Type</i> is the type
+ code of the search space: <tt><font size=+1>CTEXT</font></tt>, <tt><font size=+1>CDATA</font></tt>, or <tt><font size=+1>CANY</font></tt>. <i>Symoff
+ </i>returns the length of the formatted string contained in <i>buf</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Pc2file</i> searches the symbol table to find the file and line number
+ corresponding to the instruction at program counter <i>pc</i>. <i>File</i> is
+ the address of a buffer of <i>n</i> bytes to receive the file name. <i>Line</i>
+ receives the line number.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Pc2line</i> is like <i>pc2file</i> but neglects to return information about
+ the source file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fileline</i> is also like <i>pc2file</i>, but returns the file and line number
+ in the <i>n</i>-byte text buffer <i>buf</i>, formatted as &#8216;file:line&#8217;.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>File2pc</i> performs the opposite mapping: it stores in <i>pc</i> a text
+ address associated with line <i>line</i> in file <i>file</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Line2pc</i> is similar: it converts a line number to an instruction
+ address, storing it in <i>pc</i>. Since a line number does not uniquely
+ identify an instruction (e.g., every source file has line 1),
+ <i>basepc</i> specifies a text address from which the search begins.
+ Usually this is the address of the first function in the file
+ of interest.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fnbound</i> returns the start and end addresses of the function containing
+ the text address supplied as the first argument. The second argument
+ is an array of two unsigned longs; <i>fnbound</i> places the bounding
+ addresses of the function in the first and second elements of
+ this array. The start address is the address of the
+ first instruction of the function; the end address is the first
+ address beyond the end of the target function.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ All functions return 0 on success and &ndash;1 on error. When an error
+ occurs, a message describing it is stored in the system error
+ buffer where it is available via <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libmach<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mach.html"><i>mach</i>(3)</a>, <a href="../man3/mach-file.html"><i>mach-file</i>(3)</a>, <a href="../man3/mach-map.html"><i>mach-map</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/mach.html b/man/man3/mach.html
new file mode 100644
index 00000000..d69e5929
--- /dev/null
+++ b/man/man3/mach.html
@@ -0,0 +1,123 @@
+<head>
+<title>mach(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MACH(3)</b><td align=right><b>MACH(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ machbytype, machbyname &ndash; machine-independent access to executables
+ and programs<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mach.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>void machbytype(int type)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int machbyname(char *name)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>extern Mach *mach;<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Libmach</i> provides an interface for accessing the executable files
+ and executing images of various architectures and operating systems.
+ The interface is machine-independent, meaning that, for example,
+ Mac OS X core dumps may be inspected using an x86 Linux machine
+ and vice versa. In its current form, the library is
+ mainly useful for writing debuggers of one sort or another.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An architecture is described primarily by a <tt><font size=+1>Mach</font></tt> structure, which
+ contains data structures and parameters describing the particular
+ architecture. Most library functions assume that the global variable
+ <i>mach</i> points at the structure for the architecture being debugged.
+ It is set implicitly by <i>crackhdr</i> (see <a href="../man3/mach-file.html"><i>mach-file</i>(3)</a>) and
+ can be set explicitly by calling <i>machbyname</i> or <i>machbytype</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There is no operating system-specific structure akin to <i>mach</i>.
+ Typically the choice of operating system on a particular architecture
+ affects only the executable and core dump formats; the various
+ file parsers deduce the operating system from information in the
+ binary files themselves and adjust accordingly.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The supported architectures are <tt><font size=+1>386</font></tt> (Intel 32-bit x86) 386 and
+ later) and <tt><font size=+1>power</font></tt> (IBM PowerPC, typically running Mac OS X).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Other manual pages describe the library functions in detail.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man3/Mach-cmd.html"><i>Mach-cmd</i>(3)</a> describes some convenience routines for attaching
+ to processes and core files.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man3/Mach-file.html"><i>Mach-file</i>(3)</a> describes the manipulation of binary files.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man3/Mach-map.html"><i>Mach-map</i>(3)</a> describes the interface to address spaces and register
+ sets in executable files and executing programs.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man3/Mach-stack.html"><i>Mach-stack</i>(3)</a> describes support for unwinding the stack.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man3/Mach-swap.html"><i>Mach-swap</i>(3)</a> describes helper functions for accessing data in
+ a particular byte order.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man3/Mach-symbol.html"><i>Mach-symbol</i>(3)</a> describes the interface to debugging symbol information.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libmach<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mach-file.html"><i>mach-file</i>(3)</a>, <a href="../man3/mach-map.html"><i>mach-map</i>(3)</a>, <a href="../man3/mach-stack.html"><i>mach-stack</i>(3)</a>, <a href="../man3/mach-swap.html"><i>mach-swap</i>(3)</a>, <a href="../man3/mach-symbol.html"><i>mach-symbol</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/malloc.html b/man/man3/malloc.html
new file mode 100644
index 00000000..9c30c293
--- /dev/null
+++ b/man/man3/malloc.html
@@ -0,0 +1,181 @@
+<head>
+<title>malloc(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MALLOC(3)</b><td align=right><b>MALLOC(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ malloc, mallocz, free, realloc, calloc, setmalloctag, setrealloctag,
+ getmalloctag, getrealloctag &ndash; memory allocator<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void* malloc(ulong size)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void* mallocz(ulong size, int clr)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;free(void *ptr)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void* realloc(void *ptr, ulong size)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void* calloc(ulong nelem, ulong elsize)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;setmalloctag(void *ptr, ulong tag)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong getmalloctag(void *ptr)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;setrealloctag(void *ptr, ulong tag)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong getrealloctag(void *ptr)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Malloc</i> and <i>free</i> provide a simple memory allocation package. <i>Malloc</i>
+ returns a pointer to a new block of at least <i>size</i> bytes. The block
+ is suitably aligned for storage of any type of object. No two
+ active pointers from <i>malloc</i> will have the same value. The call
+ <tt><font size=+1>malloc(0)</font></tt> returns a valid pointer rather than null.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The argument to <i>free</i> is a pointer to a block previously allocated
+ by <i>malloc</i>; this space is made available for further allocation.
+ It is legal to free a null pointer; the effect is a no-op. The
+ contents of the space returned by <i>malloc</i> are undefined. <i>Mallocz</i>
+ behaves as <i>malloc</i>, except that if <i>clr</i> is non-zero, the memory
+ returned will be zeroed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Realloc</i> changes the size of the block pointed to by <i>ptr</i> to <i>size</i>
+ bytes and returns a pointer to the (possibly moved) block. The
+ contents will be unchanged up to the lesser of the new and old
+ sizes. <i>Realloc</i> takes on special meanings when one or both arguments
+ are zero:<br>
+ <tt><font size=+1>realloc(0, size)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ means <tt><font size=+1>malloc(size)</font></tt>; returns a pointer to the newly-allocated memory<br>
+
+ </table>
+ <tt><font size=+1>realloc(ptr, 0)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ means <tt><font size=+1>free(ptr)</font></tt>; returns null<br>
+
+ </table>
+ <tt><font size=+1>realloc(0, 0)<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ no-op; returns null
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ <i>Calloc</i> allocates space for an array of <i>nelem</i> elements of size
+ <i>elsize</i>. The space is initialized to zeros. <i>Free</i> frees such a block.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The memory allocator on Plan 9 maintains two word-sized fields
+ associated with each block, the &#8220;malloc tag&#8221; and the &#8220;realloc
+ tag&#8221;. By convention, the malloc tag is the PC that allocated the
+ block, and the realloc tag the PC that last reallocated the block.
+ These may be set or examined with <i>setmalloctag</i>, <i>getmalloctag</i>,
+ <i>setrealloctag</i>, and <i>getrealloctag</i>. When allocating blocks directly
+ with <i>malloc</i> and <i>realloc</i>, these tags will be set properly. If a
+ custom allocator wrapper is used, the allocator wrapper can set
+ the tags itself (usually by passing the result of <a href="../man3/getcallerpc.html"><i>getcallerpc</i>(3)</a>
+ to <i>setmalloctag</i>) to provide more useful information about the
+ source
+ of allocation.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/malloc.c<br>
+ /usr/local/plan9/src/lib9/malloctag.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>trump</i> (in <a href="../man1/acid.html"><i>acid</i>(1)</a>), <a href="../man3/getcallerpc.html"><i>getcallerpc</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Malloc, realloc</i> and <i>calloc</i> return 0 if there is no available memory.
+ <i>Errstr</i> is likely to be set. If the allocated blocks have no malloc
+ or realloc tags, <i>getmalloctag</i> and <i>getrealloctag</i> return <tt><font size=+1>~0</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>trump</i> library for <i>acid</i> can be used to obtain traces of malloc
+ execution; see <a href="../man1/acid.html"><i>acid</i>(1)</a>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The different specification of <i>calloc</i> is bizarre.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ User errors can corrupt the storage arena. The most common gaffes
+ are (1) freeing an already freed block, (2) storing beyond the
+ bounds of an allocated block, and (3) freeing data that was not
+ obtained from the allocator. When <i>malloc</i> and <i>free</i> detect such
+ corruption, they abort.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To avoid name conflicts with the system versions of these functions,
+ <i>malloc</i>, <i>realloc</i>, <i>calloc</i>, and <i>free</i> are preprocessor macros defined
+ as <i>p9malloc</i>, <i>p9realloc</i>, <i>p9calloc</i>, and <i>p9free</i>; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/matrix.html b/man/man3/matrix.html
new file mode 100644
index 00000000..ad72d10a
--- /dev/null
+++ b/man/man3/matrix.html
@@ -0,0 +1,263 @@
+<head>
+<title>matrix(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MATRIX(3)</b><td align=right><b>MATRIX(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ident, matmul, matmulr, determinant, adjoint, invertmat, xformpoint,
+ xformpointd, xformplane, pushmat, popmat, rot, qrot, scale, move,
+ xform, ixform, persp, look, viewport &ndash; Geometric transformations<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;draw.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;geometry.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void ident(Matrix m)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void matmul(Matrix a, Matrix b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void matmulr(Matrix a, Matrix b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double determinant(Matrix m)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void adjoint(Matrix m, Matrix madj)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double invertmat(Matrix m, Matrix inv)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 xformpoint(Point3 p, Space *to, Space *from)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 xformpointd(Point3 p, Space *to, Space *from)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point3 xformplane(Point3 p, Space *to, Space *from)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Space *pushmat(Space *t)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Space *popmat(Space *t)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void rot(Space *t, double theta, int axis)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void qrot(Space *t, Quaternion q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void scale(Space *t, double x, double y, double z)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void move(Space *t, double x, double y, double z)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void xform(Space *t, Matrix m)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void ixform(Space *t, Matrix m, Matrix inv)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int persp(Space *t, double fov, double n, double f)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void look(Space *t, Point3 eye, Point3 look, Point3 up)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void viewport(Space *t, Rectangle r, double aspect)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines manipulate 3-space affine and projective transformations,
+ represented as 4&#215;4 matrices, thus:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef double Matrix[4][4];<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <i>Ident</i> stores an identity matrix in its argument. <i>Matmul</i> stores
+ <i>a&#215;b</i> in <i>a</i>. <i>Matmulr</i> stores <i>b&#215;a</i> in <i>b</i>. <i>Determinant</i> returns the determinant
+ of matrix <i>m</i>. <i>Adjoint</i> stores the adjoint (matrix of cofactors)
+ of <i>m</i> in <i>madj</i>. <i>Invertmat</i> stores the inverse of matrix <i>m</i> in <i>minv</i>,
+ returning <i>m</i>&#8217;s determinant. Should <i>m</i> be singular
+ (determinant zero), <i>invertmat</i> stores its adjoint in <i>minv</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The rest of the routines described here manipulate <i>Spaces</i> and
+ transform <i>Point3s</i>. A <i>Point3</i> is a point in three-space, represented
+ by its homogeneous coordinates:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct Point3 Point3;<br>
+ struct Point3{<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ double x, y, z, w;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The homogeneous coordinates (<i>x</i>, <i>y</i>, <i>z</i>, <i>w</i>) represent the Euclidean
+ point (<i>x</i>/<i>w</i>, <i>y</i>/<i>w</i>, <i>z</i>/<i>w</i>) if <i>w</i>!=0, and a &#8220;point at infinity&#8221; if <i>w</i>=0.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <i>Space</i> is just a data structure describing a coordinate system:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct Space Space;<br>
+ struct Space{<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Matrix t;<br>
+ Matrix tinv;<br>
+ Space *next;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ It contains a pair of transformation matrices and a pointer to
+ the <i>Space</i>&#8217;s parent. The matrices transform points to and from
+ the &#8220;root coordinate system,&#8221; which is represented by a null <i>Space</i>
+ pointer.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Pushmat</i> creates a new <i>Space</i>. Its argument is a pointer to the
+ parent space. Its result is a newly allocated copy of the parent,
+ but with its <tt><font size=+1>next</font></tt> pointer pointing at the parent. <i>Popmat</i> discards
+ the <tt><font size=+1>Space</font></tt> that is its argument, returning a pointer to the stack.
+ Nominally, these two functions define a stack of
+ transformations, but <tt><font size=+1>pushmat</font></tt> can be called multiple times on the
+ same <tt><font size=+1>Space</font></tt> multiple times, creating a transformation tree.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Xformpoint</i> and <i>Xformpointd</i> both transform points from the <tt><font size=+1>Space</font></tt>
+ pointed to by <i>from</i> to the space pointed to by <i>to</i>. Either pointer
+ may be null, indicating the root coordinate system. The difference
+ between the two functions is that <tt><font size=+1>xformpointd</font></tt> divides <i>x</i>, <i>y</i>, <i>z</i>,
+ and <i>w</i> by <i>w</i>, if <i>w</i>!=0, making (<i>x</i>, <i>y</i>, <i>z</i>) the Euclidean
+ coordinates of the point.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Xformplane</i> transforms planes or normal vectors. A plane is specified
+ by the coefficients (<i>a</i>, <i>b</i>, <i>c</i>, <i>d</i>) of its implicit equation <i>ax+by+cz+d</i>=0.
+ Since this representation is dual to the homogeneous representation
+ of points, <tt><font size=+1>libgeometry</font></tt> represents planes by <tt><font size=+1>Point3</font></tt> structures,
+ with (<i>a</i>, <i>b</i>, <i>c</i>, <i>d</i>) stored in (<i>x</i>, <i>y</i>, <i>z</i>, <i>w</i>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The remaining functions transform the coordinate system represented
+ by a <tt><font size=+1>Space</font></tt>. Their <tt><font size=+1>Space *</font></tt> argument must be non-null -- you can&#8217;t
+ modify the root <tt><font size=+1>Space</font></tt>. <i>Rot</i> rotates by angle <i>theta</i> (in radians)
+ about the given <i>axis</i>, which must be one of <tt><font size=+1>XAXIS</font></tt>, <tt><font size=+1>YAXIS</font></tt> or <tt><font size=+1>ZAXIS</font></tt>.
+ <i>Qrot</i> transforms by a rotation about an
+ arbitrary axis, specified by <tt><font size=+1>Quaternion</font></tt> <i>q</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Scale</i> scales the coordinate system by the given scale factors
+ in the directions of the three axes. <i>Move</i> translates by the given
+ displacement in the three axial directions.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Xform</i> transforms the coordinate system by the given <tt><font size=+1>Matrix</font></tt>. If
+ the matrix&#8217;s inverse is known <i>a priori</i>, calling <i>ixform</i> will save
+ the work of recomputing it.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Persp</i> does a perspective transformation. The transformation maps
+ the frustum with apex at the origin, central axis down the positive
+ <i>y</i> axis, and apex angle <i>fov</i> and clipping planes <i>y</i>=<i>n</i> and <i>y</i>=<i>f</i> into
+ the double-unit cube. The plane <i>y</i>=<i>n</i> maps to <i>y</i>&#8217;=-1, <i>y</i>=<i>f</i> maps to
+ <i>y</i>&#8217;=1.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Look</i> does a view-pointing transformation. The <tt><font size=+1>eye</font></tt> point is moved
+ to the origin. The line through the <i>eye</i> and <i>look</i> points is aligned
+ with the y axis, and the plane containing the <tt><font size=+1>eye</font></tt>, <tt><font size=+1>look</font></tt> and <tt><font size=+1>up</font></tt>
+ points is rotated into the <i>x</i>-<i>y</i> plane.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Viewport</i> maps the unit-cube window into the given screen viewport.
+ The viewport rectangle <i>r</i> has <i>r</i><tt><font size=+1>.min</font></tt> at the top left-hand corner,
+ and <i>r</i><tt><font size=+1>.max</font></tt> just outside the lower right-hand corner. Argument <i>aspect</i>
+ is the aspect ratio (<i>dx</i>/<i>dy</i>) of the viewport&#8217;s pixels (not of the
+ whole viewport). The whole window is transformed
+ to fit centered inside the viewport with equal slop on either
+ top and bottom or left and right, depending on the viewport&#8217;s
+ aspect ratio. The window is viewed down the <i>y</i> axis, with <i>x</i> to
+ the left and <i>z</i> up. The viewport has <i>x</i> increasing to the right
+ and <i>y</i> increasing down. The window&#8217;s <i>y</i> coordinates are mapped,
+ unchanged, into the viewport&#8217;s <i>z</i> coordinates.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libgeometry/matrix.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/arith3.html"><i>arith3</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/memdraw.html b/man/man3/memdraw.html
new file mode 100644
index 00000000..57a0c96c
--- /dev/null
+++ b/man/man3/memdraw.html
@@ -0,0 +1,466 @@
+<head>
+<title>memdraw(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MEMDRAW(3)</b><td align=right><b>MEMDRAW(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Memimage, Memdata, Memdrawparam, memimageinit, wordaddr, byteaddr,
+ memimagemove, allocmemimage, allocmemimaged, readmemimage, creadmemimage,
+ writememimage, freememimage, memsetchan, loadmemimage, cloadmemimage,
+ unloadmemimage, memfillcolor, memarc, mempoly, memellipse,
+ memfillpoly, memimageline, memimagedraw, drawclip, memlinebbox,
+ memlineendsize, allocmemsubfont, openmemsubfont, freememsubfont,
+ memsubfontwidth, getmemdefont, memimagestring, iprint, hwdraw
+ &ndash; drawing routines for memory-resident images<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt; <br>
+ #include &lt;u.h&gt; <br>
+ #include &lt;libc.h&gt; <br>
+ #include &lt;draw.h&gt; <br>
+ #include &lt;memdraw.h&gt; <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>typedef struct Memdata<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*base; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* allocated data pointer */<br>
+ uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*bdata; &nbsp;&nbsp;&nbsp;&nbsp;/* first byte of actual data; word&#8722;aligned */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ref; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* number of Memimages using this data */<br>
+ void* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;imref; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* last image that pointed at this */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;allocd; &nbsp;&nbsp;&nbsp;&nbsp;/* is this malloc'd? */<br>
+
+ </table>
+ } Memdata;<br>
+ enum {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Frepl &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 1&lt;&lt;0, &nbsp;&nbsp;&nbsp;&nbsp;/* is replicated */<br>
+ Fsimple &nbsp;&nbsp;&nbsp;&nbsp;= 1&lt;&lt;1, &nbsp;&nbsp;&nbsp;&nbsp;/* is 1x1 */<br>
+ Fgrey &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 1&lt;&lt;2, &nbsp;&nbsp;&nbsp;&nbsp;/* is grey */<br>
+ Falpha &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 1&lt;&lt;3, &nbsp;&nbsp;&nbsp;&nbsp;/* has explicit alpha */<br>
+ Fcmap &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 1&lt;&lt;4, &nbsp;&nbsp;&nbsp;&nbsp;/* has cmap channel */<br>
+ Fbytes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 1&lt;&lt;5, &nbsp;&nbsp;&nbsp;&nbsp;/* has only 8&#8722;bit channels */<br>
+
+ </table>
+ };<br>
+ typedef struct Memimage<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Rectangle r; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* rectangle in data area, local coords */<br>
+ Rectangle clipr; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* clipping region */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;depth; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* number of bits of storage per pixel */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nchan; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* number of channels */<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chan; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* channel descriptions */<br>
+ Memdata &nbsp;&nbsp;&nbsp;&nbsp;*data; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* pointer to data */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;zero; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* data&#8722;&gt;bdata+zero==&amp;byte containing (0,0) */<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* width in words of a single scan line */<br>
+ Memlayer &nbsp;&nbsp;&nbsp;*layer; &nbsp;&nbsp;&nbsp;&nbsp;/* nil if not a layer*/<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flags;<br>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>...<br>
+ </i>
+ </table>
+ <tt><font size=+1>} Memimage;<br>
+ typedef struct Memdrawparam<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Memimage &nbsp;&nbsp;&nbsp;*dst;<br>
+ Rectangle r;<br>
+ Memimage &nbsp;&nbsp;&nbsp;*src;<br>
+ Rectangle sr;<br>
+ Memimage &nbsp;&nbsp;&nbsp;*mask;<br>
+ Rectangle mr;<br>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>...<br>
+ </i>
+ </table>
+ <tt><font size=+1>} Memdrawparam;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drawdebug;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt><i>
+ </i><tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memimageinit(void)<br>
+ ulong* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wordaddr(Memimage *i, Point p)<br>
+ uchar* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byteaddr(Memimage *i, Point p)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memimagemove(void *from, void *to)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Memimage* &nbsp;&nbsp;&nbsp;&nbsp;allocmemimage(Rectangle r, ulong chan)<br>
+ Memimage* &nbsp;&nbsp;&nbsp;&nbsp;allocmemimaged(Rectangle r, ulong chan, Memdata *data)<br>
+ Memimage* &nbsp;&nbsp;&nbsp;&nbsp;readmemimage(int fd)<br>
+ Memimage* &nbsp;&nbsp;&nbsp;&nbsp;creadmemimage(int fd)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writememimage(int fd, Memimage *i)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;freememimage(Memimage *i)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memsetchan(Memimage*, ulong)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loadmemimage(Memimage *i, Rectangle r,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *buf, int nbuf)<br>
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cloadmemimage(Memimage *i, Rectangle r,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *buf, int nbuf)<br>
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unloadmemimage(Memimage *i, Rectangle r,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *buf, int nbuf)<br>
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memfillcolor(Memimage *i, ulong color)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memarc(Memimage *dst, Point c, int a, int b, int thick,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Memimage *src, Point sp, int alpha, int phi, Drawop op)<br>
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mempoly(Memimage *dst, Point *p, int np, int end0,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int end1, int radius, Memimage *src, Point sp, Drawop op)<br>
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memellipse(Memimage *dst, Point c, int a, int b,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int thick, Memimage *src, Point sp, Drawop op)<br>
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memfillpoly(Memimage *dst, Point *p, int np, int wind,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Memimage *src, Point sp, Drawop op)<br>
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memimageline(Memimage *dst, Point p0, Point p1, int end0,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int end1, int radius, Memimage *src, Point sp, Drawop op)<br>
+
+ </table>
+
+ </table>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memimagedraw(Memimage *dst, Rectangle r, Memimage *src,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Point sp, Memimage *mask, Point mp, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drawclip(Memimage *dst, Rectangle *dr, Memimage *src,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Point *sp, Memimage *mask, Point *mp,<br>
+ Rectangle *sr, Rectangle *mr)<br>
+
+ </table>
+
+ </table>
+ Rectangle &nbsp;&nbsp;&nbsp;&nbsp;memlinebbox(Point p0, Point p1, int end0, int end1,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int radius)<br>
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memlineendsize(int end)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Memsubfont* allocmemsubfont(char *name, int n, int height,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int ascent, Fontchar *info, Memimage *i)<br>
+
+ </table>
+
+ </table>
+ Memsubfont* openmemsubfont(char *name)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;freememsubfont(Memsubfont *f)<br>
+ Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memsubfontwidth(Memsubfont *f, char *s)<br>
+ Memsubfont* getmemdefont(void)<br>
+ Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memimagestring(Memimage *dst, Point p, Memimage *color,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Point cp, Memsubfont *f, char *cs, Drawop op)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iprint(char *fmt, ...)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hwdraw(Memdrawparam *param)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>Memimage</font></tt> type defines memory-resident rectangular pictures
+ and the methods to draw upon them; <tt><font size=+1>Memimage</font></tt>s differ from <tt><font size=+1>Image</font></tt>s
+ (see <a href="../man3/draw.html"><i>draw</i>(3)</a>) in that they are manipulated directly in user memory
+ rather than by RPCs to the <tt><font size=+1>/dev/draw</font></tt> hierarchy. The library is
+ the basis for the kernel <a href="../man3/draw.html"><i>draw</i>(3)</a> driver and also
+ used by a number of programs that must manipulate images without
+ a display.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>r, clipr</font></tt>, <tt><font size=+1>depth</font></tt>, <tt><font size=+1>nchan</font></tt>, and <tt><font size=+1>chan</font></tt> structure elements are identical
+ to the ones of the same name in the <tt><font size=+1>Image</font></tt> structure.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>flags</font></tt> element of the <tt><font size=+1>Memimage</font></tt> structure holds a number of
+ bits of information about the image. In particular, it subsumes
+ the purpose of the <tt><font size=+1>repl</font></tt> element of <tt><font size=+1>Image</font></tt> structures.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memimageinit</i> initializes various static data that the library
+ depends on, as well as the replicated solid color images <tt><font size=+1>memopaque</font></tt>,
+ <tt><font size=+1>memtransparent</font></tt>, <tt><font size=+1>memblack</font></tt>, and <tt><font size=+1>memwhite</font></tt>. It should be called before
+ referring to any of these images and before calling any of the
+ other library functions.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each <tt><font size=+1>Memimage</font></tt> points at a <tt><font size=+1>Memdata</font></tt> structure that in turn points
+ at the actual pixel data for the image. This allows multiple images
+ to be associated with the same <tt><font size=+1>Memdata</font></tt>. The first word of the
+ data pointed at by the <tt><font size=+1>base</font></tt> element of <tt><font size=+1>Memdata</font></tt> points back at
+ the <tt><font size=+1>Memdata</font></tt> structure, so that in the Plan 9 kernel,
+ the memory allocator (see Plan 9&#8217;s <i>pool</i>(3)) can compact image
+ memory using <i>memimagemove</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Because images can have different coordinate systems, the <tt><font size=+1>zero</font></tt>
+ element of the <tt><font size=+1>Memimage</font></tt> structure contains the offset that must
+ be added to the <tt><font size=+1>bdata</font></tt> element of the corresponding <tt><font size=+1>Memdata</font></tt> structure
+ in order to yield a pointer to the data for the pixel (0,0). Adding
+ <tt><font size=+1>width</font></tt> machine words to this pointer moves it
+ down one scan line. The <tt><font size=+1>depth</font></tt> element can be used to determine
+ how to move the pointer horizontally. Note that this method works
+ even for images whose rectangles do not include the origin, although
+ one should only dereference pointers corresponding to pixels within
+ the image rectangle. <i>Wordaddr</i> and
+ <i>byteaddr</i> perform these calculations, returning pointers to the
+ word and byte, respectively, that contain the beginning of the
+ data for a given pixel.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Allocmemimage</i> allocages images with a given rectangle and channel
+ descriptor (see <tt><font size=+1>strtochan</font></tt> in <a href="../man3/graphics.html"><i>graphics</i>(3)</a>), creating a fresh <tt><font size=+1>Memdata</font></tt>
+ structure and associated storage. <i>Allocmemimaged</i> is similar but
+ uses the supplied <i>Memdata</i> structure rather than a new one. The
+ <i>readmemimage</i> function reads an
+ uncompressed bitmap from the given file descriptor, while <i>creadmemimage</i>
+ reads a compressed bitmap. <i>Writememimage</i> writes a compressed representation
+ of <i>i</i> to file descriptor <i>fd</i>. For more on bitmap formats, see <a href="../man7/image.html"><i>image</i>(7)</a>.
+ <i>Freememimage</i> frees images returned by any of these routines. The
+ <tt><font size=+1>Memimage</font></tt> structure
+ contains some tables that are used to store precomputed values
+ depending on the channel descriptor. <i>Memsetchan</i> updates the <tt><font size=+1>chan</font></tt>
+ element of the structure as well as these tables, returning &ndash;1
+ if passed a bad channel descriptor.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Loadmemimage</i> and <i>cloadmemimage</i> replace the pixel data for a given
+ rectangle of an image with the given buffer of uncompressed or
+ compressed data, respectively. When calling <i>cloadmemimage</i>, the
+ buffer must contain an integral number of compressed chunks of
+ data that exactly cover the rectangle.
+ <i>Unloadmemimage</i> retrieves the uncompressed pixel data for a given
+ rectangle of an image. All three return the number of bytes consumed
+ on success, and &ndash;1 in case of an error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memfillcolor</i> fills an image with the given color, a 32-bit number
+ as described in <a href="../man3/color.html"><i>color</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memarc</i>, <i>mempoly</i>, <i>memellipse</i>, <i>memfillpoly</i>, <i>memimageline</i>, and <i>memimagedraw</i>
+ are identical to the <i>arc</i>, <i>poly</i>, <i>ellipse</i>, <i>fillpoly</i>, <i>line</i>, and <i>gendraw</i>,
+ routines described in <a href="../man3/draw.html"><i>draw</i>(3)</a>, except that they operate on <tt><font size=+1>Memimage</font></tt>s
+ rather than <tt><font size=+1>Image</font></tt>s. Similarly, <i>allocmemsubfont</i>, <i>openmemsubfont</i>,
+ <i>freememsubfont</i>,
+ <i>memsubfontwidth</i>, <i>getmemdefont</i>, and <i>memimagestring</i> are the <tt><font size=+1>Memimage</font></tt>
+ analogues of <i>allocsubfont</i>, <i>openfont</i>, <i>freesubfont</i>, <i>strsubfontwidth</i>,
+ <i>getdefont</i>, and <tt><font size=+1>string</font></tt> (see <a href="../man3/subfont.html"><i>subfont</i>(3)</a> and <a href="../man3/graphics.html"><i>graphics</i>(3)</a>), except
+ that they operate only on <tt><font size=+1>Memsubfont</font></tt>s rather than <tt><font size=+1>Font</font></tt>s.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Drawclip</i> takes the images involved in a draw operation, together
+ with the destination rectangle <tt><font size=+1>dr</font></tt> and source and mask alignment
+ points <tt><font size=+1>sp</font></tt> and <tt><font size=+1>mp</font></tt>, and clips them according to the clipping rectangles
+ of the images involved. It also fills in the rectangles <tt><font size=+1>sr</font></tt> and
+ <tt><font size=+1>mr</font></tt> with rectangles congruent to the returned
+ destination rectangle but translated so the upper left corners
+ are the returned <tt><font size=+1>sp</font></tt> and <tt><font size=+1>mp</font></tt>. <i>Drawclip</i> returns zero when the clipped
+ rectangle is empty. <i>Memlinebbox</i> returns a conservative bounding
+ box containing a line between two points with given end styles
+ and radius. <i>Memlineendsize</i> calculates the extra length
+ added to a line by attaching an end of a given style.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>hwdraw</i> and <i>iprint</i> functions are no-op stubs that may be overridden
+ by clients of the library. <i>Hwdraw</i> is called at each call to <i>memimagedraw</i>
+ with the current request&#8217;s parameters. If it can satisfy the request,
+ it should do so and return 1. If it cannot satisfy the request,
+ it should return 0. This allows (for
+ instance) the kernel to take advantage of hardware acceleration.
+ <i>Iprint</i> should format and print its arguments; it is given much
+ debugging output when the global integer variable <tt><font size=+1>drawdebug</font></tt> is
+ non-zero. In the kernel, <i>iprint</i> prints to a serial line rather
+ than the screen, for obvious reasons.
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/addpt.html"><i>addpt</i>(3)</a>, <a href="../man3/color.html"><i>color</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/memlayer.html"><i>memlayer</i>(3)</a>, <a href="../man3/stringsize.html"><i>stringsize</i>(3)</a>,
+ <a href="../man3/subfont.html"><i>subfont</i>(3)</a>, <a href="../man7/color.html"><i>color</i>(7)</a>, <a href="../man7/utf.html"><i>utf</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Memimagestring</i> is unusual in using a subfont rather than a font,
+ and in having no parameter to align the source.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ These functions are archived into <i>libdraw</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/memlayer.html b/man/man3/memlayer.html
new file mode 100644
index 00000000..c21f5bf6
--- /dev/null
+++ b/man/man3/memlayer.html
@@ -0,0 +1,325 @@
+<head>
+<title>memlayer(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MEMLAYER(3)</b><td align=right><b>MEMLAYER(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ memdraw, memlalloc, memldelete, memlexpose, memlfree, memlhide,
+ memline, memlnorefresh, memload, memunload, memlorigin, memlsetrefresh,
+ memltofront, memltofrontn, memltorear, memltorearn &ndash; windows of
+ memory-resident images<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt; <br>
+ #include &lt;libc.h&gt; <br>
+ #include &lt;draw.h&gt; <br>
+ #include &lt;memdraw.h&gt; <br>
+ #include &lt;memlayer.h&gt; <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>typedef struct Memscreen Memscreen;<br>
+ typedef struct Memlayer Memlayer;<br>
+ typedef void (*Refreshfn)(Memimage*, Rectangle, void*);<br>
+ struct Memscreen<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Memimage &nbsp;&nbsp;&nbsp;*frontmost; /* frontmost layer on screen */<br>
+ Memimage &nbsp;&nbsp;&nbsp;*rearmost; &nbsp;&nbsp;&nbsp;/* rearmost layer on screen */<br>
+ Memimage &nbsp;&nbsp;&nbsp;*image; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* upon which all layers are drawn */<br>
+ Memimage &nbsp;&nbsp;&nbsp;*fill; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* if non&#8722;zero, picture to use when repainting
+ */<br>
+
+ </table>
+ };<br>
+ struct Memlayer<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Rectangle screenr; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* true position of layer on screen */<br>
+ Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delta; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* add delta to go from image coords to screen */<br>
+ Memscreen *screen; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* screen this layer belongs to */<br>
+ Memimage &nbsp;&nbsp;&nbsp;*front; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* window in front of this one */<br>
+ Memimage &nbsp;&nbsp;&nbsp;*rear; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* window behind this one*/<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clear; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* layer is fully visible */<br>
+ Memimage &nbsp;&nbsp;&nbsp;*save; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* save area for obscured parts */<br>
+ Refreshfn refreshfn; &nbsp;&nbsp;&nbsp;/* fn to refresh obscured parts if save==nil
+ */<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*refreshptr;/* argument to refreshfn */<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Memimage* memlalloc(Memscreen *s, Rectangle r, Refreshfn fn, void
+ *arg, ulong col)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memlnorefresh(Memimage *i, Rectangle r, void *arg)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memlsetrefresh(Memimage *i, Refreshfn fn, void *arg)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memldelete(Memimage *i)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memlfree(Memimage *i)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memlexpose(Memimage *i, Rectangle r)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memlhide(Memimage *i, Rectangle r)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memltofront(Memimage *i)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memltofrontn(Memimage**ia, int n)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memltorear(Memimage *i)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memltorearn(Memimage **ia , int n)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memlorigin(Memimage *i, Point log, Point phys)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memdraw(Image *dst, Rectangle r,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Image *src, Point sp, Image *mask, Point mp, Drawop op)<br>
+
+ </table>
+
+ </table>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memload(Memimage *i, Rectangle r,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *buf, int n, int iscompressed)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;memunload(Memimage *i, Rectangle r,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *buf, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions build upon the <a href="../man3/memdraw.html"><i>memdraw</i>(3)</a> interface to maintain
+ overlapping graphical windows on in-memory images. They are used
+ by the kernel to implement the windows interface presented by
+ <a href="../man3/draw.html"><i>draw</i>(3)</a> and <a href="../man3/window.html"><i>window</i>(3)</a> and probably have little use outside of
+ the kernel.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The basic function is to extend the definition of a <tt><font size=+1>Memimage</font></tt> (see
+ <a href="../man3/memdraw.html"><i>memdraw</i>(3)</a>) to include overlapping windows defined by the <tt><font size=+1>Memlayer</font></tt>
+ type. The first fields of the <tt><font size=+1>Memlayer</font></tt> structure are identical
+ to those in <tt><font size=+1>Memimage</font></tt>, permitting a function that expects a <tt><font size=+1>Memimage</font></tt>
+ to be passed a <tt><font size=+1>Memlayer</font></tt>, and vice versa.
+ Both structures have a <tt><font size=+1>save</font></tt> field, which is nil in a <tt><font size=+1>Memimage</font></tt>
+ and points to &#8216;backing store&#8217; in a <tt><font size=+1>Memlayer</font></tt>. The layer routines
+ accept <tt><font size=+1>Memimages</font></tt> or <tt><font size=+1>Memlayers</font></tt>; if the image is a <tt><font size=+1>Memimage</font></tt> the
+ underlying <tt><font size=+1>Memimage</font></tt> routine is called; otherwise the layer routines
+ recursively subdivide the geometry, reducing the
+ operation into a smaller component that ultimately can be performed
+ on a <tt><font size=+1>Memimage</font></tt>, either the display on which the window appears,
+ or the backing store.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Memlayers</font></tt> are associated with a <tt><font size=+1>Memscreen</font></tt> that holds the data
+ structures to maintain the windows and connects them to the associated
+ <tt><font size=+1>image</font></tt>. The <tt><font size=+1>fill</font></tt> color is used to paint the background when a window
+ is deleted. There is no function to establish a <tt><font size=+1>Memscreen</font></tt>; to
+ create one, allocate the memory, zero
+ <tt><font size=+1>frontmost</font></tt> and <tt><font size=+1>rearmost</font></tt>, set <tt><font size=+1>fill</font></tt> to a valid fill color or image,
+ and set <tt><font size=+1>image</font></tt> to the <tt><font size=+1>Memimage</font></tt> (or <tt><font size=+1>Memlayer</font></tt>) on which the windows
+ will be displayed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memlalloc</i> allocates a <tt><font size=+1>Memlayer</font></tt> of size <i>r</i> on <tt><font size=+1>Memscreen</font></tt> <i>s</i>. If <i>col</i>
+ is not <tt><font size=+1>DNofill</font></tt>, the new window will be initialized by painting
+ it that color.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The refresh function <i>fn</i> and associated argument <i>arg</i> will be called
+ by routines in the library to restore portions of the window uncovered
+ due to another window being deleted or this window being pulled
+ to the front of the stack. The function, when called, receives
+ a pointer to the image (window) being refreshed, the
+ rectangle that has been uncovered, and the <i>arg</i> recorded when the
+ window was created. A couple of predefined functions provide built-in
+ management methods: <i>memlnorefresh</i> does no backup at all, useful
+ for making efficient temporary windows; while a <i>nil</i> function specifies
+ that the backing store
+ (<tt><font size=+1>Memlayer.save</font></tt>) will be used to keep the obscured data. Other
+ functions may be provided by the client. <i>Memlsetrefresh</i> allows
+ one to change the function associated with the window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memldelete</i> deletes the window <i>i</i>, restoring the underlying display.
+ <i>Memlfree</i> frees the data structures without unlinking the window
+ from the associated <tt><font size=+1>Memscreen</font></tt> or doing any graphics.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memlexpose</i> restores rectangle <i>r</i> within the window, using the backing
+ store or appropriate refresh method. <i>Memlhide</i> goes the other way,
+ backing up <i>r</i> so that that portion of the screen may be modified
+ without losing the data in this window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memltofront</i> pulls <i>i</i> to the front of the stack of windows, making
+ it fully visible. <i>Memltofrontn</i> pulls the <i>n</i> windows in the array
+ <i>ia</i> to the front as a group, leaving their internal order unaffected.
+ <i>Memltorear</i> and <i>memltorearn</i> push the windows to the rear.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memlorigin</i> changes the coordinate systems associated with the
+ window <i>i</i>. The points <i>log</i> and <i>phys</i> represent the upper left corner
+ (<tt><font size=+1>min</font></tt>) of the window&#8217;s internal coordinate system and its physical
+ location on the screen. Changing <i>log</i> changes the interpretation
+ of coordinates within the window; for example, setting it
+ to (0, 0) makes the upper left corner of the window appear to
+ be the origin of the coordinate system, regardless of its position
+ on the screen. Changing <i>phys</i> changes the physical location of
+ the window on the screen. When a window is created, its logical
+ and physical coordinates are the same, so
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>memlorigin(i, i&#8722;&gt;r.min, i&#8722;&gt;r.min)<br>
+ </font></tt>
+ </table>
+
+ </table>
+ would be a no-op.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memdraw</i> and <i>memline</i> are implemented in the layer library but provide
+ the main entry points for drawing on memory-resident windows.
+ They have the signatures of <i>memimagedraw</i> and <i>memimageline</i> (see
+ <a href="../man3/memdraw.html"><i>memdraw</i>(3)</a>) but accept <tt><font size=+1>Memlayer</font></tt> or <tt><font size=+1>Memimage</font></tt> arguments both.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memload</i> and <i>memunload</i> are similarly layer-savvy versions of <i>loadmemimage</i>
+ and <i>unloadmemimage</i>. The <i>iscompressed</i> flag to <i>memload</i> specifies
+ whether the <i>n</i> bytes of data in <i>buf</i> are in compressed image format
+ (see <a href="../man7/image.html"><i>image</i>(7)</a>).<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/memdraw.html"><i>memdraw</i>(3)</a>, <a href="../man3/stringsize.html"><i>stringsize</i>(3)</a>, <a href="../man3/window.html"><i>window</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions are archived into <i>libdraw</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/memory.html b/man/man3/memory.html
new file mode 100644
index 00000000..a67101b7
--- /dev/null
+++ b/man/man3/memory.html
@@ -0,0 +1,123 @@
+<head>
+<title>memory(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MEMORY(3)</b><td align=right><b>MEMORY(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ memccpy, memchr, memcmp, memcpy, memmove, memset &ndash; memory operations<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void* memccpy(void *s1, void *s2, int c, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void* memchr(void *s, int c, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;memcmp(void *s1, void *s2, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void* memcpy(void *s1, void *s2, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void* memmove(void *s1, void *s2, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void* memset(void *s, int c, long n)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions operate efficiently on memory areas (arrays of
+ bytes bounded by a count, not terminated by a zero byte). They
+ do not check for the overflow of any receiving memory area.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memccpy</i> copies bytes from memory area <i>s2</i> into <i>s1</i>, stopping after
+ the first occurrence of byte <i>c</i> has been copied, or after <i>n</i> bytes
+ have been copied, whichever comes first. It returns a pointer
+ to the byte after the copy of <i>c</i> in <i>s1</i>, or zero if <i>c</i> was not found
+ in the first <i>n</i> bytes of <i>s2</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memchr</i> returns a pointer to the first occurrence of byte <i>c</i> in
+ the first <i>n</i> bytes of memory area <i>s,</i> or zero if <i>c</i> does not occur.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memcmp</i> compares its arguments, looking at the first <i>n</i> bytes only,
+ and returns an integer less than, equal to, or greater than 0,
+ according as <i>s1</i> is lexicographically less than, equal to, or greater
+ than <i>s2</i>. The comparison is bytewise unsigned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memcpy</i> copies <i>n</i> bytes from memory area <i>s2</i> to <i>s1</i>. It returns <i>s1</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memmove</i> works like <i>memcpy</i>, except that it is guaranteed to work
+ if <i>s1</i> and <i>s2</i> overlap.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Memset</i> sets the first <i>n</i> bytes in memory area <i>s</i> to the value of
+ byte <i>c</i>. It returns <i>s</i>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ All these routines have portable C implementations in <tt><font size=+1>/usr/local/plan9/src/lib9</font></tt>.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/strcat.html"><i>strcat</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ANSI C does not require <i>memcpy</i> to handle overlapping source and
+ destination; on Plan 9, it does, so <i>memmove</i> and <i>memcpy</i> behave
+ identically.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If <i>memcpy</i> and <i>memmove</i> are handed a negative count, they abort.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/mouse.html b/man/man3/mouse.html
new file mode 100644
index 00000000..5e2b278d
--- /dev/null
+++ b/man/man3/mouse.html
@@ -0,0 +1,249 @@
+<head>
+<title>mouse(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MOUSE(3)</b><td align=right><b>MOUSE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ initmouse, readmouse, closemouse, moveto, cursorswitch, getrect,
+ drawgetrect, menuhit, setcursor &ndash; mouse control<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;draw.h&gt;<br>
+ #include &lt;thread.h&gt;<br>
+ #include &lt;mouse.h&gt;<br>
+ #include &lt;cursor.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Mousectl &nbsp;&nbsp;&nbsp;*initmouse(char *file, Image *i)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;readmouse(Mousectl *mc)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;atomouse();<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;closemouse(Mousectl *mc)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;moveto(Mousectl *mc, Point pt)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setcursor(Mousectl *mc, Cursor *c)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rectangle getrect(int but, Mousectl *mc)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drawgetrect(Rectangle r, int up)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;menuhit(int but, Mousectl *mc, Menu *menu, Screen *scr)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions access and control a mouse in a multi-threaded
+ environment. They use the message-passing <tt><font size=+1>Channel</font></tt> interface in
+ the threads library (see <a href="../man3/thread.html"><i>thread</i>(3)</a>); programs that wish a more
+ event-driven, single-threaded approach should use <a href="../man3/event.html"><i>event</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The state of the mouse is recorded in a structure, <tt><font size=+1>Mouse</font></tt>, defined
+ in <tt><font size=+1>&lt;mouse.h&gt;</font></tt>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct Mouse Mouse;<br>
+ struct Mouse<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;buttons; &nbsp;&nbsp;&nbsp;&nbsp;/* bit array: LMR=124 */<br>
+ Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xy;<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msec;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The <tt><font size=+1>Point xy</font></tt> records the position of the cursor, <tt><font size=+1>buttons</font></tt> the state
+ of the buttons (three bits representing, from bit 0 up, the buttons
+ from left to right, 0 if the button is released, 1 if it is pressed),
+ and <tt><font size=+1>msec</font></tt>, a millisecond time stamp.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routine <tt><font size=+1>initmouse</font></tt> returns a structure through which one may
+ access the mouse:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct Mousectl Mousectl;<br>
+ struct Mousectl<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Mouse;<br>
+ Channel &nbsp;&nbsp;&nbsp;&nbsp;*c; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* chan(Mouse)[16] */<br>
+ Channel &nbsp;&nbsp;&nbsp;&nbsp;*resizec; &nbsp;&nbsp;&nbsp;/* chan(int)[2] */<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*file;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mfd; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* to mouse file */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cfd; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* to cursor file */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pid; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* of slave proc */<br>
+ Image* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* of associated window/display */<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The arguments to <i>initmouse</i> are a <i>file</i> naming the device file connected
+ to the mouse and an <i>Image</i> (see <a href="../man3/draw.html"><i>draw</i>(3)</a>) on which the mouse will
+ be visible. Typically the file is nil, which requests the default
+ <tt><font size=+1>/dev/mouse</font></tt>; and the image is the window in which the program is
+ running, held in the variable <tt><font size=+1>screen</font></tt> after a call
+ to <i>initdraw</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Once the <tt><font size=+1>Mousectl</font></tt> is set up, mouse motion will be reported by
+ messages of type <tt><font size=+1>Mouse</font></tt> sent on the <tt><font size=+1>Channel Mousectl.c</font></tt>. Typically,
+ a message will be sent every time a read of <tt><font size=+1>/dev/mouse</font></tt> succeeds,
+ which is every time the state of the mouse changes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When the window is resized, a message is sent on <tt><font size=+1>Mousectl.resizec</font></tt>.
+ The actual value sent may be discarded; the receipt of the message
+ tells the program that it should call <tt><font size=+1>getwindow</font></tt> (see <a href="../man3/graphics.html"><i>graphics</i>(3)</a>)
+ to reconnect to the window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Readmouse</i> updates the <tt><font size=+1>Mouse</font></tt> structure held in the <tt><font size=+1>Mousectl</font></tt>, blocking
+ if the state has not changed since the last <i>readmouse</i> or message
+ sent on the channel. It calls <tt><font size=+1>flushimage</font></tt> (see <a href="../man3/graphics.html"><i>graphics</i>(3)</a>) before
+ blocking, so any buffered graphics requests are displayed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Closemouse</i> closes the file descriptors associated with the mouse,
+ kills the slave processes, and frees the <tt><font size=+1>Mousectl</font></tt> structure.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Moveto</i> moves the mouse cursor on the display to the position specified
+ by <i>pt</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Setcursor</i> sets the image of the cursor to that specified by <i>c</i>.
+ If <i>c</i> is nil, the cursor is set to the default. The format of the
+ cursor data is spelled out in <tt><font size=+1>&lt;cursor.h&gt;</font></tt> and described in <a href="../man3/graphics.html"><i>graphics</i>(3)</a>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Getrect</i> returns the dimensions of a rectangle swept by the user,
+ using the mouse, in the manner <a href="../man1/rio.html"><i>rio</i>(1)</a> or <a href="../man1/sam.html"><i>sam</i>(1)</a> uses to create
+ a new window. The <i>but</i> argument specifies which button the user
+ must press to sweep the window; any other button press cancels
+ the action. The returned rectangle is all zeros if the user
+ cancels.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Getrect</i> uses successive calls to <i>drawgetrect</i> to maintain the red
+ rectangle showing the sweep-in-progress. The rectangle to be drawn
+ is specified by <i>rc</i> and the <i>up</i> parameter says whether to draw (1)
+ or erase (0) the rectangle.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Menuhit</i> provides a simple menu mechanism. It uses a <tt><font size=+1>Menu</font></tt> structure
+ defined in <tt><font size=+1>&lt;mouse.h&gt;</font></tt>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct Menu Menu;<br>
+ struct Menu<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**item;<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*(*gen)(int);<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lasthit;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <i>Menuhit</i> behaves the same as its namesake <i>emenuhit</i> described in
+ <a href="../man3/event.html"><i>event</i>(3)</a>, with two exceptions. First, it uses a <tt><font size=+1>Mousectl</font></tt> to access
+ the mouse rather than using the event interface; and second, it
+ creates the menu as a true window on the <tt><font size=+1>Screen</font></tt> <i>scr</i> (see <a href="../man3/window.html"><i>window</i>(3)</a>),
+ permitting the menu to be displayed in parallel
+ with other activities on the display. If <i>scr</i> is null, <i>menuhit</i>
+ behaves like <i>emenuhit</i>, creating backing store for the menu, writing
+ the menu directly on the display, and restoring the display when
+ the menu is removed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/event.html"><i>event</i>(3)</a>, <a href="../man3/keyboard.html"><i>keyboard</i>(3)</a>, <a href="../man3/thread.html"><i>thread</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/mousescrollsize.html b/man/man3/mousescrollsize.html
new file mode 100644
index 00000000..3aa816fb
--- /dev/null
+++ b/man/man3/mousescrollsize.html
@@ -0,0 +1,108 @@
+<head>
+<title>mousescrollsize(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MOUSESCROLLSIZE(3)</b><td align=right><b>MOUSESCROLLSIZE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ mousescrollsize &ndash; compute mouse scroll increment<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;draw.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ int &nbsp;&nbsp;&nbsp;&nbsp;mousescrollsize(int maxlines)<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Mousescrollsize</i> computes the number of lines of text that should
+ be scrolled in response to a mouse scroll wheel click. <i>Maxlines</i>
+ is the number of lines visible in the text window.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The default scroll increment is one line. This default can be
+ overridden by setting the <tt><font size=+1>$mousescrollsize</font></tt> environment variable
+ to an integer, which specifies a constant number of lines, or
+ to a real number followed by a percent character, indicating that
+ the scroll increment should be a percentage of the total
+ number of lines in the window. For example, setting <tt><font size=+1>$mousescrollsize</font></tt>
+ to <tt><font size=+1>50%</font></tt> causes a half-window scroll increment.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mousescrollsize</i> is used by <a href="../man1/9term.html"><i>9term</i>(1)</a> and <a href="../man1/acme.html"><i>acme</i>(1)</a> to set their scrolling
+ behavior.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw/scroll.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/9term.html"><i>9term</i>(1)</a>, <a href="../man1/acme.html"><i>acme</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Libdraw</i> expects up and down scroll wheel events to be expressed
+ as clicks of mouse buttons 4 and 5, but the XFree86 default is
+ to ignore the scroll wheel. To enable the scroll wheel, change
+ your <tt><font size=+1>InputDevice</font></tt> section of <tt><font size=+1>XF86Config&#8722;4</font></tt> to look like:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>Section &quot;InputDevice&quot;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Identifier &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Mouse0&quot;<br>
+ Driver &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;mouse&quot;<br>
+ Option &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Device&quot; &quot;/dev/psaux&quot;<br>
+ # next four lines enable scroll wheel as buttons 4 and 5<br>
+ Option &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Buttons&quot; &quot;5&quot;<br>
+ Option &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Emulate3Buttons&quot; &quot;off&quot;<br>
+ Option &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Protocol&quot; &quot;ImPS/2&quot;<br>
+ Option &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;ZAxisMapping&quot; &quot;4 5&quot;<br>
+
+ </table>
+ EndSection<br>
+ </font></tt>
+ </table>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/mp.html b/man/man3/mp.html
new file mode 100644
index 00000000..86dc7455
--- /dev/null
+++ b/man/man3/mp.html
@@ -0,0 +1,441 @@
+<head>
+<title>mp(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MP(3)</b><td align=right><b>MP(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ mpsetminbits, mpnew, mpfree, mpbits, mpnorm, mpcopy, mpassign,
+ mprand, strtomp, mpfmt,mptoa, betomp, mptobe, letomp, mptole,
+ mptoui, uitomp, mptoi, itomp, uvtomp, mptouv, vtomp, mptov, mpdigdiv,
+ mpadd, mpsub, mpleft, mpright, mpmul, mpexp, mpmod, mpdiv, mpfactorial,
+ mpcmp, mpextendedgcd,
+ mpinvert, mpsignif, mplowbits0, mpvecdigmuladd, mpvecdigmulsub,
+ mpvecadd, mpvecsub, mpveccmp, mpvecmul, mpmagcmp, mpmagadd, mpmagsub,
+ crtpre, crtin, crtout, crtprefree, crtresfree &ndash; extended precision
+ arithmetic<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mp.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mpnew(int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpfree(mpint *b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpsetminbits(int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpbits(mpint *b, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpnorm(mpint *b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mpcopy(mpint *b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpassign(mpint *old, mpint *new)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mprand(int bits, void (*gen)(uchar*, int), mpint *b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strtomp(char *buf, char **rptr, int base, mpint *b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mptoa(mpint *b, int base, char *buf, int blen)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;mpfmt(Fmt*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;betomp(uchar *buf, uint blen, mpint *b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;mptobe(mpint *b, uchar *buf, uint blen, uchar **bufp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;letomp(uchar *buf, uint blen, mpint *b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;mptole(mpint *b, uchar *buf, uint blen, uchar **bufp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uint mptoui(mpint*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uitomp(uint, mpint*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;mptoi(mpint*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;itomp(int, mpint*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtomp(vlong, mpint*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>vlong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mptov(mpint*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uvtomp(uvlong, mpint*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uvlong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mptouv(mpint*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpadd(mpint *b1, mpint *b2, mpint *sum)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpmagadd(mpint *b1, mpint *b2, mpint *sum)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpsub(mpint *b1, mpint *b2, mpint *diff)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpmagsub(mpint *b1, mpint *b2, mpint *diff)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpleft(mpint *b, int shift, mpint *res)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpright(mpint *b, int shift, mpint *res)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpmul(mpint *b1, mpint *b2, mpint *prod)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpexp(mpint *b, mpint *e, mpint *m, mpint *res)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpmod(mpint *b, mpint *m, mpint *remainder)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpdiv(mpint *dividend, mpint *divisor, &nbsp;&nbsp;&nbsp;mpint *quotient, mpint
+ *remainder)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mpfactorial(ulong n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;mpcmp(mpint *b1, mpint *b2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;mpmagcmp(mpint *b1, mpint *b2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpextendedgcd(mpint *a, mpint *b, mpint *d, mpint *x, mpint
+ *y)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpinvert(mpint *b, mpint *m, mpint *res)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;mpsignif(mpint *b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;mplowbits0(mpint *b)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpdigdiv(mpdigit *dividend, mpdigit divisor, mpdigit *quotient)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpvecadd(mpdigit *a, int alen, mpdigit *b, int blen, mpdigit
+ *sum)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpvecsub(mpdigit *a, int alen, mpdigit *b, int blen, mpdigit
+ *diff)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpvecdigmuladd(mpdigit *b, int n, mpdigit m, mpdigit *p)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;mpvecdigmulsub(mpdigit *b, int n, mpdigit m, mpdigit *p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void mpvecmul(mpdigit *a, int alen, mpdigit *b, int blen, mpdigit
+ *p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;mpveccmp(mpdigit *a, int alen, mpdigit *b, int blen)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>CRTpre* &nbsp;&nbsp;&nbsp;&nbsp;crtpre(int nfactors, mpint **factors)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>CRTres* &nbsp;&nbsp;&nbsp;&nbsp;crtin(CRTpre *crt, mpint *x)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void crtout(CRTpre *crt, CRTres *r, mpint *x)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void crtprefree(CRTpre *cre)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void crtresfree(CRTres *res)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*mpzero, *mpone, *mptwo<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines perform extended precision integer arithmetic.
+ The basic type is <tt><font size=+1>mpint</font></tt>, which points to an array of <tt><font size=+1>mpdigit</font></tt>s,
+ stored in little-endian order:<br>
+ <tt><font size=+1>typedef struct mpint mpint;<br>
+ struct mpint<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int &nbsp;&nbsp;&nbsp;sign; &nbsp;&nbsp;&nbsp;&nbsp;/* +1 or &#8722;1 */<br>
+ int &nbsp;&nbsp;&nbsp;size; &nbsp;&nbsp;&nbsp;&nbsp;/* allocated digits */<br>
+ int &nbsp;&nbsp;&nbsp;top; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* significant digits */<br>
+ mpdigit &nbsp;&nbsp;&nbsp;&nbsp;*p;<br>
+ char flags;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ The sign of 0 is +1.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The size of <tt><font size=+1>mpdigit</font></tt> is architecture-dependent and defined in <tt><font size=+1>/$cputype/include/u.h</font></tt>.
+ <tt><font size=+1>Mpint</font></tt>s are dynamically allocated and must be explicitly freed.
+ Operations grow the array of digits as needed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In general, the result parameters are last in the argument list.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Routines that return an <tt><font size=+1>mpint</font></tt> will allocate the <tt><font size=+1>mpint</font></tt> if the result
+ parameter is <tt><font size=+1>nil</font></tt>. This includes <i>strtomp</i>, <i>itomp</i>, <i>uitomp</i>, and <i>btomp</i>.
+ These functions, in addition to <i>mpnew</i> and <i>mpcopy</i>, will return
+ <tt><font size=+1>nil</font></tt> if the allocation fails.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Input and result parameters may point to the same <tt><font size=+1>mpint</font></tt>. The routines
+ check and copy where necessary.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mpnew</i> creates an <tt><font size=+1>mpint</font></tt> with an initial allocation of <i>n</i> bits. If
+ <i>n</i> is zero, the allocation will be whatever was specified in the
+ last call to <i>mpsetminbits</i> or to the initial value, 1056. <i>Mpfree</i>
+ frees an <tt><font size=+1>mpint</font></tt>. <i>Mpbits</i> grows the allocation of <i>b</i> to fit at least
+ <i>n</i> bits. If <tt><font size=+1>b&#8722;&gt;top</font></tt> doesn&#8217;t cover <i>n</i> bits it increases it to do so.
+ Unless
+ you are writing new basic operations, you can restrict yourself
+ to <tt><font size=+1>mpnew(0)</font></tt> and <tt><font size=+1>mpfree(b)</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mpnorm</i> normalizes the representation by trimming any high order
+ zero digits. All routines except <tt><font size=+1>mpbits</font></tt> return normalized results.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mpcopy</i> creates a new <tt><font size=+1>mpint</font></tt> with the same value as <i>b</i> while <i>mpassign</i>
+ sets the value of <i>new</i> to be that of <i>old</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mprand</i> creates an <i>n</i> bit random number using the generator <i>gen</i>.
+ <i>Gen</i> takes a pointer to a string of uchar&#8217;s and the number to fill
+ in.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strtomp</i> and <i>mptoa</i> convert between ASCII and <tt><font size=+1>mpint</font></tt> representations
+ using the base indicated. Only the bases 10, 16, 32, and 64 are
+ supported. Anything else defaults to 16. <i>Strtomp</i> skips any leading
+ spaces or tabs. <i>Strtomp</i>&#8217;s scan stops when encountering a digit
+ not valid in the base. If <i>rptr</i> is not zero, <i>*rptr</i> is
+ set to point to the character immediately after the string converted.
+ If the parse pterminates before any digits are found, <i>strtomp</i>
+ return <tt><font size=+1>nil</font></tt>. <i>Mptoa</i> returns a pointer to the filled buffer. If the
+ parameter <i>buf</i> is <tt><font size=+1>nil</font></tt>, the buffer is allocated. <i>Mpfmt</i> can be used
+ with <a href="../man3/fmtinstall.html"><i>fmtinstall</i>(3)</a> and <a href="../man3/print.html"><i>print</i>(3)</a> to print hexadecimal
+ representations of <tt><font size=+1>mpint</font></tt>s.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mptobe</i> and <i>mptole</i> convert an <i>mpint</i> to a byte array. The former
+ creates a big endian representation, the latter a little endian
+ one. If the destination <i>buf</i> is not <tt><font size=+1>nil</font></tt>, it specifies the buffer
+ of length <i>blen</i> for the result. If the representation is less than
+ <i>blen</i> bytes, the rest of the buffer is zero filled. If <i>buf</i> is <tt><font size=+1>nil</font></tt>,
+ then a
+ buffer is allocated and a pointer to it is deposited in the location
+ pointed to by <i>bufp</i>. Sign is ignored in these conversions, i.e.,
+ the byte array version is always positive.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Betomp</i>, and <i>letomp</i> convert from a big or little endian byte array
+ at <i>buf</i> of length <i>blen</i> to an <i>mpint</i>. If <i>b</i> is not <i>nil</i>, it refers
+ to a preallocated <i>mpint</i> for the result. If <i>b</i> is <tt><font size=+1>nil</font></tt>, a new integer
+ is allocated and returned as the result.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The integer conversions are:<br>
+ <i>mptoui</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;mpint</font></tt>-&gt;<tt><font size=+1>unsigned int<br>
+ </font></tt><i>uitomp</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;unsigned int</font></tt>-&gt;<tt><font size=+1>mpint<br>
+ </font></tt><i>mptoi</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mpint</font></tt>-&gt;<tt><font size=+1>int<br>
+ </font></tt><i>itomp</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int</font></tt>-&gt;<tt><font size=+1>mpint<br>
+ </font></tt><i>mptouv</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;mpint</font></tt>-&gt;<tt><font size=+1>unsigned vlong<br>
+ </font></tt><i>uvtomp</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;unsigned vlong</font></tt>-&gt;<tt><font size=+1>mpint<br>
+ </font></tt><i>mptov</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mpint</font></tt>-&gt;<tt><font size=+1>vlong<br>
+ </font></tt><i>vtomp</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vlong</font></tt>-&gt;<tt><font size=+1>mpint
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ When converting to the base integer types, if the integer is too
+ large, the largest integer of the appropriate sign and size is
+ returned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The mathematical functions are:<br>
+ <i>mpadd</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sum = b1 + b2</font></tt>.<br>
+ <i>mpmagadd</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;sum = abs(b1) + abs(b2)</font></tt>.<br>
+ <i>mpsub</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;diff = b1 &#8722; b2</font></tt>.<br>
+ <i>mpmagsub</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;diff = abs(b1) &#8722; abs(b2)</font></tt>.<br>
+ <i>mpleft</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res = b&lt;&lt;shift</font></tt>.<br>
+ <i>mpright</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res = b&gt;&gt;shift</font></tt>.<br>
+ <i>mpmul</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prod = b1*b2</font></tt>.<br>
+ <i>mpexp</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if <i>m</i> is nil, <tt><font size=+1>res = b**e</font></tt>. Otherwise, <tt><font size=+1>res = b**e mod m</font></tt>.<br>
+ <i>mpmod</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;remainder = b % m</font></tt>.<br>
+ <i>mpdiv</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quotient = dividend/divisor</font></tt>. <tt><font size=+1>remainder = dividend % divisor</font></tt>.<br>
+ <i>mpfactorial</i>&nbsp;&nbsp;&nbsp;returns factorial of <i>n</i>.<br>
+ <i>mpcmp</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns -1, 0, or +1 as <i>b1</i> is less than, equal to, or greater
+ than <i>b2</i>.<br>
+ <i>mpmagcmp</i>&nbsp;&nbsp;&nbsp;the same as <i>mpcmp</i> but ignores the sign and just compares
+ magnitudes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mpextendedgcd</i> computes the greatest common denominator, <i>d</i>, of
+ <i>a</i> and <i>b</i>. It also computes <i>x</i> and <i>y</i> such that <tt><font size=+1>a*x + b*y = d</font></tt>. Both
+ <i>a</i> and <i>b</i> are required to be positive. If called with negative arguments,
+ it will return a gcd of 0.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mpinverse</i> computes the multiplicative inverse of <i>b</i> <tt><font size=+1>mod</font></tt> <i>m</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mpsignif</i> returns the bit offset of the left most 1 bit in <i>b</i>. <i>Mplowbits0</i>
+ returns the bit offset of the right most 1 bit. For example, for
+ 0x14, <i>mpsignif</i> would return 4 and <i>mplowbits0</i> would return 2.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The remaining routines all work on arrays of <tt><font size=+1>mpdigit</font></tt> rather than
+ <tt><font size=+1>mpint</font></tt>&#8217;s. They are the basis of all the other routines. They are
+ separated out to allow them to be rewritten in assembler for each
+ architecture. There is also a portable C version for each one.<br>
+ <i>mpdigdiv</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quotient = dividend[0:1] / divisor</font></tt>.<br>
+ <i>mpvecadd</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sum[0:alen] = a[0:alen&#8722;1] + b[0:blen&#8722;1]</font></tt>. We assume alen
+ &gt;= blen and that sum has room for alen+1 digits.<br>
+ <i>mpvecsub</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;diff[0:alen&#8722;1] = a[0:alen&#8722;1] &#8722; b[0:blen&#8722;1]</font></tt>. We assume
+ that alen &gt;= blen and that diff has room for alen digits.<br>
+ <i>mpvecdigmuladd</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p[0:n] += m * b[0:n&#8722;1]</font></tt>. This multiplies a an array
+ of digits times a scalar and adds it to another array. We assume
+ p has room for n+1 digits.<br>
+ <i>mpvecdigmulsub</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p[0:n] &#8722;= m * b[0:n&#8722;1]</font></tt>. This multiplies a an array
+ of digits times a scalar and subtracts it fromo another array.
+ We assume p has room for n+1 digits. It returns +1 is the result
+ is positive and -1 if negative.<br>
+ <i>mpvecmul</i><tt><font size=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p[0:alen*blen] = a[0:alen&#8722;1] * b[0:blen&#8722;1]</font></tt>. We assume
+ that p has room for alen*blen+1 digits.<br>
+ <i>mpveccmp</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This returns -1, 0, or +1 as a - b is negative, 0, or
+ positive.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>mptwo</i>, <i>mpone</i> and <i>mpzero</i> are the constants 2, 1 and 0. These cannot
+ be freed.<br>
+ <p><font size=+1><b>Chinese remainder theorem </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When computing in a non-prime modulus, <i>n,</i> it is possible to perform
+ the computations on the residues modulo the prime factors of <i>n</i>
+ instead. Since these numbers are smaller, multiplication and exponentiation
+ can be much faster.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Crtin</i> computes the residues of <i>x</i> and returns them in a newly allocated
+ structure:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct CRTres &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CRTres; <br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int &nbsp;&nbsp;&nbsp;n; &nbsp;&nbsp;&nbsp;&nbsp;// number of residues<br>
+ mpint &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*r[n]; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// residues<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <i>Crtout</i> takes a residue representation of a number and converts
+ it back into the number. It also frees the residue structure.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Crepre</i> saves a copy of the factors and precomputes the constants
+ necessary for converting the residue form back into a number modulo
+ the product of the factors. It returns a newly allocated structure
+ containing values.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Crtprefree</i> and <i>crtresfree</i> free <i>CRTpre</i> and <i>CRTres</i> structures respectively.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libmp<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/muldiv.html b/man/man3/muldiv.html
new file mode 100644
index 00000000..486020ca
--- /dev/null
+++ b/man/man3/muldiv.html
@@ -0,0 +1,61 @@
+<head>
+<title>muldiv(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MULDIV(3)</b><td align=right><b>MULDIV(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ muldiv, umuldiv &ndash; high-precision multiplication and division<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;muldiv(long a, long b, long c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong umuldiv(ulong a, ulong b, ulong c)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Muldiv</i> returns <tt><font size=+1>a*b/c</font></tt>, using a <tt><font size=+1>vlong</font></tt> to hold the intermediate result.
+ <i>Umuldiv</i> is the equivalent for unsigned integers. They can be used
+ to scale integer values without worry about overflowing the intermediate
+ result.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ On some architectures, these routines can generate a trap if the
+ final result does not fit in a <tt><font size=+1>long</font></tt> or <tt><font size=+1>ulong</font></tt>; on others they will
+ silently truncate.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/mux.html b/man/man3/mux.html
new file mode 100644
index 00000000..e3e7e4c8
--- /dev/null
+++ b/man/man3/mux.html
@@ -0,0 +1,169 @@
+<head>
+<title>mux(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MUX(3)</b><td align=right><b>MUX(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Mux, muxinit, muxrpc, muxthreads &ndash; protocol multiplexor<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;mux.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ struct Mux<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uint mintag;<br>
+ uint maxtag;<br>
+ int (*settag)(Mux *mux, void *msg, uint tag);<br>
+ int (*gettag)(Mux *mux, void *msg);<br>
+ int (*send)(Mux *mux, void *msg);<br>
+ void *(*recv)(Mux *mux);<br>
+ void *aux;<br>
+ ... /* private fields follow */<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;muxinit(Mux *mux);<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void* muxrpc(Mux *mux, void *request);<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;muxprocs(Mux *mux);<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Libmux</i> is a generic protocol multiplexor. A client program initializes
+ a <tt><font size=+1>Mux</font></tt> structure with information about the protocol (mainly in
+ the form of helper functions) and can then use <i>muxrpc</i> to execute
+ individual RPCs without worrying about details of multiplexing
+ requests and demultiplexing responses.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Libmux</i> assumes that the protocol messages contain a <i>tag</i> (or message
+ ID) field that exists for the sole purpose of demultiplexing messages.
+ <i>Libmux</i> chooses the tags and then calls a helper function to put
+ them in the outgoing messages. <i>Libmux</i> calls another helper function
+ to retrieve tags from incoming messages.
+ It also calls helper functions to send and receive packets.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A client should allocate a <tt><font size=+1>Mux</font></tt> structure and then call <i>muxinit</i>
+ to initialize the library&#8217;s private elements. The client must
+ initialize the following elements:<br>
+ <i>mintag</i>, <i>maxtag<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The range of valid tags; <i>maxtag</i> is the maximum valid tag plus
+ one, so that <i>maxtag</i>&ndash;<i>mintag</i> is equal to the number of valid tags.
+ If <i>libmux</i> runs out of tags (all tags are being used for RPCs currently
+ in progress), a new call to <i>muxrpc</i> will block until an executing
+ call finishes.<br>
+
+ </table>
+ <i>settag</i>, <i>gettag<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Set or get the tag value in a message.<br>
+
+ </table>
+ <i>send</i>, <i>recv<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Send or receive protocol messages on the connection. <i>Recv</i> should
+ block until a message is available and should return nil if the
+ connection is closed. <i>Libmux</i> will arrange that only one call to
+ <i>recv</i> is active at a time.<br>
+
+ </table>
+ <i>aux</i>&nbsp;&nbsp;&nbsp;An auxiliary pointer for use by the client. Once a client has
+ initialized the <tt><font size=+1>Mux</font></tt> structure, it can call <i>muxrpc</i> to execute RPCs.
+ The <i>request</i> is the message passed to <i>settag</i> and <i>send</i>. The return
+ value is the response packet, as provided by <i>recv</i>, or nil if an
+ error occurred. <i>Muxprocs</i> allocates new procs (see
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/thread.html"><i>thread</i>(3)</a>) in which to run <i>send</i> and <i>recv</i>. After a call to <i>muxprocs</i>,
+ <i>muxrpc</i> will run <i>send</i> and <i>recv</i> in these procs instead of in the
+ calling proc. This is useful if the implementation of either (particularly
+ <i>recv</i>) blocks an entire proc and there are other threads in the
+ calling proc that need to remain active.
+
+ </table>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ See <tt><font size=+1>/usr/local/plan9/src/lib9pclient/fs.c</font></tt> for an example of using
+ <i>libmux</i> with 9P (see <i>intro</i>(9p)).<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libmux<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/thread.html"><i>thread</i>(3)</a>, <i>intro</i>(9p)<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Libmux</i> does not know how to free protocol messages, so message
+ arriving with unexpected or invalid tags are leaked.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Using <i>mintag</i> other than zero is not well tested and probably buggy.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/nan.html b/man/man3/nan.html
new file mode 100644
index 00000000..e644116b
--- /dev/null
+++ b/man/man3/nan.html
@@ -0,0 +1,79 @@
+<head>
+<title>nan(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>NAN(3)</b><td align=right><b>NAN(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ NaN, Inf, isNaN, isInf &ndash; not-a-number and infinity functions<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double NaN(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double Inf(int)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isNaN(double)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;isInf(double, int)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The IEEE floating point standard defines values called &#8216;not-a-number&#8217;
+ and positive and negative &#8216;infinity&#8217;. These values can be produced
+ by such things as overflow and division by zero. Also, the library
+ functions sometimes return them when the arguments are not in
+ the domain, or the result is out of range.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>NaN</i> returns a double that is not-a-number. <i>IsNaN</i> returns true
+ if its argument is not-a-number.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Inf</i>(<i>i</i>) returns positive infinity if <i>i</i> is greater than or equal
+ to zero, else negative infinity. <i>IsInf</i> returns true if its first
+ argument is infinity with the same sign as the second argument.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/nan.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/needstack.html b/man/man3/needstack.html
new file mode 100644
index 00000000..bba5fbe8
--- /dev/null
+++ b/man/man3/needstack.html
@@ -0,0 +1,98 @@
+<head>
+<title>needstack(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>NEEDSTACK(3)</b><td align=right><b>NEEDSTACK(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ needstack &ndash; check for execution stack overflow<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;needstack(int n)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Stack overflow in the thread library leads to bugs that are difficult
+ to diagnose. The Plan 9 libraries are careful about not allocating
+ large structures on the stack, so typically four or eight kilobytes
+ is plenty of stack for a thread. Other libraries are not always
+ as careful. Calling <i>needstack</i> indicates to the thread library
+ that an external routine is about to be called that will require
+ <i>n</i> bytes of stack space. If there is not enough space left on the
+ stack, the thread library prints an error and terminates the program.
+ The call <tt><font size=+1>needstack(0)</font></tt> can be used to check whether the stack is
+ currently overflowed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Needstack</i> is defined in <tt><font size=+1>libc.h</font></tt> so that library functions used
+ in threaded and non-threaded contexts can call it. The implementation
+ of <i>needstack</i> in <tt><font size=+1>lib9</font></tt> is a no-op.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Needstack</i> should be thought of as a comment checked at run time,
+ like <a href="../man3/assert.html"><i>assert</i>(3)</a>.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The X Window library implementation of <i>XLookupString</i> allocates
+ some very large buffers on the stack, so <tt><font size=+1>/usr/local/plan9/src/libdraw/x11&#8722;itrans.c</font></tt>
+ calls <tt><font size=+1>needstack(20*1024)</font></tt> before making calls to <i>XLookupString</i>.
+ If a thread (in this case, the keyboard-reading thread used inside
+ the <a href="../man3/draw.html"><i>draw</i>(3)</a>
+ library) does not allocate a large enough stack, the problem is
+ diagnosed immediately rather than left to corrupt memory.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/needstack.c<br>
+ /usr/local/plan9/src/libthread<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/thread.html"><i>thread</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/notify.html b/man/man3/notify.html
new file mode 100644
index 00000000..9899e701
--- /dev/null
+++ b/man/man3/notify.html
@@ -0,0 +1,183 @@
+<head>
+<title>notify(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>NOTIFY(3)</b><td align=right><b>NOTIFY(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ notify, noted, atnotify, noteenable, notedisable, notifyon, notifyoff
+ &ndash; handle asynchronous process notification<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int notify(void (*f)(void*, char*))
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int noted(int v)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int atnotify(int (*f)(void*, char*), int in)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int noteenable(char *msg)<br>
+ int notedisable(char *msg)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int notifyon(char *msg)<br>
+ int notifyoff(char *msg)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ When a process raises an exceptional condition such as dividing
+ by zero or writing on a closed pipe, a <i>note</i> is posted to communicate
+ the exception. A note may also be posted by another process via
+ <a href="../man3/postnote.html"><i>postnote</i>(3)</a>. On Unix, notes are implemented as signals.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When a note is received, the action taken depends on the note.
+ See <a href="../man7/signal.html"><i>signal</i>(7)</a> for the full description of the defaults.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The default actions may be overridden. The <i>notify</i> function registers
+ a <i>notification handler</i> to be called within the process when a
+ note is received. The argument to <i>notify</i> replaces the previous
+ handler, if any. An argument of zero cancels a previous handler,
+ restoring the default action. A <a href="../man2/fork.html"><i>fork</i>(2)</a> system call leaves the
+ handler registered in both the parent and the child; <a href="../man3/exec.html"><i>exec</i>(3)</a> restores
+ the default behavior. Handlers may not perform floating point
+ operations.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ After a note is posted, the handler is called with two arguments:
+ the first is unimplemented and should not be used (on Plan 9 it
+ is a <tt><font size=+1>Ureg</font></tt> structure giving the current values of registers); the
+ second is a pointer to the note itself, a null-terminated string.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A notification handler must finish either by exiting the program
+ or by calling <i>noted</i>; if the handler returns the behavior is undefined
+ and probably erroneous. Until the program calls <i>noted</i>, any further
+ externally-generated notes (e.g., <tt><font size=+1>hangup</font></tt> or <tt><font size=+1>alarm</font></tt>) will be held
+ off, and any further notes generated by erroneous
+ behavior by the program (such as divide by zero) will kill the
+ program. The argument to <i>noted</i> defines the action to take: <tt><font size=+1>NDFLT</font></tt>
+ instructs the system to perform the default action as if the handler
+ had never been registered; <tt><font size=+1>NCONT</font></tt> instructs the system to resume
+ the process at the point it was notified. In neither case
+ does <i>noted</i> return to the handler. If the note interrupted an incomplete
+ system call, that call returns an error (with error string <tt><font size=+1>interrupted</font></tt>)
+ after the process resumes. A notification handler can also jump
+ out to an environment set up with <i>setjmp</i> using the <i>notejmp</i> function
+ (see <a href="../man3/setjmp.html"><i>setjmp</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Unix provides a fixed set of notes (typically there are 32) called
+ <i>signals</i>. It also allows a process to block certain notes from
+ being delivered (see <a href="../man2/sigprocmask.html"><i>sigprocmask</i>(2)</a>) and to ignore certain notes
+ by setting the signal hander to the special value <tt><font size=+1>SIG_IGN</font></tt> (see
+ <a href="../man2/signal.html"><i>signal</i>(2)</a>). <i>Noteenable</i> and <i>notedisable</i> enable or disable receipt
+ of
+ a particular note by changing the current process&#8217;s blocked signal
+ mask. Receipt of a disabled note will be postponed until it is
+ reenabled. <i>Notifyon</i> and <i>notifyoff</i> enable or disable whether the
+ notification handler is called upon receipt of the note; if the
+ handler is not called, the note is discarded.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Regardless of the origin of the note or the presence of a handler,
+ if the process is being debugged (see <a href="../man2/ptrace.html"><i>ptrace</i>(2)</a>) the arrival of
+ a note puts the process in the <tt><font size=+1>Stopped</font></tt> state and awakens the debugger.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Rather than using the system calls <i>notify</i> and <i>noted</i>, most programs
+ should use <i>atnotify</i> to register notification handlers. The parameter
+ <i>in</i> is non-zero to register the function <i>f</i>, and zero to cancel
+ registration. A handler must return a non-zero number if the note
+ was recognized (and resolved); otherwise it must return
+ zero. When the system posts a note to the process, each handler
+ registered with <i>atnotify</i> is called with arguments as described
+ above until one of the handlers returns non-zero. Then <i>noted</i> is
+ called with argument <tt><font size=+1>NCONT</font></tt>. If no registered function returns
+ non-zero, <i>atnotify</i> calls <i>noted</i> with argument <tt><font size=+1>NDFLT</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The set of notes a process may receive is system-dependent, but
+ there is a common set that includes:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Note &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Meaning &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unix signal<br>
+ </i><tt><font size=+1>interrupt </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;user interrupt (DEL key) &nbsp;&nbsp;&nbsp;&nbsp;SIGINTR<br>
+ <tt><font size=+1>hangup </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I/O connection closed &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SIGHUP<br>
+ <tt><font size=+1>alarm </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alarm expired &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SIGLARM<br>
+ <tt><font size=+1>quit </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;quit from keyboard &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SIGQUIT<br>
+ <tt><font size=+1>kill </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;process requested to exit &nbsp;&nbsp;&nbsp;SIGTERM<br>
+ <tt><font size=+1>sys: kill </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;process forced to exit &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SIGKILL<br>
+ <tt><font size=+1>sys: bus error </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bus error &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SIGBUS<br>
+ <tt><font size=+1>sys: segmentation violation </font></tt>&nbsp;&nbsp;&nbsp;segmentation violation &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SIGSEGV<br>
+ <tt><font size=+1>sys: write on closed pipe </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;write on closed pipe &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SIGPIPE<br>
+ <tt><font size=+1>sys: child </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;child wait status change &nbsp;&nbsp;&nbsp;&nbsp;SIGCHLD<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ See <tt><font size=+1>/usr/local/plan9/src/lib9/await.c</font></tt> (sic) for the full list.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The notes prefixed <tt><font size=+1>sys:</font></tt> are usually generated by the operating
+ system.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/notify.c<br>
+ /usr/local/plan9/src/lib9/atnotify.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a>, <i>notejmp</i> in <a href="../man3/setjmp.html"><i>setjmp</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/open.html b/man/man3/open.html
new file mode 100644
index 00000000..64f85c55
--- /dev/null
+++ b/man/man3/open.html
@@ -0,0 +1,130 @@
+<head>
+<title>open(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>OPEN(3)</b><td align=right><b>OPEN(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ open, create, close &ndash; open a file for reading or writing, create
+ file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int open(char *file, int omode)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int create(char *file, int omode, ulong perm)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int close(int fd)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Open</i> opens the <i>file</i> for I/O and returns an associated file descriptor.
+ <i>Omode</i> is one of <tt><font size=+1>OREAD</font></tt>, <tt><font size=+1>OWRITE</font></tt>, <tt><font size=+1>ORDWR</font></tt>, or <tt><font size=+1>OEXEC</font></tt>, asking for permission
+ to read, write, read and write, or execute, respectively. In addition,
+ there are three values that can be ORed with the <i>omode</i>: <tt><font size=+1>OTRUNC</font></tt>
+ says to truncate the file to zero length
+ before opening it; <tt><font size=+1>OCEXEC</font></tt> says to close the file when an <a href="../man3/exec.html"><i>exec</i>(3)</a>
+ or <i>execl</i> system call is made; and <tt><font size=+1>ORCLOSE</font></tt> says to remove the file
+ when it is closed (by everyone who has a copy of the file descriptor).
+ <i>Open</i> fails if the file does not exist or the user does not have
+ permission to open it for the requested purpose (see
+ <a href="../man3/stat.html"><i>stat</i>(3)</a> for a description of permissions). The user must have
+ write permission on the <i>file</i> if the <tt><font size=+1>OTRUNC</font></tt> bit is set. For the
+ <i>open</i> system call (unlike the implicit <i>open</i> in <a href="../man3/exec.html"><i>exec</i>(3)</a>), <tt><font size=+1>OEXEC</font></tt>
+ is actually identical to <tt><font size=+1>OREAD</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Create</i> creates a new <i>file</i> or prepares to rewrite an existing <i>file</i>,
+ opens it according to <i>omode</i> (as described for <i>open</i>), and returns
+ an associated file descriptor. If the file is new, the owner is
+ set to the userid of the creating process group; the group to
+ that of the containing directory; the permissions to <i>perm</i> ANDed
+ with
+ the permissions of the containing directory. If the file already
+ exists, it is truncated to 0 length, and the permissions, owner,
+ and group remain unchanged. The created file is a directory if
+ the <tt><font size=+1>DMDIR</font></tt> bit is set in <i>perm</i>, an exclusive-use file if the <tt><font size=+1>DMEXCL</font></tt>
+ bit is set, and an append-only file if the <tt><font size=+1>DMAPPEND</font></tt> bit is set.
+ Exclusive-use files may be open for I/O by only one client at
+ a time, but the file descriptor may become invalid if no I/O is
+ done for an extended period; see <i>open</i>(9p).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Create</i> fails if the path up to the last element of <i>file</i> cannot
+ be evaluated, if the user doesn&#8217;t have write permission in the
+ final directory, if the file already exists and does not permit
+ the access defined by <i>omode</i>, of if there there are no free file
+ descriptors. In the last case, the file may be created even when
+ an error is
+ returned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Since <i>create</i> may succeed even if the file exists, a special mechanism
+ is necessary for those applications that require an atomic create
+ operation. If the <tt><font size=+1>OEXCL</font></tt> (<tt><font size=+1>0x1000</font></tt>) bit is set in the <i>mode</i> for a
+ <i>create,</i> the call succeeds only if the file does not already exist;
+ see <i>open</i>(9p) for details.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Close</i> closes the file associated with a file descriptor. Provided
+ the file descriptor is a valid open descriptor, <i>close</i> is guaranteed
+ to close it; there will be no error. Files are closed automatically
+ upon termination of a process; <i>close</i> allows the file descriptor
+ to be reused.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a>, <a href="../man3/stat.html"><i>stat</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions set <i>errstr</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/opentemp.html b/man/man3/opentemp.html
new file mode 100644
index 00000000..9ec47571
--- /dev/null
+++ b/man/man3/opentemp.html
@@ -0,0 +1,78 @@
+<head>
+<title>opentemp(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>OPENTEMP(3)</b><td align=right><b>OPENTEMP(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ opentemp &ndash; create a uniquely-named file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int opentemp(char *template)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Opentemp</i> replaces <i>template</i> by a unique file name, and returns
+ the address of the template. The template should look like a file
+ name with eleven trailing <tt><font size=+1>X</font></tt>s. The <tt><font size=+1>X</font></tt>s are replaced by a letter
+ followed by the current process id. Letters from <tt><font size=+1>a</font></tt> to <tt><font size=+1>z</font></tt> are tried
+ until the name of a file that does not yet exist (see <a href="../man2/access.html"><i>access</i>(2)</a>)
+ is
+ generated. <i>Opentemp</i> then creates the file for reading and writing
+ and returns the file descriptor.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If no such name can be generated, <i>opentemp</i> returns &ndash;1.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Opentemp</i> avoids races. Two simultaneous calls to <i>opentemp</i> will
+ never return the same name.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/opentemp.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>create</i> in <a href="../man3/open.html"><i>open</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/pipe.html b/man/man3/pipe.html
new file mode 100644
index 00000000..b087ae8b
--- /dev/null
+++ b/man/man3/pipe.html
@@ -0,0 +1,111 @@
+<head>
+<title>pipe(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PIPE(3)</b><td align=right><b>PIPE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ pipe &ndash; create an interprocess channel<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int pipe(int fd[2])<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Pipe</i> creates a buffered channel for interprocess I/O communication.
+ Two file descriptors are returned in <i>fd</i>. Data written to <tt><font size=+1>fd[1]</font></tt>
+ is available for reading from <tt><font size=+1>fd[0]</font></tt> and data written to <tt><font size=+1>fd[0]</font></tt>
+ is available for reading from <tt><font size=+1>fd[1]</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ After the pipe has been established, cooperating processes created
+ by subsequent <a href="../man2/fork.html"><i>fork</i>(2)</a> calls may pass data through the pipe with
+ <i>read</i> and <i>write</i> calls.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When all the data has been read from a pipe and the writer has
+ closed the pipe or exited, <a href="../man3/read.html"><i>read</i>(3)</a> will return 0 bytes. Writes
+ to a pipe with no reader will generate a note <tt><font size=+1>sys: write on closed
+ pipe</font></tt>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/pipe.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a>, <a href="../man3/read.html"><i>read</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Sets <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If a read or a write of a pipe is interrupted, some unknown number
+ of bytes may have been transferred.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Pipe</i> is a macro defined as <i>p9pipe</i> to avoid name conflicts with
+ Unix&#8217;s <i>pipe</i> system call.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Unix pipes are not guaranteed to be bidirectional. In order to
+ ensure a bidirectional channel, <i>p9pipe</i> creates Unix domain sockets
+ via the <a href="../man2/socketpair.html"><i>socketpair</i>(2)</a> instead of Unix pipes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The implementation of pipes as Unix domain sockets causes problems
+ with some Unix implementations of <tt><font size=+1>/dev/fd</font></tt>, Unix&#8217;s dup device.
+ If a Unix domain socket is open as file descriptor 0, some implementations
+ disallow the opening of <tt><font size=+1>/dev/fd/0</font></tt>; instead one must <a href="../man2/connect.html"><i>connect</i>(2)</a>
+ to it. If this functionality is important
+ (as it is for <a href="../man1/rc.html"><i>rc</i>(1)</a>), one must <tt><font size=+1>#undef pipe</font></tt> and fall back on the
+ (possibly unidirectional) Unix pipes.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/plumb.html b/man/man3/plumb.html
new file mode 100644
index 00000000..d7649698
--- /dev/null
+++ b/man/man3/plumb.html
@@ -0,0 +1,257 @@
+<head>
+<title>plumb(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PLUMB(3)</b><td align=right><b>PLUMB(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ eplumb, plumbfree, plumbopen, plumbopenfid, plumbsend, plumbsendtofid,
+ plumbsendtext, plumblookup, plumbpack, plumbpackattr, plumbaddattr,
+ plumbdelattr, plumbrecv, plumbrecvfid, plumbunpack, plumbunpackpartial,
+ plumbunpackattr, Plumbmsg &ndash; plumb messages<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;plumb.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;plumbopen(char *port, int omode)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;plumbsend(int fd, Plumbmsg *m)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;plumbsendtext(int fd, char *src, char *dst, char *wdir, char
+ *data)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;plumbfree(Plumbmsg *m)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Plumbmsg* &nbsp;&nbsp;&nbsp;plumbrecv(int fd)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;plumbpack(Plumbmsg *m, int *np)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Plumbmsg* &nbsp;&nbsp;&nbsp;plumbunpack(char *buf, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Plumbmsg* &nbsp;&nbsp;&nbsp;plumbunpackpartial(char *buf, int n, int *morep)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;plumbpackattr(Plumbattr *a)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Plumbattr* plumbunpackattr(char *a)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;plumblookup(Plumbattr *a, char *name)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Plumbattr* plumbaddattr(Plumbattr *a, Plumbattr *new)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Plumbattr* plumbdelattr(Plumbattra *a, char *name)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eplumb(int key, char *port)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;9pclient.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>CFid &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*plumbopenfid(char *port, int omode)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Plumbmsg* &nbsp;&nbsp;&nbsp;plumbrecvfid(CFid *fid)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;plumbsendtofid(CFid *fid, Plumbmsg *m)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines manipulate <a href="../man7/plumb.html"><i>plumb</i>(7)</a> messages, transmitting them,
+ receiving them, and converting them between text and these data
+ structures:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef<br>
+ struct Plumbmsg<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*src;<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*dst;<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*wdir;<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*type;<br>
+ Plumbattr *attr;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ndata;<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*data;<br>
+
+ </table>
+ } Plumbmsg;<br>
+ typedef<br>
+ struct Plumbattr<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*name;<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*value;<br>
+ Plumbattr *next;<br>
+
+ </table>
+ } Plumbattr;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <i>Plumbopen</i> opens the named plumb <i>port</i>, using <a href="../man3/open.html"><i>open</i>(3)</a> mode <i>omode</i>.
+ If <i>port</i> begins with a slash, it is taken as a literal file name;
+ otherwise <i>plumbopen</i> searches for the location of the <a href="../man4/plumber.html"><i>plumber</i>(4)</a>
+ service and opens the port there.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For programs using the <a href="../man3/event.html"><i>event</i>(3)</a> interface, <i>eplumb</i> registers, using
+ the given <i>key</i>, receipt of messages from the named <i>port</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Plumbsend</i> formats and writes message <i>m</i> to the file descriptor
+ <i>fd</i>, which will usually be the result of <tt><font size=+1>plumbopen(&quot;send&quot;, OWRITE)</font></tt>.
+ <i>Plumbsendtext</i> is a simplified version for text-only messages;
+ it assumes <tt><font size=+1>type</font></tt> is <tt><font size=+1>text</font></tt>, sets <tt><font size=+1>attr</font></tt> to nil, and sets <tt><font size=+1>ndata</font></tt> to <tt><font size=+1>strlen(</font></tt><i>data</i><tt><font size=+1>)</font></tt>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Plumbfree</i> frees all the data associated with the message <i>m</i>, all
+ the components of which must therefore have been allocated with
+ <a href="../man3/malloc.html"><i>malloc</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Plumbrecv</i> returns the next message available on the file descriptor
+ <i>fd</i>, or nil for error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Plumbpack</i> encodes message <i>m</i> as a character string in the format
+ of <a href="../man7/plumb.html"><i>plumb</i>(7)</a><i>,</i> setting <tt><font size=+1>*</font></tt><i>np</i> to the length in bytes of the string.
+ <i>Plumbunpack</i> does the inverse, translating the <i>n</i> bytes of <i>buf</i> into
+ a <tt><font size=+1>Plumbmsg</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Plumbunpackpartial</i> enables unpacking of messages that arrive in
+ pieces. The first call to <i>plumbunpackpartial</i> for a given message
+ must be sufficient to unpack the header; subsequent calls permit
+ unpacking messages with long data sections. For each call, <i>buf</i>
+ points to the beginning of the complete message received
+ so far, and <i>n</i> reports the total number of bytes received for that
+ message. If the message is complete, the return value will be
+ as in <i>plumbunpack</i>. If not, and <i>morep</i> is not null, the return value
+ will be <tt><font size=+1>nil</font></tt> and <tt><font size=+1>*</font></tt>morep will be set to the number of bytes remaining
+ to be read for this message to be complete (recall that
+ the byte count is in the header). Those bytes should be read by
+ the caller, placed at location <i>buf</i><tt><font size=+1>+</font></tt><i>n</i>, and the message unpacked
+ again. If an error is encountered, the return value will be <tt><font size=+1>nil</font></tt>
+ and <tt><font size=+1>*</font></tt><i>morep</i> will be zero.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Plumbpackattr</i> converts the list <i>a</i> of <tt><font size=+1>Plumbattr</font></tt> structures into
+ a null-terminated string. If an attribute value contains white
+ space, quote characters, or equal signs, the value will be quoted
+ appropriately. A newline character will terminate processing.
+ <i>Plumbunpackattr</i> converts the null-terminated string <i>a</i> back into
+ a list of <i>Plumbattr</i> structures.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Plumblookup</i> searches the <tt><font size=+1>Plumbattr</font></tt> list <i>a</i> for an attribute with
+ the given <i>name</i> and returns the associated value. The returned
+ string is the original value, not a copy. If the attribute has
+ no value, the returned value will be the empty string; if the
+ attribute does not occur in the list at all, the value will be
+ nil.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Plumbaddattr</i> appends the <i>new</i> <tt><font size=+1>Plumbattr</font></tt> (which may be a list) to
+ the attribute list <i>a</i> and returns the new list. <i>Plumbattr</i> searches
+ the list <i>a</i> for the first attribute with name <i>name</i> and deletes
+ it from the list, returning the resulting list. <i>Plumbdelattr</i> is
+ a no-op if no such attribute exists.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The file descriptor returned by <i>plumbopen</i> is created with <i>fsopenfd</i>
+ (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>), which masks information about read and write
+ errors. This is acceptable for use in <i>plumbrecv</i> but not for <i>plumbsend</i>,
+ which depends on seeing details of write errors. <i>Plumbopenfid</i>,
+ <i>plumbrecvfid</i>, and <i>plumbsendtofid</i> provide an
+ explicit interface to <i>lib9pclient</i> that preserves the exact error
+ details.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libplumb<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/plumb.html"><i>plumb</i>(1)</a>, <a href="../man3/event.html"><i>event</i>(3)</a>, <a href="../man4/plumber.html"><i>plumber</i>(4)</a>, <a href="../man7/plumb.html"><i>plumb</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ When appropriate, including when a <i>plumbsend</i> fails, these routine
+ set <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To avoid rewriting clients that use <i>plumbsend</i>, the call <tt><font size=+1>plumbopen(&quot;send&quot;,
+ OWRITE)</font></tt> returns a useless file descriptor (it is opened to <tt><font size=+1>/dev/null</font></tt>).
+ <i>Plumbsend</i> looks for this particular file descriptor and uses a
+ static copy of the <tt><font size=+1>CFid</font></tt> instead.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/post9pservice.html b/man/man3/post9pservice.html
new file mode 100644
index 00000000..62238d0d
--- /dev/null
+++ b/man/man3/post9pservice.html
@@ -0,0 +1,67 @@
+<head>
+<title>post9pservice(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>POST9PSERVICE(3)</b><td align=right><b>POST9PSERVICE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ post9pservice &ndash; post 9P service for use by clients<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int post9pservice(int fd, char *name)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Post9pservice</i> invokes <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a> to post a new 9P service in the
+ current &#8220;name space&#8221; (see <a href="../man4/intro.html"><i>intro</i>(4)</a>) named <i>name</i>. Clients connecting
+ to the posted service are multiplexed onto a single 9P conversation
+ with the server on file descriptor <i>fd</i>.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man4/intro.html"><i>intro</i>(4)</a>, <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a><br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/post9p.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/postnote.html b/man/man3/postnote.html
new file mode 100644
index 00000000..b08507e5
--- /dev/null
+++ b/man/man3/postnote.html
@@ -0,0 +1,80 @@
+<head>
+<title>postnote(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>POSTNOTE(3)</b><td align=right><b>POSTNOTE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ postnote &ndash; send a note to a process or process group<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;postnote(int who, int pid, char *note)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Postnote</i> sends a note to a process or process group. If <i>who</i> is
+ <tt><font size=+1>PNPROC</font></tt>, then <i>note</i> is sent to the process with id <i>pid</i>. If <i>who</i> is
+ <tt><font size=+1>PNGROUP</font></tt><i>,</i> the note is delivered to the process group which has
+ the process with id <i>pid</i> as a member. For <tt><font size=+1>PNGROUP</font></tt> only, if the
+ calling process is in the target group, the note is <i>not</i> delivered
+ to
+ that process.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the write is successful, zero is returned. Otherwise &ndash;1 is returned.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/postnote.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/notify.html"><i>notify</i>(3)</a>, <a href="../man3/intro.html"><i>intro</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Sets <i>errstr</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/prime.html b/man/man3/prime.html
new file mode 100644
index 00000000..abaffda0
--- /dev/null
+++ b/man/man3/prime.html
@@ -0,0 +1,114 @@
+<head>
+<title>prime(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PRIME(3)</b><td align=right><b>PRIME(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ genprime, gensafeprime, genstrongprime, DSAprimes, probably_prime,
+ smallprimetest &ndash; prime number generation<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;smallprimetest(mpint *p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;probably_prime(mpint *p, int nrep)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void genprime(mpint *p, int n, int nrep)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void gensafeprime(mpint *p, mpint *alpha, int n, int accuracy)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void genstrongprime(mpint *p, int n, int nrep)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void DSAprimes(mpint *q, mpint *p, uchar seed[SHA1dlen])<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Public key algorithms abound in prime numbers. The following routines
+ generate primes or test numbers for primality.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Smallprimetest</i> checks for divisibility by the first 10000 primes.
+ It returns 0 if <i>p</i> is not divisible by the primes and &ndash;1 if it is.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Probably_prime</i> uses the Miller-Rabin test to test <i>p</i>. It returns
+ non-zero if <i>P</i> is probably prime. The probability of it not being
+ prime is 1/4**<i>nrep</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Genprime</i> generates a random <i>n</i> bit prime. Since it uses the Miller-Rabin
+ test, <i>nrep</i> is the repetition count passed to <i>probably_prime</i>. <i>Gensafegprime</i>
+ generates an <i>n</i>-bit prime <i>p</i> and a generator <i>alpha</i> of the multiplicative
+ group of integers mod <i>p</i>; there is a prime <i>q</i> such that <i>p-1=2*q</i>.
+ <i>Genstrongprime</i> generates a
+ prime, <i>p</i>, with the following properties:<br>
+ &ndash;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<i>p</i>-1)/2 is prime. Therefore <i>p</i>-1 has a large prime factor, <i>p</i>&#8217;.<br>
+ &ndash;<i>p</i>&#8217;-1 has a large prime factor<br>
+ &ndash;<i>p</i>+1 has a large prime factor
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>DSAprimes</i> generates two primes, <i>q</i> and <i>p,</i> using the NIST recommended
+ algorithm for DSA primes. <i>q</i> divides <i>p</i>-1. The random seed used
+ is also returned, so that skeptics can later confirm the computation.
+ Be patient; this is a slow algorithm.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libsec<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/aes.html"><i>aes</i>(3)</a> <a href="../man3/blowfish.html"><i>blowfish</i>(3)</a>, <a href="../man3/des.html"><i>des</i>(3)</a>, <a href="../man3/elgamal.html"><i>elgamal</i>(3)</a>, <a href="../man3/rsa.html"><i>rsa</i>(3)</a>,<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/print.html b/man/man3/print.html
new file mode 100644
index 00000000..8640efc7
--- /dev/null
+++ b/man/man3/print.html
@@ -0,0 +1,309 @@
+<head>
+<title>print(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PRINT(3)</b><td align=right><b>PRINT(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ print, fprint, sprint, snprint, seprint, smprint, runesprint,
+ runesnprint, runeseprint, runesmprint, vfprint, vsnprint, vseprint,
+ vsmprint, runevsnprint, runevseprint, runevsmprint &ndash; print formatted
+ output<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;print(char *format, ...)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;fprint(int fd, char *format, ...)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;sprint(char *s, char *format, ...)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;snprint(char *s, int len, char *format, ...)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* seprint(char *s, char *e, char *format, ...)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* smprint(char *format, ...)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;runesprint(Rune *s, char *format, ...)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;runesnprint(Rune *s, int len, char *format, ...)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runeseprint(Rune *s, Rune *e, char *format, ...)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runesmprint(char *format, ...)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;vfprint(int fd, char *format, va_list v)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;vsnprint(char *s, int len, char *format, va_list v)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* vseprint(char *s, char *e, char *format, va_list v)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* vsmprint(char *format, va_list v)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;runevsnprint(Rune *s, int len, char *format, va_list v)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runevseprint(Rune *s, Rune *e, char *format, va_list v)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runevsmprint(Rune *format, va_list v)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Print</i> writes text to the standard output. <i>Fprint</i> writes to the
+ named output file descriptor: a buffered form is described in
+ <a href="../man3/bio.html"><i>bio</i>(3)</a>. <i>Sprint</i> places text followed by the NUL character (<tt><font size=+1>\0</font></tt>)
+ in consecutive bytes starting at <i>s</i>; it is the user&#8217;s responsibility
+ to ensure that enough storage is available. Each function returns
+ the
+ number of bytes transmitted (not including the NUL in the case
+ of <i>sprint</i>), or a negative value if an output error was encountered.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Snprint</i> is like <i>sprint</i>, but will not place more than <i>len</i> bytes
+ in <i>s</i>. Its result is always NUL-terminated and holds the maximal
+ number of complete UTF-8 characters that can fit. <i>Seprint</i> is like
+ <i>snprint</i>, except that the end is indicated by a pointer <i>e</i> rather
+ than a count and the return value points to the terminating NUL
+ of
+ the resulting string. <i>Smprint</i> is like <i>sprint</i>, except that it prints
+ into and returns a string of the required length, which is allocated
+ by <a href="../man3/malloc.html"><i>malloc</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routines <i>runesprint</i>, <i>runesnprint</i>, <i>runeseprint</i>, and <i>runesmprint</i>
+ are the same as <i>sprint</i>, <i>snprint</i>, <i>seprint</i> and <i>smprint</i> except that
+ their output is rune strings instead of byte strings.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Finally, the routines <i>vfprint</i>, <i>vsnprint</i>, <i>vseprint</i>, <i>vsmprint</i>, <i>runevsnprint</i>,
+ <i>runevseprint</i>, and <i>runevsmprint</i> are like their <tt><font size=+1>v&#8722;less</font></tt> relatives
+ except they take as arguments a <tt><font size=+1>va_list</font></tt> parameter, so they can
+ be called within a variadic function. The Example section shows
+ a representative usage.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each of these functions converts, formats, and prints its trailing
+ arguments under control of a <i>format</i> string. The format contains
+ two types of objects: plain characters, which are simply copied
+ to the output stream, and conversion specifications, each of which
+ results in fetching of zero or more arguments. The results
+ are undefined if there are arguments of the wrong type or too
+ few arguments for the format. If the format is exhausted while
+ arguments remain, the excess is ignored.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each conversion specification has the following format:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>% [flags] verb
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The verb is a single character and each flag is a single character
+ or a (decimal) numeric string. Up to two numeric strings may be
+ used; the first is called <i>width</i>, the second <i>precision</i>. A period
+ can be used to separate them, and if the period is present then
+ <i>width</i> and <i>precision</i> are taken to be zero if missing, otherwise
+ they are &#8216;omitted&#8217;. Either or both of the numbers may be replaced
+ with the character <tt><font size=+1>*</font></tt>, meaning that the actual number will be obtained
+ from the argument list as an integer. The flags and numbers are
+ arguments to the <i>verb</i> described below.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The numeric verbs <tt><font size=+1>d</font></tt>, <tt><font size=+1>o</font></tt>, <tt><font size=+1>b</font></tt>, <tt><font size=+1>x</font></tt>, and <tt><font size=+1>X</font></tt> format their arguments in
+ decimal, octal, binary, hexadecimal, and upper case hexadecimal.
+ Each interprets the flags <tt><font size=+1>0</font></tt>, <tt><font size=+1>h</font></tt>, <tt><font size=+1>hh</font></tt>, <tt><font size=+1>l</font></tt>, <tt><font size=+1>u</font></tt>, <tt><font size=+1>+</font></tt>, <tt><font size=+1>&#8722;</font></tt>, <tt><font size=+1>,</font></tt>, and <tt><font size=+1>#</font></tt> to mean
+ pad with zeros, short, byte, long, unsigned, always print a sign,
+ left justified, commas every three digits, and alternate format.
+ Also, a space character in the flag position is like <tt><font size=+1>+</font></tt>, but prints
+ a space instead of a plus sign for non-negative values. If neither
+ short nor long is specified, then the argument is an <tt><font size=+1>int</font></tt>. If unsigned
+ is specified, then the argument is interpreted as a positive number
+ and no sign is output. If two <tt><font size=+1>l</font></tt> flags are given, then
+ the argument is interpreted as a <tt><font size=+1>vlong</font></tt> (usually an 8-byte, sometimes
+ a 4-byte integer). If <i>precision</i> is not omitted, the number is
+ padded on the left with zeros until at least <i>precision</i> digits
+ appear. If <i>precision</i> is explicitly 0, and the number is 0, no
+ digits are generated, and alternate formatting does not apply.
+ Then,
+ if alternate format is specified, for <tt><font size=+1>o</font></tt> conversion, the number
+ is preceded by a <tt><font size=+1>0</font></tt> if it doesn&#8217;t already begin with one; for <tt><font size=+1>x</font></tt>
+ conversion, the number is preceded by <tt><font size=+1>0x</font></tt>; for <tt><font size=+1>X</font></tt> conversion, the
+ number is preceded by <tt><font size=+1>0X</font></tt>. Finally, if <i>width</i> is not omitted, the
+ number is padded on the left (or right, if left justification
+ is specified)
+ with enough blanks to make the field at least <i>width</i> characters
+ long.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The floating point verbs <tt><font size=+1>f</font></tt>, <tt><font size=+1>e</font></tt>, <tt><font size=+1>E</font></tt>, <tt><font size=+1>g</font></tt>, and <tt><font size=+1>G</font></tt> take a <tt><font size=+1>double</font></tt> argument.
+ Each interprets the flags <tt><font size=+1>0</font></tt>, <tt><font size=+1>L +</font></tt>, <tt><font size=+1>&#8722;</font></tt>, and <tt><font size=+1>#</font></tt> to mean pad with zeros,
+ long double argument, always print a sign, left justified, and
+ alternate format. <i>Width</i> is the minimum field width and, if the
+ converted value takes up less than <i>width</i> characters, it is
+ padded on the left (or right, if &#8216;left justified&#8217;) with spaces.
+ <i>Precision</i> is the number of digits that are converted after the
+ decimal place for <tt><font size=+1>e</font></tt>, <tt><font size=+1>E</font></tt>, and <tt><font size=+1>f</font></tt> conversions, and <i>precision</i> is the
+ maximum number of significant digits for <tt><font size=+1>g</font></tt> and <tt><font size=+1>G</font></tt> conversions.
+ The <tt><font size=+1>f</font></tt> verb produces output of the form [<tt><font size=+1>&#8722;</font></tt>]<tt><font size=+1>digits</font></tt>[<tt><font size=+1>.digits</font></tt>]. <tt><font size=+1>E
+ </font></tt>conversion appends an exponent <tt><font size=+1>E</font></tt>[<tt><font size=+1>&#8722;</font></tt>]<tt><font size=+1>digits</font></tt>, and <tt><font size=+1>e</font></tt> conversion appends
+ an exponent <tt><font size=+1>e</font></tt>[<tt><font size=+1>&#8722;</font></tt>]<tt><font size=+1>digits</font></tt>. The <tt><font size=+1>g</font></tt> verb will output the argument in
+ either <tt><font size=+1>e</font></tt> or <tt><font size=+1>f</font></tt> with the goal of producing the smallest output.
+ Also, trailing zeros are omitted from the fraction part of the
+ output, and a trailing decimal point appears only if it is
+ followed by a digit. The <tt><font size=+1>G</font></tt> verb is similar, but uses <tt><font size=+1>E</font></tt> format
+ instead of <tt><font size=+1>e</font></tt>. When alternate format is specified, the result will
+ always contain a decimal point, and for <tt><font size=+1>g</font></tt> and <tt><font size=+1>G</font></tt> conversions, trailing
+ zeros are not removed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>s</font></tt> verb copies a NUL-terminated string (pointer to <tt><font size=+1>char</font></tt>) to
+ the output. The number of characters copied (<i>n</i>) is the minimum
+ of the size of the string and <i>precision</i>. These <i>n</i> characters are
+ justified within a field of <i>width</i> characters as described above.
+ If a <i>precision</i> is given, it is safe for the string not to be nul-
+ terminated as long as it is at least <i>precision</i> characters (not
+ bytes!) long. The <tt><font size=+1>S</font></tt> verb is similar, but it interprets its pointer
+ as an array of runes (see <a href="../man7/utf.html"><i>utf</i>(7)</a>); the runes are converted to
+ UTF before output.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>c</font></tt> verb copies a single <tt><font size=+1>char</font></tt> (promoted to <tt><font size=+1>int</font></tt>) justified within
+ a field of <i>width</i> characters as described above. The <tt><font size=+1>C</font></tt> verb is
+ similar, but works on runes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>p</font></tt> verb formats a pointer value. At the moment, it is a synonym
+ for <tt><font size=+1>x</font></tt>, but that will change if pointers and integers are different
+ sizes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>r</font></tt> verb takes no arguments; it copies the error string returned
+ by a call to <a href="../man3/errstr.html"><i>errstr</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Custom verbs may be installed using <a href="../man3/fmtinstall.html"><i>fmtinstall</i>(3)</a>.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This function prints an error message with a variable number of
+ arguments and then quits.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>void fatal(char *msg, ...)<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char buf[1024], *out;<br>
+ va_list arg;<br>
+ out = seprint(buf, buf+sizeof buf, &quot;Fatal error: &quot;);<br>
+ va_start(arg, msg);<br>
+ out = vseprint(out, buf+sizeof buf, msg, arg);<br>
+ va_end(arg);<br>
+ write(2, buf, out&#8722;buf);<br>
+ exits(&quot;fatal error&quot;);<br>
+
+ </table>
+ }<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/libfmt<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/fmtinstall.html"><i>fmtinstall</i>(3)</a>, <a href="../man3/fprintf.html"><i>fprintf</i>(3)</a>, <a href="../man7/utf.html"><i>utf</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Routines that write to a file descriptor or call <i>malloc</i> set <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The formatting is close to that specified for ANSI <a href="../man3/fprintf.html"><i>fprintf</i>(3)</a>;
+ the main difference is that <tt><font size=+1>b</font></tt> and <tt><font size=+1>r</font></tt> are not in ANSI and <tt><font size=+1>u</font></tt> is a
+ flag here instead of a verb. Also, and distinctly not a bug, <i>print</i>
+ and friends generate UTF rather than ASCII.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There is no <i>runeprint</i>, <i>runefprint</i>, etc. because runes are byte-order
+ dependent and should not be written directly to a file; use the
+ UTF output of <i>print</i> or <i>fprint</i> instead. Also, <i>sprint</i> is deprecated
+ for safety reasons; use <i>snprint</i>, <i>seprint</i>, or <i>smprint</i> instead.
+ Safety also precludes the existence of <i>runesprint</i>.
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/proto.html b/man/man3/proto.html
new file mode 100644
index 00000000..59e4fccd
--- /dev/null
+++ b/man/man3/proto.html
@@ -0,0 +1,140 @@
+<head>
+<title>proto(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PROTO(3)</b><td align=right><b>PROTO(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ rdproto &ndash; parse and process a proto file listing<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;disk.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>typedef void Protoenum(char *new, char *old, Dir *d, void *a)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>typedef void Protowarn(char *msg, void *a)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int rdproto(char *proto, char *root, Protoenum *enm,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Protowarn *warn, void *a)<br>
+
+ </table>
+
+ </table>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Rdproto</i> reads and interprets the named <i>proto</i> file relative to
+ the root directory <i>root</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each line of the <i>proto</i> file specifies a file to copy. Blank lines
+ and lines beginning with <tt><font size=+1>#</font></tt> are ignored. Indentation (usually tabs)
+ is significant, with each level of indentation corresponding to
+ a level in the file tree. Fields within a line are separated by
+ white space. The first field is the last path element in the destination
+ file tree. The second field specifies the permissions. The third
+ field is the owner of the file, and the fourth is the group owning
+ the file. The fifth field is the name of the file from which to
+ copy; this file is read from the current name space, not the source
+ file tree. All fields except the first are optional. Specifying
+ <tt><font size=+1>&#8722;</font></tt> for
+ permissions, owner, or group causes <i>rdproto</i> to fetch the corresponding
+ information from the file rather than override it. (This is the
+ default behavior when the fields are not present; explicitly specifying
+ <tt><font size=+1>&#8722;</font></tt> is useful when one wishes to set, say, the file owner without
+ setting the permissions.)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Names beginning with a <tt><font size=+1>$</font></tt> are expanded as environment variables.
+ If the first file specified in a directory is <tt><font size=+1>*</font></tt>, all of the files
+ in that directory are considered listed. If the first file is
+ <tt><font size=+1>+</font></tt>, all of the files are copied, and all subdirectories are recursively
+ considered listed. All files are considered relative to <i>root</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For each file named by the <i>proto</i>, <i>enm</i> is called with <i>new</i> pointing
+ at the name of the file (without the root prefix), <i>old</i> pointing
+ at the name of the source file (with the root prefix, when applicable),
+ and <i>Dir</i> at the desired directory information for the new file.
+ Only the <tt><font size=+1>name</font></tt>, <tt><font size=+1>uid</font></tt>, <tt><font size=+1>gid</font></tt>, <tt><font size=+1>mode</font></tt>, <tt><font size=+1>mtime</font></tt>, and <tt><font size=+1>length</font></tt> fields
+ are guaranteed to be valid. The argument <i>a</i> is the same argument
+ passed to <i>rdproto</i>; typically it points at some extra state used
+ by the enumeration function.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When files or directories do not exist or cannot be read by <i>rdproto</i>,
+ it formats a warning message, calls <i>warn</i>, and continues processing;
+ if <i>warn</i> is nil, <i>rdproto</i> prints the warning message to standard
+ error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Rdproto</i> returns zero if <i>proto</i> was processed, &ndash;1 if it could not
+ be opened.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/sys/lib/sysconfig/proto/</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;directory of prototype files.<br>
+ <tt><font size=+1>/sys/lib/sysconfig/proto/portproto</font></tt>&nbsp;&nbsp;&nbsp;generic prototype file.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdisk/proto.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man8/mk9660.html"><i>mk9660</i>(8)</a>, Plan 9&#8217;s <i>mkfs</i>(8)<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/pushtls.html b/man/man3/pushtls.html
new file mode 100644
index 00000000..ee806701
--- /dev/null
+++ b/man/man3/pushtls.html
@@ -0,0 +1,261 @@
+<head>
+<title>pushtls(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PUSHTLS(3)</b><td align=right><b>PUSHTLS(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ pushtls, tlsClient, tlsServer, initThumbprints, freeThumbprints,
+ okThumbprint, readcert, readcertchain &ndash; attach TLS1 or SSL3 encryption
+ to a communication channel<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pushtls(int fd, char *hashalg, char *encalg,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int isclient, char *secret, char *dir)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>#include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tlsClient(int fd, TLSconn *conn)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tlsServer(int fd, TLSconn *conn)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*readcert(char *filename, int *pcertlen)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>PEMchain &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*readcertchain(char *filename)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Thumbprint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;initThumbprints(char *ok, char *crl)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;freeThumbprints(Thumbprint *table)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;okThumbprint(uchar *hash, Thumbprint *table)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Transport Layer Security (TLS) comprises a record layer protocol,
+ doing message digesting and encrypting in the kernel, and a handshake
+ protocol, doing initial authentication and secret creation at
+ user level and then starting a data channel in the record protocol.
+ TLS is nearly the same as SSL 3.0, and the software
+ should interoperate with implementations of either standard.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To use just the record layer, as described in Plan 9&#8217;s <i>tls</i>(3),
+ call <i>pushtls</i> to open the record layer device, connect to the communications
+ channel <i>fd</i>, and start up encryption and message authentication
+ as specified in <i>hashalg</i>, <i>encalg</i>, and <i>secret</i>. These parameters
+ must have been arranged at the two ends of the
+ conversation by other means. For example, <i>hashalg</i> could be <tt><font size=+1>sha1</font></tt>,
+ <i>encalg</i> could be <tt><font size=+1>rc4_128</font></tt>, and <i>secret</i> could be the base-64 encoding
+ of two (client-to-server and server-to-client) 20-byte digest
+ keys and two corresponding 16-byte encryption keys. <i>Pushtls</i> returns
+ a file descriptor for the TLS data channel.
+ Anything written to this descriptor will get encrypted and authenticated
+ and then written to the file descriptor, <i>fd</i>. If <i>dir</i> is non-zero,
+ the path name of the connection directory is copied into <i>dir</i>.
+ This path name is guaranteed to be less than 40 bytes long.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Alternatively, call <i>tlsClient</i> to speak the full handshake protocol,
+ negotiate the algorithms and secrets, and return a new data file
+ descriptor for the data channel. <i>Conn</i> points to a (caller-allocated)
+ struct<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct TLSconn{<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ char dir[40]; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// OUT &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;connection directory<br>
+ uchar *cert; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// IN/OUT certificate<br>
+ uchar *sessionID; // IN/OUT sessionID<br>
+ int certlen, sessionIDlen;<br>
+ void (*trace)(char*fmt, ...);<br>
+ PEMChain *chain;<br>
+
+ </table>
+ } TLSconn;<br>
+ </font></tt>
+ </table>
+ defined in <i>tls.h</i>. On input, the caller can provide options such
+ as <i>cert</i>, the local certificate, and <i>sessionID</i>, used by a client
+ to resume a previously negotiated security association. On output,
+ the connection directory is set, as with <tt><font size=+1>listen</font></tt> (see <a href="../man3/dial.html"><i>dial</i>(3)</a>).
+ The input <i>cert</i> is freed and a freshly allocated copy of the remote&#8217;s
+ certificate is returned in <i>conn</i>, to be checked by the caller according
+ to its needs. One mechanism is supplied by <i>initThumbprints</i> and
+ <i>freeThumbprints</i> which allocate and free, respectively, a table
+ of hashes from files of known trusted and revoked certificates.
+ <i>okThumbprint</i> confirms that a particular hash is in the
+ table, as computed by
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>uchar hash[SHA1dlen];<br>
+ conn = (TLSconn*)mallocz(sizeof *conn, 1);<br>
+ fd = tlsClient(fd, conn);<br>
+ sha1(conn&#8722;&gt;cert, conn&#8722;&gt;certlen, hash, nil);<br>
+ if(!okThumbprint(hash,table))<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ exits(&quot;suspect server&quot;);<br>
+
+ </table>
+ ...application begins...<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ Call <i>tlsServer</i> to perform the corresponding function on the server
+ side:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>fd = accept(lcfd, ldir);<br>
+ conn = (TLSconn*)mallocz(sizeof *conn, 1);<br>
+ conn&#8722;&gt;cert = readcert(&quot;cert.pem&quot;, &amp;conn&#8722;&gt;certlen);<br>
+ fd = tlsServer(fd, conn);<br>
+ ...application begins...<br>
+ </font></tt>
+ </table>
+ The private key corresponding to <i>cert.pem</i> should have been previously
+ loaded into factotum. (See <a href="../man3/rsa.html"><i>rsa</i>(3)</a> for more about key generation.)
+ By setting<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>conn&#8722;&gt;chain = readcertchain(&quot;intermediate&#8722;certs.pem&quot;);<br>
+ </font></tt>
+ </table>
+ the server can present extra certificate evidence to establish
+ the chain of trust to a root authority known to the client.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Conn</i> is not required for the ongoing conversation and may be freed
+ by the application whenever convenient.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/sys/lib/tls<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ thumbprints of trusted services<br>
+
+ </table>
+ <tt><font size=+1>/sys/lib/ssl<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ PEM certificate files<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libsec/port<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/dial.html"><i>dial</i>(3)</a>, <a href="../man7/thumbprint.html"><i>thumbprint</i>(7)</a>; Plan 9&#8217;s <i>factotum</i>(4) and <i>tls</i>(3)<br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ return &ndash;1 on failure.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Pushtls</i> is not implemented.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Client certificates and client sessionIDs are not yet implemented.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Note that in the TLS protocol <i>sessionID</i> itself is public; it is
+ used as a pointer to secrets stored in factotum.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/qball.html b/man/man3/qball.html
new file mode 100644
index 00000000..b1403336
--- /dev/null
+++ b/man/man3/qball.html
@@ -0,0 +1,111 @@
+<head>
+<title>qball(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>QBALL(3)</b><td align=right><b>QBALL(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ qball &ndash; 3-d rotation controller<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;draw.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;geometry.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void qball(Rectangle r, Mouse *mousep,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Quaternion *orientation,<br>
+ void (*redraw)(void), Quaternion *ap)<br>
+
+ </table>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Qball</i> is an interactive controller that allows arbitrary 3-space
+ rotations to be specified with the mouse. Imagine a sphere with
+ its center at the midpoint of rectangle <i>r</i>, and diameter the smaller
+ of <i>r</i>&#8217;s dimensions. Dragging from one point on the sphere to another
+ specifies the endpoints of a great-circle arc. (Mouse
+ points outside the sphere are projected to the nearest point on
+ the sphere.) The axis of rotation is normal to the plane of the
+ arc, and the angle of rotation is twice the angle of the arc.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Argument <i>mousep</i> is a pointer to the mouse event that triggered
+ the interaction. It should have some button set. <i>Qball</i> will read
+ more events into <i>mousep</i>, and return when no buttons are down.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ While <i>qball</i> is reading mouse events, it calls out to the caller-supplied
+ routine <i>redraw</i>, which is expected to update the screen to reflect
+ the changing orientation. Argument <i>orientation</i> is the orientation
+ that <i>redraw</i> should examine, represented as a unit Quaternion (see
+ <i>quaternion(9.2)).</i> The caller may set it to any
+ orientation. It will be updated before each call to <i>redraw</i> (and
+ on return) by multiplying by the rotation specified with the mouse.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ It is possible to restrict <i>qball&#8217;s</i> attention to rotations about
+ a particular axis. If <i>ap</i> is null, the rotation is unconstrained.
+ Otherwise, the rotation will be about the same axis as <i>*ap</i>. This
+ is accomplished by projecting points on the sphere to the nearest
+ point also on the plane through the sphere&#8217;s center and normal
+ to
+ the axis.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libgeometry/qball.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/quaternion.html"><i>quaternion</i>(3)</a><br>
+ Ken Shoemake, &#8220;Animating Rotation with Quaternion Curves&#8221;, <i>SIGGRAPH
+ &#8217;85 Conference Proceedings.<br>
+ </i>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/quaternion.html b/man/man3/quaternion.html
new file mode 100644
index 00000000..257ebe52
--- /dev/null
+++ b/man/man3/quaternion.html
@@ -0,0 +1,163 @@
+<head>
+<title>quaternion(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>QUATERNION(3)</b><td align=right><b>QUATERNION(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ qtom, mtoq, qadd, qsub, qneg, qmul, qdiv, qunit, qinv, qlen, slerp,
+ qmid, qsqrt &ndash; Quaternion arithmetic<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;draw.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;geometry.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Quaternion qadd(Quaternion q, Quaternion r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Quaternion qsub(Quaternion q, Quaternion r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Quaternion qneg(Quaternion q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Quaternion qmul(Quaternion q, Quaternion r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Quaternion qdiv(Quaternion q, Quaternion r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Quaternion qinv(Quaternion q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double qlen(Quaternion p)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Quaternion qunit(Quaternion q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void qtom(Matrix m, Quaternion q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Quaternion mtoq(Matrix mat)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Quaternion slerp(Quaternion q, Quaternion r, double a)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Quaternion qmid(Quaternion q, Quaternion r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Quaternion qsqrt(Quaternion q)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The Quaternions are a non-commutative extension field of the Real
+ numbers, designed to do for rotations in 3-space what the complex
+ numbers do for rotations in 2-space. Quaternions have a real component
+ <i>r</i> and an imaginary vector component <i>v</i>=(<i>i</i>,<i>j</i>,<i>k</i>). Quaternions add
+ componentwise and multiply according to
+ the rule (<i>r</i>,<i>v</i>)(<i>s</i>,<i>w</i>)=(<i>rs</i>-<i>v</i>.<i>w</i>, <i>rw</i>+<i>vs</i>+<i>v</i>x<i>w</i>), where . and x are the ordinary
+ vector dot and cross products. The multiplicative inverse of a
+ non-zero quaternion (<i>r</i>,<i>v</i>) is (<i>r</i>,<i>-v</i>)/(<i>r</i>2-<i>v</i>.<i>v</i>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The following routines do arithmetic on quaternions, represented
+ as<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct Quaternion Quaternion;<br>
+ struct Quaternion{<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ double r, i, j, k;<br>
+
+ </table>
+ };<br>
+ </font></tt>
+ </table>
+ Name&nbsp;&nbsp;&nbsp;&nbsp;Description<br>
+ <tt><font size=+1>qadd</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Add two quaternions.<br>
+ <tt><font size=+1>qsub</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Subtract two quaternions.<br>
+ <tt><font size=+1>qneg</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Negate a quaternion.<br>
+ <tt><font size=+1>qmul</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Multiply two quaternions.<br>
+ <tt><font size=+1>qdiv</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Divide two quaternions.<br>
+ <tt><font size=+1>qinv</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Return the multiplicative inverse of a quaternion.<br>
+ <tt><font size=+1>qlen</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Return <tt><font size=+1>sqrt(q.r*q.r+q.i*q.i+q.j*q.j+q.k*q.k)</font></tt>, the length of
+ a quaternion.<br>
+ <tt><font size=+1>qunit</font></tt>&nbsp;&nbsp;&nbsp;Return a unit quaternion (<i>length=1</i>) with components proportional
+ to <i>q</i>&#8217;s.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A rotation by angle <i>&#952;</i> about axis <i>A</i> (where <i>A</i> is a unit vector)
+ can be represented by the unit quaternion <i>q</i>=(cos <i>&#952;</i>/2, <i>A</i>sin <i>&#952;</i>/2).
+ The same rotation is represented by -<i>q</i>; a rotation by -<i>&#952;</i> about -<i>A</i>
+ is the same as a rotation by <i>&#952;</i> about <i>A</i>. The quaternion <i>q</i> transforms
+ points by (0,<i>x&#8217;,y&#8217;,z&#8217;</i>) = <i>q</i>-1(0,<i>x,y,z</i>)<i>q</i>. Quaternion
+ multiplication composes rotations. The orientation of an object
+ in 3-space can be represented by a quaternion giving its rotation
+ relative to some &#8216;standard&#8217; orientation.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The following routines operate on rotations or orientations represented
+ as unit quaternions:<br>
+ <tt><font size=+1>mtoq</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Convert a rotation matrix (see <a href="../man3/matrix.html"><i>matrix</i>(3)</a>) to a unit quaternion.<br>
+ <tt><font size=+1>qtom</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Convert a unit quaternion to a rotation matrix.<br>
+ <tt><font size=+1>slerp</font></tt>&nbsp;&nbsp;&nbsp;Spherical lerp. Interpolate between two orientations. The
+ rotation that carries <i>q</i> to <i>r</i> is <i>q</i>-1<i>r</i>, so <tt><font size=+1>slerp(q, r, t)</font></tt> is <i>q</i>(<i>q</i>-1<i>r</i>)<i>t</i>.<br>
+ <tt><font size=+1>qmid&nbsp;&nbsp;&nbsp;&nbsp;slerp(q, r, .5)<br>
+ qsqrt</font></tt>&nbsp;&nbsp;&nbsp;The square root of <i>q</i>. This is just a rotation about the same
+ axis by half the angle.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libgeometry/quaternion.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/matrix.html"><i>matrix</i>(3)</a>, <a href="../man3/qball.html"><i>qball</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/quote.html b/man/man3/quote.html
new file mode 100644
index 00000000..433c5bfc
--- /dev/null
+++ b/man/man3/quote.html
@@ -0,0 +1,164 @@
+<head>
+<title>quote(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>QUOTE(3)</b><td align=right><b>QUOTE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ quotestrdup, quoterunestrdup, unquotestrdup, unquoterunestrdup,
+ quotestrfmt, quoterunestrfmt, quotefmtinstall, doquote, needsrcquote
+ &ndash; quoted character strings<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char *quotestrdup(char *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune *quoterunestrdup(Rune *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char *unquotestrdup(char *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune *unquoterunestrdup(Rune *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int quotestrfmt(Fmt*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int quoterunestrfmt(Fmt*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void quotefmtinstall(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int (*doquote)(int c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int needsrcquote(int c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines manipulate character strings, either adding or
+ removing quotes as necessary. In the quoted form, the strings
+ are in the style of <a href="../man1/rc.html"><i>rc</i>(1)</a><i>,</i> with single quotes surrounding the
+ string. Embedded single quotes are indicated by a doubled single
+ quote. For instance,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>Don't worry!<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ when quoted becomes<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>'Don''t worry!'<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The empty string is represented by two quotes, <tt><font size=+1>''</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The first four functions act as variants of <tt><font size=+1>strdup</font></tt> (see <a href="../man3/strcat.html"><i>strcat</i>(3)</a>).
+ Each returns a freshly allocated copy of the string, created using
+ <a href="../man3/malloc.html"><i>malloc</i>(3)</a>. <i>Quotestrdup</i> returns a quoted copy of <i>s</i>, while <i>unquotestrdup</i>
+ returns a copy of <i>s</i> with the quotes evaluated. The <i>rune</i> versions
+ of these functions do the same for strings (see
+ <a href="../man3/runestrcat.html"><i>runestrcat</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The string returned by <i>quotestrdup</i> or <i>quoterunestrdup</i> has the
+ following properties:<br>
+ 1.&nbsp;&nbsp;&nbsp;&nbsp;If the original string <i>s</i> is empty, the returned string is <tt><font size=+1>''</font></tt>.<br>
+ 2.&nbsp;&nbsp;&nbsp;&nbsp;If <i>s</i> contains no quotes, blanks, or control characters, the
+ returned string is identical to <i>s</i>.<br>
+ 3.&nbsp;&nbsp;&nbsp;&nbsp;If <i>s</i> needs quotes to be added, the first character of the returned
+ string will be a quote. For example, <tt><font size=+1>hello world</font></tt> becomes <tt><font size=+1>'hello
+ world'</font></tt> not <tt><font size=+1>hello' 'world</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The function pointer <i>doquote</i> is <tt><font size=+1>nil</font></tt> by default. If it is non-nil,
+ characters are passed to that function to see if they should be
+ quoted. This mechanism allows programs to specify that characters
+ other than blanks, control characters, or quotes be quoted. Regardless
+ of the return value of <i>*doquote</i>, blanks, control
+ characters, and quotes are always quoted. <i>Needsrcquote</i> is provided
+ as a <i>doquote</i> function that flags any character special to <a href="../man1/rc.html"><i>rc</i>(1)</a>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Quotestrfmt</i> and <i>quoterunestrfmt</i> are <a href="../man3/print.html"><i>print</i>(3)</a> formatting routines
+ that produce quoted strings as output. They may be installed by
+ hand, but <i>quotefmtinstall</i> installs them under the standard format
+ characters <tt><font size=+1>q</font></tt> and <tt><font size=+1>Q</font></tt>. (They are not installed automatically.) If
+ the format string includes the alternate format character <tt><font size=+1>#</font></tt>,
+ for example <tt><font size=+1>%#q</font></tt>, the printed string will always be quoted; otherwise
+ quotes will only be provided if necessary to avoid ambiguity.
+ In <tt><font size=+1>&lt;libc.h&gt;</font></tt> there are <tt><font size=+1>#pragma</font></tt> statements so the compiler can type-check
+ uses of <tt><font size=+1>%q</font></tt> and <tt><font size=+1>%Q</font></tt> in <a href="../man3/print.html"><i>print</i>(3)</a> format strings.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/quote.c<br>
+ /usr/local/plan9/src/lib9/fmt/fmtquote.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/rc.html"><i>rc</i>(1)</a>, <a href="../man3/malloc.html"><i>malloc</i>(3)</a>, <a href="../man3/print.html"><i>print</i>(3)</a>, <a href="../man3/strcat.html"><i>strcat</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Because it is provided by the format library, <i>doquote</i> is a preprocessor
+ macro defined as <i>fmtdoquote</i>; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/rand.html b/man/man3/rand.html
new file mode 100644
index 00000000..0601c6bf
--- /dev/null
+++ b/man/man3/rand.html
@@ -0,0 +1,190 @@
+<head>
+<title>rand(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>RAND(3)</b><td align=right><b>RAND(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ rand, lrand, frand, nrand, lnrand, srand, truerand, ntruerand,
+ fastrand, nfastrand &ndash; random number generator<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rand(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;lrand(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>double frand(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nrand(int val)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;lnrand(long val)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;srand(long seed)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;truerand(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;ntruerand(ulong val)<br>
+ #include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;genrandom(uchar *buf, int nbytes)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;prng(uchar *buf, int nbytes)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;fastrand(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>ulong &nbsp;&nbsp;&nbsp;nfastrand(ulong val)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Rand</i> returns a uniform pseudo-random number <i>x</i>, 0&le;<i>x</i>&lt;215.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Lrand</i> returns a uniform <tt><font size=+1>long</font></tt> <i>x</i>, 0&le;<i>x</i>&lt;231.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Frand</i> returns a uniform <tt><font size=+1>double</font></tt> <i>x</i>, 0.0&le;<i>x</i>&lt;1.0, This function calls
+ <i>lrand</i> twice to generate a number with as many as 62 significant
+ bits of mantissa.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Nrand</i> returns a uniform integer <i>x</i>, 0&le;<i>x</i>&lt;<i>val. Lnrand</i> is the same,
+ but returns a <tt><font size=+1>long</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The algorithm is additive feedback with:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ x[n] = (x[n-273] + x[n-607]) mod 231
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ giving a period of 230 &#215; (2607 &ndash; 1).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The generators are initialized by calling <i>srand</i> with whatever
+ you like as argument. To get a different starting value each time,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>srand(time(0))
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ will work as long as it is not called more often than once per
+ second. Calling<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>srand(1)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ will initialize the generators to their starting state.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Truerand</i> returns a random unsigned long read from <tt><font size=+1>/dev/random</font></tt>.
+ Due to the nature of <tt><font size=+1>/dev/random</font></tt>, truerand can only return a few
+ hundred bits a second.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Ntruerand</i> returns a uniform random integer <i>x</i>, 0&le;<i>x</i>&lt;<i>val</i>&le;<i>232-1.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <i>Genrandom</i> fills a buffer with bytes from the X9.17 pseudo-random
+ number generator. The X9.17 generator is seeded by 24 truly random
+ bytes read from <tt><font size=+1>/dev/random</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Prng</i> uses the native <a href="../man3/rand.html"><i>rand</i>(3)</a> pseudo-random number generator to
+ fill the buffer. Used with <i>srand</i>, this function can produce a
+ reproducible stream of pseudo random numbers useful in testing.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Both <i>genrandom</i> and <i>prng</i> may be passed to <i>mprand</i> (see <a href="../man3/mp.html"><i>mp</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fastrand</i> uses <i>genrandom</i> to return a uniform <tt><font size=+1>unsigned long</font></tt> <i>x</i>, 0&le;<i>x</i>&lt;<i>232-1.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <i>Nfastrand</i> uses <i>genrandom</i> to return a uniform <tt><font size=+1>unsigned long</font></tt> <i>x</i>,
+ 0&le;<i>x</i>&lt;<i>val</i>&le;<i>232-1.<br>
+ </i>
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9<br>
+ /usr/local/plan9/src/libsec/port<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mp.html"><i>mp</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Truerand</i> and <i>ntruerand</i> maintain a static file descriptor.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To avoid name conflicts with the underlying system, <i>rand</i>, <i>lrand</i>,
+ <i>frand</i>, <i>nrand</i>, <i>lnrand</i>, and <i>srand</i> are preprocessor macros defined
+ as <i>p9rand</i>, <i>p9lrand</i>, and so on; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/rc4.html b/man/man3/rc4.html
new file mode 100644
index 00000000..8c0d374b
--- /dev/null
+++ b/man/man3/rc4.html
@@ -0,0 +1,86 @@
+<head>
+<title>rc4(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>RC4(3)</b><td align=right><b>RC4(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ setupRC4state, rc4, rc4skip, rc4back - alleged rc4 encryption<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void setupRC4state(RC4state *s, uchar *seed, int slen)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void rc4(RC4state *s, uchar *data, int dlen)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void rc4skip(RC4state *s, int nbytes)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void rc4back(RC4state *s, int nbytes)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This is an algorithm alleged to be Rivest&#8217;s RC4 encryption function.
+ It is a pseudo-random number generator with a 256 byte state and
+ a long cycle. The input buffer is XOR&#8217;d with the output of the
+ generator both to encrypt and to decrypt. The seed, entered using
+ <i>setupRC4state</i>, can be any length. The generator can
+ be run forward using <i>rc4</i>, skip over bytes using <i>rc4skip</i> to account
+ lost transmissions, or run backwards using <i>rc4back</i> to cover retransmitted
+ data. The <i>RC4state</i> structure keeps track of the algorithm.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libsec<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mp.html"><i>mp</i>(3)</a>, <a href="../man3/aes.html"><i>aes</i>(3)</a>, <a href="../man3/blowfish.html"><i>blowfish</i>(3)</a>, <a href="../man3/des.html"><i>des</i>(3)</a>, <a href="../man3/dsa.html"><i>dsa</i>(3)</a>, <a href="../man3/elgamal.html"><i>elgamal</i>(3)</a>, <a href="../man3/rsa.html"><i>rsa</i>(3)</a>,
+ <a href="../man3/sechash.html"><i>sechash</i>(3)</a>, <a href="../man3/prime.html"><i>prime</i>(3)</a>, <a href="../man3/rand.html"><i>rand</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/read.html b/man/man3/read.html
new file mode 100644
index 00000000..515c3f77
--- /dev/null
+++ b/man/man3/read.html
@@ -0,0 +1,109 @@
+<head>
+<title>read(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>READ(3)</b><td align=right><b>READ(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ read, readn, write, pread, pwrite &ndash; read or write file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long read(int fd, void *buf, long nbytes)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long readn(int fd, void *buf, long nbytes)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long write(int fd, void *buf, long nbytes)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long pread(int fd, void *buf, long nbytes, vlong offset)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long pwrite(int fd, void *buf, long nbytes, vlong offset)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Read</i> reads <i>nbytes</i> bytes of data from the offset in the file associated
+ with <i>fd</i> into memory at <i>buf</i>. The offset is advanced by the number
+ of bytes read. It is not guaranteed that all <i>nbytes</i> bytes will
+ be read; for example if the file refers to the console, at most
+ one line will be returned. In any event the number of bytes
+ read is returned. A return value of 0 is conventionally interpreted
+ as end of file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Readn</i> is just like read, but does successive <i>read</i> calls until
+ <i>nbytes</i> have been read, or a read system call returns a non-positive
+ count.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Write</i> writes <i>nbytes</i> bytes of data starting at <i>buf</i> to the file
+ associated with <i>fd</i> at the file offset. The offset is advanced
+ by the number of bytes written. The number of characters actually
+ written is returned. It should be regarded as an error if this
+ is not the same as requested.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Pread</i> and <i>Pwrite</i> equivalent to a <a href="../man3/seek.html"><i>seek</i>(3)</a> to <i>offset</i> followed by
+ a <i>read</i> or <i>write</i>. By combining the operations in a single atomic
+ call, they more closely match the 9P protocol (see <i>intro</i>(9p))
+ and, more important, permit multiprocess programs to execute multiple
+ concurrent read and write operations on the same file
+ descriptor without interference.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/readn.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a>, <a href="../man3/open.html"><i>open</i>(3)</a>, <a href="../man3/dup.html"><i>dup</i>(3)</a>, <a href="../man3/pipe.html"><i>pipe</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions set <i>errstr</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/regexp.html b/man/man3/regexp.html
new file mode 100644
index 00000000..21e1849b
--- /dev/null
+++ b/man/man3/regexp.html
@@ -0,0 +1,178 @@
+<head>
+<title>regexp(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>REGEXP(3)</b><td align=right><b>REGEXP(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ regcomp, regcomplit, regcompnl, regexec, regsub, rregexec, rregsub,
+ regerror &ndash; regular expression<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;regexp.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Reprog &nbsp;&nbsp;&nbsp;*regcomp(char *exp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Reprog &nbsp;&nbsp;&nbsp;*regcomplit(char *exp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Reprog &nbsp;&nbsp;&nbsp;*regcompnl(char *exp)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;regexec(Reprog *prog, char *string, Resub *match, int msize)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void regsub(char *source, char *dest, int dlen, Resub *match,
+ int msize)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;rregexec(Reprog *prog, Rune *string, Resub *match, int msize)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void rregsub(Rune *source, Rune *dest, int dlen, Resub *match,
+ int msize)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void regerror(char *msg)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Regcomp</i> compiles a regular expression and returns a pointer to
+ the generated description. The space is allocated by <a href="../man3/malloc.html"><i>malloc</i>(3)</a>
+ and may be released by <i>free</i>. Regular expressions are exactly as
+ in <a href="../man7/regexp.html"><i>regexp</i>(7)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Regcomplit</i> is like <i>regcomp</i> except that all characters are treated
+ literally. <i>Regcompnl</i> is like <i>regcomp</i> except that the <tt><font size=+1>.</font></tt> metacharacter
+ matches all characters, including newlines.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Regexec</i> matches a null-terminated <i>string</i> against the compiled
+ regular expression in <i>prog</i>. If it matches, <i>regexec</i> returns <tt><font size=+1>1</font></tt> and
+ fills in the array <i>match</i> with character pointers to the substrings
+ of <i>string</i> that correspond to the parenthesized subexpressions
+ of <i>exp</i>: <tt><font size=+1>match[</font></tt><i>i</i><tt><font size=+1>].sp</font></tt> points to the beginning and
+ <tt><font size=+1>match[</font></tt><i>i</i><tt><font size=+1>].ep</font></tt> points just beyond the end of the <i>i</i>th substring. (Subexpression
+ <i>i</i> begins at the <i>i</i>th left parenthesis, counting from 1.) Pointers
+ in <tt><font size=+1>match[0]</font></tt> pick out the substring that corresponds to the whole
+ regular expression. Unused elements of <i>match</i> are filled with zeros.
+ Matches involving <tt><font size=+1>*</font></tt>, <tt><font size=+1>+</font></tt>, and <tt><font size=+1>?</font></tt> are
+ extended as far as possible. The number of array elements in <i>match</i>
+ is given by <i>msize</i>. The structure of elements of <i>match</i> is:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ union {<br>
+ char *sp;<br>
+ Rune *rsp;<br>
+ } s;<br>
+ union {<br>
+ char *ep;<br>
+ Rune *rep;<br>
+ } e;<br>
+
+ </table>
+ } Resub;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ If <tt><font size=+1>match[0].s.sp</font></tt> is nonzero on entry, <i>regexec</i> starts matching
+ at that point within <i>string</i>. If <tt><font size=+1>match[0].e.ep</font></tt> is nonzero on entry,
+ the last character matched is the one preceding that point.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Regsub</i> places in <i>dest</i> a substitution instance of <i>source</i> in the
+ context of the last <i>regexec</i> performed using <i>match</i>. Each instance
+ of <tt><font size=+1>\</font></tt><i>n</i>, where <i>n</i> is a digit, is replaced by the string delimited
+ by <tt><font size=+1>match[</font></tt><i>n</i><tt><font size=+1>].sp</font></tt> and <tt><font size=+1>match[</font></tt><i>n</i><tt><font size=+1>].ep</font></tt>. Each instance of <tt><font size=+1>&amp;</font></tt> is replaced
+ by the string delimited by <tt><font size=+1>match[0].sp</font></tt> and
+ <tt><font size=+1>match[0].ep</font></tt>. The substitution will always be null terminated and
+ trimmed to fit into dlen bytes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Regerror</i>, called whenever an error is detected in <i>regcomp</i>, writes
+ the string <i>msg</i> on the standard error file and exits. <i>Regerror</i>
+ can be replaced to perform special error processing. If the user
+ supplied <i>regerror</i> returns rather than exits, <i>regcomp</i> will return
+ 0.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Rregexec</i> and <i>rregsub</i> are variants of <i>regexec</i> and <i>regsub</i> that use
+ strings of <tt><font size=+1>Runes</font></tt> instead of strings of <tt><font size=+1>chars</font></tt>. With these routines,
+ the <i>rsp</i> and <i>rep</i> fields of the <i>match</i> array elements should be used.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libregexp<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/grep.html"><i>grep</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Regcomp</i> returns <tt><font size=+1>0</font></tt> for an illegal expression or other failure.
+ <i>Regexec</i> returns 0 if <i>string</i> is not matched.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ There is no way to specify or match a NUL character; NULs terminate
+ patterns and strings.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/rfork.html b/man/man3/rfork.html
new file mode 100644
index 00000000..f76a61fd
--- /dev/null
+++ b/man/man3/rfork.html
@@ -0,0 +1,118 @@
+<head>
+<title>rfork(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>RFORK(3)</b><td align=right><b>RFORK(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ rfork &ndash; manipulate process state<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int rfork(int flags)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Rfork</i> is a partial implementation of the Plan 9 system call. It
+ can be used to manipulate some process state and to create new
+ processes a la <a href="../man2/fork.html"><i>fork</i>(2)</a>. It cannot be used to create shared-memory
+ processes (Plan 9&#8217;s <tt><font size=+1>RFMEM</font></tt> flag); for that functionality use <i>proccreate</i>
+ (see <a href="../man3/thread.html"><i>thread</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>flags</i> argument to <i>rfork</i> selects which resources of the invoking
+ process (parent) are shared by the new process (child) or initialized
+ to their default values. <i>Flags</i> is the logical OR of some subset
+ of<br>
+ <tt><font size=+1>RFPROC</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If set a new process is created; otherwise changes affect
+ the current process.<br>
+ <tt><font size=+1>RFNOWAIT</font></tt>&nbsp;&nbsp;&nbsp;If set, the child process will be dissociated from the
+ parent. Upon exit the child will leave no <tt><font size=+1>Waitmsg</font></tt> (see <a href="../man3/wait.html"><i>wait</i>(3)</a>)
+ for the parent to collect.<br>
+ <tt><font size=+1>RFNOTEG</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Each process is a member of a group of processes that all
+ receive notes when a note is sent to the group (see <a href="../man3/postnote.html"><i>postnote</i>(3)</a>
+ and <a href="../man2/signal.html"><i>signal</i>(2)</a>). The group of a new process is by default the same
+ as its parent, but if <tt><font size=+1>RFNOTEG</font></tt> is set (regardless of <tt><font size=+1>RFPROC</font></tt>), the
+ process becomes the first in a new group, isolated
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ from previous processes. In Plan 9, a process can call <tt><font size=+1>rfork(RFNOTEG)</font></tt>
+ and then be sure that it will no longer receive console interrupts
+ or other notes. Unix job-control shells put each command in its
+ own process group and then relay notes to the current foreground
+ command, making the idiom
+ less useful.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>RFFDG</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If set, the invoker&#8217;s file descriptor table (see <i>intro</i>(<i>))</i>
+ is copied; otherwise the two processes share a single table.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ File descriptors in a shared file descriptor table are kept open
+ until either they are explicitly closed or all processes sharing
+ the table exit.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If <tt><font size=+1>RFPROC</font></tt> is set, the value returned in the parent process is
+ the process id of the child process; the value returned in the
+ child is zero. Without <tt><font size=+1>RFPROC</font></tt>, the return value is zero. Process
+ ids range from 1 to the maximum integer (<tt><font size=+1>int</font></tt>) value. <i>Rfork</i> will
+ sleep, if necessary, until required process resources are available.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Calling <tt><font size=+1>rfork(RFFDG|RFPROC)</font></tt> is equivalent to calling <a href="../man2/fork.html"><i>fork</i>(2)</a>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/rfork.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Rfork</i> sets <i>errstr</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/rsa.html b/man/man3/rsa.html
new file mode 100644
index 00000000..0cfd2949
--- /dev/null
+++ b/man/man3/rsa.html
@@ -0,0 +1,262 @@
+<head>
+<title>rsa(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>RSA(3)</b><td align=right><b>RSA(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ asn1dump, asn1toRSApriv, decodepem, decodepemchain, rsadecrypt,
+ rsaencrypt, rsafill,, rsagen, rsaprivalloc, rsaprivfree, rsaprivtopub,
+ rsapuballoc, rsapubfree, X509toRSApub, X509dump, X509gen, X509req,
+ X509verify &ndash; RSA encryption algorithm<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>RSApriv* &nbsp;&nbsp;&nbsp;rsagen(int nlen, int elen, int nrep)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>RSApriv* &nbsp;&nbsp;&nbsp;rsafill(mpint *n, mpint *ek, mpint *dk, mpint *p, mpint
+ *q)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rsaencrypt(RSApub *k, mpint *in, mpint *out)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>mpint* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rsadecrypt(RSApriv *k, mpint *in, mpint *out)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>RSApub* &nbsp;&nbsp;&nbsp;&nbsp;rsapuballoc(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rsapubfree(RSApub*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>RSApriv* &nbsp;&nbsp;&nbsp;rsaprivalloc(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rsaprivfree(RSApriv*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>RSApub* &nbsp;&nbsp;&nbsp;&nbsp;rsaprivtopub(RSApriv*)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>RSApub* &nbsp;&nbsp;&nbsp;&nbsp;X509toRSApub(uchar *cert, int ncert, char *name, int nname)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>RSApriv* &nbsp;&nbsp;&nbsp;asn1toRSApriv(uchar *priv, int npriv)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;asn1dump(uchar *der, int len)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;decodepem(char *s, char *type, int *len)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>PEMChain* decodepemchain(char *s, char *type)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X509dump(uchar *cert, int ncert)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X509gen(RSApriv *priv, char *subj, ulong valid[2], int
+ *certlen);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>uchar* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X509req(RSApriv *priv, char *subj, int *certlen);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* X509verify(uchar *cert, int ncert, RSApub *pk)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ RSA is a public key encryption algorithm. The owner of a key publishes
+ the public part of the key:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>struct RSApub<br>
+ {<br>
+ mpint*n;// modulus<br>
+ mpint*ek;// exp (encryption key)<br>
+ };<br>
+ </font></tt>
+ </table>
+
+ </table>
+ This part can be used for encrypting data (with <i>rsaencrypt</i>) to
+ be sent to the owner. The owner decrypts (with <i>rsadecrypt</i>) using
+ his private key:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>struct RSApriv<br>
+ {<br>
+ RSApubpub;<br>
+ mpint*dk;// exp (decryption key)<br>
+ <br>
+ // precomputed crt values<br>
+ mpint*p;<br>
+ mpint*q;<br>
+ mpint*kp;// k mod p&#8722;1<br>
+ mpint*kq;// k mod q&#8722;1<br>
+ mpint*c2;// for converting residues to number<br>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+
+ </table>
+ Keys are generated using <i>rsagen</i>. <i>Rsagen</i> takes both bit length
+ of the modulus, the bit length of the public key exponent, and
+ the number of repetitions of the Miller-Rabin primality test to
+ run. If the latter is 0, it does the default number of rounds.
+ <i>Rsagen</i> returns a newly allocated structure containing both public
+ and
+ private keys. <i>Rsaprivtopub</i> returns a newly allocated copy of the
+ public key corresponding to the private key.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Rsafill</i> takes as input the bare minimum pieces of an RSA private
+ key and computes the rest (<tt><font size=+1>kp</font></tt>, <tt><font size=+1>kq</font></tt>, and <tt><font size=+1>c2</font></tt>). It returns a new private
+ key. All the <tt><font size=+1>mpint</font></tt>s in the key, even the ones that correspond
+ directly to <i>rsafill</i>&#8217;s input parameters, are freshly allocated,
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routines <i>rsaalloc</i>, <i>rsafree</i>, <i>rsapuballoc</i>, <i>rsapubfree</i>, <i>rsaprivalloc</i>,
+ and <i>rsaprivfree</i> are provided to aid in user provided key I/O.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Given a binary X.509 <i>cert</i>, the routine <i>X509toRSApub</i> returns the
+ public key and, if <i>name</i> is not nil, the CN part of the Distinguished
+ Name of the certificate&#8217;s Subject. (This is conventionally a userid
+ or a host DNS name.) No verification is done of the certificate
+ signature; the caller should check the fingerprint,
+ <i>sha1(cert)</i>, against a table or check the certificate by other
+ means. X.509 certificates are often stored in PEM format; use
+ <i>dec64</i> to convert to binary before computing the fingerprint or
+ calling <i>X509toRSApub</i>. For the special case of certificates signed
+ by a known trusted key (in a single step, without certificate
+ chains)
+ <i>X509verify</i> checks the signature on <i>cert</i>. It returns nil if successful,
+ else an error string.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>X509dump</i> prints an X.509 certificate to standard ouptut.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>X509gen</i> creates a self-signed X.509 certificate, given an RSA
+ keypair <i>priv</i>, a issuer/subject string <i>subj</i>, and the starting and
+ ending validity dates, <i>valid</i>. Length of the allocated binary certificate
+ is stored in <i>certlen</i>. The subject line is conventionally of the
+ form<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>&quot;C=US ST=NJ L=07922 O=Lucent OU='Bell Labs' CN=Eric&quot;<br>
+ </font></tt>
+ </table>
+ using the quoting conventions of <i>tokenize</i> (see <a href="../man3/getfields.html"><i>getfields</i>(3)</a>).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>X509req</i> creates an X.509 certification request.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Asn1toRSApriv</i> converts an ASN1 formatted RSA private key into
+ the corresponding <tt><font size=+1>RSApriv</font></tt> structure.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Asn1dump</i> prints an ASN1 object to standard output.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Decodepem</i> takes a zero terminated string, <i>s</i>, and decodes the PEM
+ (privacy-enhanced mail) formatted section for <i>type</i> within it.
+ If successful, it returns the decoded section and sets <tt><font size=+1>*</font></tt><i>len</i> to
+ its decoded length. If not, it returns <tt><font size=+1>nil</font></tt>, and <tt><font size=+1>*</font></tt><i>len</i> is undefined.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Decodepemchain</i> is similar but expects a sequence of PEM-formatted
+ sections and returns a linked list of the decodings:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef struct PEMChain PEMChain<br>
+ struct PEMChain<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ PEMChain *next;<br>
+ uchar *pem;<br>
+ int pemlen;<br>
+
+ </table>
+ };<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libsec<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/mp.html"><i>mp</i>(3)</a>, <a href="../man3/aes.html"><i>aes</i>(3)</a>, <a href="../man3/blowfish.html"><i>blowfish</i>(3)</a>, <a href="../man3/des.html"><i>des</i>(3)</a>, <a href="../man3/dsa.html"><i>dsa</i>(3)</a>, <a href="../man3/elgamal.html"><i>elgamal</i>(3)</a>, <a href="../man3/rc4.html"><i>rc4</i>(3)</a>,
+ <a href="../man3/sechash.html"><i>sechash</i>(3)</a>, <a href="../man3/prime.html"><i>prime</i>(3)</a>, <a href="../man3/rand.html"><i>rand</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/rune.html b/man/man3/rune.html
new file mode 100644
index 00000000..2fed11f3
--- /dev/null
+++ b/man/man3/rune.html
@@ -0,0 +1,157 @@
+<head>
+<title>rune(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>RUNE(3)</b><td align=right><b>RUNE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ runetochar, chartorune, runelen, runenlen, fullrune, utfecpy,
+ utflen, utfnlen, utfrune, utfrrune, utfutf &ndash; rune/UTF conversion<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;runetochar(char *s, Rune *r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chartorune(Rune *r, char *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;runelen(long r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;runenlen(Rune *r, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fullrune(char *s, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;utfecpy(char *s1, char *es1, char *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;utflen(char *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;utfnlen(char *s, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;utfrune(char *s, long c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;utfrrune(char *s, long c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;utfutf(char *s1, char *s2)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines convert to and from a UTF byte stream and runes.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Runetochar</i> copies one rune at <i>r</i> to at most <tt><font size=+1>UTFmax</font></tt> bytes starting
+ at <i>s</i> and returns the number of bytes copied. <tt><font size=+1>UTFmax</font></tt>, defined as
+ <tt><font size=+1>3</font></tt> in <tt><font size=+1>&lt;libc.h&gt;</font></tt>, is the maximum number of bytes required to represent
+ a rune.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Chartorune</i> copies at most <tt><font size=+1>UTFmax</font></tt> bytes starting at <i>s</i> to one rune
+ at <i>r</i> and returns the number of bytes copied. If the input is not
+ exactly in UTF format, <i>chartorune</i> will convert to 0x80 and return
+ 1.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Runelen</i> returns the number of bytes required to convert <i>r</i> into
+ UTF.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Runenlen</i> returns the number of bytes required to convert the <i>n</i>
+ runes pointed to by <i>r</i> into UTF.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Fullrune</i> returns 1 if the string <i>s</i> of length <i>n</i> is long enough
+ to be decoded by <i>chartorune</i> and 0 otherwise. This does not guarantee
+ that the string contains a legal UTF encoding. This routine is
+ used by programs that obtain input a byte at a time and need to
+ know when a full rune has arrived.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The following routines are analogous to the corresponding string
+ routines with <tt><font size=+1>utf</font></tt> substituted for <tt><font size=+1>str</font></tt> and <tt><font size=+1>rune</font></tt> substituted for
+ <tt><font size=+1>chr</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Utfecpy</i> copies UTF sequences until a null sequence has been copied,
+ but writes no sequences beyond <i>es1</i>. If any sequences are copied,
+ <i>s1</i> is terminated by a null sequence, and a pointer to that sequence
+ is returned. Otherwise, the original <i>s1</i> is returned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Utflen</i> returns the number of runes that are represented by the
+ UTF string <i>s</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Utfnlen</i> returns the number of complete runes that are represented
+ by the first <i>n</i> bytes of UTF string <i>s</i>. If the last few bytes of
+ the string contain an incompletely coded rune, <i>utfnlen</i> will not
+ count them; in this way, it differs from <i>utflen</i>, which includes
+ every byte of the string.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Utfrune</i> (<i>utfrrune</i>) returns a pointer to the first (last) occurrence
+ of rune <i>c</i> in the UTF string <i>s</i>, or 0 if <i>c</i> does not occur in the
+ string. The NUL byte terminating a string is considered to be
+ part of the string <i>s</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Utfutf</i> returns a pointer to the first occurrence of the UTF string
+ <i>s2</i> as a UTF substring of <i>s1</i>, or 0 if there is none. If <i>s2</i> is the
+ null string, <i>utfutf</i> returns <i>s1</i>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/utf/rune.c<br>
+ /usr/local/plan9/src/lib9/utf/utfrune.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man7/utf.html"><i>utf</i>(7)</a>, <a href="../man1/tcs.html"><i>tcs</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/runestrcat.html b/man/man3/runestrcat.html
new file mode 100644
index 00000000..4774265c
--- /dev/null
+++ b/man/man3/runestrcat.html
@@ -0,0 +1,107 @@
+<head>
+<title>runestrcat(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>RUNESTRCAT(3)</b><td align=right><b>RUNESTRCAT(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ runestrcat, runestrncat, runestrcmp, runestrncmp, runestrcpy,
+ runestrncpy, runestrecpy, runestrlen, runestrchr, runestrrchr,
+ runestrdup, runestrstr &ndash; rune string operations<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runestrcat(Rune *s1, Rune *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runestrncat(Rune *s1, Rune *s2, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;runestrcmp(Rune *s1, Rune *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;runestrncmp(Rune *s1, Rune *s2, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runestrcpy(Rune *s1, Rune *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runestrncpy(Rune *s1, Rune *s2, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runestrecpy(Rune *s1, Rune *es1, Rune *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;runestrlen(Rune *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runestrchr(Rune *s, Rune c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runestrrchr(Rune *s, Rune c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runestrdup(Rune *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Rune* runestrstr(Rune *s1, Rune *s2)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions are rune string analogues of the corresponding
+ functions in <a href="../man3/strcat.html"><i>strcat</i>(3)</a>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/memory.html"><i>memory</i>(3)</a>, <a href="../man3/rune.html"><i>rune</i>(3)</a>, <a href="../man3/strcat.html"><i>strcat</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The outcome of overlapping moves varies among implementations.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/sechash.html b/man/man3/sechash.html
new file mode 100644
index 00000000..2e055465
--- /dev/null
+++ b/man/man3/sechash.html
@@ -0,0 +1,195 @@
+<head>
+<title>sechash(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SECHASH(3)</b><td align=right><b>SECHASH(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ md4, md5, sha1, hmac_md5, hmac_sha1, md5pickle, md5unpickle, sha1pickle,
+ sha1unpickle &ndash; cryptographically secure hashes<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;mp.h&gt;<br>
+ #include &lt;libsec.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>DigestState* &nbsp;&nbsp;&nbsp;&nbsp;md4(uchar *data, ulong dlen, uchar *digest, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DigestState
+ *state)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>DigestState* &nbsp;&nbsp;&nbsp;&nbsp;md5(uchar *data, ulong dlen, uchar *digest, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DigestState
+ *state)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;md5pickle(MD5state *state)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>MD5state* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;md5unpickle(char *p);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>DigestState* &nbsp;&nbsp;&nbsp;&nbsp;sha1(uchar *data, ulong dlen, uchar *digest, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DigestState
+ *state)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sha1pickle(MD5state *state)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>MD5state* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sha1unpickle(char *p);
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>DigestState* &nbsp;&nbsp;&nbsp;&nbsp;hmac_md5(uchar *data, ulong dlen,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *key, ulong klen,<br>
+ uchar *digest, DigestState *state)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>DigestState* &nbsp;&nbsp;&nbsp;&nbsp;hmac_sha1(uchar *data, ulong dlen,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *key, ulong klen,<br>
+ uchar *digest, DigestState *state)<br>
+
+ </table>
+
+ </table>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions implement the cryptographic hash functions MD4,
+ MD5, and SHA1. The output of the hash is called a <i>digest</i>. A hash
+ is secure if, given the hashed data and the digest, it is difficult
+ to predict the change to the digest resulting from some change
+ to the data without rehashing the whole data. Therefore, if
+ a secret is part of the hashed data, the digest can be used as
+ an integrity check of the data by anyone possessing the secret.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routines <i>md4</i>, <i>md5</i>, <i>sha1</i>, <i>hmac_md5</i>, and <i>hmac_sha1</i> differ only
+ in the length of the resulting digest and in the security of the
+ hash. Usage for each is the same. The first call to the routine
+ should have <tt><font size=+1>nil</font></tt> as the <i>state</i> parameter. This call returns a state
+ which can be used to chain subsequent calls. The last call
+ should have digest non-nil. <i>Digest</i> must point to a buffer of at
+ least the size of the digest produced. This last call will free
+ the state and copy the result into <i>digest</i>. For example, to hash
+ a single buffer using <i>md5</i>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>uchar digest[MD5dlen];<br>
+ md5(data, len, digest, nil);<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ To chain a number of buffers together, bounded on each end by
+ some secret:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>char buf[256];<br>
+ uchar digest[MD5dlen];<br>
+ DigestState *s;<br>
+ s = md5(&quot;my password&quot;, 11, nil, nil);<br>
+ while((n = read(fd, buf, 256)) &gt; 0)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ md5(buf, n, nil, s);<br>
+
+ </table>
+ md5(&quot;drowssap ym&quot;, 11, digest, s);<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The constants <i>MD4dlen</i>, <i>MD5dlen</i>, and <i>SHA1dlen</i> define the lengths
+ of the digests.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Hmac_md5</i> and <i>hmac_sha1</i> are used slightly differently. These hash
+ algorithms are keyed and require a key to be specified on every
+ call. The digest lengths for these hashes are <i>MD5dlen</i> and <i>SHA1dlen</i>
+ respectively.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The functions <i>md5pickle</i> and <i>sha1pickle</i> marshal the state of a
+ digest for transmission. <i>Md5unpickle</i> and <i>sha1unpickle</i> unmarshal
+ a pickled digest. All four routines return a pointer to a newly
+ <a href="../man3/malloc.html"><i>malloc</i>(3)</a>&#8217;d object.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libsec<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/aes.html"><i>aes</i>(3)</a>, <a href="../man3/blowfish.html"><i>blowfish</i>(3)</a>, <a href="../man3/des.html"><i>des</i>(3)</a>, <a href="../man3/elgamal.html"><i>elgamal</i>(3)</a>, <a href="../man3/rc4.html"><i>rc4</i>(3)</a>, <a href="../man3/rsa.html"><i>rsa</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/seek.html b/man/man3/seek.html
new file mode 100644
index 00000000..a2c19651
--- /dev/null
+++ b/man/man3/seek.html
@@ -0,0 +1,96 @@
+<head>
+<title>seek(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SEEK(3)</b><td align=right><b>SEEK(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ seek &ndash; change file offset<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>vlong seek(int fd, vlong n, int type)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Seek</i> sets the offset for the file associated with <i>fd</i> as follows:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ If <i>type</i> is 0, the offset is set to <i>n</i> bytes.<br>
+ If <i>type</i> is 1, the pointer is set to its current location plus
+ <i>n</i>.<br>
+ If <i>type</i> is 2, the pointer is set to the size of the file plus
+ <i>n</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ The new file offset value is returned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Seeking in a directory is not allowed. Seeking in a pipe is a
+ no-op.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/seek.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a>, <a href="../man3/open.html"><i>open</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Sets <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To avoid name conflicts with the underlying system, <i>seek</i> is a
+ preprocessor macro defined as <i>p9seek</i>; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/sendfd.html b/man/man3/sendfd.html
new file mode 100644
index 00000000..37007603
--- /dev/null
+++ b/man/man3/sendfd.html
@@ -0,0 +1,85 @@
+<head>
+<title>sendfd(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SENDFD(3)</b><td align=right><b>SENDFD(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sendfd, recvfd &ndash; pass file descriptors along Unix domain sockets<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;sendfd(int socket, int fd)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;recvfd(int socket)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Recvfd</i> and <i>sendfd</i> can be used to pass an open file descriptor
+ over a Unix domain socket from one process to another. Since <a href="../man3/pipe.html"><i>pipe</i>(3)</a>
+ is implemented with <a href="../man2/socketpair.html"><i>socketpair</i>(2)</a> instead of <a href="../man2/pipe.html"><i>pipe</i>(2)</a>, <i>socket</i> can
+ be a file descriptor obtained from <a href="../man3/pipe.html"><i>pipe</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Sendfd</i> sends the file descriptor <i>fd</i> along the socket to a process
+ calling <i>recvfd</i> on the other end.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ It is assumed that the two sides have coordinated and agreed to
+ transfer a file descriptor already, so that the <i>sendfd</i> is met
+ with a <i>recvfd</i> instead of an ordinary <i>read</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The file descriptor number may change on its way between processes,
+ but the kernel structure it represents will not.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/sendfd.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man2/socketpair.html"><i>socketpair</i>(2)</a>, <i>sendmsg</i> in <a href="../man2/send.html"><i>send</i>(2)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/setjmp.html b/man/man3/setjmp.html
new file mode 100644
index 00000000..b22431fd
--- /dev/null
+++ b/man/man3/setjmp.html
@@ -0,0 +1,110 @@
+<head>
+<title>setjmp(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SETJMP(3)</b><td align=right><b>SETJMP(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ setjmp, longjmp, notejmp &ndash; non-local goto<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;setjmp(jmp_buf env)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void longjmp(jmp_buf env, int val)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void notejmp(void *uregs, jmp_buf env, int val)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines are useful for dealing with errors and interrupts
+ encountered in a low-level subroutine of a program.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Setjmp</i> saves its stack environment in <i>env</i> for later use by <i>longjmp</i>.
+ It returns value 0.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Longjmp</i> restores the environment saved by the last call of <i>setjmp</i>.
+ It then causes execution to continue as if the call of <i>setjmp</i>
+ had just returned with value <i>val</i>. The invoker of <i>setjmp</i> must not
+ itself have returned in the interim. All accessible data have
+ values as of the time <i>longjmp</i> was called.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Notejmp</i> is the same as <i>longjmp</i> except that it is to be called
+ from within a note handler (see <a href="../man3/notify.html"><i>notify</i>(3)</a>). The <i>uregs</i> argument
+ should be the first argument passed to the note handler.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Setjmp</i> and <i>longjmp</i> can also be used to switch stacks.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/jmp.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/notify.html"><i>notify</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Notejmp</i> cannot recover from an address trap or bus error (page
+ fault) on the 680x0 architectures.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To avoid name conflicts with the underlying system, <i>setjmp</i>, <i>longjmp</i>,
+ <i>notejmp</i>, and <i>jmp_buf</i> are preprocessor macros defined as <i>p9setjmp</i>,
+ <i>p9longjmp</i>, <i>p9notejmp</i>, and <i>p9jmp_buf</i>; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>P9setjmp</i> is implemented as a preprocessor macro that calls <i>sigsetjmp</i>
+ (see Unix&#8217;s <i>setjmp</i>(3)).<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/sleep.html b/man/man3/sleep.html
new file mode 100644
index 00000000..6614f33a
--- /dev/null
+++ b/man/man3/sleep.html
@@ -0,0 +1,95 @@
+<head>
+<title>sleep(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SLEEP(3)</b><td align=right><b>SLEEP(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sleep, alarm &ndash; delay, ask for delayed note<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int sleep(long millisecs)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long alarm(unsigned long millisecs)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Sleep</i> suspends the current process for the number of milliseconds
+ specified by the argument. The actual suspension time may be a
+ little more or less than the requested time. If <i>millisecs</i> is 0,
+ the process gives up the CPU if another process is waiting to
+ run, returning immediately if not. Sleep returns &ndash;1 if interrupted,
+ 0 otherwise.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Alarm</i> causes an <tt><font size=+1>alarm</font></tt> note (see <a href="../man3/notify.html"><i>notify</i>(3)</a>) to be sent to the invoking
+ process after the number of milliseconds given by the argument.
+ Successive calls to <i>alarm</i> reset the alarm clock. A zero argument
+ clears the alarm. The return value is the amount of time previously
+ remaining in the alarm clock.
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/sleep.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions set <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To avoid name conflicts with the underlying system, <i>sleep</i> and
+ <i>alarm</i> are preprocessor macros defined as <i>p9sleep</i> and <i>p9alarm</i>;
+ see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/stat.html b/man/man3/stat.html
new file mode 100644
index 00000000..fb79a647
--- /dev/null
+++ b/man/man3/stat.html
@@ -0,0 +1,244 @@
+<head>
+<title>stat(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>STAT(3)</b><td align=right><b>STAT(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ stat, fstat, wstat, fwstat, dirstat, dirfstat, dirwstat, dirfwstat,
+ nulldir &ndash; get and put file status<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int stat(char *name, uchar *edir, int nedir)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int fstat(int fd, uchar *edir, int nedir)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int wstat(char *name, uchar *edir, int nedir)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int fwstat(int fd, uchar *edir, int nedir)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Dir* dirstat(char *name)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Dir* dirfstat(int fd)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int dirwstat(char *name, Dir *dir)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int dirfwstat(int fd, Dir *dir)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void nulldir(Dir *d)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Given a file&#8217;s <i>name</i>, or an open file descriptor <i>fd</i>, these routines
+ retrieve or modify file status information. <i>Stat</i>, <i>fstat</i>, <i>wstat</i>,
+ and <i>fwstat</i> are the system calls; they deal with machine-independent
+ <i>directory entries</i>. Their format is defined by <i>stat</i>(9p). <i>Stat</i> and
+ <i>fstat</i> retrieve information about <i>name</i> or <i>fd</i> into <i>edir</i>, a buffer
+ of length <i>nedir</i>, defined in <tt><font size=+1>&lt;libc.h&gt;</font></tt>. <i>Wstat</i> and <i>fwstat</i> write information
+ back, thus changing file attributes according to the contents
+ of <i>edir</i>. The data returned from the kernel includes its leading
+ 16-bit length field as described in <i>intro</i>(9p). For symmetry, this
+ field must also be present when passing data to the
+ kernel in a call to <i>wstat</i> and <i>fwstat</i>, but its value is ignored.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Dirstat</i>, <i>dirfstat</i>, <i>dirwstat</i>, and <i>dirfwstat</i> are similar to their
+ counterparts, except that they operate on <i>Dir</i> structures:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef<br>
+ struct Dir {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ /* system&#8722;modified data */<br>
+ uint &nbsp;&nbsp;&nbsp;type; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* server type */<br>
+ uint &nbsp;&nbsp;&nbsp;dev; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* server subtype */<br>
+ /* file data */<br>
+ Qid &nbsp;&nbsp;&nbsp;&nbsp;qid; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* unique id from server */<br>
+ ulong mode; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* permissions */<br>
+ ulong atime; &nbsp;&nbsp;&nbsp;&nbsp;/* last read time */<br>
+ ulong mtime; &nbsp;&nbsp;&nbsp;&nbsp;/* last write time */<br>
+ vlong length; &nbsp;&nbsp;&nbsp;/* file length: see &lt;u.h&gt; */<br>
+ char &nbsp;&nbsp;&nbsp;*name; &nbsp;&nbsp;&nbsp;&nbsp;/* last element of path */<br>
+ char &nbsp;&nbsp;&nbsp;*uid; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* owner name */<br>
+ char &nbsp;&nbsp;&nbsp;*gid; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* group name */<br>
+ char &nbsp;&nbsp;&nbsp;*muid; &nbsp;&nbsp;&nbsp;&nbsp;/* last modifier name */<br>
+
+ </table>
+ } Dir;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The returned structure is allocated by <a href="../man3/malloc.html"><i>malloc</i>(3)</a>; freeing it also
+ frees the associated strings.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ This structure and the <tt><font size=+1>Qid</font></tt> structure are defined in <tt><font size=+1>&lt;libc.h&gt;</font></tt>. If
+ the file resides on permanent storage and is not a directory,
+ the length returned by <i>stat</i> is the number of bytes in the file.
+ For directories, the length returned is zero. For files that are
+ streams (e.g., pipes and network connections), the length is the
+ number of bytes that can be read without blocking.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each file is the responsibility of some <i>server</i>: it could be a
+ file server, a kernel device, or a user process. <tt><font size=+1>Type</font></tt> identifies
+ the server type, and <tt><font size=+1>dev</font></tt> says which of a group of servers of the
+ same type is the one responsible for this file. <tt><font size=+1>Qid</font></tt> is a structure
+ containing <tt><font size=+1>path</font></tt> and <tt><font size=+1>vers</font></tt> fields: <tt><font size=+1>path</font></tt> is guaranteed to be
+ unique among all path names currently on the file server, and
+ <tt><font size=+1>vers</font></tt> changes each time the file is modified. The <tt><font size=+1>path</font></tt> is a <tt><font size=+1>long
+ long</font></tt> (64 bits, <tt><font size=+1>vlong</font></tt>) and the <tt><font size=+1>vers</font></tt> is an <tt><font size=+1>unsigned long</font></tt> (32 bits,
+ <tt><font size=+1>ulong</font></tt>). Thus, if two files have the same <tt><font size=+1>type</font></tt>, <tt><font size=+1>dev</font></tt>, and <tt><font size=+1>qid</font></tt> they
+ are the same file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The bits in <tt><font size=+1>mode</font></tt> are defined by
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>0x80000000 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;directory<br>
+ <tt><font size=+1>0x40000000 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;append only<br>
+ <tt><font size=+1>0x20000000 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;exclusive use (locked)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>0400 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;read permission by owner<br>
+ <tt><font size=+1>0200 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;write permission by owner<br>
+ <tt><font size=+1>0100 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;execute permission (search on directory) by owner<br>
+ <tt><font size=+1>0070 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;read, write, execute (search) by group<br>
+ <tt><font size=+1>0007 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;read, write, execute (search) by others<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+
+ </table>
+ There are constants defined in <tt><font size=+1>&lt;libc.h&gt;</font></tt> for these bits: <tt><font size=+1>DMDIR</font></tt>, <tt><font size=+1>DMAPPEND</font></tt>,
+ and <tt><font size=+1>DMEXCL</font></tt> for the first three; and <tt><font size=+1>DMREAD</font></tt>, <tt><font size=+1>DMWRITE</font></tt>, and <tt><font size=+1>DMEXEC</font></tt>
+ for the read, write, and execute bits for others.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The two time fields are measured in seconds since the epoch (Jan
+ 1 00:00 1970 GMT). <tt><font size=+1>Mtime</font></tt> is the time of the last change of content.
+ Similarly, <tt><font size=+1>atime</font></tt> is set whenever the contents are accessed; also,
+ it is set whenever <tt><font size=+1>mtime</font></tt> is set.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Uid</font></tt> and <tt><font size=+1>gid</font></tt> are the names of the owner and group of the file;
+ <tt><font size=+1>muid</font></tt> is the name of the user that last modified the file (setting
+ <tt><font size=+1>mtime</font></tt>). Groups are also users, but each server is free to associate
+ a list of users with any user name <i>g</i>, and that list is the set
+ of users in the group <i>g</i>. When an initial attachment is made to
+ a
+ server, the user string in the process group is communicated to
+ the server. Thus, the server knows, for any given file access,
+ whether the accessing process is the owner of, or in the group
+ of, the file. This selects which sets of three bits in <tt><font size=+1>mode</font></tt> is
+ used to check permissions.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Only some of the fields may be changed with the <i>wstat</i> calls. The
+ <tt><font size=+1>name</font></tt> can be changed by anyone with write permission in the parent
+ directory. The <tt><font size=+1>mode</font></tt> and <tt><font size=+1>mtime</font></tt> can be changed by the owner or the
+ group leader of the file&#8217;s current group. The <i>gid</i> can be changed:
+ by the owner if also a member of the new
+ group; or by the group leader of the file&#8217;s current group if also
+ leader of the new group (see <i>intro</i>(9p) for more information about
+ permissions, users, and groups). The <tt><font size=+1>length</font></tt> can be changed by
+ anyone with write permission, provided the operation is implemented
+ by the server. (See <i>intro</i>(9p) for permission, user,
+ and group information).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Special values in the fields of the <tt><font size=+1>Dir</font></tt> passed to <i>wstat</i> indicate
+ that the field is not intended to be changed by the call. The
+ values are the maximum unsigned integer of appropriate size for
+ integral values (usually <tt><font size=+1>~0</font></tt>, but beware of conversions and size
+ mismatches when comparing values) and the empty or nil string
+ for string values. The routine <i>nulldir</i> initializes all the elements
+ of <i>d</i> to these &#8220;don&#8217;t care&#8221; values. Thus one may change the mode,
+ for example, by using <i>nulldir</i> to initialize a <tt><font size=+1>Dir</font></tt>, then setting
+ the mode, and then doing <i>wstat</i>; it is not necessary to use <i>stat</i>
+ to retrieve the initial values first.
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/dirstat.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a>, <a href="../man3/fcall.html"><i>fcall</i>(3)</a>, <a href="../man3/dirread.html"><i>dirread</i>(3)</a>, <i>stat</i>(9p)<br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>dir</i> functions return a pointer to the data for a successful
+ call, or <tt><font size=+1>nil</font></tt> on error. The others return the number of bytes copied
+ on success, or &ndash;1 on error. All set <i>errstr</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the buffer for <i>stat</i> or <i>fstat</i> is too short for the returned
+ data, the return value will be <tt><font size=+1>BIT16SZ</font></tt> (see <a href="../man3/fcall.html"><i>fcall</i>(3)</a>) and the
+ two bytes returned will contain the initial count field of the
+ returned data; retrying with <tt><font size=+1>nedir</font></tt> equal to that value plus <tt><font size=+1>BIT16SZ</font></tt>
+ (for the count itself) should succeed.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/strcat.html b/man/man3/strcat.html
new file mode 100644
index 00000000..542ebd25
--- /dev/null
+++ b/man/man3/strcat.html
@@ -0,0 +1,203 @@
+<head>
+<title>strcat(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>STRCAT(3)</b><td align=right><b>STRCAT(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ strcat, strncat, strcmp, strncmp, cistrcmp, cistrncmp, strcpy,
+ strncpy, strecpy, strlen, strchr, strrchr, strpbrk, strspn, strcspn,
+ strtok, strdup, strstr, cistrstr &ndash; string operations<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* strcat(char *s1, char *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* strncat(char *s1, char *s2, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;strcmp(char *s1, char *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;strncmp(char *s1, char *s2, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;cistrcmp(char *s1, char *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;cistrncmp(char *s1, char *s2, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* strcpy(char *s1, char *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* strecpy(char *s1, char *es1, char *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* strncpy(char *s1, char *s2, long n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;strlen(char *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* strchr(char *s, char c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* strrchr(char *s, char c)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* strpbrk(char *s1, char *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;strspn(char *s1, char *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;strcspn(char *s1, char *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* strtok(char *s1, char *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* strdup(char *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* strstr(char *s1, char *s2)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>char* cistrstr(char *s1, char *s2)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The arguments <i>s1, s2</i> and <i>s</i> point to null-terminated strings. The
+ functions <i>strcat</i>, <i>strncat</i>, <i>strcpy</i>, <i>strecpy</i>, and <i>strncpy</i> all alter
+ <i>s1</i>. <i>Strcat</i> and <i>strcpy</i> do not check for overflow of the array pointed
+ to by <i>s1</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strcat</i> appends a copy of string <i>s2</i> to the end of string <i>s1</i>. <i>Strncat</i>
+ appends at most <i>n</i> bytes. Each returns a pointer to the null-terminated
+ result.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strcmp</i> compares its arguments and returns an integer less than,
+ equal to, or greater than 0, according as <i>s1</i> is lexicographically
+ less than, equal to, or greater than <i>s2</i>. <i>Strncmp</i> makes the same
+ comparison but examines at most <i>n</i> bytes. <i>Cistrcmp</i> and <i>cistrncmp</i>
+ ignore ASCII case distinctions when comparing strings.
+ The comparisons are made with unsigned bytes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strcpy</i> copies string <i>s2</i> to <i>s1</i>, stopping after the null byte has
+ been copied. <i>Strncpy</i> copies exactly <i>n</i> bytes, truncating <i>s2</i> or
+ adding null bytes to <i>s1</i> if necessary. The result will not be null-terminated
+ if the length of <i>s2</i> is <i>n</i> or more. Each function returns <i>s1</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strecpy</i> copies bytes until a null byte has been copied, but writes
+ no bytes beyond <i>es1</i>. If any bytes are copied, <i>s1</i> is terminated
+ by a null byte, and a pointer to that byte is returned. Otherwise,
+ the original <i>s1</i> is returned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strlen</i> returns the number of bytes in <i>s</i>, not including the terminating
+ null byte.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strchr</i> (<i>strrchr</i>) returns a pointer to the first (last) occurrence
+ of byte <i>c</i> in string <i>s</i>, or <tt><font size=+1>0</font></tt> if <i>c</i> does not occur in the string.
+ The null byte terminating a string is considered to be part of
+ the string.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strpbrk</i> returns a pointer to the first occurrence in string <i>s1</i>
+ of any byte from string <i>s2</i>, <tt><font size=+1>0</font></tt> if no byte from <i>s2</i> exists in <i>s1</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strspn</i> (<i>strcspn</i>) returns the length of the initial segment of
+ string <i>s1</i> which consists entirely of bytes from (not from) string
+ <i>s2</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strtok</i> considers the string <i>s1</i> to consist of a sequence of zero
+ or more text tokens separated by spans of one or more bytes from
+ the separator string <i>s2</i>. The first call, with pointer <i>s1</i> specified,
+ returns a pointer to the first byte of the first token, and will
+ have written a null byte into <i>s1</i> immediately following the returned
+ token. The function keeps track of its position in the string
+ between separate calls; subsequent calls, signified by <i>s1</i> being
+ <tt><font size=+1>0</font></tt>, will work through the string <i>s1</i> immediately following that
+ token. The separator string <i>s2</i> may be different from call to call.
+ When no token remains in <i>s1</i>, <tt><font size=+1>0</font></tt> is returned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strdup</i> returns a pointer to a distinct copy of the null-terminated
+ string <i>s</i> in space obtained from <a href="../man3/malloc.html"><i>malloc</i>(3)</a> or <tt><font size=+1>0</font></tt> if no space can
+ be obtained.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Strstr</i> returns a pointer to the first occurrence of <i>s2</i> as a substring
+ of <i>s1</i>, or 0 if there is none. If <i>s2</i> is the null string, <i>strstr</i>
+ returns <i>s1</i>. <i>Cistrstr</i> operates analogously, but ignores ASCII case
+ differences when comparing strings.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/memory.html"><i>memory</i>(3)</a>, <a href="../man3/rune.html"><i>rune</i>(3)</a>, <a href="../man3/runestrcat.html"><i>runestrcat</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines know nothing about UTF. Use the routines in <a href="../man3/rune.html"><i>rune</i>(3)</a>
+ as appropriate. Note, however, that the definition of UTF guarantees
+ that <i>strcmp</i> compares UTF strings correctly.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The outcome of overlapping moves varies among implementations.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/string.html b/man/man3/string.html
new file mode 100644
index 00000000..55a1673b
--- /dev/null
+++ b/man/man3/string.html
@@ -0,0 +1,244 @@
+<head>
+<title>string(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>STRING(3)</b><td align=right><b>STRING(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ s_alloc, s_append, s_array, s_copy, s_error, s_free, s_incref,
+ s_memappend, s_nappend, s_new, s_newalloc, s_parse, s_reset, s_restart,
+ s_terminate, s_tolower, s_putc, s_unique, s_grow, s_read, s_read_line,
+ s_getline, s_allocinstack, s_freeinstack, s_rdinstack &ndash; extensible
+ strings<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;String.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>String* &nbsp;&nbsp;&nbsp;&nbsp;s_new(void)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s_free(String *s)<br>
+ String* &nbsp;&nbsp;&nbsp;&nbsp;s_newalloc(int n)<br>
+ String* &nbsp;&nbsp;&nbsp;&nbsp;s_array(char *p, int n)<br>
+ String* &nbsp;&nbsp;&nbsp;&nbsp;s_grow(String *s, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s_putc(String *s, int c)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s_terminate(String *s)<br>
+ String* &nbsp;&nbsp;&nbsp;&nbsp;s_reset(String *s)<br>
+ String* &nbsp;&nbsp;&nbsp;&nbsp;s_restart(String *s)<br>
+ String* &nbsp;&nbsp;&nbsp;&nbsp;s_append(String *s, char *p)<br>
+ String* &nbsp;&nbsp;&nbsp;&nbsp;s_nappend(String *s, char *p, int n)<br>
+ String* &nbsp;&nbsp;&nbsp;&nbsp;s_memappend(String *s, char *p, int n)<br>
+ String* &nbsp;&nbsp;&nbsp;&nbsp;s_copy(char *p)<br>
+ String* &nbsp;&nbsp;&nbsp;&nbsp;s_parse(String *s1, String *s2)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s_tolower(String *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>String* &nbsp;&nbsp;&nbsp;&nbsp;s_incref(String *s)<br>
+ String* &nbsp;&nbsp;&nbsp;&nbsp;s_unique(String *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Sinstack* s_allocinstack(char *file)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s_freeinstack(Sinstack *stack)<br>
+ char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s_rdinstack(Sinstack *stack, String *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;bio.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s_read(Biobuf *b, String *s, int n)<br>
+ char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s_read_line(Biobuf *b, String *s)<br>
+ char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s_getline(Biobuf *b, String *s)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines manipulate extensible strings. The basic type is
+ <tt><font size=+1>String</font></tt>, which points to an array of characters. The string maintains
+ pointers to the beginning and end of the allocated array. In addition
+ a finger pointer keeps track of where parsing will start (for
+ <i>s_parse</i>) or new characters will be added (for <i>s_putc</i>,
+ <i>s_append</i>, and <i>s_nappend</i>). The structure, and a few useful macros
+ are:<br>
+ <tt><font size=+1>typedef struct String {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Lock;<br>
+ char*base;/* base of String */<br>
+ char*end;/* end of allocated space+1 */<br>
+ char*ptr;/* ptr into String */<br>
+ ...<br>
+
+ </table>
+
+ </table>
+ } String;<br>
+ #define s_to_c(s) ((s)&#8722;&gt;base)<br>
+ #define s_len(s) ((s)&#8722;&gt;ptr&#8722;(s)&#8722;&gt;base)<br>
+ #define s_clone(s) s_copy((s)&#8722;&gt;base)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <i>S_to_c</i> is used when code needs a reference to the character array.
+ Using <tt><font size=+1>s&#8722;&gt;base</font></tt> directly is frowned upon since it exposes too much
+ of the implementation.<br>
+ <p><font size=+1><b>Allocation and freeing </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A string must be allocated before it can be used. One normally
+ does this using <i>s_new</i>, giving the string an initial allocation
+ of 128 bytes. If you know that the string will need to grow much
+ longer, you can use <i>s_newalloc</i> instead, specifying the number
+ of bytes in the initial allocation.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_free</i> causes both the string and its character array to be freed.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_grow</i> grows a string&#8217;s allocation by a fixed amount. It is useful
+ if you are reading directly into a string&#8217;s character array but
+ should be avoided if possible.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_array</i> is used to create a constant array, that is, one whose
+ contents won&#8217;t change. It points directly to the character array
+ given as an argument. Tread lightly when using this call.<br>
+ <p><font size=+1><b>Filling the string </b></font><br>
+ After its initial allocation, the string points to the beginning
+ of an allocated array of characters starting with NUL.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_putc</i> writes a character into the string at the pointer and advances
+ the pointer to point after it.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_terminate</i> writes a NUL at the pointer but doesn&#8217;t advance it.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_restart</i> resets the pointer to the begining of the string but
+ doesn&#8217;t change the contents.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_reset</i> is equivalent to <i>s_restart</i> followed by <i>s_terminate</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_append</i> and <i>s_nappend</i> copy characters into the string at the
+ pointer and advance the pointer. They also write a NUL at the
+ pointer without advancing the pointer beyond it. Both routines
+ stop copying on encountering a NUL. <i>S_memappend</i> is like <i>s_nappend</i>
+ but doesn&#8217;t stop at a NUL.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If you know the initial character array to be copied into a string,
+ you can allocate a string and copy in the bytes using <i>s_copy</i>.
+ This is the equivalent of a <i>s_new</i> followed by an <i>s_append</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_parse</i> copies the next white space terminated token from <i>s1</i> to
+ the end of <i>s2</i>. White space is defined as space, tab, and newline.
+ Both single and double quoted strings are treated as a single
+ token. The bounding quotes are not copied. There is no escape
+ mechanism.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_tolower</i> converts all ASCII characters in the string to lower
+ case.<br>
+ <p><font size=+1><b>Multithreading </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_incref</i> is used by multithreaded programs to avoid having the
+ string memory released until the last user of the string performs
+ an <i>s_free</i>. <i>S_unique</i> returns a unique copy of the string: if the
+ reference count it 1 it returns the string, otherwise it returns
+ an <i>s_clone</i> of the string.<br>
+ <p><font size=+1><b>Bio interaction </b></font><br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_read</i> reads the requested number of characters through a <i>Biobuf</i>
+ into a string. The string is grown as necessary. An eof or error
+ terminates the read. The number of bytes read is returned. The
+ string is null terminated.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_read_line</i> reads up to and including the next newline and returns
+ a pointer to the beginning of the bytes read. An eof or error
+ terminates the read. The string is null terminated.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_getline</i> reads up to the next newline, appends the input to <i>s</i>,
+ and returns a pointer to the beginning of the bytes read. Leading
+ spaces and tabs and the trailing newline are all discarded. <i>S_getline</i>
+ discards blank lines and lines beginning with <tt><font size=+1>#</font></tt>. <i>S_getline</i> ignores
+ newlines escaped by immediately-preceding
+ backslashes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>S_allocinstack</i> allocates an input stack with the single file <i>file</i>
+ open for reading. <i>S_freeinstack</i> frees an input stack. <i>S_rdinstack</i>
+ reads a line from an input stack. It follows the same rules as
+ <i>s_getline</i> except that when it encounters a line of the form <tt><font size=+1>#include</font></tt>
+ <i>newfile</i>, <i>s_getline</i> pushes <i>newfile</i> onto the input stack,
+ postponing further reading of the current file until <i>newfile</i> has
+ been read. The input stack has a maximum depth of 32 nested include
+ files.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libString<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/bio.html"><i>bio</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/stringsize.html b/man/man3/stringsize.html
new file mode 100644
index 00000000..1e8c4e91
--- /dev/null
+++ b/man/man3/stringsize.html
@@ -0,0 +1,116 @@
+<head>
+<title>stringsize(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>STRINGSIZE(3)</b><td align=right><b>STRINGSIZE(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ stringsize, stringwidth, stringnwidth, runestringsize, runestringwidth,
+ runestringnwidth &ndash; graphical size of strings<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;draw.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point stringsize(Font *f, char *s)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;stringwidth(Font *f, char *s)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;stringnwidth(Font *f, char *s, int n)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point runestringsize(Font *f, Rune *s)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;runestringwidth(Font *f, Rune *s)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;runestringnwidth(Font *f, Rune *s, int n)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines compute the geometrical extent of character strings
+ when drawn on the display. The most straightforward, <tt><font size=+1>stringsize</font></tt>,
+ returns a <tt><font size=+1>Point</font></tt> representing the vector from upper left to lower
+ right of the NUL-terminated string <i>s</i> drawn in font <i>f</i>. <tt><font size=+1>Stringwidth</font></tt>
+ returns just the <i>x</i> component.
+ <tt><font size=+1>Stringnwidth</font></tt> returns the width of the first <i>n</i> characters of <i>s</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The routines beginning with <tt><font size=+1>rune</font></tt> are analogous, but accept an
+ array of runes rather than UTF-encoded bytes.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/lib/font/bit </font></tt>&nbsp;&nbsp;&nbsp;directory of fonts<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/addpt.html"><i>addpt</i>(3)</a>, <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>, <a href="../man3/subfont.html"><i>subfont</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man7/image.html"><i>image</i>(7)</a>,
+ <a href="../man7/font.html"><i>font</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Because strings are loaded dynamically, these routines may generate
+ I/O to the server and produce calls to the graphics error function.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/subfont.html b/man/man3/subfont.html
new file mode 100644
index 00000000..16dc216d
--- /dev/null
+++ b/man/man3/subfont.html
@@ -0,0 +1,260 @@
+<head>
+<title>subfont(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SUBFONT(3)</b><td align=right><b>SUBFONT(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ allocsubfont, freesubfont, installsubfont, lookupsubfont, uninstallsubfont,
+ subfontname, readsubfont, readsubfonti, writesubfont, stringsubfont,
+ strsubfontwidth, mkfont &ndash; subfont manipulation<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;draw.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Subfont* allocsubfont(char *name, int n, int height, int ascent,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Fontchar *info, Image *i)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;freesubfont(Subfont *f)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;installsubfont(char *name, Subfont *f)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Subfont* lookupsubfont(Subfont *f)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uninstallsubfont(Subfont *f)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Subfont* readsubfont(Display *d, char *name, int fd, int dolock)
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Subfont* readsubfonti(Display *d, char *name, int fd, Image *im,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int dolock)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writesubfont(int fd, Subfont *f)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stringsubfont(Image *dst, Point p, Image *src,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Subfont *f, char *str)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ <tt><font size=+1>Point &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strsubfontwidth(Subfont *f, char *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Font* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mkfont(Subfont *f, Rune min)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Subfonts are the components of fonts that hold the character images.
+ A font comprises an array of subfonts; see <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>. A new
+ <tt><font size=+1>Subfont</font></tt> is allocated and initialized with <i>allocsubfont</i>. See <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>
+ for the meaning of <i>n</i>, <i>height</i>, <i>ascent</i>, and <i>info</i>, and the arrangement
+ of characters in image <i>i</i>. The <i>name</i> is
+ used to identify the subfont in the subfont cache; see the descriptions
+ <i>lookupsubfont</i> and <i>installsubfont</i> (<i>q.v.</i>). The appropriate fields
+ of the returned <tt><font size=+1>Subfont</font></tt> structure are set to the passed arguments,
+ and the image is registered as a subfont with the graphics device
+ <a href="../man3/draw.html"><i>draw</i>(3)</a>. <i>Allocsubfont</i> returns 0 on failure.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Freesubfont</i> frees a subfont and all its associated structure including
+ the associated image. Since <i>freesbufont</i> calls <i>free</i> on <tt><font size=+1>f&#8722;&gt;info</font></tt>,
+ if <tt><font size=+1>f&#8722;&gt;info</font></tt> was not allocated by <a href="../man3/malloc.html"><i>malloc</i>(3)</a> it should be zeroed before
+ calling <i>subffree</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A number of subfonts are kept in external files. The convention
+ for naming subfont files is:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/font/</font></tt><i>name</i><tt><font size=+1>/</font></tt><i>class</i><tt><font size=+1>.</font></tt><i>size</i><tt><font size=+1>.</font></tt><i>depth
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+
+ </table>
+ where <i>size</i> is approximately the height in pixels of the lower
+ case letters (without ascenders or descenders). If there is only
+ one version of the subfont, the <tt><font size=+1>.</font></tt><i>depth</i> extension is elided. <i>Class</i>
+ describes the range of runes encoded in the subfont: <tt><font size=+1>ascii</font></tt>, <tt><font size=+1>latin1</font></tt>,
+ <tt><font size=+1>greek</font></tt>, etc.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Subfonts are cached within the program, so a subfont shared between
+ fonts will be loaded only once. <i>Installsubfont</i> stores subfont
+ <i>f</i> under the given <i>name</i>, typically the file name from which it
+ was read. <i>Uninstallsubfont</i> removes the subfont from the cache.
+ Finally, <i>lookupsubfont</i> searches for a subfont with the given
+ <i>name</i> in the cache and returns it, or nil if no such subfont exists.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Subfontname</i> is used to locate subfonts given their names within
+ the fonts. The default version constructs a name given the <i>cfname</i>,
+ its name within the font, <i>fname</i>, the name of the font, and the
+ maximum depth suitable for this subfont. This interface allows
+ a partially specified name within a font to be resolved at
+ run-time to the name of a file holding a suitable subfont. Although
+ it is principally a routine internal to the library, <i>subfontname</i>
+ may be substituted by the application to provide a less file-oriented
+ subfont naming scheme.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The format of a subfont file is described in <a href="../man7/font.html"><i>font</i>(7)</a>. Briefly,
+ it contains a image with all the characters in it, followed by
+ a subfont header, followed by character information. <i>Readsubfont</i>
+ reads a subfont from the file descriptor <i>fd</i>. The <i>name</i> is used
+ to identify the font in the cache. The <i>dolock</i> argument specifies
+ whether
+ the routine should synchronize use of the <i>Display</i> with other processes;
+ for single-threaded applications it may always be zero. <i>Readsubfonti</i>
+ does the same for a subfont whose associated image is already
+ in memory; it is passed as the argument <i>im</i>. In other words, <i>readsubfonti</i>
+ reads only the header and character
+ information from the file descriptor.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Writesubfont</i> writes on <i>fd</i> the part of a subfont file that comes
+ after the image. It should be preceded by a call to <i>writeimage</i>
+ (see <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Stringsubfont</i> is analogous to <tt><font size=+1>string</font></tt> (see <a href="../man3/draw.html"><i>draw</i>(3)</a>) for subfonts.
+ Rather than use the underlying font caching primitives, it calls
+ <tt><font size=+1>draw</font></tt> for each character. It is intended for stand-alone environments
+ such as operating system kernels. <i>Strsubfontwidth</i> returns the
+ width of the string <i>s</i> in as it would appear if drawn with
+ <i>stringsubfont</i> in <tt><font size=+1>Subfont f</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Mkfont</i> takes as argument a <tt><font size=+1>Subfont</font></tt> <i>s</i> and returns a pointer to
+ a <tt><font size=+1>Font</font></tt> that maps the character images in <i>s</i> into the <tt><font size=+1>Runes</font></tt> <i>min</i>
+ to <i>min</i><tt><font size=+1>+</font></tt><i>s</i><tt><font size=+1>&#8722;&gt;n&#8722;1</font></tt>.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/font</font></tt>&nbsp;&nbsp;&nbsp;bitmap font file tree<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>, <a href="../man7/image.html"><i>image</i>(7)</a>,
+ <a href="../man7/font.html"><i>font</i>(7)</a><br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ All of the functions use the graphics error function (see <a href="../man3/graphics.html"><i>graphics</i>(3)</a>).<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/sysfatal.html b/man/man3/sysfatal.html
new file mode 100644
index 00000000..15ceb0ca
--- /dev/null
+++ b/man/man3/sysfatal.html
@@ -0,0 +1,71 @@
+<head>
+<title>sysfatal(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>SYSFATAL(3)</b><td align=right><b>SYSFATAL(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ sysfatal &ndash; system error messages<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void sysfatal(char *fmt, ...)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Sysfatal</i> prints to standard error the name of the running program,
+ a colon and a space, the message described by the <a href="../man3/print.html"><i>print</i>(3)</a> format
+ string <i>fmt</i> and subsequent arguments, and a newline. It then calls
+ <a href="../man3/exits.html"><i>exits</i>(3)</a> with the formatted message as argument. The program&#8217;s
+ name is the value of <tt><font size=+1>argv0</font></tt>, which will be set if the
+ program uses the <a href="../man3/arg.html"><i>arg</i>(3)</a> interface to process its arguments. If
+ <tt><font size=+1>argv0</font></tt> is null, it is ignored and the following colon and space
+ are suppressed.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/sysfatal.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a>, <a href="../man3/errstr.html"><i>errstr</i>(3)</a>, the <tt><font size=+1>%r</font></tt> format in <a href="../man3/print.html"><i>print</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/thread.html b/man/man3/thread.html
new file mode 100644
index 00000000..b14d97e6
--- /dev/null
+++ b/man/man3/thread.html
@@ -0,0 +1,383 @@
+<head>
+<title>thread(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>THREAD(3)</b><td align=right><b>THREAD(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ alt, chancreate, chanfree, chaninit, chanprint, chansetname, mainstacksize,
+ proccreate, procdata, recv, recvp, recvul, send, sendp, sendul,
+ nbrecv, nbrecvp, nbrecvul, nbsend, nbsendp, nbsendul, threadcreate,
+ threaddata, threadexec, threadexecl, threadexits, threadexitsall,
+ threadgetgrp, threadgetname, threadint,
+ threadintgrp, threadkill, threadkillgrp, threadmain, threadnotify,
+ threadid, threadpid, threadsetgrp, threadsetname, threadsetstate,
+ threadspawn, threadwaitchan, yield &ndash; thread and proc management<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;thread.h&gt;<br>
+ #define &nbsp;&nbsp;&nbsp;CHANEND &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0<br>
+ #define &nbsp;&nbsp;&nbsp;CHANSND &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1<br>
+ #define &nbsp;&nbsp;&nbsp;CHANRCV &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2<br>
+ #define &nbsp;&nbsp;&nbsp;CHANNOP &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3<br>
+ #define &nbsp;&nbsp;&nbsp;CHANNOBLK &nbsp;&nbsp;&nbsp;4<br>
+ typedef struct Alt Alt;<br>
+ struct Alt {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Channel *c;<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*v;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;op;<br>
+ Channel **tag;<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;entryno;<br>
+ char &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*name;<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadmain(int argc, char *argv[])<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mainstacksize<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;proccreate(void (*fn)(void*), void *arg, uint stacksize)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadcreate(void (*fn)(void*), void *arg, uint stacksize)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadexits(char *status)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadexitsall(char *status)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yield(void)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadid(void)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadgrp(void)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadsetgrp(int group)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadpid(int id)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadint(int id)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadintgrp(int group)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadkill(int id)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadkillgrp(int group)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadsetname(char *name)<br>
+ char* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadgetname(void)<br>
+ void** &nbsp;&nbsp;&nbsp;&nbsp;threaddata(void)<br>
+ void** &nbsp;&nbsp;&nbsp;&nbsp;procdata(void)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chaninit(Channel *c, int elsize, int nel)<br>
+ Channel* chancreate(int elsize, int nel)<br>
+ void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chanfree(Channel *c)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alt(Alt *alts)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recv(Channel *c, void *v)<br>
+ void* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recvp(Channel *c)<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;recvul(Channel *c)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nbrecv(Channel *c, void *v)<br>
+ void* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nbrecvp(Channel *c)<br>
+ ulong &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nbrecvul(Channel *c)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;send(Channel *c, void *v)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sendp(Channel *c, void *v)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sendul(Channel *c, ulong v)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nbsend(Channel *c, void *v)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nbsendp(Channel *c, void *v)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nbsendul(Channel *c, ulong v)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chanprint(Channel *c, char *fmt, ...)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadspawn(int fd[3], char *file, char *args[])<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadexecl(Channel *cpid, int fd[3], char *file, ...)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadexec(Channel *cpid, int fd[3], char *file, char *args[])<br>
+ Channel* threadwaitchan(void)<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;threadnotify(int (*f)(void*, char*), int in)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The thread library provides parallel programming support similar
+ to that of the languages Alef and Newsqueak. Threads and procs
+ occupy a shared address space, communicating and synchronizing
+ through <i>channels</i> and shared variables.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <i>proc</i> is a Plan 9 process that contains one or more cooperatively
+ scheduled <i>threads</i>. Programs using threads must replace <i>main</i> by
+ <i>threadmain</i>. The thread library provides a <i>main</i> function that sets
+ up a proc with a single thread executing <i>threadmain</i> on a stack
+ of size <i>mainstacksize</i> (default eight kilobytes). To set
+ <i>mainstacksize</i>, declare a global variable initialized to the desired
+ value (<i>e.g.</i>, <tt><font size=+1>int mainstacksize = 1024</font></tt>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Threadcreate</i> creates a new thread in the calling proc, returning
+ a unique integer identifying the thread; the thread executes <i>fn(arg)</i>
+ on a stack of size <i>stacksize</i>. Thread stacks are allocated in shared
+ memory, making it valid to pass pointers to stack variables between
+ threads and procs. <i>Proccreate</i> creates a new proc,
+ and inside that proc creates a single thread as <i>threadcreate</i> would,
+ returning the id of the created thread. Be aware that the calling
+ thread may continue execution before the newly created proc and
+ thread are scheduled. Because of this, <i>arg</i> should not point to
+ data on the stack of a function that could return before the
+ new process is scheduled.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Threadexits</i> terminates the calling thread. If the thread is the
+ last in its proc, <i>threadexits</i> also terminates the proc, using
+ <i>status</i> as the exit status. <i>Threadexitsall</i> terminates all procs
+ in the program, using <i>status</i> as the exit status.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When the last thread in <i>threadmain</i>&#8217;s proc exits, the program will
+ appear to its parent to have exited. The remaining procs will
+ still run together, but as a background program.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The threads in a proc are coroutines, scheduled nonpreemptively
+ in a round-robin fashion. A thread must explicitly relinquish
+ control of the processor before another thread in the same proc
+ is run. Calls that do this are <i>yield</i>, <i>proccreate</i>, <i>threadexec</i>,
+ <i>threadexecl</i>, <i>threadexits</i>, <i>threadspawn</i>, <i>alt</i>, <i>send</i>, and <i>recv</i> (and
+ the
+ calls related to <i>send</i> and <i>recv</i>--see their descriptions further on).
+ Procs are scheduled by the operating system. Therefore, threads
+ in different procs can preempt one another in arbitrary ways and
+ should synchronize their actions using <tt><font size=+1>qlocks</font></tt> (see <a href="../man3/lock.html"><i>lock</i>(3)</a>) or
+ channel communication. System calls such as <a href="../man3/read.html"><i>read</i>(3)</a>
+ block the entire proc; all threads in a proc block until the system
+ call finishes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ As mentioned above, each thread has a unique integer thread id.
+ Thread ids are not reused; they are unique across the life of
+ the program. <i>Threadid</i> returns the id for the current thread. Each
+ thread also has a thread group id. The initial thread has a group
+ id of zero. Each new thread inherits the group id of the
+ thread that created it. <i>Threadgrp</i> returns the group id for the
+ current thread; <i>threadsetgrp</i> sets it. <i>Threadpid</i> returns the pid
+ of the Plan 9 process containing the thread identified by <i>id</i>,
+ or &ndash;1 if no such thread is found.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Threadint</i> interrupts a thread that is blocked in a channel operation
+ or system call. <i>Threadintgrp</i> interrupts all threads with the given
+ group id. <i>Threadkill</i> marks a thread to die when it next relinquishes
+ the processor (via one of the calls listed above). If the thread
+ is blocked in a channel operation or system call, it is
+ also interrupted. <i>Threadkillgrp</i> kills all threads with the given
+ group id. Note that <i>threadkill</i> and <i>threadkillgrp</i> will not terminate
+ a thread that never relinquishes the processor.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Primarily for debugging, threads can have string names associated
+ with them. <i>Threadgetname</i> returns the current thread&#8217;s name; <i>threadsetname</i>
+ sets it. The pointer returned by <i>threadgetname</i> is only valid until
+ the next call to <i>threadsetname</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Also for debugging, threads have a string state associated with
+ them. <i>Threadsetstate</i> sets the state string. There is no <i>threadgetstate</i>;
+ since the thread scheduler resets the state to <tt><font size=+1>Running</font></tt> every time
+ it runs the thread, it is only useful for debuggers to inspect
+ the state.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Threaddata</i> returns a pointer to a per-thread pointer that may
+ be modified by threaded programs for per-thread storage. Similarly,
+ <i>procdata</i> returns a pointer to a per-proc pointer.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Threadexecl</i> and <i>threadexec</i> are threaded analogues of <i>exec</i> and
+ <i>execl</i> (see <a href="../man3/exec.html"><i>exec</i>(3)</a>); on success, they replace the calling thread
+ and invoke the external program, never returning. (Unlike on Plan
+ 9, the calling thread need not be the only thread in its proc--the
+ other threads will continue executing.) On error, they return
+ &ndash;1. If <i>cpid</i> is not null, the pid of the invoked program will be
+ sent along <i>cpid</i> (using <i>sendul</i>) once the program has been started,
+ or &ndash;1 will be sent if an error occurs. <i>Threadexec</i> and <i>threadexecl</i>
+ will not access their arguments after sending a result along <i>cpid</i>.
+ Thus, programs that malloc the <i>argv</i> passed to <i>threadexec
+ </i>can safely free it once they have received the <i>cpid</i> response.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Threadexecl</i> and <i>threadexec</i> will duplicate (see <a href="../man3/dup.html"><i>dup</i>(3)</a>) the three
+ file descriptors in <i>fd</i> onto standard input, output, and error
+ for the external program and then close them in the calling thread.
+ Beware of code that sets<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>fd[0] = 0;<br>
+ fd[1] = 1;<br>
+ fd[2] = 2;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ to use the current standard files. The correct code is<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>fd[0] = dup(0, &#8722;1);<br>
+ fd[1] = dup(1, &#8722;1);<br>
+ fd[2] = dup(2, &#8722;1);<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <i>Threadspawn</i> is like <i>threadexec</i> but does not replace the current
+ thread. It returns the pid of the invoked program on success,
+ or &ndash;1 on error.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Threadwaitchan</i> returns a channel of pointers to <tt><font size=+1>Waitmsg</font></tt> structures
+ (see <a href="../man3/wait.html"><i>wait</i>(3)</a>). When an exec&#8217;ed process exits, a pointer to a <tt><font size=+1>Waitmsg</font></tt>
+ is sent to this channel. These <tt><font size=+1>Waitmsg</font></tt> structures have been allocated
+ with <a href="../man3/malloc.html"><i>malloc</i>(3)</a> and should be freed after use.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>Channel</font></tt> is a buffered or unbuffered queue for fixed-size messages.
+ Procs and threads <i>send</i> messages into the channel and <i>recv</i> messages
+ from the channel. If the channel is unbuffered, a <i>send</i> operation
+ blocks until the corresponding <i>recv</i> operation occurs and <i>vice
+ versa</i>. <i>Chaninit</i> initializes a <tt><font size=+1>Channel</font></tt> for
+ messages of size <i>elsize</i> and with a buffer holding <i>nel</i> messages.
+ If <i>nel</i> is zero, the channel is unbuffered. <i>Chancreate</i> allocates
+ a new channel and initializes it. <i>Chanfree</i> frees a channel that
+ is no longer used. <i>Chanfree</i> can be called by either sender or
+ receiver after the last item has been sent or received. Freeing
+ the
+ channel will be delayed if there is a thread blocked on it until
+ that thread unblocks (but <i>chanfree</i> returns immediately).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>name</font></tt> element in the <tt><font size=+1>Channel</font></tt> structure is a description intended
+ for use in debugging. <i>Chansetname</i> sets the name.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Send</i> sends the element pointed at by <i>v</i> to the channel <i>c</i>. If <i>v</i>
+ is null, zeros are sent. <i>Recv</i> receives an element from <i>c</i> and stores
+ it in <i>v</i>. If <i>v</i> is null, the received value is discarded. <i>Send</i> and
+ <i>recv</i> return 1 on success, &ndash;1 if interrupted. <i>Nbsend</i> and <i>nbrecv</i>
+ behave similarly, but return 0 rather than blocking.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Sendp</i>, <i>nbsendp</i>, <i>sendul</i>, and <i>nbsendul</i> send a pointer or an unsigned
+ long; the channel must have been initialized with the appropriate
+ <i>elsize</i>. <i>Recvp</i>, <i>nbrecvp</i>, <i>recvul</i>, and <i>nbrecvul</i> receive a pointer
+ or an unsigned long; they return zero when a zero is received,
+ when interrupted, or (for <i>nbrecvp</i> and <i>nbrecvul</i>) when the
+ operation would have blocked. To distinguish between these three
+ cases, use <i>recv</i> or <i>nbrecv</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Alt</i> can be used to recv from or send to one of a number of channels,
+ as directed by an array of <tt><font size=+1>Alt</font></tt> structures, each of which describes
+ a potential send or receive operation. In an <tt><font size=+1>Alt</font></tt> structure, <tt><font size=+1>c</font></tt>
+ is the channel; <tt><font size=+1>v</font></tt> the value pointer (which may be null); and <tt><font size=+1>op</font></tt>
+ the operation: <tt><font size=+1>CHANSND</font></tt> for a send operation,
+ <tt><font size=+1>CHANRECV</font></tt> for a recv operation; <tt><font size=+1>CHANNOP</font></tt> for no operation (useful
+ when <i>alt</i> is called with a varying set of operations). The array
+ of <tt><font size=+1>Alt</font></tt> structures is terminated by an entry with <i>op</i> <tt><font size=+1>CHANEND</font></tt> or
+ <tt><font size=+1>CHANNOBLK</font></tt>. If at least one <tt><font size=+1>Alt</font></tt> structure can proceed, one of them
+ is chosen at random to be executed. <i>Alt</i> returns the
+ index of the chosen structure. If no operations can proceed and
+ the list is terminated with <tt><font size=+1>CHANNOBLK</font></tt>, <i>alt</i> returns the index of
+ the terminating <tt><font size=+1>CHANNOBLK</font></tt> structure. Otherwise, <i>alt</i> blocks until
+ one of the operations can proceed, eventually returning the index
+ of the structure executes. <i>Alt</i> returns &ndash;1 when
+ interrupted. The <tt><font size=+1>tag</font></tt> and <tt><font size=+1>entryno</font></tt> fields in the <tt><font size=+1>Alt</font></tt> structure are
+ used internally by <i>alt</i> and need not be initialized. They are not
+ used between <i>alt</i> calls.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Chanprint</i> formats its arguments in the manner of <a href="../man3/print.html"><i>print</i>(3)</a> and
+ sends the result to the channel <i>c.</i> The string delivered by <i>chanprint</i>
+ is allocated with <a href="../man3/malloc.html"><i>malloc</i>(3)</a> and should be freed upon receipt.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Thread library functions do not return on failure; if errors occur,
+ the entire program is aborted.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Threaded programs should use <i>threadnotify</i> in place of <i>atnotify</i>
+ (see <a href="../man3/notify.html"><i>notify</i>(3)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ It is safe to use <a href="../man3/sysfatal.html"><i>sysfatal</i>(3)</a> in threaded programs. <i>Sysfatal</i> will
+ print the error string and call <i>threadexitsall</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ It is not safe to call <i>rfork</i> in a threaded program, except to
+ call <tt><font size=+1>rfork(RFNOTEG)</font></tt> from the main proc before any other procs
+ have been created. To create new processes, use <i>proccreate</i>.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/acid/thread</font></tt> contains useful <a href="../man1/acid.html"><i>acid</i>(1)</a> functions
+ for debugging threaded programs.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>/usr/local/plan9/src/libthread/test</font></tt> contains some example programs.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libthread<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/intro.html"><i>intro</i>(3)</a>, <a href="../man3/ioproc.html"><i>ioproc</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To avoid name conflicts, <i>alt</i>, <i>nbrecv</i>, <i>nbrecvp</i>, <i>nbrecvul</i>, <i>nbsend</i>,
+ <i>nbsendp</i>, <i>nbsendul</i>, <i>recv</i>, <i>recvp</i>, <i>recvul</i>, <i>send</i>, <i>sendp</i>, and <i>sendul</i>
+ are defined as macros that expand to <i>chanalt</i>, <i>channbrecv</i>, and
+ so on. <i>Yield</i> is defined as a macro that expands to <i>threadyield</i>.
+ See <a href="../man3/intro.html"><i>intro</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The implementation of <i>threadnotify</i> may not be correct.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/time.html b/man/man3/time.html
new file mode 100644
index 00000000..de0de468
--- /dev/null
+++ b/man/man3/time.html
@@ -0,0 +1,79 @@
+<head>
+<title>time(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>TIME(3)</b><td align=right><b>TIME(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ time, nsec &ndash; time in seconds and nanoseconds since epoch<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long time(long *tp)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>vlong nsec(void)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Both <i>time</i> and <i>nsec</i> return the time since the epoch 00:00:00 GMT,
+ Jan. 1, 1970. The return value of the former is in seconds and
+ the latter in nanoseconds. For <i>time</i>, if <i>tp</i> is not zero then <tt><font size=+1>*</font></tt><i>tp</i>
+ is also set to the answer.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/time.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These functions set <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To avoid name conflicts with the underlying system, <i>time</i> and <i>nsec</i>
+ are preprocessor macros defined as <i>p9time</i> and <i>p9nsec</i>; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/udpread.html b/man/man3/udpread.html
new file mode 100644
index 00000000..e8f0d37b
--- /dev/null
+++ b/man/man3/udpread.html
@@ -0,0 +1,105 @@
+<head>
+<title>udpread(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>UDPREAD(3)</b><td align=right><b>UDPREAD(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ udpread, udpwrite &ndash; read and write UDP packets<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>#include &lt;ip.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>typedef struct Udphdr Udphdr;<br>
+ </font></tt>struct Udphdr<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar &nbsp;&nbsp;&nbsp;raddr[IPaddrlen];/* remote address and port */<br>
+ uchar &nbsp;&nbsp;&nbsp;laddr[IPaddrlen];/* local address and port */<br>
+ uchar &nbsp;&nbsp;&nbsp;rport[2];<br>
+ uchar &nbsp;&nbsp;&nbsp;lport[2];<br>
+
+ </table>
+ };<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>long &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;udpread(int fd, Udphdr *hdr, void *data, long n)<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>long udpwrite(int fd, Udphdr *hdr, void *data, long n)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Udpread</i> and <i>udpwrite</i> read and write UDP packets from the UDP network
+ connection established on file descriptor <i>fd</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Udpread</i> reads at most <i>n</i> bytes of packet body into <i>data ,</i> stores
+ the header in <i>hdr</i>, and returns the number of bytes stored in <i>data</i>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Udpwrite</i> writes the <i>n</i> bytes stored in <i>data</i> in a UDP packet with
+ header <i>hdr</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Note that the <tt><font size=+1>Udphdr</font></tt> frames the addresses as local and remote
+ instead of source and destination. Thus the <i>hdr</i> filled in for
+ a packet read by <i>udpread</i> can be used unchanged in <i>udpwrite</i> to
+ send a response back to the sender of the original packet.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/udp.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/ip.html"><i>ip</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/wait.html b/man/man3/wait.html
new file mode 100644
index 00000000..84322bc2
--- /dev/null
+++ b/man/man3/wait.html
@@ -0,0 +1,170 @@
+<head>
+<title>wait(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>WAIT(3)</b><td align=right><b>WAIT(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ await, awaitnohang, awaitfor, wait, waitnohang, waitfor, waitpid
+ &ndash; wait for a process to exit<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Waitmsg* &nbsp;&nbsp;&nbsp;wait(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Waitmsg* &nbsp;&nbsp;&nbsp;waitnohang(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Waitmsg* &nbsp;&nbsp;&nbsp;waitfor(int pid)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;waitpid(void)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;await(char *s, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;awaitnohang(char *s, int n)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;awaitfor(int pid, char *s, int n)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Wait</i> causes a process to wait for any child process (see <a href="../man2/fork.html"><i>fork</i>(2)</a>
+ and <a href="../man3/rfork.html"><i>rfork</i>(3)</a>) to exit. It returns a <tt><font size=+1>Waitmsg</font></tt> holding information
+ about the exited child. A <tt><font size=+1>Waitmsg</font></tt> has this structure:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>typedef<br>
+ struct Waitmsg<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ int pid; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* of loved one */<br>
+ ulong time[3]; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* of loved one &amp; descendants */<br>
+ char *msg;<br>
+
+ </table>
+ } Waitmsg;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ <tt><font size=+1>Pid</font></tt> is the child&#8217;s process id. The <tt><font size=+1>time</font></tt> array contains the time
+ the child and its descendants spent in user code, the time spent
+ in system calls, and the child&#8217;s elapsed real time, all in units
+ of milliseconds. <tt><font size=+1>Msg</font></tt> contains the message that the child specified
+ in <a href="../man3/exits.html"><i>exits</i>(3)</a>. For a normal exit, <tt><font size=+1>msg[0]</font></tt> is zero, otherwise <tt><font size=+1>msg
+ </font></tt>is the exit string prefixed by the process name, a blank, the
+ process id, and a colon.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If there are no more children to wait for, <i>wait</i> returns immediately,
+ with return value nil.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>Waitmsg</font></tt> structure is allocated by <a href="../man3/malloc.html"><i>malloc</i>(3)</a> and should be
+ freed after use. For programs that only need the pid of the exiting
+ program, <i>waitpid</i> returns just the pid and discards the rest of
+ the information.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Waitnohang</i> is like <i>wait</i> but does not block if there are no more
+ children to wait for. Instead it returns immediately and sets
+ <i>errstr</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Waitfor</i> is like <i>wait</i> but waits for a particular <i>pid</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The underlying calls are <i>await</i>, <i>awaitnohang</i>, and <i>awaitfor</i>, which
+ fill in the <i>n</i>-byte buffer <i>s</i> with a textual representation of the
+ pid, times, and exit string. There is no terminal NUL. The return
+ value is the length, in bytes, of the data.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The filled-in buffer may be parsed (after appending a NUL) using
+ <i>tokenize</i> (see <a href="../man3/getfields.html"><i>getfields</i>(3)</a>); the resulting fields are, in order,
+ pid, the three times, and the exit string, which will be <tt><font size=+1>''</font></tt> for
+ normal exit. If the representation is longer than <i>n</i> bytes, it
+ is truncated but, if possible, properly formatted. The information
+ that
+ does not fit in the buffer is discarded, so a subsequent call
+ to <i>await</i> will return the information about the next exiting child,
+ not the remainder of the truncated message. In other words, each
+ call to <i>await</i> returns the information about one child, blocking
+ if necessary if no child has exited. If the calling process has
+ no
+ living children, <i>await</i> returns <tt><font size=+1>&#8722;1</font></tt>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/lib9/wait.c
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>/usr/local/plan9/src/lib9/await.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/rfork.html"><i>rfork</i>(3)</a>, <a href="../man3/exits.html"><i>exits</i>(3)</a>,<br>
+
+</table>
+<p><font size=+1><b>DIAGNOSTICS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines set <i>errstr</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To avoid name conflicts with the underlying system, <i>wait</i>, <i>waitpid</i>,
+ and <i>waitfor</i> are preprocessor macros defined as <i>p9wait</i>, <i>p9waitpid</i>,
+ and <i>p9waitfor</i>; see <a href="../man3/intro.html"><i>intro</i>(3)</a>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/wctl.html b/man/man3/wctl.html
new file mode 100644
index 00000000..071217e2
--- /dev/null
+++ b/man/man3/wctl.html
@@ -0,0 +1,78 @@
+<head>
+<title>wctl(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>WCTL(3)</b><td align=right><b>WCTL(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ drawresizewindow, drawsetlabel, drawtopwindow &ndash; window management<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;draw.h&gt;
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void drawresizewindow(Rectangle r)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;drawsetlabel(Display *d, char *name)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void drawtopwindow(void)<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These routines interact with a window manager to set the properties
+ of the window running the current program. They substitute for
+ interacting directly with the Plan 9 <i>rio</i>&#8217;s <tt><font size=+1>/dev/wctl</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Drawresizewindow</i> requests that the program&#8217;s window be resized
+ to have the width and height of the rectangle <i>r</i>. Only the width
+ and height are important; the offset is ignored.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Drawsetlabel</i> requests that the program&#8217;s window title be set to
+ <i>name</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Drawtopwindow</i> requests that the program&#8217;s window be moved above
+ all other windows and given the input focus.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw/x11&#8722;init.c<br>
+ /usr/local/plan9/src/libdraw/x11&#8722;wsys.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man3/window.html b/man/man3/window.html
new file mode 100644
index 00000000..83355bdd
--- /dev/null
+++ b/man/man3/window.html
@@ -0,0 +1,241 @@
+<head>
+<title>window(3) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>WINDOW(3)</b><td align=right><b>WINDOW(3)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Screen, allocscreen, publicscreen, freescreen, allocwindow, bottomwindow,
+ bottomnwindows, topwindow, topnwindows, originwindow &ndash; window management<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;u.h&gt;<br>
+ #include &lt;libc.h&gt;<br>
+ #include &lt;draw.h&gt;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>typedef<br>
+ struct Screen<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Display &nbsp;&nbsp;&nbsp;&nbsp;*display; /* display holding data */<br>
+ int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* id of system&#8722;held Screen */<br>
+ Image &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*image; &nbsp;&nbsp;&nbsp;&nbsp;/* unused; for reference only */<br>
+ Image &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*fill; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* color to paint behind windows */<br>
+
+ </table>
+ } Screen;<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Screen* allocscreen(Image *image, Image *fill, int public)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Screen* publicscreen(Display *d, int id, ulong chan)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;freescreen(Screen *s)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>Image* &nbsp;&nbsp;&nbsp;allocwindow(Screen *s, Rectangle r, int ref, int val)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bottomwindow(Image *w)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bottomnwindows(Image **wp, int nw)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;topwindow(Image *w)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>void &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;topnwindows(Image **wp, int nw)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;originwindow(Image *w, Point log, Point scr)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>enum<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ /* refresh methods */<br>
+ Refbackup= 0,<br>
+ Refnone= 1,<br>
+ Refmesg= 2<br>
+
+ </table>
+
+ </table>
+ };<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Windows are represented as <tt><font size=+1>Images</font></tt> and may be treated as regular
+ images for all drawing operations. The routines discussed here
+ permit the creation, deletion, and shuffling of windows, facilities
+ that do not apply to regular images.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To create windows, it is first necessary to allocate a <tt><font size=+1>Screen</font></tt>
+ data structure to gather them together. A <tt><font size=+1>Screen</font></tt> turns an arbitrary
+ image into something that may have windows upon it. It is created
+ by <tt><font size=+1>allocscreen</font></tt>, which takes an <i>image</i> upon which to place the windows
+ (typically <tt><font size=+1>display&#8722;&gt;image</font></tt>), a <i>fill</i> image
+ to paint the background behind all the windows on the image, and
+ a flag specifying whether the result should be publicly visible.
+ If it is public, an arbitrary other program connected to the same
+ display may acquire a pointer to the same screen by calling <tt><font size=+1>publicscreen</font></tt>
+ with the <tt><font size=+1>Display</font></tt> pointer and the <i>id</i> of the
+ published <tt><font size=+1>Screen</font></tt>, as well as the expected channel descriptor,
+ as a safety check. It will usually require some out-of-band coordination
+ for programs to share a screen profitably. <tt><font size=+1>Freescreen</font></tt> releases
+ a <tt><font size=+1>Screen</font></tt>, although it may not actually disappear from view until
+ all the windows upon it have also been
+ deallocated.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Unlike <tt><font size=+1>allocwindow</font></tt>, <tt><font size=+1>allocscreen</font></tt> does <i>not</i> initialize the appearance
+ of the <tt><font size=+1>Screen</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Windows are created by <tt><font size=+1>allocwindow</font></tt>, which takes a pointer to the
+ <tt><font size=+1>Screen</font></tt> upon which to create the window, a rectangle <i>r</i> defining
+ its geometry, an integer pixel value <i>val</i> to color the window initially,
+ and a refresh method <tt><font size=+1>ref</font></tt>. The refresh methods are <tt><font size=+1>Refbackup</font></tt>, which
+ provides backing store and is the
+ method used by <a href="../man1/rio.html"><i>rio</i>(1)</a> for its clients; <tt><font size=+1>Refnone</font></tt>, which provides
+ no refresh and is designed for temporary uses such as sweeping
+ a display rectangle, for windows that are completely covered by
+ other windows, and for windows that are already protected by backing
+ store; and <tt><font size=+1>Refmesg</font></tt>, which causes messages to be
+ delivered to the owner of the window when it needs to be repainted.
+ <tt><font size=+1>Refmesg</font></tt> is not fully implemented.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The result of <tt><font size=+1>allocwindow</font></tt> is an <tt><font size=+1>Image</font></tt> pointer that may be treated
+ like any other image. In particular, it is freed by calling <tt><font size=+1>freeimage</font></tt>
+ (see <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>). The following functions, however, apply only
+ to windows, not regular images.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Bottomwindow</font></tt> pushes window <i>w</i> to the bottom of the stack of windows
+ on its <tt><font size=+1>Screen</font></tt>, perhaps obscuring it. <tt><font size=+1>Topwindow</font></tt> pulls window <i>w</i>
+ to the top, making it fully visible on its <tt><font size=+1>Screen</font></tt>. (This <tt><font size=+1>Screen</font></tt>
+ may itself be within a window that is not fully visible; <tt><font size=+1>topwindow</font></tt>
+ will not affect the stacking of this parent
+ window.) <tt><font size=+1>Bottomnwindows</font></tt> and <tt><font size=+1>Topnwindows</font></tt> are analogous, but push
+ or pull a group of <i>nw</i> windows listed in the array <i>wp</i>. The order
+ within <i>wp</i> is unaffected.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each window is created as an <tt><font size=+1>Image</font></tt> whose <tt><font size=+1>Rectangle r</font></tt> corresponds
+ to the rectangle given to <tt><font size=+1>allocwindow</font></tt> when it was created. Thus,
+ a newly created window <i>w</i> resides on its <tt><font size=+1>Screen&#8722;&gt;image</font></tt> at <i>w</i><tt><font size=+1>&#8722;&gt;r</font></tt> and
+ has internal coordinates <i>w</i><tt><font size=+1>&#8722;&gt;r</font></tt><i>.</i> Both these may be changed by a call
+ to <tt><font size=+1>originwindow</font></tt>. The two
+ <tt><font size=+1>Point</font></tt> arguments to <tt><font size=+1>originwindow</font></tt> define the upper left corner of
+ the logical coordinate system (<i>log</i>) and screen position (<i>scr</i>).
+ Their usage is shown in the Examples section.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <a href="../man1/Rio.html"><i>Rio</i>(1)</a> creates its client windows with backing store, <tt><font size=+1>Refbackup</font></tt>.
+ The graphics initialization routine, <tt><font size=+1>initdraw</font></tt> (see <a href="../man3/graphics.html"><i>graphics</i>(3)</a>),
+ builds a <tt><font size=+1>Screen</font></tt> upon this, and then allocates upon that another
+ window indented to protect the border. That window is created
+ <tt><font size=+1>Refnone</font></tt>, since the backing store created by <tt><font size=+1>rio
+ </font></tt>protects its contents. That window is the one known in the library
+ by the global name <tt><font size=+1>screen</font></tt> (a historic but confusing choice).<br>
+
+</table>
+<p><font size=+1><b>EXAMPLES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To move a window to the upper left corner of the display,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>originwindow(w, w&#8722;&gt;r.min, Pt(0, 0));<br>
+ </font></tt>
+ </table>
+
+ </table>
+ To leave a window where it is on the screen but change its internal
+ coordinate system so (0, 0) is the upper left corner of the window,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>originwindow(w, Pt(0, 0), w&#8722;&gt;r.min);<br>
+ </font></tt>
+ </table>
+
+ </table>
+ After this is done, <tt><font size=+1>w&#8722;&gt;r</font></tt> is translated to the origin and there
+ will be no way to discover the actual screen position of the window
+ unless it is recorded separately.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/libdraw<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a><br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The refresh method <tt><font size=+1>Refmesg</font></tt> should be finished.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man4/9pserve.html b/man/man4/9pserve.html
new file mode 100644
index 00000000..c9f2c3b7
--- /dev/null
+++ b/man/man4/9pserve.html
@@ -0,0 +1,79 @@
+<head>
+<title>9pserve(4) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>9PSERVE(4)</b><td align=right><b>9PSERVE(4)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ 9pserve &ndash; announce and multiplex 9P service<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>9pserve</font></tt> [ <tt><font size=+1>&#8722;v</font></tt> ] <i>addr<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ On Plan 9, when a user-level file server mounts itself into a
+ name space or posts itself in <tt><font size=+1>/srv</font></tt>, the Plan 9 kernel multiplexes
+ the potentially many processes accessing the server into a single
+ 9P conversation. The user-level server need not concern itself
+ with how many processes are accessing it or with cleaning up
+ after a process when it exits unexpectedly. On Unix, <i>9pserve</i> takes
+ the place of the Plan 9 kernel, multiplexing clients onto a single
+ server conversation and cleaning up after clients when they hang
+ up unexpectedly.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9pserve</i> announces a 9P service on <i>addr</i> and multiplexes any 9P
+ clients connecting to <i>addr</i> into a single conversation with a 9P
+ server on <i>9pserve</i>&#8217;s standard input and output. When a client hangs
+ up, <i>9pserve</i> flushes any outstanding 9P transactions and clunks
+ any outstanding fids belonging to the client.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>9pserve</i> is typically not invoked directly; use <a href="../man3/post9pservice.html"><i>post9pservice</i>(3)</a>
+ instead.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man4/intro.html"><i>intro</i>(4)</a>, <i>intro</i>(9p)<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/9pserve.c<br>
+ </font></tt>
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man4/acme.html b/man/man4/acme.html
new file mode 100644
index 00000000..ac310c13
--- /dev/null
+++ b/man/man4/acme.html
@@ -0,0 +1,268 @@
+<head>
+<title>acme(4) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ACME(4)</b><td align=right><b>ACME(4)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ acme &ndash; control files for text windows<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>acme</font></tt> [ <tt><font size=+1>&#8722;f</font></tt> <i>varfont</i> ] [ <tt><font size=+1>&#8722;F</font></tt> <i>fixfont</i> ] [ <i>file</i> ... ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The text window system <a href="../man1/acme.html"><i>acme</i>(1)</a> serves a variety of files for reading,
+ writing, and controlling windows. Some of them are virtual versions
+ of system files for dealing with the virtual console; others control
+ operations of <i>acme</i> itself. When a command is run under <i>acme</i>, a
+ directory holding these files is posted as the 9P
+ service <tt><font size=+1>acme</font></tt> (using <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a>).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Some of these files supply virtual versions of services available
+ from the underlying environment, in particular the character terminal
+ files in Plan 9&#8217;s <i>cons</i>(3). (Unlike in Plan 9&#8217;s <i>rio</i>(1), each command
+ under <i>acme</i> sees the same set of files; there is not a distinct
+ <tt><font size=+1>/dev/cons</font></tt> for each window.) Other files are unique to
+ <i>acme</i>.<br>
+ <tt><font size=+1>acme</font></tt>is a subdirectory used by <tt><font size=+1>win</font></tt> (see <a href="../man1/acme.html"><i>acme</i>(1)</a>) as a mount point
+ for the <i>acme</i> files associated with the window in which <tt><font size=+1>win</font></tt> is
+ running. It has no specific function under <i>acme</i> itself.<br>
+ <tt><font size=+1>cons</font></tt>is the standard and diagnostic output file for all commands
+ run under <i>acme</i>. (Input for commands is redirected to <tt><font size=+1>/dev/null</font></tt>.)
+ Text written to <tt><font size=+1>cons</font></tt> appears in a window labeled <i>dir</i><tt><font size=+1>/+Errors</font></tt>,
+ where <i>dir</i> is the directory in which the command was run. The window
+ is created if necessary, but not until text is
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ actually written.<br>
+
+ </table>
+ <tt><font size=+1>consctl<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Is an empty unwritable file present only for compatibility; there
+ is no way to turn off &#8216;echo&#8217;, for example, under <i>acme</i>.<br>
+
+ </table>
+ <tt><font size=+1>index<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ holds a sequence of lines of text, one per window. Each line has
+ 5 decimal numbers, each formatted in 11 characters plus a blank--the
+ window ID; number of characters (runes) in the tag; number of
+ characters in the body; a 1 if the window is a directory, 0 otherwise;
+ and a 1 if the window is modified, 0
+ otherwise--followed by the tag up to a newline if present. Thus
+ at character position 5x12 starts the name of the window. If a
+ file has multiple zeroxed windows open, only the most recently
+ used will appear in the <tt><font size=+1>index</font></tt> file.<br>
+
+ </table>
+ <tt><font size=+1>label<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ is an empty file, writable without effect, present only for compatibility
+ with <tt><font size=+1>rio</font></tt>.<br>
+
+ </table>
+ <tt><font size=+1>new</font></tt>&nbsp;&nbsp;&nbsp;A directory analogous to the numbered directories (<i>q.v.</i>). Accessing
+ any file in <tt><font size=+1>new</font></tt> creates a new window. Thus to cause text to appear
+ in a new window, write it to <tt><font size=+1>/dev/new/body</font></tt>. For more control,
+ open <tt><font size=+1>/dev/new/ctl</font></tt> and use the interface described below.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each <i>acme</i> window has associated a directory numbered by its ID.
+ Window IDs are chosen sequentially and may be discovered by the
+ <tt><font size=+1>ID</font></tt> command, by reading the <tt><font size=+1>ctl</font></tt> file, or indirectly through the
+ <tt><font size=+1>index</font></tt> file. The files in the numbered directories are as follows.<br>
+ <tt><font size=+1>addr</font></tt>may be written with any textual address (line number, regular
+ expression, etc.), in the format understood by button 3 but without
+ the initial colon, including compound addresses, to set the address
+ for text accessed through the <tt><font size=+1>data</font></tt> file. When read, it returns
+ the value of the address that would next be read or
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ written through the <tt><font size=+1>data</font></tt> file, in the format <tt><font size=+1>#</font></tt><i>m</i><tt><font size=+1>,#</font></tt><i>n</i> where <i>m</i> and
+ <i>n</i> are character (not byte) offsets. If <i>m</i> and <i>n</i> are identical,
+ the format is just <tt><font size=+1>#</font></tt><i>m</i>. Thus a regular expression may be evaluated
+ by writing it to <tt><font size=+1>addr</font></tt> and reading it back. The <tt><font size=+1>addr</font></tt> address has
+ no effect on the user&#8217;s selection of text.
+
+ </table>
+ <tt><font size=+1>body</font></tt>holds contents of the window body. It may be read at any byte
+ offset. Text written to <tt><font size=+1>body</font></tt> is always appended; the file offset
+ is ignored.<br>
+ <tt><font size=+1>ctl</font></tt>&nbsp;&nbsp;&nbsp;may be read to recover the five numbers as held in the <tt><font size=+1>index</font></tt>
+ file, described above, plus two more fields: the width of the
+ window in pixels and the name of the font used in the window.
+ Text messages may be written to <tt><font size=+1>ctl</font></tt> to affect the window. Each
+ message is terminated by a newline and multiple messages
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ may be sent in a single write.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>addr=dot</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the <tt><font size=+1>addr</font></tt> address to that of the user&#8217;s selected text
+ in the window.<br>
+ <tt><font size=+1>clean</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mark the window clean as though it has just been written.<br>
+ <tt><font size=+1>dirty</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mark the window dirty, the opposite of clean.<br>
+ <tt><font size=+1>cleartag</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Remove all text in the tag after the vertical bar.<br>
+ <tt><font size=+1>del</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to the <tt><font size=+1>Del</font></tt> interactive command.<br>
+ <tt><font size=+1>delete</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to the <tt><font size=+1>Delete</font></tt> interactive command.<br>
+ <tt><font size=+1>dot=addr</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the user&#8217;s selected text in the window to the text
+ addressed by the <tt><font size=+1>addr</font></tt> address.<br>
+ <tt><font size=+1>dump</font></tt> <i>command</i>Set the command string to recreate the window from
+ a dump file.<br>
+ <tt><font size=+1>dumpdir</font></tt> <i>directory<br>
+ </i>Set the directory in which to run the command to recreate the
+ window from a dump file.<br>
+ <tt><font size=+1>get</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to the <tt><font size=+1>Get</font></tt> interactive command with no arguments;
+ accepts no arguments.<br>
+ <tt><font size=+1>limit=addr</font></tt>&nbsp;&nbsp;&nbsp;When the <tt><font size=+1>ctl</font></tt> file is first opened, regular expression
+ context searches in <tt><font size=+1>addr</font></tt> addresses examine the whole file; this
+ message restricts subsequent searches to the current <tt><font size=+1>addr</font></tt> address.<br>
+ <tt><font size=+1>mark</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cancel <tt><font size=+1>nomark</font></tt>, returning the window to the usual state wherein
+ each modification to the body must be undone individually.<br>
+ <tt><font size=+1>name</font></tt> <i>name</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the name of the window to <i>name</i>.<br>
+ <tt><font size=+1>nomark</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Turn off automatic &#8216;marking&#8217; of changes, so a set of related
+ changes may be undone in a single <tt><font size=+1>Undo</font></tt> interactive command.<br>
+ <tt><font size=+1>noscroll</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Turn off automatic &#8216;scrolling&#8217; of the window to show text
+ written to the body.<br>
+ <tt><font size=+1>put</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to the <tt><font size=+1>Put</font></tt> interactive command with no arguments;
+ accepts no arguments.<br>
+ <tt><font size=+1>scroll</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cancel a <tt><font size=+1>noscroll</font></tt> message, returning the window to the default
+ state wherein each write to the <tt><font size=+1>body</font></tt> file causes the window to
+ &#8216;scroll&#8217; to display the new text.<br>
+ <tt><font size=+1>show</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Guarantee at least some of the selected text is visible on
+ the display.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>data</font></tt>is used in conjunction with <tt><font size=+1>addr</font></tt> for random access to the
+ contents of the body. The file offset is ignored when writing
+ the <tt><font size=+1>data</font></tt> file; instead the location of the data to be read or
+ written is determined by the state of the <tt><font size=+1>addr</font></tt> file. Text, which
+ must contain only whole characters (no &#8216;partial runes&#8217;), written
+ to
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>data</font></tt> replaces the characters addressed by the <tt><font size=+1>addr</font></tt> file and sets
+ the address to the null string at the end of the written text.
+ A read from <tt><font size=+1>data</font></tt> returns as many whole characters as the read
+ count will permit starting at the beginning of the <tt><font size=+1>addr</font></tt> address
+ (the end of the address has no effect) and sets the
+ address to the null string at the end of the returned characters.<br>
+
+ </table>
+ <tt><font size=+1>event<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ When a window&#8217;s <tt><font size=+1>event</font></tt> file is open, changes to the window occur
+ as always but the actions are also reported as messages to the
+ reader of the file. Also, user actions with buttons 2 and 3 (other
+ than chorded <tt><font size=+1>Cut</font></tt> and <tt><font size=+1>Paste</font></tt>, which behave normally) have no immediate
+ effect on the window; it is expected that
+ the program reading the <tt><font size=+1>event</font></tt> file will interpret them. The messages
+ have a fixed format: a character indicating the origin or cause
+ of the action, a character indicating the type of the action,
+ four free-format blank-terminated decimal numbers, optional text,
+ and a newline. The first and second numbers are
+ the character addresses of the action, the third is a flag, and
+ the final is a count of the characters in the optional text, which
+ may itself contain newlines. The origin characters are <tt><font size=+1>E</font></tt> for writes
+ to the <tt><font size=+1>body</font></tt> or <tt><font size=+1>tag</font></tt> file, <tt><font size=+1>F</font></tt> for actions through the window&#8217;s other
+ files, <tt><font size=+1>K</font></tt> for the keyboard, and <tt><font size=+1>M</font></tt> for the mouse. The
+ type characters are <tt><font size=+1>D</font></tt> for text deleted from the body, <tt><font size=+1>d</font></tt> for text
+ deleted from the tag, <tt><font size=+1>I</font></tt> for text inserted to the body, <tt><font size=+1>i</font></tt> for text
+ inserted to the tag, <tt><font size=+1>L</font></tt> for a button 3 action in the body, <tt><font size=+1>l</font></tt> for
+ a button 3 action in the tag, <tt><font size=+1>X</font></tt> for a button 2 action in the body,
+ and <tt><font size=+1>x</font></tt> for a button 2 action in the tag.
+ If the relevant text has less than 256 characters, it is included
+ in the message; otherwise it is elided, the fourth number is 0,
+ and the program must read it from the <tt><font size=+1>data</font></tt> file if needed. No
+ text is sent on a <tt><font size=+1>D</font></tt> or <tt><font size=+1>d</font></tt> message.<br>
+ For <tt><font size=+1>D</font></tt>, <tt><font size=+1>d</font></tt>, <tt><font size=+1>I</font></tt>, and <tt><font size=+1>i</font></tt> the flag is always zero. For <tt><font size=+1>X</font></tt> and <tt><font size=+1>x</font></tt>, the flag
+ is a bitwise OR (reported decimally) of the following: 1 if the
+ text indicated is recognized as an <i>acme</i> built-in command; 2 if
+ the text indicated is a null string that has a non-null expansion;
+ if so, another complete message will follow describing the
+ expansion exactly as if it had been indicated explicitly (its
+ flag will always be 0); 8 if the command has an extra (chorded)
+ argument; if so, two more complete messages will follow reporting
+ the argument (with all numbers 0 except the character count) and
+ where it originated, in the form of a fully-qualified
+ button 3 style address.<br>
+ For <tt><font size=+1>L</font></tt> and <tt><font size=+1>l</font></tt>, the flag is the bitwise OR of the following: 1 if
+ <i>acme</i> can interpret the action without loading a new file; 2 if
+ a second (post-expansion) message follows, analogous to that with
+ <tt><font size=+1>X</font></tt> messages; 4 if the text is a file or window name (perhaps with
+ address) rather than plain literal text.
+ For messages with the 1 bit on in the flag, writing the message
+ back to the <tt><font size=+1>event</font></tt> file, but with the flag, count, and text omitted,
+ will cause the action to be applied to the file exactly as it
+ would have been if the <tt><font size=+1>event</font></tt> file had not been open.<br>
+
+ </table>
+ <tt><font size=+1>tag</font></tt>&nbsp;&nbsp;&nbsp;holds contents of the window tag. It may be read at any byte
+ offset. Text written to <tt><font size=+1>tag</font></tt> is always appended; the file offset
+ is ignored.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/acme<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/rio.html"><i>rio</i>(1)</a>, <a href="../man1/acme.html"><i>acme</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man4/import.html b/man/man4/import.html
new file mode 100644
index 00000000..e0eca5cb
--- /dev/null
+++ b/man/man4/import.html
@@ -0,0 +1,107 @@
+<head>
+<title>import(4) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>IMPORT(4)</b><td align=right><b>IMPORT(4)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ import &ndash; import 9P resources from another system<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>import</font></tt> [ <tt><font size=+1>&#8722;df</font></tt> ] [ <tt><font size=+1>&#8722;n</font></tt> <i>ns</i> ] [ <tt><font size=+1>&#8722;p</font></tt> <i>prog</i> ] [ <tt><font size=+1>&#8722;s</font></tt> <i>service</i> ] <i>system<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Import</i> presents the 9P service <i>service</i> (default <tt><font size=+1>plumb</font></tt>) running
+ on <i>system</i> as a service on the local system, in the current name
+ space.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;n</font></tt> option sets the remote name space directory where <i>import</i>
+ should expect to find <i>service</i>. If it is not specified, <i>import</i>
+ uses name of the local system&#8217;s name space directory. (Since name
+ space directories are conventionally inside <tt><font size=+1>/tmp</font></tt>, the path have
+ different meanings on the two systems.)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>Import</i> connects to <i>system</i> using <a href="../man1/ssh.html"><i>ssh</i>(1)</a>. It invokes <i>import</i> on the
+ remote system to carry out the remote side of the protocol. The
+ <tt><font size=+1>&#8722;p</font></tt> option specifies the path to <i>import</i> on the remote system, in
+ case it is not in the system search path.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;d</font></tt> option turns on debugging. The <tt><font size=+1>&#8722;f</font></tt> option keeps <i>import</i> from
+ forking itself into the background, also useful for debugging.<br>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Suppose you run <tt><font size=+1>sam &#8722;r</font></tt> to the CPU server <i>anna</i>. <i>Sam</i> wants to talk
+ to a plumber on the local terminal, but the file names will refer
+ to files on <i>anna</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To fix this problem, create a new name space directory and start
+ a new plumber on <i>anna</i>:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>remotens=/tmp/ns.`whoami`.on.`hostname`<br>
+ ssh anna mkdir $remotens<br>
+ ssh anna NAMESPACE=$remotens plumber<br>
+ </font></tt>Now import that plumber to the local name space before starting
+ <i>sam</i> and <i>9term</i>:<br>
+ <tt><font size=+1>NAMESPACE=/tmp/ns.anna<br>
+ mkdir $NAMESPACE<br>
+ import &#8722;n $remotens &#8722;s plumb anna<br>
+ sam &amp;<br>
+ 9term ssh anna &amp;<br>
+ </font></tt>
+ </table>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/import.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a>, <a href="../man4/intro.html"><i>intro</i>(4)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man4/index.html b/man/man4/index.html
new file mode 100644
index 00000000..bef356e8
--- /dev/null
+++ b/man/man4/index.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<title>Manual Section 4 - Plan 9 from User Space</title>
+</head>
+<body>
+<table width=100%>
+<tr><td width=20><td>
+<center>
+<table border=0 cellspacing=0 cellpadding=0 width=100%>
+<tr height=1><td width=200><td>
+<tr><td colspan=2>
+ <center>
+ <b>Manual Section 4 - Plan 9 from User Space</b>
+ </center>
+<tr height=10><td>
+<tr><td valign=top><a href="intro.html">intro(4)</a><td>intro &ndash; introduction to file servers
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="9pserve.html">9pserve(4)</a><td>9pserve &ndash; announce and multiplex 9P service
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="acme.html">acme(4)</a><td>acme &ndash; control files for text windows
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="import.html">import(4)</a><td>import &ndash; import 9P resources from another system
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="plumber.html">plumber(4)</a><td>plumber &ndash; file system for interprocess messaging
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="ramfs.html">ramfs(4)</a><td>ramfs &ndash; memory file system
+</table>
+</center>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<td width=20>
+</table>
+</body>
+</html>
diff --git a/man/man4/intro.html b/man/man4/intro.html
new file mode 100644
index 00000000..ec2409c0
--- /dev/null
+++ b/man/man4/intro.html
@@ -0,0 +1,92 @@
+<head>
+<title>intro(4) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>INTRO(4)</b><td align=right><b>INTRO(4)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ intro &ndash; introduction to file servers<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A Plan 9 <i>file server</i> provides a file tree to processes. This section
+ of the manual describes servers that can be mounted in a name
+ space to give a file-like interface to interesting services. A
+ file server may be a provider of a conventional file system, with
+ files maintained on permanent storage, or it may also be a process
+ that synthesizes files in some manner.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In Plan 9, the kernel mount device <i>mnt</i>(3) acts as a client to
+ the 9P servers mounted in the current name space, translating
+ system calls such as <a href="../man2/open.html"><i>open</i>(2)</a> into 9P transactions such as <i>open</i>(9p).
+ The kernel also multiplexes the potentially many processes onto
+ a single 9P conversation with each server. Finally, the kernel
+ provides each process with its own private <i>name space</i> which it
+ can customize at will. Modern Unix systems do not provide these
+ niceties, so the Unix port of these Plan 9 file servers provides
+ them via other means.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ On Unix, 9P clients do not access servers via the traditional
+ file system call interface. Only the Unix name space can be accessed
+ that way. Instead, 9P clients use the <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a> library to connect
+ and interact directly with particular 9P servers. The <a href="../man1/9p.html"><i>9p</i>(1)</a> command-line
+ client is useful for interactive use and in shell
+ scripts.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To preserve the fa&ccedil;ade of a single 9P conversation with each server,
+ 9P servers invoke <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a>, typically via <a href="../man3/post9pservice.html"><i>post9pservice</i>(3)</a>.
+ <i>9pserve</i> announces a 9P service at a particular network address
+ and multiplexes the clients that connect to that address onto
+ a single 9P conversation with the server.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each ported program operates in a pseudo-name space that determines
+ which 9P servers it is using. The name space of a ported program
+ is represented by a directory containing Unix domain sockets,
+ one for each 9P server. The directory defaults to <tt><font size=+1>/tmp/ns.$USER.$DISPLAY</font></tt>,
+ meaning that all programs in an X
+ Windows login session share a single name space. Setting the <tt><font size=+1>$NAMESPACE</font></tt>
+ environment variable overrides this default. The <a href="../man1/namespace.html"><i>namespace</i>(1)</a>
+ command prints the current name space directory.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Occasionally it is useful to be able to connect the input or output
+ of a standard Unix program to a file served by a 9P server. The
+ new <i>openfd</i>(9p) 9P transaction, which depends on file descriptor
+ passing, provides a sufficient workaround in many cases. <i>9pserve</i>&#8217;s
+ implementation of <i>openfd</i> (see also <i>fsopenfd</i> in
+ <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>) returns the read or write end of a pipe; a helper
+ process transfers data between the other end of the pipe and the
+ 9P server. Note that since the data is being transferred via a
+ pipe, 9P read and write errors cannot be passed on to the Unix
+ program. The Unix program sees only end-of-file or a closed pipe.
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man4/plumber.html b/man/man4/plumber.html
new file mode 100644
index 00000000..83e5943f
--- /dev/null
+++ b/man/man4/plumber.html
@@ -0,0 +1,122 @@
+<head>
+<title>plumber(4) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PLUMBER(4)</b><td align=right><b>PLUMBER(4)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ plumber &ndash; file system for interprocess messaging<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>plumber</font></tt> [ <tt><font size=+1>&#8722;p</font></tt> <i>plumbing</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <i>plumber</i> is a user-level file server that receives, examines,
+ rewrites, and dispatches <a href="../man7/plumb.html"><i>plumb</i>(7)</a> messages between programs. Its
+ behavior is programmed by a <i>plumbing</i> file (default <tt><font size=+1>$HOME/lib/plumbing</font></tt>)
+ in the format of <a href="../man7/plumb.html"><i>plumb</i>(7)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Its services are posted via <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a> as <tt><font size=+1>plumb</font></tt>. and consist of
+ two pre-defined files, <tt><font size=+1>plumb/send</font></tt> and <tt><font size=+1>plumb/rules</font></tt>, and a set of
+ output <i>ports</i> for dispatching messages to applications.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Programs use <tt><font size=+1>fswrite</font></tt> (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>) to deliver messages to
+ the <tt><font size=+1>send</font></tt> file, and <i>fsread</i> to receive them from the corresponding
+ port. For example, <a href="../man1/sam.html"><i>sam</i>(1)</a>&#8217;s <tt><font size=+1>plumb</font></tt> menu item or the <tt><font size=+1>B</font></tt> command cause
+ a message to be sent to <tt><font size=+1>plumb/send</font></tt>; <tt><font size=+1>sam</font></tt> in turn reads from, by
+ convention, <tt><font size=+1>plumb/edit</font></tt> to receive
+ messages about files to open.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A copy of each message is sent to each client that has the corresponding
+ port open. If none has it open, and the rule has a <tt><font size=+1>plumb client</font></tt>
+ or <tt><font size=+1>plumb start</font></tt> rule, that rule is applied. A <tt><font size=+1>plumb client</font></tt> rule
+ causes the specified command to be run and the message to be held
+ for delivery when the port is opened. A
+ <tt><font size=+1>plumb start</font></tt> rule runs the command but discards the message. If
+ neither <tt><font size=+1>start</font></tt> or <tt><font size=+1>client</font></tt> is specified and the port is not open,
+ the message is discarded and a write error is returned to the
+ sender.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The set of output ports is determined dynamically by the specification
+ in the plumbing rules file: a port is created for each unique
+ destination of a <tt><font size=+1>plumb to</font></tt> rule.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The set of rules currently active may be examined by reading the
+ file <tt><font size=+1>plumb/rules</font></tt>; appending to this file adds new rules to the
+ set, while creating it (opening it with <tt><font size=+1>OTRUNC</font></tt>) clears the rule
+ set. Thus the rule set may be edited dynamically with a traditional
+ text editor. However, ports are never deleted dynamically;
+ if a new set of rules does not include a port that was defined
+ in earlier rules, that port will still exist (although no new
+ messages will be delivered there).<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>$HOME/lib/plumbing</font></tt>&nbsp;&nbsp;&nbsp;default rules file<br>
+ <tt><font size=+1>/usr/local/plan9/plumb<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ directory to search for files in <tt><font size=+1>include</font></tt> statements<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>plumb</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mount name for <a href="../man4/plumber.html"><i>plumber</i>(4)</a>.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/plumb<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/plumb.html"><i>plumb</i>(1)</a>, <a href="../man3/plumb.html"><i>plumb</i>(3)</a>, <a href="../man7/plumb.html"><i>plumb</i>(7)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man4/ramfs.html b/man/man4/ramfs.html
new file mode 100644
index 00000000..7fb86f5a
--- /dev/null
+++ b/man/man4/ramfs.html
@@ -0,0 +1,81 @@
+<head>
+<title>ramfs(4) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>RAMFS(4)</b><td align=right><b>RAMFS(4)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ramfs &ndash; memory file system<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>ramfs</font></tt> [ <tt><font size=+1>&#8722;i</font></tt> ] [ <tt><font size=+1>&#8722;S</font></tt> <i>service</i> ]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Ramfs</i> starts a 9P file server keeping all files in memory. Initially
+ the file tree is empty.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ By default <i>ramfs</i> posts its service as <tt><font size=+1>ramfs</font></tt> using <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a>.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;S</font></tt> flag specifies an alternate service name for ramfs to use.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;i</font></tt> flag tells <i>ramfs</i> to use file descriptors 0 and 1 for its
+ communication channel rather than create a pipe. This makes it
+ possible to use <i>ramfs</i> as a file server on a remote machine: the
+ file descriptors 0 and 1 will be the network channel from <i>ramfs</i>
+ to the client machine.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ This program is useful mainly as an example of how to write a
+ user-level file server. It can also be used to provide high-performance
+ temporary files.<br>
+
+</table>
+<p><font size=+1><b>SOURCE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/src/cmd/ramfs.c<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/9p.html"><i>9p</i>(3)</a>, <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man5/index.html b/man/man5/index.html
new file mode 100644
index 00000000..f6ea86f3
--- /dev/null
+++ b/man/man5/index.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<title>Manual Section 5 - Plan 9 from User Space</title>
+</head>
+<body>
+<table width=100%>
+<tr><td width=20><td>
+<center>
+<table border=0 cellspacing=0 cellpadding=0 width=100%>
+<tr height=1><td width=200><td>
+<tr><td colspan=2>
+ <center>
+ <b>Manual Section 5 - Plan 9 from User Space</b>
+ </center>
+<tr height=10><td>
+</table>
+</center>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<td width=20>
+</table>
+</body>
+</html>
diff --git a/man/man7/color.html b/man/man7/color.html
new file mode 100644
index 00000000..262e4633
--- /dev/null
+++ b/man/man7/color.html
@@ -0,0 +1,169 @@
+<head>
+<title>color(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>COLOR(7)</b><td align=right><b>COLOR(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ color &ndash; representation of pixels and colors<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To address problems of consistency and portability among applications,
+ Plan 9 uses a fixed color map, called <tt><font size=+1>rgbv</font></tt>, on 8-bit-per-pixel
+ displays. Although this avoids problems caused by multiplexing
+ color maps between applications, it requires that the color map
+ chosen be suitable for most purposes and usable for
+ all. Other systems that use fixed color maps tend to sample the
+ color cube uniformly, which has advantages--mapping from a (red,
+ green, blue) triple to the color map and back again is easy--but
+ ignores an important property of the human visual system: eyes
+ are much more sensitive to small changes in intensity than
+ to changes in hue. Sampling the color cube uniformly gives a color
+ map with many different hues, but only a few shades of each. Continuous
+ tone images converted into such maps demonstrate conspicuous artifacts.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Rather than dice the color cube into subregions of size 6&#215;6&#215;6 (as
+ in Netscape Navigator) or 8&#215;8&#215;4 (as in previous releases of Plan
+ 9), picking 1 color in each, the <tt><font size=+1>rgbv</font></tt> color map uses a 4&#215;4&#215;4 subdivision,
+ with 4 shades in each subcube. The idea is to reduce the color
+ resolution by dicing the color cube into fewer
+ cells, and to use the extra space to increase the intensity resolution.
+ This results in 16 grey shades (4 grey subcubes with 4 samples
+ in each), 13 shades of each primary and secondary color (3 subcubes
+ with 4 samples plus black) and a reasonable selection of colors
+ covering the rest of the color cube. The advantage is
+ better representation of continuous tones.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The following function computes the 256 3-byte entries in the
+ color map:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>void<br>
+ setmaprgbv(uchar cmap[256][3])<br>
+ {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ uchar *c;<br>
+ int r, g, b, v;<br>
+ int num, den;<br>
+ int i, j;<br>
+ for(r=0,i=0; r!=4; r++)<br>
+ for(v=0; v!=4; v++,i+=16)<br>
+ for(g=0,j=v&#8722;r; g!=4; g++)<br>
+ for(b=0; b!=4; b++,j++){<br>
+ c = cmap[i+(j&amp;15)];<br>
+ den = r;<br>
+ if(g &gt; den)<br>
+ den = g;<br>
+ if(b &gt; den)<br>
+ den = b;<br>
+ if(den == 0) /* would divide check; pick grey shades */<br>
+ c[0] = c[1] = c[2] = 17*v;<br>
+ else{<br>
+ num = 17*(4*den+v);<br>
+ c[0] = r*num/den;<br>
+ c[1] = g*num/den;<br>
+ c[2] = b*num/den;<br>
+ }<br>
+ }<br>
+
+ </table>
+ }<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ There are 4 nested loops to pick the (red,green,blue) coordinates
+ of the subcube, and the value (intensity) within the subcube,
+ indexed by <tt><font size=+1>r</font></tt>, <tt><font size=+1>g</font></tt>, <tt><font size=+1>b</font></tt>, and <tt><font size=+1>v</font></tt>, whence the name <i>rgbv</i>. The peculiar
+ order in which the color map is indexed is designed to distribute
+ the grey shades uniformly through the map--the <i>i</i>&#8217;th grey
+ shade, 0&lt;=<i>i</i>&lt;=15 has index <i>i</i>x17, with black going to 0 and white to
+ 255. Therefore, when a call to <tt><font size=+1>draw</font></tt> converts a 1, 2 or 4 bit-per-pixel
+ picture to 8 bits per pixel (which it does by replicating the
+ pixels&#8217; bits), the converted pixel values are the appropriate
+ grey shades.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>rgbv</font></tt> map is not gamma-corrected, for two reasons. First, photographic
+ film and television are both normally under-corrected, the former
+ by an accident of physics and the latter by NTSC&#8217;s design. Second,
+ we require extra color resolution at low intensities because of
+ the non-linear response and adaptation of
+ the human visual system. Properly gamma-corrected displays with
+ adequate low-intensity resolution pack the high-intensity parts
+ of the color cube with colors whose differences are almost imperceptible.
+ Either reason suggests concentrating the available intensities
+ at the low end of the range.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ On &#8216;true-color&#8217; displays with separate values for the red, green,
+ and blue components of a pixel, the values are chosen so 0 represents
+ no intensity (black) and the maximum value (255 for an 8-bit-per-color
+ display) represents full intensity (e.g., full red). Common display
+ depths are 24 bits per pixel, with 8 bits per
+ color in order red, green, blue, and 16 bits per pixel, with 5
+ bits of red, 6 bits of green, and 5 bits of blue.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Colors may also be created with an opacity factor called <tt><font size=+1>alpha</font></tt>,
+ which is scaled so 0 represents fully transparent and 255 represents
+ opaque color. The alpha is <i>premultiplied</i> into the other channels,
+ as described in the paper by Porter and Duff cited in <a href="../man3/draw.html"><i>draw</i>(3)</a>.
+ The function <tt><font size=+1>setalpha</font></tt> (see <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>) aids the
+ initialization of color values with non-trivial alpha.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The packing of pixels into bytes and words is odd. For compatibility
+ with VGA frame buffers, the bits within a pixel byte are in big-endian
+ order (leftmost pixel is most significant bits in byte), while
+ bytes within a pixel are packed in little-endian order. Pixels
+ are stored in contiguous bytes. This results in unintuitive
+ pixel formats. For example, for the RGB24 format, the byte ordering
+ is blue, green, red.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To maintain a constant external representation, the <a href="../man3/draw.html"><i>draw</i>(3)</a> interface
+ as well as the various graphics libraries represent colors by
+ 32-bit numbers, as described in <a href="../man3/color.html"><i>color</i>(3)</a>.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/color.html"><i>color</i>(3)</a>, <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man7/face.html b/man/man7/face.html
new file mode 100644
index 00000000..db220326
--- /dev/null
+++ b/man/man7/face.html
@@ -0,0 +1,127 @@
+<head>
+<title>face(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FACE(7)</b><td align=right><b>FACE(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ face &ndash; face files<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The directories <tt><font size=+1>/usr/$user/lib/face</font></tt> and <tt><font size=+1>/lib/face</font></tt> contain a hierarchy
+ of images of people. In those directories are subdirectories named
+ by the sizes of the corresponding image files: <tt><font size=+1>48x48x1</font></tt> (48 by
+ 48 pixels, one bit per pixel); <tt><font size=+1>48x48x2</font></tt> (48 by 48 pixels, two (grey)
+ bits per pixel); <tt><font size=+1>48x48x4</font></tt> (48 by 48
+ pixels, four (grey) bits per pixel); <tt><font size=+1>48x48x8</font></tt> (48 by 48 pixels,
+ eight (color-mapped) bits per pixel); <tt><font size=+1>512x512x8</font></tt> (512 by 512 pixels,
+ eight (color-mapped) bits per pixel); <tt><font size=+1>512x512x24</font></tt> (512 by 512 pixels,
+ twenty-four bits per pixel (3 times 8 bits per color)). The large
+ files serve no special purpose; they are stored as
+ images (see <a href="../man7/image.html"><i>image</i>(7)</a>). The small files are the &#8216;icons&#8217; displayed
+ by <tt><font size=+1>faces</font></tt> and <tt><font size=+1>seemail</font></tt> (see Plan 9&#8217;s <i>faces</i>(1)); for depths less
+ than 4, their format is special.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ One- and two-bit deep icons are stored as text, one line of the
+ file to one scan line of display. Each line is divided into 8-bit,
+ 16-bit, or 32-bit big-endian words, stored as a list of comma-separated
+ hexadecimal C constants, such as:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>0x9200, 0x1bb0, 0x003e,<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ This odd format is historical and the programs that read it are
+ somewhat forgiving about blanks and the need for commas.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The files <tt><font size=+1>lib/face/*/.dict</font></tt> hold a correspondence between users
+ at machines and face files. The format is<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>machine</i>/<i>user directory</i>/<i>file</i>.<i>ver <br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+
+ </table>
+ The <i>machine</i> is the domain name of the machine sending the message,
+ and <i>user</i> the name of the user sending it. The <i>directory</i> is a further
+ subdirectory of (say) <tt><font size=+1>/lib/face/48x48x1</font></tt>, named by a single letter
+ corresponding to the first character of the user names. The <i>file</i>
+ is the name of the file, typically but not
+ always the user name, and <i>ver</i> is a number to distinguish different
+ images, for example to distinguish the image for Bill Gates from
+ the image for Bill Joy, both of which might otherwise be called
+ <tt><font size=+1>b/bill</font></tt>. For example, Bill Gates might be represented by the line<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>microsoft.com/bill b/bill.1<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ If multiple entries exist for a user in the various <tt><font size=+1>.dict</font></tt> files,
+ <i>faces</i> chooses the highest pixel size less than or equal to that
+ of the display on which it is running.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Finally, or rather firstly, the file <tt><font size=+1>/lib/face/.machinelist</font></tt> contains
+ a list of machine/domain pairs, one per line, to map any of a
+ set of machines to a single domain name to be looked up in the
+ <tt><font size=+1>.dict</font></tt> files. The machine name may be a regular expression, so
+ for example the entry<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>.*research\.bell&#8722;labs\.com &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;astro<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ maps any of the machines in Bell Labs Research into the shorthand
+ name <tt><font size=+1>astro</font></tt>, which then appears as a domain name in the <tt><font size=+1>.dict</font></tt> files.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/mail.html"><i>mail</i>(1)</a>, <a href="../man1/tweak.html"><i>tweak</i>(1)</a>, <a href="../man7/image.html"><i>image</i>(7)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man7/font.html b/man/man7/font.html
new file mode 100644
index 00000000..a6bd6a91
--- /dev/null
+++ b/man/man7/font.html
@@ -0,0 +1,101 @@
+<head>
+<title>font(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FONT(7)</b><td align=right><b>FONT(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ font, subfont &ndash; external format for fonts and subfonts<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;draw.h&gt;<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Fonts and subfonts are described in <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ External fonts are described by a plain text file that can be
+ read using <i>openfont</i>. The format of the file is a header followed
+ by any number of subfont range specifications. The header contains
+ two numbers: the height and the ascent, both in pixels. The height
+ is the inter-line spacing and the ascent is the distance from
+ the top of the line to the baseline. These numbers are chosen
+ to display consistently all the subfonts of the font. A subfont
+ range specification contains two or three numbers and a file name.
+ The numbers are the inclusive range of characters covered by the
+ subfont, with an optional starting position within the subfont,
+ and the file name names an external file suitable for <i>readsubfont</i>
+ (see <a href="../man3/graphics.html"><i>graphics</i>(3)</a>). The minimum number of a covered range is mapped
+ to the specified starting position (default zero) of the corresponding
+ subfont. If the subfont file name does not begin with a slash,
+ it is taken relative to the directory containing the
+ font file. Each field must be followed by some white space. Each
+ numeric field may be C-format decimal, octal, or hexadecimal.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ External subfonts are represented in a more rigid format that
+ can be read and written using <i>readsubfont</i> and <i>writesubfont</i> (see
+ <a href="../man3/subfont.html"><i>subfont</i>(3)</a>). The format for subfont files is: an image containing
+ character glyphs, followed by a subfont header, followed by character
+ information. The image has the format for external image
+ files described in <a href="../man7/image.html"><i>image</i>(7)</a>. The subfont header has 3 decimal
+ strings: <tt><font size=+1>n</font></tt>, <tt><font size=+1>height</font></tt>, and <tt><font size=+1>ascent</font></tt>. Each number is right-justified
+ and blank padded in 11 characters, followed by a blank. The character
+ <tt><font size=+1>info</font></tt> consists of <tt><font size=+1>n</font></tt>+1 6-byte entries, each giving the <tt><font size=+1>Fontchar
+ x</font></tt> (2 bytes, low order byte first), <tt><font size=+1>top</font></tt>, <tt><font size=+1>bottom</font></tt>,
+ <tt><font size=+1>left</font></tt>, and <tt><font size=+1>width</font></tt>. The <tt><font size=+1>x</font></tt> field of the last <tt><font size=+1>Fontchar</font></tt> is used to calculate
+ the image width of the previous character; the other fields in
+ the last <tt><font size=+1>Fontchar</font></tt> are irrelevant.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Note that the convention of using the character with value zero
+ (NUL) to represent characters of zero width (see <a href="../man3/draw.html"><i>draw</i>(3)</a>) means
+ that fonts should have, as their zeroth character, one with non-zero
+ width.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/font/*</font></tt>&nbsp;&nbsp;&nbsp;font directories<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/cachechars.html"><i>cachechars</i>(3)</a>, <a href="../man3/subfont.html"><i>subfont</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man7/image.html b/man/man7/image.html
new file mode 100644
index 00000000..f81c023b
--- /dev/null
+++ b/man/man7/image.html
@@ -0,0 +1,175 @@
+<head>
+<title>image(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>IMAGE(7)</b><td align=right><b>IMAGE(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ image &ndash; external format for images<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;draw.h&gt;<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Images are described in <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, and the definition of pixel
+ values is in <a href="../man7/color.html"><i>color</i>(7)</a>. Fonts and images are stored in external
+ files in machine-independent formats.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Image files are read and written using <tt><font size=+1>readimage</font></tt> and <tt><font size=+1>writeimage</font></tt>
+ (see <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>),<i>or</i> <tt><font size=+1>readmemimage</font></tt> and <tt><font size=+1>writememimage</font></tt> (see <a href="../man3/memdraw.html"><i>memdraw</i>(3)</a>).
+ An uncompressed image file starts with 5 strings: <tt><font size=+1>chan</font></tt>, <tt><font size=+1>r.min.x</font></tt>,
+ <tt><font size=+1>r.min.y</font></tt>, <tt><font size=+1>r.max.x</font></tt>, and <tt><font size=+1>r.max.y</font></tt>. Each is right-justified and blank
+ padded in 11
+ characters, followed by a blank. The <tt><font size=+1>chan</font></tt> value is a textual string
+ describing the pixel format (see <tt><font size=+1>strtochan</font></tt> in <a href="../man3/graphics.html"><i>graphics</i>(3)</a> and
+ the discussion of channel descriptors below), and the rectangle
+ coordinates are decimal strings. The rest of the file contains
+ the <tt><font size=+1>r.max.y&#8722;r.min.y</font></tt> rows of pixel data. A <i>row</i> consists
+ of the byte containing pixel <tt><font size=+1>r.min.x</font></tt> and all the bytes up to and
+ including the byte containing pixel <tt><font size=+1>r.max.x</font></tt>-1. For images with
+ depth <i>d</i> less than eight, a pixel with x-coordinate = <i>x</i> will appear
+ as <i>d</i> contiguous bits in a byte, with the pixel&#8217;s high order bit
+ starting at the byte&#8217;s bit number <i>w</i>&#215;(<i>x</i> mod (8/<i>w</i>)), where
+ bits within a byte are numbered 0 to 7 from the high order to
+ the low order bit. Rows contain integral number of bytes, so there
+ may be some unused pixels at either end of a row. If <i>d</i> is greater
+ than 8, the definition of images requires that it will a multiple
+ of 8, so pixel values take up an integral number of bytes.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>loadimage</font></tt> and <tt><font size=+1>unloadimage</font></tt> functions described in <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>
+ also deal with rows in this format, stored in user memory.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The channel format string is a sequence of two-character channel
+ descriptions, each comprising a letter (<tt><font size=+1>r</font></tt> for red, <tt><font size=+1>g</font></tt> for green,
+ <tt><font size=+1>b</font></tt> for blue, <tt><font size=+1>a</font></tt> for alpha, <tt><font size=+1>m</font></tt> for color-mapped, <tt><font size=+1>k</font></tt> for greyscale,
+ and <tt><font size=+1>x</font></tt> for &#8220;don&#8217;t care&#8221;) followed by a number of bits per pixel.
+ The sum of the channel bits per pixel is the depth of the image,
+ which must be either a divisor or a multiple of eight. It is an
+ error to have more than one of any channel but <tt><font size=+1>x</font></tt>. An image must
+ have either a greyscale channel; a color mapped channel; or red,
+ green, and blue channels. If the alpha channel is present, it
+ must be at least as deep as any other channel.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The channel string defines the format of the pixels in the file,
+ and should not be confused with ordering of bytes in the file.
+ In particular <tt><font size=+1>'r8g8b8'</font></tt> pixels have byte ordering blue, green,
+ and red within the file. See <a href="../man7/color.html"><i>color</i>(7)</a> for more details of the
+ pixel format.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A venerable yet deprecated format replaces the channel string
+ with a decimal <i>ldepth</i>, which is the base two logarithm of the
+ number of bits per pixel in the image. In this case, <i>ldepth</i>s 0,
+ 1, 2, and 3 correspond to channel descriptors <tt><font size=+1>k1</font></tt>, <tt><font size=+1>k2</font></tt>, <tt><font size=+1>k4</font></tt>, and
+ <tt><font size=+1>m8</font></tt>, respectively.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Compressed image files start with a line of text containing the
+ word <tt><font size=+1>compressed</font></tt>, followed by a header as described above, followed
+ by the image data. The data, when uncompressed, is laid out in
+ the usual form.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The data is represented by a string of compression blocks, each
+ encoding a number of rows of the image&#8217;s pixel data. Compression
+ blocks are at most 6024 bytes long, so that they fit comfortably
+ in a single 9P message. Since a compression block must encode
+ a whole number of rows, there is a limit (about 5825
+ bytes) to the width of images that may be encoded. Most wide images
+ are in subfonts, which, at 1 bit per pixel (the usual case for
+ fonts), can be 46600 pixels wide.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A compression block begins with two decimal strings of twelve
+ bytes each. The first number is one more than the <tt><font size=+1>y</font></tt> coordinate
+ of the last row in the block. The second is the number of bytes
+ of compressed data in the block, not including the two decimal
+ strings. This number must not be larger than 6000.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Pixels are encoded using a version of Lempel &amp; Ziv&#8217;s sliding window
+ scheme LZ77, best described in J A Storer &amp; T G Szymanski &#8216;Data
+ Compression via Textual Substitution&#8217;, JACM 29#4, pp. 928-951.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The compression block is a string of variable-length code words
+ encoding substrings of the pixel data. A code word either gives
+ the substring directly or indicates that it is a copy of data
+ occurring previously in the pixel stream.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In a code word whose first byte has the high-order bit set, the
+ rest of the byte indicates the length of a substring encoded directly.
+ Values from 0 to 127 encode lengths from 1 to 128 bytes. Subsequent
+ bytes are the literal pixel data.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the high-order bit is zero, the next 5 bits encode the length
+ of a substring copied from previous pixels. Values from 0 to 31
+ encode lengths from 3 to 34 bytes. The bottom two bits of the
+ first byte and the 8 bits of the next byte encode an offset backward
+ from the current position in the pixel data at which the copy
+ is to be found. Values from 0 to 1023 encode offsets from 1 to
+ 1024. The encoding may be &#8216;prescient&#8217;, with the length larger
+ than the offset, which works just fine: the new data is identical
+ to the data at the given offset, even though the two strings overlap.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Some small images, in particular 48&#215;48 face files as used by <i>seemail</i>
+ (see Plan 9&#8217;s <i>faces</i>(1) and <a href="../man7/face.html"><i>face</i>(7)</a>) and 16&#215;16 cursors, can be stored
+ textually, suitable for inclusion in C source. Each line of text
+ represents one scan line as a comma-separated sequence of hexadecimal
+ bytes, shorts, or words in C format. For
+ cursors, each line defines a pair of bytes. (It takes two images
+ to define a cursor; each must be stored separately to be processed
+ by programs such as <a href="../man1/tweak.html"><i>tweak</i>(1)</a>.) Face files of one bit per pixel
+ are stored as a sequence of shorts, those of larger pixel sizes
+ as a sequence of longs. Software that reads these files must
+ deduce the image size from the input; there is no header. These
+ formats reflect history rather than design.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/jpg.html"><i>jpg</i>(1)</a>, <a href="../man1/tweak.html"><i>tweak</i>(1)</a>, <a href="../man3/graphics.html"><i>graphics</i>(3)</a>, <a href="../man3/draw.html"><i>draw</i>(3)</a>, <a href="../man3/allocimage.html"><i>allocimage</i>(3)</a>, <a href="../man7/color.html"><i>color</i>(7)</a>,
+ <a href="../man7/face.html"><i>face</i>(7)</a>, <a href="../man7/font.html"><i>font</i>(7)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man7/index.html b/man/man7/index.html
new file mode 100644
index 00000000..5f61f6e5
--- /dev/null
+++ b/man/man7/index.html
@@ -0,0 +1,76 @@
+<html>
+<head>
+<title>Manual Section 7 - Plan 9 from User Space</title>
+</head>
+<body>
+<table width=100%>
+<tr><td width=20><td>
+<center>
+<table border=0 cellspacing=0 cellpadding=0 width=100%>
+<tr height=1><td width=200><td>
+<tr><td colspan=2>
+ <center>
+ <b>Manual Section 7 - Plan 9 from User Space</b>
+ </center>
+<tr height=10><td>
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="color.html">color(7)</a><td>color &ndash; representation of pixels and colors
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="face.html">face(7)</a><td>face &ndash; face files
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="font.html">font(7)</a><td>font, subfont &ndash; external format for fonts and subfonts
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="image.html">image(7)</a><td>image &ndash; external format for images
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="man.html">man(7)</a><td>man &ndash; macros to typeset manual
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="map.html">map(7)</a><td>map &ndash; digitized map formats
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="ms.html">ms(7)</a><td>ms &ndash; macros for formatting manuscripts
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="plot.html">plot(7)</a><td>plot &ndash; graphics interface
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="plumb.html">plumb(7)</a><td>plumb &ndash; format of plumb messages and rules
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="regexp.html">regexp(7)</a><td>regexp &ndash; Plan 9 regular expression notation
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="thumbprint.html">thumbprint(7)</a><td>thumbprint &ndash; public key thumbprints
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="utf.html">utf(7)</a><td>UTF, Unicode, ASCII, rune &ndash; character set and format
+</table>
+</center>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<td width=20>
+</table>
+</body>
+</html>
diff --git a/man/man7/man.html b/man/man7/man.html
new file mode 100644
index 00000000..4087e795
--- /dev/null
+++ b/man/man7/man.html
@@ -0,0 +1,292 @@
+<head>
+<title>man(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MAN(7)</b><td align=right><b>MAN(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ man &ndash; macros to typeset manual<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>nroff &#8722;man</font></tt> <i>file ...
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ <tt><font size=+1>troff &#8722;man</font></tt> <i>file ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ These macros are used to format pages of this manual.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Except in <tt><font size=+1>.LR</font></tt> and <tt><font size=+1>.RL</font></tt> requests, any text argument denoted <i>t</i> in
+ the request summary may be zero to six words. Quotes <tt><font size=+1>&quot;</font></tt> ... <tt><font size=+1>&quot;</font></tt> may
+ be used to include blanks in a &#8216;word&#8217;. If <i>t</i> is empty, the special
+ treatment is applied to the next text input line (the next line
+ that doesn&#8217;t begin with dot). In this way, for example, <tt><font size=+1>.I
+ </font></tt>may be used to italicize a line of more than 6 words, or <tt><font size=+1>.SM</font></tt> followed
+ by <tt><font size=+1>.B</font></tt> to make small letters in &#8216;bold&#8217; font.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A prevailing indent distance is remembered between successive
+ indented paragraphs, and is reset to default value upon reaching
+ a non-indented paragraph. Default units for indents <i>i</i> are ens.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The fonts are<br>
+ <tt><font size=+1>R</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;roman, the main font, preferred for diagnostics<br>
+ <tt><font size=+1>I</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;italic, preferred for parameters, short names of commands, names
+ of manual pages, and naked function names<br>
+ <tt><font size=+1>B</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8216;bold&#8217;, actually the constant width font, preferred for examples,
+ file names, declarations, keywords, names of <tt><font size=+1>struct</font></tt> members, and
+ literals (numbers are rarely literals)<br>
+ <tt><font size=+1>L</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;also the constant width font. In <i>troff</i> <tt><font size=+1>L</font></tt>=<tt><font size=+1>B</font></tt>; in <i>nroff</i> arguments
+ of the macros <tt><font size=+1>.L</font></tt>, <tt><font size=+1>.LR</font></tt>, and <tt><font size=+1>.RL</font></tt> are printed in quotes; preferred
+ only where quotes really help (e.g. lower-case literals and punctuation).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Type font and size are reset to default values before each paragraph,
+ and after processing font- or size-setting macros.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>&#8722;man</font></tt> macros admit equations and tables in the style of <a href="../man1/eqn.html"><i>eqn</i>(1)</a>
+ and <a href="../man1/tbl.html"><i>tbl</i>(1)</a>, but do not support arguments on <tt><font size=+1>.EQ</font></tt> and <tt><font size=+1>.TS</font></tt> macros.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ These strings are predefined by <tt><font size=+1>&#8722;man</font></tt>:<br>
+ <tt><font size=+1>\*R</font></tt>&nbsp;&nbsp;&nbsp;&#8216;&reg;&#8217;, &#8216;(Reg)&#8217; in <i>nroff</i>.<br>
+ <tt><font size=+1>\*S</font></tt>&nbsp;&nbsp;&nbsp;Change to default type size. <tt><font size=+1>\*9</font></tt> The root directory of the
+ Plan 9 installation.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/tmac/tmac.an
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ <tt><font size=+1>/usr/local/plan9/tmac/tmac.antimes<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/troff.html"><i>troff</i>(1)</a>, <a href="../man1/man.html"><i>man</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>REQUESTS </b></font><br>
+Request Cause If no &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Explanation<br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Break Argument<br>
+
+ </table>
+
+</table>
+<tt><font size=+1>.B</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;&nbsp;no
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>t</i>=n.t.l.* &nbsp;&nbsp;&nbsp;Text <i>t</i> is &#8216;bold&#8217;.<br>
+<tt><font size=+1>.BI</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;no
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>t</i>=n.t.l. &nbsp;&nbsp;&nbsp;Join words of <i>t</i> alternating bold and italic.<br>
+<tt><font size=+1>.BR</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;no
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>t</i>=n.t.l. &nbsp;&nbsp;&nbsp;Join words of <i>t</i> alternating bold and Roman.<br>
+<tt><font size=+1>.DT </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Restore default tabs.<br>
+<tt><font size=+1>.EE </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End displayed example<br>
+<tt><font size=+1>.EX </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Begin displayed example<br>
+<tt><font size=+1>.HP</font></tt> <i>i </i>&nbsp;&nbsp;&nbsp;yes
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>i</i>=p.i.* &nbsp;&nbsp;&nbsp;&nbsp;Set prevailing indent to <i>i</i>. Begin paragraph with hanging
+indent.<br>
+<tt><font size=+1>.I</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;&nbsp;no
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>t</i>=n.t.l. &nbsp;&nbsp;&nbsp;Text <i>t</i> is italic.<br>
+<tt><font size=+1>.IB</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;no
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>t</i>=n.t.l. &nbsp;&nbsp;&nbsp;Join words of <i>t</i> alternating italic and bold.<br>
+<tt><font size=+1>.IP</font></tt> <i>x i</i> yes
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>x</i>=&quot;&quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Same as <tt><font size=+1>.TP</font></tt> with tag <i>x</i>.<br>
+<tt><font size=+1>.IR</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;no
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>t</i>=n.t.l. &nbsp;&nbsp;&nbsp;Join words of <i>t</i> alternating italic and Roman.<br>
+<tt><font size=+1>.L</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;&nbsp;no
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>t</i>=n.t.l. &nbsp;&nbsp;&nbsp;Text <i>t</i> is literal.<br>
+<tt><font size=+1>.LP </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Same as <tt><font size=+1>.PP</font></tt>.<br>
+<tt><font size=+1>.LR</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Join 2 words of <i>t</i> alternating literal and Roman.<br>
+<tt><font size=+1>.PD</font></tt> <i>d </i>&nbsp;&nbsp;&nbsp;no
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>d</i>=<tt><font size=+1>.4v </font></tt>&nbsp;&nbsp;&nbsp;Interparagraph distance is <i>d</i>.<br>
+<tt><font size=+1>.PP </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Begin paragraph. Set prevailing indent to default.<br>
+<tt><font size=+1>.RE </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End of relative indent. Set prevailing indent to amount
+of starting <tt><font size=+1>.RS</font></tt>.<br>
+<tt><font size=+1>.RI</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;no
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>t</i>=n.t.l. &nbsp;&nbsp;&nbsp;Join words of <i>t</i> alternating Roman and italic.<br>
+<tt><font size=+1>.RL</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Join 2 or 3 words of <i>t</i> alternating Roman and literal.<br>
+<tt><font size=+1>.RS</font></tt> <i>i </i>&nbsp;&nbsp;&nbsp;yes
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>i</i>=p.i. &nbsp;&nbsp;&nbsp;&nbsp;Start relative indent, move left margin in distance <i>i</i>.
+Set prevailing indent to default for nested indents.<br>
+<tt><font size=+1>.SH</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;yes
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>t</i>=&quot;&quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subhead; reset paragraph distance.<br>
+<tt><font size=+1>.SM</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;no
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>t</i>=n.t.l. &nbsp;&nbsp;&nbsp;Text <i>t</i> is small.<br>
+<tt><font size=+1>.SS</font></tt> <i>t </i>&nbsp;&nbsp;&nbsp;no
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>t</i>=&quot;&quot; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Secondary subhead.<br>
+<tt><font size=+1>.TF</font></tt> <i>s </i>&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prevailing indent is wide as string <i>s</i> in font <tt><font size=+1>L</font></tt>; paragraph
+distance is 0.<br>
+<tt><font size=+1>.TH</font></tt> <i>n c x </i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Begin page named <i>n</i> of chapter <i>c;</i> <i>x</i> is extra commentary,
+e.g. &#8216;local&#8217;, for page head. Set prevailing indent and tabs to
+default.<br>
+<tt><font size=+1>.TP</font></tt> <i>i </i>&nbsp;&nbsp;&nbsp;yes
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+<tt><font size=+1>&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+&#60094;</font></tt><i>i</i>=p.i. &nbsp;&nbsp;&nbsp;&nbsp;Set prevailing indent to <i>i</i>. Restore default indent if
+<i>i</i>=0. Begin indented paragraph with hanging tag given by next text
+line. If tag doesn&#8217;t fit, place it on separate line.<br>
+<tt><font size=+1>.1C </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equalize columns and return to 1-column output<br>
+<tt><font size=+1>.2C </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start 2-column nofill output
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+* n.t.l. = next text line; p.i. = prevailing indent<br>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ There&#8217;s no way to fool <i>troff</i> into handling literal double quote
+ marks <tt><font size=+1>&quot;</font></tt> in font-alternation macros, such as <tt><font size=+1>.BI</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ There is no direct way to suppress column widows in 2-column output;
+ the column lengths may be adjusted by inserting <tt><font size=+1>.sp</font></tt> requests before
+ the closing <tt><font size=+1>.1C</font></tt>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man7/map.html b/man/man7/map.html
new file mode 100644
index 00000000..1ebdfbba
--- /dev/null
+++ b/man/man7/map.html
@@ -0,0 +1,108 @@
+<head>
+<title>map(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MAP(7)</b><td align=right><b>MAP(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ map &ndash; digitized map formats<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Files used by <a href="../man7/map.html"><i>map</i>(7)</a> are a sequence of structures of the form:
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>struct {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ signed char patchlatitude;<br>
+ signed char patchlongitude;<br>
+ short n;<br>
+ union {<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ struct {<br>
+ short latitude;<br>
+ short longitude;<br>
+ } point[n];<br>
+ struct {<br>
+ short latitude;<br>
+ short longitude;<br>
+ struct {<br>
+ signed char latdiff;<br>
+ signed char londiff;<br>
+ } point[&ndash;n];<br>
+ } highres;<br>
+
+ </table>
+ } segment;<br>
+
+ </table>
+ };<br>
+ </font></tt>where <tt><font size=+1>short</font></tt> stands for 16-bit integers and there is no padding
+ within or between <tt><font size=+1>structs</font></tt>. Shorts are stored in little-endian
+ order, low byte first. To assure portability, <i>map</i> accesses them
+ bytewise.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Fields <tt><font size=+1>patchlatitude</font></tt> and <tt><font size=+1>patchlongitude</font></tt> tell to what 10-degree
+ by 10-degree patch of the earth&#8217;s surface a segment belongs. Their
+ values range from &ndash;9 to 8 and from &ndash;18 to 17, respectively, and
+ indicate the coordinates of the southeast corner of the patch
+ in units of 10 degrees.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each segment of |<tt><font size=+1>n</font></tt>| points is connected; consecutive segments
+ are not necessarily related. Latitude and longitude are measured
+ in units of 0.0001 radian. If <tt><font size=+1>n</font></tt> is negative, then differences
+ to the first and succeeding points are measured in units of 0.00001
+ radian. Latitude is counted positive to the north and longitude
+ positive to the west.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The patches are ordered lexicographically by <tt><font size=+1>patchlatitude</font></tt> then
+ <tt><font size=+1>patchlongitude</font></tt>. A printable index to the first segment of each
+ patch in a file named <i>data</i> is kept in an associated file named
+ <i>data</i><tt><font size=+1>.x</font></tt>. Each line of an index file contains <tt><font size=+1>patchlatitude, patchlongitude</font></tt>
+ and the byte position of the
+ patch in the map file. Both the map file and the index file are
+ ordered by patch latitude and longitude.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man7/map.html"><i>map</i>(7)</a><br>
+ The data comes from the World Data Bank I and II and U.S. Government
+ sources: the Census Bureau, Geological Survey, and CIA.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man7/ms.html b/man/man7/ms.html
new file mode 100644
index 00000000..3ef5ef5d
--- /dev/null
+++ b/man/man7/ms.html
@@ -0,0 +1,185 @@
+<head>
+<title>ms(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>MS(7)</b><td align=right><b>MS(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ ms &ndash; macros for formatting manuscripts<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>nroff &#8722;ms</font></tt> [ <i>options</i> ] <i>file ...<br>
+ </i><tt><font size=+1>troff &#8722;ms</font></tt> [ <i>options</i> ] <i>file ...<br>
+ </i>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This package of <i>nroff</i> and <a href="../man1/troff.html"><i>troff</i>(1)</a> macro definitions provides
+ a canned formatting facility for technical papers in various formats.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The macro requests are defined below. Many <i>nroff</i> and <i>troff</i> requests
+ are unsafe in conjunction with this package, but the following
+ requests may be used with impunity after the first <tt><font size=+1>.PP</font></tt>: <tt><font size=+1>.bp</font></tt>, <tt><font size=+1>.br</font></tt>,
+ <tt><font size=+1>.sp</font></tt>, <tt><font size=+1>.ls</font></tt>, <tt><font size=+1>.na</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Output of the <a href="../man1/eqn.html"><i>eqn</i>(1)</a>, <a href="../man1/tbl.html"><i>tbl</i>(1)</a>, <a href="../man1/pic.html"><i>pic</i>(1)</a> and <a href="../man1/grap.html"><i>grap</i>(1)</a> preprocessors
+ for equations, tables, pictures, and graphs is acceptable as input.<br>
+
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>/usr/local/plan9/tmac/tmac.s<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ M. E. Lesk, &#8220;Typing Documents on the UNIX System: Using the &ndash;ms
+ Macros with Troff and Nroff&#8221;, <i>Unix Research System Programmer&#8217;s
+ Manual,</i> Tenth Edition, Volume 2.<br>
+ <a href="../man1/eqn.html"><i>eqn</i>(1)</a>, <a href="../man1/troff.html"><i>troff</i>(1)</a>, <a href="../man1/tbl.html"><i>tbl</i>(1)</a>, <a href="../man1/pic.html"><i>pic</i>(1)</a><br>
+
+</table>
+<p><font size=+1><b>REQUESTS </b></font><br>
+Request Initial Cause Explanation<br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Value Break<br>
+
+ </table>
+
+</table>
+<tt><font size=+1>.1C </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;One column format on a new page.<br>
+<tt><font size=+1>.2C </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Two column format.<br>
+<tt><font size=+1>.AB </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Begin abstract.<br>
+<tt><font size=+1>.AE </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End abstract.<br>
+<tt><font size=+1>.AI </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Author&#8217;s institution follows. Suppressed in <tt><font size=+1>.TM</font></tt>.<br>
+<tt><font size=+1>.AT </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Print &#8216;Attached&#8217; and turn off line filling.<br>
+<tt><font size=+1>.AU</font></tt> <i>x y</i> no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Author&#8217;s name follows. <i>x</i> is location and <i>y</i> is extension,
+ignored except in <tt><font size=+1>TM</font></tt>.<br>
+<tt><font size=+1>.B</font></tt> <i>x y </i>&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Print <i>x</i> in boldface, append <i>y</i>; if no argument switch
+to boldface.<br>
+<tt><font size=+1>.B1 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Begin text to be enclosed in a box.<br>
+<tt><font size=+1>.B2 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End boxed text.<br>
+<tt><font size=+1>.BI</font></tt> <i>x y</i> no &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Print <i>x</i> in bold italic and append <i>y</i>; if no argument
+switch to bold italic.<br>
+<tt><font size=+1>.BT </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;date no &nbsp;&nbsp;&nbsp;&nbsp;Bottom title, automatically invoked at foot of page.
+May be redefined.<br>
+<tt><font size=+1>.BX</font></tt> <i>x </i>&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Print <i>x</i> in a box.<br>
+<tt><font size=+1>.CW</font></tt> <i>x y</i> no &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Constant width font for <i>x</i>, append <i>y</i>; if no argument
+switch to constant width.<br>
+<tt><font size=+1>.CT </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Print &#8216;Copies to&#8217; and turn off line filling.<br>
+<tt><font size=+1>.DA</font></tt> <i>x </i>&nbsp;&nbsp;&nbsp;&nbsp;nroff no &nbsp;&nbsp;&nbsp;&nbsp;&#8216;Date line&#8217; at bottom of page is <i>x</i>. Default is
+today.<br>
+<tt><font size=+1>.DE </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End displayed text. Implies <tt><font size=+1>.KE</font></tt>.<br>
+<tt><font size=+1>.DS</font></tt> <i>x </i>&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Start of displayed text, to appear verbatim line-by-line:
+<tt><font size=+1>I</font></tt> indented (default), <tt><font size=+1>L</font></tt> left-justified, <tt><font size=+1>C</font></tt> centered, <tt><font size=+1>B</font></tt> (block)
+centered with straight left margin. Implies <tt><font size=+1>.KS</font></tt>.<br>
+<tt><font size=+1>.EG </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print document in BTL format for &#8216;Engineer&#8217;s Notes.&#8217;
+Must be first.<br>
+<tt><font size=+1>.EN </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Space after equation produced by <i>neqn</i> or <a href="../man1/eqn.html"><i>eqn</i>(1)</a>.<br>
+<tt><font size=+1>.EQ</font></tt> <i>x y</i> - &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Display equation. Equation number is <i>y</i>. Optional
+<i>x</i> is <tt><font size=+1>I</font></tt>, <tt><font size=+1>L</font></tt>, <tt><font size=+1>C</font></tt> as in <tt><font size=+1>.DS</font></tt>.<br>
+<tt><font size=+1>.FE </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End footnote.<br>
+<tt><font size=+1>.FP</font></tt> <i>x </i>&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Set font positions for a family, e.g., <tt><font size=+1>.FP lucidasans<br>
+.FS </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Start footnote. The note will be moved to the bottom
+of the page.<br>
+<tt><font size=+1>.HO </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;&#8216;Bell Laboratories, Holmdel, New Jersey 07733&#8217;.<br>
+<tt><font size=+1>.I</font></tt> <i>x y </i>&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Italicize <i>x</i>, append <i>y</i>; if no argument switch to italic.<br>
+<tt><font size=+1>.IH </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;&#8216;Bell Laboratories, Naperville, Illinois 60540&#8217;<br>
+<tt><font size=+1>.IM </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Print document in BTL format for an internal memorandum.
+Must be first.<br>
+<tt><font size=+1>.IP</font></tt> <i>x y</i> no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Start indented paragraph, with hanging tag <i>x</i>. Indentation
+is <i>y</i> ens (default 5).<br>
+<tt><font size=+1>.KE </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End keep. Put kept text on next page if not enough room.<br>
+<tt><font size=+1>.KF </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Start floating keep. If the kept text must be moved
+to the next page, float later text back to this page.<br>
+<tt><font size=+1>.KS </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Start keeping following text.<br>
+<tt><font size=+1>.LG </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Make letters larger.<br>
+<tt><font size=+1>.LP </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Start left-blocked paragraph.<br>
+<tt><font size=+1>.LT </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Start a letter; a non-empty first argument produces
+a full Lucent letterhead, a second argument is a room number,
+a third argument is a telephone number.<br>
+<tt><font size=+1>.MF </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print document in BTL format for &#8216;Memorandum for File.&#8217;
+Must be first.<br>
+<tt><font size=+1>.MH </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;&#8216;Bell Laboratories, Murray Hill, New Jersey 07974&#8217;.<br>
+<tt><font size=+1>.MR </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print document in BTL format for &#8216;Memorandum for Record.&#8217;
+Must be first.<br>
+<tt><font size=+1>.ND</font></tt> <i>date</i> troff no &nbsp;&nbsp;&nbsp;&nbsp;Use date supplied (if any) only in special BTL
+format positions; omit from page footer.<br>
+<tt><font size=+1>.NH</font></tt> <i>n </i>&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Same as <tt><font size=+1>.SH</font></tt>, with automatic section numbers like &#8216;1.2.3&#8217;;
+<i>n</i> is subsection level (default 1).<br>
+<tt><font size=+1>.NL </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Make letters normal size.<br>
+<tt><font size=+1>.P1 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Begin program display in constant width font.<br>
+<tt><font size=+1>.P2 </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End program display.<br>
+<tt><font size=+1>.PE </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End picture; see <a href="../man1/pic.html"><i>pic</i>(1)</a>.<br>
+<tt><font size=+1>.PF </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End picture; restore vertical position.<br>
+<tt><font size=+1>.PP </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Begin paragraph. First line indented.<br>
+<tt><font size=+1>.PS</font></tt> <i>h w</i> - &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Start picture; height and width in inches.<br>
+<tt><font size=+1>.PY </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;&#8216;Bell Laboratories, Piscataway, New Jersey 08854&#8217;<br>
+<tt><font size=+1>.QE </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End quoted material.<br>
+<tt><font size=+1>.QP </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Begin quoted paragraph (indent both margins).<br>
+<tt><font size=+1>.QS </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Begin quoted material (indent both margins).<br>
+<tt><font size=+1>.R </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Roman text follows.<br>
+<tt><font size=+1>.RE </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End relative indent level.<br>
+<tt><font size=+1>.RP </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cover sheet and first page for released paper. Must precede
+other requests.<br>
+<tt><font size=+1>.RS </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Start level of relative indentation from which subsequent
+indentation is measured.<br>
+<tt><font size=+1>.SG</font></tt> <i>x </i>&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Insert signature(s) of author(s), ignored except
+in <tt><font size=+1>.TM</font></tt> and <tt><font size=+1>.LT</font></tt>. <i>x</i> is the reference line (initials of author and
+typist). .}f<br>
+<tt><font size=+1>.SH </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Section head follows, font automatically bold.<br>
+<tt><font size=+1>.SM </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Make letters smaller.<br>
+<tt><font size=+1>.TA</font></tt> <i>x</i>... 5... &nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Set tabs in ens. Default is 5 10 15 ...<br>
+<tt><font size=+1>.TE </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End table; see <a href="../man1/tbl.html"><i>tbl</i>(1)</a>.<br>
+<tt><font size=+1>.TH </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;End heading section of table.<br>
+<tt><font size=+1>.TL </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Title follows.<br>
+<tt><font size=+1>.TM</font></tt> <i>x</i>... no &nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print document in BTL technical memorandum format.
+Arguments are TM number, (quoted list of) case number(s), and
+file number. Must precede other requests.<br>
+<tt><font size=+1>.TR</font></tt> <i>x </i>&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print in BTL technical report format; report number
+is <i>x</i>. Must be first.<br>
+<tt><font size=+1>.TS</font></tt> <i>x </i>&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;yes &nbsp;&nbsp;&nbsp;Begin table; if <i>x</i> is <tt><font size=+1>H</font></tt> table heading is repeated on
+new pages.<br>
+<tt><font size=+1>.UL</font></tt> <i>x </i>&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;Underline argument (even in troff).<br>
+<tt><font size=+1>.UX</font></tt> <i>y z</i> - &nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;&#8216;<i>z</i>UNIX<i>y</i>&#8217;; first use gives registered trademark notice.<br>
+<tt><font size=+1>.WH </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- &nbsp;&nbsp;&nbsp;&nbsp;no &nbsp;&nbsp;&nbsp;&nbsp;&#8216;Bell Laboratories, Whippany, New Jersey 07981&#8217;.<br>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man7/plot.html b/man/man7/plot.html
new file mode 100644
index 00000000..ca64b3fd
--- /dev/null
+++ b/man/man7/plot.html
@@ -0,0 +1,386 @@
+<head>
+<title>plot(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PLOT(7)</b><td align=right><b>PLOT(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ plot &ndash; graphics interface<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Files of this format are interpreted by <a href="../man1/plot.html"><i>plot</i>(1)</a> to draw graphics
+ on the screen. A <i>plot</i> file is a UTF stream of instruction lines.
+ Arguments are delimited by spaces, tabs, or commas. Numbers may
+ be floating point. Punctuation marks (except <tt><font size=+1>:</font></tt>) , spaces, and
+ tabs at the beginning of lines are ignored. Comments run from
+ <tt><font size=+1>:</font></tt> to newline. Extra letters appended to a valid instruction are
+ ignored. Thus <tt><font size=+1>...line</font></tt>, <tt><font size=+1>line</font></tt>, <tt><font size=+1>li</font></tt> all mean the same thing. Arguments
+ are interpreted as follows:<br>
+ 1.&nbsp;&nbsp;&nbsp;&nbsp;If an instruction requires no arguments, the rest of the line
+ is ignored.<br>
+ 2.&nbsp;&nbsp;&nbsp;&nbsp;If it requires a string argument, then all the line after the
+ first field separator is passed as argument. Quote marks may be
+ used to preserve leading blanks. Strings may include newlines
+ represented as <tt><font size=+1>\n</font></tt>.<br>
+ 3.&nbsp;&nbsp;&nbsp;&nbsp;Between numeric arguments alphabetic characters and punctuation
+ marks are ignored. Thus <tt><font size=+1>line from 5 6 to 7 8</font></tt> draws a line from
+ (5, 6) to (7, 8).<br>
+ 4.&nbsp;&nbsp;&nbsp;&nbsp;Instructions with numeric arguments remain in effect until a
+ new instruction is read. Such commands may spill over many lines.
+ Thus the following sequence will draw a polygon with vertices
+ (4.5, 6.77), (5.8, 5.6), (7.8, 4.55), and (10.0, 3.6).<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>move 4.5 6.77<br>
+ vec 5.8, 5.6 7.8<br>
+ 4.55 10.0, 3.6 4.5, 6.77<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+
+ </table>
+ The instructions are executed in order. The last designated point
+ in a <tt><font size=+1>line</font></tt>, <tt><font size=+1>move</font></tt>, <tt><font size=+1>rmove</font></tt>, <tt><font size=+1>vec</font></tt>, <tt><font size=+1>rvec</font></tt>, <tt><font size=+1>arc</font></tt>, or <tt><font size=+1>point</font></tt> command becomes
+ the &#8216;current point&#8217; (<i>X,Y</i>) for the next command.<br>
+ <p><font size=+1><b>Open &amp; Close </b></font><br>
+ <tt><font size=+1>o</font></tt> <i>string</i>&nbsp;&nbsp;&nbsp;Open plotting device. For <i>troff</i>, <i>string</i> specifies the
+ size of the plot (default is <tt><font size=+1>6i</font></tt>).<br>
+ <tt><font size=+1>cl</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close plotting device.<br>
+ <p><font size=+1><b>Basic Plotting Commands </b></font><br>
+ <tt><font size=+1>e</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start another frame of output.<br>
+ <tt><font size=+1>m</font></tt> <i>x y</i>&nbsp;&nbsp;&nbsp;&nbsp;(move) Current point becomes <i>x y.<br>
+ </i><tt><font size=+1>rm</font></tt> <i>dx dy</i>Current point becomes <i>X+dx Y+dy.<br>
+ </i><tt><font size=+1>poi</font></tt> <i>x y</i>Plot the point <i>x y</i> and make it the current point.<br>
+ <tt><font size=+1>v</font></tt> <i>x y</i>&nbsp;&nbsp;&nbsp;&nbsp;Draw a vector from the current point to <i>x y.<br>
+ </i><tt><font size=+1>rv</font></tt> <i>dx dy</i>Draw vector from current point to X<i>+</i>dx Y<i>+</i>dy<br>
+ <tt><font size=+1>li</font></tt> <i>x1 y1 x2 y2<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw a line from <i>x1 y1</i> to <i>x2 y2.</i> Make the current point <i>x2 y2.<br>
+ </i>
+ </table>
+
+ </table>
+ <tt><font size=+1>t</font></tt> <i>string</i>&nbsp;&nbsp;&nbsp;Place the <i>string</i> so that its first character is centered
+ on the current point (default). If <i>string</i> begins with <tt><font size=+1>\C</font></tt> (<tt><font size=+1>\R</font></tt>),
+ it is centered (right-adjusted) on the current point. A backslash
+ at the beginning of the string may be escaped with another backslash.<br>
+ <tt><font size=+1>a</font></tt> <i>x1 y1 x2 y2 xc yc r<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw a circular arc from <i>x1 y1</i> to <i>x2 y2</i> with center <i>xc yc</i> and
+ radius <i>r</i>. If the radius is positive, the arc is drawn counterclockwise;
+ negative, clockwise. The starting point is exact but the ending
+ point is approximate.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>ci</font></tt> <i>xc yc r<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw a circle centered at <i>xc yc</i> with radius <i>r</i>. If the range and
+ frame parameters do not specify a square, the &#8216;circle&#8217; will be
+ elliptical.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>di</font></tt> <i>xc yc r<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw a disc centered at <i>xc yc</i> with radius <i>r</i> using the filling
+ color (see <tt><font size=+1>cfill</font></tt> below).<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>bo</font></tt> <i>x1 y1 x2 y2<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw a box with lower left corner at <i>x1 y1</i> and upper right corner
+ at <i>x2 y2.<br>
+ </i>
+ </table>
+
+ </table>
+ <tt><font size=+1>sb</font></tt> <i>x1 y1 x2 y2<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw a solid box with lower left corner at <i>x1 y1</i> and upper right
+ corner at <i>x2 y2</i> using the filling color (see <tt><font size=+1>cfill</font></tt> below).<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>par</font></tt> <i>x1 y1 x2 y2 xg yg<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw a parabola from <i>x1 y1</i> to <i>x2 y2</i> &#8216;guided&#8217; by <i>xg yg.</i> The parabola
+ passes through the midpoint of the line joining <i>xg yg</i> with the
+ midpoint of the line joining <i>x1 y1</i> and <i>x2 y2</i> and is tangent to
+ the lines from <i>xg yg</i> to the endpoints.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>pol { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw polygons with vertices <i>x1 y1 ... xn yn</i> and <i>X1 Y1 ... Xm Ym.</i>
+ If only one polygon is specified, the inner brackets are not needed.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>fi { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Fill a polygon. The arguments are the same as those for <tt><font size=+1>pol</font></tt> except
+ that the first vertex is automatically repeated to close each
+ polygon. The polygons do not have to be connected. Enclosed polygons
+ appear as holes.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>sp { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw a parabolic spline guided by <i>x1 y1 ... xn yn</i> with simple
+ endpoints.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>fsp { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw a parabolic spline guided by <i>x1 y1 ... xn yn</i> with double
+ first endpoint.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>lsp { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw a parabolic spline guided by <i>x1 y1 ... xn yn</i> with double
+ last endpoint.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>dsp { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Draw a parabolic spline guided by <i>x1 y1 ... xn yn</i> with double
+ endpoints.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>csp { {</font></tt><i>x1 y1 ... xn yn</i><tt><font size=+1>}</font></tt> <i>...</i> <tt><font size=+1>{</font></tt><i>X1 Y1 ... Xm Ym</i><tt><font size=+1>} }<br>
+ in</font></tt> <i>filename<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ (include) Take commands from <i>filename</i>.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>de</font></tt> <i>string</i> <tt><font size=+1>{</font></tt> <i>commands</i> <tt><font size=+1>}<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Define <i>string</i> as <i>commands</i>.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>ca</font></tt> <i>string scale<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Invoke commands defined as <i>string</i> applying <i>scale</i> to all coordinates.<br>
+
+ </table>
+
+ </table>
+ <p><font size=+1><b>Commands Controlling the Environment </b></font><br>
+ <tt><font size=+1>co</font></tt> <i>string<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Use color given by first character of <i>string</i>, one of <tt><font size=+1>red</font></tt>, <tt><font size=+1>yellow</font></tt>,
+ <tt><font size=+1>green</font></tt>, <tt><font size=+1>blue</font></tt>, <tt><font size=+1>cyan</font></tt>, <tt><font size=+1>magenta</font></tt>, <tt><font size=+1>white</font></tt>, and <tt><font size=+1>kblack</font></tt>. If <i>string</i> begins
+ with a digit, it is taken to be a 32-bit number specifying 8 bit
+ each of red, green, blue, and alpha. For example, <tt><font size=+1>0xFFFF00FF</font></tt> denotes
+ solid yellow.
+
+ </table>
+
+ </table>
+ <tt><font size=+1>pe</font></tt> <i>string<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Use <i>string</i> as the style for drawing lines. The available pen styles
+ are: <tt><font size=+1>solid</font></tt>, <tt><font size=+1>dott</font></tt>[ed], <tt><font size=+1>short</font></tt>, <tt><font size=+1>long</font></tt>, <tt><font size=+1>dotd</font></tt>[ashed]<tt><font size=+1>, cdash</font></tt>, <tt><font size=+1>ddash<br>
+ </font></tt>
+ </table>
+
+ </table>
+ <tt><font size=+1>cf</font></tt> <i>string<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Color for filling (see <tt><font size=+1>co</font></tt>, above).<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>ra</font></tt> <i>x1 y1 x2 y2<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The data will fall between <i>x1 y1</i> and <i>x2 y2.</i> The plot will be magnified
+ or reduced to fit the device as closely as possible.<br>
+ Range settings that exactly fill the plotting area with unity
+ scaling appear below for devices supported by the filters of <a href="../man1/plot.html"><i>plot</i>(1)</a>.
+ The upper limit is just outside the plotting area. In every case
+ the plotting area is taken to be square; points outside may be
+ displayable on devices with nonsquare faces.
+
+ </table>
+
+ </table>
+ <tt><font size=+1>fr</font></tt> <i>px1 py1 px2 py2<br>
+ </i>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Plot the data in the fraction of the display specified by <i>px1
+ py1</i> for lower left corner and <i>px2 py2</i> for upper right corner.
+ Thus <tt><font size=+1>frame .5 0 1. .5</font></tt> plots in the lower right quadrant of the
+ display; <tt><font size=+1>frame 0. 1. 1. 0.</font></tt> uses the whole display but inverts
+ the <i>y</i> coordinates.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>sa</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Save the current environment, and move to a new one. The new
+ environment inherits the old one. There are 7 levels.<br>
+ <tt><font size=+1>re</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Restore previous environment.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/plot.html"><i>plot</i>(1)</a>, <a href="../man1/graph.html"><i>graph</i>(1)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man7/plumb.html b/man/man7/plumb.html
new file mode 100644
index 00000000..eca67a76
--- /dev/null
+++ b/man/man7/plumb.html
@@ -0,0 +1,357 @@
+<head>
+<title>plumb(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>PLUMB(7)</b><td align=right><b>PLUMB(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ plumb &ndash; format of plumb messages and rules<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;plumb.h&gt;<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <p><font size=+1><b>Message format </b></font><br>
+ The messages formed by the <a href="../man3/plumb.html"><i>plumb</i>(3)</a> library are formatted for
+ transmission between processes into textual form, using newlines
+ to separate the fields. Only the data field may contain embedded
+ newlines. The fields occur in a specified order, and each has
+ a name, corresponding to the elements of the <tt><font size=+1>Plumbmsg
+ </font></tt>structure, that is used in the plumbing rules. The fields, in
+ order, are:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>src</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;application/service generating message<br>
+ <tt><font size=+1>dst</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;destination &#8216;port&#8217; for message<br>
+ <tt><font size=+1>wdir</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;working directory (used if data is a file name)<br>
+ <tt><font size=+1>type</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;form of the data, e.g. <tt><font size=+1>text<br>
+ attr</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;attributes of the message, in <i>name</i><tt><font size=+1>=</font></tt><i>value</i> pairs separated by
+ white space (the value must follow the usual quoting convention
+ if it contains white space or quote characters or equal signs;
+ it cannot contain a newline)<br>
+ <tt><font size=+1>ndata</font></tt>&nbsp;&nbsp;&nbsp;number of bytes of data<br>
+ <tt><font size=+1>data</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;the data itself<br>
+
+ </table>
+ At the moment, only textual data (<tt><font size=+1>type=text</font></tt>) is supported.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ All fields are optional, but <tt><font size=+1>type</font></tt> should usually be set since
+ it describes the form of the data, and <tt><font size=+1>ndata</font></tt> must be an accurate
+ count (possibly zero) of the number of bytes of data. A missing
+ field is represented by an empty line.<br>
+ <p><font size=+1><b>Plumbing rules </b></font><br>
+ The <tt><font size=+1>plumber</font></tt> (see <a href="../man1/plumb.html"><i>plumb</i>(1)</a>) receives messages on its <tt><font size=+1>send</font></tt> port
+ (applications <i>send</i> messages there), interprets and reformats them,
+ and (typically) emits them from a destination port. Its behavior
+ is determined by a plumbing rules file, default <tt><font size=+1>/usr/$user/lib/plumbing</font></tt>,
+ which defines a set of pattern/action
+ rules with which to analyze, rewrite, and dispatch received messages.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The file is a sequence of rule sets, each of which is a set of
+ one-line rules called patterns and actions. There must be at least
+ one pattern and one action in each rule set. (The only exception
+ is that a rule set may contain nothing but <tt><font size=+1>plumb to</font></tt> rules; such
+ a rule set declares the named ports but has no other effect.)
+ A
+ blank line terminates a rule set. Lines beginning with a <tt><font size=+1>#</font></tt> character
+ are commentary and are regarded as blank lines.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A line of the form<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>include</font></tt> <i>file<br>
+ </i>
+ </table>
+ substitutes the contents of <i>file</i> for the line, much as in a C
+ <tt><font size=+1>#include</font></tt> statement. Unlike in C, the file name is not quoted.
+ If <i>file</i> is not an absolute path name, or one beginning <tt><font size=+1>./</font></tt> or <tt><font size=+1>../</font></tt>,
+ <i>file</i> is looked for first in the directory in which the plumber
+ is executing, and then in <tt><font size=+1>/sys/lib/plumb</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When a message is received by the <tt><font size=+1>plumber</font></tt>, the rule sets are examined
+ in order. For each rule set, if the message matches all the patterns
+ in the rule set, the actions associated with the rule set are
+ triggered to dispose of the message. If a rule set is triggered,
+ the rest are ignored for this message. If none is
+ triggered, the message is discarded (giving a write error to the
+ sender) unless it has a <tt><font size=+1>dst</font></tt> field that specifies an existing port,
+ in which case the message is emitted, unchanged, from there.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Patterns and actions all consist of three components: an <i>object</i>,
+ a <i>verb</i>, and arguments. These are separated by white space on the
+ line. The arguments may contain quoted strings and variable substitutions,
+ described below, and in some cases contain multiple words. The
+ object and verb are single words from a pre-
+ defined set.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The object in a pattern is the name of an element of the message,
+ such as <tt><font size=+1>src</font></tt> or <tt><font size=+1>data</font></tt>, or the special case <tt><font size=+1>arg</font></tt>, which refers to
+ the argument component of the current rule. The object in an action
+ is always the word <tt><font size=+1>plumb</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The verbs in the pattern rules describe how the objects and arguments
+ are to be interpreted. Within a rule set, the patterns are evaluated
+ in sequence; if one fails, the rule set fails. Some verbs are
+ predicates that check properties of the message; others rewrite
+ components of the message and implicitly always succeed.
+ Such rewritings are permanent, so rules that specify them should
+ be placed after all pattern-matching rules in the rule set.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>add</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The object must be <tt><font size=+1>attr</font></tt>. Append the argument, which must be
+ a sequence of <i>name</i><tt><font size=+1>=</font></tt><i>value</i> pairs, to the list of attributes of the
+ message.<br>
+ <tt><font size=+1>delete</font></tt>&nbsp;&nbsp;&nbsp;The object must be <tt><font size=+1>attr</font></tt>. If the message has an attribute
+ whose name is the argument, delete it from the list of attributes
+ of the message. (Even if the message does not, the rule matches
+ the message.)<br>
+ <tt><font size=+1>is</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the text of the object is identical to the text of the argument,
+ the rule matches.<br>
+ <tt><font size=+1>isdir</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;If the text of the object is the name of an existing directory,
+ the rule matches and sets the variable <tt><font size=+1>$dir</font></tt> to that directory
+ name.<br>
+ <tt><font size=+1>isfile</font></tt>&nbsp;&nbsp;&nbsp;If the text of the object is the name of an existing file
+ (not a directory), the rule matches and sets the variable <tt><font size=+1>$file</font></tt>
+ to that file name.<br>
+ <tt><font size=+1>matches</font></tt>If the entire text of the object matches the regular expression
+ specified in the argument, the rule matches. This verb is described
+ in more detail below.<br>
+ <tt><font size=+1>set</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The value of the object is set to the value of the argument.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ The <tt><font size=+1>matches</font></tt> verb has special properties that enable the rules
+ to select which portion of the data is to be sent to the destination.
+ By default, a <tt><font size=+1>data matches</font></tt> rule requires that the entire text
+ matches the regular expression. If, however, the message has an
+ attribute named <tt><font size=+1>click</font></tt>, that reports that the message was
+ produced by a mouse click within the text and that the regular
+ expressions in the rule set should be used to identify what portion
+ of the data the user intended. Typically, a program such as an
+ editor will send a white-space delimited block of text containing
+ the mouse click, using the value of the <tt><font size=+1>click</font></tt> attribute (a
+ number starting from 0) to indicate where in the textual data
+ the user pointed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When the message has a <tt><font size=+1>click</font></tt> attribute, the <tt><font size=+1>data matches</font></tt> rules
+ extract the longest leftmost match to the regular expression that
+ contains or abuts the textual location identified by the <tt><font size=+1>click</font></tt>.
+ For a sequence of such rules within a given rule set, each regular
+ expression, evaluated by this specification, must
+ match the same subset of the data for the rule set to match the
+ message. For example, here is a pair of patterns that identify
+ a message whose data contains the name of an existing file with
+ a conventional ending for an encoded picture file:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>data matches '[a&#8722;zA&#8722;Z0&#8722;9_&ndash;./]+'<br>
+ data matches '([a&#8722;zA&#8722;Z0&#8722;9_&ndash;./]+).(jpe?g|gif|bit|ps|pdf)'<br>
+ </font></tt>
+ </table>
+ The first expression extracts the largest subset of the data around
+ the click that contains file name characters; the second sees
+ if it ends with, for example, <tt><font size=+1>.jpeg</font></tt>. If only the second pattern
+ were present, a piece of text <tt><font size=+1>horse.gift</font></tt> could be misinterpreted
+ as an image file named <tt><font size=+1>horse.gif</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If a <tt><font size=+1>click</font></tt> attribute is specified in a message, it will be deleted
+ by the <tt><font size=+1>plumber</font></tt> before sending the message if the <tt><font size=+1>data matches</font></tt>
+ rules expand the selection.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The action rules all have the object <tt><font size=+1>plumb</font></tt>. There are only three
+ verbs for action rules:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>to</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The argument is the name of the port to which the message will
+ be sent. If the message has a destination specified, it must match
+ the <tt><font size=+1>to</font></tt> port of the rule set or the entire rule set will be skipped.
+ (This is the only rule that is evaluated out of order.)<br>
+ <tt><font size=+1>client</font></tt>&nbsp;&nbsp;&nbsp;If no application has the port open, the arguments to a
+ <tt><font size=+1>plumb start</font></tt> rule specify a shell program to run in response to
+ the message. The message will be held, with the supposition that
+ the program will eventually open the port to retrieve it.<br>
+ <tt><font size=+1>start</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;Like <tt><font size=+1>client</font></tt>, but the message is discarded. Only one <tt><font size=+1>start</font></tt>
+ or <tt><font size=+1>client</font></tt> rule should be specified in a rule set.<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ The arguments to all rules may contain quoted strings, exactly
+ as in <a href="../man1/rc.html"><i>rc</i>(1)</a>. They may also contain simple string variables, identified
+ by a leading dollar sign <tt><font size=+1>$</font></tt>. Variables may be set, between rule
+ sets, by assignment statements in the style of <tt><font size=+1>rc</font></tt>. Only one variable
+ assignment may appear on a line. The <tt><font size=+1>plumber</font></tt> also
+ maintains some built-in variables:<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>$0</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The text that matched the entire regular expression in a previous
+ <tt><font size=+1>data matches</font></tt> rule. <tt><font size=+1>$1</font></tt>, <tt><font size=+1>$2</font></tt>, etc. refer to text matching the first,
+ second, etc. parenthesized subexpression.<br>
+ <tt><font size=+1>$attr</font></tt>&nbsp;&nbsp;&nbsp;The textual representation of the attributes of the message.<br>
+ <tt><font size=+1>$data</font></tt>&nbsp;&nbsp;&nbsp;The contents of the data field of the message.<br>
+ <tt><font size=+1>$dir</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;The directory name resulting from a successful <tt><font size=+1>isdir</font></tt> rule.
+ If no such rule has been applied, it is the string constructed
+ syntactically by interpreting <tt><font size=+1>data</font></tt> as a file name in <tt><font size=+1>wdir</font></tt>.<br>
+ <tt><font size=+1>$dst</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;The contents of the <tt><font size=+1>dst</font></tt> field of the message.<br>
+ <tt><font size=+1>$file</font></tt>&nbsp;&nbsp;&nbsp;The file name resulting from a successful <tt><font size=+1>isfile</font></tt> rule. If
+ no such rule has been applied, it is the string constructed syntactically
+ by interpreting <tt><font size=+1>data</font></tt> as a file name in <tt><font size=+1>wdir</font></tt>.<br>
+ <tt><font size=+1>$type</font></tt>&nbsp;&nbsp;&nbsp;The contents of the <tt><font size=+1>type</font></tt> field of the message.<br>
+ <tt><font size=+1>$src</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;The contents of the <tt><font size=+1>src</font></tt> field of the message.<br>
+ <tt><font size=+1>$wdir</font></tt>&nbsp;&nbsp;&nbsp;The contents of the <tt><font size=+1>wdir</font></tt> field of the message.<br>
+ <tt><font size=+1>$plan9</font></tt>The root directory of the Plan 9 tree (see <a href="../man3/get9root.html"><i>get9root</i>(3)</a>).<br>
+
+ </table>
+
+</table>
+<p><font size=+1><b>EXAMPLE </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The following is a modest, representative file of plumbing rules.<br>
+ <tt><font size=+1># these are generally in order from most specific to least,<br>
+ # since first rule that fires wins.<br>
+ addr=':(#?[0&#8722;9]+)'<br>
+ protocol='(https?|ftp|file|gopher|mailto|news|nntp|telnet|wais)'<br>
+ domain='[a&#8722;zA&#8722;Z0&#8722;9_@]+([.:][a&#8722;zA&#8722;Z0&#8722;9_@]+)*/?[a&#8722;zA&#8722;Z0&#8722;9_?,%#~&amp;/\&#8722;]+'<br>
+ file='([:.][a&#8722;zA&#8722;Z0&#8722;9_?,%#~&amp;/\&#8722;]+)*'<br>
+ # image files go to page<br>
+ type is text<br>
+ data matches '[a&#8722;zA&#8722;Z0&#8722;9_\&#8722;./]+'<br>
+ data matches '([a&#8722;zA&#8722;Z0&#8722;9_\&#8722;./]+).(jpe?g|gif|bit)'<br>
+ arg isfile $0<br>
+ plumb to image<br>
+ plumb start page &#8722;w $file<br>
+ # URLs go to web browser<br>
+ type is text<br>
+ data matches $protocol://$domain$file<br>
+ plumb to web<br>
+ plumb start window webbrowser $0<br>
+ # existing files, possibly tagged by line number, go to edit/sam<br>
+ type is text<br>
+ data matches '([.a&#8722;zA&#8722;Z0&#8722;9_/&ndash;]+[a&#8722;zA&#8722;Z0&#8722;9_/\&#8722;])('$addr')?'<br>
+ arg isfile $1<br>
+ data set $file<br>
+ attr add addr=$3<br>
+ plumb to edit<br>
+ plumb start window sam $file<br>
+ # .h files are looked up in /sys/include and passed to edit/sam<br>
+ type is text<br>
+ data matches '([a&#8722;zA&#8722;Z0&#8722;9]+\.h)('$addr')?'<br>
+ arg isfile /sys/include/$1<br>
+ data set $file<br>
+ attr add addr=$3<br>
+ plumb to edit<br>
+ plumb start window sam $file<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </font></tt>
+ The following simple plumbing rules file is a good beginning set
+ of rules.<br>
+ <tt><font size=+1># to update: cp /usr/$user/lib/plumbing /mnt/plumb/rules<br>
+ editor = acme<br>
+ # or editor = sam<br>
+ include basic<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>FILES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>$HOME/lib/plumbing</font></tt>&nbsp;&nbsp;&nbsp;default rules file.<br>
+ <tt><font size=+1>plumb</font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;service name for <a href="../man4/plumber.html"><i>plumber</i>(4)</a>.<br>
+ <tt><font size=+1>/usr/local/plan9/plumb<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ directory for <tt><font size=+1>include</font></tt> files.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>/usr/local/plan9/plumb/fileaddr<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ public macro definitions.<br>
+
+ </table>
+
+ </table>
+ <tt><font size=+1>/usr/local/plan9/plumb/basic<br>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ basic rule set.<br>
+
+ </table>
+
+ </table>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/plumb.html"><i>plumb</i>(1)</a>, <a href="../man3/plumb.html"><i>plumb</i>(3)</a>, <a href="../man4/plumber.html"><i>plumber</i>(4)</a>, <a href="../man7/regexp.html"><i>regexp</i>(7)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man7/regexp.html b/man/man7/regexp.html
new file mode 100644
index 00000000..1bc2c74e
--- /dev/null
+++ b/man/man7/regexp.html
@@ -0,0 +1,131 @@
+<head>
+<title>regexp(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>REGEXP(7)</b><td align=right><b>REGEXP(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ regexp &ndash; Plan 9 regular expression notation<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This manual page describes the regular expression syntax used
+ by the Plan 9 regular expression library <a href="../man3/regexp.html"><i>regexp</i>(3)</a>. It is the
+ form used by <a href="../man1/egrep.html"><i>egrep</i>(1)</a> before <i>egrep</i> got complicated.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <i>regular expression</i> specifies a set of strings of characters.
+ A member of this set of strings is said to be <i>matched</i> by the regular
+ expression. In many applications a delimiter character, commonly
+ <tt><font size=+1>/</font></tt>, bounds a regular expression. In the following specification
+ for regular expressions the word &#8216;character&#8217; means any
+ character (rune) but newline.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The syntax for a regular expression <tt><font size=+1>e0</font></tt> is<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>e3: &nbsp;&nbsp;&nbsp;literal | charclass | '.' | '^' | '$' | '(' e0 ')'<br>
+ e2: &nbsp;&nbsp;&nbsp;e3<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ | &nbsp;&nbsp;&nbsp;e2 REP<br>
+
+ </table>
+ REP: '*' | '+' | '?'<br>
+ e1: &nbsp;&nbsp;&nbsp;e2<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ | &nbsp;&nbsp;&nbsp;e1 e2<br>
+
+ </table>
+ e0: &nbsp;&nbsp;&nbsp;e1<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ | &nbsp;&nbsp;&nbsp;e0 '|' e1<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ </table>
+ </font></tt>
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+
+ </table>
+
+ </table>
+ A <tt><font size=+1>literal</font></tt> is any non-metacharacter, or a metacharacter (one of
+ <tt><font size=+1>.*+?[]()|\^$</font></tt>), or the delimiter preceded by <tt><font size=+1>\</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>charclass</font></tt> is a nonempty string <i>s</i> bracketed <tt><font size=+1>[</font></tt><i>s</i><tt><font size=+1>]</font></tt> (or <tt><font size=+1>[^</font></tt><i>s</i><tt><font size=+1>]</font></tt>); it
+ matches any character in (or not in) <i>s</i>. A negated character class
+ never matches newline. A substring <i>a</i><tt><font size=+1>&#8722;</font></tt><i>b</i>, with <i>a</i> and <i>b</i> in ascending
+ order, stands for the inclusive range of characters between <i>a</i>
+ and <i>b</i>. In <i>s</i>, the metacharacters <tt><font size=+1>&#8722;</font></tt>, <tt><font size=+1>]</font></tt>, an initial <tt><font size=+1>^</font></tt>, and the
+ regular expression delimiter must be preceded by a <tt><font size=+1>\</font></tt>; other metacharacters
+ have no special meaning and may appear unescaped.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>.</font></tt> matches any character.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>^</font></tt> matches the beginning of a line; <tt><font size=+1>$</font></tt> matches the end of the
+ line.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>REP</font></tt> operators match zero or more (<tt><font size=+1>*</font></tt>), one or more (<tt><font size=+1>+</font></tt>), zero
+ or one (<tt><font size=+1>?</font></tt>), instances respectively of the preceding regular expression
+ <tt><font size=+1>e2</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A concatenated regular expression, <tt><font size=+1>e1e2</font></tt>, matches a match to <tt><font size=+1>e1</font></tt>
+ followed by a match to <tt><font size=+1>e2</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An alternative regular expression, <tt><font size=+1>e0|e1</font></tt>, matches either a match
+ to <tt><font size=+1>e0</font></tt> or a match to <tt><font size=+1>e1</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A match to any part of a regular expression extends as far as
+ possible without preventing a match to the remainder of the regular
+ expression.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/regexp.html"><i>regexp</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man7/thumbprint.html b/man/man7/thumbprint.html
new file mode 100644
index 00000000..eccbe595
--- /dev/null
+++ b/man/man7/thumbprint.html
@@ -0,0 +1,68 @@
+<head>
+<title>thumbprint(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>THUMBPRINT(7)</b><td align=right><b>THUMBPRINT(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ thumbprint &ndash; public key thumbprints<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Applications in Plan 9 that use public keys for authentication,
+ for example by calling <tt><font size=+1>tlsClient</font></tt> and <tt><font size=+1>okThumbprint</font></tt> (see <a href="../man3/pushtls.html"><i>pushtls</i>(3)</a>),
+ check the remote side&#8217;s public key by comparing against thumbprints
+ from a trusted list. The list is maintained by people who set
+ local policies about which servers can be trusted
+ for which applications, thereby playing the role taken by certificate
+ authorities in PKI-based systems. By convention, these lists are
+ stored as files in <tt><font size=+1>/sys/lib/tls/</font></tt> and protected by normal file
+ system permissions.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Such a thumbprint file comprises lines made up of attribute/value
+ pairs of the form <i>attr</i><tt><font size=+1>=</font></tt><i>value</i> or <i>attr</i>. The first attribute must
+ be <tt><font size=+1>x509</font></tt> and the second must be <tt><font size=+1>sha1=</font></tt><i>{hex</i><tt><font size=+1>checksum</font></tt><i>of</i><tt><font size=+1>binary</font></tt><i>certificate}.</i>
+ All other attributes are treated as comments. The file may also
+ contain lines of the form <tt><font size=+1>#include</font></tt><i>file
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+ </i>
+ For example, a web server might have thumbprint<br>
+ <tt><font size=+1>x509 sha1=8fe472d31b360a8303cd29f92bd734813cbd923c cn=*.cs.bell&#8722;labs.com<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/pushtls.html"><i>pushtls</i>(3)</a><br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man7/utf.html b/man/man7/utf.html
new file mode 100644
index 00000000..a1e767ec
--- /dev/null
+++ b/man/man7/utf.html
@@ -0,0 +1,96 @@
+<head>
+<title>utf(7) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>UTF(7)</b><td align=right><b>UTF(7)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ UTF, Unicode, ASCII, rune &ndash; character set and format<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The Plan 9 character set and representation are based on the Unicode
+ Standard and on the ISO multibyte UTF-8 encoding (Universal Character
+ Set Transformation Format, 8 bits wide). The Unicode Standard
+ represents its characters in 16 bits; UTF-8 represents such values
+ in an 8-bit byte stream. Throughout this
+ manual, UTF-8 is shortened to UTF.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In Plan 9, a <i>rune</i> is a 16-bit quantity representing a Unicode
+ character. Internally, programs may store characters as runes.
+ However, any external manifestation of textual information, in
+ files or at the interface between programs, uses a machine-independent,
+ byte-stream encoding called UTF.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ UTF is designed so the 7-bit ASCII set (values hexadecimal 00
+ to 7F), appear only as themselves in the encoding. Runes with
+ values above 7F appear as sequences of two or more bytes with
+ values only from 80 to FF.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The UTF encoding of the Unicode Standard is backward compatible
+ with ASCII: programs presented only with ASCII work on Plan 9
+ even if not written to deal with UTF, as do programs that deal
+ with uninterpreted byte streams. However, programs that perform
+ semantic processing on ASCII graphic characters must convert
+ from UTF to runes in order to work properly with non-ASCII input.
+ See <a href="../man3/rune.html"><i>rune</i>(3)</a>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Letting numbers be binary, a rune x is converted to a multibyte
+ UTF sequence as follows:
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ 01. x in [00000000.0bbbbbbb] &rarr; 0bbbbbbb<br>
+ 10. x in [00000bbb.bbbbbbbb] &rarr; 110bbbbb, 10bbbbbb<br>
+ 11. x in [bbbbbbbb.bbbbbbbb] &rarr; 1110bbbb, 10bbbbbb, 10bbbbbb<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Conversion 01 provides a one-byte sequence that spans the ASCII
+ character set in a compatible way. Conversions 10 and 11 represent
+ higher-valued characters as sequences of two or three bytes with
+ the high bit set. Plan 9 does not support the 4, 5, and 6 byte
+ sequences proposed by X-Open. When there are
+ multiple ways to encode a value, for example rune 0, the shortest
+ encoding is used.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ In the inverse mapping, any sequence except those described above
+ is incorrect and is converted to rune hexadecimal 0080.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man1/ascii.html"><i>ascii</i>(1)</a>, <a href="../man1/tcs.html"><i>tcs</i>(1)</a>, <a href="../man3/rune.html"><i>rune</i>(3)</a>, <i>The Unicode Standard</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man9/attach.html b/man/man9/attach.html
new file mode 100644
index 00000000..fda46be2
--- /dev/null
+++ b/man/man9/attach.html
@@ -0,0 +1,107 @@
+<head>
+<title>attach(9P) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ATTACH(9P)</b><td align=right><b>ATTACH(9P)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ attach, auth &ndash; messages to establish a connection<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>size</i>[4] <tt><font size=+1>Tauth</font></tt> <i>tag</i>[2] <i>afid</i>[4] <i>uname</i>[<i>s</i>] <i>aname</i>[<i>s</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Rauth</font></tt> <i>tag</i>[2] <i>aqid</i>[13]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>size</i>[4] <tt><font size=+1>Tattach</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>afid</i>[4] <i>uname</i>[<i>s</i>] <i>aname</i>[<i>s</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Rattach</font></tt> <i>tag</i>[2] <i>qid</i>[13]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>attach</font></tt> message serves as a fresh introduction from a user
+ on the client machine to the server. The message identifies the
+ user (<i>uname</i>) and may select the file tree to access (<i>aname</i>). The
+ <i>afid</i> argument specifies a fid previously established by an <tt><font size=+1>auth</font></tt>
+ message, as described below.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ As a result of the <tt><font size=+1>attach</font></tt> transaction, the client will have a
+ connection to the root directory of the desired file tree, represented
+ by <i>fid</i>. An error is returned if <i>fid</i> is already in use. The server&#8217;s
+ idea of the root of the file tree is represented by the returned
+ <i>qid</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the client does not wish to authenticate the connection, or
+ knows that authentication is not required, the <i>afid</i> field in the
+ <tt><font size=+1>attach</font></tt> message should be set to <tt><font size=+1>NOFID</font></tt>, defined as <tt><font size=+1>(u32int)~0</font></tt> in
+ <tt><font size=+1>&lt;fcall.h&gt;</font></tt>. If the client does wish to authenticate, it must acquire
+ and validate an <i>afid</i> using an <tt><font size=+1>auth</font></tt> message before
+ doing the <tt><font size=+1>attach</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>auth</font></tt> message contains <i>afid</i>, a new fid to be established for
+ authentication, and the <i>uname</i> and <i>aname</i> that will be those of
+ the following <tt><font size=+1>attach</font></tt> message. If the server does not require authentication,
+ it returns <tt><font size=+1>Rerror</font></tt> to the <tt><font size=+1>Tauth</font></tt> message.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the server does require authentication, it returns <i>aqid</i> defining
+ a file of type <tt><font size=+1>QTAUTH</font></tt> (see <i>intro</i>(9P)) that may be read and written
+ (using <tt><font size=+1>read</font></tt> and <tt><font size=+1>write</font></tt> messages in the usual way) to execute an
+ authentication protocol. That protocol&#8217;s definition is not part
+ of 9P itself.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Once the protocol is complete, the same <i>afid</i> is presented in the
+ <tt><font size=+1>attach</font></tt> message for the user, granting entry. The same validated
+ <i>afid</i> may be used for multiple <tt><font size=+1>attach</font></tt> messages with the same <i>uname</i>
+ and <i>aname</i>.<br>
+
+</table>
+<p><font size=+1><b>ENTRY POINTS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fsmount</i> and <i>fsauth</i> (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>) generate <tt><font size=+1>attach</font></tt> and <tt><font size=+1>auth</font></tt>
+ transactions.<br>
+
+</table>
+<p><font size=+1><b>SEE ALSO </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>, <i>version</i>(9P), Plan 9&#8217;s <i>authsrv</i>(6)<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man9/clunk.html b/man/man9/clunk.html
new file mode 100644
index 00000000..34aa001f
--- /dev/null
+++ b/man/man9/clunk.html
@@ -0,0 +1,66 @@
+<head>
+<title>clunk(9P) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>CLUNK(9P)</b><td align=right><b>CLUNK(9P)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ clunk &ndash; forget about a fid<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>size</i>[4] <tt><font size=+1>Tclunk</font></tt> <i>tag</i>[2] <i>fid</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Rclunk</font></tt> <i>tag</i>[2]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>clunk</font></tt> request informs the file server that the current file
+ represented by <i>fid</i> is no longer needed by the client. The actual
+ file is not removed on the server unless the fid had been opened
+ with <tt><font size=+1>ORCLOSE</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Once a fid has been clunked, the same fid can be reused in a new
+ <tt><font size=+1>walk</font></tt> or <tt><font size=+1>attach</font></tt> request.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Even if the <tt><font size=+1>clunk</font></tt> returns an error, the <i>fid</i> is no longer valid.<br>
+
+</table>
+<p><font size=+1><b>ENTRY POINTS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>Clunk</font></tt> transactions are generated by <i>fsclose</i> and <i>fsunmount</i> (see
+ <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>) and indirectly by other actions such as failed <i>fsopen</i>
+ calls.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man9/error.html b/man/man9/error.html
new file mode 100644
index 00000000..ed8b9c6c
--- /dev/null
+++ b/man/man9/error.html
@@ -0,0 +1,53 @@
+<head>
+<title>error(9P) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>ERROR(9P)</b><td align=right><b>ERROR(9P)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ error &ndash; return an error<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>size</i>[4] <tt><font size=+1>Rerror</font></tt> <i>tag</i>[2] <i>ename</i>[<i>s</i>]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>Rerror</font></tt> message (there is no <tt><font size=+1>Terror</font></tt>) is used to return an error
+ string describing the failure of a transaction. It replaces the
+ corresponding reply message that would accompany a successful
+ call; its tag is that of the failing request.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ By convention, clients may truncate error messages after <tt><font size=+1>ERRMAX&#8722;1</font></tt>
+ bytes; <tt><font size=+1>ERRMAX</font></tt> is defined in <tt><font size=+1>&lt;libc.h&gt;</font></tt>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man9/flush.html b/man/man9/flush.html
new file mode 100644
index 00000000..20544557
--- /dev/null
+++ b/man/man9/flush.html
@@ -0,0 +1,98 @@
+<head>
+<title>flush(9P) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>FLUSH(9P)</b><td align=right><b>FLUSH(9P)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ flush &ndash; abort a message<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>size</i>[4] <tt><font size=+1>Tflush</font></tt> <i>tag</i>[2] <i>oldtag</i>[2]<br>
+ <i>size</i>[4] <tt><font size=+1>Rflush</font></tt> <i>tag</i>[2]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ When the response to a request is no longer needed, such as when
+ a user interrupts a process doing a <i>read</i>(9p), a <tt><font size=+1>Tflush</font></tt> request
+ is sent to the server to purge the pending response. The message
+ being flushed is identified by <i>oldtag</i>. The semantics of <tt><font size=+1>flush</font></tt>
+ depends on messages arriving in order.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The server should answer the <tt><font size=+1>flush</font></tt> message immediately. If it
+ recognizes <i>oldtag</i> as the tag of a pending transaction, it should
+ abort any pending response and discard that tag. In either case,
+ it should respond with an <tt><font size=+1>Rflush</font></tt> echoing the <i>tag</i> (not <i>oldtag</i>)
+ of the <tt><font size=+1>Tflush</font></tt> message. A <tt><font size=+1>Tflush</font></tt> can never be
+ responded to by an <tt><font size=+1>Rerror</font></tt> message.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The server may respond to the pending request before responding
+ to the <tt><font size=+1>Tflush</font></tt>. It is possible for a client to send multiple <tt><font size=+1>Tflush</font></tt>
+ messages for a particular pending request. Each subsequent <tt><font size=+1>Tflush</font></tt>
+ must contain as <i>oldtag</i> the tag of the pending request (not a previous
+ <tt><font size=+1>Tflush</font></tt>). Should multiple <tt><font size=+1>Tflush</font></tt>es be
+ received for a pending request, they must be answered in order.
+ A <tt><font size=+1>Rflush</font></tt> for any of the multiple <tt><font size=+1>Tflush</font></tt>es implies an answer for
+ all previous ones. Therefore, should a server receive a request
+ and then multiple flushes for that request, it need respond only
+ to the last flush.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ When the client sends a <tt><font size=+1>Tflush</font></tt>, it must wait to receive the corresponding
+ <tt><font size=+1>Rflush</font></tt> before reusing <i>oldtag</i> for subsequent messages. If a response
+ to the flushed request is received before the <tt><font size=+1>Rflush</font></tt>, the client
+ must honor the response as if it had not been flushed, since the
+ completed request may signify a state
+ change in the server. For instance, <tt><font size=+1>Tcreate</font></tt> may have created a
+ file and <tt><font size=+1>Twalk</font></tt> may have allocated a fid. If no response is received
+ before the <tt><font size=+1>Rflush</font></tt>, the flushed transaction is considered to have
+ been canceled, and should be treated as though it had never been
+ sent.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Several exceptional conditions are handled correctly by the above
+ specification: sending multiple flushes for a single tag, flushing
+ after a transaction is completed, flushing a <tt><font size=+1>Tflush</font></tt>, and flushing
+ an invalid tag.<br>
+
+</table>
+<p><font size=+1><b>ENTRY POINTS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a> library does not generate <tt><font size=+1>flush</font></tt> transactions..
+ <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a> generates <tt><font size=+1>flush</font></tt> transactions to cancel transactions
+ pending when a client hangs up.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man9/index.html b/man/man9/index.html
new file mode 100644
index 00000000..76fb6bdb
--- /dev/null
+++ b/man/man9/index.html
@@ -0,0 +1,69 @@
+<html>
+<head>
+<title>Manual Section 9 - Plan 9 from User Space</title>
+</head>
+<body>
+<table width=100%>
+<tr><td width=20><td>
+<center>
+<table border=0 cellspacing=0 cellpadding=0 width=100%>
+<tr height=1><td width=200><td>
+<tr><td colspan=2>
+ <center>
+ <b>Manual Section 9 - Plan 9 from User Space</b>
+ </center>
+<tr height=10><td>
+<tr><td valign=top><a href="intro.html">intro(9P)</a><td>intro &ndash; introduction to the Plan 9 File Protocol, 9P
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="attach.html">attach(9P)</a><td>attach, auth &ndash; messages to establish a connection
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="clunk.html">clunk(9P)</a><td>clunk &ndash; forget about a fid
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="error.html">error(9P)</a><td>error &ndash; return an error
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="flush.html">flush(9P)</a><td>flush &ndash; abort a message
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="open.html">open(9P)</a><td>open, create &ndash; prepare a fid for I/O on an existing or new file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="read.html">read(9P)</a><td>read, write &ndash; transfer data from and to a file
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="remove.html">remove(9P)</a><td>remove &ndash; remove a file from a server
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="stat.html">stat(9P)</a><td>stat, wstat &ndash; inquire or change file attributes
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="version.html">version(9P)</a><td>version &ndash; negotiate protocol version
+<tr height=1><td>
+<tr height=1><td colspan=2 bgcolor=#cccccc>
+<tr height=1><td>
+<tr><td valign=top><a href="walk.html">walk(9P)</a><td>walk &ndash; descend a directory hierarchy
+</table>
+</center>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<td width=20>
+</table>
+</body>
+</html>
diff --git a/man/man9/intro.html b/man/man9/intro.html
new file mode 100644
index 00000000..226a94eb
--- /dev/null
+++ b/man/man9/intro.html
@@ -0,0 +1,344 @@
+<head>
+<title>intro(9P) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>INTRO(9P)</b><td align=right><b>INTRO(9P)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ intro &ndash; introduction to the Plan 9 File Protocol, 9P<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>#include &lt;fcall.h&gt;<br>
+ </font></tt>
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ A Plan 9 <i>server</i> is an agent that provides one or more hierarchical
+ file systems -- file trees -- that may be accessed by Plan 9 processes.
+ A server responds to requests by <i>clients</i> to navigate the hierarchy,
+ and to create, remove, read, and write files. The prototypical
+ server is a separate machine that stores large numbers
+ of user files on permanent media; such a machine is called, somewhat
+ confusingly, a <i>file server</i>. Another possibility for a server is
+ to synthesize files on demand, perhaps based on information on
+ data structures maintained in memory; the <a href="../man4/plumber.html"><i>plumber</i>(4)</a> server is
+ an example of such a server.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <i>connection</i> to a server is a bidirectional communication path
+ from the client to the server. There may be a single client or
+ multiple clients sharing the same connection.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>Plan 9 File Protocol</i>, 9P, is used for messages between <i>clients</i>
+ and <i>servers</i>. A client transmits <i>requests</i> (<i>T-messages</i>) to a server,
+ which subsequently returns <i>replies</i> (<i>R-messages</i>) to the client.
+ The combined acts of transmitting (receiving) a request of a particular
+ type, and receiving (transmitting) its reply is called a
+ <i>transaction</i> of that type.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each message consists of a sequence of bytes. Two-, four-, and
+ eight-byte fields hold unsigned integers represented in little-endian
+ order (least significant byte first). Data items of larger or
+ variable lengths are represented by a two-byte field specifying
+ a count, <i>n</i>, followed by <i>n</i> bytes of data. Text strings are
+ represented this way, with the text itself stored as a UTF-8 encoded
+ sequence of Unicode characters (see <a href="../man7/utf.html"><i>utf</i>(7)</a>). Text strings in 9P
+ messages are not NUL-terminated: <i>n</i> counts the bytes of UTF-8 data,
+ which include no final zero byte. The NUL character is illegal
+ in all text strings in 9P, and is therefore excluded from file
+ names, user names, and so on.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each 9P message begins with a four-byte size field specifying
+ the length in bytes of the complete message including the four
+ bytes of the size field itself. The next byte is the message type,
+ one of the constants in the enumeration in the include file <tt><font size=+1>&lt;fcall.h&gt;</font></tt>.
+ The next two bytes are an identifying <i>tag</i>, described
+ below. The remaining bytes are parameters of different sizes.
+ In the message descriptions, the number of bytes in a field is
+ given in brackets after the field name. The notation <i>parameter</i>[<i>n</i>]
+ where <i>n</i> is not a constant represents a variable-length parameter:
+ <i>n</i>[2] followed by <i>n</i> bytes of data forming the <i>parameter</i>. The
+ notation <i>string</i>[<i>s</i>] (using a literal <i>s</i> character) is shorthand
+ for <i>s</i>[2] followed by <i>s</i> bytes of UTF-8 text. (Systems may choose
+ to reduce the set of legal characters to reduce syntactic problems,
+ for example to remove slashes from name components, but the protocol
+ has no such restriction. Plan 9 names may contain any
+ printable character (that is, any character outside hexadecimal
+ 00-1F and 80-9F) except slash.) Messages are transported in byte
+ form to allow for machine independence; <a href="../man3/fcall.html"><i>fcall</i>(3)</a> describes routines
+ that convert to and from this form into a machine-dependent C
+ structure.<br>
+
+</table>
+<p><font size=+1><b>MESSAGES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>size</i>[4] <tt><font size=+1>Tversion</font></tt> <i>tag</i>[2] <i>msize</i>[4] <i>version</i>[<i>s</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Rversion</font></tt> <i>tag</i>[2] <i>msize</i>[4] <i>version</i>[<i>s</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Tauth</font></tt> <i>tag</i>[2] <i>afid</i>[4] <i>uname</i>[<i>s</i>] <i>aname</i>[<i>s</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Rauth</font></tt> <i>tag</i>[2] <i>aqid</i>[13]<br>
+ <i>size</i>[4] <tt><font size=+1>Rerror</font></tt> <i>tag</i>[2] <i>ename</i>[<i>s</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Tflush</font></tt> <i>tag</i>[2] <i>oldtag</i>[2]<br>
+ <i>size</i>[4] <tt><font size=+1>Rflush</font></tt> <i>tag</i>[2]<br>
+ <i>size</i>[4] <tt><font size=+1>Tattach</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>afid</i>[4] <i>uname</i>[<i>s</i>] <i>aname</i>[<i>s</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Rattach</font></tt> <i>tag</i>[2] <i>qid</i>[13]<br>
+ <i>size</i>[4] <tt><font size=+1>Twalk</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>newfid</i>[4] <i>nwname</i>[2] <i>nwname</i>*(<i>wname</i>[<i>s</i>])<br>
+ <i>size</i>[4] <tt><font size=+1>Rwalk</font></tt> <i>tag</i>[2] <i>nwqid</i>[2] <i>nwqid</i>*(<i>wqid</i>[13])<br>
+ <i>size</i>[4] <tt><font size=+1>Topen</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>mode</i>[1]<br>
+ <i>size</i>[4] <tt><font size=+1>Ropen</font></tt> <i>tag</i>[2] <i>qid</i>[13] <i>iounit</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Topenfd</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>mode</i>[1]<br>
+ <i>size</i>[4] <tt><font size=+1>Ropenfd</font></tt> <i>tag</i>[2] <i>qid</i>[13] <i>iounit</i>[4] <i>unixfd</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Tcreate</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>name</i>[<i>s</i>] <i>perm</i>[4] <i>mode</i>[1]<br>
+ <i>size</i>[4] <tt><font size=+1>Rcreate</font></tt> <i>tag</i>[2] <i>qid</i>[13] <i>iounit</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Tread</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>offset</i>[8] <i>count</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Rread</font></tt> <i>tag</i>[2] <i>count</i>[4] <i>data</i>[<i>count</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Twrite</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>offset</i>[8] <i>count</i>[4] <i>data</i>[<i>count</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Rwrite</font></tt> <i>tag</i>[2] <i>count</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Tclunk</font></tt> <i>tag</i>[2] <i>fid</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Rclunk</font></tt> <i>tag</i>[2]<br>
+ <i>size</i>[4] <tt><font size=+1>Tremove</font></tt> <i>tag</i>[2] <i>fid</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Rremove</font></tt> <i>tag</i>[2]<br>
+ <i>size</i>[4] <tt><font size=+1>Tstat</font></tt> <i>tag</i>[2] <i>fid</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Rstat</font></tt> <i>tag</i>[2] <i>stat</i>[<i>n</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Twstat</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>stat</i>[<i>n</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Rwstat</font></tt> <i>tag</i>[2]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ Each T-message has a <i>tag</i> field, chosen and used by the client
+ to identify the message. The reply to the message will have the
+ same tag. Clients must arrange that no two outstanding messages
+ on the same connection have the same tag. An exception is the
+ tag <tt><font size=+1>NOTAG</font></tt>, defined as <tt><font size=+1>(ushort)~0</font></tt> in <tt><font size=+1>&lt;fcall.h&gt;</font></tt>: the
+ client can use it, when establishing a connection, to override
+ tag matching in <tt><font size=+1>version</font></tt> messages.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The type of an R-message will either be one greater than the type
+ of the corresponding T-message or <tt><font size=+1>Rerror</font></tt>, indicating that the
+ request failed. In the latter case, the <i>ename</i> field contains a
+ string describing the reason for failure.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>version</font></tt> message identifies the version of the protocol and
+ indicates the maximum message size the system is prepared to handle.
+ It also initializes the connection and aborts all outstanding
+ I/O on the connection. The set of messages between <tt><font size=+1>version</font></tt> requests
+ is called a <i>session</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Most T-messages contain a <i>fid</i>, a 32-bit unsigned integer that
+ the client uses to identify a &#8220;current file&#8221; on the server. Fids
+ are somewhat like file descriptors in a user process, but they
+ are not restricted to files open for I/O: directories being examined,
+ files being accessed by <a href="../man3/stat.html"><i>stat</i>(3)</a> calls, and so on -- all files being
+ manipulated by the operating system -- are identified by fids. Fids
+ are chosen by the client. All requests on a connection share the
+ same fid space; when several clients share a connection, the agent
+ managing the sharing must arrange that no two clients choose the
+ same fid.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The fid supplied in an <tt><font size=+1>attach</font></tt> message will be taken by the server
+ to refer to the root of the served file tree. The <tt><font size=+1>attach</font></tt> identifies
+ the user to the server and may specify a particular file tree
+ served by the server (for those that supply more than one).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Permission to attach to the service is proven by providing a special
+ fid, called <tt><font size=+1>afid</font></tt>, in the <tt><font size=+1>attach</font></tt> message. This <tt><font size=+1>afid</font></tt> is established
+ by exchanging <tt><font size=+1>auth</font></tt> messages and subsequently manipulated using
+ <tt><font size=+1>read</font></tt> and <tt><font size=+1>write</font></tt> messages to exchange authentication information
+ not defined explicitly by 9P. Once the
+ authentication protocol is complete, the <tt><font size=+1>afid</font></tt> is presented in
+ the <tt><font size=+1>attach</font></tt> to permit the user to access the service.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>walk</font></tt> message causes the server to change the current file associated
+ with a fid to be a file in the directory that is the old current
+ file, or one of its subdirectories. <tt><font size=+1>Walk</font></tt> returns a new fid that
+ refers to the resulting file. Usually, a client maintains a fid
+ for the root, and navigates by <tt><font size=+1>walks</font></tt> from the root fid.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A client can send multiple T-messages without waiting for the
+ corresponding R-messages, but all outstanding T-messages must
+ specify different tags. The server may delay the response to a
+ request and respond to later ones; this is sometimes necessary,
+ for example when the client reads from a file that the server
+ synthesizes from external events such as keyboard characters.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Replies (R-messages) to <tt><font size=+1>auth</font></tt>, <tt><font size=+1>attach</font></tt>, <tt><font size=+1>walk</font></tt>, <tt><font size=+1>open</font></tt>, and <tt><font size=+1>create</font></tt> requests
+ convey a <i>qid</i> field back to the client. The qid represents the
+ server&#8217;s unique identification for the file being accessed: two
+ files on the same server hierarchy are the same if and only if
+ their qids are the same. (The client may have multiple
+ fids pointing to a single file on a server and hence having a
+ single qid.) The thirteen-byte qid fields hold a one-byte type,
+ specifying whether the file is a directory, append-only file,
+ etc., and two unsigned integers: first the four-byte qid <i>version</i>,
+ then the eight-byte qid <i>path</i>. The path is an integer unique among
+ all files
+ in the hierarchy. If a file is deleted and recreated with the
+ same name in the same directory, the old and new path components
+ of the qids should be different. The version is a version number
+ for a file; typically, it is incremented every time the file is
+ modified.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An existing file can be <tt><font size=+1>opened</font></tt>, or a new file may be <tt><font size=+1>created</font></tt> in
+ the current (directory) file. I/O of a given number of bytes at
+ a given offset on an open file is done by <tt><font size=+1>read</font></tt> and <tt><font size=+1>write</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A client should <tt><font size=+1>clunk</font></tt> any fid that is no longer needed. The <tt><font size=+1>remove</font></tt>
+ transaction deletes files.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Openfd</font></tt> is an extension used by Unix utilities to allow traditional
+ Unix programs to have their input or output attached to fids on
+ 9P servers. See <i>openfd</i>(9p) and <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a> for details.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>stat</font></tt> transaction retrieves information about the file. The
+ <i>stat</i> field in the reply includes the file&#8217;s name, access permissions
+ (read, write and execute for owner, group and public), access
+ and modification times, and owner and group identifications (see
+ <a href="../man3/stat.html"><i>stat</i>(3)</a>). The owner and group identifications are textual
+ names. The <tt><font size=+1>wstat</font></tt> transaction allows some of a file&#8217;s properties
+ to be changed.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A request can be aborted with a flush request. When a server receives
+ a <tt><font size=+1>Tflush</font></tt>, it should not reply to the message with tag <i>oldtag</i> (unless
+ it has already replied), and it should immediately send an <tt><font size=+1>Rflush</font></tt>.
+ The client must wait until it gets the <tt><font size=+1>Rflush</font></tt> (even if the reply
+ to the original message arrives in the interim),
+ at which point <i>oldtag</i> may be reused.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Because the message size is negotiable and some elements of the
+ protocol are variable length, it is possible (although unlikely)
+ to have a situation where a valid message is too large to fit
+ within the negotiated size. For example, a very long file name
+ may cause a <tt><font size=+1>Rstat</font></tt> of the file or <tt><font size=+1>Rread</font></tt> of its directory entry
+ to be
+ too large to send. In most such cases, the server should generate
+ an error rather than modify the data to fit, such as by truncating
+ the file name. The exception is that a long error string in an
+ <tt><font size=+1>Rerror</font></tt> message should be truncated if necessary, since the string
+ is only advisory and in some sense arbitrary.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Most programs do not see the 9P protocol directly; on Plan 9,
+ calls to library routines that access files are translated by
+ the kernel&#8217;s mount driver into 9P messages.<br>
+ <p><font size=+1><b>Unix </b></font><br>
+ On Unix, 9P services are posted as Unix domain sockets in a well-known
+ directory (see <a href="../man3/getns.html"><i>getns</i>(3)</a> and <a href="../man4/9pserve.html"><i>9pserve</i>(4)</a>). Clients connect to these
+ servers using a 9P client library (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>).<br>
+
+</table>
+<p><font size=+1><b>DIRECTORIES </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ Directories are created by <tt><font size=+1>create</font></tt> with <tt><font size=+1>DMDIR</font></tt> set in the permissions
+ argument (see <i>stat</i>(9P)). The members of a directory can be found
+ with <i>read</i>(9P). All directories must support <tt><font size=+1>walks</font></tt> to the directory
+ <tt><font size=+1>..</font></tt> (dot-dot) meaning parent directory, although by convention
+ directories contain no explicit entry for <tt><font size=+1>..</font></tt> or <tt><font size=+1>.
+ </font></tt>(dot). The parent of the root directory of a server&#8217;s tree is
+ itself.<br>
+
+</table>
+<p><font size=+1><b>ACCESS PERMISSIONS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ This section describes the access permission conventions implemented
+ by most Plan 9 file servers. These conventions are not enforced
+ by the protocol and may differ between servers, especially servers
+ built on top of foreign operating systems.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each file server maintains a set of user and group names. Each
+ user can be a member of any number of groups. Each group has a
+ <i>group leader</i> who has special privileges (see <i>stat</i>(9P) and Plan
+ 9&#8217;s <i>users</i>(6)). Every file request has an implicit user id (copied
+ from the original <tt><font size=+1>attach</font></tt>) and an implicit set of groups (every
+ group of which the user is a member).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Each file has an associated <i>owner</i> and <i>group</i> id and three sets
+ of permissions: those of the owner, those of the group, and those
+ of &#8220;other&#8221; users. When the owner attempts to do something to a
+ file, the owner, group, and other permissions are consulted, and
+ if any of them grant the requested permission, the
+ operation is allowed. For someone who is not the owner, but is
+ a member of the file&#8217;s group, the group and other permissions
+ are consulted. For everyone else, the other permissions are used.
+ Each set of permissions says whether reading is allowed, whether
+ writing is allowed, and whether executing is allowed. A
+ <tt><font size=+1>walk</font></tt> in a directory is regarded as executing the directory, not
+ reading it. Permissions are kept in the low-order bits of the
+ file <i>mode</i>: owner read/write/execute permission represented as
+ 1 in bits 8, 7, and 6 respectively (using 0 to number the low
+ order). The group permissions are in bits 5, 4, and 3, and the
+ other
+ permissions are in bits 2, 1, and 0.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The file <i>mode</i> contains some additional attributes besides the
+ permissions. If bit 31 (<tt><font size=+1>DMDIR</font></tt>) is set, the file is a directory;
+ if bit 30 (<tt><font size=+1>DMAPPEND</font></tt>) is set, the file is append-only (offset is
+ ignored in writes); if bit 29 (<tt><font size=+1>DMEXCL</font></tt>) is set, the file is exclusive-use
+ (only one client may have it open at a time); if bit 27 (<tt><font size=+1>DMAUTH</font></tt>)
+ is
+ set, the file is an authentication file established by <tt><font size=+1>auth</font></tt> messages;
+ if bit 26 (<tt><font size=+1>DMTMP</font></tt>) is set, the contents of the file (or directory)
+ are not included in nightly archives. (Bit 28 is skipped for historical
+ reasons.) These bits are reproduced, from the top bit down, in
+ the type byte of the Qid: <tt><font size=+1>QTDIR</font></tt>, <tt><font size=+1>QTAPPEND</font></tt>, <tt><font size=+1>QTEXCL</font></tt>,
+ (skipping one bit) <tt><font size=+1>QTAUTH</font></tt>, and <tt><font size=+1>QTTMP</font></tt>. The name <tt><font size=+1>QTFILE</font></tt>, defined
+ to be zero, identifies the value of the type for a plain file.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man9/open.html b/man/man9/open.html
new file mode 100644
index 00000000..b893119b
--- /dev/null
+++ b/man/man9/open.html
@@ -0,0 +1,154 @@
+<head>
+<title>open(9P) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>OPEN(9P)</b><td align=right><b>OPEN(9P)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ open, create &ndash; prepare a fid for I/O on an existing or new file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>size</i>[4] <tt><font size=+1>Topen</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>mode</i>[1]<br>
+ <i>size</i>[4] <tt><font size=+1>Ropen</font></tt> <i>tag</i>[2] <i>qid</i>[13] <i>iounit</i>[4]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>size</i>[4] <tt><font size=+1>Tcreate</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>name</i>[<i>s</i>] <i>perm</i>[4] <i>mode</i>[1]<br>
+ <i>size</i>[4] <tt><font size=+1>Rcreate</font></tt> <i>tag</i>[2] <i>qid</i>[13] <i>iounit</i>[4]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>open</font></tt> request asks the file server to check permissions and
+ prepare a fid for I/O with subsequent <tt><font size=+1>read</font></tt> and <tt><font size=+1>write</font></tt> messages.
+ The <i>mode</i> field determines the type of I/O: 0 (called <tt><font size=+1>OREAD</font></tt> in
+ <tt><font size=+1>&lt;libc.h&gt;</font></tt>), 1 (<tt><font size=+1>OWRITE</font></tt>), 2 (<tt><font size=+1>ORDWR</font></tt>), and 3 (<tt><font size=+1>OEXEC</font></tt>) mean <i>read access,
+ write access, read and write access,</i> and <i>execute
+ access,</i> to be checked against the permissions for the file. In
+ addition, if <i>mode</i> has the <tt><font size=+1>OTRUNC</font></tt> (<tt><font size=+1>0x10</font></tt>) bit set, the file is to
+ be truncated, which requires write permission (if the file is
+ append-only, and permission is granted, the <tt><font size=+1>open</font></tt> succeeds but
+ the file will not be truncated); if the <i>mode</i> has the <tt><font size=+1>ORCLOSE</font></tt> (<tt><font size=+1>0x40</font></tt>)
+ bit set, the file is to be removed when the fid is clunked, which
+ requires permission to remove the file from its directory. All
+ other bits in <i>mode</i> should be zero. It is illegal to write a directory,
+ truncate it, or attempt to remove it on close. If the file is
+ marked for exclusive use (see <i>stat</i>(9P)), only one client can have
+ the
+ file open at any time. That is, after such a file has been opened,
+ further opens will fail until <i>fid</i> has been clunked. All these
+ permissions are checked at the time of the <tt><font size=+1>open</font></tt> request; subsequent
+ changes to the permissions of files do not affect the ability
+ to read, write, or remove an open file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>create</font></tt> request asks the file server to create a new file with
+ the <i>name</i> supplied, in the directory (<i>dir</i>) represented by <i>fid</i>,
+ and requires write permission in the directory. The owner of the
+ file is the implied user id of the request, the group of the file
+ is the same as <i>dir</i>, and the permissions are the value of
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>perm &amp; (~0666 | (dir.perm &amp; 0666)) <br>
+ </font></tt>
+ </table>
+
+ </table>
+ if a regular file is being created and<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>perm &amp; (~0777 | (dir.perm &amp; 0777)) <br>
+ </font></tt>
+ </table>
+
+ </table>
+ if a directory is being created. This means, for example, that
+ if the <tt><font size=+1>create</font></tt> allows read permission to others, but the containing
+ directory does not, then the created file will not allow others
+ to read the file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Finally, the newly created file is opened according to <i>mode</i>, and
+ <i>fid</i> will represent the newly opened file. <i>Mode</i> is not checked
+ against the permissions in <i>perm</i>. The <i>qid</i> for the new file is returned
+ with the <tt><font size=+1>create</font></tt> reply message.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Directories are created by setting the <tt><font size=+1>DMDIR</font></tt> bit (<tt><font size=+1>0x80000000</font></tt>)
+ in the <i>perm</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The names <tt><font size=+1>.</font></tt> and <tt><font size=+1>..</font></tt> are special; it is illegal to create files
+ with these names.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ It is an error for either of these messages if the fid is already
+ the product of a successful <tt><font size=+1>open</font></tt> or <tt><font size=+1>create</font></tt> message.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ An attempt to <tt><font size=+1>create</font></tt> a file in a directory where the given <i>name</i>
+ already exists will be rejected; in this case, the <i>fscreate</i> call
+ (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>) uses <tt><font size=+1>open</font></tt> with truncation. The algorithm used
+ by the <i>create</i> system call is: first walk to the directory to contain
+ the file. If that fails, return an error. Next <tt><font size=+1>walk</font></tt> to the
+ specified file. If the <tt><font size=+1>walk</font></tt> succeeds, send a request to <tt><font size=+1>open</font></tt> and
+ truncate the file and return the result, successful or not. If
+ the <tt><font size=+1>walk</font></tt> fails, send a create message. If that fails, it may be
+ because the file was created by another process after the previous
+ walk failed, so (once) try the <tt><font size=+1>walk</font></tt> and <tt><font size=+1>open</font></tt> again.
+
+</table>
+<p><font size=+1><b>ENTRY POINTS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fsopen</i> and <i>fscreate</i> (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>) both generate <tt><font size=+1>open</font></tt> messages;
+ only <i>fscreate</i> generates a <tt><font size=+1>create</font></tt> message. The <tt><font size=+1>iounit</font></tt> associated
+ with an open file may be discovered by calling <i>fsiounit</i>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For programs that need atomic file creation, without the race
+ that exists in the <tt><font size=+1>open&#8722;create</font></tt> sequence described above, <i>fscreate</i>
+ does the following. If the <tt><font size=+1>OEXCL</font></tt> (<tt><font size=+1>0x1000</font></tt>) bit is set in the <i>mode</i>
+ for a <i>fscreate</i> call, the <tt><font size=+1>open</font></tt> message is not sent; the kernel
+ issues only the <tt><font size=+1>create</font></tt>. Thus, if the file exists, <i>fscreate
+ </i>will draw an error, but if it doesn&#8217;t and the <i>fscreate</i> call succeeds,
+ the process issuing the <i>fscreate</i> is guaranteed to be the one that
+ created the file.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man9/read.html b/man/man9/read.html
new file mode 100644
index 00000000..c524d8de
--- /dev/null
+++ b/man/man9/read.html
@@ -0,0 +1,96 @@
+<head>
+<title>read(9P) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>READ(9P)</b><td align=right><b>READ(9P)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ read, write &ndash; transfer data from and to a file<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>size</i>[4] <tt><font size=+1>Tread</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>offset</i>[8] <i>count</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Rread</font></tt> <i>tag</i>[2] <i>count</i>[4] <i>data</i>[<i>count</i>]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>size</i>[4] <tt><font size=+1>Twrite</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>offset</i>[8] <i>count</i>[4] <i>data</i>[<i>count</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Rwrite</font></tt> <i>tag</i>[2] <i>count</i>[4]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>read</font></tt> request asks for <i>count</i> bytes of data from the file identified
+ by <i>fid</i>, which must be opened for reading, starting <i>offset</i> bytes
+ after the beginning of the file. The bytes are returned with the
+ <tt><font size=+1>read</font></tt> reply message.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>count</i> field in the reply indicates the number of bytes returned.
+ This may be less than the requested amount. If the <i>offset</i> field
+ is greater than or equal to the number of bytes in the file, a
+ count of zero will be returned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ For directories, <tt><font size=+1>read</font></tt> returns an integral number of directory
+ entries exactly as in <tt><font size=+1>stat</font></tt> (see <i>stat</i>(9P)), one for each member
+ of the directory. The <tt><font size=+1>read</font></tt> request message must have <tt><font size=+1>offset</font></tt> equal
+ to zero or the value of <tt><font size=+1>offset</font></tt> in the previous <tt><font size=+1>read</font></tt> on the directory,
+ plus the number of bytes returned in the previous
+ <tt><font size=+1>read</font></tt>. In other words, seeking other than to the beginning is illegal
+ in a directory.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>write</font></tt> request asks that <i>count</i> bytes of data be recorded in
+ the file identified by <i>fid</i>, which must be opened for writing,
+ starting <i>offset</i> bytes after the beginning of the file. If the
+ file is append-only, the data will be placed at the end of the
+ file regardless of <i>offset</i>. Directories may not be written.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>write</font></tt> reply records the number of bytes actually written.
+ It is usually an error if this is not the same as requested.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Because 9P implementations may limit the size of individual messages,
+ more than one message may be produced by a single <i>read</i> or <i>write</i>
+ call. The <i>iounit</i> field returned by <i>open</i>(9P), if non-zero, reports
+ the maximum size that is guaranteed to be transferred atomically.<br>
+
+</table>
+<p><font size=+1><b>ENTRY POINTS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fsread</i> and <i>fswrite</i> (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>) generate the corresponding
+ messages. Because they take an offset parameter, the <i>fspread</i> and
+ <i>fspwrite</i> calls correspond more directly to the 9P messages. Although
+ <i>fsseek</i> affects the offset, it does not generate a message.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man9/remove.html b/man/man9/remove.html
new file mode 100644
index 00000000..162db8bc
--- /dev/null
+++ b/man/man9/remove.html
@@ -0,0 +1,70 @@
+<head>
+<title>remove(9P) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>REMOVE(9P)</b><td align=right><b>REMOVE(9P)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ remove &ndash; remove a file from a server<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>size</i>[4] <tt><font size=+1>Tremove</font></tt> <i>tag</i>[2] <i>fid</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Rremove</font></tt> <i>tag</i>[2]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>remove</font></tt> request asks the file server both to remove the file
+ represented by <i>fid</i> and to <tt><font size=+1>clunk</font></tt> the <i>fid</i>, even if the remove fails.
+ This request will fail if the client does not have write permission
+ in the parent directory.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ It is correct to consider <tt><font size=+1>remove</font></tt> to be a <tt><font size=+1>clunk</font></tt> with the side effect
+ of removing the file if permissions allow.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If a file has been opened as multiple fids, possibly on different
+ connections, and one fid is used to remove the file, whether the
+ other fids continue to provide access to the file is implementation-defined.
+ The Plan 9 file servers remove the file immediately: attempts
+ to use the other fids will yield a &#8220;phase error.&#8221; <i>U9fs</i>
+ follows the semantics of the underlying Unix file system, so other
+ fids typically remain usable.<br>
+
+</table>
+<p><font size=+1><b>ENTRY POINTS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fsremove</i> (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>) generates <tt><font size=+1>remove</font></tt> messages.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man9/stat.html b/man/man9/stat.html
new file mode 100644
index 00000000..eb5c9c4a
--- /dev/null
+++ b/man/man9/stat.html
@@ -0,0 +1,258 @@
+<head>
+<title>stat(9P) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>STAT(9P)</b><td align=right><b>STAT(9P)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ stat, wstat &ndash; inquire or change file attributes<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>size</i>[4] <tt><font size=+1>Tstat</font></tt> <i>tag</i>[2] <i>fid</i>[4]<br>
+ <i>size</i>[4] <tt><font size=+1>Rstat</font></tt> <i>tag</i>[2] <i>stat</i>[<i>n</i>]
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <i>size</i>[4] <tt><font size=+1>Twstat</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>stat</i>[<i>n</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Rwstat</font></tt> <i>tag</i>[2]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>stat</font></tt> transaction inquires about the file identified by <i>fid</i>.
+ The reply will contain a machine-independent <i>directory entry</i>,
+ <i>stat</i>, laid out as follows:<br>
+ <i>size</i>[2]total byte count of the following data<br>
+ <i>type</i>[2]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ for kernel use<br>
+
+ </table>
+ <i>dev</i>[4]for kernel use<br>
+ <i>qid.type</i>[1]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the type of the file (directory, etc.), represented as a bit vector
+ corresponding to the high 8 bits of the file&#8217;s mode word.<br>
+
+ </table>
+ <i>qid.vers</i>[4]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ version number for given path<br>
+
+ </table>
+ <i>qid.path</i>[8]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ the file server&#8217;s unique identification for the file<br>
+
+ </table>
+ <i>mode</i>[4]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ permissions and flags<br>
+
+ </table>
+ <i>atime</i>[4]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ last access time<br>
+
+ </table>
+ <i>mtime</i>[4]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ last modification time<br>
+
+ </table>
+ <i>length</i>[8]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ length of file in bytes<br>
+
+ </table>
+ <i>name</i>[ s ]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ file name; must be <tt><font size=+1>/</font></tt> if the file is the root directory of the
+ server<br>
+
+ </table>
+ <i>uid</i>[ s ]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ owner name<br>
+
+ </table>
+ <i>gid</i>[ s ]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ group name<br>
+
+ </table>
+ <i>muid</i>[ s ]<br>
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ name of the user who last modified the file
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+
+ </table>
+ Integers in this encoding are in little-endian order (least significant
+ byte first). The <i>convM2D</i> and <i>convD2M</i> routines (see <a href="../man3/fcall.html"><i>fcall</i>(3)</a>) convert
+ between directory entries and a C structure called a <tt><font size=+1>Dir</font></tt>.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>mode</i> contains permission bits as described in <i>intro</i>(9P) and
+ the following: <tt><font size=+1>0x80000000</font></tt> (<tt><font size=+1>DMDIR</font></tt>, this file is a directory), <tt><font size=+1>0x40000000</font></tt>
+ (<tt><font size=+1>DMAPPEND</font></tt>, append only), <tt><font size=+1>0x20000000</font></tt> (<tt><font size=+1>DMEXCL</font></tt>, exclusive use), <tt><font size=+1>0x04000000</font></tt>
+ (<tt><font size=+1>DMTMP</font></tt>, temporary); these are echoed in <tt><font size=+1>Qid.type</font></tt>. Writes to append-only
+ files always
+ place their data at the end of the file; the <i>offset</i> in the <tt><font size=+1>write</font></tt>
+ message is ignored, as is the <tt><font size=+1>OTRUNC</font></tt> bit in an open. Exclusive
+ use files may be open for I/O by only one fid at a time across
+ all clients of the server. If a second open is attempted, it draws
+ an error. Servers may implement a timeout on the lock on an
+ exclusive use file: if the fid holding the file open has been
+ unused for an extended period (of order at least minutes), it
+ is reasonable to break the lock and deny the initial fid further
+ I/O. Temporary files are not included in nightly archives (see
+ Plan 9&#8217;s <i>fossil</i>(4)).
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The two time fields are measured in seconds since the epoch (Jan
+ 1 00:00 1970 GMT). The <i>mtime</i> field reflects the time of the last
+ change of content (except when later changed by <tt><font size=+1>wstat</font></tt>). For a
+ plain file, <i>mtime</i> is the time of the most recent <tt><font size=+1>create</font></tt>, <tt><font size=+1>open</font></tt>
+ with truncation, or <tt><font size=+1>write</font></tt>; for a directory it is the time of
+ the most recent <tt><font size=+1>remove</font></tt>, <tt><font size=+1>create</font></tt>, or <tt><font size=+1>wstat</font></tt> of a file in the directory.
+ Similarly, the <i>atime</i> field records the last <tt><font size=+1>read</font></tt> of the contents;
+ also it is set whenever <i>mtime</i> is set. In addition, for a directory,
+ it is set by an <tt><font size=+1>attach</font></tt>, <tt><font size=+1>walk</font></tt>, or <tt><font size=+1>create</font></tt>, all whether successful
+ or not.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>muid</i> field names the user whose actions most recently changed
+ the <i>mtime</i> of the file.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>length</i> records the number of bytes in the file. Directories
+ and most files representing devices have a conventional length
+ of 0.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>stat</font></tt> request requires no special permissions.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>wstat</font></tt> request can change some of the file status information.
+ The <i>name</i> can be changed by anyone with write permission in the
+ parent directory; it is an error to change the name to that of
+ an existing file. The <i>length</i> can be changed (affecting the actual
+ length of the file) by anyone with write permission on the
+ file. It is an error to attempt to set the length of a directory
+ to a non-zero value, and servers may decide to reject length changes
+ for other reasons. The <i>mode</i> and <i>mtime</i> can be changed by the owner
+ of the file or the group leader of the file&#8217;s current group. The
+ directory bit cannot be changed by a <tt><font size=+1>wstat</font></tt>; the other
+ defined permission and mode bits can. The <i>gid</i> can be changed:
+ by the owner if also a member of the new group; or by the group
+ leader of the file&#8217;s current group if also leader of the new group
+ (see <i>intro</i>(9P) for more information about permissions, users,
+ and groups). None of the other data can be altered by a
+ <tt><font size=+1>wstat</font></tt> and attempts to change them will trigger an error. In particular,
+ it is illegal to attempt to change the owner of a file. (These
+ conditions may be relaxed when establishing the initial state
+ of a file server; see Plan 9&#8217;s <i>fsconfig</i>(8).)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Either all the changes in <tt><font size=+1>wstat</font></tt> request happen, or none of them
+ does: if the request succeeds, all changes were made; if it fails,
+ none were.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>wstat</font></tt> request can avoid modifying some properties of the file
+ by providing explicit &#8220;don&#8217;t touch&#8221; values in the <tt><font size=+1>stat</font></tt> data that
+ is sent: zero-length strings for text values and the maximum unsigned
+ value of appropriate size for integral values. As a special case,
+ if <i>all</i> the elements of the directory entry in a <tt><font size=+1>Twstat
+ </font></tt>message are &#8220;don&#8217;t touch&#8221; values, the server may interpret it
+ as a request to guarantee that the contents of the associated
+ file are committed to stable storage before the <tt><font size=+1>Rwstat</font></tt> message
+ is returned. (Consider the message to mean, &#8220;make the state of
+ the file exactly what it claims to be.&#8221;)
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <i>read</i> of a directory yields an integral number of directory entries
+ in the machine independent encoding given above (see <i>read</i>(9P)).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ Note that since the <tt><font size=+1>stat</font></tt> information is sent as a 9P variable-length
+ datum, it is limited to a maximum of 65535 bytes.<br>
+
+</table>
+<p><font size=+1><b>ENTRY POINTS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <tt><font size=+1>Stat</font></tt> messages are generated by <i>fsdirfstat</i> and <i>fsdirstat</i> (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>).
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ <tt><font size=+1>Wstat</font></tt> messages are generated by <i>fsdirfwstat</i> and <i>fsdirwstat</i>.<br>
+
+</table>
+<p><font size=+1><b>BUGS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ To make the contents of a directory, such as returned by <i>read</i>(9P),
+ easy to parse, each directory entry begins with a size field.
+ For consistency, the entries in <tt><font size=+1>Twstat</font></tt> and <tt><font size=+1>Rstat</font></tt> messages also
+ contain their size, which means the size appears twice. For example,
+ the <tt><font size=+1>Rstat</font></tt> message is formatted as &#8220;(4+1+2+2+<i>n</i>)[4]
+ <tt><font size=+1>Rstat</font></tt> <i>tag</i>[2] <i>n</i>[2] (<i>n</i>-2)[2] <i>type</i>[2] <i>dev</i>[4]...,&#8221; where <i>n</i> is the
+ value returned by <tt><font size=+1>convD2M</font></tt>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man9/version.html b/man/man9/version.html
new file mode 100644
index 00000000..3d382f6b
--- /dev/null
+++ b/man/man9/version.html
@@ -0,0 +1,100 @@
+<head>
+<title>version(9P) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>VERSION(9P)</b><td align=right><b>VERSION(9P)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ version &ndash; negotiate protocol version<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>size</i>[4] <tt><font size=+1>Tversion</font></tt> <i>tag</i>[2] <i>msize</i>[4] <i>version</i>[<i>s</i>]<br>
+ <i>size</i>[4] <tt><font size=+1>Rversion</font></tt> <i>tag</i>[2] <i>msize</i>[4] <i>version</i>[<i>s</i>]<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>version</font></tt> request negotiates the protocol version and message
+ size to be used on the connection and initializes the connection
+ for I/O. <tt><font size=+1>Tversion</font></tt> must be the first message sent on the 9P connection,
+ and the client cannot issue any further requests until it has
+ received the <tt><font size=+1>Rversion</font></tt> reply. The <i>tag</i> should be
+ <tt><font size=+1>NOTAG</font></tt> (value <tt><font size=+1>(ushort)~0</font></tt>) for a <tt><font size=+1>version</font></tt> message.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The client suggests a maximum message size, <tt><font size=+1>msize</font></tt>, that is the
+ maximum length, in bytes, it will ever generate or expect to receive
+ in a single 9P message. This count includes all 9P protocol data,
+ starting from the <tt><font size=+1>size</font></tt> field and extending through the message,
+ but excludes enveloping transport protocols. The
+ server responds with its own maximum, <tt><font size=+1>msize</font></tt>, which must be less
+ than or equal to the client&#8217;s value. Thenceforth, both sides of
+ the connection must honor this limit.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>version</font></tt> string identifies the level of the protocol. The string
+ must always begin with the two characters &#8220;<tt><font size=+1>9P</font></tt>&#8221;. If the server
+ does not understand the client&#8217;s version string, it should respond
+ with an <tt><font size=+1>Rversion</font></tt> message (not <tt><font size=+1>Rerror</font></tt>) with the <tt><font size=+1>version</font></tt> string
+ the 7 characters &#8220;<tt><font size=+1>unknown</font></tt>&#8221;.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The server may respond with the client&#8217;s version string, or a
+ version string identifying an earlier defined protocol version.
+ Currently, the only defined version is the 6 characters &#8220;<tt><font size=+1>9P2000</font></tt>&#8221;.
+ Version strings are defined such that, if the client string contains
+ one or more period characters, the initial substring up to but
+ not including any single period in the version string defines
+ a version of the protocol. After stripping any such period-separated
+ suffix, the server is allowed to respond with a string of the
+ form <tt><font size=+1>9P</font></tt><i>nnnn</i>, where <i>nnnn</i> is less than or equal to the digits sent
+ by the client.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The client and server will use the protocol version defined by
+ the server&#8217;s response for all subsequent communication on the
+ connection.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A successful <tt><font size=+1>version</font></tt> request initializes the connection. All outstanding
+ I/O on the connection is aborted; all active fids are freed (&#8216;clunked&#8217;)
+ automatically. The set of messages between <tt><font size=+1>version</font></tt> requests is
+ called a <i>session</i>.<br>
+
+</table>
+<p><font size=+1><b>ENTRY POINTS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fsversion</i> (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>) generates <tt><font size=+1>version</font></tt> messages; it is
+ called automatically by <i>fsmount</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/man/man9/walk.html b/man/man9/walk.html
new file mode 100644
index 00000000..32a72a9e
--- /dev/null
+++ b/man/man9/walk.html
@@ -0,0 +1,119 @@
+<head>
+<title>walk(9P) - Plan 9 from User Space</title>
+<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
+</head>
+<body bgcolor=#ffffff>
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=10><td>
+<tr><td width=20><td>
+<tr><td width=20><td><b>WALK(9P)</b><td align=right><b>WALK(9P)</b>
+<tr><td width=20><td colspan=2>
+ <br>
+<p><font size=+1><b>NAME </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ walk &ndash; descend a directory hierarchy<br>
+
+</table>
+<p><font size=+1><b>SYNOPSIS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>size</i>[4] <tt><font size=+1>Twalk</font></tt> <i>tag</i>[2] <i>fid</i>[4] <i>newfid</i>[4] <i>nwname</i>[2] <i>nwname</i>*(<i>wname</i>[<i>s</i>])<br>
+ <i>size</i>[4] <tt><font size=+1>Rwalk</font></tt> <i>tag</i>[2] <i>nwqid</i>[2] <i>nwqid</i>*(<i>qid</i>[13])<br>
+
+</table>
+<p><font size=+1><b>DESCRIPTION </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ The <tt><font size=+1>walk</font></tt> request carries as arguments an existing <i>fid</i> and a proposed
+ <i>newfid</i> (which must not be in use unless it is the same as <i>fid</i>)
+ that the client wishes to associate with the result of traversing
+ the directory hierarchy by &#8216;walking&#8217; the hierarchy using the successive
+ path name elements <tt><font size=+1>wname</font></tt>. The <i>fid</i> must represent
+ a directory unless zero path name elements are specified.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <i>fid</i> must be valid in the current session and must not have
+ been opened for I/O by an <tt><font size=+1>open</font></tt> or <tt><font size=+1>create</font></tt> message. If the full
+ sequence of <tt><font size=+1>nwname</font></tt> elements is walked successfully, <i>newfid</i> will
+ represent the file that results. If not, <i>newfid</i> (and <tt><font size=+1>fid</font></tt>) will
+ be unaffected. However, if <i>newfid</i> is in use or otherwise illegal,
+ an <tt><font size=+1>Rerror</font></tt> is returned.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The name &#8220;<tt><font size=+1>..</font></tt>&#8221; (dot-dot) represents the parent directory. The name
+ &#8220;<tt><font size=+1>.</font></tt>&#8221; (dot), meaning the current directory, is not used in the protocol.
+
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ It is legal for <tt><font size=+1>nwname</font></tt> to be zero, in which case <i>newfid</i> will represent
+ the same file as <i>fid</i> and the <tt><font size=+1>walk</font></tt> will usually succeed; this is
+ equivalent to walking to dot. The rest of this discussion assumes
+ <tt><font size=+1>nwname</font></tt> is greater than zero.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ The <tt><font size=+1>nwname</font></tt> path name elements <tt><font size=+1>wname</font></tt> are walked in order, &#8220;elementwise&#8221;.
+ For the first elementwise walk to succeed, the file identified
+ by <i>fid</i> must be a directory, and the implied user of the request
+ must have permission to search the directory (see <i>intro</i>(9P)).
+ Subsequent elementwise walks have equivalent
+ restrictions applied to the implicit fid that results from the
+ preceding elementwise walk.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If the first element cannot be walked for any reason, <tt><font size=+1>Rerror</font></tt> is
+ returned. Otherwise, the walk will return an <tt><font size=+1>Rwalk</font></tt> message containing
+ <i>nwqid</i> qids corresponding, in order, to the files that are visited
+ by the <i>nwqid</i> successful elementwise walks; <i>nwqid</i> is therefore
+ either <tt><font size=+1>nwname</font></tt> or the index of the first elementwise
+ walk that failed. The value of <i>nwqid</i> cannot be zero unless <tt><font size=+1>nwname</font></tt>
+ is zero. Also, <i>nwqid</i> will always be less than or equal to <tt><font size=+1>nwname</font></tt>.
+ Only if it is equal, however, will <i>newfid</i> be affected, in which
+ case <i>newfid</i> will represent the file reached by the final elementwise
+ walk requested in the message.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ A <tt><font size=+1>walk</font></tt> of the name &#8220;<tt><font size=+1>..</font></tt>&#8221; in the root directory of a server is equivalent
+ to a walk with no name elements.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ If <i>newfid</i> is the same as <i>fid</i>, the above discussion applies, with
+ the obvious difference that if the walk changes the state of <i>newfid</i>,
+ it also changes the state of <i>fid</i>; and if <i>newfid</i> is unaffected,
+ then <i>fid</i> is also unaffected.
+ <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
+
+ To simplify the implementation of the servers, a maximum of sixteen
+ name elements or qids may be packed in a single message. This
+ constant is called <tt><font size=+1>MAXWELEM</font></tt> in <a href="../man3/fcall.html"><i>fcall</i>(3)</a>. Despite this restriction,
+ the system imposes no limit on the number of elements in a file
+ name, only the number that may be transmitted in a
+ single message.<br>
+
+</table>
+<p><font size=+1><b>ENTRY POINTS </b></font><br>
+
+<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>
+
+ <i>Fswalk</i> (see <a href="../man3/9pclient.html"><i>9pclient</i>(3)</a>) generates walk messages. One or more
+ walk messages may be generated by any call that evaluates file
+ names: <i>fsopen</i>, <i>fsopenfd</i>, <i>fsdirstat</i>, <i>fsdirwstat</i>.<br>
+
+</table>
+
+<td width=20>
+<tr height=20><td>
+</table>
+<!-- TRAILER -->
+<table border=0 cellpadding=0 cellspacing=0 width=100%>
+<tr height=15><td width=10><td><td width=10>
+<tr><td><td>
+<center>
+<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
+</center>
+</table>
+<!-- TRAILER -->
+</body></html>
diff --git a/rcmain b/rcmain
index 2900960c..491404a4 100644
--- a/rcmain
+++ b/rcmain
@@ -14,11 +14,6 @@ if(flag p) path=(/bin /usr/bin)
if not{
finit
# should be taken care of by rc now, but leave just in case
- if(~ $#path 0) {
- path=(/bin /usr/bin)
- eval `{sh -c 'echo $PATH |
- sed "s/^/path=(''/; s/$/'')/; s/:/'' ''/g"'}
- }
}
fn sigexit
if(! ~ $#cflag 0){
diff --git a/src/cmd/acme/rows.c b/src/cmd/acme/rows.c
index 15e02894..be580f1c 100644
--- a/src/cmd/acme/rows.c
+++ b/src/cmd/acme/rows.c
@@ -337,7 +337,7 @@ rowdump(Row *row, char *file)
Bprint(b, "%s\n", fontnames[1]);
for(i=0; i<row->ncol; i++){
c = row->col[i];
- Bprint(b, "%11d", 100*(c->r.min.x-row->r.min.x)/Dx(row->r));
+ Bprint(b, "%11.5f", 100.0*(c->r.min.x-row->r.min.x)/Dx(row->r));
if(i == row->ncol-1)
Bputc(b, '\n');
else
@@ -376,29 +376,29 @@ rowdump(Row *row, char *file)
a = emalloc(1);
if(t->file->dumpid){
dumped = FALSE;
- Bprint(b, "x%11d %11d %11d %11d %11d %s\n", i, t->file->dumpid,
+ Bprint(b, "x%11d %11d %11d %11d %11.5f %s\n", i, t->file->dumpid,
w->body.q0, w->body.q1,
- 100*(w->r.min.y-c->r.min.y)/Dy(c->r),
+ 100.0*(w->r.min.y-c->r.min.y)/Dy(c->r),
fontname);
}else if(w->dumpstr){
dumped = FALSE;
- Bprint(b, "e%11d %11d %11d %11d %11d %s\n", i, t->file->dumpid,
+ Bprint(b, "e%11d %11d %11d %11d %11.5f %s\n", i, t->file->dumpid,
0, 0,
- 100*(w->r.min.y-c->r.min.y)/Dy(c->r),
+ 100.0*(w->r.min.y-c->r.min.y)/Dy(c->r),
fontname);
}else if((w->dirty==FALSE && access(a, 0)==0) || w->isdir){
dumped = FALSE;
t->file->dumpid = w->id;
- Bprint(b, "f%11d %11d %11d %11d %11d %s\n", i, w->id,
+ Bprint(b, "f%11d %11d %11d %11d %11.5f %s\n", i, w->id,
w->body.q0, w->body.q1,
- 100*(w->r.min.y-c->r.min.y)/Dy(c->r),
+ 100.0*(w->r.min.y-c->r.min.y)/Dy(c->r),
fontname);
}else{
dumped = TRUE;
t->file->dumpid = w->id;
- Bprint(b, "F%11d %11d %11d %11d %11d %11d %s\n", i, j,
+ Bprint(b, "F%11d %11d %11d %11d %11d %11.5f %s\n", i, j,
w->body.q0, w->body.q1,
- 100*(w->r.min.y-c->r.min.y)/Dy(c->r),
+ 100.0*(w->r.min.y-c->r.min.y)/Dy(c->r),
w->body.file->b.nc, fontname);
}
free(a);
diff --git a/src/cmd/mk/sys.std.h b/src/cmd/mk/sys.std.h
index 836d7ad7..fc6a4629 100644
--- a/src/cmd/mk/sys.std.h
+++ b/src/cmd/mk/sys.std.h
@@ -13,7 +13,7 @@
#define OWRITE O_WRONLY
#define ORDWR O_RDWR
#define nil 0
-#define nelem(x) sizeof((x)/sizeof((x)[0]))
+#define nelem(x) (sizeof(x)/sizeof((x)[0]))
#define seek lseek
#define remove unlink
#define exits(x) exit(x && *(char*)x ? 1 : 0)
diff --git a/src/cmd/troff2html/troff2html.c b/src/cmd/troff2html/troff2html.c
index 1bb40cff..20d48d1f 100644
--- a/src/cmd/troff2html/troff2html.c
+++ b/src/cmd/troff2html/troff2html.c
@@ -1,6 +1,7 @@
#include <u.h>
#include <libc.h>
#include <bio.h>
+#include <ctype.h>
enum{
Nfont = 11,
@@ -430,19 +431,28 @@ flush(void)
void
header(char *s)
{
+ char *p;
+
Bprint(&bout, "<head>\n");
- Bprint(&bout, "<title>%s</title>\n", s);
+ if(pagename && section){
+ char buf[512];
+ strecpy(buf, buf+sizeof buf, pagename);
+ for(p=buf; *p; p++)
+ *p = tolower(*p);
+ Bprint(&bout, "<title>%s(%s) - %s</title>\n", buf, section, s);
+ }else
+ Bprint(&bout, "<title>%s</title>\n", s);
Bprint(&bout, "<meta content=\"text/html; charset=utf-8\" http-equiv=Content-Type>\n");
Bprint(&bout, "</head>\n");
Bprint(&bout, "<body bgcolor=#ffffff>\n");
- Bprint(&bout, "<table>\n");
+ Bprint(&bout, "<table border=0 cellpadding=0 cellspacing=0 width=100%%>\n");
Bprint(&bout, "<tr height=10><td>\n");
- Bprint(&bout, "<tr><td width=10><td>\n");
+ Bprint(&bout, "<tr><td width=20><td>\n");
if(pagename && section){
Bprint(&bout, "<tr><td width=20><td><b>%s(%s)</b><td align=right><b>%s(%s)</b>\n",
pagename, section, pagename, section);
}
- Bprint(&bout, "<tr><td width=10><td colspan=2>\n");
+ Bprint(&bout, "<tr><td width=20><td colspan=2>\n");
}
void
@@ -605,15 +615,27 @@ xcmd(Biobuf *b)
if(strcmp(fld[3], "start") == 0){
/* set anchor attribute and remember string */
attr |= (1<<Anchor);
+#if 0
snprint(buf, sizeof buf,
- "<a href=\"/magic/man2html/%c/%s\">",
+ "<a href=\"/magic/man2html/man%c/%s\">",
fld[5][1], fld[4]);
+#else
+ snprint(buf, sizeof buf,
+ "<a href=\"../man%c/%s.html\">", fld[5][1], fld[4]);
+#endif
nanchors++;
anchors = erealloc(anchors, nanchors*sizeof(char*));
anchors[nanchors-1] = estrdup(buf);
}else if(strcmp(fld[3], "end") == 0)
attr &= ~(1<<Anchor);
}
+ }else if(nfld >= 4 && strcmp(fld[2], "href") == 0){
+ attr |= 1<<Anchor;
+ nanchors++;
+ anchors = erealloc(anchors, nanchors*sizeof(char*));
+ anchors[nanchors-1] = smprint("<a href=\"%s\">", fld[3]);
+ }else if(strcmp(fld[2], "/href") == 0){
+ attr &= ~(1<<Anchor);
}else if(strcmp(fld[2], "manPP") == 0){
didP = 1;
emitul(Epp, 1);
diff --git a/src/lib9/fmt/runevsmprint.c b/src/lib9/fmt/runevsmprint.c
index a4062a10..19a4654d 100644
--- a/src/lib9/fmt/runevsmprint.c
+++ b/src/lib9/fmt/runevsmprint.c
@@ -22,6 +22,7 @@
#include "fmtdef.h"
#else
#include <stdlib.h>
+#include <string.h>
#include "plan9.h"
#include "fmt.h"
#include "fmtdef.h"
diff --git a/src/lib9/fmt/vsmprint.c b/src/lib9/fmt/vsmprint.c
index 159b74cb..99cd0e32 100644
--- a/src/lib9/fmt/vsmprint.c
+++ b/src/lib9/fmt/vsmprint.c
@@ -22,6 +22,7 @@
#include "fmtdef.h"
#else
#include <stdlib.h>
+#include <string.h>
#include "plan9.h"
#include "fmt.h"
#include "fmtdef.h"
diff --git a/src/libsec/386/mkfile b/src/libsec/386/mkfile
index d0c7cdb4..e5dac3cc 100644
--- a/src/libsec/386/mkfile
+++ b/src/libsec/386/mkfile
@@ -16,6 +16,11 @@ UPDATE=mkfile\
<$PLAN9/src/mksyslib
%.s: %.spp
- cpp $stem.spp >$stem.s
+ if [ `uname` = OpenBSD ]
+ then
+ gcc -xc -E $stem.spp >$stem.s
+ else
+ cpp $stem.spp >$stem.s
+ fi
CLEANFILES=md5block.s sha1block.s
diff --git a/src/mkfile b/src/mkfile
index 0d77c9dc..1c783c91 100644
--- a/src/mkfile
+++ b/src/mkfile
@@ -37,7 +37,6 @@ mkmk.sh:VD:
s/'$SYSNAME'/$SYSNAME/g
s/'$OBJTYPE'/$OBJTYPE/g
s;'$PLAN9';$PLAN9;g
- s/`membername \$newprereq`/*.o/g
s/9[ac] *getcallerpc-.*/9c getcallerpc-$OBJTYPE.c || 9a getcallerpc-$OBJTYPE.s/
s/^9[ac] *tas-.*/9a tas-$OBJTYPE.s || 9c tas-$OBJTYPE.c/
' >$target
diff --git a/src/mksyslib b/src/mksyslib
index ba6a89f8..0096fda2 100644
--- a/src/mksyslib
+++ b/src/mksyslib
@@ -5,7 +5,7 @@ default:V: $PLAN9/lib/$LIB
$PLAN9/lib/$LIB(%):N: %
$PLAN9/lib/$LIB: ${OFILES:%=$PLAN9/lib/$LIB(%)}
- $AR rvc $PLAN9/lib/$LIB `membername $newprereq`
+ $AR rvc $PLAN9/lib/$LIB $newmember
&:n: &.$O
$AR rvc $PLAN9/lib/$LIB $stem.$O
diff --git a/tmac/tmac.an b/tmac/tmac.an
index b191671c..898e0530 100644
--- a/tmac/tmac.an
+++ b/tmac/tmac.an
@@ -119,6 +119,9 @@
\Xhtml [<A HREF="/sys/man/\\$2/INDEX.html">section index</A>]
\Xhtml </B>
..
+.de HR
+\X'html href \\$1'\\$2\X'html /href'
+..
.deSH
.PD
.}X 0 "\\$1"
diff --git a/unix/Makefile b/unix/Makefile
index 5b32b55a..609d6cb0 100644
--- a/unix/Makefile
+++ b/unix/Makefile
@@ -1,7 +1,11 @@
all:
- for i in libutf libfmt libbio libregexp mk
- do
- (cd $i; make)
- done
- ls -l mk/mk
+ for i in libutf libfmt libbio libregexp mk; do (cd $$i; make); done; ls -l mk/mk
+
+clean:
+ for i in libutf libfmt libbio libregexp mk; do (cd $$i; make clean); done
+
+install:
+ for i in libutf libfmt libbio libregexp mk; do (cd $$i; make install); done
+
+
diff --git a/unix/NOTICE.bio b/unix/NOTICE.bio
index 6bd9c799..bca6ab0d 100644
--- a/unix/NOTICE.bio
+++ b/unix/NOTICE.bio
@@ -38,3 +38,9 @@ shall be deemed to be acceptance of the following conditions:
quality or suitability for any purpose and the Authors accept
no liability whatsoever in relation to any use to which
it may be put.
+
+----
+
+This software is also made available under the Lucent Public License
+version 1.02; see http://plan9.bell-labs.com/plan9dist/license.html
+
diff --git a/unix/NOTICE.fmt b/unix/NOTICE.fmt
index 685d1df5..43f24ce6 100644
--- a/unix/NOTICE.fmt
+++ b/unix/NOTICE.fmt
@@ -17,3 +17,9 @@ This is a Unix port of the Plan 9 formatted I/O package.
Please send comments about the packaging
to Russ Cox <rsc@swtch.com>.
+
+----
+
+This software is also made available under the Lucent Public License
+version 1.02; see http://plan9.bell-labs.com/plan9dist/license.html
+
diff --git a/unix/NOTICE.mk b/unix/NOTICE.mk
index 6bd9c799..bca6ab0d 100644
--- a/unix/NOTICE.mk
+++ b/unix/NOTICE.mk
@@ -38,3 +38,9 @@ shall be deemed to be acceptance of the following conditions:
quality or suitability for any purpose and the Authors accept
no liability whatsoever in relation to any use to which
it may be put.
+
+----
+
+This software is also made available under the Lucent Public License
+version 1.02; see http://plan9.bell-labs.com/plan9dist/license.html
+
diff --git a/unix/NOTICE.regexp b/unix/NOTICE.regexp
index ae29cdbc..02856cfc 100644
--- a/unix/NOTICE.regexp
+++ b/unix/NOTICE.regexp
@@ -17,3 +17,9 @@ This is a Unix port of the Plan 9 regular expression library.
Please send comments about the packaging
to Russ Cox <rsc@swtch.com>.
+
+----
+
+This software is also made available under the Lucent Public License
+version 1.02; see http://plan9.bell-labs.com/plan9dist/license.html
+
diff --git a/unix/NOTICE.utf b/unix/NOTICE.utf
index 685d1df5..43f24ce6 100644
--- a/unix/NOTICE.utf
+++ b/unix/NOTICE.utf
@@ -17,3 +17,9 @@ This is a Unix port of the Plan 9 formatted I/O package.
Please send comments about the packaging
to Russ Cox <rsc@swtch.com>.
+
+----
+
+This software is also made available under the Lucent Public License
+version 1.02; see http://plan9.bell-labs.com/plan9dist/license.html
+
diff --git a/unix/README b/unix/README
index 0cba0f4d..602ee262 100644
--- a/unix/README
+++ b/unix/README
@@ -1,2 +1,5 @@
This software was packaged for Unix by Russ Cox.
Please send comments to rsc@swtch.com.
+
+http://swtch.com/plan9port/unix
+
diff --git a/unix/make/Makefile.CMD b/unix/make/Makefile.CMD
index 04cd1601..6a1e9014 100644
--- a/unix/make/Makefile.CMD
+++ b/unix/make/Makefile.CMD
@@ -3,3 +3,6 @@ $(TARG): $(OFILES)
$(CC) -o $(TARG) $(OFILES) -L$(PREFIX)/lib -L../libutf -L../libfmt -L../libbio -L../libregexp -lregexp9 -lbio -lfmt -lutf
+clean:
+ rm -f $(OFILES) $(TARG)
+
diff --git a/unix/make/Makefile.bio b/unix/make/Makefile.bio
index c27b7417..295e3512 100644
--- a/unix/make/Makefile.bio
+++ b/unix/make/Makefile.bio
@@ -7,13 +7,13 @@ OFILES=\
bbuffered.$O\
bfildes.$O\
bflush.$O\
- bfmt.$O\
bgetc.$O\
bgetd.$O\
bgetrune.$O\
binit.$O\
boffset.$O\
bprint.$O\
+ bvprint.$O\
bputc.$O\
bputrune.$O\
brdline.$O\
diff --git a/unix/make/Makefile.mk b/unix/make/Makefile.mk
index f840b18e..2a06164d 100644
--- a/unix/make/Makefile.mk
+++ b/unix/make/Makefile.mk
@@ -17,9 +17,11 @@ OFILES=\
mk.$O\
parse.$O\
recipe.$O\
+ rc.$O\
rule.$O\
run.$O\
sh.$O\
+ shell.$O\
shprint.$O\
symtab.$O\
var.$O\
diff --git a/unix/man/.cvsignore b/unix/man/.cvsignore
new file mode 100644
index 00000000..54b552f8
--- /dev/null
+++ b/unix/man/.cvsignore
@@ -0,0 +1 @@
+bio3.html fmtinstall3.html fmtstrtod3.html index.html isalpharune3.html mk1.html print3.html quote3.html regexp93.html regexp97.html rune3.html runestrcat3.html utf7.html
diff --git a/unix/man/bio.3 b/unix/man/bio.3
new file mode 100644
index 00000000..3b8da2fa
--- /dev/null
+++ b/unix/man/bio.3
@@ -0,0 +1,363 @@
+.TH BIO 3
+.SH NAME
+Bopen, Bfdopen, Binit, Binits, Brdline, Brdstr, Bgetc, Bgetrune, Bgetd, Bungetc, Bungetrune, Bread, Bseek, Boffset, Bfildes, Blinelen, Bputc, Bputrune, Bprint, Bvprint, Bwrite, Bflush, Bterm, Bbuffered \- buffered input/output
+.SH SYNOPSIS
+.ta \w'\fLBiobuf* 'u
+.B #include <utf.h>
+.br
+.B #include <fmt.h>
+.br
+.B #include <bio.h>
+.PP
+.B
+Biobuf* Bopen(char *file, int mode)
+.PP
+.B
+Biobuf* Bfdopen(int fd, int mode)
+.PP
+.B
+int Binit(Biobuf *bp, int fd, int mode)
+.PP
+.B
+int Binits(Biobufhdr *bp, int fd, int mode, uchar *buf, int size)
+.PP
+.B
+int Bterm(Biobufhdr *bp)
+.PP
+.B
+int Bprint(Biobufhdr *bp, char *format, ...)
+.PP
+.B
+int Bvprint(Biobufhdr *bp, char *format, va_list arglist);
+.PP
+.B
+void* Brdline(Biobufhdr *bp, int delim)
+.PP
+.B
+char* Brdstr(Biobufhdr *bp, int delim, int nulldelim)
+.PP
+.B
+int Blinelen(Biobufhdr *bp)
+.PP
+.B
+vlong Boffset(Biobufhdr *bp)
+.PP
+.B
+int Bfildes(Biobufhdr *bp)
+.PP
+.B
+int Bgetc(Biobufhdr *bp)
+.PP
+.B
+long Bgetrune(Biobufhdr *bp)
+.PP
+.B
+int Bgetd(Biobufhdr *bp, double *d)
+.PP
+.B
+int Bungetc(Biobufhdr *bp)
+.PP
+.B
+int Bungetrune(Biobufhdr *bp)
+.PP
+.B
+vlong Bseek(Biobufhdr *bp, vlong n, int type)
+.PP
+.B
+int Bputc(Biobufhdr *bp, int c)
+.PP
+.B
+int Bputrune(Biobufhdr *bp, long c)
+.PP
+.B
+long Bread(Biobufhdr *bp, void *addr, long nbytes)
+.PP
+.B
+long Bwrite(Biobufhdr *bp, void *addr, long nbytes)
+.PP
+.B
+int Bflush(Biobufhdr *bp)
+.PP
+.B
+int Bbuffered(Biobufhdr *bp)
+.PP
+.SH DESCRIPTION
+These routines implement fast buffered I/O.
+I/O on different file descriptors is independent.
+.PP
+.I Bopen
+opens
+.I file
+for mode
+.B O_RDONLY
+or creates for mode
+.BR O_WRONLY .
+It calls
+.IR malloc (3)
+to allocate a buffer.
+.PP
+.I Bfdopen
+allocates a buffer for the already-open file descriptor
+.I fd
+for mode
+.B O_RDONLY
+or
+.BR O_WRONLY .
+It calls
+.IR malloc (3)
+to allocate a buffer.
+.PP
+.I Binit
+initializes a standard size buffer, type
+.IR Biobuf ,
+with the open file descriptor passed in
+by the user.
+.I Binits
+initializes a non-standard size buffer, type
+.IR Biobufhdr ,
+with the open file descriptor,
+buffer area, and buffer size passed in
+by the user.
+.I Biobuf
+and
+.I Biobufhdr
+are related by the declaration:
+.IP
+.EX
+typedef struct Biobuf Biobuf;
+struct Biobuf
+{
+ Biobufhdr;
+ uchar b[Bungetsize+Bsize];
+};
+.EE
+.PP
+Arguments
+of types pointer to Biobuf and pointer to Biobufhdr
+can be used interchangeably in the following routines.
+.PP
+.IR Bopen ,
+.IR Binit ,
+or
+.I Binits
+should be called before any of the
+other routines on that buffer.
+.I Bfildes
+returns the integer file descriptor of the associated open file.
+.PP
+.I Bterm
+flushes the buffer for
+.IR bp .
+If the buffer was allocated by
+.IR Bopen ,
+the buffer is
+.I freed
+and the file is closed.
+.PP
+.I Brdline
+reads a string from the file associated with
+.I bp
+up to and including the first
+.I delim
+character.
+The delimiter character at the end of the line is
+not altered.
+.I Brdline
+returns a pointer to the start of the line or
+.L 0
+on end-of-file or read error.
+.I Blinelen
+returns the length (including the delimiter)
+of the most recent string returned by
+.IR Brdline .
+.PP
+.I Brdstr
+returns a
+.IR malloc (3)-allocated
+buffer containing the next line of input delimited by
+.IR delim ,
+terminated by a NUL (0) byte.
+Unlike
+.IR Brdline ,
+which returns when its buffer is full even if no delimiter has been found,
+.I Brdstr
+will return an arbitrarily long line in a single call.
+If
+.I nulldelim
+is set, the terminal delimiter will be overwritten with a NUL.
+After a successful call to
+.IR Brdstr ,
+the return value of
+.I Blinelen
+will be the length of the returned buffer, excluding the NUL.
+.PP
+.I Bgetc
+returns the next character from
+.IR bp ,
+or a negative value
+at end of file.
+.I Bungetc
+may be called immediately after
+.I Bgetc
+to allow the same character to be reread.
+.PP
+.I Bgetrune
+calls
+.I Bgetc
+to read the bytes of the next
+.SM UTF
+sequence in the input stream and returns the value of the rune
+represented by the sequence.
+It returns a negative value
+at end of file.
+.I Bungetrune
+may be called immediately after
+.I Bgetrune
+to allow the same
+.SM UTF
+sequence to be reread as either bytes or a rune.
+.I Bungetc
+and
+.I Bungetrune
+may back up a maximum of five bytes.
+.PP
+.I Bgetd
+uses
+.I fmtcharstod
+(see
+.IR fmtstrtod (3))
+and
+.I Bgetc
+to read the formatted
+floating-point number in the input stream,
+skipping initial blanks and tabs.
+The value is stored in
+.BR *d.
+.PP
+.I Bread
+reads
+.I nbytes
+of data from
+.I bp
+into memory starting at
+.IR addr .
+The number of bytes read is returned on success
+and a negative value is returned if a read error occurred.
+.PP
+.I Bseek
+applies
+.IR lseek (2)
+to
+.IR bp .
+It returns the new file offset.
+.I Boffset
+returns the file offset of the next character to be processed.
+.PP
+.I Bputc
+outputs the low order 8 bits of
+.I c
+on
+.IR bp .
+If this causes a
+.IR write
+to occur and there is an error,
+a negative value is returned.
+Otherwise, a zero is returned.
+.PP
+.I Bputrune
+calls
+.I Bputc
+to output the low order
+16 bits of
+.I c
+as a rune
+in
+.SM UTF
+format
+on the output stream.
+.PP
+.I Bprint
+is a buffered interface to
+.IR print (3).
+If this causes a
+.IR write
+to occur and there is an error,
+a negative value
+.RB ( Beof )
+is returned.
+Otherwise, the number of bytes output is returned.
+.I Bvprint
+does the same except it takes as argument a
+.B va_list
+parameter, so it can be called within a variadic function.
+.PP
+.I Bwrite
+outputs
+.I nbytes
+of data starting at
+.I addr
+to
+.IR bp .
+If this causes a
+.IR write
+to occur and there is an error,
+a negative value is returned.
+Otherwise, the number of bytes written is returned.
+.PP
+.I Bflush
+causes any buffered output associated with
+.I bp
+to be written.
+The return is as for
+.IR Bputc .
+.I Bflush
+is called on
+exit for every buffer still open
+for writing.
+.PP
+.I Bbuffered
+returns the number of bytes in the buffer.
+When reading, this is the number of bytes still available from the last
+read on the file; when writing, it is the number of bytes ready to be
+written.
+.SH SOURCE
+.B http://swtch.com/plan9port/unix
+.SH SEE ALSO
+.IR open (2),
+.IR print (3),
+.IR atexit (3),
+.IR utf (7),
+.SH DIAGNOSTICS
+.I Bio
+routines that return integers yield
+.B Beof
+if
+.I bp
+is not the descriptor of an open file.
+.I Bopen
+returns zero if the file cannot be opened in the given mode.
+All routines set
+.I errstr
+on error.
+.SH BUGS
+.I Brdline
+returns an error on strings longer than the buffer associated
+with the file
+and also if the end-of-file is encountered
+before a delimiter.
+.I Blinelen
+will tell how many characters are available
+in these cases.
+In the case of a true end-of-file,
+.I Blinelen
+will return zero.
+At the cost of allocating a buffer,
+.I Brdstr
+sidesteps these issues.
+.PP
+The data returned by
+.I Brdline
+may be overwritten by calls to any other
+.I bio
+routine on the same
+.IR bp.
diff --git a/unix/man/ex.man b/unix/man/ex.man
new file mode 100644
index 00000000..1a4cc634
--- /dev/null
+++ b/unix/man/ex.man
@@ -0,0 +1,8 @@
+.deEX
+.ift .ft5
+.nf
+..
+.deEE
+.ft1
+.fi
+..
diff --git a/unix/man/fixurls b/unix/man/fixurls
new file mode 100755
index 00000000..e058b147
--- /dev/null
+++ b/unix/man/fixurls
@@ -0,0 +1,34 @@
+#!/usr/bin/perl
+
+open(OMIT, "9 sed -n 's/.*Omitman\\[\"(.*)\\((.)\\)\".*/\\1 \\2/p' /usr/local/plan9/dist/checkman.awk |") || die "omit: $!";
+@omit = <OMIT>;
+close OMIT;
+chomp @omit;
+push @omit, "grep 1", "lseek 2", "tcs 1", "sed 1", "rc 1", "strcat 3", "yacc 1";
+
+sub noref {
+ my ($p, $s) = @_;
+
+ $text =~ s!<a href="../man$s/$p.html">(([^<]|<[^/]|</[^a])*)</a>!\1!g;
+}
+
+for($i=0; $i<@ARGV; $i++){
+ open(IN, $ARGV[$i]) || die "open $ARGV[$i]: $!";
+ @text = <IN>;
+ close IN;
+ $text = join("", @text);
+
+ foreach $o (@omit) {
+ $o =~ /(.*) (.*)/;
+ noref($1, $2);
+ }
+
+ $text =~ s!../man(.)/([^.]*)\.html!$2$1.html!g;
+ $text =~ s!(http://swtch.com/plan9port/unix)!<a href="\1">\1</a>!g;
+
+ open(OUT, ">$ARGV[$i]") || die "open $ARGV[$i]: $!";
+ print OUT $text;
+ close OUT;
+}
+
+exit 0;
diff --git a/unix/man/fmtinstall.3 b/unix/man/fmtinstall.3
new file mode 100644
index 00000000..13007d2a
--- /dev/null
+++ b/unix/man/fmtinstall.3
@@ -0,0 +1,371 @@
+.TH FMTINSTALL 3
+.SH NAME
+fmtinstall, dofmt, dorfmt, fmtprint, fmtvprint, fmtrune, fmtstrcpy, fmtrunestrcpy, fmtfdinit, fmtfdflush, fmtstrinit, fmtstrflush, runefmtstrinit, runefmtstrflush, errfmt \- support for user-defined print formats and output routines
+.SH SYNOPSIS
+.B #include <utf.h>
+.br
+.B #include <fmt.h>
+.PP
+.ft L
+.nf
+.ta \w' 'u +\w' 'u +\w' 'u +\w' 'u +\w' 'u
+typedef struct Fmt Fmt;
+struct Fmt{
+ uchar runes; /* output buffer is runes or chars? */
+ void *start; /* of buffer */
+ void *to; /* current place in the buffer */
+ void *stop; /* end of the buffer; overwritten if flush fails */
+ int (*flush)(Fmt*); /* called when to == stop */
+ void *farg; /* to make flush a closure */
+ int nfmt; /* num chars formatted so far */
+ va_list args; /* args passed to dofmt */
+ int r; /* % format Rune */
+ int width;
+ int prec;
+ ulong flags;
+};
+
+enum{
+ FmtWidth = 1,
+ FmtLeft = FmtWidth << 1,
+ FmtPrec = FmtLeft << 1,
+ FmtSharp = FmtPrec << 1,
+ FmtSpace = FmtSharp << 1,
+ FmtSign = FmtSpace << 1,
+ FmtZero = FmtSign << 1,
+ FmtUnsigned = FmtZero << 1,
+ FmtShort = FmtUnsigned << 1,
+ FmtLong = FmtShort << 1,
+ FmtVLong = FmtLong << 1,
+ FmtComma = FmtVLong << 1,
+
+ FmtFlag = FmtComma << 1
+};
+.fi
+.PP
+.B
+.ta \w'\fLchar* 'u
+
+.PP
+.B
+int fmtfdinit(Fmt *f, int fd, char *buf, int nbuf);
+.PP
+.B
+int fmtfdflush(Fmt *f);
+.PP
+.B
+int fmtstrinit(Fmt *f);
+.PP
+.B
+char* fmtstrflush(Fmt *f);
+.PP
+.B
+int runefmtstrinit(Fmt *f);
+.PP
+.B
+Rune* runefmtstrflush(Fmt *f);
+
+.PP
+.B
+int fmtinstall(int c, int (*fn)(Fmt*));
+.PP
+.B
+int dofmt(Fmt *f, char *fmt);
+.PP
+.B
+int dorfmt(Fmt*, Rune *fmt);
+.PP
+.B
+int fmtprint(Fmt *f, char *fmt, ...);
+.PP
+.B
+int fmtvprint(Fmt *f, char *fmt, va_list v);
+.PP
+.B
+int fmtrune(Fmt *f, int r);
+.PP
+.B
+int fmtstrcpy(Fmt *f, char *s);
+.PP
+.B
+int fmtrunestrcpy(Fmt *f, Rune *s);
+.PP
+.B
+int errfmt(Fmt *f);
+.SH DESCRIPTION
+The interface described here allows the construction of custom
+.IR print (3)
+verbs and output routines.
+In essence, they provide access to the workings of the formatted print code.
+.PP
+The
+.IR print (3)
+suite maintains its state with a data structure called
+.BR Fmt .
+A typical call to
+.IR print (3)
+or its relatives initializes a
+.B Fmt
+structure, passes it to subsidiary routines to process the output,
+and finishes by emitting any saved state recorded in the
+.BR Fmt .
+The details of the
+.B Fmt
+are unimportant to outside users, except insofar as the general
+design influences the interface.
+The
+.B Fmt
+records whether the output is in runes or bytes,
+the verb being processed, its precision and width,
+and buffering parameters.
+Most important, it also records a
+.I flush
+routine that the library will call if a buffer overflows.
+When printing to a file descriptor, the flush routine will
+emit saved characters and reset the buffer; when printing
+to an allocated string, it will resize the string to receive more output.
+The flush routine is nil when printing to fixed-size buffers.
+User code need never provide a flush routine; this is done internally
+by the library.
+.SS Custom output routines
+To write a custom output routine, such as an error handler that
+formats and prints custom error messages, the output sequence can be run
+from outside the library using the routines described here.
+There are two main cases: output to an open file descriptor
+and output to a string.
+.PP
+To write to a file descriptor, call
+.I fmtfdinit
+to initialize the local
+.B Fmt
+structure
+.IR f ,
+giving the file descriptor
+.IR fd ,
+the buffer
+.IR buf ,
+and its size
+.IR nbuf .
+Then call
+.IR fmtprint
+or
+.IR fmtvprint
+to generate the output.
+These behave like
+.B fprint
+(see
+.IR print (3))
+or
+.B vfprint
+except that the characters are buffered until
+.I fmtfdflush
+is called and the return value is either 0 or \-1.
+A typical example of this sequence appears in the Examples section.
+.PP
+The same basic sequence applies when outputting to an allocated string:
+call
+.I fmtstrinit
+to initialize the
+.BR Fmt ,
+then call
+.I fmtprint
+and
+.I fmtvprint
+to generate the output.
+Finally,
+.I fmtstrflush
+will return the allocated string, which should be freed after use.
+To output to a rune string, use
+.I runefmtstrinit
+and
+.IR runefmtstrflush .
+Regardless of the output style or type,
+.I fmtprint
+or
+.I fmtvprint
+generates the characters.
+.SS Custom format verbs
+.I Fmtinstall
+is used to install custom verbs and flags labeled by character
+.IR c ,
+which may be any non-zero Unicode character.
+.I Fn
+should be declared as
+.IP
+.EX
+int fn(Fmt*)
+.EE
+.PP
+.IB Fp ->r
+is the flag or verb character to cause
+.I fn
+to be called.
+In
+.IR fn ,
+.IB fp ->width ,
+.IB fp ->prec
+are the width and precision, and
+.IB fp ->flags
+the decoded flags for the verb (see
+.IR print (3)
+for a description of these items).
+The standard flag values are:
+.B FmtSign
+.RB ( + ),
+.B FmtLeft
+.RB ( - ),
+.B FmtSpace
+.RB ( '\ ' ),
+.B FmtSharp
+.RB ( # ),
+.B FmtComma
+.RB ( , ),
+.B FmtLong
+.RB ( l ),
+.B FmtShort
+.RB ( h ),
+.B FmtUnsigned
+.RB ( u ),
+and
+.B FmtVLong
+.RB ( ll ).
+The flag bits
+.B FmtWidth
+and
+.B FmtPrec
+identify whether a width and precision were specified.
+.PP
+.I Fn
+is passed a pointer to the
+.B Fmt
+structure recording the state of the output.
+If
+.IB fp ->r
+is a verb (rather than a flag),
+.I fn
+should use
+.B Fmt->args
+to fetch its argument from the list,
+then format it, and return zero.
+If
+.IB fp ->r
+is a flag,
+.I fn
+should return one.
+All interpretation of
+.IB fp ->width\f1,
+.IB fp ->prec\f1,
+and
+.IB fp-> flags
+is left up to the conversion routine.
+.I Fmtinstall
+returns 0 if the installation succeeds, \-1 if it fails.
+.PP
+.IR Fmtprint
+and
+.IR fmtvprint
+may be called to
+help prepare output in custom conversion routines.
+However, these functions clear the width, precision, and flags.
+Both functions return 0 for success and \-1 for failure.
+.PP
+The functions
+.I dofmt
+and
+.I dorfmt
+are the underlying formatters; they
+use the existing contents of
+.B Fmt
+and should be called only by sophisticated conversion routines.
+These routines return the number of characters (bytes of UTF or runes)
+produced.
+.PP
+Some internal functions may be useful to format primitive types.
+They honor the width, precision and flags as described in
+.IR print (3).
+.I Fmtrune
+formats a single character
+.BR r .
+.I Fmtstrcpy
+formats a string
+.BR s ;
+.I fmtrunestrcpy
+formats a rune string
+.BR s .
+.I Errfmt
+formats the system error string.
+All these routines return zero for successful execution.
+Conversion routines that call these functions will work properly
+regardless of whether the output is bytes or runes.
+.\" .PP
+.\" .IR 2c (1)
+.\" describes the C directive
+.\" .B #pragma
+.\" .B varargck
+.\" that can be used to provide type-checking for custom print verbs and output routines.
+.SH EXAMPLES
+This function prints an error message with a variable
+number of arguments and then quits.
+Compared to the corresponding example in
+.IR print (3),
+this version uses a smaller buffer, will never truncate
+the output message, but might generate multiple
+.B write
+system calls to produce its output.
+.IP
+.EX
+.ta 6n +6n +6n +6n +6n +6n +6n +6n +6n
+#pragma varargck argpos error 1
+
+void fatal(char *fmt, ...)
+{
+ Fmt f;
+ char buf[64];
+ va_list arg;
+
+ fmtfdinit(&f, 1, buf, sizeof buf);
+ fmtprint(&f, "fatal: ");
+ va_start(arg, fmt);
+ fmtvprint(&f, fmt, arg);
+ va_end(arg);
+ fmtprint(&f, "\en");
+ fmtfdflush(&f);
+ exits("fatal error");
+}
+.EE
+.PP
+This example adds a verb to print complex numbers.
+.IP
+.EX
+typedef
+struct {
+ double r, i;
+} Complex;
+
+#pragma varargck type "X" Complex
+
+int
+Xfmt(Fmt *f)
+{
+ Complex c;
+
+ c = va_arg(f->args, Complex);
+ return fmtprint(f, "(%g,%g)", c.r, c.i);
+}
+
+main(...)
+{
+ Complex x = (Complex){ 1.5, -2.3 };
+
+ fmtinstall('X', Xfmt);
+ print("x = %X\en", x);
+}
+.EE
+.SH SOURCE
+.B http://swtch.com/plan9port/unix
+.SH SEE ALSO
+.IR print (3),
+.IR utf (7)
+.SH DIAGNOSTICS
+These routines return negative numbers or nil for errors and set
+.IR errstr .
diff --git a/unix/man/fmtstrtod.3 b/unix/man/fmtstrtod.3
new file mode 100644
index 00000000..e2b1caef
--- /dev/null
+++ b/unix/man/fmtstrtod.3
@@ -0,0 +1,54 @@
+.TH FMTSTRTOD 3
+.SH NAME
+fmtstrtod, fmtcharstod \ - convert text to numbers
+.SH SYNOPSIS
+.B #include <utf.h>
+.br
+.B #include <fmt.h>
+.PP
+.PP
+.B
+double fmtstrtod(char *nptr, char **rptr)
+.PP
+.B
+double fmtcharstod(int (*f)(void *), void *a)
+.SH DESCRIPTION
+.I Fmtstrtod
+converts a string pointed to by
+.I nptr
+to floating point representation and, if
+.I rptr
+is not zero, sets
+.I *rptr
+to point to the input character immediately after the string converted.
+.I Fmtstrtod
+recognizes an optional string of tabs and spaces,
+then an optional sign, then a string of digits optionally
+containing a decimal point, then an optional
+.L e
+or
+.L E
+followed by an optionally signed integer.
+.PP
+.PP
+.I Fmtcharstod
+interprets floating point numbers in the manner of
+.IR atof ,
+but gets successive characters by calling
+.BR (*\fIf\fP)(a) .
+The last call to
+.I f
+terminates the scan, so it must have returned a character that
+is not a legal continuation of a number.
+Therefore, it may be necessary to back up the input stream one character
+after calling
+.IR fmtcharstod .
+.SH SOURCE
+.B http://swtch.com/plan9port/unix
+.SH SEE ALSO
+.IR fscanf (3)
+.SH DIAGNOSTICS
+Zero is returned if the beginning of the input string is not interpretable
+as a number; even in this case,
+.I rptr
+will be updated.
diff --git a/unix/man/index.html b/unix/man/index.html
new file mode 100644
index 00000000..36c7a646
--- /dev/null
+++ b/unix/man/index.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+ <meta http-equiv="refresh" content="0; URL=..">
+ <title>you're lost!</title>
+</head>
+<body>
+Please go <a href="..">here</a>.
+</body>
+</html>
diff --git a/unix/man/isalpharune.3 b/unix/man/isalpharune.3
new file mode 100644
index 00000000..ecad654c
--- /dev/null
+++ b/unix/man/isalpharune.3
@@ -0,0 +1,49 @@
+.TH ISALPHARUNE 3
+.SH NAME
+isalpharune, islowerrune, isspacerune, istitlerune, isupperrune, tolowerrune, totitlerune, toupperrune \- Unicode character classes and cases
+.SH SYNOPSIS
+.B #include <utf.h>
+.PP
+.B
+int isalpharune(Rune c)
+.PP
+.B
+int islowerrune(Rune c)
+.PP
+.B
+int isspacerune(Rune c)
+.PP
+.B
+int istitlerune(Rune c)
+.PP
+.B
+int isupperrune(Rune c)
+.PP
+.B
+Rune tolowerrune(Rune c)
+.PP
+.B
+Rune totitlerune(Rune c)
+.PP
+.B
+Rune toupperrune(Rune c)
+.SH DESCRIPTION
+These routines examine and operate on Unicode characters,
+in particular a subset of their properties as defined in the Unicode standard.
+Unicode defines some characters as alphabetic and specifies three cases:
+upper, lower, and title.
+Analogously to
+.IR isalpha (3)
+for
+.SM ASCII\c
+,
+these routines
+test types and modify cases for Unicode characters.
+The names are self-explanatory.
+.PP
+The case-conversion routines return the character unchanged if it has no case.
+.SH SOURCE
+.B http://swtch.com/plan9port/unix
+.SH "SEE ALSO
+.IR isalpha (3) ,
+.IR "The Unicode Standard" .
diff --git a/src/cmd/mk/mk.1 b/unix/man/mk.1
index c58a6dfe..09cc3db0 100644
--- a/src/cmd/mk/mk.1
+++ b/unix/man/mk.1
@@ -1,21 +1,4 @@
.TH MK 1
-.de EX
-.nf
-.ft B
-..
-.de EE
-.fi
-.ft R
-..
-.de LR
-.if t .BR \\$1 \\$2
-.if n .RB ` \\$1 '\\$2
-..
-.de L
-.nh
-.if t .B \\$1
-.if n .RB ` \\$1 '
-..
.SH NAME
mk \- maintain (make) related files
.SH SYNOPSIS
@@ -173,14 +156,13 @@ In the recipe of a meta-rule, the environment variable
.B $stem
contains the string matched by the
.BR % .
-For example, a meta-rule to compile a C program using
-.IR cc (1)
+For example, a meta-rule to compile a C program
might be:
.IP
.EX
%: %.c
cc -c $stem.c
- cc -o $stem $stem.o
+ ld -o $stem $stem.o
.EE
.PP
Meta-rules may contain an ampersand
@@ -309,6 +291,7 @@ and any command line assignment as an argument to
.IR mk .
A variable assignment argument overrides the first (but not any subsequent)
assignment to that variable.
+.PP
The variable
.B MKFLAGS
contains all the option arguments (arguments starting with
@@ -320,6 +303,45 @@ and
contains all the targets in the call to
.IR mk .
.PP
+The variable
+.B MKSHELL
+contains the shell command line
+.I mk
+uses to run recipes.
+If the first word of the command ends in
+.B rc
+or
+.BR rcsh ,
+.I mk
+uses
+.IR rc (1)'s
+quoting rules; otherwise it uses
+.IR sh (1)'s.
+The
+.B MKSHELL
+variable is consulted when the mkfile is read, not when it is executed,
+so that different shells can be used within a single mkfile:
+.IP
+.EX
+MKSHELL=$PLAN9/bin/rc
+use-rc:V:
+ for(i in a b c) echo $i
+
+MKSHELL=sh
+use-sh:V:
+ for i in a b c; do echo $i; done
+.EE
+.LP
+Mkfiles included via
+.B <
+or
+.B <|
+.RI ( q.v. )
+see their own private copy of
+.BR MKSHELL ,
+which always starts set to
+.B sh .
+.PP
Dynamic information may be included in the mkfile by using a line of the form
.IP
\fR<|\fIcommand\fR \fIargs\fR
@@ -497,9 +519,6 @@ refer to member
.I b
of the aggregate
.IR a .
-Currently, the only aggregates supported are
-.IR ar (1)
-archives.
.SS Attributes
The colon separating the target from the prerequisites
may be
@@ -542,7 +561,7 @@ In the rule,
.B %
has no special meaning.
The target is interpreted as a regular expression as defined in
-.IR regexp (6).
+.IR regexp9 (7).
The prerequisites may contain references
to subexpressions in form
.BI \e n\f1,
@@ -628,6 +647,8 @@ rule:
x.tab.h:Pcmp -s: y.tab.h
cp y.tab.h x.tab.h
.EE
+.SH SOURCE
+.B http://swtch.com/plan9port/unix
.SH SEE ALSO
.IR sh (1),
.IR regexp9 (7)
@@ -638,7 +659,6 @@ A. Hume,
.PP
Andrew G. Hume and Bob Flandrena,
``Maintaining Files on Plan 9 with Mk''.
-DOCPREFIX/doc/mk.pdf
.SH HISTORY
Andrew Hume wrote
.I mk
@@ -647,19 +667,18 @@ It was later ported to Plan 9.
This software is a port of the Plan 9 version back to Unix.
.SH BUGS
Identical recipes for regular expression meta-rules only have one target.
-.br
+.PP
Seemingly appropriate input like
.B CFLAGS=-DHZ=60
is parsed as an erroneous attribute; correct it by inserting
a space after the first
.LR = .
-.br
+.PP
The recipes printed by
.I mk
before being passed to
-.I sh
+the shell
for execution are sometimes erroneously expanded
for printing. Don't trust what's printed; rely
-on what
-.I sh
+on what the shell
does.
diff --git a/unix/man/mkfile b/unix/man/mkfile
new file mode 100644
index 00000000..ebafa198
--- /dev/null
+++ b/unix/man/mkfile
@@ -0,0 +1,48 @@
+MAN=\
+ isalpharune.3\
+ rune.3\
+ runestrcat.3\
+ utf.7\
+ print.3\
+ fmtinstall.3\
+ quote.3\
+ fmtstrtod.3\
+ bio.3\
+ regexp9.3\
+ regexp9.7\
+ mk.1\
+
+HTML=\
+ isalpharune3.html\
+ rune3.html\
+ runestrcat3.html\
+ utf7.html\
+ print3.html\
+ fmtinstall3.html\
+ quote3.html\
+ fmtstrtod3.html\
+ bio3.html\
+ regexp93.html\
+ regexp97.html\
+ mk1.html\
+
+all:V: $MAN $HTML
+
+title='Ported from Plan 9'
+MKSHELL=$PLAN9/bin/rc
+
+%1.html:D: %.1
+ whatis title
+ 9 troff -manhtml $prereq | troff2html -t $title > $target
+ ./fixurls $target
+
+%3.html:D: %.3
+ 9 troff -manhtml $prereq | troff2html -t $title > $target
+ ./fixurls $target
+
+%7.html:D: %.7
+ 9 troff -manhtml $prereq | troff2html -t $title > $target
+ ./fixurls $target
+
+push:V:
+ rsync -e ssh *.html swtch:www/swtch.com/plan9port/unix/man
diff --git a/unix/man/print.3 b/unix/man/print.3
new file mode 100644
index 00000000..06241398
--- /dev/null
+++ b/unix/man/print.3
@@ -0,0 +1,474 @@
+.\" diffs from /usr/local/plan9/man/man3/print.3:
+.\"
+.\" - include different headers
+.\" - drop reference to bio(3)
+.\" - change exits to exit
+.\" - text about unsigned verbs
+.\" - source pointer
+.\"
+.TH PRINT 3
+.SH NAME
+print, fprint, sprint, snprint, seprint, smprint, runesprint, runesnprint, runeseprint, runesmprint, vfprint, vsnprint, vseprint, vsmprint, runevsnprint, runevseprint, runevsmprint \- print formatted output
+.SH SYNOPSIS
+.B #include <utf.h>
+.PP
+.B #include <fmt.h>
+.PP
+.ta \w'\fLchar* 'u
+.B
+int print(char *format, ...)
+.PP
+.B
+int fprint(int fd, char *format, ...)
+.PP
+.B
+int sprint(char *s, char *format, ...)
+.PP
+.B
+int snprint(char *s, int len, char *format, ...)
+.PP
+.B
+char* seprint(char *s, char *e, char *format, ...)
+.PP
+.B
+char* smprint(char *format, ...)
+.PP
+.B
+int runesprint(Rune *s, char *format, ...)
+.PP
+.B
+int runesnprint(Rune *s, int len, char *format, ...)
+.PP
+.B
+Rune* runeseprint(Rune *s, Rune *e, char *format, ...)
+.PP
+.B
+Rune* runesmprint(char *format, ...)
+.PP
+.B
+int vfprint(int fd, char *format, va_list v)
+.PP
+.B
+int vsnprint(char *s, int len, char *format, va_list v)
+.PP
+.B
+char* vseprint(char *s, char *e, char *format, va_list v)
+.PP
+.B
+char* vsmprint(char *format, va_list v)
+.PP
+.B
+int runevsnprint(Rune *s, int len, char *format, va_list v)
+.PP
+.B
+Rune* runevseprint(Rune *s, Rune *e, char *format, va_list v)
+.PP
+.B
+Rune* runevsmprint(Rune *format, va_list v)
+.PP
+.B
+.SH DESCRIPTION
+.I Print
+writes text to the standard output.
+.I Fprint
+writes to the named output
+file descriptor:
+a buffered form
+is described in
+.IR bio (3).
+.I Sprint
+places text
+followed by the NUL character
+.RB ( \e0 )
+in consecutive bytes starting at
+.IR s ;
+it is the user's responsibility to ensure that
+enough storage is available.
+Each function returns the number of bytes
+transmitted (not including the NUL
+in the case of
+.IR sprint ),
+or
+a negative value if an output error was encountered.
+.PP
+.I Snprint
+is like
+.IR sprint ,
+but will not place more than
+.I len
+bytes in
+.IR s .
+Its result is always NUL-terminated and holds the maximal
+number of complete UTF-8 characters that can fit.
+.I Seprint
+is like
+.IR snprint ,
+except that the end is indicated by a pointer
+.I e
+rather than a count and the return value points to the terminating NUL of the
+resulting string.
+.I Smprint
+is like
+.IR sprint ,
+except that it prints into and returns a string of the required length, which is
+allocated by
+.IR malloc (3).
+.PP
+The routines
+.IR runesprint ,
+.IR runesnprint ,
+.IR runeseprint ,
+and
+.I runesmprint
+are the same as
+.IR sprint ,
+.IR snprint ,
+.IR seprint
+and
+.I smprint
+except that their output is rune strings instead of byte strings.
+.PP
+Finally, the routines
+.IR vfprint ,
+.IR vsnprint ,
+.IR vseprint ,
+.IR vsmprint ,
+.IR runevsnprint ,
+.IR runevseprint ,
+and
+.I runevsmprint
+are like their
+.BR v-less
+relatives except they take as arguments a
+.B va_list
+parameter, so they can be called within a variadic function.
+The Example section shows a representative usage.
+.PP
+Each of these functions
+converts, formats, and prints its
+trailing arguments
+under control of a
+.IR format
+string.
+The
+format
+contains two types of objects:
+plain characters, which are simply copied to the
+output stream,
+and conversion specifications,
+each of which results in fetching of
+zero or more
+arguments.
+The results are undefined if there are arguments of the
+wrong type or too few
+arguments for the format.
+If the format is exhausted while
+arguments remain, the excess
+is ignored.
+.PP
+Each conversion specification has the following format:
+.IP
+.B "% [flags] verb
+.PP
+The verb is a single character and each flag is a single character or a
+(decimal) numeric string.
+Up to two numeric strings may be used;
+the first is called
+.IR width ,
+the second
+.IR precision .
+A period can be used to separate them, and if the period is
+present then
+.I width
+and
+.I precision
+are taken to be zero if missing, otherwise they are `omitted'.
+Either or both of the numbers may be replaced with the character
+.BR * ,
+meaning that the actual number will be obtained from the argument list
+as an integer.
+The flags and numbers are arguments to
+the
+.I verb
+described below.
+.PP
+The numeric verbs
+.BR d ,
+.BR i ,
+.BR u ,
+.BR o ,
+.BR b ,
+.BR x ,
+and
+.B X
+format their arguments in decimal, decimal,
+unsigned decimal, octal, binary, hexadecimal, and upper case hexadecimal.
+Each interprets the flags
+.BR 0 ,
+.BR h ,
+.BR hh ,
+.BR l ,
+.BR + ,
+.BR - ,
+.BR , ,
+and
+.B #
+to mean pad with zeros,
+short, byte, long, always print a sign, left justified, commas every three digits,
+and alternate format.
+Also, a space character in the flag
+position is like
+.BR + ,
+but prints a space instead of a plus sign for non-negative values.
+If neither
+short nor long is specified,
+then the argument is an
+.BR int .
+If an unsigned verb is specified,
+then the argument is interpreted as a
+positive number and no sign is output;
+space and
+.B +
+flags are ignored for unsigned verbs.
+If two
+.B l
+flags are given,
+then the argument is interpreted as a
+.B vlong
+(usually an 8-byte, sometimes a 4-byte integer).
+If
+.I precision
+is not omitted, the number is padded on the left with zeros
+until at least
+.I precision
+digits appear.
+If
+.I precision
+is explicitly 0, and the number is 0,
+no digits are generated, and alternate formatting
+does not apply.
+Then, if alternate format is specified,
+for
+.B o
+conversion, the number is preceded by a
+.B 0
+if it doesn't already begin with one.
+For non-zero numbers and
+.B x
+conversion, the number is preceded by
+.BR 0x ;
+for
+.B X
+conversion, the number is preceded by
+.BR 0X .
+Finally, if
+.I width
+is not omitted, the number is padded on the left (or right, if
+left justification is specified) with enough blanks to
+make the field at least
+.I width
+characters long.
+.PP
+The floating point verbs
+.BR f ,
+.BR e ,
+.BR E ,
+.BR g ,
+and
+.B G
+take a
+.B double
+argument.
+Each interprets the flags
+.BR 0 ,
+.BR L
+.BR + ,
+.BR - ,
+and
+.B #
+to mean pad with zeros,
+long double argument,
+always print a sign,
+left justified,
+and
+alternate format.
+.I Width
+is the minimum field width and,
+if the converted value takes up less than
+.I width
+characters, it is padded on the left (or right, if `left justified')
+with spaces.
+.I Precision
+is the number of digits that are converted after the decimal place for
+.BR e ,
+.BR E ,
+and
+.B f
+conversions,
+and
+.I precision
+is the maximum number of significant digits for
+.B g
+and
+.B G
+conversions.
+The
+.B f
+verb produces output of the form
+.RB [ - ] digits [ .digits\fR].
+.B E
+conversion appends an exponent
+.BR E [ - ] digits ,
+and
+.B e
+conversion appends an exponent
+.BR e [ - ] digits .
+The
+.B g
+verb will output the argument in either
+.B e
+or
+.B f
+with the goal of producing the smallest output.
+Also, trailing zeros are omitted from the fraction part of
+the output, and a trailing decimal point appears only if it is followed
+by a digit.
+The
+.B G
+verb is similar, but uses
+.B E
+format instead of
+.BR e .
+When alternate format is specified, the result will always contain a decimal point,
+and for
+.B g
+and
+.B G
+conversions, trailing zeros are not removed.
+.PP
+The
+.B s
+verb copies a string
+(pointer to
+.BR char )
+to the output.
+The number of characters copied
+.RI ( n )
+is the minimum
+of the size of the string and
+.IR precision .
+These
+.I n
+characters are justified within a field of
+.I width
+characters as described above.
+If a
+.I precision
+is given, it is safe for the string not to be nul-terminated
+as long as it is at least
+.I precision
+characters (not bytes!) long.
+The
+.B S
+verb is similar, but it interprets its pointer as an array
+of runes (see
+.IR utf (7));
+the runes are converted to
+.SM UTF
+before output.
+.PP
+The
+.B c
+verb copies a single
+.B char
+(promoted to
+.BR int )
+justified within a field of
+.I width
+characters as described above.
+The
+.B C
+verb is similar, but works on runes.
+.PP
+The
+.B p
+verb formats a pointer value.
+At the moment, it is a synonym for
+.BR x ,
+but that will change if pointers and integers are different sizes.
+.PP
+The
+.B r
+verb takes no arguments; it copies the error string returned by a call to
+.IR strerror (3)
+with an argument of
+.IR errno.
+.PP
+Custom verbs may be installed using
+.IR fmtinstall (3).
+.SH EXAMPLE
+This function prints an error message with a variable
+number of arguments and then quits.
+.IP
+.EX
+.ta 6n +6n +6n
+void fatal(char *msg, ...)
+{
+ char buf[1024], *out;
+ va_list arg;
+
+ out = seprint(buf, buf+sizeof buf, "Fatal error: ");
+ va_start(arg, msg);
+ out = vseprint(out, buf+sizeof buf, msg, arg);
+ va_end(arg);
+ write(2, buf, out-buf);
+ exit(1);
+}
+.EE
+.SH SOURCE
+.B http://swtch.com/plan9port/unix
+.SH SEE ALSO
+.IR fmtinstall (3),
+.IR fprintf (3),
+.IR utf (7)
+.SH DIAGNOSTICS
+Routines that write to a file descriptor or call
+.IR malloc
+set
+.IR errstr .
+.SH BUGS
+The formatting is close to that specified for ANSI
+.IR fprintf (3);
+the main difference is that
+.B b
+and
+.B r
+are not in ANSI and some
+.B C9X
+verbs and syntax are missing.
+Also, and distinctly not a bug,
+.I print
+and friends generate
+.SM UTF
+rather than
+.SM ASCII.
+.PP
+There is no
+.IR runeprint ,
+.IR runefprint ,
+etc. because runes are byte-order dependent and should not be written directly to a file; use the
+UTF output of
+.I print
+or
+.I fprint
+instead.
+Also,
+.I sprint
+is deprecated for safety reasons; use
+.IR snprint ,
+.IR seprint ,
+or
+.I smprint
+instead.
+Safety also precludes the existence of
+.IR runesprint .
diff --git a/unix/man/quote.3 b/unix/man/quote.3
new file mode 100644
index 00000000..dfeb2597
--- /dev/null
+++ b/unix/man/quote.3
@@ -0,0 +1,151 @@
+.TH QUOTE 3
+.SH NAME
+quotestrdup, quoterunestrdup, unquotestrdup, unquoterunestrdup, quotestrfmt, quoterunestrfmt, quotefmtinstall, fmtdoquote \- quoted character strings
+.SH SYNOPSIS
+.B #include <utf.h>
+.br
+.B #include <fmt.h>
+.PP
+.B
+char *quotestrdup(char *s)
+.PP
+.B
+Rune *quoterunestrdup(Rune *s)
+.PP
+.B
+char *unquotestrdup(char *s)
+.PP
+.B
+Rune *unquoterunestrdup(Rune *s)
+.PP
+.B
+int quotestrfmt(Fmt*)
+.PP
+.B
+int quoterunestrfmt(Fmt*)
+.PP
+.B
+void quotefmtinstall(void)
+.PP
+.B
+int (*fmtdoquote)(int c)
+.PP
+.SH DESCRIPTION
+These routines manipulate character strings, either adding or removing
+quotes as necessary.
+In the quoted form, the strings are in the style of
+.IR rc (1) ,
+with single quotes surrounding the string.
+Embedded single quotes are indicated by a doubled single quote.
+For instance,
+.IP
+.EX
+Don't worry!
+.EE
+.PP
+when quoted becomes
+.IP
+.EX
+\&'Don''t worry!'
+.EE
+.PP
+The empty string is represented by two quotes,
+.BR '' .
+.PP
+The first four functions act as variants of
+.B strdup
+(see
+.IR strcat (3)).
+Each returns a
+freshly allocated copy of the string, created using
+.IR malloc (3).
+.I Quotestrdup
+returns a quoted copy of
+.IR s ,
+while
+.I unquotestrdup
+returns a copy of
+.IR s
+with the quotes evaluated.
+The
+.I rune
+versions of these functions do the same for
+.CW Rune
+strings (see
+.IR runestrcat (3)).
+.PP
+The string returned by
+.I quotestrdup
+or
+.I quoterunestrdup
+has the following properties:
+.TP
+1.
+If the original string
+.IR s
+is empty, the returned string is
+.BR '' .
+.TP
+2.
+If
+.I s
+contains no quotes, blanks, or control characters,
+the returned string is identical to
+.IR s .
+.TP
+3.
+If
+.I s
+needs quotes to be added, the first character of the returned
+string will be a quote.
+For example,
+.B hello\ world
+becomes
+.B \&'hello\ world'
+not
+.BR hello'\ 'world .
+.PP
+The function pointer
+.I fmtdoquote
+is
+.B nil
+by default.
+If it is non-nil, characters are passed to that function to see if they should
+be quoted.
+This mechanism allows programs to specify that
+characters other than blanks, control characters, or quotes be quoted.
+Regardless of the return value of
+.IR *fmtdoquote ,
+blanks, control characters, and quotes are always quoted.
+.I Needsrcquote
+is provided as a
+.I fmtdoquote
+function that flags any character special to
+.IR rc (1).
+.PP
+.I Quotestrfmt
+and
+.I quoterunestrfmt
+are
+.IR print (3)
+formatting routines that produce quoted strings as output.
+They may be installed by hand, but
+.I quotefmtinstall
+installs them under the standard format characters
+.B q
+and
+.BR Q .
+(They are not installed automatically.)
+If the format string includes the alternate format character
+.BR # ,
+for example
+.BR %#q ,
+the printed string will always be quoted; otherwise quotes will only be provided if necessary
+to avoid ambiguity.
+.SH SOURCE
+.B http://swtch.com/plan9port/unix
+.SH "SEE ALSO
+.IR rc (1),
+.IR malloc (3),
+.IR print (3),
+.IR strcat (3)
diff --git a/unix/man/regexp9.3 b/unix/man/regexp9.3
new file mode 100644
index 00000000..ce9de14c
--- /dev/null
+++ b/unix/man/regexp9.3
@@ -0,0 +1,212 @@
+.TH REGEXP9 3
+.SH NAME
+regcomp, regcomplit, regcompnl, regexec, regsub, rregexec, rregsub, regerror \- regular expression
+.SH SYNOPSIS
+.B #include <utf.h>
+.br
+.B #include <fmt.h>
+.br
+.B #include <regexp9.h>
+.PP
+.ta \w'\fLRegprog 'u
+.B
+Reprog *regcomp(char *exp)
+.PP
+.B
+Reprog *regcomplit(char *exp)
+.PP
+.B
+Reprog *regcompnl(char *exp)
+.PP
+.nf
+.B
+int regexec(Reprog *prog, char *string, Resub *match, int msize)
+.PP
+.nf
+.B
+void regsub(char *source, char *dest, int dlen, Resub *match, int msize)
+.PP
+.nf
+.B
+int rregexec(Reprog *prog, Rune *string, Resub *match, int msize)
+.PP
+.nf
+.B
+void rregsub(Rune *source, Rune *dest, int dlen, Resub *match, int msize)
+.PP
+.B
+void regerror(char *msg)
+.SH DESCRIPTION
+.I Regcomp
+compiles a
+regular expression and returns
+a pointer to the generated description.
+The space is allocated by
+.IR malloc (3)
+and may be released by
+.IR free .
+Regular expressions are exactly as in
+.IR regexp9 (7).
+.PP
+.I Regcomplit
+is like
+.I regcomp
+except that all characters are treated literally.
+.I Regcompnl
+is like
+.I regcomp
+except that the
+.B .
+metacharacter matches all characters, including newlines.
+.PP
+.I Regexec
+matches a null-terminated
+.I string
+against the compiled regular expression in
+.IR prog .
+If it matches,
+.I regexec
+returns
+.B 1
+and fills in the array
+.I match
+with character pointers to the substrings of
+.I string
+that correspond to the
+parenthesized subexpressions of
+.IR exp :
+.BI match[ i ].sp
+points to the beginning and
+.BI match[ i ].ep
+points just beyond
+the end of the
+.IR i th
+substring.
+(Subexpression
+.I i
+begins at the
+.IR i th
+left parenthesis, counting from 1.)
+Pointers in
+.B match[0]
+pick out the substring that corresponds to
+the whole regular expression.
+Unused elements of
+.I match
+are filled with zeros.
+Matches involving
+.LR * ,
+.LR + ,
+and
+.L ?
+are extended as far as possible.
+The number of array elements in
+.I match
+is given by
+.IR msize .
+The structure of elements of
+.I match
+is:
+.IP
+.EX
+typedef struct {
+ union {
+ char *sp;
+ Rune *rsp;
+ };
+ union {
+ char *ep;
+ Rune *rep;
+ };
+} Resub;
+.EE
+.LP
+If
+.B match[0].sp
+is nonzero on entry,
+.I regexec
+starts matching at that point within
+.IR string .
+If
+.B match[0].ep
+is nonzero on entry,
+the last character matched is the one
+preceding that point.
+.PP
+.I Regsub
+places in
+.I dest
+a substitution instance of
+.I source
+in the context of the last
+.I regexec
+performed using
+.IR match .
+Each instance of
+.BI \e n\f1,
+where
+.I n
+is a digit, is replaced by the
+string delimited by
+.BI match[ n ].sp
+and
+.BI match[ n ].ep\f1.
+Each instance of
+.L &
+is replaced by the string delimited by
+.B match[0].sp
+and
+.BR match[0].ep .
+The substitution will always be null terminated and
+trimmed to fit into dlen bytes.
+.PP
+.IR Regerror ,
+called whenever an error is detected in
+.IR regcomp ,
+writes the string
+.I msg
+on the standard error file and exits.
+.I Regerror
+can be replaced to perform
+special error processing.
+If the user supplied
+.I regerror
+returns rather than exits,
+.I regcomp
+will return 0.
+.PP
+.I Rregexec
+and
+.I rregsub
+are variants of
+.I regexec
+and
+.I regsub
+that use strings of
+.B Runes
+instead of strings of
+.BR chars .
+With these routines, the
+.I rsp
+and
+.I rep
+fields of the
+.I match
+array elements should be used.
+.SH SOURCE
+.B http://swtch.com/plan9port/unix
+.SH "SEE ALSO"
+.IR grep (1)
+.SH DIAGNOSTICS
+.I Regcomp
+returns
+.B 0
+for an illegal expression
+or other failure.
+.I Regexec
+returns 0
+if
+.I string
+is not matched.
+.SH BUGS
+There is no way to specify or match a NUL character; NULs terminate patterns and strings.
diff --git a/unix/man/regexp9.7 b/unix/man/regexp9.7
new file mode 100644
index 00000000..62c07aee
--- /dev/null
+++ b/unix/man/regexp9.7
@@ -0,0 +1,133 @@
+.TH REGEXP9 7
+.SH NAME
+regexp \- Plan 9 regular expression notation
+.SH DESCRIPTION
+This manual page describes the regular expression
+syntax used by the Plan 9 regular expression library
+.IR regexp9 (3).
+It is the form used by
+.IR egrep (1)
+before
+.I egrep
+got complicated.
+.PP
+A
+.I "regular expression"
+specifies
+a set of strings of characters.
+A member of this set of strings is said to be
+.I matched
+by the regular expression. In many applications
+a delimiter character, commonly
+.LR / ,
+bounds a regular expression.
+In the following specification for regular expressions
+the word `character' means any character (rune) but newline.
+.PP
+The syntax for a regular expression
+.B e0
+is
+.IP
+.EX
+e3: literal | charclass | '.' | '^' | '$' | '(' e0 ')'
+
+e2: e3
+ | e2 REP
+
+REP: '*' | '+' | '?'
+
+e1: e2
+ | e1 e2
+
+e0: e1
+ | e0 '|' e1
+.EE
+.PP
+A
+.B literal
+is any non-metacharacter, or a metacharacter
+(one of
+.BR .*+?[]()|\e^$ ),
+or the delimiter
+preceded by
+.LR \e .
+.PP
+A
+.B charclass
+is a nonempty string
+.I s
+bracketed
+.BI [ \|s\| ]
+(or
+.BI [^ s\| ]\fR);
+it matches any character in (or not in)
+.IR s .
+A negated character class never
+matches newline.
+A substring
+.IB a - b\f1,
+with
+.I a
+and
+.I b
+in ascending
+order, stands for the inclusive
+range of
+characters between
+.I a
+and
+.IR b .
+In
+.IR s ,
+the metacharacters
+.LR - ,
+.LR ] ,
+an initial
+.LR ^ ,
+and the regular expression delimiter
+must be preceded by a
+.LR \e ;
+other metacharacters
+have no special meaning and
+may appear unescaped.
+.PP
+A
+.L .
+matches any character.
+.PP
+A
+.L ^
+matches the beginning of a line;
+.L $
+matches the end of the line.
+.PP
+The
+.B REP
+operators match zero or more
+.RB ( * ),
+one or more
+.RB ( + ),
+zero or one
+.RB ( ? ),
+instances respectively of the preceding regular expression
+.BR e2 .
+.PP
+A concatenated regular expression,
+.BR "e1\|e2" ,
+matches a match to
+.B e1
+followed by a match to
+.BR e2 .
+.PP
+An alternative regular expression,
+.BR "e0\||\|e1" ,
+matches either a match to
+.B e0
+or a match to
+.BR e1 .
+.PP
+A match to any part of a regular expression
+extends as far as possible without preventing
+a match to the remainder of the regular expression.
+.SH "SEE ALSO
+.IR regexp9 (3)
diff --git a/unix/man/rune.3 b/unix/man/rune.3
new file mode 100644
index 00000000..36873db9
--- /dev/null
+++ b/unix/man/rune.3
@@ -0,0 +1,186 @@
+.TH RUNE 3
+.SH NAME
+runetochar, chartorune, runelen, runenlen, fullrune, utfecpy, utflen, utfnlen, utfrune, utfrrune, utfutf \- rune/UTF conversion
+.SH SYNOPSIS
+.ta \w'\fLchar*xx'u
+.B #include <utf.h>
+.PP
+.B
+int runetochar(char *s, Rune *r)
+.PP
+.B
+int chartorune(Rune *r, char *s)
+.PP
+.B
+int runelen(long r)
+.PP
+.B
+int runenlen(Rune *r, int n)
+.PP
+.B
+int fullrune(char *s, int n)
+.PP
+.B
+char* utfecpy(char *s1, char *es1, char *s2)
+.PP
+.B
+int utflen(char *s)
+.PP
+.B
+int utfnlen(char *s, long n)
+.PP
+.B
+char* utfrune(char *s, long c)
+.PP
+.B
+char* utfrrune(char *s, long c)
+.PP
+.B
+char* utfutf(char *s1, char *s2)
+.SH DESCRIPTION
+These routines convert to and from a
+.SM UTF
+byte stream and runes.
+.PP
+.I Runetochar
+copies one rune at
+.I r
+to at most
+.B UTFmax
+bytes starting at
+.I s
+and returns the number of bytes copied.
+.BR UTFmax ,
+defined as
+.B 3
+in
+.BR <libc.h> ,
+is the maximum number of bytes required to represent a rune.
+.PP
+.I Chartorune
+copies at most
+.B UTFmax
+bytes starting at
+.I s
+to one rune at
+.I r
+and returns the number of bytes copied.
+If the input is not exactly in
+.SM UTF
+format,
+.I chartorune
+will convert to 0x80 and return 1.
+.PP
+.I Runelen
+returns the number of bytes
+required to convert
+.I r
+into
+.SM UTF.
+.PP
+.I Runenlen
+returns the number of bytes
+required to convert the
+.I n
+runes pointed to by
+.I r
+into
+.SM UTF.
+.PP
+.I Fullrune
+returns 1 if the string
+.I s
+of length
+.I n
+is long enough to be decoded by
+.I chartorune
+and 0 otherwise.
+This does not guarantee that the string
+contains a legal
+.SM UTF
+encoding.
+This routine is used by programs that
+obtain input a byte at
+a time and need to know when a full rune
+has arrived.
+.PP
+The following routines are analogous to the
+corresponding string routines with
+.B utf
+substituted for
+.B str
+and
+.B rune
+substituted for
+.BR chr .
+.PP
+.I Utfecpy
+copies UTF sequences until a null sequence has been copied, but writes no
+sequences beyond
+.IR es1 .
+If any sequences are copied,
+.I s1
+is terminated by a null sequence, and a pointer to that sequence is returned.
+Otherwise, the original
+.I s1
+is returned.
+.PP
+.I Utflen
+returns the number of runes that
+are represented by the
+.SM UTF
+string
+.IR s .
+.PP
+.I Utfnlen
+returns the number of complete runes that
+are represented by the first
+.I n
+bytes of
+.SM UTF
+string
+.IR s .
+If the last few bytes of the string contain an incompletely coded rune,
+.I utfnlen
+will not count them; in this way, it differs from
+.IR utflen ,
+which includes every byte of the string.
+.PP
+.I Utfrune
+.RI ( utfrrune )
+returns a pointer to the first (last)
+occurrence of rune
+.I c
+in the
+.SM UTF
+string
+.IR s ,
+or 0 if
+.I c
+does not occur in the string.
+The NUL byte terminating a string is considered to
+be part of the string
+.IR s .
+.PP
+.I Utfutf
+returns a pointer to the first occurrence of
+the
+.SM UTF
+string
+.I s2
+as a
+.SM UTF
+substring of
+.IR s1 ,
+or 0 if there is none.
+If
+.I s2
+is the null string,
+.I utfutf
+returns
+.IR s1 .
+.SH SOURCE
+.B http://swtch.com/plan9port/unix
+.SH SEE ALSO
+.IR utf (7),
+.IR tcs (1)
diff --git a/unix/man/runestrcat.3 b/unix/man/runestrcat.3
new file mode 100644
index 00000000..31db54f3
--- /dev/null
+++ b/unix/man/runestrcat.3
@@ -0,0 +1,66 @@
+.TH RUNESTRCAT 3
+.SH NAME
+runestrcat,
+runestrncat,
+runestrcmp,
+runestrncmp,
+runestrcpy,
+runestrncpy,
+runestrecpy,
+runestrlen,
+runestrchr,
+runestrrchr,
+runestrdup,
+runestrstr \- rune string operations
+.SH SYNOPSIS
+.B #include <u.h>
+.br
+.B #include <libc.h>
+.PP
+.ta \w'\fLRune* \fP'u
+.B
+Rune* runestrcat(Rune *s1, Rune *s2)
+.PP
+.B
+Rune* runestrncat(Rune *s1, Rune *s2, long n)
+.PP
+.B
+int runestrcmp(Rune *s1, Rune *s2)
+.PP
+.B
+int runestrncmp(Rune *s1, Rune *s2, long n)
+.PP
+.B
+Rune* runestrcpy(Rune *s1, Rune *s2)
+.PP
+.B
+Rune* runestrncpy(Rune *s1, Rune *s2, long n)
+.PP
+.B
+Rune* runestrecpy(Rune *s1, Rune *es1, Rune *s2)
+.PP
+.B
+long runestrlen(Rune *s)
+.PP
+.B
+Rune* runestrchr(Rune *s, Rune c)
+.PP
+.B
+Rune* runestrrchr(Rune *s, Rune c)
+.PP
+.B
+Rune* runestrdup(Rune *s)
+.PP
+.B
+Rune* runestrstr(Rune *s1, Rune *s2)
+.SH DESCRIPTION
+These functions are rune string analogues of
+the corresponding functions in
+.IR strcat (3).
+.SH SOURCE
+.B http://swtch.com/plan9port/unix
+.SH SEE ALSO
+.IR rune (3),
+.IR strcat (3)
+.SH BUGS
+The outcome of overlapping moves varies among implementations.
diff --git a/unix/man/utf.7 b/unix/man/utf.7
new file mode 100644
index 00000000..a2409457
--- /dev/null
+++ b/unix/man/utf.7
@@ -0,0 +1,91 @@
+.TH UTF 7
+.SH NAME
+UTF, Unicode, ASCII, rune \- character set and format
+.SH DESCRIPTION
+The Plan 9 character set and representation are
+based on the Unicode Standard and on the ISO multibyte
+.SM UTF-8
+encoding (Universal Character
+Set Transformation Format, 8 bits wide).
+The Unicode Standard represents its characters in 16
+bits;
+.SM UTF-8
+represents such
+values in an 8-bit byte stream.
+Throughout this manual,
+.SM UTF-8
+is shortened to
+.SM UTF.
+.PP
+In Plan 9, a
+.I rune
+is a 16-bit quantity representing a Unicode character.
+Internally, programs may store characters as runes.
+However, any external manifestation of textual information,
+in files or at the interface between programs, uses a
+machine-independent, byte-stream encoding called
+.SM UTF.
+.PP
+.SM UTF
+is designed so the 7-bit
+.SM ASCII
+set (values hexadecimal 00 to 7F),
+appear only as themselves
+in the encoding.
+Runes with values above 7F appear as sequences of two or more
+bytes with values only from 80 to FF.
+.PP
+The
+.SM UTF
+encoding of the Unicode Standard is backward compatible with
+.SM ASCII\c
+:
+programs presented only with
+.SM ASCII
+work on Plan 9
+even if not written to deal with
+.SM UTF,
+as do
+programs that deal with uninterpreted byte streams.
+However, programs that perform semantic processing on
+.SM ASCII
+graphic
+characters must convert from
+.SM UTF
+to runes
+in order to work properly with non-\c
+.SM ASCII
+input.
+See
+.IR rune (3).
+.PP
+Letting numbers be binary,
+a rune x is converted to a multibyte
+.SM UTF
+sequence
+as follows:
+.PP
+01. x in [00000000.0bbbbbbb] → 0bbbbbbb
+.br
+10. x in [00000bbb.bbbbbbbb] → 110bbbbb, 10bbbbbb
+.br
+11. x in [bbbbbbbb.bbbbbbbb] → 1110bbbb, 10bbbbbb, 10bbbbbb
+.br
+.PP
+Conversion 01 provides a one-byte sequence that spans the
+.SM ASCII
+character set in a compatible way.
+Conversions 10 and 11 represent higher-valued characters
+as sequences of two or three bytes with the high bit set.
+Plan 9 does not support the 4, 5, and 6 byte sequences proposed by X-Open.
+When there are multiple ways to encode a value, for example rune 0,
+the shortest encoding is used.
+.PP
+In the inverse mapping,
+any sequence except those described above
+is incorrect and is converted to rune hexadecimal 0080.
+.SH "SEE ALSO"
+.IR ascii (1),
+.IR tcs (1),
+.IR rune (3),
+.IR "The Unicode Standard" .
diff --git a/unix/mkfile b/unix/mkfile
index 58b86e54..5f3ae189 100644
--- a/unix/mkfile
+++ b/unix/mkfile
@@ -1,64 +1,69 @@
-bio fmt mk regexp utf:V:
- case $target in
- mk) t=mk ;;
- regexp) t=libregexp ;;
- *) t=lib$target ;;
- esac
- #
+MKSHELL=rc
+new-%:V:
+ t=$stem
+ if(! ~ $t utf fmt bio regexp mk){
+ echo bad target
+ exit oops
+ }
+ if(! ~ $t mk)
+ t=lib$t
mkdir -p $t
- rm -f $t/* || true
+ rm -f $t/*
cd $t
- mk -f ../mkfile.$target
- #
- case $target in
- bio) d=$PLAN9/src/$t;;
- regexp) d=$PLAN9/src/$t;;
- fmt) d=$PLAN9/src/lib9/$target ;;
- utf) d=$PLAN9/src/lib9/$target ;;
- mk) d=$PLAN9/src/cmd/mk ;;
- esac
- #
- for i in `ls -p $d/*.c`
- do
- if [ ! -f $i ]
- then
- echo missing $i
- fi
- done
- make
- for i in `ls *.c`
- do
- if [ ! -f `echo $i | sed 's/.c$/.o/'` ]
- then
- echo not building $i
- fi
- done
+ mk -f ../mkfile.$stem
cd ..
- rm $t/* || true
- cd $t
- mk -f ../mkfile.$target
-%.install:V:
- mk $stem
- case $stem in
- mk) t=mk ;;
- regexp) t=libregexp ;;
- *) t=lib$stem ;;
- esac
- (cd $t; make install)
+test-%:V:
+ t=$stem
+ path=($PLAN9/bin $path)
+ mk new-$t
+ cd $t
+ switch($t){
+ case bio; d=libbio
+ case regexp; d=libregexp
+ case fmt; d=lib9/fmt
+ case utf: d=lib9/utf
+ case mk; d=cmd/mk
+ }
+ d=$PLAN9/src/$d
+ for(i in `{ls -p $d/*.c})
+ if(! test -f $i)
+ echo XXX missing $i
+ make
+ for(i in `{ls *.c})
+ if(! test -f `{echo $i | sed 's/.c$/.o/'})
+ echo XXX not building $i
+ cd ..
+ rm -r $t
-lib%.tgz:
- mk $stem
+lib%.tgz:V:
+ mk new-$stem
tar cf - lib$stem |gzip >lib$stem.tgz
-libregexp9.tgz:
- mk regexp
+libregexp9.tgz:V:
+ mk new-regexp
tar cf - libregexp | gzip >libregexp9.tgz
-mk.tgz:
- mk mk
+mk.tgz:V:
+ mk new-mk
tar cf - mk | gzip >mk.tgz
-mk-all.tgz:
- tar cf - Makefile libutf libfmt libbio libregexp mk | gzip >mk-all.tgz
+mk-with-libs.tgz:V:
+ mk new-utf
+ mk new-fmt
+ mk new-bio
+ mk new-regexp
+ mk new-mk
+ rm -rf zot
+ mkdir zot
+ mv libutf libfmt libbio libregexp mk zot
+ mv zot mk
+ cp Makefile mk/Makefile
+ tar cf - mk | gzip >$target
+ rm -r mk
+
+tgz:V: libutf.tgz libfmt.tgz libregexp9.tgz libbio.tgz mk.tgz mk-with-libs.tgz
+
+push:
+ rsync -e ssh *.tgz swtch:www/swtch.com/plan9port/unix
diff --git a/unix/mkfile.bio b/unix/mkfile.bio
index 5e8cbc0a..4684eb67 100644
--- a/unix/mkfile.bio
+++ b/unix/mkfile.bio
@@ -7,36 +7,14 @@ TARG=\
bio.3\
bio.h\
lib9.h\
- `{ls -p $PLAN9/src/libbio/*.c}\
+ `{9 ls -p $PLAN9/src/libbio/*.c}\
-all:V: $TARG
-
-%: $PLAN9/include/%
- cp $prereq $target
+WHAT=bio
+<../mkfile.what
%: $PLAN9/src/libbio/%
cp $prereq $target
-%: $PLAN9/man/man1/%
- cp $prereq $target
-
-%: $PLAN9/man/man3/%
- cp $prereq $target
-
-%: $PLAN9/man/man7/%
- cp $prereq $target
-
lib9.h: $PLAN9/src/libbio/lib9.std.h
cp $prereq $target
-%: ../make/%
- cp $prereq $target
-
-Makefile:D: ../make/Makefile.TOP ../make/Makefile.bio ../make/Makefile.LIB ../make/Makefile.BOT
- cat $prereq >$target
-
-README: ../README
- cp $prereq $target
-
-NOTICE: ../NOTICE.bio
- cp $prereq $target
diff --git a/unix/mkfile.fmt b/unix/mkfile.fmt
index 36d4e8df..c85852cc 100644
--- a/unix/mkfile.fmt
+++ b/unix/mkfile.fmt
@@ -4,7 +4,7 @@ TARG=\
NOTICE\
README\
Makefile\
- `{ls -p $PLAN9/src/lib9/fmt/*.c}\
+ `{9 ls -p $PLAN9/src/lib9/fmt/*.c}\
fmt.h\
fmtdef.h\
nan.h\
@@ -12,32 +12,10 @@ TARG=\
fmtinstall.3\
print.3\
-all:V: $TARG
+WHAT=fmt
-%: $PLAN9/include/%
- cp $prereq $target
+<../mkfile.what
%: $PLAN9/src/lib9/fmt/%
cp $prereq $target
-%: $PLAN9/man/man1/%
- cp $prereq $target
-
-%: $PLAN9/man/man3/%
- cp $prereq $target
-
-%: $PLAN9/man/man7/%
- cp $prereq $target
-
-%: ../make/%
- cp $prereq $target
-
-Makefile:D: ../make/Makefile.TOP ../make/Makefile.fmt ../make/Makefile.LIB ../make/Makefile.BOT
- cat $prereq >$target
-
-README: ../README
- cp $prereq $target
-
-NOTICE: ../NOTICE.fmt
- cp $prereq $target
-
diff --git a/unix/mkfile.mk b/unix/mkfile.mk
index 17fd970d..5b5ebbea 100644
--- a/unix/mkfile.mk
+++ b/unix/mkfile.mk
@@ -8,36 +8,14 @@ TARG=\
mk.h\
sys.h\
fns.h\
- `{ls -p $PLAN9/src/cmd/mk/*.c}\
+ `{9 ls -p $PLAN9/src/cmd/mk/*.c}\
-all:V: $TARG
+WHAT=mk
-%: $PLAN9/include/%
- cp $prereq $target
+<../mkfile.what
%: $PLAN9/src/cmd/mk/%
cp $prereq $target
-%: $PLAN9/man/man1/%
- cp $prereq $target
-
-%: $PLAN9/man/man3/%
- cp $prereq $target
-
-%: $PLAN9/man/man7/%
- cp $prereq $target
-
-%: ../make/%
- cp $prereq $target
-
-Makefile:D: ../make/Makefile.TOP ../make/Makefile.mk ../make/Makefile.CMD ../make/Makefile.BOT
- cat $prereq >$target
-
-README: ../README
- cp $prereq $target
-
-NOTICE: ../NOTICE.mk
- cp $prereq $target
-
sys.h: $PLAN9/src/cmd/mk/sys.std.h
cp $prereq $target
diff --git a/unix/mkfile.regexp b/unix/mkfile.regexp
index 86834227..792c622d 100644
--- a/unix/mkfile.regexp
+++ b/unix/mkfile.regexp
@@ -9,43 +9,15 @@ TARG=\
regexp9.h\
regcomp.h\
lib9.h\
- `{ls -p $PLAN9/src/libregexp/*.c}\
+ `{9 ls -p $PLAN9/src/libregexp/*.c}\
-all:V: $TARG
+WHAT=regexp
-%: $PLAN9/include/%
- cp $prereq $target
+<../mkfile.what
%: $PLAN9/src/libregexp/%
cp $prereq $target
-%: $PLAN9/man/man1/%
- cp $prereq $target
-
-%: $PLAN9/man/man3/%
- cp $prereq $target
-
-%: $PLAN9/man/man7/%
- cp $prereq $target
-
-regexp9.3: $PLAN9/man/man3/regexp.3
- cp $prereq $target
-
-regexp9.7: $PLAN9/man/man7/regexp.7
- cp $prereq $target
-
-%: ../make/%
- cp $prereq $target
-
-Makefile:D: ../make/Makefile.TOP ../make/Makefile.regexp ../make/Makefile.LIB ../make/Makefile.BOT
- cat $prereq >$target
-
-README: ../README
- cp $prereq $target
-
-NOTICE: ../NOTICE.regexp
- cp $prereq $target
-
lib9.h: $PLAN9/src/libregexp/lib9.std.h
cp $prereq $target
diff --git a/unix/mkfile.utf b/unix/mkfile.utf
index 23ed764e..581c4e09 100644
--- a/unix/mkfile.utf
+++ b/unix/mkfile.utf
@@ -4,7 +4,7 @@ TARG=\
NOTICE\
README\
Makefile\
- `{ls -p $PLAN9/src/lib9/utf/*.c}\
+ `{9 ls -p $PLAN9/src/lib9/utf/*.c}\
plan9.h\
utf.h\
utfdef.h\
@@ -13,35 +13,13 @@ TARG=\
runestrcat.3\
utf.7\
-all:V: $TARG
+WHAT=utf
-%: $PLAN9/include/%
- cp $prereq $target
-
-%: $PLAN9/src/lib9/utf/%
- cp $prereq $target
-
-%: $PLAN9/man/man1/%
- cp $prereq $target
-
-%: $PLAN9/man/man3/%
- cp $prereq $target
-
-%: $PLAN9/man/man7/%
- cp $prereq $target
-
-%: ../make/%
- cp $prereq $target
+<../mkfile.what
-Makefile:D: ../make/Makefile.TOP ../make/Makefile.utf ../make/Makefile.LIB ../make/Makefile.BOT
- cat $prereq >$target
-
-README: ../README
- cp $prereq $target
-
-NOTICE: ../NOTICE.utf
+utf.h: $PLAN9/include/utf.h
cp $prereq $target
-utf.h: $PLAN9/include/utf.h
+%: $PLAN9/src/lib9/utf/%
cp $prereq $target
diff --git a/unix/mkfile.what b/unix/mkfile.what
new file mode 100644
index 00000000..07ccc52c
--- /dev/null
+++ b/unix/mkfile.what
@@ -0,0 +1,22 @@
+all:V: $TARG
+
+%: $PLAN9/include/%
+ cp $prereq $target
+
+%: $PLAN9/unix/man/%
+ cat ../man/ex.man $prereq >$target
+
+%: $PLAN9/unix/make/%
+ cp $prereq $target
+
+Makefile:D: $PLAN9/unix/make/Makefile.TOP $PLAN9/unix/make/Makefile.$WHAT $PLAN9/unix/make/Makefile.LIB $PLAN9/unix/make/Makefile.BOT
+ cat $prereq >$target
+ [ $WHAT = mk ] && cat $PLAN9/unix/make/Makefile.CMD >>$target
+ exit 0
+
+README: $PLAN9/unix/README
+ cp $prereq $target
+
+NOTICE: $PLAN9/unix/NOTICE.$WHAT
+ cp $prereq $target
+