Research V7 development
authorKen Thompson <ken@research.uucp>
Wed, 10 Jan 1979 20:17:44 +0000 (15:17 -0500)
committerKen Thompson <ken@research.uucp>
Wed, 10 Jan 1979 20:17:44 +0000 (15:17 -0500)
Work on file usr/man/man5/acct.5
Work on file usr/man/man5/a.out.5
Work on file usr/man/man5/dir.5
Work on file usr/man/man5/ar.5
Work on file usr/man/man5/core.5
Work on file usr/man/man5/dump.5
Work on file usr/man/man5/passwd.5
Work on file usr/man/man5/filsys.5
Work on file usr/man/man5/tp.5
Work on file usr/man/man5/utmp.5
Work on file usr/man/man5/types.5
Work on file usr/man/man5/group.5
Work on file usr/man/man5/environ.5
Work on file usr/man/man5/plot.5
Work on file usr/man/man5/mtab.5
Work on file usr/man/man5/ttys.5
Work on file usr/man/man6/bcd.6
Work on file usr/man/man6/backgammon.6
Work on file usr/man/man6/arithmetic.6
Work on file usr/man/man6/banner.6
Work on file usr/man/man6/bj.6
Work on file usr/man/man6/chess.6
Work on file usr/man/man6/ching.6
Work on file usr/man/man6/cubic.6
Work on file usr/man/man6/words.6
Work on file usr/man/man6/maze.6
Work on file usr/man/man6/moo.6
Work on file usr/man/man6/quiz.6
Work on file usr/man/man6/ttt.6
Work on file usr/man/man6/reversi.6
Work on file usr/man/man6/wump.6
Work on file usr/man/man6/checkers.6
Work on file usr/man/man7/man.7
Work on file usr/man/man7/ascii.7

Co-Authored-By: Dennis Ritchie <dmr@research.uucp>
Synthesized-from: v7

34 files changed:
usr/man/man5/a.out.5 [new file with mode: 0644]
usr/man/man5/acct.5 [new file with mode: 0644]
usr/man/man5/ar.5 [new file with mode: 0644]
usr/man/man5/core.5 [new file with mode: 0644]
usr/man/man5/dir.5 [new file with mode: 0644]
usr/man/man5/dump.5 [new file with mode: 0644]
usr/man/man5/environ.5 [new file with mode: 0644]
usr/man/man5/filsys.5 [new file with mode: 0644]
usr/man/man5/group.5 [new file with mode: 0644]
usr/man/man5/mtab.5 [new file with mode: 0644]
usr/man/man5/passwd.5 [new file with mode: 0644]
usr/man/man5/plot.5 [new file with mode: 0644]
usr/man/man5/tp.5 [new file with mode: 0644]
usr/man/man5/ttys.5 [new file with mode: 0644]
usr/man/man5/types.5 [new file with mode: 0644]
usr/man/man5/utmp.5 [new file with mode: 0644]
usr/man/man6/arithmetic.6 [new file with mode: 0644]
usr/man/man6/backgammon.6 [new file with mode: 0644]
usr/man/man6/banner.6 [new file with mode: 0644]
usr/man/man6/bcd.6 [new file with mode: 0644]
usr/man/man6/bj.6 [new file with mode: 0644]
usr/man/man6/checkers.6 [new file with mode: 0644]
usr/man/man6/chess.6 [new file with mode: 0644]
usr/man/man6/ching.6 [new file with mode: 0644]
usr/man/man6/cubic.6 [new file with mode: 0644]
usr/man/man6/maze.6 [new file with mode: 0644]
usr/man/man6/moo.6 [new file with mode: 0644]
usr/man/man6/quiz.6 [new file with mode: 0644]
usr/man/man6/reversi.6 [new file with mode: 0644]
usr/man/man6/ttt.6 [new file with mode: 0644]
usr/man/man6/words.6 [new file with mode: 0644]
usr/man/man6/wump.6 [new file with mode: 0644]
usr/man/man7/ascii.7 [new file with mode: 0644]
usr/man/man7/man.7 [new file with mode: 0644]

diff --git a/usr/man/man5/a.out.5 b/usr/man/man5/a.out.5
new file mode 100644 (file)
index 0000000..adb2c35
--- /dev/null
@@ -0,0 +1,159 @@
+.TH A.OUT 5 
+.SH NAME
+a.out \- assembler and link editor output
+.SH SYNOPSIS
+.B #include <a.out.h>
+.SH DESCRIPTION
+.I A.out
+is the output file of the assembler
+.IR as (1)
+and the link editor
+.IR ld (1).
+Both programs make
+.I a.out
+executable if there were no
+errors and no unresolved external references.
+Layout information as given in the include file for the PDP11 is:
+.PP
+.nf
+.ta 8n +9n +11n
+.PP
+.so /usr/include/a.out.h
+.fi
+.PP
+The file has four sections:
+a header, the program and data text,
+relocation information, and a symbol table
+(in that order).
+The last two may be empty
+if the program was loaded
+with the `\-s' option
+of
+.I ld
+or if the symbols and relocation have been
+removed by
+.IR strip (1).
+.PP
+In the header the sizes of each section are given in bytes, but are even.
+The size of the header is not included in any of the other sizes.
+.PP
+When an
+.I a.out
+file is loaded into core for execution, three logical segments are
+set up: the text segment, the data segment
+(with uninitialized data, which starts off as all 0, following
+initialized),
+and a stack.
+The text segment begins at 0
+in the core image; the header is not loaded.
+If the magic number in the header is 0407(8), it indicates that the text
+segment is not to be write-protected and shared,
+so the data segment is immediately contiguous
+with the text segment.
+If the magic number is 0410,
+the data segment begins at the first 0 mod 8K byte
+boundary following the text segment,
+and the text segment is not writable by the program;
+if other processes are executing the same file,
+they will share the text segment.
+If the magic number is 411,
+the text segment is again pure, write-protected, and shared,
+and moreover instruction and data space are separated;
+the text and data segment both begin at location 0.
+If the magic number is 0405, the text segment
+is overlaid on an existing (0411 or 0405) text segment
+and the existing data segment is preserved.
+.PP
+The stack will occupy the highest possible locations
+in the core image: from 0177776(8) and growing downwards.
+The stack is automatically extended as required.
+The data segment is only extended as requested by
+.IR brk (2).
+.PP
+The start of the text segment in the file is 020(8);
+the start of the data segment is 020+S\s6\dt\u\s10 (the size of the text)
+the start of the relocation information is
+020+S\s6\dt\u\s10+S\s6\dd\u\s10;
+the start of the symbol table is
+020+2(S\s6\dt\u\s10+S\s6\dd\u\s10)
+if the
+relocation information is present,
+020+S\s6\dt\u\s10+S\s6\dd\u\s10
+if not.
+.PP
+The layout of a symbol table entry and the principal flag values
+that distinguish symbol types are given in the include file.
+Other flag values may occur if an assembly language program
+defines machine instructions.
+.PP
+If a symbol's type is undefined external,
+and the value field is non-zero,
+the symbol is interpreted by the loader
+.I ld
+as
+the name of a common region
+whose size is indicated by the value of the
+symbol.
+.PP
+The value of a word in the text or data portions which is not
+a reference to an undefined external symbol
+is exactly that value which will appear in core
+when the file is executed.
+If a word in the text or data portion
+involves a reference to an undefined external symbol,
+as indicated by the relocation information
+for that word,
+then the value of the word as stored in the file
+is an offset from the associated external symbol.
+When the file is processed by the
+link editor and the external symbol becomes
+defined, the value of the symbol will
+be added into the word in the file.
+.PP
+If relocation
+information is present, it amounts to one word per
+word of program text or initialized data.
+There is no relocation information if the `relocation info stripped'
+flag in the header is on.
+.PP
+Bits 3-1 of a relocation word indicate the segment referred
+to by the text or data word associated with the relocation
+word:
+.TP
+000
+absolute number
+.br
+.ns
+.TP
+002
+reference to text segment
+.br
+.ns
+.TP
+004
+reference to initialized data
+.br
+.ns
+.TP
+006
+reference to uninitialized data (bss)
+.br
+.ns
+.TP
+010
+reference to undefined external symbol
+.PP
+Bit 0 of the relocation word indicates, if 1,
+that the
+reference is relative to the pc (e.g. `clr x');
+if 0,
+that
+the reference is to the actual symbol (e.g.,
+`clr *$x').
+.PP
+The remainder of the relocation word (bits 15-4)
+contains a symbol number in the case of external
+references, and is unused otherwise.
+The first symbol is numbered 0, the second 1, etc.
+.SH "SEE ALSO"
+as(1), ld(1), nm(1)
diff --git a/usr/man/man5/acct.5 b/usr/man/man5/acct.5
new file mode 100644 (file)
index 0000000..200e8a0
--- /dev/null
@@ -0,0 +1,28 @@
+.TH ACCT 5
+.SH NAME
+acct \- execution accounting file
+.SH SYNOPSIS
+.B #include <sys/acct.h>
+.SH DESCRIPTION
+.IR Acct (2)
+causes entries to be made into an accounting file
+for each process that terminates.
+The accounting file is a sequence of entries whose layout,
+as defined by the include file
+is:
+.PP
+.nf
+.ta \w'typedef 'u +\w'comp_t  'u +\w'ac_comm[10]; 'u
+.so /usr/include/sys/acct.h
+.fi
+.PP
+If the process does an
+.IR exec (2),
+the first 10 characters of the filename appear in
+.I ac_comm.
+The accounting flag contains bits indicating whether
+.IR exec (2)
+was ever accomplished, and whether the
+process ever had super-user privileges.
+.SH SEE ALSO
+acct(2), sa(1)
diff --git a/usr/man/man5/ar.5 b/usr/man/man5/ar.5
new file mode 100644 (file)
index 0000000..bee6b35
--- /dev/null
@@ -0,0 +1,47 @@
+.TH AR 5 
+.SH NAME
+ar \- archive (library) file format
+.SH SYNOPSIS
+.B #include <ar.h>
+.SH DESCRIPTION
+The archive command
+.I ar
+is used to combine several files into
+one.
+Archives are used mainly as libraries to be searched
+by the link-editor
+.I ld.
+.PP
+A file produced by
+.I ar
+has a magic number at the start,
+followed by the constituent files, each preceded by a file header.
+The magic number and header layout as described in the
+include file are:
+.RS
+.PP
+.nf
+.ta \w'#define 'u +\w'ARMAG 'u
+.so /usr/include/ar.h
+.fi
+.RE
+.LP
+The name is a null-terminated string; the date is in the
+form of
+.IR time (2);
+the user ID and group ID are numbers; the mode is a bit pattern
+per
+.IR chmod (2);
+the size is counted in bytes.
+.PP
+Each file begins on a word boundary;
+a null byte is inserted between files if necessary.
+Nevertheless the size given reflects the
+actual size of the file exclusive of padding.
+.PP
+Notice there is no provision for empty areas in an archive
+file.
+.SH "SEE ALSO"
+ar(1), ld(1), nm(1)
+.SH BUGS
+Coding user and group IDs as characters is a botch.
diff --git a/usr/man/man5/core.5 b/usr/man/man5/core.5
new file mode 100644 (file)
index 0000000..deff5a6
--- /dev/null
@@ -0,0 +1,36 @@
+.TH CORE 5 
+.SH NAME
+core \- format of core image file
+.SH DESCRIPTION
+UNIX
+writes out a core image of a terminated
+process when any of various errors occur.
+See
+.IR signal (2)
+for the list of reasons;
+the most common are memory violations, illegal
+instructions, bus errors, and user-generated
+quit signals.
+The core image is called `core' and is written in the process's
+working directory (provided it can be; normal
+access controls apply).
+.PP
+The first 1024 bytes of the core image
+are a copy of the system's per-user
+data for the process, including the registers
+as they were at the time of the fault;
+see the system listings for the format of this area.
+The
+remainder represents the actual contents of
+the user's core area when the core image
+was written.
+If the text segment
+is write-protected and shared,
+it is not dumped; otherwise the entire
+address space is dumped.
+.PP
+In general the debugger
+.IR adb (1)
+is sufficient to deal with core images.
+.SH "SEE ALSO"
+adb(1), signal(2)
diff --git a/usr/man/man5/dir.5 b/usr/man/man5/dir.5
new file mode 100644 (file)
index 0000000..c80ed62
--- /dev/null
@@ -0,0 +1,36 @@
+.TH DIR 5 
+.SH NAME
+dir \- format of directories
+.SH SYNOPSIS
+.B #include <sys/dir.h>
+.SH DESCRIPTION
+A directory
+behaves exactly like an ordinary file, save that no
+user may write into a directory.
+The fact that a file is a directory is indicated by
+a bit in the flag word of its i-node entry
+see,
+.IR filsys (5).
+The structure of a directory entry as given in the
+include file is:
+.RS
+.ta 8n +6n
+.PP
+.nf
+.so /usr/include/sys/dir.h
+.fi
+.RE
+.PP
+By convention, the first two entries in each directory
+are for `\fB.\fR' and `\fB..\fR'.  The first is an entry for the
+directory itself.  The second is for the parent
+directory.
+The meaning of `\fB..\fR' is modified for the root directory
+of the master file system and for the root directories of removable
+file systems.
+In the first case, there is no parent, and in the second,
+the system does not permit off-device references.
+Therefore in both cases `\fB..\fR' has the
+same meaning as `\fB.\fR'.
+.SH "SEE ALSO"
+filsys(5)
diff --git a/usr/man/man5/dump.5 b/usr/man/man5/dump.5
new file mode 100644 (file)
index 0000000..d3639e7
--- /dev/null
@@ -0,0 +1,176 @@
+.TH DUMP 5 
+.SH NAME
+dump, ddate \- incremental dump format
+.SH SYNOPSIS
+.B #include <sys/types.h>
+.br
+.B #include <sys/ino.h>
+.br
+.B # include <dumprestor.h>
+.SH DESCRIPTION
+Tapes used by
+.I dump
+and
+.IR restor (1)
+contain:
+.nf
+.IP ""
+a header record
+two groups of bit map records
+a group of records describing directories
+a group of records describing files
+.fi
+.PP
+The format of the header record and of the first
+record of each description as given in the
+include file
+.I <dumprestor.h>
+is:
+.PP
+.nf
+.ta .5i \w'#define\ TS_INODE\ 'u
+.so /usr/include/dumprestor.h
+.fi
+.PP
+.I NTREC
+is the number of 512 byte records in a physical
+tape block.
+.I MLEN
+is the number of bits in a bit map word.
+.I MSIZ 
+is the number of bit map words.
+.PP
+The
+.I TS_
+entries are used in the
+.I c_type
+field to indicate what sort of header
+this is.
+The types and their meanings are as follows:
+.TP \w'CHECKSUM\|'u
+TS_TAPE
+Tape volume label
+.PD 0
+.TP
+TS_INODE
+A file or directory follows.
+The
+.I c_dinode
+field is a copy of the disk inode and contains
+bits telling what sort of file this is.
+.TP
+TS_BITS
+A bit map follows.
+This bit map has a one bit
+for each inode that was dumped.
+.TP
+TS_ADDR
+A subrecord of a file description.
+See
+.I c_addr
+below.
+.TP
+TS_END
+End of tape record.
+.TP
+TS_CLRI
+A bit map follows.
+This bit map contains a zero bit for
+all inodes that were empty on the file system when dumped.
+.TP
+MAGIC
+All header records have this number in
+.I c_magic.
+.TP
+CHECKSUM
+Header records checksum to this value.
+.PD
+.PP
+The fields of the header structure are as follows:
+.TP \w'TS_INODE\ 'u
+c_type
+The type of the header.
+.PD 0
+.TP
+c_date
+The date the dump was taken.
+.TP
+c_ddate
+The date the file system was dumped from.
+.TP
+c_volume
+The current volume number of the dump.
+.TP
+c_tapea
+The current number of this (512-byte) record.
+.TP
+c_inumber
+The number of the inode being dumped if this
+is of type
+.I TS_INODE.
+.TP
+c_magic
+This contains the value
+.I MAGIC
+above, truncated as needed.
+.TP
+c_checksum
+This contains whatever value is needed to
+make the record sum to 
+.I CHECKSUM.
+.TP
+c_dinode
+This is a copy of the inode as it appears on the
+file system; see
+.IR filsys (5).
+.TP
+c_count
+The count of characters in
+.I c_addr.
+.TP
+c_addr
+An array of characters describing the blocks of the
+dumped file.
+A character is zero if the block associated with that character was not
+present on the file system, otherwise the character is non-zero.
+If the block was not present on the file system, no block was dumped;
+the block will be restored as a hole in the file.
+If there is not sufficient space in this record to describe
+all of the blocks in a file,
+.I TS_ADDR
+records will be scattered through the file, each one
+picking up where the last left off.
+.PD
+.PP
+Each volume except the last ends with a tapemark (read as an end
+of file).
+The last volume ends with a
+.I TS_END
+record and then the tapemark.
+.PP
+The structure
+.I idates
+describes an entry of the file
+.I /etc/ddate
+where dump history is kept.
+The fields of the structure are:
+.TP \w'TS_INODE\ 'u
+id_name
+The dumped filesystem is
+.RI `/dev/ id_nam'.
+.PD 0
+.TP
+id_incno
+The level number of the dump tape;
+see
+.IR dump (1).
+.TP
+id_ddate
+The date of the incremental dump in system format
+see
+.IR types (5).
+.PD
+.SH FILES
+/etc/ddate
+.SH "SEE ALSO"
+dump(1), dumpdir(1), restor(1), filsys(5), types(5)
diff --git a/usr/man/man5/environ.5 b/usr/man/man5/environ.5
new file mode 100644 (file)
index 0000000..baf7c53
--- /dev/null
@@ -0,0 +1,54 @@
+.TH ENVIRON 5
+.SH NAME
+environ \- user environment
+.SH SYNOPSIS
+.B extern char **environ;
+.SH DESCRIPTION
+An array of strings called the `environment' is
+made available by
+.IR exec (2)
+when a process begins.
+By convention these strings have the form
+`name=value'.
+The following names are used by various commands:
+.TP
+PATH
+The sequence of directory prefixes that
+.I sh, time,
+.IR nice (1),
+etc.,
+apply in searching for a file known by an incomplete path name.
+The prefixes are separated by `:'.
+.IR Login (1)
+sets PATH=:/bin:/usr/bin.
+.TP
+HOME
+A user's login directory, set by
+.IR login (1)
+from the password file
+.IR passwd (5).
+.TP
+TERM
+The kind of terminal for which output is to be prepared.
+This information is used by commands, such as
+.I nroff
+or
+.IR plot (1),
+which may exploit special terminal capabilities.
+See
+.IR term (7)
+for a list of terminal types.
+.PP
+Further names may be placed in the environment by
+the
+.I export
+command and `name=value' arguments in
+.IR sh (1),
+or by 
+.IR exec (2).
+It is unwise to conflict with
+certain Shell variables that are frequently exported by
+`.profile' files:
+MAIL, PS1, PS2, IFS.
+.SH SEE ALSO
+exec(2), sh(1), term(7), login(1)
diff --git a/usr/man/man5/filsys.5 b/usr/man/man5/filsys.5
new file mode 100644 (file)
index 0000000..9f1baa9
--- /dev/null
@@ -0,0 +1,254 @@
+.TH FILSYS  5
+.SH NAME
+filsys, flblk, ino \- format of file system volume
+.SH SYNOPSIS
+.B #include <sys/types.h>
+.br
+.B #include <sys/flbk.h>
+.br
+.B #include <sys/filsys.h>
+.br
+.B #include <sys/ino.h>
+.SH DESCRIPTION
+Every
+file system storage volume
+(e.g. RF disk, RK disk, RP disk, DECtape reel)
+has a common format for certain vital information.
+Every such volume is divided into a certain number
+of 512-byte blocks.
+Block 0 is unused and is available to contain
+a bootstrap program, pack label, or other information.
+.PP
+Block 1 is the
+.I "super block."
+The layout of the super block as defined by the include file
+.I <sys/filsys.h>
+is:
+.PP
+.nf
+.ta \w'struct 'u +\w'daddr_t  'u +\w's_inode[NICINOD]; 'u
+.so /usr/include/sys/filsys.h
+.fi
+.PP
+.I S_isize
+is the address of the first block after the i-list,
+which starts just after the super-block, in block 2.
+Thus is i-list is
+.IR s_isize \-2
+blocks long.
+.I S_fsize
+is the address of the first block not potentially
+available for allocation
+to a file.
+These numbers are used by the system to
+check for bad block addresses;
+if an `impossible' block address is allocated from the free list
+or is freed,
+a diagnostic is written on the on-line console.
+Moreover, the free array is cleared, so as to prevent further
+allocation from a presumably corrupted free list.
+.PP
+The free list for each volume is maintained as
+follows.
+The
+.I s_free
+array contains, in
+.I "s_free[1], ... , s_free[s_nfree\-1],"
+up to NICFREE free block numbers.
+NICFREE is a configuration constant.
+.I S_free[0]
+is the block address of the head
+of a chain of blocks constituting the free list.
+The layout of each block of the free chain as defined
+in the include file
+.I <sys/fblk.h>
+is:
+.PP
+.nf
+.so /usr/include/sys/fblk.h
+.fi
+.PP
+The fields
+.I df_nfree
+and
+.I df_free
+in a free block are used exactly like
+.I s_nfree
+and 
+.I s_free
+in the super block.
+To allocate a block:
+decrement
+.I s_nfree,
+and the new block number is
+.I s_free[s_nfree].
+If the new block address is 0,
+there are no blocks left, so give an error.
+If
+.I s_nfree
+became 0,
+read the new block into
+.I s_nfree
+and 
+.I s_free.
+To free a block, check if
+.I s_nfree
+is NICFREE; if so,
+copy
+.I s_nfree
+and the
+.I s_free
+array into it,
+write it out, and set
+.I s_nfree
+to 0.
+In any event set
+.I s_free[s_nfree]
+to the freed block's address and
+increment
+.I s_nfree.
+.PP
+.I S_ninode
+is the number of free i-numbers in the
+.I s_inode
+array.
+To allocate an i-node:
+if
+.I s_ninode
+is greater than 0,
+decrement it and return
+.I s_inode[s_ninode].
+If it was 0, read the i-list
+and place the numbers of all free inodes
+(up to NICINOD) into the
+.I s_inode
+array,
+then try again.
+To free an i-node,
+provided
+.I s_ninode
+is less than NICINODE,
+place its number into
+.I s_inode[s_ninode]
+and increment
+.I s_ninode.
+If
+.I s_ninode
+is already NICINODE, don't bother to enter the freed i-node into any table.
+This list of i-nodes is only to speed
+up the allocation process; the information
+as to whether the inode is really free
+or not is maintained in the inode itself.
+.PP
+.I S_flock
+and
+.I s_ilock
+are flags maintained in the core
+copy of the file system
+while it is mounted
+and their values on disk are immaterial.
+The value of
+.I s_fmod
+on disk is likewise immaterial;
+it is used as a flag to indicate that the super-block has
+changed and should be copied to
+the disk during the next periodic update of file
+system information.
+.I S_ronly
+is a write-protection indicator; its disk value is also immaterial.
+.PP
+.I S_time
+is the last time the super-block of the file system was changed.
+During a reboot,
+.I s_time
+of the super-block for the root file system
+is used to set the system's idea of the time.
+.PP
+The fields
+.I s_tfree, s_tinode, s_fname
+and
+.I s_fpack
+are not currently maintained.
+.PP
+I-numbers begin at 1, and the storage for i-nodes
+begins in block 2.
+.tr |
+I-nodes are 64 bytes long, so 8 of them fit into a block.
+I-node 2 is reserved for the root directory of the file
+system, but no other i-number has a built-in
+meaning.
+Each i-node represents one file.
+The format of an i-node as given in the include file
+.I <sys/ino.h>
+is:
+.PP
+.nf
+.ta \w'#define 'u +\w'time_t  'u +\w'di_addr[40]; 'u
+.so /usr/include/sys/ino.h
+.fi
+.PP
+.I Di_mode
+tells the kind of file; it
+is encoded identically to the
+.I st_mode field of
+.IR stat (2).
+.I Di_nlink
+is the number of directory entries
+(links) that refer to this i-node.
+.I Di_uid
+and
+.I di_gid
+are the owner's user and group IDs.
+.I Size
+is the number of bytes in the file.
+.I Di_atime
+and
+.I di_mtime
+are the times of last access and modification
+of the file contents (read, write or create)
+(see
+.IR times (2));
+.I Di_ctime
+records the time of last modification
+to the inode or to the file, and is used
+to determine whether it should be dumped.
+.PP
+Special files are recognized by their modes
+and not by i-number.
+A block-type special file is one which
+can potentially be mounted as a file system;
+a character-type special file cannot, though it is
+not necessarily character-oriented.
+For special files, the 
+.I di_addr
+field is occupied by the device code
+(see
+.IR types (5)).
+The device codes
+of block and character special files overlap.
+.PP
+Disk addresses of plain files and directories
+are kept in the array
+.I di_addr
+packed into 3 bytes each.
+The first 10 addresses specify device blocks directly.
+The last 3 addresses are singly, doubly, and triply
+indirect and point to blocks of 128 block pointers.
+Pointers in indirect blocks have the type
+.I daddr_t
+(see
+.IR types (5)).
+.PP
+For block
+.I b
+in a file to exist,
+it
+is not necessary that all blocks less than
+.I b
+exist.
+A zero block number either in the address words of
+the i-node or in an indirect block indicates that the
+corresponding block has never been allocated.
+Such a missing block reads as if it contained all zero words.
+.SH "SEE ALSO"
+icheck(1), dcheck(1), dir(5), mount(1), stat(2), types(5)
diff --git a/usr/man/man5/group.5 b/usr/man/man5/group.5
new file mode 100644 (file)
index 0000000..8a05f33
--- /dev/null
@@ -0,0 +1,37 @@
+.TH GROUP 5 
+.SH NAME
+group \- group file
+.SH DESCRIPTION
+.I Group
+contains for each group the
+following information:
+.HP 10
+group name
+.br
+.ns
+.HP 10
+encrypted password
+.br
+.ns
+.HP 10
+numerical group ID
+.br
+.ns
+.HP 10
+a comma separated list of all users allowed in the group
+.PP
+This is an ASCII file.
+The fields are separated
+by colons;
+Each group is separated from the next by a new-line.
+If the password field is null, no password is demanded.
+.PP
+This file resides in directory /etc.
+Because of the encrypted
+passwords, it can and does have general read
+permission and can be used, for example,
+to map numerical group ID's to names.
+.SH FILES
+/etc/group
+.SH "SEE ALSO"
+newgrp(1), crypt(3), passwd(1), passwd(5)
diff --git a/usr/man/man5/mtab.5 b/usr/man/man5/mtab.5
new file mode 100644 (file)
index 0000000..2055d71
--- /dev/null
@@ -0,0 +1,34 @@
+.TH MTAB 5 
+.SH NAME
+mtab \- mounted file system table
+.SH DESCRIPTION
+.I Mtab
+resides in directory
+.I /etc
+and contains a table of devices mounted by the
+.I mount
+command.
+.I Umount
+removes entries.
+.PP
+Each entry is 64 bytes long;
+the first 32 are the null-padded name of the
+place where the special file is mounted;
+the second 32 are the null-padded name of the special
+file.
+The special file has all its directories
+stripped away;
+that is, everything through the last `/' is thrown
+away.
+.PP
+This table is present only so people can look at it.
+It does not matter to
+.I mount
+if there are duplicated entries nor
+to
+.I umount
+if a name cannot be found.
+.SH FILES
+/etc/mtab
+.SH "SEE ALSO"
+mount(1)
diff --git a/usr/man/man5/passwd.5 b/usr/man/man5/passwd.5
new file mode 100644 (file)
index 0000000..c418b2e
--- /dev/null
@@ -0,0 +1,53 @@
+.TH PASSWD 5 
+.SH NAME
+passwd \- password file
+.SH DESCRIPTION
+.I Passwd
+contains for each user the
+following information:
+.HP 10
+name (login name, contains no upper case)
+.br
+.ns
+.HP 10
+encrypted password
+.br
+.ns
+.HP 10
+numerical user ID
+.br
+.ns
+.HP 10
+numerical group ID
+.br
+.ns
+.HP 10
+GCOS job number, box number, optional GCOS user-id
+.br
+.ns
+.HP 10
+initial working directory
+.br
+.ns
+.HP 10
+program to use as Shell
+.PP
+This is an ASCII file.  Each field within each user's entry
+is separated from the next by a colon.
+The GCOS field is used only when communicating with that
+system, and in other installations can contain
+any desired information.
+Each user is separated from the next by a new-line.
+If the password field is null, no password is demanded;
+if the Shell field is null, the Shell itself
+is used.
+.PP
+This file resides in directory /etc.
+Because of the encrypted
+passwords, it can and does have general read
+permission and can be used, for example,
+to map numerical user ID's to names.
+.SH FILES
+/etc/passwd
+.SH "SEE ALSO"
+getpwent(3), login(1), crypt(3), passwd(1), group(5)
diff --git a/usr/man/man5/plot.5 b/usr/man/man5/plot.5
new file mode 100644 (file)
index 0000000..040c536
--- /dev/null
@@ -0,0 +1,118 @@
+.TH PLOT 5 
+.SH NAME
+plot \- graphics interface
+.SH DESCRIPTION
+Files of this format are produced by routines
+described in 
+.IR  plot (3),
+and are interpreted for various devices
+by commands described in
+.IR  plot (1).
+A graphics file is a stream of plotting instructions.
+Each instruction consists of an ASCII letter
+usually followed by bytes of binary information.
+The instructions are executed in order.
+A point is designated by
+four bytes representing
+the
+x and y
+values;
+each value
+is a signed integer.
+The last designated point in an
+.B "l, m, n,"
+or
+.B p
+instruction becomes the `current point'
+for the next instruction.
+.PP
+Each of the following descriptions begins with the name
+of the corresponding routine in
+.IR  plot (3).
+.TP 3
+.B  m
+move: The next four bytes give a new current point.
+.TP 3
+.B  n
+cont: Draw a line from the current point to
+the point given by the next four bytes.
+See
+.IR  plot (1).
+.TP 3
+.B  p
+point: Plot the point given by the next four bytes.
+.TP 3
+.B  l
+line: Draw a line from the point given by the next
+four bytes to the point given by the following four bytes.
+.TP 3
+.B  t
+label: Place the following ASCII string so that its
+first character falls on the current point.
+The string is terminated by a newline.
+.TP 3
+.B  a
+arc:
+The first four bytes give the center, the next four give the
+starting point,
+and the last four give the end point of a circular arc.
+The least significant coordinate of the end point is
+used only to determine the quadrant.
+The arc is drawn counter-clockwise.
+.TP 3
+.B  c
+circle:
+The first four bytes give the center of the circle,
+the next two the radius.
+.TP 3
+.B  e
+erase: Start another frame of output.
+.TP 3
+.B  f
+linemod: Take the following string, up to a newline,
+as the style for drawing further lines.
+The styles are
+`dotted,'
+`solid,' `longdashed,' `shortdashed,' and `dotdashed.'
+Effective only in 
+.I plot 4014
+and
+.I plot ver.
+.TP 3
+.B  s
+space: The next four bytes give
+the lower left corner of the plotting area;
+the following four give the upper right corner.
+The plot will be magnified or reduced to fit
+the device as closely as possible.
+.IP
+Space settings that exactly fill the plotting area
+with unity scaling appear below for
+devices supported by the filters of
+.IR  plot (1).
+The upper limit is just outside the plotting area.
+In every case the plotting area is taken to be square;
+points outside may be displayable on
+devices whose face isn't square.
+.RS
+.TP 10n
+4014
+space(0, 0, 3120, 3120);
+.br
+.ns
+.TP 
+ver
+space(0, 0, 2048, 2048);
+.br
+.ns
+.TP 
+300, 300s
+space(0, 0, 4096, 4096);
+.br
+.ns
+.TP 
+450
+space(0, 0, 4096, 4096);
+.RE
+.SH "SEE ALSO"
+plot(1), plot(3), graph(1)
diff --git a/usr/man/man5/tp.5 b/usr/man/man5/tp.5
new file mode 100644 (file)
index 0000000..6f8453b
--- /dev/null
@@ -0,0 +1,70 @@
+.TH TP 5 
+.SH NAME
+tp \- DEC/mag tape formats
+.SH DESCRIPTION
+The
+command
+.I tp
+dumps files to and extracts files from
+DECtape and magtape.
+The formats of these tapes are the same except
+that magtapes have larger directories.
+.PP
+Block zero contains a
+copy of a stand-alone bootstrap program.
+See
+.IR bproc (8).
+.PP
+Blocks 1 through 24
+for DECtape (1 through 62 for magtape)
+contain a directory of the tape.
+There are 192 (resp. 496) entries in the directory;
+8 entries per block;
+64 bytes per entry.
+Each entry has the following format:
+.nf
+.IP ""
+struct {
+       char    pathname[32];
+       int     mode;
+       char    uid;
+       char    gid;
+       char    unused1;
+       char    size[3];
+       long    modtime;
+       int     tapeaddr;
+       char    unused2[16];
+       int     checksum;
+};
+.fi
+.PP
+The path name entry is the path name of the
+file when put on the tape.
+If the pathname starts with a zero word,
+the entry is empty.
+It is at most 32 bytes long and ends in a null byte.
+Mode, uid, gid, size and time modified
+are the same as described under i-nodes 
+(see file system
+.IR filsys (5)).
+The tape address is the tape block number of the start of
+the contents of the file.
+Every file
+starts on a block boundary.
+The file occupies (size+511)/512 blocks
+of continuous tape.
+The checksum entry has a value such that
+the sum of the 32 words of the directory entry is zero.
+.PP
+Blocks above 25 (resp. 63) are available for file storage.
+.PP
+A fake entry
+has a size of zero.
+.SH "SEE ALSO"
+filsys(5), tp(1)
+.SH BUGS
+The
+.I pathname, uid, gid,
+and
+.I size
+fields are too small.
diff --git a/usr/man/man5/ttys.5 b/usr/man/man5/ttys.5
new file mode 100644 (file)
index 0000000..03da300
--- /dev/null
@@ -0,0 +1,36 @@
+.TH TTYS 5 
+.SH NAME
+ttys \- terminal initialization data
+.SH DESCRIPTION
+The
+.I ttys
+file is read by the
+.I init
+program and specifies
+which terminal special files are to have
+a process created for them which will allow people to
+log in.
+It contains one line per special file.
+.PP
+The first character of a line is either `0' or `1';
+the former causes the line to be ignored,
+the latter causes it to be effective.
+The second character is used as an argument to
+.IR getty (8),
+which performs such tasks as baud-rate recognition,
+reading the login name,
+and calling
+.I login.
+For normal lines,
+the character is `0';
+other characters can be used, for example, with hard-wired terminals
+where speed recognition is unnecessary
+or which have special characteristics.
+.RI ( Getty
+will have to be fixed in such cases.)
+The remainder of the line is the terminal's entry
+in the device directory, /dev.
+.SH FILES
+/etc/ttys
+.SH "SEE ALSO"
+init(8), getty(8), login(1)
diff --git a/usr/man/man5/types.5 b/usr/man/man5/types.5
new file mode 100644 (file)
index 0000000..f0884f3
--- /dev/null
@@ -0,0 +1,30 @@
+.TH TYPES 5
+.SH NAME
+types \- primitive system data types
+.SH SYNOPSIS
+.B #include <sys/types.h>
+.SH DESCRIPTION
+The data types defined in the include file
+are used in UNIX system code;
+some data of these types are accessible to user code:
+.PP
+.nf
+.so /usr/include/sys/types.h
+.fi
+.PP
+The form
+.I daddr_t
+is used for disk addresses except in an
+i-node on disk, see
+.IR filsys (5).
+Times are encoded in seconds since 00:00:00 GMT, January 1, 1970.
+The major and minor parts of a device code
+specify kind and unit number of a device
+and are installation-dependent.
+Offsets are measured in bytes from the beginning of a file.
+The
+.I label_t
+variables are used to save the processor state
+while another process is running.
+.SH SEE ALSO
+filsys(5), time(2), lseek(2), adb(1)
diff --git a/usr/man/man5/utmp.5 b/usr/man/man5/utmp.5
new file mode 100644 (file)
index 0000000..9468a3e
--- /dev/null
@@ -0,0 +1,55 @@
+.TH UTMP 5 
+.SH NAME
+utmp, wtmp \- login records
+.SH SYNOPSIS
+.B #include <utmp.h>
+.SH DESCRIPTION
+The
+.I utmp
+file allows one to discover information about who is currently
+using UNIX.
+The file is a sequence of entries with the following
+structure declared in the include file:
+.RS
+.PP
+.nf
+.so /usr/include/utmp.h
+.fi
+.RE
+.PP
+This structure gives the name of the special file
+associated with the user's terminal, the user's login name,
+and the time of the login in the form of
+.IR time (2).
+.PP
+The
+.I wtmp
+file records all logins and logouts.
+Its format is exactly like
+.I utmp
+except that
+a null user name indicates a logout on the associated
+terminal.
+Furthermore, the terminal name `~' indicates that the
+system was rebooted at the indicated time;
+the adjacent pair of entries with terminal names
+`\^|\^' and `}' indicate the system-maintained time
+just before and just after a
+.I date
+command has changed the system's idea of the time.
+.PP
+.I Wtmp
+is maintained by
+.IR login (1)
+and
+.IR init (8).
+Neither of these programs creates the file,
+so if it is removed record-keeping is turned off.
+It is summarized by
+.IR ac (1).
+.SH FILES
+/etc/utmp
+.br
+/usr/adm/wtmp
+.SH "SEE ALSO"
+login(1), init(8), who(1), ac(1)
diff --git a/usr/man/man6/arithmetic.6 b/usr/man/man6/arithmetic.6
new file mode 100644 (file)
index 0000000..a023cbc
--- /dev/null
@@ -0,0 +1,65 @@
+.TH ARITHMETIC 6 
+.SH NAME
+arithmetic \- provide drill in number facts
+.SH SYNOPSIS
+.B /usr/games/arithmetic
+[
+.B +\-x/
+] [ range ]
+.SH DESCRIPTION
+.I Arithmetic
+types out simple arithmetic problems,
+and waits for an answer to be typed in.
+If the answer is correct,
+it types back "Right!",
+and a new problem.
+If the answer is wrong,
+it replies "What?",
+and waits for another answer.
+Every twenty problems, it publishes
+statistics on correctness and the time required
+to answer.
+.PP
+To quit the program,
+type an interrupt (delete).
+.PP
+The first optional argument determines the kind of problem
+to be generated;
+.B +\-x/
+respectively cause
+addition, subtraction, multiplication, and division
+problems to be generated.
+One or more characters can be given;
+if more than one is given, the different types of
+problems will be mixed in random order; default is
+.B +\-
+.PP
+.I Range
+is a decimal number;
+all addends, subtrahends, differences, multiplicands, divisors,
+and quotients will be less than or equal to the value of
+.IR range .
+Default
+.I range
+is 10.
+.PP
+At the start, all numbers less than or equal to
+.I range
+are equally likely
+to appear.
+If the respondent makes a mistake,
+the numbers in the problem which was missed
+become more likely to reappear.
+.PP
+As a matter of educational philosophy, the program will
+not give correct answers,
+since the learner should, in principle,
+be able to calculate them.
+Thus the program is intended to provide drill for
+someone just past the first learning stage,
+not to teach number facts
+.I de
+.IR novo .
+For almost all users,
+the relevant statistic should be
+time per problem, not percent correct.
diff --git a/usr/man/man6/backgammon.6 b/usr/man/man6/backgammon.6
new file mode 100644 (file)
index 0000000..c7bc3ec
--- /dev/null
@@ -0,0 +1,8 @@
+.TH BACKGAMMON 6 
+.SH NAME
+backgammon \- the game
+.SH SYNOPSIS
+.B /usr/games/backgammon
+.SH DESCRIPTION
+This program does what you expect.
+It will ask whether you need instructions.
diff --git a/usr/man/man6/banner.6 b/usr/man/man6/banner.6
new file mode 100644 (file)
index 0000000..2945ecb
--- /dev/null
@@ -0,0 +1,10 @@
+.TH BANNER 6 
+.SH NAME
+banner \- make long posters
+.SH SYNOPSIS
+.B /usr/games/banner
+.SH DESCRIPTION
+.I Banner
+reads the standard input and
+prints it sideways in huge built-up letters
+on the standard output.
diff --git a/usr/man/man6/bcd.6 b/usr/man/man6/bcd.6
new file mode 100644 (file)
index 0000000..3badae5
--- /dev/null
@@ -0,0 +1,18 @@
+.TH BCD 6 
+.SH NAME
+bcd, ppt \- convert to antique media
+.SH SYNOPSIS
+.B /usr/games/bcd
+text
+.PP
+.B /usr/games/ppt
+.SH DESCRIPTION
+.I Bcd
+converts the literal
+.I text
+into a form familiar to old-timers.
+.PP
+.I Ppt
+converts the standard input into yet another form.
+.SH "SEE ALSO"
+dd(1)
diff --git a/usr/man/man6/bj.6 b/usr/man/man6/bj.6
new file mode 100644 (file)
index 0000000..cb2e8f7
--- /dev/null
@@ -0,0 +1,77 @@
+.TH BJ 6 
+.SH NAME
+bj \- the game of black jack
+.SH SYNOPSIS
+.B /usr/games/bj
+.SH DESCRIPTION
+.I Bj
+is a serious attempt at
+simulating the dealer
+in the game of black jack (or twenty-one)
+as might be found in Reno.
+The following rules apply:
+.HP 5
+The bet is $2 every hand.
+.IP
+A player `natural' (black jack) pays $3.
+A dealer natural loses $2.
+Both dealer and player naturals
+is a `push' (no money exchange).
+.IP
+If the dealer has an ace up,
+the player is allowed to make an `insurance'
+bet against the chance of a dealer natural.
+If this bet is not taken, play resumes as normal.
+If the bet is taken, it is a side bet
+where the player wins $2 if the dealer has
+a natural and loses $1 if the dealer does not.
+.IP
+If the player is dealt two cards
+of the same value, he is allowed to
+`double'.
+He is allowed to play two
+hands, each with one of these cards.
+(The bet is doubled also; $2 on each hand.)
+.IP
+If a dealt hand
+has a total of ten or eleven,
+the player may `double down'.
+He may double the bet ($2 to $4)
+and receive exactly one more card on that hand.
+.IP
+Under normal play,
+the player may `hit' (draw a card)
+as long as his total is not over twenty-one.
+If the player `busts' (goes over twenty-one),
+the dealer wins the bet.
+.IP
+When the player `stands' (decides not to hit),
+the dealer hits until he attains
+a total of seventeen or more.
+If the dealer busts, the player wins the bet.
+.IP
+If both player and dealer stand,
+the one with the largest total wins.
+A tie is a push.
+.PP
+The machine deals and keeps score.
+The following questions will be asked at
+appropriate times.
+Each question is
+answered by
+.B y
+followed by a new line for `yes',
+or just new line for `no'.
+.PP
+?              (means, `do you want a hit?')
+.br
+Insurance?
+.br
+Double down?
+.PP
+Every time the deck is shuffled,
+the dealer so states and the `action' (total bet)
+and `standing' (total won or lost)
+is printed.
+To exit, hit the interrupt key (DEL)
+and the action and standing will be printed.
diff --git a/usr/man/man6/checkers.6 b/usr/man/man6/checkers.6
new file mode 100644 (file)
index 0000000..c2c59fe
--- /dev/null
@@ -0,0 +1,67 @@
+.TH CHECKERS 6
+.SH NAME
+checkers \- game
+.SH SYNOPSIS
+.B /usr/games/checkers
+.SH DESCRIPTION
+.I Checkers
+uses standard notation for the board:
+.PP
+.ce
+BLACK
+.nf
+.TS
+center, box;
+r|r|r|r|r|r|r|r.
+////   1       ////    2       ////    3       ////    4
+////           ////            ////            ////
+_
+5      ////    6       ////    7       ////    8       ////
+       ////            ////            ////            ////
+_
+////   9       ////    10      ////    11      ////    12
+////           ////            ////            ////
+_
+13     ////    14      ////    15      ////    16      ////
+       ////            ////            ////            ////
+_
+////   17      ////    18      ////    19      ////    20
+////           ////            ////            ////
+_
+21     ////    22      ////    23      ////    24      ////
+       ////            ////            ////            ////
+_
+////   25      ////    26      ////    27      ////    28
+////           ////            ////            ////
+_
+29     ////    30      ////    31      ////    32      ////
+       ////            ////            ////            ////
+_
+.TE
+.ce
+WHITE
+.fi
+.PP
+Black plays first.
+The program normally plays white.
+To specify a move, name the square moved from
+and the square moved to.
+For multiple jumps name all the squares touched.
+.PP
+.PP
+Certain commands may be given instead of moves:
+.TP \w'reverse\ \ 'u
+reverse
+Reverse roles; the program takes over your pieces.
+.TP
+backup
+Undo the last move for each player.
+.TP
+list
+Print the record of the game.
+.TP
+move
+Let the program select a move for you.
+.TP
+print
+Print a map of the present position.
diff --git a/usr/man/man6/chess.6 b/usr/man/man6/chess.6
new file mode 100644 (file)
index 0000000..5fef18a
--- /dev/null
@@ -0,0 +1,27 @@
+.TH CHESS 6 
+.SH NAME
+chess \- the game of chess
+.SH SYNOPSIS
+.B /usr/games/chess
+.SH DESCRIPTION
+.I Chess
+is a computer program that plays class D chess.
+Moves may be given either in standard (descriptive) notation
+or in algebraic notation.
+The symbol `+' is used to specify check;
+`o-o' and `o-o-o' specify castling.
+To play black, type `first';
+to print the board, type an empty line.
+.PP
+Each move is echoed in the appropriate notation followed by
+the program's reply.
+.SH FILES
+/usr/lib/book          opening `book'
+.SH DIAGNOSTICS
+The most cryptic diagnostic is `eh?' which
+means that the input was syntactically incorrect.
+.SH WARNING
+Over-use of this program
+will cause it to go away.
+.SH BUGS
+Pawns may be promoted only to queens.
diff --git a/usr/man/man6/ching.6 b/usr/man/man6/ching.6
new file mode 100644 (file)
index 0000000..b4c221d
--- /dev/null
@@ -0,0 +1,142 @@
+.TH CHING 6 
+.SH NAME
+ching, fortune \- the book of changes and other cookies
+.SH SYNOPSIS
+.B /usr/games/ching
+[ hexagram ]
+.PP
+.B /usr/games/fortune
+.SH DESCRIPTION
+The
+.I "I Ching"
+or
+.I "Book of Changes"
+is an ancient Chinese oracle
+that has been in use for
+centuries
+as a source of wisdom
+and advice.
+.PP
+The text of the
+.I oracle
+(as it is sometimes known)
+consists of sixty-four
+.I hexagrams,
+each symbolized
+by a particular
+arrangement of
+six straight
+(\-\-\-)
+and broken
+(\-\ \-)
+lines.
+These lines
+have values ranging
+from six through nine,
+with the even
+values indicating
+the broken lines.
+.PP
+Each hexagram
+consists of two major sections.
+The
+.B  Judgement
+relates specifically
+to the matter at hand
+(E.g.,
+"It furthers one to have somewhere to go.")
+while the
+.B  Image
+describes
+the general attributes
+of the hexagram
+and how they apply
+to one's own life
+("Thus the superior man
+makes himself strong
+and untiring.").
+.PP
+When any of the lines
+have the values six or nine,
+they are moving lines;
+for each
+there is an appended
+judgement which
+becomes significant.
+Furthermore, the moving lines
+are inherently unstable and
+change into their opposites;
+a second hexagram
+(and thus an additional judgement)
+is formed.
+.PP
+Normally, one consults the oracle
+by fixing the desired question
+firmly in mind
+and then casting a set of changes
+(lines)
+using yarrow\-stalks
+or tossed coins.
+The resulting hexagram
+will be the answer
+to the question.
+.PP
+Using an algorithm
+suggested by S. C. Johnson,
+the Unix
+.IR oracle " simply reads"
+a question
+from the standard input
+(up to an EOF)
+and hashes the individual
+characters
+in combination with the
+time of day, process id
+and any other magic numbers
+which happen to be lying
+around the system.
+The resulting value
+is used as the seed
+of a random number generator
+which drives a simulated
+coin\-toss divination.
+The answer is then piped through
+.BR nroff " for formatting"
+and will appear on the
+standard output.
+.PP
+For those who wish
+to remain steadfast
+in the old traditions,
+the oracle will also accept
+the results of a personal
+divination using,
+for example,
+coins.
+To do this,
+cast the change
+and then type the
+resulting line values
+as an argument.
+.PP
+The impatient modern may prefer to settle for
+Chinese cookies; try
+.I fortune.
+.SH "SEE ALSO"
+It furthers one to see the great man.
+.SH DIAGNOSTICS
+The great prince issues commands,
+.br
+Founds states, vests families with fiefs.
+.br
+Inferior people should not be employed.
+.SH BUGS
+Waiting in the mud
+.br
+Brings about the arrival of the enemy.
+.PP
+If one is not extremely careful,
+.br
+Somebody may come up from behind and strike him.
+.br
+Misfortune.
diff --git a/usr/man/man6/cubic.6 b/usr/man/man6/cubic.6
new file mode 100644 (file)
index 0000000..1b8265d
--- /dev/null
@@ -0,0 +1 @@
+.so /usr/man/man6/ttt.6
diff --git a/usr/man/man6/maze.6 b/usr/man/man6/maze.6
new file mode 100644 (file)
index 0000000..3c3153f
--- /dev/null
@@ -0,0 +1,12 @@
+.TH MAZE 6 
+.SH NAME
+maze \- generate a maze problem
+.SH SYNOPSIS
+.B /usr/games/maze/
+.SH DESCRIPTION
+.I Maze
+asks a few questions and then
+prints a maze.
+.SH BUGS
+Some mazes (especially small ones)
+have no solutions.
diff --git a/usr/man/man6/moo.6 b/usr/man/man6/moo.6
new file mode 100644 (file)
index 0000000..7e06c0c
--- /dev/null
@@ -0,0 +1,16 @@
+.TH MOO 6 
+.SH NAME
+moo \- guessing game
+.SH SYNOPSIS
+.B /usr/games/moo
+.SH DESCRIPTION
+.I Moo
+is a guessing game imported from England.
+The computer picks a number consisting
+of four distinct decimal digits.
+The player guesses four distinct digits
+being scored on each guess.
+A `cow' is a correct digit in an incorrect position.
+A `bull' is a correct digit in a correct position.
+The game continues until the player guesses the number
+(a score of four bulls).
diff --git a/usr/man/man6/quiz.6 b/usr/man/man6/quiz.6
new file mode 100644 (file)
index 0000000..c58ba4b
--- /dev/null
@@ -0,0 +1,73 @@
+.TH QUIZ 6 
+.SH NAME
+quiz \- test your knowledge
+.SH SYNOPSIS
+.B /usr/games/quiz
+[
+.B \-i
+file ]
+[
+.B \-t
+] [ category1 category2 ]
+.SH DESCRIPTION
+.I Quiz
+gives associative
+knowledge tests on various subjects.
+It asks items chosen from
+.I category1
+and expects answers from
+.IR category2 .
+If no categories are specified,
+.I quiz
+gives instructions
+and lists the available categories.
+.PP
+.I Quiz
+tells a correct answer whenever you type
+a bare newline.
+At the end of input, upon interrupt,
+or when questions run out,
+.I quiz
+reports a score and terminates.
+.PP
+The
+.B \-t
+flag specifies `tutorial' mode,
+where missed questions are repeated
+later, and material is gradually introduced as you learn.
+.PP
+The
+.B \-i
+flag causes the named file to be substituted for the
+default index file.
+The lines of these files have the  syntax:
+.IP "" 4
+.nf
+.ta \w'alternate 'u
+line   = category newline \(bv category `:' line
+category       = alternate \(bv category `|' alternate
+alternate      = empty \(bv alternate primary
+primary        = character \(bv `[' category `]' \(bv option
+option = `{' category `}'
+.PP
+.fi
+The first category on each
+line of an index file names an information file.
+The remaining categories specify the order and contents of
+the data in each line of the
+information file.
+Information files have the same syntax.
+Backslash `\\' is used as with
+.IR sh (1)
+to quote syntactically
+significant characters or to insert transparent
+newlines into a line.
+When either a question or its answer is empty,
+.I quiz
+will refrain from asking it.
+.SH FILES
+/usr/games/quiz.k/*
+.SH BUGS
+The construct `a|ab' doesn't work in an information
+file.
+Use `a{b}'.
diff --git a/usr/man/man6/reversi.6 b/usr/man/man6/reversi.6
new file mode 100644 (file)
index 0000000..2b15e1e
--- /dev/null
@@ -0,0 +1,121 @@
+.TH REVERSI 6 
+.SH NAME
+reversi \- a game of dramatic reversals
+.SH SYNOPSIS
+.B /usr/games/reversi
+[ [
+.B \-r
+]
+.I file
+]
+.SH DESCRIPTION
+.I Reversi
+(also known as `friends',
+`Chinese friends' and `Othello')
+is played on an 8\(mu8 board
+using two-sided tokens.
+Each player takes his turn by placing
+a token with his side up in an empty square.
+During the first four turns, players
+may only place tokens in the four central squares
+of the board.
+Subsequently, with each turn, a player
+.I must
+capture one or more
+of his opponent's tokens.
+He does this by placing
+one of his tokens such that
+it and another of his tokens embrace
+a solid line of his opponent's
+horizontally, vertically or diagonally.
+Captured tokens are flipped over
+and thus can be re-captured.
+If a player cannot outflank
+his opponent he forfeits
+his turn.
+The play continues until the
+board is filled or until no more
+outflanking is possible.
+.PP
+In this game,
+your tokens are asterisks
+and the machine's are at-signs.
+You move by typing in the row and column
+at which you want to place your token
+as two digits (1-8),
+optionally separated by blanks or tabs.
+You can also type
+.TP
+.B  c
+to continue the game after hitting break
+(this is only necessary if you interrupt the machine
+while it is deliberating).
+.TP
+.BR g " \fIn"
+to start
+.I reversi
+playing against itself
+for the next
+.IR n ""
+moves
+(or until the break key is hit).
+.TP
+.B  n
+to stop printing the board after each move.
+.TP
+.B  o
+to start it up again.
+.TP
+.B  p
+to print the board regardless.
+.TP
+.B  q
+to quit (without dishonor).
+.TP
+.B  s
+to print the score.
+.PP
+.I Reversi
+also recognizes several commands which are valid only
+at the start of the game, before any moves have been made.
+They are
+.TP
+.B  f
+to let the machine go first.
+.TP
+.BR h " \fIn"
+to ask for a handicap
+of from one to four corner squares.
+If you're
+good, you can give the machine
+a handicap by typing a negative number.
+.TP
+.BR l " \fIn"
+to set the amount of lookahead
+used by the machine in searching for moves.
+Zero means none at all. Four is the default.
+Greater than six means you may fall asleep
+waiting for the machine to move.
+.TP
+.BR t " \fIn"
+to tell
+.I reversi
+that you will only need
+.IR n ""
+seconds
+to consider each move. If you fail to respond in the
+alloted time, you forfeit your turn.
+.PP
+If
+.I reversi
+is given a file name as an argument,
+it will checkpoint the game,
+move by move, by dumping the board onto
+.IR file .
+The
+.B \-r
+option will cause
+.I reversi
+to restart the game from
+.I file
+and continue logging.
diff --git a/usr/man/man6/ttt.6 b/usr/man/man6/ttt.6
new file mode 100644 (file)
index 0000000..ee0adbc
--- /dev/null
@@ -0,0 +1,24 @@
+.TH TTT 6 
+.SH NAME
+ttt, cubic \- tic-tac-toe
+.SH SYNOPSIS
+.B /usr/games/ttt
+.PP
+.B /usr/games/cubic
+.SH DESCRIPTION
+.I Ttt
+is the X and O game popular in the first grade.
+This is a learning program that never makes the same
+mistake twice.
+.PP
+Although it learns, it learns slowly.
+It must lose nearly 80 games to
+completely know the game.
+.PP
+.I Cubic
+plays three-dimensional tic-tac-toe on a 4\(mu4\(mu4
+board.
+Moves are specified as a sequence of three
+coordinate numbers in the range 1-4.
+.SH FILES
+/usr/games/ttt.k       learning file
diff --git a/usr/man/man6/words.6 b/usr/man/man6/words.6
new file mode 100644 (file)
index 0000000..5e71af1
--- /dev/null
@@ -0,0 +1,38 @@
+.TH WORDS 6 
+.SH NAME
+hangman, words \- word games
+.SH SYNOPSIS
+.B /usr/games/hangman
+[ dict ]
+.PP
+.B /usr/games/words
+.SH DESCRIPTION
+.I Hangman
+chooses a word at least seven letters
+long from a word list.
+The user is to guess letters one at a time.
+.PP
+The optional argument
+names an alternate word list.
+The special name `\-a' gets a particular very large
+word list.
+.PP
+.I Words
+prints all the uncapitalized words
+in the word list that can be made from
+letters in
+.I string.
+.SH FILES
+/usr/dict/words                the regular word list
+.br
+/crp/dict/web2         the the \-a word list
+.SH DIAGNOSTICS
+After each round,
+.I hangman
+reports the average number of guesses per round
+and the number of rounds.
+.SH BUGS
+Hyphenated compounds are run together.
+.PP
+UNIX software is distributed without
+the \-a word list.
diff --git a/usr/man/man6/wump.6 b/usr/man/man6/wump.6
new file mode 100644 (file)
index 0000000..da26a10
--- /dev/null
@@ -0,0 +1,29 @@
+.TH WUMP 6 
+.SH NAME
+wump \- the game of hunt-the-wumpus
+.SH SYNOPSIS
+.B /usr/games/wump
+.SH DESCRIPTION
+.I Wump
+plays the game of `Hunt the Wumpus.'
+A Wumpus is a creature that lives in a cave with several rooms
+connected by tunnels.
+You wander among the rooms, trying to
+shoot the Wumpus with an arrow, meanwhile avoiding
+being eaten by the Wumpus and falling
+into
+Bottomless Pits.
+There are also Super Bats which are likely to pick you up
+and drop you in some random room.
+.PP
+The program asks various questions which you answer
+one per line;
+it will give a more detailed description
+if you want.
+.PP
+This program is based on one described in
+.I "People's Computer Company,"
+.I 2,
+2 (November 1973).
+.SH BUGS
+It will never replace Space War.
diff --git a/usr/man/man7/ascii.7 b/usr/man/man7/ascii.7
new file mode 100644 (file)
index 0000000..2dbe08e
--- /dev/null
@@ -0,0 +1,33 @@
+.TH ASCII 7 
+.SH NAME
+ascii \- map of ASCII character set
+.SH SYNOPSIS
+.B cat /usr/pub/ascii
+.SH DESCRIPTION
+.I Ascii
+is a map of the ASCII character set, to be printed as needed.
+It contains:
+.nf
+
+.cs R 20
+|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  \\ |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|
+
+.fi
+.cs R
+.SH FILES
+/usr/pub/ascii
diff --git a/usr/man/man7/man.7 b/usr/man/man7/man.7
new file mode 100644 (file)
index 0000000..adeed8d
--- /dev/null
@@ -0,0 +1,178 @@
+.TH MAN 7 
+.SH NAME
+man \- macros to typeset manual
+.SH SYNOPSIS
+.B
+nroff  \-man\ 
+file ...
+.PP
+.B
+troff  \-man\ 
+file ...
+.SH DESCRIPTION
+These macros are used to lay out pages of this manual.
+A skeleton page may be found in the file 
+/usr/man/man0/xx.
+.PP
+Any text argument
+.I t
+may be zero to six words.
+Quotes may be used to include blanks in a `word'.
+If 
+.I text
+is empty,
+the special treatment is applied to
+the next input line with text to be printed.
+In this way
+.BR . I
+may be used to italicize a whole line, or
+.BR . SM
+followed by
+.BR . B
+to make small bold letters.
+.PP
+A prevailing indent distance is remembered between
+successive indented paragraphs,
+and is reset to default value upon reaching a non-indented paragraph.
+Default units for indents
+.I i
+are ens.
+.PP
+Type font and size are reset to default values
+before each paragraph, and after processing
+font and size setting macros.
+.PP
+These strings are predefined by
+.BR \-man :
+.IP \e*R
+.if t `\*R', `(Reg)' in
+.if t .I nroff.
+.if n `(Reg)', trademark symbol in
+.if n .I troff.
+.IP \e*S
+Change to default type size.
+.SH FILES
+/usr/lib/tmac/tmac.an
+.br
+/usr/man/man0/xx
+.SH SEE ALSO
+troff(1), man(1)
+.SH BUGS
+Relative indents don't nest.
+.SH REQUESTS
+.ta \w'.TH n c x 'u +\w'Cause 'u +\w'Argument\ 'u
+.di xx
+                       \ka
+.br
+.di
+.in \nau
+.ti0
+Request        Cause   If no   Explanation
+.ti0
+       Break   Argument
+.ti0
+.li
+.B \fIt\fR     no      \fIt\fR=n.t.l.* Text
+.I t
+is bold.
+.ti0
+.li
+.BI \fIt\fR    no      \fIt\fR=n.t.l.  Join
+words of
+.I t
+alternating bold and italic.
+.ti0
+.li
+.BR \fIt\fR    no      \fIt\fR=n.t.l.  Join
+words of
+.I t
+alternating bold and Roman.
+.ti0
+.li
+.DT    no      .5i 1i...       Restore default tabs.
+.ti0
+.li
+.HP \fIi\fR    yes     \fIi\fR=p.i.*   Set prevailing indent to
+.I i.
+Begin paragraph with hanging indent.
+.ti0
+.li
+.I \fIt\fR     no      \fIt\fR=n.t.l.  Text
+.I t
+is italic.
+.ti0
+.li
+.IB \fIt\fR    no      \fIt\fR=n.t.l.  Join
+words of
+.I t
+alternating italic and bold.
+.ti0
+.li
+.IP \fIx i\fR  yes     \fIx\fR=""      Same as .TP with tag
+.I x.
+.ti0
+.li
+.IR \fIt\fR    no      \fIt\fR=n.t.l.  Join
+words of
+.I t
+alternating italic and Roman.
+.ti0
+.li
+.LP    yes     -       Same as .PP.
+.ti0
+.li
+.PD \fId\fR    no      \fId\fR=.4v     Interparagraph distance is 
+.I d.
+.ti0
+.li
+.PP    yes     -       Begin paragraph.
+Set prevailing indent to .5i.
+.ti0
+.li
+.RE    yes     -       End of relative indent.
+Set prevailing indent to amount of starting .RS.
+.ti0
+.li
+.RB \fIt\fR    no      \fIt\fR=n.t.l.  Join
+words of
+.I t
+alternating Roman and bold.
+.ti0
+.li
+.RI \fIt\fR    no      \fIt\fR=n.t.l.  Join
+words of
+.I t
+alternating Roman and italic.
+.ti0
+.li
+.RS \fIi\fR    yes     \fIi\fR=p.i.    Start relative indent,
+move left margin in distance
+.I i.
+Set prevailing indent to .5i for nested indents.
+.ti0
+.li
+.SH \fIt\fR    yes     \fIt\fR=n.t.l.  Subhead.
+.ti0
+.li
+.SM \fIt\fR    no      \fIt\fR=n.t.l.  Text
+.I t
+is small.
+.ti0
+.li
+.TH \fIn c x\fR        yes     -       Begin page named
+.I n
+of chapter
+.IR c;
+.I x
+is extra commentary, e.g. `local', for page foot.
+Set prevailing indent and tabs to .5i.
+.ti0
+.li
+.TP \fIi\fR    yes     \fIi\fR=p.i.    Set prevailing indent to
+.I i.
+Begin indented paragraph
+with hanging tag given by next text line.
+If tag doesn't fit, place it on separate line.
+.PP
+.ti0
+* n.t.l. = next text line; p.i. = prevailing indent