diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1994-05-30 19:09:18 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1994-05-30 19:09:18 +0000 |
commit | b0d61785cae024b1f44119446a940ee14c9ac959 (patch) | |
tree | 5a495a583b002ae9e57f09848ae697160708c220 /share/man | |
parent | d43599f73ba5858e573c7ad8b284f6a0808c5c93 (diff) | |
download | FreeBSD-src-b0d61785cae024b1f44119446a940ee14c9ac959.zip FreeBSD-src-b0d61785cae024b1f44119446a940ee14c9ac959.tar.gz |
BSD 4.4 Lite Share Sources
Diffstat (limited to 'share/man')
123 files changed, 28690 insertions, 0 deletions
diff --git a/share/man/Makefile b/share/man/Makefile new file mode 100644 index 0000000..853377b --- /dev/null +++ b/share/man/Makefile @@ -0,0 +1,19 @@ +# @(#)Makefile 8.2 (Berkeley) 4/16/94 + +SUBDIR= man1 man3 man3f man4 man5 man7 man8 +SEDF= /usr/share/man/makewhatis.sed + +afterinstall: + install -c -o ${BINOWN} -g ${BINGRP} -m 444 makewhatis.sed \ + ${DESTDIR}${SEDF} + +makedb: + find /usr/share/man -type f -name '*.0' -print | \ + while read file; \ + do \ + sed -n -f ${SEDF} $$file; \ + done | col -b | sort -u > /tmp/whatis.db + install -o ${BINOWN} -g ${BINGRP} -m 444 /tmp/whatis.db \ + ${DESTDIR}/usr/share/man + +.include <bsd.subdir.mk> diff --git a/share/man/makewhatis.sed b/share/man/makewhatis.sed new file mode 100644 index 0000000..3bc5c48 --- /dev/null +++ b/share/man/makewhatis.sed @@ -0,0 +1,64 @@ +#!/usr/bin/sed -nf +# +# Copyright (c) 1988, 1993, 1994 +# The Regents of the University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# @(#)makewhatis.sed 8.4 (Berkeley) 4/3/94 +# + +/^[a-zA-Z][a-zA-Z0-9\._+\-]*(\([a-zA-Z0-9\._+\-]*\).*/ { + s;^[a-zA-Z0-9\._+\-]*(\([a-zA-Z0-9\._+\-]*\).*;\1; + h + d +} + +/^NNAAMMEE/!d + +:name + s;.*;; + N + s;\n;; + # some twits underline the command name + s;_;;g + /^[^ ]/b print + H + b name + +:print + x + s;\n;;g + /-/!d + s;.;;g + s;\([a-z][A-z]\)-[ ][ ]*;\1; + s;\([a-zA-Z0-9,\._+\-]\)[ ][ ]*;\1 ;g + s;[^a-zA-Z0-9\._+\-]*\([a-zA-Z0-9\._+\-]*\)[^a-zA-Z0-9\._+\-]*\(.*\) - \(.*\);\2 (\1) - \3; + p + q diff --git a/share/man/man0/Makefile b/share/man/man0/Makefile new file mode 100644 index 0000000..f2a12b2 --- /dev/null +++ b/share/man/man0/Makefile @@ -0,0 +1,69 @@ +# +# Copyright (c) 1986, 1993 Regents of the University of California. +# All rights reserved. +# +# @(#)Makefile 8.2 (Berkeley) 1/29/94 +# +SRCS= man1 man2 man3 man4 man5 man6 man7 man8 + +MACROS= -ms +PRINTER=Pps +TBL= tbl +TROFF= groff + +all: title.urm.${PRINTER} title.prm.${PRINTER} + +print: title.urm.${PRINTER} title.prm.${PRINTER} + lpr -${PRINTER} title.urm.${PRINTER} + lpr -${PRINTER} title.prm.${PRINTER} + +title.urm.${PRINTER}: title.urm ptxx + ${TBL} title.urm | ${TROFF} ${MACROS} >title.urm.${PRINTER} + +title.prm.${PRINTER}: ${SRCS} title.prm ptxx + ${TROFF} title.prm >title.prm.${PRINTER} + +ptxx: + ./tocrc + +man1pages: man1 + rm -f man1.out + for i in `cat man1`; do \ + sed -f groff.sed $$i | groff -man >>man1pages; \ + done; + +man2pages: man2 + rm -f man2.out + for i in `cat man2`; do groff -man $$i >>man2pages; done; + +man3pages: man3 + rm -f man3.out + for i in `cat man3`; do groff -man $$i >>man3pages; done; + +man4pages: man4 + rm -f man4.out + for i in `cat man4`; do groff -man $$i >>man4pages; done; + +man5pages: man5 + rm -f man5.out + for i in `cat man5`; do \ + sed -f groff.sed $$i | groff -man >>man5pages; \ + done; + +man6pages: man6 + rm -f man6.out + for i in `cat man6`; do groff -man $$i >>man6pages; done; + +man7pages: man7 + rm -f man7.out + for i in `cat man7`; do \ + sed -f groff.sed $$i | groff -man >>man7pages; \ + done; + +man8pages: man8 + rm -f man8.out + for i in `cat man8`; do groff -man $$i >>man8pages; done; + +clean: + rm -f title.urm.[PT]* title.prm.[PT]* toc? tocx? ptxx \ + *.spell errs Errs make.out diff --git a/share/man/man0/break b/share/man/man0/break new file mode 100644 index 0000000..6db0726 --- /dev/null +++ b/share/man/man0/break @@ -0,0 +1,5 @@ + +; +: +. +, diff --git a/share/man/man0/cover b/share/man/man0/cover new file mode 100644 index 0000000..1fad428 --- /dev/null +++ b/share/man/man0/cover @@ -0,0 +1,63 @@ +.\" Copyright (c) 1993 Regents of the University of California. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)cover 8.1 (Berkeley) 7/20/93 +.\" +.ps 36 +.vs 40p +.de t +\& +.sp |3.5i +.ce 10 +\fBSection \\$1 +.sp 0.5 +\\$2 +\\$3 +\\$4 +\\$5\fP +.ce 0 +.bp +.. +.t 1 Commands and Application Programs +.t 2 System Calls +.t 3 C-Library Subroutines +.t 4 Special Files +.t 5 File Formats +.t 6 Games +.t 7 Miscellaneous +.t 8 System Maintenance +\& +.sp |3.5i +.ce 10 +\fBSystem +Management +Documents\fP +.ce 1 diff --git a/share/man/man0/cshcmd b/share/man/man0/cshcmd new file mode 100644 index 0000000..8c9ba3a --- /dev/null +++ b/share/man/man0/cshcmd @@ -0,0 +1,54 @@ +csh(1) alias: shell macros. +csh(1) bg: place job in background. +csh(1) break: exit while/foreach loop. +csh(1) breaksw: exit from switch. +csh(1) case: selector in switch. +csh(1) cd: change directory. +csh(1) chdir: change directory. +csh(1) continue: cycle in loop. +csh(1) default: catchall clause in switch. +csh(1) echo: echo arguments. +csh(1) else: alternative commands. +csh(1) end: terminate loop. +csh(1) endif: terminate conditional. +csh(1) endsw: terminate switch. +csh(1) eval: re-evaluate shell data. +csh(1) exec: overlay shell with specified command. +csh(1) exit: leave shell. +csh(1) fg: bring job into foreground. +csh(1) foreach: loop over list of names. +csh(1) glob: filename expand argument list. +csh(1) goto: command transfer. +csh(1) hashstat: print command hashing statistics. +csh(1) history: print history event list. +csh(1) if: conditional statement. +csh(1) jobs: print current job list. +csh(1) kill: kill jobs and processes. +csh(1) limit: alter per-process resource limitations. +csh(1) login: login new user. +csh(1) logout: end session. +csh(1) nice: run low priority process. +csh(1) nohup: run command immune to hangups. +csh(1) notify: request immediate notification. +csh(1) onintr: process interrupts in command scripts. +csh(1) popd: pop shell directory stack. +csh(1) pushd: push shell directory stack. +csh(1) rehash: recompute command hash table. +csh(1) repeat: execute command repeatedly. +csh(1) set: change value of shell variable. +csh(1) setenv: set variable in environment. +csh(1) shift: manipulate argument list. +csh(1) source: read commands from file. +csh(1) stop: halt a job or process. +csh(1) suspend: suspend a shell, resuming its superior. +csh(1) switch: multi-way command branch. +csh(1) time: time command. +csh(1) umask: change or display file creation mask. +csh(1) unalias: remove aliases. +csh(1) unhash: discard command hash table. +csh(1) unlimit: remove resource limitiations. +csh(1) unsetenv: remove environment variables. +csh(1) unset: discard shell variables. +csh(1) wait: wait for background processes to complete. +csh(1) while: repeat commands conditionally. +csh(1) @: arithmetic on shell variables. diff --git a/share/man/man0/groff.sed b/share/man/man0/groff.sed new file mode 100644 index 0000000..fe8ea6e --- /dev/null +++ b/share/man/man0/groff.sed @@ -0,0 +1,22 @@ +s/@MDATE@/June 30, 1993/ +s/@VERSION@/1.08/ +s,@DEFAULT_INDEX@,/usr/share/dict/papers/Ind, +s,@DEFAULT_INDEX_NAME@,/usr/share/dict/papers/Ind, +s,@COMMON_WORDS_FILE@,/usr/share/dict/papers/words, +s,@INDEX_SUFFIX@,.i, +s,@DEVICE@,/usr/share/groff_font, +s,@FONTDIR@,/usr/share/groff_font, +s,@FONTPATH@,/usr/share/groff_font, +s,@MACRODIR@,/usr/share/tmac, +s,@TMAC_M@,/usr/share/tmac/tmac.m, +s,@TMAC_MDIR@,/usr/share/tmac, +s/@g@// +s/@G@// +s/@MAN1EXT@/1/ +s/@MAN2EXT@/2/ +s/@MAN3EXT@/3/ +s/@MAN4EXT@/4/ +s/@MAN5EXT@/5/ +s/@MAN6EXT@/6/ +s/@MAN7EXT@/7/ +s/@MAN8EXT@/8/ diff --git a/share/man/man0/ignore b/share/man/man0/ignore new file mode 100644 index 0000000..1498edc --- /dev/null +++ b/share/man/man0/ignore @@ -0,0 +1,99 @@ +- +\- +10 +11 +16 +144 +2 +201 +3 +4014 +6 +7 +77 +a +about +across +after +al +al +all +allow +am +among +an +and +and/or +any +another +are +B +back +be +been +between +bits +by +dialect +do +et +extreme +facts +feeds +fitting +for +from +general +get +has +head +in +integer +integers +interval +into +intro +is +it +its +knowledge +large +last +later +local +long +low +map +o +of +off +on +or +other +out +package +part +periodically +pieces +prejudice +problem +service +simple +special +system +tac +that +the +them +they +this +to +toe +turn +two +until +way +with +yet +you +your diff --git a/share/man/man0/man1 b/share/man/man0/man1 new file mode 100644 index 0000000..f826fb1 --- /dev/null +++ b/share/man/man0/man1 @@ -0,0 +1,284 @@ +/usr/src/share/man/man1/intro.1 +/usr/src/old/adb/common_source/adb.1 +/usr/src/contrib/groff-1.08/addftinfo/addftinfo.1 +/usr/src/contrib/groff-1.08/afmtodit/afmtodit.1 +/usr/src/contrib/ansi/ansitape.1 +/usr/src/usr.bin/apply/apply.1 +/usr/src/usr.bin/apropos/apropos.1 +/usr/src/usr.bin/ar/ar.1 +/usr/src/usr.bin/at/at/at.1 +/usr/src/usr.bin/at/atq/atq.1 +/usr/src/usr.bin/at/atrm/atrm.1 +/usr/src/contrib/gawk-2.15.2/awk.1 +/usr/src/usr.bin/basename/basename.1 +/usr/src/usr.bin/bc/bc.1 +/usr/src/usr.bin/bdes/bdes.1 +/usr/src/contrib/bib/man/bib.1 +/usr/src/usr.bin/biff/biff.1 +/usr/src/usr.bin/cal/cal.1 +/usr/src/usr.bin/calendar/calendar.1 +/usr/src/usr.bin/cap_mkdb/cap_mkdb.1 +/usr/src/bin/cat/cat.1 +/usr/src/contrib/gcc-2.3.3/cc.1 +/usr/src/share/man/man1/cd.1 +/usr/src/usr.bin/checknr/checknr.1 +/usr/src/usr.bin/chflags/chflags.1 +/usr/src/usr.sbin/chown/chgrp.1 +/usr/src/lib/librpc/secure_rpc/man/chkey.1 +/usr/src/bin/chmod/chmod.1 +/usr/src/usr.bin/chpass/chpass.1 +/usr/src/contrib/rcs-V5.6/man/ci.1 +/usr/src/usr.bin/cksum/cksum.1 +/usr/src/usr.bin/cmp/cmp.1 +/usr/src/contrib/rcs-V5.6/man/co.1 +/usr/src/usr.bin/col/col.1 +/usr/src/usr.bin/colcrt/colcrt.1 +/usr/src/usr.bin/colrm/colrm.1 +/usr/src/usr.bin/column/column.1 +/usr/src/usr.bin/comm/comm.1 +/usr/src/old/compact/compact/compact.1 +/usr/src/usr.bin/compress/compress.1 +/usr/src/bin/cp/cp.1 +/usr/src/contrib/gcc-2.3.3/cpp.1 +/usr/src/old/crypt/crypt.1 +/usr/src/bin/csh/csh.1 +/usr/src/usr.bin/ctags/ctags.1 +/usr/src/usr.bin/cut/cut.1 +/usr/src/bin/date/date.1 +/usr/src/usr.bin/dc/dc.1 +/usr/src/bin/dd/dd.1 +/usr/src/usr.bin/deroff/deroff.1 +/usr/src/bin/df/df.1 +/usr/src/usr.bin/diction/diction/diction.1 +/usr/src/usr.bin/diff/diff/diff.1 +/usr/src/usr.bin/diff/diff3/diff3.1 +/usr/src/contrib/bind-4.9.2/man/dig.1 +/usr/src/usr.bin/du/du.1 +/usr/src/bin/sh/bltin/echo.1 +/usr/src/contrib/ed/ed.1 +/usr/src/contrib/emacs-18.57/etc/emacs.1 +/usr/src/contrib/groff-1.08/eqn/eqn.1 +/usr/src/usr.bin/error/error.1 +/usr/src/usr.bin/expand/expand.1 +/usr/src/bin/expr/expr.1 +/usr/src/usr.bin/false/false.1 +/usr/src/usr.bin/file/file.1 +/usr/src/usr.bin/find/find.1 +/usr/src/usr.bin/finger/finger.1 +/usr/src/usr.bin/fmt/fmt.1 +/usr/src/usr.bin/fold/fold.1 +/usr/src/usr.bin/fpr/fpr.1 +/usr/src/usr.bin/from/from.1 +/usr/src/usr.bin/fsplit/fsplit.1 +/usr/src/usr.bin/fstat/fstat.1 +/usr/src/usr.bin/ftp/ftp.1 +/usr/src/contrib/gcc-2.3.3/g++.1 +/usr/src/usr.bin/gcore/gcore.1 +/usr/src/contrib/gdb-4.7.LBL/gdb/gdb.1 +/usr/src/usr.bin/gprof/gprof.1 +/usr/src/usr.bin/graph/graph.1 +/usr/src/usr.bin/grep/egrep/grep.1 +/usr/src/contrib/groff-1.08/grodvi/grodvi.1 +/usr/src/contrib/groff-1.08/groff/groff.1 +/usr/src/contrib/groff-1.08/grog/grog.1 +/usr/src/contrib/groff-1.08/grops/grops.1 +/usr/src/contrib/groff-1.08/grotty/grotty.1 +/usr/src/usr.bin/id/groups.1 +/usr/src/contrib/gzip-1.2.4/gzexe.1 +/usr/src/contrib/gzip-1.2.4/gzip.1 +/usr/src/usr.bin/head/head.1 +/usr/src/usr.bin/hexdump/hexdump.1 +/usr/src/contrib/bind-4.9.2/man/host.1 +/usr/src/bin/hostname/hostname.1 +/usr/src/usr.bin/id/id.1 +/usr/src/contrib/rcs-V5.6/man/ident.1 +/usr/src/usr.bin/indent/indent.1 +/usr/src/contrib/groff-1.08/indxbib/indxbib.1 +/usr/src/usr.bin/xinstall/install.1 +/usr/src/contrib/bib/man/invert.1 +/usr/src/usr.bin/join/join.1 +/usr/src/usr.bin/jot/jot.1 +/usr/src/kerberosIV/man/kdestroy.1 +/usr/src/usr.bin/kdump/kdump.1 +/usr/src/kerberosIV/man/kerberos.1 +/usr/src/lib/librpc/secure_rpc/man/keylogin.1 +/usr/src/bin/kill/kill.1 +/usr/src/kerberosIV/man/kinit.1 +/usr/src/kerberosIV/man/klist.1 +/usr/src/kerberosIV/man/ksrvtgt.1 +/usr/src/usr.bin/ktrace/ktrace.1 +/usr/src/usr.bin/lam/lam.1 +/usr/src/usr.bin/last/last.1 +/usr/src/usr.bin/lastcomm/lastcomm.1 +/usr/src/old/ld/ld.1 +/usr/src/usr.bin/learn/learn/learn.1 +/usr/src/usr.bin/leave/leave.1 +/usr/src/contrib/flex-2.4.6/lex.1 +/usr/src/contrib/groff-1.08/lkbib/lkbib.1 +/usr/src/bin/ln/ln.1 +/usr/src/usr.bin/locate/locate/locate.1 +/usr/src/usr.bin/lock/lock.1 +/usr/src/usr.bin/logger/logger.1 +/usr/src/usr.bin/login/login.1 +/usr/src/usr.bin/logname/logname.1 +/usr/src/usr.bin/look/look.1 +/usr/src/contrib/groff-1.08/lookbib/lookbib.1 +/usr/src/usr.bin/lorder/lorder.1 +/usr/src/usr.sbin/lpr/lpq/lpq.1 +/usr/src/usr.sbin/lpr/lpr/lpr.1 +/usr/src/usr.sbin/lpr/lprm/lprm.1 +/usr/src/usr.sbin/lpr/lptest/lptest.1 +/usr/src/bin/ls/ls.1 +/usr/src/usr.bin/m4/m4.1 +/usr/src/usr.bin/mail/mail.1 +/usr/src/usr.sbin/sendmail/src/mailq.1 +/usr/src/usr.bin/make/make.1 +/usr/src/usr.bin/man/man.1 +/usr/src/contrib/rcs-V5.6/man/merge.1 +/usr/src/usr.bin/mesg/mesg.1 +/usr/src/contrib/mh-6.8.3a/doc/mh.1 +/usr/src/usr.bin/mkdep/mkdep.1 +/usr/src/bin/mkdir/mkdir.1 +/usr/src/usr.bin/mkfifo/mkfifo.1 +/usr/src/usr.bin/mklocale/mklocale.1 +/usr/src/usr.bin/mkstr/mkstr.1 +/usr/src/usr.bin/more/more.1 +/usr/src/usr.bin/tn3270/mset/mset.1 +/usr/src/usr.bin/msgs/msgs.1 +/usr/src/usr.bin/mt/mt.1 +/usr/src/bin/mv/mv.1 +/usr/src/usr.bin/netstat/netstat.1 +/usr/src/usr.sbin/sendmail/src/newaliases.1 +/usr/src/usr.bin/nfsstat/nfsstat.1 +/usr/src/usr.bin/nice/nice.1 +/usr/src/usr.bin/nm/nm.1 +/usr/src/usr.bin/nohup/nohup.1 +/usr/src/contrib/groff-1.08/nroff/nroff.1 +/usr/src/usr.bin/hexdump/od.1 +/usr/src/usr.bin/pagesize/pagesize.1 +/usr/src/usr.bin/passwd/passwd.1 +/usr/src/usr.bin/paste/paste.1 +/usr/src/usr.bin/patch/patch.1 +/usr/src/bin/pax/pax.1 +/usr/src/contrib/perl-4.036/perl.1 +/usr/src/contrib/groff-1.08/pfbtops/pfbtops.1 +/usr/src/contrib/groff-1.08/pic/pic.1 +/usr/src/usr.bin/plot/plot.1 +/usr/src/usr.bin/pr/pr.1 +/usr/src/usr.bin/printenv/printenv.1 +/usr/src/usr.bin/printf/printf.1 +/usr/src/bin/ps/ps.1 +/usr/src/contrib/groff-1.08/psbb/psbb.1 +/usr/src/usr.bin/ptx/ptx.1 +/usr/src/bin/pwd/pwd.1 +/usr/src/usr.bin/quota/quota.1 +/usr/src/usr.bin/ranlib/ranlib.1 +/usr/src/bin/rcp/rcp.1 +/usr/src/contrib/rcs-V5.6/man/rcs.1 +/usr/src/contrib/rcs-V5.6/man/rcsclean.1 +/usr/src/contrib/rcs-V5.6/man/rcsdiff.1 +/usr/src/contrib/rcs-V5.6/man/rcsfreeze.1 +/usr/src/contrib/rcs-V5.6/man/rcsintro.1 +/usr/src/contrib/rcs-V5.6/man/rcsmerge.1 +/usr/src/usr.bin/rdist/rdist.1 +/usr/src/contrib/groff-1.08/refer/refer.1 +/usr/src/kerberosIV/register/register.1 +/usr/src/usr.bin/rev/rev.1 +/usr/src/contrib/rcs-V5.6/man/rlog.1 +/usr/src/usr.bin/rlogin/rlogin.1 +/usr/src/bin/rm/rm.1 +/usr/src/bin/rmdir/rmdir.1 +/usr/src/lib/librpc/man/man1/rpcgen.1 +/usr/src/usr.bin/rs/rs.1 +/usr/src/usr.bin/rsh/rsh.1 +/usr/src/lib/librpc/man/man1/rstat.1 +/usr/src/usr.bin/ruptime/ruptime.1 +/usr/src/usr.bin/rwho/rwho.1 +/usr/src/usr.bin/sccs/sccs.1 +/usr/src/usr.bin/script/script.1 +/usr/src/usr.bin/sed/sed.1 +/usr/src/libexec/bugfiler/sendbug.1 +/usr/src/bin/sh/sh.1 +/usr/src/usr.bin/shar/shar.1 +/usr/src/usr.bin/size/size.1 +/usr/src/bin/sleep/sleep.1 +/usr/src/usr.bin/soelim/soelim.1 +/usr/src/usr.bin/sort/sort.1 +/usr/src/usr.bin/spell/spell.1 +/usr/src/usr.bin/spline/spline.1 +/usr/src/usr.bin/split/split.1 +/usr/src/sbin/startslip/startslip.1 +/usr/src/usr.bin/strings/strings.1 +/usr/src/usr.bin/strip/strip.1 +/usr/src/usr.bin/struct/struct/struct.1 +/usr/src/bin/stty/stty.1 +/usr/src/usr.bin/diction/style/style.1 +/usr/src/usr.bin/su/su.1 +/usr/src/old/sum/sum.1 +/usr/src/old/symorder/symorder.1 +/usr/src/usr.bin/systat/systat.1 +/usr/src/usr.bin/tail/tail.1 +/usr/src/usr.bin/talk/talk.1 +/usr/src/old/tar/tar.1 +/usr/src/contrib/groff-1.08/tbl/tbl.1 +/usr/src/usr.bin/tcopy/tcopy.1 +/usr/src/usr.bin/tee/tee.1 +/usr/src/usr.bin/telnet/telnet.1 +/usr/src/bin/test/test.1 +/usr/src/contrib/groff-1.08/tfmtodit/tfmtodit.1 +/usr/src/usr.bin/tftp/tftp.1 +/usr/src/usr.bin/time/time.1 +/usr/src/usr.bin/tip/tip.1 +/usr/src/usr.bin/tn3270/tn3270/tn3270.1 +/usr/src/usr.bin/touch/touch.1 +/usr/src/usr.bin/tput/tput.1 +/usr/src/usr.bin/tr/tr.1 +/usr/src/contrib/groff-1.08/troff/troff.1 +/usr/src/usr.bin/true/true.1 +/usr/src/usr.bin/tset/tset.1 +/usr/src/usr.bin/tsort/tsort.1 +/usr/src/usr.bin/tty/tty.1 +/usr/src/usr.bin/ul/ul.1 +/usr/src/usr.bin/uname/uname.1 +/usr/src/usr.bin/unifdef/unifdef.1 +/usr/src/usr.bin/uniq/uniq.1 +/usr/src/usr.bin/units/units.1 +/usr/src/usr.bin/unvis/unvis.1 +/usr/src/usr.bin/w/uptime.1 +/usr/src/usr.bin/users/users.1 +/usr/src/usr.bin/uucp/uucp/uucp.1 +/usr/src/usr.bin/uuencode/uuencode.1 +/usr/src/usr.bin/uucp/uulog/uulog.1 +/usr/src/usr.bin/uucp/uuname/uuname.1 +/usr/src/usr.bin/uucp/uuq/uuq.1 +/usr/src/usr.bin/uucp/uusend/uusend.1 +/usr/src/usr.bin/uucp/uux/uux.1 +/usr/src/usr.bin/vacation/vacation.1 +/usr/src/usr.bin/vgrind/vgrind.1 +/usr/src/contrib/nvi.1.14/obj/vi.1 +/usr/src/usr.bin/vis/vis.1 +/usr/src/usr.bin/w/w.1 +/usr/src/share/man/man1/wait.1 +/usr/src/usr.bin/wall/wall.1 +/usr/src/usr.bin/wc/wc.1 +/usr/src/usr.bin/what/what.1 +/usr/src/usr.bin/whatis/whatis.1 +/usr/src/usr.bin/whereis/whereis.1 +/usr/src/old/which/which.1 +/usr/src/usr.bin/who/who.1 +/usr/src/usr.bin/id/whoami.1 +/usr/src/usr.bin/whois/whois.1 +/usr/src/usr.bin/window/window.1 +/usr/src/usr.bin/write/write.1 +/usr/src/usr.bin/xargs/xargs.1 +/usr/src/games/chess/Xchess/xchess.1 +/usr/src/usr.bin/xsend/xsend/xsend.1 +/usr/src/usr.bin/xstr/xstr.1 +/usr/src/usr.bin/yacc/yacc.1 +/usr/src/usr.bin/yes/yes.1 +/usr/src/usr.bin/yacc/yyfix.1 +/usr/src/contrib/gzip-1.2.4/zdiff.1 +/usr/src/contrib/gzip-1.2.4/zforce.1 +/usr/src/contrib/gzip-1.2.4/zgrep.1 +/usr/src/contrib/gzip-1.2.4/zmore.1 +/usr/src/contrib/gzip-1.2.4/znew.1 diff --git a/share/man/man0/man2 b/share/man/man0/man2 new file mode 100644 index 0000000..2e4d130 --- /dev/null +++ b/share/man/man0/man2 @@ -0,0 +1,107 @@ +/usr/src/lib/libc/sys/intro.2 +/usr/src/lib/libc/sys/accept.2 +/usr/src/lib/libc/sys/access.2 +/usr/src/lib/libc/sys/acct.2 +/usr/src/lib/libc/sys/adjtime.2 +/usr/src/lib/libc/sys/bind.2 +/usr/src/lib/libc/sys/brk.2 +/usr/src/lib/libc/sys/chdir.2 +/usr/src/lib/libc/sys/chflags.2 +/usr/src/lib/libc/sys/chmod.2 +/usr/src/lib/libc/sys/chown.2 +/usr/src/lib/libc/sys/chroot.2 +/usr/src/lib/libc/sys/close.2 +/usr/src/lib/libc/sys/connect.2 +/usr/src/lib/libc/compat-43/creat.2 +/usr/src/lib/libc/sys/dup.2 +/usr/src/lib/libc/sys/execve.2 +/usr/src/lib/libc/sys/_exit.2 +/usr/src/lib/libc/sys/fcntl.2 +/usr/src/lib/libc/sys/flock.2 +/usr/src/lib/libc/sys/fork.2 +/usr/src/lib/libc/sys/fsync.2 +/usr/src/lib/libc/sys/getdirentries.2 +/usr/src/lib/libc/sys/getdtablesize.2 +/usr/src/lib/libc/sys/getfh.2 +/usr/src/lib/libc/sys/getfsstat.2 +/usr/src/lib/libc/sys/getgid.2 +/usr/src/lib/libc/sys/getgroups.2 +/usr/src/lib/libc/sys/getitimer.2 +/usr/src/lib/libc/sys/getlogin.2 +/usr/src/lib/libc/sys/getpeername.2 +/usr/src/lib/libc/sys/getpgrp.2 +/usr/src/lib/libc/sys/getpid.2 +/usr/src/lib/libc/sys/getpriority.2 +/usr/src/lib/libc/sys/getrlimit.2 +/usr/src/lib/libc/sys/getrusage.2 +/usr/src/lib/libc/sys/getsockname.2 +/usr/src/lib/libc/sys/getsockopt.2 +/usr/src/lib/libc/sys/gettimeofday.2 +/usr/src/lib/libc/sys/getuid.2 +/usr/src/lib/libc/sys/ioctl.2 +/usr/src/lib/libc/sys/kill.2 +/usr/src/lib/libc/compat-43/killpg.2 +/usr/src/lib/libc/sys/ktrace.2 +/usr/src/lib/libc/sys/link.2 +/usr/src/lib/libc/sys/listen.2 +/usr/src/lib/libc/sys/lseek.2 +/usr/src/lib/libc/sys/madvise.2 +/usr/src/lib/libc/sys/mincore.2 +/usr/src/lib/libc/sys/mkdir.2 +/usr/src/lib/libc/sys/mkfifo.2 +/usr/src/lib/libc/sys/mknod.2 +/usr/src/lib/libc/sys/mlock.2 +/usr/src/lib/libc/sys/mmap.2 +/usr/src/lib/libc/sys/mount.2 +/usr/src/lib/libc/sys/mprotect.2 +/usr/src/lib/libc/sys/msync.2 +/usr/src/lib/libc/sys/munmap.2 +/usr/src/lib/libc/sys/nfssvc.2 +/usr/src/lib/libc/sys/open.2 +/usr/src/lib/libc/sys/pathconf.2 +/usr/src/lib/libc/sys/pipe.2 +/usr/src/lib/libc/sys/profil.2 +/usr/src/lib/libc/sys/ptrace.2 +/usr/src/lib/libc/sys/quotactl.2 +/usr/src/lib/libc/sys/read.2 +/usr/src/lib/libc/sys/readlink.2 +/usr/src/lib/libc/sys/reboot.2 +/usr/src/lib/libc/sys/recv.2 +/usr/src/lib/libc/sys/rename.2 +/usr/src/lib/libc/sys/revoke.2 +/usr/src/lib/libc/sys/rmdir.2 +/usr/src/lib/libc/sys/select.2 +/usr/src/lib/libc/sys/send.2 +/usr/src/lib/libc/sys/setgroups.2 +/usr/src/lib/libc/sys/setpgid.2 +/usr/src/lib/libc/compat-43/setregid.2 +/usr/src/lib/libc/compat-43/setreuid.2 +/usr/src/lib/libc/sys/setsid.2 +/usr/src/lib/libc/sys/setuid.2 +/usr/src/lib/libc/sys/shutdown.2 +/usr/src/lib/libc/sys/sigaction.2 +/usr/src/lib/libc/sys/sigaltstack.2 +/usr/src/lib/libc/compat-43/sigblock.2 +/usr/src/lib/libc/compat-43/sigpause.2 +/usr/src/lib/libc/sys/sigpending.2 +/usr/src/lib/libc/sys/sigprocmask.2 +/usr/src/lib/libc/sys/sigreturn.2 +/usr/src/lib/libc/compat-43/sigsetmask.2 +/usr/src/lib/libc/sys/sigstack.2 +/usr/src/lib/libc/sys/sigsuspend.2 +/usr/src/lib/libc/compat-43/sigvec.2 +/usr/src/lib/libc/sys/socket.2 +/usr/src/lib/libc/sys/socketpair.2 +/usr/src/lib/libc/sys/stat.2 +/usr/src/lib/libc/sys/statfs.2 +/usr/src/lib/libc/sys/swapon.2 +/usr/src/lib/libc/sys/symlink.2 +/usr/src/lib/libc/sys/sync.2 +/usr/src/lib/libc/sys/syscall.2 +/usr/src/lib/libc/sys/truncate.2 +/usr/src/lib/libc/sys/umask.2 +/usr/src/lib/libc/sys/unlink.2 +/usr/src/lib/libc/sys/utimes.2 +/usr/src/lib/libc/sys/vfork.2 +/usr/src/lib/libc/sys/wait.2 +/usr/src/lib/libc/sys/write.2 diff --git a/share/man/man0/man3 b/share/man/man0/man3 new file mode 100644 index 0000000..8175586 --- /dev/null +++ b/share/man/man0/man3 @@ -0,0 +1,257 @@ +/usr/src/share/man/man3/intro.3 +/usr/src/lib/libc/stdlib/abort.3 +/usr/src/lib/libc/stdlib/abs.3 +/usr/src/kerberosIV/man/acl_check.3 +/usr/src/lib/libm/common_source/acos.3 +/usr/src/lib/libm/common_source/acosh.3 +/usr/src/lib/libc/gen/alarm.3 +/usr/src/lib/libc/stdlib/alloca.3 +/usr/src/lib/libm/common_source/asin.3 +/usr/src/lib/libm/common_source/asinh.3 +/usr/src/share/man/man3/assert.3 +/usr/src/lib/libm/common_source/atan.3 +/usr/src/lib/libm/common_source/atan2.3 +/usr/src/lib/libm/common_source/atanh.3 +/usr/src/lib/libc/stdlib/atexit.3 +/usr/src/lib/libc/stdlib/atof.3 +/usr/src/lib/libc/stdlib/atoi.3 +/usr/src/lib/libc/stdlib/atol.3 +/usr/src/lib/libc/string/bcmp.3 +/usr/src/lib/libc/string/bcopy.3 +/usr/src/share/man/man3/bitstring.3 +/usr/src/lib/libc/stdlib/bsearch.3 +/usr/src/lib/libc/string/bstring.3 +/usr/src/lib/libc/db/man/btree.3 +/usr/src/lib/libc/net/byteorder.3 +/usr/src/lib/libc/string/bzero.3 +/usr/src/lib/libc/stdlib/calloc.3 +/usr/src/lib/libm/common_source/ceil.3 +/usr/src/lib/libc/gen/clock.3 +/usr/src/lib/libc/gen/confstr.3 +/usr/src/lib/libm/common_source/cos.3 +/usr/src/lib/libm/common_source/cosh.3 +/usr/src/lib/libc/gen/crypt.3 +/usr/src/lib/libc/gen/ctermid.3 +/usr/src/lib/libc/gen/ctime.3 +/usr/src/lib/libc/locale/ctype.3 +/usr/src/lib/libcurses/curses.3 +/usr/src/lib/libc/gen/daemon.3 +/usr/src/lib/libc/db/man/dbopen.3 +/usr/src/kerberosIV/man/des_crypt.3 +/usr/src/lib/libc/gen/devname.3 +/usr/src/lib/libc/gen/directory.3 +/usr/src/lib/libc/stdlib/div.3 +/usr/src/lib/libcompat/4.3/ecvt.3 +/usr/src/share/man/man3/end.3 +/usr/src/lib/libm/common_source/erf.3 +/usr/src/lib/libc/gen/err.3 +/usr/src/lib/libc/gen/exec.3 +/usr/src/lib/libc/stdlib/exit.3 +/usr/src/lib/libm/common_source/exp.3 +/usr/src/lib/libm/common_source/fabs.3 +/usr/src/lib/libc/stdio/fclose.3 +/usr/src/lib/libc/stdio/ferror.3 +/usr/src/lib/libc/stdio/fflush.3 +/usr/src/lib/libc/string/ffs.3 +/usr/src/lib/libc/stdio/fgetln.3 +/usr/src/lib/libc/stdio/fgets.3 +/usr/src/lib/libm/common_source/floor.3 +/usr/src/lib/libm/common_source/fmod.3 +/usr/src/lib/libc/gen/fnmatch.3 +/usr/src/lib/libc/stdio/fopen.3 +/usr/src/lib/libc/stdio/fputs.3 +/usr/src/lib/libc/stdio/fread.3 +/usr/src/lib/libc/stdlib/free.3 +/usr/src/lib/libc/gen/frexp.3 +/usr/src/lib/libc/stdio/fseek.3 +/usr/src/lib/libcompat/4.1/ftime.3 +/usr/src/lib/libc/gen/fts.3 +/usr/src/lib/libc/stdio/funopen.3 +/usr/src/lib/libc/gen/getbsize.3 +/usr/src/lib/libc/stdio/getc.3 +/usr/src/lib/libc/gen/getcap.3 +/usr/src/lib/libc/gen/getcwd.3 +/usr/src/lib/libc/gen/getdiskbyname.3 +/usr/src/lib/libc/stdlib/getenv.3 +/usr/src/lib/libc/gen/getfsent.3 +/usr/src/lib/libc/gen/getgrent.3 +/usr/src/lib/libc/gen/getgrouplist.3 +/usr/src/lib/libc/net/gethostbyname.3 +/usr/src/lib/libc/compat-43/gethostid.3 +/usr/src/lib/libc/gen/gethostname.3 +/usr/src/lib/libc/gen/getloadavg.3 +/usr/src/lib/libc/gen/getmntinfo.3 +/usr/src/sbin/mount/getmntopts.3 +/usr/src/lib/libc/net/getnetent.3 +/usr/src/lib/libc/gen/getnetgrent.3 +/usr/src/lib/libc/stdlib/getopt.3 +/usr/src/lib/libc/gen/getpagesize.3 +/usr/src/lib/libc/gen/getpass.3 +/usr/src/lib/libc/net/getprotoent.3 +/usr/src/lib/libcompat/4.1/getpw.3 +/usr/src/lib/libc/gen/getpwent.3 +/usr/src/lib/libc/net/getservent.3 +/usr/src/lib/libc/stdlib/getsubopt.3 +/usr/src/lib/libc/gen/getttyent.3 +/usr/src/lib/libc/gen/getusershell.3 +/usr/src/lib/libc/gen/glob.3 +/usr/src/lib/libc/db/man/hash.3 +/usr/src/lib/libm/common_source/hypot.3 +/usr/src/lib/libm/common_source/ieee.3 +/usr/src/lib/libc/string/index.3 +/usr/src/lib/libc/net/inet.3 +/usr/src/lib/libm/common_source/infnan.3 +/usr/src/lib/libc/gen/initgroups.3 +/usr/src/lib/libcompat/4.3/insque.3 +/usr/src/lib/libc/locale/isalnum.3 +/usr/src/lib/libc/locale/isalpha.3 +/usr/src/lib/libc/locale/isascii.3 +/usr/src/lib/libc/locale/isblank.3 +/usr/src/lib/libc/locale/iscntrl.3 +/usr/src/lib/libc/locale/isdigit.3 +/usr/src/lib/libc/locale/isgraph.3 +/usr/src/lib/libc/gen/isinf.3 +/usr/src/lib/libc/locale/islower.3 +/usr/src/lib/libc/net/iso_addr.3 +/usr/src/lib/libc/locale/isprint.3 +/usr/src/lib/libc/locale/ispunct.3 +/usr/src/lib/libc/locale/isspace.3 +/usr/src/lib/libc/locale/isupper.3 +/usr/src/lib/libc/locale/isxdigit.3 +/usr/src/lib/libm/common_source/j0.3 +/usr/src/kerberosIV/man/krb.3 +/usr/src/kerberosIV/man/krb_realmofhost.3 +/usr/src/kerberosIV/man/krb_sendauth.3 +/usr/src/kerberosIV/man/krb_set_tkt_string.3 +/usr/src/kerberosIV/man/kuserok.3 +/usr/src/lib/libkvm/kvm.3 +/usr/src/lib/libkvm/kvm_geterr.3 +/usr/src/lib/libkvm/kvm_getfiles.3 +/usr/src/lib/libkvm/kvm_getloadavg.3 +/usr/src/lib/libkvm/kvm_getprocs.3 +/usr/src/lib/libkvm/kvm_nlist.3 +/usr/src/lib/libkvm/kvm_open.3 +/usr/src/lib/libkvm/kvm_read.3 +/usr/src/lib/libc/stdlib/labs.3 +/usr/src/lib/libc/gen/ldexp.3 +/usr/src/lib/libc/stdlib/ldiv.3 +/usr/src/lib/libm/common_source/lgamma.3 +/usr/src/lib/libc/net/linkaddr.3 +/usr/src/lib/libcompat/4.3/lsearch.3 +/usr/src/lib/libc/stdlib/malloc.3 +/usr/src/lib/libm/common_source/math.3 +/usr/src/lib/libc/locale/mbrune.3 +/usr/src/lib/libc/string/memccpy.3 +/usr/src/lib/libc/string/memchr.3 +/usr/src/lib/libc/string/memcmp.3 +/usr/src/lib/libc/string/memcpy.3 +/usr/src/lib/libc/string/memmove.3 +/usr/src/lib/libc/stdlib/memory.3 +/usr/src/lib/libc/string/memset.3 +/usr/src/lib/libc/stdio/mktemp.3 +/usr/src/lib/libc/gen/modf.3 +/usr/src/lib/libc/gmon/moncontrol.3 +/usr/src/lib/libmp/mp.3 +/usr/src/lib/libc/db/man/mpool.3 +/usr/src/lib/libc/locale/multibyte.3 +/usr/src/lib/libc/gen/nice.3 +/usr/src/lib/libc/gen/nlist.3 +/usr/src/lib/libc/net/ns.3 +/usr/src/lib/libc/gen/pause.3 +/usr/src/lib/libplot/plot/plot.3 +/usr/src/lib/libc/gen/popen.3 +/usr/src/lib/libc/stdio/printf.3 +/usr/src/lib/libc/gen/psignal.3 +/usr/src/lib/libc/stdio/putc.3 +/usr/src/lib/libc/gen/pwcache.3 +/usr/src/lib/libc/stdlib/qsort.3 +/usr/src/share/man/man3/queue.3 +/usr/src/lib/libc/stdlib/radixsort.3 +/usr/src/lib/libc/gen/raise.3 +/usr/src/lib/libc/stdlib/rand.3 +/usr/src/lib/libc/stdlib/random.3 +/usr/src/lib/libc/net/rcmd.3 +/usr/src/lib/libcompat/4.3/re_comp.3 +/usr/src/lib/libc/stdlib/realloc.3 +/usr/src/lib/libc/stdlib/realpath.3 +/usr/src/lib/libc/db/man/recno.3 +/usr/src/lib/libc/regex/regex.3 +/usr/src/lib/libcompat/regexp/regexp.3 +/usr/src/lib/libc/stdio/remove.3 +/usr/src/lib/libc/net/resolver.3 +/usr/src/lib/libcompat/4.3/rexec.3 +/usr/src/lib/libc/string/rindex.3 +/usr/src/lib/libm/common_source/rint.3 +/usr/src/lib/libc/locale/rune.3 +/usr/src/lib/libc/gen/scandir.3 +/usr/src/lib/libc/stdio/scanf.3 +/usr/src/lib/libc/stdio/setbuf.3 +/usr/src/lib/libc/gen/setjmp.3 +/usr/src/lib/libc/locale/setlocale.3 +/usr/src/lib/libc/gen/setmode.3 +/usr/src/lib/libc/compat-43/setruid.3 +/usr/src/lib/libc/gen/siginterrupt.3 +/usr/src/lib/libc/gen/signal.3 +/usr/src/lib/libc/gen/sigsetops.3 +/usr/src/lib/libm/common_source/sin.3 +/usr/src/lib/libm/common_source/sinh.3 +/usr/src/lib/libc/gen/sleep.3 +/usr/src/lib/libm/common_source/sqrt.3 +/usr/src/share/man/man3/stdarg.3 +/usr/src/lib/libc/stdio/stdio.3 +/usr/src/lib/libc/string/strcasecmp.3 +/usr/src/lib/libc/string/strcat.3 +/usr/src/lib/libc/string/strchr.3 +/usr/src/lib/libc/string/strcmp.3 +/usr/src/lib/libc/string/strcoll.3 +/usr/src/lib/libc/string/strcpy.3 +/usr/src/lib/libc/string/strcspn.3 +/usr/src/lib/libc/string/strdup.3 +/usr/src/lib/libc/string/strerror.3 +/usr/src/lib/libc/string/strftime.3 +/usr/src/lib/libc/string/string.3 +/usr/src/lib/libc/string/strlen.3 +/usr/src/lib/libc/string/strmode.3 +/usr/src/lib/libc/string/strpbrk.3 +/usr/src/lib/libc/string/strrchr.3 +/usr/src/lib/libc/string/strsep.3 +/usr/src/lib/libc/string/strspn.3 +/usr/src/lib/libc/string/strstr.3 +/usr/src/lib/libc/stdlib/strtod.3 +/usr/src/lib/libc/string/strtok.3 +/usr/src/lib/libc/stdlib/strtol.3 +/usr/src/lib/libc/stdlib/strtoul.3 +/usr/src/lib/libc/string/strxfrm.3 +/usr/src/lib/libcompat/4.1/stty.3 +/usr/src/lib/libc/string/swab.3 +/usr/src/lib/libc/gen/sysconf.3 +/usr/src/lib/libc/gen/sysctl.3 +/usr/src/lib/libc/gen/syslog.3 +/usr/src/lib/libc/stdlib/system.3 +/usr/src/lib/libm/common_source/tan.3 +/usr/src/lib/libm/common_source/tanh.3 +/usr/src/lib/libc/gen/tcgetpgrp.3 +/usr/src/lib/libc/gen/tcsendbreak.3 +/usr/src/lib/libc/gen/tcsetattr.3 +/usr/src/lib/libc/gen/tcsetpgrp.3 +/usr/src/lib/libterm/termcap.3 +/usr/src/kerberosIV/man/tf_util.3 +/usr/src/lib/libc/gen/time.3 +/usr/src/lib/libc/gen/times.3 +/usr/src/lib/libc/gen/timezone.3 +/usr/src/lib/libc/stdio/tmpnam.3 +/usr/src/lib/libc/locale/toascii.3 +/usr/src/lib/libc/locale/tolower.3 +/usr/src/lib/libc/locale/toupper.3 +/usr/src/lib/libc/gen/ttyname.3 +/usr/src/lib/libc/gen/tzset.3 +/usr/src/lib/libc/gen/ualarm.3 +/usr/src/lib/libc/gen/uname.3 +/usr/src/lib/libc/stdio/ungetc.3 +/usr/src/lib/libc/gen/unvis.3 +/usr/src/lib/libc/gen/usleep.3 +/usr/src/lib/libc/gen/utime.3 +/usr/src/lib/libc/gen/valloc.3 +/usr/src/lib/libc/gen/vis.3 +/usr/src/lib/libcompat/4.1/vlimit.3 +/usr/src/lib/libcompat/4.1/vtimes.3 diff --git a/share/man/man0/man4 b/share/man/man0/man4 new file mode 100644 index 0000000..4113309 --- /dev/null +++ b/share/man/man0/man4 @@ -0,0 +1,51 @@ +/usr/src/share/man/man4/man4.hp300/intro.4 +/usr/src/share/man/man4/netintro.4 +/usr/src/share/man/man4/man4.hp300/autoconf.4 +/usr/src/share/man/man4/man4.sparc/bwtwo.4 +/usr/src/share/man/man4/man4.sparc/cgsix.4 +/usr/src/share/man/man4/man4.sparc/cgthree.4 +/usr/src/share/man/man4/clnp.4 +/usr/src/share/man/man4/cltp.4 +/usr/src/share/man/man4/man4.hp300/cons.4 +/usr/src/share/man/man4/man4.hp300/ct.4 +/usr/src/share/man/man4/man4.hp300/dca.4 +/usr/src/share/man/man4/man4.hp300/dcl.4 +/usr/src/share/man/man4/man4.hp300/dcm.4 +/usr/src/share/man/man4/drum.4 +/usr/src/share/man/man4/man4.hp300/dv.4 +/usr/src/share/man/man4/esis.4 +/usr/src/lib/libc/locale/euc.4 +/usr/src/share/man/man4/fd.4 +/usr/src/share/man/man4/man4.hp300/gb.4 +/usr/src/share/man/man4/man4.hp300/grf.4 +/usr/src/share/man/man4/man4.hp300/hil.4 +/usr/src/share/man/man4/icmp.4 +/usr/src/share/man/man4/idp.4 +/usr/src/share/man/man4/inet.4 +/usr/src/share/man/man4/ip.4 +/usr/src/share/man/man4/iso.4 +/usr/src/share/man/man4/man4.hp300/ite.4 +/usr/src/share/man/man4/man4.hp300/le.4 +/usr/src/share/man/man4/man4.sparc/le.4 +/usr/src/share/man/man4/lo.4 +/usr/src/share/man/man4/man4.hp300/mem.4 +/usr/src/share/man/man4/man4.sparc/mem.4 +/usr/src/share/man/man4/ns.4 +/usr/src/share/man/man4/nsip.4 +/usr/src/share/man/man4/null.4 +/usr/src/share/man/man4/man4.sparc/openprom.4 +/usr/src/share/man/man4/man4.hp300/ppi.4 +/usr/src/share/man/man4/pty.4 +/usr/src/share/man/man4/man4.hp300/rb.4 +/usr/src/share/man/man4/man4.hp300/rd.4 +/usr/src/share/man/man4/route.4 +/usr/src/share/man/man4/spp.4 +/usr/src/share/man/man4/man4.hp300/st.4 +/usr/src/share/man/man4/man4.hp300/tc.4 +/usr/src/share/man/man4/tcp.4 +/usr/src/share/man/man4/termios.4 +/usr/src/share/man/man4/tp.4 +/usr/src/share/man/man4/tty.4 +/usr/src/share/man/man4/udp.4 +/usr/src/share/man/man4/unix.4 +/usr/src/lib/libc/locale/utf2.4 diff --git a/share/man/man0/man5 b/share/man/man0/man5 new file mode 100644 index 0000000..731023c --- /dev/null +++ b/share/man/man0/man5 @@ -0,0 +1,54 @@ +/usr/src/share/man/man5/a.out.5 +/usr/src/share/man/man5/acct.5 +/usr/src/usr.sbin/sendmail/src/aliases.5 +/usr/src/usr.bin/ar/ar.5.5 +/usr/src/share/man/man5/core.5 +/usr/src/usr.sbin/cron/crontab.5 +/usr/src/share/man/man5/dir.5 +/usr/src/sbin/disklabel/disklabel.5.5 +/usr/src/share/man/man5/disktab.5 +/usr/src/games/dm/dm.conf.5 +/usr/src/share/man/man5/dump.5 +/usr/src/sbin/mountd/exports.5 +/usr/src/share/man/man5/fs.5 +/usr/src/share/man/man5/fstab.5 +/usr/src/libexec/getty/gettytab.5 +/usr/src/contrib/groff-1.08/man/groff_font.5 +/usr/src/contrib/groff-1.08/man/groff_out.5 +/usr/src/share/man/man5/group.5 +/usr/src/share/man/man5/hosts.5 +/usr/src/kerberosIV/man/krb.conf.5 +/usr/src/kerberosIV/man/krb.realms.5 +/usr/src/usr.bin/uucp/man5/L-devices.5 +/usr/src/usr.bin/uucp/man5/L-dialcodes.5 +/usr/src/usr.bin/uucp/man5/L.aliases.5 +/usr/src/usr.bin/uucp/man5/L.cmds.5 +/usr/src/usr.bin/uucp/man5/L.sys.5 +/usr/src/usr.bin/man/man.conf.5 +/usr/src/usr.bin/tn3270/mset/map3270.5 +/usr/src/sbin/mountd/netgroup.5 +/usr/src/share/man/man5/networks.5 +/usr/src/share/man/man5/passwd.5 +/usr/src/share/man/man5/phones.5 +/usr/src/share/man/man5/plot.5 +/usr/src/share/man/man5/printcap.5 +/usr/src/share/man/man5/protocols.5 +/usr/src/lib/librpc/secure_rpc/man/publickey.5 +/usr/src/usr.bin/ranlib/ranlib.5.5 +/usr/src/contrib/rcs-V5.6/man/rcsfile.5 +/usr/src/share/man/man5/remote.5 +/usr/src/share/man/man5/resolver.5 +/usr/src/lib/librpc/man/man5/rpc.5 +/usr/src/share/man/man5/services.5 +/usr/src/share/man/man5/shells.5 +/usr/src/share/man/man5/stab.5 +/usr/src/usr.sbin/syslogd/syslog.conf.5 +/usr/src/old/tar/tarformat.5 +/usr/src/share/termcap/termcap.5 +/usr/src/libexec/getty/ttys.5 +/usr/src/share/man/man5/types.5 +/usr/src/share/zoneinfo/tzfile.5 +/usr/src/usr.bin/uucp/man5/USERFILE.5 +/usr/src/share/man/man5/utmp.5 +/usr/src/usr.bin/uuencode/uuencode.format.5 +/usr/src/usr.bin/vgrind/vgrindefs.5 diff --git a/share/man/man0/man6 b/share/man/man0/man6 new file mode 100644 index 0000000..3ef02cf --- /dev/null +++ b/share/man/man0/man6 @@ -0,0 +1,42 @@ +/usr/src/games/adventure/adventure.6 +/usr/src/games/arithmetic/arithmetic.6 +/usr/src/games/atc/atc.6 +/usr/src/games/backgammon/backgammon/backgammon.6 +/usr/src/usr.bin/banner/banner.6 +/usr/src/games/battlestar/battlestar.6 +/usr/src/games/bcd/bcd.6 +/usr/src/games/boggle/boggle/boggle.6 +/usr/src/games/caesar/caesar.6 +/usr/src/games/canfield/canfield/canfield.6 +/usr/src/games/chess/chess.6 +/usr/src/games/ching/ching.6 +/usr/src/games/cribbage/cribbage.6 +/usr/src/contrib/dungeon/dungeon.6 +/usr/src/games/factor/factor.6 +/usr/src/games/fish/fish.6 +/usr/src/games/fortune/fortune/fortune.6 +/usr/src/games/hack/hack.6 +/usr/src/games/hangman/hangman.6 +/usr/src/contrib/hunt/hunt.6 +/usr/src/contrib/hunt/huntd.6 +/usr/src/games/larn/larn.6 +/usr/src/games/mille/mille.6 +/usr/src/games/monop/monop.6 +/usr/src/games/number/number.6 +/usr/src/games/phantasia/phantasia.6 +/usr/src/games/pig/pig.6 +/usr/src/games/pom/pom.6 +/usr/src/games/quiz/quiz.6 +/usr/src/games/rain/rain.6 +/usr/src/games/random/random.6 +/usr/src/games/robots/robots.6 +/usr/src/games/rogue/rogue.6 +/usr/src/games/sail/sail.6 +/usr/src/games/snake/snake/snake.6 +/usr/src/games/tetris/tetris.6 +/usr/src/games/trek/trek.6 +/usr/src/games/worm/worm.6 +/usr/src/games/worms/worms.6 +/usr/src/games/wump/wump.6 +/usr/src/games/xneko/xneko.6 +/usr/src/games/xroach/xroach.6 diff --git a/share/man/man0/man7 b/share/man/man0/man7 new file mode 100644 index 0000000..5683ebb --- /dev/null +++ b/share/man/man0/man7 @@ -0,0 +1,18 @@ +/usr/src/share/man/man7/intro.7 +/usr/src/share/man/man7/ascii.7 +/usr/src/share/man/man7/environ.7 +/usr/src/share/man/man7/eqnchar.7 +/usr/src/contrib/groff-1.08/man/groff_char.7 +/usr/src/share/man/man7/hier.7 +/usr/src/share/man/man7/hostname.7 +/usr/src/share/man/man7/mailaddr.7 +/usr/src/share/man/man7/man.7 +/usr/src/share/man/man7/mdoc.7 +/usr/src/share/man/man7/mdoc.samples.7 +/usr/src/share/me/me.7 +/usr/src/contrib/groff-1.08/mm/mm.7 +/usr/src/share/man/man7/ms.7 +/usr/src/share/man/man7/operator.7 +/usr/src/lib/libc/regex/re_format.7 +/usr/src/bin/ln/symlink.7 +/usr/src/share/man/man7/term.7 diff --git a/share/man/man0/man8 b/share/man/man0/man8 new file mode 100644 index 0000000..1b92703 --- /dev/null +++ b/share/man/man0/man8 @@ -0,0 +1,145 @@ +/usr/src/share/man/man8/intro.8 +/usr/src/usr.sbin/ac/ac.8 +/usr/src/usr.bin/uucp/acucntrl/acucntrl.8 +/usr/src/share/man/man8/adduser.8 +/usr/src/usr.sbin/amd/amd/amd.8 +/usr/src/usr.sbin/amd/amq/amq.8 +/usr/src/usr.sbin/arp/arp.8 +/usr/src/usr.sbin/bad144/bad144.8 +/usr/src/sbin/badsect/badsect.8 +/usr/src/sbin/reboot/boot_hp300.8 +/usr/src/sbin/reboot/boot_sparc.8 +/usr/src/libexec/bugfiler/bugfiler.8 +/usr/src/usr.sbin/chown/chown.8 +/usr/src/usr.sbin/chroot/chroot.8 +/usr/src/sbin/clri/clri.8 +/usr/src/libexec/comsat/comsat.8 +/usr/src/usr.sbin/config/config.8 +/usr/src/usr.sbin/config.new/config.new.8 +/usr/src/share/man/man8/man8.hp300/crash.8 +/usr/src/usr.sbin/cron/cron.8 +/usr/src/usr.sbin/dev_mkdb/dev_mkdb.8 +/usr/src/sbin/disklabel/disklabel.8 +/usr/src/usr.sbin/diskpart/diskpart.8 +/usr/src/games/dm/dm.8 +/usr/src/sbin/dmesg/dmesg.8 +/usr/src/sbin/dump/dump.8 +/usr/src/sbin/dumpfs/dumpfs.8 +/usr/src/sbin/dumplfs/dumplfs.8 +/usr/src/usr.sbin/edquota/edquota.8 +/usr/src/usr.sbin/eeprom/eeprom.8 +/usr/src/kerberosIV/man/ext_srvtab.8 +/usr/src/sbin/fastboot/fastboot.8 +/usr/src/libexec/fingerd/fingerd.8 +/usr/src/share/man/man8/man8.hp300/format.8 +/usr/src/sbin/fsck/fsck.8 +/usr/src/sbin/fsdb/fsdb.8 +/usr/src/usr.sbin/amd/fsinfo/fsinfo.8 +/usr/src/libexec/ftpd/ftpd.8 +/usr/src/libexec/getty/getty.8 +/usr/src/sbin/icheck/icheck.8 +/usr/src/sbin/ifconfig/ifconfig.8 +/usr/src/usr.sbin/inetd/inetd.8 +/usr/src/sbin/init/init.8 +/usr/src/usr.sbin/iostat/iostat.8 +/usr/src/kerberosIV/man/kdb_destroy.8 +/usr/src/kerberosIV/man/kdb_edit.8 +/usr/src/kerberosIV/man/kdb_init.8 +/usr/src/kerberosIV/man/kdb_util.8 +/usr/src/usr.sbin/kgmon/kgmon.8 +/usr/src/libexec/kpasswdd/kpasswdd.8 +/usr/src/kerberosIV/man/kstash.8 +/usr/src/usr.sbin/kvm_mkdb/kvm_mkdb.8 +/usr/src/libexec/lfs_cleanerd/lfs_cleanerd.8 +/usr/src/usr.sbin/lpr/lpc/lpc.8 +/usr/src/usr.sbin/lpr/lpd/lpd.8 +/usr/src/libexec/mail.local/mail.local.8 +/usr/src/kerberosIV/make_keypair/make_keypair.8 +/usr/src/share/man/man8/makedev.8 +/usr/src/share/man/man8/man8.hp300/MAKEDEV.8 +/usr/src/libexec/makekey/makekey.8 +/usr/src/usr.sbin/sendmail/makemap/makemap.8 +/usr/src/contrib/mh-6.8.3a/conf/mh-gen.8 +/usr/src/usr.sbin/amd/mk-amd-map/mk-amd-map.8 +/usr/src/sbin/mknod/mknod.8 +/usr/src/usr.sbin/mkproto/mkproto.8 +/usr/src/sbin/mount/mount.8 +/usr/src/sbin/mount_cd9660/mount_cd9660.8 +/usr/src/sbin/mount_fdesc/mount_fdesc.8 +/usr/src/sbin/mount_kernfs/mount_kernfs.8 +/usr/src/sbin/mount_lfs/mount_lfs.8 +/usr/src/sbin/mount_nfs/mount_nfs.8 +/usr/src/sbin/mount_null/mount_null.8 +/usr/src/sbin/mount_portal/mount_portal.8 +/usr/src/sbin/mount_procfs/mount_procfs.8 +/usr/src/sbin/mount_umap/mount_umap.8 +/usr/src/sbin/mount_union/mount_union.8 +/usr/src/sbin/mountd/mountd.8 +/usr/src/usr.sbin/mtree/mtree.8 +/usr/src/contrib/bind-4.9.2/man/named.8 +/usr/src/contrib/bind-4.9.2/man/named-xfer.8 +/usr/src/contrib/bind-4.9.2/man/named.reload.8 +/usr/src/contrib/bind-4.9.2/man/named.restart.8 +/usr/src/sbin/ncheck/ncheck.8 +/usr/src/sbin/newfs/newfs.8 +/usr/src/sbin/newlfs/newlfs.8 +/usr/src/sbin/nfsd/nfsd.8 +/usr/src/sbin/nfsiod/nfsiod.8 +/usr/src/sbin/nologin/nologin.8 +/usr/src/contrib/bind-4.9.2/man/nslookup.8 +/usr/src/usr.sbin/lpr/pac/pac.8 +/usr/src/sbin/ping/ping.8 +/usr/src/usr.sbin/portmap/portmap.8 +/usr/src/usr.sbin/pstat/pstat.8 +/usr/src/usr.sbin/pwd_mkdb/pwd_mkdb.8 +/usr/src/usr.sbin/quot/quot.8 +/usr/src/sbin/quotacheck/quotacheck.8 +/usr/src/usr.sbin/quotaon/quotaon.8 +/usr/src/libexec/rbootd/rbootd.8 +/usr/src/share/man/man8/rc.8 +/usr/src/sbin/reboot/reboot.8 +/usr/src/kerberosIV/registerd/registerd.8 +/usr/src/usr.bin/renice/renice.8 +/usr/src/usr.sbin/repquota/repquota.8 +/usr/src/sbin/restore/restore.8 +/usr/src/libexec/rexecd/rexecd.8 +/usr/src/libexec/rlogind/rlogind.8 +/usr/src/bin/rmail/rmail.8 +/usr/src/usr.sbin/rmt/rmt.8 +/usr/src/sbin/route/route.8 +/usr/src/sbin/routed/routed.8 +/usr/src/libexec/rshd/rshd.8 +/usr/src/usr.sbin/rwhod/rwhod.8 +/usr/src/usr.sbin/sa/sa.8 +/usr/src/sbin/savecore/savecore.8 +/usr/src/sbin/scsiformat/scsiformat.8 +/usr/src/usr.sbin/sendmail/src/sendmail.8 +/usr/src/usr.bin/showmount/showmount.8 +/usr/src/sbin/shutdown/shutdown.8 +/usr/src/sbin/slattach/slattach.8 +/usr/src/usr.sbin/sliplogin/sliplogin.8 +/usr/src/share/man/man8/sticky.8 +/usr/src/sbin/swapon/swapon.8 +/usr/src/bin/sync/sync.8 +/usr/src/usr.sbin/sysctl/sysctl.8 +/usr/src/usr.sbin/syslogd/syslogd.8 +/usr/src/libexec/talkd/talkd.8 +/usr/src/libexec/telnetd/telnetd.8 +/usr/src/libexec/tftpd/tftpd.8 +/usr/src/usr.sbin/timed/timed/timed.8 +/usr/src/usr.sbin/timed/timedc/timedc.8 +/usr/src/usr.sbin/traceroute/traceroute.8 +/usr/src/usr.sbin/trpt/trpt.8 +/usr/src/usr.sbin/trsp/trsp.8 +/usr/src/sbin/tunefs/tunefs.8 +/usr/src/sbin/umount/umount.8 +/usr/src/usr.sbin/update/update.8 +/usr/src/usr.bin/uucp/uucico/uucico.8 +/usr/src/usr.bin/uucp/uuclean/uuclean.8 +/usr/src/usr.bin/uucp/uupoll/uupoll.8 +/usr/src/usr.bin/uucp/uusnap/uusnap.8 +/usr/src/usr.bin/uucp/uuxqt/uuxqt.8 +/usr/src/usr.sbin/vipw/vipw.8 +/usr/src/usr.bin/vmstat/vmstat.8 +/usr/src/sbin/XNSrouted/XNSrouted.8 +/usr/src/share/zoneinfo/zic.8 diff --git a/share/man/man0/title.prm b/share/man/man0/title.prm new file mode 100644 index 0000000..20b1106 --- /dev/null +++ b/share/man/man0/title.prm @@ -0,0 +1,204 @@ +.\" Copyright (c) 1980, 1993 Regents of the University of California. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)title.prm 8.1 (Berkeley) 7/19/93 +.\" +.ps 18 +.vs 22 +.sp 2.75i +.ft B +.ce 2 +UNIX Programmer's Reference Manual +(PRM) +.ps 14 +.vs 16 +.sp |4i +.ce 2 +4.4 Berkeley Software Distribution +.sp |5.75i +.ft R +.pt 12 +.vs 16 +.ce +June, 1993 +.sp |8.2i +.ce 5 +Computer Systems Research Group +Computer Science Division +Department of Electrical Engineering and Computer Science +University of California +Berkeley, California 94720 +.bp +\& +.sp |1i +.hy 0 +.ps 10 +.vs 12p +Copyright 1979, 1980, 1983, 1986, 1993 +The Regents of the University of California. All rights reserved. +.sp 2 +Other than the specific manual pages and documents listed below +as copyrighted by AT&T, +redistribution and use of this manual in source and binary forms, +with or without modification, are permitted provided that the +following conditions are met: +.sp 0.5 +.in +0.2i +.ta 0.2i +.ti -0.2i +1) Redistributions of this manual must retain the copyright +notices on this page, this list of conditions and the following disclaimer. +.ti -0.2i +2) Software or documentation that incorporates part of this manual must +reproduce the copyright notices on this page, this list of conditions and +the following disclaimer in the documentation and/or other materials +provided with the distribution. +.ti -0.2i +3) All advertising materials mentioning features or use of this software +must display the following acknowledgement: +``This product includes software developed by the University of +California, Berkeley and its contributors.'' +.ti -0.2i +4) Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. +.in -0.2i +.sp +\fB\s-1THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE.\s+1\fP +.sp 2 +The Institute of Electrical and Electronics Engineers and the American +National Standards Committee X3, on Information Processing Systems have +given us permission to reprint portions of their documentation. +.sp +In the following statement, the phrase ``this text'' refers to portions +of the system documentation. +.sp 0.5 +``Portions of this text are reprinted and reproduced in +electronic form in 4.4BSD from IEEE Std 1003.1-1988, IEEE +Standard Portable Operating System Interface for Computer Environments +(POSIX), copyright 1988 by the Institute of Electrical and Electronics +Engineers, Inc. In the event of any discrepancy between these versions +and the original IEEE Standard, the original IEEE Standard is the referee +document.'' +.sp +In the following statement, the phrase ``This material'' refers to portions +of the system documentation. +.sp 0.5 +``This material is reproduced with permission from American National +Standards Committee X3, on Information Processing Systems. Computer and +Business Equipment Manufacturers Association (CBEMA), 311 First St., NW, +Suite 500, Washington, DC 20001-2178. The developmental work of +Programming Language C was completed by the X3J11 Technical Committee.'' +.sp 2 +Manual pages ptrace.2, ecvt.3, mp.3, plot.3, L-devices.5, L-dialcodes.5, +L.aliases.5, L.cmds.5, L.sys.5, USERFILE.5, dump.5, and plot.5 +are copyright 1979, AT&T Bell Laboratories, Incorporated. +Holders of \x'-1p'UNIX\v'-4p'\s-3TM\s0\v'4p'/32V, +System III, or System V software licenses are +permitted to copy these documents, or any portion of them, +as necessary for licensed use of the software, +provided this copyright notice and statement of permission +are included. +.sp 2 +The views and conclusions contained in this manual are those of the +authors and should not be interpreted as representing official policies, +either expressed or implied, of the Regents of the University of California. +.br +.ll 6.5i +.lt 6.5i +.po .75i +.in 0i +.af % i +.ds ET\" +.de HD +.po 0 +.lt 7.4i +.tl '''' +.lt +.po +'sp 18p +.if o .tl '\\*(ET''\\*(OT' +.if e .tl '\\*(OT''\\*(ET' +'sp 18p +.ns +.. +.de FO +'sp 18p +.if e .tl '\s9\\*(Dt''\\*(Ed\s0' +.if o .tl '\s9\\*(Ed''\\*(Dt\s0' +'bp +.. +.wh 0 HD +.wh -60p FO +.bp +.ds ET \s9\f2Table \|of \|Contents\fP\s0 +.ds OT - % - +.ce +\f3TABLE \|OF \|CONTENTS\fP +.nr x .5i +.in +\nxu +.nf +.ta \n(.lu-\nxuR +.de xx +\\$1\f3 \a \fP\\$2 +.. +.de t +.sp 1v +.ne .5i +.cs 3 +.ti -.5i +.ss 18 +\f3\s9\\$2. \\$3\s0\fP +.ss 12 +.if t .sp .5v +.cs 3 36 +.ds Ed Section \\$2 +.ds Dt \\$3 +.so \\$1 +.. +.t /usr/src/share/man/man0/toc2 2 "System Calls" +.t /usr/src/share/man/man0/toc3 3 "C Library Subroutines" +.t /usr/src/share/man/man0/toc4 4 "Special Files" +.t /usr/src/share/man/man0/toc5 5 "File Formats" +.in -.5i +.cs 3 +.if n .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 80n +.if t .ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i diff --git a/share/man/man0/title.urm b/share/man/man0/title.urm new file mode 100644 index 0000000..237ab2e --- /dev/null +++ b/share/man/man0/title.urm @@ -0,0 +1,1927 @@ +.\" Copyright (c) 1980, 1993 Regents of the University of California. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)title.urm 8.7 (Berkeley) 4/20/94 +.\" +.af % i +.EH '''' +.OH '''' +.OF '''\s10- % -\s0' +.EF '\s10- % -\s0''' +\& +.sp |2.75i +.nr PS 24 +.nr VS 28 +.LP +.ft B +.ce 2 +UNIX User's Reference Manual +(URM) +.nr LL 5.5i +.nr PO 1.5i +.bp +\& +.sp |1.5i +.nr PS 11 +.nr VS 13 +.LP +The USENIX Association, +the UNIX and Advanced Computing Systems professional and technical organization, +is a not-for-profit membership association of individuals and +institutions with an interest in UNIX and UNIX-like systems, +and, by extension, C++, X windows, and other programming tools. +It is dedicated to: +.IP \(bu +fostering innovation and communicating research and technological developments, +.IP \(bu +sharing ideas and experience relevant to UNIX, +UNIX-related, and advanced computing systems, and +.IP \(bu +providing a neutral forum for the exercise of critical +thought and airing of technical issues. +.LP +USENIX publishes a journal (\fBComputing Systems\fP), +Conference and Workshop Proceedings, and a Book Series. +.nr LL 6i +.nr PO 1i +.bp +\& +.sp |2.75i +.nr PS 18 +.nr VS 22 +.LP +.ft B +.ce 2 +UNIX User's Reference Manual +(URM) +.sp |4i +.ce 2 +4.4 Berkeley Software Distribution +(June, 1993) +.sp 3 +.nr PS 15 +.nr VS 18 +.LP +.ce 2 +Computer Systems Research Group +University of California, Berkeley +.sp |8.2i +.nr PS 12 +.nr VS 15 +.LP +.ce 4 +A USENIX Association Book +The MIT Press +Cambridge, Massachusetts +London, England +.bp +.hy 0 +.nr PS 9 +.nr VS 11 +.LP +First Printing, 1993 +.sp 1 +.LP +Copyright 1979, 1980, 1983, 1986, 1993 +The Regents of the University of California. All rights reserved. +.sp 1 +.LP +Other than the specific manual pages and documents listed below +as copyrighted by AT&T, +redistribution and use of this manual in source and binary forms, +with or without modification, are permitted provided that the +following conditions are met: +.IP 1) +Redistributions of this manual must retain the copyright +notices on this page, this list of conditions and the following disclaimer. +.IP 2) +Software or documentation that incorporates part of this manual must +reproduce the copyright notices on this page, this list of conditions and +the following disclaimer in the documentation and/or other materials +provided with the distribution. +.IP 3) +All advertising materials mentioning features or use of this software +must display the following acknowledgement: +``This product includes software developed by the University of +California, Berkeley and its contributors.'' +.IP 4) +Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. +.LP +\fB\s-1THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE.\s+1\fP +.sp 1 +.LP +The Institute of Electrical and Electronics Engineers and the American +National Standards Committee X3, on Information Processing Systems have +given us permission to reprint portions of their documentation. +.sp 0.5 +.LP +In the following statement, the phrase ``this text'' refers to portions +of the system documentation. +.LP +``Portions of this text are reprinted and reproduced in +electronic form in 4.4BSD from IEEE Std 1003.1-1988, IEEE +Standard Portable Operating System Interface for Computer Environments +(POSIX), copyright 1988 by the Institute of Electrical and Electronics +Engineers, Inc. In the event of any discrepancy between these versions +and the original IEEE Standard, the original IEEE Standard is the referee +document.'' +.sp 0.5 +.LP +In the following statement, the phrase ``This material'' refers to portions +of the system documentation. +.LP +``This material is reproduced with permission from American National +Standards Committee X3, on Information Processing Systems. Computer and +Business Equipment Manufacturers Association (CBEMA), 311 First St., NW, +Suite 500, Washington, DC 20001-2178. The developmental work of +Programming Language C was completed by the X3J11 Technical Committee.'' +.sp 1 +.LP +Manual pages adb.1, bc.1, compact.1, crypt.1, dc.1, deroff.1, ed.1, +expr.1, graph.1, ld.1, learn.1, m4.1, plot.1, ptx.1, spell.1, +spline.1, struct.1, tar.1, units.1, uucp.1, uux.1, ching.6, eqnchar.7, +man.7, ms.7, and term.7 +are copyright 1979, AT&T Bell Laboratories, Incorporated. +Holders of \x'-1p'UNIX\v'-4p'\s-3TM\s0\v'4p'/32V, +System III, or System V software licenses are +permitted to copy these documents, or any portion of them, +as necessary for licensed use of the software, +provided this copyright notice and statement of permission +are included. +.sp 1 +.LP +The views and conclusions contained in this manual are those of the +authors and should not be interpreted as representing official policies, +either expressed or implied, of the Regents of the University of California. +.sp 1 +.LP +This book was printed and bound in the United States of America. +.br +Distributed by The MIT Press. +.bp +\& +.sp |1.5i +.nr PS 11 +.nr VS 13 +.LP +.ce 1 +\s+4\fBContents\fP\s-4 +.sp 3 +.TS +expand; +l r. +The Computer Systems Research Group, 1979\-1993 vii +Prefaces xi +Introduction xvii +List of Manual Pages xxiii +Permuted Index xli +Reference Manual Sections 1, 6, 7 tabbed pages +List of Documents inside back cover +.TE +.if o .bp +\& +.bp +.\" +.\" The contributor list below is derived from the file that resides in +.\" vangogh:~admin/contrib/contrib: +.\" +.\" @(#)contrib 5.54 (Berkeley) 4/17/94 +.\" +.\" This file should not be editted, rather the original contrib file +.\" should be used to recrete this one following the directions at its top. +.\" Contrib starts here and continues to the comment `END OF CONTRIB'. +.\" +\& +.sp |1i +.ps 16 +.ce +\fBThe Computer Systems Research Group 1979 \- 1993\fP +.sp 3 +.nr PS 11 +.nr VS 12 +.LP +.nf +.in +0.5i +\fBCSRG Technical Staff\fP +.sp 1 +.in +1i +Jim Bloom +Keith Bostic +Ralph Campbell +Kevin Dunlap +William N. Joy +Michael J. Karels +Samuel J. Leffler +Marshall Kirk McKusick +Miriam Amos Nihart +Keith Sklower +Marc Teitelbaum +Michael Toy +.in -1i +.sp 3 +\fBCSRG Administration and Support\fP +.sp 1 +.in +1i +Robert Fabry +Domenico Ferrari +Susan L. Graham +Bob Henry +Anne Hughes +Bob Kridle +David Mosher +Pauline Schwartz +Mark Seiden +Jean Wood +.in -1i +.fi +.sp 3 +\fBOrganizations that funded the CSRG with grants, +gifts, personnel, and/or hardware.\fP +.sp 1 +.nf +.in +1i +Center for Advanced Aviation System Development, The MITRE Corp. +Compaq Computer Corporation +Cray Research Inc. +Department of Defense Advance Research Projects Agency (DARPA) +Digital Equipment Corporation +The Hewlett-Packard Company +NASA Ames Research Center +The National Science Foundation +The Open Software Foundation +UUNET Technologies Inc. +.in -1.5i +.fi +.bp +.nr PS 10 +.nr VS 11 +.LP +\fBThe following are people and organizations that provided a +large subsystem for the BSD releases.\fP +.sp +.TS +l l. +ANSI C library Chris Torek +ANSI C prototypes Donn Seeley and John Kohl +Autoconfiguration Robert Elz +C library documentation American National Standards Committee X3 +CCI 6/32 support Computer Consoles Inc. +DEC 3000/5000 support Ralph Campbell +Disklabels Symmetric Computer Systems +Documentation Cynthia Livingston and The USENIX Association +Franz Lisp Richard Fateman, John Foderaro, Keith Sklower, Kevin Layer +GCC, GDB The Free Software Foundation +Groff James Clark (The FSF) +HP300 support Jeff Forys, Mike Hibler, Jay Lepreau, Donn Seeley and the Systems + Programming Group; University of Utah Computer Science Department +ISODE Marshall Rose +Ingres Mike Stonebraker, Gene Wong, and the Berkeley Ingres Research Group +Intel 386/486 support Bill Jolitz and TeleMuse +Job control Jim Kulp +Kerberos Project Athena and MIT +Kernel support Bill Shannon and Sun Microsystems Inc. +LFS Margo Seltzer, Mendel Rosenblum, Carl Staelin +MIPS support Trent Hein +Math library K.C. Ng, Zhishun Alex Liu, S. McDonald, P. Tang and W. Kahan +NFS Rick Macklem +NFS automounter Jan-Simon Pendry +Network device drivers Micom-Interlan and Excelan +Omron Luna support Akito Fujita and Shigeto Mochida +Quotas Robert Elz +RPC support Sun Microsystems Inc. +Shared library support Rob Gingell and Sun Microsystems Inc. +Sony News 3400 support Kazumasa Utashiro +Sparc I/II support Computer Systems Engineering Group, Lawrence Berkeley Laboratory +Stackable file systems John Heidemann +Stdio Chris Torek +System documentation The Institute of Electrical and Electronics Engineers, Inc. +TCP/IP Rob Gurwitz and Bolt Beranek and Newman Inc. +Timezone support Arthur David Olson +Transport/Network OSI layers IBM Corporation and the University of Wisconsin +Kernel XNS assistance William Nesheim, J. Q. Johnson, Chris Torek, and James O'Toole +User level XNS Cornell University +VAX 3000 support Mt. Xinu and Tom Ferrin +VAX BI support Chris Torek +VAX device support Digital Equipment Corporation and Helge Skrivervik +Versatec printer/plotter support University of Toronto +Virtual memory implementation Avadis Tevanian, Jr., Michael Wayne Young, + and the Carnegie-Mellon University Mach project +X25 University of British Columbia +.TE +.bp +.LP +\fBThe following are people and organizations that provided a specific +item, program, library routine or program maintenance for the BSD system. +(Their contribution may not be part of the final 4.4BSD release.)\fP +.sp 0.4 +.nr PS 9 +.nr VS 10 +.ps 9 +.vs 10 +.TS +l l. +386 device drivers Carnegie-Mellon University Mach project +386 device drivers Don Ahn, Sean Fagan and Tim Tucker +HCX device drivers Harris Corporation +Kernel enhancements Robert Elz, Peter Ivanov, Ian Johnstone, Piers Lauder, + John Lions, Tim Long, Chris Maltby, Greg Rose and John Wainwright +ISO-9660 filesystem Pace Willisson, Atsushi Murai +.TE +.TS +l l l l. +adventure(6) Don Woods log(3) Peter McIlroy +adventure(6) Jim Gillogly look(1) David Hitz +adventure(6) Will Crowther ls(1) Elan Amir +apply(1) Rob Pike ls(1) Michael Fischbein +ar(1) Hugh A. Smith lsearch(3) Roger L. Snyder +arithmetic(6) Eamonn McManus m4(1) Ozan Yigit +arp(8) Sun Microsystems Inc. mail(1) Kurt Schoens +at(1) Steve Wall make(1) Adam de Boor +atc(6) Ed James me(7) Eric Allman +awk(1) Arnold Robbins mergesort(3) Peter McIlroy +awk(1) David Trueman mh(1) Marshall Rose +backgammon(6) Alan Char mh(1) The Rand Corporation +banner(1) Mark Horton mille(6) Ken Arnold +battlestar(6) David Riggle mknod(8) Kevin Fall +bcd(6) Steve Hayman monop(6) Ken Arnold +bdes(1) Matt Bishop more(1) Eric Shienbrood +berknet(1) Eric Schmidt more(1) Mark Nudleman +bib(1) Dain Samples mountd(8) Herb Hasler +bib(1) Gary M. Levin mprof(1) Ben Zorn +bib(1) Timothy A. Budd msgs(1) David Wasley +bitstring(3) Paul Vixie multicast Stephen Deering +boggle(6) Barry Brachman mv(1) Ken Smith +bpf(4) Steven McCanne named/bind(8) Douglas Terry +btree(3) Mike Olson named/bind(8) Kevin Dunlap +byte-range locking Scooter Morris news(1) Rick Adams (and a cast of thousands) +caesar(6) John Eldridge nm(1) Hans Huebner +caesar(6) Stan King pascal(1) Kirk McKusick +cal(1) Kim Letkeman pascal(1) Peter Kessler +cat(1) Kevin Fall paste(1) Adam S. Moskowitz +chess(6) Stuart Cracraft (The FSF) patch(1) Larry Wall +ching(6) Guy Harris pax(1) Keith Muller +cksum(1) James W. Williams phantasia(6) C. Robertson +clri(8) Rich $alz phantasia(6) Edward A. Estes +col(1) Michael Rendell ping(8) Mike Muuss +comm(1) Case Larsen pom(6) Keith E. Brandt +compact(1) Colin L. McMaster pr(1) Keith Muller +compress(1) James A. Woods primes(6) Landon Curt Noll +compress(1) Joseph Orost qsort(3) Doug McIlroy +compress(1) Spencer Thomas qsort(3) Earl Cohen +courier(1) Eric Cooper qsort(3) Jon Bentley +cp(1) David Hitz quad(3) Chris Torek +cpio(1) AT&T quiz(6) Jim R. Oldroyd +crypt(3) Tom Truscott quiz(6) Keith Gabryelski +csh(1) Christos Zoulas radixsort(3) Dan Bernstein +csh(1) Len Shar radixsort(3) Peter McIlroy +curses(3) Elan Amir rain(6) Eric P. Scott +curses(3) Ken Arnold ranlib(1) Hugh A. Smith +cut(1) Adam S. Moskowitz rcs(1) Walter F. Tichy +cut(1) Marciano Pitargue rdist(1) Michael Cooper +dbx(1) Mark Linton regex(3) Henry Spencer +dd(1) Keith Muller robots(6) Ken Arnold +dd(1) Lance Visser rogue(6) Timothy C. Stoehr +des(1) Jim Gillogly rs(1) John Kunze +des(1) Phil Karn sail(6) David Riggle +des(1) Richard Outerbridge sail(6) Edward Wang +dipress(1) Xerox Corporation sccs(1) Eric Allman +disklabel(8) Symmetric Computer Systems scsiformat(1) Lawrence Berkeley Laboratory +du(1) Chris Newcomb sdb(1) Howard Katseff +dungeon(6) R.M. Supnik sed(1) Diomidis Spinellis +ed(1) Rodney Ruddock sendmail(8) Eric Allman +emacs(1) Richard Stallman setmode(3) Dave Borman +erf(3) Peter McIlroy, K.C. Ng sh(1) Kenneth Almquist +error(1) Robert R. Henry slattach(8) Rick Adams +ex(1) Mark Horton slip(8) Rick Adams +factor(6) Landon Curt Noll spms(1) Peter J. Nicklin +file(1) Ian Darwin strtod(3) David M. Gay +find(1) Cimarron Taylor swab(3) Jeffrey Mogul +finger(1) Tony Nardo sysconf(3) Sean Eric Fagan +fish(6) Muffy Barkocy sysline(1) J.K. Foderaro +fmt(1) Kurt Schoens syslog(3) Eric Allman +fnmatch(3) Guido van Rossum systat(1) Bill Reeves +fold(1) Kevin Ruddy systat(1) Robert Elz +fortune(6) Ken Arnold tail(1) Edward Sze-Tyan Wang +fpr(1) Robert Corbett talk(1) Clem Cole +fsdb(8) Computer Consoles Inc. talk(1) Kipp Hickman +fsplit(1) Asa Romberger talk(1) Peter Moore +fsplit(1) Jerry Berkman telnet(1) Dave Borman +gcc/groff integration UUNET Technologies, Inc. telnet(1) Paul Borman +gcore(1) Eric Cooper termcap(5) John A. Kunze +getcap(3) Casey Leedom termcap(5) Mark Horton +glob(3) Guido van Rossum test(1) Kenneth Almquist +gprof(1) Peter Kessler tetris(6) Chris Torek +gprof(1) Robert R. Henry tetris(6) Darren F. Provine +hack(6) Andries Brouwer (and a cast of thousands) timed(8) Riccardo Gusella +hangman(6) Ken Arnold timed(8) Stefano Zatti +hash(3) Margo Seltzer tn3270(1) Gregory Minshall +heapsort(3) Elmer Yglesias tr(1) Igor Belchinskiy +heapsort(3) Kevin Lew traceroute(8) Van Jacobson +heapsort(3) Ronnie Kon trek(6) Eric Allman +hunt(6) Conrad Huang tset(1) Eric Allman +hunt(6) Greg Couch tsort(1) Michael Rendell +icon(1) Bill Mitchell unifdef(1) Dave Yost +icon(1) Ralph Griswold uniq(1) Case Larsen +indent(1) David Willcox uucpd(8) Rick Adams +indent(1) Eric Schmidt uudecode(1) Mark Horton +indent(1) James Gosling uuencode(1) Mark Horton +indent(1) Sun Microsystems uuq(1) Lou Salkind +init(1) Donn Seeley uuq(1) Rick Adams +j0(3) Sun Microsystems, Inc. uusnap(8) Randy King +j1(3) Sun Microsystems, Inc. uusnap(8) Rick Adams +jn(3) Sun Microsystems, Inc. vacation(1) Eric Allman +join(1) David Goodenough vi(1) Steve Kirkendall +join(1) Michiro Hikida which(1) Peter Kessler +join(1) Steve Hayman who(1) Michael Fischbein +jot(1) John Kunze window(1) Edward Wang +jove(1) Jonathon Payne worm(6) Michael Toy +kermit(1) Columbia University worms(6) Eric P. Scott +kvm(3) Peter Shipley write(1) Craig Leres +kvm(3) Steven McCanne write(1) Jef Poskanzer +lam(1) John Kunze wump(6) Dave Taylor +larn(6) Noah Morgan X25/Ethernet Univ. of Erlangen-Nuremberg +lastcomm(1) Len Edmondson X25/LLC2 Dirk Husemann +lex(1) Vern Paxson xargs(1) John B. Roll Jr. +libm(3) Peter McIlroy xneko(6) Masayuki Koba +libm(3) UUNET Technologies, Inc. XNSrouted(1) Bill Nesheim +locate(1) James A. Woods xroach(6) J.T. Anderson +lock(1) Bob Toxen yacc(1) Robert Paul Corbett +.TE +.\" +.\" END OF CONTRIB: Contrib ends here. +.\" +.if o .bp +\& +.bp +.nr PS 10 +.nr VS 12 +\& +.sp |1.5i +.LP +.ce +\fB\s+4PREFACE\s-4\fP +.sp 3 +.NH 1 +Introduction +.PP +The major new facilities available in the 4.4BSD release are +a new virtual memory system, +the addition of ISO/OSI networking support, +a new virtual filesystem interface supporting filesystem stacking, +a freely redistributable implementation of NFS, +a log-structured filesystem, +enhancement of the local filesystems to support +files and filesystems that are up to 2^63 bytes in size, +enhanced security and system management support, +and the conversion to and addition of the IEEE Std1003.1 (``POSIX'') +facilities and many of the IEEE Std1003.2 facilities. +In addition, many new utilities and additions have been made to the C-library. +The kernel sources have been reorganized to collect all machine-dependent +files for each architecture under one directory, +and most of the machine-independent code is now free of code +conditional on specific machines. +The user structure and process structure have been reorganized +to eliminate the statically-mapped user structure and to make most +of the process resources shareable by multiple processes. +The system and include files have been converted to be compatible +with ANSI C, including function prototypes for most of the exported +functions. +There are numerous other changes throughout the system. +.NH 1 +Changes in the Kernel +.PP +This release includes several important structural kernel changes. +The kernel uses a new internal system call convention; +the use of global (``u-dot'') variables for parameters and error returns +has been eliminated, +and interrupted system calls no longer abort using non-local goto's (longjmp's). +A new sleep interface separates signal handling from scheduling priority, +returning characteristic errors to abort or restart the current system call. +This sleep call also passes a string describing the process state, +which is used by the ps(1) program. +The old sleep interface can be used only for non-interruptible sleeps. +.PP +Many data structures that were previously statically allocated +are now allocated dynamically. +These structures include mount entries, file entries, +user open file descriptors, the process entries, the vnode table, +the name cache, and the quota structures. +.PP +The 4.4BSD distribution adds support for several new architectures including +SPARC-based Sparcstations 1 and 2, +MIPS-based Decstation 3100 and 5000 and Sony NEWS, +68000-based Hewlett-Packard 9000/300 and Omron Luna, and +386-based Personal Computers. +Both the HP300 and SPARC ports feature the ability to run binaries +built for the native operating system (HP-UX or SunOS) by emulating +their system calls. +Though this native operating system compatibility was provided by the +developers as needed for their purposes and is by no means complete, +it is complete enough to run several non-trivial applications including +those that require HP-UX or SunOS shared libraries. +For example, the vendor supplied X11 server and windowing environment +can be used on both the HP300 and SPARC. +.NH 2 +Virtual memory changes +.PP +The new virtual memory implementation is derived from the MACH +operating system developed at Carnegie-Mellon, +and was ported to the BSD kernel at the University of Utah. +The MACH virtual memory system call interface has been replaced with the +``mmap''-based interface described in the ``Berkeley Software +Architecture Manual''. +The interface is similar to the interfaces shipped +by several commercial vendors such as Sun, USL, and Convex Computer Corp. +The integration of the new virtual memory is functionally complete, +but, like most MACH-based virtual memory systems, +still has serious performance problems under heavy memory load. +.NH 2 +Networking additions and changes +.PP +The ISO/OSI Networking consists of a kernel implementation of +transport class 4 (TP-4), +connectionless networking protocol (CLNP), +and 802.3-based link-level support (hardware-compatible with Ethernet*). +.FS +*Ethernet is a trademark of the Xerox Corporation. +.FE +We also include support for ISO Connection-Oriented Network Service, +X.25, TP-0. +The session and presentation layers are provided outside +the kernel by the ISO development environment (ISODE). +Included in this development environment are file +transfer and management (FTAM), virtual terminals (VT), +a directory services implementation (X.500), and miscellaneous other utilities. +.PP +Several important enhancements have been added to the TCP/IP +protocols including TCP header prediction and +serial line IP (SLIP) with header compression. +The routing implementation has been completely rewritten +to use a hierarchical routing tree with a mask per route +to support the arbitrary levels of routing found in the ISO protocols. +The routing table also stores and caches route characteristics +to speed the adaptation of the throughput and congestion avoidance +algorithms. +.NH 2 +Additions and changes to filesystems +.PP +The 4.4BSD distribution contains most of the interfaces +specified in the IEEE Std1003.1 system interface standard. +Filesystem additions include IEEE Std1003.1 FIFOs, +byte-range file locking, and saved user and group identifiers. +.PP +A new virtual filesystem interface has been added to the +kernel to support multiple filesystems. +In comparison with other interfaces, +the Berkeley interface has been structured for more efficient support +of filesystems that maintain state (such as the local filesystem). +The interface has been extended with support for stackable +filesystems done at UCLA. +These extensions allow for filesystems to be layered on top of each +other and allow new vnode operations to be added without requiring +changes to existing filesystem implementations. +For example, the umap filesystem +is used to mount a sub-tree of an existing filesystem +that uses a different set of uids and gids than the local system. +Such a filesystem could be mounted from a remote site via NFS or it +could be a filesystem on removable media brought from some foreign +location that uses a different password file. +.PP +In addition to the local ``fast filesystem'', +we have added an implementation of the network filesystem (NFS) +that fully interoperates with the NFS shipped by Sun and its licensees. +Because our NFS implementation was implemented using only the +publicly available NFS specification, +it does not require a license from Sun to use in source or binary form. +By default it runs over UDP to be compatible with Sun's implementation. +However, it can be configured on a per-mount basis to run over TCP. +Using TCP allows it to be used quickly and efficiently through +gateways and over long-haul networks. +Using an extended protocol, it supports Leases to allow a limited +callback mechanism that greatly reduces the network traffic necessary +to maintain cache consistency between the server and its clients. +.PP +A new log-structured filesystem has been added that provides +near disk-speed output and fast crash recovery. +It is still experimental in the 4.4BSD release, +so we do not recommend it for production use. +We have also added a memory-based filesystem that runs in +pageable memory, allowing large temporary filesystems without +requiring dedicated physical memory. +.PP +The local ``fast filesystem'' has been enhanced to do +clustering which allows large pieces of files to be +allocated contiguously resulting in near doubling +of filesystem throughput. +The filesystem interface has been extended to allow +files and filesystems to grow to 2^63 bytes in size. +The quota system has been rewritten to support both +user and group quotas (simultaneously if desired). +Quota expiration is based on time rather than +the previous metric of number of logins over quota. +This change makes quotas more useful on fileservers +onto which users seldom login. +.PP +The system security has been greatly enhanced by the +addition of additional file flags that permit a file to be +marked as immutable or append only. +Once set, these flags can only be cleared by the super-user +when the system is running single user. +To protect against indiscriminate reading or writing of kernel +memory, all writing and most reading of kernel data structures +must be done using a new ``sysctl'' interface. +The information to be access is described through an extensible +``Management Information Base'' (MIB). +.NH 2 +POSIX terminal driver changes +.PP +The biggest area of change is a new terminal driver. +The terminal driver is similar to the System V terminal driver +with the addition of the necessary extensions to get the +functionality previously available in the 4.3BSD terminal driver. +4.4BSD also adds the IEEE Std1003.1 job control interface, +which is similar to the 4.3BSD job control interface, +but adds a security model that was missing in the +4.3BSD job control implementation. +A new system call, \fIsetsid\fP, +creates a job-control session consisting of a single process +group with one member, the caller, that becomes a session leader. +Only a session leader may acquire a controlling terminal. +This is done explicitly via a \s-1TIOCSCTTY\s+1 \fIioctl\fP call, +not implicitly by an \fIopen\fP call. +The call fails if the terminal is in use. +.PP +For backward compatibility, +both the old \fIioctl\fP +calls and old options to \fIstty\fP +are emulated. +.NH 1 +Changes to the utilities +.PP +There are several new tools and utilities included in this release. +A new version of ``make'' allows much-simplified makefiles for the +system software and allows compilation for multiple architectures +from the same source tree (which may be mounted read-only). +Notable additions to the libraries include functions to traverse a +filesystem hierarchy, database interfaces to btree and hashing functions, +a new, fast implementation of stdio and a radix sort function. +The additions to the utility suite include greatly enhanced versions of +programs that display system status information, implementations of +various traditional tools described in the IEEE Std1003.2 standard, +and many others. +.PP +We have been tracking the IEEE Std1003.2 shell and utility work +and have included prototypes of many of the proposed utilities. +Most of the traditional utilities have been replaced +with implementations conformant to the POSIX standards. +Almost the entire manual suite has been rewritten to +reflect the POSIX defined interfaces. +In rewriting this software, we have generally +been rewarded with significant performance improvements. +Most of the libraries and header files have been converted +to be compliant with ANSI C. +The system libraries and utilities all compile +with either ANSI or traditional C. +.PP +The Kerberos (version 4) authentication software has been +integrated into much of the system (including NFS) to provide +the first real network authentication on BSD. +.PP +A new implementation of the \fIex/vi\fP text editors is available +in this release. +It is intended as a bug-for-bug compatible version of the editors. +It also has a few new features: 8-bit clean data, lines and files +limited only by memory and disk space, split screens, tags stacks +and left-right scrolling among them. +\fINex/nvi\fP +is not yet production quality; future versions of this software may +be retrieved by anonymous ftp from ftp.cs.berkeley.edu, in the +directory ucb/4bsd. +.PP +The \fIfind\fP +utility has two new options that are important to be aware of if you +intend to use NFS. +The ``fstype'' and ``prune'' options can be used together to prevent +find from crossing NFS mount points. +.NH 2 +Additions and changes to the libraries +.PP +The \fIcurses\fP +library has been largely rewritten. +Important additional features include support +for scrolling and \fItermios\fP. +.PP +An application front-end editing library, named libedit, has been +added to the system. +.PP +A superset implementation of the SunOS kernel memory interface library, +\fIlibkvm\fP, has been integrated into the system. +.PP +Nearly the entire C-library has been rewritten. +Some highlights of the changes to the 4.4BSD C-library: +.IP \(bu +The newly added \fIfts\fP +functions will do either physical or logical traversal of +a file hierarchy as well as handle essentially infinite depth +filesystems and filesystems with cycles. +All the utilities in 4.4BSD that traverse file hierarchies +have been converted to use \fIfts\fP. +The conversion has always resulted in a significant performance +gain, often of four or five to one in system time. +.IP \(bu +The newly added \fIdbopen\fP +functions are intended to be a family of database access methods. +Currently, they consist of \fIhash\fP, +an extensible, dynamic hashing scheme, +\fIbtree\fP, a sorted, balanced tree structure (B+tree's), and +\fIrecno\fP, a flat-file interface for fixed or variable length records +referenced by logical record number. +Each of the access methods stores associated key/data pairs and +uses the same record oriented interface for access. +Future versions of this software may be retrieved by anonymous ftp +from ftp.cs.berkeley.edu, in the directory ucb/4bsd. +.IP \(bu +The \fIqsort\fP +function has been rewritten for additional performance. +In addition, three new types of sorting functions, +\fIheapsort\fP, \fImergesort\fP, and \fIradixsort\fP +have been added to the system. +The \fImergesort\fP +function is optimized for data with pre-existing order, +in which case it usually significantly outperforms \fIqsort\fP. +The \fIradixsort\fP +functions are variants of most-significant-byte radix sorting. +They take time linear to the number of bytes to be +sorted, usually significantly outperforming \fIqsort\fP +on data that can be sorted in this fashion. +An implementation of the POSIX 1003.2 standard \fIsort\fP +based on \fIradixsort\fP is included in 4.4BSD. +.IP \(bu +The floating point support in the C-library has been replaced +and is now accurate. +.IP \(bu +The C functions specified by both ANSI C, POSIX 1003.1 and +1003.2 are now part of the C-library. +This includes support for file name matching, shell globbing +and both basic and extended regular expressions. +.IP \(bu +ANSI C multibyte and wide character support has been integrated. +The rune functionality from the Bell Labs' Plan 9 system is provided +as well. +.IP \(bu +The \fItermcap\fP +functions have been generalized and replaced with a general +purpose interface named \fIgetcap\fP. +.IP \(bu +The \fIstdio\fP +routines have been replaced, and are usually much faster. +In addition, the \fIfunopen\fP +interface permits applications to provide their own I/O stream +function support. +.NH 1 +Acknowledgements +.PP +We were greatly assisted by the past employees of the Computer Systems +Research Group: Mike Karels, Keith Sklower, and Marc Tietelbaum. +Our distribution coordinator, Pauline Schwartz, has reliably managed +the finances and the mechanics of shipping distributions for +nearly the entire fourteen years of the group's existence. +Without the help of lawyers Mary MacDonald, Joel Linzner, +and Carla Shapiro, the 4.4BSD-Lite distribution would never +have seen the light of day. +Much help was provided by Chris Demetriou in getting bug fixes +from NetBSD integrated back into the 4.4BSD-Lite distribution. +.PP +The vast majority of the 4.4BSD distribution comes from the numerous +people in the UNIX community that provided their time and energy in +creating the software contained in this release. +We dedicate this distribution to them. +.sp 1 +.in 4i +.nf +M. K. McKusick +K. Bostic +.fi +.in 0 +.sp 3 +.nr PS 9 +.nr VS 10 +.LP +.ne 1i +.ce +\fIPreface to the 4.3 Berkeley distribution\fP +.sp 1 +.LP +This update to the 4.2 distribution of August 1983 provides +substantially improved performance, reliability, and security, +the addition of Xerox Network System (NS) to the set of networking domains, +and partial support for the VAX 8600 and MICROVAXII. +.LP +We were greatly assisted by the DEC UNIX Engineering group who +provided two full time employees, Miriam Amos and Kevin Dunlap, +to work at Berkeley. They were responsible for developing and +debugging the distributed domain based name server +and integrating it into the mail system. +Mt Xinu provided the bug list distribution service as well as +donating their MICROVAXII port to 4.3BSD. +Drivers for the MICROVAXII were done by Rick Macklem +at the University of Guelph. +Sam Leffler provided valuable assistance and advice with many projects. +Keith Sklower coordinated with William Nesheim and J. Q. Johnson at Cornell, +and Chris Torek and James O'Toole at the University of Maryland +to do the Xerox Network Systems implementation. +Robert Elz at the University of Melbourne contributed greatly +to the performance work in the kernel. +Donn Seeley and Jay Lepreau at the University of Utah +relentlessly dealt with a myriad of details; +Donn completed the unfinished performance work on Fortran 77 +and fixed numerous C compiler bugs. +Ralph Campbell handled innumerable questions and problem reports +and had time left to write rdist. +George Goble was invaluable in shaking out the bugs on his +production systems long before we were confident enough to +inflict it on our users. +Bill Shannon at Sun Microsystems has been helpful in +providing us with bug fixes and improvements. +Tom Ferrin, in his capacity as Board Member of Usenix Association, +handled the logistics of large-scale reproduction +of the 4.2BSD and 4.3BSD manuals. +Mark Seiden helped with the typesetting and indexing of the 4.3BSD manuals. +Special mention goes to Bob Henry for keeping ucbvax running +in spite of new and improved software and +an ever increasing mail, news, and uucp load. +.LP +Numerous others contributed their time and energy in creating +the user contributed software for the release. +As always, we are grateful to the UNIX user community for +encouragement and support. +.LP +Once again, the financial support of the Defense Advanced Research +Projects Agency is gratefully acknowledged. +.sp 1 +.in 4i +.nf +M. K. McKusick +M. J. Karels +J. M. Bloom +.fi +.in 0 +.sp 2 +.ne 2i +.ce +\fIPreface to the 4.2 Berkeley distribution\fP +.sp 1 +This update to the 4.1 distribution of June 1981 provides support +for the VAX 11/730, full networking and interprocess communication +support, an entirely new file system, and many other new features. +It is certainly the most ambitious release of software ever prepared +here and represents many man-years of work. +Bill Shannon (both at DEC and at Sun Microsystems) +and Robert Elz of the University +of Melbourne contributed greatly to this distribution +through new device drivers and painful debugging episodes. +Rob Gurwitz of BBN wrote the initial version of the code upon +which the current networking support is based. +Eric Allman of Britton-Lee donated countless hours to the mail system. +Bill Croft (both at SRI and Sun Microsystems) aided in the +debugging and development of the networking facilities. +Dennis Ritchie of Bell Laboratories also +contributed greatly to this distribution, providing +valuable advise and guidance. Helge Skrivervik +worked on the device drivers which enabled +the distribution to be delivered with a TU58 +console cassette and RX01 console flopppy disk, and +rewrote major portions of the standalone i/o system +to support formatting of non-DEC peripherals. +.LP +Numerous others contributed their time and energy in organizing +the user software for release, while many groups of people on +campus suffered patiently through the low spots of development. +As always, we are grateful to the UNIX user community for +encouragement and support. +.LP +Once again, the financial support of the Defense Advanced Research +Projects Agency is gratefully acknowledged. +.sp 1 +.in 4i +.nf +S. J. Leffler +W. N. Joy +M. K. McKusick +.fi +.in 0 +.sp 2 +.ne 1i +.ce +\fIPreface to the 4.1 Berkeley distribution\fP +.sp 1 +This update to the fourth distribution of November 1980 provides +support for the VAX 11/750 and for the full interconnect architecture +of the VAX 11/780. Robert Elz of the University of Melbourne contributed +greatly to this distribution especially in the boot-time system +configuration code; Bill Shannon of DEC supplied us with the +implementation of DEC standard bad block handling. The research +group at Bell Laboratories and DEC Merrimack provided us with access +to 11/750's in order to debug its support. +.LP +Other individuals too numerous to mention provided us with bug reports, +fixes and other enhancements which are reflected in the system. We +are grateful to the UNIX user community for encouragement and +support. +.LP +The financial support of the Defence Advanced Research Projects Agency +in support of this work is gratefully acknowledged. +.sp 1 +.in 4i +.nf +W. N. Joy +R. S. Fabry +K. Sklower +.fi +.in 0 +.sp 2 +.ne 1i +.ce +\fIPreface to the Fourth Berkeley distribution\fP +.sp 1 +This manual reflects the Berkeley system mid-October, 1980. +A large amount of tuning has been done in the system since the last release; +we hope this provides as noticeable an improvement for you as it did for us. +This release finds the system in transition; a number of facilities +have been added in experimental versions (job control, resource limits) +and the implementation of others is imminent (shared-segments, higher +performance from the file system, etc.). +Applications which use facilities that are in transition should be aware +that some of the system calls and library routines will change +in the near future. We have tried to be conscientious and make it +very clear where this is likely. +.LP +A new group has been formed +at Berkeley, to assume responsibility for the future +development and support of a version of UNIX on the VAX. +The group has received funding from the +Defense Advanced Research Projects Agency (DARPA) +to supply a standard version of the system to DARPA contractors. +The same version of the system will be made available to other licensees +of UNIX on the VAX for a duplication charge. +We gratefully acknowledge +the support of this contract. +.LP +We wish to acknowledge the contribution of a number of individuals to +the the system. +.LP +We would especially like to thank +Jim Kulp of IIASA, +Laxenburg Austria and his colleagues, +who first put job control facilities into UNIX; +Eric Allman, Robert Henry, Peter Kessler and Kirk McKusick, who +contributed major new pieces of software; +Mark Horton, who contributed to the improvement of facilities and +substantially improved the quality of our bit-mapped fonts, +our hardware support staff: +Bob Kridle, +Anita Hirsch, +Len Edmondson +and +Fred Archibald, +who helped us to debug a number of new peripherals; +Ken Arnold who did much of the leg-work in getting this version of the +manual prepared, and did the final editing of sections 2-6, +some special individuals within Bell Laboratories: +Greg Chesson, +Stuart Feldman, +Dick Haight, +Howard Katseff, +Brian Kernighan, +Tom London, +John Reiser, +Dennis Ritchie, +Ken Thompson, +and +Peter Weinberger +who helped out by answering questions; +our excellent local DEC field service people, +Kevin Althaus and Frank Chargois +who kept our machine running virtually all the time, and fixed it quickly +when things broke; +and, +Mike Accetta of Carnegie-Mellon University, +Robert Elz of the University of Melbourne, +George Goble of Purdue University, +and +David Kashtan of the Stanford Research Institute +for their technical advice and support. +.LP +Special thanks to Bill Munson of DEC who helped by augmenting +our computing facility +and to Eric Allman for carefully proofreading the +``last'' draft of the manual and finding the bugs which we knew were +there but couldn't see. +.LP +We dedicate this to the memory of David Sakrison, late chairman of our +department, who gave his support to the establishment of our VAX +computing facility, and to our department as a whole. +.sp 1 +.in 4i +.nf +W. N. Joy +\v'-3p'\h'2p'\*:\v'3p'\h'-2p'O. Babao\*~glu +R. S. Fabry +K. Sklower +.fi +.in 0 +.sp 2 +.ne 1i +.ce +\fIPreface to the Third Berkeley distribution\fP +.sp 1 +This manual reflects the state of the Berkeley system, December 1979. +We would like to thank all the people at Berkeley who have contributed to +the system, and particularly thank +Prof. Richard Fateman for creating and administrating a hospitable environment, +Mark Horton who helped prepare this manual, and +Eric Allman, Bob Kridle, Juan Porcar +and Richard Tuck for their contributions to the kernel. +.LP +The cooperation of Bell Laboratories in providing us with an early version of +\s-2UNIX\s0/32V is greatly appreciated. We would especially like to thank +Dr. Charles Roberts of Bell Laboratories for helping us obtain this release, +and acknowledge +T. B. London, +J. F. Reiser, +K. Thompson, +D. M. Ritchie, +G. Chesson and +H. P. Katseff +for their advice and support. +.sp 1 +.in 4i +W. N. Joy +.br +\v'-3p'\h'2p'\*:\v'3p'\h'-2p'O. Babao\*~glu +.in 0 +.sp 2 +.ne 1i +.ce +\fIPreface to the UNIX/32V distribution\fP +.sp 1 +The +.UX +operating system for the VAX*-11 +.FS +*VAX and PDP are Trademarks of Digital Equipment Corporation. +.FE +provides substantially the same facilities as the +\s-2UNIX\s0 +system for the PDP*-11. +.LP +We acknowledge the work of many who came before us, and particularly thank +G. K. Swanson, W. M. Cardoza, D. K. Sharma, and J. F. Jarvis for assistance +with the implementation for the VAX-11/780. +.sp 1 +.in 4i +T. B. London +.br +J. F. Reiser +.in 0 +.sp 2 +.ne 1i +.ce +\fIPreface to the Seventh Edition\fP +.sp 1 +.LP +Although this Seventh Edition no longer bears their byline, +Ken Thompson and Dennis Ritchie remain the fathers +and preceptors of the +\s-2UNIX\s0 +time-sharing system. +Many of the improvements here described bear their mark. +Among many, many other people who have contributed to +the further flowering of +\s-2UNIX\s0, +we wish especially to +acknowledge the contributions of +A. V. Aho, +S. R. Bourne, +L. L. Cherry, +G. L. Chesson, +S. I. Feldman, +C. B. Haley, +R. C. Haight, +S. C. Johnson, +M. E. Lesk, +T. L. Lyon, +L. E. McMahon, +R. Morris, +R. Muha, +D. A. Nowitz, +L. Wehr, +and +P. J. Weinberger. +We appreciate also +the effective advice and criticism of +T. A. Dolotta, +A. G. Fraser, +J. F. Maranzano, +and +J. R. Mashey; +and we remember the important work of +the late Joseph F. Ossanna. +.sp 1 +.in 4i +B. W. Kernighan +.br +M. D. McIlroy +.in 0 +.if o .bp +\& +.bp +.de IR +\fI\\$1\^\fR\\$2 +.. +.de RI +\fR\\$1\fI\\$2\^\fR\\$3 +.. +.ce +\fB\s+4INTRODUCTION\s-4\fP +.sp 1 +.nr PS 10 +.nr VS 12 +.LP +The documentation for 4.4BSD is in a format similar +to the one used for the 4.2BSD and 4.3BSD manuals. +It is divided into three sets; each set consists of one or more volumes. +The abbreviations for the volume names are listed in square brackets; +the abbreviations for the manual sections are listed in parenthesis. +.DS +I. User's Documents + User's Reference Manual [URM] + Commands (1) + Games (6) + Macro packages and language conventions (7) + User's Supplementary Documents [USD] + Getting Started + Basic Utilities + Communicating with the World + Text Editing + Document Preparation + Amusements + +II. Programmer's Documents + Programmer's Reference Manual [PRM] + System calls (2) + Subroutines (3) + Special files (4) + File formats and conventions (5) + Programmer's Supplementary Documents [PSD] + Documents of Historic Interest + Languages in common use + Programming Tools + Programming Libraries + General Reference + +III. System Manager's Manual [SMM] + Maintenance commands (8) + System Installation and Administration +.DE +.LP +References to individual documents are given as ``volume:document'', +thus USD:1 refers to the first document in the ``User's Supplementary +Documents''. +References to manual pages are given as ``\fIname\fP(section)'' thus +.IR sh (1) +refers to the shell manual entry in section 1. +.LP +The manual pages give descriptions of the features of the +4.4BSD system, as developed at the University of California at Berkeley. +They do not attempt to provide perspective or tutorial information about the +4.4BSD operating system, its facilities, or its implementation. +Various documents on those topics are contained in the +``\s-1UNIX\s+1 User's Supplementary Documents'' (USD), the +``\s-1UNIX\s+1 Programmer's Supplementary Documents'' (PSD), +and ``\s-1UNIX\s+1 System Manager's Manual'' (SMM). +In particular, for an overview see ``The \s-1UNIX\s+1 Time-Sharing System'' (PSD:1) +by Ritchie and Thompson; for a tutorial see +``\s8\s-1UNIX\s+1\s10 for Beginners'' (USD:1) by Kernighan, +and for an guide to the new features of this latest version, see +``Berkeley Software Architecture Manual (4.4 Edition)'' (PSD:5). +.LP +Within the area it surveys, this volume attempts to be timely, complete +and concise. Where the latter two objectives conflict, +the obvious is often left unsaid in favor of brevity. +It is intended that each program be described as it is, not as it should be. +Inevitably, this means that various sections will soon be out of date. +.LP +Commands are programs intended to be invoked directly by +the user, in contrast to subroutines, that are +intended to be called by the user's programs. +User commands are described in URM section 1. +Commands generally reside in directory +.I /bin +(for +.IR bin \|ary +programs). +Some programs also reside in +.I +/\|usr/\|bin, +.R +to save space in +.I /\|bin. +.R +These directories are searched automatically by the command interpreters. +Additional directories that may be of interest include +.I +/\|usr/\|contrib/\|bin, +.R +which has contributed software +.I +/\|usr/\|old/\|bin, +.R +which has old but sometimes still useful software and +.I +/\|usr/\|local/\|bin, +.R +which contains software local to your site. +.LP +Games have been relegated to URM section 6 and +.I +/\|usr/\|games, +.R +to keep them from contaminating +the more staid information of URM section 1. +.LP +Miscellaneous collection of information necessary for +writing in various specialized languages such as character codes, +macro packages for typesetting, etc is contained in URM section 7. +.LP +System calls are entries into the BSD kernel. +The system call interface is identical to a C language +procedure call; the equivalent C procedures are described in PRM section 2. +.LP +An assortment of subroutines is available; +they are described in PRM section 3. +The primary libraries in which they are kept are described in +.IR intro (3). +The functions are described in terms of C. +.LP +PRM section 4 discusses the characteristics of +each system ``file'' that refers to an I/O device. +The names in this section refer to the HP300 device names for the hardware, +instead of the names of the special files themselves. +.LP +The file formats and conventions (PRM section 5) +documents the structure of particular kinds of files; +for example, the form of the output of the loader and +assembler is given. Excluded are files used by only one command, +for example the assembler's intermediate files. +.LP +Commands and procedures intended for use primarily by the +system administrator are described in SMM section 8. +The files described here are almost all kept in the directory +.I /\|etc. +The system administration binaries reside in +.I +/\|sbin, +.R +and +.I +/\|usr/\|sbin. +.LP +Each section consists of independent entries of a page or so each. +The name of the entry is in the upper corners of its pages, +together with the section number. +Entries within each section are alphabetized. +The page numbers of each entry start at 1; +it is infeasible to number consecutively the pages of +a document like this that is republished in many variant forms. +.LP +All entries are based on a common format; +not all subsections always appear. +.RS +.LP +The +.I name +subsection lists the exact names of the commands and subroutines +covered under the entry and gives a short description of their purpose. +.LP +The +.IR synopsis "" +summarizes the use of the program being described. +A few conventions are used, particularly in the Commands subsection: +.LP +.RS +.B Boldface +words are considered literals, and are typed just as they appear. +.LP +Square brackets [ ] around an argument show that the argument is optional. +When an argument is given as ``name'', it always refers to a file name. +.LP +Ellipses ``.\|.\|.'' are used to show that the previous argument-prototype +may be repeated. +.LP +A final convention is used by the commands themselves. +An argument beginning with a minus sign ``\-'' usually means that it is an +option-specifying argument, even if it appears in a position where +a file name could appear. Therefore, it is unwise to have files whose +names begin with ``\-''. +.LP +.RE +The +.IR description "" +subsection discusses in detail the subject at hand. +.LP +The +.IR files "" +subsection gives the names of files that are built into the program. +.LP +A +.I +see also +.R +subsection gives pointers to related information. +.LP +A +.I diagnostics +subsection discusses the diagnostic indications that may be produced. +Messages that are intended to be self-explanatory are not listed. +.LP +The +.IR bugs "" +subsection gives known bugs and sometimes deficiencies. +Occasionally the suggested fix is also described. +.LP +.RE +At the beginning of URM is a table of contents, +organized by section and alphabetically within each section. +There is also a permuted index derived from the table of contents. +Within each index entry, the title of the writeup to which +it refers is followed by the appropriate section number in parentheses. +This fact is important because there is considerable +name duplication among the sections, arising principally from commands that +exist only to exercise a particular system call. +Finally, there is a list of documents on the inside back cover of each volume. +.SH +HOW TO GET STARTED +.LP +This section sketches the basic information you need to get started on \s-1UNIX\s+1; +how to log in and log out, how to communicate through your terminal, +and how to run a program. +See ``\s-1UNIX\s+1 for Beginners'' in (USD:1) for a +more complete introduction to the system. +.LP +.I +Logging in.\ \ +.R +Almost any ASCII terminal capable of +full duplex operation and generating +the entire character set can be used. +You must have a valid user name, +which may be obtained from the system administration. +If you will be accessing \s-1UNIX\s+1 remotely, you will also +need to obtain the telephone number for the system that you will be using. +.LP +After a data connection is established, +the login procedure depends on what type of terminal you are using +and local system conventions. +If your terminal is directly connected to the computer, +it generally runs at 9600 or 19200 baud. +If you are using a modem running over a phone line, +the terminal must be set at the speed appropriate for the modem you are using, +typically 1200, 2400, or 9600 baud. +The half/full duplex switch should always be set at full-duplex. +(This switch will often have to be changed +since many other systems require half-duplex). +.LP +When a connection is established, the system types ``login:''; +you type your user name, followed by the ``return'' key. +If you have a password, the system asks for it +and suppresses echo to the terminal so the password will not appear. +After you have logged in, the ``return'', ``new line'', or ``linefeed'' keys +will give exactly the same results. +A message-of-the-day usually greets you before your first prompt. +.LP +If the system types out a few garbage characters +after you have established a data connection +(the ``login:'' message at the wrong speed), +depress the ``break'' (or ``interrupt'') key. +This is a speed-independent signal to \s-1UNIX\s+1 +that a different speed terminal is in use. +The system then will type ``login:,'' this time at another speed. +Continue depressing the break key until ``login:'' appears clearly, +then respond with your user name. +.LP +For all these terminals, it is important +that you type your name in lower-case if possible; if you type +upper-case letters, +\s-1UNIX\s+1 will assume that your terminal cannot generate lower-case +letters and will translate all subsequent lower-case letters to upper case. +.LP +The evidence that you have successfully logged in is that a shell program +will type a prompt (``$'' or ``%'') to you. +(The shells are described below under ``How to run a program.'') +.LP +For more information, consult +.IR tset (1), +and +.IR stty (1), +which tell how to adjust terminal behavior; +.IR getty (8) +discusses the login sequence in more detail, and +.IR tty (4) +discusses terminal I/O. +.LP +.I +Logging out.\ \ +.R +There are three ways to log out: +.IP +By typing ``logout'' or an end-of-file +indication (EOT character, control-D) to the shell. +The shell will terminate and the ``login:'' message will appear again. +.IP +You can log in directly as another user by giving a +.IR login (1) +command. +.IP +If worse comes to worse, +you can simply hang up the phone; but beware \- some machines may +lack the necessary hardware to detect that the phone has been hung up. +Ask your system administrator if this is a problem on your machine. +.LP +.I +How to communicate through your terminal.\ \ +.R +When you type characters, a gnome deep in the system +gathers your characters and saves them in a secret place. +The characters will not be given to a program +until you type a return (or newline), as described above in +.I +Logging in. +.R +.LP +\s-1UNIX\s+1 terminal I/O is full-duplex. +It has full read-ahead, which means that you can type at any time, +even while a program is typing at you. +Of course, if you type during output, the printed output will +have the input characters interspersed. +However, whatever you type will be saved up and interpreted in correct sequence. +There is a limit to the amount of read-ahead, +but it is generous and not likely to be exceeded unless +the system is in trouble. +When the read-ahead limit is exceeded, the system +throws away all the saved characters (or beeps, if your prompt was a ``%''). +.LP +The ^U (control-U) character in typed input kills all the +preceding characters in the line, +so typing mistakes can be repaired on a single line. +Also, the delete character (DEL) or sometimes the +backspace character (control-H) erases the last character typed. +.IR Tset (1) +or +.IR stty (1) +can be used to change these defaults. +Successive uses of delete (or backspace) erases characters back to, but +not beyond, the beginning of the line. +DEL and ^U (control-U) can be transmitted to a program by preceding them with +^V (control-V). +(So, to erase ^V (control-V), you need two deletes or backspaces). +.LP +An +.I +interrupt signal +.R +is sent to a program by typing ^C (control-C) or the ``break'' key +which is not passed to programs. +This signal generally causes whatever program you are running to terminate. +It is typically used to stop a long printout that you do not want. +However, programs can arrange either to ignore this signal altogether, +or to be notified when it happens (instead of being terminated). +The editor, for example, catches interrupts and stops what it is doing, +instead of terminating, so that an interrupt can +be used to halt an editor printout without losing the file being edited. +The interrupt character can also be changed with +.IR tset (1) +or +.IR stty (1). +.LP +It is also possible to suspend output temporarily using ^S (control-S) +and later resume output with ^Q (control-Q). +Output can be thrown away without interrupting +the program by typing ^O (control-O); see +.IR tty (4). +.LP +The +.IR quit "" +signal is generated by typing the \s8ASCII\s10 FS character. +(FS appears many places on different terminals, most commonly +as control-\e or control-\^|\^.) +It not only causes a running program to terminate +but also generates a file with the core image of the terminated process. +Quit is useful for debugging. +.LP +Besides adapting to the speed of the terminal, +\s-1UNIX\s+1 tries to be intelligent about whether +you have a terminal with the newline function +or whether it must be simulated with carriage-return and line-feed. +In the latter case, all input carriage returns +are turned to newline characters (the standard line delimiter) +and both a carriage return and a line feed are echoed to the terminal. +If you get into the wrong mode, the +.IR reset (1) +command will rescue you. +If the terminal does not appear to be echoing anything that you type, +it may be stuck in ``no-echo'' or ``raw'' mode. +Try typing ``(control-J)reset(control-J)'' to recover. +.LP +Tab characters are used freely in \s-1UNIX\s+1 source programs. +If your terminal does not have the tab function, +you can arrange to have them turned into spaces +during output, and echoed as spaces during input. +The system assumes that tabs are set every eight columns. +Again, the +.IR tset (1) +or +.IR stty (1) +command can be used to change these defaults. +.IR Tset (1) +can be used to set the tab stops automatically when necessary. +.LP +.I +How to run a program; the shells.\ \ +.R +When you have successfully logged in, a program +called a shell is listening to your terminal. +The shell reads typed-in lines, splits them up +into a command name and arguments, and executes the command. +A command is simply an executable program. +The shell looks in several system directories to find the command. +You can also place commands in your own directory and +have the shell find them there. +There is nothing special about system-provided +commands except that they are kept in a directory where the shell can find them. +.LP +The command name is always the first word on an input line; +it and its arguments are separated from one another by spaces. +.LP +When a program terminates, the shell will ordinarily regain control and type +a prompt at you to show that it is ready for another command. +.LP +The shells have many other capabilities, that are described in detail in +sections +.IR sh (1) +and +.IR csh (1). +If the shell prompts you with ``$'', then it is an instance of +.IR sh (1), +the original \s-1UNIX\s+1 shell. +If it prompts with ``%'' then it is an instance of +.IR csh (1), +a shell written at Berkeley. +The shells are different for all but the most simple terminal usage. +Most users at Berkeley choose +.IR csh (1) +because of the +.I history +mechanism and the +.I alias +feature, that greatly enhance its power when used interactively. +.I Csh +also supports the job-control facilities; +see +.IR csh (1) +or the Csh introduction in USD:4 for details. +.LP +You can change from one shell to the other by using the +.I chpass (1) +command, which takes effect at your next login. +.LP +.I +The current directory.\ \ +.R +\s-1UNIX\s+1 has a file system arranged as a hierarchy of directories. +When the system administrator gave you a user name, +they also created a directory for you (ordinarily +with the same name as your user name). +When you log in, any file name you type is by default in this directory. +Since you are the owner of this directory, you have +full permission to read, write, alter, or destroy its contents. +Permissions to have your will with other directories +and files will have been granted or denied to you by their owners. +As a matter of observed fact, few \s-1UNIX\s+1 +users protect their files from perusal by other users. +.LP +To change the current directory (but not the set of permissions you +were endowed with at login) use +.IR cd (1). +.LP +.I +Path names.\ \ +.R +To refer to files not in the current directory, you must use a path name. +Full path names begin with ``/\|'', the name of the root directory of the +whole file system. +After the slash comes the name of each directory containing the next +sub-directory (followed by a ``/\|'') until finally the file name is reached. +For example, +.I +/\^var/\^tmp/\^filex +.R +refers to the file +.I +filex +.R +in the directory +.I +tmp; tmp +.R +is itself a subdirectory of +.I +var; var +.R +springs directly from the root directory. +.LP +If your current directory has subdirectories, +the path names of files therein begin with +the name of the subdirectory with no prefixed ``/\|''. +.LP +A path name may be used anywhere a file name is required. +.LP +Important commands that modify the contents of files are +.IR cp (1), +.IR mv (1), +and +.IR rm (1), +which respectively copy, move (i.e. rename) and remove files. +To find out the status of files or directories, use +.IR ls (1). +See +.IR mkdir (1) +for making directories and +.IR rmdir (1) +for destroying them. +.LP +For a fuller discussion of the file system, see +``A Fast File System for \s-1UNIX\s+1'' (SMM:5) +by McKusick, Joy, Leffler, and Fabry. +It may also be useful to glance through PRM section 2, +that discusses system calls, even if you do not intend +to deal with the system at that level. +.LP +.I +Writing a program.\ \ +.R +To enter the text of a source program into a \s-1UNIX\s+1 file, +use the standard display editor +.IR vi (1) +or its \s-1WYSIWYG\s+1 counterparts +.IR jove (1) +and +.IR emacs (1). +(The old standard editor +.IR ed (1) +is also available.) +The principle language in \s-1UNIX\s+1 is provided by the C compiler +.IR cc (1). +User contributed software in the latest +release of the system supports the programming languages perl and C++. +After the program text has been entered through the editor +and written to a file, you can give the file +to the appropriate language processor as an argument. +The output of the language processor +will be left on a file in the current directory named ``a.out''. +If the output is precious, use +.IR mv (1) +to move it to a less exposed name after successful compilation. +.LP +When you have finally gone through this entire process +without provoking any diagnostics, the resulting program +can be run by giving its name to the shell +in response to the shell (``$'' or ``%'') prompt. +.LP +Your programs can receive arguments from the command line +just as system programs do, +see ``\s-1UNIX\s+1 Programming - Second Edition'' (PSD:4), +or for a more terse description +.IR execve (2). +.LP +.I +Text processing.\ \ +.R +Almost all text is entered through an editor such as +.IR vi (1), +.IR jove (1), +or +.IR emacs (1). +The commands most often used to write text on a terminal are: +.IR cat (1), +.IR more (1), +and +.IR nroff (1). +.LP +The +.IR cat (1) +command simply dumps \s8ASCII\s10 text +on the terminal, with no processing at all. +.IR More (1) +is useful for preventing the output of a command from +scrolling off the top of your screen. +It is also well suited to perusing files. +.IR Nroff (1) +is an elaborate text formatting program. +Used naked, it requires careful forethought, but for +ordinary documents it has been tamed; see +.IR me (7) +and +.IR ms (7). +.LP +.IR Groff (1) +converts documents to postscript for output to a +Laserwriter or Phototypesetter. +It is similar to +.IR nroff (1), +and often works from exactly the same source text. +It was used to produce this manual. +.LP +.IR Script (1) +lets you keep a record of your session in a file, +which can then be printed, mailed, etc. +It provides the advantages of a hard-copy terminal +even when using a display terminal. +.LP +.I +Status inquiries.\ \ +.R +Various commands exist to provide you with useful information. +.IR w (1) +prints a list of users currently logged in, and what they are doing. +.IR date (1) +prints the current time and date. +.IR ls (1) +will list the files in your directory or give +summary information about particular files. +.LP +.I +Surprises.\ \ +.R +Certain commands provide inter-user communication. +Even if you do not plan to use them, it would be +well to learn something about them, because someone else may aim them at you. +.LP +To communicate with another user currently logged in, +.IR write (1) +or +.IR talk (1) +is used; +.IR mail (1) +will leave a message whose presence will be announced +to another user when they next log in. +The write-ups in the manual also suggest how to respond to +the these commands if you are a target. +.LP +If you use +.IR csh (1) +the key ^Z (control-Z) will cause jobs to ``stop''. +If this happens before you learn about it, +you can simply continue by saying ``fg'' (for foreground) to bring +the job back. +.LP +We hope that you will come to enjoy using the BSD system. +Although it is very large and contains many commands, +you can become very productive using only a small subset of them. +As your needs expand to doing new tasks, +you will almost always find that the system has the facilities +that you need to accomplish them easily and quickly. +.LP +Most importantly, the source code to the BSD system +is cheaply available to anyone that wants it. +On many BSD systems, it can be found in the directory +.IR /\|usr/\|src . +You may simply want to find out how something works +or fix some important bug without waiting months for +your vendor to respond. +It is also particularly useful if you +want to grab another piece of code to bootstrap a new project. +Provided that you retain the copyrights and acknowledgements +at the top of each file, you are free to redistribute your +work for fun or profit. +Naturally, we hope that you will allow others to also redistribute +your code, though you are not required to do so unless you +use copyleft code (which is primarily found in the software +contributed from the Free Software Foundation and is +clearly identified). +.LP +Good luck and enjoy BSD. +.OH '''\s10- % -\s0' +.EH '\s10- % -\s0''' +.if o .bp +\& +.bp +.EF '\s9\\\\*(Dt''\\\\*(Ed\s0' +.OF '\s9\\\\*(Ed''\\\\*(Dt\s0' +.ce +\s+4\fBLIST \|OF \|MANUAL \|PAGES\fP\s-4 +.nr x 0.5 +.in +\nxi +.nf +.ta \n(.lu-\nxuR +.de xx +\\$1\f3 \a \fP\\$2 +.. +.de t +.sp 1v +.ne .5i +.cs 3 +.ti -\\nxi +.ss 18 +\f3\s9\\$2. \\$3\s0\fP +.ss 12 +.if t .sp .5v +.cs 3 36 +.ds Ed Section \\$2 +.ds Dt \\$3 +.so \\$1 +.. +.t toc1 1 "Commands and Application Programs" +.t toc2 2 "System Calls" +.t toc3 3 "C Library Subroutines" +.t toc4 4 "Special Files" +.t toc5 5 "File Formats" +.t toc6 6 "Games" +.t toc7 7 "Miscellaneous" +.t toc8 8 "System Maintenance" +.in -\nxi +.cs 3 +.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i +.if o .bp +\& +.bp +\& +.OH '\s9\fIPermuted Index\fP''- % -\s0' +.EH '\s9- % -''\fIPermuted Index\fP\s0' +.ds Ed 4.4BSD +.ds Dt June \|1993 +.ce +\s+4\fBPERMUTED \|INDEX\fP\s-4 +.sp 1 +.nr PS 8 +.nr VS 9 +.LP +.\" backup from slotput 1, slot, 2 +.tr ~ +.nf +.cs 3 36 +.de xx +.ds s1\" +.if \w\\$2 .ds s1 ~~\" +.ds s2 ~~~\" +.ds s3\" +.if \w\\$4 .ds s3 ~~\" +.ds s4 ~~\" +.ds s5 ~~\" +.ds y \\*(s4\f3\fP\\*(s5 +.ta 6i-\w\\*(s5u +\h"3i-\w\\$1\\*(s1\\$2\\*(s2u"\\$1\\*(s1\\$2\\*(s2\\$3\\*(s3\\$4\\*y\\$5 +.. +.so ptxx +.cs 3 +.ta .5i 1i 1.5i 2i 2.5i 3i 3.5i 4i 4.5i 5i 5.5i 6i 6.5i diff --git a/share/man/man0/tocrc b/share/man/man0/tocrc new file mode 100755 index 0000000..182e004 --- /dev/null +++ b/share/man/man0/tocrc @@ -0,0 +1,74 @@ +#!/bin/sh - +# +# Copyright (c) 1993 +# The Regents of the University of California. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this software +# must display the following acknowledgement: +# This product includes software developed by the University of +# California, Berkeley and its contributors. +# 4. Neither the name of the University nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# @(#)tocrc 8.1 (Berkeley) 6/29/93 +# +tmp=/tmp/toc$$ +trap "rm $tmp ; exit" 2 3 15 +: tocx files for all sections and everything else + +if [ ! -f tocx8 ]; then + for x in 1 2 3 4 5 6 7 8; do + /usr/libexec/getNAME -t `cat man$x` | + sed \ + -e 's/.s-2//g' \ + -e 's/.s-1//g' \ + -e 's/.s0//g' \ + -e 's/.s+1//g' \ + -e 's/ *.- */: /' \ + -e 's/ *$/./' \ + -e 's/.TH.* //' \ + > tocx$x + done +fi +: permuted index and toc files + +cat tocx* cshcmd > /tmp/cattoc + +ptx -r -t -b break -f -w 108 -i ignore /tmp/cattoc ptxx + +for x in 1 2 3 4 5 6 7 8; do + grep '^intro' <tocx$x >$tmp + sed \ + -e '2,${' \ + -e '/^intro/d' \ + -e '}' \ + -e 's/ .*://' \ + -e 's/.$//' \ + -e 's/([^)]*) /" "/' \ + -e 's/.*/.xx "&"/' \ + -e '/""/d' \ + $tmp tocx$x \ + >toc$x +done +exit diff --git a/share/man/man1/Makefile b/share/man/man1/Makefile new file mode 100644 index 0000000..9e3d8d6 --- /dev/null +++ b/share/man/man1/Makefile @@ -0,0 +1,6 @@ +# @(#)Makefile 8.1 (Berkeley) 6/5/93 + +MAN1= cd.0 intro.0 wait.0 + +.include <bsd.prog.mk> + diff --git a/share/man/man1/cd.1 b/share/man/man1/cd.1 new file mode 100644 index 0000000..8f5f5f8 --- /dev/null +++ b/share/man/man1/cd.1 @@ -0,0 +1,97 @@ +.\" Copyright (c) 1980, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" the Institute of Electrical and Electronics Engineers, Inc. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)cd.1 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt CD 1 +.Os BSD 4 +.Sh NAME +.Nm cd +.Nd change working directory +.Sh SYNOPSIS +.Nm cd +.Ar directory +.Sh DESCRIPTION +.Ar Directory +is an absolute or relative pathname which becomes the new working +directory. +The interpretation of a relative pathname by cd depends on the CDPATH +environment variable (see below). +.Sh ENVIRONMENT +The following environment variables affect the execution of cd: +.Pp +.Bl -tag -width indent +.It Ev CDPATH +If the +.Ar directory +operand does not begin with a slash (/) character, and the first +component is not dot (.) or dot-dot (..), +.Nm cd +searches for the directory relative to each directory named in the +.Ev CDPATH +variable, in the order listed. +The new working directory is set to the first matching directory found. +An empty string in place of a directory pathname represents the current +directory. +If the new working directory was derived from +.Ev CDPATH , +it will be printed to the standard output. +.It Ev HOME +If +.Nm cd +is invoked without arguments and the +.Ev HOME +environment variable exists and contains a directory name, that directory +becomes the new working directory. +.El +.Pp +See +.Xr csh 1 +for more information on environment variables. +.Pp +The +.Nm cd +utility exits 0 on success, and >0 if an error occurs. +.Sh SEE ALSO +.Xr csh 1 , +.Xr pwd 1 , +.Xr sh 1 , +.Xr chdir 2 +.Sh STANDARDS +The +.Nm cd +command is expected to be +.St -p1003.2 +compatible. diff --git a/share/man/man1/intro.1 b/share/man/man1/intro.1 new file mode 100644 index 0000000..fa88991 --- /dev/null +++ b/share/man/man1/intro.1 @@ -0,0 +1,74 @@ +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)intro.1 8.2 (Berkeley) 12/30/93 +.\" +.Dd December 30, 1993 +.Dt INTRO 1 +.Os +.Sh NAME +.Nm intro +.Nd introduction to general commands (tools and utilities) +.Sh DESCRIPTION +Section one of the manual contains most of the commands +which comprise the +.Bx +user environment. +Some of the commands included in section one are +text editors, command shell interpreters, +searching and sorting tools, +file manipulation commands +system status commands, +remote file copy commands, mail commands, +compilers and compiler tools, +formatted output tools, +and line printer commands. +.Pp +All commands set a status value upon exit which may be tested +to see if the command completed normally. +The exit values and their meanings are explained in the individual +manuals. Traditionally, the value 0 signifies successful +completion of the command. +.Sh SEE ALSO +.Xr man 1 +.Xr intro 2 +.Xr intro 3 +.Xr intro 3 +.Xr intro 4 +.Xr intro 8 +.Pp +Tutorials in the +.%T "UNIX User's Manual Supplementary Documents" . +.Sh HISTORY +A +.Nm intro +manual appeared in +.At v6 . diff --git a/share/man/man1/wait.1 b/share/man/man1/wait.1 new file mode 100644 index 0000000..09e12a3 --- /dev/null +++ b/share/man/man1/wait.1 @@ -0,0 +1,100 @@ +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)wait.1 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt WAIT 1 +.Os +.Sh NAME +.Nm wait +.Nd await process completion +.Sh SYNOPSIS +.Nm wait +.Op Ar pid +.Sh DESCRIPTION +If invoked with no arguments, the +.Nm wait +utility waits until +all existing child processes in the background +have terminated. +.Pp +Available operands: +.Bl -tag -width Ds +.It Ar pid +If a +.Ar pid +operand is specified, and it is the process ID of a +background child process that still exists, the +.Nm wait +utility +waits until that process has completed and consumes its +status information, without consuming the status information +of any other process. +.Pp +If a pid operand is specified that is not the process ID of +a child background process that still exists, +.Nm wait +exits +without waiting for any processes to complete. +.El +.Pp +The +.Nm wait +utility exits with one of the following values: +.Bl -tag -width Ds +.It \&0 +The +.Nm wait +utility was invoked with no operands and +all of the existing background child processes have +terminated, or the process specified by the pid +operand exited normally with 0 as its exit status. +.It \&>\&0 +The specified process did not exist and its exit +status information was not available, or the specified +process existed or its exit status information +was available, and it terminated with a non-zero +exit status. +.El +.Pp +If the specified process terminated abnormally due +to the receipt of a signal, the exit status +information of +.Nm wait +contains that termination status as +well. +.Sh STANDARDS +The +.Nm wait +command is expected to be +.St -p1003.2 +compatible. diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile new file mode 100644 index 0000000..673ff36 --- /dev/null +++ b/share/man/man3/Makefile @@ -0,0 +1,26 @@ +# @(#)Makefile 8.2 (Berkeley) 12/13/93 + +MAN3= assert.0 bitstring.0 end.0 intro.0 queue.0 stdarg.0 +MLINKS+=end.3 edata.3 end.3 etext.3 moncontrol.3 monstartup.3 +MLINKS+=queue.3 list_entry.3 queue.3 list_head.3 queue.3 list_init.3 +MLINKS+=queue.3 list_insert_after.3 queue.3 list_insert_head.3 +MLINKS+=queue.3 list_remove.3 queue.3 tailq_entry.3 queue.3 tailq_head.3 +MLINKS+=queue.3 tailq_init.3 queue.3 tailq_insert_after.3 +MLINKS+=queue.3 tailq_insert_head.3 queue.3 tailq_insert_tail.3 +MLINKS+=queue.3 tailq_remove.3 queue.3 circleq_entry.3 queue.3 circleq_head.3 +MLINKS+=queue.3 circleq_init.3 queue.3 circleq_insert_after.3 +MLINKS+=queue.3 circleq_insert_before.3 queue.3 circleq_insert_head.3 +MLINKS+=queue.3 circleq_insert_tail.3 queue.3 circleq_remove.3 +MLINKS+=stdarg.3 varargs.3 stdarg.3 va_arg.3 stdarg.3 va_end.3 +MLINKS+=stdarg.3 va_start.3 + +all: ${MAN3} + +clean depend lint tags: + +cleandir: + rm -f ${MAN3} + +install: maninstall + +.include <bsd.prog.mk> diff --git a/share/man/man3/assert.3 b/share/man/man3/assert.3 new file mode 100644 index 0000000..2a9c8f9 --- /dev/null +++ b/share/man/man3/assert.3 @@ -0,0 +1,86 @@ +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)assert.3 8.1 (Berkeley) 6/9/93 +.\" +.Dd June 9, 1993 +.Dt ASSERT 3 +.Os +.Sh NAME +.Nm assert +.Nd expression verification macro +.Sh SYNOPSIS +.Fd #include <assert.h> +.Fn assert expression +.Sh DESCRIPTION +The +.Fn assert +macro tests the given +.Ar expression +and if it is false, +the calling process is terminated. +A +diagnostic message is written to the +.Em stderr +and the function +.Xr _exit 2 +is called effectively terminating the program. +.Pp +If +.Ar expression +is true, +the +.Fn assert +macro does nothing. +.Pp +The +.Fn assert +macro +may be removed at compile time with +the +.Fl NDEBUG +option, see +.Xr cc 1 . +.Sh DIAGNOSTICS +The following diagnostic message is written to +.Em stderr +if +.Ar expression +is false: +.Bd -literal -offset indent +"assertion \e"%s\e" failed: file \e"%s\e", line %d\n", \e + "expression", __FILE__, __LINE__); +.Ed +.Sh HISTORY +A +.Nm assert +macro appeared in +.At v6 . diff --git a/share/man/man3/bitstring.3 b/share/man/man3/bitstring.3 new file mode 100644 index 0000000..11497d9 --- /dev/null +++ b/share/man/man3/bitstring.3 @@ -0,0 +1,179 @@ +.\" Copyright (c) 1989, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" Paul Vixie. +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)bitstring.3 8.1 (Berkeley) 7/19/93 +.\" +.Dd July 19, 1993 +.Dt BITSTRING 3 +.Os BSD 4 +.Sh NAME +.Nm bit_alloc , +.Nm bit_clear , +.Nm bit_decl , +.Nm bit_ffs , +.Nm bit_nclear , +.Nm bit_nset, +.Nm bit_set , +.Nm bitstr_size , +.Nm bit_test +.Nd bit-string manipulation macros +.Sh SYNOPSIS +.Fd #include <bitstring.h> +.Ft bitstr_t * +.Fn bit_alloc "int nbits" +.Fn bit_decl "bit_str name" "int nbits" +.Fn bit_clear "bit_str name" "int bit" +.Fn bit_ffc "bit_str name" "int nbits" "int *value" +.Fn bit_ffs "bit_str name" "int nbits" "int *value" +.Fn bit_nclear "bit_str name" "int start" "int stop" +.Fn bit_nset "bit_str name" "int start" "int stop" +.Fn bit_set "bit_str name" "int bit" +.Fn bitstr_size "int nbits" +.Fn bit_test "bit_str name" "int bit" +.Sh DESCRIPTION +These macros operate on strings of bits. +.Pp +The macro +.Fn bit_alloc +returns a pointer of type +.Dq Fa "bitstr_t *" +to sufficient space to store +.Fa nbits +bits, or +.Dv NULL +if no space is available. +.Pp +The macro +.Fn bit_decl +allocates sufficient space to store +.Fa nbits +bits on the stack. +.Pp +The macro +.Fn bitstr_size +returns the number of elements of type +.Fa bitstr_t +necessary to store +.Fa nbits +bits. +This is useful for copying bit strings. +.Pp +The macros +.Fn bit_clear +and +.Fn bit_set +clear or set the zero-based numbered bit +.Fa bit , +in the bit string +.Ar name . +.Pp +The +.Fn bit_nset +and +.Fn bit_nclear +macros +set or clear the zero-based numbered bits from +.Fa start +to +.Fa stop +in the bit string +.Ar name . +.Pp +The +.Fn bit_test +macro +evaluates to non-zero if the zero-based numbered bit +.Fa bit +of bit string +.Fa name +is set, and zero otherwise. +.Pp +The +.Fn bit_ffs +macro +stores in the location referenced by +.Fa value +the zero-based number of the first bit set in the array of +.Fa nbits +bits referenced by +.Fa name . +If no bits are set, the location referenced by +.Fa value +is set to \-1. +.Pp +The macro +.Fn bit_ffc +stores in the location referenced by +.Fa value +the zero-based number of the first bit not set in the array of +.Fa nbits +bits referenced by +.Fa name . +If all bits are set, the location referenced by +.Fa value +is set to \-1. +.Pp +The arguments to these macros are evaluated only once and may safely +have side effects. +.Sh EXAMPLE +.Bd -literal -offset indent +#include <limits.h> +#include <bitstring.h> + +... +#define LPR_BUSY_BIT 0 +#define LPR_FORMAT_BIT 1 +#define LPR_DOWNLOAD_BIT 2 +... +#define LPR_AVAILABLE_BIT 9 +#define LPR_MAX_BITS 10 + +make_lpr_available() +{ + bitstr_t bit_decl(bitlist, LPR_MAX_BITS); + ... + bit_nclear(bitlist, 0, LPR_MAX_BITS - 1); + ... + if (!bit_test(bitlist, LPR_BUSY_BIT)) { + bit_clear(bitlist, LPR_FORMAT_BIT); + bit_clear(bitlist, LPR_DOWNLOAD_BIT); + bit_set(bitlist, LPR_AVAILABLE_BIT); + } +} +.Ed +.Sh SEE ALSO +.Xr malloc 3 +.Sh HISTORY +The +.Nm bitstring +functions first appeared in 4.4BSD. diff --git a/share/man/man3/end.3 b/share/man/man3/end.3 new file mode 100644 index 0000000..3f1afa6 --- /dev/null +++ b/share/man/man3/end.3 @@ -0,0 +1,67 @@ +.\" Copyright (c) 1986 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)end.3 6.4 (Berkeley) 1/24/94 +.\" +.Dd January 24, 1994 +.Dt END 3 +.Os +.Sh NAME +.Nm end , +.Nm etext , +.Nm edata +.Nd end boundaries of image segments +.Sh SYNOPSIS +.Vt extern end; +.Vt extern etext; +.Vt extern edata; +.Sh DESCRIPTION +The global variables +.Va end , extext +and +.Va edata +correspond to the +the next address following the end +of the text segment, +the initialized data segment and the +end of the data segment +.Pq Tn BSS . +These values are initially set at execution time +by +.Xr brk 2 . +.Sh SEE ALSO +.Xr brk 2 , +.Xr malloc 3 +.Sh HISTORY +A +.Nm end +manual appeared in +.At v6 . diff --git a/share/man/man3/intro.3 b/share/man/man3/intro.3 new file mode 100644 index 0000000..ea77402 --- /dev/null +++ b/share/man/man3/intro.3 @@ -0,0 +1,162 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)intro.3 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt INTRO 3 +.Os BSD 4 +.Sh NAME +.Nm intro +.Nd introduction to the C libraries +.Sh DESCRIPTION +This section provides an overview of the C +library functions, their error returns and other +common definitions and concepts. +Most of these functions are available from the C library, +.Em libc +(see +.Xr libc 3 ) . +Other libraries, such as the math library, +.Em libm , +must be indicated at compile time with the +.Fl l +option of the compiler. +.Pp +A subset of the +.Xr libc functions +are available from Fortran; +they are described separately in +.Xr intro 3f . +.Pp +The various libraries (followed by the loader flag): +.Bl -tag -width "libc (-lc)" +.It Xr libc Pq Fl l Ns Ar c +Standard C library functions. (See +.Xr libc 3 . ) When using the C compiler +.Xr cc 1 , +it is not necessary +to supply the loader flag +.Fl l Ns Ar c +for these functions. +There are several `libraries' or groups of functions included inside of +.Xr libc : the standard +.Tn I/O +routines, +database routines, +bit operators, +string operators, +character tests and character operators, +des encryption routines, +storage allocation, time functions, signal handling and more. +.It Xo +.Xr libcurses +.Pf ( Fl l Ns Ar curses +.Fl l Ns Ar termcap ) +.Xc +Terminal independent screen management routines +for two dimensional non-bitmap display terminals. +(See +.Xr curses 3 . ) +.It Xr libcompat Pq Fl l Ns Ar compat +Functions which are obsolete but are available for compatibility with +.Bx 4.3 . +In particular, +a number of system call interfaces provided in previous releases of +.Bx +have been included for source code compatibility. +Use of these routines should, for the most part, be avoided. +The manual page entry for each compatibility routine +indicates the proper interface to use. +.\" .It Xr libkvm +.It Xr libl Pq Fl l Ns Ar l +The library for +.Xr lex 1 . +.\" .It Xr libln +.It Xr libm Pq Fl l Ns Ar m +The math library, +.Em libm . +The math library is loaded as needed by the Pascal compiler +.Xr pc 1 , +but not by the C compiler which requires the +.Fl l Ns Ar m +flag. +(See +.Xr math 3 . ) +.It Xr libmp Pq Fl l Ns Ar mp +.\" .It Xr libom +.\" Old math library. +.It Xr libplot Pq Fl l Ns Ar plot +Device independent plotting functions. +(See +.Xr plot 3 . ) +.It Xr libplotf77 Pq Fl l Ns Ar plotf77 +The device independent plotting functions for fortran. +(See +.Xr plot 3 . ) +.\" .It Xr libresolv Pq Fl l Ns Ar resolv +.\" Routines for network address resolution. +.It Xr libtermcap Fl l Ns Ar termcap +The terminal independent operation library package. (See +.Xr termcap 3 . ) +.\" .It libvt0.a +.It Xr liby Pq Fl l Ns Ar y +The library for +.Xr yacc 1 . +.El +.Sh FILES +.Bl -tag -width /usr/lib/libm_p.a -compact +.It Pa /usr/lib/libc.a +the C library +.It Pa /usr/lib/libm.a +the math library +.It Pa /usr/lib/libc_p.a +the C library compiled for profiling +.It Pa /usr/lib/libm_p.a +the math library compiled for profiling +.El +.Sh SEE ALSO +.\" .Xr libc 3 , +.Xr stdio 3 , +.Xr math 3 , +.Xr intro 2 , +.Xr cc 1 , +.Xr ld 1 , +.Xr nm 1 +.\" .Sh LIST OF FUNCTIONS +.\" .Bl -column "strncasecmpxxx" "system" +.\" .Sy Name Description +.\" .El +.Sh HISTORY +An +.Nm intro +manual appeared in +.At v7 . diff --git a/share/man/man3/queue.3 b/share/man/man3/queue.3 new file mode 100644 index 0000000..d31a58f --- /dev/null +++ b/share/man/man3/queue.3 @@ -0,0 +1,454 @@ +.\" Copyright (c) 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)queue.3 8.2 (Berkeley) 1/24/94 +.\" +.Dd "January 24, 1994" +.Dt QUEUE 3 +.Os BSD 4 +.Sh NAME +.Nm LIST_ENTRY , +.Nm LIST_HEAD , +.Nm LIST_INIT , +.Nm LIST_INSERT_AFTER , +.Nm LIST_INSERT_HEAD , +.Nm LIST_REMOVE , +.Nm TAILQ_ENTRY , +.Nm TAILQ_HEAD , +.Nm TAILQ_INIT , +.Nm TAILQ_INSERT_AFTER , +.Nm TAILQ_INSERT_HEAD , +.Nm TAILQ_INSERT_TAIL , +.Nm TAILQ_REMOVE , +.Nm CIRCLEQ_ENTRY , +.Nm CIRCLEQ_HEAD , +.Nm CIRCLEQ_INIT , +.Nm CIRCLEQ_INSERT_AFTER , +.Nm CIRCLEQ_INSERT_BEFORE , +.Nm CIRCLEQ_INSERT_HEAD , +.Nm CIRCLEQ_INSERT_TAIL , +.Nm CIRCLEQ_REMOVE +.Nd implementations of lists, tail queues, and circular queues +.Sh SYNOPSIS +.Fd #include <sys/queue.h> +.sp +.Fn LIST_ENTRY "TYPE" +.Fn LIST_HEAD "HEADNAME" "TYPE" +.Fn LIST_INIT "LIST_HEAD *head" +.Fn LIST_INSERT_AFTER "LIST_ENTRY *listelm" "TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_INSERT_HEAD "LIST_HEAD *head" "TYPE *elm" "LIST_ENTRY NAME" +.Fn LIST_REMOVE "TYPE *elm" "LIST_ENTRY NAME" +.sp +.Fn TAILQ_ENTRY "TYPE" +.Fn TAILQ_HEAD "HEADNAME" "TYPE" +.Fn TAILQ_INIT "TAILQ_HEAD *head" +.Fn TAILQ_INSERT_AFTER "TAILQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "TAILQ_ENTRY NAME" +.Fn TAILQ_INSERT_HEAD "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME" +.Fn TAILQ_INSERT_TAIL "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME" +.Fn TAILQ_REMOVE "TAILQ_HEAD *head" "TYPE *elm" "TAILQ_ENTRY NAME" +.sp +.Fn CIRCLEQ_ENTRY "TYPE" +.Fn CIRCLEQ_HEAD "HEADNAME" "TYPE" +.Fn CIRCLEQ_INIT "CIRCLEQ_HEAD *head" +.Fn CIRCLEQ_INSERT_AFTER "CIRCLEQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_INSERT_BEFORE "CIRCLEQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_INSERT_HEAD "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_INSERT_TAIL "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Fn CIRCLEQ_REMOVE "CIRCLEQ_HEAD *head" "TYPE *elm" "CIRCLEQ_ENTRY NAME" +.Sh DESCRIPTION +These macros define and operate on three types of data structures: +lists, tail queues, and circular queues. +All three structures support the following functionality: +.Bl -enum -compact -offset indent +.It +Insertion of a new entry at the head of the list. +.It +Insertion of a new entry after any element in the list. +.It +Removal of any entry in the list. +.It +Forward traversal through the list. +.El +.Pp +Lists are the simplest of the three data structures and support +only the above functionality. +.Pp +Tail queues add the following functionality: +.Bl -enum -compact -offset indent +.It +Entries can be added at the end of a list. +.El +However: +.Bl -enum -compact -offset indent +.It +All list insertions and removals must specify the head of the list. +.It +Each head entry requires two pointers rather than one. +.It +Code size is about 15% greater and operations run about 20% slower +than lists. +.El +.Pp +Circular queues add the following functionality: +.Bl -enum -compact -offset indent +.It +Entries can be added at the end of a list. +.It +Entries can be added before another entry. +.It +They may be traversed backwards, from tail to head. +.El +However: +.Bl -enum -compact -offset indent +.It +All list insertions and removals must specify the head of the list. +.It +Each head entry requires two pointers rather than one. +.It +The termination condition for traversal is more complex. +.It +Code size is about 40% greater and operations run about 45% slower +than lists. +.El +.Pp +In the macro definitions, +.Fa TYPE +is the name of a user defined structure, +that must contain a field of type +.Li LIST_ENTRY , +.Li TAILQ_ENTRY , +or +.Li CIRCLEQ_ENTRY , +named +.Fa NAME . +The argument +.Fa HEADNAME +is the name of a user defined structure that must be declared +using the macros +.Li LIST_HEAD , +.Li TAILQ_HEAD , +or +.Li CIRCLEQ_HEAD . +See the examples below for further explanation of how these +macros are used. +.Sh LISTS +A list is headed by a structure defined by the +.Nm LIST_HEAD +macro. +This structure contains a single pointer to the first element +on the list. +The elements are doubly linked so that an arbitrary element can be +removed without traversing the list. +New elements can be added to the list after an existing element or +at the head of the list. +A +.Fa LIST_HEAD +structure is declared as follows: +.Bd -literal -offset indent +LIST_HEAD(HEADNAME, TYPE) head; +.Ed +.sp +where +.Fa HEADNAME +is the name of the structure to be defined, and +.Fa TYPE +is the type of the elements to be linked into the list. +A pointer to the head of the list can later be declared as: +.Bd -literal -offset indent +struct HEADNAME *headp; +.Ed +.sp +(The names +.Li head +and +.Li headp +are user selectable.) +.Pp +The macro +.Nm LIST_ENTRY +declares a structure that connects the elements in +the list. +.Pp +The macro +.Nm LIST_INIT +initializes the list referenced by +.Fa head . +.Pp +The macro +.Nm LIST_INSERT_HEAD +inserts the new element +.Fa elm +at the head of the list. +.Pp +The macro +.Nm LIST_INSERT_AFTER +inserts the new element +.Fa elm +after the element +.Fa listelm . +.Pp +The macro +.Nm LIST_REMOVE +removes the element +.Fa elm +from the list. +.Sh LIST EXAMPLE +.Bd -literal +LIST_HEAD(listhead, entry) head; +struct listhead *headp; /* List head. */ +struct entry { + ... + LIST_ENTRY(entry) entries; /* List. */ + ... +} *n1, *n2, *np; + +LIST_INIT(&head); /* Initialize the list. */ + +n1 = malloc(sizeof(struct entry)); /* Insert at the head. */ +LIST_INSERT_HEAD(&head, n1, entries); + +n2 = malloc(sizeof(struct entry)); /* Insert after. */ +LIST_INSERT_AFTER(n1, n2, entries); + /* Forward traversal. */ +for (np = head.lh_first; np != NULL; np = np->entries.le_next) + np-> ... + +while (head.lh_first != NULL) /* Delete. */ + LIST_REMOVE(head.lh_first, entries); +.Ed +.Sh TAIL QUEUES +A tail queue is headed by a structure defined by the +.Nm TAILQ_HEAD +macro. +This structure contains a pair of pointers, +one to the first element in the tail queue and the other to +the last element in the tail queue. +The elements are doubly linked so that an arbitrary element can be +removed without traversing the tail queue. +New elements can be added to the tail queue after an existing element, +at the head of the tail queue, or at the end of the tail queue. +A +.Fa TAILQ_HEAD +structure is declared as follows: +.Bd -literal -offset indent +TAILQ_HEAD(HEADNAME, TYPE) head; +.Ed +.sp +where +.Li HEADNAME +is the name of the structure to be defined, and +.Li TYPE +is the type of the elements to be linked into the tail queue. +A pointer to the head of the tail queue can later be declared as: +.Bd -literal -offset indent +struct HEADNAME *headp; +.Ed +.sp +(The names +.Li head +and +.Li headp +are user selectable.) +.Pp +The macro +.Nm TAILQ_ENTRY +declares a structure that connects the elements in +the tail queue. +.Pp +The macro +.Nm TAILQ_INIT +initializes the tail queue referenced by +.Fa head . +.Pp +The macro +.Nm TAILQ_INSERT_HEAD +inserts the new element +.Fa elm +at the head of the tail queue. +.Pp +The macro +.Nm TAILQ_INSERT_TAIL +inserts the new element +.Fa elm +at the end of the tail queue. +.Pp +The macro +.Nm TAILQ_INSERT_AFTER +inserts the new element +.Fa elm +after the element +.Fa listelm . +.Pp +The macro +.Nm TAILQ_REMOVE +removes the element +.Fa elm +from the tail queue. +.Sh TAIL QUEUE EXAMPLE +.Bd -literal +TAILQ_HEAD(tailhead, entry) head; +struct tailhead *headp; /* Tail queue head. */ +struct entry { + ... + TAILQ_ENTRY(entry) entries; /* Tail queue. */ + ... +} *n1, *n2, *np; + +TAILQ_INIT(&head); /* Initialize the queue. */ + +n1 = malloc(sizeof(struct entry)); /* Insert at the head. */ +TAILQ_INSERT_HEAD(&head, n1, entries); + +n1 = malloc(sizeof(struct entry)); /* Insert at the tail. */ +TAILQ_INSERT_TAIL(&head, n1, entries); + +n2 = malloc(sizeof(struct entry)); /* Insert after. */ +TAILQ_INSERT_AFTER(&head, n1, n2, entries); + /* Forward traversal. */ +for (np = head.tqh_first; np != NULL; np = np->entries.tqe_next) + np-> ... + /* Delete. */ +while (head.tqh_first != NULL) + TAILQ_REMOVE(&head, head.tqh_first, entries); +.Ed +.Sh CIRCULAR QUEUES +A circular queue is headed by a structure defined by the +.Nm CIRCLEQ_HEAD +macro. +This structure contains a pair of pointers, +one to the first element in the circular queue and the other to the +last element in the circular queue. +The elements are doubly linked so that an arbitrary element can be +removed without traversing the queue. +New elements can be added to the queue after an existing element, +before an existing element, at the head of the queue, or at the end +of the queue. +A +.Fa CIRCLEQ_HEAD +structure is declared as follows: +.Bd -literal -offset indent +CIRCLEQ_HEAD(HEADNAME, TYPE) head; +.Ed +.sp +where +.Li HEADNAME +is the name of the structure to be defined, and +.Li TYPE +is the type of the elements to be linked into the circular queue. +A pointer to the head of the circular queue can later be declared as: +.Bd -literal -offset indent +struct HEADNAME *headp; +.Ed +.sp +(The names +.Li head +and +.Li headp +are user selectable.) +.Pp +The macro +.Nm CIRCLEQ_ENTRY +declares a structure that connects the elements in +the circular queue. +.Pp +The macro +.Nm CIRCLEQ_INIT +initializes the circular queue referenced by +.Fa head . +.Pp +The macro +.Nm CIRCLEQ_INSERT_HEAD +inserts the new element +.Fa elm +at the head of the circular queue. +.Pp +The macro +.Nm CIRCLEQ_INSERT_TAIL +inserts the new element +.Fa elm +at the end of the circular queue. +.Pp +The macro +.Nm CIRCLEQ_INSERT_AFTER +inserts the new element +.Fa elm +after the element +.Fa listelm . +.Pp +The macro +.Nm CIRCLEQ_INSERT_BEFORE +inserts the new element +.Fa elm +before the element +.Fa listelm . +.Pp +The macro +.Nm CIRCLEQ_REMOVE +removes the element +.Fa elm +from the circular queue. +.Sh CIRCULAR QUEUE EXAMPLE +.Bd -literal +CIRCLEQ_HEAD(circleq, entry) head; +struct circleq *headp; /* Circular queue head. */ +struct entry { + ... + CIRCLEQ_ENTRY entries; /* Circular queue. */ + ... +} *n1, *n2, *np; + +CIRCLEQ_INIT(&head); /* Initialize the circular queue. */ + +n1 = malloc(sizeof(struct entry)); /* Insert at the head. */ +CIRCLEQ_INSERT_HEAD(&head, n1, entries); + +n1 = malloc(sizeof(struct entry)); /* Insert at the tail. */ +CIRCLEQ_INSERT_TAIL(&head, n1, entries); + +n2 = malloc(sizeof(struct entry)); /* Insert after. */ +CIRCLEQ_INSERT_AFTER(&head, n1, n2, entries); + +n2 = malloc(sizeof(struct entry)); /* Insert before. */ +CIRCLEQ_INSERT_BEFORE(&head, n1, n2, entries); + /* Forward traversal. */ +for (np = head.cqh_first; np != (void *)&head; np = np->entries.cqe_next) + np-> ... + /* Reverse traversal. */ +for (np = head.cqh_last; np != (void *)&head; np = np->entries.cqe_prev) + np-> ... + /* Delete. */ +while (head.cqh_first != (void *)&head) + CIRCLEQ_REMOVE(&head, head.cqh_first, entries); +.Ed +.Sh HISTORY +The +.Nm queue +functions first appeared in 4.4BSD. diff --git a/share/man/man3/stdarg.3 b/share/man/man3/stdarg.3 new file mode 100644 index 0000000..3b9a820 --- /dev/null +++ b/share/man/man3/stdarg.3 @@ -0,0 +1,205 @@ +.\" Copyright (c) 1990, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This code is derived from software contributed to Berkeley by +.\" the American National Standards Committee X3, on Information +.\" Processing Systems. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)stdarg.3 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt STDARG 3 +.Os +.Sh NAME +.Nm stdarg +.Nd variable argument lists +.Sh SYNOPSIS +.Fd #include <stdarg.h> +.Ft void +.Fn va_start "va_list ap" last +.Ft type +.Fn va_arg "va_list ap" type +.Ft void +.Fn va_end "va_list ap" +.Sh DESCRIPTION +A function may be called with a varying number of arguments of varying +types. +The include file +.Aq Pa stdarg.h +declares a type +.Pq Em va_list +and defines three macros for stepping +through a list of arguments whose number and types are not known to +the called function. +.Pp +The called function must declare an object of type +.Em va_list +which is used by the macros +.Fn va_start , +.Fn va_arg , +and +.Fn va_end . +.Pp +The +.Fn va_start +macro initializes +.Fa ap +for subsequent use by +.Fn va_arg +and +.Fn va_end , +and must be called first. +.Pp +The parameter +.Fa last +is the name of the last parameter before the variable argument list, +i.e. the last parameter of which the calling function knows the type. +.Pp +Because the address of this parameter is used in the +.Fn va_start +macro, it should not be declared as a register variable, or as a +function or an array type. +.Pp +The +.Fn va_start +macro returns no value. +.Pp +The +.Fn va_arg +macro expands to an expression that has the type and value of the next +argument in the call. +The parameter +.Fa ap +is the +.Em va_list Fa ap +initialized by +.Fn va_start . +Each call to +.Fn va_arg +modifies +.Fa ap +so that the next call returns the next argument. +The parameter +.Fa type +is a type name specified so that the type of a pointer to an +object that has the specified type can be obtained simply by +adding a * +to +.Fa type . +.Pp +If there is no next argument, or if +.Fa type +is not compatible with the type of the actual next argument +(as promoted according to the default argument promotions), +random errors will occur. +.Pp +The first use of the +.Fn va_arg +macro after that of the +.Fn va_start +macro returns the argument after +.Fa last . +Successive invocations return the values of the remaining +arguments. +.Pp +The +.Fn va_end +macro handles a normal return from the function whose variable argument +list was initialized by +.Fn va_start . +.Pp +The +.Fn va_end +macro returns no value. +.Sh EXAMPLES +The function +.Em foo +takes a string of format characters and prints out the argument +associated with each format character based on the type. +.Bd -literal -offset indent +void foo(char *fmt, ...) +{ + va_list ap; + int d; + char c, *p, *s; + + va_start(ap, fmt); + while (*fmt) + switch(*fmt++) { + case 's': /* string */ + s = va_arg(ap, char *); + printf("string %s\en", s); + break; + case 'd': /* int */ + d = va_arg(ap, int); + printf("int %d\en", d); + break; + case 'c': /* char */ + c = va_arg(ap, char); + printf("char %c\en", c); + break; + } + va_end(ap); +} +.Ed +.Sh STANDARDS +The +.Fn va_start , +.Fn va_arg , +and +.Fn va_end +macros conform to +.St -ansiC . +.Sh COMPATIBILITY +These macros are +.Em not +compatible with the historic macros they replace. +A backward compatible version can be found in the include +file +.Aq Pa varargs.h . +.Sh BUGS +Unlike the +.Em varargs +macros, the +.Nm stdarg +macros do not permit programmers to +code a function with no fixed arguments. +This problem generates work mainly when converting +.Em varargs +code to +.Nm stdarg +code, +but it also creates difficulties for variadic functions that +wish to pass all of their arguments on to a function +that takes a +.Em va_list +argument, such as +.Xr vfprintf 3 . diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile new file mode 100644 index 0000000..c5ad948 --- /dev/null +++ b/share/man/man4/Makefile @@ -0,0 +1,10 @@ +# @(#)Makefile 8.1 (Berkeley) 6/18/93 + +MAN4= clnp.0 cltp.0 drum.0 esis.0 fd.0 icmp.0 idp.0 inet.0 ip.0 \ + iso.0 lo.0 netintro.0 ns.0 nsip.0 null.0 pty.0 route.0 \ + spp.0 tcp.0 termios.0 tp.0 tty.0 udp.0 unix.0 +MLINKS+=fd.4 stderr.4 fd.4 stdin.4 fd.4 stdout.4 +MLINKS+=netintro.4 networking.4 +SUBDIR= man4.hp300 man4.i386 man4.sparc man4.tahoe man4.vax + +.include <bsd.prog.mk> diff --git a/share/man/man4/clnp.4 b/share/man/man4/clnp.4 new file mode 100644 index 0000000..ee42610 --- /dev/null +++ b/share/man/man4/clnp.4 @@ -0,0 +1,167 @@ +.\" Copyright (c) 1990, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)clnp.4 8.2 (Berkeley) 4/2/94 +.\" +.Dd April 2, 1994 +.Dt CLNP 4 +.Os +.Sh NAME +.Nm clnp +.Nd Connectionless-Mode Network Protocol +.Sh SYNOPSIS +.Fd #include <sys/socket.h> +.Fd #include <netiso/iso.h> +.Fd #include <netiso/clnp.h> +.Ft int +.Fn socket AF_ISO SOCK_RAW 0 +.Sh DESCRIPTION +.Tn CLNP +is the connectionless-mode network protocol used by the +connectionless-mode network service. This protocol is specified in +.Tn ISO +8473. +It may be accessed +through a +.Dq raw socket +for debugging purposes only. +.Tn CLNP +sockets are connectionless, +and are normally used with the +.Xr sendto +and +.Xr recvfrom +calls, though the +.Xr connect 2 +call may also be used to fix the destination for future +packets (in which case the +.Xr read 2 +or +.Xr recv 2 +and +.Xr write 2 +or +.Xr send 2 +system calls may be used). +.Pp +Outgoing packets automatically have a +.Tn CLNP +header prepended to +them. Incoming packets received by the user contain the full +.Tn CLNP +header. +The following +.Xr setsockopt +options apply to +.Tn CLNP : +.Bl -tag -width CLNPOPT_FLAGS +.It Dv CLNPOPT_FLAGS +Sets the flags which are passed to clnp when sending a datagram. +Valid flags are: +.Pp +.Bl -tag -width "CLNP_NO_CKSUM" -offset indent -compact +.It Dv CLNP_NO_SEG +Do not allow segmentation +.It Dv CLNP_NO_ER +Suppress ER pdus +.It Dv CLNP_NO_CKSUM +Do not generate the +.Tn CLNP +checksum +.El +.Pp +.It Dv CLNPOPT_OPTS +Sets +.Tn CLNP +options. The options must be formatted exactly as specified by +.Tn ISO +8473, section 7.5 +.Dq Options Part. +Once an option has been set, it will +be sent on all packets until a different option is set. +.El +.Sh CONGESTION EXPERIENCE BIT +Whenever a packet is transmitted, the globally unique quality of +service option is added to the packet. The sequencing preferred bit and +the low transit delay bit are set in this option. +.Pp +If a packet is forwarded containing the globally unique quality of +service option, and the interface through which the packet will be +transmitted has a queue length greater than +.Em congest_threshold , +then the congestion experienced bit is set in the quality of service option. +.Pp +The threshold value stored in +.Em congest_threshold +may be tuned. +.Pp +When a packet is received with the +globally unique quality of service option present, and the +congestion experienced bit is set, then the transport congestion +control function is called. +.Sh DIAGNOSTICS +A socket operation may fail with one of the following errors returned: +.Bl -tag -width [EADDRNOTAVAIL] +.It Bq Er EISCONN +When trying to establish a connection on a socket which +already has one, or when trying to send a datagram with the destination +address specified and the socket is already connected; +.It Bq Er ENOTCONN +When trying to send a datagram, but +no destination address is specified, and the socket hasn't been +connected; +.It Bq Er ENOBUFS +When the system runs out of memory for +an internal data structure; +.It Bq Er EADDRNOTAVAIL +When an attempt is made to create a +socket with a network address for which no network interface +exists; +.It Bq Er EHOSTUNREACH +When trying to send a datagram, but no route to the destination +address exists. +.It Bq Er EINVAL +When specifying unsupported options. +.El +.Sh SEE ALSO +.Xr send 2 , +.Xr recv 2 , +.Xr intro 4 , +.Xr iso 4 +.Sh BUGS +Packets are sent with the type code of 0x1d (technically an invalid +packet type) for lack of a better way to identify raw +.Tn CLNP +packets. +.Pp +No more than +.Dv MLEN +bytes of options can be specified. diff --git a/share/man/man4/cltp.4 b/share/man/man4/cltp.4 new file mode 100644 index 0000000..13bbd1c --- /dev/null +++ b/share/man/man4/cltp.4 @@ -0,0 +1,127 @@ +.\" Copyright (c) 1990, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)cltp.4 8.1 (Berkeley) 6/9/93 +.\" +.Dd June 9, 1993 +.Dt CLTP 4 +.Os +.Sh NAME +.Nm cltp +.Nd +.Tn ISO +Connectionless Transport Protocol +.Sh SYNOPSIS +.Fd #include <sys/socket.h> +.Fd #include <netiso/iso.h> +.Ft int +.Fn socket AF_ISO SOCK_DGRAM 0 +.Sh DESCRIPTION +.Tn CLTP +is a simple, unreliable datagram protocol which is accessed +via the +.Dv SOCK_DGRAM +abstraction for the +.Tn ISO +protocol family. +.Tn CLTP +sockets are connectionless, and are +normally used with the +.Xr sendto +and +.Xr recvfrom +calls, though the +.Xr connect 2 +call may also be used to fix the destination for future +packets (in which case the +.Xr recv 2 +or +.Xr read 2 +and +.Xr send 2 +or +.Xr write 2 +system calls may be used). +.Pp +.Tn CLTP +address formats are identical to those used by TP. +In particular +.Tn CLTP +provides a service selector in addition +to the normal +.Tn ISO NSAP . +Note that the +.Tn CLTP +selector +space is separate from the TP selector space (i.e. a +.Tn CLTP +selector +may not be +.Dq connected +to a TP selector). +.Pp +Options at the +.Tn CLNP +network level may be used with +.Tn CLTP ; +see +.Xr clnp 4 . +.Sh DIAGNOSTICS +A socket operation may fail with one of the following errors returned: +.Bl -tag -width [EADDRNOTAVAIL] +.It Bq Er EISCONN +when trying to establish a connection on a socket which +already has one, or when trying to send a datagram with the destination +address specified and the socket is already connected; +.It Bq Er ENOTCONN +when trying to send a datagram, but +no destination address is specified, and the socket hasn't been +connected; +.It Bq Er ENOBUFS +when the system runs out of memory for +an internal data structure; +.It Bq Er EADDRINUSE +when an attempt +is made to create a socket with a selector which has already been +allocated; +.It Bq Er EADDRNOTAVAIL +when an attempt is made to create a +socket with a network address for which no network interface +exists. +.El +.Sh SEE ALSO +.Xr getsockopt 2 , +.Xr recv 2 , +.Xr send 2 , +.Xr socket 2 , +.Xr intro 4 , +.Xr iso 4 , +.Xr clnp 4 diff --git a/share/man/man4/drum.4 b/share/man/man4/drum.4 new file mode 100644 index 0000000..404d09d --- /dev/null +++ b/share/man/man4/drum.4 @@ -0,0 +1,59 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)drum.4 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt DRUM 4 +.Os BSD 4 +.Sh NAME +.Nm drum +.Nd paging device +.Sh DESCRIPTION +This file refers to the paging device in use by the system. +This may actually be a subdevice of one of the disk drivers, but in +a system with paging interleaved across multiple disk drives +it provides an indirect driver for the multiple drives. +.Sh FILES +.Bl -tag -width /dev/drum +.It Pa /dev/drum +.El +.Sh HISTORY +The +.Nm +special file appeared in +.Bx 3.0 . +.Sh BUGS +Reads from the drum are not allowed across the interleaving boundaries. +Since these only occur every .5Mbytes +or so, +and since the system never allocates blocks across the boundary, +this is usually not a problem. diff --git a/share/man/man4/esis.4 b/share/man/man4/esis.4 new file mode 100644 index 0000000..8fa57be --- /dev/null +++ b/share/man/man4/esis.4 @@ -0,0 +1,215 @@ +.\" Copyright (c) 1990, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)esis.4 8.2 (Berkeley) 11/30/93 +.\" +.Dd November 30, 1993 +.Dt ESIS 4 +.Os +.Sh NAME +.Nm es-is +.Nd End System to Intermediate System Routing Protocol +.Sh SYNOPSIS +.Sy pseudo-device +.Nm ether +.Sh DESCRIPTION +The +.Nm ES-IS +routing protocol is used to dynamically map between +.Tn ISO NSAP +addresses and +.Tn ISO SNPA +addresses; to permit End and Intermediate Systems +to learn of each other's existence; and to allow Intermediate Systems +to inform End Systems of (potentially) better routes to use when +forwarding +.Tn NPDU Ns s +to a particular destination. +.Pp +The mapping between +.Tn NSAP +addresses and +.Tn SNPA +addresses is accomplished by +transmitting hello +.Tn PDU Ns s +between the cooperating Systems. These +.Tn PDU Ns s +are transmitted whenever the +.Em configuration +timer expires. +When a hello +.Tn PDU +is received, the +.Tn SNPA +address that it conveys is stored in the routing table for as long as the +.Em holding time +in the +.Tn PDU +suggests. The default +.Em holding time +(120 seconds) placed in the hello +.Tn PDU , +the configuration timer value, +and the system type (End System or Intermediate System) may be changed by +issuing an +.Dv SIOCSSTYPE +.Xr ioctl 2 , +which is defined in +.Pa /sys/netiso/iso_snpac.h. +.Pp +The protocol behaves differently depending on whether the System is +configured as an End System or an Intermediate System. +.Sh END SYSTEM OPERATION +When an interface requests a mapping for an address not in the cache, +the +.Tn SNPA +of any known Intermediate System is returned. If an Intermediate +System is not known, then the +.Em all end systems +multicast address +is returned. It is assumed that the intended recipient of the NPDU will +immediately transmit a hello +.Tn PDU +back to the originator of the +.Tn NPDU . +.Pp +If an +.Tn NPDU +is forwarded by the End System, a redirect +.Tn PDU +will not be +generated. +However, redirect +.Tn PDU Ns s +received will be processed. This processing +consists of adding an entry in the routing table. If the +redirect is towards an Intermediate System, then an entry is made in the +routing table as well. +The entry in the routing table will mark the +.Tn NSAP +address contained in the redirect +.Tn PDU +as the gateway for the destination +system (if an NET is supplied), or will create a route with +the NSAP address as the +destination and the +.Tn SNPA +address (embodied as a link-level sockaddr) as the +gateway. +.Pp +If the System is configured as an End System, it will report all the +.Tn NSAP Ns s +that have been configured using the ifconfig command, and no others. +It is possible to have more than one +.Tn NSAP +assigned to a given interface, +and it is also possible to have the same +.Tn NSAP +assigned to multiple +interfaces. +However, any +.Tn NSAP +containing an NSEL that is consistent with the +nsellength option (default one) of any interface will be accepted as +an +.Tn NSAP +for this System. +.Sh INTERMEDIATE SYSTEM OPERATION +When an interface requests a mapping for an address not in the routing table, +an error is returned. +.Pp +When an +.Tn NPDU +is forwarded out on the same interface that the +.Tn NPDU +arrived upon, +a redirect +.Tn PDU +is generated. +.Sh MANUAL ROUTING TABLE MODIFICATION +.Pp +To facilitate communications with systems which do not use +.Nm ES-IS, +one may add a route whose destination is a sockaddr_iso containing +the +.Tn NSAP +in question, and the gateway being a link-level sockaddr, +either by writing a special purpose program, or using the +.Xr route 8 +command e.g.: +.Bd -literal +route add -iface -osi 49.0.4.8.0.2b.b.83.bf \ + -link qe0:8.0.2b.b.83.bf +.Ed +.Pp +If the +System is configured as an End System and has a single network interface +which does not support multicast reception, +it is necessary to manually configure the location of an +.Tn IS , +using the route command in a similar way. +There, the destination address should be +.Dq default +(spelled +out literally as 7 +.Tn ASCII +characters), and the gateway should be +once again be a link-level sockaddr specifying the +.Tn SNPA +of the +.Tn IS . +.Sh SEE ALSO +.Xr un 4 , +.Xr iso 4 , +.Xr route 8 , +.Xr ifconfig 8 +.Rs +.%T "End system to Intermediate system routing exchange protocol for use in conjunction with the Protocol for providing the connectionless-mode network service" +.%R ISO +.%N 9542 +.Re +.Sh BUGS +Redirect +.Tn PDU Ns s +do not contain options from the forwarded +.Tn NPDU +which generated +the redirect. The multicast address used on the 802.3 network is taken from +the +.Tn NBS +December 1987 agreements. This multicast address is not compatible +with the 802.5 (Token Ring) multicast addresses format. Therefore, broadcast +addresses are used on the 802.5 subnetwork. +Researchers at the University of Wisconsin are constructing an implementation +of the +.Tn IS-IS +routing protocol. diff --git a/share/man/man4/fd.4 b/share/man/man4/fd.4 new file mode 100644 index 0000000..96ddcb0 --- /dev/null +++ b/share/man/man4/fd.4 @@ -0,0 +1,91 @@ +.\" Copyright (c) 1990, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)fd.4 8.1 (Berkeley) 6/9/93 +.\" +.Dd June 9, 1993 +.Dt FD 4 +.Os +.Sh NAME +.Nm fd , +.Nm stdin , +.Nm stdout , +.Nm stderr +.Nd file descriptor files +.Sh DESCRIPTION +The files +.Pa /dev/fd/0 +through +.Pa /dev/fd/# +refer to file descriptors which can be accessed through the file +system. +If the file descriptor is open and the mode the file is being opened +with is a subset of the mode of the existing descriptor, the call: +.Bd -literal -offset indent +fd = open("/dev/fd/0", mode); +.Ed +.Pp +and the call: +.Bd -literal -offset indent +fd = fcntl(0, F_DUPFD, 0); +.Ed +.Pp +are equivalent. +.Pp +Opening the files +.Pa /dev/stdin , +.Pa /dev/stdout +and +.Pa /dev/stderr +is equivalent to the following calls: +.Bd -literal -offset indent +fd = fcntl(STDIN_FILENO, F_DUPFD, 0); +fd = fcntl(STDOUT_FILENO, F_DUPFD, 0); +fd = fcntl(STDERR_FILENO, F_DUPFD, 0); +.Ed +.Pp +Flags to the +.Xr open 2 +call other than +.Dv O_RDONLY , +.Dv O_WRONLY +and +.Dv O_RDWR +are ignored. +.Sh FILES +.Bl -tag -width /dev/stderr -compact +.It Pa /dev/fd/# +.It Pa /dev/stdin +.It Pa /dev/stdout +.It Pa /dev/stderr +.El +.Sh SEE ALSO +.Xr tty 4 diff --git a/share/man/man4/icmp.4 b/share/man/man4/icmp.4 new file mode 100644 index 0000000..d87772f --- /dev/null +++ b/share/man/man4/icmp.4 @@ -0,0 +1,117 @@ +.\" Copyright (c) 1986, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)icmp.4 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt ICMP 4 +.Os BSD 4.3 +.Sh NAME +.Nm icmp +.Nd Internet Control Message Protocol +.Sh SYNOPSIS +.Fd #include <sys/socket.h> +.Fd #include <netinet/in.h> +.Ft int +.Fn socket AF_INET SOCK_RAW proto +.Sh DESCRIPTION +.Tn ICMP +is the error and control message protocol used +by +.Tn IP +and the Internet protocol family. It may be accessed +through a +.Dq raw socket +for network monitoring +and diagnostic functions. +The +.Fa proto +parameter to the socket call to create an +.Tn ICMP +socket +is obtained from +.Xr getprotobyname 3 . +.Tn ICMP +sockets are connectionless, +and are normally used with the +.Xr sendto +and +.Xr recvfrom +calls, though the +.Xr connect 2 +call may also be used to fix the destination for future +packets (in which case the +.Xr read 2 +or +.Xr recv 2 +and +.Xr write 2 +or +.Xr send 2 +system calls may be used). +.Pp +Outgoing packets automatically have an +.Tn IP +header prepended to +them (based on the destination address). +Incoming packets are received with the +.Tn IP +header and options intact. +.Sh DIAGNOSTICS +A socket operation may fail with one of the following errors returned: +.Bl -tag -width [EADDRNOTAVAIL] +.It Bq Er EISCONN +when trying to establish a connection on a socket which +already has one, or when trying to send a datagram with the destination +address specified and the socket is already connected; +.It Bq Er ENOTCONN +when trying to send a datagram, but +no destination address is specified, and the socket hasn't been +connected; +.It Bq Er ENOBUFS +when the system runs out of memory for +an internal data structure; +.It Bq Er EADDRNOTAVAIL +when an attempt is made to create a +socket with a network address for which no network interface +exists. +.El +.Sh SEE ALSO +.Xr send 2 , +.Xr recv 2 , +.Xr intro 4 , +.Xr inet 4 , +.Xr ip 4 +.Sh HISTORY +The +.Nm +protocol appeared in +.Bx 4.3 . diff --git a/share/man/man4/idp.4 b/share/man/man4/idp.4 new file mode 100644 index 0000000..38a6f6a --- /dev/null +++ b/share/man/man4/idp.4 @@ -0,0 +1,185 @@ +.\" Copyright (c) 1985, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)idp.4 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt IDP 4 +.Os BSD 4.3 +.Sh NAME +.Nm idp +.Nd Xerox Internet Datagram Protocol +.Sh SYNOPSIS +.Fd #include <sys/socket.h> +.Fd #include <netns/ns.h> +.Fd #include <netns/idp.h> +.Ft int +.Fn socket AF_NS SOCK_DGRAM 0 +.Sh DESCRIPTION +.Tn IDP +is a simple, unreliable datagram protocol which is used +to support the +.Dv SOCK_DGRAM +abstraction for the Internet +protocol family. +.Tn IDP +sockets are connectionless, and are +normally used with the +.Xr sendto +and +.Xr recvfrom +calls, though the +.Xr connect 2 +call may also be used to fix the destination for future +packets (in which case the +.Xr recv 2 +or +.Xr read 2 +and +.Xr send 2 +or +.Xr write 2 +system calls may be used). +.Pp +Xerox protocols are built vertically on top of +.Tn IDP . +Thus, +.Tn IDP +address formats are identical to those used by +.Tn SPP . +Note that the +.Tn IDP +port +space is the same as the +.Tn SPP +port space (i.e. a +.Tn IDP +port +may be +.Dq connected +to a +.Tn SPP +port, with certain +options enabled below). +In addition broadcast packets may be sent +(assuming the underlying network supports +this) by using a reserved +.Dq broadcast address ; +this address +is network interface dependent. +.Sh DIAGNOSTICS +A socket operation may fail with one of the following errors returned: +.Bl -tag -width [EADDRNOTAVAIL] +.It Bq Er EISCONN +when trying to establish a connection on a socket which +already has one, or when trying to send a datagram with the destination +address specified and the socket is already connected; +.It Bq Er ENOTCONN +when trying to send a datagram, but +no destination address is specified, and the socket hasn't been +connected; +.It Bq Er ENOBUFS +when the system runs out of memory for +an internal data structure; +.It Bq Er EADDRINUSE +when an attempt +is made to create a socket with a port which has already been +allocated; +.It Bq Er EADDRNOTAVAIL +when an attempt is made to create a +socket with a network address for which no network interface +exists. +.El +.Sh SOCKET OPTIONS +.Bl -tag -width [SO_HEADERS_ON_OUTPUT] +.It Bq Dv SO_ALL_PACKETS +When set, this option defeats automatic processing of Error packets, +and Sequence Protocol packets. +.It Bq Dv SO_DEFAULT_HEADERS +The user provides the kernel an +.Tn IDP +header, from which +it gleans the Packet Type. +When requested, the kernel will provide an +.Tn IDP +header, showing +the default packet type, and local and foreign addresses, if +connected. +.It Bq Dv SO_HEADERS_ON_INPUT +When set, the first 30 bytes of any data returned from a read +or recv from will be the initial 30 bytes of the +.Tn IDP +packet, +as described by +.Bd -literal -offset indent +struct idp { + u_short idp_sum; + u_short idp_len; + u_char idp_tc; + u_char idp_pt; + struct ns_addr idp_dna; + struct ns_addr idp_sna; +}; +.Ed +.Pp +This allows the user to determine the packet type, and whether +the packet was a multi-cast packet or directed specifically at +the local host. +When requested, gives the current state of the option, +.Pf ( Dv NSP_RAWIN +or 0). +.It Bq Dv SO_HEADERS_ON_OUTPUT +When set, the first 30 bytes of any data sent +will be the initial 30 bytes of the +.Tn IDP +packet. +This allows the user to determine the packet type, and whether +the packet should be multi-cast packet or directed specifically at +the local host. +You can also misrepresent the sender of the packet. +When requested, gives the current state of the option. +.Pf ( Dv NSP_RAWOUT +or 0). +.It Bq Dv SO_SEQNO +When requested, this returns a sequence number which is not likely +to be repeated until the machine crashes or a very long time has passed. +It is useful in constructing Packet Exchange Protocol packets. +.El +.Sh SEE ALSO +.Xr send 2 , +.Xr recv 2 , +.Xr intro 4 , +.Xr ns 4 +.Sh HISTORY +The +.Nm +protocol appeared in +.Bx 4.3 . diff --git a/share/man/man4/inet.4 b/share/man/man4/inet.4 new file mode 100644 index 0000000..690bfca --- /dev/null +++ b/share/man/man4/inet.4 @@ -0,0 +1,182 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)inet.4 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt INET 4 +.Os BSD 4.2 +.Sh NAME +.Nm inet +.Nd Internet protocol family +.Sh SYNOPSIS +.Fd #include <sys/types.h> +.Fd #include <netinet/in.h> +.Sh DESCRIPTION +The Internet protocol family is a collection of protocols +layered atop the +.Em Internet Protocol +.Pq Tn IP +transport layer, and utilizing the Internet address format. +The Internet family provides protocol support for the +.Dv SOCK_STREAM , SOCK_DGRAM , +and +.Dv SOCK_RAW +socket types; the +.Dv SOCK_RAW +interface provides access to the +.Tn IP +protocol. +.Sh ADDRESSING +Internet addresses are four byte quantities, stored in +network standard format (on the +.Tn VAX +these are word and byte +reversed). The include file +.Aq Pa netinet/in.h +defines this address +as a discriminated union. +.Pp +Sockets bound to the Internet protocol family utilize +the following addressing structure, +.Bd -literal -offset indent +struct sockaddr_in { + short sin_family; + u_short sin_port; + struct in_addr sin_addr; + char sin_zero[8]; +}; +.Ed +.Pp +Sockets may be created with the local address +.Dv INADDR_ANY +to effect +.Dq wildcard +matching on incoming messages. +The address in a +.Xr connect 2 +or +.Xr sendto 2 +call may be given as +.Dv INADDR_ANY +to mean +.Dq this host . +The distinguished address +.Dv INADDR_BROADCAST +is allowed as a shorthand for the broadcast address on the primary +network if the first network configured supports broadcast. +.Sh PROTOCOLS +The Internet protocol family is comprised of +the +.Tn IP +transport protocol, Internet Control +Message Protocol +.Pq Tn ICMP , +Transmission Control +Protocol +.Pq Tn TCP , +and User Datagram Protocol +.Pq Tn UDP . +.Tn TCP +is used to support the +.Dv SOCK_STREAM +abstraction while +.Tn UDP +is used to support the +.Dv SOCK_DGRAM +abstraction. A raw interface to +.Tn IP +is available +by creating an Internet socket of type +.Dv SOCK_RAW . +The +.Tn ICMP +message protocol is accessible from a raw socket. +.Pp +The 32-bit Internet address contains both network and host parts. +It is frequency-encoded; the most-significant bit is clear +in Class A addresses, in which the high-order 8 bits are the network +number. +Class B addresses use the high-order 16 bits as the network field, +and Class C addresses have a 24-bit network part. +Sites with a cluster of local networks and a connection to the +Internet may chose to use a single network number for the cluster; +this is done by using subnet addressing. +The local (host) portion of the address is further subdivided +into subnet and host parts. +Within a subnet, each subnet appears to be an individual network; +externally, the entire cluster appears to be a single, uniform +network requiring only a single routing entry. +Subnet addressing is enabled and examined by the following +.Xr ioctl 2 +commands on a datagram socket in the Internet domain; +they have the same form as the +.Dv SIOCIFADDR +command (see +.Xr intro 4 ) . +.Pp +.Bl -tag -width SIOCSIFNETMASK +.It Dv SIOCSIFNETMASK +Set interface network mask. +The network mask defines the network part of the address; +if it contains more of the address than the address type would indicate, +then subnets are in use. +.It Dv SIOCGIFNETMASK +Get interface network mask. +.El +.Sh SEE ALSO +.Xr ioctl 2 , +.Xr socket 2 , +.Xr intro 4 , +.Xr tcp 4 , +.Xr udp 4 , +.Xr ip 4 , +.Xr icmp 4 +.Rs +.%T "An Introductory 4.3 BSD Interprocess Communication Tutorial" +.%B PS1 +.%N 7 +.Re +.Rs +.%T "An Advanced 4.3 BSD Interprocess Communication Tutorial" +.%B PS1 +.%N 8 +.Re +.Sh CAVEAT +The Internet protocol support is subject to change as +the Internet protocols develop. Users should not depend +on details of the current implementation, but rather +the services exported. +.Sh HISTORY +The +.Nm +protocol interface appeared in +.Bx 4.2 . diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4 new file mode 100644 index 0000000..0f95c4b --- /dev/null +++ b/share/man/man4/ip.4 @@ -0,0 +1,378 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)ip.4 8.2 (Berkeley) 11/30/93 +.\" +.Dd November 30, 1993 +.Dt IP 4 +.Os BSD 4.2 +.Sh NAME +.Nm ip +.Nd Internet Protocol +.Sh SYNOPSIS +.Fd #include <sys/socket.h> +.Fd #include <netinet/in.h> +.Ft int +.Fn socket AF_INET SOCK_RAW proto +.Sh DESCRIPTION +.Tn IP +is the transport layer protocol used +by the Internet protocol family. +Options may be set at the +.Tn IP +level +when using higher-level protocols that are based on +.Tn IP +(such as +.Tn TCP +and +.Tn UDP ) . +It may also be accessed +through a +.Dq raw socket +when developing new protocols, or +special-purpose applications. +.Pp +There are several +.Tn IP-level +.Xr setsockopt 2 / Ns +.Xr getsockopt 2 +options. +.Dv IP_OPTIONS +may be used to provide +.Tn IP +options to be transmitted in the +.Tn IP +header of each outgoing packet +or to examine the header options on incoming packets. +.Tn IP +options may be used with any socket type in the Internet family. +The format of +.Tn IP +options to be sent is that specified by the +.Tn IP +protocol specification (RFC-791), with one exception: +the list of addresses for Source Route options must include the first-hop +gateway at the beginning of the list of gateways. +The first-hop gateway address will be extracted from the option list +and the size adjusted accordingly before use. +To disable previously specified options, +use a zero-length buffer: +.Bd -literal +setsockopt(s, IPPROTO_IP, IP_OPTIONS, NULL, 0); +.Ed +.Pp +.Dv IP_TOS +and +.Dv IP_TTL +may be used to set the type-of-service and time-to-live +fields in the +.Tn IP +header for +.Dv SOCK_STREAM +and +.Dv SOCK_DGRAM +sockets. For example, +.Bd -literal +int tos = IPTOS_LOWDELAY; /* see <netinet/in.h> */ +setsockopt(s, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)); + +int ttl = 60; /* max = 255 */ +setsockopt(s, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); +.Ed +.Pp +If the +.Dv IP_RECVDSTADDR +option is enabled on a +.Dv SOCK_DGRAM +socket, +the +.Xr recvmsg +call will return the destination +.Tn IP +address for a +.Tn UDP +datagram. +The msg_control field in the msghdr structure points to a buffer +that contains a cmsghdr structure followed by the +.Tn IP +address. +The cmsghdr fields have the following values: +.Bd -literal +cmsg_len = sizeof(struct in_addr) +cmsg_level = IPPROTO_IP +cmsg_type = IP_RECVDSTADDR +.Ed +.Ss "Multicast Options" +.Pp +.Tn IP +multicasting is supported only on +.Dv AF_INET +sockets of type +.Dv SOCK_DGRAM +and +.Dv SOCK_RAW, +and only on networks where the interface +driver supports multicasting. +.Pp +The +.Dv IP_MULTICAST_TTL +option changes the time-to-live (TTL) +for outgoing multicast datagrams +in order to control the scope of the multicasts: +.Bd -literal +u_char ttl; /* range: 0 to 255, default = 1 */ +setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)); +.Ed +.sp +Datagrams with a TTL of 1 are not forwarded beyond the local network. +Multicast datagrams with a TTL of 0 will not be transmitted on any network, +but may be delivered locally if the sending host belongs to the destination +group and if multicast loopback has not been disabled on the sending socket +(see below). Multicast datagrams with TTL greater than 1 may be forwarded +to other networks if a multicast router is attached to the local network. +.Pp +For hosts with multiple interfaces, each multicast transmission is +sent from the primary network interface. +The +.Dv IP_MULTICAST_IF +option overrides the default for +subsequent transmissions from a given socket: +.Bd -literal +struct in_addr addr; +setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &addr, sizeof(addr)); +.Ed +.sp +where "addr" is the local +.Tn IP +address of the desired interface or +.Dv INADDR_ANY +to specify the default interface. +An interface's local IP address and multicast capability can +be obtained via the +.Dv SIOCGIFCONF +and +.Dv SIOCGIFFLAGS +ioctls. +Normal applications should not need to use this option. +.Pp +If a multicast datagram is sent to a group to which the sending host itself +belongs (on the outgoing interface), a copy of the datagram is, by default, +looped back by the IP layer for local delivery. +The +.Dv IP_MULTICAST_LOOP +option gives the sender explicit control +over whether or not subsequent datagrams are looped back: +.Bd -literal +u_char loop; /* 0 = disable, 1 = enable (default) */ +setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)); +.Ed +.sp +This option +improves performance for applications that may have no more than one +instance on a single host (such as a router demon), by eliminating +the overhead of receiving their own transmissions. It should generally not +be used by applications for which there may be more than one instance on a +single host (such as a conferencing program) or for which the sender does +not belong to the destination group (such as a time querying program). +.Pp +A multicast datagram sent with an initial TTL greater than 1 may be delivered +to the sending host on a different interface from that on which it was sent, +if the host belongs to the destination group on that other interface. The +loopback control option has no effect on such delivery. +.Pp +A host must become a member of a multicast group before it can receive +datagrams sent to the group. To join a multicast group, use the +.Dv IP_ADD_MEMBERSHIP +option: +.Bd -literal +struct ip_mreq mreq; +setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); +.Ed +.sp +where +.Fa mreq +is the following structure: +.Bd -literal +struct ip_mreq { + struct in_addr imr_multiaddr; /* multicast group to join */ + struct in_addr imr_interface; /* interface to join on */ +} +.Ed +.sp +.Dv imr_interface +should +be +.Dv INADDR_ANY +to choose the default multicast interface, +or the +.Tn IP +address of a particular multicast-capable interface if +the host is multihomed. +Membership is associated with a single interface; +programs running on multihomed hosts may need to +join the same group on more than one interface. +Up to +.Dv IP_MAX_MEMBERSHIPS +(currently 20) memberships may be added on a +single socket. +.Pp +To drop a membership, use: +.Bd -literal +struct ip_mreq mreq; +setsockopt(s, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq)); +.Ed +.sp +where +.Fa mreq +contains the same values as used to add the membership. +Memberships are dropped when the socket is closed or the process exits. +.\"----------------------- +.Ss "Raw IP Sockets" +.Pp +Raw +.Tn IP +sockets are connectionless, +and are normally used with the +.Xr sendto +and +.Xr recvfrom +calls, though the +.Xr connect 2 +call may also be used to fix the destination for future +packets (in which case the +.Xr read 2 +or +.Xr recv 2 +and +.Xr write 2 +or +.Xr send 2 +system calls may be used). +.Pp +If +.Fa proto +is 0, the default protocol +.Dv IPPROTO_RAW +is used for outgoing +packets, and only incoming packets destined for that protocol +are received. +If +.Fa proto +is non-zero, that protocol number will be used on outgoing packets +and to filter incoming packets. +.Pp +Outgoing packets automatically have an +.Tn IP +header prepended to +them (based on the destination address and the protocol +number the socket is created with), +unless the +.Dv IP_HDRINCL +option has been set. +Incoming packets are received with +.Tn IP +header and options intact. +.Pp +.Dv IP_HDRINCL +indicates the complete IP header is included with the data +and may be used only with the +.Dv SOCK_RAW +type. +.Bd -literal +#include <netinet/ip.h> + +int hincl = 1; /* 1 = on, 0 = off */ +setsockopt(s, IPPROTO_IP, IP_HDRINCL, &hincl, sizeof(hincl)); +.Ed +.sp +Unlike previous +.Tn BSD +releases, the program must set all +the fields of the IP header, including the following: +.Bd -literal +ip->ip_v = IPVERSION; +ip->ip_hl = hlen >> 2; +ip->ip_id = 0; /* 0 means kernel set appropriate value */ +ip->ip_off = offset; +.Ed +.sp .5 +If the header source address is set to +.Dv INADDR_ANY, +the kernel will choose an appropriate address. +.Sh DIAGNOSTICS +A socket operation may fail with one of the following errors returned: +.Bl -tag -width [EADDRNOTAVAIL] +.It Bq Er EISCONN +when trying to establish a connection on a socket which +already has one, or when trying to send a datagram with the destination +address specified and the socket is already connected; +.It Bq Er ENOTCONN +when trying to send a datagram, but +no destination address is specified, and the socket hasn't been +connected; +.It Bq Er ENOBUFS +when the system runs out of memory for +an internal data structure; +.It Bq Er EADDRNOTAVAIL +when an attempt is made to create a +socket with a network address for which no network interface +exists. +.It Bq Er EACESS +when an attempt is made to create +a raw IP socket by a non-privileged process. +.El +.Pp +The following errors specific to +.Tn IP +may occur when setting or getting +.Tn IP +options: +.Bl -tag -width EADDRNOTAVAILxx +.It Bq Er EINVAL +An unknown socket option name was given. +.It Bq Er EINVAL +The IP option field was improperly formed; +an option field was shorter than the minimum value +or longer than the option buffer provided. +.El +.Sh SEE ALSO +.Xr getsockopt 2 , +.Xr send 2 , +.Xr recv 2 , +.Xr intro 4 , +.Xr icmp 4 , +.Xr inet 4 +.Sh HISTORY +The +.Nm +protocol appeared in +.Bx 4.2 . diff --git a/share/man/man4/iso.4 b/share/man/man4/iso.4 new file mode 100644 index 0000000..c15e34c --- /dev/null +++ b/share/man/man4/iso.4 @@ -0,0 +1,186 @@ +.\" Copyright (c) 1990, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)iso.4 8.2 (Berkeley) 11/30/93 +.\" +.Dd November 30, 1993 +.Dt ISO 4 +.Os +.Sh NAME +.Nm iso +.Nd +.Tn ISO +protocol family +.Sh SYNOPSIS +.Fd #include <sys/types.h> +.Fd #include <netiso/iso.h> +.Sh DESCRIPTION +The +.Tn ISO +protocol family is a collection of protocols +that uses the +.Tn ISO +address format. +The +.Tn ISO +family provides protocol support for the +.Dv SOCK_SEQPACKET +abstraction through the +.Tn TP +protocol +.Pf ( Tn ISO +8073), +for the +.Dv SOCK_DGRAM +abstraction through the connectionless transport +protocol +.Pf ( Tn ISO +8602), +and for the +.Dv SOCK_RAW +abstraction +by providing direct access (for debugging) to the +.Tn CLNP +.Pf ( Tn ISO +8473) network layer protocol. +.Sh ADDRESSING +.Tn ISO +addresses are based upon +.Tn ISO +8348/AD2, +.%T "Addendum to the Network Service Definition Covering Network Layer Addressing." +.Pp +Sockets bound to the OSI protocol family use +the following address structure: +.Bd -literal +struct iso_addr { + u_char isoa_len; /* length, not including this byte */ + char isoa_genaddr[20]; /* general opaque address */ +}; + +struct sockaddr_iso { + u_char siso_len; /* size of this sockaddr */ + u_char siso_family; /* addressing domain, AF_ISO */ + u_char siso_plen; /* presentation selector length */ + u_char siso_slen; /* session selector length */ + u_char siso_tlen; /* transport selector length */ + struct iso_addr siso_addr; /* network address */ + u_char siso_pad[6]; /* space for gosip v2 SELs */ +}; +#define siso_nlen siso_addr.isoa_len +#define siso_data siso_addr.isoa_genaddr +.Ed +.Pp +The fields of this structure are: +.Bl -tag -width Ds +.It Ar siso_len: +Length of the entire address structure, in bytes, which may grow to +be longer than the 32 bytes shown above. +.It Ar siso_family: +Identifies the domain: +.Dv AF_ISO . +.It Ar siso_tlen: +Length of the transport selector. +.It Ar siso_slen: +Length of the session selector. +This is not currently supported by the kernel and is provided as +a convenience for user level programs. +.It Ar siso_plen: +Length of the presentation selector. +This is not currently supported by the kernel and is provided as +a convenience for user level programs. +.It Ar siso_addr: +The network part of the address, described below. +.El +.Sh TRANSPORT ADDRESSING +.Pp +An +.Tn ISO +transport address is similar to an Internet address in that +it contains a network-address portion and a portion that the +transport layer uses to multiplex its services among clients. +In the Internet domain, this portion of the address is called a +.Em port . +In the +.Tn ISO +domain, this is called a +.Em transport selector +(also known at one time as a +.Em transport suffix ) . +While ports are always 16 bits, +transport selectors may be +of (almost) arbitrary size. +.Pp +Since the C language does not provide convenient variable +length structures, we have separated the selector lengths +from the data themselves. +The network address and various selectors are stored contiguously, +with the network address first, then the transport selector, and so +on. Thus, if you had a nework address of less then 20 bytes, +the transport selector would encroach on space normally reserved +for the network address. +.Pp +.Sh NETWORK ADDRESSING. +.Tn ISO +network addresses are limited to 20 bytes in length. +.Tn ISO +network addresses can take any format. +.Sh PROTOCOLS +The +.Tn ARGO +1.0 implementation of the +.Tn ISO +protocol family comprises +the Connectionless-Mode Network Protocol +.Pq Tn CLNP , +and the Transport Protocol +.Pq Tn TP , +classes 4 and 0, +and +.Tn X.25 . +.Tn TP +is used to support the +.Dv SOCK_SEQPACKET +abstraction. +A raw interface to +.Tn CLNP +is available +by creating an +.Tn ISO +socket of type +.Dv SOCK_RAW . +This is used for +.Tn CLNP +debugging only. +.Sh SEE ALSO +.Xr tp 4 , +.Xr clnp 4 , +.Xr cltp 4 diff --git a/share/man/man4/lo.4 b/share/man/man4/lo.4 new file mode 100644 index 0000000..7fe453b --- /dev/null +++ b/share/man/man4/lo.4 @@ -0,0 +1,81 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)lo.4 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt LO 4 +.Os BSD 4.2 +.Sh NAME +.Nm lo +.Nd software loopback network interface +.Sh SYNOPSIS +.Sy pseudo-device +.Nm loop +.Sh DESCRIPTION +The +.Nm loop +interface is a software loopback mechanism which may be +used for performance analysis, software testing, and/or local +communication. +As with other network interfaces, the loopback interface must have +network addresses assigned for each address family with which it is to be used. +These addresses +may be set or changed with the +.Dv SIOCSIFADDR +.Xr ioctl 2 . +The loopback interface should be the last interface configured, +as protocols may use the order of configuration as an indication of priority. +The loopback should +.Em never +be configured first unless no hardware +interfaces exist. +.Sh DIAGNOSTICS +.Bl -diag +.It lo%d: can't handle af%d. +The interface was handed +a message with addresses formatted in an unsuitable address +family; the packet was dropped. +.El +.Sh SEE ALSO +.Xr intro 4 , +.Xr inet 4 , +.Xr ns 4 +.Sh HISTORY +The +.Nm +device appeared in +.Bx 4.2 . +.Sh BUGS +Previous versions of the system enabled the loopback interface +automatically, using a nonstandard Internet address (127.1). +Use of that address is now discouraged; a reserved host address +for the local network should be used instead. diff --git a/share/man/man4/netintro.4 b/share/man/man4/netintro.4 new file mode 100644 index 0000000..897f189 --- /dev/null +++ b/share/man/man4/netintro.4 @@ -0,0 +1,328 @@ +.\" Copyright (c) 1983, 1990, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)netintro.4 8.2 (Berkeley) 11/30/93 +.\" +.Dd November 30, 1993 +.Dt NETINTRO 4 +.Os BSD 4.2 +.Sh NAME +.Nm networking +.Nd introduction to networking facilities +.Sh SYNOPSIS +.Fd #include <sys/socket.h> +.Fd #include <net/route.h> +.Fd #include <net/if.h> +.Sh DESCRIPTION +This section is a general introduction to the networking facilities +available in the system. +Documentation in this part of section +4 is broken up into three areas: +.Em protocol families +(domains), +.Em protocols , +and +.Em network interfaces . +.Pp +All network protocols are associated with a specific +.Em protocol family . +A protocol family provides basic services to the protocol +implementation to allow it to function within a specific +network environment. These services may include +packet fragmentation and reassembly, routing, addressing, and +basic transport. A protocol family may support multiple +methods of addressing, though the current protocol implementations +do not. A protocol family is normally comprised of a number +of protocols, one per +.Xr socket 2 +type. It is not required that a protocol family support +all socket types. A protocol family may contain multiple +protocols supporting the same socket abstraction. +.Pp +A protocol supports one of the socket abstractions detailed in +.Xr socket 2 . +A specific protocol may be accessed either by creating a +socket of the appropriate type and protocol family, or +by requesting the protocol explicitly when creating a socket. +Protocols normally accept only one type of address format, +usually determined by the addressing structure inherent in +the design of the protocol family/network architecture. +Certain semantics of the basic socket abstractions are +protocol specific. All protocols are expected to support +the basic model for their particular socket type, but may, +in addition, provide non-standard facilities or extensions +to a mechanism. For example, a protocol supporting the +.Dv SOCK_STREAM +abstraction may allow more than one byte of out-of-band +data to be transmitted per out-of-band message. +.Pp +A network interface is similar to a device interface. +Network interfaces comprise the lowest layer of the +networking subsystem, interacting with the actual transport +hardware. An interface may support one or more protocol +families and/or address formats. +The SYNOPSIS section of each network interface +entry gives a sample specification +of the related drivers for use in providing +a system description to the +.Xr config 8 +program. +The DIAGNOSTICS section lists messages which may appear on the console +and/or in the system error log, +.Pa /var/log/messages +(see +.Xr syslogd 8 ) , +due to errors in device operation. +.Sh PROTOCOLS +The system currently supports the +Internet +protocols, the Xerox Network Systems(tm) protocols, +and some of the +.Tn ISO OSI +protocols. +Raw socket interfaces are provided to the +.Tn IP +protocol +layer of the +Internet, and to the +.Tn IDP +protocol of Xerox +.Tn NS . +Consult the appropriate manual pages in this section for more +information regarding the support for each protocol family. +.Sh ADDRESSING +Associated with each protocol family is an address +format. All network address adhere to a general structure, +called a sockaddr, described below. However, each protocol +imposes finer and more specific structure, generally renaming +the variant, which is discussed in the protocol family manual +page alluded to above. +.Bd -literal -offset indent + struct sockaddr { + u_char sa_len; + u_char sa_family; + char sa_data[14]; +}; +.Ed +.Pp +The field +.Ar sa_len +contains the total length of the of the structure, +which may exceed 16 bytes. +The following address values for +.Ar sa_family +are known to the system +(and additional formats are defined for possible future implementation): +.Bd -literal +#define AF_UNIX 1 /* local to host (pipes, portals) */ +#define AF_INET 2 /* internetwork: UDP, TCP, etc. */ +#define AF_NS 6 /* Xerox NS protocols */ +#define AF_CCITT 10 /* CCITT protocols, X.25 etc */ +#define AF_HYLINK 15 /* NSC Hyperchannel */ +#define AF_ISO 18 /* ISO protocols */ +.Ed +.Sh ROUTING +.Tn UNIX +provides some packet routing facilities. +The kernel maintains a routing information database, which +is used in selecting the appropriate network interface when +transmitting packets. +.Pp +A user process (or possibly multiple co-operating processes) +maintains this database by sending messages over a special kind +of socket. +This supplants fixed size +.Xr ioctl 2 +used in earlier releases. +.Pp +This facility is described in +.Xr route 4 . +.Sh INTERFACES +Each network interface in a system corresponds to a +path through which messages may be sent and received. A network +interface usually has a hardware device associated with it, though +certain interfaces such as the loopback interface, +.Xr lo 4 , +do not. +.Pp +The following +.Xr ioctl +calls may be used to manipulate network interfaces. +The +.Xr ioctl +is made on a socket (typically of type +.Dv SOCK_DGRAM ) +in the desired domain. +Most of the requests supported in earlier releases +take an +.Ar ifreq +structure as its parameter. This structure has the form +.Bd -literal +struct ifreq { +#define IFNAMSIZ 16 + char ifr_name[IFNAMSIZE]; /* if name, e.g. "en0" */ + union { + struct sockaddr ifru_addr; + struct sockaddr ifru_dstaddr; + struct sockaddr ifru_broadaddr; + short ifru_flags; + int ifru_metric; + caddr_t ifru_data; + } ifr_ifru; +#define ifr_addr ifr_ifru.ifru_addr /* address */ +#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ +#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ +#define ifr_flags ifr_ifru.ifru_flags /* flags */ +#define ifr_metric ifr_ifru.ifru_metric /* metric */ +#define ifr_data ifr_ifru.ifru_data /* for use by interface */ +}; +.Ed +.Pp +Calls which are now deprecated are: +.Bl -tag -width SIOCGIFBRDADDR +.It Dv SIOCSIFADDR +Set interface address for protocol family. Following the address +assignment, the ``initialization'' routine for +the interface is called. +.It Dv SIOCSIFDSTADDR +Set point to point address for protocol family and interface. +.It Dv SIOCSIFBRDADDR +Set broadcast address for protocol family and interface. +.El +.Pp +.Xr Ioctl +requests to obtain addresses and requests both to set and +retrieve other data are still fully supported +and use the +.Ar ifreq +structure: +.Bl -tag -width SIOCGIFBRDADDR +.It Dv SIOCGIFADDR +Get interface address for protocol family. +.It Dv SIOCGIFDSTADDR +Get point to point address for protocol family and interface. +.It Dv SIOCGIFBRDADDR +Get broadcast address for protocol family and interface. +.It Dv SIOCSIFFLAGS +Set interface flags field. If the interface is marked down, +any processes currently routing packets through the interface +are notified; +some interfaces may be reset so that incoming packets are no longer received. +When marked up again, the interface is reinitialized. +.It Dv SIOCGIFFLAGS +Get interface flags. +.It Dv SIOCSIFMETRIC +Set interface routing metric. +The metric is used only by user-level routers. +.It Dv SIOCGIFMETRIC +Get interface metric. +.El +.Pp +There are two requests that make use of a new structure: +.Bl -tag -width SIOCGIFBRDADDR +.It Dv SIOCAIFADDR +An interface may have more than one address associated with it +in some protocols. This request provides a means to +add additional addresses (or modify characteristics of the +primary address if the default address for the address family +is specified). Rather than making separate calls to +set destination or broadcast addresses, or network masks +(now an integral feature of multiple protocols) +a separate structure is used to specify all three facets simultaneously +(see below). +One would use a slightly tailored version of this struct specific +to each family (replacing each sockaddr by one +of the family-specific type). +Where the sockaddr itself is larger than the +default size, one needs to modify the +.Xr ioctl +identifier itself to include the total size, as described in +.Xr ioctl . +.It Dv SIOCDIFADDR +This requests deletes the specified address from the list +associated with an interface. It also uses the +.Ar if_aliasreq +structure to allow for the possibility of protocols allowing +multiple masks or destination addresses, and also adopts the +convention that specification of the default address means +to delete the first address for the interface belonging to +the address family in which the original socket was opened. +.It Dv SIOCGIFCONF +Get interface configuration list. This request takes an +.Ar ifconf +structure (see below) as a value-result parameter. The +.Ar ifc_len +field should be initially set to the size of the buffer +pointed to by +.Ar ifc_buf . +On return it will contain the length, in bytes, of the +configuration list. +.El +.Bd -literal +/* +* Structure used in SIOCAIFCONF request. +*/ +struct ifaliasreq { + char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ + struct sockaddr ifra_addr; + struct sockaddr ifra_broadaddr; + struct sockaddr ifra_mask; +}; +.Ed +.Pp +.Bd -literal +/* +* Structure used in SIOCGIFCONF request. +* Used to retrieve interface configuration +* for machine (useful for programs which +* must know all networks accessible). +*/ +struct ifconf { + int ifc_len; /* size of associated buffer */ + union { + caddr_t ifcu_buf; + struct ifreq *ifcu_req; + } ifc_ifcu; +#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ +#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */ +}; +.Ed +.Sh SEE ALSO +.Xr socket 2 , +.Xr ioctl 2 , +.Xr intro 4 , +.Xr config 8 , +.Xr routed 8 +.Sh HISTORY +The +.Nm netintro +manual appeared in +.Bx 4.3 tahoe . diff --git a/share/man/man4/ns.4 b/share/man/man4/ns.4 new file mode 100644 index 0000000..18efeac --- /dev/null +++ b/share/man/man4/ns.4 @@ -0,0 +1,179 @@ +.\" Copyright (c) 1985, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)ns.4 8.2 (Berkeley) 11/30/93 +.\" +.Dd November 30, 1993 +.Dt NS 4 +.Os BSD 4.3 +.Sh NAME +.Nm ns +.Nd Xerox Network Systems(tm) protocol family +.Sh SYNOPSIS +.Nm options NS +.Nm options NSIP +.Nm pseudo-device ns +.Sh DESCRIPTION +The +.Tn NS +protocol family is a collection of protocols +layered atop the +.Em Internet Datagram Protocol +.Pq Tn IDP +transport layer, and using the Xerox +.Tn NS +address formats. +The +.Tn NS +family provides protocol support for the +.Dv SOCK_STREAM , SOCK_DGRAM , SOCK_SEQPACKET , +and +.Dv SOCK_RAW +socket types; the +.Dv SOCK_RAW +interface is a debugging tool, allowing you to trace all packets +entering, (or with toggling kernel variable, additionally leaving) the local +host. +.Sh ADDRESSING +.Tn NS +addresses are 12 byte quantities, consisting of a +4 byte Network number, a 6 byte Host number and a 2 byte port number, +all stored in network standard format. +(on the +.Tn VAX +these are word and byte reversed; on the +.Tn SUN +they are not +reversed). The include file +.Aq Pa netns/ns.h +defines the +.Tn NS +address as a structure containing unions (for quicker +comparisons). +.Pp +Sockets in the Internet protocol family use the following +addressing structure: +.Bd -literal -offset indent +struct sockaddr_ns { + short sns_family; + struct ns_addr sns_addr; + char sns_zero[2]; +}; +.Ed +.Pp +where an +.Ar ns_addr +is composed as follows: +.Bd -literal -offset indent +union ns_host { + u_char c_host[6]; + u_short s_host[3]; +}; + +union ns_net { + u_char c_net[4]; + u_short s_net[2]; +}; + +struct ns_addr { + union ns_net x_net; + union ns_host x_host; + u_short x_port; +}; +.Ed +.Pp +Sockets may be created with an address of all zeroes to effect +.Dq wildcard +matching on incoming messages. +The local port address specified in a +.Xr bind 2 +call is restricted to be greater than +.Dv NSPORT_RESERVED +(=3000, in +.Aq Pa netns/ns.h ) +unless the creating process is running +as the super-user, providing a space of protected port numbers. +.Sh PROTOCOLS +The +.Tn NS +protocol family supported by the operating system +is comprised of +the Internet Datagram Protocol +.Pq Tn IDP +.Xr idp 4 , +Error Protocol (available through +.Tn IDP ) , +and +Sequenced Packet Protocol +.Pq Tn SPP +.Xr spp 4 . +.Pp +.Tn SPP +is used to support the +.Dv SOCK_STREAM +and +.Dv SOCK_SEQPACKET +abstraction, +while +.Tn IDP +is used to support the +.Dv SOCK_DGRAM +abstraction. +The Error protocol is responded to by the kernel +to handle and report errors in protocol processing; +it is, however, +only accessible to user programs through heroic actions. +.Sh SEE ALSO +.Xr intro 3 , +.Xr byteorder 3 , +.Xr gethostbyname 3 , +.Xr getnetent 3 , +.Xr getprotoent 3 , +.Xr getservent 3 , +.Xr ns 3 , +.Xr intro 4 , +.Xr spp 4 , +.Xr idp 4 , +.Xr nsip 4 +.Rs +.%T "Internet Transport Protocols" +.%R Xerox Corporation document XSIS +.%N 028112 +.Re +.Rs +.%T "An Advanced 4.3 BSD Interprocess Communication Tutorial" +.Re +.Sh HISTORY +The +.Nm +protocol family +appeared in +.Bx 4.3 . diff --git a/share/man/man4/nsip.4 b/share/man/man4/nsip.4 new file mode 100644 index 0000000..6d71782 --- /dev/null +++ b/share/man/man4/nsip.4 @@ -0,0 +1,128 @@ +.\" Copyright (c) 1985, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)nsip.4 8.2 (Berkeley) 11/30/93 +.\" +.Dd November 30, 1993 +.Dt NSIP 4 +.Os BSD 4.3 +.Sh NAME +.Nm nsip +.Nd software network interface encapsulating NS packets in IP packets +.Sh SYNOPSIS +.Cd options NSIP +.Fd #include <netns/ns_if.h> +.Sh DESCRIPTION +The +.Nm nsip +interface is a software mechanism which may be +used to transmit Xerox +.Tn NS Ns (tm) +packets through otherwise uncooperative +networks. +It functions by prepending an +.Tn IP +header, and resubmitting the packet +through the +.Tn UNIX +.Tn IP +machinery. +.Pp +The super-user can advise the operating system of a willing partner +by naming an +.Tn IP +address to be associated with an +.Tn NS +address. +Presently, only specific hosts pairs are allowed, and for each host +pair, an artificial point-to-point interface is constructed. +At some future date, +.Tn IP +broadcast addresses or hosts may be paired +with +.Tn NS +networks or hosts. +.Pp +Specifically, a socket option of +.Dv SO_NSIP_ROUTE +is set on a socket +of family +.Dv AF_NS , +type +.Dv SOCK_DGRAM , +passing the following structure: +.Bd -literal +struct nsip_req { + struct sockaddr rq_ns; /* must be ns format destination */ + struct sockaddr rq_ip; /* must be ip format gateway */ + short rq_flags; +}; +.Ed +.Sh DIAGNOSTICS +.Bl -diag +.It nsip%d: can't handle af%d. +The interface was handed +a message with addresses formatted in an unsuitable address +family; the packet was dropped. +.El +.Sh SEE ALSO +.Xr intro 4 , +.Xr ns 4 +.Sh HISTORY +The +.Nm +interface appeared in +.Bx 4.3 . +.Sh BUGS +It is absurd to have a separate pseudo-device for each pt-to-pt +link. +There is no way to change the +.Tn IP +address for an +.Tn NS +host once the +encapsulation interface is set up. +The request should honor flags of +.Dv RTF_GATEWAY +to indicate +remote networks, and the absence of +.Dv RTF_UP +should be a clue +to remove that partner. +This was intended to postpone the necessity of rewriting reverse +.Tn ARP +for the +.Xr en 4 +device, and to allow passing +.Tn XNS +packets through an +Arpanet-Milnet gateway, to facilitate testing between some co-operating +universities. diff --git a/share/man/man4/null.4 b/share/man/man4/null.4 new file mode 100644 index 0000000..583e109 --- /dev/null +++ b/share/man/man4/null.4 @@ -0,0 +1,56 @@ +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)null.4 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt NULL 4 +.Os +.Sh NAME +.Nm null +.Nd the null device +.Sh DESCRIPTION +The +.Nm +device accepts and reads data as any ordinary (and willing) +file \- +but throws it away. The length of the +.Nm null +device is always zero. +.Sh FILES +.Bl -tag -width /dev/null +.It Pa /dev/null +.El +.Sh HISTORY +A +.Nm +device appeared in +.At v7 . diff --git a/share/man/man4/pty.4 b/share/man/man4/pty.4 new file mode 100644 index 0000000..dd982c3 --- /dev/null +++ b/share/man/man4/pty.4 @@ -0,0 +1,212 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)pty.4 8.2 (Berkeley) 11/30/93 +.\" +.Dd November 30, 1993 +.Dt PTY 4 +.Os BSD 4.2 +.Sh NAME +.Nm pty +.Nd pseudo terminal driver +.Sh SYNOPSIS +.Nm pseudo-device pty +.Op Ar count +.Sh DESCRIPTION +The +.Xr pty +driver provides support for a device-pair termed a +.Em pseudo terminal . +A pseudo terminal is a pair of character devices, a +.Em master +device and a +.Em slave +device. The slave device provides to a process +an interface identical +to that described in +.Xr tty 4 . +However, whereas all other devices which provide the +interface described in +.Xr tty 4 +have a hardware device of some sort behind them, the slave +device has, instead, another process manipulating +it through the master half of the pseudo terminal. +That is, anything written on the master device is +given to the slave device as input and anything written +on the slave device is presented as input on the master +device. +.Pp +In configuring, if an optional +.Ar count +is given in +the specification, that number of pseudo terminal pairs are configured; +the default count is 32. +.Pp +The following +.Xr ioctl 2 +calls apply only to pseudo terminals: +.Bl -tag -width TIOCREMOTE +.It Dv TIOCSTOP +Stops output to a terminal (e.g. like typing +.Ql ^S ) . +Takes +no parameter. +.It Dv TIOCSTART +Restarts output (stopped by +.Dv TIOCSTOP +or by typing +.Ql ^S ) . +Takes no parameter. +.It Dv TIOCPKT +Enable/disable +.Em packet +mode. Packet mode is enabled by specifying (by reference) +a nonzero parameter and disabled by specifying (by reference) +a zero parameter. When applied to the master side of a pseudo +terminal, each subsequent +.Xr read +from the terminal will return data written on the slave part of +the pseudo terminal preceded by a zero byte (symbolically +defined as +.Dv TIOCPKT_DATA ) , +or a single byte reflecting control +status information. In the latter case, the byte is an inclusive-or +of zero or more of the bits: +.Bl -tag -width TIOCPKT_FLUSHWRITE +.It Dv TIOCPKT_FLUSHREAD +whenever the read queue for the terminal is flushed. +.It Dv TIOCPKT_FLUSHWRITE +whenever the write queue for the terminal is flushed. +.It Dv TIOCPKT_STOP +whenever output to the terminal is stopped a la +.Ql ^S . +.It Dv TIOCPKT_START +whenever output to the terminal is restarted. +.It Dv TIOCPKT_DOSTOP +whenever +.Em t_stopc +is +.Ql ^S +and +.Em t_startc +is +.Ql ^Q . +.It Dv TIOCPKT_NOSTOP +whenever the start and stop characters are not +.Ql ^S/^Q . +.Pp +While this mode is in use, the presence of control status information +to be read from the master side may be detected by a +.Xr select 2 +for exceptional conditions. +.Pp +This mode is used by +.Xr rlogin 1 +and +.Xr rlogind 8 +to implement a remote-echoed, locally +.Ql ^S/^Q +flow-controlled +remote login with proper back-flushing of output; it can be +used by other similar programs. +.El +.It Dv TIOCUCNTL +Enable/disable a mode that allows a small number of simple user +.Xr ioctl +commands to be passed through the pseudo-terminal, +using a protocol similar to that of +.Dv TIOCPKT . +The +.Dv TIOCUCNTL +and +.Dv TIOCPKT +modes are mutually exclusive. +This mode is enabled from the master side of a pseudo terminal +by specifying (by reference) +a nonzero parameter and disabled by specifying (by reference) +a zero parameter. +Each subsequent +.Xr read +from the master side will return data written on the slave part of +the pseudo terminal preceded by a zero byte, +or a single byte reflecting a user control operation on the slave side. +A user control command consists of a special +.Xr ioctl +operation with no data; the command is given as +.Dv UIOCCMD Ns (n) , +where +.Ar n +is a number in the range 1-255. +The operation value +.Ar n +will be received as a single byte on the next +.Xr read +from the master side. +The +.Xr ioctl +.Dv UIOCCMD Ns (0) +is a no-op that may be used to probe for +the existence of this facility. +As with +.Dv TIOCPKT +mode, command operations may be detected with a +.Xr select +for exceptional conditions. +.It Dv TIOCREMOTE +A mode for the master half of a pseudo terminal, independent +of +.Dv TIOCPKT . +This mode causes input to the pseudo terminal +to be flow controlled and not input edited (regardless of the +terminal mode). Each write to the control terminal produces +a record boundary for the process reading the terminal. In +normal usage, a write of data is like the data typed as a line +on the terminal; a write of 0 bytes is like typing an end-of-file +character. +.Dv TIOCREMOTE +can be used when doing remote line +editing in a window manager, or whenever flow controlled input +is required. +.El +.Sh FILES +.Bl -tag -width /dev/tty[p-r][0-9a-f]x -compact +.It Pa /dev/pty[p-r][0-9a-f] +master pseudo terminals +.It Pa /dev/tty[p-r][0-9a-f] +slave pseudo terminals +.El +.Sh DIAGNOSTICS +None. +.Sh HISTORY +The +.Nm +driver appeared in +.Bx 4.2 . diff --git a/share/man/man4/route.4 b/share/man/man4/route.4 new file mode 100644 index 0000000..a5425ec --- /dev/null +++ b/share/man/man4/route.4 @@ -0,0 +1,270 @@ +.\" Copyright (c) 1990, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)route.4 8.6 (Berkeley) 4/19/94 +.\" +.Dd April 19, 1994 +.Dt ROUTE 4 +.Os +.Sh NAME +.Nm route +.Nd kernel packet forwarding database +.Sh SYNOPSIS +.Fd #include <sys/socket.h> +.Fd #include <net/if.h> +.Fd #include <net/route.h> +.Ft int +.Fn socket PF_ROUTE SOCK_RAW "int family" +.Sh DESCRIPTION +.Tn UNIX +provides some packet routing facilities. +The kernel maintains a routing information database, which +is used in selecting the appropriate network interface when +transmitting packets. +.Pp +A user process (or possibly multiple co-operating processes) +maintains this database by sending messages over a special kind +of socket. +This supplants fixed size +.Xr ioctl 2 Ns 's +used in earlier releases. +Routing table changes may only be carried out by the super user. +.Pp +The operating system may spontaneously emit routing messages in response +to external events, such as receipt of a re-direct, or failure to +locate a suitable route for a request. +The message types are described in greater detail below. +.Pp +Routing database entries come in two flavors: for a specific +host, or for all hosts on a generic subnetwork (as specified +by a bit mask and value under the mask. +The effect of wildcard or default route may be achieved by using +a mask of all zeros, and there may be hierarchical routes. +.Pp +When the system is booted and addresses are assigned +to the network interfaces, each protocol family +installs a routing table entry for each interface when it is ready for traffic. +Normally the protocol specifies the route +through each interface as a +.Dq direct +connection to the destination host +or network. If the route is direct, the transport layer of +a protocol family usually requests the packet be sent to the +same host specified in the packet. Otherwise, the interface +is requested to address the packet to the gateway listed in the routing entry +(i.e. the packet is forwarded). +.Pp +When routing a packet, +the kernel will attempt to find +the most specific route matching the destination. +(If there are two different mask and value-under-the-mask pairs +that match, the more specific is the one with more bits in the mask. +A route to a host is regarded as being supplied with a mask of +as many ones as there are bits in the destination). +If no entry is found, the destination is declared to be unreachable, +and a routing\-miss message is generated if there are any +listers on the routing control socket described below. +.Pp +A wildcard routing entry is specified with a zero +destination address value, and a mask of all zeroes. +Wildcard routes will be used +when the system fails to find other routes matching the +destination. The combination of wildcard +routes and routing redirects can provide an economical +mechanism for routing traffic. +.Pp +One opens the channel for passing routing control messages +by using the socket call shown in the synopsis above: +.Pp +The +.Fa family +parameter may be +.Dv AF_UNSPEC +which will provide +routing information for all address families, or can be restricted +to a specific address family by specifying which one is desired. +There can be more than one routing socket open per system. +.Pp +Messages are formed by a header followed by a small +number of sockadders (now variable length particularly +in the +.Tn ISO +case), interpreted by position, and delimited +by the new length entry in the sockaddr. +An example of a message with four addresses might be an +.Tn ISO +redirect: +Destination, Netmask, Gateway, and Author of the redirect. +The interpretation of which address are present is given by a +bit mask within the header, and the sequence is least significant +to most significant bit within the vector. +.Pp +Any messages sent to the kernel are returned, and copies are sent +to all interested listeners. The kernel will provide the process +id. for the sender, and the sender may use an additional sequence +field to distinguish between outstanding messages. However, +message replies may be lost when kernel buffers are exhausted. +.Pp +The kernel may reject certain messages, and will indicate this +by filling in the +.Ar rtm_errno +field. +The routing code returns +.Dv EEXIST +if +requested to duplicate an existing entry, +.Dv ESRCH +if +requested to delete a non-existent entry, +or +.Dv ENOBUFS +if insufficient resources were available +to install a new route. +In the current implementation, all routing process run locally, +and the values for +.Ar rtm_errno +are available through the normal +.Em errno +mechanism, even if the routing reply message is lost. +.Pp +A process may avoid the expense of reading replies to +its own messages by issuing a +.Xr setsockopt 2 +call indicating that the +.Dv SO_USELOOPBACK +option +at the +.Dv SOL_SOCKET +level is to be turned off. +A process may ignore all messages from the routing socket +by doing a +.Xr shutdown 2 +system call for further input. +.Pp +If a route is in use when it is deleted, +the routing entry will be marked down and removed from the routing table, +but the resources associated with it will not +be reclaimed until all references to it are released. +User processes can obtain information about the routing +entry to a specific destination by using a +.Dv RTM_GET +message, +or by reading the +.Pa /dev/kmem +device, or by issuing a +.Xr getkerninfo 2 +system call. +.Pp +Messages include: +.Bd -literal +#define RTM_ADD 0x1 /* Add Route */ +#define RTM_DELETE 0x2 /* Delete Route */ +#define RTM_CHANGE 0x3 /* Change Metrics, Flags, or Gateway */ +#define RTM_GET 0x4 /* Report Information */ +#define RTM_LOOSING 0x5 /* Kernel Suspects Partitioning */ +#define RTM_REDIRECT 0x6 /* Told to use different route */ +#define RTM_MISS 0x7 /* Lookup failed on this address */ +#define RTM_RESOLVE 0xb /* request to resolve dst to LL addr */ +.Ed +.Pp +A message header consists of: +.Bd -literal +struct rt_msghdr { + u_short rmt_msglen; /* to skip over non-understood messages */ + u_char rtm_version; /* future binary compatibility */ + u_char rtm_type; /* message type */ + u_short rmt_index; /* index for associated ifp */ + pid_t rmt_pid; /* identify sender */ + int rtm_addrs; /* bitmask identifying sockaddrs in msg */ + int rtm_seq; /* for sender to identify action */ + int rtm_errno; /* why failed */ + int rtm_flags; /* flags, incl kern & message, e.g. DONE */ + int rtm_use; /* from rtentry */ + u_long rtm_inits; /* which values we are initializing */ + struct rt_metrics rtm_rmx; /* metrics themselves */ +}; +.Ed +.Pp +where +.Bd -literal +struct rt_metrics { + u_long rmx_locks; /* Kernel must leave these values alone */ + u_long rmx_mtu; /* MTU for this path */ + u_long rmx_hopcount; /* max hops expected */ + u_long rmx_expire; /* lifetime for route, e.g. redirect */ + u_long rmx_recvpipe; /* inbound delay-bandwith product */ + u_long rmx_sendpipe; /* outbound delay-bandwith product */ + u_long rmx_ssthresh; /* outbound gateway buffer limit */ + u_long rmx_rtt; /* estimated round trip time */ + u_long rmx_rttvar; /* estimated rtt variance */ +}; +.Ed +.Pp +Flags include the values: +.Bd -literal +#define RTF_UP 0x1 /* route usable */ +#define RTF_GATEWAY 0x2 /* destination is a gateway */ +#define RTF_HOST 0x4 /* host entry (net otherwise) */ +#define RTF_REJECT 0x8 /* host or net unreachable */ +#define RTF_DYNAMIC 0x10 /* created dynamically (by redirect) */ +#define RTF_MODIFIED 0x20 /* modified dynamically (by redirect) */ +#define RTF_DONE 0x40 /* message confirmed */ +#define RTF_MASK 0x80 /* subnet mask present */ +#define RTF_CLONING 0x100 /* generate new routes on use */ +#define RTF_XRESOLVE 0x200 /* external daemon resolves name */ +#define RTF_LLINFO 0x400 /* generated by ARP or ESIS */ +#define RTF_STATIC 0x800 /* manually added */ +#define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */ +#define RTF_PROTO2 0x4000 /* protocol specific routing flag #1 */ +#define RTF_PROTO1 0x8000 /* protocol specific routing flag #2 */ +.Ed +.Pp +Specifiers for metric values in rmx_locks and rtm_inits are: +.Bd -literal +#define RTV_SSTHRESH 0x1 /* init or lock _ssthresh */ +#define RTV_RPIPE 0x2 /* init or lock _recvpipe */ +#define RTV_SPIPE 0x4 /* init or lock _sendpipe */ +#define RTV_HOPCOUNT 0x8 /* init or lock _hopcount */ +#define RTV_RTT 0x10 /* init or lock _rtt */ +#define RTV_RTTVAR 0x20 /* init or lock _rttvar */ +#define RTV_MTU 0x40 /* init or lock _mtu */ +.Ed +.Pp +Specifiers for which addresses are present in the messages are: +.Bd -literal +#define RTA_DST 0x1 /* destination sockaddr present */ +#define RTA_GATEWAY 0x2 /* gateway sockaddr present */ +#define RTA_NETMASK 0x4 /* netmask sockaddr present */ +#define RTA_GENMASK 0x8 /* cloning mask sockaddr present */ +#define RTA_IFP 0x10 /* interface name sockaddr present */ +#define RTA_IFA 0x20 /* interface addr sockaddr present */ +#define RTA_AUTHOR 0x40 /* sockaddr for author of redirect */ +.Ed diff --git a/share/man/man4/spp.4 b/share/man/man4/spp.4 new file mode 100644 index 0000000..d749e2e --- /dev/null +++ b/share/man/man4/spp.4 @@ -0,0 +1,191 @@ +.\" Copyright (c) 1985, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)spp.4 8.2 (Berkeley) 4/19/94 +.\" +.Dd April 19, 1994 +.Dt SPP 4 +.Os BSD 4.3 +.Sh NAME +.Nm spp +.Nd Xerox Sequenced Packet Protocol +.Sh SYNOPSIS +.Fd #include <sys/socket.h> +.Fd #include <netns/ns.h> +.Fd #include <netns/sp.h> +.Ft int +.Fn socket AF_NS SOCK_STREAM 0 +.Ft int +.Fn socket AF_NS SOCK_SEQPACKET 0 +.Sh DESCRIPTION +The +.Tn SPP +protocol provides reliable, flow-controlled, two-way +transmission of data. It is a byte-stream protocol used to +support the +.Dv SOCK_STREAM +abstraction. +.Tn SPP +uses the standard +.Tn NS Ns (tm) +address formats. +.Pp +Sockets utilizing the +.Tn SPP +protocol are either +.Dq active +or +.Dq passive . +Active sockets initiate connections to passive +sockets. By default +.Tn SPP +sockets are created active; to create a +passive socket the +.Xr listen 2 +system call must be used +after binding the socket with the +.Xr bind 2 +system call. Only +passive sockets may use the +.Xr accept 2 +call to accept incoming connections. Only active sockets may +use the +.Xr connect 2 +call to initiate connections. +.Pp +Passive sockets may +.Dq underspecify +their location to match +incoming connection requests from multiple networks. This +technique, termed +.Dq wildcard addressing , +allows a single +server to provide service to clients on multiple networks. +To create a socket which listens on all networks, the +.Tn NS +address of all zeroes must be bound. +The +.Tn SPP +port may still be specified +at this time; if the port is not specified the system will assign one. +Once a connection has been established the socket's address is +fixed by the peer entity's location. The address assigned the +socket is the address associated with the network interface +through which packets are being transmitted and received. Normally +this address corresponds to the peer entity's network. +.Pp +If the +.Dv SOCK_SEQPACKET +socket type is specified, +each packet received has the actual 12 byte sequenced packet header +left for the user to inspect: +.Bd -literal -offset indent +struct sphdr { + u_char sp_cc; /* connection control */ +#define SP_EM 0x10 /* end of message */ + u_char sp_dt; /* datastream type */ + u_short sp_sid; + u_short sp_did; + u_short sp_seq; + u_short sp_ack; + u_short sp_alo; +}; +.Ed +.Pp +This facilitates the implementation of higher level Xerox protocols +which make use of the data stream type field and the end of message bit. +Conversely, the user is required to supply a 12 byte header, +the only part of which inspected is the data stream type and end of message +fields. +.Pp +For either socket type, +packets received with the Attention bit sent are interpreted as +out of band data. Data sent with +.Dq send(..., ..., ..., Dv MSG_OOB ) +cause the attention bit to be set. +.Sh DIAGNOSTICS +A socket operation may fail with one of the following errors returned: +.Bl -tag -width [EADDRNOTAVAIL] +.It Bq Er EISCONN +when trying to establish a connection on a socket which +already has one; +.It Bq Er ENOBUFS +when the system runs out of memory for +an internal data structure; +.It Bq Er ETIMEDOUT +when a connection was dropped +due to excessive retransmissions; +.It Bq Er ECONNRESET +when the remote peer +forces the connection to be closed; +.It Bq Er ECONNREFUSED +when the remote +peer actively refuses connection establishment (usually because +no process is listening to the port); +.It Bq Er EADDRINUSE +when an attempt +is made to create a socket with a port which has already been +allocated; +.It Bq Er EADDRNOTAVAIL +when an attempt is made to create a +socket with a network address for which no network interface +exists. +.El +.Sh SOCKET OPTIONS +.Bl -tag -width SO_DEFAULT_HEADERS +.It Dv SO_DEFAULT_HEADERS +when set, this determines the data stream type and whether +the end of message bit is to be set on every ensuing packet. +.It Dv SO_MTU +This specifies the maximum amount of user data in a single packet. +The default is 576 bytes - sizeof(struct spidp). This quantity +affects windowing \- increasing it without increasing the amount +of buffering in the socket will lower the number of unread packets +accepted. Anything larger than the default will not be forwarded +by a bona fide +.Tn XEROX +product internetwork router. +The data argument for the setsockopt call must be +an unsigned short. +.El +.Sh SEE ALSO +.Xr intro 4 , +.Xr ns 4 +.Sh HISTORY +The +.Nm +protocol appeared in +.Bx 4.3 . +.Sh BUGS +There should be some way to reflect record boundaries in +a stream. +For stream mode, there should be an option to get the data stream type of +the record the user process is about to receive. diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 new file mode 100644 index 0000000..21f49d5 --- /dev/null +++ b/share/man/man4/tcp.4 @@ -0,0 +1,178 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)tcp.4 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt TCP 4 +.Os BSD 4.2 +.Sh NAME +.Nm tcp +.Nd Internet Transmission Control Protocol +.Sh SYNOPSIS +.Fd #include <sys/socket.h> +.Fd #include <netinet/in.h> +.Ft int +.Fn socket AF_INET SOCK_STREAM 0 +.Sh DESCRIPTION +The +.Tn TCP +protocol provides reliable, flow-controlled, two-way +transmission of data. It is a byte-stream protocol used to +support the +.Dv SOCK_STREAM +abstraction. TCP uses the standard +Internet address format and, in addition, provides a per-host +collection of +.Dq port addresses . +Thus, each address is composed +of an Internet address specifying the host and network, with +a specific +.Tn TCP +port on the host identifying the peer entity. +.Pp +Sockets utilizing the tcp protocol are either +.Dq active +or +.Dq passive . +Active sockets initiate connections to passive +sockets. By default +.Tn TCP +sockets are created active; to create a +passive socket the +.Xr listen 2 +system call must be used +after binding the socket with the +.Xr bind 2 +system call. Only +passive sockets may use the +.Xr accept 2 +call to accept incoming connections. Only active sockets may +use the +.Xr connect 2 +call to initiate connections. +.Pp +Passive sockets may +.Dq underspecify +their location to match +incoming connection requests from multiple networks. This +technique, termed +.Dq wildcard addressing , +allows a single +server to provide service to clients on multiple networks. +To create a socket which listens on all networks, the Internet +address +.Dv INADDR_ANY +must be bound. The +.Tn TCP +port may still be specified +at this time; if the port is not specified the system will assign one. +Once a connection has been established the socket's address is +fixed by the peer entity's location. The address assigned the +socket is the address associated with the network interface +through which packets are being transmitted and received. Normally +this address corresponds to the peer entity's network. +.Pp +.Tn TCP +supports one socket option which is set with +.Xr setsockopt 2 +and tested with +.Xr getsockopt 2 . +Under most circumstances, +.Tn TCP +sends data when it is presented; +when outstanding data has not yet been acknowledged, it gathers +small amounts of output to be sent in a single packet once +an acknowledgement is received. +For a small number of clients, such as window systems +that send a stream of mouse events which receive no replies, +this packetization may cause significant delays. +Therefore, +.Tn TCP +provides a boolean option, +.Dv TCP_NODELAY +(from +.Aq Pa netinet/tcp.h , +to defeat this algorithm. +The option level for the +.Xr setsockopt +call is the protocol number for +.Tn TCP , +available from +.Xr getprotobyname 3 . +.Pp +Options at the +.Tn IP +transport level may be used with +.Tn TCP ; +see +.Xr ip 4 . +Incoming connection requests that are source-routed are noted, +and the reverse source route is used in responding. +.Sh DIAGNOSTICS +A socket operation may fail with one of the following errors returned: +.Bl -tag -width [EADDRNOTAVAIL] +.It Bq Er EISCONN +when trying to establish a connection on a socket which +already has one; +.It Bq Er ENOBUFS +when the system runs out of memory for +an internal data structure; +.It Bq Er ETIMEDOUT +when a connection was dropped +due to excessive retransmissions; +.It Bq Er ECONNRESET +when the remote peer +forces the connection to be closed; +.It Bq Er ECONNREFUSED +when the remote +peer actively refuses connection establishment (usually because +no process is listening to the port); +.It Bq Er EADDRINUSE +when an attempt +is made to create a socket with a port which has already been +allocated; +.It Bq Er EADDRNOTAVAIL +when an attempt is made to create a +socket with a network address for which no network interface +exists. +.El +.Sh SEE ALSO +.Xr getsockopt 2 , +.Xr socket 2 , +.Xr intro 4 , +.Xr inet 4 , +.Xr ip 4 +.Sh HISTORY +The +.Nm +protocol stack appeared in +.Bx 4.2 . diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4 new file mode 100644 index 0000000..72e9710 --- /dev/null +++ b/share/man/man4/termios.4 @@ -0,0 +1,1411 @@ +.\" Copyright (c) 1991, 1992, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)termios.4 8.4 (Berkeley) 4/19/94 +.\" +.Dd April 19, 1994 +.Dt TERMIOS 4 +.Os BSD 4 +.Sh NAME +.Nm termios +.Nd general terminal line discipline +.Sh SYNOPSIS +.Fd #include <termios.h> +.Sh DESCRIPTION +This describes a general terminal line discipline that is +supported on tty asynchronous communication ports. +.Ss Opening a Terminal Device File +When a terminal file is opened, it normally causes the process to wait +until a connection is established. For most hardware, the presence +of a connection is indicated by the assertion of the hardware +.Dv CARRIER line. +If the termios structure associated with the terminal file has the +.Dv CLOCAL +flag set in the cflag, or if the +.Dv O_NONBLOCK +flag is set +in the +.Xr open 2 +call, then the open will succeed even without +a connection being present. +In practice, applications +seldom open these files; they are opened by special programs, such +as +.Xr getty 2 +or +.Xr rlogind 2 , +and become +an application's standard input, output, and error files. +.Ss Job Control in a Nutshell +Every process is associated with a particular process group and session. +The grouping is hierarchical: every member of a particular process group is a +member of the same session. This structuring is used in managing groups +of related processes for purposes of +.\" .Gw "job control" ; +.Em "job control" ; +that is, the +ability from the keyboard (or from program control) to simultaneously +stop or restart +a complex command (a command composed of one or more related +processes). The grouping into process groups allows delivering +of signals that stop or start the group as a whole, along with +arbitrating which process group has access to the single controlling +terminal. The grouping at a higher layer into sessions is to restrict +the job control related signals and system calls to within processes +resulting from a particular instance of a "login". Typically, a session +is created when a user logs in, and the login terminal is setup +to be the controlling terminal; all processes spawned from that +login shell are in the same session, and inherit the controlling +terminal. +A job control shell +operating interactively (that is, reading commands from a terminal) +normally groups related processes together by placing them into the +same process group. A set of processes in the same process group +is collectively referred to as a "job". When the foreground process +group of the terminal is the same as the process group of a particular +job, that job is said to be in the "foreground". When the process +group of the terminal is different than the process group of +a job (but is still the controlling terminal), that job is said +to be in the "background". Normally the +shell reads a command and starts the job that implements that +command. If the command is to be started in the foreground (typical), it +sets the process group of the terminal to the process group +of the started job, waits for the job to complete, and then +sets the process group of the terminal back to its own process +group (it puts itself into the foreground). If the job is to +be started in the background (as denoted by the shell operator "&"), +it never changes the process group of the terminal and doesn't +wait for the job to complete (that is, it immediately attempts to read the next +command). If the job is started in the foreground, the user may +type a key (usually +.Ql \&^Z ) +which generates the terminal stop signal +.Pq Dv SIGTSTP +and has the affect of stopping the entire job. +The shell will notice that the job stopped, and will resume running after +placing itself in the foreground. +The shell also has commands for placing stopped jobs in the background, +and for placing stopped or background jobs into the foreground. +.Ss Orphaned Process Groups +An orphaned process group is a process group that has no process +whose parent is in a different process group, yet is in the same +session. Conceptually it means a process group that doesn't have +a parent that could do anything if it were to be stopped. For example, +the initial login shell is typically in an orphaned process group. +Orphaned process groups are immune to keyboard generated stop +signals and job control signals resulting from reads or writes to the +controlling terminal. +.Ss The Controlling Terminal +A terminal may belong to a process as its controlling terminal. Each +process of a session that has a controlling terminal has the same +controlling terminal. A terminal may be the controlling terminal for at +most one session. The controlling terminal for a session is allocated by +the session leader by issuing the +.Dv TIOCSCTTY +ioctl. A controlling terminal +is never acquired by merely opening a terminal device file. +When a controlling terminal becomes +associated with a session, its foreground process group is set to +the process group of the session leader. +.Pp +The controlling terminal is inherited by a child process during a +.Xr fork 2 +function call. A process relinquishes its controlling terminal when it +creates a new session with the +.Xd setsid 2 +function; other processes +remaining in the old session that had this terminal as their controlling +terminal continue to have it. +A process does not relinquish its +controlling terminal simply by closing all of its file descriptors +associated with the controlling terminal if other processes continue to +have it open. +.Pp +When a controlling process terminates, the controlling terminal is +disassociated from the current session, allowing it to be acquired by a +new session leader. Subsequent access to the terminal by other processes +in the earlier session will be denied, with attempts to access the +terminal treated as if modem disconnect had been sensed. +.Ss Terminal Access Control +If a process is in the foreground process group of its controlling +terminal, read operations are allowed. +Any attempts by a process +in a background process group to read from its controlling terminal +causes a +.Dv SIGTTIN +signal to be sent to +the process's group +unless one of the +following special cases apply: If the reading process is ignoring or +blocking the +.Dv SIGTTIN signal, or if the process group of the reading +process is orphaned, the +.Xr read 2 +returns -1 with +.Va errno set to +.Er Dv EIO +and no +signal is sent. The default action of the +.Dv SIGTTIN +signal is to stop the +process to which it is sent. +.Pp +If a process is in the foreground process group of its controlling +terminal, write operations are allowed. +Attempts by a process in a background process group to write to its +controlling terminal will cause the process group to be sent a +.Dv SIGTTOU +signal unless one of the following special cases apply: If +.Dv TOSTOP +is not +set, or if +.Dv TOSTOP +is set and the process is ignoring or blocking the +.Dv SIGTTOU +signal, the process is allowed to write to the terminal and the +.Dv SIGTTOU +signal is not sent. If +.Dv TOSTOP +is set, and the process group of +the writing process is orphaned, and the writing process is not ignoring +or blocking +.Dv SIGTTOU , +the +.Xr write +returns -1 with +errno set to +.Er Dv EIO +and no signal is sent. +.Pp +Certain calls that set terminal parameters are treated in the same +fashion as write, except that +.Dv TOSTOP +is ignored; that is, the effect is +identical to that of terminal writes when +.Dv TOSTOP +is set. +.Ss Input Processing and Reading Data +A terminal device associated with a terminal device file may operate in +full-duplex mode, so that data may arrive even while output is occurring. +Each terminal device file has associated with it an input queue, into +which incoming data is stored by the system before being read by a +process. The system imposes a limit, +.Pf \&{ Dv MAX_INPUT Ns \&} , +on the number of +bytes that may be stored in the input queue. The behavior of the system +when this limit is exceeded depends on the setting of the +.Dv IMAXBEL +flag in the termios +.Fa c_iflag . +If this flag is set, the terminal +is sent an +.Tn ASCII +.Dv BEL +character each time a character is received +while the input queue is full. Otherwise, the input queue is flushed +upon receiving the character. +.Pp +Two general kinds of input processing are available, determined by +whether the terminal device file is in canonical mode or noncanonical +mode. Additionally, +input characters are processed according to the +.Fa c_iflag +and +.Fa c_lflag +fields. Such processing can include echoing, which +in general means transmitting input characters immediately back to the +terminal when they are received from the terminal. This is useful for +terminals that can operate in full-duplex mode. +.Pp +The manner in which data is provided to a process reading from a terminal +device file is dependent on whether the terminal device file is in +canonical or noncanonical mode. +.Pp +Another dependency is whether the +.Dv O_NONBLOCK +flag is set by +.Xr open() +or +.Xr fcntl() . +If the +.Dv O_NONBLOCK +flag is clear, then the read request is +blocked until data is available or a signal has been received. If the +.Dv O_NONBLOCK +flag is set, then the read request is completed, without +blocking, in one of three ways: +.Bl -enum -offset indent +.It +If there is enough data available to satisfy the entire request, +and the read completes successfully the number of +bytes read is returned. +.It +If there is not enough data available to satisfy the entire +request, and the read completes successfully, having read as +much data as possible, the number of bytes read is returned. +.It +If there is no data available, the read returns -1, with +errno set to +.Er EAGAIN . +.El +.Pp +When data is available depends on whether the input processing mode is +canonical or noncanonical. +.Ss Canonical Mode Input Processing +In canonical mode input processing, terminal input is processed in units +of lines. A line is delimited by a newline +.Ql \&\en +character, an end-of-file +.Pq Dv EOF +character, or an end-of-line +.Pq Dv EOL +character. See the +.Sx "Special Characters" +section for +more information on +.Dv EOF +and +.Dv EOL . +This means that a read request will +not return until an entire line has been typed, or a signal has been +received. Also, no matter how many bytes are requested in the read call, +at most one line is returned. It is not, however, necessary to +read a whole line at once; any number of bytes, even one, may be +requested in a read without losing information. +.Pp +.Pf \&{ Dv MAX_CANON Ns \&} +is a limit on the +number of bytes in a line. +The behavior of the system when this limit is +exceeded is the same as when the input queue limit +.Pf \&{ Dv MAX_INPUT Ns \&} , +is exceeded. +.Pp +Erase and kill processing occur when either of two special characters, +the +.Dv ERASE +and +.Dv KILL +characters (see the +.Sx "Special Characters section" ) , +is received. +This processing affects data in the input queue that has not yet been +delimited by a newline +.Dv NL, +.Dv EOF , +or +.Dv EOL +character. This un-delimited +data makes up the current line. The +.Dv ERASE +character deletes the last +character in the current line, if there is any. The +.Dv KILL +character +deletes all data in the current line, if there is any. The +.Dv ERASE +and +.Dv KILL +characters have no effect if there is no data in the current line. +The +.Dv ERASE +and +.Dv KILL +characters themselves are not placed in the input +queue. +.Ss Noncanonical Mode Input Processing +In noncanonical mode input processing, input bytes are not assembled into +lines, and erase and kill processing does not occur. The values of the +.Dv MIN +and +.Dv TIME +members of the +.Fa c_cc +array are used to determine how to +process the bytes received. +.Pp +.Dv MIN +represents the minimum number of bytes that should be received when +the +.Xr read +function successfully returns. +.Dv TIME +is a timer of 0.1 second +granularity that is used to time out bursty and short term data +transmissions. If +.Dv MIN +is greater than +.Dv \&{ Dv MAX_INPUT Ns \&} , +the response to the +request is undefined. The four possible values for +.Dv MIN +and +.Dv TIME +and +their interactions are described below. +.Ss "Case A: MIN > 0, TIME > 0" +In this case +.Dv TIME +serves as an inter-byte timer and is activated after +the first byte is received. Since it is an inter-byte timer, it is reset +after a byte is received. The interaction between +.Dv MIN +and +.Dv TIME +is as +follows: as soon as one byte is received, the inter-byte timer is +started. If +.Dv MIN +bytes are received before the inter-byte timer expires +(remember that the timer is reset upon receipt of each byte), the read is +satisfied. If the timer expires before +.Dv MIN +bytes are received, the +characters received to that point are returned to the user. Note that if +.Dv TIME +expires at least one byte is returned because the timer would +not have been enabled unless a byte was received. In this case +.Pf \&( Dv MIN +> 0, +.Dv TIME +> 0) the read blocks until the +.Dv MIN +and +.Dv TIME +mechanisms are +activated by the receipt of the first byte, or a signal is received. If +data is in the buffer at the time of the read(), the result is as +if data had been received immediately after the read(). +.Ss "Case B: MIN > 0, TIME = 0" +In this case, since the value of +.Dv TIME +is zero, the timer plays no role +and only +.Dv MIN +is significant. A pending read is not satisfied until +.Dv MIN +bytes are received (i.e., the pending read blocks until +.Dv MIN +bytes +are received), or a signal is received. A program that uses this case to +read record-based terminal +.Dv I/O +may block indefinitely in the read +operation. +.Ss "Case C: MIN = 0, TIME > 0" +In this case, since +.Dv MIN += 0, +.Dv TIME +no longer represents an inter-byte +timer. It now serves as a read timer that is activated as soon as the +read function is processed. A read is satisfied as soon as a single +byte is received or the read timer expires. Note that in this case if +the timer expires, no bytes are returned. If the timer does not +expire, the only way the read can be satisfied is if a byte is received. +In this case the read will not block indefinitely waiting for a byte; if +no byte is received within +.Dv TIME Ns *0.1 +seconds after the read is initiated, +the read returns a value of zero, having read no data. If data is +in the buffer at the time of the read, the timer is started as if +data had been received immediately after the read. +.Ss Case D: MIN = 0, TIME = 0 +The minimum of either the number of bytes requested or the number of +bytes currently available is returned without waiting for more +bytes to be input. If no characters are available, read returns a +value of zero, having read no data. +.Ss Writing Data and Output Processing +When a process writes one or more bytes to a terminal device file, they +are processed according to the +.Fa c_oflag +field (see the +.Sx "Output Modes +section). The +implementation may provide a buffering mechanism; as such, when a call to +write() completes, all of the bytes written have been scheduled for +transmission to the device, but the transmission will not necessarily +have been completed. +.\" See also .Sx "6.4.2" for the effects of +.\" .Dv O_NONBLOCK +.\" on write. +.Ss Special Characters +Certain characters have special functions on input or output or both. +These functions are summarized as follows: +.Bl -tag -width indent +.It Dv INTR +Special character on input and is recognized if the +.Dv ISIG +flag (see the +.Sx "Local Modes" +section) is enabled. Generates a +.Dv SIGINT +signal which is sent to all processes in the foreground +process group for which the terminal is the controlling +terminal. If +.Dv ISIG +is set, the +.Dv INTR +character is +discarded when processed. +.It Dv QUIT +Special character on input and is recognized if the +.Dv ISIG +flag is enabled. Generates a +.Dv SIGQUIT +signal which is +sent to all processes in the foreground process group +for which the terminal is the controlling terminal. If +.Dv ISIG +is set, the +.Dv QUIT +character is discarded when +processed. +.It Dv ERASE +Special character on input and is recognized if the +.Dv ICANON +flag is set. Erases the last character in the +current line; see +.Sx "Canonical Mode Input Processing" . +It does not erase beyond +the start of a line, as delimited by an +.Dv NL , +.Dv EOF , +or +.Dv EOL +character. If +.Dv ICANON +is set, the +.Dv ERASE +character is +discarded when processed. +.It Dv KILL +Special character on input and is recognized if the +.Dv ICANON +flag is set. Deletes the entire line, as +delimited by a +.Dv NL , +.Dv EOF , +or +.Dv EOL +character. If +.Dv ICANON +is set, the +.Dv KILL +character is discarded when processed. +.It Dv EOF +Special character on input and is recognized if the +.Dv ICANON +flag is set. When received, all the bytes +waiting to be read are immediately passed to the +process, without waiting for a newline, and the +.Dv EOF +is discarded. Thus, if there are no bytes waiting (that +is, the +.Dv EOF +occurred at the beginning of a line), a byte +count of zero is returned from the read(), +representing an end-of-file indication. If +.Dv ICANON +is +set, the +.Dv EOF +character is discarded when processed. +.Dv NL +Special character on input and is recognized if the +.Dv ICANON +flag is set. It is the line delimiter +.Ql \&\en . +.It Dv EOL +Special character on input and is recognized if the +.Dv ICANON +flag is set. Is an additional line delimiter, +like +.Dv NL . +.It Dv SUSP +If the +.Dv ISIG +flag is enabled, receipt of the +.Dv SUSP +character causes a +.Dv SIGTSTP +signal to be sent to all processes in the +foreground process group for which the terminal is the +controlling terminal, and the +.Dv SUSP +character is +discarded when processed. +.It Dv STOP +Special character on both input and output and is +recognized if the +.Dv IXON +(output control) or +.Dv IXOFF +(input +control) flag is set. Can be used to temporarily +suspend output. It is useful with fast terminals to +prevent output from disappearing before it can be read. +If +.Dv IXON +is set, the +.Dv STOP +character is discarded when +processed. +.It Dv START +Special character on both input and output and is +recognized if the +.Dv IXON +(output control) or +.Dv IXOFF +(input +control) flag is set. Can be used to resume output that +has been suspended by a +.Dv STOP +character. If +.Dv IXON +is set, the +.Dv START +character is discarded when processed. +.Dv CR +Special character on input and is recognized if the +.Dv ICANON +flag is set; it is the +.Ql \&\er , +as denoted in the +.Tn \&C +Standard {2}. When +.Dv ICANON +and +.Dv ICRNL +are set and +.Dv IGNCR +is not set, this character is translated into a +.Dv NL , +and +has the same effect as a +.Dv NL +character. +.El +.Pp +The following special characters are extensions defined by this +system and are not a part of 1003.1 termios. +.Bl -tag -width indent +.It Dv EOL2 +Secondary +.Dv EOL +character. Same function as +.Dv EOL. +.It Dv WERASE +Special character on input and is recognized if the +.Dv ICANON +flag is set. Erases the last word in the current +line according to one of two algorithms. If the +.Dv ALTWERASE +flag is not set, first any preceding whitespace is +erased, and then the maximal sequence of non-whitespace +characters. If +.Dv ALTWERASE +is set, first any preceding +whitespace is erased, and then the maximal sequence +of alphabetic/underscores or non alphabetic/underscores. +As a special case in this second algorithm, the first previous +non-whitespace character is skipped in determining +whether the preceding word is a sequence of +alphabetic/undercores. This sounds confusing but turns +out to be quite practical. +.It Dv REPRINT +Special character on input and is recognized if the +.Dv ICANON +flag is set. Causes the current input edit line +to be retyped. +.It Dv DSUSP +Has similar actions to the +.Dv SUSP +character, except that +the +.Dv SIGTSTP +signal is delivered when one of the processes +in the foreground process group issues a read() to the +controlling terminal. +.It Dv LNEXT +Special character on input and is recognized if the +.Dv IEXTEN +flag is set. Receipt of this character causes the next +character to be taken literally. +.It Dv DISCARD +Special character on input and is recognized if the +.Dv IEXTEN +flag is set. Receipt of this character toggles the flushing +of terminal output. +.It Dv STATUS +Special character on input and is recognized if the +.Dv ICANON +flag is set. Receipt of this character causes a +.Dv SIGINFO +signal to be sent to the foreground process group of the +terminal. Also, if the +.Dv NOKERNINFO +flag is not set, it +causes the kernel to write a status message to the terminal +that displays the current load average, the name of the +command in the foreground, its process ID, the symbolic +wait channel, the number of user and system seconds used, +the percentage of cpu the process is getting, and the resident +set size of the process. +.El +.Pp +The +.Dv NL +and +.Dv CR +characters cannot be changed. +The values for all the remaining characters can be set and are +described later in the document under +Special Control Characters. +.Pp +Special +character functions associated with changeable special control characters +can be disabled individually by setting their value to +.Dv {_POSIX_VDISABLE}; +see +.Sx "Special Control Characters" . +.Pp +If two or more special characters have the same value, the function +performed when that character is received is undefined. +.Ss Modem Disconnect +If a modem disconnect is detected by the terminal interface for a +controlling terminal, and if +.Dv CLOCAL +is not set in the +.Fa c_cflag +field for +the terminal, the +.Dv SIGHUP +signal is sent to the controlling +process associated with the terminal. Unless other arrangements have +been made, this causes the controlling process to terminate. +Any subsequent call to the read() function returns the value zero, +indicating end of file. Thus, processes that read a terminal +file and test for end-of-file can terminate appropriately after a +disconnect. +.\" If the +.\" .Er EIO +.\" condition specified in 6.1.1.4 that applies +.\" when the implementation supports job control also exists, it is +.\" unspecified whether the +.\" .Dv EOF +.\" condition or the +.\" .Pf [ Dv EIO +.\" ] is returned. +Any +subsequent write() to the terminal device returns -1, with +.Va errno +set to +.Er EIO , +until the device is closed. +.Sh General Terminal Interface +.Pp +.Ss Closing a Terminal Device File +The last process to close a terminal device file causes any output +to be sent to the device and any input to be discarded. Then, if +.Dv HUPCL +is set in the control modes, and the communications port supports a +disconnect function, the terminal device performs a disconnect. +.Ss Parameters That Can Be Set +Routines that need to control certain terminal +.Tn I/O +characteristics +do so by using the termios structure as defined in the header +.Aq Pa termios.h . +This structure contains minimally four scalar elements of bit flags +and one array of special characters. The scalar flag elements are +named: +.Fa c_iflag , +.Fa c_oflag , +.Fa c_cflag , +and +.Fa c_lflag . +The character array is named +.Fa c_cc , +and its maximum index is +.Dv NCCS . +.Ss Input Modes +Values of the +.Fa c_iflag +field describe the basic +terminal input control, and are composed of +following masks: +.Pp +.Bl -tag -width IMAXBEL -offset indent -compact +.It Dv IGNBRK +/* ignore BREAK condition */ +.It Dv BRKINT +/* map BREAK to SIGINTR */ +.It Dv IGNPAR +/* ignore (discard) parity errors */ +.It Dv PARMRK +/* mark parity and framing errors */ +.It Dv INPCK +/* enable checking of parity errors */ +.It Dv ISTRIP +/* strip 8th bit off chars */ +.It Dv INLCR +/* map NL into CR */ +.It Dv IGNCR +/* ignore CR */ +.It Dv ICRNL +/* map CR to NL (ala CRMOD) */ +.It Dv IXON +/* enable output flow control */ +.It Dv IXOFF +/* enable input flow control */ +.It Dv IXANY +/* any char will restart after stop */ +.It Dv IMAXBEL +/* ring bell on input queue full */ +.El +.Pp +In the context of asynchronous serial data transmission, a break +condition is defined as a sequence of zero-valued bits that continues for +more than the time to send one byte. The entire sequence of zero-valued +bits is interpreted as a single break condition, even if it continues for +a time equivalent to more than one byte. In contexts other than +asynchronous serial data transmission the definition of a break condition +is implementation defined. +.Pp +If +.Dv IGNBRK +is set, a break condition detected on input is ignored, that +is, not put on the input queue and therefore not read by any process. If +.Dv IGNBRK +is not set and +.Dv BRKINT +is set, the break condition flushes the +input and output queues and if the terminal is the controlling terminal +of a foreground process group, the break condition generates a +single +.Dv SIGINT +signal to that foreground process group. If neither +.Dv IGNBRK +nor +.Dv BRKINT +is set, a break condition is read as a single +.Ql \&\e0 , +or if +.Dv PARMRK +is set, as +.Ql \&\e377 , +.Ql \&\e0 , +.Ql \&\e0 . +.Pp +If +.Dv IGNPAR +is set, a byte with a framing or parity error (other than +break) is ignored. +.Pp +If +.Dv PARMRK +is set, and +.Dv IGNPAR +is not set, a byte with a framing or parity +error (other than break) is given to the application as the +three-character sequence +.Ql \&\e377 , +.Ql \&\e0 , +X, where +.Ql \&\e377 , +.Ql \&\e0 +is a two-character +flag preceding each sequence and X is the data of the character received +in error. To avoid ambiguity in this case, if +.Dv ISTRIP +is not set, a valid +character of +.Ql \&\e377 +is given to the application as +.Ql \&\e377 , +.Ql \&\e377 . +If +neither +.Dv PARMRK +nor +.Dv IGNPAR +is set, a framing or parity error (other than +break) is given to the application as a single character +.Ql \&\e0 . +.Pp +If +.Dv INPCK +is set, input parity checking is enabled. If +.Dv INPCK +is not set, +input parity checking is disabled, allowing output parity generation +without input parity errors. Note that whether input parity checking is +enabled or disabled is independent of whether parity detection is enabled +or disabled (see +.Sx "Control Modes" ) . +If parity detection is enabled but input +parity checking is disabled, the hardware to which the terminal is +connected recognizes the parity bit, but the terminal special file +does not check whether this bit is set correctly or not. +.Pp +If +.Dv ISTRIP +is set, valid input bytes are first stripped to seven bits, +otherwise all eight bits are processed. +.Pp +If +.Dv INLCR +is set, a received +.Dv NL +character is translated into a +.Dv CR +character. If +.Dv IGNCR +is set, a received +.Dv CR +character is ignored (not +read). If +.Dv IGNCR +is not set and +.Dv ICRNL +is set, a received +.Dv CR +character is +translated into a +.Dv NL +character. +.Pp +If +.Dv IXON +is set, start/stop output control is enabled. A received +.Dv STOP +character suspends output and a received +.Dv START +character +restarts output. If +.Dv IXANY +is also set, then any character may +restart output. When +.Dv IXON +is set, +.Dv START +and +.Dv STOP +characters are not +read, but merely perform flow control functions. When +.Dv IXON +is not set, +the +.Dv START +and +.Dv STOP +characters are read. +.Pp +If +.Dv IXOFF +is set, start/stop input control is enabled. The system shall +transmit one or more +.Dv STOP +characters, which are intended to cause the +terminal device to stop transmitting data, as needed to prevent the input +queue from overflowing and causing the undefined behavior described in +.Sx "Input Processing and Reading Data" , +and shall transmit one or more +.Dv START +characters, which are +intended to cause the terminal device to resume transmitting data, as +soon as the device can continue transmitting data without risk of +overflowing the input queue. The precise conditions under which +.Dv STOP +and +START +characters are transmitted are implementation defined. +.Pp +If +.Dv IMAXBEL +is set and the input queue is full, subsequent input shall cause an +.Tn ASCII +.Dv BEL +character to be transmitted to the +the output queue. +.Pp +The initial input control value after open() is implementation defined. +.Ss Output Modes +Values of the +.Fa c_oflag +field describe the basic terminal output control, +and are composed of the following masks: +.Pp +.Bl -tag -width OXTABS -offset indent -compact +.It Dv OPOST +/* enable following output processing */ +.It Dv ONLCR +/* map NL to CR-NL (ala +.Dv CRMOD) +*/ +.It Dv OXTABS +/* expand tabs to spaces */ +.It Dv ONOEOT +/* discard +.Dv EOT Ns 's +.Ql \&^D +on output) */ +.El +.Pp +If +.Dv OPOST +is set, the remaining flag masks are interpreted as follows; +otherwise characters are transmitted without change. +.Pp +If +.Dv ONLCR +is set, newlines are translated to carriage return, linefeeds. +.Pp +If +.Dv OXTABS +is set, tabs are expanded to the appropriate number of +spaces (assuming 8 column tab stops). +.Pp +If +.Dv ONOEOT +is set, +.Tn ASCII +.Dv EOT NS 's +are discarded on output. +.Ss Control Modes +Values of the +.Fa c_cflag +field describe the basic +terminal hardware control, and are composed of the +following masks. +Not all values +specified are supported by all hardware. +.Pp +.Bl -tag -width CRTSXIFLOW -offset indent -compact +.It Dv CSIZE +/* character size mask */ +.It Dv CS5 +/* 5 bits (pseudo) */ +.It Dv CS6 +/* 6 bits */ +.It Dv CS7 +/* 7 bits */ +.It Dv CS8 +/* 8 bits */ +.It Dv CSTOPB +/* send 2 stop bits */ +.It Dv CREAD +/* enable receiver */ +.It Dv PARENB +/* parity enable */ +.It Dv PARODD +/* odd parity, else even */ +.It Dv HUPCL +/* hang up on last close */ +.It Dv CLOCAL +/* ignore modem status lines */ +.It Dv CCTS_OFLOW +/* +.Dv CTS +flow control of output */ +.It Dv CRTSCTS +/* same as +.Dv CCTS_OFLOW +*/ +.It Dv CRTS_IFLOW +/* RTS flow control of input */ +.It Dv MDMBUF +/* flow control output via Carrier */ +.El +.Pp +The +.Dv CSIZE +bits specify the byte size in bits for both transmission and +reception. The +.Fa c_cflag +is masked with +.Dv CSIZE +and compared with the +values +.Dv CS5 , +.Dv CS6 , +.Dv CS7 , +or +.Dv CS8 . +This size does not include the parity bit, if any. If +.Dv CSTOPB +is set, two stop bits are used, otherwise one stop bit. For example, at +110 baud, two stop bits are normally used. +.Pp +If +.Dv CREAD +is set, the receiver is enabled. Otherwise, no character is +received. +Not all hardware supports this bit. In fact, this flag +is pretty silly and if it were not part of the +.Nm termios +specification +it would be omitted. +.Pp +If +.Dv PARENB +is set, parity generation and detection are enabled and a parity +bit is added to each character. If parity is enabled, +.Dv PARODD +specifies +odd parity if set, otherwise even parity is used. +.Pp +If +.Dv HUPCL +is set, the modem control lines for the port are lowered +when the last process with the port open closes the port or the process +terminates. The modem connection is broken. +.Pp +If +.Dv CLOCAL +is set, a connection does not depend on the state of the modem +status lines. If +.Dv CLOCAL +is clear, the modem status lines are +monitored. +.Pp +Under normal circumstances, a call to the open() function waits for +the modem connection to complete. However, if the +.Dv O_NONBLOCK +flag is set +or if +.Dv CLOCAL +has been set, the open() function returns +immediately without waiting for the connection. +.Pp +The +.Dv CCTS_OFLOW +.Pf ( Dv CRTSCTS ) +flag is currently unused. +.Pp +If +.Dv MDMBUF +is set then output flow control is controlled by the state +of Carrier Detect. +.Pp +If the object for which the control modes are set is not an asynchronous +serial connection, some of the modes may be ignored; for example, if an +attempt is made to set the baud rate on a network connection to a +terminal on another host, the baud rate may or may not be set on the +connection between that terminal and the machine it is directly connected +to. +.Ss Local Modes +Values of the +.Fa c_lflag +field describe the control of +various functions, and are composed of the following +masks. +.Pp +.Bl -tag -width NOKERNINFO -offset indent -compact +.It Dv ECHOKE +/* visual erase for line kill */ +.It Dv ECHOE +/* visually erase chars */ +.It Dv ECHO +/* enable echoing */ +.It Dv ECHONL +/* echo +.Dv NL +even if +.Dv ECHO +is off */ +.It Dv ECHOPRT +/* visual erase mode for hardcopy */ +.It Dv ECHOCTL +/* echo control chars as ^(Char) */ +.It Dv ISIG +/* enable signals +.Dv INTR , +.Dv QUIT , +.Dv [D]SUSP +*/ +.It Dv ICANON +/* canonicalize input lines */ +.It Dv ALTWERASE +/* use alternate +.Dv WERASE +algorithm */ +.It Dv IEXTEN +/* enable +.Dv DISCARD +and +.Dv LNEXT +*/ +.It Dv EXTPROC +/* external processing */ +.It Dv TOSTOP +/* stop background jobs from output */ +.It Dv FLUSHO +/* output being flushed (state) */ +.It Dv NOKERNINFO +/* no kernel output from +.Dv VSTATUS +*/ +.It Dv PENDIN +/* XXX retype pending input (state) */ +.It Dv NOFLSH +/* don't flush after interrupt */ +.El +.Pp +If +.Dv ECHO +is set, input characters are echoed back to the terminal. If +.Dv ECHO +is not set, input characters are not echoed. +.Pp +If +.Dv ECHOE +and +.Dv ICANON +are set, the +.Dv ERASE +character causes the terminal +to erase the last character in the current line from the display, if +possible. If there is no character to erase, an implementation may echo +an indication that this was the case or do nothing. +.Pp +If +.Dv ECHOK +and +.Dv ICANON +are set, the +.Dv KILL +character causes +the current line to be discarded and the system echoes the +.Ql \&\en +character after the +.Dv KILL +character. +.Pp +If +.Dv ECHOKE +and +.Dv ICANON +are set, the +.Dv KILL +character causes +the current line to be discarded and the system causes +the terminal +to erase the line from the display. +.Pp +If +.Dv ECHOPRT +and +.Dv ICANON +are set, the system assumes +that the display is a printing device and prints a +backslash and the erased characters when processing +.Dv ERASE +characters, followed by a forward slash. +.Pp +If +.Dv ECHOCTL +is set, the system echoes control characters +in a visible fashion using a caret followed by the control character. +.Pp +If +.Dv ALTWERASE +is set, the system uses an alternative algorithm +for determining what constitutes a word when processing +.Dv WERASE +characters (see +.Dv WERASE ) . +.Pp +If +.Dv ECHONL +and +.Dv ICANON +are set, the +.Ql \&\en +character echoes even if +.Dv ECHO +is not set. +.Pp +If +.Dv ICANON +is set, canonical processing is enabled. This enables the +erase and kill edit functions, and the assembly of input characters into +lines delimited by +.Dv NL, +.Dv EOF , +and +.Dv EOL, +as described in +.Sx "Canonical Mode Input Processing" . +.Pp +If +.Dv ICANON +is not set, read requests are satisfied directly from the input +queue. A read is not satisfied until at least +.Dv MIN +bytes have been +received or the timeout value +.Dv TIME +expired between bytes. The time value +represents tenths of seconds. See +.Sx "Noncanonical Mode Input Processing" +for more details. +.Pp +If +.Dv ISIG +is set, each input character is checked against the special +control characters +.Dv INTR , +.Dv QUIT , +and +.Dv SUSP +(job control only). If an input +character matches one of these control characters, the function +associated with that character is performed. If +.Dv ISIG +is not set, no +checking is done. Thus these special input functions are possible only +if +.Dv ISIG +is set. +.Pp +If +.Dv IEXTEN +is set, implementation-defined functions are recognized +from the input data. How +.Dv IEXTEN +being set +interacts with +.Dv ICANON , +.Dv ISIG , +.Dv IXON , +or +.Dv IXOFF +is implementation defined. +If +.Dv IEXTEN +is not set, then +implementation-defined functions are not recognized, and the +corresponding input characters are not processed as described for +.Dv ICANON , +.Dv ISIG , +.Dv IXON , +and +.Dv IXOFF . +.Pp +If +.Dv NOFLSH +is set, the normal flush of the input and output queues +associated with the +.Dv INTR , +.Dv QUIT , +and +.Dv SUSP +characters +are not be done. +.Pp +If +.Dv TOSTOP +is set, the signal +.Dv SIGTTOU +is sent to the process group of a process that tries to write to +its controlling terminal if it is not in the foreground process group for +that terminal. This signal, by default, stops the members of the process +group. Otherwise, the output generated by that process is output to the +current output stream. Processes that are blocking or ignoring +.Dv SIGTTOU +signals are excepted and allowed to produce output and the +.Dv SIGTTOU +signal +is not sent. +.Pp +If +.Dv NOKERNINFO +is set, the kernel does not produce a status message +when processing +.Dv STATUS +characters (see +.Dv STATUS ) . +.Ss Special Control Characters +The special control characters values are defined by the array +.Fa c_cc . +This table lists the array index, the corresponding special character, +and the system default value. For an accurate list of +the system defaults, consult the header file +.Aq Pa ttydefaults.h . +.Pp +.Bl -column "Index Name" "Special Character" -offset indent -compact +.It Em "Index Name Special Character Default Value" +.It Dv VEOF Ta EOF Ta \&^D +.It Dv VEOL Ta EOL Ta _POSIX_VDISABLE +.It Dv VEOL2 Ta EOL2 Ta _POSIX_VDISABLE +.It Dv VERASE Ta ERASE Ta \&^? Ql \&\e177 +.It Dv VWERASE Ta WERASE Ta \&^W +.It Dv VKILL Ta KILL Ta \&^U +.It Dv VREPRINT Ta REPRINT Ta \&^R +.It Dv VINTR Ta INTR Ta \&^C +.It Dv VQUIT Ta QUIT Ta \&^\e\e Ql \&\e34 +.It Dv VSUSP Ta SUSP Ta \&^Z +.It Dv VDSUSP Ta DSUSP Ta \&^Y +.It Dv VSTART Ta START Ta \&^Q +.It Dv VSTOP Ta STOP Ta \&^S +.It Dv VLNEXT Ta LNEXT Ta \&^V +.It Dv VDISCARD Ta DISCARD Ta \&^O +.It Dv VMIN Ta --- Ta \&1 +.It Dv VTIME Ta --- Ta \&0 +.It Dv VSTATUS Ta STATUS Ta \&^T +.El +.Pp +If the +value of one of the changeable special control characters (see +.Sx "Special Characters" ) +is +.Dv {_POSIX_VDISABLE} , +that function is disabled; that is, no input +data is recognized as the disabled special character. +If +.Dv ICANON +is +not set, the value of +.Dv {_POSIX_VDISABLE} +has no special meaning for the +.Dv VMIN +and +.Dv VTIME +entries of the +.Fa c_cc +array. +.Pp +The initial values of the flags and control characters +after open() is set according to +the values in the header +.Aq Pa sys/ttydefaults.h . diff --git a/share/man/man4/tp.4 b/share/man/man4/tp.4 new file mode 100644 index 0000000..fdfd578 --- /dev/null +++ b/share/man/man4/tp.4 @@ -0,0 +1,722 @@ +.\" Copyright (c) 1990, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)tp.4 8.4 (Berkeley) 4/19/94 +.\" +.Dd April 19, 1994 +.Dt TP 4 +.Os +.Sh NAME +.Nm TP +.Nd +.Tn ISO +Transport Protocol +.Sh SYNOPSIS +.Fd #include <sys/socket.h> +.Fd #include <netiso/iso_errno.h> +.Fd #include <netiso/tp_param.h> +.Fd #include <netiso/tp_user.h> +.Ft int +.Fn socket "[AF_INET, AF_ISO]" SOCK_SEQPACKET 0 +.Sh DESCRIPTION +.Pp +The +.Tn TP +protocol provides reliable, flow-controlled, two-way +transmission of data and record boundaries. +It is a byte-stream protocol and is accessed according to +the +.Dv SOCK_SEQPACKET +abstraction. +The +.Tn TP +protocol makes use of a standard +.Tn ISO +address format, +including a Network Service Access Point, and a Transport Service Entity +Selector. +Subclass 4 may make use of the internet +Internet address format. +.Pp +Sockets utilizing the tp protocol are either +.Dq active +or +.Dq passive . +Active sockets initiate connections to passive +sockets. By default +.Tn TCP +sockets are created active; to create a +passive socket the +.Xr listen 2 +system call must be used +after binding the socket with the +.Xr bind 2 +system call. Only +passive sockets may use the +.Xr accept 2 +call to accept incoming connections. Only active sockets may +use the +.Xr connect 2 +call to initiate connections. +.Pp +Passive sockets may +.Dq underspecify +their location to match +incoming connection requests from multiple networks. This +technique, termed +.Dq wildcard addressing , +allows a single +server to provide service to clients on multiple networks. +To create a socket which listens on all networks, the +.Tn NSAP +portion +of the bound address must be void (of length zero). +The Transport Selector may still be specified +at this time; if the port is not specified the system will assign one. +Once a connection has been established the socket's address is +fixed by the peer entity's location. The address assigned the +socket is the address associated with the network interface +through which packets are being transmitted and received. +.Pp +The +.Tn ISO +Transport Protocol implemented for +.Tn AOS R2 +at the University of Wisconsin - Madison, +and modified for inclusion in the Berkeley Software Distribution, +includes classes 0 and 4 +of the +.Tn ISO +transport protocols +as specified in +the June 1986 version of +.Tn IS +8073. +Class 4 of the protocol provides reliable, sequenced, +flow-controlled, two-way +transmission of data packets with an alternate stop-and-wait data path called +the "expedited data" service. +Class 0 is essentially a null transport protocol, which is used +when the underlying network service provides reliable, sequenced, +flow-controlled, two-way data transmission. +Class 0 does not provide the expedited data service. +The protocols are implemented as a single transport layer entity +that coexists with the Internet protocol suite. +Class 0 may be used only in the +.Tn ISO +domain. +Class 4 may be used in the Internet domain as well as in the +.Tn ISO +domain. +.Pp +Two system calls were modified from the previous +release of the Berkeley Software Distribution +to permit the support of the end-of-transport-service-data-unit +.Pq Dv EOTSDU +indication, and for the receipt and transmission of user +connect, confirm, and disconnect data. +See +.Xr sendmsg 2 +and +.Xr recvmsg 2 , +and further discussion +below for the formats of the data in the ancillary data buffer. +If the +.Dv EOTSDU +is not needed, the normal +.Xr read 2 , +and +.Xr write 2 +system calls may be used. +.Pp +Through the +.Xr getsockopt +and +.Xr setsockopt +system calls, +.Tn TP +supports several options +to control such things as negotiable options +in the protocol and protocol strategies. +The options are defined in +.Aq Pa netiso/tp_user.h , +and are described below. +.Pp +In the tables below, +the options marked with a pound sign +.Ql \&# +may be used +with +.Xr setsockopt +after a connection is established. +Others must be used before the connection +is established, in other words, +before calling +.Xr connect +or +.Xr accept . +All options may be used +with +.Xr getsockopt +before or +after a connection is established. +.Bl -tag -width TPOPT_PSTATISTICS +.It Dv TPOPT_CONN_DATA +(char *) [none] +.br +Data to send on +.Xr connect . +The passive user may issue a +.Xr getsockopt +call to retrieve a connection request's user data, +after having done the +.Xr accept +system call without implying confirmation of the connection. +.Pp +The data may also be retrieved by issuing a +.Xr recvmsg +request for ancillary data only, +without implying confirmation of the connection. +The returned +.Va cmsghdr +will contain +.Dv SOL_TRANSPORT +for the +.Va csmg_level +and +.Dv TPOPT_CONN_DATA +for +.Va cmsg_type. +.It Dv TPOPT_DISC_DATA \&# +(char *) [none] +.br +Data to send on +.Xr close . +Disconnect data may be sent by the side initiating the close +but not by the passive side ("passive" with respect to the closing +of the connection), so there is no need to read disconnect data +after calling +.Xr close . +This may be sent by a +.Xr setsockopt +system call, or by issuing a +.Xr sendmsg +request specifying ancillary data only. +The user-provided +.Va cmsghdr +must contain +.Dv SOL_TRANSPORT +for +.Va csmg_level +and +.Dv TPOPT_DISC_DATA +for +.Va cmsg_type . +Sending of disconnect data will in of itself tear down (or reject) +the connection. +.It Dv TPOPT_CFRM_DATA \&# +(char *) [none] +.br +Data to send when confirming a connection. +This may also be sent by a +.Xr setsockopt +system call, or by issuing a +.Xr sendmsg +request, as above. +Sending of connect confirm data will cause the connection +to be confirmed rather than rejected. +.It Dv TPOPT_PERF_MEAS \&# +Boolean. +.br +When +.Xr true , +performance measurements will be kept +for this connection. +When set before a connection is established, the +active side will use a locally defined parameter on the +connect request packet; if the peer is another +.Tn ARGO +implementation, this will cause performance measurement to be +turned on +on the passive side as well. +See +.Xr tpperf 8 . +.It Dv TPOPT_PSTATISTICS +No associated value on input. +On output, +.Ar struct tp_pmeas . +.Pp +This command is used to read the performance statistics accumulated +during a connection's lifetime. +It can only be used with +.Xr getsockopt . +The structure it returns is described in +.Aq Pa netiso/tp_stat.h . +See +.Xr tpperf 8 . +.It Dv TPOPT_FLAGS +unsigned integer. [0x0] +.br +This command can only be used with +.Xr getsockopt . +See the description of the flags below. +.It Dv TPOPT_PARAMS +.Ar struct tp_conn_param +.br +Used to get or set a group parameters for a connection. +The +.Ar struct tp_conn_param +is the argument used with the +.Xr getsockopt +or +.Xr setsockopt +system call. +It is described in +.Aq Pa netiso/tp_user.h . +.Pp +The fields of the +.Ar tp_conn_param +structure are +described below. +.El +.Pp +.Em Values for TPOPT_PARAMS: +.Bl -tag -width p_sendack_ticks +.It Ar p_Nretrans +nonzero short integer [1] +.br +Number of times a TPDU +will be retransmitted before the +local TP entity closes a connection. +.It Ar p_dr_ticks +nonzero short integer [various] +.br +Number of clock ticks between retransmissions of disconnect request +TPDUs. +.It Ar p_dt_ticks +nonzero short integer [various] +.br +Number of clock ticks between retransmissions of data +TPDUs. +This parameter applies only to class 4. +.It Ar p_cr_ticks +nonzero short integer [various] +.br +Number of clock ticks between retransmissions of connection request +TPDUs. +.It Ar p_cc_ticks +nonzero short integer [various] +.br +Number of clock ticks between retransmissions of connection confirm +TPDUs. +This parameter applies only to class 4. +.It Ar p_x_ticks +nonzero short integer [various] +.br +Number of clock ticks between retransmissions of expedited data +TPDUs. +This parameter applies only to class 4. +.It Ar p_sendack_ticks +nonzero short integer [various] +.br +Number of clock ticks that the local TP entity +will wait before sending an acknowledgment for normal data +(not applicable if the acknowledgement strategy is +.Dv TPACK_EACH ) . +This parameter applies only to class 4. +.It Ar p_ref_ticks +nonzero short integer [various] +.br +Number of clock ticks for which a reference will +be considered frozen after the connection to which +it applied is closed. +This parameter applies to classes 4 and 0 in the +.Tn ARGO +implementation, despite the fact that +the frozen reference function is required only for +class 4. +.It Ar p_inact_ticks +nonzero short integer [various] +.br +Number of clock ticks without an incoming packet from the peer after which +.Tn TP +close the connection. +This parameter applies only to class 4. +.It Ar p_keepalive_ticks +nonzero short integer [various] +.br +Number of clock ticks between acknowledgments that are sent +to keep an inactive connection open (to prevent the peer's +inactivity control function from closing the connection). +This parameter applies only to class 4. +.It Ar p_winsize +short integer between 128 and 16384. [4096 bytes] +.br +The buffer space limits in bytes for incoming and outgoing data. +There is no way to specify different limits for incoming and outgoing +paths. +The actual window size at any time +during the lifetime of a connection +is a function of the buffer size limit, the negotiated +maximum TPDU +size, and the +rate at which the user program receives data. +This parameter applies only to class 4. +.It Ar p_tpdusize +unsigned char between 0x7 and 0xd. +[0xc for class 4] [0xb for class 0] +.br +Log 2 of the maximum TPDU size to be negotiated. +The +.Tn TP +standard +.Pf ( Tn ISO +8473) gives an upper bound of +0xd for class 4 and 0xb for class 0. +The +.Tn ARGO +implementation places upper bounds of +0xc on class 4 and 0xb on class 0. +.It Ar p_ack_strat +.Dv TPACK_EACH +or +.Dv TPACK_WINDOW. +.Bq Dv TPACK_WINDOW +.br +This parameter applies only to class 4. +Two acknowledgment strategies are supported: +.Pp +.Dv TPACK_EACH means that each data TPDU +is acknowledged +with an AK TPDU. +.Pp +.Dv TPACK_WINDOW +means that upon receipt of the packet that represents +the high edge of the last window advertised, an AK TPDU is generated. +.It Ar p_rx_strat +4 bit mask +.Bq Dv TPRX_USE_CW No \&|\ Dv TPRX_FASTSTART +over +connectionless network protocols] +.Pf [ Dv TPRX_USE_CW +over +connection-oriented network protocols] +.br +This parameter applies only to class 4. +The bit mask may include the following values: +.Pp +.Dv TPRX_EACH : +When a retransmission timer expires, retransmit +each packet in the send window rather than +just the first unacknowledged packet. +.Pp +.Dv TPRX_USE_CW : +Use a "congestion window" strategy borrowed +from Van Jacobson's congestion window strategy for TCP. +The congestion window size is set to one whenever +a retransmission occurs. +.Pp +.Dv TPRX_FASTSTART : +Begin sending the maximum amount of data permitted +by the peer (subject to availability). +The alternative is to start sending slowly by +pretending the peer's window is smaller than it is, and letting +it slowly grow up to the peer window's real size. +This is to smooth the effect of new connections on a congested network +by preventing a transport connection from suddenly +overloading the network with a burst of packets. +This strategy is also due to Van Jacobson. +.It Ar p_class +5 bit mask +.Bq Dv TP_CLASS_4 No \&|\ Dv TP_CLASS_0 +.br +Bit mask including one or both of the values +.Dv TP_CLASS_4 +and +.Dv TP_CLASS_0 . +The higher class indicated is the preferred class. +If only one class is indicated, negotiation will not occur +during connection establishment. +.It Ar p_xtd_format +Boolean. +[false] +.br +Boolean indicating that extended format is negotiated. +This parameter applies only to class 4. +.It Ar p_xpd_service +Boolean. +[true] +.br +Boolean indicating that +the expedited data transport service will be negotiated. +This parameter applies only to class 4. +.It Ar p_use_checksum +Boolean. +[true] +.br +Boolean indicating the the use of checksums will be negotiated. +This parameter applies only to class 4. +.It Ar p_use_nxpd +Reserved for future use. +.It Ar p_use_rcc +Reserved for future use. +.It Ar p_use_efc +Reserved for future use. +.It Ar p_no_disc_indications +Boolean. +[false] +.Pp +Boolean indicating that the local +.Tn TP +entity will not issue +indications (signals) when a +.Tn TP +connection is disconnected. +.It Ar p_dont_change_params +Boolean. [false] +.br +If +.Em true +the +.Tn TP +entity will not override +any of the other values given in this structure. +If the values cannot be used, the +.Tn TP +entity will drop, disconnect, +or refuse to establish the connection to which this structure pertains. +.It Ar p_netservice +One of { +.Dv ISO_CLNS , +.Dv ISO_CONS , +.Dv ISO_COSNS , +.Dv IN_CLNS } . +.Pf [ Dv ISO_CLNS ] +.br +Indicates which network service is to be used. +.Pp +.Dv ISO_CLNS +indicates the connectionless network service provided +by CLNP +.Pf ( Tn ISO +8473). +.Pp +.Dv ISO_CONS +indicates the connection-oriented network service provided +by X.25 +.Pf ( Tn ISO +8208) and +.Tn ISO +8878. +.Pp +.Dv ISO_COSNS +indicates the +connectionless network service running over a +connection-oriented subnetwork service: CLNP +.Pf ( Tn ISO +8473) over X.25 +.Pf ( Tn ISO +8208). +.Pp +.Dv IN_CLNS +indicates the +DARPA Internet connectionless network service provided by IP (RFC 791). +.It Ar p_dummy +Reserved for future use. +.El +.Pp +The +.Dv TPOPT_FLAGS +option is used for obtaining +various boolean-valued options. +Its meaning is as follows. +The bit numbering used is that of the RT PC, which means that bit +0 is the most significant bit, while bit 8 is the least significant bit. +.sp 1 +.Em Values for TPOPT_FLAGS: +.Bl -tag -width Bitsx +.It Sy Bits +.Sy Description [Default] +.It \&0 +.Dv TPFLAG_NLQOS_PDN : +set when the quality of the +network service is +similar to that of a public data network. +.It \&1 +.Dv TPFLAG_PEER_ON_SAMENET : +set when the peer +.Tn TP +entity +is considered to be on the same network as the local +.Tn TP +entity. +.It \&2 +Not used. +.It \&3 +.Dv TPFLAG_XPD_PRES : +set when expedited data are present +[0] +.It 4\&..7 +Reserved. +.El +.Sh ERROR VALUES +.Pp +The +.Tn TP +entity returns +.Va errno +error values as defined in +.Aq Pa sys/errno.h +and +.Aq Pa netiso/iso_errno.h . +User programs may print messages associated with these value by +using an expanded version of +.Xr perror +found in the +.Tn ISO +library, +.Pa libisodir.a . +.Pp +If the +.Tn TP +entity encounters asynchronous events +that will cause a transport connection to be closed, +such as +timing out while retransmitting a connect request TPDU, +or receiving a DR TPDU, +the +.Tn TP +entity issues a +.Dv SIGURG +signal, indicating that +disconnection has occurred. +If the signal is issued during a +a system call, the system call may be interrupted, +in which case the +.Va errno +value upon return from the system call is +.Er EINTR. +If the signal +.Dv SIGURG +is being handled by reading +from the socket, and it was an +.Xr accept 2 +that +timed out, the read may result in +.Er ENOTSOCK , +because the +.Xr accept +call had not yet returned a +legitimate socket descriptor when the signal was handled. +.Dv ETIMEDOUT +(or a some other errno value appropriate to the +type of error) is returned if +.Dv SIGURG +is blocked +for the duration of the system call. +A user program should take one of the following approaches: +.Bl -tag -width Ds +.It Block Dv SIGURG +If the program is servicing +only one connection, it can block or ignore +.Dv SIGURG +during connection +establishment. +The advantage of this is that the +.Va errno +value +returned is somewhat meaningful. +The disadvantage of this is that +if ignored, disconnection and expedited data indications could be +missed. +For some programs this is not a problem. +.It Handle Dv SIGURG +If the program is servicing more than one connection at a time +or expedited data may arrive or both, the program may elect to +service +.Dv SIGURG . +It can use the +.Fn getsockopt ...TPOPT_FLAGS... +system +call to see if the signal +was due to the arrival of expedited data or due to a disconnection. +In the latter case, +.Xr getsockopt +will return +.Er ENOTCONN . +.El +.Sh SEE ALSO +.Xr tcp 4 , +.Xr netstat 1 , +.Xr iso 4 , +.Xr clnp 4 , +.Xr cltp 4 , +.Xr ifconfig 8 . +.Sh BUGS +The protocol definition of expedited data is slightly problematic, +in a way that renders expedited data almost useless, +if two or more packets of expedited data are send within +time \(*e, where \(*e +depends on the application. +The problem is not of major significance since most applications +do not use transport expedited data. +The problem is this: +the expedited data acknowledgment TPDU +has no field for conveying +credit, thus it is not possible for a +.Tn TP +entity to inform its peer +that "I received your expedited data but have no room to receive more." +The +.Tn TP +entity has the choice of acknowledging receipt of the +XPD TPDU: +.Bl -tag -width Ds +.It "when the user receives the" XPD TSDU +which may be a fairly long time, +which may cause the sending +.Tn TP +entity to retransmit the packet, +and possibly to close the connection after retransmission, or +.It "when the" Tn TP No "entity receives it" +so the sending entity does not retransmit or close the connection. +If the sending user then tries to send more expedited data +.Dq soon , +the expedited data will not be acknowledged (until the +receiving user receives the first XPD TSDU). +.El +.Pp +The +.Tn ARGO +implementation acknowledges XPD TPDUs +immediately, +in the hope that most users will not use expedited data frequently +enough for this to be a problem. diff --git a/share/man/man4/tty.4 b/share/man/man4/tty.4 new file mode 100644 index 0000000..a39ef1a --- /dev/null +++ b/share/man/man4/tty.4 @@ -0,0 +1,394 @@ +.\" Copyright (c) 1991, 1992, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)tty.4 8.3 (Berkeley) 4/19/94 +.\" +.Dd August 14, 1992 +.Dt TTY 4 +.Os BSD 4 +.Sh NAME +.Nm tty +.Nd general terminal interface +.Sh SYNOPSIS +.Fd #include <sys/ioctl.h> +.Sh DESCRIPTION +This section describes the interface to the terminal drivers +in the system. +.Ss Terminal Special Files +Each hardware terminal port on the system usually has a terminal special device +file associated with it in the directory ``/dev/'' (for +example, ``/dev/tty03''). +When a user logs into +the system on one of these hardware terminal ports, the system has already +opened the associated device and prepared the line for normal interactive +use (see +.Xr getty 8 .) +There is also a special case of a terminal file that connects not to +a hardware terminal port, but to another program on the other side. +These special terminal devices are called +.Em ptys +and provide the mechanism necessary to give users the same interface to the +system when logging in over a network (using +.Xr rlogin 1 , +or +.Xr telnet 1 +for example.) Even in these cases the details of how the terminal +file was opened and set up is already handled by special software +in the system. +Thus, users do not normally need to worry about the details of +how these lines are opened or used. Also, these lines are often used +for dialing out of a system (through an out-calling modem), but again +the system provides programs that hide the details of accessing +these terminal special files (see +.Xr tip 2 .) +.Pp +When an interactive user logs in, the system prepares the line to +behave in a certain way (called a +.Em "line discipline" ) , +the particular details of which is described in +.Xr stty 1 +at the command level, and in +.Xr termios 4 +at the programming level. A user may be concerned with changing +settings associated with his particular login terminal and should refer +to the preceding man pages for the common cases. The remainder of +this man page is concerned +with describing details of using and controlling terminal devices +at a low level, such as that possibly required by a program wishing +to provide features similar to those provided by the system. +.Ss Line disciplines +A terminal file is used like any other file in the system in that +it can be opened, read, and written to using standard system +calls. For each existing terminal file, there is a software processing module +called a +.Em "line discipline" +is associated with it. The +.Em "line discipline" +essentially glues the low level device driver code with the high +level generic interface routines (such as +.Xr read 2 +and +.Xr write 2 ), +and is responsible for implementing the semantics associated +with the device. When a terminal file is first opened by a program, +the default +.Em "line discipline" +called the +.Dv termios +line discipline is associated with the file. This is the primary +line discipline that is used in most cases and provides the semantics +that users normally associate with a terminal. When the +.Dv termios +line discipline is in effect, the terminal file behaves and is +operated according to the rules described in +.Xr termios 4 . +Please refer to that man page for a full description of the terminal +semantics. +The operations described here +generally represent features common +across all +.Em "line disciplines" , +however some of these calls may not +make sense in conjunction with a line discipline other than +.Dv termios , +and some may not be supported by the underlying +hardware (or lack thereof, as in the case of ptys). +.Ss Terminal File Operations +All of the following operations are invoked using the +.Xr ioctl 2 +system call. Refer to that man page for a description of +the +.Em request +and +.Em argp +parameters. +In addition to the ioctl +.Em requests +defined here, the specific line discipline +in effect will define other +.Em requests +specific to it (actually +.Xr termios 4 +defines them as function calls, not ioctl +.Em requests . ) +The following section lists the available ioctl requests. The +name of the request, a description of its purpose, and the typed +.Em argp +parameter (if any) +are listed. For example, the first entry says +.Pp +.D1 Em "TIOCSETD int *ldisc" +.Pp +and would be called on the terminal associated with +file descriptor zero by the following code fragment: +.Bd -literal + int ldisc; + + ldisc = TTYDISC; + ioctl(0, TIOCSETD, &ldisc); +.Ed +.Ss Terminal File Request Descriptions +.Bl -tag -width TIOCGWINSZ +.It Dv TIOCSETD Fa int *ldisc +Change to the new line discipline pointed to by +.Fa ldisc . +The available line disciplines are listed in +.Pa Aq sys/termios.h +and currently are: +.Pp +.Bl -tag -width TIOCGWINSZ -compact +.It TTYDISC +Termios interactive line discipline. +.It TABLDISC +Tablet line discipline. +.It SLIPDISC +Serial IP line discipline. +.El +.Pp +.It Dv TIOCGETD Fa int *ldisc +Return the current line discipline in the integer pointed to by +.Fa ldisc . +.It Dv TIOCSBRK Fa void +Set the terminal hardware into BREAK condition. +.It Dv TIOCCBRK Fa void +Clear the terminal hardware BREAK condition. +.It Dv TIOCSDTR Fa void +Assert data terminal ready (DTR). +.It Dv TIOCCDTR Fa void +Clear data terminal ready (DTR). +.It Dv TIOCGPGRP Fa int *tpgrp +Return the current process group the terminal is associated +with in the integer pointed to by +.Fa tpgrp . +This is the underlying call that implements the +.Xr termios 4 +.Fn tcgetattr +call. +.It Dv TIOCSPGRP Fa int *tpgrp +Associate the terminal with the process group (as an integer) pointed to by +.Fa tpgrp . +This is the underlying call that implements the +.Xr termios 4 +.Fn tcsetattr +call. +.It Dv TIOCGETA Fa struct termios *term +Place the current value of the termios state associated with the +device in the termios structure pointed to by +.Fa term . +This is the underlying call that implements the +.Xr termios 4 +.Fn tcgetattr +call. +.It Dv TIOCSETA Fa struct termios *term +Set the termios state associated with the device immediately. +This is the underlying call that implements the +.Xr termios 4 +.Fn tcsetattr +call with the +.Dv TCSANOW +option. +.It Dv TIOCSETAW Fa struct termios *term +First wait for any output to complete, then set the termios state +associated with the device. +This is the underlying call that implements the +.Xr termios 4 +.Fn tcsetattr +call with the +.Dv TCSADRAIN +option. +.It Dv TIOCSETAF Fa struct termios *term +First wait for any output to complete, clear any pending input, +then set the termios state associated with the device. +This is the underlying call that implements the +.Xr termios 4 +.Fn tcsetattr +call with the +.Dv TCSAFLUSH +option. +.It Dv TIOCOUTQ Fa int *num +Place the current number of characters in the output queue in the +integer pointed to by +.Fa num . +.It Dv TIOCSTI Fa char *cp +Simulate typed input. Pretend as if the terminal received the +character pointed to by +.Fa cp . +.It Dv TIOCNOTTY Fa void +This call is obsolete but left for compatibility. In the past, when +a process that didn't have a controlling terminal (see +.Em The Controlling Terminal +in +.Xr termios 4 ) +first opened a terminal device, it acquired that terminal as its +controlling terminal. For some programs this was a hazard as they +didn't want a controlling terminal in the first place, and this +provided a mechanism to disassociate the controlling terminal from +the calling process. It +.Em must +be called by opening the file +.Pa /dev/tty +and calling +.Dv TIOCNOTTY +on that file descriptor. +.Pp +The current system does not allocate a controlling terminal to +a process on an +.Fn open +call: there is a specific ioctl called +.Dv TIOSCTTY +to make a terminal the controlling +terminal. +In addition, a program can +.Fn fork +and call the +.Fn setsid +system call which will place the process into its own session - which +has the effect of disassociating it from the controlling terminal. This +is the new and preferred method for programs to lose their controlling +terminal. +.It Dv TIOCSTOP Fa void +Stop output on the terminal (like typing ^S at the keyboard). +.It Dv TIOCSTART Fa void +Start output on the terminal (like typing ^Q at the keyboard). +.It Dv TIOCSCTTY Fa void +Make the terminal the controlling terminal for the process (the process +must not currently have a controlling terminal). +.It Dv TIOCDRAIN Fa void +Wait until all output is drained. +.It Dv TIOCEXCL Fa void +Set exclusive use on the terminal. No further opens are permitted +except by root. Of course, this means that programs that are run by +root (or setuid) will not obey the exclusive setting - which limits +the usefulness of this feature. +.It Dv TIOCNXCL Fa void +Clear exclusive use of the terminal. Further opens are permitted. +.It Dv TIOCFLUSH Fa int *what +If the value of the int pointed to by +.Fa what +contains the +.Dv FREAD +bit as defined in +.Pa Aq sys/file.h , +then all characters in the input queue are cleared. If it contains +the +.Dv FWRITE +bit, then all characters in the output queue are cleared. If the +value of the integer is zero, then it behaves as if both the +.Dv FREAD +and +.Dv FWRITE +bits were set (i.e. clears both queues). +.It Dv TIOCGWINSZ Fa struct winsize *ws +Put the window size information associated with the terminal in the +.Va winsize +structure pointed to by +.Fa ws . +The window size structure contains the number of rows and columns (and pixels +if appropriate) of the devices attached to the terminal. It is set by user software +and is the means by which most full\&-screen oriented programs determine the +screen size. The +.Va winsize +structure is defined in +.Pa Aq sys/ioctl.h . +.It Dv TIOCSWINSZ Fa struct winsize *ws +Set the window size associated with the terminal to be the value in +the +.Va winsize +structure pointed to by +.Fa ws +(see above). +.It Dv TIOCCONS Fa int *on +If +.Fa on +points to a non-zero integer, redirect kernel console output (kernel printf's) +to this terminal. +If +.Fa on +points to a zero integer, redirect kernel console output back to the normal +console. This is usually used on workstations to redirect kernel messages +to a particular window. +.It Dv TIOCMSET Fa int *state +The integer pointed to by +.Fa state +contains bits that correspond to modem state. Following is a list +of defined variables and the modem state they represent: +.Pp +.Bl -tag -width TIOCMXCTS -compact +.It TIOCM_LE +Line Enable. +.It TIOCM_DTR +Data Terminal Ready. +.It TIOCM_RTS +Request To Send. +.It TIOCM_ST +Secondary Transmit. +.It TIOCM_SR +Secondary Receive. +.It TIOCM_CTS +Clear To Send. +.It TIOCM_CAR +Carrier Detect. +.It TIOCM_CD +Carier Detect (synonym). +.It TIOCM_RNG +Ring Indication. +.It TIOCM_RI +Ring Indication (synonym). +.It TIOCM_DSR +Data Set Ready. +.El +.Pp +This call sets the terminal modem state to that represented by +.Fa state . +Not all terminals may support this. +.It Dv TIOCMGET Fa int *state +Return the current state of the terminal modem lines as represented +above in the integer pointed to by +.Fa state . +.It Dv TIOCMBIS Fa int *state +The bits in the integer pointed to by +.Fa state +represent modem state as described above, however the state is OR-ed +in with the current state. +.It Dv TIOCMBIC Fa int *state +The bits in the integer pointed to by +.Fa state +represent modem state as described above, however each bit which is on +in +.Fa state +is cleared in the terminal. +.El +.Sh SEE ALSO +.Xr getty 8 , +.Xr ioctl 2 , +.Xr pty 4 , +.Xr stty 1 , +.Xr termios 4 diff --git a/share/man/man4/udp.4 b/share/man/man4/udp.4 new file mode 100644 index 0000000..939866b --- /dev/null +++ b/share/man/man4/udp.4 @@ -0,0 +1,137 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)udp.4 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt UDP 4 +.Os BSD 4.2 +.Sh NAME +.Nm udp +.Nd Internet User Datagram Protocol +.Sh SYNOPSIS +.Fd #include <sys/socket.h> +.Fd #include <netinet/in.h> +.Ft int +.Fn socket AF_INET SOCK_DGRAM 0 +.Sh DESCRIPTION +.Tn UDP +is a simple, unreliable datagram protocol which is used +to support the +.Dv SOCK_DGRAM +abstraction for the Internet +protocol family. +.Tn UDP +sockets are connectionless, and are +normally used with the +.Xr sendto +and +.Xr recvfrom +calls, though the +.Xr connect 2 +call may also be used to fix the destination for future +packets (in which case the +.Xr recv 2 +or +.Xr read 2 +and +.Xr send 2 +or +.Xr write 2 +system calls may be used). +.Pp +.Tn UDP +address formats are identical to those used by +.Tn TCP . +In particular +.Tn UDP +provides a port identifier in addition +to the normal Internet address format. Note that the +.Tn UDP +port +space is separate from the +.Tn TCP +port space (i.e. a +.Tn UDP +port +may not be +.Dq connected +to a +.Tn TCP +port). In addition broadcast +packets may be sent (assuming the underlying network supports +this) by using a reserved +.Dq broadcast address ; +this address +is network interface dependent. +.Pp +Options at the +.Tn IP +transport level may be used with +.Tn UDP ; +see +.Xr ip 4 . +.Sh DIAGNOSTICS +A socket operation may fail with one of the following errors returned: +.Bl -tag -width [EADDRNOTAVAIL] +.It Bq Er EISCONN +when trying to establish a connection on a socket which +already has one, or when trying to send a datagram with the destination +address specified and the socket is already connected; +.It Bq Er ENOTCONN +when trying to send a datagram, but +no destination address is specified, and the socket hasn't been +connected; +.It Bq Er ENOBUFS +when the system runs out of memory for +an internal data structure; +.It Bq Er EADDRINUSE +when an attempt +is made to create a socket with a port which has already been +allocated; +.It Bq Er EADDRNOTAVAIL +when an attempt is made to create a +socket with a network address for which no network interface +exists. +.El +.Sh SEE ALSO +.Xr getsockopt 2 , +.Xr recv 2 , +.Xr send 2 , +.Xr socket 2 , +.Xr intro 4 , +.Xr inet 4 , +.Xr ip 4 +.Sh HISTORY +The +.Nm +protocol appeared in +.Bx 4.2 . diff --git a/share/man/man4/unix.4 b/share/man/man4/unix.4 new file mode 100644 index 0000000..3d05dcd --- /dev/null +++ b/share/man/man4/unix.4 @@ -0,0 +1,161 @@ +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)unix.4 8.1 (Berkeley) 6/9/93 +.\" +.Dd June 9, 1993 +.Dt UNIX 4 +.Os +.Sh NAME +.Nm unix +.Nd UNIX-domain protocol family +.Sh SYNOPSIS +.Fd #include <sys/types.h> +.Fd #include <sys/un.h> +.Sh DESCRIPTION +The +.Tn UNIX Ns -domain +protocol family is a collection of protocols +that provides local (on-machine) interprocess +communication through the normal +.Xr socket 2 +mechanisms. +The +.Tn UNIX Ns -domain +family supports the +.Dv SOCK_STREAM +and +.Dv SOCK_DGRAM +socket types and uses +filesystem pathnames for addressing. +.Sh ADDRESSING +.Tn UNIX Ns -domain +addresses are variable-length filesystem pathnames of +at most 104 characters. +The include file +.Aq Pa sys/un.h +defines this address: +.Bd -literal -offset indent +struct sockaddr_un { +u_char sun_len; +u_char sun_family; +char sun_path[104]; +}; +.Ed +.Pp +Binding a name to a +.Tn UNIX Ns -domain +socket with +.Xr bind 2 +causes a socket file to be created in the filesystem. +This file is +.Em not +removed when the socket is closed\(em\c +.Xr unlink 2 +must be used to remove the file. +.Pp +The +.Tn UNIX Ns -domain +protocol family does not support broadcast addressing or any form +of +.Dq wildcard +matching on incoming messages. +All addresses are absolute- or relative-pathnames +of other +.Tn UNIX Ns -domain +sockets. +Normal filesystem access-control mechanisms are also +applied when referencing pathnames; e.g., the destination +of a +.Xr connect 2 +or +.Xr sendto 2 +must be writable. +.Sh PROTOCOLS +The +.Tn UNIX Ns -domain +protocol family is comprised of simple +transport protocols that support the +.Dv SOCK_STREAM +and +.Dv SOCK_DGRAM +abstractions. +.Dv SOCK_STREAM +sockets also support the communication of +.Ux +file descriptors through the use of the +.Ar msg_control +field in the +.Ar msg +argument to +.Xr sendmsg 2 +and +.Xr recvmsg 2 . +.Pp +Any valid descriptor may be sent in a message. +The file descriptor(s) to be passed are described using a +.Ar struct cmsghdr +that is defined in the include file +.Aq Pa sys/socket.h . +The type of the message is +.Dv SCM_RIGHTS , +and the data portion of the messages is an array of integers +representing the file descriptors to be passed. +The number of descriptors being passed is defined +by the length field of the message; +the length field is the sum of the size of the header +plus the size of the array of file descriptors. +.Pp +The received descriptor is a +.Em duplicate +of the sender's descriptor, as if it were created with a call to +.Xr dup 2 . +Per-process descriptor flags, set with +.Xr fcntl 2 , +are +.Em not +passed to a receiver. +Descriptors that are awaiting delivery, or that are +purposely not received, are automatically closed by the system +when the destination socket is closed. +.Sh SEE ALSO +.Xr socket 2 , +.Xr intro 4 +.Rs +.%T "An Introductory 4.3 BSD Interprocess Communication Tutorial" +.%B PS1 +.%N 7 +.Re +.Rs +.%T "An Advanced 4.3 BSD Interprocess Communication Tutorial" +.%B PS1 +.%N 8 +.Re diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile new file mode 100644 index 0000000..78bf304 --- /dev/null +++ b/share/man/man5/Makefile @@ -0,0 +1,18 @@ +# @(#)Makefile 8.1 (Berkeley) 6/5/93 + +MAN5= a.out.0 acct.0 core.0 dir.0 disktab.0 dump.0 fs.0 fstab.0 \ + group.0 hosts.0 networks.0 passwd.0 phones.0 plot.0 printcap.0 \ + protocols.0 remote.0 resolver.0 services.0 shells.0 stab.0 types.0 \ + utmp.0 +MLINKS= fs.5 inode.5 dump.5 dumpdates.5 utmp.5 wtmp.5 + +all: ${MAN5} + +clean depend lint tags: + +cleandir: + rm -f ${MAN5} + +install: maninstall + +.include <bsd.prog.mk> diff --git a/share/man/man5/a.out.5 b/share/man/man5/a.out.5 new file mode 100644 index 0000000..9ad2876 --- /dev/null +++ b/share/man/man5/a.out.5 @@ -0,0 +1,396 @@ +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" This man page is derived from documentation contributed to Berkeley by +.\" Donn Seeley at UUNET Technologies, Inc. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)a.out.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt A.OUT 5 +.Os +.Sh NAME +.Nm a.out +.Nd format of executable binary files +.Sh SYNOPSIS +.Fd #include <a.out.h> +.Sh DESCRIPTION +The include file +.Aq Pa a.out.h +declares three structures and several macros. +The structures describe the format of +executable machine code files +.Pq Sq binaries +on the system. +.Pp +A binary file consists of up to 7 sections. +In order, these sections are: +.Bl -tag -width "text relocations" +.It exec header +Contains parameters used by the kernel +to load a binary file into memory and execute it, +and by the link editor +.Xr ld 1 +to combine a binary file with other binary files. +This section is the only mandatory one. +.It text segment +Contains machine code and related data +that are loaded into memory when a program executes. +May be loaded read-only. +.It data segment +Contains initialized data; always loaded into writable memory. +.It text relocations +Contains records used by the link editor +to update pointers in the text segment when combining binary files. +.It data relocations +Like the text relocation section, but for data segment pointers. +.It symbol table +Contains records used by the link editor +to cross reference the addresses of named variables and functions +.Pq Sq symbols +between binary files. +.It string table +Contains the character strings corresponding to the symbol names. +.El +.Pp +Every binary file begins with an +.Fa exec +structure: +.Bd -literal -offset indent +struct exec { + unsigned short a_mid; + unsigned short a_magic; + unsigned long a_text; + unsigned long a_data; + unsigned long a_bss; + unsigned long a_syms; + unsigned long a_entry; + unsigned long a_trsize; + unsigned long a_drsize; +}; +.Ed +.Pp +The fields have the following functions: +.Bl -tag -width a_trsize +.It Fa a_mid +Contains a bit pattern that +identifies binaries that were built for +certain sub-classes of an architecture +.Pq Sq machine IDs +or variants of the operating system on a given architecture. +The kernel may not support all machine IDs +on a given architecture. +The +.Fa a_mid +field is not present on some architectures; +in this case, the +.Fa a_magic +field has type +.Em unsigned long . +.It Fa a_magic +Contains a bit pattern +.Pq Sq magic number +that uniquely identifies binary files +and distinguishes different loading conventions. +The field must contain one of the following values: +.Bl -tag -width ZMAGIC +.It Dv OMAGIC +The text and data segments immediately follow the header +and are contiguous. +The kernel loads both text and data segments into writable memory. +.It Dv NMAGIC +As with +.Dv OMAGIC , +text and data segments immediately follow the header and are contiguous. +However, the kernel loads the text into read-only memory +and loads the data into writable memory at the next +page boundary after the text. +.It Dv ZMAGIC +The kernel loads individual pages on demand from the binary. +The header, text segment and data segment are all +padded by the link editor to a multiple of the page size. +Pages that the kernel loads from the text segment are read-only, +while pages from the data segment are writable. +.El +.It Fa a_text +Contains the size of the text segment in bytes. +.It Fa a_data +Contains the size of the data segment in bytes. +.It Fa a_bss +Contains the number of bytes in the +.Sq bss segment +and is used by the kernel to set the initial break +.Pq Xr brk 2 +after the data segment. +The kernel loads the program so that this amount of writable memory +appears to follow the data segment and initially reads as zeroes. +.It Fa a_syms +Contains the size in bytes of the symbol table section. +.It Fa a_entry +Contains the address in memory of the entry point +of the program after the kernel has loaded it; +the kernel starts the execution of the program +from the machine instruction at this address. +.It Fa a_trsize +Contains the size in bytes of the text relocation table. +.It Fa a_drsize +Contains the size in bytes of the data relocation table. +.El +.Pp +The +.Pa a.out.h +include file defines several macros which use an +.Fa exec +structure to test consistency or to locate section offsets in the binary file. +.Bl -tag -width N_BADMAG(exec) +.It Fn N_BADMAG exec +Nonzero if the +.Fa a_magic +field does not contain a recognized value. +.It Fn N_TXTOFF exec +The byte offset in the binary file of the beginning of the text segment. +.It Fn N_SYMOFF exec +The byte offset of the beginning of the symbol table. +.It Fn N_STROFF exec +The byte offset of the beginning of the string table. +.El +.Pp +Relocation records have a standard format which +is described by the +.Fa relocation_info +structure: +.Bd -literal -offset indent +struct relocation_info { + int r_address; + unsigned int r_symbolnum : 24, + r_pcrel : 1, + r_length : 2, + r_extern : 1, + : 4; +}; +.Ed +.Pp +The +.Fa relocation_info +fields are used as follows: +.Bl -tag -width r_symbolnum +.It Fa r_address +Contains the byte offset of a pointer that needs to be link-edited. +Text relocation offsets are reckoned from the start of the text segment, +and data relocation offsets from the start of the data segment. +The link editor adds the value that is already stored at this offset +into the new value that it computes using this relocation record. +.It Fa r_symbolnum +Contains the ordinal number of a symbol structure +in the symbol table (it is +.Em not +a byte offset). +After the link editor resolves the absolute address for this symbol, +it adds that address to the pointer that is undergoing relocation. +(If the +.Fa r_extern +bit is clear, the situation is different; see below.) +.It Fa r_pcrel +If this is set, +the link editor assumes that it is updating a pointer +that is part of a machine code instruction using pc-relative addressing. +The address of the relocated pointer is implicitly added +to its value when the running program uses it. +.It Fa r_length +Contains the log base 2 of the length of the pointer in bytes; +0 for 1-byte displacements, 1 for 2-byte displacements, +2 for 4-byte displacements. +.It Fa r_extern +Set if this relocation requires an external reference; +the link editor must use a symbol address to update the pointer. +When the +.Fa r_extern +bit is clear, the relocation is +.Sq local ; +the link editor updates the pointer to reflect +changes in the load addresses of the various segments, +rather than changes in the value of a symbol. +In this case, the content of the +.Fa r_symbolnum +field is an +.Fa n_type +value (see below); +this type field tells the link editor +what segment the relocated pointer points into. +.El +.Pp +Symbols map names to addresses (or more generally, strings to values). +Since the link-editor adjusts addresses, +a symbol's name must be used to stand for its address +until an absolute value has been assigned. +Symbols consist of a fixed-length record in the symbol table +and a variable-length name in the string table. +The symbol table is an array of +.Fa nlist +structures: +.Bd -literal -offset indent +struct nlist { + union { + char *n_name; + long n_strx; + } n_un; + unsigned char n_type; + char n_other; + short n_desc; + unsigned long n_value; +}; +.Ed +.Pp +The fields are used as follows: +.Bl -tag -width n_un.n_strx +.It Fa n_un.n_strx +Contains a byte offset into the string table +for the name of this symbol. +When a program accesses a symbol table with the +.Xr nlist 3 +function, +this field is replaced with the +.Fa n_un.n_name +field, which is a pointer to the string in memory. +.It Fa n_type +Used by the link editor to determine +how to update the symbol's value. +The +.Fa n_type +field is broken down into three sub-fields using bitmasks. +The link editor treats symbols with the +.Dv N_EXT +type bit set as +.Sq external +symbols and permits references to them from other binary files. +The +.Dv N_TYPE +mask selects bits of interest to the link editor: +.Bl -tag -width N_TEXT +.It Dv N_UNDF +An undefined symbol. +The link editor must locate an external symbol with the same name +in another binary file to determine the absolute value of this symbol. +As a special case, if the +.Fa n_value +field is nonzero and no binary file in the link-edit defines this symbol, +the link-editor will resolve this symbol to an address +in the bss segment, +reserving an amount of bytes equal to +.Fa n_value . +If this symbol is undefined in more than one binary file +and the binary files do not agree on the size, +the link editor chooses the greatest size found across all binaries. +.It Dv N_ABS +An absolute symbol. +The link editor does not update an absolute symbol. +.It Dv N_TEXT +A text symbol. +This symbol's value is a text address and +the link editor will update it when it merges binary files. +.It Dv N_DATA +A data symbol; similar to +.Dv N_TEXT +but for data addresses. +The values for text and data symbols are not file offsets but +addresses; to recover the file offsets, it is necessary +to identify the loaded address of the beginning of the corresponding +section and subtract it, then add the offset of the section. +.It Dv N_BSS +A bss symbol; like text or data symbols but +has no corresponding offset in the binary file. +.It Dv N_FN +A filename symbol. +The link editor inserts this symbol before +the other symbols from a binary file when +merging binary files. +The name of the symbol is the filename given to the link editor, +and its value is the first text address from that binary file. +Filename symbols are not needed for link-editing or loading, +but are useful for debuggers. +.El +.Pp +The +.Dv N_STAB +mask selects bits of interest to symbolic debuggers +such as +.Xr gdb 1 ; +the values are described in +.Xr stab 5 . +.It Fa n_other +This field is currently unused. +.It Fa n_desc +Reserved for use by debuggers; passed untouched by the link editor. +Different debuggers use this field for different purposes. +.It Fa n_value +Contains the value of the symbol. +For text, data and bss symbols, this is an address; +for other symbols (such as debugger symbols), +the value may be arbitrary. +.El +.Pp +The string table consists of an +.Em unsigned long +length followed by null-terminated symbol strings. +The length represents the size of the entire table in bytes, +so its minimum value (or the offset of the first string) +is always 4 on 32-bit machines. +.Sh SEE ALSO +.Xr ld 1 , +.Xr execve 2 , +.Xr nlist 3 , +.Xr core 5 , +.Xr dbx 5 , +.Xr stab 5 +.Sh HISTORY +The +.Pa a.out.h +include file appeared in +.At v7 . +.Sh BUGS +Since not all of the supported architectures use the +.Fa a_mid +field, +it can be difficult to determine what +architecture a binary will execute on +without examining its actual machine code. +Even with a machine identifier, +the byte order of the +.Fa exec +header is machine-dependent. +.Pp +Nobody seems to agree on what +.Em bss +stands for. +.Pp +New binary file formats may be supported in the future, +and they probably will not be compatible at any level +with this ancient format. diff --git a/share/man/man5/acct.5 b/share/man/man5/acct.5 new file mode 100644 index 0000000..7cb4c3d --- /dev/null +++ b/share/man/man5/acct.5 @@ -0,0 +1,110 @@ +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)acct.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt ACCT 5 +.Os +.Sh NAME +.Nm acct +.Nd execution accounting file +.Sh SYNOPSIS +.Fd #include <sys/acct.h> +.Sh DESCRIPTION +The kernel maintains the following +.Fa acct +information structure for all +processes. If a process terminates, and accounting is enabled, +the kernel calls the +.Xr acct 2 +function call to prepare and append the record +to the accounting file. +.Bd -literal +/* + * Accounting structures; these use a comp_t type which is a 3 bits base 8 + * exponent, 13 bit fraction ``floating point'' number. Units are 1/AHZ + * seconds. + */ +typedef u_short comp_t; + +struct acct { + char ac_comm[10]; /* name of command */ + comp_t ac_utime; /* user time */ + comp_t ac_stime; /* system time */ + comp_t ac_etime; /* elapsed time */ + time_t ac_btime; /* starting time */ + uid_t ac_uid; /* user id */ + gid_t ac_gid; /* group id */ + short ac_mem; /* memory usage average */ + comp_t ac_io; /* count of IO blocks */ + dev_t ac_tty; /* controlling tty */ +#define AFORK 0x01 /* forked but not execed */ +#define ASU 0x02 /* used super-user permissions */ +#define ACOMPAT 0x04 /* used compatibility mode */ +#define ACORE 0x08 /* dumped core */ +#define AXSIG 0x10 /* killed by a signal */ + char ac_flag; /* accounting flags */ +}; + +/* + * 1/AHZ is the granularity of the data encoded in the comp_t fields. + * This is not necessarily equal to hz. + */ +#define AHZ 64 + +#ifdef KERNEL +struct vnode *acctp; +#endif +.Ed +.Pp +If a terminated process was created by an +.Xr execve 2 , +the name of the executed file (at most ten characters of it) +is saved in the field +.Fa ac_comm +and its status is saved by setting one of more of the following flags in +.Fa ac_flag: +.Dv AFORK , +.Dv ASU , +.Dv ACOMPAT , +.Dv ACORE +and +.Dv ASIG . +.Sh SEE ALSO +.Xr acct 2 , +.Xr execve 2 , +.Xr sa 8 +.Sh HISTORY +A +.Nm +file format appeared in +.At v7 . diff --git a/share/man/man5/core.5 b/share/man/man5/core.5 new file mode 100644 index 0000000..e4b5f47 --- /dev/null +++ b/share/man/man5/core.5 @@ -0,0 +1,111 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)core.5 8.3 (Berkeley) 12/11/93 +.\" +.Dd December 11, 1993 +.Dt CORE 5 +.Os BSD 4 +.Sh NAME +.Nm core +.Nd memory image file format +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Sh DESCRIPTION +A small number of signals which cause abnormal termination of a process +also cause a record of the process's in-core state to be written +to disk for later examination by one of the available debuggers. +(See +.Xr sigaction 2 . ) +This memory image is written to a file named +.Nm programname.core +in the working directory; +provided the terminated process had write permission in the directory, +and provided the abnormality did not cause +a system crash. +(In this event, the decision to save the core file is arbitrary, see +.Xr savecore 8 . ) +.Pp +The maximum size of a +.Nm programname.core +file is limited by +.Xr setrlimit 2 . +Files which would be larger than the limit are not created. +.Pp +The +.Nm programname.core +file consists of the +.Fa u . +area, whose size (in pages) is +defined by the +.Dv UPAGES +manifest in the +.Aq Pa sys/param.h +file. The +.Fa u . +area starts with a +.Fa user +structure as given in +.Aq Pa sys/user.h . +The remainder of the +.Nm programname.core +file consists of the data pages followed by +the stack pages of the process image. +The amount of data space image in the +.Nm programname.core +file is given (in pages) by the +variable +.Fa u_dsize +in the +.Fa u . +area. +The amount of stack image in the core file is given (in pages) by the +variable +.Fa u_ssize +in the +.Ar u . +area. +The size of a ``page'' is given by the constant +.Dv NBPG +(also from +.Aq Pa sys/param.h ) . +.Sh SEE ALSO +.Xr adb 1 , +.Xr dbx 1 , +.Xr gdb 1 , +.Xr kgdb 1 , +.Xr sigaction 2 , +.Xr setrlimit 2 +.Sh HISTORY +A +.Nm core +file format appeared in +.At v6 . diff --git a/share/man/man5/dir.5 b/share/man/man5/dir.5 new file mode 100644 index 0000000..39d7b77 --- /dev/null +++ b/share/man/man5/dir.5 @@ -0,0 +1,151 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)dir.5 8.3 (Berkeley) 4/19/94 +.\" +.Dd April 19, 1994 +.Dt DIR 5 +.Os BSD 4.2 +.Sh NAME +.Nm dir , +.Nm dirent +.Nd directory file format +.Sh SYNOPSIS +.Fd #include <sys/types.h> +.Fd #include <sys/dir.h> +.Sh DESCRIPTION +Directories provide a convenient hierarchical method of grouping +files while obscuring the underlying details of the storage medium. +A directory file is differentiated from a plain file +by a flag in its +.Xr inode 5 +entry. +It consists of records (directory entries) each of which contains +information about a file and a pointer to the file itself. +Directory entries may contain other directories +as well as plain files; such nested directories are refered to as +subdirectories. +A hierarchy of directories and files is formed in this manner +and is called a file system (or referred to as a file system tree). +.\" An entry in this tree, +.\" nested or not nested, +.\" is a pathname. +.Pp +Each directory file contains two special directory entries; one is a pointer +to the directory itself +called dot +.Ql \&. +and the other a pointer to its parent directory called dot-dot +.Ql \&.. . +Dot and dot-dot +are valid pathnames, however, +the system root directory +.Ql / , +has no parent and dot-dot points to itself like dot. +.Pp +File system nodes are ordinary directory files on which has +been grafted a file system object, such as a physical disk or a +partitioned area of such a disk. +(See +.Xr mount 1 +and +.Xr mount 8 . ) +.Pp +The directory entry format is defined in the file +.Aq dirent.h : +.Bd -literal +#ifndef _DIRENT_H_ +#define _DIRENT_H_ + +/* +* A directory entry has a struct dirent at the front of it, containing its +* inode number, the length of the entry, and the length of the name +* contained in the entry. These are followed by the name padded to a 4 +* byte boundary with null bytes. All names are guaranteed null terminated. +* The maximum length of a name in a directory is MAXNAMLEN. +*/ + +struct dirent { + u_long d_fileno; /* file number of entry */ + u_short d_reclen; /* length of this record */ + u_short d_namlen; /* length of string in d_name */ +#ifdef _POSIX_SOURCE + char d_name[MAXNAMLEN + 1]; /* maximum name length */ +#else +#define MAXNAMLEN 255 + char d_name[MAXNAMLEN + 1]; /* maximum name length */ +#endif + +}; + +#ifdef _POSIX_SOURCE +typedef void * DIR; +#else + +#define d_ino d_fileno /* backward compatibility */ + +/* definitions for library routines operating on directories. */ +#define DIRBLKSIZ 1024 + +/* structure describing an open directory. */ +typedef struct _dirdesc { + int dd_fd; /* file descriptor associated with directory */ + long dd_loc; /* offset in current buffer */ + long dd_size; /* amount of data returned by getdirentries */ + char *dd_buf; /* data buffer */ + int dd_len; /* size of data buffer */ + long dd_seek; /* magic cookie returned by getdirentries */ +} DIR; + +#define dirfd(dirp) ((dirp)->dd_fd) + +#ifndef NULL +#define NULL 0 +#endif + +#endif /* _POSIX_SOURCE */ + +#ifndef KERNEL + +#include <sys/cdefs.h> + +#endif /* !KERNEL */ + +#endif /* !_DIRENT_H_ */ +.Ed +.Sh SEE ALSO +.Xr fs 5 +.Xr inode 5 +.Sh HISTORY +A +.Nm +file format appeared in +.At v7 . diff --git a/share/man/man5/disktab.5 b/share/man/man5/disktab.5 new file mode 100644 index 0000000..6fd204a --- /dev/null +++ b/share/man/man5/disktab.5 @@ -0,0 +1,142 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)disktab.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt DISKTAB 5 +.Os BSD 4.2 +.Sh NAME +.Nm disktab +.Nd disk description file +.Sh SYNOPSIS +.Fd #include <disktab.h> +.Sh DESCRIPTION +.Nm Disktab +is a simple database which describes disk geometries and +disk partition characteristics. +It is used +.\"by the formatter(\c +.\"IR.Xr format 8 ) +.\"to determine how to format the disk, and +to initialize the disk label on the disk. +The format is patterned +after the +.Xr termcap 5 +terminal data base. Entries in +.Nm disktab +consist of a number of `:' separated fields. The +first entry for each disk gives the names which are +known for the disk, separated by `|' characters. The +last name given should be a long name fully identifying +the disk. +.Pp +The following list indicates the normal values +stored for each disk entry. +.Bl -column "indent" "boolx" +.It Sy Name Type Description +.It "\&ty str Type of disk (e.g. removable, winchester)" +.It "\&dt str Type of controller (e.g." +.Tn SMD , ESDI , +floppy) +.It "\&ns num Number of sectors per track" +.It "\&nt num Number of tracks per cylinder" +.It "\&nc num Total number of cylinders on the disk" +.It "\&sc num Number of sectors per cylinder, nc*nt default" +.It "\&su num Number of sectors per unit, sc*nc default" +.It "\&se num Sector size in bytes," +.Dv DEV_BSIZE +default +.It "\&sf bool Controller supports bad144-style bad sector forwarding" +.It "\&rm num Rotation speed, rpm, 3600 default" +.It "\&sk num Sector skew per track, default 0" +.It "\&cs num Sector skew per cylinder, default 0" +.It "\&hs num Headswitch time, usec, default 0" +.It "\&ts num One-cylinder seek time, usec, default 0" +.It "\&il num Sector interleave (n:1), 1 default" +.It "\&d[0-4] num Drive-type-dependent parameters" +.It "\&bs num Boot block size, default" +.Dv BBSIZE +.It "\&sb num Superblock size, default" +.Dv SBSIZE +.It "\&ba num Block size for partition `a' (bytes)" +.It "\&bd num Block size for partition `d' (bytes)" +.It "\&be num Block size for partition `e' (bytes)" +.It "\&bf num Block size for partition `f' (bytes)" +.It "\&bg num Block size for partition `g' (bytes)" +.It "\&bh num Block size for partition `h' (bytes)" +.It "\&fa num Fragment size for partition `a' (bytes)" +.It "\&fd num Fragment size for partition `d' (bytes)" +.It "\&fe num Fragment size or partition `e' (bytes)" +.It "\&ff num Fragment size for partition `f' (bytes)" +.It "\&fg num Fragment size for partition `g' (bytes)" +.It "\&fh num Fragment size for partition `h' (bytes)" +.It "\&oa num Offset of partition `a' in sectors" +.It "\&ob num Offset of partition `b' in sectors" +.It "\&oc num Offset of partition `c' in sectors" +.It "\&od num Offset of partition `d' in sectors" +.It "\&oe num Offset of partition `e' in sectors" +.It "\&of num Offset of partition `f' in sectors" +.It "\&og num Offset of partition `g' in sectors" +.It "\&oh num Offset of partition `h' in sectors" +.It "\&pa num Size of partition `a' in sectors" +.It "\&pb num Size of partition `b' in sectors" +.It "\&pc num Size of partition `c' in sectors" +.It "\&pd num Size of partition `d' in sectors" +.It "\&pe num Size of partition `e' in sectors" +.It "\&pf num Size of partition `f' in sectors" +.It "\&pg num Size of partition `g' in sectors" +.It "\&ph num Size of partition `h' in sectors" +.It "\&ta str Partition type of partition `a'" +.Pf ( Bx 4.2 +filesystem, swap, etc) +.It "\&tb str Partition type of partition `b'" +.It "\&tc str Partition type of partition `c'" +.It "\&td str Partition type of partition `d'" +.It "\&te str Partition type of partition `e'" +.It "\&tf str Partition type of partition `f'" +.It "\&tg str Partition type of partition `g'" +.It "\&th str Partition type of partition `h'" +.El +.Sh FILES +.Bl -tag -width /etc/disktab -compact +.It Pa /etc/disktab +.El +.Sh SEE ALSO +.Xr getdiskbyname 3 , +.Xr disklabel 5 , +.Xr disklabel 8 , +.Xr newfs 8 +.Sh HISTORY +The +.Nm +description file appeared in +.Bx 4.2 . diff --git a/share/man/man5/fs.5 b/share/man/man5/fs.5 new file mode 100644 index 0000000..12bb912 --- /dev/null +++ b/share/man/man5/fs.5 @@ -0,0 +1,342 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)fs.5 8.2 (Berkeley) 4/19/94 +.\" +.Dd April 19, 1994 +.Dt FS 5 +.Os BSD 4.2 +.Sh NAME +.Nm fs , +.Nm inode +.Nd format of file system volume +.Sh SYNOPSIS +.Fd #include <sys/types.h> +.Fd #include <ufs/fs.h> +.Fd #include <ufs/inode.h> +.Sh DESCRIPTION +The files +.Aq Pa fs.h +and +.Aq Pa inode.h +declare several structures, defined variables and macros +which are used to create and manage the underlying format of +file system objects on random access devices (disks). +.Pp +The block size and number of blocks which +comprise a file system are parameters of the file system. +Sectors beginning at +.Dv BBLOCK +and continuing for +.Dv BBSIZE +are used +for a disklabel and for some hardware primary +and secondary bootstrapping programs. +.Pp +The actual file system begins at sector +.Dv SBLOCK +with the +.Em super-block +that is of size +.Dv SBSIZE . +The following structure described the super-block and is +from the file +.Aq Pa ufs/fs.h : +.Bd -literal +#define FS_MAGIC 0x011954 +struct fs { + struct fs *fs_link; /* linked list of file systems */ + struct fs *fs_rlink; /* used for incore super blocks */ + daddr_t fs_sblkno; /* addr of super-block in filesys */ + daddr_t fs_cblkno; /* offset of cyl-block in filesys */ + daddr_t fs_iblkno; /* offset of inode-blocks in filesys */ + daddr_t fs_dblkno; /* offset of first data after cg */ + long fs_cgoffset; /* cylinder group offset in cylinder */ + long fs_cgmask; /* used to calc mod fs_ntrak */ + time_t fs_time; /* last time written */ + long fs_size; /* number of blocks in fs */ + long fs_dsize; /* number of data blocks in fs */ + long fs_ncg; /* number of cylinder groups */ + long fs_bsize; /* size of basic blocks in fs */ + long fs_fsize; /* size of frag blocks in fs */ + long fs_frag; /* number of frags in a block in fs */ +/* these are configuration parameters */ + long fs_minfree; /* minimum percentage of free blocks */ + long fs_rotdelay; /* num of ms for optimal next block */ + long fs_rps; /* disk revolutions per second */ +/* these fields can be computed from the others */ + long fs_bmask; /* ``blkoff'' calc of blk offsets */ + long fs_fmask; /* ``fragoff'' calc of frag offsets */ + long fs_bshift; /* ``lblkno'' calc of logical blkno */ + long fs_fshift; /* ``numfrags'' calc number of frags */ +/* these are configuration parameters */ + long fs_maxcontig; /* max number of contiguous blks */ + long fs_maxbpg; /* max number of blks per cyl group */ +/* these fields can be computed from the others */ + long fs_fragshift; /* block to frag shift */ + long fs_fsbtodb; /* fsbtodb and dbtofsb shift constant */ + long fs_sbsize; /* actual size of super block */ + long fs_csmask; /* csum block offset */ + long fs_csshift; /* csum block number */ + long fs_nindir; /* value of NINDIR */ + long fs_inopb; /* value of INOPB */ + long fs_nspf; /* value of NSPF */ +/* yet another configuration parameter */ + long fs_optim; /* optimization preference, see below */ +/* these fields are derived from the hardware */ + long fs_npsect; /* # sectors/track including spares */ + long fs_interleave; /* hardware sector interleave */ + long fs_trackskew; /* sector 0 skew, per track */ + long fs_headswitch; /* head switch time, usec */ + long fs_trkseek; /* track-to-track seek, usec */ +/* sizes determined by number of cylinder groups and their sizes */ + daddr_t fs_csaddr; /* blk addr of cyl grp summary area */ + long fs_cssize; /* size of cyl grp summary area */ + long fs_cgsize; /* cylinder group size */ +/* these fields are derived from the hardware */ + long fs_ntrak; /* tracks per cylinder */ + long fs_nsect; /* sectors per track */ + long fs_spc; /* sectors per cylinder */ +/* this comes from the disk driver partitioning */ + long fs_ncyl; /* cylinders in file system */ +/* these fields can be computed from the others */ + long fs_cpg; /* cylinders per group */ + long fs_ipg; /* inodes per group */ + long fs_fpg; /* blocks per group * fs_frag */ +/* this data must be re-computed after crashes */ + struct csum fs_cstotal; /* cylinder summary information */ +/* these fields are cleared at mount time */ + char fs_fmod; /* super block modified flag */ + char fs_clean; /* file system is clean flag */ + char fs_ronly; /* mounted read-only flag */ + char fs_flags; /* currently unused flag */ + char fs_fsmnt[MAXMNTLEN]; /* name mounted on */ +/* these fields retain the current block allocation info */ + long fs_cgrotor; /* last cg searched */ + struct csum *fs_csp[MAXCSBUFS]; /* list of fs_cs info buffers */ + long fs_cpc; /* cyl per cycle in postbl */ + short fs_opostbl[16][8]; /* old rotation block list head */ + long fs_sparecon[56]; /* reserved for future constants */ + quad fs_qbmask; /* ~fs_bmask - for use with quad size */ + quad fs_qfmask; /* ~fs_fmask - for use with quad size */ + long fs_postblformat; /* format of positional layout tables */ + long fs_nrpos; /* number of rotational positions */ + long fs_postbloff; /* (short) rotation block list head */ + long fs_rotbloff; /* (u_char) blocks for each rotation */ + long fs_magic; /* magic number */ + u_char fs_space[1]; /* list of blocks for each rotation */ +/* actually longer */ +}; +.Ed +.Pp +Each disk drive contains some number of file systems. +A file system consists of a number of cylinder groups. +Each cylinder group has inodes and data. +.Pp +A file system is described by its super-block, which in turn +describes the cylinder groups. The super-block is critical +data and is replicated in each cylinder group to protect against +catastrophic loss. This is done at file system creation +time and the critical +super-block data does not change, so the copies need not be +referenced further unless disaster strikes. +.Pp +Addresses stored in inodes are capable of addressing fragments +of `blocks'. File system blocks of at most size +.Dv MAXBSIZE +can +be optionally broken into 2, 4, or 8 pieces, each of which is +addressable; these pieces may be +.Dv DEV_BSIZE , +or some multiple of +a +.Dv DEV_BSIZE +unit. +.Pp +Large files consist of exclusively large data blocks. To avoid +undue wasted disk space, the last data block of a small file is +allocated as only as many fragments of a large block as are +necessary. The file system format retains only a single pointer +to such a fragment, which is a piece of a single large block that +has been divided. The size of such a fragment is determinable from +information in the inode, using the +.Fn blksize fs ip lbn +macro. +.Pp +The file system records space availability at the fragment level; +to determine block availability, aligned fragments are examined. +.Pp +The root inode is the root of the file system. +Inode 0 can't be used for normal purposes and +historically bad blocks were linked to inode 1, +thus the root inode is 2 (inode 1 is no longer used for +this purpose, however numerous dump tapes make this +assumption, so we are stuck with it). +.Pp +The +.Fa fs_minfree +element gives the minimum acceptable percentage of file system +blocks that may be free. If the freelist drops below this level +only the super-user may continue to allocate blocks. +The +.Fa fs_minfree +element +may be set to 0 if no reserve of free blocks is deemed necessary, +however severe performance degradations will be observed if the +file system is run at greater than 90% full; thus the default +value of +.Fa fs_minfree +is 10%. +.Pp +Empirically the best trade-off between block fragmentation and +overall disk utilization at a loading of 90% comes with a +fragmentation of 8, thus the default fragment size is an eighth +of the block size. +.Pp +The element +.Fa fs_optim +specifies whether the file system should try to minimize the time spent +allocating blocks, or if it should attempt to minimize the space +fragmentation on the disk. +If the value of fs_minfree (see above) is less than 10%, +then the file system defaults to optimizing for space to avoid +running out of full sized blocks. +If the value of minfree is greater than or equal to 10%, +fragmentation is unlikely to be problematical, and +the file system defaults to optimizing for time. +.Pp +.Em Cylinder group related limits : +Each cylinder keeps track of the availability of blocks at different +rotational positions, so that sequential blocks can be laid out +with minimum rotational latency. With the default of 8 distinguished +rotational positions, the resolution of the +summary information is 2ms for a typical 3600 rpm drive. +.Pp +The element +.Fa fs_rotdelay +gives the minimum number of milliseconds to initiate +another disk transfer on the same cylinder. +It is used in determining the rotationally optimal +layout for disk blocks within a file; +the default value for +.Fa fs_rotdelay +is 2ms. +.Pp +Each file system has a statically allocated number of inodes. +An inode is allocated for each +.Dv NBPI +bytes of disk space. +The inode allocation strategy is extremely conservative. +.Pp +.Dv MINBSIZE +is the smallest allowable block size. +With a +.Dv MINBSIZE +of 4096 +it is possible to create files of size +2^32 with only two levels of indirection. +.Dv MINBSIZE +must be big enough to hold a cylinder group block, +thus changes to +.Pq Fa struct cg +must keep its size within +.Dv MINBSIZE . +Note that super-blocks are never more than size +.Dv SBSIZE . +.Pp +The path name on which the file system is mounted is maintained in +.Fa fs_fsmnt . +.Dv MAXMNTLEN +defines the amount of space allocated in +the super-block for this name. +The limit on the amount of summary information per file system +is defined by +.Dv MAXCSBUFS. +For a 4096 byte block size, it is currently parameterized for a +maximum of two million cylinders. +.Pp +Per cylinder group information is summarized in blocks allocated +from the first cylinder group's data blocks. +These blocks are read in from +.Fa fs_csaddr +(size +.Fa fs_cssize ) +in addition to the super-block. +.Pp +.Sy N.B.: +.Xr sizeof Pq Fa struct csum +must be a power of two in order for +the +.Fn fs_cs +macro to work. +.Pp +The +.Em "Super-block for a file system" : +The size of the rotational layout tables +is limited by the fact that the super-block is of size +.Dv SBSIZE . +The size of these tables is +.Em inversely +proportional to the block +size of the file system. The size of the tables is +increased when sector sizes are not powers of two, +as this increases the number of cylinders +included before the rotational pattern repeats +.Pq Fa fs_cpc . +The size of the rotational layout +tables is derived from the number of bytes remaining in +.Pq Fa struct fs . +.Pp +The number of blocks of data per cylinder group +is limited because cylinder groups are at most one block. +The inode and free block tables +must fit into a single block after deducting space for +the cylinder group structure +.Pq Fa struct cg . +.Pp +The +.Em Inode : +The inode is the focus of all file activity in the +.Tn UNIX +file system. +There is a unique inode allocated +for each active file, +each current directory, each mounted-on file, +text file, and the root. +An inode is `named' by its device/i-number pair. +For further information, see the include file +.Aq Pa sys/inode.h . +.Sh HISTORY +A super-block structure named filsys appeared in +.At v6 . +The file system described in this manual appeared +in +.Bx 4.2 . diff --git a/share/man/man5/fstab.5 b/share/man/man5/fstab.5 new file mode 100644 index 0000000..7949e56 --- /dev/null +++ b/share/man/man5/fstab.5 @@ -0,0 +1,226 @@ +.\" Copyright (c) 1980, 1989, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)fstab.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt FSTAB 5 +.Os BSD 4 +.Sh NAME +.Nm fstab +.Nd static information about the filesystems +.Sh SYNOPSIS +.Fd #include <fstab.h> +.Sh DESCRIPTION +The file +.Nm fstab +contains descriptive information about the various file +systems. +.Nm fstab +is only read by programs, and not written; +it is the duty of the system administrator to properly create +and maintain this file. +Each filesystem is described on a separate line; +fields on each line are separated by tabs or spaces. +The order of records in +.Nm fstab +is important because +.Xr fsck 8 , +.Xr mount 8 , +and +.Xr umount 8 +sequentially iterate through +.Nm fstab +doing their thing. +.Pp +The first field, +.Pq Fa fs_spec , +describes the block special device or +remote filesystem to be mounted. +For filesystems of type +.Em ufs , +the special file name is the block special file name, +and not the character special file name. +If a program needs the character special file name, +the program must create it by appending a ``r'' after the +last ``/'' in the special file name. +.Pp +The second field, +.Pq Fa fs_file , +describes the mount point for the filesystem. +For swap partitions, this field should be specified as ``none''. +.Pp +The third field, +.Pq Fa fs_vfstype , +describes the type of the filesystem. +The system currently supports four types of filesystems: +.Bl -tag -width indent -offset indent +.It Em ufs +a local +.Tn UNIX +filesystem +.It Em mfs +a local memory-based +.Tn UNIX +filesystem +.It Em nfs +a Sun Microsystems compatible ``Network File System'' +.It Em swap +a disk partition to be used for swapping +.El +.Pp +The fourth field, +.Pq Fa fs_mntops , +describes the mount options associated with the filesystem. +It is formatted as a comma separated list of options. +It contains at least the type of mount (see +.Fa fs_type +below) plus any additional options +appropriate to the filesystem type. +.Pp +If the options ``userquota'' and/or ``groupquota'' are specified, +the filesystem is automatically processed by the +.Xr quotacheck 8 +command, and user and/or group disk quotas are enabled with +.Xr quotaon 8 . +By default, +filesystem quotas are maintained in files named +.Pa quota.user +and +.Pa quota.group +which are located at the root of the associated filesystem. +These defaults may be overridden by putting an equal sign +and an alternative absolute pathname following the quota option. +Thus, if the user quota file for +.Pa /tmp +is stored in +.Pa /var/quotas/tmp.user , +this location can be specified as: +.Bd -literal -offset indent +userquota=/var/quotas/tmp.user +.Ed +.Pp +The type of the mount is extracted from the +.Fa fs_mntops +field and stored separately in the +.Fa fs_type +field (it is not deleted from the +.Fa fs_mntops +field). +If +.Fa fs_type +is ``rw'' or ``ro'' then the filesystem whose name is given in the +.Fa fs_file +field is normally mounted read-write or read-only on the +specified special file. +If +.Fa fs_type +is ``sw'' then the special file is made available as a piece of swap +space by the +.Xr swapon 8 +command at the end of the system reboot procedure. +The fields other than +.Fa fs_spec +and +.Fa fs_type +are unused. +If +.Fa fs_type +is specified as ``xx'' the entry is ignored. +This is useful to show disk partitions which are currently unused. +.Pp +The fifth field, +.Pq Fa fs_freq , +is used for these filesystems by the +.Xr dump 8 +command to determine which filesystems need to be dumped. +If the fifth field is not present, a value of zero is returned and +.Xr dump +will assume that the filesystem does not need to be dumped. +.Pp +The sixth field, +.Pq Fa fs_passno , +is used by the +.Xr fsck 8 +program to determine the order in which filesystem checks are done +at reboot time. +The root filesystem should be specified with a +.Fa fs_passno +of 1, and other filesystems should have a +.Fa fs_passno +of 2. +Filesystems within a drive will be checked sequentially, +but filesystems on different drives will be checked at the +same time to utilize parallelism available in the hardware. +If the sixth field is not present or zero, +a value of zero is returned and +.Xr fsck +will assume that the filesystem does not need to be checked. +.Bd -literal +#define FSTAB_RW "rw" /* read-write device */ +#define FSTAB_RO "ro" /* read-only device */ +#define FSTAB_SW "sw" /* swap device */ +#define FSTAB_XX "xx" /* ignore totally */ + +struct fstab { + char *fs_spec; /* block special device name */ + char *fs_file; /* filesystem path prefix */ + char *fs_vfstype; /* type of filesystem */ + char *fs_mntops; /* comma separated mount options */ + char *fs_type; /* rw, ro, sw, or xx */ + int fs_freq; /* dump frequency, in days */ + int fs_passno; /* pass number on parallel dump */ +}; +.Ed +.Pp +The proper way to read records from +.Pa fstab +is to use the routines +.Xr getfsent 3 , +.Xr getfsspec 3 , +.Xr getfstype 3 , +and +.Xr getfsfile 3 . +.Sh FILES +.Bl -tag -width /etc/fstab -compact +.It Pa /etc/fstab +The file +.Nm fstab +resides in +.Pa /etc . +.El +.Sh SEE ALSO +.Xr getfsent 3 +.Sh HISTORY +The +.Nm +file format appeared in +.Bx 4.0 . diff --git a/share/man/man5/group.5 b/share/man/man5/group.5 new file mode 100644 index 0000000..958494b --- /dev/null +++ b/share/man/man5/group.5 @@ -0,0 +1,123 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)group.5 8.3 (Berkeley) 4/19/94 +.\" +.Dd April 19, 1994 +.Dt GROUP 5 +.Os +.Sh NAME +.Nm group +.Nd format of the group permissions file +.Sh DESCRIPTION +The file +.Aq Pa /etc/group +consists of newline separated +.Tn ASCII +records, one per group, containing four colon +.Ql \&: +separated fields. These fields are as follows: +.Bl -tag -width password -offset indent -compact +.It group +Name of the group. +.It passwd +Group's +.Em encrypted +password. +.It gid +The group's decimal ID. +.It member +Group members. +.El +.Pp +The +.Ar group +field is the group name used for granting file access to users +who are members of the group. +The +.Ar gid +field is the number associated with the group name. +They should both be unique across the system (and often +across a group of systems) since they control file access. +The +.Ar passwd +field +is an optional +.Em encrypted +password. +This field is rarely used +and an asterisk is normally placed in it rather than leaving it blank. +The +.Ar member +field contains the names of users granted the privileges of +.Ar group . +The member names are separated by commas without spaces or newlines. +A user is automatically in a group if that group was specified +in their +.Pa /etc/passwd +entry and does not need to be added to that group in the +.Pa /etc/group file. +.\" .Pp +.\" When the system reads the file +.\" .Pa /etc/group +.\" the fields are read into the structure +.\" .Fa group +.\" declared in +.\" .Aq Pa grp.h : +.\" .Bd -literal -offset indent +.\" struct group { +.\" char *gr_name; /* group name */ +.\" char *gr_passwd; /* group password */ +.\" int gr_gid; /* group id */ +.\" char **gr_mem; /* group members */ +.\" }; +.\" .Ed +.Sh FILES +.Bl -tag -width /etc/group -compact +.It Pa /etc/group +.El +.Sh SEE ALSO +.Xr setgroups 2 , +.Xr initgroups 3 , +.Xr crypt 3 , +.Xr passwd 1 , +.Xr passwd 5 +.Sh BUGS +The +.Xr passwd 1 +command does not change the +.Nm group +passwords. +.Sh HISTORY +A +.Nm +file format appeared in +.At v6 . diff --git a/share/man/man5/hosts.5 b/share/man/man5/hosts.5 new file mode 100644 index 0000000..81a9587 --- /dev/null +++ b/share/man/man5/hosts.5 @@ -0,0 +1,109 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)hosts.5 8.2 (Berkeley) 12/11/93 +.\" +.Dd December 11, 1993 +.Dt HOSTS 5 +.Os BSD 4.2 +.Sh NAME +.Nm hosts +.Nd host name data base +.Sh DESCRIPTION +The +.Nm hosts +file contains information regarding +the known hosts on the network. +For each host a single line should be present +with the following information: +.Bd -unfilled -offset indent +official host name +Internet address +aliases +.Ed +.Pp +Items are separated by any number of blanks and/or +tab characters. A ``#'' indicates the beginning of +a comment; characters up to the end of the line are +not interpreted by routines which search the file. +.Pp +When using the name server +.Xr named 8 , +this file provides a backup when the name server +is not running. +For the name server, it is suggested that only a few addresses +be included in this file. +These include address for the local interfaces that +.Xr ifconfig 8 +needs at boot time and a few machines on the local network. +.Pp +This file may be created from the official host +data base maintained at the Network Information Control +Center +.Pq Tn NIC , +though local changes may be required +to bring it up to date regarding unofficial aliases +and/or unknown hosts. As the data base maintained at +.Tn NIC +is incomplete, use of the name server is recommended for +sites on the +.Tn DARPA +Internet. +.Pp +Network addresses are specified in the conventional +``.'' (dot) notation using the +.Xr inet_addr 3 +routine +from the Internet address manipulation library, +.Xr inet 3 . +Host names may contain any printable +character other than a field delimiter, newline, +or comment character. +.Sh FILES +.Bl -tag -width /etc/hosts -compact +.It Pa /etc/hosts +The +.Nm hosts +file resides in +.Pa /etc . +.El +.Sh SEE ALSO +.Xr gethostbyname 3 , +.Xr ifconfig 8 , +.Xr named 8 +.Rs +.%T "Name Server Operations Guide for BIND" +.Re +.Sh HISTORY +The +.Nm +file format appeared in +.Bx 4.2 . diff --git a/share/man/man5/networks.5 b/share/man/man5/networks.5 new file mode 100644 index 0000000..f8f4c4e --- /dev/null +++ b/share/man/man5/networks.5 @@ -0,0 +1,88 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)networks.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt NETWORKS 5 +.Os BSD 4.2 +.Sh NAME +.Nm networks +.Nd network name data base +.Sh DESCRIPTION +The +.Xr networks +file contains information regarding +the known networks which comprise the +.Tn DARPA +Internet. +For each network a single line should be present with the following information: +.Bd -unfilled -offset indent +official network name +network number +aliases +.Ed +.Pp +Items are separated by any number of blanks and/or tab characters. +A ``#'' indicates the beginning of a comment; characters up to the end of +the line are not interpreted by routines which search the file. +This file is normally created from the official network data base +maintained at the Network Information Control Center +.Pq Tn NIC , +though local +changes may be required to bring it up to date regarding unofficial aliases +and/or unknown networks. +.Pp +Network number may be specified in the conventional +``.'' (dot) notation using the +.Xr inet_network 3 +routine +from the Internet address manipulation library, +.Xr inet 3 . +Network names may contain any printable character other than a field +delimiter, newline, or comment character. +.Sh FILES +.Bl -tag -width /etc/networks -compact +.It Pa /etc/networks +The +.Nm networks +file resides in +.Pa /etc . +.El +.Sh SEE ALSO +.Xr getnetent 3 +.Sh BUGS +A name server should be used instead of a static file. +.Sh HISTORY +The +.Nm +file format appeared in +.Bx 4.2 . diff --git a/share/man/man5/passwd.5 b/share/man/man5/passwd.5 new file mode 100644 index 0000000..584bc27 --- /dev/null +++ b/share/man/man5/passwd.5 @@ -0,0 +1,186 @@ +.\" Copyright (c) 1988, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)passwd.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt PASSWD 5 +.Os +.Sh NAME +.Nm passwd +.Nd format of the password file +.Sh DESCRIPTION +The +.Nm passwd +files are files consisting of newline separated records, one per user, +containing ten colon (``:'') separated fields. These fields are as +follows: +.Pp +.Bl -tag -width password -offset indent +.It name +User's login name. +.It password +User's +.Em encrypted +password. +.It uid +User's id. +.It gid +User's login group id. +.It class +User's general classification (unused). +.It change +Password change time. +.It expire +Account expiration time. +.It gecos +General information about the user. +.It home_dir +User's home directory. +.It shell +User's login shell. +.El +.Pp +The +.Ar name +field is the login used to access the computer account, and the +.Ar uid +field is the number associated with it. They should both be unique +across the system (and often across a group of systems) since they +control file access. +.Pp +While it is possible to have multiple entries with identical login names +and/or identical user id's, it is usually a mistake to do so. Routines +that manipulate these files will often return only one of the multiple +entries, and that one by random selection. +.Pp +The login name must never begin with a hyphen (``-''); also, it is strongly +suggested that neither upper-case characters or dots (``.'') be part +of the name, as this tends to confuse mailers. No field may contain a +colon (``:'') as this has been used historically to separate the fields +in the user database. +.Pp +The password field is the +.Em encrypted +form of the password. +If the +.Ar password +field is empty, no password will be required to gain access to the +machine. This is almost invariably a mistake. +Because these files contain the encrypted user passwords, they should +not be readable by anyone without appropriate privileges. +.Pp +The group field is the group that the user will be placed in upon login. +Since this system supports multiple groups (see +.Xr groups 1 ) +this field currently has little special meaning. +.Pp +The +.Ar class +field is currently unused. In the near future it will be a key to +a +.Xr termcap 5 +style database of user attributes. +.Pp +The +.Ar change +field is the number in seconds, +.Dv GMT , +from the epoch, until the +password for the account must be changed. +This field may be left empty to turn off the password aging feature. +.Pp +The +.Ar expire +field is the number in seconds, +.Dv GMT , +from the epoch, until the +account expires. +This field may be left empty to turn off the account aging feature. +.Pp +The +.Ar gecos +field normally contains comma (``,'') separated subfields as follows: +.Pp +.Bd -unfilled -offset indent +name user's full name +office user's office number +wphone user's work phone number +hphone user's home phone number +.Ed +.Pp +This information is used by the +.Xr finger 1 +program. +.Pp +The user's home directory is the full +.Tn UNIX +path name where the user +will be placed on login. +.Pp +The shell field is the command interpreter the user prefers. +If there is nothing in the +.Ar shell +field, the Bourne shell +.Pq Pa /bin/sh +is assumed. +.Sh SEE ALSO +.Xr chpass 1 , +.Xr login 1 , +.Xr passwd 1 , +.Xr getpwent 3 , +.Xr adduser 8 , +.Xr pwd_mkdb 8 , +.Xr vipw 8 +.Sh BUGS +User information should (and eventually will) be stored elsewhere. +.Sh COMPATIBILITY +The password file format has changed since 4.3BSD. +The following awk script can be used to convert your old-style password +file into a new style password file. +The additional fields +.Dq class , +.Dq change +and +.Dq expire +are added, but are turned off by default. +Class is currently not implemented, but change and expire are; to set them, +use the current day in seconds from the epoch + whatever number of seconds +of offset you want. +.Bd -literal -offset indent +BEGIN { FS = ":"} +{ print $1 ":" $2 ":" $3 ":" $4 "::0:0:" $5 ":" $6 ":" $7 } +.Ed +.Sh HISTORY +A +.Nm +file format appeared in +.At v6 . diff --git a/share/man/man5/phones.5 b/share/man/man5/phones.5 new file mode 100644 index 0000000..53705df --- /dev/null +++ b/share/man/man5/phones.5 @@ -0,0 +1,76 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)phones.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt PHONES 5 +.Os BSD 4.2 +.Sh NAME +.Nm phones +.Nd remote host phone number data base +.Sh DESCRIPTION +The file +.Pa /etc/phones +contains the system-wide +private phone numbers for the +.Xr tip 1 +program. This file is normally unreadable, and so may contain +privileged information. The format of the file is a series of lines +of the form: <system-name>[\ \et]*<phone-number>. The system name is +one of those defined in the +.Xr remote 5 +file and the phone number is constructed from any sequence of +characters terminated only by ``,'' or the end of the line. +The ``='' and ``*'' characters are +indicators to the auto call units to pause and wait for a second dial +tone (when going through an exchange). The ``='' is required by the +.Tn DF02-AC +and the ``*'' is required by the +.Tn BIZCOMP +1030. +.Pp +Only one phone number per line is permitted. However, if more than +one line in the file contains the same system name +.Xr tip 1 +will attempt to dial each one in turn, until it establishes a connection. +.Sh FILES +.Bl -tag -width /etc/phones -compact +.It Pa /etc/phones +.El +.Sh SEE ALSO +.Xr tip 1 , +.Xr remote 5 +.Sh HISTORY +The +.Nm +file appeared in +.Bx 4.2 . diff --git a/share/man/man5/printcap.5 b/share/man/man5/printcap.5 new file mode 100644 index 0000000..22d3100 --- /dev/null +++ b/share/man/man5/printcap.5 @@ -0,0 +1,288 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)printcap.5 8.2 (Berkeley) 12/11/93 +.\" +.Dd December 11, 1993 +.Dt PRINTCAP 5 +.Os BSD 4.2 +.Sh NAME +.Nm printcap +.Nd printer capability data base +.Sh SYNOPSIS +.Nm printcap +.Sh DESCRIPTION +The +.Nm Printcap +function +is a simplified version of the +.Xr termcap 5 +data base +used to describe line printers. The spooling system accesses the +.Nm printcap +file every time it is used, allowing dynamic +addition and deletion of printers. Each entry in the data base +is used to describe one printer. This data base may not be +substituted for, as is possible for +.Xr termcap , +because it may allow accounting to be bypassed. +.Pp +The default printer is normally +.Em lp , +though the environment variable +.Ev PRINTER +may be used to override this. Each spooling utility supports an option, +.Fl P Ar printer , +to allow explicit naming of a destination printer. +.Pp +Refer to the +.%T "4.3 BSD Line Printer Spooler Manual" +for a complete discussion on how to setup the database for a given printer. +.Sh CAPABILITIES +Refer to +.Xr termcap 5 +for a description of the file layout. +.Bl -column Namexxx Typexx "/var/spool/lpdxxxxx" +.Sy Name Type Description +.It "af str" Ta Dv NULL Ta No "name of accounting file" +.It "br num none if lp is a tty, set the baud rate" +.Pf ( Xr ioctl 2 +call) +.It "cf str" Ta Dv NULL Ta No "cifplot data filter" +.It "df str" Ta Dv NULL Ta No "tex data filter" +.Pf ( Tn DVI +format) +.It "fc num 0 if lp is a tty, clear flag bits" +.Pq Pa sgtty.h +.It "ff str" Ta So Li \ef Sc Ta No "string to send for a form feed" +.It "fo bool false print a form feed when device is opened" +.It "fs num 0 like `fc' but set bits" +.It "gf str" Ta Dv NULL Ta No "graph data filter" +.Pf ( Xr plot 3 +format +.It "hl bool false print the burst header page last" +.It "ic bool false driver supports (non standard) ioctl to indent printout" +.It "if str" Ta Dv NULL Ta No "name of text filter which does accounting" +.It "lf str" Ta Pa /dev/console Ta No "error logging file name" +.It "lo str" Ta Pa lock Ta No "name of lock file" +.It "lp str" Ta Pa /dev/lp Ta No "device name to open for output" +.It "mx num 1000 maximum file size (in" +.Dv BUFSIZ +blocks), zero = unlimited +.It "nd str" Ta Dv NULL Ta No "next directory for list of queues (unimplemented)" +.It "nf str" Ta Dv NULL Ta No "ditroff data filter (device independent troff)" +.It "of str" Ta Dv NULL Ta No "name of output filtering program" +.It "pc num 200 price per foot or page in hundredths of cents" +.It "pl num 66 page length (in lines)" +.It "pw num 132 page width (in characters)" +.It "px num 0 page width in pixels (horizontal)" +.It "py num 0 page length in pixels (vertical)" +.It "rf str" Ta Dv NULL Ta No "filter for printing" +.Tn FORTRAN +style text files +.It "rg str" Ta Dv NULL Ta No "restricted group. Only members of group allowed access" +.It "rm str" Ta Dv NULL Ta No "machine name for remote printer" +.It "rp str ``lp'' remote printer name argument" +.It "rs bool false restrict remote users to those with local accounts" +.It "rw bool false open the printer device for reading and writing" +.It "sb bool false short banner (one line only)" +.It "sc bool false suppress multiple copies" +.It "sd str" Ta Pa /var/spool/lpd Ta No "spool directory" +.It "sf bool false suppress form feeds" +.It "sh bool false suppress printing of burst page header" +.It "st str" Ta Pa status Ta No "status file name" +.It "tf str" Ta Dv NULL Ta No "troff data filter (cat phototypesetter)" +.It "tr str" Ta Dv NULL Ta No "trailer string to print when queue empties" +.It "vf str" Ta Dv NULL Ta No "raster image filter" +.It "xc num 0 if lp is a tty, clear local mode bits" +.Pq Xr tty 4 +.It "xs num 0 like `xc' but set bits" +.El +.Pp +If the local line printer driver supports indentation, the daemon +must understand how to invoke it. +.Sh FILTERS +The +.Xr lpd 8 +daemon creates a pipeline of +.Em filters +to process files for various printer types. +The filters selected depend on the flags passed to +.Xr lpr 1 . +The pipeline set up is: +.Bd -literal -offset indent +p pr | if regular text + pr(1) +none if regular text +c cf cifplot +d df DVI (tex) +g gf plot(3) +n nf ditroff +f rf Fortran +t tf troff +v vf raster image +.Ed +.Pp +The +.Sy if +filter is invoked with arguments: +.Bd -filled -offset indent +.Cm if +.Op Fl c +.Fl w Ns Ar width +.Fl l Ns Ar length +.Fl i Ns Ar indent +.Fl n Ar login +.Fl h Ar host acct-file +.Ed +.Pp +The +.Fl c +flag is passed only if the +.Fl l +flag (pass control characters literally) +is specified to +.Xr lpr . +The +.Ar Width +function +and +.Ar length +specify the page width and length +(from +.Cm pw +and +.Cm pl +respectively) in characters. +The +.Fl n +and +.Fl h +parameters specify the login name and host name of the owner +of the job respectively. +The +.Ar Acct-file +function +is passed from the +.Cm af +.Nm printcap +entry. +.Pp +If no +.Cm if +is specified, +.Cm of +is used instead, +with the distinction that +.Cm of +is opened only once, +while +.Cm if +is opened for every individual job. +Thus, +.Cm if +is better suited to performing accounting. +The +.Cm of +is only given the +.Ar width +and +.Ar length +flags. +.Pp +All other filters are called as: +.Bd -filled -offset indent +.Nm filter +.Fl x Ns Ar width +.Fl y Ns Ar length +.Fl n Ar login +.Fl h Ar host acct-file +.Ed +.Pp +where +.Ar width +and +.Ar length +are represented in pixels, +specified by the +.Cm px +and +.Cm py +entries respectively. +.Pp +All filters take +.Em stdin +as the file, +.Em stdout +as the printer, +may log either to +.Em stderr +or using +.Xr syslog 3 , +and must not ignore +.Dv SIGINT . +.Sh LOGGING +Error messages generated by the line printer programs themselves +(that is, the +.Xr lp Ns * +programs) +are logged by +.Xr syslog 3 +using the +.Dv LPR +facility. +Messages printed on +.Em stderr +of one of the filters +are sent to the corresponding +.Cm lf +file. +The filters may, of course, use +.Xr syslog +themselves. +.Pp +Error messages sent to the console have a carriage return and a line +feed appended to them, rather than just a line feed. +.Sh SEE ALSO +.Xr termcap 5 , +.Xr lpc 8 , +.Xr lpd 8 , +.Xr pac 8 , +.Xr lpr 1 , +.Xr lpq 1 , +.Xr lprm 1 +.Rs +.%T "4.3 BSD Line Printer Spooler Manual" +.Re +.Sh HISTORY +The +.Nm +file format appeared in +.Bx 4.2 .. diff --git a/share/man/man5/protocols.5 b/share/man/man5/protocols.5 new file mode 100644 index 0000000..8b31c8a --- /dev/null +++ b/share/man/man5/protocols.5 @@ -0,0 +1,77 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)protocols.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt PROTOCOLS 5 +.Os BSD 4.2 +.Sh NAME +.Nm protocols +.Nd protocol name data base +.Sh DESCRIPTION +The +.Nm protocols +file contains information regarding the known protocols used in the +.Tn DARPA +Internet. For each protocol a single line should be present +with the following information: +.Bd -unfilled -offset indent +official protocol name +protocol number +aliases +.Ed +.Pp +Items are separated by any number of blanks and/or +tab characters. A ``#'' indicates the beginning of +a comment; characters up to the end of the line are +not interpreted by routines which search the file. +.Pp +Protocol names may contain any printable +character other than a field delimiter, newline, +or comment character. +.Sh FILES +.Bl -tag -width /etc/protocols -compact +.It Pa /etc/protocols +The +.Nm protocols +file resides in +.Pa /etc . +.El +.Sh SEE ALSO +.Xr getprotoent 3 +.Sh BUGS +A name server should be used instead of a static file. +.Sh HISTORY +The +.Nm +file format appeared in +.Bx 4.2 . diff --git a/share/man/man5/remote.5 b/share/man/man5/remote.5 new file mode 100644 index 0000000..27c83f6 --- /dev/null +++ b/share/man/man5/remote.5 @@ -0,0 +1,200 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)remote.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt REMOTE 5 +.Os BSD 4.2 +.Sh NAME +.Nm remote +.Nd remote host description file +.Sh DESCRIPTION +The systems known by +.Xr tip 1 +and their attributes are stored in an +.Tn ASCII +file which +is structured somewhat like the +.Xr termcap 5 +file. Each line in the file provides a description for a single +.Xr system . +Fields are separated by a colon (``:''). +Lines ending in a \e character with an immediately following newline are +continued on the next line. +.Pp +The first entry is the name(s) of the host system. If there is more +than one name for a system, the names are separated by vertical bars. +After the name of the system comes the fields of the description. A +field name followed by an `=' sign indicates a string value follows. A field +name followed by a `#' sign indicates a following numeric value. +.Pp +Entries named ``tip*'' and ``cu*'' +are used as default entries by +.Xr tip , +and the +.Xr cu +interface to +.Xr tip , +as follows. When +.Xr tip +is invoked with only a phone number, it looks for an entry +of the form ``tip300'', where 300 is the baud rate with +which the connection is to be made. When the +.Xr cu +interface is used, entries of the form ``cu300'' are used. +.Sh CAPABILITIES +Capabilities are either strings (str), numbers (num), or boolean +flags (bool). A string capability is specified by +.Em capability Ns Ar = Ns Em value ; +for example, ``dv=/dev/harris''. A numeric capability is specified by +.Em capability Ns Ar # Ns Em value ; +for example, ``xa#99''. A boolean capability is specified by simply listing +the capability. +.Bl -tag -width indent +.It Cm \&at +(str) +Auto call unit type. +.It Cm \&br +(num) +The baud rate used in establishing +a connection to the remote host. +This is a decimal number. +The default baud rate is 300 baud. +.It Cm \&cm +(str) +An initial connection message to be sent +to the remote host. For example, if a +host is reached through port selector, this +might be set to the appropriate sequence +required to switch to the host. +.It Cm \&cu +(str) +Call unit if making a phone call. +Default is the same as the `dv' field. +.It Cm \&di +(str) +Disconnect message sent to the host when a +disconnect is requested by the user. +.It Cm \&du +(bool) +This host is on a dial-up line. +.It Cm \&dv +(str) +.Tn UNIX +device(s) to open to establish a connection. +If this file refers to a terminal line, +.Xr tip 1 +attempts to perform an exclusive open on the device to insure only +one user at a time has access to the port. +.It Cm \&el +(str) +Characters marking an end-of-line. +The default is +.Dv NULL . +`~' escapes are only +recognized by +.Xr tip +after one of the characters in `el', +or after a carriage-return. +.It Cm \&fs +(str) +Frame size for transfers. +The default frame size is equal to +.Dv BUFSIZ . +.It Cm \&hd +(bool) +The host uses half-duplex communication, local +echo should be performed. +.It Cm \&ie +(str) +Input end-of-file marks. +The default is +.Dv NULL . +.It Cm \&oe +(str) +Output end-of-file string. +The default is +.Dv NULL . +When +.Xr tip +is transferring a file, this +string is sent at end-of-file. +.It Cm \&pa +(str) +The type of parity to use when sending data +to the host. This may be one of ``even'', +``odd'', ``none'', ``zero'' (always set bit 8 to zero), +``one'' (always set bit 8 to 1). The default +is even parity. +.It Cm \&pn +(str) +Telephone number(s) for this host. +If the telephone number field contains +an @ sign, +.Xr tip +searches the file +.Pa /etc/phones +file for a list of telephone numbers; +(See +.Xr phones 5 . ) +.It Cm \&tc +(str) +Indicates that the list of capabilities is continued +in the named description. This is used +primarily to share common capability information. +.El +.Pp +Here is a short example showing the use of the capability continuation +feature: +.Bd -literal +UNIX-1200:\e +:dv=/dev/cau0:el=^D^U^C^S^Q^O@:du:at=ventel:ie=#$%:oe=^D:br#1200: +arpavax|ax:\e +:pn=7654321%:tc=UNIX-1200 +.Ed +.Sh FILES +.Bl -tag -width /etc/remote -compact +.It Pa /etc/remote +The +.Nm remote +host description file +resides in +.Pa /etc . +.El +.Sh SEE ALSO +.Xr tip 1 , +.Xr phones 5 +.Sh HISTORY +The +.Nm +file format appeared in +.Bx 4.2 . diff --git a/share/man/man5/resolver.5 b/share/man/man5/resolver.5 new file mode 100644 index 0000000..0358be6 --- /dev/null +++ b/share/man/man5/resolver.5 @@ -0,0 +1,142 @@ +.\" Copyright (c) 1986, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)resolver.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt RESOLVER 5 +.Os BSD 4 +.Sh NAME +.Nm resolver +.Nd resolver configuration file +.Sh SYNOPSIS +.Nm resolv.conf +.Sh DESCRIPTION +The +.Xr resolver 3 +is a set of routines in the C library +which provide access to the Internet Domain Name System. +The resolver configuration file contains information that is read +by the resolver routines the first time they are invoked by a process. +The file is designed to be human readable and contains a list of +keywords with values that provide various types of resolver information. +.Pp +On a normally configured system this file should not be necessary. +The only name server to be queried will be on the local machine, +the domain name is determined from the host name, +and the domain search path is constructed from the domain name. +.Pp +The different configuration options are: +.Bl -tag -width nameserver +.It Sy nameserver +Internet address (in dot notation) of a name server +that the resolver should query. +Up to +.Dv MAXNS +(currently 3) name servers may be listed, +one per keyword. +If there are multiple servers, +the resolver library queries them in the order listed. +If no +.Sy nameserver +entries are present, +the default is to use the name server on the local machine. +(The algorithm used is to try a name server, and if the query times out, +try the next, until out of name servers, +then repeat trying all the name servers +until a maximum number of retries are made). +.It Sy domain +Local domain name. +Most queries for names within this domain can use short names +relative to the local domain. +If no +.Sy domain +entry is present, the domain is determined +from the local host name returned by +.Xr gethostname 2 ; +the domain part is taken to be everything after the first `.'. +Finally, if the host name does not contain a domain part, the root +domain is assumed. +.It Sy search +Search list for host-name lookup. +The search list is normally determined from the local domain name; +by default, it begins with the local domain name, then successive +parent domains that have at least two components in their names. +This may be changed by listing the desired domain search path +following the +.Sy search +keyword with spaces or tabs separating +the names. +Most resolver queries will be attempted using each component +of the search path in turn until a match is found. +Note that this process may be slow and will generate a lot of network +traffic if the servers for the listed domains are not local, +and that queries will time out if no server is available +for one of the domains. +.Pp +The search list is currently limited to six domains +with a total of 256 characters. +.El +.Pp +The +.Sy domain +and +.Sy search +keywords are mutually exclusive. +If more than one instance of these keywords is present, +the last instance will override. +.Pp +The keyword and value must appear on a single line, and the keyword +(e.g. +.Sy nameserver ) +must start the line. The value follows +the keyword, separated by white space. +.Sh FILES +.Bl -tag -width /etc/resolv.conf -compact +.It Pa /etc/resolv.conf +The file +.Nm resolv.conf +resides in +.Pa /etc . +.El +.Sh SEE ALSO +.Xr gethostbyname 3 , +.Xr resolver 3 , +.Xr hostname 7 , +.Xr named 8 +.Rs +.%T "Name Server Operations Guide for BIND" +.Re +.Sh HISTORY +The +.Nm resolv.conf +file format appeared in +.Bx 4.3 . diff --git a/share/man/man5/services.5 b/share/man/man5/services.5 new file mode 100644 index 0000000..80e03a8 --- /dev/null +++ b/share/man/man5/services.5 @@ -0,0 +1,85 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)services.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt SERVICES 5 +.Os BSD 4.2 +.Sh NAME +.Nm services +.Nd service name data base +.Sh DESCRIPTION +The +.Nm services +file contains information regarding +the known services available in the +.Tn DARPA +Internet. +For each service a single line should be present +with the following information: +.Bd -unfilled -offset indent +official service name +port number +protocol name +aliases +.Ed +.Pp +Items are separated by any number of blanks and/or +tab characters. The port number and protocol name +are considered a single +.Em item ; +a ``/'' is used to +separate the port and protocol (e.g. ``512/tcp''). +A ``#'' indicates the beginning of +a comment; subsequent characters up to the end of the line are +not interpreted by the routines which search the file. +.Pp +Service names may contain any printable +character other than a field delimiter, newline, +or comment character. +.Sh FILES +.Bl -tag -width /etc/services -compact +.It Pa /etc/services +The +.Nm services +file resides in +.Pa /etc . +.El +.Sh SEE ALSO +.Xr getservent 3 +.Sh BUGS +A name server should be used instead of a static file. +.Sh HISTORY +The +.Nm +file format appeared in +.Bx 4.2 . diff --git a/share/man/man5/shells.5 b/share/man/man5/shells.5 new file mode 100644 index 0000000..649b8a3 --- /dev/null +++ b/share/man/man5/shells.5 @@ -0,0 +1,65 @@ +.\" Copyright (c) 1986, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)shells.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt SHELLS 5 +.Os BSD 4.2 +.Sh NAME +.Nm shells +.Nd shell database +.Sh DESCRIPTION +The +.Nm shells +file contains a list of the shells on the system. +For each shell a single line should be present, consisting of the +shell's path, relative to root. +.Pp +A hash mark (``#'') indicates the beginning of a comment; subsequent +characters up to the end of the line are not interpreted by the +routines which search the file. +Blank lines are also ignored. +.Sh FILES +.Bl -tag -width /etc/shells -compact +.It Pa /etc/shells +The +.Nm shells +file resides in +.Pa /etc . +.El +.Sh SEE ALSO +.Xr getusershell 3 +.Sh HISTORY +The +.Nm +file format appeared in +.Bx 4.3 tahoe . diff --git a/share/man/man5/stab.5 b/share/man/man5/stab.5 new file mode 100644 index 0000000..7f7cef8 --- /dev/null +++ b/share/man/man5/stab.5 @@ -0,0 +1,222 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)stab.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt STAB 5 +.Os BSD 4 +.Sh NAME +.Nm stab +.Nd symbol table types +.Sh SYNOPSIS +.Fd #include <stab.h> +.Sh DESCRIPTION +The file +.Aq Pa stab.h +defines some of the symbol table +.Fa n_type +field values for a.out files. +These are the types for permanent symbols (i.e. not local labels, etc.) +used by the old debugger +.Em sdb +and the Berkeley Pascal compiler +.Xr pc 1 . +Symbol table entries can be produced by the +.Pa .stabs +assembler directive. +This allows one to specify a double-quote delimited name, a symbol type, +one char and one short of information about the symbol, and an unsigned +long (usually an address). +To avoid having to produce an explicit label for the address field, +the +.Pa .stabd +directive can be used to implicitly address the current location. +If no name is needed, symbol table entries can be generated using the +.Pa .stabn +directive. +The loader promises to preserve the order of symbol table entries produced +by +.Pa .stab +directives. +As described in +.Xr a.out 5 , +an element of the symbol table +consists of the following structure: +.Bd -literal +/* +* Format of a symbol table entry. +*/ + +struct nlist { + union { + char *n_name; /* for use when in-core */ + long n_strx; /* index into file string table */ + } n_un; + unsigned char n_type; /* type flag */ + char n_other; /* unused */ + short n_desc; /* see struct desc, below */ + unsigned n_value; /* address or offset or line */ +}; +.Ed +.Pp +The low bits of the +.Fa n_type +field are used to place a symbol into +at most one segment, according to +the following masks, defined in +.Aq Pa a.out.h . +A symbol can be in none of these segments by having none of these segment +bits set. +.Bd -literal +/* +* Simple values for n_type. +*/ + +#define N_UNDF 0x0 /* undefined */ +#define N_ABS 0x2 /* absolute */ +#define N_TEXT 0x4 /* text */ +#define N_DATA 0x6 /* data */ +#define N_BSS 0x8 /* bss */ + +#define N_EXT 01 /* external bit, or'ed in */ +.Ed +.Pp +The +.Fa n_value +field of a symbol is relocated by the linker, +.Xr ld 1 +as an address within the appropriate segment. +.Fa N_value +fields of symbols not in any segment are unchanged by the linker. +In addition, the linker will discard certain symbols, according to rules +of its own, unless the +.Fa n_type +field has one of the following bits set: +.Bd -literal +/* +* Other permanent symbol table entries have some of the N_STAB bits set. +* These are given in <stab.h> +*/ + +#define N_STAB 0xe0 /* if any of these bits set, don't discard */ +.Ed +.Pp +This allows up to 112 (7 \(** 16) symbol types, split between the various +segments. +Some of these have already been claimed. +The old symbolic debugger, +.Em sdb , +uses the following n_type values: +.Bd -literal +#define N_GSYM 0x20 /* global symbol: name,,0,type,0 */ +#define N_FNAME 0x22 /* procedure name (f77 kludge): name,,0 */ +#define N_FUN 0x24 /* procedure: name,,0,linenumber,address */ +#define N_STSYM 0x26 /* static symbol: name,,0,type,address */ +#define N_LCSYM 0x28 /* .lcomm symbol: name,,0,type,address */ +#define N_RSYM 0x40 /* register sym: name,,0,type,register */ +#define N_SLINE 0x44 /* src line: 0,,0,linenumber,address */ +#define N_SSYM 0x60 /* structure elt: name,,0,type,struct_offset */ +#define N_SO 0x64 /* source file name: name,,0,0,address */ +#define N_LSYM 0x80 /* local sym: name,,0,type,offset */ +#define N_SOL 0x84 /* #included file name: name,,0,0,address */ +#define N_PSYM 0xa0 /* parameter: name,,0,type,offset */ +#define N_ENTRY 0xa4 /* alternate entry: name,linenumber,address */ +#define N_LBRAC 0xc0 /* left bracket: 0,,0,nesting level,address */ +#define N_RBRAC 0xe0 /* right bracket: 0,,0,nesting level,address */ +#define N_BCOMM 0xe2 /* begin common: name,, */ +#define N_ECOMM 0xe4 /* end common: name,, */ +#define N_ECOML 0xe8 /* end common (local name): ,,address */ +#define N_LENG 0xfe /* second stab entry with length information */ +.Ed +.Pp +where the comments give +.Em sdb +conventional use for +.Pa .stab +.Fa s +and the +.Fa n_name , +.Fa n_other , +.Fa n_desc , +and +.Fa n_value +fields +of the given +.Fa n_type . +.Em Sdb +uses the +.Fa n_desc +field to hold a type specifier in the form used +by the Portable C Compiler, +.Xr cc 1 ; +see the header file +.Pa pcc.h +for details on the format of these type values. +.Pp +The Berkeley Pascal compiler, +.Xr pc 1 , +uses the following +.Fa n_type +value: +.Bd -literal +#define N_PC 0x30 /* global pascal symbol: name,,0,subtype,line */ +.Ed +.Pp +and uses the following subtypes to do type checking across separately +compiled files: +.Bd -unfilled -offset indent +1 source file name +2 included file name +3 global label +4 global constant +5 global type +6 global variable +7 global function +8 global procedure +9 external function +10 external procedure +11 library variable +12 library routine +.Ed +.Sh SEE ALSO +.Xr as 1 , +.Xr ld 1 , +.Xr dbx 1 , +.Xr a.out 5 +.Sh BUGS +.Pp +More basic types are needed. +.Sh HISTORY +The +.Nm stab +file appeared in +.Bx 4.0 . diff --git a/share/man/man5/types.5 b/share/man/man5/types.5 new file mode 100644 index 0000000..8a6b3bf --- /dev/null +++ b/share/man/man5/types.5 @@ -0,0 +1,147 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)types.5 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt TYPES 5 +.Os BSD 4 +.Sh NAME +.Nm types +.Nd system data types +.Sh SYNOPSIS +.Fd #include <sys/types.h> +.Sh DESCRIPTION +The file +.Pa sys/types.h +contains the defined data types used in the kernel (most are +used through out the system). +.Bd -literal +#ifndef _TYPES_H_ +#define _TYPES_H_ + +typedef short dev_t; +#ifndef _POSIX_SOURCE + /* major part of a device */ +#define major(x) ((int)(((unsigned)(x)>>8)&0377)) + /* minor part of a device */ +#define minor(x) ((int)((x)&0377)) + /* make a device number */ +#define makedev(x,y) ((dev_t)(((x)<<8) | (y))) +#endif + +typedef unsigned char u_char; +typedef unsigned short u_short; +typedef unsigned int u_int; +typedef unsigned long u_long; +typedef unsigned short ushort; /* Sys V compatibility */ + +#include <machine/ansi.h> +#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) +#include <machine/types.h> +#endif + +#ifdef _CLOCK_T_ +typedef _CLOCK_T_ clock_t; +#undef _CLOCK_T_ +#endif + +#ifdef _SIZE_T_ +typedef _SIZE_T_ size_t; +#undef _SIZE_T_ +#endif + +#ifdef _TIME_T_ +typedef _TIME_T_ time_t; +#undef _TIME_T_ +#endif + +#ifndef _POSIX_SOURCE +typedef struct _uquad { unsigned long val[2]; } u_quad; +typedef struct _quad { long val[2]; } quad; +#endif +typedef long * qaddr_t; /* should be typedef quad * qaddr_t; */ + +typedef long daddr_t; +typedef char * caddr_t; +typedef u_long ino_t; +typedef long swblk_t; +typedef long segsz_t; +typedef long off_t; +typedef u_short uid_t; +typedef u_short gid_t; +typedef short pid_t; +typedef u_short nlink_t; +typedef u_short mode_t; +typedef u_long fixpt_t; + +#ifndef _POSIX_SOURCE +#define NBBY 8 /* number of bits in a byte */ + +/* + * Select uses bit masks of file descriptors in longs. These macros + * manipulate such bit fields (the filesystem macros use chars). + * FD_SETSIZE may be defined by the user, but the default here should + * be >= NOFILE (param.h). + */ +#ifndef FD_SETSIZE +#define FD_SETSIZE 256 +#endif + +typedef long fd_mask; +#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */ + +#ifndef howmany +#define howmany(x, y) (((x)+((y)-1))/(y)) +#endif + +typedef struct fd_set { + fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; +} fd_set; + +#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS))) +#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS))) +#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS))) +#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) + +#endif /* !_POSIX_SOURCE */ +#endif /* !_TYPES_H_ */ +.Ed +.Sh SEE ALSO +.Xr fs 5 , +.Xr time 3 , +.Xr lseek 2 , +.Xr adb 1 +.Sh HISTORY +A +.Nm +file appeared in +.At v7 . diff --git a/share/man/man5/utmp.5 b/share/man/man5/utmp.5 new file mode 100644 index 0000000..a3ac4b0 --- /dev/null +++ b/share/man/man5/utmp.5 @@ -0,0 +1,218 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)utmp.5 8.2 (Berkeley) 3/17/94 +.\" +.Dd March 17, 1994 +.Dt UTMP 5 +.Os BSD 4 +.Sh NAME +.Nm utmp , +.Nm wtmp , +.Nm lastlog +.Nd login records +.Sh SYNOPSIS +.Fd #include <utmp.h> +.Sh DESCRIPTION +The file +.Aq Pa utmp.h +declares the structures used to record information about current +users in the file +.Nm utmp , +logins and logouts in the file +.Nm wtmp , +and last logins in the file +.Nm lastlog . +The time stamps of date changes, shutdowns and reboots are also logged in +the +.Nm wtmp +file. +.Pp +These files can grow rapidly on busy systems, daily or weekly rotation +is recommended. +If any of these files do not exist, it is not created. +These +files must be created manually and are normally maintained in either the script +.Pa /etc/daily +or the script +.Pa /etc/weekly . +(See +.Xr cron 8 . ) +.Bd -literal -offset indent +#define _PATH_UTMP "/var/run/utmp" +#define _PATH_WTMP "/var/log/wtmp" +#define _PATH_LASTLOG "/var/log/lastlog" + +#define UT_NAMESIZE 8 +#define UT_LINESIZE 8 +#define UT_HOSTSIZE 16 + +struct lastlog { + time_t ll_time; + char ll_line[UT_LINESIZE]; + char ll_host[UT_HOSTSIZE]; +}; + +struct utmp { + char ut_line[UT_LINESIZE]; + char ut_name[UT_NAMESIZE]; + char ut_host[UT_HOSTSIZE]; + long ut_time; +}; +.Ed +.Pp +Each time a user logs in, the +.Xr login +program looks up the user's +.Tn UID +in the file +.Nm lastlog. +If it is found, the timestamp of the last time the user logged +in, the terminal line and the hostname +are written to the standard output. (Providing the login is not +.Em quiet , +see +.Xr login 1 . ) +The +.Xr login +program then records the new login time in the file +.Nm lastlog . +.Pp +After the new +.Fa lastlog +record is written , +.\" the +.\" .Xr libutil 3 +.\" routine +the file +.Nm utmp +is opened and the +.Fa utmp +record for the user inserted. +This record remains there until +the user logs out at which time it is deleted. +The +.Nm utmp +file is used by the programs +.Xr rwho 1 , +.Xr users 1 , +.Xr w 1 , +and +.Xr who 1 . +.Pp +Next, the +.Xr login +program opens the file +.Nm wtmp , +and appends the user's +.Fa utmp +record. +The same +.Fa utmp +record, with an updated time stamp is later appended +to the file when the user logs out. (See +.Xr init 8 . ) +The +.Nm wtmp +file is used by the programs +.Xr last 1 +and +.Xr ac 8 . +.Pp +In the event of a date change, a shutdown or reboot, the +following items are logged in the +.Nm wtmp +file. +.Pp +.Bl -tag -width shutdownxx -compact +.It Li reboot +.It Li shutdown +A system reboot or shutdown has been initiated. +The character +.Ql \&~ +is placed in the field +.Fa ut_line , +and +.Li reboot +or +.Li shutdown +in the field +.Fa ut_name . +(See +.Xr shutdown 8 +and +.Xr reboot 8 . ) +.Pp +.It Li date +The system time has been manually or automatically updated. +(See +.Xr date 1 . ) +The command name +.Xr date +is recorded in the field +.Fa ut_name . +In the field +.Fa ut_line , +the character +.Ql \\*(Ba +indicates the time prior to the change, and the character +.Ql \&{ +indicates the new time. +.El +.Sh FILES +.Bl -tag -width /var/log/lastlog -compact +.It Pa /var/run/utmp +The +.Nm utmp file. +.It Pa /var/log/wtmp +The +.Nm wtmp file. +.It Pa /var/log/lastlog +The +.Nm lastlog file. +.El +.Sh SEE ALSO +.Xr last 1 , +.Xr login 1 , +.Xr who 1 , +.Xr ac 8 , +.Xr init 8 +.Sh HISTORY +A +.Nm utmp +and +.Nm wtmp +file format appeared in +.At v6 . +The +.Nm lastlog +file format appeared in +.Bx 3.0 . diff --git a/share/man/man7/Makefile b/share/man/man7/Makefile new file mode 100644 index 0000000..dd3fe2b --- /dev/null +++ b/share/man/man7/Makefile @@ -0,0 +1,16 @@ +# @(#)Makefile 8.1 (Berkeley) 6/5/93 + +MAN7= ascii.0 environ.0 eqnchar.0 hier.0 hostname.0 intro.0 mailaddr.0 \ + man.0 mdoc.0 mdoc.samples.0 ms.0 operator.0 term.0 +MLINKS= intro.7 miscellaneous.7 + +all: ${MAN7} + +clean depend lint tags: + +cleandir: + rm -f ${MAN7} + +install: maninstall + +.include <bsd.prog.mk> diff --git a/share/man/man7/ascii.7 b/share/man/man7/ascii.7 new file mode 100644 index 0000000..b876a53 --- /dev/null +++ b/share/man/man7/ascii.7 @@ -0,0 +1,116 @@ +.\" Copyright (c) 1989, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)ascii.7 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt ASCII 7 +.Os +.Sh NAME +.Nm ascii +.Nd octal, hexadecimal and decimal +.Tn ASCII +character sets +.Sh DESCRIPTION +The +.Nm octal +set: +.Bd -literal -offset left +000 nul 001 soh 002 stx 003 etx 004 eot 005 enq 006 ack 007 bel +010 bs 011 ht 012 nl 013 vt 014 np 015 cr 016 so 017 si +020 dle 021 dc1 022 dc2 023 dc3 024 dc4 025 nak 026 syn 027 etb +030 can 031 em 032 sub 033 esc 034 fs 035 gs 036 rs 037 us +040 sp 041 ! 042 " 043 # 044 $ 045 % 046 & 047 ' +050 ( 051 ) 052 * 053 + 054 , 055 - 056 . 057 / +060 0 061 1 062 2 063 3 064 4 065 5 066 6 067 7 +070 8 071 9 072 : 073 ; 074 < 075 = 076 > 077 ? +100 @ 101 A 102 B 103 C 104 D 105 E 106 F 107 G +110 H 111 I 112 J 113 K 114 L 115 M 116 N 117 O +120 P 121 Q 122 R 123 S 124 T 125 U 126 V 127 W +130 X 131 Y 132 Z 133 [ 134 \e\ 135 ] 136 ^ 137 _ +140 ` 141 a 142 b 143 c 144 d 145 e 146 f 147 g +150 h 151 i 152 j 153 k 154 l 155 m 156 n 157 o +160 p 161 q 162 r 163 s 164 t 165 u 166 v 167 w +170 x 171 y 172 z 173 { 174 | 175 } 176 ~ 177 del +.Ed +.Pp +The +.Nm hexadecimal +set: +.Bd -literal -offset left +00 nul 01 soh 02 stx 03 etx 04 eot 05 enq 06 ack 07 bel +08 bs 09 ht 0a nl 0b vt 0c np 0d cr 0e so 0f si +10 dle 11 dc1 12 dc2 13 dc3 14 dc4 15 nak 16 syn 17 etb +18 can 19 em 1a sub 1b esc 1c fs 1d gs 1e rs 1f us +20 sp 21 ! 22 " 23 # 24 $ 25 % 26 & 27 ' +28 ( 29 ) 2a * 2b + 2c , 2d - 2e . 2f / +30 0 31 1 32 2 33 3 34 4 35 5 36 6 37 7 +38 8 39 9 3a : 3b ; 3c < 3d = 3e > 3f ? +40 @ 41 A 42 B 43 C 44 D 45 E 46 F 47 G +48 H 49 I 4a J 4b K 4c L 4d M 4e N 4f O +50 P 51 Q 52 R 53 S 54 T 55 U 56 V 57 W +58 X 59 Y 5a Z 5b [ 5c \e\ 5d ] 5e ^ 5f _ +60 \` 61 a 62 b 63 c 64 d 65 e 66 f 67 g +68 h 69 i 6a j 6b k 6c l 6d m 6e n 6f o +70 p 71 q 72 r 73 s 74 t 75 u 76 v 77 w +78 x 79 y 7a z 7b { 7c | 7d } 7e ~ 7f del +.Ed +.Pp +The +.Nm decimal +set: +.Bd -literal -offset left + 0 nul 1 soh 2 stx 3 etx 4 eot 5 enq 6 ack 7 bel + 8 bs 9 ht 10 nl 11 vt 12 np 13 cr 14 so 15 si + 16 dle 17 dc1 18 dc2 19 dc3 20 dc4 21 nak 22 syn 23 etb + 24 can 25 em 26 sub 27 esc 28 fs 29 gs 30 rs 31 us + 32 sp 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' + 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / + 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 + 56 8 57 9 58 : 59 ; 60 < 61 = 62 > 63 ? + 64 @ 65 A 66 B 67 C 68 D 69 E 70 F 71 G + 72 H 73 I 74 J 75 K 76 L 77 M 78 N 79 O + 80 P 81 Q 82 R 83 S 84 T 85 U 86 V 87 W + 88 X 89 Y 90 Z 91 [ 92 \e\ 93 ] 94 ^ 95 _ + 96 ` 97 a 98 b 99 c 100 d 101 e 102 f 103 g +104 h 105 i 106 j 107 k 108 l 109 m 110 n 111 o +112 p 113 q 114 r 115 s 116 t 117 u 118 v 119 w +120 x 121 y 122 z 123 { 124 | 125 } 126 ~ 127 del +.Ed +.Sh FILES +.Bl -tag -width /usr/share/misc/ascii -compact +.It Pa /usr/share/misc/ascii +.El +.Sh HISTORY +An +.Nm ascii +manual page appeared in +.At v7 . diff --git a/share/man/man7/environ.7 b/share/man/man7/environ.7 new file mode 100644 index 0000000..3888626 --- /dev/null +++ b/share/man/man7/environ.7 @@ -0,0 +1,179 @@ +.\" Copyright (c) 1983, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)environ.7 8.3 (Berkeley) 4/19/94 +.\" +.Dd April 19, 1994 +.Dt ENVIRON 7 +.Os BSD 4.2 +.Sh NAME +.Nm environ +.Nd user environment +.Sh SYNOPSIS +.Ar extern char **environ ; +.Sh DESCRIPTION +An array of strings called the +.Ar environment +is made available by +.Xr execve 2 +when a process begins. By convention these strings have the form +.Dq Ar name=value . +The following names are used by various commands: +.Bl -tag -width BLOCKSIZE +.It Ev BLOCKSIZE +The size of the block units used by several commands, most notably +.Xr df 1 , +.Xr du 1 +and +.Xr ls 1 . +BLOCKSIZE may be specified in units of a byte by specifying a number, +in units of a kilobyte by specifying a number followed by ``K'' or +``k'', in units of a megabyte by specifying a number followed by ``M'' +or ``m'' and in units of a gigabyte by specifying a number followed +by ``G'' or ``g''. +Sizes less than 512 bytes or greater than a gigabyte are ignored. +.It Ev EXINIT +A startup list of commands read by +.Xr ex 1 , +.Xr edit 1 , +and +.Xr vi 1 . +.It Ev HOME +A user's login directory, set by +.Xr login 1 +from the password file +.Xr passwd 5 . +.It Ev PATH +The sequence of directories, separated by colons, searched by +.Xr csh 1 , +.Xr sh 1 , +.Xr system 3 , +.Xr execvp 3 , +etc, when looking for an executable file. +PATH is set to ``:/usr/ucb:/bin:/usr/bin'' initially by +.Xr login 1 . +.It Ev PRINTER +The name of the default printer to be used by +.Xr lpr 1 , +.Xr lpq 1 , +and +.Xr lprm 1 . +.It Ev SHELL +The full pathname of the user's login shell. +.It Ev TERM +The kind of terminal for which output is to be prepared. +This information is used by commands, such as +.Xr nroff 1 +or +.Xr plot 1 +which may exploit special terminal capabilities. See +.Pa /usr/share/misc/termcap +.Pq Xr termcap 5 +for a list of terminal types. +.It Ev TERMCAP +The string describing the terminal in TERM, or, if +it begins with a '/', the name of the termcap file. +See +.Ev TERMPATH +below, +.Xr termcap 5 , +and +.Xr termcap . +.It Ev TERMPATH +A sequence of pathnames of termcap files, separated by colons or spaces, +which are searched for terminal descriptions in the order listed. Having +no +.Ev TERMPATH +is equivalent to a +.Ev TERMPATH +of +.Dq Pa $HOME/.termcap:/etc/termcap . +.Ev TERMPATH +is ignored if +.Ev TERMCAP +contains a full pathname. +.It Ev TMPDIR +The directory in which to store temporary files. +Most applications use either +.Dq /tmp +or +.Dq /var/tmp . +Setting this variable will make them use another directory. +.It Ev TZ +The timezone to use when displaying dates. +The normal format is a pathname relative to +.Dq /usr/share/zoneinfo . +For example, the command +.Dq env TZ=US/Pacific date +displays the current time in California. +See +.Xr tzset 3 +for more information. +.It Ev USER +The login name of the user. +.El +.Pp +Further names may be placed in the environment by the +.Xr export +command and +.Ar name=value +arguments in +.Xr sh 1 , +or by the +.Xr setenv +command if you use +.Xr csh 1 . +It is unwise to change certain +.Xr sh 1 +variables that are frequently exported by +.Pa .profile +files, such as +.Ev MAIL , +.Ev PS1 , +.Ev PS2 , +and +.Ev IFS , +unless you know what you are doing. +.Sh SEE ALSO +.Xr csh 1 , +.Xr ex 1 , +.Xr login 1 , +.Xr sh 1 , +.Xr execve 2 , +.Xr execle 3 , +.Xr system 3 , +.Xr termcap 3 , +.Xr termcap 5 +.Sh HISTORY +The +.Nm environ +manual page appeared in +.Bx 4.2 . diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 new file mode 100644 index 0000000..8d9ab10 --- /dev/null +++ b/share/man/man7/hier.7 @@ -0,0 +1,389 @@ +.\" Copyright (c) 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)hier.7 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt HIER 7 +.Os +.Sh NAME +.Nm hier +.Nd layout of filesystems +.Sh DESCRIPTION +A sketch of the filesystem hierarchy. +.Bl -tag -width "/stand/" +.It Li / +root directory of the filesystem +.It Li /bin/ +user utilities fundamental to both single-user and multi-user environments +.It Li /dev/ +block and character device files +.Pp +.Bl -tag -width MAKEDEV -compact +.It Li MAKEDEV +script for creating device files; +see +.Xr makedev 8 +.It Li fd/ +file descriptor files; +see +.Xr \&fd 4 +.El +.It Li /etc/ +system configuration files and scripts +.Pp +.Bl -tag -width "disklabels/" -compact +.It Li localtime +local timezone information; +see +.Xr ctime 3 +.It Li disklabels/ +backup disklabels; +see +.Xr disklabel 8 +.It Li kerberosIV/ +configuration files for the kerberos version IV; +see +.Xr kerberos 1 +.It Li mtree/ +mtree configuration files; +see +.Xr mtree 1 +.It Li namedb/ +named configuration files; +see +.Xr named 8 +.El +.It Li /mnt/ +empty directory commonly used by +system administrators as a temporary mount point +.It Li /sbin/ +system programs and administration utilities +fundamental to both single-user and multi-user environments +.It Li /stand/ +programs used in a standalone environment +.It Li /tmp/ +temporary files, usually a +.Xr mfs 8 +memory-based filesystem (the contents +of /tmp are usually NOT preserved across a system reboot) +.It Li /usr/ +contains the majority of user utilities and applications +.Pp +.Bl -tag -width "libdata/" -compact +.It Li bin/ +common utilities, programming tools, and applications +.It Li contrib/ +large packages contributed to Berkeley by outside parties +.It Li games/ +useful and semi-frivolous programs +.It Li include/ +standard C include files +.Pp +.Bl -tag -width "kerberosIV/" -compact +.It Li X11/ +C include files for X11 window system +.It Li arpa/ +C include files for Internet service protocols +.It Li kerberosIV/ +C include files for kerberos authentication package; +see +.Xr kerberos 1 +.It Li machine/ +machine specific C include files +.It Li net/ +misc network C include files +.It Li netimp/ +C include files for IMP protocols; +see +.Xr imp 4 +.It Li netinet/ +C include files for Internet standard protocols; +see +.Xr inet 4 +.It Li netiso/ +C include files for ISO standard protocols; +see +.Xr iso 4 +.It Li netns/ +C include files for XNS standard protocols; +see +.Xr \&ns 4 +.It Li nfs/ +C include files for NFS (Network File System) +.It Li pascal/ +include files for pc 1 +.It Li protocols/ +C include files for Berkeley service protocols +.It Li sys/ +system C include files (kernel data structures) +.It Li ufs/ +C include files for UFS (The U-word File System) +.El +.Pp +.It Li lib/ +archive libraries +.Pp +.Bl -tag -width Fl -compact +.It Li uucp/ +UUCP configuration files (historically placed; to be moved) +.El +.It Li libdata/ +misc. utility data files +.It Li libexec/ +system daemons & system utilities (executed by other programs) +.It Li local/ +local executables, libraries, etc. +.It Li obj/ +architecture-specific target tree produced by building the /usr/src tree +.It Li old/ +programs from past lives of BSD which may disappear in future +releases +.It Li sbin/ +system daemons & system utilities (executed by users) +.It Li share/ +architecture-independent ascii text files +.Pp +.Bl -tag -width "calendar/" -compact +.It Li calendar/ +a variety of pre-fab calendar files; +see +.Xr calendar 1 +.It Li dict/ +word lists; +see +.Xr look 1 +.Pp +.Bl -tag -width Fl -compact +.It Li words +common words +.It Li web2 +words from Webster's 2nd International +.It Li papers/ +reference databases; +see +.Xr refer 1 +.It Li special/ +custom word lists; +see +.Xr spell 1 +.El +.Pp +.It Li doc/ +misc documentation; +src for most of the printed +.Bx BSD +manuals (available +from the +.Tn USENIX +association) +.It Li games/ +ascii text files used by various games +.It Li man/ +manual pages +.It Li me/ +macros for use with the me macro package +.It Li misc/ +misc system-wide ascii text files +.Bl -tag -width Fl -compact +.It Li termcap +terminal characteristics database; +see +.Xr termcap 5 +.El +.It Li mk/ +templates for make; +see +.Xr make 1 +.It Li ms/ +macros for use with the ms macro package +.It Li skel/ +example . (dot) files for new accounts +.It Li tabset/ +tab description files for a variety of terminals; used in +the termcap file; +see +.Xr termcap 5 +.It Li tmac/ +text processing macros; +see +.Xr nroff 1 +and +.Xr troff 1 +.It Li zoneinfo/ +timezone configuration information; +see +.Xr tzfile 5 +.El +.Pp +.It Li src/ +BSD and/or local source files +.Pp +.Bl -tag -width "kerberosIV/" -compact +.It Li bin/ +src for files in /bin +.It Li contrib/ +src for files in /usr/contrib +.It Li etc/ +src for files in /etc +.It Li games/ +src for files in /usr/games +.It Li include/ +src for files in /usr/include +.It Li kerberosIV/ +src for kerberos version IV +.It Li lib/ +src for files in /usr/lib +.It Li libexec/ +src for files in /usr/libexec +.It Li local/ +src for files in /usr/local +.It Li old/ +src for files in /usr/old +.It Li pgrm/ +src for programming tools in /usr/bin +.It Li sbin/ +src for files in /sbin +.It Li share/ +src for files in /usr/share +.It Li sys/ +kernel src files +.It Li usr.bin/ +src for files in /usr/bin +.It Li usr.sbin/ +src for files in /usr/sbin +.El +.El +.It Li /var/ +multi-purpose log, temporary, transient, and spool files +.Pp +.Bl -tag -width "preserve/" -compact +.It Li account/ +system accounting files +.Pp +.Bl -tag -width Fl -compact +.It Li acct +execution accounting file; +see +.Xr acct 5 +.El +.Pp +.It Li at/ +timed command scheduling files; +see +.Xr \&at 1 +.It Li backups/ +misc. backup files +.It Li db/ +misc. automatically generated system-specific database files +.It Li games/ +misc. game status and log files +.It Li log/ +misc. system log files +.Pp +.Bl -tag -width Fl -compact +.It Li wtmp +login/logout log; +see +.Xr wtmp 5 +.El +.Pp +.It Li mail/ +user mailbox files +.It Li preserve/ +temporary home of files preserved after an accidental death +of an editor; +see +.Xr \&ex 1 +.It Li quotas/ +filesystem quota information files +.It Li run/ +system information files describing various info about +system since it was booted +.Pp +.Bl -tag -width Fl -compact +.It Li utmp +database of current users; +see +.Xr utmp 5 +.El +.Pp +.It Li rwho/ +rwho data files; +see +.Xr rwhod 8 , +.Xr rwho 1 , +and +.Xr ruptime 1 +.It Li spool/ +misc. printer and mail system spooling directories +.Pp +.Bl -tag -width Fl -compact +.It Li ftp/ +commonly ~ftp; the anonymous ftp root directory +.It Li mqueue/ +undelivered mail queue; +see +.Xr sendmail 8 +.It Li output/ +line printer spooling directories +.It Li secretmail/ +secretmail spool directory; +see +.Xr xget 1 +.It Li uucp/ +uucp spool directory +.It Li uucppublic/ +commonly ~uucp; public uucp temporary directory +.El +.Pp +.It Li tmp/ +temporary files that are kept between system reboots +.El +.It Li /vmunix +pure kernel executable (the operating system loaded into memory +at boot time). +.El +.Sh SEE ALSO +.Xr \&ls 1 , +.Xr apropos 1 , +.Xr whatis 1 , +.Xr whereis 1 , +.Xr finger 1 , +.Xr which 1 , +.Xr find 1 , +.Xr grep 1 , +.Xr fsck 8 +.Sh HISTORY +A +.Nm hier +manual page appeared in +.At v7 . diff --git a/share/man/man7/hostname.7 b/share/man/man7/hostname.7 new file mode 100644 index 0000000..719ae0f --- /dev/null +++ b/share/man/man7/hostname.7 @@ -0,0 +1,92 @@ +.\" Copyright (c) 1987, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)hostname.7 8.2 (Berkeley) 12/30/93 +.\" +.Dd December 30, 1993 +.Dt HOSTNAME 7 +.Os BSD 4.2 +.Sh NAME +.Nm hostname +.Nd host name resolution description +.Sh DESCRIPTION +Hostnames are domains, where a domain is a hierarchical, dot-separated +list of subdomains; for example, the machine monet, in the Berkeley +subdomain of the EDU subdomain of the Internet would be represented as +.Pp +.Dl monet.Berkeley.EDU +.Pp +(with no trailing dot). +.Pp +Hostnames are often used with network client and server programs, +which must generally translate the name to an address for use. +(This function is generally performed by the library routine +.Xr gethostbyname 3 . ) +Hostnames are resolved by the Internet name resolver in the following +fashion. +.Pp +If the name consists of a single component, i.e. contains no dot, +and if the environment variable +.Dq Ev HOSTALIASES +is set to the name of a file, +that file is searched for any string matching the input hostname. +The file should consist of lines made up of two white-space separated strings, +the first of which is the hostname alias, +and the second of which is the complete hostname +to be substituted for that alias. +If a case-insensitive match is found between the hostname to be resolved +and the first field of a line in the file, the substituted name is looked +up with no further processing. +.Pp +If the input name ends with a trailing dot, +the trailing dot is removed, +and the remaining name is looked up with no further processing. +.Pp +If the input name does not end with a trailing dot, it is looked up +by searching through a list of domains until a match is found. +The default search list includes first the local domain, +then its parent domains with at least 2 name components (longest first). +For example, +in the domain CS.Berkeley.EDU, the name lithium.CChem will be checked first +as lithium.CChem.CS.Berkeley.EDU and then as lithium.CChem.Berkeley.EDU. +Lithium.CChem.EDU will not be tried, as the there is only one component +remaining from the local domain. +The search path can be changed from the default +by a system-wide configuration file (see +.Xr resolver 5 ) . +.Sh SEE ALSO +.Xr gethostbyname 3 , +.Xr resolver 5 , +.Xr mailaddr 7 , +.Xr named 8 +.Sh HISTORY +.Nm Hostname +appeared in 4.2 BSD. diff --git a/share/man/man7/intro.7 b/share/man/man7/intro.7 new file mode 100644 index 0000000..07ef6a8 --- /dev/null +++ b/share/man/man7/intro.7 @@ -0,0 +1,60 @@ +.\" Copyright (c) 1983, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)intro.7 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt INTRO 7 +.Os BSD 4.2 +.Sh NAME +.Nm intro +.Nd miscellaneous information pages +.Sh DESCRIPTION +This section contains miscellaneous documentation, mostly +in the area of text processing macro packages for +.Xr troff 1 . +.Pp +.Ds I +.Cw mailaddr +.Cl ascii map of ASCII character set +.Cl environ user environment +.Cl eqnchar special character definitions for eqn +.Cl hier file system hierarchy +.Cl mailaddr mail addressing description +.Cl man macros to typeset manual pages +.Cl \&me macros for formatting papers +.Cl \&ms macros for formatting manuscripts +.Cl term conventional names for terminals +.Cw +.De +.Sh HISTORY +.Nm intro +appeared in 4.2 BSD. diff --git a/share/man/man7/mailaddr.7 b/share/man/man7/mailaddr.7 new file mode 100644 index 0000000..96a98f9 --- /dev/null +++ b/share/man/man7/mailaddr.7 @@ -0,0 +1,155 @@ +.\" Copyright (c) 1983, 1987, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)mailaddr.7 8.1 (Berkeley) 6/16/93 +.\" +.Dd June 16, 1993 +.Dt MAILADDR 7 +.Os BSD 4.2 +.Sh NAME +.Nm mailaddr +.Nd mail addressing description +.Sh DESCRIPTION +Mail addresses are based on the Internet protocol listed at the end of this +manual page. These addresses are in the general format +.Pp +.Dl user@domain +.Pp +where a domain is a hierarchical dot separated list of subdomains. For +example, a valid address is: +.Pp +.Dl eric@CS.Berkeley.EDU +.Pp +Unlike some other forms of addressing, domains do not imply any routing. +Thus, although this address is specified as an Internet address, it might +travel by an alternate route if that were more convenient or efficient. +For example, at Berkeley, the associated message would probably go directly +to CS over the Ethernet rather than going via the Berkeley Internet +gateway. +.Ss Abbreviation. +Under certain circumstances it may not be necessary to type the entire +domain name. In general, anything following the first dot may be omitted +if it is the same as the domain from which you are sending the message. +For example, a user on ``calder.berkeley.edu'' could send to ``eric@CS'' +without adding the ``berkeley.edu'' since it is the same on both sending +and receiving hosts. +.Ss Compatibility. +.Pp +Certain old address formats are converted to the new format to provide +compatibility with the previous mail system. In particular, +.Pp +.Dl user@host +.Pp +and +.Dl user@host.domain +.Pp +are allowed; +.Pp +.Dl host.domain!user +.Pp +is converted to +.Pp +.Dl user@host.domain +.Pp +and +.Pp +.Dl host!user +.Pp +is converted to +.Pp +.Dl user@host.UUCP +.Pp +This is normally converted back to the ``host!user'' form before being sent +on for compatibility with older UUCP hosts. +.Pp +.Ss Case Distinctions. +.Pp +Domain names (i.e., anything after the ``@'' sign) may be given in any mixture +of upper and lower case with the exception of UUCP hostnames. Most hosts +accept any combination of case in user names, with the notable exception of +MULTICS sites. +.Ss Route-addrs. +.Pp +Under some circumstances it may be necessary to route a message through +several hosts to get it to the final destination. Normally this routing +is done automatically, but sometimes it is desirable to route the message +manually. Addresses which show these relays are termed ``route-addrs.'' +These use the syntax: +.Pp +.Dl <@hosta,@hostb:user@hostc> +.Pp +This specifies that the message should be sent to hosta, from there to hostb, +and finally to hostc. This path is forced even if there is a more efficient +path to hostc. +.Pp +Route-addrs occur frequently on return addresses, since these are generally +augmented by the software at each host. It is generally possible to ignore +all but the ``user@hostc'' part of the address to determine the actual +sender. +.Pp +[Note: the route-addr syntax is officially deprecated +in RFC 1123 and should not be used.] +.Pp +Many sites also support the ``percent hack'' for simplistic routing: +.Pp +.Dl user%hostc%hostb@hosta +.Pp +is routed as indicated in the previous example. +.Ss Postmaster. +.Pp +Every site is required to have a user or user alias designated ``postmaster'' +to which problems with the mail system may be addressed. +.Ss Other Networks. +.Pp +Some other networks can be reached by giving the name of the network as the +last component of the domain. +.Em This is not a standard feature +and may +not be supported at all sites. For example, messages to CSNET or BITNET sites +can often be sent to ``user@host.CSNET'' or ``user@host.BITNET'' respectively. +.Sh SEE ALSO +.Xr mail 1 , +.Xr sendmail 8 ; +.br +Crocker, D. H., +.Em Standard for the Format of Arpa Internet Text Messages, +RFC822. +.Sh HISTORY +.Nm Mailaddr +appeared in 4.2 BSD. +.Sh BUGS +The RFC822 group syntax (``group:user1,user2,user3;'') is not supported +except in the special case of ``group:;'' because of a conflict with old +berknet-style addresses. +.Pp +Route-Address syntax is grotty. +.Pp +UUCP- and Internet-style addresses do not coexist politely. diff --git a/share/man/man7/mdoc.7 b/share/man/man7/mdoc.7 new file mode 100644 index 0000000..b7d92fb --- /dev/null +++ b/share/man/man7/mdoc.7 @@ -0,0 +1,404 @@ +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)mdoc.7 8.2 (Berkeley) 12/30/93 +.\" +.Dd December 30, 1993 +.Os +.Dt MDOC 7 +.Sh NAME +.Nm mdoc +.Nd quick reference guide for the +.Nm \-mdoc +macro package +.Sh SYNOPSIS +.Nm groff +.Fl m Ns Ar doc +.Ar files ... +.Sh DESCRIPTION +The +.Nm \-mdoc +package is a set of content-based and domain-based macros +used to format the +.Bx +man pages. +The macro names and their meanings are +listed below for quick reference; for +a detailed explanation on using the package, +see the tutorial sampler +.Xr mdoc.samples 7 . +.Pp +The macros are described in two groups, the first +includes the structural and physical page layout macros. +The second contains the manual and general text domain +macros which differentiate the +.Nm -\mdoc +package from other +.Xr troff +formatting packages. +.Sh PAGE STRUCTURE DOMAIN +.Ss Title Macros +To create a valid manual page, these three macros, in this order, +are required: +.Bl -tag -width "xxxx.Os OPERATINGxSYSTEM [version/release]" -compact +.It Li "\&.Dd " Ar "Month day, year" +Document date. +.It Li "\&.Dt " Ar "DOCUMENT_TITLE [section] [volume]" +Title, in upper case. +.It Li "\&.Os " Ar "OPERATING_SYSTEM [version/release]" +Operating system +.Pq Tn BSD . +.El +.Ss Page Layout Macros +Section headers, paragraph breaks, lists and displays. +.Bl -tag -width flag -compact +.It Li \&.Sh +Section Headers. +Valid headers, in the order of presentation: +.Bl -tag -width "RETURN VALUES" -compact +.It Ar NAME +Name section, should include the +.Ql \&.Nm +or +.Ql \&.Fn +and the +.Ql \&.Nd +macros. +.It Ar SYNOPSIS +Usage. +.It Ar DESCRIPTION +General description, should include +options and parameters. +.It Ar RETURN VALUES +Sections two and three function calls. +.It Ar ENVIRONMENT +Describe environment variables. +.It Ar FILES +Files associated with the subject. +.It Ar EXAMPLES +Examples and suggestions. +.It Ar DIAGNOSTICS +Normally used for section four device interface diagnostics. +.It Ar ERRORS +Sections two and three error and signal +handling. +.It Ar SEE ALSO +Cross references and citations. +.It Ar STANDARDS +Conformance to standards if applicable. +.It Ar HISTORY +If a standard is not applicable, the history +of the subject should be given. +.It Ar BUGS +Gotchas and caveats. +.It Ar other +Customized headers may be added at +the authors discretion. +.El +.It Li \&.Ss +Subsection Headers. +.It Li \&.Pp +Paragraph Break. +Vertical space (one line). +.It Li \&.D1 +(D-one) Display-one +Indent and display one text line. +.It Li \&.Dl +(D-ell) Display-one literal. +Indent and display one line of literal text. +.It Li \&.Bd +Begin-display block. +Display options: +.Bl -tag -width "xoffset string " -compact +.It Fl ragged +Unjustified (ragged edges). +.It Fl filled +Justified. +.It Fl literal +Literal text or code. +.It Fl file Ar name +Read in named +.Ar file +and display. +.It Fl offset Ar string +Offset display. +Acceptable +.Ar string +values: +.Bl -tag -width indent-two -compact +.It Ar left +Align block on left (default). +.It Ar center +Approximate center margin. +.It Ar indent +Six constant width spaces (a tab). +.It Ar indent-two +Two tabs. +.It Ar right +Left aligns block 2 inches from +right. +.It Ar xx Ns Cm n +Where +.Ar xx +is a number from +.No \&4 Ns Cm n +to +.No \&9\&9 Ns Cm n . +.It Ar Aa +Where +.Ar Aa +is a callable macro name. +.It Ar string +The width of +.Ar string +is used. +.El +.El +.It Li \&.Ed +End-display (matches \&.Bd). +.It Li \&.Bl +Begin-list. +Create lists or columns. Options: +.Bl -tag -width flag -compact +.It Ar List-types +.Bl -column xbullet -compact +.It Fl bullet Ta "Bullet Item List" +.It Fl item Ta "Unlabeled List" +.It Fl enum Ta "Enumerated List" +.It Fl tag Ta "Tag Labeled List" +.It Fl diag Ta "Diagnostic List" +.It Fl hang Ta "Hanging Labeled List" +.It Fl ohang Ta "Overhanging Labeled List" +.It Fl inset Ta "Inset or Run-on Labeled List" +.El +.It List-parameters +.Bl -tag -width "xcompact " -compact +.It Fl offset +(All lists.) See +.Ql \&.Bd +begin-display above. +.It Fl width +.Pf ( Fl tag +and +.Fl hang +lists only.) +See +.Ql \&.Bd . +.It Fl compact +(All lists.) +Suppresses blank lines. +.El +.El +.It Li \&.El +End-list. +.It Li \&.It +List item. +.El +.Sh MANUAL AND GENERAL TEXT DOMAIN MACROS +The manual and general text domain macros are special in that +most of them are parsed for callable macros +for example: +.Bl -tag -width ".Op Fl s Ar filex" -offset indent +.It Li "\&.Op Fl s Ar file" +Produces +.Op Fl s Ar file +.El +.Pp +In this example, the option enclosure macro +.Ql \&.Op +is parsed, and calls the callable content macro +.Ql \&Fl +which operates on the argument +.Ql s +and then calls the callable content macro +.Ql \&Ar +which operates on the argument +.Ql file . +Some macros may be callable, but are not parsed and vice versa. +These macros are indicated in the +.Em parsed +and +.Em callable +columns below. +.Pp +Unless stated, manual domain macros share a common syntax: +.Pp +.Dl \&.Va argument [\ .\ ,\ ;\ :\ (\ )\ [\ ]\ argument \...\ ] +.Pp +.Sy Note : +Opening and closing +punctuation characters are only recognized as such if they are presented +one at a time. +The string +.Ql ")," +is not recognized as punctuation and will be output with a leading white +space and in what ever font the calling macro uses. +The +argument list +.Ql "] ) ," +is recognized as three sequential closing punctuation characters +and a leading white space is not output between the characters +and the previous argument (if any). +The special meaning of a punctuation character may be escaped +with the string +.Ql \e& . +For example the following string, +.Bl -tag -width "&.Ar file1\ , file2\ , file3\ )\ ." -offset indent +.It Li "\&.Ar file1\ , file2\ , file3\ )\ ." +Produces +.Ar file1 , file2 , file3 ) . +.El +.ne 1i +.Ss Manual Domain Macros +.Bl -column "Name" "Parsed" Callable" -compact +.It Em Name Parsed Callable Description +.It Li \&Ad Ta Yes Ta Yes Ta Address. "(This macro may be deprecated.)" +.It Li \&Ar Ta Yes Ta Yes Ta "Command line argument." +.It Li \&Cd Ta \&No Ta \&No Ta "Configuration declaration (section four only)." +.It Li \&Cm Ta Yes Ta Yes Ta "Command line argument modifier." +.It Li \&Dv Ta Yes Ta Yes Ta "Defined variable (source code)." +.It Li \&Er Ta Yes Ta Yes Ta "Error number (source code)." +.It Li \&Ev Ta Yes Ta Yes Ta "Environment variable." +.It Li \&Fa Ta Yes Ta Yes Ta "Function argument." +.It Li \&Fd Ta Yes Ta Yes Ta "Function declaration." +.It Li \&Fn Ta Yes Ta Yes Ta "Function call (also .Fo and .Fc)." +.It Li \&Ic Ta Yes Ta Yes Ta "Interactive command." +.It Li \&Li Ta Yes Ta Yes Ta "Literal text." +.It Li \&Nm Ta Yes Ta Yes Ta "Command name." +.It Li \&Op Ta Yes Ta Yes Ta "Option (also .Oo and .Oc)." +.It Li \&Ot Ta Yes Ta Yes Ta "Old style function type (Fortran only)." +.It Li \&Pa Ta Yes Ta Yes Ta "Pathname or file name." +.It Li \&St Ta Yes Ta Yes Ta "Standards (-p1003.2, -p1003.1 or -ansiC)" +.It Li \&Va Ta Yes Ta Yes Ta "Variable name." +.It Li \&Vt Ta Yes Ta Yes Ta "Variable type (Fortran only)." +.It Li \&Xr Ta Yes Ta Yes Ta "Manual Page Cross Reference." +.El +.Ss General Text Domain Macros +.Bl -column "Name" "Parsed" Callable" -compact +.It Em "Name Parsed Callable Description" +.It Li \&%A Ta Yes Ta \&No Ta "Reference author." +.It Li \&%B Ta Yes Ta Yes Ta "Reference book title." +.It Li \&%\&C Ta \&No Ta \&No Ta "Reference place of publishing (city)." +.It Li \&%\&D Ta \&No Ta \&No Ta "Reference date." +.It Li \&%J Ta Yes Ta Yes Ta "Reference journal title." +.It Li \&%N Ta \&No Ta \&No Ta "Reference issue number." +.It Li \&%\&O Ta \&No Ta \&No Ta "Reference optional information." +.It Li \&%P Ta \&No Ta \&No Ta "Reference page number(s)." +.It Li \&%R Ta \&No Ta \&No Ta "Reference report Name." +.It Li \&%T Ta Yes Ta Yes Ta "Reference article title." +.It Li \&%V Ta \&No Ta \&No Ta "Reference volume." +.It Li \&Ac Ta Yes Ta Yes Ta "Angle close quote." +.It Li \&Ao Ta Yes Ta Yes Ta "Angle open quote." +.It Li \&Aq Ta Yes Ta Yes Ta "Angle quote." +.It Li \&At Ta \&No Ta \&No Ta Tn "AT&T UNIX" +.It Li \&Bc Ta Yes Ta Yes Ta "Bracket close quote." +.It Li \&Bf Ta \&No Ta \&No Ta "Begin font mode." +.It Li \&Bo Ta Yes Ta Yes Ta "Bracket open quote." +.It Li \&Bq Ta Yes Ta Yes Ta "Bracket quote." +.It Li \&Bx Ta Yes Ta Yes Ta Bx . +.It Li \&Db Ta \&No Ta \&No Ta "Debug (default is \\*qoff\\*q)" +.It Li \&Dc Ta Yes Ta Yes Ta "Double close quote." +.It Li \&Do Ta Yes Ta Yes Ta "Double open quote." +.It Li \&Dq Ta Yes Ta Yes Ta "Double quote." +.It Li \&Ec Ta Yes Ta Yes Ta "Enclose string close quote." +.It Li \&Ef Ta \&No Ta \&No Ta "End font mode." +.It Li \&Em Ta Yes Ta Yes Ta "Emphasis (traditional English)." +.It Li \&Eo Ta Yes Ta Yes Ta "Enclose string open quote." +.It Li \&No Ta Yes Ta Yes Ta "Normal text (no-op)." +.It Li \&Ns Ta Yes Ta Yes Ta "No space." +.It Li \&Pc Ta Yes Ta Yes Ta "Parenthesis close quote." +.It Li \&Pf Ta Yes Ta \&No Ta "Prefix string." +.It Li \&Po Ta Yes Ta Yes Ta "Parenthesis open quote." +.It Li \&Pq Ta Yes Ta Yes Ta "Parentheses quote." +.It Li \&Qc Ta Yes Ta Yes Ta "Strait Double close quote." +.It Li \&Ql Ta Yes Ta Yes Ta "Quoted literal." +.It Li \&Qo Ta Yes Ta Yes Ta "Strait Double open quote." +.It Li \&Qq Ta Yes Ta Yes Ta "Strait Double quote." +.It Li \&Re Ta \&No Ta \&No Ta "Reference start." +.It Li \&Rs Ta \&No Ta \&No Ta "Reference start." +.It Li \&Sc Ta Yes Ta Yes Ta "Single close quote." +.It Li \&So Ta Yes Ta Yes Ta "Single open quote." +.It Li \&Sq Ta Yes Ta Yes Ta "Single quote." +.It Li \&Sm Ta \&No Ta \&No Ta "Space mode (default is \\*qon\\*q)" +.It Li \&Sx Ta Yes Ta Yes Ta "Section Cross Reference." +.It Li \&Sy Ta Yes Ta Yes Ta "Symbolic (traditional English)." +.It Li \&Tn Ta Yes Ta Yes Ta "Trade or type name (small Caps)." +.It Li \&Ux Ta Yes Ta Yes Ta Ux +.It Li \&Xc Ta Yes Ta Yes Ta "Extend argument list close." +.It Li \&Xo Ta Yes Ta Yes Ta "Extend argument list close." +.El +.\" .It Sy \&Hf Ta \&No Ta \&No Ta "Include file with header" +.Pp +Macro names ending in +.Ql q +quote remaining items on the argument list. +Macro names ending in +.Ql o +begin a quote which may span more than one line of input and +are close quoted with the matching macro name ending in +.Ql c . +Enclosure macros may be nested and are limited to +eight arguments. +.Pp +Note: the extended argument list macros +.Pf ( Ql \&.Xo , +.Ql \&.Xc ) +and the function enclosure macros +.Pf ( Ql \&.Fo , +.Ql \&.Fc ) +are irregular. +The extended list macros are used when the number of macro arguments +would exceed the +.Xr troff +limitation of nine arguments. +.Sh CONFIGURATION +For site specific configuration of the macro package, +see the file +.Pa /usr/src/share/tmac/README . +.Sh FILES +.Bl -tag -width "tmac.doc-ditroff" -compact +.It Pa tmac.doc +Manual and general text domain macros. +.It Pa tmac.doc-common +Common structural macros and definitions. +.It Pa tmac.doc-nroff +Site dependent +.Xr nroff +style file. +.It Pa tmac.doc-ditroff +Site dependent +.Xr troff +style file. +.It Pa tmac.doc-syms +Special defines (such as the standards macro). +.El +.Sh SEE ALSO +.Xr mdoc.samples 7 diff --git a/share/man/man7/mdoc.samples.7 b/share/man/man7/mdoc.samples.7 new file mode 100644 index 0000000..c1cc9c6 --- /dev/null +++ b/share/man/man7/mdoc.samples.7 @@ -0,0 +1,2826 @@ +.\" Copyright (c) 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)mdoc.samples.7 8.2 (Berkeley) 12/30/93 +.\" +.\" This tutorial sampler invokes every macro in the package several +.\" times and is guaranteed to give a worst case performance +.\" for an already extremely slow package. +.\" +.Dd December 30, 1993 +.Os +.Dt MDOC.SAMPLES 7 +.Sh NAME +.Nm mdoc.samples +.Nd tutorial sampler for writing +.Bx +manuals with +.Nm \-mdoc +.Sh SYNOPSIS +.Nm man mdoc.samples +.Sh DESCRIPTION +A tutorial sampler for writing +.Bx +manual pages with the +.Nm \-mdoc +macro package, a +.Em content Ns \-based +and +.Em domain Ns \-based +formatting +package for +.Xr troff 1 . +Its predecessor, the +.Xr \-man 7 +package, +addressed page layout leaving the +manipulation of fonts and other +typesetting details to the individual author. +In +.Nm \-mdoc , +page layout macros +make up the +.Em "page structure domain" +which consists of macros for titles, section headers, displays +and lists. Essentially items which affect the physical position +of text on a formatted page. +In addition to the page structure domain, there are two more domains, +the manual domain and the general text domain. +The general text domain is defined as macros which +perform tasks such as quoting or emphasizing pieces of text. +The manual domain is defined as macros that are a subset of the +day to day informal language used to describe commands, routines +and related +.Bx +files. +Macros in the manual domain handle +command names, command line arguments and options, function names, +function parameters, pathnames, variables, cross +references to other manual pages, and so on. +These domain +items have value +for both the author and the future user of the manual page. +It is hoped the consistency gained +across the manual set will provide easier +translation to future documentation tools. +.Pp +Throughout the +.Ux +manual pages, a manual entry +is simply referred +to as a man page, regardless of actual length and without +sexist intention. +.Sh GETTING STARTED +Since a tutorial document is normally read when a person +desires to use the material immediately, the assumption has +been made that the user of this document may be impatient. +The material presented in the remained of this document is +outlined as follows: +.Bl -enum -offset indent +.It +.Tn "TROFF IDIOSYNCRASIES" +.Bl -tag -width flag -compact -offset indent +.It "Macro Usage" . +.It "Passing Space Characters in an Argument" . +.It "Trailing Blank Space Characters (a warning)" . +.It "Escaping Special Characters" . +.El +.It +.Tn "THE ANATOMY OF A MAN PAGE" +.Bl -tag -width flag -compact -offset indent +.It "A manual page template" . +.El +.It +.Tn "INTRODUCTION OF TITLE MACROS" . +.It +.Tn "INTRODUCTION OF MANUAL AND GENERAL TEXT DOMAINS" . +.Bl -tag -width flag -compact -offset indent +.It "What's in a name..." . +.It "General Syntax" . +.El +.It +.Tn "MANUAL DOMAIN" +.Bl -tag -width flag -compact -offset indent +.It "Addresses" . +.It "Arguments" . +.It "Configuration Declarations (section four only)" . +.It "Command Modifier . +.It "Defined Variables" . +.It "Errno's (Section two only)" . +.It "Environment Variables" . +.It "Function Argument" . +.It "Function Declaration" . +.It "Flags" . +.It "Functions (library routines)" . +.It "Function Types" . +.\" .It "Header File (including source code)" . +.It "Interactive Commands" . +.It "Literals" . +.It "Names" . +.It "Options" . +.It "Pathnames" . +.It "Variables" . +.It "Cross References" . +.El +.It +.Tn "GENERAL TEXT DOMAIN" +.Bl -tag -width flag -compact -offset indent +.It "AT&T Macro" . +.It "BSD Macro" . +.It "UNIX Macro" . +.It "Emphasis Macro" . +.It "Enclosure/Quoting Macros" +.Bl -tag -width flag -compact -offset indent +.It "Angle Bracket Quote/Enclosure" . +.It "Bracket Quotes/Enclosure" . +.It "Double Quote macro/Enclosure" . +.It "Parenthesis Quote/Enclosure" . +.It "Single Quotes/Enclosure" . +.It "Prefix Macro" . +.El +.It "Extended Arguments" . +.It "No\-Op or Normal Text Macro" . +.It "No Space Macro" . +.It "Section Cross References" . +.It "Symbolic Macro" . +.It "References and Citations" . +.It "Trade Names (Acronyms and Type Names)" . +.El +.It +.Tn "PAGE STRUCTURE DOMAIN" +.Bl -tag -width flag -compact -offset indent +.It "Section Headers" . +.It "Paragraphs and Line Spacing" . +.It "Keeps" . +.It "Displays" . +.It "Lists and Columns" . +.El +.It +.Tn "PREDEFINED STRINGS" +.It +.Tn "DIAGNOSTICS" +.It +.Tn "FORMATTING WITH GROFF, TROFF AND NROFF" +.It +.Tn "BUGS" +.El +.ne 7 +.Sh TROFF IDIOSYNCRASIES +The +.Nm \-mdoc +package attempts to simplify the process of writing a man page. +Theoretically, one should not have to learn the dirty details of +.Xr troff 1 +to use +.Nm \-mdoc ; +however, there are a few +limitations which are unavoidable and best gotten out +of the way. +And, too, be forewarned, this package is +.Em not +fast. +.Ss Macro Usage +As in +.Xr troff 1 , +a macro is called by placing a +.Ql \&\. +(dot character) +at the beginning of +a line followed by the two character name for the macro. +Arguments may follow the macro separated by spaces. +It is the dot character at the beginning of the line which causes +.Xr troff 1 +to interpret the next two characters as a macro name. +To place a +.Ql \&\. +(dot character) +at the beginning of a line in some context other than +a macro invocation, precede the +.Ql \&\. +(dot) with the +.Ql \e& +escape sequence. +The +.Ql \e& +translates literally to a zero width space, and is never displayed in the +output. +.Pp +In general, +.Xr troff 1 +macros accept up to nine arguments, any +extra arguments are ignored. +Most macros in +.Nm \-mdoc +accept nine arguments and, +in limited cases, arguments may be continued or extended +on the +next line (See +.Sx Extensions ) . +A few macros handle quoted arguments (see +.Sx Passing Space Characters in an Argument +below). +.Pp +Most of the +.Nm \-mdoc +general text domain and manual domain macros are special +in that their argument lists are +.Em parsed +for callable macro names. +This means an argument on the argument list which matches +a general text or manual domain macro name and is determined +to be callable will be executed +or called when it is processed. +In this case +the argument, although the name of a macro, +is not preceded by a +.Ql \&\. +(dot). +It is in this manner that many macros are nested; for +example +the option macro, +.Ql \&.Op , +may +.Em call +the flag and argument macros, +.Ql \&Fl +and +.Ql \&Ar , +to specify an optional flag with an argument: +.Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent +.It Op Fl s Ar bytes +is produced by +.Li \&.Op \&Fl s \&Ar bytes +.El +.Pp +To prevent a two character +string from being interpreted as a macro name, precede +the string with the +escape sequence +.Ql \e& : +.Bl -tag -width "\&.Op \&Fl s \&Ar bytes" -offset indent +.It Op \&Fl s \&Ar bytes +is produced by +.Li \&.Op \e&Fl s \e&Ar bytes +.El +.Pp +Here the strings +.Ql \&Fl +and +.Ql \&Ar +are not interpreted as macros. +Macros whose argument lists are parsed for callable arguments +are referred to +as parsed and macros which may be called from an argument +list are referred to as callable +throughout this document and in the companion quick reference +manual +.Xr mdoc 7 . +This is a technical +.Em faux pas +as almost all of the macros in +.Nm \-mdoc +are parsed, but as it was cumbersome to constantly refer to macros +as being callable and being able to call other macros, +the term parsed has been used. +.Ss Passing Space Characters in an Argument +Sometimes it is desirable to give as one argument a string +containing one or more blank space characters. +This may be necessary +to defeat the nine argument limit or to specify arguments to macros +which expect particular arrangement of items in the argument list. +For example, +the function macro +.Ql \&.Fn +expects the first argument to be the name of a function and any +remaining arguments to be function parameters. +As +.Tn "ANSI C" +stipulates the declaration of function parameters in the +parenthesized parameter list, each parameter is guaranteed +to be at minimum a two word string. +For example, +.Fa int foo . +.Pp +There are two possible ways to pass an argument which contains +an embedded space. +.Em Implementation note : +Unfortunately, the most convenient way +of passing spaces in between quotes by reassigning individual +arguments before parsing was fairly expensive speed wise +and space wise to implement in all the macros for +.Tn AT&T +.Xr troff . +It is not expensive for +.Xr groff +but for the sake of portability, has been limited +to the following macros which need +it the most: +.Pp +.Bl -tag -width 4n -offset indent -compact +.It Li \&Cd +Configuration declaration (section 4 +.Sx SYNOPSIS ) +.It Li \&Bl +Begin list (for the width specifier). +.It Li \&Em +Emphasized text. +.It Li \&Fn +Functions (sections two and four). +.It Li \&It +List items. +.It Li \&Li +Literal text. +.It Li \&Sy +Symbolic text. +.It Li \&%B +Book titles. +.It Li \&%J +Journal names. +.It Li \&%O +Optional notes for a reference. +.It Li \&%R +Report title (in a reference). +.It Li \&%T +Title of article in a book or journal. +.El +.Pp +One way of passing a string +containing blank spaces is to use the hard or unpaddable space character +.Ql \e\ , +that is, a blank space preceded by the escape character +.Ql \e . +This method may be used with any macro but has the side effect +of interfering with the adjustment of text +over the length of a line. +.Xr Troff +sees the hard space as if it were any other printable character and +cannot split the string into blank or newline separated pieces as one +would expect. +The method is useful for strings which are not expected +to overlap a line boundary. +For example: +.Bl -tag -width "fetch(char *str)" -offset indent +.It Fn fetch char\ *str +is created by +.Ql \&.Fn fetch char\e *str +.It Fn fetch "char *str" +can also be created by +.Ql \&.Fn fetch "\\*q*char *str\\*q" +.El +.Pp +If the +.Ql \e +or quotes +were omitted, +.Ql \&.Fn +would see three arguments and +the result would be: +.Pp +.Dl Fn fetch char *str +.Pp +For an example of what happens when the parameter list overlaps +a newline boundary, see the +.Sx BUGS +section. +.Ss Trailing Blank Space Characters +.Xr Troff +can be confused by blank space characters at the end of a line. +It +is a wise preventive measure to globally remove all blank spaces +from <blank-space><end-of-line> character sequences. +Should the need +arise to force a blank character at the end of a line, +it may be forced with an unpaddable space and the +.Ql \e& +escape character. +For example, +.Ql string\e\ \e& . +.Ss Escaping Special Characters +Special characters +like the newline character +.Ql \en , +are handled by replacing the +.Ql \e +with +.Ql \ee +(e.g. +.Ql \een ) +to preserve +the backslash. +.Sh THE ANATOMY OF A MAN PAGE +The body of a man page is easily constructed from a basic +template found in the file: +.Bd -literal -offset indent +\&.\e" /usr/share/misc/man.template: +\&.\e" The following six lines are required. +\&.Dd Month day, year +\&.Os OPERATING_SYSTEM [version/release] +\&.Dt DOCUMENT_TITLE [section number] [volume] +\&.Sh NAME +\&.Sh SYNOPSIS +\&.Sh DESCRIPTION +\&.\e" The following requests should be uncommented and +\&.\e" used where appropriate. This next request is +\&.\e" for sections 2 and 3 function return values only. +\&.\e" .Sh RETURN VALUES +\&.\e" This next request is for sections 1, 6, 7 & 8 only +\&.\e" .Sh ENVIRONMENT +\&.\e" .Sh FILES +\&.\e" .Sh EXAMPLES +\&.\e" This next request is for sections 1, 6, 7 & 8 only +\&.\e" (command return values (to shell) and +\&.\e" fprintf/stderr type diagnostics) +\&.\e" .Sh DIAGNOSTICS +\&.\e" The next request is for sections 2 and 3 error +\&.\e" and signal handling only. +\&.\e" .Sh ERRORS +\&.\e" .Sh SEE ALSO +\&.\e" .Sh STANDARDS +\&.\e" .Sh HISTORY +\&.\e" .Sh AUTHORS +\&.\e" .Sh BUGS +.Ed +.Pp +The first items in the template are the macros +.Pq Li \&.Dd , \&.Os , \&.Dt ; +the document date, +the operating system the man page or subject source is developed +or modified for, +and the man page title +.Pq Em in upper case +along with the section of the manual the page +belongs in. +These macros identify the page, +and are discussed below in +.Sx TITLE MACROS . +.Pp +The remaining items in the template are section headers +.Pq Li \&.Sh ; +of which +.Sx NAME , +.Sx SYNOPSIS +and +.Sx DESCRIPTION +are mandatory. +The +headers are +discussed in +.Sx PAGE STRUCTURE DOMAIN , +after +presentation of +.Sx MANUAL DOMAIN . +Several content macros are used to demonstrate page layout macros; +reading about content macros before page layout macros is +recommended. +.Sh TITLE MACROS +The title macros are the first portion of the page structure +domain, but are presented first and separate for someone who +wishes to start writing a man page yesterday. +Three header macros designate the document title or manual page title, +the operating system, +and the date of authorship. +These macros are one called once at the very beginning of the document +and are used to construct the headers and footers only. +.Bl -tag -width 6n +.It Li \&.Dt DOCUMENT_TITLE section# [volume] +The document title is the +subject of the man page and must be in +.Tn CAPITALS +due to troff +limitations. +The section number may be 1,\ ...,\ 8, +and if it is specified, +the volume title may be omitted. +A volume title may be arbitrary or one of the following: +.\" .Cl +.\" USD UNIX User's Supplementary Documents +.\" .Cl +.\" PS1 UNIX Programmer's Supplementary Documents +.Pp +.Bl -column SMM -offset indent -compact +.It Li AMD UNIX Ancestral Manual Documents +.It Li SMM UNIX System Manager's Manual +.It Li URM UNIX Reference Manual +.It Li PRM UNIX Programmer's Manual +.El +.Pp +The default volume labeling is +.Li URM +for sections 1, 6, and 7; +.Li SMM +for section 8; +.Li PRM +for sections 2, 3, 4, and 5. +.\" .Cl +.\" MMI UNIX Manual Master Index +.\" .Cl +.\" CON UNIX Contributed Software Manual +.\" .Cl +.\" LOC UNIX Local Manual +.It Li \&.Os operating_system release# +The name of the operating system +should be the common acronym, e.g. +.Tn BSD +or +.Tn ATT . +The release should be the standard release +nomenclature for the system specified, e.g. 4.3, 4.3+Tahoe, V.3, +V.4. +Unrecognized arguments are displayed as given in the page footer. +For instance, a typical footer might be: +.Pp +.Dl \&.Os BSD 4.3 +.Pp +or for a locally produced set +.Pp +.Dl \&.Os CS Department +.Pp +The Berkeley default, +.Ql \&.Os +without an argument, has been defined as +.Tn BSD +Experimental in the +site specific file +.Pa /usr/src/share/tmac/doc-common . +It really should default to +.Tn LOCAL . +Note, if the +.Ql \&.Os +macro is not present, the bottom left corner of the page +will be ugly. +.It Li \&.Dd month day, year +The date should be written formally: +.Pp +.ne 5 +.Dl January 25, 1989 +.El +.Sh MANUAL DOMAIN +.Ss What's in a name... +The manual domain macro names are derived from the day to day +informal language used to describe commands, subroutines and related +files. +Slightly +different variations of this language are used to describe +the three different aspects of writing a man page. +First, there is the description of +.Nm \-mdoc +macro request usage. +Second is the description of a +.Ux +command +.Em with +.Nm \-mdoc +macros and third, +the +description of a command to a user in the verbal sense; +that is, discussion of a command in the text of a man page. +.Pp +In the first case, +.Xr troff 1 +macros are themselves a type of command; +the general syntax for a troff command is: +.Bd -filled -offset indent +\&.Va argument1 argument2 ... argument9 +.Ed +.Pp +The +.Ql \&.Va +is a macro command or request, and anything following it is an argument to +be processed. +In the second case, +the description of a +.Ux +command using the content macros is a +bit more involved; +a typical +.Sx SYNOPSIS +command line might be displayed as: +.Bd -filled -offset indent +.Nm filter +.Op Fl flag +.Ar infile outfile +.Ed +.Pp +Here, +.Nm filter +is the command name and the +bracketed string +.Fl flag +is a +.Em flag +argument designated as optional by the option brackets. +In +.Nm \-mdoc +terms, +.Ar infile +and +.Ar outfile +are +called +.Em arguments . +The macros which formatted the above example: +.Bd -literal -offset indent +\&.Nm filter +\&.Op \&Fl flag +\&.Ar infile outfile +.Ed +.Pp +In the third case, discussion of commands and command syntax +includes both examples above, but may add more detail. +The +arguments +.Ar infile +and +.Ar outfile +from the example above might be referred to as +.Em operands +or +.Em file arguments . +Some command line argument lists are quite long: +.Bl -tag -width make -offset indent +.It Nm make +.Op Fl eiknqrstv +.Op Fl D Ar variable +.Op Fl d Ar flags +.Op Fl f Ar makefile +.Bk -words +.Op Fl I Ar directory +.Ek +.Op Fl j Ar max_jobs +.Op Ar variable=value +.Bk -words +.Op Ar target ... +.Ek +.El +.Pp +Here one might talk about the command +.Nm make +and qualify the argument +.Ar makefile , +as an argument to the flag, +.Fl f , +or discuss the optional +file +operand +.Ar target . +In the verbal context, such detail can prevent confusion, +however the +.Nm \-mdoc +package +does not have a macro for an argument +.Em to +a flag. +Instead the +.Ql \&Ar +argument macro is used for an operand or file argument like +.Ar target +as well as an argument to a flag like +.Ar variable . +The make command line was produced from: +.Bd -literal -offset indent +\&.Nm make +\&.Op Fl eiknqrstv +\&.Op Fl D Ar variable +\&.Op Fl d Ar flags +\&.Op Fl f Ar makefile +\&.Op Fl I Ar directory +\&.Op Fl j Ar max_jobs +\&.Op Ar variable=value +\&.Bk -words +\&.Op Ar target ... +\&.Ek +.Ed +.Pp +The +.Ql \&.Bk +and +.Ql \&.Ek +macros are explained in +.Sx Keeps . +.Ss General Syntax +The manual domain and general text domain macros share a similar +syntax with a few minor deviations: +.Ql \&.Ar , +.Ql \&.Fl , +.Ql \&.Nm , +and +.Ql \&.Pa +differ only when called without arguments; +.Ql \&.Fn +and +.Ql \&.Xr +impose an order on their argument lists +and the +.Ql \&.Op +and +.Ql \&.Fn +macros +have nesting limitations. +All content macros +are capable of recognizing and properly handling punctuation, +provided each punctuation character is separated by a leading space. +If an request is given: +.Pp +.Dl \&.Li sptr, ptr), +.Pp +The result is: +.Pp +.Dl Li sptr, ptr), +.Pp +The punctuation is not recognized and all is output in the +literal font. If the punctuation is separated by a leading +white space: +.Pp +.Dl \&.Li "sptr , ptr ) ," +.Pp +The result is: +.Pp +.Dl Li sptr , ptr ) , +.Pp +The punctuation is now recognized and is output in the +default font distinguishing it from the strings in literal font. +.Pp +To remove the special meaning from a punctuation character +escape it with +.Ql \e& . +.Xr Troff +is limited as a macro language, and has difficulty +when presented with a string containing +a member of the mathematical, logical or +quotation set: +.Bd -literal -offset indent-two +\&{+,\-,/,*,\&%,<,>,<=,>=,=,==,&,`,',"} +.Ed +.Pp +The problem is that +.Xr troff +may assume it is supposed to actually perform the operation +or evaluation suggested by the characters. To prevent +the accidental evaluation of these characters, +escape them with +.Ql \e& . +Typical syntax is shown in the first content macro displayed +below, +.Ql \&.Ad . +.Ss Address Macro +The address macro identifies an address construct +of the form addr1[,addr2[,addr3]]. +.Pp +.Dl Usage: .Ad address ... \*(Pu +.Bl -tag -width ".Ad f1 , f2 , f3 :" -compact -offset 14n +.It Li \&.Ad addr1 +.Ad addr1 +.It Li \&.Ad addr1\ . +.Ad addr1 . +.It Li \&.Ad addr1\ , file2 +.Ad addr1 , file2 +.It Li \&.Ad f1\ , f2\ , f3\ : +.Ad f1 , f2 , f3 : +.It Li \&.Ad addr\ )\ )\ , +.Ad addr ) ) , +.El +.Pp +It is an error to call +.Li \&.Ad +without arguments. +.Li \&.Ad +is callable by other macros and is parsed. +.Ss Argument Macro +The +.Li \&.Ar +argument macro may be used whenever +a command line argument is referenced. +.Pp +.Dl Usage: .Ar argument ... \*(Pu +.Bl -tag -width ".Ar file1 file2" -compact -offset 15n +.It Li \&.Ar +.Ar +.It Li \&.Ar file1 +.Ar file1 +.It Li \&.Ar file1\ . +.Ar file1 . +.It Li \&.Ar file1 file2 +.Ar file1 file2 +.It Li \&.Ar f1 f2 f3\ : +.Ar f1 f2 f3 : +.It Li \&.Ar file\ )\ )\ , +.Ar file ) ) , +.El +.Pp +If +.Li \&.Ar +is called without arguments +.Ql Ar +is assumed. +The +.Li \&.Ar +macro is parsed and is callable. +.Ss Configuration Declaration (section four only) +The +.Ql \&.Cd +macro is used to demonstrate a +.Xr config 8 +declaration for a device interface in a section four manual. +This macro accepts quoted arguments (double quotes only). +.Pp +.Bl -tag -width "device le0 at scode?" -offset indent +.It Cd "device le0 at scode?" +produced by: +.Ql ".Cd device le0 at scode?" . +.El +.Ss Command Modifier +The command modifier is identical to the +.Ql \&.Fl +(flag) command with the exception +the +.Ql \&.Cm +macro does not assert a dash +in front of every argument. +Traditionally flags are marked by the +preceding dash, some commands or subsets of commands do not use them. +Command modifiers may also be specified in conjunction with interactive +commands such as editor commands. +See +.Sx Flags . +.Ss Defined Variables +A variable which is defined in an include file is specified +by the macro +.Ql \&.Dv . +.Pp +.Dl Usage: .Dv defined_variable ... \*(Pu +.Bl -tag -width ".Dv MAXHOSTNAMELEN" -compact -offset 14n +.It Li ".Dv MAXHOSTNAMELEN" +.Dv MAXHOSTNAMELEN +.It Li ".Dv TIOCGPGRP )" +.Dv TIOCGPGRP ) +.El +.Pp +It is an error to call +.Ql \&.Dv +without arguments. +.Ql \&.Dv +is parsed and is callable. +.Ss Errno's (Section two only) +The +.Ql \&.Er +errno macro specifies the error return value +for section two library routines. +The second example +below shows +.Ql \&.Er +used with the +.Ql \&.Bq +general text domain macro, as it would be used in +a section two manual page. +.Pp +.Dl Usage: .Er ERRNOTYPE ... \*(Pu +.Bl -tag -width ".Bq Er ENOTDIR" -compact -offset 14n +.It Li \&.Er ENOENT +.Er ENOENT +.It Li \&.Er ENOENT\ )\ ; +.Er ENOENT ) ; +.It Li \&.Bq \&Er ENOTDIR +.Bq Er ENOTDIR +.El +.Pp +It is an error to call +.Ql \&.Er +without arguments. +The +.Ql \&.Er +macro is parsed and is callable. +.Ss Environment Variables +The +.Ql \&.Ev +macro specifies an environment variable. +.Pp +.Dl Usage: .Ev argument ... \*(Pu +.Bl -tag -width ".Ev PRINTER ) ) ," -compact -offset 14n +.It Li \&.Ev DISPLAY +.Ev DISPLAY +.It Li \&.Ev PATH\ . +.Ev PATH . +.It Li \&.Ev PRINTER\ )\ )\ , +.Ev PRINTER ) ) , +.El +.Pp +It is an error to call +.Ql \&.Ev +without arguments. +The +.Ql \&.Ev +macro is parsed and is callable. +.Ss Function Argument +The +.Ql \&.Fa +macro is used to refer to function arguments (parameters) +outside of the +.Sx SYNOPSIS +section of the manual or inside +the +.Sx SYNOPSIS +section should a parameter list be too +long for the +.Ql \&.Fn +macro and the enclosure macros +.Ql \&.Fo +and +.Ql \&.Fc +must be used. +.Ql \&.Fa +may also be used to refer to structure members. +.Pp +.Dl Usage: .Fa function_argument ... \*(Pu +.Bl -tag -width ".Fa d_namlen\ )\ )\ ," -compact -offset 14n +.It Li \&.Fa d_namlen\ )\ )\ , +.Fa d_namlen ) ) , +.It Li \&.Fa iov_len +.Fa iov_len +.El +.Pp +It is an error to call +.Ql \&.Fa +without arguments. +.Ql \&.Fa +is parsed and is callable. +.Ss Function Declaration +The +.Ql \&.Fd +macro is used in the +.Sx SYNOPSIS +section with section two or three +functions. +The +.Ql \&.Fd +macro does not call other macros and is not callable by other +macros. +.Pp +.Dl Usage: .Fd include_file (or defined variable) +.Pp +In the +.Sx SYNOPSIS +section a +.Ql \&.Fd +request causes a line break if a function has already been presented +and a break has not occurred. +This leaves a nice vertical space +in between the previous function call and the declaration for the +next function. +.Ss Flags +The +.Ql \&.Fl +macro handles command line flags. +It prepends +a dash, +.Ql \- , +to the flag. +For interactive command flags, which +are not prepended with a dash, the +.Ql \&.Cm +(command modifier) +macro is identical, but without the dash. +.Pp +.Dl Usage: .Fl argument ... \*(Pu +.Bl -tag -width ".Fl \-s \-t \-v" -compact -offset 14n +.It Li \&.Fl +.Fl +.It Li \&.Fl cfv +.Fl cfv +.It Li \&.Fl cfv\ . +.Fl cfv . +.It Li \&.Fl s v t +.Fl s v t +.It Li \&.Fl -\ , +.Fl - , +.It Li \&.Fl xyz\ )\ , +.Fl xyz ) , +.El +.Pp +The +.Ql \&.Fl +macro without any arguments results +in a dash representing stdin/stdout. +Note that giving +.Ql \&.Fl +a single dash, will result in two dashes. +The +.Ql \&.Fl +macro is parsed and is callable. +.Ss Functions (library routines) +The .Fn macro is modeled on ANSI C conventions. +.Bd -literal +Usage: .Fn [type] function [[type] parameters ... \*(Pu] +.Ed +.Bl -tag -width ".Fn .int align. .const * char *sptrsxx" -compact +.It Li "\&.Fn getchar" +.Fn getchar +.It Li "\&.Fn strlen ) ," +.Fn strlen ) , +.It Li \&.Fn "\\*qint align\\*q" "\\*qconst * char *sptrs\\*q" , +.Fn "int align" "const * char *sptrs" , +.El +.Pp +It is an error to call +.Ql \&.Fn +without any arguments. +The +.Ql \&.Fn +macro +is parsed and is callable, +note that any call to another macro signals the end of +the +.Ql \&.Fn +call (it will close-parenthesis at that point). +.Pp +For functions that have more than eight parameters (and this +is rare), the +macros +.Ql \&.Fo +(function open) +and +.Ql \&.Fc +(function close) +may be used with +.Ql \&.Fa +(function argument) +to get around the limitation. For example: +.Bd -literal -offset indent +\&.Fo "int res_mkquery" +\&.Fa "int op" +\&.Fa "char *dname" +\&.Fa "int class" +\&.Fa "int type" +\&.Fa "char *data" +\&.Fa "int datalen" +\&.Fa "struct rrec *newrr" +\&.Fa "char *buf" +\&.Fa "int buflen" +\&.Fc +.Ed +.Pp +Produces: +.Bd -filled -offset indent +.Fo "int res_mkquery" +.Fa "int op" +.Fa "char *dname" +.Fa "int class" +.Fa "int type" +.Fa "char *data" +.Fa "int datalen" +.Fa "struct rrec *newrr" +.Fa "char *buf" +.Fa "int buflen" +.Fc +.Ed +.Pp +The +.Ql \&.Fo +and +.Ql \&.Fc +macros are parsed and are callable. +In the +.Sx SYNOPSIS +section, the function will always begin at +the beginning of line. +If there is more than one function +presented in the +.Sx SYNOPSIS +section and a function type has not been +given, a line break will occur, leaving a nice vertical space +between the current function name and the one prior. +At the moment, +.Ql \&.Fn +does not check its word boundaries +against troff line lengths and may split across a newline +ungracefully. +This will be fixed in the near future. +.Ss Function Type +This macro is intended for the +.Sx SYNOPSIS +section. +It may be used +anywhere else in the man page without problems, but its main purpose +is to present the function type in kernel normal form for the +.Sx SYNOPSIS +of sections two and three +(it causes a page break allowing the function name to appear +on the next line). +.Pp +.Dl Usage: .Ft type ... \*(Pu +.Bl -tag -width "\&.Ft struct stat" -offset 14n -compact +.It Li \&.Ft struct stat +.Ft struct stat +.El +.Pp +The +.Ql \&.Ft +request is not callable by other macros. +.Ss Interactive Commands +The +.Ql \&.Ic +macro designates an interactive or internal command. +.Pp +.Dl Usage: .Li argument ... \*(Pu +.Bl -tag -width ".Ic setenv , unsetenvxx" -compact -offset 14n +.It Li \&.Ic :wq +.Ic :wq +.It Li \&.Ic do while {...} +.Ic do while {...} +.It Li \&.Ic setenv\ , unsetenv +.Ic setenv , unsetenv +.El +.Pp +It is an error to call +.Ql \&.Ic +without arguments. +The +.Ql \&.Ic +macro is parsed and is callable. +.Ss Literals +The +.Ql \&.Li +literal macro may be used for special characters, +variable constants, anything which should be displayed as it +would be typed. +.Pp +.Dl Usage: .Li argument ... \*(Pu +.Bl -tag -width ".Li cntrl-D ) ," -compact -offset 14n +.It Li \&.Li \een +.Li \en +.It Li \&.Li M1 M2 M3\ ; +.Li M1 M2 M3 ; +.It Li \&.Li cntrl-D\ )\ , +.Li cntrl-D ) , +.It Li \&.Li 1024\ ... +.Li 1024 ... +.El +.Pp +The +.Ql \&.Li +macro is parsed and is callable. +.Ss Name Macro +The +.Ql \&.Nm +macro is used for the document title or subject name. +It has the peculiarity of remembering the first +argument it was called with, which should +always be the subject name of the page. +When called without +arguments, +.Ql \&.Nm +regurgitates this initial name for the sole purpose +of making less work for the author. +Note: +a section two +or three document function name is addressed with the +.Ql \&.Nm +in the +.Sx NAME +section, and with +.Ql \&.Fn +in the +.Sx SYNOPSIS +and remaining sections. +For interactive commands, such as the +.Ql while +command keyword in +.Xr csh 1 , +the +.Ql \&.Ic +macro should be used. +While the +.Ql \&.Ic +is nearly identical +to +.Ql \&.Nm , +it can not recall the first argument it was invoked with. +.Pp +.Dl Usage: .Nm argument ... \*(Pu +.Bl -tag -width ".Nm mdoc.sample" -compact -offset 14n +.It Li \&.Nm mdoc.sample +.Nm mdoc.sample +.It Li \&.Nm \e-mdoc +.Nm \-mdoc . +.It Li \&.Nm foo\ )\ )\ , +.Nm foo ) ) , +.It Li \&.Nm +.Nm +.El +.Pp +The +.Ql \&.Nm +macro is parsed and is callable. +.Ss Options +The +.Ql \&.Op +macro +places option brackets around the any remaining arguments on the command +line, and places any +trailing punctuation outside the brackets. +The macros +.Ql \&.Oc +and +.Ql \&.Oo +may be used across one or more lines. +.Pp +.Dl Usage: .Op options ... \*(Pu +.Bl -tag -width ".Op Fl c Ar objfil Op Ar corfil ," -compact -offset indent +.It Li \&.Op +.Op +.It Li ".Op Fl k" +.Op Fl k +.It Li ".Op Fl k ) ." +.Op Fl k ) . +.It Li ".Op Fl k Ar kookfile" +.Op Fl k Ar kookfile +.It Li ".Op Fl k Ar kookfile ," +.Op Fl k Ar kookfile , +.It Li ".Op Ar objfil Op Ar corfil" +.Op Ar objfil Op Ar corfil +.It Li ".Op Fl c Ar objfil Op Ar corfil ," +.Op Fl c Ar objfil Op Ar corfil , +.It Li \&.Op word1 word2 +.Op word1 word2 +.El +.Pp +The +.Ql \&.Oc +and +.Ql \&.Oo +macros: +.Bd -literal -offset indent +\&.Oo +\&.Op \&Fl k \&Ar kilobytes +\&.Op \&Fl i \&Ar interval +\&.Op \&Fl c \&Ar count +\&.Oc +.Ed +.Pp +Produce: +.Oo +.Op Fl k Ar kilobytes +.Op Fl i Ar interval +.Op Fl c Ar count +.Oc +.Pp +The macros +.Ql \&.Op , +.Ql \&.Oc +and +.Ql \&.Oo +are parsed and are callable. +.Ss Pathnames +The +.Ql \&.Pa +macro formats path or file names. +.Pp +.Dl Usage: .Pa pathname \*(Pu +.Bl -tag -width ".Pa /tmp/fooXXXXX ) ." -compact -offset 14n +.It Li \&.Pa /usr/share +.Pa /usr/share +.It Li \&.Pa /tmp/fooXXXXX\ )\ . +.Pa /tmp/fooXXXXX ) . +.El +.Pp +The +.Ql \&.Pa +macro is parsed and is callable. +.Ss Variables +Generic variable reference: +.Pp +.Dl Usage: .Va variable ... \*(Pu +.Bl -tag -width ".Va char s ] ) ) ," -compact -offset 14n +.It Li \&.Va count +.Va count +.It Li \&.Va settimer , +.Va settimer , +.It Li \&.Va int\ *prt\ )\ : +.Va int\ *prt ) : +.It Li \&.Va char\ s\ ]\ )\ )\ , +.Va char\ s ] ) ) , +.El +.Pp +It is an error to call +.Ql \&.Va +without any arguments. +The +.Ql \&.Va +macro is parsed and is callable. +.Ss Manual Page Cross References +The +.Ql \&.Xr +macro expects the first argument to be +a manual page name, and the second argument, if it exists, +to be either a section page number or punctuation. +Any +remaining arguments are assumed to be punctuation. +.Pp +.Dl Usage: .Xr man_page [1,...,8] \*(Pu +.Bl -tag -width ".Xr mdoc 7 ) ) ," -compact -offset 14n +.It Li \&.Xr mdoc +.Xr mdoc +.It Li \&.Xr mdoc\ , +.Xr mdoc , +.It Li \&.Xr mdoc 7 +.Xr mdoc 7 +.It Li \&.Xr mdoc 7\ )\ )\ , +.Xr mdoc 7 ) ) , +.El +.Pp +The +.Ql \&.Xr +macro is parsed and is callable. +It is an error to call +.Ql \&.Xr +without +any arguments. +.Sh GENERAL TEXT DOMAIN +.Ss AT&T Macro +.Bd -literal -offset indent -compact +Usage: .At [v6 | v7 | 32v | V.1 | V.4] ... \*(Pu +.Ed +.Bl -tag -width ".At v6 ) ," -compact -offset 14n +.It Li ".At" +.At +.It Li ".At v6 ." +.At v6 . +.El +.Pp +The +.Ql \&.At +macro is +.Em not +parsed and +.Em not +callable. It accepts at most two arguments. +.Ss BSD Macro +.Dl Usage: .Bx [Version/release] ... \*(Pu +.Bl -tag -width ".Bx 4.3 ) ," -compact -offset 14n +.It Li ".Bx" +.Bx +.It Li ".Bx 4.3 ." +.Bx 4.3 . +.El +.Pp +The +.Ql \&.Bx +macro is parsed and is callable. +.Ss UNIX Macro +.Dl Usage: .Ux ... \*(Pu +.Bl -tag -width ".Ux 4.3 ) ," -compact -offset 14n +.It Li ".Ux" +.Ux +.El +.Pp +The +.Ql \&.Ux +macro is parsed and is callable. +.Ss Emphasis Macro +Text may be stressed or emphasized with the +.Ql \&.Em +macro. +The usual font for emphasis is italic. +.Pp +.Dl Usage: .Em argument ... \*(Pu +.Bl -tag -width ".Em vide infra ) ) ," -compact -offset 14n +.It Li ".Em does not" +.Em does not +.It Li ".Em exceed 1024 ." +.Em exceed 1024 . +.It Li ".Em vide infra ) ) ," +.Em vide infra ) ) , +.El +.\" .Pp +.\" The emphasis can be forced across several lines of text by using +.\" the +.\" .Ql \&.Bf +.\" macro discussed in +.\" .Sx Modes +.\" under +.\" .Sx PAGE STRUCTURE DOMAIN . +.\" .Pp +.\" .Bf -emphasis +.\" We are certain the reason most people desire a Harvard MBA +.\" so they can become to be successful philanthropists. Only +.\" mathematicians and physicists go to graduate school strictly +.\" to acquire infinite wealthy and fame. Its that inifinity +.\" word that does it to them. Ruins them. +.\" .Ef +.Pp +The +.Ql \&.Em +macro is parsed and is callable. +It is an error to call +.Ql \&.Em +without arguments. +.Ss Enclosure and Quoting Macros +The concept of enclosure is similar to quoting. +The object being to enclose one or more strings between +a pair of characters like quotes or parentheses. +The terms quoting and enclosure are used +interchangeably throughout this document. +Most of the +one line enclosure macros end +in small letter +.Ql q +to give a hint of quoting, but there are a few irregularities. +For each enclosure macro +there is also a pair of open and close macros which end +in small letters +.Ql o +and +.Ql c +respectively. +These can be used across one or more lines of text +and while they have nesting limitations, the one line quote macros +can be used inside +of them. +.Pp +.ne 5 +.Bd -filled -offset indent +.Bl -column "quote " "close " "open " "Enclose Stringx(in XX) " XXstringXX +.Em " Quote Close Open Function Result" +\&.Aq .Ac .Ao Angle Bracket Enclosure <string> +\&.Bq .Bc .Bo Bracket Enclosure [string] +\&.Dq .Dc .Do Double Quote ``string'' + .Ec .Eo Enclose String (in XX) XXstringXX +\&.Pq .Pc .Po Parenthesis Enclosure (string) +\&.Ql Quoted Literal `st' or string +\&.Qq .Qc .Qo Straight Double Quote "string" +\&.Sq .Sc .So Single Quote `string' +.El +.Ed +.Pp +Except for the irregular macros noted below, all +of the quoting macros are parsed and callable. +All handle punctuation properly, as long as it +is presented one character at a time and separated by spaces. +The quoting macros examine opening and closing punctuation +to determine whether it comes before or after the +enclosing string. This makes some nesting possible. +.Bl -tag -width xxx,xxxx +.It Li \&.Ec , \&.Eo +These macros expect the first argument to be the +opening and closing strings respectively. +.It Li \&.Ql +The quoted literal macro behaves differently for +.Xr troff +than +.Xr nroff . +If formatted with +.Xr nroff , +a quoted literal is always quoted. If formatted with +troff, an item is only quoted if the width +of the item is less than three constant width characters. +This is to make short strings more visible where the font change +to literal (constant width) is less noticeable. +.It Li \&.Pf +The prefix macro is not callable, but it is parsed: +.Bl -tag -width "(namexx" -offset indent +.It Li ".Pf ( Fa name2" +becomes +.Pf ( Fa name2 . +.El +.Pp +The +.Ql \&.Ns +(no space) macro performs the analogous suffix function. +.El +.Pp +.ne 4 +Examples of quoting: +.Bl -tag -width ".Aq Pa ctype.h ) ,xxxxxxxx" -compact -offset indent +.It Li \&.Aq +.Aq +.It Li \&.Aq \&Ar ctype.h\ )\ , +.Aq Ar ctype.h ) , +.It Li \&.Bq +.Bq +.It Li \&.Bq \&Em Greek \&, French \&. +.Bq Em Greek , French . +.It Li \&.Dq +.Dq +.It Li ".Dq string abc ." +.Dq string abc . +.It Li ".Dq \'^[A-Z]\'" +.Dq \'^[A-Z]\' +.It Li "\&.Ql man mdoc" +.Ql man mdoc +.It Li \&.Qq +.Qq +.It Li "\&.Qq string ) ," +.Qq string ) , +.It Li "\&.Qq string Ns )," +.Qq string Ns ), +.It Li \&.Sq +.Sq +.It Li "\&.Sq string +.Sq string +.El +.Pp +For a good example of nested enclosure macros, see the +.Ql \&.Op +option macro. +It was created from the same +underlying enclosure macros as those presented in the list +above. +The +.Ql \&.Xo +and +.Ql \&.Xc +extended argument list macros +were also built from the same underlying routines and are a good +example of +.Nm \-mdoc +macro usage at its worst. +.Ss No\-Op or Normal Text Macro +The macro +.Li \&.No +is +a hack for words in a macro command line which should +.Em not +be formatted and follows the conventional syntax +for content macros. +.Ss No Space Macro +The +.Ql \&.Ns +macro eliminates unwanted spaces in between macro requests. +It is useful for old style argument lists where there is no space +between the flag and argument: +.Bl -tag -width ".Op Fl I Ns Ar directoryxx" -offset indent +.It Li ".Op Fl I Ns Ar directory" +produces +.Op Fl I Ns Ar directory +.El +.Pp +Note: the +.Ql \&.Ns +macro always invokes the +.Ql \&.No +macro after eliminating the space unless another macro name +follows it. +The macro +.Ql \&.Ns +is parsed and is callable. +.Ss Section Cross References +The +.Ql \&.Sx +macro designates a reference to a section header +within the same document. +It is parsed and is callable. +.Pp +.Bl -tag -width "Li \&.Sx FILES" -offset 14n +.It Li \&.Sx FILES +.Sx FILES +.El +.Ss Symbolic +The symbolic emphasis macro is generally a boldface macro in +either the symbolic sense or the traditional English usage. +.Pp +.Dl Usage: .Sy symbol ... \*(Pu +.Bl -tag -width ".Sy Important Noticex" -compact -offset 14n +.It Li \&.Sy Important Notice +.Sy Important Notice +.El +.Pp +The +.Ql \&.Sy +macro is parsed and is callable. +Arguments to +.Ql \&.Sy +may be quoted. +.Ss References and Citations +The following macros make a modest attempt to handle references. +At best, the macros make it convenient to manually drop in a subset of +refer style references. +.Pp +.Bl -tag -width 6n -offset indent -compact +.It Li ".Rs" +Reference Start. +Causes a line break and begins collection +of reference information until the +reference end macro is read. +.It Li ".Re" +Reference End. +The reference is printed. +.It Li ".%A" +Reference author name, one name per invocation. +.It Li ".%B" +Book title. +.It Li ".\&%C" +City/place. +.It Li ".\&%D" +Date. +.It Li ".%J" +Journal name. +.It Li ".%N" +Issue number. +.It Li ".%O" +Optional information. +.It Li ".%P" +Page number. +.It Li ".%R" +Report name. +.It Li ".%T" +Title of article. +.It Li ".%V" +Volume(s). +.El +.Pp +The macros beginning with +.Ql % +are not callable, and are parsed only for the trade name macro which +returns to its caller. +(And not very predictably at the moment either.) +The purpose is to allow trade names +to be pretty printed in +.Xr troff Ns / Ns Xr ditroff +output. +.Ss Trade Names (or Acronyms and Type Names) +The trade name macro is generally a small caps macro for +all upper case words longer than two characters. +.Pp +.Dl Usage: .Tn symbol ... \*(Pu +.Bl -tag -width ".Tn ASCII" -compact -offset 14n +.It Li \&.Tn DEC +.Tn DEC +.It Li \&.Tn ASCII +.Tn ASCII +.El +.Pp +The +.Ql \&.Tn +macro +is parsed and is callable by other macros. +.Ss Extended Arguments +The +.Li \&.Xo +and +.Li \&.Xc +macros allow one to extend an argument list +on a macro boundary. +Argument lists cannot +be extended within a macro +which expects all of its arguments on one line such +as +.Ql \&.Op . +.Pp +Here is an example of +.Ql \&.Xo +using the space mode macro to turn spacing off: +.Bd -literal -offset indent +\&.Sm off +\&.It Xo Sy I Ar operation +\&.No \een Ar count No \een +\&.Xc +\&.Sm on +.Ed +.Pp +Produces +.Bd -filled -offset indent +.Bl -tag -width flag -compact +.Sm off +.It Xo Sy I Ar operation +.No \en Ar count No \en +.Xc +.Sm on +.El +.Ed +.Pp +Another one: +.Bd -literal -offset indent +\&.Sm off +\&.It Cm S No \&/ Ar old_pattern Xo +\&.No \&/ Ar new_pattern +\&.No \&/ Op Cm g +\&.Xc +\&.Sm on +.Ed +.Pp +Produces +.Bd -filled -offset indent +.Bl -tag -width flag -compact +.Sm off +.It Cm S No \&/ Ar old_pattern Xo +.No \&/ Ar new_pattern +.No \&/ Op Cm g +.Xc +.Sm on +.El +.Ed +.Pp +Another example of +.Ql \&.Xo +and using enclosure macros: +Test the value of an variable. +.Bd -literal -offset indent +\&.It Xo +\&.Ic .ifndef +\&.Oo \e&! Oc Ns Ar variable +\&.Op Ar operator variable ... +\&.Xc +.Ed +.Pp +Produces +.Bd -filled -offset indent +.Bl -tag -width flag -compact +.It Xo +.Ic .ifndef +.Oo \&! Oc Ns Ar variable +.Op Ar operator variable ... +.Xc +.El +.Ed +.Pp +All of the above examples have used the +.Ql \&.Xo +macro on the argument list of the +.Ql \&.It +(list-item) +macro. +The extend macros are not used very often, and when they are +it is usually to extend the list-item argument list. +Unfortunately, this is also where the extend macros are the +most finicky. +In the first two examples, spacing was turned off; +in the third, spacing was desired in part of the output but +not all of it. +To make these macros work in this situation make sure +the +.Ql \&.Xo +and +.Ql \&.Xc +macros are placed as shown in the third example. +If the +.Ql \&.Xo +macro is not alone on the +.Ql \&.It +argument list, spacing will be unpredictable. +The +.Ql \&.Ns +(no space macro) +must not occur as the first or last macro on a line +in this situation. +Out of 900 manual pages (about 1500 actual pages) +currently released with +.Bx +only fifteen use the +.Ql \&.Xo +macro. +.Sh PAGE STRUCTURE DOMAIN +.Ss Section Headers +The first three +.Ql \&.Sh +section header macros +list below are required in every +man page. +The remaining section headers +are recommended at the discretion of the author +writing the manual page. +The +.Ql \&.Sh +macro can take up to nine arguments. +It is parsed and but is not callable. +.Bl -tag -width ".Sh SYNOPSIS" +.It \&.Sh NAME +The +.Ql \&.Sh NAME +macro is mandatory. +If not specified, +the headers, footers and page layout defaults +will not be set and things will be rather unpleasant. +The +.Sx NAME +section consists of at least three items. +The first is the +.Ql \&.Nm +name macro naming the subject of the man page. +The second is the Name Description macro, +.Ql \&.Nd , +which separates the subject +name from the third item, which is the description. +The +description should be the most terse and lucid possible, +as the space available is small. +.It \&.Sh SYNOPSIS +The +.Sx SYNOPSIS +section describes the typical usage of the +subject of a man page. +The macros required +are either +.Ql ".Nm" , +.Ql ".Cd" , +.Ql ".Fn" , +(and possibly +.Ql ".Fo" , +.Ql ".Fc" , +.Ql ".Fd" , +.Ql ".Ft" +macros). +The function name +macro +.Ql ".Fn" +is required +for manual page sections 2 and 3, the command and general +name macro +.Ql \&.Nm +is required for sections 1, 5, 6, 7, 8. +Section 4 manuals require a +.Ql ".Nm" , ".Fd" +or a +.Ql ".Cd" +configuration device usage macro. +Several other macros may be necessary to produce +the synopsis line as shown below: +.Pp +.Bd -filled -offset indent +.Nm cat +.Op Fl benstuv +.Op Fl +.Ar +.Ed +.Pp +The following macros were used: +.Pp +.Dl \&.Nm cat +.Dl \&.Op \&Fl benstuv +.Dl \&.Op \&Fl +.Dl \&.Ar +.Pp +.Sy Note : +The macros +.Ql \&.Op , +.Ql \&.Fl , +and +.Ql \&.Ar +recognize the pipe bar character +.Ql \*(Ba , +so a command line such as: +.Pp +.Dl ".Op Fl a | Fl b" +.Pp +will not go orbital. +.Xr Troff +normally interprets a \*(Ba as a special operator. +See +.Sx PREDEFINED STRINGS +for a usable \*(Ba +character in other situations. +.It \&.Sh DESCRIPTION +In most cases the first text in the +.Sx DESCRIPTION +section +is a brief paragraph on the command, function or file, +followed by a lexical list of options and respective +explanations. +To create such a list, the +.Ql \&.Bl +begin-list, +.Ql \&.It +list-item and +.Ql \&.El +end-list +macros are used (see +.Sx Lists and Columns +below). +.El +.Pp +The following +.Ql \&.Sh +section headers are part of the +preferred manual page layout and must be used appropriately +to maintain consistency. +They are listed in the order +in which they would be used. +.Bl -tag -width SYNOPSIS +.It \&.Sh ENVIRONMENT +The +.Sx ENVIRONMENT +section should reveal any related +environment +variables and clues to their behavior and/or usage. +.It \&.Sh EXAMPLES +There are several ways to create examples. +See +the +.Sx EXAMPLES +section below +for details. +.It \&.Sh FILES +Files which are used or created by the man page subject +should be listed via the +.Ql \&.Pa +macro in the +.Sx FILES +section. +.It \&.Sh SEE ALSO +References to other material on the man page topic and +cross references to other relevant man pages should +be placed in the +.Sx SEE ALSO +section. +Cross references +are specified using the +.Ql \&.Xr +macro. +At this time +.Xr refer 1 +style references are not accommodated. +.It \&.Sh STANDARDS +If the command, library function or file adheres to a +specific implementation such as +.St -p1003.2 +or +.St -ansiC +this should be noted here. +If the +command does not adhere to any standard, its history +should be noted in the +.Sx HISTORY +section. +.It \&.Sh HISTORY +Any command which does not adhere to any specific standards +should be outlined historically in this section. +.It \&.Sh AUTHORS +Credits, if need be, should be placed here. +.It \&.Sh DIAGNOSTICS +Diagnostics from a command should be placed in this section. +.It \&.Sh ERRORS +Specific error handling, especially from library functions +(man page sections 2 and 3) should go here. +The +.Ql \&.Er +macro is used to specify an errno. +.It \&.Sh BUGS +Blatant problems with the topic go here... +.El +.Pp +User specified +.Ql \&.Sh +sections may be added, +for example, this section was set with: +.Bd -literal -offset 14n +\&.Sh PAGE LAYOUT MACROS +.Ed +.Ss Paragraphs and Line Spacing. +.Bl -tag -width 6n +.It \&.Pp +The \&.Pp paragraph command may +be used to specify a line space where necessary. +The macro is not necessary after a +.Ql \&.Sh +or +.Ql \&.Ss +macro or before +a +.Ql \&.Bl +macro. +(The +.Ql \&.Bl +macro asserts a vertical distance unless the -compact flag is given). +.El +.\" This worked with version one, need to redo for version three +.\" .Pp +.\" .Ds I +.\" .Cw (ax+bx+c) \ is\ produced\ by\ \& +.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\& +.\" .Cl Cx \t\t +.\" .Li \&.Cx\ ( +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Va ax +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Sy \+ +.\" .Cx +.\" .Cl Cx \&(\& +.\" .Va ax +.\" .Cx + +.\" .Va by +.\" .Cx + +.\" .Va c ) +.\" .Cx \t +.\" .Em is produced by +.\" .Cx \t +.\" .Li \&.Va by +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Sy \+ +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Va c ) +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Cx +.\" .Cx +.\" .Cw +.\" .De +.\" .Pp +.\" This example shows the same equation in a different format. +.\" The spaces +.\" around the +.\" .Li \&+ +.\" signs were forced with +.\" .Li \e : +.\" .Pp +.\" .Ds I +.\" .Cw (ax\ +\ bx\ +\ c) \ is\ produced\ by\ \& +.\" .\".Cw (ax+bx+c) \&.Va_by_) \&_and_\& \&[?/]m_b1_e1_f1[?/]\& +.\" .Cl Cx \t\t +.\" .Li \&.Cx\ ( +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Va a +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Sy x +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Cx \e\ +\e\ \e& +.\" .Cx +.\" .Cl Cx \&(\& +.\" .Va a +.\" .Sy x +.\" .Cx \ +\ \& +.\" .Va b +.\" .Sy y +.\" .Cx \ +\ \& +.\" .Va c ) +.\" .Cx \t +.\" .Em is produced by +.\" .Cl Cx \t\t +.\" .Li \&.Va b +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Sy y +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Cx \e\ +\e\ \e& +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Va c ) +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Cx +.\" .Cx +.\" .Cw +.\" .De +.\" .Pp +.\" The incantation below was +.\" lifted from the +.\" .Xr adb 1 +.\" manual page: +.\" .Pp +.\" .Ds I +.\" .Cw \&[?/]m_b1_e1_f1[?/]\& is\ produced\ by +.\" .Cl Cx \t\t +.\" .Li \&.Cx Op Sy ?/ +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Nm m +.\" .Cx +.\" .Cl Cx Op Sy ?/ +.\" .Nm m +.\" .Ad \ b1 e1 f1 +.\" .Op Sy ?/ +.\" .Cx \t +.\" .Em is produced by +.\" .Cx \t +.\" .Li \&.Ar \e\ b1 e1 f1 +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Op Sy ?/ +.\" .Cx +.\" .Cl Cx \t\t +.\" .Li \&.Cx +.\" .Cx +.\" .Cw +.\" .De +.\" .Pp +.Ss Keeps +The only keep that is implemented at this time is for words. +The macros are +.Ql \&.Bk +(begin-keep) +and +.Ql \&.Ek +(end-keep). +The only option that +.Ql \&.Bl +accepts is +.Fl words +and is useful for preventing line breaks in the middle of options. +In the example for the make command line arguments (see +.Sx What's in a name ) , +the keep prevented +.Xr nroff +from placing up the +flag and the argument +on separate lines. +(Actually, the option macro used to prevent this from occurring, +but was dropped when the decision (religious) was made to force +right justified margins in +.Xr troff +as options in general look atrocious when spread across a sparse +line. +More work needs to be done with the keep macros, a +.Fl line +option needs to be added.) +.Ss Examples and Displays +There are five types of displays, a quickie one line indented display +.Ql \&.D1 , +a quickie one line literal display +.Ql \&.Dl , +and a block literal, block filled and block ragged which use +the +.Ql \&.Bd +begin-display +and +.Ql \&.Ed +end-display macros. +.Pp +.Bl -tag -width \&.Dlxx +.It Li \&.D1 +(D-one) Display one line of indented text. +This macro is parsed, but it is not callable. +.Pp +.Dl Fl ldghfstru +.Pp +The above was produced by: +.Li \&.Dl Fl ldghfstru . +.It Li \&.Dl +(D-ell) +Display one line of indented +.Em literal +text. +The +.Ql \&.Dl +example macro has been used throughout this +file. +It allows +the indent (display) of one line of text. +Its default font is set to +constant width (literal) however +it is parsed and will recognized other macros. +It is not callable however. +.Pp +.Dl % ls -ldg /usr/local/bin +.Pp +The above was produced by +.Li \&.Dl % ls -ldg /usr/local/bin . +.It Li \&.Bd +Begin-display. +The +.Ql \&.Bd +display must be ended with the +.Ql \&.Ed +macro. +Displays may be nested within displays and +lists. +.Ql \&.Bd +has the following syntax: +.Pp +.Dl ".Bd display-type [-offset offset_value] [-compact]" +.Pp +The display-type must be one of the following four types and +may have an offset specifier for indentation: +.Ql \&.Bd . +.Pp +.Bl -tag -width "file file_name " -compact +.It Fl ragged +Display a block of text as typed, +right (and left) margin edges are left ragged. +.It Fl filled +Display a filled (formatted) block. +The block of text is formatted (the edges are filled \- +not left unjustified). +.It Fl literal +Display a literal block, useful for source code or +simple tabbed or spaced text. +.It Fl file Ar file_name +The file name following the +.Fl file +flag is read and displayed. +Literal mode is +asserted and tabs are set at 8 constant width character +intervals, however any +.Xr troff/ Ns Nm \-mdoc +commands in file will be processed. +.It Fl offset Ar string +If +.Fl offset +is specified with one of the following strings, the string +is interpreted to indicate the level of indentation for the +forthcoming block of text: +.Pp +.Bl -tag -width "indent-two" -compact +.It Ar left +Align block on the current left margin, +this is the default mode of +.Ql \&.Bd . +.It Ar center +Supposedly center the block. +At this time +unfortunately, the block merely gets +left aligned about an imaginary center margin. +.It Ar indent +Indents by one default indent value or tab. +The default +indent value is also used for the +.Ql \&.D1 +display so one is guaranteed the two types of displays +will line up. +This indent is normally set to 6n or about two +thirds of an inch (six constant width characters). +.It Ar indent-two +Indents two times the default indent value. +.It Ar right +This +.Em left +aligns the block about two inches from +the right side of the page. +This macro needs +work and perhaps may never do the right thing by +.Xr troff . +.El +.El +.It ".Ed" +End-display. +.El +.Ss Tagged Lists and Columns +There are several types of lists which may be initiated with the +.Ql ".Bl" +begin-list macro. +Items within the list +are specified with the +.Ql ".It" +item macro and +each list must end with the +.Ql ".El" +macro. +Lists may be nested within themselves and within displays. +Columns may be used inside of lists, but lists are unproven +inside of columns. +.Pp +In addition, several list attributes may be specified such as +the width of a tag, the list offset, and compactness +(blank lines between items allowed or disallowed). +Most of this document has been formatted with a tag style list +.Pq Fl tag . +For a change of pace, the list-type used to present the list-types +is an over-hanging list +.Pq Fl ohang . +This type of list is quite popular with +.Tn TeX +users, but might look a bit funny after having read many pages of +tagged lists. +The following list types are accepted by +.Ql ".Bl" : +.Pp +.Bl -ohang -compact +.It Fl bullet +.It Fl item +.It Fl enum +These three are the simplest types of lists. +Once the +.Ql ".Bl" +macro has been given, items in the list are merely +indicated by a line consisting solely of the +.Ql ".It" +macro. +For example, the source text for a simple enumerated list +would look like: +.Bd -literal -offset indent-two +\&.Bl -enum -compact +\&.It +\&Item one goes here. +\&.It +\&And item two here. +\&.It +\&Lastly item three goes here. +\&.El +.Ed +.Pp +The results: +.Pp +.Bl -enum -offset indent-two -compact +.It +Item one goes here. +.It +And item two here. +.It +Lastly item three goes here. +.El +.Pp +A simple bullet list construction: +.Bd -literal -offset indent-two +\&.Bl -bullet -compact +\&.It +\&Bullet one goes here. +\&.It +\&Bullet two here. +\&.El +.Ed +.Pp +Produces: +.Bl -bullet -offset indent-two -compact +.It +Bullet one goes here. +.It +Bullet two here. +.El +.Pp +.It Fl tag +.It Fl diag +.It Fl hang +.It Fl ohang +.It Fl inset +These list-types collect arguments specified with the +.Ql \&.It +macro and create a label which may be +.Em inset +into the forthcoming text, +.Em hanged +from the forthcoming text, +.Em overhanged +from above and not indented or +.Em tagged . +This +list was constructed with the +.Ql Fl ohang +list-type. +The +.Ql \&.It +macro is parsed only for the inset, hang +and tag list-types and is not callable. +Here is an example of inset labels: +.Bl -inset -offset indent +.It Em Tag +The tagged list (also called a tagged paragraph) is the +most common type of list used in the Berkeley manuals. +.It Em Diag +Diag lists create section four diagnostic lists +and are similar to inset lists except callable +macros are ignored. +.It Em Hang +Hanged labels are a matter of taste. +.It Em Ohang +Overhanging labels are nice when space is constrained. +.It Em Inset +Inset labels are useful for controlling blocks of +paragraphs and are valuable for converting +.Nm \-mdoc +manuals to other formats. +.El +.Pp +Here is the source text which produced the above example: +.Bd -literal -offset indent +\&.Bl -inset -offset indent +\&.It Em Tag +\&The tagged list (also called a tagged paragraph) is the +\&most common type of list used in the Berkeley manuals. +\&.It Em Diag +\&Diag lists create section four diagnostic lists +\&and are similar to inset lists except callable +\¯os are ignored. +\&.It Em Hang +\&Hanged labels are a matter of taste. +\&.It Em Ohang +\&Overhanging labels are nice when space is constrained. +\&.It Em Inset +\&Inset labels are useful for controlling blocks of +\¶graphs and are valuable for converting +\&.Nm \-mdoc +\&manuals to other formats. +\&.El +.Ed +.Pp +Here is a hanged list with just one item: +.Bl -hang -offset indent +.It Em Hanged +labels appear similar to tagged lists when the +label is smaller than the label width. +.It Em Longer hanged list labels +blend in to the paragraph unlike +tagged paragraph labels. +.El +.Pp +And the unformatted text which created it: +.Bd -literal -offset indent +\&.Bl -hang -offset indent +\&.It Em Hanged +\&labels appear similar to tagged lists when the +\&label is smaller than the label width. +\&.It Em Longer hanged list labels +\&blend in to the paragraph unlike +\&tagged paragraph labels. +\&.El +.Ed +.Pp +The tagged list which follows uses an optional width specifier to control +the width of the tag. +.Pp +.Bl -tag -width "PAGEIN" -compact -offset indent +.It SL +sleep time of the process (seconds blocked) +.It PAGEIN +number of disk +.Tn I/O Ns 's +resulting from references +by the process to pages not loaded in core. +.It UID +numerical user-id of process owner +.It PPID +numerical id of parent of process process priority +(non-positive when in non-interruptible wait) +.El +.Pp +The raw text: +.Bd -literal -offset indent +\&.Bl -tag -width "PAGEIN" -compact -offset indent +\&.It SL +\&sleep time of the process (seconds blocked) +\&.It PAGEIN +\&number of disk +\&.Tn I/O Ns 's +\&resulting from references +\&by the process to pages not loaded in core. +\&.It UID +\&numerical user-id of process owner +\&.It PPID +\&numerical id of parent of process process priority +\&(non-positive when in non-interruptible wait) +\&.El +.Ed +.Pp +Acceptable width specifiers: +.Bl -tag -width Ar -offset indent +.It Fl width Ar "\&Fl" +sets the width to the default width for a flag. +All callable +macros have a default width value. +The +.Ql \&.Fl , +value is presently +set to ten constant width characters or about five sixth of +an inch. +.It Fl width Ar "24n" +sets the width to 24 constant width characters or about two +inches. +The +.Ql n +is absolutely necessary for the scaling to work correctly. +.It Fl width Ar "ENAMETOOLONG" +sets width to the constant width length of the +string given. +.It Fl width Ar "\\*qint mkfifo\\*q" +again, the width is set to the constant width of the string +given. +.El +.Pp +If a width is not specified for the tag list type, the first +time +.Ql \&.It +is invoked, an attempt is made to determine an appropriate +width. +If the first argument to +.Ql ".It" +is a callable macro, the default width for that macro will be used +as if the macro name had been supplied as the width. +However, +if another item in the list is given with a different callable +macro name, a new and nested list is assumed. +.Sh PREDEFINED STRINGS +The following strings are predefined as may be used by +preceding with the troff string interpreting sequence +.Ql \&\e*(xx +where +.Em xx +is the name of the defined string or as +.Ql \&\e*x +where +.Em x +is the name of the string. +The interpreting sequence may be used any where in the text. +.Pp +.Bl -column "String " "Nroff " "Troff " -offset indent +.It Sy "String Nroff Troff" +.It Li "<=" Ta \&<\&= Ta \*(<= +.It Li ">=" Ta \&>\&= Ta \*(>= +.It Li "Rq" Ta "''" Ta \*(Rq +.It Li "Lq" Ta "``" Ta \*(Lq +.It Li "ua" Ta ^ Ta \*(ua +.It Li "aa" Ta ' Ta \*(aa +.It Li "ga" Ta \` Ta \*(ga +.\" .It Li "sL" Ta ` Ta \*(sL +.\" .It Li "sR" Ta ' Ta \*(sR +.It Li "q" Ta \&" Ta \*q +.It Li "Pi" Ta pi Ta \*(Pi +.It Li "Ne" Ta != Ta \*(Ne +.It Li "Le" Ta <= Ta \*(Le +.It Li "Ge" Ta >= Ta \*(Ge +.It Li "Lt" Ta < Ta \*(Gt +.It Li "Gt" Ta > Ta \*(Lt +.It Li "Pm" Ta +- Ta \*(Pm +.It Li "If" Ta infinity Ta \*(If +.It Li "Na" Ta \fINaN\fP Ta \*(Na +.It Li "Ba" Ta \fR\&|\fP Ta \*(Ba +.El +.Pp +.Sy Note : +The string named +.Ql q +should be written as +.Ql \e*q +since it is only one char. +.Sh DIAGNOSTICS +The debugging facilities for +.Nm \-mdoc +are limited, but can help detect subtle errors such +as the collision of an argument name with an internal +register or macro name. +(A what?) +A register is an arithmetic storage class for +.Xr troff +with a one or two character name. +All registers internal to +.Nm \-mdoc +for +.Xr troff +and +.Xr ditroff +are two characters and +of the form <upper_case><lower_case> such as +.Ql \&Ar , +<lower_case><upper_case> as +.Ql \&aR +or +<upper or lower letter><digit> as +.Ql \&C\&1 . +And adding to the muddle, +.Xr troff +has its own internal registers all of which are either +two lower case characters or a dot plus a letter or meta-character +character. +In one of the introduction examples, it was shown how to +prevent the interpretation of a macro name with the escape sequence +.Ql \e& . +This is sufficient for the internal register names also. +.Pp +.\" Every callable macro name has a corresponding register +.\" of the same name (<upper_case><lower_case>). +.\" There are also specific registers which have +.\" been used for stacks and arrays and are listed in the +.\" .Sx Appendix . +.\" .Bd -ragged -offset 4n +.\" [A-Z][a-z] registers corresponding to macro names (example ``Ar'') +.\" [a-z][A-Z] registers corresponding to macro names (example ``aR'') +.\" C[0-9] argument types (example C1) +.\" O[0-9] offset stack (displays) +.\" h[0-9] horizontal spacing stack (lists) +.\" o[0-9] offset (stack) (lists) +.\" t[0-9] tag stack (lists) +.\" v[0-9] vertical spacing stack (lists) +.\" w[0-9] width tag/label stack +.\" .Ed +.\" .Pp +If a non-escaped register name is given in the argument list of a request +unpredictable behavior will occur. +In general, any time huge portions +of text do not appear where expected in the output, or small strings +such as list tags disappear, chances are there is a misunderstanding +about an argument type in the argument list. +Your mother never intended for you to remember this evil stuff - so here +is a way to find out whether or not your arguments are valid: The +.Ql \&.Db +(debug) +macro displays the interpretation of the argument list for most +macros. +Macros such as the +.Ql \&.Pp +(paragraph) +macro do not contain debugging information. +All of the callable macros do, +and it is strongly advised whenever in doubt, +turn on the +.Ql \&.Db +macro. +.Pp +.Dl Usage: \&.Db [on | off] +.Pp +An example of a portion of text with +the debug macro placed above and below an +artificially created problem (a flag argument +.Ql \&aC +which should be +.Ql \e&aC +in order to work): +.Bd -literal -offset indent +\&.Db on +\&.Op Fl aC Ar file ) +\&.Db off +.Ed +.Pp +The resulting output: +.Bd -literal -offset indent +DEBUGGING ON +DEBUG(argv) MACRO: `.Op' Line #: 2 + Argc: 1 Argv: `Fl' Length: 2 + Space: `' Class: Executable + Argc: 2 Argv: `aC' Length: 2 + Space: `' Class: Executable + Argc: 3 Argv: `Ar' Length: 2 + Space: `' Class: Executable + Argc: 4 Argv: `file' Length: 4 + Space: ` ' Class: String + Argc: 5 Argv: `)' Length: 1 + Space: ` ' Class: Closing Punctuation or suffix + MACRO REQUEST: .Op Fl aC Ar file ) +DEBUGGING OFF +.Ed +.Pp +The first line of information tells the name of the calling +macro, here +.Ql \&.Op , +and the line number it appears on. +If one or more files are involved +(especially if text from another file is included) the line number +may be bogus. +If there is only one file, it should be accurate. +The second line gives the argument count, the argument +.Pq Ql \&Fl +and its length. +If the length of an argument is two characters, the +argument is tested to see if it is executable (unfortunately, any +register which contains a non-zero value appears executable). +The third line gives the space allotted for a class, and the +class type. +The problem here is the argument aC should not be +executable. +The four types of classes are string, executable, closing +punctuation and opening punctuation. +The last line shows the entire +argument list as it was read. +In this next example, the offending +.Ql \&aC +is escaped: +.Bd -literal -offset indent +\&.Db on +\&.Em An escaped \e&aC +\&.Db off +.Ed +.Bd -literal -offset indent +DEBUGGING ON +DEBUG(fargv) MACRO: `.Em' Line #: 2 + Argc: 1 Argv: `An' Length: 2 + Space: ` ' Class: String + Argc: 2 Argv: `escaped' Length: 7 + Space: ` ' Class: String + Argc: 3 Argv: `aC' Length: 2 + Space: ` ' Class: String + MACRO REQUEST: .Em An escaped &aC +DEBUGGING OFF +.Ed +.Pp +The argument +.Ql \e&aC +shows up with the same length of 2 as the +.Ql \e& +sequence produces a zero width, but a register +named +.Ql \e&aC +was not found and the type classified as string. +.Pp +Other diagnostics consist of usage statements and are self explanatory. +.Sh GROFF, TROFF AND NROFF +The +.Nm \-mdoc +package does not need compatibility mode with +.Xr groff . +.Pp +The package inhibits page breaks, and the headers and footers +which normally occur at those breaks with +.Xr nroff , +to make the manual more efficient for viewing on-line. +At the moment, +.Xr groff +with +.Fl T Ns Ar ascii +does eject the imaginary remainder of the page at end of file. +The inhibiting of the page breaks makes +.Xr nroff Ns 'd +files unsuitable for hardcopy. +There is a register named +.Ql \&cR +which can be set to zero in the site dependent style file +.Pa /usr/src/share/tmac/doc-nroff +to restore the old style behavior. +.Sh FILES +.Bl -tag -width /usr/share/man0/template.doc -compact +.It Pa /usr/share/tmac/tmac.doc +manual macro package +.It Pa /usr/share/man0/template.doc +template for writing a man page +.El +.Sh SEE ALSO +.Xr mdoc 7 , +.Xr man 1 , +.Xr troff 1 +.Sh BUGS +Undesirable hyphenation on the dash of a flag +argument is not yet resolved, and causes +occasional mishaps in the +.Sx DESCRIPTION +section. +(line break on the hyphen). +.Pp +Predefined strings are not declared in documentation. +.Pp +Section 3f has not been added to the header routines. +.Pp +.Ql \&.Nm +font should be changed in +.Sx NAME +section. +.Pp +.Ql \&.Fn +needs to have a check to prevent splitting up +if the line length is too short. +Occasionally it +separates the last parenthesis, and sometimes +looks ridiculous if a line is in fill mode. +.Pp +The method used to prevent header and footer page +breaks (other than the initial header and footer) when using +nroff occasionally places an unsightly partially filled line (blank) +at the would be bottom of the page. +.Pp +The list and display macros to not do any keeps +and certainly should be able to. +.\" Note what happens if the parameter list overlaps a newline +.\" boundary. +.\" to make sure a line boundary is crossed: +.\" .Bd -literal +.\" \&.Fn struct\e\ dictionarytable\e\ *dictionarylookup struct\e\ dictionarytable\e\ *tab[] +.\" .Ed +.\" .Pp +.\" produces, nudge nudge, +.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] , +.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] , +.\" nudge +.\" .Fn struct\ dictionarytable\ *dictionarylookup char\ *h struct\ dictionarytable\ *tab[] . +.\" .Pp +.\" If double quotes are used, for example: +.\" .Bd -literal +.\" \&.Fn \*qstruct dictionarytable *dictionarylookup\*q \*qchar *h\*q \*qstruct dictionarytable *tab[]\*q +.\" .Ed +.\" .Pp +.\" produces, nudge nudge, +.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" , +.\" nudge +.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" , +.\" nudge +.\" .Fn "struct dictionarytable *dictionarylookup" "char *h" "struct dictionarytable *tab[]" . +.\" .Pp +.\" Not a pretty sight... +.\" In a paragraph, a long parameter containing unpaddable spaces as +.\" in the former example will cause +.\" .Xr troff +.\" to break the line and spread +.\" the remaining words out. +.\" The latter example will adjust nicely to +.\" justified margins, but may break in between an argument and its +.\" declaration. +.\" In +.\" .Xr nroff +.\" the right margin adjustment is normally ragged and the problem is +.\" not as severe. diff --git a/share/man/man7/operator.7 b/share/man/man7/operator.7 new file mode 100644 index 0000000..64954f5 --- /dev/null +++ b/share/man/man7/operator.7 @@ -0,0 +1,65 @@ +.\" Copyright (c) 1989, 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)operator.7 8.1 (Berkeley) 6/9/93 +.\" +.Dd June 9, 1993 +.Dt OPERATOR 7 +.Os +.Sh NAME +.Nm operator +.Nd C operator precedence and order of evaluation +.Sh DESCRIPTION +.Bd -ragged -offset indent -compact +.Bl -column "Operator Associativity " +.It Operator Associativity +.It -------- ------------- +.It \&() [] -> . left to right +.It "! ~ ++ -- - (type) * & sizeof" right to left +.It \&* / % left to right +.It \&+ - left to right +.It \&<< >> left to right +.It \&< <= > >= left to right +.It \&== != left to right +.It \&& left to right +.It \&^ left to right +.It \&| left to right +.It \&&& left to right +.It \&|| left to right +.It \&?: right to left +.It \&= += -= etc. right to left +.It \&, left to right +.El +.Ed +.Sh FILES +.Bl -tag -width /usr/share/misc/operator -compact +.It Pa /usr/share/misc/operator +.El diff --git a/share/man/man8/Makefile b/share/man/man8/Makefile new file mode 100644 index 0000000..ec6e8b5 --- /dev/null +++ b/share/man/man8/Makefile @@ -0,0 +1,6 @@ +# @(#)Makefile 8.1 (Berkeley) 6/5/93 + +MAN8= adduser.0 intro.0 rc.0 sticky.0 +SUBDIR= man8.i386 man8.hp300 man8.tahoe man8.vax + +.include <bsd.prog.mk> diff --git a/share/man/man8/adduser.8 b/share/man/man8/adduser.8 new file mode 100644 index 0000000..73e3dcd --- /dev/null +++ b/share/man/man8/adduser.8 @@ -0,0 +1,115 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)adduser.8 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt ADDUSER 8 +.Os BSD 4 +.Sh NAME +.Nm adduser +.Nd procedure for adding new users +.Sh DESCRIPTION +A new user must choose a login name, which must not already appear in +.Pa /etc/passwd +or +.Pa /etc/aliases . +It must also not begin with the hyphen +.Ql Fl +character. +It is strongly recommended that it be all lower-case, and not contain +the dot +.Ql \&. +character, as that tends to confuse mailers. +An account can be added by editing a line into the passwd file; this +must be done with the password file locked e.g. by using +.Xr chpass 1 +or +.Xr vipw 8 . +.Pp +A new user is given a group and user id. +Login and user id's should be unique across the system, and often across +a group of systems, since they are used to control file access. +Typically, users working on similar projects will be put in the same groups. +At the University of California, Berkeley, we have groups for system staff, +faculty, graduate students, and special groups for large projects. +.Pp +A skeletal account for a new user +\*(lqernie\*(rq +might look like: +.Bd -literal +ernie::25:30::0:0:Ernie Kovacs,508 Evans Hall,x7925, + 642-8202:/a/users/ernie:/bin/csh +.Ed +.Pp +For a description of each of these fields, see +.Xr passwd 5 . +.Pp +It is useful to give new users some help in getting started, supplying +them with a few skeletal files such as +.Pa \&.profile +if they use +.Pa /bin/sh , +or +.Pa \&.cshrc +and +.Pa \&.login +if they use +.Pa /bin/csh . +The directory +.Pa /usr/share/skel +contains skeletal definitions of such files. +New users should be given copies of these files which, for instance, +use +.Xr tset 1 +automatically at each login. +.Sh FILES +.Bl -tag -width /etc/master.passwdxx -compact +.It Pa /etc/master.passwd +user database +.It Pa /usr/share/skel +skeletal login directory +.El +.Sh SEE ALSO +.Xr chpass 1 , +.Xr finger 1 , +.Xr passwd 1 , +.Xr aliases 5 , +.Xr passwd 5 , +.Xr pwd_mkdb 8 , +.Xr vipw 8 +.Sh BUGS +User information should (and eventually will) be stored elsewhere. +.Sh HISTORY +The +.Nm +command appeared in +.Bx 3.0 . diff --git a/share/man/man8/intro.8 b/share/man/man8/intro.8 new file mode 100644 index 0000000..5ec3d0e --- /dev/null +++ b/share/man/man8/intro.8 @@ -0,0 +1,71 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)intro.8 8.2 (Berkeley) 12/11/93 +.\" +.Dd December 11, 1993 +.Dt INTRO 8 +.Os BSD 4.2 +.Sh NAME +.Nm intro +.Nd "introduction to system maintenance and operation commands" +.Sh DESCRIPTION +This section contains information related to system operation +and maintenance. +It describes commands used to create new file systems, +.Ql Xr newfs , +verify the integrity of the file systems, +.Ql Xr fsck , +control disk usage, +.Ql Xr edquota , +maintain system backups, +.Ql Xr dump , +and recover files when disks die an untimely death, +.Ql Xr restore . +The +.Ql Xr format +manual +for the specific architecture the system is running on should be +consulted when formatting disks and tapes. +Network related services like +.Ql Xr inetd +and +.Ql Xr ftpd +are also described. +The section +.Ql Xr crash +should be consulted to understand how to interpret system +crash dumps. +.Sh HISTORY +The +.Nm intro +section manual page appeared in +.Bx 4.2 . diff --git a/share/man/man8/makedev.8 b/share/man/man8/makedev.8 new file mode 100644 index 0000000..270d029 --- /dev/null +++ b/share/man/man8/makedev.8 @@ -0,0 +1,110 @@ +.\" Copyright (c) 1983, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)makedev.8 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt MAKEDEV 8 +.Os BSD 4.2 +.Sh NAME +.Nm makedev +.Nd make system special files +.Sh SYNOPSIS +.Nm MAKEDEV +.Ar device ... +.Sh DESCRIPTION +.Nm MAKEDEV +is a shell script normally used to install +special files. It resides in the +.Pa /dev +directory, as this is the normal location of special files. +Arguments to +.Nm MAKEDEV +are usually of the form +.Ar device-name Ns Sy \&? +where +.Ar device-name +is one of the supported devices listed in section 4 of the +manual and +.Dq Sy \&? +is a logical unit number (0-9). A few +special arguments create assorted collections of devices and are +listed below. +.Bl -tag -width Ds +.It Sy std +Create the +.Em standard +devices for the system; for example the standard +.Tn UNIX +devices +.Pa /dev/console and /dev/tty; +the standard hardware dependent devices, +for example in the VAX family +the +.Tn VAX-11/780 +console floppy device, +.Pa /dev/floppy , +and +.Tn VAX-11/750 +and +.Tn VAX-11/730 +console cassette device(s), +.Pa /dev/tu? +devices would be made for the appropriate system. +.It Sy local +Create those devices specific to the local site. This +request causes the shell file +.Pa /dev/MAKEDEV.local +to be executed. Site specific commands, such as those +used to setup dialup lines as +.Pa ttyd? +should be included +in this file. +.El +.Pp +Since all devices are created using +.Xr mknod 8 , +this shell script is useful only to the super-user. +.Sh DIAGNOSTICS +Either self-explanatory, or generated by one of the programs +called from the script. Use +.Ql sh -x MAKEDEV +in case of +trouble. +.Sh SEE ALSO +.Xr intro 4 , +.Xr config 8 , +.Xr mknod 8 +.Sh HISTORY +The +.Nm +command appeared in +.Bx 4.2 . diff --git a/share/man/man8/man8.i386/MAKEDEV.8 b/share/man/man8/man8.i386/MAKEDEV.8 new file mode 100644 index 0000000..40ca3b2 --- /dev/null +++ b/share/man/man8/man8.i386/MAKEDEV.8 @@ -0,0 +1,105 @@ +.\" Copyright (c) 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)MAKEDEV.8 8.1 (Berkeley) 6/5/93 +.\" +.TH MAKEDEV 8 "June 5, 1993" +.UC 7 +.SH NAME +MAKEDEV \- create system and device special files +.SH SYNOPSIS +MAKEDEV name ... +.SH DESCRIPTION +The shell script +.IR MAKEDEV , +found in the ``/dev'' directory, is used to create the common special +files. +See +.IR special (8) +for a more complete discussion of special files. +.PP +.I MAKEDEV +takes any number of device names as arguments, where the names are +the common abbreviation for the device. +There are two special devices, ``std'' and ``local''. +The former creates the standard devices for the architecture. +The latter is for devices specific to the local site, and +executes the shell file ``MAKEDEV.local''. +.PP +The i386 supports the following devices. +Where a device name is followed by a hash sign (``#''), the hash sign +must be replaced by a unit number. +.TP 10 +std +the standard devices (console, drum, fd/*, klog, kmem, mem, null, +stderr, stdin, stdout, tty) +.br +.ns +.TP 10 +local +configuration specific devices +.br +.ns +.TP 10 +com# +standard PC COM ports +.br +.ns +.TP 10 +fd# +``floppy'' disk drives (3 1/2, 5 1/4) +.br +.ns +.TP 10 +flog# +kernel logging device +.br +.ns +.TP 10 +pty# +set of 16 master and slave pseudo terminals +.br +.ns +.TP 10 +wd# +``winchester'' disk drives (ST506, IDE, ESDI, RLL etc.) +.br +.ns +.TP 10 +wt# +QIC-interfaced (e.g. not SCSI) 3M cartridge tape +.SH FILES +/dev The special file directory. +.SH SEE ALSO +.IR mknod (1), +.IR intro (4), +.IR config (8), +.IR special (8) diff --git a/share/man/man8/man8.i386/Makefile b/share/man/man8/man8.i386/Makefile new file mode 100644 index 0000000..06a815c --- /dev/null +++ b/share/man/man8/man8.i386/Makefile @@ -0,0 +1,15 @@ +# @(#)Makefile 8.1 (Berkeley) 6/5/93 + +MAN8= MAKEDEV.0 +MANSUBDIR=/i386 + +all: ${MAN8} + +clean depend lint tags: + +cleandir: + rm -f ${MAN8} + +install: maninstall + +.include <bsd.prog.mk> diff --git a/share/man/man8/rc.8 b/share/man/man8/rc.8 new file mode 100644 index 0000000..1e953a6 --- /dev/null +++ b/share/man/man8/rc.8 @@ -0,0 +1,106 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)rc.8 8.2 (Berkeley) 12/11/93 +.\" +.Dd December 11, 1993 +.Dt RC 8 +.Os BSD 4 +.Sh NAME +.Nm rc +.Nd command script for auto\-reboot and daemons +.Sh SYNOPSIS +.Nm rc +.Nm rc.local +.Sh DESCRIPTION +.Nm Rc +is the command script which controls the automatic reboot and +.Nm rc.local +is the script holding commands which are pertinent only +to a specific site. +.Pp +When an automatic reboot is in progress, +.Nm rc +is invoked with the argument +.Em autoboot . +The first portion of +.Nm rc +runs an +.Xr fsck 8 +with option +.Fl p +to ``preen'' all the disks of minor inconsistencies resulting +from the last system shutdown and to check for serious inconsistencies +caused by hardware or software failure. +If this auto-check and repair succeeds, then the second part of +.Nm rc +is run. +.Pp +The second part of +.Nm rc , +which is run after an auto-reboot succeeds and also if +.Nm rc +is invoked when a single user shell terminates (see +.Xr init 8 ) , +starts all the daemons on the system, preserves editor files +and clears the scratch directory +.Pa /tmp . +.Pp +.Nm Rc.local +is executed immediately before any other commands after a successful +.Xr fsck . +Normally, the first commands placed in the +.Nm rc.local +file define the machine's name, using +.Xr hostname 1 , +and save any possible core image that might have been +generated as a result of a system crash, with +.Xr savecore 8 . +The latter command is included in the +.Nm rc.local +file because the directory in which core dumps are saved +is usually site specific. +.Pp +Following tradition, the startup files +.Nm rc +and +.Nm rc.local +reside in +.Pa /etc . +.Sh SEE ALSO +.Xr init 8 , +.Xr reboot 8 , +.Xr savecore 8 +.Sh HISTORY +The +.Nm +command appeared in +.Bx 4.0 . diff --git a/share/man/man8/sticky.8 b/share/man/man8/sticky.8 new file mode 100644 index 0000000..546c6c0 --- /dev/null +++ b/share/man/man8/sticky.8 @@ -0,0 +1,101 @@ +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)sticky.8 8.1 (Berkeley) 6/5/93 +.\" +.Dd June 5, 1993 +.Dt STICKY 8 +.Os BSD 4 +.Sh NAME +.Nm sticky +.Nd sticky text and append-only directories +.Sh DESCRIPTION +A special file mode, called the +.Em sticky bit +(mode S_ISVTX), +is used to indicate special treatment +for shareable executable files and directories. +See +.Xr chmod 2 +or +the file +.Pa /usr/include/sys/stat.h +for an explanation of file modes. +.Sh STICKY TEXT EXECUTABLE FILES +An executable shareable file whose sticky bit is set +will not be immediately discarded from swap space after execution. +The kernel will hoard the text segment of the file for future +reuse and avoid having to reload the program. +Shareable text segments are normally placed +in a least-frequently-used cache after use, +and thus the `sticky bit' has little effect on commonly-used text images. +.Pp +Sharable executable files are created with the +.Fl n +and +.Fl z +options of +the loader +.Xr ld 1 . +.Pp +Only the super-user can set the sticky bit +on a sharable executable file. +.Sh STICKY DIRECTORIES +A directory whose `sticky bit' is set +becomes an append-only directory, or, more accurately, +a directory in which the deletion of files is restricted. +A file in a sticky directory may only be removed or renamed +by a user if the user has write permission for the directory and +the user is the owner of the file, the owner of the directory, +or the super-user. +This feature is usefully applied to directories such as +.Pa /tmp +which must be publicly writable but +should deny users the license to arbitrarily +delete or rename each others' files. +.Pp +Any user may create a sticky directory. +See +.Xr chmod 1 +for details about modifying file modes. +.Sh BUGS +Since the text areas of sticky text executables are stashed in the swap area, +abuse of the feature can cause a system to run out of swap. +.Pp +Neither +.Xr open 2 +nor +.Xr mkdir 2 +will create a file with the sticky bit set. +.Sh HISTORY +A +.Nm +command appeared in Version 32V AT&T UNIX. diff --git a/share/man/tools/.param b/share/man/tools/.param new file mode 100644 index 0000000..329b82d --- /dev/null +++ b/share/man/tools/.param @@ -0,0 +1,95 @@ +export MANDIR TMPDIR +export DIRLST FILLST +export LFLAG PFLAG ID + +MANDIR=/usr/man +TMPDIR=/tmp +DIRLST= +FILLST= +LFLAG= +PFLAG= +ID= + +shift + +while [ $# -gt 0 ] +do + case $1 in + -m) + shift + MANDIR=$1 + shift + ;; + + -t) + shift + TMPDIR=$1 + shift + ;; + + -d | -l) + LFLAG=1 + shift + ;; + + -p) + PFLAG=1 + shift + ;; + + -i | -o) + shift + ID=$1 + shift + ;; + + -s) + shift + while [ $# -gt 0 ] + do + case $1 in + [1-8]) + DIRLST="$DIRLST $1" + shift + ;; + + *) + break + ;; + esac + done + ;; + + -f) + shift + while [ $# -gt 0 ] + do + case $1 in + -*) + break + ;; + + *) + FILLST="$FILLST $1" + shift + ;; + esac + done + ;; + + *) + echo $0: unknown option $1 + exit 2 + ;; + esac +done + +if [ -z "$DIRLST" ] +then + DIRLST="1 2 3 4 5 6 7 8" +fi + +if [ -z "$FILLST" ] +then + FILLST=*.* +fi diff --git a/share/man/tools/M.folio b/share/man/tools/M.folio new file mode 100644 index 0000000..5971c93 --- /dev/null +++ b/share/man/tools/M.folio @@ -0,0 +1,249 @@ +'\" mm -12 M.folio +.br +.tl '''May 16, 1980' +.tl '''T.A.D.' +.rs +.sp 3 +.ce +UNIX User's Manual +.ce +Release 3.0 +.tr ~ +.sp 3 +.ce +.ul +PRINTING INSTRUCTIONS +.sp 2 +Print entire manual two-sided; mock-ups of front and back +cover (together with sizing information), as well as cover +title and tabs copy are attached. +.sp +Total page count (including blank pages) is 704. +.nf +.sp 2 +.ce +.I "FOLIO LIST" +.sp 2 +.I "Front Matter:" +.sp +.ta 5 10 25 34 +.ul + No tab: + Title page ~~~~1* + Trademark page ~~~~2* +.FS * +Pages 1 and 2 are +.I not +numbered. +.I All +other pages +.I "that carry any text" +are numbered. +.FE + Acknowledgements ~~~~3 + Blank page ~~~~4 +.sp +.ul + Tab "INTRO": + Introduction ~~~~5-6 incl. + How To Get Started ~~~~7-10 incl. +.sp +.ul + Tab "CONTENTS": + Contents ~~~~1-9 incl. + Blank page ~~~10 +.sp +.ul + Tab "INDEX": + Permuted Index ~~~~1-32 incl. +.bp +.nf +.ta 18 +12 +18 +12 +18 +12 +.sp 3 +.ul +Tab "1": +'\" Section 1 goes here +INTRO(1) 1 DATE(1) 1 JOIN(1) 1 +300(1) 1-2 incl. DC(1) 1-2 incl. KAS(1) 1 +4014(1) 1 DD(1) 1-2 incl. KILL(1) 1 +450(1) 1 DELTA(1) 1-2 incl. KUN(1) 1 +ACCT(1M) 1-2 incl. DEROFF(1) 1 LD(1) 1-2 incl. +ACCTCMS(1M) 1 DEVNM(1M) 1 LEX(1) 1-2 incl. +ACCTCOM(1) 1-2 incl. DF(1) 1 LINE(1) 1 +ACCTCON(1M) 1 DIFF(1) 1 LINK(1M) 1 +ACCTMERG(1M) 1 DIFF3(1) 1 LINT(1) 1-2 incl. +ACCTPRC(1M) 1 DIFFMK(1) 1 LOGIN(1) 1 +ACCTSH(1M) 1-2 incl. DIRCMP(1) 1 LOGNAME(1) 1 +ADB(1) 1-6 incl. DPD(1C) 1-2 incl. LORDER(1) 1 +ADMIN(1) 1-4 incl. DPR(1C) 1 LPR(1) 1 +AR(1) 1-2 incl. DU(1) 1 LS(1) 1-2 incl. +ARCV(1) 1 DUMP(1M) 1 M4(1) 1-3 incl. +AS.PDP(1) 1 ECHO(1) 1 MAIL(1) 1-2 incl. +AS.VAX(1) 1 ED(1) 1-8 incl. MAKE(1) 1-5 incl. +AWK(1) 1-3 incl. EFL(1) 1-2 incl. MAN(1) 1-2 incl. +BANNER(1) 1 ENV(1) 1 MESG(1) 1 +BASENAME(1) 1 EQN(1) 1-2 incl. MKDIR(1) 1 +BC(1) 1-2 incl. ERRDEAD(1M) 1 MKFS(1M) 1-2 incl. +BCOPY(1M) 1 ERRDEMON(1M) 1 MKNOD(1M) 1 +BDIFF(1) 1 ERRPT(1M) 1 MM(1) 1-2 incl. +BFS(1) 1-3 incl. ERRSTOP(1M) 1 MMCHEK(1) 1 +BS(1) 1-9 incl. EXPR(1) 1-2 incl. MMT(1) 1 +CAL(1) 1 F77(1) 1-2 incl. MOUNT(1M) 1 +CALENDAR(1) 1 FACTOR(1) 1 MVDIR(1M) 1 +CAT(1) 1 FGET(1C) 1-2 incl. NCHECK(1M) 1 +CB(1) 1 FGET.DEMON(1C) 1 NEWGRP(1) 1 +CC(1) 1-2 incl. FILE(1) 1 NEWS(1) 1 +CD(1) 1 FIND(1) 1-2 incl. NICE(1) 1 +CDC(1) 1-2 incl. FSCK(1M) 1-2 incl. NL(1) 1-2 incl. +CHMOD(1) 1 FSCV(1M) 1 NM(1) 1 +CHOWN(1) 1 FSDB(1M) 1-3 incl. NOHUP(1) 1 +CHROOT(1M) 1 FSEND(1C) 1-2 incl. OD(1) 1 +CLRI(1M) 1 FWTMP(1M) 1 ORJESTAT(1C) 1 +CMP(1) 1 GCAT(1C) 1-2 incl. PACK(1) 1-2 incl. +COL(1) 1 GCOSMAIL(1C) 1 PASSWD(1) 1 +COMB(1) 1 GDEV(1G) 1 PASTE(1) 1 +COMM(1) 1 GED(1G) 1-6 incl. PR(1) 1-2 incl. +CONFIG(1M) 1-3 incl. GET(1) 1-5 incl. PROF(1) 1 +CP(1) 1 GETOPT(1) 1 PROFILER(1M) 1 +CPIO(1) 1-2 incl. GRAPH(1G) 1 PRS(1) 1-3 incl. +CRASH(1M) 1-2 incl. GRAPHICS(1G) 1 PS(1) 1-2 incl. +CREF(1) 1-2 incl. GREEK(1) 1 PTX(1) 1 +CRON(1M) 1 GREP(1) 1-2 incl. PWCK(1M) 1 +CRYPT(1) 1 GUTIL(1G) 1-2 incl. PWD(1) 1 +CSPLIT(1) 1-2 incl. HELP(1) 1 RATFOR(1) 1 +CT(1C) 1 HP(1) 1-2 incl. REFORM(1) 1-3 incl. +CU(1C) 1-2 incl. HYPHEN(1) 1 REGCMP(1) 1 +CUT(1) 1 ID(1) 1 RESTOR(1M) 1-2 incl. +CW(1) 1-3 incl. INSTALL(1M) 1 RJESTAT(1C) 1 +RM(1) 1 SU(1) 1 UNIQ(1) 1 +RMDEL(1) 1 SUM(1) 1 UNITS(1) 1 +RSH(1) 1 SYNC(1M) 1 UUCLEAN(1M) 1 +RUNACCT(1M) 1-2 incl. SYSDEF(1M) 1 UUCP(1C) 1-2 incl. +SACT(1) 1 TABS(1) 1-2 incl. UUSTAT(1C) 1-2 incl. +SAG(1M) 1 TAIL(1) 1 UUSUB(1M) 1 +SCC(1) 1 TAR(1) 1-2 incl. UUTO(1C) 1 +SCCSDIFF(1) 1 TBL(1) 1-2 incl. UUX(1C) 1 +SDB(1) 1-4 incl. TC(1) 1 VAL(1) 1-2 incl. +SDIFF(1) 1 TEE(1) 1 VC(1) 1-3 incl. +SED(1) 1-3 incl. TEST(1) 1 VLX(1M) 1 +SEND(1C) 1-6 incl. TIME(1) 1 VOLCOPY(1M) 1 +SETMNT(1M) 1 TIMEX(1) 1 VPMC(1C) 1-10 incl. +SH(1) 1-7 incl. TOC(1G) 1-2 incl. VPMSTART(1C) 1 +SHUTDOWN(1M) 1 TOUCH(1) 1 VPR(1) 1 +SIZE(1) 1 TP(1) 1-2 incl. WAIT(1) 1 +SLEEP(1) 1 TPLOT(1G) 1 WALL(1M) 1 +SNO(1) 1 TR(1) 1 WC(1) 1 +SORT(1) 1-2 incl. TROFF(1) 1-2 incl. WHAT(1) 1 +SPELL(1) 1 TRUE(1) 1 WHO(1) 1 +SPLINE(1G) 1 TSORT(1) 1 WHODO(1M) 1 +SPLIT(1) 1 TTY(1) 1 WRITE(1) 1 +ST(1M) 1 TYPO(1) 1 XARGS(1) 1-2 incl. +STAT(1G) 1-3 incl. UMASK(1) 1 XREF(1) 1 +STRIP(1) 1 UNAME(1) 1 YACC(1) 1 +STTY(1) 1-3 incl. UNGET(1) 1 +.sp 3 +.ul +Tab "2": +'\" Section 2 goes here +INTRO(2) 1-5 incl. GETPID(2) 1 SETUID(2) 1 +ACCESS(2) 1 GETUID(2) 1 SIGNAL(2) 1-3 incl. +ACCT(2) 1 IOCTL(2) 1 STAT(2) 1-2 incl. +ALARM(2) 1 KILL(2) 1 STIME(2) 1 +BRK(2) 1 LINK(2) 1 SYNC(2) 1 +CHDIR(2) 1 LSEEK(2) 1 TIME(2) 1 +CHMOD(2) 1 MKNOD(2) 1-2 incl. TIMES(2) 1 +CHOWN(2) 1 MOUNT(2) 1 ULIMIT(2) 1 +CHROOT(2) 1 NICE(2) 1 UMASK(2) 1 +CLOSE(2) 1 OPEN(2) 1-2 incl. UMOUNT(2) 1 +CREAT(2) 1 PAUSE(2) 1 UNAME(2) 1 +DUP(2) 1 PIPE(2) 1 UNLINK(2) 1 +EXEC(2) 1-2 incl. PROFIL(2) 1 USTAT(2) 1 +EXIT(2) 1 PTRACE(2) 1-2 incl. UTIME(2) 1 +FCNTL(2) 1 READ(2) 1 WAIT(2) 1 +FORK(2) 1 SETPGRP(2) 1 WRITE(2) 1 + Blank page 1 +.sp 3 +.bp +.ul +Tab "3": +'\" Section 3 goes here +INTRO(3) 1 FREXP(3C) 1 PRINTF(3S) 1-3 incl. +A64L(3C) 1 FSEEK(3S) 1 PUTC(3S) 1 +ABORT(3C) 1 GAMMA(3M) 1 PUTPWENT(3C) 1 +ABS(3C) 1 GETC(3S) 1 PUTS(3S) 1 +ASSERT(3X) 1 GETENV(3C) 1 QSORT(3C) 1 +ATOF(3C) 1 GETGRENT(3C) 1 RAND(3C) 1 +BESSEL(3M) 1 GETLOGIN(3C) 1 REGEX(3X) 1-2 incl. +BSEARCH(3C) 1 GETOPT(3C) 1-2 incl. SCANF(3S) 1-3 incl. +CONV(3C) 1 GETPASS(3C) 1 SETBUF(3S) 1 +CRYPT(3C) 1 GETPW(3C) 1 SETJMP(3C) 1 +CTERMID(3S) 1 GETPWENT(3C) 1 SINH(3M) 1 +CTIME(3C) 1-2 incl. GETS(3S) 1 SLEEP(3C) 1 +CTYPE(3C) 1 HYPOT(3M) 1 SSIGNAL(3C) 1 +CUSERID(3S) 1 L3TOL(3C) 1 STDIO(3S) 1 +ECVT(3C) 1 LOGNAME(3X) 1 STRING(3C) 1-2 incl. +END(3C) 1 LSEARCH(3C) 1 SWAB(3C) 1 +EXP(3M) 1 MALLOC(3C) 1 SYSTEM(3S) 1 +FCLOSE(3S) 1 MKTEMP(3C) 1 TMPFILE(3S) 1 +FERROR(3S) 1 MONITOR(3C) 1 TMPNAM(3S) 1 +FLOOR(3M) 1 NLIST(3C) 1 TRIG(3M) 1 +FOPEN(3S) 1 PERROR(3C) 1 TTYNAME(3C) 1 +FPTRAP(3X) 1 PLOT(3X) 1 UNGETC(3S) 1 +FREAD(3S) 1 POPEN(3S) 1 +.sp 3 +.ul +Tab "4": +'\" Section 4 goes here +INTRO(4) 1 HS(4) 1 RK(4) 1 +CAT(4) 1 HT(4) 1 RL(4) 1 +DJ(4) 1 KL(4) 1 RP(4) 1 +DMC(4) 1 KMC(4) 1 ST(4) 1 +DN(4) 1 LP(4) 1 TM(4) 1 +DQS(4) 1-2 incl. MEM(4) 1 TRACE(4) 1 +DU(4) 1 NULL(4) 1 TTY(4) 1-8 incl. +DZ(4) 1 PCL(4) 1 VP(4) 1 +ERR(4) 1 PRF(4) 1 VPM(4) 1-2 incl. +HP(4) 1 RF(4) 1 +.sp 3 +.ul +Tab "5": +'\" Section 5 goes here +INTRO(5) 1 ERRFILE(5) 1-2 incl. MNTTAB(5) 1 +A.OUT(5) 1-4 incl. FS(5) 1-2 incl. PASSWD(5) 1 +ACCT(5) 1-2 incl. FSPEC(5) 1 PLOT(5) 1 +AR(5) 1 GPS(5) 1-2 incl. PNCH(5) 1 +CHECKLIST(5) 1 GROUP(5) 1 PROFILE(5) 1 +CORE(5) 1 INITTAB(5) 1 SCCSFILE(5) 1-3 incl. +CPIO(5) 1 INODE(5) 1 TP(5) 1 +DIR(5) 1 MASTER(5) 1-2 incl. UTMP(5) 1 +DUMP(5) 1-2 incl. +.sp 3 +.bp +.ul +Tab "6": +'\" Section 6 goes here +INTRO(6) 1 CRAPS(6) 1-2 incl. REVERSI(6) 1 +ARITHMETIC(6) 1 HANGMAN(6) 1 SKY(6) 1 +BACK(6) 1 MAZE(6) 1 TTT(6) 1 +BJ(6) 1 MOO(6) 1 WUMP(6) 1 +CHESS(6) 1 QUIZ(6) 1 Blank page 1 +.sp 3 +.ul +Tab "7": +'\" Section 7 goes here +INTRO(7) 1 GREEK(7) 1 REGEXP(7) 1-3 incl. +ASCII(7) 1 MAN(7) 1-2 incl. STAT(7) 1 +ENVIRON(7) 1 MM(7) 1 TERM(7) 1 +EQNCHAR(7) 1 MV(7) 1 TYPES(7) 1 +FCNTL(7) 1 +.sp 3 +.ul +Tab "8": +'\" Section 8 goes here +INTRO(8) 1 HASP(8) 1-6 incl. RP6FMT(8) 1 +70BOOT(8) 1-4 incl. INIT(8) 1-2 incl. SAR(8) 1 +CRASH(8) 1-3 incl. MAKEKEY(8) 1 TAPEBOOT(8) 1 +DISKBOOT(8) 1 MK(8) 1-2 incl. UNIXBOOT(8) 1 +ETP(8) 1 RC(8) 1 UVAC(8) 1 +FILESAVE(8) 1 RJE(8) 1-4 incl. VAXOPS(8) 1-4 incl. +GETTY(8) 1 ROMBOOT(8) 1-2 incl. Blank page 1 diff --git a/share/man/tools/M.tabs b/share/man/tools/M.tabs new file mode 100644 index 0000000..abcaeaf --- /dev/null +++ b/share/man/tools/M.tabs @@ -0,0 +1,68 @@ +'\" troff -g M.tabs | gcat -ftabs& +.fp 2 CW +.de h +.ps 6 +.vs 6p +.tl '___''___' +.vs +.ps +.. +.wh 0 h +.ss 18 +.nf +.rs +.ft 3 +.ps 24 +.vs 33p +.sp 1i +.ce 4 +U\s-6NIX\s+6 +User's Manual +.sp 1i +U\s-6NIX\s+6 +User's Manual +.bp +.rs +.ft 2 +.ps 10 +.vs 11p +.ta 3i +.sp 1i +I I +N N +T T +R R +O O +.sp 27p +C C +O O +N N +T T +E E +N N +T T +S S +.sp 27p +I I +N N +D D +E E +X X +.sp 27p +.ps 12 +.vs 13p +1 1 +.sp 27p +2 2 +.sp 27p +3 3 +.sp 27p +4 4 +.sp 27p +5 5 +.sp 27p +6 6 +.sp 27p +7 7 +.sp 27p +8 8 diff --git a/share/man/tools/README b/share/man/tools/README new file mode 100644 index 0000000..ac139a1 --- /dev/null +++ b/share/man/tools/README @@ -0,0 +1,198 @@ +This directory contains 14 shell procedures designed to carry out +various verification and regeneration tasks on the UNIX User's +Manual. The outputs of all procedures are left in files in +/_u_s_r/_m_a_n/_t_m_p; `tocrc (see below) also leaves output in +/_u_s_r/_m_a_n/_m_a_n_0. By default, these procedures operate on all 8 +sections of the manual. The options `-s' and `-f' are available +(except in `mgrep' and `tocrc') to restrict the list of sections +and/or files to be used. For example: + + ckspell -s 1 2 3 -f a\* + +will check spelling in all files whose names begin with `a' in +Sections 1-3. Two additional options, `-m' and `-t', can be used +to change the shell procedures' idea of where the manual and its +`tmp' directory reside. For example: + + list -m /usr/aman -t /usr/aman/tmp + +might be meaningful if, for instance, an alternate manual is +located in /_u_s_r/_a_m_a_n. These options are also useful when a new +manual is being built in a secluded place. + +Note that some of the shell procedures produce 8 result files, +one for each section of the manual. In particular, the 4 shell +procedures prefaced with `ck', which perform different types of +verification, produce a unique sorted list for each section, as +opposed to a file-by-file list. This means that one must search +all the files in a section (using `grep', most likely) for +occurrences of a particular string. + +Occasionally, some of these procedures will produce lines of +spurious output. This happens when, for instance, some text +looks like a cross-reference or a file name, e.g., `array(3)' or +`nroff/troff'. + +The following describes these 14 procedures: + +1. ckcrefs + Locates all cross-references to other manual entries and + checks to see whether the referenced pages exist. Produces + files _b_a_d_c_r_e_f[_1-_8] containing all bad cross-references in + each section. Also produces files _l_o_w_e_r._s_u_f[_1-_8], containing + occurrences of lower-case section suffixes, i.e., 1c, 1m, 3c, + which should be changed to upper-case (1C, 1M, 3C, etc.). + +2. ckfrefs + Locates all references in the FILES portion of manual entries + and checks to see whether the referenced files exist in the + running system. Produces files _b_a_d_f_r_e_f[_1-_8] containing + references to non-existent files. Note that file references + under headings other than FILES are _n_o_t checked. Temporary + files will, of course, not be found. + +3. cknames + Performs various checks on the `.TH' line and the NAME + section of entries. Note that the files produced by this + procedure contain the file names of entries that fail the + corresponding check: + + Checks to see that the entry contains a `.SH NAME' + section, producing files _n_o._N_A_M_E[_1-_8]. + + Checks the NAME section of the entry to insure that it is + exactly one line long (multi-line NAMEs will severely + confuse `tocrc'), producing files _n_o_t._o_n_e._l_i_n_e[_1-_8]. + + Checks to see that the entry contains a `.TH' line, + producing files _n_o._T_H[_1-_8]. + + Checks that the entry name and section given on the TH + line match the file name of that entry. For example, a + file containing `.TH GURP 1M' should be called `gurp.1m'. + Produces files _f_i_l_e._m_a_t_c_h[_1-_8]. + + Checks that the first name appearing on the NAME line is + the same as the entry name on the TH line (`ckso' below + assumes that this is always true). Produces files + _n_a_m_e._o_r_d_e_r[_1-_8]. + +4. ckso + This procedure performs two types of verification of _n_r_o_f_f + `.so' pointers in /_u_s_r/_m_a_n/_m_a_n[_1-_8]. It first locates files + that contain only a `.so' reference to a real entry, and + checks to see whether that file (entry) exists. Bad + references are written to the files _b_a_d_s_o[_1-_8]. Secondly, + `ckso' verifies the reverse; it locates each real entry, + looks at the NAME portion to see whether more than one name + appears there, and checks whether a file with a `.so' + reference exists for all such names other than the first. + Missing `.so' entries are written to the files _n_e_e_d_s_o[_1-_8]. + +5. ckspell + Utilizes _s_p_e_l_l to check for spelling errors in manual + entries. Produces file _s_p._e_r_r_s containing a section-by- + section list of errors. Uses file /_u_s_r/_m_a_n/_t_o_o_l_s/_s_p._i_g_n_o_r_e + to eliminate strings that appear often in the manual and are + normally flagged as errors by `spell'. + +6. list + Produces file _l_i_s_t containing a `long' listing with block + counts (`ls -ls') for each section of the manual. + +7. mcmp + Compares two versions of the manual and reports what files + are unique to each and whether or not the common files have + changed. If the `-d' option is given, _d_i_f_f-style listings + are generated for each common file instead. The `-o' option + is used to specify the name of the second manual directory; + /_u_s_r/_n_m_a_n is the default. Produces files _c_m_p[_1-_8] or + _d_i_f_f[_1-_8]. + +8. mgrep + Searches entire manual for the patterns specified as + arguments (i.e., `mgrep "typewriter"'). Produces file _g_r_e_p_s, + containing section-by-section list for each pattern. + +9. mklinks + Creates files containing appropriate `.so' links to major + entries where necessary. These links point to their own + directory; don't run this procedure anywhere else than in + /_u_s_r/_m_a_n. Should resolve all errors noted in _n_e_e_d_s_o[_1-_8] + (see `ckso' above). + +10. mroff + Utilizes the _m_a_n command to _t_r_o_f_f and typeset manual entries. + The `-p' (yes, `-p'!) option is used to produce entries in a + 6x9 inch format, as opposed to the default 8.5x11. Produces + files _m_l_o_g[_1-_8] containing logs of the files that were + processed. _M_r_o_f_f ignores files that contain only a `.so' + line. + +11. pgcnt + Produces files _p_a_g_e_s[_1-_8] containing page counts for each + entry. Also produces _t_o_t_a_l_p_g_s containing totals for each + section and a grand total. The `-p' option should be used to + count pages in the small format (see `mroff' above). Uses + the C program _p_a_g_e_s (compiled from _p_a_g_e_s._c). + +12. prnames + Produces files _n_a_m_e_s[_1-_8] containing the NAME portion of each + entry. + +13. prsynops + Produces files _s_y_n_o_p_s[_1-_8] containing the SYNOPSIS portion of + each entry. A question mark means that the entry has no + SYNOPSIS portion. + +14. tocrc + Regenerates input for Table of Contents and Permuted Index. + Use `tocrc all' to regenerate both from scratch, `tocrc t' to + regenerate both from existing input files _t_o_c_x[_1-_8] in + /_u_s_r/_m_a_n/_t_m_p, or `tocrc [1-8]' to create, in /_u_s_r/_m_a_n/_t_m_p, + the corresponding input file _t_o_c_x[_1-_8]. The `-p' option + should be used when preparing the table of contents and/or + index in the small (6x9 inch) format (this option, if + present, _m_u_s_t be the first argument to `tocrc'). See + description in /_u_s_r/_m_a_n/_R_E_A_D._M_E of the files in + /_u_s_r/_m_a_n/_m_a_n_0. Uses files _b_r_e_a_k and _i_g_n_o_r_e in + /_u_s_r/_m_a_n/_t_o_o_l_s. + +The file ._p_a_r_a_m is described in /_u_s_r/_m_a_n/_R_E_A_D._M_E. The files +_M._f_o_l_i_o and _M._t_a_b_s are self-explanatory. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/share/man/tools/TOOLKIT b/share/man/tools/TOOLKIT new file mode 100644 index 0000000..ac139a1 --- /dev/null +++ b/share/man/tools/TOOLKIT @@ -0,0 +1,198 @@ +This directory contains 14 shell procedures designed to carry out +various verification and regeneration tasks on the UNIX User's +Manual. The outputs of all procedures are left in files in +/_u_s_r/_m_a_n/_t_m_p; `tocrc (see below) also leaves output in +/_u_s_r/_m_a_n/_m_a_n_0. By default, these procedures operate on all 8 +sections of the manual. The options `-s' and `-f' are available +(except in `mgrep' and `tocrc') to restrict the list of sections +and/or files to be used. For example: + + ckspell -s 1 2 3 -f a\* + +will check spelling in all files whose names begin with `a' in +Sections 1-3. Two additional options, `-m' and `-t', can be used +to change the shell procedures' idea of where the manual and its +`tmp' directory reside. For example: + + list -m /usr/aman -t /usr/aman/tmp + +might be meaningful if, for instance, an alternate manual is +located in /_u_s_r/_a_m_a_n. These options are also useful when a new +manual is being built in a secluded place. + +Note that some of the shell procedures produce 8 result files, +one for each section of the manual. In particular, the 4 shell +procedures prefaced with `ck', which perform different types of +verification, produce a unique sorted list for each section, as +opposed to a file-by-file list. This means that one must search +all the files in a section (using `grep', most likely) for +occurrences of a particular string. + +Occasionally, some of these procedures will produce lines of +spurious output. This happens when, for instance, some text +looks like a cross-reference or a file name, e.g., `array(3)' or +`nroff/troff'. + +The following describes these 14 procedures: + +1. ckcrefs + Locates all cross-references to other manual entries and + checks to see whether the referenced pages exist. Produces + files _b_a_d_c_r_e_f[_1-_8] containing all bad cross-references in + each section. Also produces files _l_o_w_e_r._s_u_f[_1-_8], containing + occurrences of lower-case section suffixes, i.e., 1c, 1m, 3c, + which should be changed to upper-case (1C, 1M, 3C, etc.). + +2. ckfrefs + Locates all references in the FILES portion of manual entries + and checks to see whether the referenced files exist in the + running system. Produces files _b_a_d_f_r_e_f[_1-_8] containing + references to non-existent files. Note that file references + under headings other than FILES are _n_o_t checked. Temporary + files will, of course, not be found. + +3. cknames + Performs various checks on the `.TH' line and the NAME + section of entries. Note that the files produced by this + procedure contain the file names of entries that fail the + corresponding check: + + Checks to see that the entry contains a `.SH NAME' + section, producing files _n_o._N_A_M_E[_1-_8]. + + Checks the NAME section of the entry to insure that it is + exactly one line long (multi-line NAMEs will severely + confuse `tocrc'), producing files _n_o_t._o_n_e._l_i_n_e[_1-_8]. + + Checks to see that the entry contains a `.TH' line, + producing files _n_o._T_H[_1-_8]. + + Checks that the entry name and section given on the TH + line match the file name of that entry. For example, a + file containing `.TH GURP 1M' should be called `gurp.1m'. + Produces files _f_i_l_e._m_a_t_c_h[_1-_8]. + + Checks that the first name appearing on the NAME line is + the same as the entry name on the TH line (`ckso' below + assumes that this is always true). Produces files + _n_a_m_e._o_r_d_e_r[_1-_8]. + +4. ckso + This procedure performs two types of verification of _n_r_o_f_f + `.so' pointers in /_u_s_r/_m_a_n/_m_a_n[_1-_8]. It first locates files + that contain only a `.so' reference to a real entry, and + checks to see whether that file (entry) exists. Bad + references are written to the files _b_a_d_s_o[_1-_8]. Secondly, + `ckso' verifies the reverse; it locates each real entry, + looks at the NAME portion to see whether more than one name + appears there, and checks whether a file with a `.so' + reference exists for all such names other than the first. + Missing `.so' entries are written to the files _n_e_e_d_s_o[_1-_8]. + +5. ckspell + Utilizes _s_p_e_l_l to check for spelling errors in manual + entries. Produces file _s_p._e_r_r_s containing a section-by- + section list of errors. Uses file /_u_s_r/_m_a_n/_t_o_o_l_s/_s_p._i_g_n_o_r_e + to eliminate strings that appear often in the manual and are + normally flagged as errors by `spell'. + +6. list + Produces file _l_i_s_t containing a `long' listing with block + counts (`ls -ls') for each section of the manual. + +7. mcmp + Compares two versions of the manual and reports what files + are unique to each and whether or not the common files have + changed. If the `-d' option is given, _d_i_f_f-style listings + are generated for each common file instead. The `-o' option + is used to specify the name of the second manual directory; + /_u_s_r/_n_m_a_n is the default. Produces files _c_m_p[_1-_8] or + _d_i_f_f[_1-_8]. + +8. mgrep + Searches entire manual for the patterns specified as + arguments (i.e., `mgrep "typewriter"'). Produces file _g_r_e_p_s, + containing section-by-section list for each pattern. + +9. mklinks + Creates files containing appropriate `.so' links to major + entries where necessary. These links point to their own + directory; don't run this procedure anywhere else than in + /_u_s_r/_m_a_n. Should resolve all errors noted in _n_e_e_d_s_o[_1-_8] + (see `ckso' above). + +10. mroff + Utilizes the _m_a_n command to _t_r_o_f_f and typeset manual entries. + The `-p' (yes, `-p'!) option is used to produce entries in a + 6x9 inch format, as opposed to the default 8.5x11. Produces + files _m_l_o_g[_1-_8] containing logs of the files that were + processed. _M_r_o_f_f ignores files that contain only a `.so' + line. + +11. pgcnt + Produces files _p_a_g_e_s[_1-_8] containing page counts for each + entry. Also produces _t_o_t_a_l_p_g_s containing totals for each + section and a grand total. The `-p' option should be used to + count pages in the small format (see `mroff' above). Uses + the C program _p_a_g_e_s (compiled from _p_a_g_e_s._c). + +12. prnames + Produces files _n_a_m_e_s[_1-_8] containing the NAME portion of each + entry. + +13. prsynops + Produces files _s_y_n_o_p_s[_1-_8] containing the SYNOPSIS portion of + each entry. A question mark means that the entry has no + SYNOPSIS portion. + +14. tocrc + Regenerates input for Table of Contents and Permuted Index. + Use `tocrc all' to regenerate both from scratch, `tocrc t' to + regenerate both from existing input files _t_o_c_x[_1-_8] in + /_u_s_r/_m_a_n/_t_m_p, or `tocrc [1-8]' to create, in /_u_s_r/_m_a_n/_t_m_p, + the corresponding input file _t_o_c_x[_1-_8]. The `-p' option + should be used when preparing the table of contents and/or + index in the small (6x9 inch) format (this option, if + present, _m_u_s_t be the first argument to `tocrc'). See + description in /_u_s_r/_m_a_n/_R_E_A_D._M_E of the files in + /_u_s_r/_m_a_n/_m_a_n_0. Uses files _b_r_e_a_k and _i_g_n_o_r_e in + /_u_s_r/_m_a_n/_t_o_o_l_s. + +The file ._p_a_r_a_m is described in /_u_s_r/_m_a_n/_R_E_A_D._M_E. The files +_M._f_o_l_i_o and _M._t_a_b_s are self-explanatory. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/share/man/tools/badcref3 b/share/man/tools/badcref3 new file mode 100644 index 0000000..b66e285 --- /dev/null +++ b/share/man/tools/badcref3 @@ -0,0 +1,55 @@ +Thu Jul 28 15:27:15 PDT 1983 + +040(8) +Execve(2) +Fopen(3S) +Fseek(3S) +fIfcntlfP(2) +fIfflushfP(3) +fIsetitimerfP(2) +fIsetrlimitfP(2) +access(3F) +exec(2) +fclose(3s /usr/man/man3/ferror.3s /usr/man/man3/fread.3s /usr/man/man3/fseek.3S) +fclose(3) +fdate(3F) +fflush(3S) +filsys(5) +fopen(3S) +fork(3F) +getchar(3) +getenv(3F) +gethostent(3N) +getnetent(3N) +getprotoent(3N) +getpw(3) +getpwuid(3) +iarray(3) +idate(3F) +itime(3F) +kill(3F) +library(3M) +link(3F) +ltime(3F) +moncontrol(1) +perror(3F) +plot(1) +popen(3S) +printf(3) +rand(3) +rewind(1) +sigmask(2) +signal(2) +signal(3) +signal(3F) +sleep(3F) +stdio(3) +stty(3) +system(3F) +tarray(2) +time(2) +time(3) +time(3F) +times(2) +unlink(3F) +wait(3F) diff --git a/share/man/tools/break b/share/man/tools/break new file mode 100644 index 0000000..4ae5b8c --- /dev/null +++ b/share/man/tools/break @@ -0,0 +1,3 @@ + +; +: diff --git a/share/man/tools/ckcrefs b/share/man/tools/ckcrefs new file mode 100755 index 0000000..295c070 --- /dev/null +++ b/share/man/tools/ckcrefs @@ -0,0 +1,78 @@ +set x $* +. ./.param + +for dir in $DIRLST +do + > $TMPDIR/cref$dir + cd $MANDIR/man$dir + for file in $FILLST + do + so=`line < $file | sed "s/ .*$//"` + if test "$so" = ".so" + then + continue + fi + grep ".*([1-8][cmsgxjvCMSGXJV]*)" $file >> $TMPDIR/cref$dir + done + + cd $TMPDIR + echo " ," >> cref$dir + date > lower.suf$dir + echo >> lower.suf$dir + date > badcref$dir + echo >> badcref$dir + ed - cref$dir >> lower.suf$dir <<! + g/ *\(([1-8][CMSGXJVcmsgxjv]*)\)/s//\1/ + 1,\$s/ /\\ +/g + 1,\$s/ /\\ +/g + 1,\$s/,/\\ +/g + v/(/d + g/\\\\\^/s/// + g/\\\\\|/s/// + g/([1-8][cgmsxjv])/p + g//d + g/^(/d + g/(/s//./ + g/^\./d + g/C).*/s//c/ + g/G).*/s//g/ + g/M).*/s//m/ + g/S).*/s//s/ + g/X).*/s//x/ + g/J).*/s//j/ + g/V).*/s//v/ + g/).*/s/// + w + q +! + sort -i cref$dir | uniq > tmp.$$ + while read cref + do + sect=`echo $cref | sed "s/.*\.\(.\).*/\1/"` + try=`ls $MANDIR/man$sect/$cref 2>&1` + if test "$try" = "$MANDIR/man$sect/$cref" + then + continue + else + echo $try | sed -e "s;$MANDIR/man..;;" -e "s; not found;;" >> badcref$dir + fi + done < tmp.$$ + ed - badcref$dir <<! + g/\.\([1-8]\)/s//(\1/ + g/c$/s//C)/ + g/m$/s//M)/ + g/s$/s//S)/ + g/g$/s//G)/ + g/x$/s//X)/ + g/j$/s//J)/ + g/v$/s//V)/ + g/[^)]$/s/$/)/ + 1s/.$// + w + q +! + rm -f tmp.$$ cref$dir +done diff --git a/share/man/tools/ckfrefs b/share/man/tools/ckfrefs new file mode 100755 index 0000000..5542986 --- /dev/null +++ b/share/man/tools/ckfrefs @@ -0,0 +1,71 @@ +#! /bin/sh +set x $* +. ./.param + +for dir in $DIRLST +do + > $TMPDIR/fref$dir + cd $MANDIR/man$dir + for file in $FILLST + do + so=`line < $file | sed "s/ .*//"` + if test "$so" = ".so" + then + continue + fi + ed - $file >> $TMPDIR/fref$dir <<! + /FILES/ + +,/\.SH/-p + q +! + done + + cd $TMPDIR + date > badfref$dir + echo >> badfref$dir + grep "/" fref$dir > /dev/null + if test $? -eq 1 + then + rm -f fref$dir + continue + fi + echo "\\t ," >> fref$dir + ed - fref$dir <<! + 1,\$s/ /\\ +/g + 1,\$s/ /\\ +/g + 1,\$s/,/\\ +/g + v/\//d + g/:$/s/// + g/\\\\(\*/s///g + g/\\\\s+1/s///g + g/\\\\s-1/s///g + g/\\\\s0/s///g + g/\\\\f./s///g + g/\\\\\*S/s///g + g/\\\\\&/s///g + g/\$\$/s//*/ + g/^?/d + g/^\./d + g/tmp/d + g/spool/d + g/mail/d + g/^[^\/]/d + g/(/d + g/)/d + g/\'/d + g/\`/d + g/\"/d + g/\&/d + g/\|/d + 1,\$s/^/ls / + w + q +! + sort fref$dir | uniq > tmp.$$ + sh tmp.$$ > fref$dir 2>&1 + grep "not found" fref$dir | sed "s/ not found//" >> badfref$dir + rm -f tmp.$$ fref$dir +done diff --git a/share/man/tools/cknames b/share/man/tools/cknames new file mode 100755 index 0000000..f1d018a --- /dev/null +++ b/share/man/tools/cknames @@ -0,0 +1,73 @@ +#! /bin/sh +set x $* +. ./.param + +trap "rm -f $TMPDIR/*$$; exit;" 2 + +for sec in $DIRLST +do + /bin/ls $MANDIR/man$sec > $TMPDIR/man${sec}$$ +done + +for sec in $DIRLST +do + cd $MANDIR/man$sec + dt=`date` + echo "$dt\n" > $TMPDIR/not.one.line$sec + echo "$dt\n" > $TMPDIR/name.order$sec + echo "$dt\n" > $TMPDIR/file.match$sec + echo "$dt\n" > $TMPDIR/no.TH$sec + echo "$dt\n" > $TMPDIR/no.NAME$sec + while read file + do + so=`line < $file | sed "s/ .*$//"` + if test "$so" = ".so" + then + continue + fi + grep "^.SH NAME" $file > /dev/null + if test $? -eq 1 + then + echo $file >> $TMPDIR/no.NAME$sec + continue + fi + grep "^.SH SYNOPSIS" $file > /dev/null + if test $? -eq 0 + then + lines=`cat $file | sed -n "/\.SH NAME/,/\.SH SYNOP/p" | wc -l | sed "s/ //g"` + else + lines=`cat $file | sed -n "/\.SH NAME/,/\.SH DESCR/p" | wc -l | sed "s/ //g"` + fi + if test $lines -gt 3 + then + echo $file >> $TMPDIR/not.one.line$sec + continue + fi + th=`grep "^.TH" $file | line` + if test -z "$th" + then + echo $file >> $TMPDIR/no.TH$sec + continue + fi + set $th + name=`echo $2 | tr [A-Z] [a-z]` + suf=`echo $3 | tr [A-Z] [a-z]` + fname="${name}.$suf" + if test $fname != $file + then + echo $file >> $TMPDIR/file.match$sec + fi + ed - $file > $TMPDIR/tmp.$$ <<! + /^.SH NAME/+p + q +! + nname=`cat $TMPDIR/tmp.$$ | sed -e "s/ .*//" -e "s/,.*//"` + rm -f $TMPDIR/tmp.$$ + if test $name != $nname + then + echo $file >> $TMPDIR/name.order$sec + fi + done < $TMPDIR/man${sec}$$ +done + +rm -f $TMPDIR/*$$ diff --git a/share/man/tools/ckso b/share/man/tools/ckso new file mode 100755 index 0000000..dde9d55 --- /dev/null +++ b/share/man/tools/ckso @@ -0,0 +1,46 @@ +#! /bin/sh +set x $* +. ./.param + +for dir in $DIRLST +do + > $TMPDIR/tmp.$$ + date > $TMPDIR/badso$dir + echo >> $TMPDIR/badso$dir + date > $TMPDIR/needso$dir + echo >> $TMPDIR/needso$dir + cd $MANDIR/man$dir + for file in $FILLST + do + ln=`line < $file` + so=`echo $ln | sed "s/ .*//"` + if test "$so" = ".so" + then + so=`echo $ln | sed -e "s/.so//" -e "s/^/ls/"` + echo $so >> $TMPDIR/tmp.$$ + else + ed - $file > $TMPDIR/tmp2.$$ <<! + /^\.SH NAME/+s/ .-.*//p + q +! + name=`line < $TMPDIR/tmp2.$$` + echo $name | grep "," > /dev/null + if test $? -eq 0 + then + name=`echo $name | sed "s/,/ /g"` + for ent in $name + do + if test $ent = `echo $file | sed "s/\..*//"` + then + continue + fi + ls $MANDIR/man$dir/$ent.* 2>&1 | grep "not found" >> $TMPDIR/needso$dir + done + fi + fi + done + + cd $TMPDIR + sh tmp.$$ 2>&1 | grep "not found" >> badso$dir + rm -f tmp.$$ tmp2.$$ +done diff --git a/share/man/tools/ckspell b/share/man/tools/ckspell new file mode 100755 index 0000000..8a96584 --- /dev/null +++ b/share/man/tools/ckspell @@ -0,0 +1,23 @@ +#! /bin/sh +set x $* +. ./.param + +TOOLS=$MANDIR/tools + +date > $TMPDIR/sp.errs +echo >> $TMPDIR/sp.errs + +for dir in $DIRLST +do + cd $MANDIR/man$dir + echo "cat <<'EOF' >----------------" >> $TMPDIR/sp.errs + echo "Section $dir" >> $TMPDIR/sp.errs + for file in $FILLST + do + spell $file >> $TMPDIR/tmp.$$ + done + sort $TMPDIR/tmp.$$ | uniq | comm -23 - $TOOLS/sp.ignore >> $TMPDIR/sp.errs + > $TMPDIR/tmp.$$ +done + +rm -f $TMPDIR/tmp.$$ diff --git a/share/man/tools/ignore b/share/man/tools/ignore new file mode 100755 index 0000000..f666d78 --- /dev/null +++ b/share/man/tools/ignore @@ -0,0 +1,891 @@ +& +&. ++ ++. +- +-. +0 +0. +1 +1. +1.0 +1.0. +1.1 +1.1. +10 +10. +2 +2. +3 +3. +4 +4. +5 +5. +6 +6. +7 +7. +8 +8. +9 +9. +; +A. +B. +C. +D. +E. +F. +G. +H. +I. +J. +K. +L. +M. +MERT +MERT. +N. +O. +P. +Q. +S. +T. +U. +UNIX +UNIX. +UNIX/RT +UNIX/RT. +UNIX/TS +UNIX/TS. +V. +W. +X. +Y. +Z. +\s +\s-1 +\s-1. +\s-2 +\s-2. +\s. +\s0 +\s0. +a +a. +about +about. +above +above. +across +across. +act +act. +action +action. +actions +actions. +after +after. +again +again. +against +against. +ago +ago. +air +air. +al. +all +all. +almost +almost. +along +along. +already +already. +also +also. +although +although. +always +always. +american +american. +among +among. +an +an. +and +and. +another +another. +any +any. +anything +anything. +are +are. +area +area. +areas +areas. +around +around. +asked +asked. +at +at. +available +available. +away +away. +be +be. +became +became. +because +because. +become +become. +been +been. +before +before. +began +began. +behind +behind. +being +being. +best +best. +better +better. +between +between. +big +big. +board +board. +boards +boards. +bodies +bodies. +body +body. +both +both. +boy +boy. +boys +boys. +brought +brought. +business +business. +businesses +businesses. +but +but. +by +by. +called +called. +came +came. +can +can. +cannot +cannot. +car +car. +cars +cars. +case +case. +cases +cases. +certain +certain. +change +change. +changes +changes. +come +come. +could +could. +course +course. +courses +courses. +day +day. +days +days. +development +development. +did +did. +didn't +didn't. +different +different. +do +do. +does +does. +don't +don't. +done +done. +door +door. +down +down. +during +during. +each +each. +early +early. +economic +economic. +either +either. +end. +ends +ends. +enough +enough. +even +even. +ever +ever. +every +every. +example +example. +examples +examples. +experience +experience. +eyes +eyes. +face +face. +facilities +facilities. +facility +facility. +fact +fact. +facts +facts. +families +families. +family +family. +far +far. +federal +federal. +feet +feet. +felt +felt. +few +few. +field +field. +fields +fields. +first +first. +five +five. +for +for. +force +force. +forces +forces. +found +found. +four +four. +free. +gave +gave. +general +general. +get. +give +give. +given +given. +go +go. +going +going. +good +good. +got +got. +government +government. +great +great. +had +had. +half +half. +hand +hand. +hands +hands. +has +has. +have +have. +having +having. +he +he. +head +head. +heads +heads. +heard +heard. +held +held. +her +her. +here +here. +high +high. +him +him. +himself +himself. +his +his. +history +history. +house +house. +houses +houses. +how +how. +however +however. +human +human. +i +i'm +i'm. +i. +if +if. +important +important. +in +in. +individual +individual. +information +information. +interest +interest. +into +into. +is +is. +it +it's +it's. +it. +its +its. +itself +itself. +job +job. +jobs +jobs. +just +just. +keep +keep. +kind +kind. +knew +knew. +know +know. +known +known. +large +large. +last +last. +later +later. +law +law. +least +least. +left +left. +less +less. +let +let. +life +life. +light +light. +like +like. +little +little. +local +local. +look +look. +looked +looked. +made +made. +major +major. +making +making. +many +many. +matter +matter. +matters +matters. +may +may. +me +me. +means +means. +member +member. +members +members. +men +men. +might +might. +mind +mind. +miscellaneous +miscellaneous. +miscellany +miscellany. +miss +miss. +moment +moment. +money +money. +more +more. +most +most. +mr +mr. +mrs +mrs. +much +much. +must +must. +my +my. +name +name. +names +names. +national +national. +need +need. +needs +needs. +never +never. +new +new. +next +next. +night +night. +no +no. +not +not. +nothing +nothing. +now +now. +number +number. +numbers +numbers. +of +of. +off +off. +office +office. +often +often. +old +old. +on +on. +once +once. +one +one. +only +only. +or +or. +order +order. +orders +orders. +other +other. +others +others. +our +our. +out +out. +over +over. +own +own. +part +part. +parts +parts. +past +past. +people +people. +per +per. +perhaps +perhaps. +period +period. +periods +periods. +place +place. +point +point. +points +points. +political +political. +position +position. +positions +positions. +possible +possible. +power +power. +present +present. +probably +probably. +problem +problem. +problems +problems. +procedure +procedure. +procedures +procedures. +program +program. +programs +programs. +public +public. +put +put. +question +question. +quite +quite. +rather +rather. +real +real. +really +really. +reason +reason. +result +result. +results +results. +right +right. +room +room. +said +said. +same +same. +saw +saw. +say +say. +school +school. +schools +schools. +second +second. +see +see. +seemed +seemed. +seems +seems. +seen +seen. +sense +sense. +service +service. +services +services. +set +set. +several +several. +shall +shall. +she +she. +should +should. +show +show. +side +side. +since +since. +small +small. +so +so. +social +social. +society +society. +some +some. +something +something. +special +special. +state +state. +states +states. +still +still. +street +street. +study +study. +such +such. +sure +sure. +system +system. +systems +systems. +taken +taken. +than +than. +that +that. +the +the. +their +their. +them +them. +themselves +themselves. +then +then. +there +there. +these +these. +they +they. +thing +thing. +things +things. +think +think. +this +this. +those +those. +though +though. +thought +thought. +three +three. +through +through. +thus +thus. +to +to. +today +today. +together +together. +told +told. +too +too. +took +took. +toward +toward. +towards +towards. +turn +turn. +turned +turned. +turns +turns. +two +two. +under +under. +united +united. +until +until. +up +up. +upon +upon. +us +us. +use +use. +used +used. +very +very. +want +want. +war +war. +wars +wars. +was +was. +water +water. +waters +waters. +way +way. +ways +ways. +we +we. +week +week. +weeks +weeks. +well +well. +went +went. +were +were. +what. +when +when. +where +where. +whether +whether. +which +which. +while +while. +white +white. +whole +whole. +whose +whose. +why +why. +will +will. +with +with. +within +within. +without +without. +word +word. +words +words. +work +work. +world +world. +would +would. +year +year. +years +years. +yet +yet. +york +york. +you +you. +young +young. +your +your. diff --git a/share/man/tools/line.c b/share/man/tools/line.c new file mode 100644 index 0000000..b395e1a --- /dev/null +++ b/share/man/tools/line.c @@ -0,0 +1,43 @@ +/* @(#)line.c 1.1 */ +/* + This program reads a single line from the standard input + and writes it on the standard output. It is probably most useful + in conjunction with the Bourne shell. +*/ +#define LSIZE 512 +int EOF; +char nl = '\n'; +main() +{ + register char c; + char line[LSIZE]; + register char *linep, *linend; + +EOF = 0; +linep = line; +linend = line + LSIZE; + +while ((c = readc()) != nl) + { + if (linep == linend) + { + write (1, line, LSIZE); + linep = line; + } + *linep++ = c; + } +write (1, line, linep-line); +write(1,&nl,1); +if (EOF == 1) exit(1); +exit (0); +} +readc() +{ + char c; +if (read (0, &c, 1) != 1) { + EOF = 1; + return(nl); + } +else + return (c); +} diff --git a/share/man/tools/list b/share/man/tools/list new file mode 100755 index 0000000..937e874 --- /dev/null +++ b/share/man/tools/list @@ -0,0 +1,13 @@ +set x $* +. ./.param + +date > $TMPDIR/list +echo >> $TMPDIR/list + +for dir in $DIRLST +do + cd $MANDIR/man$dir + echo "cat <<'EOF' >----------" >> $TMPDIR/list + echo "Section $dir" >> $TMPDIR/list + ls -ldas .* $FILLST >> $TMPDIR/list +done diff --git a/share/man/tools/mcmp b/share/man/tools/mcmp new file mode 100755 index 0000000..4a4c11d --- /dev/null +++ b/share/man/tools/mcmp @@ -0,0 +1,76 @@ +set x $* +. ./.param + +if test -z "$ID" +then + DIR2=/usr/nman +else + DIR2=$ID +fi + +if test ! -d $DIR2 +then + echo "mcmp: $DIR2 - not a directory" + exit +fi + +for dir in $DIRLST +do + date > $TMPDIR/tmp3.$$ + echo >> $TMPDIR/tmp3.$$ + cd $MANDIR/man$dir + echo "Comparison of $MANDIR/man$dir and $DIR2/man$dir:">>$TMPDIR/tmp3.$$ + echo >> $TMPDIR/tmp3.$$ + ls $FILLST > $TMPDIR/tmp1.$$ + cd $DIR2/man$dir + ls $FILLST > $TMPDIR/tmp2.$$ + cd $MANDIR/man$dir + echo "Files found in $MANDIR/man$dir only:" >> $TMPDIR/tmp3.$$ + comm -23 $TMPDIR/tmp1.$$ $TMPDIR/tmp2.$$ | sed "s/^/ /" >> $TMPDIR/tmp3.$$ + echo >> $TMPDIR/tmp3.$$ + echo "Files found in $DIR2/man$dir only:" >> $TMPDIR/tmp3.$$ + comm -13 $TMPDIR/tmp1.$$ $TMPDIR/tmp2.$$ | sed "s/^/ /" >> $TMPDIR/tmp3.$$ + echo >> $TMPDIR/tmp3.$$ + comm -12 $TMPDIR/tmp1.$$ $TMPDIR/tmp2.$$ > $TMPDIR/tmp.$$ + rm -f $TMPDIR/tmp1.$$ $TMPDIR/tmp2.$$ + if [ ! -s $TMPDIR/tmp.$$ ] + then + echo "No common files for comparison" >> $TMPDIR/tmp3.$$ + if [ -n "$LFLAG" ] + then + mv $TMPDIR/tmp3.$$ $TMPDIR/diff$dir + else + mv $TMPDIR/tmp3.$$ $TMPDIR/cmp$dir + fi + continue + fi + if [ -n "$LFLAG" ] + then + mv $TMPDIR/tmp3.$$ $TMPDIR/diff$dir + echo "Diffs of common files ($MANDIR=< $DIR2=>):" >> $TMPDIR/diff$dir + else + mv $TMPDIR/tmp3.$$ $TMPDIR/cmp$dir + echo "Files that differ:" >> $TMPDIR/cmp$dir + fi + while read file + do + if [ -z "$LFLAG" ] + then + cmp -s $file $DIR2/man$dir/$file + if [ $? -ne 0 ] + then + echo "\\t$file" >> $TMPDIR/cmp$dir + fi + else + diff $file $DIR2/man$dir/$file > $TMPDIR/tmp1.$$ + if [ $? -eq 1 ] + then + echo "\\n\\t****$file****" >> $TMPDIR/diff$dir + cat $TMPDIR/tmp1.$$ >> $TMPDIR/diff$dir + fi + fi + done < $TMPDIR/tmp.$$ + rm -f $TMPDIR/tmp1.$$ +done + +rm -f $TMPDIR/tmp.$$ diff --git a/share/man/tools/mgrep b/share/man/tools/mgrep new file mode 100755 index 0000000..57dbc54 --- /dev/null +++ b/share/man/tools/mgrep @@ -0,0 +1,19 @@ +MANDIR=/usr/man +TMPDIR=/usr/man/tmp + +date > $TMPDIR/greps +echo "Grep list: $*" >> $TMPDIR/greps +echo >> $TMPDIR/greps + +for pattern in $* +do + echo "\n================" >> $TMPDIR/greps + echo "$pattern:" >> $TMPDIR/greps + for dir in 1 2 3 4 5 6 7 8 + do + cd $MANDIR/man$dir + echo "cat <<'EOF' >---------------" >> $TMPDIR/greps + echo "Section $dir" >> $TMPDIR/greps + grep $pattern *.* >> $TMPDIR/greps + done +done diff --git a/share/man/tools/missing b/share/man/tools/missing new file mode 100644 index 0000000..b94a8e7 --- /dev/null +++ b/share/man/tools/missing @@ -0,0 +1,3 @@ +vadvise(2) +vplot(1) +vsort(1) diff --git a/share/man/tools/mklinks b/share/man/tools/mklinks new file mode 100644 index 0000000..3f7fb7c --- /dev/null +++ b/share/man/tools/mklinks @@ -0,0 +1,42 @@ +set x $* +. ./.param + +for dir in $DIRLST +do + cd $MANDIR/man$dir + for file in $FILLST + do + so=`line < $file | sed "s/ .*//"` + if test "$so" = ".so" + then + continue + else + ed - $file > $TMPDIR/tmp.$$ <<! + /^\.SH NAME/+s/ .-.*//p + q +! + name=`line < $TMPDIR/tmp.$$` + echo $name | grep "," > /dev/null + if test $? -eq 0 + then + name=`echo $name | sed "s/,/ /g"` + for ent in $name + do + if test $ent = `echo $file | sed "s/\..*//"` + then + continue + fi + suf=`echo $file | sed "s/.*\.\(.\{1,2\}\)\$/\1/"` + if test ! -f $ent.$suf + then + cat > $ent.$suf <<! +.so $MANDIR/man$dir/$file +! + fi + done + fi + fi + done + + rm -f tmp.$$ +done diff --git a/share/man/tools/mroff b/share/man/tools/mroff new file mode 100755 index 0000000..f2f071f --- /dev/null +++ b/share/man/tools/mroff @@ -0,0 +1,26 @@ +set x $* +. ./.param + +for dir in $DIRLST +do + date > $TMPDIR/mlog$dir + echo >> $TMPDIR/mlog$dir + cd $MANDIR/man$dir + for file in $FILLST + do + so=`line < $file | sed "s/ .*//"` + if test "$so" = ".so" + then + echo "$file: .so link -- ignored" >> $TMPDIR/mlog$dir + continue + fi + echo "$file:" >> $TMPDIR/mlog$dir + file=`echo $file | sed "s/\..\{1,2\}\$//"` + if test -z "$PFLAG" + then + man -t $dir $file + else + man -s $dir $file + fi + done +done diff --git a/share/man/tools/newsp.errs b/share/man/tools/newsp.errs new file mode 100644 index 0000000..2cde891 --- /dev/null +++ b/share/man/tools/newsp.errs @@ -0,0 +1,4572 @@ +Fri Jul 29 00:07:08 PDT 1983 + +cat <<'EOF' >---------------- +Section 1 +1ic +4.2bsd +ACSII +ADDBIB +ADDR +ANOM +AP +ARGSUSED +ARPANET +ATD +Aahimnrs +Addbib +Afile +Aho +Allman +Arg +Asa +BFatuwvx +BIFF +BS.ES +BSS +Babaoglu +Backslashes +Backus +Bedminster +Berkman +Berknet +Bernardsville +Bfile +Biff +Bizcomp +Bourne +Branchburg +Breedlove +CFLAGS +CK +CONT +CPU +CRT's +CRTERASE +CRTKILL +CTRL +Cbs +Cfoo +Changequote +Colin +Corfil +Cory +Cpu +DASI +DB +DBX +DEC's +DECtape +DVI +Dbx +Delimeters +Diablo +Dstring +EBCDIC +EECS +EOF +ESC +FFLAGS +FILENAME +FP +FPR +FSPLIT +FTP +Ferrin +File1 +Filename +Foderaro +Fortran77 +Fp +Fpr +Fsplit +Ftp +GCORE +GID +GPROF +GSI +GT +Gallager +Gcore +HOSTID +HOSTNAME +HUP +Hazeltine +Hertzfeld +Hostnames +Hyterm +I.E.E.E +IDs +IM +Ignoreeof +Ind +Indxbib +Katseff +Kernighan +Keypad +Kleckner +Kulp +L6i +LCK +LE +LFLAGS +LIM +LINTLIBRARY +LOGFILE +LR +LT +Larus +Laxenburg +Lesk +Levinsky +Llopart +MACLISP +MFLAGS +MOS +MT +Mail.help +Mail.rc +Makefile +McKusick +Mt +N.B +NETSTAT +NEWALIASES +NNN +NOSTRICT +NOTREACHED +NUL +Newaliases +Newline +Newlines +Niklaus +Nohup +Nowitz +O1i +OED +OFMT +OFS +Objfil +Orderlist +Ossanna +Ozalp +PAGEIN +PAGESIZE +PDP +PDX +PFLAGS +PID +PMERGE +PPID +PRI +Pagesize +Pathname +Pdx +Pelegri +Plauger +Pmerge +Pos1 +Pprinter +Pre +Presotto +Procs +RCP +RCS +RCVD +RLOGIN +RMAIL +ROFFBIB +RSH +RSS +RUBOUT +RUPTIME +RWHO +RWNA +Racal +Rankine +Rcp +Reiser +Retargetted +Rlogin +Rmail +Roffbib +Romberger +Rowan +Rsh +Rubout +Runtime +Ruptime +SANOM +SBM +SCCS +SDETACH +SDLYU +SENDBUG +SEQL +SIG +SIGALRM +SIGCHILD +SIGCONT +SIGINT +SIGKILL +SIGPLAN +SIGQUIT +SIGTERM +SIGTINT +SKEEP +SL +SLOAD +SLOCK +SNOVM +SORTBIB +SOUSIG +SPAGE +SPAGI +SPHYSIO +SSIZ +SSWAP +SSYS +STIMO +STRC +SUANOM +SULOCK +SVFDONE +SVFORK +SWEXIT +SWTED +SYMDEF +SYSLINE +Schriebman +Sendbug +Shenaut +Shienbrood +Shoens +Sklower +Sname +Sortbib +Spellin +Spellout +Stangenberger +Studsworth +Substitition +Symbolfile +TELNET +TENEX +TRS +TSIZ +TW +TalkDaemon +Televideo +Televideos +Telnet +Temp +TermiNet +Tuthill +Twp +UCB +UCI +UID +UNX +Uudecode +VARARGS +VAX +VLP +VMS +VWIDTH +Vadic +Ventel +Versatec +Vfontedpr +Vlp +Vol +Vwidth +WCHAN +Wasley +Wirth +XXXXX +YFLAGS +ZZ +a.out +aN +aa +abchnpuvx +abcissas +abe +abi +acdefjnstuw +acdfgilqrstu1ACLFR +acegklstuvwx +ack +acu +addbib +addr +ade +adm3a +afile +allboxed +alloc +alt +analyis +annoation +arg +arg1 +arg1,arg2 +arg2 +argc +argn +args +argv +arpanet +arpanet:dm2500 +arpanet:type +ascii,lcase +askcc +atime +atm +atrun +autoindent +autoprint +avm +ba +backslash +backslashes +backtrace +bar.c +baudrate +bcdehDilmpqrsj +bdf +beginproc +belgiumfranc +betwee +bfx +bg +biblio +biff +bio.c +bl +blah +blkdtaNNN.f +blnpstuwz +bocklin +bocklin.14 +bool +bpi +br +breaksw +brgallon +britainpound +bs0 +bs1 +bsf +bsr +buf +bugformat +bx +cat.c +cbreak +cbs +cccc +ccol +ccom +cdflsu +cdpath +cds +cef +cefh +ceiknrstuvx +centimeters +centre +changequote +checkeq +chmach +cifplot +cleardot +cleartext +cmd +cnnn +colour +comsat +concept100 +cond +cont +coredump +coredumpsize +corfil +cpile +cpu +cputime +cr0 +cr1 +cr2 +cr3 +crmod +crt +crt's +crt0.o +crtbs +crterase +crtkill +cryptosystem +csh's +cshrc +csw +ctlecho +ctm +cu'd +cwd +cypher +dB +daemon +daemon's +daemons +dan +datasize +dbx +dead.letter +dec +decctlq +december +def +delim +dequeue +deriv +dialog +dialtimeout +dialup +dialup:concept100 +dialup:dw2 +dialup:h19 +dialup:type +dialups +dict +diction,explain +dir1 +dir2 +ditroff +divnum +dj +dmr +dnl +dnnn +doc +doc,man +doc.n +doit +dotdot +dp +drqtpmx +ds +dsa +dsusp +dumpdef +dw2 +e.g +ebcdic +echocheck +edhup +effectors +efil +efile +efilname +eign +ek +eknptuvx +elif +emacs +endcol +endif +endnotes +endsw +eof +eofr +eofread +eofw +eofwrite +eol +eq +errorrc +errprint +es +esac +etx +etxack +eval +ex3 +ex?.?preserve +ex?.?recover +ex?.?strings +expr2 +exrc +ext +exta +extb +extern +exum2.n +exum?.n +fFresc +fasl'ed +ff0 +ff1 +fg +fhlpq +fi +fi.diff +file.C +file.c +file.i +file.o +file.p +filenames +filesize +fillin +flags&onum +flusho +fo +fontfile +fontinfo +fontname +foo +foo.c +foo.l +foreach +formatted +formatter +formfeed +formfeeds +fp +fpr +fpr.tbl +fr +framesize +franz +fre +from';echo +fromdir +fsf +fsplit +fsr +fstab +ft +ftp +func +ga +gcore +gcos +gcrt0.o +ge +gethostid +gethostname +getpagesize +getwd +gfont +gmon.out +gmon.sum +gname +gnopru +goto +goto's +gotos +gprof +graphy +grok +gsize +gt +hangup +hangups +hardcopy +hardwired +hashstat +hh +hhhh +hhmm +histchars +hlist +hlista +hookey +host.port +host.user +host:user +hostid +hostname +hosts.equiv +hstop +huckfinn +hushlogin +i.e +ia +ib +ibase +ibm +ibs +ic +ident +identifer +ier +ifdef +ifdefs +ifelse +iff +ig +ignoreeof +ignorefile +ignorelevel +incl +incr +indent.pro +index'th +indxbib +inet +inf +inline +inodes +inr +inrt +instvVxX +intr +intrup +intuit +intuited +inum +inv +ise +jan +jkf +joe +keypad +kridle +l.m +lastlog +lasttimedone +lbc +lc +lc.ln +lcase +lcd +lcol +lcsh +le +len +lex.yy.c +lexcommands +lfoo.ln +lg +lhost +lib,bin,ucb,old,new,local +lib.b +libF77 +libF77.a +libI77 +libI77.a +libU77 +libU77.a +libc.a +libm.a +libpc.a +lightyear +lim +linefeed +linenumber +lispfile +liszt.1 +litout +llib +lnext +localfile +loginname +logout +lpc +lpile +ls.c +lsh +lstat +lt +lwc +lxref.1,v +lyx +m,n +mac +machacks.l +magtapes +mailaddr +mailrc +mainNNN.f +majorfont +makefile +makefiles +maketemp +man1 +matchop +mbox +mcleanup +mcount +mcrt0.o +mdelete +mdir +mdmbuf +mds +messagefile +meta +metoo +mget +mic +michael +minorfont +mkey +ml +mls +mm:ss +mon.out +mon.sum +more.c +more.help +morefiles +motd +mpqruwxCQST +mput +msgsrc +mt +mtime +mtio +mtu +mubdf +mubdfinrt +mumble.p +mumble.p:17 +mutliple +myhlist +n1,n2 +n3,n4 +na +name.c +name.f +name.i +name.o +name.p +name.pointsize +name.size +name1 +name2 +namelist +nameofhost +nbc +nbytes +ndj +netrc +netstat +network.port +new.p +newaliases +newcrt +newline +newlines +newps +nexti +nl +nl0 +nl1 +nl2 +nl3 +nlambda +nnn +nnnnn +noclobber +noecho +noerror +noerror,sync +noglob +nohang +nohup'ed +nohup.out +nologin +nonie +nonomatch +nosave +nr +numcols +nv +obase +obj +objfil +objfile +obs +occom +ocpp +offline +ok +old.p +oldcsh +oldls,ls +oldls.c +oldps +oldwrite.c +onetrip +onintr +onum +oo +oops +op +orderlist +otherhost +otherremotefile +ozalp +pagesize +parens +pascal +pathnames +paul +paula +pdx +pdxinit +pendin +perm +pfile +pg +pgm +photoypesetter +pid +pistrings +pla10 +playpen +pltndgvcfrmhs +plugboard +plugboard:?adm3a +plugboard:type +pmerge +pmon.out +pointsize +popd +port.ln +pos1 +pos2 +posname +pr's +pre +preceed +preceeded +pred1 +pred2 +pred3 +prev +printcap +proc.h +processid +prog +prog.f +promptfile +proto +prterase +ptmp +pushd +pushdown +pwba +qxscn +ra +railmag +raisechar +rc.local +rcol +rcp +rd +readit +readlink +readonly +readtable +rec +recipt +recv +refcnt +reformatted +remotefile +remotehelp +repeat...until +resp +rewoffl +rfile +rhost +rhost.rname +rhost:path +rhosts +rlogin +rlogind +rmail +rmt +rmt0 +rmt12 +rmt8 +rname +roffbib +roman +rp0a +rpile +rprnt +ruptime +rwho +rwhod +s1s2 +sA +savehist +sbm +sc +screenful +screenfuls +sd +se +secretmail +securetty +sendbug +sendmail +sendport +setdot +setenv +setgroups +sethostid +sethostname +setitimer +setpriority +setrlimit +sfile +shutdownlog +sidebyside +sig +signal.h +sigvec +sinclude +sn +somefile +sortbib +sourcefile +sourceing +sp +spb +spellhist +spellin +spellout +spf +src +ss +stacksize +standardise +standout +startcol +stepi +stm +stopi +str +str1 +string1 +string2 +su'd +substr +suffixlist +supresses +susp +switch:?vt100 +sym +symbolfile +symdef +symlink +symref +sys1 +sys2 +syscall.l +syscmd +sysline +sysline.1 +syslinelock +tHouseholds +tNumber +tSize +ta +tab0 +tab1 +tab1,tab2,...,tabn +tab2 +tab3 +tabexpand +tabstop +tabstops +tapename +tco +td0 +tek +telnet +tenex +terminfo +tex +th +thier +ti700 +tip.record +tiprc +title1 +title2 +tmac +tmac.bib +tmac.s +tmac.vcat +tmac.vgrind +tn300 +todir +toplevel.l +toplines +tostop +tracct +trace.l +traceback +tracei +tranmission +transfered +translit +travelled +troff'ed +trpt +tty0 +tty3 +tty33 +tty37 +ttyd0 +tvfn +typeahead +typedefs +typename +ua +ucase +ucb +ucbcory +ucifnc.l +udc +ugo +um +undef +unsetenv +usd +username +usg +uudecode +uuencode,uudecode +vE +vS +var +vcat +vd +vec +ver +versatec's +vfontedpr +vgrindefs +vh +vide +vk +vlp +vlpmacs +vmcore +vmunix +vol +vpd +vpf +vplot +vrast +vs +vsort +vt05 +vuaibclo +vwidth +weof +werase +wfile +wg +whod +wildcard +wildcards +windowfuls +wline +wordlist +wrapmargin +wri +write.c +x.c +x1.x2.x3 +x1.y1.x2.y2 +xit +xn +xn.yn +xs.c +xs.o +xx +xxx +xy +y.output +y.tab.c +y.tab.h +yacc.acts +yacc.tmp +yaccpar +yourname +yoursystem +yourttyname +yy +yy.ddd.hhhh +yyerror +yylex +yymmddhhmm +yyparse +yytext +zzzNNN.f +cat <<'EOF' >---------------- +Section 2 +ARG +ASKNAME +AUTOBOOT +Addr +Arg +Bpt +Buf +CHROOT +CPU +Chme +Chms +Chmu +Chroot +Cmd +DARPA +DECOVF +DFL +DGRAM +DONTLINGER +DONTROUTE +DOWARN +DUPFD +Dirname +E2BIG +EACCESS +EADDRINUSE +EADDRNOTAVAIL +EAFNOSUPPORT +EALREADY +ECONNABORTED +ECONNREFUSED +ECONNRESET +EDESTADDRREQ +EINPROGRESS +EISCONN +ELOOP +EMSGSIZE +ENAMETOOLONG +ENETDOWN +ENETRESET +ENETUNREACH +ENOBUFS +ENOPROTOOPT +ENOTCONN +ENOTEMPTY +ENOTSOCK +EOPNOSUPPORT +EOPNOTSUPP +EPFNOSUPPORT +EPROTONOSUPPORT +EPROTOTYPE +ESHUTDOWN +ESOCKTNOSUPPORT +ETIMEDOUT +EUSERS +EWOULDBLOCK +EXCL +Envp +FASYNC +FCNTL +FILENAME +FLTDIV +FLTOVF +FLTUND +FPE +FSIZE +FSYNC +Fchmod +Fchown +Fcntl +Fd +Febuary +Fromlen +Fstat +Fsync +Ftruncate +GETDLIM +GETDTABLESIZE +GETFD +GETFL +GETGID +GETGROUPS +GETHOSTID +GETHOSTNAME +GETITIMER +GETOWN +GETPAGESIZE +GETPEERNAME +GETPRIORITY +GETRLIMIT +GETRUSAGE +GETSOCKNAME +GETSOCKOPT +GETTIMEOFDAY +Getgid +Getgroups +Gethostid +Gethostname +Getpagesize +Getpeername +Getppid +Getpriority +Getrusage +Getsockname +Getsockopt +Gettimeofday +Howto +ID's +IDs +IEXEC +IFBLK +IFCHR +IFDIR +IFLNK +IFMT +IFREG +IFSOCK +IGN +IMPLINK +INCR +INET +INTDIV +INTOVF +IREAD +ISGID +ISUID +ISVTX +ITIMER +IWRITE +Iovcnt +KEEPALIVE +Lstat +MSG +NDELAY +NGRPS +NODEV +Name1 +Name2 +OOB +Oldd +Optname +PATHNAME +PGRP +PKTSTREAM +PRIO +PRIVIN +PROC +PSL +Prio +RDM +RDONLY +RDWR +READLINK +RECV +REUSEADDR +RLIMIT +RSS +RUSAGE +Readlink +Readv +Recv +SEQPACKET +SETDLIM +SETDUSE +SETFD +SETFL +SETGROUPS +SETOWN +SETQUOTA +SETREGID +SETREUID +SETWARN +SIG +SIGALRM +SIGBLOCK +SIGBUS +SIGCHLD +SIGCONT +SIGEMT +SIGFPE +SIGHUP +SIGILL +SIGINT +SIGIO +SIGIOT +SIGKILL +SIGPAUSE +SIGPIPE +SIGPROF +SIGQUIT +SIGSEGV +SIGSETMASK +SIGSTACK +SIGSTOP +SIGTERM +SIGTRAP +SIGTSTP +SIGTTIN +SIGTTOU +SIGURG +SIGVEC +SIGVTALRM +SIGXCPU +SIGXFSZ +SOCKETPAIR +SOF +SUBRNG +SYMLINK +SYSCALL +Sbrk +Scp +Setgroups +Sethostid +Sethostname +Setquota +Setsockopt +Sig +Sigblock +Sigmask +Sigpause +Sigsetmask +Sigstack +Sigvec +Syscall +TCP +TIOCGPGRP +TIOCSPGRP +TRUNC +Timerclear +Tvp +UDP +UID +Umount +Unpriviledged +VAX +WNOHANG +WRONLY +WUNTRACED +Writev +XTND +a.out +accrights +accrightslen +addr +addrlen +af +arg +argc +argp +argv +atime +blksize +blocksize +bootstrapped +buf +bufsiz +cacheing +caddr +checkquota +cmd +cpu +daemon +datagram +datagrams +dialup +dqblk +dqusage +dqwarn +ds +dst +dsttime +dup2 +egid +envp +errno.h +euid +exec'd +execptfds +facilitity +fchmod +fchown +fcntl.h +fd +file.h +foo +fromlen +fsync +ftruncate +getdtablesize +getgroup +getgroups +gethostid +gethostname +getitimer +getpagesize +getpeername +getpriority +getprotoent +getrlimit +getrusage +getsockname +getsockopt +gettimeofday +gidset +gprof +hangup +hostid +howto +idrss +inblock +incr +ing +initgroups +initilized +ino +inode's +instr +ioctl.h +iov +iovcnt +iovec +ioveclen +iovlen +ipc +isrss +itimerval +ixrss +keepalives +len +lstat +majflt +max +maxrss +messags +minflt +minuteswest +msg +msghdr +msglen +msgrcv +msgsnd +mtime +name1 +name2 +namelen +nbytes +nds +newd +nfds +ngroups +nivcsw +nlink +ns +nsignals +nswap +numask +nvcsw +occurance +occured +occurence +oldd +onstack +ops +optlen +optname +optval +oss +oublock +oumask +ovalue +ovec +pagesize +param.h +pathnames +pc's +pdp +pgrp +pid +pos +ppid +prgp +prio +priviledged +psl +quota.h +quotacheck +quotaon +rdev +readfds +readlink +readv +reboot.h +recv +recvfrom +recvmsg +res +resource.h +resp +rgid +rlim +rlimit +rlp +ru +ruid +rusage +rwflag +scp +sendmsg +sendto +setgroups +sethostid +sethostname +setitimer +setpriority +setquota +setregid +setreuid +setrlimit +setsockopt +settimeofday +sig +sigblock +sigcontext +sigmask +signal.h +signalling +sigpause +sigsetmask +sigstack +sigvec +sockaddr +socket.h +socketpair +someway +sp +spare1 +spare2 +spare3 +spare4 +ss +st +stat.h +sv +symlink +th +time.h +timercmp +timerisset +timeval +timezone +tolen +tvp +types.h +tzp +uio.h +usec +vec +vmunix +wait.h +writefds +writen +writev +zero'd +cat <<'EOF' >---------------- +Section 3 +Acos +Alloca +Alphasort +Arg +Argv +Asctime +Asin +Atan +Atan2 +Atoi +BSD +BSTRING +BUFSIZ +BYTEORDER +Bcmp +Bcopy +Bp +Bpt +Bzero +CBREAK +CPU +CallingHost +Calloc +Chme +Chms +Chmu +Closedir +Closelog +Closepl +Clrerr +Compar +DARPA +DASI +DECOVF +DFL +DISKTAB +DNDEBUG +Dptr +Dtime +EMOD +EOF +ETIME +Endfsent +Endgrent +Endhostent +Endnetent +Endprotoent +Endservent +Envp +Etext +FDATE +FLMIN +FLTDIV +FLTOVF +FLTUND +FORT01 +FORT12 +FPE +FSIZE +Fabs +Fcvt +Fdate +Feof +Fflush +Ffs +Fgetc +Fgets +Fileno +Firstkey +Fpecnt +Fprintf +Fputc +Fputs +Fscanf +Ftell +Fwrite +GETCWD +GETDISKBYNAME +GETFSENT +GETHOSTENT +GETLOG +GETNETENT +GETPROTOENT +GETSERVENT +GETWD +GSI +Gcvt +Gerror +Getchar +Getdiskbyname +Getfsent +Getfsspec +Getfstype +Gethostbyname +Gethostent +Getlog +Getnetbyname +Getnetent +Getprotobyname +Getprotoent +Getpwuid +Getservbyname +Getservent +Getw +Getwd +Gtty +HOSTNM +HPIB +IDATE +IGN +INET +INFO +INITGROUPS +INSQUE +INTDIV +INTOVF +IOINIT +Iargc +Idate +Ierrno +Initgroups +Initstate +Insque +Ioinit +Irand +Isascii +Isatty +Itime +LIB2648 +LIM +LOC +Ldexp +Lib2648 +Lnblnk +Localtime +Lowpc +Lshift +Ltime +MAXPATHLEN +MAXRSS +MAXUINT +Modf +Moncontrol +Monstartup +Msg +NCARGS +NN +NORAISE +NSIG +Name1 +Name2 +Nbytes +Noone +OOPS +Opendir +Openlog +Openpl +PDP +PDP11 +PDP11's +PID +PRIVIN +PSIGNAL +PSL +Pclose +Pid +Psignal +Putchar +Putw +RCMD +REXEC +Rcmd +Readdir +Realloc +Rewinddir +Rexec +Rresvport +Rshift +Rtnval +Ruserok +SALERT +SCANDIR +SCCS +SIG +SIGALRM +SIGBUS +SIGCHLD +SIGCONT +SIGEMT +SIGFPE +SIGHUP +SIGILL +SIGINT +SIGIO +SIGIOT +SIGKILL +SIGPIPE +SIGPROF +SIGQUIT +SIGSEGV +SIGSTOP +SIGTERM +SIGTRAP +SIGTSTP +SIGTTIN +SIGTTOU +SIGURG +SIGVTALRM +SIGXCPU +SIGXFSZ +SUBRNG +Scandir +Scp +Seekdir +Sep +Setbuffer +Seteuid +Setfsent +Sethostent +Setlinebuf +Setnetent +Setprotoent +Setruid +Setservent +Setstate +Sig +Signum +Sprintf +Sqrt +Sscanf +Strcat +Strcmp +Strcpy +Strlen +Strncat +Strncmp +Strncpy +Symlnk +Syslog +TIOCGETP +TIOCSETP +TOPEN +TRAPER +TRAPOV +TRPFPE +TTYNAM +Tclose +Telldir +Tgetent +Tgetflag +Tgetnum +Tgetstr +Tgoto +Timezone +Tlu +Topen +Tputs +Trewin +Trpfpe +Tskipf +Ttynam +Ttyslot +Twrite +VARARGS +VAX +Vax +Vfree +Vm +Wasley +XTABS +a.out +abort.3 +abort.3f +abs.3 +access.3f +accessability +addch +addr +addrtype +addstr +affcnt +agoto +ahost +alarm.3c +alarm.3f +alloca +alphasort +aoff +aon +apnd +areaclear +arg +arg0 +arg1 +argc +argn +argno +args +argv +arithmatic +arpa +assert.3x +assert.h +atof.3 +basec +basegid +bcmp +bcopy +besj0 +besj1 +besjn +bessel.3f +besy0 +besy1 +besyn +bit.3f +bitcopy +bitmap +bitmat +bp +bsize +bstring.3 +buf +bufsize +byteorder.3n +bzero +bzro +caching +cbreak +cctl +ch +chdir.3f +chmod.3f +cleara +clearerr +clearg +clearok +closedir +closelog +closepl +clrtobot +clrtoeol +cm +cmax +cmd +cmin +comp +compar +compatibilty +congruential +cont +cpu +crmode +crypt.3 +cstime +ctime.3 +ctype.3 +ctype.h +curoff +curon +curses.3x +cutime +daemons +dbesj0 +dbesj1 +dbesjn +dbesy0 +dbesy1 +dbesyn +dbm.3x +dbminit +dcl +ddd +ddd.ddd +decpt +delch +deleteln +delwin +dest +destcol +destline +devnam +dffrac +dflmax +dflmin +dir.h +directory.3 +dirp +disect +disktab +disktab.h +dispmsg +doprnt +dox +dptr +drand +drawbox +ds +dsize +dst +dstflag +dtime +dumpmat +ecvt.3 +edflag +egid +elem +emptyrow +ename +end.3 +endfsent +endhostent +endnetent +endprotoent +endservent +endwin +envp +eoff +eotf +eptr +errf +errlist +etime +etime.3f +euid +evalue +exec'ed +exece +execl.3 +exect +exit.3 +exit.3f +exp.3m +extern +fclose.3s +fd +fd2p +fdate +fdate.3f +ferror.3s +ffrac +ffs +file.c +filedes +firstkey +flmax +flmin +flmin.3f +floor.3m +flush.3f +fmt,arg1,arg2 +fork.3f +formatted +formfeed +fortran +forw +fpecnt +fpeflt +fperr +frag +fread.3s +freq +frexp.3 +fseek.3f +fseek.3s +fsize +fstab +fstab.h +ftime +func +funtions +gamma.3m +gcvt +gdefault +gerror +getarg.3f +getc.3f +getc.3s +getcap +getch +getcwd +getcwd.3f +getdisk.3x +getdiskbyname +getenv.3 +getenv.3f +getfsent +getfsent.3x +getfsfile +getfsspec +getfstype +getgrent.3 +gethost +gethostbyaddr +gethostbyname +gethostent +gethostent.3n +gethostname +getlog +getlog.3f +getlogin.3 +getnet +getnetbyaddr +getnetbyname +getnetent +getnetent.3n +getpass.3 +getpid.3f +getproto +getprotobyname +getprotobynumber +getprotoent +getprotoent.3n +getpw.3 +getpw.3c +getpwent.3 +getrlimit +getrusage +gets.3s +getserv +getservbyname +getservbyport +getservent +getservent.3n +getstr +gettimeofday +gettmode +getuid.3f +getwd +getwd.3 +getyx +goff +gon +goto +gprof +grp.h +hangup +highpc +host.equiv +hostent +hostlong +hostnm +hostnm.3f +hosts.equiv +hostshort +htonl +htons +hypot.3m +iargc +iarray +ibzr +ictl +idate +idate.3f +ident +idrss +idsrss +ieof +ierrno +iflag +imediately +in.h +inblk +incr +index.3f +inet +inet.3n +inet.h +initgroups +initgroups.3x +initscr +initstate +inmax +inport +insch +insertln +insque +insque.3 +instantiations +instr +int2 +int4 +intro.3f +intro.3s +ioiflg +ioinit +ioinit.3f +iptr +irand +irregardless +isdst +isize +itime +ixrss +key.dptr +keypad +kill.3f +koff +kon +l300s +labelled +lasty,lastx,newy,newx +lcurses +ldbm +leaveok +len +lib2648 +lib2648.3x +lib2648.a +libF77.a +libI66.a +libI77.a +libU77.a +libc.a +libcurses.a +libdbm.a +libm.a +libplot.a +libtermcap.a +linemod +lines,cols,begin +link.3f +lna +lnaof +lnblnk +loc +loc.3f +log10 +logstat +long.3f +longname +longword +lowleft +lowpc +lplot +lshift +lstat +ltermcap +ltime +lunit +luser +majflt +makeaddr +malloc.3 +math.h +maxlen +maxrss +mday +millitm +min +minflt +minmax +mktemp.3 +mnew +mon +mon.out +moncontrol +monitor.3 +monstartup +movecurs +msg +mvcur +mydata +myprogram +myresults +name1 +name2 +namelist +namlen +nbits +nbytes +ncylinders +ndigit +ndigits +nel +nelem +nerr +net.host +netdb.h +netent +netinet +netlong +netof +netrc +netshort +newline +newlines +newmat +newwin +nextkey +nfiles +nfunc +nice.3c +nitems +nl +nlist.3 +nlist.h +nocrmode +noecho +nonl +noraise +noraw +nptr +nrecs +nsectors +nswap +ntoa +ntohl +ntohs +ntracks +numesg +occured +occurences +opcodes +open''ed +opendir +openlog +openpl +ospeed +oublk +outc +outstr +pag +param.h +passno +pause.3c +perror.3 +perror.3f +pg +pid +plot.3x +popen.3 +preceeded +pred +printf.3s +printg +printw +proc +proto +protoent +psignal +psignal.3 +psl +ptr +ptrname +pushback +putc.3f +putc.3s +puts.3s +pvar +pw +pwd.h +qelem +qsort.3 +qsort.3f +rand.3c +rand.3f +random.3 +range.3f +rawchar +rboff +rbon +rcmd +rcmd.3x +rdchar +readdir +readline +recno +regex.3 +rem +remque +rename.3f +resetty +rewinddir +rexec +rexec.3x +rexecd +rgid +rhost +rhosts +rindex +rlogin +rlogind +rmax +rmin +rpm +rresvport +rshd +rshift +rss +rtnval +ruid +ruserok +savetty +scandir +scandir.3 +scanf.3s +scanw +scp +scr +scr,boolf +scrollok +secsize +seekdir +servent +serverftp +setbuf.3s +setbuffer +setclear +setegid +setenv +seteuid +setfsent +setgroups +sethostent +setitimer +setjmp.3 +setjmp.h +setlinebuf +setmat +setnetent +setpriority +setprotoent +setregid +setreuid +setrgid +setrlimit +setruid +setservent +setset +setstate +setterm +settimeofday +setuid.3 +setxor +sevral +sgtty.h +sgttyb +sig +sigblock +sigcontext +siglist +sigmask +signal.3 +signal.3c +signal.3f +signal.h +signgam +signum +sigpause +sigsetmask +sigstack +sigvec +sin.3m +sinh.3m +sizeof +sleep.3 +sleep.3f +socket.h +srandom +src +standend +standout +stat.3f +statb +stayopen +stdio.h +stdscr +str +string.3 +strings.h +stty.3c +substr +swab.3 +symlink +symlnk +syslog +syslog.3 +syslog.h +system.3 +system.3f +tarray +tclose +tcp +tcsr +telldir +termbuf +termbuf,name +termcap.3x +tgetent +tgetflag +tgetnum +tgetstr +tgoto +thompson +time.3c +time.3f +time.h +timeb +timeb.h +timekeeping +timep +times.3c +times.h +timezone +tloc +tlu +tms +togvid +topen +topen''ed +topen.3f +touchwin +tputs +traper +traper.3f +trapov +trapov.3f +trewin +trpfpe +trpfpe.3f +tskipf +tstate +ttyinit +ttynam +ttynam.3f +ttyname.3 +ttyslot +twrite +typedef +types.h +ucb +unctrl +unformatted +ungetc.3s +unlink.3f +username +utime.3c +val +valloc.3 +varargs +varargs.3 +varargs.h +vidinv +vidnorm +vlimit.3c +vlimit.h +vm +vmunix +vrbose +vtimes.3c +vtimes.h +waddch +waddstr +wait.3f +wclear +wclrtobot +wclrtoeol +wday +wdelch +wdeleteln +werase +wgetch +wgetstr +win,boolf +win,c +win,ch +win,fmt,arg1,arg2 +win,lines,cols,begin +win,str +win,vert,hor +win,y,x +win1 +win1,win2 +win2 +winsch +winsertln +wmove +word1 +word2 +wprintw +wrefresh +wscanw +wstandend +wstandout +xmat +xor +yday +zermat +zoomn +zoomoff +zoomon +cat <<'EOF' >---------------- +Section 4 +5Mbytes +ACC +ACU +AF +ALLDELAY +ARP +ASKNAME +AUTOCONF +ArpaNet +BBN +BSDELAY +BSP +BUFSIZ +Backoff +Berknet +CBREAK +CHAN +CPU +CRDELAY +CRMOD +CSS +CT +CTL +Crt +DARPA +DDCMP +DECtape +DGRAM +DMA +DMA'ed +DMC +DMF +DMR +DN +DOSTOP +DTABT +Datagram +Diablo +Diskette +EADDRINUSE +EADDRNOTAVAIL +EC +ECC +ECONNREFUSED +ECONNRESET +EISCONN +EMSGSIZE +ENETDOWN +ENETUNREACH +ENF +ENOBUFS +ENOTCONN +ETIMEDOUT +EVENP +EWOULDBLOCK +EXTA +EXTB +Emulex +Ethernet +Ethernets +FASYNC +FIONREAD +FLUSHREAD +FLUSHWRITE +GETADDR +GETDENS +HK +HY +Hardcopy +Hazeltine +Hazeltines +Helge +ICMP +IFF +IK +IL +IMPLINK +INADDR +INET +INIT +IP +ISHT +ISMT +ISTM +ISTS +ISUT +Ik +Ikonas +KG +LCASE +LCRTBS +LCRTERA +LCRTKIL +LCRTKILL +LCTLECH +LDECCTQ +LDISC +LETXACK +LFLUSHO +LINTRUP +LLITOUT +LMDMBUF +LNOHANG +LPENDIN +LPRTERA +LTILDE +LTOSTOP +MASSBUS +MAXPUPSIZ +MBEXC +MINPUPSIZ +ML11A +ML11B +MPSIZE +MRSP +MSCP +MT +MTBSF +MTBSR +MTFSF +MTFSR +MTIO +MTIOCGET +MTIOCTOP +MTNOP +MTOFFL +MTREW +MTWEOF +N.B +NCC +NETLDISC +NEX +NEXUS +NLDELAY +NOCKSUM +NOOP +NOSTOP +NOTRAILERS +NSC +NTTYDISC +NXM +ODDP +ODT +OFFLINE +OTTYDISC +PCL +PDP11's +PSAUTOMAP +PSAUTOREFRESH +PSDOUBLEBUFFER +PSGETADDR +PSSINGLEBUFFER +PSSINGLEMAP +PSSINGLEREFRESH +PSSTOPMAP +PSSTOPREFRESH +PSTIMEREFRESH +PSWAITMAP +PSWAITREFRESH +PTY +PUPPROTO +Proteon +Quadracall +RDDMK +RDM +RECVD +RK07's +RSP +RTF +RX +RX02's +RXIOC +SDI +SIGHUP +SIGINT +SIGIO +SIGQUIT +SIGTINT +SIGTSTP +SIGTTIN +SIGTTOU +SIOCADDRT +SIOCDELRT +SIOCGIFADDR +SIOCGIFCONF +SIOCGIFDSTADDR +SIOCGIFFLAGS +SIOCSIFADDR +SIOCSIFDSTADDR +SIOCSIFFLAGS +SMD +SWABIPS +Skrivervik +TAB0 +TAB1 +TAB2 +TBDELAY +TCP +TDM +TIMEREFRESH +TIOCCBRK +TIOCCDTR +TIOCEXCL +TIOCFLUSH +TIOCGETC +TIOCGETD +TIOCGETP +TIOCGLTC +TIOCGPGRP +TIOCHPCL +TIOCLBIC +TIOCLBIS +TIOCLGET +TIOCLSET +TIOCNXCL +TIOCPKT +TIOCREMOTE +TIOCSBRK +TIOCSDTR +TIOCSETC +TIOCSETD +TIOCSETN +TIOCSETP +TIOCSLTC +TIOCSPGRP +TIOCSTART +TIOCSTI +TIOCSTOP +TS +TU +TU58's +Tchars +Terminet +UDA +UDP +UNIBUS +UT +UU +UUDMA +Ungermann +VAX +VAX'en +VAX's +VPLOT +VSETSTATE +VTDELAY +VV +Versatec +WAITINT +WDDMK +WIRECENTER +Wildcard +Wirecenter +XTABS +acc +acc0 +accrint +accxint +ad0 +adaptors +addr +adintr +af +arg +args +arp +arpanet +autocall +autoconf +autoconfiguration +autoconfigure +autoconfigured +autodialer +autoloads +backoff +blkno +bn +bp +bpi +brkc +buf +caddr +calulates +capricorn +cbreak +chan +cnt +cpu +crt +crt's +cs +cs1 +cs2 +csr +css +css0 +cssrint +cssxint +ct0 +ctintr +cua +cua0 +cua1 +cul +cul0 +cul1 +cyl +cyls +daemon +datagram +dataphone +dataset +datasets +db +degaussed +dh0 +dhost +dhrint +dhxint +dialup +dialups +diskette +diskettes +diskpart +dm0 +dma +dmc +dmc0 +dmcload +dmcrint +dmcxint +dmf +dmf0 +dmfdaint +dmfdbint +dmflint +dmfrint +dmfsrint +dmfsxint +dmfxint +dmintr +dn0 +dnet +dnintr +ds +dsock +dsreg +dst +dstaddr +dsuspc +dz0 +dzrint +dzxint +ec +ec0 +ecc +eccollide +ecrint +ecxint +effectors +en0 +enrint +enxint +eofc +er +erreg +ethernet +existant +filedes +flakey +flushc +formatted +formatter +formatters +fx0 +fxxxxx +hangup +hardcopy +hk0 +hk?a +hk?b +hk?c +hk?g +hosts's +hp0 +hp?a +hp?b +hp?c +hp?d +hp?e +hp?f +hp?g +hp?h +ht0 +hy +hy0 +hyint +icsr +if.h +ifc +ifconf +ifcu +ifcu.ifcu +ifnet +ifp +ifr +ifreq +ifrequest +ifru +ifru.ifru +ik0 +ikintr +ikonas +il +il0 +ilcint +ilrint +imp.h +impostors +in.h +inet +info +intr +intrc +ioctl.h +ipl +ips +ispeed +kbytes +kg +kg0 +kglock +kgmon +kludge +ldisc +len +lnextc +longword +longwords +loopback +lp0 +lpintr +ltchars +mag +mba +mba's +mba0 +mbsr +mcr +mcr's +mod +mpm +mscp.h +mt +mt0 +mt11 +mt15 +mt16 +mt19 +mt23 +mt3 +mt7 +mt8 +mtget +mtio +mtio.h +mtop +mu0 +netimp +netinet +netpup +newcrt +newfs +newline +newlines +npr +nsectors +ntracks +occured +ocsr +offline +olen +online +op +ospeed +pcl +pcl0 +pclrint +pclxint +pgrp +pk +plotmd +powerfails +pre +proNET +prom +proms +prtmd +ps0 +psec +pseud +psintr +pty +pup.h +pupport +quitc +ra0 +ra?a +ra?b +ra?c +ra?d +ra?e +ra?f +ra?g +ra?h +rcr +rcv +recive +recv +recvfrom +refcnt +req +resid +resyncing +rhk +rhp +rk0 +rk07's +rkintr +rlogin +rlogind +rmt +rmt0 +rmt23 +route.h +rprntc +rra +rrx +rrx0a +rrx0b +rrx0c +rrx0d +rsr +rt +rtentry +rup +rx +rx0 +rx1 +rxformat +rxintr +rxreg.h +sc0 +sendto +sg +sgtty +sgtty.h +sgttyb +shost +sigvec +snet +sockaddr +socket.h +spup +ssock +startc +stopc +subsituting +subsytem +suspc +ta +tapemarks +tchars +tcontrol +tcp +tcr +te0 +thru +tj +tj0 +tm0 +tmintr +tri +trk +ts +ts0 +tsintr +tsr +tty02 +ttyd +ttyh2 +tu +tu0 +types.h +uba +uba0 +ubinfo +uda +uda0 +udasa +udintr +udp +un +un0 +unibus +unintr +unuseable +up0 +up?a +up?b +up?c +up?d +up?e +up?f +up?g +up?h +upintr +uploading +useable +ut +ut0 +utintr +uu +uu0 +uu?a +uurintr +uuxintr +va0 +vaintr +vax +vaxuba +vcmd.h +vec +versatec +vp0 +vpbuf +vpintr +vs +vv +vv0 +vvicsr +vvocsr +vvrint +vvxint +vz0 +werasc +wildcard +xmit +zero1 +zero2 +zs0 +cat <<'EOF' >---------------- +Section 5 +A.OUT +A.out +ACOMPAT +ACORE +ADDR +ADM +AFORK +ARFMAG +ARMAG +ASU +AXSIG +BADMAG +BCOMM +BIZCOMP +BSIZE +BSS +BUFSIZ +Chksum +DARPA +DECtape +DEV +DIRBLKSIZ +DIRSIZ +DISKTAB +DM2500,H2000 +DUMPINFMT +DUMPOUTFMT +DVI +Datamedia's +Disktab +ECOML +ECOMM +EE:ta +EK:xn +ENH +EOF +EXT +Ee:so +FNAME +FS +FSTAB +GETTYTAB +GSYM +Gettytab +Hardcopy +Hazeltine +ID's +INODE +INOPB +Inode +Keypad +Kj +LBRAC +LCSYM +LENG +LSYM +Linkflag +MAXBPC +MAXBPG +MAXBSIZE +MAXCPG +MAXCSBUFS +MAXIPG +MAXMNTLEN +MAXNAMLEN +MICOM +MINBSIZE +MLEN +MSIZ +Maxx +Mime +Mtime +N.B +NAMSIZ +NBPI +NIC +NINDIR +NMAGIC +NRPOS +NSPF +NTREC +Newline +OMAGIC +Op +PRINTCAP +PSYM +Perkin +Presotto +Printcap +RBRAC +RSYM +SARMAG +SBSIZE +SENDMAIL +SLINE +SSYM +STROFF +STSYM +SYMOFF +Siegler +Stab.h +Standout +TBLOCK +TVI +TXTOFF +Teleray +UNDF +UPAGES +Uid +Umount +Upline +Uudecode +VAX +VGRINDEFS +Versatec +Vgrindefs +XOFF +XON +Xl +ZMAGIC +Zk +a.out +a.out.h +acct.h +acctbuf +acctp +addr +adm3 +adm3:am:bs:cl +aliases.dir +aliases.pag +ap +ar.h +arpavax +asm +basic:4 +blk +blkno +blkoff +blks +blksize +bmask +bool +br +bshift +bsize +btime +buf +caddr +calc +cau0:el +cblkno +cbreak +cgmask +cgoffset +cgrotor +cgsize +chksum +cifplot +cl +cl,ll,sf,sb +cm +comp +compat +concept100:is +cont +cpc +cpg +crt +csaddr +csmask +csp +csshift +cssize +cstotal +csum +ctrl +cyl +daemon +dblkno +dbtofsb +dbuf +dbx +def +desc +di +dialup +dinode +dir.h +dirdesc +diskpart +disktab +disktab.h +ditroff +dotdashed +drsize +dsize +du:at +dumpdates +dumprestor.h +dv +e.g +elt +endif +enum +enviroment +eol +etime +ev +extern +extern:1 +fds +filesys +fmag +fmask +formatted +formfeed +fortran +fpg +frag +fragoff +frags +fragshift +freelist +freq +fs.h +fsbtodb +fshift +fsize +fsmnt +fstab +fstab.h +getfsent +getfsfile +getfsspec +getfstype +gethostent +getnetent +getprotoent +getservent +gettytab +goto +grp +hangup +hardcopy +harris +hblock +hd +hdr +hn +hostname +iblkno +idates +ie +ifdef +ifndef +im +incno +incore +inet +info +initgroups +ino +inode.h +inodes +inopb +inumber +ipg +kd +keyletter +keypad +kh +kludge +kr +ku +lblkno +lbn +lcomm +length:2 +level,address +linefeed +linemod +linkflag +linkname +linknames +lm +loc +logout +longdashed +lpc +lsi +mag +magtapes +makedev +max +maxbpg +maxcontig +maxx +maxy +mime +minfree +mod +modtime +mtab.h +mtime +nam +name,,0 +name,,0,0,address +name,,0,linenumber,address +name,,0,subtype,line +name,,0,type,0 +name,,0,type,address +name,,0,type,offset +name,,0,type,register +name,,0,type,struct +name,linenumber,address +name2 +namelist +namlen +nbytes +ncg +ncyl +newaliases +newfs +newline +newlines +nindir +nsect +nspf +ntrak +numfrags +nx +oe +op +or'ed +overriden +pac +param.h +pascal +passno +pcrel:1 +physadr +plugboard +pn +postbl +pre +printcap +quotacheck +quotaon +reclen +resp +rlink +ronly +rotbl +rotdelay +rpm +rps +rw,ro,sw +sblkno +sbsize +sendmail +setgroups +setrlimit +sgtty.h +shortdashed +sigvec +sizeof +sparecon +spc +spcl +src +ssize +stab.h +stabd +stabn +standout +std +steamerflies +str +strx +swblk +sym +symbolnum +symbolnum:24 +syms +tabset +tapea +tapeaddr +tapemark +tcp +tex +tip300 +trampflies +trsize +tt +tty33:co +typedef +types.h +un.n +undef +unused1 +unused2 +user.h +ushort +utmp.h +uudecode +val +vax +vcat +ve +ventel:ie +ver +vgrindefs +vipw +vs +xtnd +cat <<'EOF' >---------------- +Section 6 +ATPB +Allman +BR +Backslash +Bournes +Bros +DDL +ELIZA +EOF +Foderaro +Fourr +HJKL +Heuer +Hoyle +Lebling +McKusick +Mikey +PD +RUBOUT +Rogerian +Rubout +SEFC +VAX +VMS +Weizenbaum +Wichman +Wumpus +Yendor +aliens.log +amt1 +anual +appl +arg +arp +atus +bdh +canfield +cards.pck +category1 +category2 +cfscores +cithep +cmd +commadore +course1 +crt +ddl +ddlrun +de +debtee +decwriter +dict +doc +ds +e.g +epie +erhd +est +fortunes.dat +grainier +hardcopy +hasers +hexagram +hexagrams +hjkl +i.e +ields +isual +logout +mages +mortgageable +mpulse +ndock +newline +newlines +nfences +nrobots +omputer +orpedo +ove +pture +quiz.k +req +rogue.save +rscan +scrunched +sefc +snake.log +snakerawscores +snscore +solitaire +spread1 +strfile +trekkie +ucb +utomatic +wslao +wumpus +cat <<'EOF' >---------------- +Section 7 +ARPANET +Adm +Allman +Arpa +Berkeley.ARPA +Berknet +Bitnet +CSNET +DARPA +DASI +DIABLO +DTC +EXINIT +Ethernet +GSI +L.sys +LOGFILE +MAILADDR +MAKEDEV +MAKEDEV.local +MASBUS +MULTICS +Nofill +PP +RA +RC +RFC822 +Reg +SM +Seigler +Tterm +UCB +UDel +UNIBUS +VAX +a.out +a.out.h +abs.c +access.s +acct.h +ack +addrs +adm3a +africa +ar.c +arpavax +as.1 +atrun +bitnet +bp +brk.s +calder.Berkeley.ARPA +cat1 +ccom +cf +conf +crt0.s +cshrc +csu +csvax +ctm +daemon +datebook +del +dh.c +dialup +dict +disktab +dle +doc +dumpdates +ec.c +eign +en.c +enq +eric +etb +etx +exdented +exrc +extern +fIword +fgets.c +fopen.c +fstab +ftB +ftR +ftR.c +gen +gethostbyname.c +hangups +host.ARPA +host.BITNET +host.CC +host.UUCP +host:user +hosta +hostb +hostb:user +hostc +hostnames +hp.c +ht.c +imp.c +imphost.c +imphost.h +ingvax +lc +libc.a +libc.m +lineprinter +llib +lm +locore.s +lpacct +machdep.c +mailaddr +mailrc +main.c +man1 +math.h +mba.c +mcrt0.s +mime +monet +monet.Berkeley.ARPA +motd +mount.1m +mqueue +msgsrc +n.t.l +netimp +netinet +netrc +nical +nofill +p.i +pac +preformatted +pupose +quiz.k +rc.local +rcp +rhp +secretmail +sendmail +setenv +socket.c +soh +spellhist +src +stat.h +stdio.h +stm +stx +syn +syscalls.c +tab300.c +tf +tmac +tmac.an +tmac.e +tmac.s +tmac.x +tracct +uba.c +ucb +ucbarpa +ucbcad +ucbcory +ucbernie +ucbingres +ucbkim +ucbvax +uipc +umlaut +undef +up.c +user.host +usr.bin +uucico +vaacct +varian +vax +vaxif +vaxmba +vaxuba +versatec +vmunix +vpacct +vv.c +wd +xx +yourname +cat <<'EOF' >---------------- +Section 8 +0123456789fusdWn +ADDR +ALLO +APPE +ARPANET +BAD144 +BADSECT +BPI +BUGFILER +Babaoglu +Bad144 +Badsect +Bcc +BerkNet +Berknet +Blksize +Bugfiler +CADDR +CCNT +CHM +CLKT +CNT +COMSAT +CONFIG +CPU +CPU's +CRIT +CRMOD +CWD +Catchall +Cifplot +Cmds +Comsat +Config +Cory +Countdown +Crontab +DADDR +DARPA +DBA0 +DELE +DEV +DISKPART +DMA +DMA0 +DRA0 +DRTEST +DSK +DUMPFS +DVI +Dept +Diskpart +Drtest +Dumpfs +ECC +EDQUOTA +EECS +EMERG +EMULEX +ESSAA +EVRAC +Edquota +FASTBOOT +FLG +FTPD +Fastboot +Formatted +Fragsize +Ftpd +HKM +HKS +HPM +HPS +HTABLE +HUP +Helge +Hostname +Htable +ICMP +ID's +IDC +IMPLOG +IMPLOGD +INADDR +INFO +INIT +INO +IPC +IPTR +Implog +Implogd +Init's +Inode +Intransit +KGMON +KSP +Kgmon +Kovacs +Kovacs,508E,7925,6428202 +LOC +LPC +LPD +Leffler +Lpc +Lpd +MAKEDEV +MAKEDEV.local +MASSBUS +MIN +MKLOST +MKPROTO +MTIOCGET +MTIOCOP +McKusick +Minfree +Mkproto +N.B +NCP +NETLDISC +NEWFS +NI +NIC +NLK +NLST +NOHOST +NOOP +NOUSER +NPR +NTTYDISC +Name1 +Name2 +Ncpg +Newfs +Nsect +Ntrack +OSERR +OTTYDISC +Ozalp +PAC +PCB +PGRP +PID +POIP +PPID +PRI +PRIO +Pac +Pprinter +Prototocol +QUOTACHECK +QUOTAON +Quotacheck +Quotaoff +Quotaon +RC +RDC +RDUMP +REPQUOTA +RETR +REXECD +RFC +RFC733 +RFC819 +RFC821 +RFC822 +RK07 +RK07's +RLOGIND +RM0X +RMT +RNFR +RNTO +RP0X +RRESTORE +RSHD +RSS +RWHOD +RXFORMAT +Rc +Rc.local +Rdump +Repquota +Rexecd +Rlogind +Rmt +Rrestore +Rshd +Rwhod +SALERT +SAVECORE +SBI +SEC:PACKINIT +SENDMAIL +SETIFADDR +SIGHUP +SIOCADDRT +SIOCDELRT +SIOCGIFCONF +SIOGIFCONF +SIZ +SLP +SMTP +SRSS +SSE +STOR +STRU +STST +SYOPNSIS +Savecore +Sendmail +Setifaddr +Sklower +Skrivervik +Standford +Syslog +TCP +TE16,TU45,TU77 +TELNET +TELNETD +TEMPFAIL +TEXTP +TFTP +TFTPD +TRPT +TSTP +TUNEFS +Telnetd +Tex +Tftpd +Trpt +Tunefs +UCB +UDA50 +UDP +UID +UNIBUS +UPM +UUSNAP +Umount +Uusnap +VAX +VIPW +Vipw +WCHAN +WRC +XCUP +XCWD +XMKD +XPWD +XRMD +XSIS +XTABS +Xqts +abcdDfijkKlnrstuv +abreviated +abreviation +ack +adapter,unit +adaptor +addr +adduser.8 +aixptufT +aliases.dir +aliases.pag +analyze.8 +arcv.8 +arff.8v +arg +args +arpa +ast +autoboot +avio +axl +ba +backslash +bad144 +bad144.8 +badsect +badsect.8 +bbdir +bd +bi +biff +blksize +bm +bootstrapped +boottime +bp +bpt +bse +bt +bugfiler +bugfiler.8 +bv +bz +catman.8 +cf +chown.8 +cifplot +clri.8 +cmd +comsat +comsat.8c +conf +conf.c +config.8 +corefile +coremap +cpu +cpu's +crash.8v +cron.8 +crontab +cshrc +csn +csvax +cyl +daemon +daemons +dameons +datagram +dcheck.8 +dead.letter +deamons +dec +degaussed +devices.vax +dialup +dieing +diskette +diskmap +diskpart +diskpart.8 +disktab +disktype +dissappears +dkbad +dmesg.8 +dmf +drtest +drtest.8 +dump.8 +dumpdates +dumpfs +dumpfs.8 +ec6d +ecc +ecc's +edquota +edquota.8 +eric +ernie +ernie's +ernie::235:20 +fastboot +fastboot.8 +fasthalt +files.ERNIE +files.vax +filesys +flakey +format.8v +formatted +formatter +formatting...make +found.8 +frag +fragsize +freeblock +fsck.8 +fstab +fsync +ftp +ftpd +ftpd.8c +ftplog +ftpusers +fullname +gethostent +gethostname +getnetent +getpriority +getservbyname +gettable.8c +getty.8 +gettytab +gmon.out +googol +gprof +halt.8 +hangup +hostname +hosts.equiv +hosts.txt +htable +htable.8 +icheck.8 +implog +implog.8c +implogd +implogd.8c +incore +inet +info +ing +init's +init.8 +innocuous +inodes +inscruitable +instantiate +intransit +intstack +inumber +ioconf.c +jobnum +john +kalash +kgmon +kgmon.8 +kilo +kridle +len +loadav +localgateways +localhosts +localnetworks +logfile +loopback +lpc +lpc.8 +lpd.8 +machine:device +mailaddr +maildir +mailq +makedev +makedev.8 +makefile +makefile.vax +makekey.8 +makewhatis +maxbpg +maxcontig +mba +mba0 +mba1 +mbz +mdec +min +minfree +mkfs.8 +mklost +mknod.8 +mkproto +mkproto.8 +mnt +mount.8 +mqueue +msgbuf +mt +mtio +name1 +name2 +namelist +ncheck.8 +ncpg +netstat +newaliases +newfs +newfs.8 +newlines +nicname +nnnnn +nologin +nsect +ntrack +online +op +outmp +p0br +pac +pac.8 +pathnames +pgrp +pid +ploter +pprice +pre +preformatted +printcap +proto +pseduo +pstat.8 +ptmp +pty +putput +queuedir +queueing +quot.8 +quotacheck +quotacheck.8 +quotaoff +quotaon +quotaon.8 +radix50 +rc.local +rcmd +rdump +rdump.8c +reboot.8 +recvtime +renice.8 +repquota +repquota.8 +restore.8 +restoresymtab +rexec +rexecd +rexecd.8c +rhosts +rlogin +rlogind +rlogind.8c +rmail +rmt +rmt.8c +rmt8 +roms +rotdelay +route.8c +routed.8c +rp0g +rps +rrestore +rrestore.8c +rrp0g +rrp1g +rrx +rrx0 +rrx1 +rshd +rshd.8c +rstdir +rstmode +ruptime +rwho +rwhod +rwhod.8c +rxformat +rxformat.8v +sandbagged +savacct +savecore +savecore.8 +selfexplanatory +sendberkmail +sendmail +sendmail.8 +sendmail.cf +sendmail.fc +sendmail.hf +sendmail.st +sendtime +setifaddr +setifaddr.8c +setitimer +setpriority +setquota +setsockopt +shutdown.8 +shutdownlog +sizeof +skel +sno +sockstamp +standalone +std +sticky.8 +stz,dtz +swapfile +swapon.8 +sync.8 +sysexits.h +syslog +syslog.8 +syslog.conf +syslog.h +syslog.pid +sysname +ta +telnet +telnetd +telnetd.8c +tftp +tftpd +tftpd.8c +threshhold +tio +topq +trksec +trpt +trpt.8c +ttyd +tunefs +tunefs.8 +tuneup +typeX +uba +uba0 +ubglue.s +udp +unixtomh +update.8 +username +usracct +uuclean.8c +uusnap +uusnap.8c +vers +vipw +vipw.8 +vmcore +vmcore.n +vmunix +vmunix.n +whod +whoent +xfc +zz diff --git a/share/man/tools/noso.c b/share/man/tools/noso.c new file mode 100644 index 0000000..a5fd201 --- /dev/null +++ b/share/man/tools/noso.c @@ -0,0 +1,34 @@ +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/file.h> + +main(argc, argv) + char *argv[]; +{ + struct stat sb; + register char *cp; + int i, fd, count = 0; + char buf[10]; + + for (cp = "", i = 1; i < argc; cp = " ", i++) { + if (lstat(argv[i], &sb) < 0) + continue; + if ((sb.st_mode & S_IFMT) != S_IFREG) + continue; + fd = open(argv[i], O_RDONLY); + if (fd < 0) { + perror(argv[i]); + continue; + } + if (read(fd, buf, 3) != 3) { + close(fd); + continue; + } + if (strncmp(buf, ".so", 3)) + count++, printf("%s%s", cp, argv[i]); + close(fd); + } + if (count > 0) + putchar('\n'); +} diff --git a/share/man/tools/pages.c b/share/man/tools/pages.c new file mode 100644 index 0000000..9e2e6d4 --- /dev/null +++ b/share/man/tools/pages.c @@ -0,0 +1,34 @@ +#include <stdio.h> + +#define T_INIT 0100 +#define T_STOP 0111 + +long charin; /* number of input character */ + +main(argc, argv) +char **argv; +{ + + int npages = 0; + register int c; + + while((c=getchar()) != EOF) { + charin++; + c &= 0377; + if(c != T_INIT) + continue; + else { + c=getchar(); + c &= 0377; + if(c == T_STOP) { + npages++; + charin++; + } + } + } + if(charin<5) { + fprintf(stderr, "%s: no input\n", argv[0]); + exit(1); + } + printf("%d\n", npages); +} diff --git a/share/man/tools/pgcnt b/share/man/tools/pgcnt new file mode 100755 index 0000000..6a7d4f0 --- /dev/null +++ b/share/man/tools/pgcnt @@ -0,0 +1,92 @@ +set x $* +. ./.param + +PATH=$PATH:$MANDIR/tools + +sm= +if test "$PFLAG" -eq 1 +then + sm="-rs1" +fi + +for dir in $DIRLST +do + cd $MANDIR/man$dir + date > $TMPDIR/pages$dir + echo >> $TMPDIR/pages$dir + for file in $FILLST + do + prep="cat $file |" + + first=`line < $file` + case "$first" in + .so*) continue + ;; + \'\\\"*) + option=`expr "$first" : '.* \(.*\)'` + case "$option" in + c) + prep="${prep} cw |" + ;; + e) + prep="${prep} eqn |" + ;; + t) + prep="${prep} tbl |" + ;; + ce | ec) + prep="${prep} cw | eqn" + ;; + ct | tc) + prep="${prep} cw | tbl |" + ;; + et | te) + prep="${prep} tbl | eqn |" + ;; + cet | cte | ect | etc | tce | tec) + prep="${prep} cw | tbl | eqn |" + ;; + esac + ;; + *) + ;; + esac + + numb=`eval ${prep} troff -man $sm -s -f -t | pages` + echo "$file $numb" >> $TMPDIR/pages$dir + done +done + +tsum=0 +cd $TMPDIR +date > totalpgs +echo >> totalpgs + +for dir in $DIRLST +do + ed - pages$dir <<! + 1,2d + w tmp1.$$ + q +! + sum=0 + while read val + do + val=`echo $val | sed "s/.* / /"` + sum=`expr $sum + $val` + if test $? -eq 2 + then + echo "pgcnt: error in summing - sum is $sum, val is $val" + exit + fi + echo $sum > tmp.$$ + done < tmp1.$$ + sumt=`line < tmp.$$` + echo "total pages Section $dir -- $sumt" >> totalpgs + tsum=`expr $tsum + $sumt` +done + +echo >> totalpgs +echo >> totalpgs +echo "total pages -- $tsum" >> totalpgs +rm tmp.$$ tmp1.$$ diff --git a/share/man/tools/prnames b/share/man/tools/prnames new file mode 100755 index 0000000..fe5f0df --- /dev/null +++ b/share/man/tools/prnames @@ -0,0 +1,22 @@ +#! /bin/sh +set x $* +. ./.param + +for dir in $DIRLST +do + date > $TMPDIR/names$dir + echo >> $TMPDIR/names$dir + cd $MANDIR/man$dir + for file in $FILLST + do + so=`line < $file | sed "s/ .*//"` + if test "$so" = ".so" + then + continue + fi + ed - $file >> $TMPDIR/names$dir <<! + /^.SH NAME/+ + q +! + done +done diff --git a/share/man/tools/prsynops b/share/man/tools/prsynops new file mode 100755 index 0000000..a0cfffe --- /dev/null +++ b/share/man/tools/prsynops @@ -0,0 +1,26 @@ +#! /bin/sh +set x $* +. ./.param + +for dir in $DIRLST +do + date > $TMPDIR/synops$dir + echo >> $TMPDIR/synops$dir + cd $MANDIR/man$dir + for file in $FILLST + do + so=`line < $file | sed "s/ .*//"` + if test "$so" = ".so" + then + continue + fi + nroff -man $file > $TMPDIR/tmp.$$ + echo "$file:" >> $TMPDIR/synops$dir + ed - $TMPDIR/tmp.$$ >> $TMPDIR/synops$dir <<! + /SYNOPSIS/;+,/^ [A-Z][A-Z][A-Z][A-Z]/-p + q +! + done +done + +rm -f $TMPDIR/tmp.$$ diff --git a/share/man/tools/sp.ignore b/share/man/tools/sp.ignore new file mode 100644 index 0000000..057be89 --- /dev/null +++ b/share/man/tools/sp.ignore @@ -0,0 +1,1894 @@ +300 +300S +300s +4014 +450 +70boot +ACCT +Acctdisk +Accton +Acctsh +Acctwtmp +BPT +CONV +CR +Datamedia +EACCES +EAGAIN +EBADF +EBUSY +ECHILD +EDOM +EDTEST +EEXIST +EFAULT +EFBIG +EINTR +EINVAL +EIO +EISDIR +EMFILE +EMLINK +EMT +ENFILE +ENODEV +ENOENT +ENOEXEC +ENOMEM +ENOSPC +ENOTBLK +ENOTDIR +ENOTTY +ENXIO +EOT +EPERM +EPIPE +ERANGE +EROFS +ESPIPE +ESRCH +ETXTBSY +EXDEV +Errno +FILESAVE +FOPEN +FSCK +Fdopen +Fildes +Filesave +Fopen +Freopen +Fsck +Fsize +GCOS +HS +HyType +ID +INTRO +IOT +Init +LF +Longjmp +Ltol3 +MKDIR +Mkdir +Ninode +PASSWD +PC +PS1 +PS2 +Passwd +Pathnames +Pcc +Prtacct +RH11 +RJS03 +RJS04 +RP +RP03 +RP04 +RP05 +RP06 +Rmdir +SETJMP +STDIO +SYSLOG +Setjmp +Toascii +Toupper +ULIMIT +USERFILE +UTMP +UUCP +Uucp +_tolower +_toupper +a64l +abs +acct +acctcms +acctcom +acctcon +acctdisk +acctmerg +accton +acctprc +acctsh +acctwtmp +acos +adb +adm +ar +ascii +asctime +asin +atan +atan2 +atof +atoi +atol +awk +backgammon +backrules +basename +bc +bessel +bj +blkdev +brk +bs +bss +cal +calloc +cb +cc +cd +ceil +chdir +chessrules +chgrp +chmod +chown +chroot +clrerr +clri +cmp +col +comm +config +conv +cos +cosh +cp +cpio +cpp +creat +cref +cron +crt0 +ctermid +ctime +ctype +cu +cubic +cuserid +cx +daddr +dc +dc1 +dc2 +dc3 +dc4 +dcheck +dd +deroff +dev +devnm +devtab +df +dh +dialcodes +diff +diff3 +diffmk +dir +dircmp +dirname +diskboot +dn +dpd +dpr +du +dup +ecvt +ed +edata +egrep +encrypt +endgrent +endpwent +env +environ +eot +eqn +eqnchar +err +errdead +errdemon +errfile +errno +errpt +errstop +esc +etext +exec +execl +execle +execlp +execv +execve +execvp +exp +expr +f77 +fabs +fcheck +fclose +fcntl +fcrt0 +fcvt +fdopen +feof +ferror +fflush +fget +fgetc +fgets +fgrep +fildes +file1 +file2 +file3 +filename +fileno +filesave +filesystem +filesystems +filsys +fmod +fname +fopen +fprintf +fptrap +fputc +fputs +fread +freopen +frexp +fs +fscanf +fsck +fsdb +fseek +fsend +fstat +ftell +fwrite +gamma +gcat +gecos +getblk +getc +getchar +getegid +getenv +geteuid +getgid +getgrent +getgrgid +getgrnam +getlogin +getpass +getpid +getppid +getpw +getpwent +getpwnam +getpwuid +gets +getty +getuid +getw +gid +globl +gmtime +grep +gsignal +gtty +hangman +hp +hs +ht +hypot +icheck +id +iinit +indir +init +inittab +inode +intro +ioctl +isalnum +isalpha +isascii +isatty +iscntrl +isdigit +islower +isprint +ispunct +isspace +isupper +j0 +j1 +jmp +jn +ka6 +kas +kl +kmc +kmem +kun +l3tol +l64a +labelit +ld +ldexp +lex +lib +libc +libm +lint +ln +localtime +log +login +logoff +logouts +longjmp +lorder +lp +lpd +lpr +ls +lseek +ltol3 +m4 +magtape +makekey +malloc +man0 +maze +mcrt0 +mem +mesg +mk +mkdir +mkfs +mknod +mktemp +mm +mmt +mnttab +modf +monitor +moo +mv +mvdir +mvt +nak +ncheck +neqn +newgrp +nlist +nm +nohup +nroff +nsh +nts +nul +od +odpd +pacct +param +passwd +pathname +pcat +pcc +pclose +perror +popen +pow +pr +printf +prof +profil +ps +ptrace +ptx +putc +putchar +putpwent +puts +putw +pwd +qsort +rand +ratfor +rc +realloc +reg +regexp +restor +reversi +rf +rk +rm +rmdir +romboot +rp +rsh +rubout +runtime +sbrk +scanf +sdiff +sed +setbuf +setgid +setgrent +setjmp +setkey +setmnt +setpgrp +setpwent +setuid +sh +shcvt +shutdown +sin +sinh +spline +sprintf +sqrt +srand +sscanf +ssh +ssignal +startoff +stat +stderr +stdin +stdio +stdout +stime +strcat +strchr +strcmp +strcpy +strlen +strncat +strncmp +strncpy +strrchr +struct +stty +su +swab +sync +sys +sys_errlist +sys_nerr +syscall +tacct +tan +tanh +tapeboot +tapesave +tbl +tc +temp +tm +tmp +tmpnam +toascii +tolower +toupper +tp +tr +trig +troff +tsort +tss +ttt +tty +ttyname +typo +tzset +ufs +uid +ulimit +umask +umount +uname +ungetc +uniq +unixboot +unlink +unpack +userid +usr +ustat +utime +utmp +uuclean +uucp +uulog +uux +volcopy +wc +whodo +wtmp +wump +xargs +xref +y0 +y1 +yacc +yn +1ic +4.1bsd +ACU +ACU's +ADDR +ANOM +ARGSUSED +ARPANET +Aahimnrs +Afile +Aho +Allman +Arg +BFatuwvx +BIFF +BIZCOMP +BS.ES +BSS +Babaoglu +Backslashes +Backus +Bedminster +Berknet +Bernardsville +Bfile +Biff +Bizcomp's +Bourne +Branchburg +Breedlove +CAI +CFLAGS +CK +CONT +CPU +CRT's +CRTERASE +CRTKILL +Cbs +Cfoo +Changequote +Colin +Corfil +Cory +Cpu +DASI +DB +DBX +DEC's +DECtape +DSG +Dbx +Delimeters +Diablo +Dstring +EBCDIC +EOF +ESC +FFLAGS +FILENAME +FP +FTP +Ferrin +File1 +Filename +Foderaro +Fortran77 +Fp +Ftp +GCORE +GID +GPROF +GSI +GT +Gallager +Gcore +HOSTID +HOSTNAME +HUP +Hazeltine +Hertzfeld +Horton,508E,7686,5240633 +Hostnames +Hyterm +I.E.E.E +IDs +IM +ISP +Ignoreeof +Katseff +Kernighan +Keypad +Kleckner +Kulp +LCK +LE +LFLAGS +LIM +LINTLIBRARY +LOGFILE +LR +LT +Larus +Laxenburg +Lesk +Levinsky +Llopart +MACLISP +MFLAGS +MOS +MT +Mail.help +Mail.rc +Makefile +McKusick +Mt +N.B +NETSTAT +NEWALIASES +NOSTRICT +NOTREACHED +NUL +Newaliases +Newline +Newlines +Niklaus +Nohup +Nowitz +OED +OFMT +OFS +Objfil +Orderlist +Ossanna +Ozalp +PAGEIN +PDP +PDX +PFLAGS +PID +PMERGE +PPID +PRI +Pathname +Pdx +Pelegri +Plauger +Pmerge +Pos1 +Pprinter +Pre +Presotto +Procs +RCP +RCVD +RLOGIN +RSH +RSS +RUBOUT +RUPTIME +RWHO +RWNA +Rankine +Rcp +Reiser +Retargetted +Rlogin +Rowan +Rsh +Rubout +Runtime +Ruptime +SANOM +SBM +SCAPS +SCCS +SDETACH +SDLYU +SEQL +SIG +SIGALRM +SIGCHILD +SIGCONT +SIGINT +SIGKILL +SIGPLAN +SIGQUIT +SIGTERM +SIGTINT +SKEEP +SL +SLOAD +SLOCK +SNOVM +SNUSIG +SPAGE +SPAGI +SPHYSIO +SSIZ +SSWAP +SSYS +STIMO +STRC +SUANOM +SULOCK +SVFDONE +SVFORK +SWEXIT +SWTED +SYMDEF +SYSLINE +Schriebman +Shienbrood +Shoens +Sklower +Sname +Spellin +Spellout +Substitition +Symbolfile +TELNET +TENEX +TRS +TSIZ +TW +Televideo +Televideos +Telnet +Temp +TermiNet +Twp +UCB +UCI +UID +Uudecode +VARARGS +VAX +VLP +VMS +VWIDTH +Vadic +Ventel's +Versatec +Vfontedpr +Vol +Vwidth +WCHAN +Wasley +Wirth +XXXXX +YFLAGS +ZZ +a.out +aN +aa +abcdeglmn +abcdoxDOXw +abchnpuvx +abcissas +abe +abi +acdfgilqrstu1ACLFR +acegklstuvwx +ARG +ASKNAME +AUTOBOOT +Addr +Arg +BADSIG +Bpt +Buf +CHROOT +CPU +Chme +Chms +Chmu +Chroot +DARPA +DECOVF +DEFERSIG +DFL +DGRAM +DOFLAG +DONTBLOCK +DOPT +Dirname +Dopt +E2BIG +EACCESS +EADDRINUSE +EADDRNOTAVAIL +EAFNOSUPPORT +EALREADY +ECHLID +ECONNABORTED +ECONNREFUSED +ECONNRESET +EDESTADDRREQ +EINPROGRESS +EINTRY +EISCONN +ELOOP +EMSGSIZE +EMSGSIZZE +ENAMETOOLONG +ENETDOWN +ENETRESET +ENETUNREACH +ENOBUFS +ENOPROTOOPT +ENOTCONN +ENOTEMPTY +ENOTSOCK +EOPNOSUPPORT +EOPNOTSUPP +EPFNOSUPPORT +EPROTONOSUPPORT +EPROTOTYPE +ESHUTDOWN +ESOCKTNOSUPPORT +ETIMEDOUT +EWOULDBLOCK +Envp +FAPPEND +FCREATE +FEXLOCK +FILENAME +FIOCLEX +FIONBIO +FIONCLEX +FIONREAD +FLTDIV +FLTOVF +FLTUND +FNBLOCK +FPE +FRDONLY +FRDWR +FSHLOCK +FSIZE +FSYNC +FTRUNCATE +FUNLOCK +FWRONLY +Fchmod +Fchown +Fd +Febuary +Fromlen +Fstat +Fsync +Ftruncate +Func +GETDOPT +GETDTABLESIZE +GETGID +GETGROUPS +GETHOSTID +GETHOSTNAME +GETITIMER +GETPAGESIZE +GETPRIORITY +GETRLIMIT +GETRUSAGE +GETSOCKNAME +GETSOCKOPT +GETTIMEOFDAY +Getgid +Getgroups +Gethostid +Gethostname +Getpagesize +Getppid +Getpriority +Getrusage +Getsockname +Gettimeofday +Howto +ID's +IEXEC +IFBLK +IFCHR +IFDIR +IFLNK +IFMT +IFREG +IFSOCK +IGN +IMPLINK +INCR +INET +INTDIV +INTOVF +IREAD +ISGID +ISUID +ISVTX +ITIMER +IWRITE +Iovcnt +Lstat +MADV +MADVISE +MINCORE +MMAP +MPROTECT +MREMAP +MSG +MUNMAP +Madvise +Mincore +Mmap +Mprotect +Mremap +Munmap +NGRPS +NODEV +Name1 +Name2 +OOB +Oldd +Othewise +PATHNAME +PGRP +PKTSTREAM +PRIO +PRIVIN +PROC +PROT +PSL +Param +Prio +Proc0 +Proc1 +Proc2 +READLINK +RECV +RLIMIT +RSS +RUSAGE +Readlink +Readv +Recv +Recvmsg +SETGROUPS +SETREGID +SETREUID +SIG +SIGALRM +SIGBUS +SIGCHLD +SIGCONT +SIGDOPAUSE +SIGDORTI +SIGEMT +SIGFPE +SIGHUP +SIGILL +SIGINT +SIGIO +SIGIOT +SIGKILL +SIGNALPGRP +SIGNALPROC +SIGPIPE +SIGPROF +SIGQUIT +SIGSEGV +SIGSTOP +SIGTERM +SIGTRAP +SIGTSTP +SIGTTIN +SIGTTOU +SIGURG +SIGVTALRM +SIGXCPU +SIGXFSZ +SIOCGPGRP +SIOCSPGRP +SOCKETPAIR +SOF +STK +SUBRNG +SYMLINK +SYSCALL +Sbrk +Sendmsg +Setgroups +Sethostid +Sethostname +Sig +Sstk +Stk +Swapoff +Syscall +THe +TIOCGPGRP +TIOCSPGRP +Tvp +UDP +UID +Unpriviledged +VAX +WILLNEED +WNOHANG +WONTNEED +WUNTRACED +Writev +XTND +Acos +Alphasort +Arg +Argv +Asctime +Asin +Atan +Atan2 +Atoi +BSD +BSTRING +BUFSIZ +BYTEORDER +Bcmp +Bcopy +Bis +Bp +Bzero +CBREAK +CallingHost +Calloc +Closedir +Closelog +Closepl +Clrerr +Compar +DARPA +DASI +DFL +DISKTAB +DNDEBUG +DST +Dptr +Dtime +EOF +ETIME +Endfsent +Endgrent +Endhostent +Endnetent +Endprotoent +Endservent +Envp +Etext +FDATE +FSNMLG +Fabs +Fcvt +Fdate +Feof +Fflush +Fgetc +Fgets +Fileno +Firstkey +Fprintf +Fputc +Fputs +Fscanf +Ftell +Func +Fwrite +GETDISKBYNAME +GETFSENT +GETHOSTENT +GETLOG +GETNETENT +GETPROTOENT +GETSERVENT +GETWD +GSI +Gcvt +Gerror +Getchar +Getdiskbyname +Getfsent +Getfsspec +Gethostbyname +Gethostent +Getlog +Getnetbyname +Getnetent +Getprotobyname +Getprotoent +Getpwuid +Getservbyname +Getservent +Getw +Getwd +Gtty +HPIB +IDATE +IGN +INET +INFO +INITGROUPS +ITIMER +Idate +Ierrno +Initgroups +Initstate +Irand +Isascii +Isatty +Itime +LIB2648 +LOC +LTOSTOP +Ldexp +Lib2648 +Lnblnk +Localtime +Lowpc +Lshift +Ltime +MAXPATHLEN +MAXUINT +Modf +Moncontrol +Monstartup +Msg +NSIG +Name1 +Name2 +Nbytes +OOPS +Opendir +Openlog +Openpl +PDP +PDP11 +PDP11's +PID +PSIGNAL +Pclose +Pid +Psignal +Putchar +Putw +RCMD +REXEC +Rcmd +Readdir +Realloc +Rewinddir +Rexec +Rresvport +Rshift +Ruserok +SALERT +SCANDIR +SIG +SIGALRM +SIGCHLD +SIGCONT +SIGFPE +SIGTSTP +SIGTTIN +SIGTTOU +Scandir +Seekdir +Sep +Setbit +Setbuffer +Setfsent +Sethostent +Setlinebuf +Setnetent +Setprotoent +Setservent +Setstate +Sighold +Sigignore +Signum +Sigpause +Sprintf +Sqrt +Sscanf +Strcat +Strcmp +Strcpy +Strlen +Strncat +Strncmp +Strncpy +Syslog +TIOCGETP +TIOCGPGRP +TIOCSETP +TIOCSPGRP +TRAPER +TRAPOV +TTYNAM +TW +Telldir +Tgetent +Tgetflag +Tgetnum +Tgetstr +Tgoto +Timezone +Tputs +Ttynam +Ttyslot +VARARGS +VAX +VAX'en +Vax +Vfree +XTABS +ACC +ACU +AF +ALLDELAY +ASKNAME +AUTOCONF +BBN +BSDELAY +BSP +BUFSIZ +Backoff +Berknet +CBREAK +CHAN +CPU +CRDELAY +CRMOD +CSS +CT +CTL +Crt +DARPA +DDCMP +DGRAM +DKIOCFORMAT +DMA +DMA'ed +DMC +DMF +DMR +DN +DOSTOP +DTABT +Datagram +Diablo +Diskette +EADDRINUSE +EADDRNOTAVAIL +EC +ECC +ECONNREFUSED +ECONNRESET +EISCONN +ENETDOWN +ENOBUFS +ENOTCONN +ETIMEDOUT +EVENP +EXTA +EXTB +Emulex +Ethernet +Existant +FIONREAD +FLUSHREAD +FLUSHWRITE +GETADDR +Glaser +HK +HY +Hardcopy +Hazeltine +Hazeltines +ICMP +IK +IL +IMPLINK +INADDR +INET +IP +IPPROTO +ISHT +ISMT +ISTM +ISTS +ISUT +Ik +Ikonas +Krull +LCASE +LCRTBS +LCRTERA +LCRTKIL +LCRTKILL +LCTLECH +LDECCTQ +LDISC +LETXACK +LFLUSHO +LINTRUP +LLITOUT +LMDMBUF +LNOHANG +LPENDIN +LPRTERA +LTILDE +LTOSTOP +MASSBUS +MBEXC +ML11A +ML11B +MPSIZE +MSCP +MT +MTBSF +MTBSR +MTFSF +MTFSR +MTIOCGET +MTIOCTOP +MTNOP +MTOFFL +MTREW +MTWEOF +N.B +NCC +NDMAXDATA +NDMAXIO +NDMAXPACKS +NDOPCODE +NDOPDONE +NDOPERROR +NDOPREAD +NDOPWAIT +NDOPWRITE +NDXTIMER +NETLDISC +NEX +NEXUS +NLDELAY +NOOP +NOSTOP +NSC +NTTYDISC +NXM +ODDP +ODT +OFFLINE +OTTYDISC +PDP11's +PRIBIO +PROM +PSAUTOMAP +PSAUTOREFRESH +PSDOUBLEBUFFER +PSGETADDR +PSSINGLEBUFFER +PSSINGLEMAP +PSSINGLEREFRESH +PSSTOPMAP +PSSTOPREFRESH +PSTIMEREFRESH +PSWAITMAP +PSWAITREFRESH +PTY +PUPPROTO +Proteon +Quadracall +RDM +RECVD +RK07's +RTF +RX +RX02's +SDI +SIGHUP +SIGINT +SIGQUIT +SIGTINT +SIGTSTP +SIGTTIN +SIGTTOU +SIOCADDRT +SIOCDELRT +SMD +TAB0 +TAB1 +TAB2 +TBDELAY +TCP +TIMEREFRESH +TIOCCBRK +TIOCCDTR +TIOCEXCL +TIOCFLUSH +TIOCGETC +TIOCGETD +TIOCGETP +TIOCGLTC +TIOCGPGRP +TIOCHPCL +TIOCLBIC +TIOCLBIS +TIOCLGET +TIOCLSET +TIOCNXCL +TIOCPKT +TIOCREMOTE +TIOCSBRK +TIOCSDTR +TIOCSETC +TIOCSETD +TIOCSETN +TIOCSETP +TIOCSLTC +TIOCSPGRP +TIOCSTART +TIOCSTI +TIOCSTOP +TS +TU +Tchars +Terminet +UCB +UDA +UDP +UNIBUS +UT +Ungermann +VAX +VAX'en +VAX's +VPLOT +VSETSTATE +VTDELAY +VV +Versatec +WAITINT +WIRECENTER +Wirecenter +XTABS +ACCTHI +ACCTLO +ACOMPAT +ACORE +ADDR +ADM +AFORK +ARFMAG +ARMAG +ASU +AXSIG +BCOMM +BIZCOMP +BSIZE +BSS +BUFSIZ +Chksum +DARPA +DECtape +DEV +DIRBLKSIZ +DISKTAB +DM2500,H2000 +DUMPINFMT +DUMPOUTFMT +Datamedia's +Disktab +ECOML +ECOMM +EE:ta +EK:xn +ENH +EXT +Ee:so +FNAME +FS +FSNMLG +FSTAB +FSTABARG +FSTABFMT +FSTABNARGS +Fs +GSYM +Hardcopy +Hazeltine +ID's +INODE +INOPB +Inode +Keypad +Kj +LBRAC +LCSYM +LENG +LSYM +Linkflag +MAXBPC +MAXBPG +MAXBSIZE +MAXCPG +MAXCSBUFS +MAXIPG +MAXMNTLEN +MAXNAMLEN +MINBSIZE +MLEN +MSIZ +Maxx +Mime +Mtime +N.B +NAMSIZ +NBPI +NIC +NINDIR +NRPOS +NSPF +NTREC +Newline +PRINTCAP +PSYM +Perkin +Presotto +RBRAC +RSYM +SARMAG +SBSIZE +SENDMAIL +SLINE +SSYM +STSYM +Siegler +Stab.h +Standout +TBLOCK +TVI +Teleray +UNDF +UPAGES +Uid +Umount +Upline +Uudecode +VGRINDEFS +Versatec +Vgrindefs +Xl +Zk +ATPB +Allman +BR +Backslash +Bournes +Bros +ELIZA +EOF +Foderaro +Fourr +HJKL +Heuer +Hoyle +Lebling +McKusick +Mikey +PD +RUBOUT +Rogerian +Rubout +SEFC +VAX +VMS +Weizenbaum +Wumpus +Yendor +ARPANET +Adm +Allman +Berkeley.ARPA +Berknet +Bitnet +CSNET +DARPA +DASI +DIABLO +DTC +EXINIT +Ethernet +GSI +L.sys +LOGFILE +MAILADDR +MAKEDEV +MAKEDEV.local +MASBUS +MULTICS +Nofill +PP +RA +RC +Reg +SM +Seigler +ADDR +ALLO +APPE +ARPANET +BAD144 +BADSECT +BPI +Babaoglu +Bad144 +Badsect +Bcc +BerkNet +Berknet +Blksize +CADDR +CCNT +CHM +CLKT +CNT +COMSAT +CONFIG +CPU +CPU's +CRIT +CRMOD +CWD +Catchall +Cifplot +Comsat +Config +Cory +Countdown +Crontab +DADDR +DARPA +DBA0 +DELE +DEV +DFUNNY +DHAHA +DISKPART +DMA +DMA0 +DRA0 +DSK +DUMPFS +Dept +Dev +Diskpart +Dumpfs +ECC +EECS +EMERG +EMULEX +ESSAA +EVRAC +FASTBOOT +FLG +FTPD +FUNNY,HAHA +Fastboot +Formatted +Fragsize +Ftpd +HKM +HKS +HPM +HPS +HTABLE +HUP +Hostname +Htable +ICMP +ID's +IDC +ILES +IMPLOGD +INADDR +INFO +INIT +INO +IPC +IPL +IPTR +Implogd +Init's +Inode +Intransit +KGMON +KSP +Kgmon +Kovacs +Kovacs,508E,7925,6428202 +LOC +LPD +Leffler +Lpd +MAKEDEV +MAKEDEV.local +MAPEN +MASSBUS +MIN +MKLOST +MKPROTO +MTIOCGET +MTIOCOP +McKusick +Minfree +Mkproto +N.B +NCP +NETLDISC +NEWFS +NI +NIC +NLK +NLST +NOHOST +NOOP +NOUSER +NPR +NTTYDISC +Ncpg +Newfs +Nsect +Ntrack +OSERR +OTTYDISC +Ozalp +PAC +PCB +PGRP +PID +POIP +PPID +PRI +PRIO +PST +Pac +Pprinter +Prototocol +RC +RDC +RDUMP +RETR +REXECD +RFC +RFC733 +RFC819 +RFC821 +RFC822 +RK07 +RK07's +RLOGIND +RM0X +RMT +RNFR +RNTO +RP0X +RRESTOR +RSHD +RSS +RWHOD +Rc +Rc.local +Rdump +Rexecd +Rlogind +Rmt +Rrestor +Rshd +Rwhod +SALERT +SAVECORE +SBI +SEC:PACKINIT +SENDMAIL +SIGHUP +SIOCADDRT +SIOCDELRT +SIZ +SLP +SMTP +SRSS +SSE +STOR +STRU +Savecore +Sendmail +Sklower +Syslog +TCP +TE16,TU45,TU77 +TELNET +TELNETD +TEMPFAIL +TEXTP +TFTP +TFTPD +TRPT +TSTP +TUNEFS +Telnetd +Tftpd +Trpt +Tunefs +UCB +UDA50 +UDP +UID +UNIBUS +UPM +Umount +VAX +VAX730 +VAX750 +VAX780 +VAXWELL +VIPW +Vax +Vaxwell +Vipw +Vplot +WCHAN +WRC +XCUP +XCWD +XMKD +XPWD +XRMD +XSIS +XTABS diff --git a/share/man/tools/tocrc b/share/man/tools/tocrc new file mode 100755 index 0000000..1d50a05 --- /dev/null +++ b/share/man/tools/tocrc @@ -0,0 +1,114 @@ +MANDIR=/usr/man +TMPDIR=/usr/man/tmp +TOOLS=$MANDIR/tools + +trap "rm $TMPDIR/tmp.$$ ; exit" 2 3 15 + +P=108 +p="" +if test "$1" = "-p" +then + P=65 + p=-p + shift +fi + +if test $# -eq 0 +then + echo "tocrc: no argument" + exit +fi + +if test $# -eq 2 +then + : create toc input file for one section only + + > $TMPDIR/tocx$1 + for file in $MANDIR/man$1/*.$1* + do + if test ! -s $file + then + continue + fi + so=`line < $file | sed "s/ .*//"` + if test "$so" = ".so" + then + continue + fi + ed - $file > $TMPDIR/tmp.$$ <<! + H + /^\.TH/p + q +! + loc=`cat $TMPDIR/tmp.$$ | sed "s/.*local.*/local/"` + if test "$loc" = "local" + then + continue + fi + name=`basename $file` + name=`echo $name | sed "s/\.\(.\{1,2\}\)\$/(\1)/"` + ed - $file > $TMPDIR/tmp.$$ <<! + /^.SH NAME/+p + q +! + desc=`line < $TMPDIR/tmp.$$` + desc=`echo $desc | sed -e "s/.s-1//g" -e "s/.s0//g" -e "s/.s+1//g" -e "s/ .- /: /" -e "s/^/$name /" -e "s/$/./"` + if test -n "$desc" + then + echo $desc >> $TMPDIR/tocx$1 + fi + rm -f $TMPDIR/tmp.$$ + done +else case $1 in + all ) + : tocx files for all sections and everything else + + for x in 1 2 3 4 5 6 7 8 + do + $0 $p $x $x + done + $0 $p t + ;; + t ) + : permuted index and toc files + + if test ! -f $TMPDIR/tocx1 + then + echo "tocrc: some tocx? files missing" + exit + fi + cat $TMPDIR/tocx? > $TMPDIR/cattoc + ed - $TMPDIR/cattoc <<! + H + g/(1c)/s//(1C)/ + g/(1m)/s//(1M)/ + g/(1g)/s//(1G)/ + g/(3c)/s//(3C)/ + g/(3m)/s//(3M)/ + g/(3s)/s//(3S)/ + g/(3x)/s//(3X)/ + g/"\."/d + w + q +! + ptx -r -t -b $TOOLS/break -f -w $P -i $TOOLS/ignore $TMPDIR/cattoc $MANDIR/man0/ptxx + for x in 1 2 3 4 5 6 7 8 + do + ed - $TMPDIR/tocx$x << ! + H + /^intro/m0 + 1,\$s/ .*:// + 1,\$s/.$// + 1,\$s/([1-8][a-z]\{0,1\}) /" "/ + 1,\$s/.*/.xx "&"/ + g/""/d + w $MANDIR/man0/toc$x + q +! + done + ;; + * ) + $0 $p $1 $1 + ;; + esac +fi |