changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: Import sources from 2011-03-30 iso image - sys/man

changeset 2: ee18c165c460
parent 1: b8ce396c0eaf
child 3: 3ccda4f00502
author: Taru Karttunen <taruti@taruti.net>
date: Wed, 30 Mar 2011 16:49:47 +0300
files: sys/man/1/0intro sys/man/1/2a sys/man/1/2c sys/man/1/2l sys/man/1/INDEX sys/man/1/INDEX.html sys/man/1/abaco sys/man/1/acid sys/man/1/acme sys/man/1/ap sys/man/1/ar sys/man/1/ascii sys/man/1/awk sys/man/1/basename sys/man/1/bc sys/man/1/bind sys/man/1/bitsyload sys/man/1/bundle sys/man/1/cal sys/man/1/calendar sys/man/1/cat sys/man/1/cb sys/man/1/chgrp sys/man/1/chmod sys/man/1/cleanname sys/man/1/cmp sys/man/1/col sys/man/1/colors sys/man/1/comm sys/man/1/con sys/man/1/cp sys/man/1/cpp sys/man/1/cpu sys/man/1/crop sys/man/1/date sys/man/1/db sys/man/1/dc sys/man/1/dd sys/man/1/delkey sys/man/1/deroff sys/man/1/diff sys/man/1/doc2txt sys/man/1/doctype sys/man/1/du sys/man/1/echo sys/man/1/ecp sys/man/1/ed sys/man/1/emacs sys/man/1/eqn sys/man/1/expect sys/man/1/faces sys/man/1/factor sys/man/1/fedex sys/man/1/file sys/man/1/filter sys/man/1/fmt sys/man/1/fortune sys/man/1/freq sys/man/1/games sys/man/1/grap sys/man/1/graph sys/man/1/grep sys/man/1/gs sys/man/1/gview sys/man/1/gzip sys/man/1/hget sys/man/1/history sys/man/1/hoc sys/man/1/htmlroff sys/man/1/idiff sys/man/1/join sys/man/1/jpg sys/man/1/kbmap sys/man/1/kill sys/man/1/ktrace sys/man/1/leak sys/man/1/lens sys/man/1/lex sys/man/1/lock sys/man/1/look sys/man/1/lp sys/man/1/ls sys/man/1/mail sys/man/1/man sys/man/1/marshal sys/man/1/mc sys/man/1/mk sys/man/1/mkdir sys/man/1/mlmgr sys/man/1/mp3dec sys/man/1/mp3enc sys/man/1/ms2html sys/man/1/mtime sys/man/1/mug sys/man/1/nedmail sys/man/1/netstat sys/man/1/news sys/man/1/nm sys/man/1/ns sys/man/1/p sys/man/1/page sys/man/1/passwd sys/man/1/patch sys/man/1/pcc sys/man/1/pic sys/man/1/pipefile sys/man/1/plot sys/man/1/plumb sys/man/1/pr sys/man/1/prof sys/man/1/proof sys/man/1/ps sys/man/1/ps2pdf sys/man/1/pump sys/man/1/pwd sys/man/1/ratrace sys/man/1/rc sys/man/1/replica sys/man/1/resample sys/man/1/rio sys/man/1/rm sys/man/1/rwd sys/man/1/sam sys/man/1/secstore sys/man/1/sed sys/man/1/seq sys/man/1/size sys/man/1/sleep sys/man/1/sort sys/man/1/spell sys/man/1/spin sys/man/1/split sys/man/1/src sys/man/1/ssh sys/man/1/stop sys/man/1/strings sys/man/1/strip sys/man/1/sum sys/man/1/syscall sys/man/1/tail sys/man/1/tar sys/man/1/tbl sys/man/1/tcs sys/man/1/tee sys/man/1/tel sys/man/1/test sys/man/1/thesaurus sys/man/1/time sys/man/1/touch sys/man/1/tr sys/man/1/trace sys/man/1/troff sys/man/1/troff2html sys/man/1/tweak sys/man/1/uniq sys/man/1/units sys/man/1/uptime sys/man/1/vac sys/man/1/venti sys/man/1/vi sys/man/1/vnc sys/man/1/vt sys/man/1/wc sys/man/1/weather sys/man/1/who sys/man/1/winwatch sys/man/1/xd sys/man/1/yacc sys/man/1/yesterday sys/man/2/0intro sys/man/2/9p sys/man/2/9pcmdbuf sys/man/2/9pfid sys/man/2/9pfile sys/man/2/INDEX sys/man/2/INDEX.html sys/man/2/abort sys/man/2/abs sys/man/2/access sys/man/2/addpt sys/man/2/aes sys/man/2/allocimage sys/man/2/arg sys/man/2/arith3 sys/man/2/assert sys/man/2/atof sys/man/2/auth sys/man/2/authsrv sys/man/2/avl sys/man/2/bin sys/man/2/bind sys/man/2/bio sys/man/2/blowfish sys/man/2/brk sys/man/2/cachechars sys/man/2/chdir sys/man/2/cleanname sys/man/2/color sys/man/2/complete sys/man/2/control sys/man/2/cputime sys/man/2/ctime sys/man/2/ctype sys/man/2/debugger sys/man/2/des sys/man/2/dial sys/man/2/dirread sys/man/2/disk sys/man/2/draw sys/man/2/dsa sys/man/2/dup sys/man/2/elgamal sys/man/2/encode sys/man/2/encrypt sys/man/2/errstr sys/man/2/event sys/man/2/exec sys/man/2/exits sys/man/2/exp sys/man/2/fauth sys/man/2/fcall sys/man/2/fd2path sys/man/2/fgetc sys/man/2/flate sys/man/2/floor sys/man/2/fmtinstall sys/man/2/fopen sys/man/2/fork sys/man/2/fprintf sys/man/2/frame sys/man/2/frexp sys/man/2/fscanf sys/man/2/fversion sys/man/2/getcallerpc sys/man/2/getenv sys/man/2/getfcr sys/man/2/getfields sys/man/2/getpid sys/man/2/getuser sys/man/2/getwd sys/man/2/graphics sys/man/2/html sys/man/2/httpd sys/man/2/hypot sys/man/2/intmap sys/man/2/ioproc sys/man/2/iounit sys/man/2/ip sys/man/2/isalpharune sys/man/2/keyboard sys/man/2/lock sys/man/2/mach sys/man/2/malloc sys/man/2/matrix sys/man/2/memdraw sys/man/2/memlayer sys/man/2/memory sys/man/2/mktemp sys/man/2/mouse sys/man/2/mp sys/man/2/muldiv sys/man/2/nan sys/man/2/ndb sys/man/2/notify sys/man/2/object sys/man/2/open sys/man/2/perror sys/man/2/pipe sys/man/2/plumb sys/man/2/pool sys/man/2/postnote sys/man/2/prime sys/man/2/print sys/man/2/privalloc sys/man/2/proto sys/man/2/pushssl sys/man/2/pushtls sys/man/2/qball sys/man/2/qsort sys/man/2/quaternion sys/man/2/quote sys/man/2/rand sys/man/2/rc4 sys/man/2/read sys/man/2/readcolmap sys/man/2/readv sys/man/2/regexp sys/man/2/remove sys/man/2/rendezvous sys/man/2/rsa sys/man/2/rune sys/man/2/runestrcat sys/man/2/scribble sys/man/2/scsi sys/man/2/sechash sys/man/2/seek sys/man/2/segattach sys/man/2/segbrk sys/man/2/segflush sys/man/2/semacquire sys/man/2/setjmp sys/man/2/sin sys/man/2/sinh sys/man/2/sleep sys/man/2/stat sys/man/2/strcat sys/man/2/string sys/man/2/stringsize sys/man/2/subfont sys/man/2/symbol sys/man/2/thread sys/man/2/time sys/man/2/tmpfile sys/man/2/usb sys/man/2/usbfs sys/man/2/venti sys/man/2/venti-cache sys/man/2/venti-client sys/man/2/venti-conn sys/man/2/venti-fcall sys/man/2/venti-file sys/man/2/venti-log sys/man/2/venti-mem sys/man/2/venti-packet sys/man/2/venti-server sys/man/2/venti-zero sys/man/2/wait sys/man/2/window sys/man/3/0intro sys/man/3/INDEX sys/man/3/INDEX.html sys/man/3/aoe sys/man/3/apm sys/man/3/arch sys/man/3/audio sys/man/3/bridge sys/man/3/cap sys/man/3/cons sys/man/3/draw sys/man/3/dup sys/man/3/env sys/man/3/ether sys/man/3/flash sys/man/3/floppy sys/man/3/fs sys/man/3/i82365 sys/man/3/ip sys/man/3/kbin sys/man/3/kbmap sys/man/3/kprof sys/man/3/loopback sys/man/3/lpt sys/man/3/mnt sys/man/3/mouse sys/man/3/pipe sys/man/3/pnp sys/man/3/proc sys/man/3/root sys/man/3/rtc sys/man/3/sd sys/man/3/sdahci sys/man/3/sdaoe sys/man/3/segment sys/man/3/srv sys/man/3/ssl sys/man/3/tls sys/man/3/twsi sys/man/3/uart sys/man/3/usb sys/man/3/vga sys/man/4/0intro sys/man/4/INDEX sys/man/4/INDEX.html sys/man/4/acme sys/man/4/archfs sys/man/4/cdfs sys/man/4/cfs sys/man/4/cifs sys/man/4/consolefs sys/man/4/cwfs sys/man/4/dossrv sys/man/4/execnet sys/man/4/exportfs sys/man/4/ext2srv sys/man/4/factotum sys/man/4/flashfs sys/man/4/fossil sys/man/4/fs sys/man/4/ftpfs sys/man/4/httpfile sys/man/4/import sys/man/4/iostats sys/man/4/keyfs sys/man/4/kfs sys/man/4/lnfs sys/man/4/mntgen sys/man/4/namespace sys/man/4/nfs sys/man/4/nntpfs sys/man/4/paqfs sys/man/4/plumber sys/man/4/ramfs sys/man/4/ratfs sys/man/4/rdbfs sys/man/4/rio sys/man/4/sacfs sys/man/4/snap sys/man/4/srv sys/man/4/tapefs sys/man/4/telco sys/man/4/u9fs sys/man/4/upasfs sys/man/4/usb sys/man/4/usbd sys/man/4/vacfs sys/man/4/webcookies sys/man/4/webfs sys/man/4/wikifs sys/man/5/0intro sys/man/5/INDEX sys/man/5/INDEX.html sys/man/5/attach sys/man/5/clunk sys/man/5/error sys/man/5/flush sys/man/5/open sys/man/5/read sys/man/5/remove sys/man/5/stat sys/man/5/version sys/man/5/walk sys/man/6/0intro sys/man/6/INDEX sys/man/6/INDEX.html sys/man/6/a.out sys/man/6/ar sys/man/6/authsrv sys/man/6/color sys/man/6/face sys/man/6/font sys/man/6/htmlroff sys/man/6/image sys/man/6/keyboard sys/man/6/keys.who sys/man/6/man sys/man/6/map sys/man/6/mhtml sys/man/6/mnihongo sys/man/6/mpictures sys/man/6/ms sys/man/6/namespace sys/man/6/ndb sys/man/6/plot sys/man/6/plumb sys/man/6/regexp sys/man/6/rewrite sys/man/6/smtpd sys/man/6/snap sys/man/6/style sys/man/6/thumbprint sys/man/6/users sys/man/6/utf sys/man/6/venti sys/man/6/venti.conf sys/man/6/vgadb sys/man/7/0intro sys/man/7/INDEX sys/man/7/INDEX.html sys/man/7/astro sys/man/7/dict sys/man/7/juke sys/man/7/map sys/man/7/playlistfs sys/man/7/scat sys/man/8/0intro sys/man/8/6in4 sys/man/8/9load sys/man/8/9pcon sys/man/8/INDEX sys/man/8/INDEX.html sys/man/8/aan sys/man/8/aliasmail sys/man/8/apm sys/man/8/aquarela sys/man/8/auth sys/man/8/backup sys/man/8/boot sys/man/8/booting sys/man/8/cec sys/man/8/cpurc sys/man/8/cron sys/man/8/dhcpd sys/man/8/diskparts sys/man/8/disksim sys/man/8/drawterm sys/man/8/fossilcons sys/man/8/fs sys/man/8/fsconfig sys/man/8/fshalt sys/man/8/getflags sys/man/8/gpsfs sys/man/8/histogram sys/man/8/httpd sys/man/8/init sys/man/8/ipconfig sys/man/8/ipserv sys/man/8/kfscmd sys/man/8/listen sys/man/8/lp sys/man/8/mk9660 sys/man/8/mkflashfs sys/man/8/mkfs sys/man/8/mkpaqfs sys/man/8/mksacfs sys/man/8/mouse sys/man/8/na sys/man/8/ndb sys/man/8/newuser sys/man/8/nfsserver sys/man/8/partfs sys/man/8/pci sys/man/8/pcmcia sys/man/8/pem sys/man/8/ping sys/man/8/plan9.ini sys/man/8/pop3 sys/man/8/ppp sys/man/8/prep sys/man/8/qer sys/man/8/reboot sys/man/8/replica sys/man/8/rsa sys/man/8/scanmail sys/man/8/screenlock sys/man/8/scuzz sys/man/8/secstore sys/man/8/securenet sys/man/8/send sys/man/8/smtp sys/man/8/snoopy sys/man/8/stats sys/man/8/statusbar sys/man/8/stub sys/man/8/swap sys/man/8/timesync sys/man/8/tlssrv sys/man/8/trampoline sys/man/8/udpecho sys/man/8/update sys/man/8/venti sys/man/8/venti-backup sys/man/8/venti-fmt sys/man/8/vga sys/man/8/wol sys/man/fonts sys/man/index.html sys/man/mkfile sys/man/preface.html sys/man/preface3.html sys/man/preface4.html sys/man/searchindex sys/man/vol1.pdf sys/man/vol1.ps.gz
description: Import sources from 2011-03-30 iso image - sys/man
     1.1new file mode 100755
     1.2--- /dev/null
     1.3+++ b/sys/man/1/0intro
     1.4@@ -0,0 +1,397 @@
     1.5+.TH INTRO 1
     1.6+.SH NAME
     1.7+intro \- introduction to Plan 9
     1.8+.SH DESCRIPTION
     1.9+Plan 9 is a distributed computing environment assembled from
    1.10+separate machines acting as terminals,
    1.11+CPU servers, and file servers.
    1.12+A user works at a terminal, running a window system on a raster display.
    1.13+Some windows are connected to CPU servers; the intent is that heavy computing
    1.14+should be done in those windows but it is also possible to compute on the terminal.
    1.15+A separate file server provides file storage for terminals and
    1.16+CPU servers alike.
    1.17+.SS Name Spaces
    1.18+In Plan 9, almost all objects look like files.
    1.19+The object retrieved by a given name is determined by a mapping called the
    1.20+.IR "name space" .
    1.21+A quick tour of the standard name space is in
    1.22+.IR namespace (4).
    1.23+Every program running in Plan 9 belongs to a
    1.24+.I process group
    1.25+(see
    1.26+.I rfork
    1.27+in
    1.28+.IR fork (2)),
    1.29+and the name space for each process group can be independently
    1.30+customized.
    1.31+.PP
    1.32+A name space is hierarchically structured.
    1.33+A full file name (also called a
    1.34+.IR "full path name" )
    1.35+has the form
    1.36+.IP
    1.37+.RI / e1 / e2 /.../ en
    1.38+.PP
    1.39+This represents an object in a tree of files: the tree has a root,
    1.40+represented by the first
    1.41+.LR / ;
    1.42+the root has a child file named
    1.43+.IR e1 ,
    1.44+which in turn has child
    1.45+.IR e2 ,
    1.46+and so on; the descendent
    1.47+.I en
    1.48+is the object represented by the path name.
    1.49+.PP
    1.50+There are a number of Plan 9
    1.51+.I services
    1.52+available, each of which provides a tree of files.
    1.53+A name space is built by
    1.54+.I binding
    1.55+services (or subtrees of services) to names in the name-space-so-far.
    1.56+Typically, a user's home file server is bound to the root of the name space,
    1.57+and other services are bound to conventionally named subdirectories.
    1.58+For example, there is a service resident in the operating system for accessing
    1.59+hardware devices and that is bound to
    1.60+.B /dev
    1.61+by convention.
    1.62+Kernel services have names (outside the name space) that are a
    1.63+.L #
    1.64+sign followed by a single letter;
    1.65+for example,
    1.66+.B #c
    1.67+is conventionally bound to
    1.68+.BR /dev .
    1.69+.PP
    1.70+Plan 9 has
    1.71+.IR "union directories" :
    1.72+directories made of several directories all bound to the
    1.73+same name.
    1.74+The directories making up a union directory are ordered in a list.
    1.75+When the bindings are made
    1.76+(see
    1.77+.IR bind (1)),
    1.78+flags specify whether a newly bound member goes at the head or the tail of the list
    1.79+or completely replaces the list.
    1.80+To look up a name in a union directory, each member directory is searched
    1.81+in list order until the name is found.
    1.82+A bind
    1.83+flag specifies whether file creation is allowed in a member directory:
    1.84+a file created in the union directory goes in
    1.85+the first member directory in list order that allows creation, if any.
    1.86+.PP
    1.87+The glue that holds Plan 9 together is a network protocol called
    1.88+.IR 9P ,
    1.89+described in section 5 of this manual.
    1.90+All Plan 9 servers read and respond to 9P requests to navigate through
    1.91+a file tree and to perform operations such as reading and writing
    1.92+files within the tree.
    1.93+.SS Booting
    1.94+When a terminal is powered on or reset,
    1.95+it must be told the name of a file server to boot from,
    1.96+the operating system kernel to boot,
    1.97+and a user name and password.
    1.98+How this dialog proceeds is environment- and machine-dependent.
    1.99+Once it is complete,
   1.100+the terminal loads a Plan 9 kernel,
   1.101+which sets some environment variables (see
   1.102+.IR env (3))
   1.103+and builds an initial name space.
   1.104+See
   1.105+.IR namespace (4),
   1.106+.IR boot (8),
   1.107+and
   1.108+.IR init (8)
   1.109+for details, but some important aspects of the initial name space are:
   1.110+.IP \(bu
   1.111+The environment variable
   1.112+.B $cputype
   1.113+is set to the name of the kernel's CPU's architecture: one of
   1.114+.BR alpha ,
   1.115+.BR mips ,
   1.116+.BR sparc ,
   1.117+.B power
   1.118+(Power PC),
   1.119+.BR 386
   1.120+(386, 486, Pentium, ...)
   1.121+etc.
   1.122+The environment variable
   1.123+.B $objtype
   1.124+is initially the same as
   1.125+.BR $cputype .
   1.126+.IP \(bu
   1.127+The environment variable
   1.128+.B $terminal
   1.129+is set to a description of the machine running the kernel,
   1.130+such as
   1.131+.BR "generic pc" .
   1.132+Sometimes the middle word of
   1.133+.B $terminal
   1.134+encodes the file from which the kernel is booted;
   1.135+e.g.
   1.136+.B "alpha apc axp
   1.137+is bootstrapped from
   1.138+.BR /alpha/bapc .
   1.139+.IP \(bu
   1.140+The environment variable
   1.141+.B $service
   1.142+is set to
   1.143+.BR terminal .
   1.144+(Other ways of accessing Plan 9 may set
   1.145+.B $service
   1.146+to one of
   1.147+.BR cpu ,
   1.148+.BR con ,
   1.149+or
   1.150+.BR rx .)
   1.151+.IP \(bu
   1.152+The environment variable
   1.153+.B $user
   1.154+is set to the name of the user who booted the terminal.
   1.155+The environment variable
   1.156+.B $home
   1.157+is set to that user's home directory.
   1.158+.IP \(bu
   1.159+.B /$cputype/bin
   1.160+and
   1.161+.B /rc/bin
   1.162+are unioned into
   1.163+.BR /bin .
   1.164+.PD
   1.165+.PP
   1.166+After booting, the terminal runs the command interpreter,
   1.167+.IR rc (1),
   1.168+on
   1.169+.B /usr/$user/lib/profile
   1.170+after moving to the user's home directory.
   1.171+.PP
   1.172+Here is a typical profile:
   1.173+.IP
   1.174+.EX
   1.175+bind -a $home/bin/rc /bin
   1.176+bind -a $home/bin/$cputype /bin
   1.177+bind -c $home/tmp /tmp
   1.178+font = /lib/font/bit/pelm/euro.9.font
   1.179+upas/fs
   1.180+switch($service){
   1.181+case terminal
   1.182+	plumber
   1.183+	prompt=('term% ' '	')
   1.184+	exec rio -f $font
   1.185+case cpu
   1.186+	bind /mnt/term/dev/cons /dev/cons
   1.187+	bind /mnt/term/dev/consctl /dev/consctl
   1.188+	bind -a /mnt/term/mnt/wsys /dev
   1.189+	prompt=('cpu% ' '	')
   1.190+	news
   1.191+case con
   1.192+	prompt=('cpu% ' '	')
   1.193+	news
   1.194+}
   1.195+.EE
   1.196+.PD
   1.197+.PP
   1.198+The first three lines replace
   1.199+.B /tmp
   1.200+with a
   1.201+.B tmp
   1.202+in the user's home directory
   1.203+and union personal
   1.204+.B bin
   1.205+directories with
   1.206+.BR /bin ,
   1.207+to be searched after the standard
   1.208+.B bin
   1.209+directories.
   1.210+The next starts the mail file system; see
   1.211+.IR mail (1).
   1.212+Then different things happen, depending on the
   1.213+.B $service
   1.214+environment variable,
   1.215+such as running the window system
   1.216+.IR rio (1)
   1.217+on a terminal.
   1.218+.PP
   1.219+To do heavy work such as compiling, the
   1.220+.IR cpu (1)
   1.221+command connects a window to a CPU server;
   1.222+the same environment variables are set (to different values)
   1.223+and the same profile is run.
   1.224+The initial directory is the current directory in the terminal window
   1.225+where
   1.226+.I cpu
   1.227+was typed.
   1.228+The value of
   1.229+.B $service
   1.230+will be
   1.231+.BR cpu ,
   1.232+so the second arm of the profile switch is executed.
   1.233+The root of the terminal's name space is accessible through
   1.234+.BR /mnt/term ,
   1.235+so the
   1.236+.I bind
   1.237+is a way of making the window system's graphics interface (see
   1.238+.IR draw (3))
   1.239+available to programs running on the CPU server.
   1.240+The
   1.241+.IR news (1)
   1.242+command reports current Plan 9 affairs.
   1.243+.PP
   1.244+The third possible service type,
   1.245+.BR con ,
   1.246+is set when the CPU server is called from a non-Plan-9 machine,
   1.247+such as through
   1.248+.I telnet
   1.249+(see
   1.250+.IR con (1)).
   1.251+.SS Using Plan 9
   1.252+The user commands of Plan 9 are reminiscent of those in Research Unix, version 10.
   1.253+There are a number of differences, however.
   1.254+.PP
   1.255+The standard shell is
   1.256+.IR rc (1),
   1.257+not the Bourne shell.
   1.258+The most noticeable differences appear only when programming and macro processing.
   1.259+.PP
   1.260+The character-delete character is backspace, and the line-kill character is
   1.261+control-U; these cannot be changed.
   1.262+.PP
   1.263+DEL is the interrupt character: typing it sends an interrupt to processes running in that window.
   1.264+See
   1.265+.IR keyboard (6)
   1.266+for instructions on typing characters like DEL on the various keyboards.
   1.267+.PP
   1.268+If a program dies with something like an address error, it enters a `Broken'
   1.269+state.  It lingers, available for debugging with
   1.270+.IR db (1)
   1.271+or
   1.272+.IR acid (1).
   1.273+.I Broke
   1.274+(see
   1.275+.IR kill (1))
   1.276+cleans up broken processes.
   1.277+.PP
   1.278+The standard editor is one of
   1.279+.IR acme (1)
   1.280+or
   1.281+.IR sam (1).
   1.282+There is a variant of
   1.283+.I sam
   1.284+that permits running the file-manipulating part of
   1.285+.I sam
   1.286+on a non-Plan-9 system:
   1.287+.IP
   1.288+.EX
   1.289+sam -r tcp!kremvax
   1.290+.EE
   1.291+.PP
   1.292+For historical reasons,
   1.293+.I sam
   1.294+uses a tab stop setting of 8 spaces, while the other editors and window systems use 4 spaces.
   1.295+These defaults can be overridden by setting the value of the environment variable
   1.296+.B $tabstop
   1.297+to the desired number of spaces per tab.
   1.298+.PP
   1.299+Machine names may be prefixed by the network name,
   1.300+here
   1.301+.BR tcp ;
   1.302+and
   1.303+.B net
   1.304+for the system default.
   1.305+.PP
   1.306+Login connections and remote execution on non-Plan-9 machines are usually
   1.307+done by saying, for example,
   1.308+.IP
   1.309+.EX
   1.310+con kremvax
   1.311+.EE
   1.312+.PP
   1.313+or
   1.314+.IP
   1.315+.EX
   1.316+rx deepthought chess
   1.317+.EE
   1.318+.PP
   1.319+(see
   1.320+.IR con (1)).
   1.321+.PP
   1.322+.I 9fs 
   1.323+connects to file systems of remote systems
   1.324+(see
   1.325+.IR srv (4)).
   1.326+For example,
   1.327+.IP
   1.328+.EX
   1.329+9fs kremvax
   1.330+.EE
   1.331+.PP
   1.332+sets things up so that the root of
   1.333+.BR kremvax 's
   1.334+file tree is visible locally in
   1.335+.BR /n/kremvax .
   1.336+.PP
   1.337+.IR Faces (1)
   1.338+gives graphical notification of arriving mail.
   1.339+.PP
   1.340+The Plan 9 file server has an integrated backup facility.
   1.341+The command
   1.342+.IP
   1.343+.EX
   1.344+9fs dump
   1.345+.EE
   1.346+.PP
   1.347+binds to
   1.348+.B /n/dump
   1.349+a tree containing the daily backups on the file server.
   1.350+The dump tree has years as top level file names, and month-day
   1.351+as next level file names.
   1.352+For example,
   1.353+.B /n/dump/2000/0120
   1.354+is the root of the file system as it appeared at dump time on
   1.355+January 20, 2000.
   1.356+If more than one dump is taken on the same day, dumps after
   1.357+the first have an extra digit.
   1.358+To recover the version of this file as it was on June 15, 1999,
   1.359+.IP
   1.360+.EX
   1.361+cp /n/dump/1999/0615/sys/man/1/0intro .
   1.362+.EE
   1.363+.PP
   1.364+or use
   1.365+.IR yesterday (1).
   1.366+.SH SEE ALSO
   1.367+This section for general publicly accessible commands.
   1.368+.br
   1.369+Section (2) for library functions, including system calls.
   1.370+.br
   1.371+Section (3) for kernel devices (accessed via
   1.372+.IR bind (1)).
   1.373+.br
   1.374+Section (4) for file services (accessed via
   1.375+.IR mount ).
   1.376+.br
   1.377+Section (5) for the Plan 9 file protocol.
   1.378+.br
   1.379+Section (6) for file formats.
   1.380+.br
   1.381+Section (7) for databases and database access programs.
   1.382+.br
   1.383+Section (8) for things related to administering Plan 9.
   1.384+.br
   1.385+.B /sys/doc
   1.386+for copies of papers referenced in this manual.
   1.387+.PP
   1.388+The back of this volume has a permuted index to aid searches.
   1.389+.SH DIAGNOSTICS
   1.390+Upon termination each program returns a string called the
   1.391+.IR "exit status" .
   1.392+It was either supplied by a call to
   1.393+.IR exits (2)
   1.394+or was written to the command's
   1.395+.BI /proc/ pid /note
   1.396+file
   1.397+(see
   1.398+.IR proc (3)),
   1.399+causing an abnormal termination.
   1.400+The empty string is customary for successful execution;
   1.401+a non-empty string gives a clue to the failure of the command.
     2.1new file mode 100755
     2.2--- /dev/null
     2.3+++ b/sys/man/1/2a
     2.4@@ -0,0 +1,60 @@
     2.5+.TH 2A 1 
     2.6+.SH NAME
     2.7+0a, 1a, 2a, 5a, 6a, 7a, 8a, ka, qa, va \- assemblers
     2.8+.SH SYNOPSIS
     2.9+.B 2a
    2.10+[
    2.11+.I option ...
    2.12+]
    2.13+[
    2.14+.I name ...
    2.15+]
    2.16+.br
    2.17+etc.
    2.18+.SH DESCRIPTION
    2.19+These programs
    2.20+assemble the named files into object files
    2.21+for the corresponding architectures; see
    2.22+.IR 2c (1)
    2.23+for the correspondence between an architecture and the character
    2.24+.RB ( 1 ,
    2.25+.RB 2 ,
    2.26+etc.) that specifies it.
    2.27+The assemblers handle the most common C preprocessor directives and the associated
    2.28+command-line options
    2.29+.BR -D
    2.30+and
    2.31+.BR -I .
    2.32+Other options are:
    2.33+.TP
    2.34+.BI -o " obj"
    2.35+Place output in file
    2.36+.I obj
    2.37+(allowed only if there is just one input file).
    2.38+Default is to take the last element of the input path name,
    2.39+strip any trailing
    2.40+.BR .s ,
    2.41+and append
    2.42+.RI . O ,
    2.43+where
    2.44+.I O
    2.45+is first letter of the assembler's name.
    2.46+.SH FILES
    2.47+The directory
    2.48+.B /sys/include
    2.49+is searched for include files after
    2.50+machine-dependent files in
    2.51+.BR /$objtype/include .
    2.52+.SH SOURCE
    2.53+.BR /sys/src/cmd/2a ,
    2.54+etc.
    2.55+.SH SEE ALSO
    2.56+.IR 2c (1),
    2.57+.IR 2l (1).
    2.58+.PP
    2.59+Rob Pike, ``A manual for the Plan 9 assembler''
    2.60+.SH BUGS
    2.61+The list of assemblers given above is only partial,
    2.62+not all architectures are supported on all systems,
    2.63+some have been retired and some
    2.64+are provided by third parties.
     3.1new file mode 100755
     3.2--- /dev/null
     3.3+++ b/sys/man/1/2c
     3.4@@ -0,0 +1,497 @@
     3.5+.TH 2C 1
     3.6+.SH NAME
     3.7+0c, 1c, 2c, 5c, 6c, 7c, 8c, kc, qc, vc \- C compilers
     3.8+.SH SYNOPSIS
     3.9+.B 2c
    3.10+[
    3.11+.I option ...
    3.12+]
    3.13+[
    3.14+.I file ...
    3.15+]
    3.16+.br
    3.17+etc.
    3.18+.SH DESCRIPTION
    3.19+These commands compile the named C
    3.20+.I files
    3.21+into object files for the corresponding architecture.
    3.22+If there are multiple C
    3.23+.IR files ,
    3.24+the compilers will attempt to keep
    3.25+.B $NPROC
    3.26+compilations running concurrently.
    3.27+Associated with each compiler is a string
    3.28+.IR objtype ,
    3.29+for example
    3.30+.TF "6c amd64 "
    3.31+.PD
    3.32+.TP
    3.33+.B "0c spim
    3.34+little-endian MIPS 3000 family
    3.35+.TP
    3.36+.B "1c 68000
    3.37+Motorola MC68000
    3.38+.TP
    3.39+.B "2c 68020
    3.40+Motorola MC68020
    3.41+.TP
    3.42+.B "5c arm
    3.43+little-endian ARM
    3.44+.TP
    3.45+.B "6c amd64
    3.46+AMD64 and compatibles (e.g., Intel EM64T)
    3.47+.TP
    3.48+.B "7c alpha
    3.49+Digital Alpha APX
    3.50+.TP
    3.51+.B "8c 386
    3.52+Intel i386, i486, Pentium, etc.
    3.53+.TP
    3.54+.B "kc sparc
    3.55+Sun SPARC
    3.56+.TP
    3.57+.B "qc power
    3.58+Power PC
    3.59+.TP
    3.60+.B "vc mips
    3.61+big-endian MIPS 3000 family
    3.62+.PP
    3.63+The compilers handle most preprocessing directives themselves; a complete
    3.64+preprocessor is available in
    3.65+.IR cpp (1),
    3.66+which must be run separately.
    3.67+.PP
    3.68+Let the first letter of the compiler name be
    3.69+.IR O =
    3.70+.BR 0 ,
    3.71+.BR 1 ,
    3.72+.BR 2 ,
    3.73+.BR 5 ,
    3.74+.BR 6 ,
    3.75+.BR 7 ,
    3.76+.BR 8 ,
    3.77+.BR k ,
    3.78+.BR q ,
    3.79+or
    3.80+.BR v .
    3.81+The output object files end in
    3.82+.RI . O .
    3.83+The letter is also the prefix of related programs:
    3.84+.IB O a
    3.85+is the assembler,
    3.86+.IB O l
    3.87+is the loader.
    3.88+Plan 9 conventionally sets the
    3.89+.B $objtype
    3.90+environment variable to the
    3.91+.I objtype
    3.92+string appropriate to the current machine's type.
    3.93+Plan 9 also conventionally has
    3.94+.RI / objtype
    3.95+directories, which contain among other things:
    3.96+.BR include ,
    3.97+for machine-dependent include files;
    3.98+.BR lib ,
    3.99+for public object code libraries;
   3.100+.BR bin ,
   3.101+for public programs;
   3.102+and
   3.103+.BR mkfile ,
   3.104+for preconditioning
   3.105+.IR mk (1).
   3.106+.PP
   3.107+The compiler options are:
   3.108+.TF Dname
   3.109+.PD
   3.110+.TP
   3.111+.BI -o " obj"
   3.112+Place output in file
   3.113+.I obj
   3.114+(allowed only if there is just one input file).
   3.115+Default is to take the last element of the input file name,
   3.116+strip any trailing
   3.117+.BR .c ,
   3.118+and append
   3.119+.RI . O .
   3.120+.TP
   3.121+.B -w
   3.122+Print warning messages about unused variables, etc.
   3.123+.TP
   3.124+.B -B
   3.125+Accept functions without a new-style
   3.126+ANSI C function prototype.
   3.127+By default, the compilers reject functions
   3.128+used without a defined prototype,
   3.129+although ANSI C permits them.
   3.130+.TP
   3.131+.BI -D\*S name=def
   3.132+.br
   3.133+.ns
   3.134+.TP
   3.135+.BI -D \*Sname
   3.136+Define the
   3.137+.I name
   3.138+to the preprocessor,
   3.139+as if by
   3.140+.LR #define .
   3.141+If no definition is given, the name is defined as
   3.142+.LR 1 .
   3.143+.TP
   3.144+.BI -F
   3.145+Enable type-checking of calls to
   3.146+.IR print (2)
   3.147+and other formatted print routines.  See the discussion
   3.148+of extensions, below.
   3.149+.TP
   3.150+.BI -I \*Sdir
   3.151+An
   3.152+.L #include
   3.153+file whose name does not begin with
   3.154+slash
   3.155+or is enclosed in double quotes
   3.156+is always
   3.157+sought first in the directory
   3.158+of the
   3.159+.I file
   3.160+argument.  If this fails,
   3.161+the
   3.162+.I -.
   3.163+flag is given or the name is enclosed in
   3.164+.BR <> ,
   3.165+it is then sought
   3.166+in directories named in
   3.167+.B -I
   3.168+options,
   3.169+then in
   3.170+.BR /sys/include ,
   3.171+and finally in
   3.172+.BR /$objtype/include .
   3.173+.TP
   3.174+.B -.
   3.175+Suppress the automatic searching for include files in
   3.176+the directory of the file argument.
   3.177+.TP
   3.178+.B -N
   3.179+Suppress automatic registerization and optimization.
   3.180+.TP
   3.181+.B -S
   3.182+Print an assembly language version of the object code
   3.183+on standard output as well as generating the
   3.184+.RI . O
   3.185+file.
   3.186+.TP
   3.187+.B -T
   3.188+Pass type signatures on all external and global entities.
   3.189+The signature is based on the C
   3.190+.B signof
   3.191+operator.
   3.192+See
   3.193+.IR dynld (2).
   3.194+.TP
   3.195+.B -V
   3.196+By default, the compilers are non-standardly lax about type equality between
   3.197+.B void*
   3.198+values and other pointers; this flag requires ANSI C conformance.
   3.199+.TP
   3.200+.B -p
   3.201+Invoke a standard ANSI C preprocessor before compiling.
   3.202+.TP
   3.203+.B -a
   3.204+Instead of compiling, print on standard output acid functions (see
   3.205+.IR acid (1))
   3.206+for examining structures declared in the source files.
   3.207+.TP
   3.208+.B -aa
   3.209+Like
   3.210+.B -a
   3.211+except suppress information about structures
   3.212+declared in included header files.
   3.213+.TP
   3.214+.B -n
   3.215+When used with
   3.216+.B -a
   3.217+or
   3.218+.BR -aa ,
   3.219+places acid functions in
   3.220+.IB file .acid
   3.221+for input
   3.222+.IB file .c ,
   3.223+and not on standard output.
   3.224+.PP
   3.225+The compilers support several extensions to ANSI C:
   3.226+.TF \|
   3.227+.PD
   3.228+.TP
   3.229+\-
   3.230+A structure or union may contain unnamed substructures and subunions.
   3.231+The fields of the substructures or
   3.232+subunions can then be used as if they were members of the parent
   3.233+structure or union (the resolution of a name conflict is unspecified).
   3.234+When a pointer to the outer structure or union is used in a context
   3.235+that is only legal for the unnamed substructure, the compiler promotes
   3.236+the type and adjusts the pointer value to point at the substructure.
   3.237+If the unnamed structure or union is of a type with a tag name specified by a
   3.238+.B typedef
   3.239+statement,
   3.240+the unnamed structure or union can be explicitly referenced
   3.241+by <struct variable>.<tagname>.
   3.242+.TP
   3.243+\-
   3.244+A structure value can be formed with an expression such as
   3.245+.EX
   3.246+    (struct S){v1, v2, v3}
   3.247+.EE
   3.248+where the list elements are values for the fields of struct
   3.249+.BR S .
   3.250+.TP
   3.251+\-
   3.252+Array initializers can specify the indices of the array in square
   3.253+brackets, as
   3.254+.EX
   3.255+    int a[] = { [3] 1, [10] 5 };
   3.256+.EE
   3.257+which initializes the third and tenth elements of the eleven-element array
   3.258+.BR a .
   3.259+.TP
   3.260+\-
   3.261+Structure initializers can specify the structure element by using the name
   3.262+following a period, as
   3.263+.EX
   3.264+    struct { int x; int y; } s = { .y 1, .x 5 };
   3.265+.EE
   3.266+which initializes elements
   3.267+.B y
   3.268+and then
   3.269+.B x
   3.270+of the structure
   3.271+.BR s .
   3.272+These forms also accept the new ANSI C notation, which includes an equal sign:
   3.273+.EX
   3.274+    int a[] = { [3] = 1, [10] = 5 };
   3.275+    struct { int x; int y; } s = { .y = 1, .x = 5 };
   3.276+.EE
   3.277+.TP
   3.278+\-
   3.279+A global variable can be dedicated to a register
   3.280+by declaring it
   3.281+.B "extern register"
   3.282+in
   3.283+.I all
   3.284+modules and libraries.
   3.285+.TP
   3.286+\-
   3.287+A
   3.288+.B #pragma
   3.289+of the form
   3.290+.EX
   3.291+    #pragma lib "libbio.a"
   3.292+.EE
   3.293+records that the program needs to be loaded with file
   3.294+.BR /$objtype/lib/libbio.a ;
   3.295+such lines, typically placed in library header files, obviate the
   3.296+.B -l
   3.297+option of the loaders.  To help identify files in non-standard directories,
   3.298+within the file names in the
   3.299+.B #pragmas
   3.300+the string
   3.301+.B $M
   3.302+represents the name of the architecture
   3.303+(e.g.,
   3.304+.BR mips )
   3.305+and
   3.306+.B $O
   3.307+represents its identifying character
   3.308+(e.g.,
   3.309+.BR v ).
   3.310+.TP
   3.311+\-
   3.312+A
   3.313+.B #pragma
   3.314+of the form
   3.315+.EX
   3.316+    #pragma varargck argpos error 2
   3.317+.EE
   3.318+tells the compiler that the second argument to
   3.319+.B error
   3.320+is a
   3.321+.BR print -like
   3.322+format string (see
   3.323+.IR print (2))
   3.324+that identifies the handling of subsequent arguments.
   3.325+The
   3.326+.B #pragma
   3.327+.EX
   3.328+    #pragma varargck type "s" char*
   3.329+.EE
   3.330+says that the format verb
   3.331+.B s
   3.332+processes an argument of type
   3.333+.BR char *.
   3.334+The
   3.335+.B #pragma
   3.336+.EX
   3.337+    #pragma varargck flag 'c'
   3.338+.EE
   3.339+says that
   3.340+.B c
   3.341+is a flag character.
   3.342+These
   3.343+.B #pragmas
   3.344+are used, if the
   3.345+.B -F
   3.346+option is enabled, to type-check calls to
   3.347+.B print
   3.348+and other such routines.
   3.349+.TP
   3.350+\-
   3.351+A
   3.352+.B #pragma
   3.353+with any of the following forms:
   3.354+.EX
   3.355+    #pragma incomplete \fItype\fP
   3.356+    #pragma incomplete struct \fItag\fP
   3.357+    #pragma incomplete union \fItag\fP
   3.358+.EE
   3.359+where
   3.360+.I type
   3.361+is a
   3.362+.BR typedef 'd
   3.363+name for a structure or union type, and
   3.364+.I tag
   3.365+is a structure or union tag,
   3.366+tells the compiler that
   3.367+the corresponding type
   3.368+should have its signature calculated as an incomplete type
   3.369+even if it is subsequently fully defined.
   3.370+This allows the type signature mechanism to work in the presence
   3.371+of opaque types declared in header files, with their full definitions
   3.372+visible only to the code which manipulates them.
   3.373+With some imported software it might be necessary to turn off the
   3.374+signature generation completely for a large body of code (typically
   3.375+at the start and end of a particular include file).
   3.376+If
   3.377+.I type
   3.378+is the word
   3.379+.BR _off_ ,
   3.380+signature generation is turned off; if
   3.381+.I type
   3.382+is the word
   3.383+.BR _on_ ,
   3.384+the compiler will generate signatures.
   3.385+.TP
   3.386+\-
   3.387+The C++ comment
   3.388+.RB ( //
   3.389+to end of line)
   3.390+is accepted as well as the normal
   3.391+convention of
   3.392+.B /*
   3.393+.BR */ .
   3.394+.TP
   3.395+\-
   3.396+The compilers accept
   3.397+.B long
   3.398+.B long
   3.399+variables as a 64-bit type.
   3.400+The standard header typedefs this to
   3.401+.BR vlong .
   3.402+Arithmetic on
   3.403+.B  vlong
   3.404+values is usually emulated by a run-time library,
   3.405+though in at least
   3.406+.IR 8c ,
   3.407+only division and modulus use the run-time library
   3.408+and the other operators generate in-line code
   3.409+(and
   3.410+.I uvlong-expression
   3.411+.I divison-or-modulus
   3.412+.BI "(1<<" constant )
   3.413+will turn into in-line bit operations,
   3.414+as is done for shorter
   3.415+.I unsigned
   3.416+expressions).
   3.417+.SH EXAMPLE
   3.418+For the 68020, produce a program
   3.419+.B prog
   3.420+from C files
   3.421+.BR main.c
   3.422+and
   3.423+.BR sub.c :
   3.424+.IP
   3.425+.EX
   3.426+2c -FVw main.c sub.c
   3.427+2l -o prog main.2 sub.2
   3.428+.EE
   3.429+.SH FILES
   3.430+.TF /$objtype/include
   3.431+.TP
   3.432+.B /sys/include
   3.433+system area for machine-independent
   3.434+.B #include
   3.435+directives.
   3.436+.TP
   3.437+.B /$objtype/include
   3.438+system area for machine-dependent
   3.439+.B #include
   3.440+directives.
   3.441+.SH SOURCE
   3.442+.TF /sys/src/cmd/2c,\ etc.
   3.443+.TP
   3.444+.B /sys/src/cmd/cc
   3.445+machine-independent part
   3.446+.TP
   3.447+.BR /sys/src/cmd/2c ,\ etc.
   3.448+machine-dependent part
   3.449+.SH "SEE ALSO"
   3.450+.IR 2a (1),
   3.451+.IR 2l (1),
   3.452+.IR cpp (1),
   3.453+.IR mk (1),
   3.454+.IR nm (1),
   3.455+.IR pcc (1),
   3.456+.IR db (1),
   3.457+.IR acid (1)
   3.458+.\" .IR ansitize (1)
   3.459+.PP
   3.460+Rob Pike,
   3.461+``How to Use the Plan 9 C Compiler''
   3.462+.SH BUGS
   3.463+The list of compilers given above is only partial,
   3.464+not all architectures are supported on all systems,
   3.465+some have been retired and some
   3.466+are provided by third parties.
   3.467+.PP
   3.468+The default preprocessor only handles
   3.469+.LR #define ,
   3.470+.LR #include ,
   3.471+.LR #undef ,
   3.472+.LR #ifdef ,
   3.473+.LR #line ,
   3.474+and
   3.475+.LR #ifndef .
   3.476+For a full ANSI preprocessor, use
   3.477+the
   3.478+.B p
   3.479+option.
   3.480+.PP
   3.481+The default search order for include files
   3.482+differs to that of
   3.483+.IR cpp (1).
   3.484+.PP
   3.485+Some features of C99, the 1999 ANSI C standard,
   3.486+are implemented.
   3.487+.PP
   3.488+.B switch
   3.489+expressions may not be either signedness of
   3.490+.B vlong
   3.491+on 32-bit architectures
   3.492+.RI ( 8c
   3.493+at least).
   3.494+.PP
   3.495+The implementation of
   3.496+.B vlong
   3.497+assignment can use a static location
   3.498+and this can be disturbed by interrupts
   3.499+(e.g., notes)
   3.500+.RI ( 8c
   3.501+at least).
     4.1new file mode 100755
     4.2--- /dev/null
     4.3+++ b/sys/man/1/2l
     4.4@@ -0,0 +1,220 @@
     4.5+.TH 2L 1 
     4.6+.SH NAME
     4.7+0l, 1l, 2l, 5l, 6l, 7l, 8l, kl, ql, vl \- loaders
     4.8+.SH SYNOPSIS
     4.9+.B 2l
    4.10+[
    4.11+.I option ...
    4.12+]
    4.13+[
    4.14+.I file ...
    4.15+]
    4.16+.br
    4.17+etc.
    4.18+.SH DESCRIPTION
    4.19+These commands
    4.20+load the named
    4.21+.I files
    4.22+into executable files for the corresponding architectures; see
    4.23+.IR 2c (1)
    4.24+for the correspondence between an architecture and the character
    4.25+.RB ( 1 ,
    4.26+.RB 2 ,
    4.27+etc.) that specifies it.
    4.28+The files should be object files or libraries (archives of object files)
    4.29+for the appropriate architecture.
    4.30+Also, a name like
    4.31+.BI -l ext
    4.32+represents the library
    4.33+.BI lib ext .a
    4.34+in
    4.35+.BR /$objtype/lib ,
    4.36+where
    4.37+.I objtype
    4.38+is one of
    4.39+.BR 68000 ,
    4.40+etc. as listed in
    4.41+.IR 2c (1).
    4.42+The libraries must have tables of contents
    4.43+(see
    4.44+.IR ar (1)).
    4.45+.PP
    4.46+In practice, 
    4.47+.B -l
    4.48+options are rarely necessary as the header files for
    4.49+the libraries cause their archives to be included automatically in the load
    4.50+(see
    4.51+.IR 2c (1)).
    4.52+For example, any program that includes header file
    4.53+.B libc.h
    4.54+causes the loader
    4.55+to search the C library
    4.56+.BR /$objtype/lib/libc.a .
    4.57+Also, the loader creates an undefined symbol
    4.58+.B _main
    4.59+(or
    4.60+.B _mainp
    4.61+if profiling is enabled) to force loading of the
    4.62+startup linkage from the C library.
    4.63+.PP
    4.64+The order of search to resolve undefined symbols is to load all files and libraries
    4.65+mentioned explicitly on the command line, and then to resolve remaining symbols
    4.66+by searching in topological order
    4.67+libraries mentioned in header files included by files already loaded.
    4.68+When scanning such libraries, the algorithm is to scan each library repeatedly until
    4.69+no new undefined symbols are picked up, then to start on the next library.  Thus if library
    4.70+.I A
    4.71+needs
    4.72+.I B
    4.73+which needs
    4.74+.I A
    4.75+again, it may be necessary to mention
    4.76+.I A
    4.77+explicitly so it will be read a second time.
    4.78+.PP
    4.79+The loader options are:
    4.80+.TP 0.75i
    4.81+.B -l
    4.82+(As a bare option.)
    4.83+Suppress the default loading of the startup linkage and libraries
    4.84+specified by header files.
    4.85+.TP
    4.86+.BI -o " out"
    4.87+Place output in file
    4.88+.IR out .
    4.89+Default is
    4.90+.IB O .out\f1,
    4.91+where
    4.92+.I O
    4.93+is the first letter of the loader name.
    4.94+.TP
    4.95+.B -p
    4.96+Insert profiling code into the executable output; no special action is needed
    4.97+during compilation or assembly.
    4.98+.TP
    4.99+.B -e
   4.100+Insert (\fLe\fPmbedded) tracing code into the executable output; no special action is needed
   4.101+during compilation or assembly.
   4.102+The added code calls
   4.103+.L _tracein
   4.104+at function entries
   4.105+and
   4.106+.L _traceout
   4.107+at function exits.
   4.108+.TP
   4.109+.B -s
   4.110+Strip the symbol tables from the output file.
   4.111+.TP
   4.112+.B -a
   4.113+Print the object code in assembly language, with addresses.
   4.114+.TP
   4.115+.B -v
   4.116+Print debugging output that annotates the activities of the load.
   4.117+.TP
   4.118+.BI -M
   4.119+.RI ( Kl
   4.120+only) Generate instructions rather than calls to emulation routines
   4.121+for multiply and divide.
   4.122+.TP
   4.123+.BI -E symbol
   4.124+The entry point for the binary is
   4.125+.I symbol
   4.126+(default
   4.127+.BR _main ;
   4.128+.B _mainp
   4.129+under
   4.130+.BR -p ).
   4.131+.TP
   4.132+.BI -x " [ file ]"
   4.133+Produce an export table in the executable.
   4.134+The optional
   4.135+.I file
   4.136+restricts the exported symbols to those listed in the file.
   4.137+See
   4.138+.IR dynld (2).
   4.139+.TP
   4.140+.BI -u " [ file ]"
   4.141+Produce an export table, import table
   4.142+and a dynamic load section in the executable.
   4.143+The optional
   4.144+.I file
   4.145+restricts the imported symbols to those listed in the file.
   4.146+See
   4.147+.IR dynld (2).
   4.148+.TP
   4.149+.B -t
   4.150+(\c
   4.151+.I 5l
   4.152+and
   4.153+.I vl
   4.154+only)
   4.155+Move strings into the text segment.
   4.156+.TP
   4.157+.BI -H n
   4.158+Executable header is type
   4.159+.IR n .
   4.160+The meaning of the types is architecture-dependent; typically
   4.161+type 1 is Plan 9 boot format and type 2 is the
   4.162+regular Plan 9 format, the default.  These are reversed on the MIPS.
   4.163+The Next boot format is 3.  Type 4 in
   4.164+.I vl
   4.165+creates a MIPS executable for an SGI Unix system.
   4.166+.TP
   4.167+.BI -T t
   4.168+The text segment starts at address
   4.169+.IR t .
   4.170+.TP
   4.171+.BI -D d
   4.172+The data segment starts at address
   4.173+.IR d .
   4.174+.TP
   4.175+.BI -R r
   4.176+The text segment is rounded to a multiple of
   4.177+.I r
   4.178+(if
   4.179+.I r
   4.180+is nonzero).
   4.181+.PP
   4.182+The numbers in the above options can begin with
   4.183+.L 0x
   4.184+or
   4.185+.L 0
   4.186+to change the default base from decimal to hexadecimal or octal.
   4.187+The defaults for the values depend on the compiler and the
   4.188+header type.
   4.189+.PP
   4.190+The loaded image has several symbols inserted by the loader:
   4.191+.B etext
   4.192+is the address of the end of the text segment;
   4.193+.B bdata
   4.194+is the address of the beginning of the data segment;
   4.195+.B edata
   4.196+is the address of the end of the data segment;
   4.197+and
   4.198+.B end
   4.199+is the address of the end of the bss segment, and of the program.
   4.200+.SH FILES
   4.201+.TF /$objtype/lib
   4.202+.TP
   4.203+.B /$objtype/lib
   4.204+for
   4.205+.BI -l lib
   4.206+arguments.
   4.207+.SH SOURCE
   4.208+.B /sys/src/cmd/2l
   4.209+etc.
   4.210+.SH "SEE ALSO"
   4.211+.IR 2c (1),
   4.212+.IR 2a (1),
   4.213+.IR ar (1),
   4.214+.IR nm (1),
   4.215+.IR db (1),
   4.216+.IR prof (1)
   4.217+.PP
   4.218+Rob Pike,
   4.219+``How to Use the Plan 9 C Compiler''
   4.220+.SH BUGS
   4.221+The list of loaders given above is only partial,
   4.222+not all architectures are supported on all systems,
   4.223+some have been retired and some
   4.224+are provided by third parties.
     5.1new file mode 100755
     5.2--- /dev/null
     5.3+++ b/sys/man/1/INDEX
     5.4@@ -0,0 +1,329 @@
     5.5+0intro 0intro
     5.6+intro 0intro
     5.7+0a 2a
     5.8+1a 2a
     5.9+2a 2a
    5.10+5a 2a
    5.11+6a 2a
    5.12+7a 2a
    5.13+8a 2a
    5.14+ka 2a
    5.15+qa 2a
    5.16+va 2a
    5.17+0c 2c
    5.18+1c 2c
    5.19+2c 2c
    5.20+5c 2c
    5.21+6c 2c
    5.22+7c 2c
    5.23+8c 2c
    5.24+kc 2c
    5.25+qc 2c
    5.26+vc 2c
    5.27+0l 2l
    5.28+1l 2l
    5.29+2l 2l
    5.30+5l 2l
    5.31+6l 2l
    5.32+7l 2l
    5.33+8l 2l
    5.34+kl 2l
    5.35+ql 2l
    5.36+vl 2l
    5.37+abaco abaco
    5.38+readweb abaco
    5.39+acid acid
    5.40+trump acid
    5.41+truss acid
    5.42+acme acme
    5.43+awd acme
    5.44+win acme
    5.45+ap ap
    5.46+ar ar
    5.47+ascii ascii
    5.48+unicode ascii
    5.49+awk awk
    5.50+basename basename
    5.51+bc bc
    5.52+bind bind
    5.53+mount bind
    5.54+unmount bind
    5.55+bitsyload bitsyload
    5.56+keyboard bitsyload
    5.57+light bitsyload
    5.58+params bitsyload
    5.59+pencal bitsyload
    5.60+prompter bitsyload
    5.61+bundle bundle
    5.62+cal cal
    5.63+calendar calendar
    5.64+cat cat
    5.65+read cat
    5.66+cb cb
    5.67+chgrp chgrp
    5.68+chmod chmod
    5.69+cleanname cleanname
    5.70+cmp cmp
    5.71+col col
    5.72+colors colors
    5.73+getmap colors
    5.74+comm comm
    5.75+con con
    5.76+hayes con
    5.77+rx con
    5.78+telnet con
    5.79+xmr con
    5.80+xms con
    5.81+cp cp
    5.82+fcp cp
    5.83+mv cp
    5.84+cpp cpp
    5.85+cpu cpu
    5.86+crop crop
    5.87+iconv crop
    5.88+clock date
    5.89+date date
    5.90+db db
    5.91+dc dc
    5.92+dd dd
    5.93+delkey delkey
    5.94+delatex deroff
    5.95+deroff deroff
    5.96+diff diff
    5.97+doc2ps doc2txt
    5.98+doc2txt doc2txt
    5.99+msexceltables doc2txt
   5.100+mswordstrings doc2txt
   5.101+olefs doc2txt
   5.102+wdoc2txt doc2txt
   5.103+xls2txt doc2txt
   5.104+doctype doctype
   5.105+du du
   5.106+echo echo
   5.107+ecp ecp
   5.108+ed ed
   5.109+emacs emacs
   5.110+eqn eqn
   5.111+at expect
   5.112+drain expect
   5.113+expect expect
   5.114+pass expect
   5.115+faces faces
   5.116+seemail faces
   5.117+vwhois faces
   5.118+factor factor
   5.119+primes factor
   5.120+fedex fedex
   5.121+ups fedex
   5.122+usps fedex
   5.123+file file
   5.124+deliver filter
   5.125+filter filter
   5.126+list filter
   5.127+token filter
   5.128+vf filter
   5.129+fmt fmt
   5.130+htmlfmt fmt
   5.131+fortune fortune
   5.132+freq freq
   5.133+4s games
   5.134+5s games
   5.135+games games
   5.136+juggle games
   5.137+life games
   5.138+mahjongg games
   5.139+memo games
   5.140+sokoban games
   5.141+sudoku games
   5.142+grap grap
   5.143+graph graph
   5.144+grep grep
   5.145+gs gs
   5.146+gview gview
   5.147+bunzip2 gzip
   5.148+bzip2 gzip
   5.149+compress gzip
   5.150+gunzip gzip
   5.151+gzip gzip
   5.152+uncompress gzip
   5.153+unzip gzip
   5.154+zip gzip
   5.155+hget hget
   5.156+history history
   5.157+hoc hoc
   5.158+htmlroff htmlroff
   5.159+idiff idiff
   5.160+join join
   5.161+bmp jpg
   5.162+gif jpg
   5.163+ico jpg
   5.164+jpg jpg
   5.165+png jpg
   5.166+ppm jpg
   5.167+togif jpg
   5.168+toico jpg
   5.169+topng jpg
   5.170+toppm jpg
   5.171+v210 jpg
   5.172+yuv jpg
   5.173+kbmap kbmap
   5.174+broke kill
   5.175+kill kill
   5.176+slay kill
   5.177+ktrace ktrace
   5.178+kmem leak
   5.179+leak leak
   5.180+umem leak
   5.181+lens lens
   5.182+lex lex
   5.183+lock lock
   5.184+look look
   5.185+lp lp
   5.186+lc ls
   5.187+ls ls
   5.188+go.fishing mail
   5.189+mail mail
   5.190+lookman man
   5.191+man man
   5.192+sig man
   5.193+marshal marshal
   5.194+mc mc
   5.195+membername mk
   5.196+mk mk
   5.197+mkdir mkdir
   5.198+ml mlmgr
   5.199+mlmgr mlmgr
   5.200+mlowner mlmgr
   5.201+mp3dec mp3dec
   5.202+mp3enc mp3enc
   5.203+html2ms ms2html
   5.204+ms2html ms2html
   5.205+mtime mtime
   5.206+mug mug
   5.207+nedmail nedmail
   5.208+netstat netstat
   5.209+news news
   5.210+nm nm
   5.211+ns ns
   5.212+p p
   5.213+page page
   5.214+netkey passwd
   5.215+passwd passwd
   5.216+patch patch
   5.217+pcc pcc
   5.218+pic pic
   5.219+tpic pic
   5.220+pipefile pipefile
   5.221+plot plot
   5.222+plumb plumb
   5.223+pr pr
   5.224+kprof prof
   5.225+prof prof
   5.226+tprof prof
   5.227+proof proof
   5.228+ps ps
   5.229+psu ps
   5.230+pdf2ps ps2pdf
   5.231+ps2pdf ps2pdf
   5.232+pump pump
   5.233+pbd pwd
   5.234+pwd pwd
   5.235+. rc
   5.236+cd rc
   5.237+eval rc
   5.238+exec rc
   5.239+exit rc
   5.240+flag rc
   5.241+rc rc
   5.242+rfork rc
   5.243+shift rc
   5.244+wait rc
   5.245+whatis rc
   5.246+~ rc
   5.247+changes replica
   5.248+pull replica
   5.249+push replica
   5.250+replica replica
   5.251+scan replica
   5.252+resample resample
   5.253+label rio
   5.254+rio rio
   5.255+window rio
   5.256+wloc rio
   5.257+rm rm
   5.258+conswdir rwd
   5.259+rwd rwd
   5.260+B sam
   5.261+sam sam
   5.262+sam.save sam
   5.263+samterm sam
   5.264+aescbc secstore
   5.265+ipso secstore
   5.266+secstore secstore
   5.267+sed sed
   5.268+seq seq
   5.269+size size
   5.270+sleep sleep
   5.271+sort sort
   5.272+spell spell
   5.273+sprog spell
   5.274+spin spin
   5.275+split split
   5.276+src src
   5.277+scp ssh
   5.278+ssh ssh
   5.279+sshnet ssh
   5.280+sshserve ssh
   5.281+start stop
   5.282+stop stop
   5.283+strings strings
   5.284+strip strip
   5.285+md5sum sum
   5.286+sha1sum sum
   5.287+sum sum
   5.288+syscall syscall
   5.289+tail tail
   5.290+dircp tar
   5.291+tar tar
   5.292+tbl tbl
   5.293+tcs tcs
   5.294+tee tee
   5.295+iwhois tel
   5.296+tel tel
   5.297+test test
   5.298+thesaurus thesaurus
   5.299+time time
   5.300+touch touch
   5.301+tr tr
   5.302+trace trace
   5.303+dpost troff
   5.304+nroff troff
   5.305+troff troff
   5.306+troff2html troff2html
   5.307+tweak tweak
   5.308+uniq uniq
   5.309+units units
   5.310+uptime uptime
   5.311+unvac vac
   5.312+vac vac
   5.313+copy venti
   5.314+read venti
   5.315+venti venti
   5.316+write venti
   5.317+5i vi
   5.318+ki vi
   5.319+qi vi
   5.320+vi vi
   5.321+vnc vnc
   5.322+vncs vnc
   5.323+vncv vnc
   5.324+vt vt
   5.325+wc wc
   5.326+weather weather
   5.327+who who
   5.328+whois who
   5.329+winwatch winwatch
   5.330+xd xd
   5.331+yacc yacc
   5.332+diffy yesterday
   5.333+yesterday yesterday
     6.1new file mode 100755
     6.2--- /dev/null
     6.3+++ b/sys/man/1/INDEX.html
     6.4@@ -0,0 +1,665 @@
     6.5+<HEAD>
     6.6+<TITLE>plan 9 man section 1</TITLE>
     6.7+</HEAD>
     6.8+<BODY>
     6.9+<B>[<A HREF="/sys/man/index.html">manual index</A>]</B>
    6.10+<H2>Plan 9 from Bell Labs - Section 1 - Commands</H2>
    6.11+<HR>
    6.12+<DL>
    6.13+<DT><A HREF="/magic/man2html/1/0intro">0intro</A>
    6.14+-  introduction to Plan 9
    6.15+<DD><TT> intro</TT>
    6.16+</DT>
    6.17+<DT><A HREF="/magic/man2html/1/2a">2a</A>
    6.18+-  assemblers
    6.19+<DD><TT> 0a, 1a, 2a, 5a, 6a, 7a, 8a, ka, qa, va</TT>
    6.20+</DT>
    6.21+<DT><A HREF="/magic/man2html/1/2c">2c</A>
    6.22+-  C compilers
    6.23+<DD><TT> 0c, 1c, 2c, 5c, 6c, 7c, 8c, kc, qc, vc</TT>
    6.24+</DT>
    6.25+<DT><A HREF="/magic/man2html/1/2l">2l</A>
    6.26+-  loaders
    6.27+<DD><TT> 0l, 1l, 2l, 5l, 6l, 7l, 8l, kl, ql, vl</TT>
    6.28+</DT>
    6.29+<DT><A HREF="/magic/man2html/1/abaco">abaco</A>
    6.30+-  browse the World-Wide Web
    6.31+<DD><TT> abaco, readweb</TT>
    6.32+</DT>
    6.33+<DT><A HREF="/magic/man2html/1/acid">acid</A>
    6.34+-  debugger
    6.35+<DD><TT> acid, truss, trump</TT>
    6.36+</DT>
    6.37+<DT><A HREF="/magic/man2html/1/acme">acme</A>
    6.38+-  interactive text windows
    6.39+<DD><TT> acme, win, awd</TT>
    6.40+</DT>
    6.41+<DT><A HREF="/magic/man2html/1/ar">ar</A>
    6.42+-  archive and library maintainer
    6.43+<DD><TT> ar</TT>
    6.44+</DT>
    6.45+<DT><A HREF="/magic/man2html/1/ascii">ascii</A>
    6.46+-  interpret ASCII, Unicode characters
    6.47+<DD><TT> ascii, unicode</TT>
    6.48+</DT>
    6.49+<DT><A HREF="/magic/man2html/1/awk">awk</A>
    6.50+-  pattern-directed scanning and processing language
    6.51+<DD><TT> awk</TT>
    6.52+</DT>
    6.53+<DT><A HREF="/magic/man2html/1/basename">basename</A>
    6.54+-  strip file name affixes
    6.55+<DD><TT> basename</TT>
    6.56+</DT>
    6.57+<DT><A HREF="/magic/man2html/1/bc">bc</A>
    6.58+-  arbitrary-precision arithmetic language
    6.59+<DD><TT> bc</TT>
    6.60+</DT>
    6.61+<DT><A HREF="/magic/man2html/1/bind">bind</A>
    6.62+-  change name space
    6.63+<DD><TT> bind, mount, unmount</TT>
    6.64+</DT>
    6.65+<DT><A HREF="/magic/man2html/1/bitsyload">bitsyload</A>
    6.66+-  bitsy-specific utilities
    6.67+<DD><TT> bitsyload, light, pencal, keyboard, params, prompter</TT>
    6.68+</DT>
    6.69+<DT><A HREF="/magic/man2html/1/bundle">bundle</A>
    6.70+-  collect files for distribution
    6.71+<DD><TT> bundle</TT>
    6.72+</DT>
    6.73+<DT><A HREF="/magic/man2html/1/cal">cal</A>
    6.74+-  print calendar
    6.75+<DD><TT> cal</TT>
    6.76+</DT>
    6.77+<DT><A HREF="/magic/man2html/1/calendar">calendar</A>
    6.78+-  print upcoming events
    6.79+<DD><TT> calendar</TT>
    6.80+</DT>
    6.81+<DT><A HREF="/magic/man2html/1/cat">cat</A>
    6.82+-  catenate files
    6.83+<DD><TT> cat, read</TT>
    6.84+</DT>
    6.85+<DT><A HREF="/magic/man2html/1/cb">cb</A>
    6.86+-  C program beautifier
    6.87+<DD><TT> cb</TT>
    6.88+</DT>
    6.89+<DT><A HREF="/magic/man2html/1/chgrp">chgrp</A>
    6.90+-  change file group
    6.91+<DD><TT> chgrp</TT>
    6.92+</DT>
    6.93+<DT><A HREF="/magic/man2html/1/chmod">chmod</A>
    6.94+-  change mode
    6.95+<DD><TT> chmod</TT>
    6.96+</DT>
    6.97+<DT><A HREF="/magic/man2html/1/cleanname">cleanname</A>
    6.98+-  clean a path name
    6.99+<DD><TT> cleanname</TT>
   6.100+</DT>
   6.101+<DT><A HREF="/magic/man2html/1/cmp">cmp</A>
   6.102+-  compare two files
   6.103+<DD><TT> cmp</TT>
   6.104+</DT>
   6.105+<DT><A HREF="/magic/man2html/1/col">col</A>
   6.106+-  column alignment
   6.107+<DD><TT> col</TT>
   6.108+</DT>
   6.109+<DT><A HREF="/magic/man2html/1/colors">colors</A>
   6.110+-  display color map
   6.111+<DD><TT> getmap, colors</TT>
   6.112+</DT>
   6.113+<DT><A HREF="/magic/man2html/1/comm">comm</A>
   6.114+-  select or reject lines common to two sorted files
   6.115+<DD><TT> comm</TT>
   6.116+</DT>
   6.117+<DT><A HREF="/magic/man2html/1/con">con</A>
   6.118+-  remote login, execution, and XMODEM file transfer
   6.119+<DD><TT> con, telnet, rx, hayes, xms, xmr</TT>
   6.120+</DT>
   6.121+<DT><A HREF="/magic/man2html/1/cp">cp</A>
   6.122+-  copy, move files
   6.123+<DD><TT> cp, fcp, mv</TT>
   6.124+</DT>
   6.125+<DT><A HREF="/magic/man2html/1/cpp">cpp</A>
   6.126+-  C language preprocessor
   6.127+<DD><TT> cpp</TT>
   6.128+</DT>
   6.129+<DT><A HREF="/magic/man2html/1/cpu">cpu</A>
   6.130+-  connection to CPU server
   6.131+<DD><TT> cpu</TT>
   6.132+</DT>
   6.133+<DT><A HREF="/magic/man2html/1/crop">crop</A>
   6.134+-  frame, crop, and convert image
   6.135+<DD><TT> crop, iconv</TT>
   6.136+</DT>
   6.137+<DT><A HREF="/magic/man2html/1/date">date</A>
   6.138+-  date and time
   6.139+<DD><TT> date, clock</TT>
   6.140+</DT>
   6.141+<DT><A HREF="/magic/man2html/1/db">db</A>
   6.142+-  debugger
   6.143+<DD><TT> db</TT>
   6.144+</DT>
   6.145+<DT><A HREF="/magic/man2html/1/dc">dc</A>
   6.146+-  desk calculator
   6.147+<DD><TT> dc</TT>
   6.148+</DT>
   6.149+<DT><A HREF="/magic/man2html/1/dd">dd</A>
   6.150+-  convert and copy a file
   6.151+<DD><TT> dd</TT>
   6.152+</DT>
   6.153+<DT><A HREF="/magic/man2html/1/delkey">delkey</A>
   6.154+-  delete keys from factotum
   6.155+<DD><TT> delkey</TT>
   6.156+</DT>
   6.157+<DT><A HREF="/magic/man2html/1/deroff">deroff</A>
   6.158+-  remove formatting requests
   6.159+<DD><TT> deroff, delatex</TT>
   6.160+</DT>
   6.161+<DT><A HREF="/magic/man2html/1/diff">diff</A>
   6.162+-  differential file comparator
   6.163+<DD><TT> diff</TT>
   6.164+</DT>
   6.165+<DT><A HREF="/magic/man2html/1/doc2txt">doc2txt</A>
   6.166+-  extract printable text from Microsoft documents
   6.167+<DD><TT> doc2txt, doc2ps, wdoc2txt, xls2txt, olefs, mswordstrings, msexceltables</TT>
   6.168+</DT>
   6.169+<DT><A HREF="/magic/man2html/1/doctype">doctype</A>
   6.170+-  intuit command line for formatting a document
   6.171+<DD><TT> doctype</TT>
   6.172+</DT>
   6.173+<DT><A HREF="/magic/man2html/1/du">du</A>
   6.174+-  disk usage
   6.175+<DD><TT> du</TT>
   6.176+</DT>
   6.177+<DT><A HREF="/magic/man2html/1/echo">echo</A>
   6.178+-  print arguments
   6.179+<DD><TT> echo</TT>
   6.180+</DT>
   6.181+<DT><A HREF="/magic/man2html/1/ecp">ecp</A>
   6.182+-  fast copy, handling errors
   6.183+<DD><TT> ecp</TT>
   6.184+</DT>
   6.185+<DT><A HREF="/magic/man2html/1/ed">ed</A>
   6.186+-  text editor
   6.187+<DD><TT> ed</TT>
   6.188+</DT>
   6.189+<DT><A HREF="/magic/man2html/1/emacs">emacs</A>
   6.190+-  editor macros
   6.191+<DD><TT> emacs</TT>
   6.192+</DT>
   6.193+<DT><A HREF="/magic/man2html/1/eqn">eqn</A>
   6.194+-  typeset mathematics
   6.195+<DD><TT> eqn</TT>
   6.196+</DT>
   6.197+<DT><A HREF="/magic/man2html/1/expect">expect</A>
   6.198+-  dialer scripting tools
   6.199+<DD><TT> at, drain, expect, pass</TT>
   6.200+</DT>
   6.201+<DT><A HREF="/magic/man2html/1/faces">faces</A>
   6.202+-  mailbox interface
   6.203+<DD><TT> faces, seemail, vwhois</TT>
   6.204+</DT>
   6.205+<DT><A HREF="/magic/man2html/1/factor">factor</A>
   6.206+-  factor a number, generate large primes
   6.207+<DD><TT> factor, primes</TT>
   6.208+</DT>
   6.209+<DT><A HREF="/magic/man2html/1/fedex">fedex</A>
   6.210+-  track shipments
   6.211+<DD><TT> fedex, ups, usps</TT>
   6.212+</DT>
   6.213+<DT><A HREF="/magic/man2html/1/file">file</A>
   6.214+-  determine file type
   6.215+<DD><TT> file</TT>
   6.216+</DT>
   6.217+<DT><A HREF="/magic/man2html/1/filter">filter</A>
   6.218+-  filtering mail
   6.219+<DD><TT> filter, list, deliver, token, vf</TT>
   6.220+</DT>
   6.221+<DT><A HREF="/magic/man2html/1/fmt">fmt</A>
   6.222+-  simple text formatters
   6.223+<DD><TT> fmt, htmlfmt</TT>
   6.224+</DT>
   6.225+<DT><A HREF="/magic/man2html/1/fortune">fortune</A>
   6.226+-  sample lines from a file
   6.227+<DD><TT> fortune</TT>
   6.228+</DT>
   6.229+<DT><A HREF="/magic/man2html/1/freq">freq</A>
   6.230+-  print histogram of character frequencies
   6.231+<DD><TT> freq</TT>
   6.232+</DT>
   6.233+<DT><A HREF="/magic/man2html/1/grap">grap</A>
   6.234+-  pic preprocessor for drawing graphs
   6.235+<DD><TT> grap</TT>
   6.236+</DT>
   6.237+<DT><A HREF="/magic/man2html/1/graph">graph</A>
   6.238+-  draw a graph
   6.239+<DD><TT> graph</TT>
   6.240+</DT>
   6.241+<DT><A HREF="/magic/man2html/1/grep">grep</A>
   6.242+-  search a file for a pattern
   6.243+<DD><TT> grep</TT>
   6.244+</DT>
   6.245+<DT><A HREF="/magic/man2html/1/gs">gs</A>
   6.246+-  Aladdin Ghostscript (PostScript and PDF language interpreter)
   6.247+<DD><TT> gs</TT>
   6.248+</DT>
   6.249+<DT><A HREF="/magic/man2html/1/gview">gview</A>
   6.250+-  interactive graph viewer
   6.251+<DD><TT> gview</TT>
   6.252+</DT>
   6.253+<DT><A HREF="/magic/man2html/1/gzip">gzip</A>
   6.254+-  compress and expand data
   6.255+<DD><TT> gzip, gunzip, bzip2, bunzip2, compress, uncompress, zip, unzip</TT>
   6.256+</DT>
   6.257+<DT><A HREF="/magic/man2html/1/hget">hget</A>
   6.258+-  retrieve a web page corresponding to a url
   6.259+<DD><TT> hget</TT>
   6.260+</DT>
   6.261+<DT><A HREF="/magic/man2html/1/history">history</A>
   6.262+-  print file names from the dump
   6.263+<DD><TT> history</TT>
   6.264+</DT>
   6.265+<DT><A HREF="/magic/man2html/1/hoc">hoc</A>
   6.266+-  interactive floating point language
   6.267+<DD><TT> hoc</TT>
   6.268+</DT>
   6.269+<DT><A HREF="/magic/man2html/1/htmlroff">htmlroff</A>
   6.270+-  HTML formatting and typesetting
   6.271+<DD><TT> htmlroff</TT>
   6.272+</DT>
   6.273+<DT><A HREF="/magic/man2html/1/idiff">idiff</A>
   6.274+-  interactive diff
   6.275+<DD><TT> idiff</TT>
   6.276+</DT>
   6.277+<DT><A HREF="/magic/man2html/1/join">join</A>
   6.278+-  relational database operator
   6.279+<DD><TT> join</TT>
   6.280+</DT>
   6.281+<DT><A HREF="/magic/man2html/1/jpg">jpg</A>
   6.282+-  view and convert pictures
   6.283+<DD><TT> jpg, gif, png, ppm, bmp, v210, yuv, ico, togif, toppm, topng, toico</TT>
   6.284+</DT>
   6.285+<DT><A HREF="/magic/man2html/1/kbmap">kbmap</A>
   6.286+-  show a list of available keyboard maps and switch between them.
   6.287+<DD><TT> kbmap</TT>
   6.288+</DT>
   6.289+<DT><A HREF="/magic/man2html/1/kill">kill</A>
   6.290+-  print commands to kill processes
   6.291+<DD><TT> kill, slay, broke</TT>
   6.292+</DT>
   6.293+<DT><A HREF="/magic/man2html/1/ktrace">ktrace</A>
   6.294+-  interpret kernel stack dumps
   6.295+<DD><TT> ktrace</TT>
   6.296+</DT>
   6.297+<DT><A HREF="/magic/man2html/1/leak">leak</A>
   6.298+-  help find memory leaks
   6.299+<DD><TT> leak, kmem, umem</TT>
   6.300+</DT>
   6.301+<DT><A HREF="/magic/man2html/1/lens">lens</A>
   6.302+-  interactive screen magnifier
   6.303+<DD><TT> lens</TT>
   6.304+</DT>
   6.305+<DT><A HREF="/magic/man2html/1/lex">lex</A>
   6.306+-  generator of lexical analysis programs
   6.307+<DD><TT> lex</TT>
   6.308+</DT>
   6.309+<DT><A HREF="/magic/man2html/1/lock">lock</A>
   6.310+-  run a command under lock
   6.311+<DD><TT> lock</TT>
   6.312+</DT>
   6.313+<DT><A HREF="/magic/man2html/1/look">look</A>
   6.314+-  find lines in a sorted list
   6.315+<DD><TT> look</TT>
   6.316+</DT>
   6.317+<DT><A HREF="/magic/man2html/1/lp">lp</A>
   6.318+-  printer output
   6.319+<DD><TT> lp</TT>
   6.320+</DT>
   6.321+<DT><A HREF="/magic/man2html/1/ls">ls</A>
   6.322+-  list contents of directory
   6.323+<DD><TT> ls, lc</TT>
   6.324+</DT>
   6.325+<DT><A HREF="/magic/man2html/1/mail">mail</A>
   6.326+-  mail and mailboxes
   6.327+<DD><TT> mail, go.fishing</TT>
   6.328+</DT>
   6.329+<DT><A HREF="/magic/man2html/1/man">man</A>
   6.330+-  print or find pages of this manual
   6.331+<DD><TT> man, lookman, sig</TT>
   6.332+</DT>
   6.333+<DT><A HREF="/magic/man2html/1/marshal">marshal</A>
   6.334+-  formatting and sending mail
   6.335+<DD><TT> marshal</TT>
   6.336+</DT>
   6.337+<DT><A HREF="/magic/man2html/1/mc">mc</A>
   6.338+-  multicolumn print
   6.339+<DD><TT> mc</TT>
   6.340+</DT>
   6.341+<DT><A HREF="/magic/man2html/1/mk">mk</A>
   6.342+-  maintain (make) related files
   6.343+<DD><TT> mk, membername</TT>
   6.344+</DT>
   6.345+<DT><A HREF="/magic/man2html/1/mkdir">mkdir</A>
   6.346+-  make a directory
   6.347+<DD><TT> mkdir</TT>
   6.348+</DT>
   6.349+<DT><A HREF="/magic/man2html/1/mlmgr">mlmgr</A>
   6.350+-  unmoderated mailing lists
   6.351+<DD><TT> ml, mlmgr, mlowner</TT>
   6.352+</DT>
   6.353+<DT><A HREF="/magic/man2html/1/mp3dec">mp3dec</A>
   6.354+-  decode audio MPEG files (layers 1, 2 and 3)
   6.355+<DD><TT> mp3dec</TT>
   6.356+</DT>
   6.357+<DT><A HREF="/magic/man2html/1/mp3enc">mp3enc</A>
   6.358+-  create mp3 audio files
   6.359+<DD><TT> mp3enc</TT>
   6.360+</DT>
   6.361+<DT><A HREF="/magic/man2html/1/ms2html">ms2html</A>
   6.362+-  convert between troff's ms macros and html
   6.363+<DD><TT> ms2html, html2ms</TT>
   6.364+</DT>
   6.365+<DT><A HREF="/magic/man2html/1/mtime">mtime</A>
   6.366+-  print file modification time
   6.367+<DD><TT> mtime</TT>
   6.368+</DT>
   6.369+<DT><A HREF="/magic/man2html/1/mug">mug</A>
   6.370+-  convert an image to a face icon
   6.371+<DD><TT> mug</TT>
   6.372+</DT>
   6.373+<DT><A HREF="/magic/man2html/1/nedmail">nedmail</A>
   6.374+-  reading mail
   6.375+<DD><TT> nedmail</TT>
   6.376+</DT>
   6.377+<DT><A HREF="/magic/man2html/1/netstat">netstat</A>
   6.378+-  summarize network connections
   6.379+<DD><TT> netstat</TT>
   6.380+</DT>
   6.381+<DT><A HREF="/magic/man2html/1/news">news</A>
   6.382+-  print news items
   6.383+<DD><TT> news</TT>
   6.384+</DT>
   6.385+<DT><A HREF="/magic/man2html/1/nm">nm</A>
   6.386+-  name list (symbol table)
   6.387+<DD><TT> nm</TT>
   6.388+</DT>
   6.389+<DT><A HREF="/magic/man2html/1/ns">ns</A>
   6.390+-  display name space
   6.391+<DD><TT> ns</TT>
   6.392+</DT>
   6.393+<DT><A HREF="/magic/man2html/1/p">p</A>
   6.394+-  paginate
   6.395+<DD><TT> p</TT>
   6.396+</DT>
   6.397+<DT><A HREF="/magic/man2html/1/page">page</A>
   6.398+-  view FAX, image, graphic, PostScript, PDF, and typesetter output files
   6.399+<DD><TT> page</TT>
   6.400+</DT>
   6.401+<DT><A HREF="/magic/man2html/1/passwd">passwd</A>
   6.402+-  change or verify user password
   6.403+<DD><TT> passwd, netkey</TT>
   6.404+</DT>
   6.405+<DT><A HREF="/magic/man2html/1/patch">patch</A>
   6.406+-  simple patch creation and tracking system
   6.407+<DD><TT> patch</TT>
   6.408+</DT>
   6.409+<DT><A HREF="/magic/man2html/1/pcc">pcc</A>
   6.410+-  APE C compiler driver
   6.411+<DD><TT> pcc</TT>
   6.412+</DT>
   6.413+<DT><A HREF="/magic/man2html/1/pic">pic</A>
   6.414+-  troff and tex preprocessors for drawing pictures
   6.415+<DD><TT> pic, tpic</TT>
   6.416+</DT>
   6.417+<DT><A HREF="/magic/man2html/1/pipefile">pipefile</A>
   6.418+-  attach filter to file in name space
   6.419+<DD><TT> pipefile</TT>
   6.420+</DT>
   6.421+<DT><A HREF="/magic/man2html/1/plot">plot</A>
   6.422+-  graphics filter
   6.423+<DD><TT> plot</TT>
   6.424+</DT>
   6.425+<DT><A HREF="/magic/man2html/1/plumb">plumb</A>
   6.426+-  send message to plumber
   6.427+<DD><TT> plumb</TT>
   6.428+</DT>
   6.429+<DT><A HREF="/magic/man2html/1/pr">pr</A>
   6.430+-  print file
   6.431+<DD><TT> pr</TT>
   6.432+</DT>
   6.433+<DT><A HREF="/magic/man2html/1/prof">prof</A>
   6.434+-  display profiling data
   6.435+<DD><TT> prof, tprof, kprof</TT>
   6.436+</DT>
   6.437+<DT><A HREF="/magic/man2html/1/proof">proof</A>
   6.438+-  troff output interpreter
   6.439+<DD><TT> proof</TT>
   6.440+</DT>
   6.441+<DT><A HREF="/magic/man2html/1/ps">ps</A>
   6.442+-  process status
   6.443+<DD><TT> ps, psu</TT>
   6.444+</DT>
   6.445+<DT><A HREF="/magic/man2html/1/ps2pdf">ps2pdf</A>
   6.446+-  convert between PostScript and PDF
   6.447+<DD><TT> ps2pdf, pdf2ps</TT>
   6.448+</DT>
   6.449+<DT><A HREF="/magic/man2html/1/pump">pump</A>
   6.450+-  copy asynchronously via a large circular buffer
   6.451+<DD><TT> pump</TT>
   6.452+</DT>
   6.453+<DT><A HREF="/magic/man2html/1/pwd">pwd</A>
   6.454+-  working directory
   6.455+<DD><TT> pwd, pbd</TT>
   6.456+</DT>
   6.457+<DT><A HREF="/magic/man2html/1/rc">rc</A>
   6.458+-  command language
   6.459+<DD><TT> rc, cd, eval, exec, exit, flag, rfork, shift, wait, whatis, ., ~</TT>
   6.460+</DT>
   6.461+<DT><A HREF="/magic/man2html/1/replica">replica</A>
   6.462+-  client-server replica management
   6.463+<DD><TT> changes, pull, push, scan</TT>
   6.464+</DT>
   6.465+<DT><A HREF="/magic/man2html/1/resample">resample</A>
   6.466+-  resample a picture
   6.467+<DD><TT> resample</TT>
   6.468+</DT>
   6.469+<DT><A HREF="/magic/man2html/1/rio">rio</A>
   6.470+-  window system
   6.471+<DD><TT> rio, label, window, wloc</TT>
   6.472+</DT>
   6.473+<DT><A HREF="/magic/man2html/1/rm">rm</A>
   6.474+-  remove files
   6.475+<DD><TT> rm</TT>
   6.476+</DT>
   6.477+<DT><A HREF="/magic/man2html/1/rwd">rwd</A>
   6.478+-  maintain remote working directory
   6.479+<DD><TT> rwd, conswdir</TT>
   6.480+</DT>
   6.481+<DT><A HREF="/magic/man2html/1/sam">sam</A>
   6.482+-  screen editor with structural regular expressions
   6.483+<DD><TT> sam, B, sam.save, samterm</TT>
   6.484+</DT>
   6.485+<DT><A HREF="/magic/man2html/1/secstore">secstore</A>
   6.486+-  secstore commands
   6.487+<DD><TT> aescbc, ipso, secstore</TT>
   6.488+</DT>
   6.489+<DT><A HREF="/magic/man2html/1/sed">sed</A>
   6.490+-  stream editor
   6.491+<DD><TT> sed</TT>
   6.492+</DT>
   6.493+<DT><A HREF="/magic/man2html/1/seq">seq</A>
   6.494+-  print sequences of numbers
   6.495+<DD><TT> seq</TT>
   6.496+</DT>
   6.497+<DT><A HREF="/magic/man2html/1/size">size</A>
   6.498+-  print size of executable files
   6.499+<DD><TT> size</TT>
   6.500+</DT>
   6.501+<DT><A HREF="/magic/man2html/1/sleep">sleep</A>
   6.502+-  suspend execution for an interval
   6.503+<DD><TT> sleep</TT>
   6.504+</DT>
   6.505+<DT><A HREF="/magic/man2html/1/sort">sort</A>
   6.506+-  sort and/or merge files
   6.507+<DD><TT> sort</TT>
   6.508+</DT>
   6.509+<DT><A HREF="/magic/man2html/1/spell">spell</A>
   6.510+-  find spelling errors
   6.511+<DD><TT> spell, sprog</TT>
   6.512+</DT>
   6.513+<DT><A HREF="/magic/man2html/1/spin">spin</A>
   6.514+-  verification tool for models of concurrent systems
   6.515+<DD><TT> spin</TT>
   6.516+</DT>
   6.517+<DT><A HREF="/magic/man2html/1/split">split</A>
   6.518+-  split a file into pieces
   6.519+<DD><TT> split</TT>
   6.520+</DT>
   6.521+<DT><A HREF="/magic/man2html/1/src">src</A>
   6.522+-  find source code for executable
   6.523+<DD><TT> src</TT>
   6.524+</DT>
   6.525+<DT><A HREF="/magic/man2html/1/ssh">ssh</A>
   6.526+-  secure login and file copy from/to Unix or Plan 9
   6.527+<DD><TT> ssh, sshnet, scp, sshserve</TT>
   6.528+</DT>
   6.529+<DT><A HREF="/magic/man2html/1/stop">stop</A>
   6.530+-  print commands to stop and start processes
   6.531+<DD><TT> stop, start</TT>
   6.532+</DT>
   6.533+<DT><A HREF="/magic/man2html/1/strings">strings</A>
   6.534+-  extract printable strings
   6.535+<DD><TT> strings</TT>
   6.536+</DT>
   6.537+<DT><A HREF="/magic/man2html/1/strip">strip</A>
   6.538+-  remove symbols from binary files
   6.539+<DD><TT> strip</TT>
   6.540+</DT>
   6.541+<DT><A HREF="/magic/man2html/1/sum">sum</A>
   6.542+-  sum and count blocks in a file
   6.543+<DD><TT> sum, md5sum, sha1sum</TT>
   6.544+</DT>
   6.545+<DT><A HREF="/magic/man2html/1/syscall">syscall</A>
   6.546+-  test a system call
   6.547+<DD><TT> syscall</TT>
   6.548+</DT>
   6.549+<DT><A HREF="/magic/man2html/1/tail">tail</A>
   6.550+-  deliver the last part of a file
   6.551+<DD><TT> tail</TT>
   6.552+</DT>
   6.553+<DT><A HREF="/magic/man2html/1/tar">tar</A>
   6.554+-  archiver
   6.555+<DD><TT> tar, dircp</TT>
   6.556+</DT>
   6.557+<DT><A HREF="/magic/man2html/1/tbl">tbl</A>
   6.558+-  format tables for nroff or troff
   6.559+<DD><TT> tbl</TT>
   6.560+</DT>
   6.561+<DT><A HREF="/magic/man2html/1/tcs">tcs</A>
   6.562+-  translate character sets
   6.563+<DD><TT> tcs</TT>
   6.564+</DT>
   6.565+<DT><A HREF="/magic/man2html/1/tee">tee</A>
   6.566+-  pipe fitting
   6.567+<DD><TT> tee</TT>
   6.568+</DT>
   6.569+<DT><A HREF="/magic/man2html/1/tel">tel</A>
   6.570+-  look in phone book
   6.571+<DD><TT> tel, iwhois</TT>
   6.572+</DT>
   6.573+<DT><A HREF="/magic/man2html/1/test">test</A>
   6.574+-  set status according to condition
   6.575+<DD><TT> test</TT>
   6.576+</DT>
   6.577+<DT><A HREF="/magic/man2html/1/thesaurus">thesaurus</A>
   6.578+-  search online thesaurus
   6.579+<DD><TT> thesaurus</TT>
   6.580+</DT>
   6.581+<DT><A HREF="/magic/man2html/1/time">time</A>
   6.582+-  time a command
   6.583+<DD><TT> time</TT>
   6.584+</DT>
   6.585+<DT><A HREF="/magic/man2html/1/touch">touch</A>
   6.586+-  set modification date of a file
   6.587+<DD><TT> touch</TT>
   6.588+</DT>
   6.589+<DT><A HREF="/magic/man2html/1/tr">tr</A>
   6.590+-  translate characters
   6.591+<DD><TT> tr</TT>
   6.592+</DT>
   6.593+<DT><A HREF="/magic/man2html/1/trace">trace</A>
   6.594+-  show (real-time) process behavior
   6.595+<DD><TT> trace</TT>
   6.596+</DT>
   6.597+<DT><A HREF="/magic/man2html/1/troff">troff</A>
   6.598+-  text formatting and typesetting
   6.599+<DD><TT> troff, nroff, dpost</TT>
   6.600+</DT>
   6.601+<DT><A HREF="/magic/man2html/1/troff2html">troff2html</A>
   6.602+-  convert troff output into HTML
   6.603+<DD><TT> troff2html</TT>
   6.604+</DT>
   6.605+<DT><A HREF="/magic/man2html/1/tweak">tweak</A>
   6.606+-  edit image files, subfont files, face files, etc.
   6.607+<DD><TT> tweak</TT>
   6.608+</DT>
   6.609+<DT><A HREF="/magic/man2html/1/uniq">uniq</A>
   6.610+-  report repeated lines in a file
   6.611+<DD><TT> uniq</TT>
   6.612+</DT>
   6.613+<DT><A HREF="/magic/man2html/1/units">units</A>
   6.614+-  conversion program
   6.615+<DD><TT> units</TT>
   6.616+</DT>
   6.617+<DT><A HREF="/magic/man2html/1/uptime">uptime</A>
   6.618+-  show how long the system has been running
   6.619+<DD><TT> uptime</TT>
   6.620+</DT>
   6.621+<DT><A HREF="/magic/man2html/1/vac">vac</A>
   6.622+-  create, extract a vac archive on Venti
   6.623+<DD><TT> vac, unvac</TT>
   6.624+</DT>
   6.625+<DT><A HREF="/magic/man2html/1/venti">venti</A>
   6.626+-  simple Venti clients
   6.627+<DD><TT> read, write, copy</TT>
   6.628+</DT>
   6.629+<DT><A HREF="/magic/man2html/1/vi">vi</A>
   6.630+-  instruction simulators
   6.631+<DD><TT> 5i, ki, vi, qi</TT>
   6.632+</DT>
   6.633+<DT><A HREF="/magic/man2html/1/vnc">vnc</A>
   6.634+-  remote frame buffer server and viewer for Virtual Network Computing (VNC)
   6.635+<DD><TT> vncs, vncv</TT>
   6.636+</DT>
   6.637+<DT><A HREF="/magic/man2html/1/vt">vt</A>
   6.638+-  emulate a VT-100 or VT-220 terminal
   6.639+<DD><TT> vt</TT>
   6.640+</DT>
   6.641+<DT><A HREF="/magic/man2html/1/wc">wc</A>
   6.642+-  word count
   6.643+<DD><TT> wc</TT>
   6.644+</DT>
   6.645+<DT><A HREF="/magic/man2html/1/weather">weather</A>
   6.646+-  print weather report
   6.647+<DD><TT> weather</TT>
   6.648+</DT>
   6.649+<DT><A HREF="/magic/man2html/1/who">who</A>
   6.650+-  who is using the machine
   6.651+<DD><TT> who, whois</TT>
   6.652+</DT>
   6.653+<DT><A HREF="/magic/man2html/1/winwatch">winwatch</A>
   6.654+-  monitor rio windows
   6.655+<DD><TT> winwatch</TT>
   6.656+</DT>
   6.657+<DT><A HREF="/magic/man2html/1/xd">xd</A>
   6.658+-  hex, octal, decimal, or ASCII dump
   6.659+<DD><TT> xd</TT>
   6.660+</DT>
   6.661+<DT><A HREF="/magic/man2html/1/yacc">yacc</A>
   6.662+-  yet another compiler-compiler
   6.663+<DD><TT> yacc</TT>
   6.664+</DT>
   6.665+<DT><A HREF="/magic/man2html/1/yesterday">yesterday</A>
   6.666+-  print file names from the dump
   6.667+<DD><TT> yesterday, diffy</TT>
   6.668+</DT>
   6.669+</DL>
     7.1new file mode 100755
     7.2--- /dev/null
     7.3+++ b/sys/man/1/abaco
     7.4@@ -0,0 +1,75 @@
     7.5+.TH ABACO 1
     7.6+.SH NAME
     7.7+abaco, readweb \- browse the World-Wide Web
     7.8+.SH SYNOPSIS
     7.9+.B abaco
    7.10+[
    7.11+.B -p
    7.12+] [
    7.13+.B -c
    7.14+.I ncols
    7.15+] [
    7.16+.B -m
    7.17+.I mtpt
    7.18+] [
    7.19+.B -t
    7.20+.I charset
    7.21+] [
    7.22+.I url
    7.23+]
    7.24+.PP
    7.25+.B readweb
    7.26+[
    7.27+.I url
    7.28+]
    7.29+.SH DESCRIPTION
    7.30+.I Abaco
    7.31+is a lightweight web browser with the appearance of
    7.32+.IR acme (1)
    7.33+with
    7.34+.I ncols
    7.35+columns (one by default).
    7.36+Given a
    7.37+.IR url ,
    7.38+it will start by displaying that page.
    7.39+Clicking mouse button 3 on a link
    7.40+opens it in a new
    7.41+.I abaco
    7.42+window.
    7.43+.B -t
    7.44+selects an alternate character set;
    7.45+.B -m
    7.46+an alternate mount point for
    7.47+.IR webfs .
    7.48+Normally the standard error of subshells is closed,
    7.49+but
    7.50+.B -p
    7.51+prevents this.
    7.52+.PP
    7.53+.I Readweb
    7.54+imports the outside network, if necessary,
    7.55+starts
    7.56+.I webfs
    7.57+and
    7.58+.I webcookies
    7.59+and finally
    7.60+.IR abaco .
    7.61+.\" .SH EXAMPLES
    7.62+.SH FILES
    7.63+.TP 15
    7.64+.B /mnt/web
    7.65+default
    7.66+.I webfs
    7.67+mount point
    7.68+.SH SOURCE
    7.69+.B /sys/src/cmd/abaco
    7.70+.br
    7.71+.B /rc/bin/readweb
    7.72+.SH SEE ALSO
    7.73+.IR vnc (1),
    7.74+.IR webcookies (4),
    7.75+.IR webfs (4),
    7.76+.SH BUGS
    7.77+.I Abaco
    7.78+is a work in progress;
    7.79+many features of giant web browsers are absent.
     8.1new file mode 100755
     8.2--- /dev/null
     8.3+++ b/sys/man/1/acid
     8.4@@ -0,0 +1,492 @@
     8.5+.TH ACID 1
     8.6+.SH NAME
     8.7+acid, truss, trump \- debugger
     8.8+.SH SYNOPSIS
     8.9+.B acid
    8.10+[
    8.11+.B -kqw
    8.12+]
    8.13+[
    8.14+.BI -l " library
    8.15+] [
    8.16+.B -m
    8.17+.I machine
    8.18+] [
    8.19+.I pid
    8.20+]
    8.21+[
    8.22+.I textfile
    8.23+]
    8.24+.PP
    8.25+.B acid
    8.26+.B -l
    8.27+.B truss
    8.28+.I textfile
    8.29+.PP
    8.30+.B acid
    8.31+.B -l
    8.32+.B trump
    8.33+[
    8.34+.I pid
    8.35+]
    8.36+[
    8.37+.I textfile
    8.38+]
    8.39+.SH DESCRIPTION
    8.40+.I Acid
    8.41+is a programmable symbolic debugger.
    8.42+It can inspect one or more processes that share an address space.
    8.43+A program to be debugged may be specified by the process id of
    8.44+a running or defunct process,
    8.45+or by the name of the program's text file 
    8.46+.RB ( 8.out
    8.47+by default).
    8.48+At the prompt,
    8.49+.I acid
    8.50+will store function definitions or print the value of expressions.
    8.51+Options are
    8.52+.TP .9i
    8.53+.B -w
    8.54+Allow the textfile to be modified.
    8.55+.TP
    8.56+.B -q
    8.57+Print variable renamings at startup.
    8.58+.TP
    8.59+.BI -l " library
    8.60+Load from 
    8.61+.I library
    8.62+at startup; see below.
    8.63+.TP
    8.64+.BI -m " machine
    8.65+Assume instructions are for the given CPU type
    8.66+(one of
    8.67+.BR alpha ,
    8.68+.BR 386 ,
    8.69+etc., as listed in
    8.70+.IR 2c (1),
    8.71+or
    8.72+.B sunsparc
    8.73+or
    8.74+.B mipsco
    8.75+for the  manufacturer-defined instruction notation for those processors)
    8.76+instead of using the magic number to select
    8.77+the CPU type.
    8.78+.TP
    8.79+.BI -k
    8.80+Debug the kernel state for the process, rather than the user state.
    8.81+.PP
    8.82+At startup,
    8.83+.I acid
    8.84+obtains standard function definitions from the library file
    8.85+.BR /sys/lib/acid/port ,
    8.86+architecture-dependent functions from
    8.87+.BR /sys/lib/acid/$objtype ,
    8.88+user-specified functions from
    8.89+.BR $home/lib/acid ,
    8.90+and further functions from 
    8.91+.B -l
    8.92+files.
    8.93+Definitions in any file may override previously defined functions.
    8.94+If the function
    8.95+.IR acidinit ()
    8.96+is defined, it will be invoked after all libraries have been loaded.
    8.97+See
    8.98+.IR 2c (1)
    8.99+for information about creating
   8.100+.I acid
   8.101+functions for examining data structures.
   8.102+.SS Language
   8.103+Symbols of the program being debugged become integer 
   8.104+variables whose values are addresses.
   8.105+Contents of addresses are obtained by indirection.
   8.106+Local variables are qualified by
   8.107+function name, for example
   8.108+.BR main:argv .
   8.109+When program symbols conflict with
   8.110+.I acid
   8.111+words, distinguishing 
   8.112+.B $
   8.113+signs are prefixed.
   8.114+Such renamings are reported at startup if the option
   8.115+.B -q
   8.116+is enabled.
   8.117+.PP
   8.118+Variable types
   8.119+.RI ( "integer, float, list, string" )
   8.120+and formats are inferred from assignments.
   8.121+Truth values false/true are attributed to zero/nonzero
   8.122+integers or floats and to empty/nonempty lists or strings.
   8.123+Lists are sequences of expressions surrounded by
   8.124+.BR {\^} 
   8.125+and separated by commas.
   8.126+.PP
   8.127+Expressions are much as in C,
   8.128+but yield both a value and a format.
   8.129+Casts to complex types are allowed.
   8.130+Lists admit the following operators, with
   8.131+subscripts counted from 0.
   8.132+.IP
   8.133+.BI head " list
   8.134+.br
   8.135+.BI tail " list
   8.136+.br
   8.137+.BI append " list", " element
   8.138+.br
   8.139+.BI delete " list", " subscript
   8.140+.PP
   8.141+Format codes are the same as in
   8.142+.IR db (1).
   8.143+Formats may be attached to (unary) expressions with
   8.144+.BR \e ,
   8.145+e.g.
   8.146+.BR (32*7)\eD .
   8.147+There are two indirection operators,
   8.148+.B *
   8.149+to address a core image,
   8.150+.B @
   8.151+to address a text file.
   8.152+The type and format of the result are determined by the format of the operand,
   8.153+whose type must be integer.
   8.154+.PP
   8.155+Statements are
   8.156+.IP
   8.157+.BI if " expr " then " statement " "\fR[ \fPelse\fI statement \fR]
   8.158+.br
   8.159+.BI while " expr " do " statement
   8.160+.br
   8.161+.BI loop " expr" , " expr " do " statement
   8.162+.br
   8.163+.BI defn " name" ( args ") {" " statement \fP}
   8.164+.br
   8.165+.BI defn " name"
   8.166+.br
   8.167+.IB name ( args )
   8.168+.br
   8.169+.BI builtin " name" ( args )
   8.170+.br
   8.171+.BI local " name
   8.172+.br
   8.173+.BI return " expr
   8.174+.br
   8.175+.BR whatis " [ \fI name \fP]
   8.176+.PP
   8.177+The statement
   8.178+.B defn
   8.179+.I name
   8.180+clears the definition for
   8.181+.IR name .
   8.182+A
   8.183+.B defn
   8.184+may override a built-in function;
   8.185+prefixing a function call with
   8.186+.B builtin
   8.187+ignores any overriding
   8.188+.BR defn ,
   8.189+forcing the use of the built-in function.
   8.190+.PP
   8.191+Here is a partial list of functions; see the manual for a complete list.
   8.192+.TF asm(address)
   8.193+.TP
   8.194+.B stk()
   8.195+Print a stack trace for current process.
   8.196+.TP
   8.197+.B lstk()
   8.198+Print a stack trace with values of local variables.
   8.199+.TP
   8.200+.B gpr()
   8.201+Print general registers.
   8.202+Registers can also be accessed by name, for example
   8.203+.BR *R0 .
   8.204+.TP
   8.205+.B spr()
   8.206+Print special registers such as program counter and stack pointer.
   8.207+.TP
   8.208+.B fpr()
   8.209+Print floating-point registers.
   8.210+.TP
   8.211+.B regs()
   8.212+Same as
   8.213+.BR spr();gpr() .
   8.214+.TP
   8.215+.BI fmt( expr , format )
   8.216+Expression 
   8.217+.I expr
   8.218+with format given by the character value of expression
   8.219+.IR format .
   8.220+.TP
   8.221+.BI src( address )
   8.222+Print 10 lines of source around the program address.
   8.223+.TP
   8.224+.BI Bsrc( address )
   8.225+Get the source line for the program address
   8.226+into a window of a running
   8.227+.IR sam (1)
   8.228+and select it.
   8.229+.TP
   8.230+.BI line( address )
   8.231+Print source line nearest to the program address.
   8.232+.TP
   8.233+.B source()
   8.234+List current source directories.
   8.235+.TP
   8.236+.BI addsrcdir( string )
   8.237+Add a source directory to the list.
   8.238+.TP
   8.239+.BI filepc( where )
   8.240+Convert a string of the form 
   8.241+.IB sourcefile : linenumber
   8.242+to a machine address.
   8.243+.TP
   8.244+.BI pcfile( address )
   8.245+Convert a machine address to a source file name.
   8.246+.TP
   8.247+.BI pcline( address )
   8.248+Convert a machine address to a source line number.
   8.249+.TP
   8.250+.BI bptab()
   8.251+List breakpoints set in the current process.
   8.252+.TP
   8.253+.BI bpset( address )
   8.254+Set a breakpoint in the current process at the given address.
   8.255+.TP
   8.256+.BI bpdel( address )
   8.257+Delete a breakpoint from the current process.
   8.258+.TP
   8.259+.B cont()
   8.260+Continue execution of current process and wait for it to stop.
   8.261+.TP
   8.262+.B step()
   8.263+Execute a single machine instruction in the current process.
   8.264+.TP
   8.265+.B func()
   8.266+Step repeatedly until after a function return.
   8.267+.TP
   8.268+.BI stopped( pid )
   8.269+This replaceable function is called automatically when the given process
   8.270+stops.
   8.271+It normally prints the program counter and returns to the prompt.
   8.272+.TP
   8.273+.BI asm( address )
   8.274+Disassemble 30 machine instructions beginning at the given address.
   8.275+.TP
   8.276+.BI mem( address , string )
   8.277+Print a block of memory
   8.278+interpreted according to a string of format codes.
   8.279+.TP
   8.280+.BI dump( address , n , string\fP)
   8.281+Like
   8.282+.BR mem (),
   8.283+repeated for 
   8.284+.I n
   8.285+consecutive blocks.
   8.286+.TP
   8.287+.BI print( expr , ... )
   8.288+Print the values of the expressions.
   8.289+.TP
   8.290+.BI newproc( arguments )
   8.291+Start a new process with arguments given as a string
   8.292+and halt at the first instruction.
   8.293+.TP
   8.294+.B new()
   8.295+Like 
   8.296+.IR newproc (),
   8.297+but take arguments (except
   8.298+.BR argv[0] )
   8.299+from string variable
   8.300+.BR progargs .
   8.301+.TP
   8.302+.B win()
   8.303+Like 
   8.304+.IR new (),
   8.305+but run the process in a separate window.
   8.306+.TP
   8.307+.BI start( pid )
   8.308+Start a stopped process.
   8.309+.TP
   8.310+.BI kill( pid )
   8.311+Kill the given process.
   8.312+.TP
   8.313+.BI setproc( pid )
   8.314+Make the given process current.
   8.315+.TP
   8.316+.BI rc( string )
   8.317+Escape to the shell,
   8.318+.IR rc (1),
   8.319+to execute the command string.
   8.320+.SS Libraries
   8.321+There are a number of
   8.322+.I acid
   8.323+`libraries' that provide higher-level debugging facilities.  Two notable
   8.324+examples are
   8.325+.I truss
   8.326+and
   8.327+.IR trump ,
   8.328+which use
   8.329+.I acid
   8.330+to trace system calls
   8.331+.RI ( truss )
   8.332+and memory allocation
   8.333+.RI ( trump ).
   8.334+Both require starting
   8.335+.I acid
   8.336+on the program, either by attaching to a running process or by
   8.337+executing
   8.338+.B new()
   8.339+on a binary (perhaps after setting
   8.340+.BR progargs ),
   8.341+stopping the process, and then running
   8.342+.B truss()
   8.343+or
   8.344+.B trump()
   8.345+to execute the program under the scaffolding.
   8.346+The output will be a trace of the system calls
   8.347+.RI ( truss )
   8.348+or memory allocation and free calls
   8.349+.RI ( trump )
   8.350+executed by the program.
   8.351+When finished tracing, stop the process and execute
   8.352+.B untruss()
   8.353+or
   8.354+.B untrump()
   8.355+followed by
   8.356+.B cont()
   8.357+to resume execution.
   8.358+.SH EXAMPLES
   8.359+Start to debug
   8.360+.BR /bin/ls ;
   8.361+set some breakpoints; run up to the first one:
   8.362+.IP
   8.363+.EX
   8.364+% acid /bin/ls
   8.365+/bin/ls: mips plan 9 executable
   8.366+/sys/lib/acid/port
   8.367+/sys/lib/acid/mips
   8.368+acid: new()
   8.369+70094: system call	_main	ADD	$-0x14,R29
   8.370+70094: breakpoint	main+0x4	MOVW	R31,0x0(R29)
   8.371+acid: pid
   8.372+70094
   8.373+acid: argv0 = **main:argv\es
   8.374+acid: whatis argv0
   8.375+integer variable format s
   8.376+acid: *argv0
   8.377+/bin/ls
   8.378+acid: bpset(ls)
   8.379+acid: cont()
   8.380+70094: breakpoint  ls	ADD	$-0x16c8,R29
   8.381+acid: 
   8.382+.EE
   8.383+.PP
   8.384+Display elements of a linked list of structures:
   8.385+.IP
   8.386+.EX
   8.387+complex Str { 'D' 0 val; 'X' 4 next; };
   8.388+complex Str s;
   8.389+s = *headstr;
   8.390+while s != 0 do{
   8.391+	print(s.val, "\en");
   8.392+	s = s.next;
   8.393+}
   8.394+.EE
   8.395+.PP
   8.396+Note the use of the
   8.397+.B .
   8.398+operator instead of
   8.399+.BR -> .
   8.400+.PP
   8.401+Display an array of bytes declared in C as
   8.402+.BR "char array[]" .
   8.403+.IP
   8.404+.EX
   8.405+*(array\es)
   8.406+.EE
   8.407+.PP
   8.408+This example gives
   8.409+.B array
   8.410+string format, then prints the string beginning at the address (in
   8.411+.I acid
   8.412+notation)
   8.413+.BR *array .
   8.414+.PP
   8.415+Trace the system calls executed by
   8.416+.IR ls (1):
   8.417+.IP
   8.418+.EX
   8.419+% acid -l truss /bin/ls
   8.420+/bin/ls:386 plan 9 executable
   8.421+
   8.422+/sys/lib/acid/port
   8.423+/sys/lib/acid/kernel
   8.424+/sys/lib/acid/truss
   8.425+/sys/lib/acid/386
   8.426+acid: progargs = "-l lib/profile"
   8.427+acid: new()
   8.428+acid: truss()
   8.429+open("#c/pid", 0)
   8.430+	return value: 3
   8.431+pread(3, 0x7fffeeac, 20, -1)
   8.432+	return value: 12
   8.433+	data: "        166 "
   8.434+\&...
   8.435+stat("lib/profile", 0x0000f8cc, 113)
   8.436+	return value: 65
   8.437+open("/env/timezone", 0)
   8.438+	return value: 3
   8.439+pread(3, 0x7fffd7c4, 1680, -1)
   8.440+	return value: 1518
   8.441+	data: "EST -18000 EDT -14400
   8.442+   9943200   25664400   41392800   57718800   73447200   89168400
   8.443+ 104896800  ..."
   8.444+close(3)
   8.445+	return value: 0
   8.446+pwrite(1, "--rw-rw-r-- M 9 rob rob 2519 Mar 22 10:29 lib/profile
   8.447+", 54, -1)
   8.448+--rw-rw-r-- M 9 rob rob 2519 Mar 22 10:29 lib/profile
   8.449+	return value: 54
   8.450+\&...
   8.451+166: breakpoint	_exits+0x5	INTB	$0x40
   8.452+acid: cont()
   8.453+.EE
   8.454+.SH FILES
   8.455+.B /proc/*/text
   8.456+.br
   8.457+.B /proc/*/mem
   8.458+.br
   8.459+.B /proc/*/ctl
   8.460+.br
   8.461+.B /proc/*/note
   8.462+.br
   8.463+.B /sys/lib/acid/$objtype
   8.464+.br
   8.465+.B /sys/lib/acid/port
   8.466+.br
   8.467+.B /sys/lib/acid/kernel
   8.468+.br
   8.469+.B /sys/lib/acid/trump
   8.470+.br
   8.471+.B /sys/lib/acid/truss
   8.472+.br
   8.473+.B $home/lib/acid
   8.474+.SH SOURCE
   8.475+.B /sys/src/cmd/acid
   8.476+.SH "SEE ALSO"
   8.477+.IR 2a (1),
   8.478+.IR 2c (1),
   8.479+.IR 2l (1),
   8.480+.IR mk (1),
   8.481+.IR db (1)
   8.482+.br
   8.483+Phil Winterbottom,
   8.484+``Acid Manual''.
   8.485+.SH DIAGNOSTICS
   8.486+At termination, kill commands are proposed
   8.487+for processes that are still active.
   8.488+.SH BUGS
   8.489+There is no way to redirect the standard input and standard output
   8.490+of a new process.
   8.491+.br
   8.492+Source line selection near the beginning of a file may pick
   8.493+an adjacent file.
   8.494+.br
   8.495+With the extant stepping commands, one cannot step through instructions
   8.496+outside the text segment and it is hard to debug across process forks.
     9.1new file mode 100755
     9.2--- /dev/null
     9.3+++ b/sys/man/1/acme
     9.4@@ -0,0 +1,727 @@
     9.5+.TH ACME 1
     9.6+.SH NAME
     9.7+acme, win, awd \- interactive text windows
     9.8+.SH SYNOPSIS
     9.9+.B acme
    9.10+[
    9.11+.B -ab
    9.12+]
    9.13+[
    9.14+.B -c
    9.15+.I ncol
    9.16+]
    9.17+[
    9.18+.B -f
    9.19+.I varfont
    9.20+]
    9.21+[
    9.22+.B -F
    9.23+.I fixfont
    9.24+]
    9.25+[
    9.26+.B -l
    9.27+.I loadfile
    9.28+|
    9.29+.I file
    9.30+\&... ]
    9.31+.LP
    9.32+.B win
    9.33+[
    9.34+.I command
    9.35+]
    9.36+.LP
    9.37+.B awd
    9.38+[
    9.39+.I label
    9.40+]
    9.41+.SH DESCRIPTION
    9.42+.I Acme
    9.43+manages windows of text that may be edited interactively or by external programs.
    9.44+The interactive interface uses the keyboard and mouse; external programs
    9.45+use a set of files served by
    9.46+.IR acme ;
    9.47+these are discussed in
    9.48+.IR acme (4).
    9.49+.PP
    9.50+Any named
    9.51+.I files
    9.52+are read into
    9.53+.I acme
    9.54+windows before
    9.55+.I acme
    9.56+accepts input.
    9.57+With the
    9.58+.B -l
    9.59+option, the state of the entire system is loaded
    9.60+from
    9.61+.IR loadfile ,
    9.62+which should have been created by a
    9.63+.B Dump
    9.64+command (q.v.),
    9.65+and subsequent
    9.66+.I file
    9.67+names are ignored.
    9.68+Plain files display as text; directories display as columnated lists of the
    9.69+names of their components, as in
    9.70+.B "ls -p directory|mc
    9.71+except that the names of subdirectories have a slash appended.
    9.72+.PP
    9.73+The
    9.74+.B -f
    9.75+.RB ( -F )
    9.76+option sets the main font, usually variable-pitch (alternate, usually fixed-pitch);
    9.77+the default is
    9.78+.B /lib/font/bit/lucidasans/euro.8.font
    9.79+.RB ( \&.../lucm/unicode.9.font ).
    9.80+Tab intervals are set to the width of 4 (or the value of
    9.81+.BR $tabstop )
    9.82+numeral zeros in the appropriate font.
    9.83+.PP
    9.84+.SS Windows
    9.85+.I Acme
    9.86+windows are in two parts: a one-line
    9.87+.I tag
    9.88+above a multi-line
    9.89+.IR body .
    9.90+The body typically contains an image of a file, as in
    9.91+.IR sam (1),
    9.92+or the output of a
    9.93+program, as in an
    9.94+.IR rio (1)
    9.95+window.
    9.96+The tag contains a number of
    9.97+blank-separated words, followed by a vertical bar character, followed by anything.
    9.98+The first word is the name of the window, typically the name of the associated
    9.99+file or directory, and the other words are commands available in that window.
   9.100+Any text may be added after the bar; examples are strings to search for or
   9.101+commands to execute in that window.
   9.102+Changes to the text left of the bar will be ignored,
   9.103+unless the result is to change the name of the
   9.104+window.
   9.105+.PP
   9.106+If a window holds a directory, the name (first word of the tag) will end with
   9.107+a slash.
   9.108+.SS Scrolling
   9.109+Each window has a scroll bar to the left of the body.
   9.110+The scroll bar behaves much as in
   9.111+.IR sam (1)
   9.112+or
   9.113+.IR rio (1)
   9.114+except that scrolling occurs when the button is pressed, rather than released,
   9.115+and continues
   9.116+as long as the mouse button is held down in the scroll bar.
   9.117+For example, to scroll slowly through a file,
   9.118+hold button 3 down near the top of the scroll bar.  Moving the mouse
   9.119+down the scroll bar speeds up the rate of scrolling.
   9.120+.SS Layout
   9.121+.I Acme
   9.122+windows are arranged in columns.  By default, it creates two columns when starting;
   9.123+this can be overridden with the
   9.124+.B -c
   9.125+option.
   9.126+Placement is automatic but may be adjusted
   9.127+using the
   9.128+.I layout box
   9.129+in the upper left corner of each window and column.
   9.130+Pressing and holding any mouse button in the box drags
   9.131+the associated window or column.
   9.132+For windows, just
   9.133+clicking in the layout box grows the window in place: button 1
   9.134+grows it a little, button 2 grows it as much as it can, still leaving all other
   9.135+tags in that column visible, and button 3 takes over the column completely,
   9.136+temporarily hiding other windows in the column.
   9.137+(They will return
   9.138+.I en masse
   9.139+if any of them needs attention.)
   9.140+The layout box in a window is normally white; when it is black in the center,
   9.141+it records that the file is `dirty':
   9.142+.I acme
   9.143+believes it is modified from its original
   9.144+contents.
   9.145+.PP
   9.146+Tags exist at the top of each column and across the whole display.
   9.147+.I Acme
   9.148+pre-loads them with useful commands.
   9.149+Also, the tag across the top maintains a list of executing long-running commands.
   9.150+.SS Typing
   9.151+The behavior of typed text is similar to that in
   9.152+.IR rio (1)
   9.153+except that the characters are delivered to the tag or body under the mouse; there is no
   9.154+`click to type'.
   9.155+(The experimental option
   9.156+.B -b
   9.157+causes typing to go to the most recently clicked-at or made window.)
   9.158+The usual backspacing conventions apply.
   9.159+As in
   9.160+.IR sam (1)
   9.161+but not
   9.162+.IR rio ,
   9.163+the ESC key selects the text typed since the last mouse action,
   9.164+a feature particularly useful when executing commands.
   9.165+A side effect is that typing ESC with text already selected is identical
   9.166+to a
   9.167+.B Cut
   9.168+command
   9.169+.RI ( q.v. ).
   9.170+.PP
   9.171+Most text, including the names of windows, may be edited uniformly.
   9.172+The only exception is that the command names to the
   9.173+left of the bar in a tag are maintained automatically; changes to them are repaired
   9.174+by
   9.175+.IR acme .
   9.176+.PP
   9.177+When a window is in autoindent mode
   9.178+(see the
   9.179+.B Indent
   9.180+command below) and a newline character is typed,
   9.181+acme copies leading white space on the current line to the new line.
   9.182+The option
   9.183+.B -a
   9.184+causes each window to start in 
   9.185+autoindent mode.
   9.186+.SS "Directory context
   9.187+Each window's tag names a directory: explicitly if the window
   9.188+holds a directory; implicitly if it holds a regular file
   9.189+(e.g. the directory
   9.190+.B /adm
   9.191+if the window holds
   9.192+.BR /adm/users ).
   9.193+This directory provides a
   9.194+.I context
   9.195+for interpreting file names in that window.
   9.196+For example, the string
   9.197+.B users
   9.198+in a window labeled
   9.199+.B /adm/
   9.200+or
   9.201+.B /adm/keys
   9.202+will be interpreted as the file name
   9.203+.BR /adm/users .
   9.204+The directory is defined purely textually, so it can be a non-existent
   9.205+directory or a real directory associated with a non-existent file
   9.206+(e.g.
   9.207+.BR /adm/not-a-file ).
   9.208+File names beginning with a slash
   9.209+are assumed to be absolute file names.
   9.210+.SS Errors
   9.211+Windows whose names begin with
   9.212+.B -
   9.213+or
   9.214+.B +
   9.215+conventionally hold diagnostics and other data
   9.216+not directly associated with files.
   9.217+A window labeled
   9.218+.B +Errors
   9.219+receives all diagnostics produced by
   9.220+.I acme
   9.221+itself.
   9.222+Diagnostics from commands run by
   9.223+.I acme
   9.224+appear in a window named
   9.225+.IB directory /+Errors
   9.226+where
   9.227+.I directory
   9.228+is identified by the context of the command.
   9.229+These error windows are created when needed.
   9.230+.SS "Mouse button 1
   9.231+Mouse button 1 selects text just as in
   9.232+.IR sam (1)
   9.233+or
   9.234+.IR rio (1) ,
   9.235+including the usual double-clicking conventions.
   9.236+.SS "Mouse button 2
   9.237+By an
   9.238+action similar to selecting text with button 1,
   9.239+button 2 indicates text to execute as a command.
   9.240+If the indicated text has multiple white-space-separated words,
   9.241+the first is the command name and the second and subsequent
   9.242+are its arguments.
   9.243+If button 2 is `clicked'\(emindicates a null string\(em\c
   9.244+.I acme
   9.245+.I expands
   9.246+the indicated text to find a command to run:
   9.247+if the click is within button-1-selected text,
   9.248+.I acme
   9.249+takes that selection as the command;
   9.250+otherwise it takes the largest string of valid file name characters containing the click.
   9.251+Valid file name characters are alphanumerics and
   9.252+.B _
   9.253+.B .
   9.254+.B -
   9.255+.B +
   9.256+.BR / .
   9.257+This behavior is similar to double-clicking with button 1 but,
   9.258+because a null command is meaningless, only a single click is required.
   9.259+.PP
   9.260+Some commands, all by convention starting with a capital letter, are
   9.261+.I built-ins
   9.262+that are executed directly by
   9.263+.IR acme :
   9.264+.TP
   9.265+.B Cut
   9.266+Delete most recently selected text and place in snarf buffer.
   9.267+.TP
   9.268+.B Del
   9.269+Delete window.  If window is dirty, instead print a warning; a second
   9.270+.B Del
   9.271+will succeed.
   9.272+.TP
   9.273+.B Delcol
   9.274+Delete column and all its windows, after checking that windows are not dirty.
   9.275+.TP
   9.276+.B Delete
   9.277+Delete window without checking for dirtiness.
   9.278+.TP
   9.279+.B Dump
   9.280+Write the state of
   9.281+.I acme
   9.282+to the file name, if specified, or
   9.283+.B $home/acme.dump
   9.284+by default.
   9.285+.TP
   9.286+.B Edit
   9.287+Treat the argument as a text editing command in the style of
   9.288+.IR sam (1).
   9.289+The full
   9.290+.B Sam
   9.291+language is implemented except for the commands
   9.292+.BR k ,
   9.293+.BR n ,
   9.294+.BR q ,
   9.295+and
   9.296+.BR ! .
   9.297+The
   9.298+.B =
   9.299+command is slightly different: it includes the file name and
   9.300+gives only the line address unless the command is explicitly
   9.301+.BR =# .
   9.302+The `current window' for the command is the body of the window in which the
   9.303+.B Edit
   9.304+command is executed.
   9.305+Usually the
   9.306+.B Edit
   9.307+command would be typed in a tag; longer commands may be prepared in a
   9.308+scratch window and executed, with
   9.309+.B Edit
   9.310+itself in the current window, using the 2-1 chord described below.
   9.311+.TP
   9.312+.B Exit
   9.313+Exit
   9.314+.I acme
   9.315+after checking that windows are not dirty.
   9.316+.TP
   9.317+.B Font
   9.318+With no arguments, change the font of the associated window from fixed-spaced to
   9.319+proportional-spaced or
   9.320+.I vice
   9.321+.IR versa .
   9.322+Given a file name argument, change the font of the window to that stored in the named file.
   9.323+If the file name argument is prefixed by
   9.324+.B var
   9.325+.RB ( fix ),
   9.326+also set the default proportional-spaced (fixed-spaced) font for future use to that font.
   9.327+Other existing windows are unaffected.
   9.328+.TP
   9.329+.B Get
   9.330+Load file into window, replacing previous contents (after checking for dirtiness as in
   9.331+.BR Del ).
   9.332+With no argument, use the existing file name of the window.
   9.333+Given an argument, use that file but do not change the window's file name.
   9.334+.TP
   9.335+.B ID
   9.336+Print window ID number
   9.337+.RI ( q.v. ).
   9.338+.TP
   9.339+.B Incl
   9.340+When opening `include' files
   9.341+(those enclosed in
   9.342+.BR <> )
   9.343+with button 3,
   9.344+.I acme
   9.345+searches in directories
   9.346+.B /$objtype/include
   9.347+and
   9.348+.BR /sys/include .
   9.349+.B Incl
   9.350+adds its arguments to a supplementary list of include directories, analogous to
   9.351+the
   9.352+.B -I
   9.353+option to the compilers.
   9.354+This list is per-window and is inherited when windows are created by actions in that window, so
   9.355+.I Incl
   9.356+is most usefully applied to a directory containing relevant source.
   9.357+With no arguments,
   9.358+.I Incl
   9.359+prints the supplementary list.
   9.360+This command is largely superseded by plumbing
   9.361+(see
   9.362+.IR plumb (6)).
   9.363+.TP
   9.364+.B Indent
   9.365+Set the autoindent mode according to the argument:
   9.366+.B on
   9.367+and
   9.368+.B off
   9.369+set the mode for the current window;
   9.370+.B ON
   9.371+and
   9.372+.B OFF
   9.373+set the mode for all existing and future windows.
   9.374+.TP
   9.375+.B Kill
   9.376+Send a
   9.377+.B kill
   9.378+note to
   9.379+.IR acme -initiated
   9.380+commands named as arguments.
   9.381+.TP
   9.382+.B Load
   9.383+Restore the state of
   9.384+.I acme
   9.385+from a file (default
   9.386+.BR $home/acme.dump )
   9.387+created by the
   9.388+.B Dump
   9.389+command.
   9.390+.TP
   9.391+.B Local
   9.392+When prefixed to a command
   9.393+run the
   9.394+command in the same file name space and environment variable group as
   9.395+.IR acme .
   9.396+The environment of the command
   9.397+is restricted but is sufficient to run
   9.398+.IR bind (1),
   9.399+.IR 9fs
   9.400+(see
   9.401+.IR srv (4)),
   9.402+.IR import (4),
   9.403+etc.,
   9.404+and to set environment variables such as
   9.405+.BR $objtype .
   9.406+.TP
   9.407+.B Look
   9.408+Search in body for occurrence of literal text indicated by the argument or,
   9.409+if none is given, by the selected text in the body.
   9.410+.TP
   9.411+.B New
   9.412+Make new window.  With arguments, load the named files into windows.
   9.413+.TP
   9.414+.B Newcol
   9.415+Make new column.
   9.416+.TP
   9.417+.B Paste
   9.418+Replace most recently selected text with contents of snarf buffer.
   9.419+.TP
   9.420+.B Put
   9.421+Write window to the named file.
   9.422+With no argument, write to the file named in the tag of the window.
   9.423+.TP
   9.424+.B Putall
   9.425+Write all dirty windows whose names indicate existing regular files.
   9.426+.TP
   9.427+.B Redo
   9.428+Complement of
   9.429+.BR Undo .
   9.430+.TP
   9.431+.B Send
   9.432+Append selected text or snarf buffer to end of body; used mainly with
   9.433+.IR win .
   9.434+.TP
   9.435+.B Snarf
   9.436+Place selected text in snarf buffer.
   9.437+.TP
   9.438+.B Sort
   9.439+Arrange the windows in the column from top to bottom in lexicographical
   9.440+order based on their names.
   9.441+.TP
   9.442+.B Tab
   9.443+Set the width of tab stops for this window to the value of the argument, in units of widths of the zero
   9.444+character.
   9.445+With no arguments, it prints the current value.
   9.446+.TP
   9.447+.B Undo
   9.448+Undo last textual change or set of changes.
   9.449+.TP
   9.450+.B Zerox
   9.451+Create a copy of the window containing most recently selected text.
   9.452+.TP
   9.453+.B <|>
   9.454+If a regular shell command is preceded by a
   9.455+.BR < ,
   9.456+.BR | ,
   9.457+or
   9.458+.B >
   9.459+character, the selected text in the body of the window is affected by the
   9.460+I/O from the command.
   9.461+The
   9.462+.B <
   9.463+character causes the selection to be replaced by the standard output
   9.464+of the command;
   9.465+.B >
   9.466+causes the selection to be sent as standard input to the command; and
   9.467+.B |
   9.468+does both at once, `piping' the selection through the command and
   9.469+replacing it with the output.
   9.470+.PP
   9.471+A common place to store text for commands is in the tag; in fact
   9.472+.I acme
   9.473+maintains a set of commands appropriate to the state of the window
   9.474+to the left of the bar in the tag.
   9.475+.PP
   9.476+If the text indicated with button 2 is not a recognized built-in, it is executed as
   9.477+a shell command.  For example, indicating
   9.478+.B date
   9.479+with button 2 runs
   9.480+.IR date (1).
   9.481+The standard
   9.482+and error outputs of commands are sent to the error window associated with
   9.483+the directory from which the command was run, which will be created if
   9.484+necessary.
   9.485+For example, in a window
   9.486+.B /adm/users
   9.487+executing
   9.488+.B pwd
   9.489+will produce the output
   9.490+.B /adm
   9.491+in a (possibly newly-created) window labeled
   9.492+.BR /adm/+Errors ;
   9.493+in a window containing
   9.494+.B /sys/src/cmd/sam/sam.c
   9.495+executing
   9.496+.B mk
   9.497+will run
   9.498+.IR mk (1)
   9.499+in
   9.500+.BR /sys/src/cmd/sam ,
   9.501+producing output in a window labeled
   9.502+.BR /sys/src/cmd/sam/+Errors .
   9.503+The environment of such commands contains the variable
   9.504+.B $%
   9.505+with value set to the filename of the window in which the command is run,
   9.506+and
   9.507+.B $winid
   9.508+set to the window's id number
   9.509+(see
   9.510+.IR acme (4)).
   9.511+.SS "Mouse button 3
   9.512+Pointing at text with button 3 instructs
   9.513+.I acme
   9.514+to locate or acquire the file, string, etc. described by the indicated text and
   9.515+its context.
   9.516+This description follows the actions taken when
   9.517+button 3 is released after sweeping out some text.
   9.518+In the description,
   9.519+.I text
   9.520+refers to the text of the original sweep or, if it was null, the result of
   9.521+applying the same expansion rules that apply to button 2 actions.
   9.522+.PP
   9.523+If the text names an existing window,
   9.524+.I acme
   9.525+moves the mouse cursor to the selected text in the body of that window.
   9.526+If the text names an existing file with no associated window,
   9.527+.I acme
   9.528+loads the file into a new window and moves the mouse there.
   9.529+If the text is a file name contained in angle brackets,
   9.530+.I acme
   9.531+loads the indicated include file from the directory appropriate to the
   9.532+suffix of the file name of the window holding the text.
   9.533+(The
   9.534+.B Incl
   9.535+command adds directories to the standard list.)
   9.536+.PP
   9.537+If the text begins with a colon, it is taken to be an address, in
   9.538+the style of
   9.539+.IR sam (1),
   9.540+within the body of the window containing the text.
   9.541+The address is evaluated, the resulting text highlighted, and the mouse moved to it.
   9.542+Thus, in
   9.543+.IR acme ,
   9.544+one must type
   9.545+.B :/regexp
   9.546+or
   9.547+.B :127
   9.548+not just
   9.549+.B /regexp
   9.550+or
   9.551+.BR 127 .
   9.552+(There is an easier way to locate literal text; see below.)
   9.553+.PP
   9.554+If the text is a file name followed by a colon and an address,
   9.555+.I acme
   9.556+loads the file and evaluates the address.  For example, clicking button 3 anywhere
   9.557+in the text
   9.558+.B file.c:27
   9.559+will open
   9.560+.BR file.c ,
   9.561+select line
   9.562+27, and put the mouse at the beginning of the line.  The rules about Error
   9.563+files, directories, and so on all combine to make this an efficient way to
   9.564+investigate errors from compilers, etc.
   9.565+.PP
   9.566+If the text is not an address or file, it is taken to
   9.567+be literal text, which is then searched for in the body of the window
   9.568+in which button 3 was clicked.  If a match is found, it is selected and the mouse is
   9.569+moved there.  Thus, to search for occurrences of a word in a file,
   9.570+just click button 3 on the word.  Because of the rule of using the
   9.571+selection as the button 3 action, subsequent clicks will find subsequent
   9.572+occurrences without moving the mouse.
   9.573+.PP
   9.574+In all these actions, the mouse motion is not done if the text is a null string
   9.575+within a non-null selected string in the tag, so that (for example) complex regular expressions
   9.576+may be selected and applied repeatedly to the
   9.577+body by just clicking button 3 over them.
   9.578+.SS "Chords of mouse buttons
   9.579+Several operations are bound to multiple-button actions.
   9.580+After selecting text, with button 1 still down, pressing button 2
   9.581+executes
   9.582+.B Cut
   9.583+and button 3 executes
   9.584+.BR Paste .
   9.585+After clicking one button, the other undoes
   9.586+the first; thus (while holding down button 1) 2 followed by 3 is a
   9.587+.B Snarf
   9.588+that leaves the file undirtied;
   9.589+3 followed by 2 is a no-op.
   9.590+These actions also apply to text selected by double-clicking because
   9.591+the double-click expansion is made when the second
   9.592+click starts, not when it ends.
   9.593+.PP
   9.594+Commands may be given extra arguments by a mouse chord with buttons 2 and 1.
   9.595+While holding down button 2 on text to be executed as a command, clicking button 1
   9.596+appends the text last pointed to by button 1 as a distinct final argument.
   9.597+For example, to search for literal
   9.598+.B text
   9.599+one may execute
   9.600+.B Look text
   9.601+with button 2 or instead point at
   9.602+.B text
   9.603+with button 1 in any window, release button 1,
   9.604+then execute
   9.605+.BR Look ,
   9.606+clicking button 1 while 2 is held down.
   9.607+.PP
   9.608+When an external command (e.g.
   9.609+.IR echo (1))
   9.610+is executed this way, the extra argument is passed as expected and an
   9.611+environment variable
   9.612+.B $acmeaddr
   9.613+is created that holds, in the form interpreted by button 3,
   9.614+the fully-qualified address of the extra argument.
   9.615+.SS "Support programs
   9.616+.I Win
   9.617+creates a new
   9.618+.I acme
   9.619+window and runs a
   9.620+.I command
   9.621+(default
   9.622+.BR /bin/rc )
   9.623+in it, turning the window into something analogous to an
   9.624+.IR rio (1)
   9.625+window.
   9.626+Executing text in a
   9.627+.I win
   9.628+window with button
   9.629+2 is similar to using
   9.630+.BR Send .
   9.631+.PP
   9.632+.I Awd
   9.633+loads the tag line of its window with the directory in which it's running, suffixed
   9.634+.BI - label
   9.635+(default
   9.636+.BR rc );
   9.637+it is
   9.638+intended to be executed by a
   9.639+.B cd
   9.640+function for use in
   9.641+.I win
   9.642+windows.  An example definition is
   9.643+.EX
   9.644+	fn cd { builtin cd $1 && awd $sysname }
   9.645+.EE
   9.646+.SS "Applications and guide files
   9.647+In the directory
   9.648+.B /acme
   9.649+live several subdirectories, each corresponding to a program or
   9.650+set of related programs that employ
   9.651+.I acme's
   9.652+user interface.
   9.653+Each subdirectory includes source, binaries, and a
   9.654+.B readme
   9.655+file for further information.
   9.656+It also includes a
   9.657+.BR guide ,
   9.658+a text file holding sample commands to invoke the programs.
   9.659+The idea is to find an example in the guide that best matches
   9.660+the job at hand, edit it to suit, and execute it.
   9.661+.PP
   9.662+Whenever a command is executed by
   9.663+.IR acme ,
   9.664+the default search path includes the directory of the window containing
   9.665+the command and its subdirectory
   9.666+.BR $cputype .
   9.667+The program directories in
   9.668+.B /acme
   9.669+contain appropriately labeled subdirectories of binaries,
   9.670+so commands named
   9.671+in the guide files will be found automatically when run.
   9.672+Also,
   9.673+.I acme
   9.674+binds the directories
   9.675+.B /acme/bin
   9.676+and
   9.677+.B /acme/bin/$cputype
   9.678+to the beginning of
   9.679+.B /bin
   9.680+when it starts; this is where
   9.681+.IR acme -specific
   9.682+programs such as
   9.683+.I win
   9.684+and
   9.685+.I awd
   9.686+reside.
   9.687+.SH FILES
   9.688+.TF $home/acme.dump
   9.689+.TP
   9.690+.B $home/acme.dump
   9.691+default file for
   9.692+.B Dump
   9.693+and
   9.694+.BR Load ;
   9.695+also where state is written if
   9.696+.I acme
   9.697+dies or is killed unexpectedly, e.g. by deleting its window.
   9.698+.TP
   9.699+.B /acme/*/guide
   9.700+template files for applications
   9.701+.TP
   9.702+.B /acme/*/readme
   9.703+informal documentation for applications
   9.704+.TP
   9.705+.B /acme/*/src
   9.706+source for applications
   9.707+.TP
   9.708+.B /acme/*/mips
   9.709+MIPS-specific binaries for applications
   9.710+.SH SOURCE
   9.711+.B /sys/src/cmd/acme
   9.712+.br
   9.713+.B /acme/bin/source/win
   9.714+.br
   9.715+.B /sys/src/cmd/awd.c
   9.716+.SH SEE ALSO
   9.717+.IR acme (4)
   9.718+.br
   9.719+Rob Pike,
   9.720+.I
   9.721+Acme: A User Interface for Programmers.
   9.722+.SH BUGS
   9.723+With the
   9.724+.B -l
   9.725+option or
   9.726+.B Load
   9.727+command,
   9.728+the recreation of windows under control of external programs
   9.729+such as
   9.730+.I win
   9.731+is just to rerun the command; information may be lost.
    10.1new file mode 100755
    10.2--- /dev/null
    10.3+++ b/sys/man/1/ap
    10.4@@ -0,0 +1,16 @@
    10.5+.TH AP 1
    10.6+.SH NAME
    10.7+ap \- fetch Associated Press news articles
    10.8+.SH SYNOPSIS
    10.9+.B ap
   10.10+[
   10.11+.BI article-name
   10.12+]
   10.13+.SH DESCRIPTION
   10.14+.I ap
   10.15+fetches Associated Press news articles from http://www.newsday.com.
   10.16+Without any arguments it provides a two column list of article keys and descriptions.
   10.17+When invoked with an article key it fetches that article.
   10.18+.PP
   10.19+.SH SOURCE
   10.20+.B /rc/bin/ap
    11.1new file mode 100755
    11.2--- /dev/null
    11.3+++ b/sys/man/1/ar
    11.4@@ -0,0 +1,182 @@
    11.5+.TH AR 1
    11.6+.SH NAME
    11.7+ar \- archive and library maintainer
    11.8+.SH SYNOPSIS
    11.9+.B ar
   11.10+.I key
   11.11+[
   11.12+.I posname
   11.13+]
   11.14+.I afile
   11.15+[
   11.16+.I file ...
   11.17+]
   11.18+.SH DESCRIPTION
   11.19+.I Ar
   11.20+maintains groups of files
   11.21+combined into a single archive file,
   11.22+.IR afile .
   11.23+The main use of
   11.24+.I ar
   11.25+is to create and update library files for the loaders
   11.26+.IR 2l (1),
   11.27+etc.
   11.28+It can be used, though, for any similar purpose.
   11.29+.PP
   11.30+.I Key
   11.31+is one character from the set
   11.32+.BR drqtpmx ,
   11.33+optionally concatenated with
   11.34+one or more of
   11.35+.BR vuaibclo .
   11.36+The
   11.37+.I files
   11.38+are constituents of the archive
   11.39+.IR afile .
   11.40+The meanings of the
   11.41+.I key
   11.42+characters are:
   11.43+.TP
   11.44+.B d
   11.45+Delete 
   11.46+.I files 
   11.47+from the archive file.
   11.48+.TP
   11.49+.B r
   11.50+Replace
   11.51+.I files 
   11.52+in the archive file, or add them if missing.
   11.53+Optional modifiers are
   11.54+.RS
   11.55+.PD0
   11.56+.TP
   11.57+.B u
   11.58+Replace only files with
   11.59+modified dates later than that of
   11.60+the archive.
   11.61+.TP
   11.62+.B a
   11.63+Place new files after
   11.64+.I posname
   11.65+in the archive rather than at the end.
   11.66+.TP
   11.67+.BR b " or " i
   11.68+Place new files before
   11.69+.I posname
   11.70+in the archive.
   11.71+.RE
   11.72+.PD
   11.73+.TP
   11.74+.B q
   11.75+Quick.  Append
   11.76+.I files 
   11.77+to the end of the archive without checking for duplicates.
   11.78+Avoids quadratic behavior in
   11.79+.LR "for (i in *.v) ar r lib.a $i" .
   11.80+.TP
   11.81+.B t
   11.82+List a table of contents of the archive.
   11.83+If names are given, only those files are listed.
   11.84+.TP
   11.85+.B p
   11.86+Print the named files in the archive.
   11.87+.TP
   11.88+.B m
   11.89+Move the named files to the end or elsewhere,
   11.90+specified as with 
   11.91+.LR r .
   11.92+.TP
   11.93+.B o
   11.94+Preserve the access and modification times of files
   11.95+extracted with the
   11.96+.B x
   11.97+command.
   11.98+.TP
   11.99+.B x
  11.100+Extract the named files.
  11.101+If no names are given, all files in the archive are
  11.102+extracted.
  11.103+In neither case does
  11.104+.B x
  11.105+alter the archive file.
  11.106+.TP
  11.107+.B v
  11.108+Verbose.
  11.109+Give a file-by-file
  11.110+description of the making of a
  11.111+new archive file from the old archive and the constituent files.
  11.112+With
  11.113+.BR p ,
  11.114+precede each file with a name.
  11.115+With
  11.116+.BR t ,
  11.117+give a long listing of all information about the files,
  11.118+somewhat like a listing by
  11.119+.IR ls (1),
  11.120+showing
  11.121+.br
  11.122+.ns
  11.123+.IP
  11.124+.B
  11.125+	mode uid/gid size date name
  11.126+.\" .TP
  11.127+.\" .B c
  11.128+.\" Create.
  11.129+.\" Normally
  11.130+.\" .I ar
  11.131+.\" will create a new archive when
  11.132+.\" .I afile
  11.133+.\" does not exist, and give a warning.
  11.134+.\" Option 
  11.135+.\" .B c
  11.136+.\" discards any old contents and suppresses the warning.
  11.137+.TP
  11.138+.B l
  11.139+Local.
  11.140+Normally
  11.141+.I ar
  11.142+places its temporary files in the directory
  11.143+.BR /tmp .
  11.144+This option causes them to be placed in the local directory.
  11.145+.PP
  11.146+When a
  11.147+.BR d ,
  11.148+.BR r ,
  11.149+or
  11.150+.BR m
  11.151+.I key
  11.152+is specified and all members of the archive are valid object files for
  11.153+the same architecture,
  11.154+.I ar
  11.155+inserts a table of contents, required by the loaders, at
  11.156+the front of the library.
  11.157+The table of contents is
  11.158+rebuilt whenever the archive is modified, except
  11.159+when the
  11.160+.B q
  11.161+.I key
  11.162+is specified or when the table of contents is
  11.163+explicitly moved or deleted.
  11.164+.SH EXAMPLE
  11.165+.TP
  11.166+.L
  11.167+ar cr lib.a *.v
  11.168+Replace the contents of library
  11.169+.L lib.a
  11.170+with the object files in the current directory.
  11.171+.SH FILES
  11.172+.TF /tmp/vxxxx
  11.173+.TP
  11.174+.B /tmp/v*
  11.175+temporaries
  11.176+.SH SOURCE
  11.177+.B /sys/src/cmd/ar.c
  11.178+.SH "SEE ALSO"
  11.179+.IR 2l (1), 
  11.180+.IR ar (6)
  11.181+.SH BUGS
  11.182+If the same file is mentioned twice in an argument list,
  11.183+it may be put in the archive twice.
  11.184+.br
  11.185+This command predates Plan 9 and makes some invalid assumptions,
  11.186+for instance that user id's are numeric.
    12.1new file mode 100755
    12.2--- /dev/null
    12.3+++ b/sys/man/1/ascii
    12.4@@ -0,0 +1,158 @@
    12.5+.TH ASCII 1 
    12.6+.SH NAME
    12.7+ascii, unicode \- interpret ASCII, Unicode characters
    12.8+.SH SYNOPSIS
    12.9+.B ascii
   12.10+[
   12.11+.B -8cnt
   12.12+]
   12.13+[
   12.14+.B -dox
   12.15+|
   12.16+.B -b
   12.17+.I n
   12.18+]
   12.19+[
   12.20+.I text
   12.21+]
   12.22+.PP
   12.23+.B unicode
   12.24+.IB hexmin - hexmax
   12.25+.PP
   12.26+.B unicode
   12.27+[
   12.28+.B -t
   12.29+]
   12.30+.I hex
   12.31+[
   12.32+\&...
   12.33+]
   12.34+.PP
   12.35+.B unicode
   12.36+[
   12.37+.B -n
   12.38+]
   12.39+.I characters
   12.40+.PP
   12.41+.B look
   12.42+.I hex
   12.43+.B /lib/unicode
   12.44+.SH DESCRIPTION
   12.45+.I Ascii
   12.46+prints the
   12.47+.SM ASCII 
   12.48+values corresponding to characters and
   12.49+.I vice
   12.50+.IR versa ;
   12.51+under the
   12.52+.B -8
   12.53+option, the
   12.54+.SM ISO
   12.55+Latin-1 extensions (codes 0200-0377) are included.
   12.56+The values are interpreted in a settable numeric base;
   12.57+.B -o
   12.58+specifies octal,
   12.59+.B -d
   12.60+decimal,
   12.61+.B -x
   12.62+hexadecimal (the default), and
   12.63+.BI -b n
   12.64+base
   12.65+.IR n .
   12.66+.PP
   12.67+With no arguments,
   12.68+.I ascii
   12.69+prints a table of the character set in the specified base.
   12.70+Characters of
   12.71+.I text
   12.72+are converted to their
   12.73+.SM ASCII 
   12.74+values, one per line. If, however, the first
   12.75+.I text
   12.76+argument is a valid number in the specified base, conversion
   12.77+goes the opposite way.
   12.78+Control characters are printed as two- or three-character mnemonics.
   12.79+Other options are:
   12.80+.TP
   12.81+.B -n
   12.82+Force numeric output.
   12.83+.TP
   12.84+.B -c
   12.85+Force character output.
   12.86+.TP
   12.87+.B -t
   12.88+Convert from numbers to running text; do not interpret
   12.89+control characters or insert newlines.
   12.90+.PP
   12.91+.I Unicode
   12.92+is similar; it converts between
   12.93+.SM UTF
   12.94+and character values from the Unicode Standard (see
   12.95+.IR utf (6)).
   12.96+If given a range of hexadecimal numbers,
   12.97+.I unicode
   12.98+prints a table of the specified Unicode characters \(em their values and
   12.99+.SM UTF
  12.100+representations.
  12.101+Otherwise it translates from
  12.102+.SM UTF
  12.103+to numeric value or vice versa,
  12.104+depending on the appearance of the supplied text;
  12.105+the
  12.106+.B -n
  12.107+option forces numeric output to avoid ambiguity with numeric characters.
  12.108+If converting to
  12.109+.SM UTF ,
  12.110+the characters are printed one per line unless the
  12.111+.B -t
  12.112+flag is set, in which case the output is a single string
  12.113+containing only the specified characters.
  12.114+Unlike
  12.115+.IR ascii ,
  12.116+.I unicode
  12.117+treats no characters specially.
  12.118+.PP
  12.119+The output of
  12.120+.I ascii
  12.121+and
  12.122+.I unicode
  12.123+may be unhelpful if the characters printed are not available in the current font.
  12.124+.PP
  12.125+The file
  12.126+.B /lib/unicode
  12.127+contains a
  12.128+table of characters and descriptions, sorted in hexadecimal order,
  12.129+suitable for
  12.130+.IR look (1)
  12.131+on the lower case
  12.132+.I hex
  12.133+values of characters.
  12.134+.SH EXAMPLES
  12.135+.TP
  12.136+.B "ascii -d"
  12.137+Print the
  12.138+.SM ASCII 
  12.139+table base 10.
  12.140+.TP
  12.141+.B "unicode p"
  12.142+Print the hex value of `p'.
  12.143+.TP
  12.144+.B "unicode 2200-22f1"
  12.145+Print a table of miscellaneous mathematical symbols.
  12.146+.TP
  12.147+.B "look 039 /lib/unicode"
  12.148+See the start of the Greek alphabet's encoding in the Unicode Standard.
  12.149+.SH FILES
  12.150+.TF \fL/lib/unicode
  12.151+.TP
  12.152+.B /lib/unicode
  12.153+table of characters and descriptions.
  12.154+.SH SOURCE
  12.155+.B /sys/src/cmd/ascii.c
  12.156+.br
  12.157+.B /sys/src/cmd/unicode.c
  12.158+.SH "SEE ALSO"
  12.159+.IR look (1),
  12.160+.IR tcs (1),
  12.161+.IR utf (6),
  12.162+.IR font (6)
    13.1new file mode 100755
    13.2--- /dev/null
    13.3+++ b/sys/man/1/awk
    13.4@@ -0,0 +1,560 @@
    13.5+.TH AWK 1
    13.6+.SH NAME
    13.7+awk \- pattern-directed scanning and processing language
    13.8+.SH SYNOPSIS
    13.9+.B awk
   13.10+[
   13.11+.B -F
   13.12+.I fs
   13.13+]
   13.14+[
   13.15+.B -d
   13.16+]
   13.17+[
   13.18+.BI -mf
   13.19+.I n
   13.20+]
   13.21+[
   13.22+.B -mr
   13.23+.I n
   13.24+]
   13.25+[
   13.26+.B -safe
   13.27+]
   13.28+[
   13.29+.B -v
   13.30+.I var=value
   13.31+]
   13.32+[
   13.33+.B -f
   13.34+.I progfile
   13.35+|
   13.36+.I prog
   13.37+]
   13.38+[
   13.39+.I file ...
   13.40+]
   13.41+.SH DESCRIPTION
   13.42+.I Awk
   13.43+scans each input
   13.44+.I file
   13.45+for lines that match any of a set of patterns specified literally in
   13.46+.I prog
   13.47+or in one or more files
   13.48+specified as
   13.49+.B -f
   13.50+.IR progfile .
   13.51+With each pattern
   13.52+there can be an associated action that will be performed
   13.53+when a line of a
   13.54+.I file
   13.55+matches the pattern.
   13.56+Each line is matched against the
   13.57+pattern portion of every pattern-action statement;
   13.58+the associated action is performed for each matched pattern.
   13.59+The file name 
   13.60+.L -
   13.61+means the standard input.
   13.62+Any
   13.63+.IR file
   13.64+of the form
   13.65+.I var=value
   13.66+is treated as an assignment, not a file name,
   13.67+and is executed at the time it would have been opened if it were a file name.
   13.68+The option
   13.69+.B -v
   13.70+followed by
   13.71+.I var=value
   13.72+is an assignment to be done before the program
   13.73+is executed;
   13.74+any number of
   13.75+.B -v
   13.76+options may be present.
   13.77+.B -F
   13.78+.IR fs
   13.79+option defines the input field separator to be the regular expression
   13.80+.IR fs .
   13.81+.PP
   13.82+An input line is normally made up of fields separated by white space,
   13.83+or by regular expression
   13.84+.BR FS .
   13.85+The fields are denoted
   13.86+.BR $1 ,
   13.87+.BR $2 ,
   13.88+\&..., while
   13.89+.B $0
   13.90+refers to the entire line.
   13.91+If
   13.92+.BR FS
   13.93+is null, the input line is split into one field per character.
   13.94+.PP
   13.95+To compensate for inadequate implementation of storage management,
   13.96+the 
   13.97+.B -mr
   13.98+option can be used to set the maximum size of the input record,
   13.99+and the
  13.100+.B -mf
  13.101+option to set the maximum number of fields.
  13.102+.PP
  13.103+The
  13.104+.B -safe
  13.105+option causes
  13.106+.I awk
  13.107+to run in 
  13.108+``safe mode,''
  13.109+in which it is not allowed to 
  13.110+run shell commands or open files
  13.111+and the environment is not made available
  13.112+in the 
  13.113+.B ENVIRON
  13.114+variable.
  13.115+.PP
  13.116+A pattern-action statement has the form
  13.117+.IP
  13.118+.IB pattern " { " action " }
  13.119+.PP
  13.120+A missing 
  13.121+.BI { " action " }
  13.122+means print the line;
  13.123+a missing pattern always matches.
  13.124+Pattern-action statements are separated by newlines or semicolons.
  13.125+.PP
  13.126+An action is a sequence of statements.
  13.127+A statement can be one of the following:
  13.128+.PP
  13.129+.EX
  13.130+.ta \w'\fLdelete array[expression]'u
  13.131+if(\fI expression \fP)\fI statement \fP\fR[ \fPelse\fI statement \fP\fR]\fP
  13.132+while(\fI expression \fP)\fI statement\fP
  13.133+for(\fI expression \fP;\fI expression \fP;\fI expression \fP)\fI statement\fP
  13.134+for(\fI var \fPin\fI array \fP)\fI statement\fP
  13.135+do\fI statement \fPwhile(\fI expression \fP)
  13.136+break
  13.137+continue
  13.138+{\fR [\fP\fI statement ... \fP\fR] \fP}
  13.139+\fIexpression\fP	#\fR commonly\fP\fI var = expression\fP
  13.140+print\fR [ \fP\fIexpression-list \fP\fR] \fP\fR[ \fP>\fI expression \fP\fR]\fP
  13.141+printf\fI format \fP\fR[ \fP,\fI expression-list \fP\fR] \fP\fR[ \fP>\fI expression \fP\fR]\fP
  13.142+return\fR [ \fP\fIexpression \fP\fR]\fP
  13.143+next	#\fR skip remaining patterns on this input line\fP
  13.144+nextfile	#\fR skip rest of this file, open next, start at top\fP
  13.145+delete\fI array\fP[\fI expression \fP]	#\fR delete an array element\fP
  13.146+delete\fI array\fP	#\fR delete all elements of array\fP
  13.147+exit\fR [ \fP\fIexpression \fP\fR]\fP	#\fR exit immediately; status is \fP\fIexpression\fP
  13.148+.EE
  13.149+.DT
  13.150+.PP
  13.151+Statements are terminated by
  13.152+semicolons, newlines or right braces.
  13.153+An empty
  13.154+.I expression-list
  13.155+stands for
  13.156+.BR $0 .
  13.157+String constants are quoted \&\fL"\ "\fR,
  13.158+with the usual C escapes recognized within.
  13.159+Expressions take on string or numeric values as appropriate,
  13.160+and are built using the operators
  13.161+.B + \- * / % ^
  13.162+(exponentiation), and concatenation (indicated by white space).
  13.163+The operators
  13.164+.B
  13.165+! ++ \-\- += \-= *= /= %= ^= > >= < <= == != ?:
  13.166+are also available in expressions.
  13.167+Variables may be scalars, array elements
  13.168+(denoted
  13.169+.IB x  [ i ] )
  13.170+or fields.
  13.171+Variables are initialized to the null string.
  13.172+Array subscripts may be any string,
  13.173+not necessarily numeric;
  13.174+this allows for a form of associative memory.
  13.175+Multiple subscripts such as
  13.176+.B [i,j,k]
  13.177+are permitted; the constituents are concatenated,
  13.178+separated by the value of
  13.179+.BR SUBSEP .
  13.180+.PP
  13.181+The
  13.182+.B print
  13.183+statement prints its arguments on the standard output
  13.184+(or on a file if
  13.185+.BI > file
  13.186+or
  13.187+.BI >> file
  13.188+is present or on a pipe if
  13.189+.BI | cmd
  13.190+is present), separated by the current output field separator,
  13.191+and terminated by the output record separator.
  13.192+.I file
  13.193+and
  13.194+.I cmd
  13.195+may be literal names or parenthesized expressions;
  13.196+identical string values in different statements denote
  13.197+the same open file.
  13.198+The
  13.199+.B printf
  13.200+statement formats its expression list according to the format
  13.201+(see
  13.202+.IR fprintf (2)) .
  13.203+The built-in function
  13.204+.BI close( expr )
  13.205+closes the file or pipe
  13.206+.IR expr .
  13.207+The built-in function
  13.208+.BI fflush( expr )
  13.209+flushes any buffered output for the file or pipe
  13.210+.IR expr .
  13.211+If
  13.212+.IR expr
  13.213+is omitted or is a null string, all open files are flushed.
  13.214+.PP
  13.215+The mathematical functions
  13.216+.BR exp ,
  13.217+.BR log ,
  13.218+.BR sqrt ,
  13.219+.BR sin ,
  13.220+.BR cos ,
  13.221+and
  13.222+.BR atan2 
  13.223+are built in.
  13.224+Other built-in functions:
  13.225+.TF length
  13.226+.TP
  13.227+.B length
  13.228+If its argument is a string, the string's length is returned.
  13.229+If its argument is an array, the number of subscripts in the array is returned.
  13.230+If no argument, the length of
  13.231+.B $0
  13.232+is returned.
  13.233+.TP
  13.234+.B rand
  13.235+random number on (0,1)
  13.236+.TP
  13.237+.B srand
  13.238+sets seed for
  13.239+.B rand
  13.240+and returns the previous seed.
  13.241+.TP
  13.242+.B int
  13.243+truncates to an integer value
  13.244+.TP
  13.245+.B utf
  13.246+converts its numerical argument, a character number, to a
  13.247+.SM UTF
  13.248+string
  13.249+.TP
  13.250+.BI substr( s , " m" , " n\fL)
  13.251+the
  13.252+.IR n -character
  13.253+substring of
  13.254+.I s
  13.255+that begins at position
  13.256+.IR m 
  13.257+counted from 1.
  13.258+.TP
  13.259+.BI index( s , " t" )
  13.260+the position in
  13.261+.I s
  13.262+where the string
  13.263+.I t
  13.264+occurs, or 0 if it does not.
  13.265+.TP
  13.266+.BI match( s , " r" )
  13.267+the position in
  13.268+.I s
  13.269+where the regular expression
  13.270+.I r
  13.271+occurs, or 0 if it does not.
  13.272+The variables
  13.273+.B RSTART
  13.274+and
  13.275+.B RLENGTH
  13.276+are set to the position and length of the matched string.
  13.277+.TP
  13.278+.BI split( s , " a" , " fs\fL)
  13.279+splits the string
  13.280+.I s
  13.281+into array elements
  13.282+.IB a [1]\f1,
  13.283+.IB a [2]\f1,
  13.284+\&...,
  13.285+.IB a [ n ]\f1,
  13.286+and returns
  13.287+.IR n .
  13.288+The separation is done with the regular expression
  13.289+.I fs
  13.290+or with the field separator
  13.291+.B FS
  13.292+if
  13.293+.I fs
  13.294+is not given.
  13.295+An empty string as field separator splits the string
  13.296+into one array element per character.
  13.297+.TP
  13.298+.BI sub( r , " t" , " s\fL)
  13.299+substitutes
  13.300+.I t
  13.301+for the first occurrence of the regular expression
  13.302+.I r
  13.303+in the string
  13.304+.IR s .
  13.305+If
  13.306+.I s
  13.307+is not given,
  13.308+.B $0
  13.309+is used.
  13.310+.TP
  13.311+.B gsub
  13.312+same as
  13.313+.B sub
  13.314+except that all occurrences of the regular expression
  13.315+are replaced;
  13.316+.B sub
  13.317+and
  13.318+.B gsub
  13.319+return the number of replacements.
  13.320+.TP
  13.321+.BI sprintf( fmt , " expr" , " ...\fL)
  13.322+the string resulting from formatting
  13.323+.I expr ...
  13.324+according to the
  13.325+.I printf
  13.326+format
  13.327+.I fmt
  13.328+.TP
  13.329+.BI system( cmd )
  13.330+executes
  13.331+.I cmd
  13.332+and returns its exit status
  13.333+.TP
  13.334+.BI tolower( str )
  13.335+returns a copy of
  13.336+.I str
  13.337+with all upper-case characters translated to their
  13.338+corresponding lower-case equivalents.
  13.339+.TP
  13.340+.BI toupper( str )
  13.341+returns a copy of
  13.342+.I str
  13.343+with all lower-case characters translated to their
  13.344+corresponding upper-case equivalents.
  13.345+.PD
  13.346+.PP
  13.347+The ``function''
  13.348+.B getline
  13.349+sets
  13.350+.B $0
  13.351+to the next input record from the current input file;
  13.352+.B getline
  13.353+.BI < file
  13.354+sets
  13.355+.B $0
  13.356+to the next record from
  13.357+.IR file .
  13.358+.B getline
  13.359+.I x
  13.360+sets variable
  13.361+.I x
  13.362+instead.
  13.363+Finally,
  13.364+.IB cmd " | getline
  13.365+pipes the output of
  13.366+.I cmd
  13.367+into
  13.368+.BR getline ;
  13.369+each call of
  13.370+.B getline
  13.371+returns the next line of output from
  13.372+.IR cmd .
  13.373+In all cases,
  13.374+.B getline
  13.375+returns 1 for a successful input,
  13.376+0 for end of file, and \-1 for an error.
  13.377+.PP
  13.378+Patterns are arbitrary Boolean combinations
  13.379+(with
  13.380+.BR "! || &&" )
  13.381+of regular expressions and
  13.382+relational expressions.
  13.383+Regular expressions are as in
  13.384+.IR regexp (6).
  13.385+Isolated regular expressions
  13.386+in a pattern apply to the entire line.
  13.387+Regular expressions may also occur in
  13.388+relational expressions, using the operators
  13.389+.BR ~
  13.390+and
  13.391+.BR !~ .
  13.392+.BI / re /
  13.393+is a constant regular expression;
  13.394+any string (constant or variable) may be used
  13.395+as a regular expression, except in the position of an isolated regular expression
  13.396+in a pattern.
  13.397+.PP
  13.398+A pattern may consist of two patterns separated by a comma;
  13.399+in this case, the action is performed for all lines
  13.400+from an occurrence of the first pattern
  13.401+though an occurrence of the second.
  13.402+.PP
  13.403+A relational expression is one of the following:
  13.404+.IP
  13.405+.I expression matchop regular-expression
  13.406+.br
  13.407+.I expression relop expression
  13.408+.br
  13.409+.IB expression " in " array-name
  13.410+.br
  13.411+.BI ( expr , expr,... ") in " array-name
  13.412+.PP
  13.413+where a
  13.414+.I relop
  13.415+is any of the six relational operators in C,
  13.416+and a
  13.417+.I matchop
  13.418+is either
  13.419+.B ~
  13.420+(matches)
  13.421+or
  13.422+.B !~
  13.423+(does not match).
  13.424+A conditional is an arithmetic expression,
  13.425+a relational expression,
  13.426+or a Boolean combination
  13.427+of these.
  13.428+.PP
  13.429+The special patterns
  13.430+.B BEGIN
  13.431+and
  13.432+.B END
  13.433+may be used to capture control before the first input line is read
  13.434+and after the last.
  13.435+.B BEGIN
  13.436+and
  13.437+.B END
  13.438+do not combine with other patterns.
  13.439+.PP
  13.440+Variable names with special meanings:
  13.441+.TF FILENAME
  13.442+.TP
  13.443+.B CONVFMT
  13.444+conversion format used when converting numbers
  13.445+(default
  13.446+.BR "%.6g" )
  13.447+.TP
  13.448+.B FS
  13.449+regular expression used to separate fields; also settable
  13.450+by option
  13.451+.BI \-F fs\f1.
  13.452+.TP
  13.453+.BR NF
  13.454+number of fields in the current record
  13.455+.TP
  13.456+.B NR
  13.457+ordinal number of the current record
  13.458+.TP
  13.459+.B FNR
  13.460+ordinal number of the current record in the current file
  13.461+.TP
  13.462+.B FILENAME
  13.463+the name of the current input file
  13.464+.TP
  13.465+.B RS
  13.466+input record separator (default newline)
  13.467+.TP
  13.468+.B OFS
  13.469+output field separator (default blank)
  13.470+.TP
  13.471+.B ORS
  13.472+output record separator (default newline)
  13.473+.TP
  13.474+.B OFMT
  13.475+output format for numbers (default
  13.476+.BR "%.6g" )
  13.477+.TP
  13.478+.B SUBSEP
  13.479+separates multiple subscripts (default 034)
  13.480+.TP
  13.481+.B ARGC
  13.482+argument count, assignable
  13.483+.TP
  13.484+.B ARGV
  13.485+argument array, assignable;
  13.486+non-null members are taken as file names
  13.487+.TP
  13.488+.B ENVIRON
  13.489+array of environment variables; subscripts are names.
  13.490+.PD
  13.491+.PP
  13.492+Functions may be defined (at the position of a pattern-action statement) thus:
  13.493+.IP
  13.494+.L
  13.495+function foo(a, b, c) { ...; return x }
  13.496+.PP
  13.497+Parameters are passed by value if scalar and by reference if array name;
  13.498+functions may be called recursively.
  13.499+Parameters are local to the function; all other variables are global.
  13.500+Thus local variables may be created by providing excess parameters in
  13.501+the function definition.
  13.502+.SH EXAMPLES
  13.503+.TP
  13.504+.L
  13.505+length($0) > 72
  13.506+Print lines longer than 72 characters.
  13.507+.TP
  13.508+.L
  13.509+{ print $2, $1 }
  13.510+Print first two fields in opposite order.
  13.511+.PP
  13.512+.EX
  13.513+BEGIN { FS = ",[ \et]*|[ \et]+" }
  13.514+      { print $2, $1 }
  13.515+.EE
  13.516+.ns
  13.517+.IP
  13.518+Same, with input fields separated by comma and/or blanks and tabs.
  13.519+.PP
  13.520+.EX
  13.521+	{ s += $1 }
  13.522+END	{ print "sum is", s, " average is", s/NR }
  13.523+.EE
  13.524+.ns
  13.525+.IP
  13.526+Add up first column, print sum and average.
  13.527+.TP
  13.528+.L
  13.529+/start/, /stop/
  13.530+Print all lines between start/stop pairs.
  13.531+.PP
  13.532+.EX
  13.533+BEGIN	{	# Simulate echo(1)
  13.534+	for (i = 1; i < ARGC; i++) printf "%s ", ARGV[i]
  13.535+	printf "\en"
  13.536+	exit }
  13.537+.EE
  13.538+.SH SOURCE
  13.539+.B /sys/src/cmd/awk
  13.540+.SH SEE ALSO
  13.541+.IR sed (1),
  13.542+.IR regexp (6),
  13.543+.br
  13.544+A. V. Aho, B. W. Kernighan, P. J. Weinberger,
  13.545+.I
  13.546+The AWK Programming Language,
  13.547+Addison-Wesley, 1988.  ISBN 0-201-07981-X
  13.548+.SH BUGS
  13.549+There are no explicit conversions between numbers and strings.
  13.550+To force an expression to be treated as a number add 0 to it;
  13.551+to force it to be treated as a string concatenate
  13.552+\&\fL""\fP to it.
  13.553+.br
  13.554+The scope rules for variables in functions are a botch;
  13.555+the syntax is worse.
  13.556+.br
  13.557+UTF is not always dealt with correctly,
  13.558+though
  13.559+.I awk
  13.560+does make an attempt to do so.
  13.561+The
  13.562+.I split
  13.563+function with an empty string as final argument now copes
  13.564+with UTF in the string being split.
    14.1new file mode 100755
    14.2--- /dev/null
    14.3+++ b/sys/man/1/basename
    14.4@@ -0,0 +1,35 @@
    14.5+.TH BASENAME 1 
    14.6+.SH NAME
    14.7+basename \- strip file name affixes
    14.8+.SH SYNOPSIS
    14.9+.B basename
   14.10+[
   14.11+.B -d
   14.12+]
   14.13+.I string
   14.14+[
   14.15+.I suffix
   14.16+]
   14.17+.SH DESCRIPTION
   14.18+.PP
   14.19+.I Basename
   14.20+deletes any prefix ending in slash
   14.21+.RB ( / )
   14.22+and the
   14.23+.IR suffix ,
   14.24+if present in
   14.25+.IR string ,
   14.26+from
   14.27+.IR string ,
   14.28+and prints the result on the standard output.
   14.29+.PP
   14.30+The
   14.31+.B -d
   14.32+option instead prints the directory component,
   14.33+that is,
   14.34+.I string
   14.35+up to but not including the final slash.
   14.36+If the string contains no slash,
   14.37+a period and newline are printed.
   14.38+.SH SOURCE
   14.39+.B /sys/src/cmd/basename.c
    15.1new file mode 100755
    15.2--- /dev/null
    15.3+++ b/sys/man/1/bc
    15.4@@ -0,0 +1,290 @@
    15.5+.TH BC 1 
    15.6+.SH NAME
    15.7+bc \- arbitrary-precision arithmetic language
    15.8+.SH SYNOPSIS
    15.9+.B bc
   15.10+[
   15.11+.B -cdls
   15.12+]
   15.13+[
   15.14+.I file ...
   15.15+]
   15.16+.SH DESCRIPTION
   15.17+.I Bc
   15.18+is an interactive processor for a language that resembles
   15.19+C but provides arithmetic on numbers of arbitrary length with up
   15.20+to 100 digits right of the decimal point.
   15.21+It takes input from any files given, then reads
   15.22+the standard input.
   15.23+.PP
   15.24+The
   15.25+.B -d
   15.26+option enables debugging output.
   15.27+The
   15.28+.B -l
   15.29+option stands for the name
   15.30+of an arbitrary precision math library.
   15.31+The
   15.32+.B -s
   15.33+option suppresses the automatic display
   15.34+of calculation results; all output is via the
   15.35+.B print
   15.36+command.
   15.37+.PP
   15.38+The following syntax for 
   15.39+.I bc
   15.40+programs is like that of C;
   15.41+.I L
   15.42+means letter
   15.43+.BR a - z ,
   15.44+.I E
   15.45+means expression,
   15.46+.I S
   15.47+means statement.
   15.48+.TF length(E)
   15.49+.TP
   15.50+Lexical
   15.51+.RS
   15.52+.HP
   15.53+comments are enclosed in
   15.54+.B /* */
   15.55+.HP
   15.56+newlines end statements
   15.57+.RE
   15.58+.TP
   15.59+Names
   15.60+.IP
   15.61+simple variables:
   15.62+.I L
   15.63+.br
   15.64+array elements:
   15.65+.IB L [ E ]
   15.66+.br
   15.67+The words
   15.68+.BR ibase ,
   15.69+.BR obase ,
   15.70+and
   15.71+.B scale
   15.72+.TP
   15.73+Other operands
   15.74+.IP
   15.75+arbitrarily long numbers with optional sign and decimal point.
   15.76+.RS
   15.77+.TP
   15.78+.BI ( E )
   15.79+.TP
   15.80+.BI sqrt( E )
   15.81+.TP
   15.82+.BI length( E )
   15.83+number of significant decimal digits
   15.84+.TP
   15.85+.BI scale( E )
   15.86+number of digits right of decimal point
   15.87+.TP
   15.88+.IB L ( E , ... ,\fIE\fP)
   15.89+function call
   15.90+.RE
   15.91+.TP
   15.92+Operators
   15.93+.RS
   15.94+.HP
   15.95+.B "+  -  *  /  %  ^\ "
   15.96+.RB ( %
   15.97+is remainder;
   15.98+.B ^
   15.99+is power)
  15.100+.HP
  15.101+.B "++  --\ "
  15.102+.TP
  15.103+.B "==  <=  >=  !=  <  >"
  15.104+.TP
  15.105+.B "=  +=  -=  *=  /=  %=  ^="
  15.106+.RE
  15.107+.TP
  15.108+Statements
  15.109+.RS
  15.110+.br
  15.111+.I E
  15.112+.br
  15.113+.B {
  15.114+.I S
  15.115+.B ;
  15.116+\&...
  15.117+.B ;
  15.118+.I S
  15.119+.B }
  15.120+.br
  15.121+.B "print"
  15.122+.I E
  15.123+.br
  15.124+.B "if ("
  15.125+.I E
  15.126+.B )
  15.127+.I S
  15.128+.br
  15.129+.B "while ("
  15.130+.I E
  15.131+.B )
  15.132+.I S
  15.133+.br
  15.134+.B "for ("
  15.135+.I E
  15.136+.B ;
  15.137+.I E
  15.138+.B ;
  15.139+.I E
  15.140+.B ")"
  15.141+.I  S
  15.142+.br
  15.143+null statement
  15.144+.br
  15.145+.B break
  15.146+.br
  15.147+.B quit
  15.148+.br
  15.149+\fL"\fRtext\fL"\fR
  15.150+.RE
  15.151+.TP
  15.152+Function definitions
  15.153+.RS
  15.154+.br
  15.155+.B define
  15.156+.I L
  15.157+.B (
  15.158+.I L
  15.159+.B ,
  15.160+\&...
  15.161+.B ,
  15.162+.I L
  15.163+.B ){
  15.164+.PD0
  15.165+.br
  15.166+.B auto
  15.167+.I L
  15.168+.B ,
  15.169+\&...
  15.170+.B ,
  15.171+.I L
  15.172+.br
  15.173+.I S
  15.174+.B ;
  15.175+\&...
  15.176+.B ;
  15.177+.I  S
  15.178+.br
  15.179+.B return
  15.180+.I E
  15.181+.LP
  15.182+.B }
  15.183+.RE
  15.184+.TP
  15.185+Functions in 
  15.186+.B -l
  15.187+math library
  15.188+.RS
  15.189+.TP
  15.190+.BI s( x )
  15.191+sine
  15.192+.TP
  15.193+.BI c( x )
  15.194+cosine
  15.195+.TP
  15.196+.BI e( x )
  15.197+exponential
  15.198+.TP
  15.199+.BI l( x )
  15.200+log
  15.201+.TP
  15.202+.BI a( x )
  15.203+arctangent
  15.204+.TP
  15.205+.BI j( "n, x" )
  15.206+Bessel function
  15.207+.RE
  15.208+.PP
  15.209+.DT
  15.210+All function arguments are passed by value.
  15.211+.PD
  15.212+.PP
  15.213+The value of an expression at the top level is printed
  15.214+unless the main operator is an assignment or the
  15.215+.B -s
  15.216+command line argument is given.
  15.217+Text in quotes, which may include newlines, is always printed.
  15.218+Either semicolons or newlines may separate statements.
  15.219+Assignment to
  15.220+.B scale
  15.221+influences the number of digits to be retained on arithmetic
  15.222+operations in the manner of
  15.223+.IR dc (1).
  15.224+Assignments to
  15.225+.B ibase
  15.226+or
  15.227+.B obase
  15.228+set the input and output number radix respectively.
  15.229+.PP
  15.230+The same letter may be used as an array, a function,
  15.231+and a simple variable simultaneously.
  15.232+All variables are global to the program.
  15.233+Automatic variables are pushed down during function calls.
  15.234+In a declaration of an array as a function argument
  15.235+or automatic variable
  15.236+empty square brackets must follow the array name.
  15.237+.PP
  15.238+.I Bc
  15.239+is actually a preprocessor for
  15.240+.IR dc (1),
  15.241+which it invokes automatically, unless the
  15.242+.B -c
  15.243+(compile only)
  15.244+option is present.
  15.245+In this case the
  15.246+.I dc
  15.247+input is sent to the standard output instead.
  15.248+.SH EXAMPLE
  15.249+Define a function to compute an approximate value of
  15.250+the exponential.
  15.251+Use it to print 10 values.
  15.252+(The exponential function in the library gives better answers.)
  15.253+.PP
  15.254+.EX
  15.255+scale = 20
  15.256+define e(x) {
  15.257+	auto a, b, c, i, s
  15.258+	a = 1
  15.259+	b = 1
  15.260+	s = 1
  15.261+	for(i=1; 1; i++) {
  15.262+		a *= x
  15.263+		b *= i
  15.264+		c = a/b
  15.265+		if(c == 0) return s
  15.266+		s += c
  15.267+	}
  15.268+}
  15.269+for(i=1; i<=10; i++) print e(i)
  15.270+.EE
  15.271+.SH FILES
  15.272+.B /sys/lib/bclib
  15.273+mathematical library
  15.274+.SH SOURCE
  15.275+.B /sys/src/cmd/bc.y
  15.276+.SH "SEE ALSO"
  15.277+.IR dc (1), 
  15.278+.IR hoc (1)
  15.279+.SH BUGS
  15.280+No
  15.281+.LR && ,
  15.282+.LR || ,
  15.283+or
  15.284+.L !
  15.285+operators.
  15.286+.PP
  15.287+A
  15.288+.L for
  15.289+statement must have all three
  15.290+.LR E s.
  15.291+.PP
  15.292+A
  15.293+.L quit
  15.294+is interpreted when read, not when executed.
    16.1new file mode 100755
    16.2--- /dev/null
    16.3+++ b/sys/man/1/bind
    16.4@@ -0,0 +1,215 @@
    16.5+.TH BIND 1
    16.6+.SH NAME
    16.7+bind, mount, unmount \- change name space
    16.8+.SH SYNOPSIS
    16.9+.B bind
   16.10+[
   16.11+.I option ...
   16.12+]
   16.13+.I new old
   16.14+.PP
   16.15+.B mount
   16.16+[
   16.17+.I option ...
   16.18+]
   16.19+.I servename old
   16.20+[
   16.21+.I spec
   16.22+]
   16.23+.PP
   16.24+.B unmount
   16.25+[
   16.26+.I new
   16.27+]
   16.28+.I old
   16.29+.SH DESCRIPTION
   16.30+.I Bind
   16.31+and
   16.32+.I mount
   16.33+modify the file name space of the current process
   16.34+and other processes in the same name space group
   16.35+(see
   16.36+.IR fork (2)).
   16.37+For both calls,
   16.38+.I old
   16.39+is the name of an existing file or directory in the
   16.40+current name space where the modification is to be made.
   16.41+.PP
   16.42+For
   16.43+.IR bind ,
   16.44+.I new
   16.45+is the name of another (or possibly the same)
   16.46+existing file or directory in
   16.47+the current name space.
   16.48+After a successful
   16.49+.IR bind ,
   16.50+the file name
   16.51+.I old
   16.52+is an alias for the object originally named by
   16.53+.IR new ;
   16.54+if the modification doesn't hide it,
   16.55+.I new
   16.56+will also still refer to its original file.
   16.57+The evaluation of
   16.58+.I new
   16.59+(see
   16.60+.IR intro (2))
   16.61+happens at the time of the
   16.62+.IR bind ,
   16.63+not when the binding is later used.
   16.64+.PP
   16.65+The
   16.66+.I servename
   16.67+argument to
   16.68+.I mount
   16.69+is the name of a file that, when opened, yields an
   16.70+existing connection to a file server.
   16.71+Almost always,
   16.72+.I servename
   16.73+will be a file in
   16.74+.B /srv
   16.75+(see
   16.76+.IR srv (3)).
   16.77+In the discussion below,
   16.78+.I new
   16.79+refers to the file named by the
   16.80+.I new
   16.81+argument to
   16.82+.I bind
   16.83+or the root directory of the service
   16.84+available in
   16.85+.I servename
   16.86+after a
   16.87+.IR mount .
   16.88+Either both
   16.89+.I old
   16.90+and
   16.91+.I new
   16.92+files must be directories,
   16.93+or both must not be directories.
   16.94+.PP
   16.95+Options control aspects of the modification to the name space:
   16.96+.TP 10
   16.97+(none)
   16.98+Replace the
   16.99+.I old
  16.100+file by the new one.
  16.101+Henceforth, an evaluation of
  16.102+.I old
  16.103+will be translated to the new file.
  16.104+If they are directories (for
  16.105+.IR mount ,
  16.106+this condition is true by definition),
  16.107+.I old
  16.108+becomes a
  16.109+.I "union directory"
  16.110+consisting of one directory (the new file).
  16.111+.TP
  16.112+.B -b
  16.113+Both files must be directories.
  16.114+Add the new directory to the beginning
  16.115+of the union directory represented by the old file.
  16.116+.TP
  16.117+.B -a
  16.118+Both files must be directories.
  16.119+Add the new directory to the end
  16.120+of the union directory represented by the old file.
  16.121+.TP
  16.122+.B -c
  16.123+This can be used in addition to any of the above to permit
  16.124+creation in a union directory.
  16.125+When a new file is created in a union directory,
  16.126+it is placed in the first element of the union that has been bound or mounted with the
  16.127+.B -c
  16.128+flag.
  16.129+If that directory does not have write permission, the create fails.
  16.130+.TP
  16.131+.B -C
  16.132+(Only in
  16.133+.IR mount .)
  16.134+By default, file contents are always retrieved from the server.
  16.135+With this option, the kernel may instead use a local cache to satisfy
  16.136+.IR read (5)
  16.137+requests for files accessible through this mount point.
  16.138+The currency of cached data for a file is verified at each
  16.139+.IR open (5)
  16.140+of the file from this client machine.
  16.141+.TP
  16.142+.B -q
  16.143+Exit silently if the
  16.144+.B bind
  16.145+or
  16.146+.B mount
  16.147+operation fails.
  16.148+.PD
  16.149+.PP
  16.150+.I Mount
  16.151+takes two additional options.
  16.152+The first,
  16.153+.B -k
  16.154+.IR keypattern ,
  16.155+constrains the set of 
  16.156+.IR factotum (4)
  16.157+keys used for an authenticated mount.
  16.158+The second,
  16.159+.BR -n ,
  16.160+causes
  16.161+.I mount
  16.162+to skip authentication entirely.
  16.163+.PP
  16.164+The
  16.165+.I spec
  16.166+argument to
  16.167+.I mount
  16.168+is passed in the
  16.169+.IR attach (5)
  16.170+message to the server, and selects among different
  16.171+file trees served by the server.
  16.172+.PP
  16.173+The
  16.174+.IR srv (3)
  16.175+service registry device, normally bound to
  16.176+.BR /srv ,
  16.177+is a convenient rendezvous point for services that can be mounted.
  16.178+After bootstrap, the file
  16.179+.B /srv/boot
  16.180+contains the communications port to the file system from which
  16.181+the system was loaded.
  16.182+.PP
  16.183+The effects of
  16.184+.I bind
  16.185+and
  16.186+.I mount
  16.187+can be undone with the
  16.188+.I unmount
  16.189+command.
  16.190+If two arguments are given to
  16.191+.IR unmount ,
  16.192+the effect is to undo a
  16.193+.I bind
  16.194+or
  16.195+.I mount
  16.196+with the same arguments.
  16.197+If only one argument is given,
  16.198+everything bound to or mounted upon
  16.199+.I old
  16.200+is unmounted.
  16.201+.SH EXAMPLES
  16.202+To compile a program with the C library from July 16, 1992:
  16.203+.IP
  16.204+.EX
  16.205+mount /srv/boot /n/dump dump
  16.206+bind /n/dump/1992/0716/mips/lib/libc.a /mips/lib/libc.a
  16.207+mk
  16.208+.EE
  16.209+.SH SOURCE
  16.210+.B /sys/src/cmd/bind.c
  16.211+.br
  16.212+.B /sys/src/cmd/mount.c
  16.213+.br
  16.214+.B /sys/src/cmd/unmount.c
  16.215+.SH SEE ALSO
  16.216+.IR bind (2),
  16.217+.IR open (2),
  16.218+.IR srv (3),
  16.219+.IR srv (4)
    17.1new file mode 100755
    17.2--- /dev/null
    17.3+++ b/sys/man/1/bitsyload
    17.4@@ -0,0 +1,146 @@
    17.5+.TH BITSYLOAD 1
    17.6+.SH NAME
    17.7+bitsyload, light, pencal, keyboard, params, prompter \- bitsy-specific utilities
    17.8+.SH SYNOPSIS
    17.9+.PP
   17.10+.B bitsy/bitsyload
   17.11+.B k|r
   17.12+[
   17.13+.I file
   17.14+]
   17.15+.PP
   17.16+.B bitsy/light
   17.17+[
   17.18+.I intensity
   17.19+]
   17.20+.PP
   17.21+.B bitsy/params
   17.22+[
   17.23+.B \-f
   17.24+]
   17.25+.PP
   17.26+.B bitsy/pencal
   17.27+.PP
   17.28+.B bitsy/keyboard
   17.29+[
   17.30+.B \-n
   17.31+]
   17.32+.PP
   17.33+.B bitsy/prompter
   17.34+[
   17.35+.B \-n
   17.36+]
   17.37+.I file
   17.38+.SH DESCRIPTION
   17.39+.PP
   17.40+.I Bitsyload
   17.41+erases a section of flash memory on the Bitsy (iPAQ 3650 or 3830)
   17.42+and copies new
   17.43+information into it, using the format required by the Compaq
   17.44+boot loader.  The required first argument is the destination, either
   17.45+.B k
   17.46+for
   17.47+.B /dev/flash/kernel
   17.48+or
   17.49+.B r
   17.50+for
   17.51+.BR /dev/flash/ramdisk .
   17.52+The optional second argument is the name of the file
   17.53+to load.  The default kernel file is
   17.54+.B /sys/src/9/bitsy/9bitsy
   17.55+and the default ramdisk file is
   17.56+.BR /sys/src/9/bitsy/ramdisk .
   17.57+.PP
   17.58+.I Light
   17.59+sets the intensity of the display backlight.
   17.60+The
   17.61+values for
   17.62+.I intensity
   17.63+are:
   17.64+.IP on
   17.65+set intensity to maximum, the default
   17.66+.IP off
   17.67+turn off backlight
   17.68+.IP \fIn\fP
   17.69+sets the intensity to
   17.70+.IR n ,
   17.71+where
   17.72+.I n
   17.73+is a value between 0 and 128.  Intensity 0 doesn't
   17.74+turn off the backlight, it just sets it to the dimmest
   17.75+value.
   17.76+.PP
   17.77+.I Pencal
   17.78+calibrates the display with the touch screen on a Bitsy.
   17.79+It loops prompting the user with crosses whose center that the user
   17.80+must touch with the stylus.  After a consistent set of touches,
   17.81+it writes the calibration both to the kernel and to standard out.
   17.82+It is normally called by the bitsy's
   17.83+.BR /bin/cpurc .
   17.84+.PP
   17.85+.I Params
   17.86+copies the contents of the file
   17.87+.BR /dev/tmpparams ,
   17.88+into the flash partition,
   17.89+.BR /dev/flash/params ,
   17.90+or if the
   17.91+.B -f
   17.92+flag it set copies in the opposite direction.
   17.93+.PP
   17.94+.I Keyboard
   17.95+creates a virtual on-screen keyboard and, unless the
   17.96+.B -n
   17.97+option is specified, a scribble area.
   17.98+A user inputs characters by tapping the keys or
   17.99+by drawing characters in the
  17.100+scribble area (see
  17.101+.IR scribble (2)).
  17.102+It is usually run as the keyboard command for
  17.103+.IR rio (1)
  17.104+using
  17.105+.BR rio 's
  17.106+.B -k
  17.107+option.
  17.108+.PP
  17.109+.I Prompter
  17.110+is a small editor used to configure parameters when a Bitsy boots.
  17.111+It displays the file and starts up a keyboard and scribble pad for
  17.112+input.
  17.113+Clicking with the stylus in the text selects where input characters will go.
  17.114+Pressing Button 5 (top left side of the Bitsy) or typing the
  17.115+.B Esc
  17.116+key on the keyboard causes
  17.117+.I prompter
  17.118+to write back the updated file and exit;
  17.119+.B Del
  17.120+causes
  17.121+.I prompter
  17.122+to exit without writing the file.
  17.123+The
  17.124+.B -n
  17.125+flag suppresses the scribble area.
  17.126+.SH EXAMPLE
  17.127+.PP
  17.128+.IR Prompter ,
  17.129+.IR params ,
  17.130+and
  17.131+.I calibrate
  17.132+are used in only one place, the Bitsy's
  17.133+.BR /rc/bin/cpurc :
  17.134+.sp
  17.135+.EX
  17.136+# set variables
  17.137+ramfs
  17.138+bitsy/params -f
  17.139+if(! grep -s '^calibrate=' /tmp/tmpparams)
  17.140+	bitsy/pencal >>/tmp/tmpparams
  17.141+if not {
  17.142+	eval `{grep '^calibrate=' /tmp/tmpparams}
  17.143+	echo calibrate $calibrate > '#m/mousectl'
  17.144+}
  17.145+bitsy/prompter /tmp/tmpparams
  17.146+bitsy/params
  17.147+. /tmp/tmpparams
  17.148+.EE
  17.149+.SH SOURCE
  17.150+.B /sys/src/cmd/bitsy
    18.1new file mode 100755
    18.2--- /dev/null
    18.3+++ b/sys/man/1/bundle
    18.4@@ -0,0 +1,53 @@
    18.5+.TH BUNDLE 1
    18.6+.SH NAME
    18.7+bundle \- collect files for distribution
    18.8+.SH SYNOPSIS
    18.9+.B bundle
   18.10+.I file ...
   18.11+.SH DESCRIPTION
   18.12+.I Bundle
   18.13+writes on its standard output a shell script for
   18.14+.IR rc (1)
   18.15+or a Bourne shell
   18.16+which, when executed,
   18.17+will recreate the original
   18.18+.IR files .
   18.19+Its main use is for distributing small numbers of text files by
   18.20+.IR mail (1).
   18.21+.PP
   18.22+Although less refined than standard archives from
   18.23+.IR ar (1)
   18.24+or
   18.25+.IR tar (1),
   18.26+a
   18.27+.IR bundle
   18.28+file
   18.29+is self-documenting and complete; little preparation is required on
   18.30+the receiving machine.
   18.31+.SH EXAMPLES
   18.32+.TP
   18.33+.L
   18.34+bundle mkfile *.[ch] | mail kremvax!boris
   18.35+Send a makefile to Boris together with related
   18.36+.L .c
   18.37+and
   18.38+.L .h
   18.39+files.
   18.40+Upon receiving the mail, Boris may save the file sans postmark,
   18.41+say in
   18.42+.BR gift/horse ,
   18.43+then do
   18.44+.TP
   18.45+.L
   18.46+cd gift; rc horse; mk
   18.47+.SH SOURCE
   18.48+.B /rc/bin/bundle
   18.49+.SH SEE ALSO
   18.50+.IR ar (1), 
   18.51+.IR tar (1), 
   18.52+.IR mail (1)
   18.53+.SH BUGS
   18.54+.I Bundle
   18.55+will not create directories and is unsatisfactory for non-text files.
   18.56+.PP
   18.57+Beware of gift horses.
    19.1new file mode 100755
    19.2--- /dev/null
    19.3+++ b/sys/man/1/cal
    19.4@@ -0,0 +1,46 @@
    19.5+.TH CAL 1
    19.6+.SH NAME
    19.7+cal \- print calendar
    19.8+.SH SYNOPSIS
    19.9+.B cal
   19.10+[
   19.11+.I month
   19.12+]
   19.13+[
   19.14+.I year
   19.15+]
   19.16+.SH DESCRIPTION
   19.17+.I Cal
   19.18+prints a calendar.
   19.19+.I Month
   19.20+is either a number from 1 to 12,
   19.21+a lower case month name,
   19.22+or a lower case three-letter prefix of a month name.
   19.23+.I Year
   19.24+can be between 1
   19.25+and 9999.
   19.26+If either
   19.27+.I month
   19.28+or
   19.29+.I year
   19.30+is omitted, the current month or year is used.
   19.31+If only one argument is given, and it is a number larger than 12,
   19.32+a calendar for all twelve months of the given year is produced;
   19.33+otherwise a calendar for just one month is printed.
   19.34+The calendar
   19.35+produced is that for England and her colonies.
   19.36+.PP
   19.37+Try
   19.38+.EX
   19.39+	cal sep 1752
   19.40+.EE
   19.41+.SH SOURCE
   19.42+.B /sys/src/cmd/cal.c
   19.43+.SH BUGS
   19.44+The year is always considered to start in January even though this
   19.45+is historically naive.
   19.46+.PP
   19.47+Beware that
   19.48+.L "cal 90"
   19.49+refers to the early Christian era,
   19.50+not the 20th century.
    20.1new file mode 100755
    20.2--- /dev/null
    20.3+++ b/sys/man/1/calendar
    20.4@@ -0,0 +1,62 @@
    20.5+.TH CALENDAR 1
    20.6+.SH NAME
    20.7+calendar \- print upcoming events
    20.8+.SH SYNOPSIS
    20.9+.B calendar
   20.10+[
   20.11+.B -dy
   20.12+]
   20.13+[
   20.14+.B -p
   20.15+.I days
   20.16+]
   20.17+[
   20.18+.I file ...
   20.19+]
   20.20+.SH DESCRIPTION
   20.21+.I Calendar
   20.22+reads the named files, default
   20.23+.BR /usr/$user/lib/calendar ,
   20.24+and writes to standard output any lines
   20.25+containing today's or tomorrow's date.
   20.26+Examples of recognized date formats are 
   20.27+"4/11",
   20.28+"April 11",
   20.29+"Apr 11",
   20.30+"11 April",
   20.31+and
   20.32+"11 Apr".
   20.33+A special form may be used to represent weekly and
   20.34+monthly events:
   20.35+"Every Tuesday"
   20.36+"The third Wednesday"
   20.37+All comparisons are case insensitive.
   20.38+.PP
   20.39+If the
   20.40+.B -y
   20.41+flag is given, an attempt is made to match on year too.  In this case,
   20.42+dates of the forms listed above will be accepted if they are followed
   20.43+by the current year (or last two digits thereof) or not a year —
   20.44+digits not followed by white space or non-digits.
   20.45+.PP
   20.46+If the
   20.47+.B -p
   20.48+flag is given, its argument is the number of days ahead to match
   20.49+dates.  This flag is not repeatable, and it performs no special
   20.50+processing at the end of the week.
   20.51+.PP
   20.52+The
   20.53+.B -d
   20.54+flag enables debugging output.
   20.55+.PP
   20.56+On Friday and Saturday, events through Monday are printed.
   20.57+.PP
   20.58+To have your calendar mailed to you every day, use
   20.59+.IR cron (8).
   20.60+.SH FILES
   20.61+.TF /usr/$user/lib/calendar
   20.62+.TP
   20.63+.B /usr/$user/lib/calendar
   20.64+personal calendar
   20.65+.SH SOURCE
   20.66+.B /sys/src/cmd/calendar.c
    21.1new file mode 100755
    21.2--- /dev/null
    21.3+++ b/sys/man/1/cat
    21.4@@ -0,0 +1,87 @@
    21.5+.TH CAT 1
    21.6+.SH NAME
    21.7+cat, read \- catenate files
    21.8+.SH SYNOPSIS
    21.9+.B cat
   21.10+[
   21.11+.I file ...
   21.12+]
   21.13+.br
   21.14+.B read
   21.15+[
   21.16+.B -m
   21.17+] [
   21.18+.B -n
   21.19+.I nline
   21.20+] [
   21.21+.I file ...
   21.22+]
   21.23+.SH DESCRIPTION
   21.24+.I Cat
   21.25+reads each
   21.26+.I file
   21.27+in sequence and writes it on the standard output.
   21.28+Thus
   21.29+.IP
   21.30+.L
   21.31+cat file
   21.32+.LP
   21.33+prints a file and
   21.34+.IP
   21.35+.L
   21.36+cat file1 file2 >file3
   21.37+.LP
   21.38+concatenates the first two files and places the result
   21.39+on the third.
   21.40+.PP
   21.41+If no
   21.42+.I file
   21.43+is given,
   21.44+.I cat 
   21.45+reads from the standard input.
   21.46+Output is buffered in blocks matching the input.
   21.47+.PP
   21.48+.I Read
   21.49+copies to standard output exactly one line from the named
   21.50+.IR file ,
   21.51+default standard input.
   21.52+It is useful in interactive
   21.53+.IR rc (1)
   21.54+scripts.
   21.55+.PP
   21.56+The
   21.57+.B -m
   21.58+flag causes it to continue reading and writing multiple lines until end of file;
   21.59+.B -n
   21.60+causes it to read no more than
   21.61+.I nline
   21.62+lines.
   21.63+.PP
   21.64+.I Read
   21.65+always executes a single
   21.66+.B write
   21.67+for each line of input, which can be helpful when
   21.68+preparing input to programs that expect line-at-a-time data.
   21.69+It never reads any more data from the input than it prints to the output.
   21.70+.SH SOURCE
   21.71+.B /sys/src/cmd/cat.c
   21.72+.br
   21.73+.B /sys/src/cmd/read.c
   21.74+.SH SEE ALSO
   21.75+.IR cp (1)
   21.76+.SH DIAGNOSTICS
   21.77+.I Read
   21.78+exits with status
   21.79+.B eof
   21.80+on end of file or, in the
   21.81+.B -n
   21.82+case, if it doesn't read
   21.83+.I nlines
   21.84+lines.
   21.85+.SH BUGS
   21.86+Beware of
   21.87+.L "cat a b >a"
   21.88+and
   21.89+.LR "cat a b >b" ,
   21.90+which
   21.91+destroy input files before reading them.
    22.1new file mode 100755
    22.2--- /dev/null
    22.3+++ b/sys/man/1/cb
    22.4@@ -0,0 +1,46 @@
    22.5+.TH CB 1
    22.6+.SH NAME
    22.7+cb \- C program beautifier
    22.8+.SH SYNOPSIS
    22.9+.B cb
   22.10+[
   22.11+.B -js
   22.12+]
   22.13+[
   22.14+.B -l
   22.15+.I length
   22.16+]
   22.17+[
   22.18+.I file
   22.19+\&...
   22.20+]
   22.21+.SH DESCRIPTION
   22.22+.I Cb
   22.23+reads syntactically correct C programs from
   22.24+from its input or the given files, and writes them to its stdout
   22.25+with a more visually pleasing spacing and indentation.
   22.26+.I Cb
   22.27+understands no C++ syntax bar newline-terminated comments;
   22.28+and by default all user new-lines are preserved in the output.
   22.29+.PP
   22.30+The options are:
   22.31+.TP
   22.32+.B -j
   22.33+Join split lines.
   22.34+.TP 
   22.35+.B -s
   22.36+Print code in the so-called K&R style used in
   22.37+.IR "The C Programming Language" .
   22.38+.TP 
   22.39+.B -l length
   22.40+Split lines that are longer than
   22.41+.IR length .
   22.42+.PD
   22.43+.SH SOURCE
   22.44+.B /sys/src/cmd/cb
   22.45+.SH BUGS
   22.46+.I Cb
   22.47+does not reformat structure initializers.
   22.48+.br
   22.49+Punctuation hidden in macros can cause
   22.50+indentation errors.
    23.1new file mode 100755
    23.2--- /dev/null
    23.3+++ b/sys/man/1/chgrp
    23.4@@ -0,0 +1,36 @@
    23.5+.TH CHGRP 1 
    23.6+.SH NAME
    23.7+chgrp \- change file group
    23.8+.SH SYNOPSIS
    23.9+.B chgrp
   23.10+[
   23.11+.B -ou
   23.12+]
   23.13+.I group file ...
   23.14+.SH DESCRIPTION
   23.15+The group of
   23.16+each named file
   23.17+is changed to
   23.18+.IR group ,
   23.19+which should be a name known to the server holding the file.
   23.20+.PP
   23.21+A file's group can be changed by the file's owner, if the
   23.22+owner is a member of the new group,
   23.23+or by the leader of both
   23.24+the file's current group and the new group.
   23.25+.PP
   23.26+The
   23.27+.B -o
   23.28+and
   23.29+.B -u
   23.30+option are synonyms; they specify that the
   23.31+.I owner
   23.32+is to be set, rather than the group.
   23.33+They are ineffectual unless the file server is in the bootstrap
   23.34+state that permits changing file ownership.
   23.35+.SH SOURCE
   23.36+.B /sys/src/cmd/chgrp.c
   23.37+.SH "SEE ALSO"
   23.38+.IR ls (1),
   23.39+.IR chmod (1),
   23.40+.IR stat (2)
    24.1new file mode 100755
    24.2--- /dev/null
    24.3+++ b/sys/man/1/chmod
    24.4@@ -0,0 +1,106 @@
    24.5+.TH CHMOD 1 
    24.6+.SH NAME
    24.7+chmod \- change mode
    24.8+.SH SYNOPSIS
    24.9+.B chmod
   24.10+.I mode file ...
   24.11+.SH DESCRIPTION
   24.12+The mode of
   24.13+each named file
   24.14+is changed
   24.15+according to
   24.16+.IR mode,
   24.17+which may be an octal number or a symbolic change to the existing mode.
   24.18+A
   24.19+.I mode
   24.20+is an octal
   24.21+number constructed
   24.22+from the OR of the
   24.23+following modes.
   24.24+.TF 0000
   24.25+.TP
   24.26+0400
   24.27+read by owner
   24.28+.TP
   24.29+0200
   24.30+write by owner
   24.31+.TP
   24.32+0100
   24.33+execute (search in directory) by owner
   24.34+.TP
   24.35+0070
   24.36+read, write, execute (search) by group
   24.37+.TP
   24.38+0007
   24.39+read, write, execute (search) by others
   24.40+.PD
   24.41+.PP
   24.42+A symbolic
   24.43+.I mode
   24.44+has the form:
   24.45+.IP
   24.46+.RI [who]
   24.47+.I op permission
   24.48+.PP
   24.49+The
   24.50+.I who
   24.51+part is a combination
   24.52+of the letters 
   24.53+.B u
   24.54+(for user's permissions),
   24.55+.B g
   24.56+(group)
   24.57+and
   24.58+.B o
   24.59+(other).
   24.60+The letter
   24.61+.B a
   24.62+stands for
   24.63+.BR ugo .
   24.64+If
   24.65+.I who
   24.66+is omitted,
   24.67+the default is
   24.68+.BR a .
   24.69+.PP
   24.70+.I Op
   24.71+can be
   24.72+.B +
   24.73+to add
   24.74+.I permission
   24.75+to the file's mode,
   24.76+.B -
   24.77+to take away
   24.78+.IR permission ,
   24.79+and
   24.80+.B =
   24.81+to assign
   24.82+.I permission
   24.83+absolutely
   24.84+(all other bits will
   24.85+be reset).
   24.86+.PP
   24.87+.I Permission
   24.88+is any combination of the letters
   24.89+.B r
   24.90+(read),
   24.91+.B w
   24.92+(write),
   24.93+.B x
   24.94+(execute),
   24.95+.B a
   24.96+(append only),
   24.97+.B l
   24.98+(exclusive access),
   24.99+and
  24.100+.B t
  24.101+(temporary file).
  24.102+.PP
  24.103+Only the owner of a file or the group leader of its group
  24.104+may change the file's mode.
  24.105+.SH SOURCE
  24.106+.B /sys/src/cmd/chmod.c
  24.107+.SH "SEE ALSO"
  24.108+.IR ls (1),
  24.109+.IR stat (2),
  24.110+.IR stat (5)
    25.1new file mode 100755
    25.2--- /dev/null
    25.3+++ b/sys/man/1/cleanname
    25.4@@ -0,0 +1,32 @@
    25.5+.TH CLEANNAME 1
    25.6+.SH NAME
    25.7+cleanname \- clean a path name
    25.8+.SH SYNOPSIS
    25.9+.B cleanname
   25.10+[
   25.11+.B -d 
   25.12+.I pwd
   25.13+]
   25.14+.I names ...
   25.15+.SH DESCRIPTION
   25.16+For each file name argument, 
   25.17+.IR cleanname ,
   25.18+by lexical processing only, 
   25.19+prints the shortest equivalent string that names the same
   25.20+(possibly hypothetical) file.
   25.21+It eliminates multiple and trailing slashes, and it lexically
   25.22+interprets
   25.23+.B .
   25.24+and
   25.25+.B ..
   25.26+directory components in the name.
   25.27+If the 
   25.28+.B -d
   25.29+option is present,
   25.30+unrooted names are prefixed with
   25.31+.IB pwd /
   25.32+before processing.
   25.33+.SH SOURCE
   25.34+.B /sys/src/cmd/cleanname.c
   25.35+.SH SEE ALSO
   25.36+.IR cleanname (2).
    26.1new file mode 100755
    26.2--- /dev/null
    26.3+++ b/sys/man/1/cmp
    26.4@@ -0,0 +1,57 @@
    26.5+.TH CMP 1 
    26.6+.SH NAME
    26.7+cmp \- compare two files
    26.8+.SH SYNOPSIS
    26.9+.B cmp
   26.10+[
   26.11+.B -lLs
   26.12+]
   26.13+.I file1 file2
   26.14+[
   26.15+.I offset1
   26.16+[
   26.17+.I offset2
   26.18+]
   26.19+]
   26.20+.SH DESCRIPTION
   26.21+.I Cmp
   26.22+compares the two files and prints
   26.23+a message if the contents differ.
   26.24+.PP
   26.25+The options are:
   26.26+.TP
   26.27+.B -l
   26.28+Print the byte number (decimal) and the
   26.29+differing bytes (hexadecimal) for each difference.
   26.30+.TP
   26.31+.B -L
   26.32+Print the line number of the first differing byte.
   26.33+.TP
   26.34+.B -s
   26.35+Print nothing for differing files,
   26.36+but set the exit status.
   26.37+.PD
   26.38+.PP
   26.39+If offsets are given,
   26.40+comparison starts at the designated byte position
   26.41+of the corresponding file.
   26.42+Offsets that begin with
   26.43+.B 0x
   26.44+are hexadecimal;
   26.45+with
   26.46+.BR 0 ,
   26.47+octal; with anything else, decimal.
   26.48+.SH SOURCE
   26.49+.B /sys/src/cmd/cmp.c
   26.50+.SH SEE ALSO
   26.51+.IR diff (1) 
   26.52+.SH DIAGNOSTICS
   26.53+If a file is inaccessible or missing, the exit status is
   26.54+.LR open .
   26.55+If the files are the same, the exit status is empty (true).
   26.56+If they are the same except that one is longer than the other, the exit status is
   26.57+.LR EOF .
   26.58+Otherwise
   26.59+.I cmp
   26.60+reports the position of the first disagreeing byte and the exit status is
   26.61+.LR differ .
    27.1new file mode 100755
    27.2--- /dev/null
    27.3+++ b/sys/man/1/col
    27.4@@ -0,0 +1,55 @@
    27.5+.TH COL 1
    27.6+.SH NAME
    27.7+col \- column alignment
    27.8+.SH SYNOPSIS
    27.9+.B col
   27.10+[
   27.11+.B -bfx 
   27.12+]
   27.13+.SH DESCRIPTION
   27.14+.I Col
   27.15+overlays lines to expunge reverse line feeds
   27.16+(ESC-7)
   27.17+and half line feeds (ESC-9 and ESC-8)
   27.18+as produced by
   27.19+.I nroff
   27.20+for .2C in
   27.21+.IR ms (6)
   27.22+or
   27.23+.IR man (6)
   27.24+and for 
   27.25+.IR tbl (1).
   27.26+.I Col
   27.27+is a pure filter.
   27.28+It normally emits only full line feeds;
   27.29+option 
   27.30+.B -f
   27.31+(fine) allows half line feeds too.
   27.32+Option 
   27.33+.B -b
   27.34+removes backspaces, printing just one of each pile of overstruck
   27.35+characters.
   27.36+.I Col
   27.37+normally converts white space to tabs;
   27.38+option
   27.39+.B -x
   27.40+overrides this feature.
   27.41+Other escaped characters and non-printing characters are ignored.
   27.42+.SH EXAMPLES
   27.43+.TP
   27.44+.L
   27.45+tbl file | nroff -ms | col | p
   27.46+Format some tables for printing on typewriters;
   27.47+use
   27.48+.I col
   27.49+to remove reverse line feeds, and 
   27.50+paginate the output.
   27.51+.SH SEE ALSO
   27.52+.IR pr (1)
   27.53+.SH BUGS
   27.54+.I Col
   27.55+can't back up more than 128 lines or
   27.56+handle more than 800 characters per line,
   27.57+and understands
   27.58+.L VT
   27.59+(013) as reverse line feed.
    28.1new file mode 100755
    28.2--- /dev/null
    28.3+++ b/sys/man/1/colors
    28.4@@ -0,0 +1,72 @@
    28.5+.TH COLORS 1
    28.6+.SH NAME
    28.7+getmap, colors \- display color map
    28.8+.SH SYNOPSIS
    28.9+.PP
   28.10+.B colors
   28.11+[
   28.12+.B -rx
   28.13+]
   28.14+.PP
   28.15+.B getmap
   28.16+[
   28.17+.I colormap
   28.18+]
   28.19+.SH DESCRIPTION
   28.20+.I Colors
   28.21+presents a grid showing the colors in the current color map.
   28.22+If the display is true color,
   28.23+.I colors
   28.24+shows a grid of the RGBV color map
   28.25+(see
   28.26+.IR color (6)).
   28.27+.PP
   28.28+Clicking mouse button 1 over a color in the grid will display the map index for that color,
   28.29+its
   28.30+red, green, and blue components,
   28.31+and the 32-bit hexadecimal color value as defined in
   28.32+.IR allocimage (2).
   28.33+If the
   28.34+.B -x
   28.35+option is specified, the components will also be listed in hexadecimal.
   28.36+.PP
   28.37+The
   28.38+.B -r
   28.39+option instead shows, in the same form, a grey-scale ramp.
   28.40+.PP
   28.41+A menu on mouse button 3 contains a single entry, to exit the program.
   28.42+.PP
   28.43+On 8-bit color-mapped displays,
   28.44+.I getmap
   28.45+loads the display's color map (default
   28.46+.BR rgbv ).
   28.47+The named
   28.48+.I colormap
   28.49+can be a file in the current directory or in the standard repository
   28.50+.BR /lib/cmap .
   28.51+It can also be a string of the form
   28.52+.B gamma
   28.53+or
   28.54+.BI gamma N\f1 ,
   28.55+where
   28.56+.I N
   28.57+is a floating point value for the gamma, defining the contrast for a monochrome map.
   28.58+Similarly,
   28.59+.B rgamma
   28.60+and
   28.61+.BI rgamma N
   28.62+define a reverse-video monochrome map.
   28.63+Finally, the names
   28.64+.B screen
   28.65+or
   28.66+.B display
   28.67+or
   28.68+.B vga
   28.69+are taken as synonyms for the current color map stored in the display hardware.
   28.70+.SH FILES
   28.71+.B /lib/cmap
   28.72+directory of color map files
   28.73+.SH SOURCE
   28.74+.B /sys/src/cmd/colors.c
   28.75+.SH SEE ALSO
   28.76+.IR color (6)
    29.1new file mode 100755
    29.2--- /dev/null
    29.3+++ b/sys/man/1/comm
    29.4@@ -0,0 +1,47 @@
    29.5+.TH COMM 1 
    29.6+.CT 1 files
    29.7+.SH NAME
    29.8+comm \- select or reject lines common to two sorted files
    29.9+.SH SYNOPSIS
   29.10+.B comm
   29.11+[
   29.12+.B -123
   29.13+]
   29.14+.I file1 file2
   29.15+.SH DESCRIPTION
   29.16+.I Comm
   29.17+reads
   29.18+.I file1
   29.19+and
   29.20+.IR file2 ,
   29.21+which are in lexicographical order,
   29.22+and produces a three column output: lines only in
   29.23+.IR file1 ;
   29.24+lines only in
   29.25+.IR file2 ;
   29.26+and lines in both files.
   29.27+The file name
   29.28+.L -
   29.29+means the standard input.
   29.30+.PP
   29.31+Flag
   29.32+.LR 1 ,
   29.33+.LR 2 ,
   29.34+or
   29.35+.LR 3
   29.36+suppresses printing of the corresponding
   29.37+column.
   29.38+.SH EXAMPLE
   29.39+.TP
   29.40+.EX
   29.41+comm -12 file1 file2
   29.42+.EE
   29.43+.IP
   29.44+Print lines common to two sorted files.
   29.45+.SH SOURCE
   29.46+.B /sys/src/cmd/comm.c
   29.47+.SH "SEE ALSO"
   29.48+.IR sort (1),
   29.49+.IR cmp (1), 
   29.50+.IR diff (1), 
   29.51+.IR uniq (1)
    30.1new file mode 100755
    30.2--- /dev/null
    30.3+++ b/sys/man/1/con
    30.4@@ -0,0 +1,315 @@
    30.5+.TH CON 1
    30.6+.SH NAME
    30.7+con, telnet, rx, hayes, xms, xmr \- remote login, execution, and XMODEM file transfer
    30.8+.SH SYNOPSIS
    30.9+.B con
   30.10+[
   30.11+.B -CdnrRsTv
   30.12+]
   30.13+[
   30.14+.B -b
   30.15+.I baud
   30.16+]
   30.17+[
   30.18+.B -l
   30.19+[
   30.20+.I user
   30.21+]
   30.22+]
   30.23+[
   30.24+.B -S
   30.25+.I svc
   30.26+]
   30.27+[
   30.28+.B -c
   30.29+.I cmd
   30.30+]
   30.31+.RI [ net !] machine
   30.32+.PP
   30.33+.B telnet
   30.34+[
   30.35+.B -dCrn
   30.36+]
   30.37+[
   30.38+.B -s
   30.39+.I svc
   30.40+]
   30.41+.RI [ net !] machine
   30.42+.PP
   30.43+.B rx
   30.44+[
   30.45+.B -eTr
   30.46+]
   30.47+[
   30.48+.B -l
   30.49+.I user
   30.50+]
   30.51+.RI [ net !] machine
   30.52+[
   30.53+.I command-word ...
   30.54+]
   30.55+.PP
   30.56+.B hayes
   30.57+[
   30.58+.B -pv
   30.59+]
   30.60+.I number
   30.61+[
   30.62+.I device
   30.63+]
   30.64+.PP
   30.65+.B xms
   30.66+[
   30.67+.B -1p
   30.68+]
   30.69+.I file
   30.70+.PP
   30.71+.B xmr
   30.72+.I file
   30.73+.SH DESCRIPTION
   30.74+.I Con
   30.75+connects to the computer whose network address is
   30.76+.IR net ! machine
   30.77+and logs in if possible.
   30.78+With no options, the account name used on the remote system is the same
   30.79+as that on the local system.
   30.80+Standard input and output go to the local machine.
   30.81+.PP
   30.82+Options are:
   30.83+.TP
   30.84+.B -b
   30.85+sets the baud rate of a dial-up connection to
   30.86+.IR baud .
   30.87+.TP
   30.88+.B -n
   30.89+if the input is a file or pipe, do not hang up the connection when EOF is received,
   30.90+but instead wait for the remote end to hang up.
   30.91+.TP
   30.92+.B -l
   30.93+with an argument causes
   30.94+.I user
   30.95+to be used as the account name on the remote system
   30.96+when performing BSD
   30.97+.I rlogin
   30.98+authentication.
   30.99+Without an argument this option disables automatic login
  30.100+and a normal login session ensues.
  30.101+.TP
  30.102+.B -C
  30.103+forces cooked mode, that is, local echo.
  30.104+.TP
  30.105+.B -c
  30.106+runs
  30.107+.I cmd
  30.108+as if it had been typed as a command from the escape mode.
  30.109+.TP
  30.110+.B -v
  30.111+(verbose mode) causes information about connection attempts
  30.112+to be output to standard error.  This can be useful when
  30.113+trying to debug network connectivity.
  30.114+.TP
  30.115+.B -d
  30.116+causes debugging information to be output to standard error.
  30.117+.TP
  30.118+.B -r
  30.119+suppresses printing of any carriage return followed by a new line.
  30.120+This is useful since carriage return is a printable character in
  30.121+Plan 9.
  30.122+.TP
  30.123+.B -R
  30.124+translates newlines to carriage returns and
  30.125+.IR "vice versa" .
  30.126+.TP
  30.127+.B -T
  30.128+translates incoming carriage returns to newlines.
  30.129+.TP
  30.130+.B -s
  30.131+strips received characters to 7 bits to forestall
  30.132+misinterpretation of
  30.133+.SM ASCII
  30.134+with parity as
  30.135+.SM UTF\c
  30.136+\&.
  30.137+.TP
  30.138+.B -S
  30.139+Post a pipe as
  30.140+.BI /srv/ svc
  30.141+and connect it to standard input and output.
  30.142+This can be used with
  30.143+.B -n
  30.144+to create a standing connection that
  30.145+.IR consolefs (4),
  30.146+for example,
  30.147+can then open.
  30.148+For
  30.149+.IR telnet ,
  30.150+this option is
  30.151+.BR -s .
  30.152+.PP
  30.153+The
  30.154+.RB control\- \e
  30.155+character is a local escape.
  30.156+It prompts with
  30.157+.BR >>> .
  30.158+Legitimate responses to the prompt are
  30.159+.TP
  30.160+.B i
  30.161+Send a quit [sic] signal to the remote machine.
  30.162+.PD0
  30.163+.TP
  30.164+.B q
  30.165+Exit.
  30.166+.TP
  30.167+.B b
  30.168+Send a break.
  30.169+.TP
  30.170+.B .
  30.171+Return from the escape.
  30.172+.TP
  30.173+.B !cmd
  30.174+Run the command with the network connection as its
  30.175+standard input and standard output.
  30.176+Standard error will go to the screen.
  30.177+This is useful for transmitting and receiving files
  30.178+over the connections using programs such as
  30.179+.IR xms .
  30.180+.TP
  30.181+.B r
  30.182+Toggle printing of carriage returns.
  30.183+.PD
  30.184+.PP
  30.185+.I Telnet
  30.186+is similar to con, but uses the
  30.187+.I telnet
  30.188+protocol to communicate with the remote machine.
  30.189+It shares
  30.190+.I con's
  30.191+.BR -C ,
  30.192+.BR -d ,
  30.193+.BR -n ,
  30.194+and
  30.195+.BR -r
  30.196+options.
  30.197+.PP
  30.198+.I Rx
  30.199+executes one shell command
  30.200+on the remote machine as if logged in there,
  30.201+but with local standard input and output.
  30.202+A rudimentary shell environment is provided.
  30.203+If the target is a Plan 9 machine,
  30.204+.B $service
  30.205+there will be
  30.206+.BR rx .
  30.207+Options are:
  30.208+.TP
  30.209+.B \-e
  30.210+a zero length message will not be written to the
  30.211+connection when standard input is closed.
  30.212+.TP
  30.213+.B \-l
  30.214+runs as
  30.215+.I user
  30.216+on the remote machine if the remote is a BSD machine.
  30.217+.TP
  30.218+.B \-r
  30.219+same as for
  30.220+.I con
  30.221+.TP
  30.222+.B -T
  30.223+same as for
  30.224+.I con
  30.225+.PD
  30.226+.PP
  30.227+Network addresses for both
  30.228+.I con
  30.229+and
  30.230+.I rx
  30.231+have the form
  30.232+.IB network ! machine\f1.
  30.233+Supported networks are those listed in
  30.234+.BR /net .
  30.235+.PP
  30.236+.I Hayes
  30.237+dials
  30.238+.I number
  30.239+on a Hayes-compatible modem,
  30.240+.IR device .
  30.241+Under
  30.242+.BR -p ,
  30.243+it uses pulse dialing.
  30.244+Upon connecting,
  30.245+bytes are copied bidirectionally
  30.246+between the connection and standard input and output.
  30.247+.PP
  30.248+The commands
  30.249+.I xms
  30.250+and
  30.251+.I xmr
  30.252+respectively send and receive a single file using the
  30.253+XMODEM protocol.
  30.254+They use standard input and standard output for communication
  30.255+and are intended for use with
  30.256+.IR con .
  30.257+The
  30.258+.B -1
  30.259+option to
  30.260+.I xms
  30.261+causes it to use kilobyte packet size of 1024 bytes.
  30.262+The
  30.263+.B -p
  30.264+option causes it to print a progress
  30.265+message every ten kilobytes.
  30.266+.SH EXAMPLES
  30.267+.TP
  30.268+.L
  30.269+rx kremvax cat file1 >file2
  30.270+Copy remote
  30.271+.I file1
  30.272+to local
  30.273+.IR file2 .
  30.274+.TP
  30.275+.L
  30.276+rx kremvax cat file1 '>file2'
  30.277+Copy remote
  30.278+.I file1
  30.279+to remote
  30.280+.IR file2.
  30.281+.TP
  30.282+.L
  30.283+eqn paper | rx kremvax troff -ms | rx deepthought lp
  30.284+Parallel processing:
  30.285+do each stage of a pipeline on a different machine.
  30.286+.SH SOURCE
  30.287+.TF /sys/src/cmd/ip/telnet.c
  30.288+.TP
  30.289+.B /sys/src/cmd/rx.c
  30.290+.TP
  30.291+.B /sys/src/cmd/ip/telnet.c
  30.292+.TP
  30.293+.B /sys/src/cmd/con
  30.294+for all other commands
  30.295+.SH SEE ALSO
  30.296+.IR cpu (1),
  30.297+.IR ssh (1),
  30.298+.IR telco (4)
  30.299+.SH BUGS
  30.300+.I Con
  30.301+and
  30.302+.I telnet
  30.303+are merely obsolescent;
  30.304+the other commands are obsolete and deprecated.
  30.305+.PP
  30.306+Under
  30.307+.IR rx ,
  30.308+a program
  30.309+that should behave specially towards terminals may not: e.g.,
  30.310+remote shells will not prompt.
  30.311+Also under
  30.312+.IR rx ,
  30.313+the remote standard error and standard output are combined 
  30.314+and go inseparably to the local standard output.
  30.315+.I Rx
  30.316+will consume its standard input by copying it to the remote system,
  30.317+so redirect it from
  30.318+.BR /dev/null
  30.319+if that's not what you want.
    31.1new file mode 100755
    31.2--- /dev/null
    31.3+++ b/sys/man/1/cp
    31.4@@ -0,0 +1,130 @@
    31.5+.TH CP 1 
    31.6+.SH NAME
    31.7+cp, fcp, mv  \- copy, move files
    31.8+.SH SYNOPSIS
    31.9+.B cp
   31.10+[
   31.11+.B -gux
   31.12+]
   31.13+.I file1 file2
   31.14+.br
   31.15+.B cp
   31.16+[
   31.17+.B -gux
   31.18+]
   31.19+.I file ... directory
   31.20+.PP
   31.21+.B fcp
   31.22+[
   31.23+.B -gux
   31.24+]
   31.25+.I file1 file2
   31.26+.br
   31.27+.B fcp
   31.28+[
   31.29+.B -gux
   31.30+]
   31.31+.I file ... directory
   31.32+.PP
   31.33+.B mv
   31.34+.I file1 file2
   31.35+.br
   31.36+.B mv
   31.37+.I file ... directory
   31.38+.SH DESCRIPTION
   31.39+In the first form
   31.40+.I file1
   31.41+is any name and
   31.42+.I file2
   31.43+is any name except an existing directory.
   31.44+In the second form the commands
   31.45+copy or move one or more
   31.46+.I files
   31.47+into a
   31.48+.I directory
   31.49+under their original file names, as if by a sequence of 
   31.50+commands in the first form.
   31.51+Thus
   31.52+.L "cp f1 f2 dir
   31.53+is equivalent to
   31.54+.LR "cp f1 dir/f1; cp f2 dir/f2" .
   31.55+.PP
   31.56+.I Cp
   31.57+copies the contents of plain
   31.58+.I file1
   31.59+to
   31.60+.IR file2 .
   31.61+The mode and owner of  
   31.62+.I file2
   31.63+are preserved if it already
   31.64+exists; the mode of
   31.65+.I file1
   31.66+is used otherwise.
   31.67+The
   31.68+.B -x
   31.69+option sets the mode and modified time of
   31.70+.I file2
   31.71+from
   31.72+.IR file1 ;
   31.73+.B -g
   31.74+sets the group id; and
   31.75+.B -u
   31.76+sets the group id and user id (which is usually only possible if the file server is in an administrative mode).
   31.77+.PP
   31.78+.I Fcp
   31.79+behaves like
   31.80+.I cp
   31.81+but transfers multiple blocks in parallel while copying;
   31.82+it is noticeably faster than
   31.83+.I cp
   31.84+when the files involved are stored on servers connected over long-distance lines.
   31.85+It is only appropriate to use
   31.86+.I fcp
   31.87+with file servers that respect the
   31.88+.I offset
   31.89+in
   31.90+.IR read (5)
   31.91+and
   31.92+.I write
   31.93+messages.
   31.94+This includes the disk-based file systems and ramfs
   31.95+but excludes most device file systems.
   31.96+.PP
   31.97+.I Mv
   31.98+moves
   31.99+.I file1
  31.100+to
  31.101+.IR file2 .
  31.102+If the files are in the same directory, 
  31.103+.I file1
  31.104+is just renamed;
  31.105+otherwise
  31.106+.I mv
  31.107+behaves like
  31.108+.I cp
  31.109+.B -x
  31.110+followed by
  31.111+.B rm
  31.112+.IR file1 .
  31.113+.I Mv
  31.114+will rename directories,
  31.115+but it refuses to move a directory into another directory.
  31.116+.SH SOURCE
  31.117+.B /sys/src/cmd/cp.c
  31.118+.br
  31.119+.B /sys/src/cmd/fcp.c
  31.120+.br
  31.121+.B /sys/src/cmd/mv.c
  31.122+.SH "SEE ALSO"
  31.123+.IR cat (1),
  31.124+.I dircp
  31.125+in
  31.126+.IR tar (1),
  31.127+.IR stat (2),
  31.128+.IR read (5)
  31.129+.SH DIAGNOSTICS
  31.130+.IR Cp ,
  31.131+.IR fcp ,
  31.132+and
  31.133+.I mv
  31.134+refuse to copy or move files onto themselves.
    32.1new file mode 100755
    32.2--- /dev/null
    32.3+++ b/sys/man/1/cpp
    32.4@@ -0,0 +1,119 @@
    32.5+.TH CPP 1
    32.6+.SH NAME
    32.7+cpp \- C language preprocessor
    32.8+.SH SYNOPSIS
    32.9+.B cpp
   32.10+[
   32.11+.I option ...
   32.12+]
   32.13+[
   32.14+.I ifile
   32.15+[
   32.16+.I ofile
   32.17+]
   32.18+]
   32.19+.SH DESCRIPTION
   32.20+.I Cpp\^
   32.21+interprets ANSI C preprocessor directives
   32.22+and does macro substitution.
   32.23+The input
   32.24+.I ifile
   32.25+and output
   32.26+.I ofile
   32.27+default to standard input and standard output respectively.
   32.28+.PP
   32.29+The options are:
   32.30+.TP
   32.31+.BI -D name\^
   32.32+.PD 0
   32.33+.TP
   32.34+.BI -D name=def\^
   32.35+.TP
   32.36+.BI -I dir\^
   32.37+Same as in
   32.38+.IR 2c "(1): add
   32.39+.I dir
   32.40+to the search for
   32.41+.CW search
   32.42+directives.
   32.43+.PD
   32.44+.TP
   32.45+.B -M
   32.46+Generate no output except a list of include files
   32.47+in a form suitable for specifying dependencies to
   32.48+.IR mk (1).
   32.49+Use twice to list files in angle brackets.
   32.50+.TP
   32.51+.B -N
   32.52+Turn off default include directories.  All must be
   32.53+specified with
   32.54+.BR -I ,
   32.55+or in the environment variable
   32.56+.BR include .
   32.57+Without this option,
   32.58+.B /$objtype/include
   32.59+and
   32.60+.B /sys/include
   32.61+are used as the last two searched directories for include directives,
   32.62+where
   32.63+.B $objtype
   32.64+is read from the environment.
   32.65+.TP
   32.66+.B -V
   32.67+Print extra debugging information.
   32.68+.TP
   32.69+.B -P
   32.70+Do not insert
   32.71+.RB `` #line ''
   32.72+directives into the output.
   32.73+.TP
   32.74+.B -+
   32.75+Understand C++ comments.
   32.76+.TP
   32.77+.B -.
   32.78+Inhibit include search in the source's directory.
   32.79+.TP
   32.80+.B -i
   32.81+Print the list of directories searched when
   32.82+.I #include
   32.83+is found.
   32.84+Last listed are searched first.
   32.85+.PD
   32.86+.PP
   32.87+In the absence of the
   32.88+.B -P
   32.89+option, the processed text output is sprinkled
   32.90+with lines that show the original input line numbering:
   32.91+.IP
   32.92+.B #line
   32.93+.I linenumber
   32.94+.L
   32.95+"\fIifile\fP"
   32.96+.PP
   32.97+The command reads the environment variable
   32.98+.IR include
   32.99+and adds its (blank-separated) list of directories to
  32.100+the standard search path for
  32.101+.CW #include
  32.102+directives.  They are looked at before any directories specified with
  32.103+.BR -I ,
  32.104+which are looked at before the default directories.
  32.105+.PP
  32.106+The input language is as described in the ANSI C standard.
  32.107+The standard Plan 9 C compilers do not use
  32.108+.IR cpp ;
  32.109+they contain their own simple but adequate preprocessor, so
  32.110+.I cpp
  32.111+is usually superfluous.
  32.112+.SH FILES
  32.113+.TF /objtype/include
  32.114+.TP
  32.115+.B /sys/include
  32.116+directory for machine-independent include files
  32.117+.TP
  32.118+.B /$objtype/include
  32.119+directory for machine-dependent include files
  32.120+.SH SOURCE
  32.121+.B /sys/src/cmd/cpp
  32.122+.SH SEE ALSO
  32.123+.IR 2c (1)
    33.1new file mode 100755
    33.2--- /dev/null
    33.3+++ b/sys/man/1/cpu
    33.4@@ -0,0 +1,204 @@
    33.5+.TH CPU 1
    33.6+.SH NAME
    33.7+cpu \- connection to CPU server
    33.8+.SH SYNOPSIS
    33.9+.B cpu
   33.10+[
   33.11+.B -h
   33.12+.I server
   33.13+] [
   33.14+.B -u
   33.15+.I user
   33.16+] [
   33.17+.B -a
   33.18+.I auth-method
   33.19+] [
   33.20+.B -P
   33.21+.I patternfile
   33.22+] [
   33.23+.B -e
   33.24+.I encryption-hash-algs
   33.25+] [
   33.26+.B -k
   33.27+.I keypattern
   33.28+] [
   33.29+.B -c
   33.30+.I cmd args ...
   33.31+]
   33.32+.PP
   33.33+.B cpu
   33.34+[
   33.35+.B -R
   33.36+|
   33.37+.B -O
   33.38+]
   33.39+.SH DESCRIPTION
   33.40+.I Cpu
   33.41+starts an
   33.42+.IR rc (1)
   33.43+running on the
   33.44+.I server
   33.45+machine, or the machine named in the
   33.46+.B $cpu
   33.47+environment variable if there is no
   33.48+.B -h
   33.49+option.
   33.50+.IR Rc 's
   33.51+standard input, output, and error files will be
   33.52+.B /dev/cons
   33.53+in the name space where the
   33.54+.I cpu
   33.55+command was invoked.
   33.56+Normally,
   33.57+.I cpu
   33.58+is run in an
   33.59+.IR rio (1)
   33.60+window on a terminal, so
   33.61+.IR rc
   33.62+output goes to that window, and input comes from the keyboard
   33.63+when that window is current.
   33.64+.IR Rc 's
   33.65+current directory is
   33.66+the working directory of the
   33.67+.I cpu
   33.68+command itself.
   33.69+.PP
   33.70+The name space for the new
   33.71+.I rc
   33.72+is an analogue of the name space where the
   33.73+.I cpu
   33.74+command was invoked:
   33.75+it is the same except for architecture-dependent bindings such as
   33.76+.B /bin
   33.77+and the use of fast paths to file servers, if available.
   33.78+.PP
   33.79+If a
   33.80+.B -u
   33.81+argument is present,
   33.82+.I cpu
   33.83+uses the argument as the remote user id.
   33.84+.PP
   33.85+If a
   33.86+.B -c
   33.87+argument is present, the remainder of the command line is executed by
   33.88+.I rc
   33.89+on the server, and then
   33.90+.I cpu
   33.91+exits.
   33.92+.PP
   33.93+If a
   33.94+.B -P
   33.95+argument is present, the
   33.96+.I patternfile
   33.97+is passed to
   33.98+.IR exportfs (4)
   33.99+to control how much of the local name space will be exported to
  33.100+the remote system.
  33.101+.PP
  33.102+The
  33.103+.B -a
  33.104+command allows the user to specify the authentication mechanism used
  33.105+when connecting to the remote system.  The two possibilities for
  33.106+.I auth-method
  33.107+are:
  33.108+.TF netkey
  33.109+.TP
  33.110+.B p9
  33.111+This is the default.  Authentication is done using the standard Plan 9
  33.112+mechanisms, (see
  33.113+.IR authsrv (6)).
  33.114+No user interaction is required.
  33.115+.TP
  33.116+.B netkey
  33.117+Authentication is done using challenge/response and a hand held
  33.118+authenticator or the
  33.119+.I netkey
  33.120+program
  33.121+(see
  33.122+.IR passwd (1)).
  33.123+The user must encrypt the challenge and type the encryption
  33.124+back to
  33.125+.IR cpu .
  33.126+This is used if the local host is in a different protection domain than
  33.127+the server or if the user wants to log into the server as a different
  33.128+user.
  33.129+.PD
  33.130+.PP
  33.131+The
  33.132+.B -e
  33.133+option specifies an encryption and/or hash algorithm to
  33.134+use for the connection.  If both are specified, they must
  33.135+be space separated and comprise a single argument, so they
  33.136+must be quoted if in a shell command.  The default is
  33.137+.L rc4_256
  33.138+encryption and
  33.139+.L sha1
  33.140+hashing.  See
  33.141+.IR ssl (3)
  33.142+for details on possible algorithms.  The argument
  33.143+.L clear
  33.144+specifies no encryption algorithm and can be used to talk
  33.145+to older versions of the
  33.146+.I cpu
  33.147+service.
  33.148+.PP
  33.149+The
  33.150+.B -k
  33.151+flag specifies a key pattern to use to restrict the keys
  33.152+selected by the
  33.153+.I auth_proxy
  33.154+call used for authentication.
  33.155+.PP
  33.156+The name space is built by running
  33.157+.B /usr/$user/lib/profile
  33.158+with the root of the invoking name space bound to
  33.159+.BR /mnt/term .
  33.160+The
  33.161+.B service
  33.162+environment variable is set to
  33.163+.BR cpu ;
  33.164+the
  33.165+.B cputype
  33.166+and
  33.167+.B objtype
  33.168+environment variables reflect the server's architecture.
  33.169+.PP
  33.170+The
  33.171+.B -R
  33.172+flag causes
  33.173+.I cpu
  33.174+to run the server (remote) side of the protocol.
  33.175+It is run from service files such as
  33.176+.BR /bin/service/tcp17010 .
  33.177+The
  33.178+.B -O
  33.179+flag is similar but simulates the pre-9P2000 version
  33.180+of the 
  33.181+.I cpu
  33.182+protocol.
  33.183+.SH FILES
  33.184+The name space of the terminal side of the
  33.185+.I cpu
  33.186+command is mounted, via
  33.187+.IR exportfs (4),
  33.188+on the CPU side on directory
  33.189+.BR /mnt/term .
  33.190+The files such as
  33.191+.B /dev/cons
  33.192+are bound to their standard locations from there.
  33.193+.SH SOURCE
  33.194+.B /sys/src/cmd/cpu.c
  33.195+.SH SEE ALSO
  33.196+.IR rc (1) ,
  33.197+.IR rio (1) ,
  33.198+.IR exportfs (4)
  33.199+.SH BUGS
  33.200+Binds and mounts done after the terminal
  33.201+.B lib/profile
  33.202+is run are not reflected in the new name space.
  33.203+.PP
  33.204+When using the
  33.205+.B -a
  33.206+option to `log in' as another user, be aware that
  33.207+resources in the local name space will be made
  33.208+available to that user.
    34.1new file mode 100755
    34.2--- /dev/null
    34.3+++ b/sys/man/1/crop
    34.4@@ -0,0 +1,153 @@
    34.5+.TH CROP 1
    34.6+.SH NAME
    34.7+crop, iconv \- frame, crop, and convert image
    34.8+.SH SYNOPSIS
    34.9+.B crop
   34.10+[
   34.11+.B -b
   34.12+.I red
   34.13+.I green
   34.14+.I blue
   34.15+]
   34.16+[
   34.17+.BI -c
   34.18+.I red
   34.19+.I green
   34.20+.I blue
   34.21+]
   34.22+[
   34.23+.B -i
   34.24+.I n
   34.25+|
   34.26+.B -r
   34.27+.I minx
   34.28+.I miny
   34.29+.I maxx
   34.30+.I maxy
   34.31+|
   34.32+.B -x
   34.33+.I dx
   34.34+|
   34.35+.B -y
   34.36+.I dy
   34.37+]
   34.38+[
   34.39+.B -t
   34.40+.I tx
   34.41+.I ty
   34.42+]
   34.43+[
   34.44+.B -b
   34.45+.I red
   34.46+.I green
   34.47+.I blue
   34.48+]
   34.49+[
   34.50+.I file
   34.51+]
   34.52+.PP
   34.53+.B iconv
   34.54+[
   34.55+.B -u
   34.56+] [
   34.57+.B -c
   34.58+.I chandesc
   34.59+]
   34.60+[
   34.61+.I file
   34.62+]
   34.63+.SH DESCRIPTION
   34.64+.I Crop
   34.65+reads an
   34.66+.IR image (6)
   34.67+file (default standard input), crops it, and writes it as a compressed
   34.68+.IR image (6)
   34.69+file to standard output.
   34.70+There are two ways to specify a crop, by color value or by geometry.
   34.71+They may be combined in a single run of
   34.72+.IR crop ,
   34.73+in which case the color value crop will be done first.
   34.74+.PP
   34.75+The
   34.76+.B -c
   34.77+option takes a red-green-blue triplet as described in
   34.78+.IR color (2).
   34.79+(For example, white
   34.80+is
   34.81+.B 255
   34.82+.B 255
   34.83+.BR 255 .)
   34.84+The corresponding color is used as a value to be cut from the outer
   34.85+edge of the picture; that is, the image is cropped to remove the maximal
   34.86+outside rectangular strip in which every pixel has the specified color.
   34.87+.PP
   34.88+The
   34.89+.B -i
   34.90+option insets the image rectangle by a constant amount,
   34.91+.IR n ,
   34.92+which may be negative to generate extra space around the image.
   34.93+The
   34.94+.B -x
   34.95+and
   34.96+.B -y
   34.97+options are similar, but apply only to the
   34.98+.I x
   34.99+or
  34.100+.I y
  34.101+coordinates of the image.
  34.102+.PP
  34.103+The
  34.104+.B -r
  34.105+option specifies an exact rectangle.
  34.106+.PP
  34.107+The 
  34.108+.B -t
  34.109+option specifies that the image's coordinate system should
  34.110+be translated by
  34.111+.IR tx ,
  34.112+.IR ty
  34.113+as the last step of processing.
  34.114+.PP
  34.115+The
  34.116+.B -b
  34.117+option specifies a background color to be used to fill around the image
  34.118+if the cropped image is larger than the original, such as if the
  34.119+.B -i
  34.120+option is given a negative argument.
  34.121+This can be used to draw a monochrome frame around the image.
  34.122+The default color is black.
  34.123+.PP
  34.124+.I Iconv
  34.125+changes the format of pixels in the image
  34.126+.I file
  34.127+(default standard input) and writes the resulting image to standard output.
  34.128+Pixels in the image are converted according to the channel descriptor
  34.129+.IR chandesc ,
  34.130+(see
  34.131+.IR image (6)).
  34.132+For example, to convert a 4-bit-per-pixel grey-scale image to an 8-bit-per-pixel
  34.133+color-mapped image,
  34.134+.I chandesc
  34.135+should be
  34.136+.BR m8 .
  34.137+If
  34.138+.I chandesc
  34.139+is not given, the format is unchanged.
  34.140+The output image is by default compressed; the
  34.141+.B -u
  34.142+option turns off the compression.
  34.143+.SH EXAMPLE
  34.144+To crop white edges off the picture and add a ten-pixel pink border,
  34.145+.IP
  34.146+.EX
  34.147+crop -c 255 255 255 -i -10 -b 255 150 150 imagefile > cropped
  34.148+.EE
  34.149+.SH SOURCE
  34.150+.B /sys/src/cmd/crop.c
  34.151+.SH SEE ALSO
  34.152+.IR image (6),
  34.153+.IR color (2)
  34.154+.SH BUGS
  34.155+.I Iconv
  34.156+should be able to do Floyd-Steinberg error diffusion or dithering
  34.157+when converting to small image depths.
    35.1new file mode 100755
    35.2--- /dev/null
    35.3+++ b/sys/man/1/date
    35.4@@ -0,0 +1,58 @@
    35.5+.TH DATE 1
    35.6+.SH NAME
    35.7+date, clock \- date and time
    35.8+.SH SYNOPSIS
    35.9+.B date
   35.10+[
   35.11+.I option
   35.12+] [
   35.13+.I seconds
   35.14+]
   35.15+.br
   35.16+.B clock
   35.17+.SH DESCRIPTION
   35.18+Print the date, in the format
   35.19+.PP
   35.20+.B
   35.21+	Tue Aug 16 17:03:52 CDT 1977
   35.22+.PP
   35.23+The options are
   35.24+.TP
   35.25+.B -u
   35.26+Report Greenwich Mean Time (GMT) rather than local time.
   35.27+.TP
   35.28+.B -n
   35.29+Report the date as the number of seconds since the
   35.30+epoch, 00:00:00 GMT, January 1, 1970.
   35.31+.PP
   35.32+The conversion from Greenwich Mean Time to local time depends on the
   35.33+.B $timezone
   35.34+environment variable; see
   35.35+.IR ctime (2).
   35.36+.PP
   35.37+If the optional argument
   35.38+.I seconds
   35.39+is present, it is used as the time to convert rather than
   35.40+the real time.
   35.41+.PP
   35.42+.I Clock
   35.43+draws a simple analog clock in its window.
   35.44+.SH FILES
   35.45+.TF /adm/timezone/local
   35.46+.TP
   35.47+.B /env/timezone
   35.48+Current timezone name and adjustments.
   35.49+.TP
   35.50+.B /adm/timezone
   35.51+A directory containing timezone tables.
   35.52+.TP
   35.53+.B /adm/timezone/local
   35.54+Default timezone file, copied by
   35.55+.IR init (8)
   35.56+into
   35.57+.BR /env/timezone .
   35.58+.PD
   35.59+.SH SOURCE
   35.60+.B /sys/src/cmd/date.c
   35.61+.br
   35.62+.B /sys/src/cmd/clock.c
    36.1new file mode 100755
    36.2--- /dev/null
    36.3+++ b/sys/man/1/db
    36.4@@ -0,0 +1,1018 @@
    36.5+.TH DB 1
    36.6+.SH NAME
    36.7+db \- debugger
    36.8+.SH SYNOPSIS
    36.9+.B db
   36.10+[
   36.11+.I option ...
   36.12+]
   36.13+[
   36.14+.I textfile
   36.15+]
   36.16+[
   36.17+.I pid
   36.18+]
   36.19+.SH DESCRIPTION
   36.20+.I Db
   36.21+is a general purpose debugging program.
   36.22+It may be used to examine files and to provide
   36.23+a controlled environment for the execution
   36.24+of Plan 9 programs.
   36.25+.PP
   36.26+A
   36.27+.I textfile
   36.28+is a file containing the text and initialized
   36.29+data of an executable program.
   36.30+A
   36.31+.I memfile
   36.32+is the memory image of an executing process.  It is
   36.33+usually accessed via the process id
   36.34+.RI ( pid )
   36.35+of the process in
   36.36+.BI /proc/ pid /mem\f1.
   36.37+A
   36.38+.I memfile
   36.39+contains the text, data, and saved registers and
   36.40+process state.  A
   36.41+.I map
   36.42+associated with each
   36.43+.I textfile
   36.44+or
   36.45+.I memfile
   36.46+supports accesses to instructions and data in the file;
   36.47+see `Addresses'.
   36.48+.PP
   36.49+An argument consisting entirely of digits is assumed
   36.50+to be a process id; otherwise, it is the name of a
   36.51+.IR textfile .
   36.52+When a
   36.53+.I textfile
   36.54+is given, the textfile map
   36.55+is associated with it.
   36.56+If only a
   36.57+.I pid
   36.58+is given, the textfile map is
   36.59+associated with
   36.60+.BI /proc/ pid /text\f1.
   36.61+When a
   36.62+.I pid
   36.63+is given, the memfile map is associated with
   36.64+.BI /proc/ pid /mem\f1;
   36.65+otherwise it is undefined and accesses to the
   36.66+.I memfile
   36.67+are not permitted.
   36.68+.PP
   36.69+Commands to
   36.70+.I db
   36.71+are read from the standard input and
   36.72+responses are to the standard output.
   36.73+The options are
   36.74+.TP
   36.75+.BI -k
   36.76+Use the kernel stack of process
   36.77+.IR pid 
   36.78+to debug the executing kernel process.
   36.79+If
   36.80+.I textfile
   36.81+is not specified, file
   36.82+.BI / $cputype /9 type
   36.83+is used, where
   36.84+.I type
   36.85+is the second word in
   36.86+.BR $terminal .
   36.87+.TP
   36.88+.B -w
   36.89+Create
   36.90+.I textfile
   36.91+and
   36.92+.I memfile
   36.93+if they don't exist; open them for writing
   36.94+as well as reading.
   36.95+.TP
   36.96+.BI -I path
   36.97+Directory in which to look for relative path names in
   36.98+.B $<
   36.99+and
  36.100+.B $<<
  36.101+commands.
  36.102+.TP
  36.103+.BI -m machine
  36.104+Assume instructions are for the given CPU type
  36.105+(any standard architecture name, such as
  36.106+.B alpha
  36.107+or
  36.108+.BR 386 ,
  36.109+plus
  36.110+.B mipsco
  36.111+and
  36.112+.BR sunsparc ,
  36.113+which cause disassembly to the manufacturer's syntax)
  36.114+instead of using the magic number to select
  36.115+the CPU type.
  36.116+.PP
  36.117+Most
  36.118+.I db
  36.119+commands have the following form:
  36.120+.IP
  36.121+.RI [ address ]
  36.122+.RB [ ,
  36.123+.IR count ]
  36.124+.RI [ command ]
  36.125+.PP
  36.126+If
  36.127+.I address
  36.128+is present then the current position, called `dot',
  36.129+is set to
  36.130+.IR address .
  36.131+Initially dot
  36.132+is set to 0.
  36.133+Most commands are repeated
  36.134+.I count
  36.135+times with
  36.136+dot advancing between repetitions.
  36.137+The default
  36.138+.I count
  36.139+is 1.
  36.140+.I Address
  36.141+and
  36.142+.I count
  36.143+are expressions.
  36.144+Multiple commands on one line must be separated by
  36.145+.LR ; .
  36.146+.SS Expressions
  36.147+Expressions are evaluated as long
  36.148+.IR ints .
  36.149+.TP 7.2n
  36.150+.B .
  36.151+The value of dot.
  36.152+.TP 7.2n
  36.153+.B +
  36.154+The value of dot
  36.155+incremented by the current increment.
  36.156+.TP 7.2n
  36.157+.B ^
  36.158+The value of dot
  36.159+decremented by the current increment.
  36.160+.TP 7.2n
  36.161+.B \&"
  36.162+The last
  36.163+.I address
  36.164+typed.
  36.165+.TP 7.2n
  36.166+.I integer
  36.167+A number, in decimal radix by default.
  36.168+The prefixes
  36.169+.L 0
  36.170+and
  36.171+.L 0o
  36.172+and
  36.173+.L 0O
  36.174+(zero oh) force interpretation
  36.175+in octal radix; the prefixes
  36.176+.L 0t
  36.177+and
  36.178+.L 0T
  36.179+force interpretation in
  36.180+decimal radix; the prefixes
  36.181+.LR 0x ,
  36.182+.LR 0X ,
  36.183+and
  36.184+.L #
  36.185+force interpretation in
  36.186+hexadecimal radix.
  36.187+Thus
  36.188+.LR 020 ,
  36.189+.LR 0o20 ,
  36.190+.LR 0t16 ,
  36.191+and
  36.192+.L #10 
  36.193+all represent sixteen.
  36.194+.TP 7.2n
  36.195+.IB integer . fraction
  36.196+A single-precision floating point number.
  36.197+.TP 7.2n
  36.198+.BI \' c\| \'
  36.199+The
  36.200+16-bit
  36.201+value of a character.
  36.202+.L \e
  36.203+may be used to escape a
  36.204+.LR \' .
  36.205+.TP 7.2n
  36.206+.BI < name
  36.207+The value of
  36.208+.IR name ,
  36.209+which is a register name.
  36.210+The register names are
  36.211+those printed by the
  36.212+.B $r
  36.213+command.
  36.214+.TP 7.2n
  36.215+.I symbol
  36.216+A
  36.217+.I symbol
  36.218+is a sequence
  36.219+of upper or lower case letters, underscores or
  36.220+digits, not starting with a digit.
  36.221+.L \e
  36.222+may be used to escape other characters.
  36.223+The location of the
  36.224+.I symbol
  36.225+is calculated from the symbol table
  36.226+in
  36.227+.IR textfile .
  36.228+.TP 7.2n
  36.229+.IB routine . name
  36.230+The address of the variable
  36.231+.I name
  36.232+in the specified
  36.233+C routine.
  36.234+Both
  36.235+.I routine
  36.236+and
  36.237+.I name
  36.238+are
  36.239+.IR symbols .
  36.240+If
  36.241+.I name
  36.242+is omitted the value is the address of the
  36.243+most recently activated stack frame
  36.244+corresponding to
  36.245+.IR routine ;
  36.246+if
  36.247+.I routine
  36.248+is omitted,
  36.249+the active procedure
  36.250+is assumed.
  36.251+.TP 7.2n
  36.252+.IB file : integer
  36.253+The address of the instruction corresponding
  36.254+to the source statement at the indicated
  36.255+line number of the file.  If the source line contains
  36.256+no executable statement, the address of the
  36.257+instruction associated with the nearest
  36.258+executable source line is returned.  Files
  36.259+begin at line 1.  If multiple files of the same
  36.260+name are loaded, an expression of this form resolves
  36.261+to the first file encountered in the symbol table.
  36.262+.TP 7.2n
  36.263+.BI ( exp )
  36.264+The value of the expression
  36.265+.IR exp .
  36.266+.LP
  36.267+.I  Monadic operators
  36.268+.RS
  36.269+.TP 7.2n
  36.270+.BI * exp
  36.271+The contents of the location addressed
  36.272+by
  36.273+.I exp
  36.274+in
  36.275+.IR memfile .
  36.276+.TP 7.2n
  36.277+.BI @ exp
  36.278+The contents of the location addressed by
  36.279+.I exp
  36.280+in
  36.281+.IR textfile .
  36.282+.TP 7.2n
  36.283+.BI - exp
  36.284+Integer negation.
  36.285+.TP 7.2n
  36.286+.BI ~ exp
  36.287+Bitwise complement.
  36.288+.TP 7.2n
  36.289+.BI % exp
  36.290+When used as an
  36.291+.IR address ,
  36.292+.I exp
  36.293+is an offset into the segment named
  36.294+.IR ublock ;
  36.295+see `Addresses'.
  36.296+.RE
  36.297+.LP
  36.298+.I "Dyadic\ operators"
  36.299+are left-associative
  36.300+and are less binding than monadic operators.
  36.301+.RS
  36.302+.TP 7.2n
  36.303+.IB e1 + e2
  36.304+Integer addition.
  36.305+.TP 7.2n
  36.306+.IB e1 - e2
  36.307+Integer subtraction.
  36.308+.TP 7.2n
  36.309+.IB e1 * e2
  36.310+Integer multiplication.
  36.311+.TP 7.2n
  36.312+.IB e1 % e2
  36.313+Integer division.
  36.314+.TP 7.2n
  36.315+.IB e1 & e2
  36.316+Bitwise conjunction.
  36.317+.TP 7.2n
  36.318+.IB e1 | e2
  36.319+Bitwise disjunction.
  36.320+.TP 7.2n
  36.321+.IB e1 # e2
  36.322+.I E1
  36.323+rounded up to the next multiple of
  36.324+.IR e2 .
  36.325+.RE
  36.326+.DT
  36.327+.SS Commands
  36.328+Most commands have the following syntax:
  36.329+.TP .5i
  36.330+.BI ? f
  36.331+Locations starting at
  36.332+.I address
  36.333+in
  36.334+.I  textfile
  36.335+are printed according to the format
  36.336+.IR f .
  36.337+.TP
  36.338+.BI / f
  36.339+Locations starting at
  36.340+.I address
  36.341+in
  36.342+.I  memfile
  36.343+are printed according to the format
  36.344+.IR f .
  36.345+.TP
  36.346+.BI = f
  36.347+The value of
  36.348+.I address
  36.349+itself is printed according to the format
  36.350+.IR f .
  36.351+.PP
  36.352+A
  36.353+.I format
  36.354+consists of one or more characters that specify a style
  36.355+of printing.
  36.356+Each format character may be preceded by a decimal integer
  36.357+that is a repeat count for the format character.
  36.358+If no format is given then the last format is used.
  36.359+.PP
  36.360+Most format letters fetch some data,
  36.361+print it,
  36.362+and advance (a local copy of) dot
  36.363+by the number of bytes fetched.
  36.364+The total number of bytes in a format becomes the
  36.365+.IR current increment .
  36.366+.ta 2.5n .5i
  36.367+.RS
  36.368+.TP
  36.369+.PD 0
  36.370+.B o
  36.371+Print two-byte integer in octal.
  36.372+.TP
  36.373+.B O
  36.374+Print four-byte integer in octal.
  36.375+.TP
  36.376+.B q
  36.377+Print two-byte integer in signed octal.
  36.378+.TP
  36.379+.B Q
  36.380+Print four-byte integer in signed octal.
  36.381+.TP
  36.382+.B d
  36.383+Print two-byte integer in decimal.
  36.384+.TP
  36.385+.B D
  36.386+Print four-byte integer in decimal.
  36.387+.TP
  36.388+.B V
  36.389+Print eight-byte integer in decimal.
  36.390+.TP
  36.391+.B Z
  36.392+Print eight-byte integer in unsigned decimal.
  36.393+.TP
  36.394+.B x
  36.395+Print two-byte integer in hexadecimal.
  36.396+.TP
  36.397+.B X
  36.398+Print four-byte integer in hexadecimal.
  36.399+.TP
  36.400+.B Y
  36.401+Print eight-byte integer in hexadecimal.
  36.402+.TP
  36.403+.B u
  36.404+Print two-byte integer in unsigned decimal.
  36.405+.TP
  36.406+.B U
  36.407+Print four-byte integer in unsigned decimal.
  36.408+.TP
  36.409+.B f
  36.410+Print
  36.411+as a single-precision floating point number.
  36.412+.TP
  36.413+.B F
  36.414+Print double-precision floating point.
  36.415+.TP
  36.416+.B b
  36.417+Print the addressed byte in hexadecimal.
  36.418+.TP
  36.419+.B c
  36.420+Print the addressed byte as an
  36.421+.SM ASCII
  36.422+character.
  36.423+.TP
  36.424+.B C
  36.425+Print the addressed byte as a character.
  36.426+Printable
  36.427+.SM ASCII
  36.428+characters
  36.429+are represented normally; others
  36.430+are printed in the form
  36.431+.BR \exnn .
  36.432+.TP
  36.433+.B s
  36.434+Print the addressed characters, as a
  36.435+.SM UTF
  36.436+string, until a zero byte
  36.437+is reached.
  36.438+Advance dot
  36.439+by the length of the string,
  36.440+including the zero terminator.
  36.441+.TP
  36.442+.B S
  36.443+Print a string using 
  36.444+the escape convention (see
  36.445+.B C
  36.446+above).
  36.447+.TP
  36.448+.B r
  36.449+Print as
  36.450+.SM UTF
  36.451+the addressed two-byte integer (rune).
  36.452+.TP
  36.453+.B R
  36.454+Print as
  36.455+.SM UTF
  36.456+the addressed two-byte integers as runes
  36.457+until a zero rune is reached.
  36.458+Advance dot
  36.459+by the length of the string,
  36.460+including the zero terminator.
  36.461+.TP
  36.462+.B i
  36.463+Print as machine instructions.  Dot is
  36.464+incremented by the size of the instruction.
  36.465+.TP
  36.466+.B I
  36.467+As
  36.468+.B i
  36.469+above, but print the machine instructions in
  36.470+an alternate form if possible:
  36.471+.B sunsparc
  36.472+and
  36.473+.B mipsco
  36.474+reproduce the manufacturers' syntax.
  36.475+.TP
  36.476+.B M
  36.477+Print the addressed machine instruction in a
  36.478+machine-dependent hexadecimal form.
  36.479+.TP
  36.480+.B a
  36.481+Print the value of dot
  36.482+in symbolic form.
  36.483+Dot is unaffected.
  36.484+.TP
  36.485+.B A
  36.486+Print the value of dot
  36.487+in hexadecimal.
  36.488+Dot is unaffected.
  36.489+.TP
  36.490+.B z
  36.491+Print the function name, source file, and line number
  36.492+corresponding to dot (textfile only). Dot is unaffected.
  36.493+.TP
  36.494+.B p
  36.495+Print the addressed value in symbolic form.
  36.496+Dot is advanced by the size of a machine address.
  36.497+.TP
  36.498+.B t
  36.499+When preceded by an integer, tabs to the next
  36.500+appropriate tab stop.
  36.501+For example,
  36.502+.B 8t 
  36.503+moves to the next 8-space tab stop.
  36.504+Dot is unaffected.
  36.505+.TP
  36.506+.B n
  36.507+Print a newline.
  36.508+Dot is unaffected.
  36.509+.tr '"
  36.510+.TP
  36.511+.BR ' ... '
  36.512+Print the enclosed string.
  36.513+Dot is unaffected.
  36.514+.br
  36.515+.tr ''
  36.516+.TP
  36.517+.B ^
  36.518+Dot is decremented by the current increment.
  36.519+Nothing is printed.
  36.520+.TP
  36.521+.B +
  36.522+Dot is incremented by 1.
  36.523+Nothing is printed.
  36.524+.TP
  36.525+.B -
  36.526+Dot is decremented by 1.
  36.527+Nothing is printed.
  36.528+.RE
  36.529+.PD
  36.530+.LP
  36.531+Other commands include:
  36.532+.TP
  36.533+newline
  36.534+Update dot by the current increment.
  36.535+Repeat the previous command with a
  36.536+.I count
  36.537+of 1.
  36.538+.TP
  36.539+.RB [ ?/ ] l "\fI value mask\fR"
  36.540+Words starting at dot
  36.541+are masked with
  36.542+.I mask
  36.543+and compared with
  36.544+.I value
  36.545+until
  36.546+a match is found.
  36.547+If
  36.548+.B l
  36.549+is used,
  36.550+the match is for a two-byte integer;
  36.551+.B L
  36.552+matches four bytes.
  36.553+If no match is found then dot
  36.554+is unchanged; otherwise dot
  36.555+is set to the matched location.
  36.556+If
  36.557+.I mask
  36.558+is omitted then ~0 is used.
  36.559+.TP
  36.560+.RB [ ?/ ] w "\fI value ...\fR"
  36.561+Write the two-byte
  36.562+.I value
  36.563+into the addressed
  36.564+location.
  36.565+If the command is
  36.566+.BR W ,
  36.567+write four bytes.
  36.568+.TP
  36.569+.RB [ ?/ ] "m\fI s b e f \fP" [ ?\fR]
  36.570+.br
  36.571+New values for
  36.572+.RI ( b,\ e,\ f )
  36.573+in the segment named
  36.574+.I s
  36.575+are recorded.  Valid segment names are
  36.576+.IR text ,
  36.577+.IR data ,
  36.578+or 
  36.579+.IR ublock .
  36.580+If less than three address expressions are given,
  36.581+the remaining parameters are left unchanged.
  36.582+If the list is terminated by
  36.583+.L ?
  36.584+or
  36.585+.L /
  36.586+then the file
  36.587+.RI ( textfile
  36.588+or
  36.589+.I memfile
  36.590+respectively) is used
  36.591+for subsequent requests.
  36.592+For example,
  36.593+.L /m?
  36.594+causes
  36.595+.L /
  36.596+to refer to
  36.597+.IR textfile .
  36.598+.TP
  36.599+.BI > name
  36.600+Dot is assigned to the variable or register named.
  36.601+.TP
  36.602+.B !
  36.603+The rest of the line is passed to
  36.604+.IR rc (1)
  36.605+for execution.
  36.606+.TP
  36.607+.BI $ modifier
  36.608+Miscellaneous commands.
  36.609+The available 
  36.610+.I modifiers 
  36.611+are:
  36.612+.RS
  36.613+.TP
  36.614+.PD 0
  36.615+.BI < f
  36.616+Read commands from the file
  36.617+.IR f .
  36.618+If this command is executed in a file, further commands
  36.619+in the file are not seen.
  36.620+If
  36.621+.I f
  36.622+is omitted, the current input stream is terminated.
  36.623+If a
  36.624+.I count
  36.625+is given, and is zero, the command is ignored.
  36.626+.TP
  36.627+.BI << f
  36.628+Similar to
  36.629+.B <
  36.630+except it can be used in a file of commands without
  36.631+causing the file to be closed.
  36.632+There is a (small) limit to the number of
  36.633+.B <<
  36.634+files that can be open at once.
  36.635+.br
  36.636+.ns
  36.637+.TP
  36.638+.BI > f
  36.639+Append output to the file
  36.640+.IR f ,
  36.641+which is created if it does not exist.
  36.642+If
  36.643+.I f
  36.644+is omitted, output is returned to the terminal.
  36.645+.TP
  36.646+.B ?
  36.647+Print process id, the condition which caused stopping or termination,
  36.648+the registers and the instruction addressed by
  36.649+.BR pc .
  36.650+This is the default if
  36.651+.I modifier
  36.652+is omitted.
  36.653+.TP
  36.654+.B r
  36.655+Print the general registers and
  36.656+the instruction addressed by
  36.657+.BR pc .
  36.658+Dot is set to
  36.659+.BR pc .
  36.660+.TP
  36.661+.B R
  36.662+Like
  36.663+.BR $r ,
  36.664+but include miscellaneous processor control registers
  36.665+and floating point registers.
  36.666+.TP
  36.667+.B f
  36.668+Print floating-point register values as
  36.669+single-precision floating point numbers.
  36.670+.TP
  36.671+.B F
  36.672+Print floating-point register values as
  36.673+double-precision floating point numbers.
  36.674+.TP
  36.675+.B b
  36.676+Print all breakpoints
  36.677+and their associated counts and commands.  `B' produces the same results.
  36.678+.TP
  36.679+.B c
  36.680+Stack backtrace.
  36.681+If
  36.682+.I address
  36.683+is given, it specifies the address of a pair of 32-bit
  36.684+values containing the
  36.685+.B sp
  36.686+and
  36.687+.B pc
  36.688+of an active process.  This allows selecting
  36.689+among various contexts of a multi-threaded
  36.690+process.
  36.691+If
  36.692+.B C
  36.693+is used, the names and (long) values of all
  36.694+parameters,
  36.695+automatic
  36.696+and static variables are printed for each active function.
  36.697+If
  36.698+.I count
  36.699+is given, only the first
  36.700+.I count
  36.701+frames are printed.
  36.702+.TP
  36.703+.B a
  36.704+Attach to the running process whose pid
  36.705+is contained in
  36.706+.IR address .
  36.707+.TP
  36.708+.B e
  36.709+The names and values of all
  36.710+external variables are printed.
  36.711+.TP
  36.712+.B w
  36.713+Set the page width for output to
  36.714+.I address
  36.715+(default 80).
  36.716+.TP
  36.717+.B q
  36.718+Exit from
  36.719+.IR db .
  36.720+.TP
  36.721+.B m
  36.722+Print the address maps.
  36.723+.TP
  36.724+.B k
  36.725+Simulate kernel memory management.
  36.726+.TP
  36.727+.BI M machine
  36.728+Set the
  36.729+.I machine
  36.730+type used for disassembling instructions.
  36.731+.PD
  36.732+.RE
  36.733+.TP
  36.734+.BI : modifier
  36.735+Manage a subprocess.
  36.736+Available modifiers are:
  36.737+.RS
  36.738+.TP
  36.739+.PD 0
  36.740+.BI h
  36.741+Halt
  36.742+an asynchronously running process to allow breakpointing.
  36.743+Unnecessary for processes created under
  36.744+.IR db ,
  36.745+e.g. by
  36.746+.BR :r .
  36.747+.TP
  36.748+.BI b c
  36.749+Set breakpoint at
  36.750+.IR address .
  36.751+The breakpoint is executed
  36.752+.IR count \-1
  36.753+times before
  36.754+causing a stop.
  36.755+Also, if a command
  36.756+.I c
  36.757+is given it is executed at each
  36.758+breakpoint and if it sets dot to zero
  36.759+the breakpoint causes a stop.
  36.760+.TP
  36.761+.B d
  36.762+Delete breakpoint at
  36.763+.IR address .
  36.764+.TP
  36.765+.B r
  36.766+Run
  36.767+.I textfile
  36.768+as a subprocess.
  36.769+If
  36.770+.I address
  36.771+is given the
  36.772+program is entered at that point; otherwise
  36.773+the standard entry point is used.
  36.774+.I Count
  36.775+specifies how many breakpoints are to be
  36.776+ignored before stopping.
  36.777+Arguments to the subprocess may be supplied on the
  36.778+same line as the command.
  36.779+An argument starting with < or > causes the standard
  36.780+input or output to be established for the command.
  36.781+.TP
  36.782+.BI c s
  36.783+The subprocess is continued.
  36.784+If
  36.785+.I s
  36.786+is omitted
  36.787+or nonzero,
  36.788+the subprocess
  36.789+is sent the note that caused it to stop.
  36.790+If 0
  36.791+is specified,
  36.792+no note is sent.
  36.793+(If the stop was due to a breakpoint or single-step,
  36.794+the corresponding note is elided before continuing.)
  36.795+Breakpoint skipping is the same
  36.796+as for
  36.797+.BR r .
  36.798+.TP
  36.799+.BI s s
  36.800+As for
  36.801+.B c
  36.802+except that
  36.803+the subprocess is single stepped for
  36.804+.I count
  36.805+machine instructions.
  36.806+If a note is pending,
  36.807+it is received
  36.808+before the first instruction is executed.
  36.809+If there is no current subprocess then
  36.810+.I textfile
  36.811+is run
  36.812+as a subprocess as for
  36.813+.BR r .
  36.814+In this case no note can be sent; the remainder of the line
  36.815+is treated as arguments to the subprocess.
  36.816+.TP
  36.817+.BI S s
  36.818+Identical to
  36.819+.B s
  36.820+except the subprocess is single stepped for
  36.821+.I count
  36.822+lines of C source.  In optimized code, the correspondence
  36.823+between C source and the machine instructions is
  36.824+approximate at best.
  36.825+.TP
  36.826+.BI x
  36.827+The current subprocess, if any, is released by
  36.828+.I db
  36.829+and allowed to continue executing normally.
  36.830+.TP
  36.831+.B k
  36.832+The current subprocess, if any, is terminated.
  36.833+.TP
  36.834+.BI n c
  36.835+Display the pending notes for the process.
  36.836+If
  36.837+.I c
  36.838+is specified, first delete
  36.839+.I c'th
  36.840+pending note.
  36.841+.PD
  36.842+.RE
  36.843+.SS Addresses
  36.844+The location in a file or memory image associated with
  36.845+an address is calculated from a map
  36.846+associated with the file.
  36.847+Each map contains one or more quadruples
  36.848+.RI ( "t, b, e, f" ),
  36.849+defining a segment named
  36.850+.I t
  36.851+(usually, 
  36.852+.IR text ,
  36.853+.IR data ,
  36.854+or
  36.855+.IR ublock )
  36.856+mapping addresses in the range
  36.857+.I b
  36.858+through
  36.859+.I e
  36.860+to the part of the file
  36.861+beginning at
  36.862+offset
  36.863+.IR f .
  36.864+The memory model of a Plan 9 process assumes
  36.865+that segments are disjoint.  There
  36.866+can be more than one segment of a given type (e.g., a process
  36.867+may have more than one text segment) but segments
  36.868+may not overlap.
  36.869+An address
  36.870+.I a
  36.871+is translated
  36.872+to a file address
  36.873+by finding a segment
  36.874+for which
  36.875+.IR b ≤ a < e ;
  36.876+the location in the file
  36.877+is then
  36.878+.IR address + f \- b .
  36.879+.PP
  36.880+Usually,
  36.881+the text and initialized data of a program
  36.882+are mapped by segments called 
  36.883+.I text
  36.884+and
  36.885+.IR data .
  36.886+Since a program file does not contain bss, stack or ublock data,
  36.887+these data are
  36.888+not mapped by the data segment.
  36.889+The text segment is mapped similarly in
  36.890+a normal (i.e., non-kernel)
  36.891+.IR memfile .
  36.892+However, the segment called 
  36.893+.I data
  36.894+maps memory from the beginning of the program's data space to
  36.895+the base of the ublock.
  36.896+This region contains the program's static data, the bss, the
  36.897+heap and the stack.  A segment
  36.898+called
  36.899+.I ublock
  36.900+maps the page containing its registers and process state.
  36.901+.PP
  36.902+Sometimes it is useful to define a map with a single segment
  36.903+mapping the region from 0 to 0xFFFFFFFF; a map of this type
  36.904+allows the entire file to be examined
  36.905+without address translation.
  36.906+.PP
  36.907+Registers are saved at a machine-dependent offset in the ublock.
  36.908+It is usually not necessary to know this offset; the
  36.909+.BR $r ,
  36.910+.BR $R ,
  36.911+.BR $f ,
  36.912+and
  36.913+.BR $F
  36.914+commands calculate it and display the register contents.
  36.915+.PP
  36.916+The
  36.917+.B $m
  36.918+command dumps the currently active maps.  The
  36.919+.B ?m
  36.920+and
  36.921+.B /m
  36.922+commands modify the segment parameters in the
  36.923+.I textfile
  36.924+and
  36.925+.I memfile
  36.926+maps, respectively.
  36.927+.SH EXAMPLES
  36.928+To set a breakpoint at the beginning of
  36.929+.B write()
  36.930+in extant process 27:
  36.931+.IP
  36.932+.EX
  36.933+% db 27
  36.934+:h
  36.935+write:b
  36.936+:c
  36.937+.EE
  36.938+.PP
  36.939+To examine the Plan 9 kernel stack for process 27:
  36.940+.IP
  36.941+.EX
  36.942+% db -k 27
  36.943+$C
  36.944+.EE
  36.945+.PP
  36.946+Similar, but using a kernel named
  36.947+.BR test :
  36.948+.IP
  36.949+.EX
  36.950+% db -k test 27
  36.951+$C
  36.952+.EE
  36.953+.PP
  36.954+To set a breakpoint at the entry of function
  36.955+.B parse
  36.956+when the local variable
  36.957+.B argc
  36.958+in
  36.959+.B main
  36.960+is equal to 1:
  36.961+.IP
  36.962+.EX
  36.963+parse:b *main.argc-1=X
  36.964+.EE
  36.965+.PP
  36.966+This prints the value of
  36.967+.B argc-1
  36.968+which as a side effect sets dot; when
  36.969+.B argc
  36.970+is one the breakpoint will fire.
  36.971+Beware that local variables may be stored in registers; see the
  36.972+BUGS section.
  36.973+.PP
  36.974+Debug process 127 on remote machine
  36.975+.BR kremvax :
  36.976+.IP
  36.977+.EX
  36.978+% import kremvax /proc
  36.979+% db 127
  36.980+$C
  36.981+.EE
  36.982+.SH FILES
  36.983+.B /proc/*/text
  36.984+.br
  36.985+.B /proc/*/mem
  36.986+.br
  36.987+.B /proc/*/ctl
  36.988+.br
  36.989+.B /proc/*/note
  36.990+.SH "SEE ALSO"
  36.991+.IR acid (1),
  36.992+.IR nm (1),
  36.993+.IR proc (3)
  36.994+.SH SOURCE
  36.995+.B /sys/src/cmd/db
  36.996+.SH DIAGNOSTICS
  36.997+Exit status is null, unless the last command failed or
  36.998+returned non-null status.
  36.999+.SH BUGS
 36.1000+Examining a local variable with
 36.1001+.I routine.name
 36.1002+returns the contents of the memory allocated for the variable, but
 36.1003+with optimization (suppressed by the
 36.1004+.B -N
 36.1005+compiler flag) variables often reside in registers.
 36.1006+Also, on some architectures, the first argument is always
 36.1007+passed in a register.
 36.1008+.PP
 36.1009+Variables and parameters that have been
 36.1010+optimized away do not appear in the
 36.1011+symbol table, returning the error 
 36.1012+.IR "bad local variable"
 36.1013+when accessed by
 36.1014+.IR db .
 36.1015+.PP
 36.1016+Because of alignment incompatibilities, Motorola 68000
 36.1017+series machines can not be debugged remotely from a
 36.1018+processor of a different type.
 36.1019+.PP
 36.1020+Breakpoints should not be set on instructions scheduled
 36.1021+in delay slots.  When a program stops on such a breakpoint,
 36.1022+it is usually impossible to continue its execution.
    37.1new file mode 100755
    37.2--- /dev/null
    37.3+++ b/sys/man/1/dc
    37.4@@ -0,0 +1,257 @@
    37.5+.TH DC 1
    37.6+.SH NAME
    37.7+dc \- desk calculator
    37.8+.SH SYNOPSIS
    37.9+.B dc
   37.10+[
   37.11+.I file
   37.12+]
   37.13+.SH DESCRIPTION
   37.14+.I Dc
   37.15+is an arbitrary precision desk calculator.
   37.16+Ordinarily it operates on decimal integers,
   37.17+but one may specify an input base, output base,
   37.18+and a number of fractional digits to be maintained.
   37.19+The overall structure of
   37.20+.I dc
   37.21+is
   37.22+a stacking (reverse Polish) calculator.
   37.23+If an argument is given,
   37.24+input is taken from that file until its end,
   37.25+then from the standard input.
   37.26+The following constructions are recognized:
   37.27+.TP
   37.28+number
   37.29+The value of the number is pushed on the stack.
   37.30+A number is an unbroken string of the digits 
   37.31+.B 0-9A-F 
   37.32+or
   37.33+.BR 0-9a-f .
   37.34+A hexadecimal number beginning with a lower case
   37.35+letter must be preceded by a zero to distinguish it
   37.36+from the command associated with the letter.
   37.37+It may be preceded by an underscore
   37.38+.B _
   37.39+to input a
   37.40+negative number.
   37.41+Numbers may contain decimal points.
   37.42+.TP
   37.43+.L
   37.44++  - /  *  %  ^
   37.45+Add
   37.46+.LR + ,
   37.47+subtract
   37.48+.LR - ,
   37.49+multiply
   37.50+.LR * ,
   37.51+divide
   37.52+.LR / ,
   37.53+remainder
   37.54+.LR % ,
   37.55+or exponentiate
   37.56+.L ^
   37.57+the top two values on the stack.
   37.58+The two entries are popped off the stack;
   37.59+the result is pushed on the stack in their place.
   37.60+Any fractional part of an exponent is ignored.
   37.61+.TP
   37.62+.BI s x
   37.63+.br
   37.64+.ns
   37.65+.TP
   37.66+.BI S x
   37.67+Pop the top of the stack and store into
   37.68+a register named
   37.69+.IR x ,
   37.70+where
   37.71+.I x
   37.72+may be any character.
   37.73+Under operation
   37.74+.B S
   37.75+register
   37.76+.I x
   37.77+is treated as a stack and the value is pushed on it.
   37.78+.TP
   37.79+.BI l x
   37.80+.br
   37.81+.ns
   37.82+.TP
   37.83+.BI L x
   37.84+Push the value in register
   37.85+.I x
   37.86+onto the stack.
   37.87+The register
   37.88+.I x
   37.89+is not altered.
   37.90+All registers start with zero value.
   37.91+Under operation
   37.92+.B L
   37.93+register
   37.94+.I x
   37.95+is treated as a stack and its top value is popped onto the main stack.
   37.96+.TP
   37.97+.B  d
   37.98+Duplicate the
   37.99+top value on the stack.
  37.100+.TP
  37.101+.B  p
  37.102+Print the top value on the stack.
  37.103+The top value remains unchanged.
  37.104+.B P
  37.105+interprets the top of the stack as an
  37.106+text
  37.107+string,
  37.108+removes it, and prints it.
  37.109+.TP
  37.110+.B  f
  37.111+Print the values on the stack.
  37.112+.TP
  37.113+.B  q
  37.114+.br
  37.115+.ns
  37.116+.TP
  37.117+.B Q
  37.118+Exit the program.
  37.119+If executing a string, the recursion level is
  37.120+popped by two.
  37.121+Under operation
  37.122+.B Q
  37.123+the top value on the stack is popped and the string execution level is popped
  37.124+by that value.
  37.125+.TP
  37.126+.B  x
  37.127+Treat the top element of the stack as a character string
  37.128+and execute it as a string of
  37.129+.I dc
  37.130+commands.
  37.131+.TP
  37.132+.B  X
  37.133+Replace the number on the top of the stack with its scale factor.
  37.134+.TP
  37.135+.B "[ ... ]"
  37.136+Put the bracketed
  37.137+text
  37.138+string on the top of the stack.
  37.139+.TP
  37.140+.PD0
  37.141+.BI < x
  37.142+.TP
  37.143+.BI > x
  37.144+.TP
  37.145+.BI = x
  37.146+.PD
  37.147+Pop and compare the
  37.148+top two elements of the stack.
  37.149+Register
  37.150+.I x
  37.151+is executed if they obey the stated
  37.152+relation.
  37.153+.TP
  37.154+.B  v
  37.155+Replace the top element on the stack by its square root.
  37.156+Any existing fractional part of the argument is taken
  37.157+into account, but otherwise the scale factor is ignored.
  37.158+.TP
  37.159+.B  !
  37.160+Interpret the rest of the line as a shell command.
  37.161+.TP
  37.162+.B  c
  37.163+Clear the stack.
  37.164+.TP
  37.165+.B  i
  37.166+The top value on the stack is popped and used as the
  37.167+number base for further input.
  37.168+.TP
  37.169+.B I
  37.170+Push the input base on the top of the stack.
  37.171+.TP
  37.172+.B  o
  37.173+The top value on the stack is popped and used as the
  37.174+number base for further output.
  37.175+In bases larger than 10, each `digit' prints as a group of decimal digits.
  37.176+.TP
  37.177+.B O
  37.178+Push the output base on the top of the stack.
  37.179+.TP
  37.180+.B  k
  37.181+Pop the top of the stack, and use that value as
  37.182+a non-negative scale factor:
  37.183+the appropriate number of places
  37.184+are printed on output,
  37.185+and maintained during multiplication, division, and exponentiation.
  37.186+The interaction of scale factor,
  37.187+input base, and output base will be reasonable if all are changed
  37.188+together.
  37.189+.TP
  37.190+.B  z
  37.191+Push the stack level onto the stack.
  37.192+.TP
  37.193+.B  Z
  37.194+Replace the number on the top of the stack with its length.
  37.195+.TP
  37.196+.B  ?
  37.197+A line of input is taken from the input source (usually the terminal)
  37.198+and executed.
  37.199+.TP
  37.200+.B "; :"
  37.201+Used by 
  37.202+.I bc
  37.203+for array operations.
  37.204+.PP
  37.205+The scale factor set by
  37.206+.B k
  37.207+determines how many digits are kept to the right of
  37.208+the decimal point.
  37.209+If
  37.210+.I s
  37.211+is the current scale factor,
  37.212+.I sa
  37.213+is the scale of the first operand,
  37.214+.I sb
  37.215+is the scale of the second,
  37.216+and
  37.217+.I b
  37.218+is the (integer) second operand,
  37.219+results are truncated to the following scales.
  37.220+.IP
  37.221+.nf
  37.222+\fL+\fR,\fL-\fR	max(\fIsa,sb\fR)
  37.223+\fL*\fR	min(\fIsa\fR+\fIsb \fR, max\fR(\fIs,sa,sb\fR))
  37.224+\fL/\fI	s
  37.225+\fL%\fR	so that dividend = divisor*quotient + remainder; remainder has sign of dividend
  37.226+\fL^\fR	min(\fIsa\fR\(mu|\fIb\fR|, max(\fIs,sa\fR))
  37.227+\fLv\fR	max(\fIs,sa\fR)
  37.228+.fi
  37.229+.SH EXAMPLES
  37.230+.LP
  37.231+Print the first ten values of
  37.232+.IR n !
  37.233+.IP
  37.234+.EX
  37.235+[la1+dsa*pla10>y]sy
  37.236+0sa1
  37.237+lyx
  37.238+.EE
  37.239+.SH SOURCE
  37.240+.B /sys/src/cmd/dc.c
  37.241+.SH "SEE ALSO"
  37.242+.IR bc (1),
  37.243+.IR hoc (1)
  37.244+.SH DIAGNOSTICS
  37.245+.I x
  37.246+.LR "is unimplemented" ,
  37.247+where
  37.248+.I x
  37.249+is an octal number: an internal error.
  37.250+.br
  37.251+`Out of headers'
  37.252+for too many numbers being kept around.
  37.253+.br
  37.254+`Nesting depth'
  37.255+for too many levels of nested execution.
  37.256+.SH BUGS
  37.257+When the input base exceeds 16,
  37.258+there is no notation for digits greater than
  37.259+.BR F .
  37.260+.PP
  37.261+Past its time.
    38.1new file mode 100755
    38.2--- /dev/null
    38.3+++ b/sys/man/1/dd
    38.4@@ -0,0 +1,196 @@
    38.5+.TH DD 1
    38.6+.SH NAME
    38.7+dd \- convert and copy a file
    38.8+.SH SYNOPSIS
    38.9+.B dd
   38.10+[
   38.11+.I option value
   38.12+]
   38.13+\&...
   38.14+.SH DESCRIPTION
   38.15+.I Dd\^
   38.16+copies the specified input file
   38.17+to the specified output with
   38.18+possible conversions.
   38.19+The standard input and output are used by default.
   38.20+The input and output block size may be
   38.21+specified to take advantage of raw physical I/O.
   38.22+The options are
   38.23+.TP \w'\fLoseek\ \ \fIn'u
   38.24+.BI -if\  f
   38.25+Open file
   38.26+.I f
   38.27+for input.
   38.28+.TP
   38.29+.BI -of\  f
   38.30+Open file
   38.31+.I f
   38.32+for output.
   38.33+.TP
   38.34+.BI -ibs\  n\^
   38.35+Set input block size to
   38.36+.I n\^
   38.37+bytes (default 512).
   38.38+.TP
   38.39+.BI -obs\  n\^
   38.40+Set output block size (default 512).
   38.41+.TP
   38.42+.BI -bs\  n\^
   38.43+Set both input and output block size,
   38.44+superseding
   38.45+.I ibs\^
   38.46+and
   38.47+.IR obs .
   38.48+If no conversion is specified,
   38.49+preserve the input block size instead of packing short blocks
   38.50+into the output buffer.
   38.51+This is particularly efficient since no in-core copy need be done.
   38.52+.TP
   38.53+.BI -cbs\  n\^
   38.54+Set conversion buffer size.
   38.55+.TP
   38.56+.BI -skip\  n\^
   38.57+Skip
   38.58+.I n
   38.59+input records before copying.
   38.60+.TP
   38.61+.BI -iseek\  n\^
   38.62+Seek
   38.63+.I n
   38.64+records forward on input file
   38.65+before copying.
   38.66+.TP
   38.67+.BI -files\  n\^
   38.68+Catenate
   38.69+.I n 
   38.70+input files (useful only for magnetic tape or similar input device).
   38.71+.TP
   38.72+.BI -oseek\  n\^
   38.73+Seek
   38.74+.I n\^
   38.75+records from beginning of output file before copying.
   38.76+.TP
   38.77+.BI -count\  n\^
   38.78+Copy only
   38.79+.I n
   38.80+input records.
   38.81+.TP
   38.82+.BI -trunc\  n\^
   38.83+By default,
   38.84+.I dd
   38.85+truncates the output file when it opens it;
   38.86+.B -trunc
   38.87+.B 0
   38.88+opens it without truncation.
   38.89+.TP
   38.90+.BI -quiet\  n\^
   38.91+By default,
   38.92+.I dd
   38.93+prints the number of blocks read and written
   38.94+once it is finished.
   38.95+.B -quiet
   38.96+.B 1
   38.97+silences this summary.
   38.98+.HP
   38.99+\fL-conv\ ascii\ \ \ \ \fRConvert
  38.100+.SM EBCDIC
  38.101+to
  38.102+.SM ASCII.
  38.103+.PD0
  38.104+.RS "\w'\fLconv\ \fP'u"
  38.105+.TP "\w'\fLunblock\ \ \fP'u"
  38.106+.B ebcdic
  38.107+Convert
  38.108+.SM ASCII
  38.109+to
  38.110+.SM EBCDIC.
  38.111+.TP
  38.112+.B ibm
  38.113+Like
  38.114+.B ebcdic
  38.115+but with a slightly different character map.
  38.116+.TP
  38.117+.B block
  38.118+Convert variable length
  38.119+.SM ASCII
  38.120+records to fixed length.
  38.121+.TP
  38.122+.B unblock
  38.123+Convert fixed length
  38.124+.SM ASCII
  38.125+records to variable length.
  38.126+.TP
  38.127+.B lcase
  38.128+Map alphabetics to lower case.
  38.129+.TP
  38.130+.B ucase
  38.131+Map alphabetics to upper case.
  38.132+.TP
  38.133+.B swab
  38.134+Swap every pair of bytes.
  38.135+.TP
  38.136+.B noerror
  38.137+Do not stop processing on an error.
  38.138+.TP
  38.139+.B sync
  38.140+Pad every input record to
  38.141+.I  ibs\^
  38.142+bytes.
  38.143+.RE
  38.144+.PD
  38.145+.PP
  38.146+.fi
  38.147+Where sizes are specified,
  38.148+a number of bytes is expected.
  38.149+A number may end with
  38.150+.L k
  38.151+or
  38.152+.LR b
  38.153+to specify multiplication by
  38.154+1024 or 512 respectively;
  38.155+a pair of numbers may be separated by
  38.156+.L x
  38.157+to indicate a product.
  38.158+Multiple conversions may be specified in the style:
  38.159+.LR "-conv ebcdic,ucase" .
  38.160+.PP
  38.161+.L Cbs\^
  38.162+is used only if
  38.163+.LR ascii\^ ,
  38.164+.LR unblock\^ ,
  38.165+.LR ebcdic\^ ,
  38.166+.LR ibm\^ ,
  38.167+or
  38.168+.L block\^
  38.169+conversion is specified.
  38.170+In the first two cases,
  38.171+.I n
  38.172+characters are copied into the conversion buffer, any specified
  38.173+character mapping is done,
  38.174+trailing blanks are trimmed and new-line is added
  38.175+before sending the line to the output.
  38.176+In the latter three cases, characters are read into the
  38.177+conversion buffer and blanks are added to make up an
  38.178+output record of size
  38.179+.IR n .
  38.180+If
  38.181+.L cbs\^
  38.182+is unspecified or zero, the
  38.183+.LR ascii\^ ,
  38.184+.LR ebcdic\^ ,
  38.185+and
  38.186+.L ibm\^
  38.187+options convert the character set without changing the block
  38.188+structure of the input file; the
  38.189+.L unblock\^
  38.190+and
  38.191+.L block\^
  38.192+options become a simple file copy.
  38.193+.SH SOURCE
  38.194+.B /sys/src/cmd/dd.c
  38.195+.SH "SEE ALSO"
  38.196+.IR cp (1)
  38.197+.SH DIAGNOSTICS
  38.198+.I Dd
  38.199+reports the number of full + partial input and output
  38.200+blocks handled.
    39.1new file mode 100755
    39.2--- /dev/null
    39.3+++ b/sys/man/1/delkey
    39.4@@ -0,0 +1,42 @@
    39.5+.TH DELKEY 1
    39.6+.SH NAME
    39.7+delkey \- delete keys from factotum
    39.8+.SH SYNOPSIS
    39.9+.B delkey
   39.10+[
   39.11+.B -f
   39.12+]
   39.13+.I pattern
   39.14+.SH DESCRIPTION
   39.15+.I Delkey
   39.16+shows the user each key stored in
   39.17+.IR factotum (4)
   39.18+and matching the
   39.19+.IR pattern ,
   39.20+prompting for whether the key should be deleted.
   39.21+At each prompt, typing a response beginning with
   39.22+.B y
   39.23+deletes the key, typing a response beginning with
   39.24+.B q
   39.25+aborts the listing,
   39.26+and any other response skips over the key.
   39.27+.PP
   39.28+The
   39.29+.B -f
   39.30+option disables the prompting; all keys matching the pattern are deleted.
   39.31+.PP
   39.32+When run on a CPU server,
   39.33+.I delkey
   39.34+uses the terminal's factotum, if present, instead of the server's factotum.
   39.35+.SH FILES
   39.36+.TP
   39.37+.B /mnt/term/mnt/factotum
   39.38+First choice for
   39.39+.I factotum
   39.40+to use
   39.41+.TP
   39.42+.B /mnt/factotum
   39.43+Second choice
   39.44+.PP
   39.45+.SH SOURCE
   39.46+.B /rc/bin/delkey
    40.1new file mode 100755
    40.2--- /dev/null
    40.3+++ b/sys/man/1/deroff
    40.4@@ -0,0 +1,117 @@
    40.5+.TH DEROFF 1 
    40.6+.SH NAME
    40.7+deroff, delatex \- remove formatting requests
    40.8+.SH SYNOPSIS
    40.9+.B deroff
   40.10+[
   40.11+.I option ...
   40.12+]
   40.13+.I file ...
   40.14+.PP
   40.15+.B delatex
   40.16+.I file
   40.17+.SH DESCRIPTION
   40.18+.I Deroff
   40.19+reads each file in sequence
   40.20+and removes all
   40.21+.I nroff
   40.22+and
   40.23+.IR troff (1)
   40.24+requests and non-text arguments, backslash constructions,
   40.25+and constructs of preprocessors such as
   40.26+.IR eqn (1),
   40.27+.IR pic (1),
   40.28+and
   40.29+.IR tbl (1).
   40.30+Remaining text is written on the standard output.
   40.31+.I Deroff
   40.32+follows files included by
   40.33+.L .so
   40.34+and
   40.35+.L .nx
   40.36+commands;
   40.37+if a file has already been included, a
   40.38+.L .so
   40.39+for that file is ignored and a
   40.40+.L .nx
   40.41+terminates execution.
   40.42+If no input file is given,
   40.43+.I deroff
   40.44+reads from standard input.
   40.45+.PP
   40.46+The options are
   40.47+.TP
   40.48+.B -w
   40.49+Output a word list, one `word' (string of letters, digits, and
   40.50+properly embedded ampersands and apostrophes,
   40.51+beginning with a letter) per line.
   40.52+Other characters are skipped.
   40.53+Otherwise, the output follows the original, with the deletions mentioned above.
   40.54+.TP
   40.55+.B -_
   40.56+Like
   40.57+.BR -w ,
   40.58+but consider underscores to be alphanumeric rather than punctuation.
   40.59+.TP
   40.60+.B -i
   40.61+Ignore
   40.62+.L .so
   40.63+and
   40.64+.L .nx
   40.65+requests.
   40.66+.TP
   40.67+.BR -ms
   40.68+.PD0
   40.69+.TP
   40.70+.B -mm
   40.71+Remove titles, attachments, etc., as well as ordinary 
   40.72+.IR troff
   40.73+constructs, from
   40.74+.IR ms (6)
   40.75+or
   40.76+.I mm
   40.77+documents.
   40.78+.PD
   40.79+.TP
   40.80+.B -ml
   40.81+Same as
   40.82+.BR -mm ,
   40.83+but remove lists as well.
   40.84+.PP
   40.85+.I Delatex
   40.86+does for
   40.87+.I tex
   40.88+and
   40.89+.I latex
   40.90+(see
   40.91+.IR tex (1))
   40.92+files what
   40.93+.B deroff -wi
   40.94+does for
   40.95+.I troff
   40.96+files.
   40.97+.SH SOURCE
   40.98+.B /sys/src/cmd/deroff.c
   40.99+.br
  40.100+.B /sys/src/cmd/tex/local/delatex.c
  40.101+.SH "SEE ALSO"
  40.102+.IR troff (1), 
  40.103+.IR tex (1),
  40.104+.IR spell (1)
  40.105+.SH BUGS
  40.106+These filters are not complete interpreters of
  40.107+.I troff
  40.108+or
  40.109+.IR tex .
  40.110+For example, macro definitions containing
  40.111+.L \e$
  40.112+cause chaos in
  40.113+.IR deroff
  40.114+when the popular
  40.115+.L $$
  40.116+delimiters for
  40.117+.I eqn
  40.118+are in effect. 
  40.119+.PP
  40.120+Text inside macros is emitted at place of
  40.121+definition, not place of call.
    41.1new file mode 100755
    41.2--- /dev/null
    41.3+++ b/sys/man/1/diff
    41.4@@ -0,0 +1,176 @@
    41.5+.TH DIFF 1 
    41.6+.SH NAME
    41.7+diff \- differential file comparator
    41.8+.SH SYNOPSIS
    41.9+.B diff
   41.10+[
   41.11+.B -abcefmnrw
   41.12+] 
   41.13+.I file1 ... file2
   41.14+.SH DESCRIPTION
   41.15+.I Diff
   41.16+tells what lines must be changed in two files to bring them
   41.17+into agreement.
   41.18+If one file
   41.19+is a directory,
   41.20+then a file in that directory with basename the same as that of
   41.21+the other file is used.
   41.22+If both files are directories, similarly named files in the
   41.23+two directories are compared by the method of 
   41.24+.I diff
   41.25+for text
   41.26+files and
   41.27+.IR cmp (1)
   41.28+otherwise.
   41.29+If more than two file names are given, then each argument is compared
   41.30+to the last argument as above.
   41.31+The 
   41.32+.B -r
   41.33+option causes
   41.34+.I diff
   41.35+to process similarly named subdirectories recursively.
   41.36+When processing more than one file, 
   41.37+.I diff
   41.38+prefixes file differences with a single line
   41.39+listing the two differing files, in the form of
   41.40+a 
   41.41+.I diff
   41.42+command line.
   41.43+The
   41.44+.B -m
   41.45+flag causes this behavior even when processing single files.
   41.46+.PP
   41.47+The normal output contains lines of these forms:
   41.48+.IP "" 5
   41.49+.I n1
   41.50+.B a
   41.51+.I n3,n4
   41.52+.br
   41.53+.I n1,n2
   41.54+.B d
   41.55+.I n3
   41.56+.br
   41.57+.I n1,n2
   41.58+.B c
   41.59+.I n3,n4
   41.60+.PP
   41.61+These lines resemble
   41.62+.I ed
   41.63+commands to convert
   41.64+.I file1
   41.65+into
   41.66+.IR file2 .
   41.67+The numbers after the letters pertain to
   41.68+.IR file2 .
   41.69+In fact, by exchanging `a' for `d' and reading backward
   41.70+one may ascertain equally how to convert 
   41.71+.I file2
   41.72+into
   41.73+.IR file1 .
   41.74+As in 
   41.75+.IR ed ,
   41.76+identical pairs where
   41.77+.I n1
   41.78+=
   41.79+.I n2
   41.80+or
   41.81+.I n3
   41.82+=
   41.83+.I n4
   41.84+are abbreviated as a single number.
   41.85+.PP
   41.86+Following each of these lines come all the lines that are
   41.87+affected in the first file flagged by `<', 
   41.88+then all the lines that are affected in the second file
   41.89+flagged by `>'.
   41.90+.PP
   41.91+The
   41.92+.B -b
   41.93+option causes
   41.94+trailing blanks (spaces and tabs) to be ignored
   41.95+and other strings of blanks to compare equal.
   41.96+The
   41.97+.B -w
   41.98+option causes all white-space to be removed from input lines
   41.99+before applying the difference algorithm.
  41.100+.PP
  41.101+The
  41.102+.B -n
  41.103+option prefixes each range with 
  41.104+.IB file : \fR
  41.105+and inserts a space around the 
  41.106+.BR a ,
  41.107+.BR c ,
  41.108+and
  41.109+.B d
  41.110+verbs.
  41.111+The
  41.112+.B -e
  41.113+option produces a script of
  41.114+.I "a, c"
  41.115+and 
  41.116+.I d
  41.117+commands for the editor
  41.118+.IR ed ,
  41.119+which will recreate
  41.120+.I file2
  41.121+from
  41.122+.IR file1 .
  41.123+The
  41.124+.B -f
  41.125+option produces a similar script,
  41.126+not useful with
  41.127+.IR ed ,
  41.128+in the opposite order. It may, however, be
  41.129+useful as input to a stream-oriented post-processor.
  41.130+.PP
  41.131+The
  41.132+.B -c
  41.133+option includes three lines of context around each
  41.134+change, merging changes whose contexts overlap.
  41.135+In this mode,
  41.136+.I diff
  41.137+prints
  41.138+.L -
  41.139+and
  41.140+.L +
  41.141+instead of
  41.142+.L <
  41.143+and
  41.144+.L >
  41.145+because the former are easier to distinguish when mixed.
  41.146+The
  41.147+.B -a
  41.148+flag displays the entire file as context.
  41.149+.PP
  41.150+Except in rare circumstances,
  41.151+.I diff
  41.152+finds a smallest sufficient set of file
  41.153+differences.
  41.154+.SH FILES
  41.155+.B /tmp/diff[12]
  41.156+.SH SOURCE
  41.157+.B /sys/src/cmd/diff
  41.158+.SH "SEE ALSO"
  41.159+.IR cmp (1),
  41.160+.IR comm (1),
  41.161+.IR ed (1),
  41.162+.IR idiff (1)
  41.163+.SH DIAGNOSTICS
  41.164+Exit status is the empty string
  41.165+for no differences,
  41.166+.L some
  41.167+for some, 
  41.168+and
  41.169+.L error
  41.170+for trouble.
  41.171+.SH BUGS
  41.172+Editing scripts produced under the
  41.173+.BR -e " or"
  41.174+.BR -f " option are naive about"
  41.175+creating lines consisting of a single `\fB.\fR'.
  41.176+.PP
  41.177+When running
  41.178+.I diff
  41.179+on directories, the notion of what is a text
  41.180+file is open to debate.
    42.1new file mode 100755
    42.2--- /dev/null
    42.3+++ b/sys/man/1/doc2txt
    42.4@@ -0,0 +1,161 @@
    42.5+.TH DOC2TXT 1
    42.6+.SH NAME
    42.7+doc2txt, doc2ps, wdoc2txt, xls2txt, olefs, mswordstrings, msexceltables
    42.8+\- extract printable text from Microsoft documents
    42.9+.SH SYNOPSIS
   42.10+.B doc2txt
   42.11+[
   42.12+.I file.doc
   42.13+]
   42.14+.br
   42.15+.B doc2ps
   42.16+[
   42.17+.I file.doc
   42.18+]
   42.19+.br
   42.20+.B wdoc2txt
   42.21+[
   42.22+.I file.doc
   42.23+]
   42.24+.br
   42.25+.B xls2txt
   42.26+[
   42.27+.I file.xls
   42.28+]
   42.29+.br
   42.30+.B aux/olefs
   42.31+[
   42.32+.B -m
   42.33+.I mtpt
   42.34+]
   42.35+.I file.doc
   42.36+.br
   42.37+.B aux/mswordstrings 
   42.38+.IB mtpt /WordDocument
   42.39+.br
   42.40+.B aux/msexceltables
   42.41+[
   42.42+.B -qaDnt
   42.43+] [
   42.44+.B -d
   42.45+.I delim
   42.46+] [
   42.47+.B -c
   42.48+.I column-range
   42.49+] [
   42.50+.B -w
   42.51+.I worksheet-range
   42.52+]
   42.53+.IB mtpt /Workbook
   42.54+.SH DESCRIPTION
   42.55+.I Doc2txt
   42.56+is an
   42.57+.IR rc (1)
   42.58+script that uses 
   42.59+.I olefs
   42.60+and
   42.61+.I mswordstrings
   42.62+to extract the printable text from the body of a Microsoft Word document
   42.63+and write it on the standard output.
   42.64+.I Doc2ps
   42.65+is similar, but emits PostScript corresponding to the document.
   42.66+.I Wdoc2txt
   42.67+is similar to
   42.68+.IR doc2txt ,
   42.69+but uses
   42.70+.IR plumb (1)
   42.71+to send the output to a new
   42.72+.IR acme (1)
   42.73+window instead.
   42.74+.I Xls2txt
   42.75+performs a similar function for Microsoft Excel documents.
   42.76+.PP
   42.77+Microsoft Office documents are stored in OLE (Object Linking and Embedding)
   42.78+format, which is a scaled down version of Microsoft's FAT file system.
   42.79+.I Olefs
   42.80+presents the contents of an MS Office document as a file system
   42.81+on
   42.82+.IR mtpt ,
   42.83+which defaults to
   42.84+.BR /mnt/doc .
   42.85+.I Mswordstrings
   42.86+or
   42.87+.I msexceltables
   42.88+may then be used to parse the files inside, extracting
   42.89+a text stream.
   42.90+.I Msexceltables
   42.91+may be given options to control the formatting of its output.
   42.92+.TF "\fL-d \fIdelim"
   42.93+.TP
   42.94+.B -a
   42.95+Attempt conversion of non-tabular sheets in the workbook (charts).
   42.96+.TP
   42.97+.BI -d " delim
   42.98+Sets the inter-field delimiter to the string
   42.99+.IR delim ,
  42.100+by default a single space.
  42.101+.TP
  42.102+.B -D
  42.103+Enables debugging output.
  42.104+.TP
  42.105+.BI -c " range
  42.106+.I Range
  42.107+is a comma-separated list of column numbers and ranges.
  42.108+Ranges are separated by dashes.
  42.109+Limit processing to just those columns named;
  42.110+by default all columns are output.
  42.111+.TP
  42.112+.B -n
  42.113+Disables field padding to column width. 
  42.114+.TP
  42.115+.B -q
  42.116+Disable quoting of textural fields (see 
  42.117+.IR quote (2).)
  42.118+.TP
  42.119+.B -t
  42.120+Truncate fields to the column width.
  42.121+.TP
  42.122+.BI -w " range
  42.123+.I Range
  42.124+is a comma-separated list of worksheet numbers and ranges, this
  42.125+limits the sheets output using the same syntax as the
  42.126+.B -c
  42.127+option above.
  42.128+Suppressed chart pages are always included in the sheet count.
  42.129+.SH EXAMPLE
  42.130+Extract pieces of an MS Excel spreadsheet.
  42.131+.PD 0
  42.132+.IP
  42.133+.EX
  42.134+.SM
  42.135+aux/olefs report.xls
  42.136+msexceltables -q -w 1,7,9-14 -c 3-5 -n -d '@' /mnt/doc/Workbook > rpt.txt
  42.137+unmount /mnt/doc
  42.138+.EE
  42.139+.PD
  42.140+.SH SOURCE
  42.141+.TF "\fL/sys/src/cmd/aux   "
  42.142+.TP
  42.143+.B /rc/bin
  42.144+.BR doc2txt ,
  42.145+.BR doc2ps ,
  42.146+.BR wdoc2txt,
  42.147+and
  42.148+.BR xls2txt
  42.149+.TP
  42.150+.B /sys/src/cmd/aux
  42.151+the others
  42.152+.fi
  42.153+.PD
  42.154+.SH SEE ALSO
  42.155+.IR strings (1)
  42.156+.br
  42.157+``Microsoft Word 97 Binary File Format'',
  42.158+at Microsoft's developer (MSDN) home page.
  42.159+.br
  42.160+``LAOLA Binary Structures'', 
  42.161+.B http://user.cs.tu-berlin.de/~schwartz/pmh 
  42.162+.br
  42.163+``OpenOffice.Org's Excel Documentation'',
  42.164+.br
  42.165+.B http://sc.openoffice.org/excelfileformat.pdf
    43.1new file mode 100755
    43.2--- /dev/null
    43.3+++ b/sys/man/1/doctype
    43.4@@ -0,0 +1,63 @@
    43.5+.TH DOCTYPE 1 
    43.6+.SH NAME
    43.7+doctype \- intuit command line for formatting a document
    43.8+.SH SYNOPSIS
    43.9+.B doctype
   43.10+[
   43.11+.B -n
   43.12+]
   43.13+[
   43.14+.B -T
   43.15+.I dev
   43.16+]
   43.17+[
   43.18+.I file
   43.19+]
   43.20+\&...
   43.21+.SH DESCRIPTION
   43.22+.I Doctype
   43.23+examines a
   43.24+.IR troff (1)
   43.25+input file to deduce the appropriate text formatting command
   43.26+and prints it on standard output.
   43.27+.I Doctype
   43.28+recognizes input for
   43.29+.IR troff (1),
   43.30+related preprocessors like
   43.31+.IR eqn (1),
   43.32+and the 
   43.33+.IR ms (6)
   43.34+and
   43.35+.I mm 
   43.36+macro packages.
   43.37+.PP
   43.38+Option
   43.39+.B -n
   43.40+invokes
   43.41+.I nroff
   43.42+instead of
   43.43+.IR troff .
   43.44+The
   43.45+.B -T
   43.46+option is passed to
   43.47+.IR troff .
   43.48+.SH EXAMPLES
   43.49+.TP
   43.50+.L
   43.51+eval `{doctype chapter.?} | lp 
   43.52+Typeset files named
   43.53+.BR chapter.0 ,
   43.54+.BR chapter.1 ,
   43.55+\&...
   43.56+.SH SOURCE
   43.57+.B /rc/bin/doctype
   43.58+.SH SEE ALSO
   43.59+.IR troff (1), 
   43.60+.IR eqn (1), 
   43.61+.IR tbl (1), 
   43.62+.IR pic (1), 
   43.63+.IR grap (1),
   43.64+.IR ms (6),
   43.65+.IR man (6)
   43.66+.SH BUGS
   43.67+In true A.I. style, its best guesses are inspired rather than accurate.
    44.1new file mode 100755
    44.2--- /dev/null
    44.3+++ b/sys/man/1/du
    44.4@@ -0,0 +1,137 @@
    44.5+.TH DU 1
    44.6+.SH NAME
    44.7+du \- disk usage
    44.8+.SH SYNOPSIS
    44.9+.B du
   44.10+[
   44.11+.B -aefhnqstu
   44.12+] [
   44.13+.B -b
   44.14+.I size
   44.15+] [
   44.16+.B -p
   44.17+.I SI-prefix
   44.18+] [
   44.19+.I file ...
   44.20+]
   44.21+.SH DESCRIPTION
   44.22+.I Du
   44.23+gives the number of Kbytes allocated to data blocks
   44.24+of named
   44.25+.I files
   44.26+and, recursively, of files in named directories.
   44.27+It assumes storage is quantized in units of 1024 bytes (Kbytes) by default.
   44.28+Other values can be set by the
   44.29+.B -b
   44.30+option;
   44.31+.I size
   44.32+is the number of bytes, optionally suffixed
   44.33+.B k
   44.34+to specify multiplication by 1024.
   44.35+If
   44.36+.I file
   44.37+is missing,
   44.38+the current directory is used.
   44.39+The count for a directory includes the counts of the
   44.40+contained files and directories.
   44.41+.PP
   44.42+The
   44.43+.B -a
   44.44+option prints the number of blocks
   44.45+for every file in a directory.
   44.46+Normally counts are printed only for contained directories.
   44.47+.PP
   44.48+The
   44.49+.B -f
   44.50+option suppresses the printing of warning messages.
   44.51+.PP
   44.52+The
   44.53+.B -n
   44.54+option prints the size in bytes and the name of each file; it sets
   44.55+.BR -a .
   44.56+.PP
   44.57+The
   44.58+.B -t
   44.59+option prints, in the format of
   44.60+.B du
   44.61+.BR -n ,
   44.62+the modified time of
   44.63+each file rather than the size.
   44.64+If the options
   44.65+.B -tu
   44.66+are specified then the accessed time is printed.
   44.67+.PP
   44.68+The
   44.69+.B -q
   44.70+option prints, in the format of
   44.71+.B du
   44.72+.BR -n ,
   44.73+the QID path of
   44.74+each file rather than the size.
   44.75+.PP
   44.76+The
   44.77+.B -s
   44.78+option causes
   44.79+.I du
   44.80+to descend the hierarchy as always, but to print only a summary line
   44.81+for each
   44.82+.IR file .
   44.83+.PP
   44.84+The
   44.85+.B -e
   44.86+option causes
   44.87+.I du
   44.88+to print values (sizes, times or QID paths)
   44.89+in `scientific notation' via
   44.90+.IR print (2)'s
   44.91+.BR %g .
   44.92+.PP
   44.93+The
   44.94+.B -h
   44.95+option causes
   44.96+.I du
   44.97+to print values (sizes, times or QID paths)
   44.98+in scientific notation,
   44.99+scaled to less than 1024, and with a suitable SI prefix
  44.100+(e.g.,
  44.101+.L G
  44.102+for binary gigabytes).
  44.103+.PP
  44.104+The
  44.105+.B -p
  44.106+option causes
  44.107+.I du
  44.108+to print values (sizes, times or QID paths)
  44.109+in units of
  44.110+.IR SI-prefix .
  44.111+Case is ignored when looking up
  44.112+.IR SI-prefix .
  44.113+An empty
  44.114+.IR SI-prefix
  44.115+corresponds to a scale factor of 1 (e.g., print sizes in bytes).
  44.116+.\" .PP
  44.117+.\" The
  44.118+.\" .B -r
  44.119+.\" option causes
  44.120+.\" .I du
  44.121+.\" to read and discard every byte of every file encountered.
  44.122+.SH EXAMPLES
  44.123+Print the size of
  44.124+.L /tmp
  44.125+in fractional binary gigabytes:
  44.126+.IP
  44.127+.EX
  44.128+% du -sepg /tmp
  44.129+\&.6960154	/tmp
  44.130+.EE
  44.131+.LP
  44.132+Print the size of
  44.133+.L /tmp
  44.134+in bytes and in scientific notation:
  44.135+.IP
  44.136+.EX
  44.137+% du -sep '' /tmp
  44.138+7.473408e+08	/tmp
  44.139+.EE
  44.140+.SH SOURCE
  44.141+.B /sys/src/cmd/du.c
    45.1new file mode 100755
    45.2--- /dev/null
    45.3+++ b/sys/man/1/echo
    45.4@@ -0,0 +1,26 @@
    45.5+.TH ECHO 1 
    45.6+.SH NAME
    45.7+echo \- print arguments
    45.8+.SH SYNOPSIS
    45.9+.B echo
   45.10+[
   45.11+.B -n
   45.12+]
   45.13+[
   45.14+.I arg ...
   45.15+]
   45.16+.SH DESCRIPTION
   45.17+.I Echo
   45.18+writes its arguments separated by blanks and terminated by
   45.19+a newline on the standard output.
   45.20+Option
   45.21+.B -n
   45.22+suppresses the newline.
   45.23+.SH SOURCE
   45.24+.B /sys/src/cmd/echo.c
   45.25+.SH DIAGNOSTICS
   45.26+If
   45.27+.I echo
   45.28+draws an error while writing to standard output, the exit status is
   45.29+.LR "write error" .
   45.30+Otherwise the exit status is empty.
    46.1new file mode 100755
    46.2--- /dev/null
    46.3+++ b/sys/man/1/ecp
    46.4@@ -0,0 +1,141 @@
    46.5+.TH ECP 1
    46.6+.SH NAME
    46.7+ecp \- fast copy, handling errors
    46.8+.SH SYNOPSIS
    46.9+.in +.5i
   46.10+.ti -.5i
   46.11+.B ecp
   46.12+[
   46.13+.B \-bcprvZ
   46.14+] [
   46.15+.B \-B
   46.16+.I block-size
   46.17+] [
   46.18+.B \-e
   46.19+.I max-errors
   46.20+] [
   46.21+.B \-i
   46.22+.I issect
   46.23+] [
   46.24+.B \-o
   46.25+.I ossect
   46.26+] [
   46.27+.B \-s
   46.28+.I sector-size
   46.29+]
   46.30+.I sectors
   46.31+.I input
   46.32+.I output
   46.33+.SH DESCRIPTION
   46.34+.I Ecp
   46.35+copies
   46.36+.I sectors
   46.37+disk sectors of the specified
   46.38+.I input
   46.39+file to the specified
   46.40+.I output
   46.41+file.
   46.42+.I Ecp
   46.43+copies multiple sectors (a `block') at a time for speed.
   46.44+When
   46.45+.I ecp
   46.46+encounters an I/O error,
   46.47+it transfers the current block again,
   46.48+assuming the file is seekable,
   46.49+one sector at a time,
   46.50+prints the sector number(s) of the error(s),
   46.51+and continues copying.
   46.52+.PP
   46.53+Options are:
   46.54+.TP 4
   46.55+.B \-b
   46.56+reblock
   46.57+.IR input
   46.58+on short reads;
   46.59+this was used mainly when reading a pipe on standard input
   46.60+on 4.2+BSD systems.
   46.61+.TP
   46.62+.B \-B
   46.63+sets the block size (16,384 bytes by default) to
   46.64+.IR block-size .
   46.65+.TP
   46.66+.B \-c
   46.67+ask for confirmation on
   46.68+.B /dev/cons
   46.69+before starting the copy.
   46.70+.TP
   46.71+.B \-e
   46.72+sets a maximum number of consecutive I/O errors to permit
   46.73+at the beginning of the copy before quitting to
   46.74+.IR max-errors .
   46.75+Lots of consecutive errors may indicate a deeper problem,
   46.76+such as missing media.
   46.77+By default there is no limit.
   46.78+.TP
   46.79+.B \-i
   46.80+seeks to sector
   46.81+.I issect
   46.82+(assuming zero-origin)
   46.83+before beginning input.
   46.84+.TP
   46.85+.B \-o
   46.86+seeks to sector
   46.87+.I ossect
   46.88+(assuming zero-origin)
   46.89+before beginning output.
   46.90+.TP
   46.91+.B \-p
   46.92+print reassuring progress reports;
   46.93+helpful mainly when dealing with cranky hardware.
   46.94+.TP
   46.95+.B \-r
   46.96+copy sector groups in reverse order,
   46.97+assuming the files are seekable;
   46.98+this is most useful when
   46.99+.I input
  46.100+and
  46.101+.I output
  46.102+overlap.
  46.103+.TP
  46.104+.B \-s
  46.105+sets the sector size (512 bytes by default) to
  46.106+.IR sector-size .
  46.107+.TP
  46.108+.B \-v
  46.109+verify the copy by rereading the
  46.110+.I input
  46.111+and
  46.