Index: trunk/minix/man/man3/abort.3
===================================================================
--- trunk/minix/man/man3/abort.3	(revision 9)
+++ 	(revision )
@@ -1,27 +1,0 @@
-.\"	@(#)abort.3	6.3 (Berkeley) 5/27/86
-.\"
-.TH ABORT 3 "May 27, 1986"
-.AT 3
-.SH NAME
-abort \- generate a fault
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdlib.h>
-
-void abort(void)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Abort
-executes an instruction which is illegal in user mode.
-This causes a signal that normally terminates
-the process with a core dump, which may be used for debugging.
-.SH SEE ALSO
-.BR sigaction (2),
-.BR exit (2).
-.SH DIAGNOSTICS
-Usually ``abort \- core dumped'' from the shell.
-.SH BUGS
-The abort() function does not flush standard I/O buffers.  Use
-.BR fflush (3).
Index: trunk/minix/man/man3/abs.3
===================================================================
--- trunk/minix/man/man3/abs.3	(revision 9)
+++ 	(revision )
@@ -1,24 +1,0 @@
-.\"	@(#)abs.3	6.1 (Berkeley) 5/15/85
-.\"
-.TH ABS 3 "May 15, 1985"
-.AT 3
-.SH NAME
-abs \- integer absolute value
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdlib.h>
-
-int abs(int \fIi\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Abs
-returns the absolute value of its integer operand.
-.SH SEE ALSO
-.BR floor (3).
-.SH BUGS
-Applying the \fIabs\fP function to the most negative integer generates a
-result which is the most negative integer.  That is, abs(0x80000000)
-returns 0x80000000 as a result on a machine with 32-bit ints.  Using the
-result in unsigned computations is sound however.
Index: trunk/minix/man/man3/assert.3
===================================================================
--- trunk/minix/man/man3/assert.3	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-.\"	@(#)assert.3	6.2 (Berkeley) 5/12/86
-.\"
-.TH ASSERT 3 "May 12, 1986"
-.AT 3
-.SH NAME
-assert \- program verification
-.SH SYNOPSIS
-.nf
-.ft B
-#include <assert.h>
-
-void assert(int \fIexpression\fP)
-.fi
-.SH DESCRIPTION
-.B Assert
-is a macro that indicates
-.I expression
-is expected to be true at this point in the program.
-It causes an
-.BR abort (3)
-with a diagnostic comment on the standard output when
-.I expression
-is false (0).
-Compiling with the 
-.BR cc (1)
-option
-.SM
-.B \-DNDEBUG
-effectively deletes
-.B assert
-from the program.
-.SH DIAGNOSTICS
-`Assertion "\fIexpression\fR" failed: file
-.I f
-line
-.IR n .'
-.I F
-is the source file and
-.I n
-the source line number of the
-.B assert
-statement.
Index: trunk/minix/man/man3/atof.3
===================================================================
--- trunk/minix/man/man3/atof.3	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-.\"	@(#)atof.3	6.1 (Berkeley) 5/15/85
-.\"
-.TH ATOF 3  "May 15, 1985"
-.AT 3
-.SH NAME
-atof, atoi, atol \- convert ASCII to numbers
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdlib.h>
-
-double atof(const char *\fInptr\fP)
-int atoi(const char *\fInptr\fP)
-long atol(const char *\fInptr\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-These functions convert a string pointed to by
-.I nptr
-to floating, integer, and long integer representation respectively.
-The first unrecognized character ends the string.
-.PP
-.B Atof
-recognizes an optional string of spaces, then an optional sign, then
-a string of digits optionally containing a decimal
-point, then an optional `e' or `E' followed by an optionally signed integer.
-.PP
-.B Atoi
-and
-.B atol
-recognize an optional string of spaces, then an optional sign, then a
-string of
-digits.
-.SH SEE ALSO
-.BR strtol (3),
-.BR strtod (3),
-.BR scanf (3).
-.SH BUGS
-There are no provisions for overflow.
Index: trunk/minix/man/man3/bstring.3
===================================================================
--- trunk/minix/man/man3/bstring.3	(revision 9)
+++ 	(revision )
@@ -1,84 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)bstring.3	6.1 (Berkeley) 5/15/85
-.\"
-.TH BSTRING 3  "May 15, 1985"
-.UC 5
-.SH NAME
-bstring, bcopy, bcmp, bzero, ffs \- bit and byte string operations
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <string.h>
-#include <unistd.h>
-
-void bcopy(const void *\fIsrc\fP, void *\fIdst\fP, size_t \fIlength\fP)
-int bcmp(const void *\fIb1\fP, const void *\fIb2\fP, size_t \fIlength\fP)
-void bzero(void *\fIdst\fP, size_t \fIlength\fP)
-int ffs(int \fIi\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-The functions
-.BR bcopy ,
-.BR bcmp ,
-and
-.B bzero
-operate on variable length strings of bytes.
-They do not check for null bytes as the routines in
-.BR string (3)
-do.
-.PP
-.B Bcopy
-copies 
-.I length
-bytes from string
-.I src
-to the string
-.IR dst .
-.PP
-.B Bcmp
-compares byte string
-.I b1
-against byte string
-.IR b2 ,
-returning zero if they are identical,
-non-zero otherwise.  Both strings are
-assumed to be
-.I length
-bytes long.
-.PP
-.B Bzero
-places
-.I length
-0 bytes in the string
-.IR b1 .
-.PP
-.B Ffs
-find the first bit set in the argument passed it and
-returns the index of that bit.  Bits are numbered
-starting at 1.  A return value of 0 indicates the
-value passed is zero.
-.SH BUGS
-The
-.BR bcopy ,
-.BR bcmp ,
-and
-.BR bzero
-functions are obsolete; new code should use
-.BR memmove ,
-.BR memcmp ,
-and
-.BR memset
-respectively.
-.PP
-The
-.B bcopy
-routine takes parameters backwards from
-.BR memcpy ,
-.BR memmove ,
-and
-.BR strcpy .
Index: trunk/minix/man/man3/configfile.3
===================================================================
--- trunk/minix/man/man3/configfile.3	(revision 9)
+++ 	(revision )
@@ -1,194 +1,0 @@
-.TH CONFIGFILE 3
-.SH NAME
-configfile, config_read, config_delete, config_renewed, config_length, config_issub, config_isatom, config_isstring \- generic configuration file functions
-.SH SYNOPSIS
-.ft B
-.nf
-#include <configfile.h>
-
-config_t *config_read(const char *\fIfile\fP, int \fIflags\fP, config_t *\fIcfg\fP)
-void config_delete(config_t *\fIcfg\fP)
-int config_renewed(config_t *\fIcfg\fP)
-size_t config_length(config_t *\fIcfg\fP)
-int config_issub(config_t *\fIcfg\fP)
-int config_isatom(config_t *\fIcfg\fP)
-int config_isstring(config_t *\fIcfg\fP)
-.fi
-.ft P
-.SH DESCRIPTION
-The
-.B configfile
-routines operate on a generic configuration file that follows the syntax
-described in
-.BR configfile (5).
-.PP
-The interface presented by the functions above uses the following type and
-definitions from <configfile.h>:
-.PP
-.if n .in +2
-.if t .RS
-.nf
-.ta +\w'type'u +\w'const charmm'u +\w'word[];mm'u
-typedef const struct config {
-	config_t	*next;	/* Next configuration file thing. */
-	config_t	*list;	/* For a { sublist }. */
-	const char	*file;	/* File and line where this is found. */
-	unsigned	line;
-	int	flags;	/* Special flags. */
-	char	word[];	/* Payload. */
-} config_t;
-
-.ta +\w'#definem'u +\w'CFG_SUBLISTm'u +\w'0x0000mm'u
-#define	CFG_CLONG	0x0001	/* strtol(word, &end, 0) is valid. */
-#define	CFG_OLONG	0x0002	/* strtol(word, &end, 010). */
-#define	CFG_DLONG	0x0004	/* strtol(word, &end, 10). */
-#define	CFG_XLONG	0x0008	/* strtol(word, &end, 0x10). */
-#define	CFG_CULONG	0x0010	/* strtoul(word, &end, 0). */
-#define	CFG_OULONG	0x0020	/* strtoul(word, &end, 010). */
-#define	CFG_DULONG	0x0040	/* strtoul(word, &end, 10). */
-#define	CFG_XULONG	0x0080	/* strtoul(word, &end, 0x10). */
-#define	CFG_STRING	0x0100	/* The word is enclosed in quotes. */
-#define	CFG_SUBLIST	0x0200	/* This is a sublist, so no word. */
-#define	CFG_ESCAPED	0x0400	/* Escapes are still marked with \e. */
-.fi
-.if n .in -2
-.if t .RE
-.PP
-In memory a configuration file is represented as a list of
-.B config_t
-cells linked together with the
-.B next
-field ending with a null pointer.  A sublist between braces is attached to a
-cell at the
-.B list
-field.
-Words and strings are put in the
-.B word
-field, a null terminated string.  The
-.B flags
-field records the type and features of a cell.  The
-.B CFG_*LONG
-flags are set if a word is a number according to one of the
-.B strtol
-or
-.B strtoul
-calls.  Purely a number, no quotes or trailing garbage.  The
-.B CFG_STRING
-flag is set if the object was enclosed in double quotes.  Lastly
-.B CFG_SUBLIST
-tells if the cell is only a pointer to a sublist in braces.
-.PP
-Characters in a word or string may have been formed with the
-.B \e
-escape character.  They have been parsed and expanded, but the \e is still
-present if
-.B CFG_ESCAPED
-is set.  The
-.B word
-array may be changed, as long as it doesn't grow longer, so one may remove
-the \es like this:
-.PP
-.RS
-.ta +4n +4n
-.nf
-if (cfg->flags & CFG_ESCAPED) {
-	char *p, *q;
-	p= q= cfg->word;
-	for (;;) {
-		if ((*q = *p) == '\e\e') *q = *++p;
-		if (*q == 0) break;
-		p++;
-		q++;
-	}
-}
-.fi
-.RE
-.PP
-The low level syntax of a config file is checked when it is read.  If an
-error is encountered a message is printed and the program exits with exit
-code 1.  What the data means is not checked, that
-should be done by the program using the data.  Only the atom
-.B include
-at the beginning of a list is special.  It should be followed by a string.
-The string is seen as the name of a file, that is opened, read, and inserted
-in place of the
-.BR include .
-Unless the name of the file starts with a
-.BR / ,
-it is sought relative to the directory the current file is found in.
-Nonexistent files are treated as being empty.
-.PP
-The
-.B file
-and
-.B line
-fields in each cell tell where the cell was read.
-.SS Functions
-A configuration file is read with
-.BR config_read .
-The first argument is the file to read.  The second is either
-.B 0
-or
-.B CFG_ESCAPED
-to tell whether \e escapes should be fully expanded without leaving a trace,
-or if they should still be marked with a \e so that the caller knows where
-the excapes are.
-The third argument,
-.IR cfg ,
-should be a null pointer on the first call.  If you want to reread a config
-file that may have changed then
-.I cfg
-should be what you previously read.
-.PP
-With
-.B config_delete
-one can free up the memory that has been acquired with
-.BR malloc (3)
-to hold the contents of the configuration file.
-.PP
-To determine if the contents of configuration file has changed when reread
-one uses
-.BR config_renewed
-after
-.BR config_read .
-It returns a "changed" flag that is set when the configuration file changed
-and then clears that flag.  It returns true on the very first call.  For the
-function to work you need to feed the old data back into
-.BR config_read ,
-not delete and reread.
-.PP
-The length of a series of config structures is told by
-.BR config_length .
-It follows the
-.B next
-fields, so a sublist between braces counts as one extra.
-.PP
-The
-.BR config_issub ,
-.BR config_isatom
-and
-.BR config_isstring
-functions are just pretty macros to test if a cell references a sublist, is
-a word/string, or is just a string.
-.B CFG_SUBLIST
-and
-.B CFG_STRING
-tell the same story.
-.SH FILES
-.TP \w'*/etc/*.confmmmm'u
-.B */etc/*.conf
-Several files in several
-.B etc
-directories.
-.SH "SEE ALSO"
-.BR configfile (5).
-.SH NOTES
-The syntax of a config file puts some constraints on what you find in memory.
-The top level list consists entirely of sublist cells.  These point to lists
-that start with at least an atom, followed by a mix of atoms and sublist cells.
-These sublists in turn point to a list of only sublist cells (recurse now.)
-.PP
-The struct config shown above is not exactly proper C to aid
-readability, read <configfile.h> itself to see why.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
Index: trunk/minix/man/man3/crypt.3
===================================================================
--- trunk/minix/man/man3/crypt.3	(revision 9)
+++ 	(revision )
@@ -1,71 +1,0 @@
-.TH CRYPT 3
-.SH NAME
-crypt \- one-way password encryption function
-.SH SYNOPSIS
-.ft B
-.nf
-#define _MINIX_SOURCE 1
-#include <unistd.h>
-
-char *crypt(const char *\fIkey\fP, const char *\fIsalt\fP)
-.fi
-.ft P
-.SH DESCRIPTION
-The first use of
-.B crypt()
-is to encrypt a password.  Its second use is to authenticate a shadow
-password.  In both cases
-.B crypt()
-calls
-.BR pwdauth (8)
-to do the real work.
-.PP
-.B Crypt()
-encrypts a password if called with a user typed key, and a salt
-whose first two characters are in the set [./0-9A-Za-z].  The result is a
-character string in the [./0-9A-Za-z] alphabet of which the first two
-characters are equal to the salt, and the rest is the result of encrypting
-the key and the salt.
-.PP
-If
-.B crypt()
-is called with a salt that has the form
-.BI "##" user
-then the key is encrypted and compared to the encrypted password of
-.I user
-in the shadow password file.  If they are equal then
-.B crypt()
-returns the
-.BI "##" user
-argument, if not then some other string is returned.  This trick assures
-that the normal way to authenticate a password still works:
-.PP
-.RS
-.nf
-if (strcmp(pw->pw_passwd, crypt(key, pw->pw_passwd))) ...
-.fi
-.RE
-.PP
-If
-.I key
-is a null string, and the shadow password is a null string or the salt is a
-null string then the result equals
-.IR salt .
-(This is because the caller can't tell if a password field is empty in the
-shadow password file.)
-.PP
-The key and salt are limited to 1024 bytes total including the null bytes.
-.SH FILES
-.TP 25
-/usr/lib/pwdauth
-The password authentication program
-.SH "SEE ALSO"
-.BR getpass (3),
-.BR getpwent (3),
-.BR passwd (5),
-.BR pwdauth (8).
-.SH NOTES
-The result of an encryption is returned in a static array that is
-overwritten by each call.  The return value should not be modified.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
Index: trunk/minix/man/man3/ctime.3
===================================================================
--- trunk/minix/man/man3/ctime.3	(revision 9)
+++ 	(revision )
@@ -1,109 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)ctime.3	6.8 (Berkeley) 4/2/87
-.\"
-.TH CTIME 3  "April 2, 1987"
-.UC 4
-.SH NAME
-ctime, localtime, gmtime, asctime, tzset \-  convert date and time to ASCII
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <time.h>
-
-void tzset(void)
-char *ctime(const time_t *\fIclock\fP)
-char *asctime(const struct tm *\fItm\fP)
-struct tm *localtime(const time_t *\fIclock\fP)
-struct tm *gmtime(const time_t *\fIclock\fP)
-.fi
-.SH DESCRIPTION
-\fBTzset\fP uses the value of the environment variable \fBTZ\fP to
-set up the time conversion information used by \fBlocaltime\fP.
-.PP
-If \fBTZ\fP does not appear in the environment, the \fBTZDEFAULT\fP
-file (as defined in \fI<tzfile.h>\fP) is used by \fBlocaltime\fP.  If
-this file fails for any reason, the GMT offset as provided by the
-kernel is used.  In this case, DST is ignored, resulting in the time
-being incorrect by some amount if DST is currently in effect.  If
-this fails for any reason, GMT is used.
-.PP
-If \fBTZ\fP appears in the environment but its value is a null string,
-Greenwich Mean Time is used; if \fBTZ\fP appears and begins with a
-slash, it is used as the absolute pathname of the \fBtzfile\fP(5)-format
-file from which to read the time conversion information; if \fBTZ\fP
-appears and begins with a character other than a slash, it's used as
-a pathname relative to the system time conversion information directory,
-defined as \fBTZDIR\fP in the include file \fBtzfile.h\fP.  If this file
-fails for any reason, the GMT offset as provided by the kernel is
-used, as described above.  If this fails for any reason, GMT is used.
-See
-.BR TZ (5)
-for a proper description of the
-.B TZ
-variable.
-.PP
-\fBCtime\fP converts a time value, pointed to by \fIclock\fP,
-such as returned by \fBtime\fP(2) into ASCII and returns a pointer
-to a 26-character string in the following form.  All the fields
-have constant width.
-.PP
-.RS
-.nf
-Sun Sep 16 01:03:52 1973\en\e0
-.fi
-.RE
-.PP
-.B Localtime
-and
-.B gmtime
-return pointers to structures containing
-the broken-down time.
-.B Localtime
-corrects for the time zone and possible daylight savings time;
-.B gmtime
-converts directly to GMT, which is the time UNIX uses.
-.B Asctime
-converts a broken-down time to ASCII and returns a pointer
-to a 26-character string.
-.PP
-The structure declaration from the include file is:
-.PP
-.RS
-.nf
-.nr .0 .8i+\w'int tm_isdst'u
-.ta .5i \n(.0u \n(.0u+\w'/* 0-000'u+1n
-struct tm {
-	int tm_sec;	/* 0-59	seconds */
-	int tm_min;	/* 0-59	minutes */
-	int tm_hour;	/* 0-23	hour */
-	int tm_mday;	/* 1-31	day of month */
-	int tm_mon;	/* 0-11	month */
-	int tm_year;	/* 0-	year \- 1900 */
-	int tm_wday;	/* 0-6	day of week (Sunday = 0) */
-	int tm_yday;	/* 0-365	day of year */
-	int tm_isdst;	/* flag:	daylight savings time in effect */
-};
-.fi
-.RE
-.PP
-\fBTm_isdst\fP is non-zero if a time zone adjustment such as Daylight
-Savings time is in effect.
-.SH FILES
-.ta \w'/usr/lib/zoneinfo\0\0'u
-/usr/lib/zoneinfo	time zone information directory
-.br
-/etc/localtime	local time zone file
-.SH SEE ALSO
-.BR time (2),
-.BR getenv (3),
-.BR tzfile (5),
-.BR TZ (5),
-.BR environ (7),
-.BR zic (8).
-.SH NOTE
-The return values point to static data whose content is overwritten by
-each call.  
Index: trunk/minix/man/man3/ctype.3
===================================================================
--- trunk/minix/man/man3/ctype.3	(revision 9)
+++ 	(revision )
@@ -1,95 +1,0 @@
-.\"	@(#)ctype.3	6.4 (Berkeley) 5/12/86
-.\"
-.TH CTYPE 3  "May 12, 1986"
-.AT 3
-.SH NAME
-ctype, isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isascii, toupper, tolower, toascii \- character classification macros
-.SH SYNOPSIS
-.nf
-.ft B
-#include <ctype.h>
-
-int isalpha(int \fIc\fP)
-\&...
-.fi
-.SH DESCRIPTION
-These macros classify characters
-by table lookup.
-Each is a predicate returning nonzero for true,
-zero for false.
-.B Isascii
-and
-.B toascii
-are defined on all integer values; the rest
-are defined only on the range of
-.B "unsigned char"
-and on the special value
-EOF (see
-.BR stdio (3)).
-.TP 15n
-.B isalpha
-.I c
-is a letter
-.TP
-.B isupper
-.I c
-is an upper case letter
-.TP
-.B islower 
-.I c
-is a lower case letter
-.TP
-.B isdigit
-.I c
-is a digit
-.TP
-.B isxdigit
-.I c
-is a hex digit
-.TP
-.B isalnum
-.I c
-is an alphanumeric character
-.TP
-.B isspace
-.I c
-is a space, tab, carriage return, newline, vertical tab, or formfeed
-.TP
-.B ispunct
-.I c
-is a punctuation character (neither control nor alphanumeric)
-.TP
-.B isprint
-.I c
-is a printing character, code 040(8) (space) through 0176 (tilde)
-.TP
-.B isgraph
-.I c
-is a printing character, similar to
-.B isprint
-except false for space.
-.TP
-.B iscntrl
-.I c
-is a delete character (0177) or ordinary control character
-(less than 040).
-.TP
-.B isascii
-.I c
-is an ASCII character, code less than 0200
-.TP
-.B tolower
-.I c
-is converted to lower case.  Return value is undefined if not 
-.BR isupper (\fIc\fR).
-.TP
-.B toupper
-.I c
-is converted to upper case.  Return value is undefined if not 
-.BR islower (\fIc\fR).
-.TP
-.B toascii
-.I c
-is converted to be a valid ascii character.
-.SH "SEE ALSO"
-.BR ascii (7)
Index: trunk/minix/man/man3/curses.3
===================================================================
--- trunk/minix/man/man3/curses.3	(revision 9)
+++ 	(revision )
@@ -1,248 +1,0 @@
-.TH CURSES 3
-.SH NAME
-curses \- screen/window management library
-.SH SYNOPSIS
-cc demo.c -lcurses
-.SH DESCRIPTION
-Curses is a library of screen and window management routines.  It is modeled
-after the UNIX curses and ncurses libraries. Normally, programs written for
-curses should be easily ported to UNIX, and vice versa.
-.PP
-To use the routines, the function initscr() must first be called.
-This creates two 'windows' for the user: stdscr and curscr.  Stdscr is the
-default
-window for the user to make changes on, and curscr reflects the current
-contents of the physical display screen.  The user writes or edits the stdscr
-window to his liking, then calls the refresh() function to make curscr
-and the physical screen look like stdscr.  When the user program terminates,
-it should call the endwin() function to restore things to normal.
-.PP
-There are all sorts of window manipulation routines available to the
-programmer: auxiliary windows may be created, edited, moved and deleted.  The
-terminal may be set in many different modes, output text may be attributed
-with blink, blank, bold and reverse attributes.  Screen colors may also be 
-set, foreground and background.  There are window-specific
-printf- and scanf-like routines, routines for scrolling, box-drawing,
-window overlaying, clearing routines etc.
-.PP
-For more and detailed information, see the library source codes.  All curses
-functions are preceded by a complete description.
-.SH FUNCTIONS
-Below is a list over the available functions, together with a brief
-description of what they do.  In general, functions whose names start with 'w'
-differ from the one without 'w' (like wmove vs. move) signify that
-a specific window is used. Without a 'w', sdtscr is implied.  The functions
-that start with 'mv' before the 'genereic' function name signify that a
-cursor motion should be made before the actual work.  'mv' and 'w' combine
-as expected.
-.PP
-Most routines that return an int will return the manifest constant ERR if
-there is a failure during execution.  Routines that return a char actually
-return an int, so that ERR does not conflict with the character code 0xff.
-All characters from 0 to 0xff are allowed for usage with curses.
-.PP
-Some routines, like {mv}{w} printw() and {mv}{w}scanw() return a meaningful
-positive value if the operation is successful.
-.PP
-The curses package uses some predefined types, variables and manifest
-constants that are also available to the programmer.  There are also a few
-globally accessible variables that should not be touched by the application
-program.  Those untouchable variables have names starting with an
-underscore (_) to avoid conflicts.  The user-accessible types, variables
-and constants are (there are a number of other constants defining character
-attribute names and function key names - consult <curses.h> for details):
-.sp
-.nf
-.ta 3i
-(manifest constants)
-.RS
-TRUE	boolean true
-FALSE	boolean false
-ERR	unsuccessfull operation
-OK	successfull operation
-.RE
-.sp
-(types)
-.RS
-WINDOW	a window structure type
-bool	boolean flag type
-.RE
-.sp
-(variables)
-.RS
-WINDOW curscr	physical display image
-WINDOW stdscr	default user drawing board
-int LINES	terminal height
-int COLS	terminal width
-int NONL	\\n causes CR and LF when TRUE
-.RE
-.sp
-.fi
-The following is an alphabetical list of the curses functions, together
-with their types, parameters and a short comment for each (win is a window,
-ch, vc, hc are characters, buf is a character buffer, attrs is an
-attribute bit map, bf is a boolean flag.  Note that `characters' in this
-context usually can have 16 bits):
-.nf
-.sp
-int waddch(win,ch)	put char in stdscr
-int addch(ch)
-int mvaddch(y,x,ch)
-int mvwaddch(win,y,x,ch)
-
-int waddstr(win,str)	put string in stdscr
-int addstr(str)
-int mvaddstr(y,x,str)
-int mvwaddstr(win,y,x,str)
-
-void wattroff(win,attrs)	clear attribute(s) in window
-void attroff(attrs)
-
-void wattron(win,attrs)	add attribute(s) in window
-void attron(attrs)
-
-void wattrset(win,attrs)	set window char attributes
-void attrset(attrs)
-
-int baudrate()	dummy for compatibility
-
-void beep()	ring the bell or visible bell if no bell available
-
-void flash()	flash terminal screen or rings bell if no visible bell available
-
-void wbox(win,miny,minx,maxy,maxx,vc,hc)	box in a window, with given characters
-void box(win,vc,hc)
-
-void cbreak()	set terminal cbreak mode
-
-void wclear(win)	clear stdscr
-void clear()
-
-void clearok(win,bf)	marks window for screen clear
-
-int wclrtobot(win)	clear from cursor to end of line and all lines down this line
-int clrtobot()
-int mvclrtoeol(y,x)
-int mvwclrtobot(win,y,x)
-
-int wclrtoeol(win)	clear from cursor to end of line
-int clrtoeol()
-int mvclrtoeol(y,x)
-int mvwclrtoeol(win,y,x)
-
-int wdelch(win)	delete a char in a window
-int delch()
-int mvdelch(y,x)
-int mvwdelch(win,y,x)
-
-int wdeleteln(win)	delete a line in a window
-int deleteln()
-int mvdeleteln(y,x)
-int mvwdeleteln(win,y,x)
-
-void delwin(win)	delete a window or a subwindow
-void doupdate()	update physical screen
-void echo()	set terminal echo mode
-int endwin()	cleanup and curses finitialization
-
-void werase(win)	erase a window
-void erase()
-
-int erasechar()	return char delete character
-int fixterm()	dummy for compatibility
-void flushinp()	kill pending keyboard input
-
-int wgetch(win)	get char via a window
-int getch()
-int mvgetch(y,x)
-int mvwgetch(win,y,x)
-
-int wgetstr(win,str)	get string via window to a buffer
-int getstr(str)
-int mvgetstr(y,x,str)
-int mvwgetstr(win,y,x,str)
-
-void getyx(win,y,x)	get a window's cursor position
-
-int gettmode()	dummy for compatibility
-void idlok(win,bf)	dummy for compatibility
-WINDOW *initscr()	curses initialization (ret stdscr or NULL)
-
-int winch(win)	get char at window cursor
-int inch()
-int mvinch(y,x)
-int mvwinch(win,y,x)
-
-int winsch(win,ch)	insert character in a window
-int insch(ch)
-int mvinsch(y,x,ch)
-int mvwinsch(win,y,x,ch)
-
-int winsertln(win)	insert new line in a window
-int insertln()
-int mvinsertln(y,x)
-int mvwinsertln(win,y,x)
-
-void keypad(win,bf)	marks a window for keypad usage
-int killchar()	return line delete character
-char *longname()	returns terminal description string
-void leaveok(win,bf)	marks window for cursor 'update leave'
-void meta(win,bf)	marks window for meta
-int move(y,x)	move cursor in stdscr
-int mvcur(oldy,oldx,y,x)	move terminal cursor to <y,x>
-
-int mvprintw(y,x,fmt,args)	move & print string in stdscr
-
-int mvscanw(y,x,fmt,args)	move & get values via stdscr
-int mvwin(win,y,x)	move window on physical screen
-int mvwprintw(win,x,y,fmt,args)	move & print string in a window
-int mvwscanw(win,y,x,fmt,args)	move & get values via a window
-WINDOW *newwin(lines,cols,begy,begx)	create a new window
-void nl()	set terminal cr-crlf mapping mode
-void nocbreak()	unset terminal cbreak mod
-void nodelay(win,bf)	marks window for no input wait
-void noecho()	unset terminal echo mode
-void nonl()	unset terminal cr-crlf mapping mode
-void noraw()	unset raw terminal mode
-void overlay(win1,win2)	overlay one window on another
-void overwrite(win1,win2)	overwrite one window on another
-int printw(fmt,args)	print string in stdscr
-void raw()	set raw terminal mode
-void refrbrk(bf)	set screen update break mode
-void refresh()	refresh stdscr
-int resetterm()	dummy for compatibility
-int resetty()	restore terminal I/O modes
-int saveoldterm()	dummy for compatibility
-int saveterm()	dummy for compatibility
-int savetty()	save terminal I/O modes
-int scanw(fmt,args)	get values via stdscr
-void scroll(win)	scroll scrolling region of a window
-void scrollok(win,bf)	marks a window to allow scroll
-void setcolors(A_COLOR(for,back))	sets the forground and background
-	colors of stdscr
-void set_curs(visibility)	0 for invisible, 1 for visible, 2 for good
-	visible
-int setsrcreg(miny,maxy)	define stdscr's scroll region
-int setterm()	dummy for compatibility
-int setupterm(term,fd,errret)	set up terminal
-void standend()	start normal chars in stdscr
-void standout()	start standout chars in stdscr
-WINDOW *subwin(win,lines,cols,begy,begx)
-	create a sub-window in window win
-int tabsize(ts)	set/get tabsize of stdscr
-void touchwin(win)	mark a window as totally modified
-char *unctrl(ch)	char-to-string converter
-int wmove(win,y,x)	move cursor in a window
-void wnoutrefresh(win)	create internal screen image
-int wprintw(win,fmt,args)	print string in a window
-void wrefresh(win)	refresh window
-int wscanw(win,fmt,args)	get values via a window
-void wsetcolors(win,A_COLOR(for,back))	sets the forground and
-	background colors of the specified window
-int wsetsrcreg(win,miny,maxy)	define a window's scrolling region
-void wstandend(win)	start normal chars in window
-void wstandout(win)	start standout chars in window
-int wtabsize(win,ts)	set/get tabsize of a window
-.SH BUGS
-Function keys are not available under the MINIX version.
-.\" $PchId: curses.3,v 1.3 1996/02/22 21:26:28 philip Exp $
Index: trunk/minix/man/man3/directory.3
===================================================================
--- trunk/minix/man/man3/directory.3	(revision 9)
+++ 	(revision )
@@ -1,89 +1,0 @@
-.TH DIRECTORY 3
-.SH NAME
-directory, opendir, readdir, rewinddir, closedir, telldir, seekdir \- directory routines
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <dirent.h>
-
-DIR *opendir(const char *\fIdirname\fP)
-struct dirent *readdir(DIR *\fIdirp\fP)
-void rewinddir(DIR *\fIdirp\fP)
-int closedir(DIR *\fIdirp\fP)
-
-#define _MINIX  1
-#include <sys/types.h>
-#include <dirent.h>
-
-long telldir(DIR *\fIdirp\fP)
-int seekdir(DIR *\fIdirp\fP, long \fIpos\fP)
-.SH DESCRIPTION
-These routines form a system independent interface to access directories.
-.PP
-.B Opendir()
-opens the directory
-.I dirname
-and returns a pointer to this open directory stream.
-.PP
-.B Readdir()
-reads one entry from the directory as a pointer to a structure containing
-the field
-.BR d_name ,
-a character array containing the null-terminated name of the entry.
-.PP
-.B Rewinddir()
-allows the directory to be read again from the beginning.
-.PP
-.B Closedir()
-closes the directory and releases administrative data.
-.PP
-The MINIX 3 specific functions
-.B telldir()
-and
-.B seekdir()
-allow one to get the current position in the directory file and to return
-there later.
-.B Seekdir()
-may only be called with a position returned by
-.B telldir()
-or 0 (rewind).  These functions should not be used in portable programs.
-.SH "SEE ALSO"
-.BR dir (5).
-.SH DIAGNOSTICS
-.B Opendir()
-returns a null pointer if
-.I dirname
-can't be opened, or if it can't allocate enough memory for the
-.B DIR
-structure.
-.PP
-.B Readdir()
-returns null if there are no more directory entries or on error.
-.PP
-.B Closedir()
-and
-.B seekdir()
-returns 0 on success, -1 on error.
-.PP
-.B Telldir()
-returns -1 on error.
-.PP
-All of them set
-.B errno
-appropriately.
-.B Readdir()
-will only set
-.B errno
-on error, not on end-of-dir, so you should set
-.B errno
-to zero beforehand, and check its value if
-.B readdir()
-returns null.
-.SH NOTES
-The return value of
-.B readdir()
-needs to be copied before the next operation on the same directory if it is
-to be saved.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
Index: trunk/minix/man/man3/editline.3
===================================================================
--- trunk/minix/man/man3/editline.3	(revision 9)
+++ 	(revision )
@@ -1,169 +1,0 @@
-.\" $Revision: 1.1 $
-.TH EDITLINE 3
-.SH NAME
-editline \- command-line editing library with history
-.SH SYNOPSIS
-.ft B
-char *readline(char *\fIprompt\fP)
-.ft P
-.SH DESCRIPTION
-.I Editline
-is a library that provides an line-editing interface with text recall.
-It is intended to be compatible with the
-.I readline
-library provided by the Free Software Foundation, but much smaller.
-The bulk of this manual page describes the user interface.
-.PP
-The
-.I readline
-routine returns a line of text with the trailing newline removed.
-The data is returned in a buffer allocated with
-.IR malloc (3),
-so the space should be released with
-.IR free (3)
-when the calling program is done with it.
-Before accepting input from the user, the specified
-.I prompt
-is displayed on the terminal.
-.PP
-Each line returned is copied to the internal history list, unless it happens
-to be equal to the previous line.
-.SS "User Interface"
-A program that uses this library provides a simple emacs-like editing
-interface to its users.
-A line may be edited before it is sent to the calling program by typing either
-control characters or escape sequences.
-A control character, shown as a caret followed by a letter, is typed by
-holding down the ``control'' key while the letter is typed.
-For example, ``^A'' is a control-A.
-An escape sequence is entered by typing the ``escape'' key followed by one or
-more characters.
-The escape key is abbreviated as ``ESC.''
-Note that unlike control keys, case matters in escape sequences; ``ESC\ F''
-is not the same as ``ESC\ f''.
-.PP
-An editing command may be typed anywhere on the line, not just at the
-beginning.
-In addition, a return may also be typed anywhere on the line, not just at
-the end.
-.PP
-Most editing commands may be given a repeat count,
-.IR n ,
-where
-.I n
-is a number.
-To enter a repeat count, type the escape key, the number, and then
-the command to execute.
-For example, ``ESC\ 4\ ^f'' moves forward four characters.
-If a command may be given a repeat count then the text ``[n]'' is given at the
-end of its description.
-.PP
-The following control characters are accepted:
-.RS
-.nf
-.ta \w'ESC DEL  'u
-^A	Move to the beginning of the line
-^B	Move left (backwards) [n]
-^D	Delete character [n]
-^E	Move to end of line
-^F	Move right (forwards) [n]
-^G	Ring the bell
-^H	Delete character before cursor (backspace key) [n]
-^I	Complete filename (tab key); see below
-^J	Done with line (return key)
-^K	Kill to end of line (or column [n])
-^L	Redisplay line
-^M	Done with line (alternate return key)
-^N	Get next line from history [n]
-^P	Get previous line from history [n]
-^R	Search backward (forward if [n]) through history for text;
-\&	must start line if text begins with an uparrow
-^T	Transpose characters
-^V	Insert next character, even if it is an edit command
-^W	Wipe to the mark
-^X^X	Exchange current location and mark
-^Y	Yank back last killed text
-^[	Start an escape sequence (escape key)
-^]c	Move forward to next character ``c''
-^?	Delete character before cursor (delete key) [n]
-.fi
-.RE
-.PP
-The following escape sequences are provided.
-.RS
-.nf
-.ta \w'ESC DEL  'u
-ESC\ ^H	Delete previous word (backspace key) [n]
-ESC\ DEL	Delete previous word (delete key) [n]
-ESC\ SP	Set the mark (space key); see ^X^X and ^Y above
-ESC\ \.	Get the last (or [n]'th) word from previous line
-ESC\ \?	Show possible completions; see below
-ESC\ <	Move to start of history
-ESC\ >	Move to end of history
-ESC\ b	Move backward a word [n]
-ESC\ d	Delete word under cursor [n]
-ESC\ f	Move forward a word [n]
-ESC\ l	Make word lowercase [n]
-ESC\ m	Toggle if 8bit chars display normally or with ``M\-'' prefix
-ESC\ u	Make word uppercase [n]
-ESC\ y	Yank back last killed text
-ESC\ v	Show library version
-ESC\ w	Make area up to mark yankable
-ESC\ nn	Set repeat count to the number nn
-ESC\ C	Read from environment variable ``_C_'', where C is
-\&	an uppercase letter
-.fi
-.RE
-.PP
-The
-.I editline
-library has a small macro facility.
-If you type the escape key followed by an uppercase letter,
-.IR C ,
-then the contents of the environment variable
-.I _C_
-are read in as if you had typed them at the keyboard.
-For example, if the variable
-.I _L_
-contains the following:
-.RS
-^A^Kecho '^V^[[H^V^[[2J'^M
-.RE
-Then typing ``ESC L'' will move to the beginning of the line, kill the
-entire line, enter the echo command needed to clear the terminal (if your
-terminal is like a VT-100), and send the line back to the shell.
-.PP
-The
-.I editline
-library also does filename completion.
-Suppose the root directory has the following files in it:
-.RS
-.nf
-.ta \w'core   'u
-bin	vmunix
-core	vmunix.old
-.fi
-.RE
-If you type ``rm\ /v'' and then the tab key.
-.I Editline
-will then finish off as much of the name as possible by adding ``munix''.
-Because the name is not unique, it will then beep.
-If you type the escape key and a question mark, it will display the
-two choices.
-If you then type a period and a tab, the library will finish off the filename
-for you:
-.RS
-.nf
-.RI "rm /v[TAB]" munix .TAB old
-.fi
-.RE
-The tab key is shown by ``[TAB]'' and the automatically-entered text
-is shown in italics.
-.SH "BUGS AND LIMITATIONS"
-Doesn't know how to handle multiple lines.
-.SH AUTHORS
-Simmule R. Turner <uunet.uu.net!capitol!sysgo!simmy>
-and Rich $alz <rsalz@osf.org>.
-Original manual page by DaviD W. Sanderson <dws@ssec.wisc.edu>.
-
-.\" $PchId: editline.3,v 1.3 1996/02/22 21:18:51 philip Exp $
Index: trunk/minix/man/man3/end.3
===================================================================
--- trunk/minix/man/man3/end.3	(revision 9)
+++ 	(revision )
@@ -1,42 +1,0 @@
-.\"	@(#)end.3	6.2 (Berkeley) 5/12/86
-.\"
-.TH END 3  "May 12, 1986"
-.AT 3
-.SH NAME
-end, etext, edata \- last locations in program
-.SH SYNOPSIS
-.nf
-.ft B
-extern int etext;
-extern int edata;
-extern int end, _end;
-.ft R
-.fi
-.SH DESCRIPTION
-These names refer neither to routines nor to locations with interesting
-contents.  The address of
-.B etext
-is the first address above the program text,
-.B edata
-above the initialized data region, and
-.B end
-above the uninitialized data region.
-.B _end
-is the same as
-.BR end ,
-but in the implementers name space, i.e. for use in libraries.
-.PP
-When execution begins, the program break coincides with
-.BR end ,
-but it is reset by the routines
-.BR brk (2),
-.BR malloc (3), 
-standard input/output
-.RB ( stdio (3)),
-etc.
-The current value of the program break is reliably returned by `sbrk(0)',
-see
-.BR brk (2).
-.SH "SEE ALSO"
-.BR brk (2),
-.BR malloc (3).
Index: trunk/minix/man/man3/execl.3
===================================================================
--- trunk/minix/man/man3/execl.3	(revision 9)
+++ 	(revision )
@@ -1,196 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)execl.3	6.2 (Berkeley) 4/25/86
-.\"
-.TH EXECL 3 "April 25, 1986"
-.UC 5
-.SH NAME
-execl, execv, execle, execlp, execvp, exec, environ \- execute a file
-.SH SYNOPSIS
-.ft B
-#include <unistd.h>
-
-.in +.5i
-.ti -.5i
-int execl(const char *\fIname\fP, const char *\fIarg0\fP, ..., (char *) NULL)
-.ti -.5i
-int execv(const char *\fIname\fP, char *const \fIargv\fP[])
-.ti -.5i
-int execle(const char *\fIname\fP, const char *\fIarg0\fP, ..., (char *) NULL, char *const \fIenvp\fP[])
-.ti -.5i
-int execlp(const char *\fIname\fP, const char *\fIarg0\fP, ..., (char *) NULL)
-.ti -.5i
-int execvp(const char *\fIname\fP, char *const \fIargv\fP[])
-.in -.5i
-
-extern char *const *environ;
-.fi
-.SH DESCRIPTION
-These routines provide various interfaces to the
-.B execve 
-system call.  Refer to 
-.BR  execve (2)
-for a description of their properties; only
-brief descriptions are provided here.
-.PP
-.B Exec
-in all its forms
-overlays the calling process with the named file, then
-transfers to the
-entry point of the core image of the file.
-There can be no return from a successful exec; the calling
-core image is lost.
-.PP
-The
-.I name
-argument
-is a pointer to the name of the file
-to be executed.
-The pointers
-.IR arg [ 0 ],
-.IR arg [ 1 "] ..."
-address null-terminated strings.
-Conventionally
-.IR arg [ 0 ]
-is the name of the
-file.
-.PP
-Two interfaces are available.
-.B execl
-is useful when a known file with known arguments is
-being called;
-the arguments to
-.B execl
-are the character strings
-constituting the file and the arguments;
-the first argument is conventionally
-the same as the file name (or its last component).
-A null pointer argument must end the argument list.
-(Note that the
-.B execl*
-functions are variable argument functions.  This means that the type
-of the arguments beyond
-.I arg0
-is not checked.  So the null pointer requires an explicit cast to type
-.B "(char *)"
-if not of that type already.)
-.PP
-The
-.B execv
-version is useful when the number of arguments is unknown
-in advance;
-the arguments to
-.B execv
-are the name of the file to be
-executed and a vector of strings containing
-the arguments.
-The last argument string must be followed
-by a null pointer.
-.PP
-When a C program is executed,
-it is called as follows:
-.PP
-.RS
-.ft B
-.nf
-int main(int \fIargc\fP, char *const \fIargv\fP[], char *const \fIenvp\fP[]);
-
-exit(main(\fIargc\fP, \fIargv\fP, \fIenvp\fP));
-.fi
-.ft R
-.RE
-.PP
-where
-.I argc
-is the argument count
-and
-.I argv 
-is an array of character pointers
-to the arguments themselves.
-As indicated,
-.I argc
-is conventionally at least one
-and the first member of the array points to a
-string containing the name of the file.
-.PP
-.I Argv
-is directly usable in another
-.B execv
-because
-.IR argv [ argc ]
-is 0.
-.PP
-.I Envp
-is a pointer to an array of strings that constitute
-the
-.I environment
-of the process.
-Each string consists of a name, an \*(lq=\*(rq, and a null-terminated value.
-The array of pointers is terminated by a null pointer.
-The shell
-.BR sh (1)
-passes an environment entry for each global shell variable
-defined when the program is called.
-See
-.BR environ (7)
-for some conventionally
-used names.
-The C run-time start-off routine places a copy of
-.I envp
-in the global cell
-.BR environ ,
-which is used
-by
-.B execv
-and
-.B execl
-to pass the environment to any subprograms executed by the
-current program.
-.PP
-.B Execlp
-and
-.B execvp
-are called with the same arguments as
-.B execl
-and
-.BR execv ,
-but duplicate the shell's actions in searching for an executable
-file in a list of directories.
-The directory list is obtained from the environment variable
-.BR PATH .
-Under standard MINIX 3, if a file is found that is executable, but does
-not have the proper executable header then it is assumed to be
-a shell script.
-.B Execlp
-and
-.B execvp
-execute
-.B /bin/sh
-to interpret the script.
-Under Minix-vmd this does not happen, a script must begin with
-.B #!
-and the full path name of the interpreter if it is to be an
-executable script.
-.SH "SEE ALSO"
-.BR execve (2),
-.BR fork (2),
-.BR environ (7),
-.BR sh (1).
-.SH DIAGNOSTICS
-If the file cannot be found,
-if it is not executable,
-if it does not start with a valid magic number (see
-.BR a.out (5)),
-if maximum memory is exceeded,
-or if the arguments require too much space,
-a return
-constitutes the diagnostic;
-the return value is \-1 and
-.B errno
-is set as for
-.BR execve .
-Even for the super-user,
-at least one of the execute-permission bits must be set for
-a file to be executed.
Index: trunk/minix/man/man3/exit.3
===================================================================
--- trunk/minix/man/man3/exit.3	(revision 9)
+++ 	(revision )
@@ -1,39 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)exit.3	6.2 (Berkeley) 5/12/86
-.\"
-.TH EXIT 3 "May 12, 1986"
-.UC 5
-.SH NAME
-exit, atexit \- terminate a process after flushing any pending output
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdlib.h>
-
-void exit(int \fIstatus\fP)
-int atexit(void (*\fIfunc\fP)(void))
-.ft R
-.fi
-.SH DESCRIPTION
-.B Exit
-first calls all functions registered by
-.BR atexit ,
-flushes all data buffered by the Standard I/O library, and finally
-terminates the process.
-.B Exit
-never returns.
-.PP
-.B Atexit
-registers the function
-.I func
-into a table of functions to be called on exit.
-.SH "SEE ALSO"
-.BR exit (2).
-.SH DIAGNOSTICS
-.B Atexit
-returns 0 on success, \-1 if
-.B malloc
-cannot allocate more memory for the list of registered functions.
Index: trunk/minix/man/man3/fclose.3
===================================================================
--- trunk/minix/man/man3/fclose.3	(revision 9)
+++ 	(revision )
@@ -1,45 +1,0 @@
-.\"	@(#)fclose.3s	6.1 (Berkeley) 5/15/85
-.\"
-.TH FCLOSE 3  "May 15, 1985"
-.AT 3
-.SH NAME
-fclose, fflush \- close or flush a stream
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-int fclose(FILE *\fIstream\fP)
-int fflush(FILE *\fIstream\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Fclose
-causes any buffers for the named
-.I stream
-to be emptied, and the file to be closed.
-Buffers allocated by the standard input/output system
-are freed.
-.PP
-.B Fclose
-is performed automatically upon
-calling
-.BR  exit (3).
-.PP
-.B Fflush
-causes any buffered data for the named output
-.I stream
-to be written to that file.
-The stream remains open.
-.SH "SEE ALSO"
-.BR close (2),
-.BR fopen (3),
-.BR setbuf (3).
-.SH DIAGNOSTICS
-These routines return
-.SM
-.B EOF
-if
-.I stream
-is not associated with an output file, or
-if buffered data cannot be transferred to that file.
Index: trunk/minix/man/man3/ferror.3
===================================================================
--- trunk/minix/man/man3/ferror.3	(revision 9)
+++ 	(revision )
@@ -1,58 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)ferror.3s	6.3 (Berkeley) 5/14/86
-.\"
-.TH FERROR 3  "May 14, 1986"
-.UC 4
-.SH NAME
-ferror, feof, clearerr, fileno \- stream status inquiries
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-int feof(FILE *\fIstream\fP)
-int ferror(FILE *\fIstream\fP)
-int clearerr(FILE *\fIstream\fP)
-int fileno(FILE *\fIstream\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Feof
-returns non-zero when end of file is read on the named input
-.IR stream ,
-otherwise zero.
-Unless cleared by
-.BR clearerr ,
-the end-of-file indication lasts until
-the stream is closed.
-.PP
-.B Ferror
-returns non-zero when an error has occurred reading or writing
-the named
-.IR stream ,
-otherwise zero.
-Unless cleared by
-.BR clearerr ,
-the error indication lasts until
-the stream is closed.
-.PP
-.B Clearerr
-resets the error and end-of-file indicators on the named
-.IR stream .
-.PP
-.B Fileno
-returns the integer file descriptor
-associated with the
-.IR stream ,
-see
-.BR open (2).
-.PP
-Currently all of these functions
-are implemented as macros;
-they cannot be redeclared.
-.SH "SEE ALSO"
-.BR fopen (3),
-.BR open (2).
Index: trunk/minix/man/man3/fopen.3
===================================================================
--- trunk/minix/man/man3/fopen.3	(revision 9)
+++ 	(revision )
@@ -1,99 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)fopen.3s	6.3 (Berkeley) 5/27/86
-.\"
-.TH FOPEN 3  "May 27, 1986"
-.UC 4
-.SH NAME
-fopen, freopen, fdopen \- open a stream
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-FILE *fopen(const char *\fIfilename\fP, const char *\fItype\fP)
-FILE *freopen(const char *\fIfilename\fP, const char *\fItype\fP, FILE *\fIstream\fP)
-FILE *fdopen(int \fIfildes\fP, const char *\fItype\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Fopen
-opens the file named by
-.I filename
-and associates a stream with it.
-.B Fopen
-returns a pointer to be used to identify the stream in subsequent operations.
-.PP
-.I Type
-is a character string having one of the following values:
-.TP 5
-"r"
-open for reading
-.ns
-.TP 5
-"w"
-create for writing
-.ns
-.TP 5
-"a"
-append: open for writing at end of file, or create for writing
-.PP
-In addition, each
-.I type
-may be followed by a "+" to have the file opened for reading and writing.
-"r+" positions the stream at the beginning of the file, "w+" creates
-or truncates it, and "a+" positions it at the end.  Both reads and writes
-may be used on read/write streams, with the limitation that an
-.BR fseek ,
-.BR rewind ,
-or reading an end-of-file must be used between a read and a write or vice-versa.
-.PP
-.B Freopen
-substitutes the named file in place of the open
-.IR stream .
-It returns the original value of
-.IR stream .
-The original stream is closed.
-.PP
-.B Freopen
-is typically used to attach the preopened constant names,
-.B stdin, stdout, stderr,
-to specified files.
-.PP
-.B Fdopen
-associates a stream with a file descriptor obtained from
-.BR open ,
-.BR dup ,
-.BR creat ,
-or
-.BR pipe (2).
-The
-.I type
-of the stream must agree with the mode of the open file.
-.SH "SEE ALSO"
-.BR open (2),
-.BR fclose (3).
-.SH DIAGNOSTICS
-.B Fopen
-and 
-.B freopen
-return the pointer
-.SM
-.B NULL
-if
-.I filename
-cannot be accessed,
-if too many files are already open,
-or if other resources needed cannot be allocated.
-.SH BUGS
-.B Fdopen
-is not portable to systems other than UNIX.
-.PP
-The read/write 
-.I types
-do not exist on all systems.  Those systems without
-read/write modes will probably treat the 
-.I type
-as if the "+" was not present.  These are unreliable in any event.
Index: trunk/minix/man/man3/fread.3
===================================================================
--- trunk/minix/man/man3/fread.3	(revision 9)
+++ 	(revision )
@@ -1,66 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)fread.3s	6.1 (Berkeley) 5/15/85
-.\"
-.TH FREAD 3  "May 15, 1985"
-.UC 4
-.SH NAME
-fread, fwrite \- buffered binary input/output
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <stdio.h>
-
-size_t fread(void *\fIptr\fP, size_t \fIitemsize\fP, size_t \fInitems\fP, FILE *\fIstream\fP)
-size_t fwrite(void *\fIptr\fP, size_t \fIitemsize\fP, size_t \fInitems\fP, FILE *\fIstream\fP)
-.SH DESCRIPTION
-.B Fread
-reads, into a block beginning at
-.IR ptr ,
-.I nitems
-of data of the type of
-.I *ptr
-from the named input
-.IR stream .
-It returns the number of items actually read.
-.PP
-If
-.I stream
-is
-.B stdin
-and the standard output is line buffered, then any partial output line
-will be flushed before any call to
-.BR read (2)
-to satisfy the
-.BR fread .
-.PP
-.B Fwrite
-appends at most
-.I nitems
-of data of the type of
-.I *ptr
-beginning at
-.I ptr
-to the named output
-.IR stream .
-It returns the number of items actually written.
-.SH "SEE ALSO"
-.BR read (2),
-.BR write (2),
-.BR fopen (3),
-.BR getc (3),
-.BR putc (3),
-.BR gets (3),
-.BR puts (3),
-.BR printf (3),
-.BR scanf (3).
-.SH DIAGNOSTICS
-.B Fread
-and
-.B fwrite
-return
-0
-upon end of file or error.
Index: trunk/minix/man/man3/fseek.3
===================================================================
--- trunk/minix/man/man3/fseek.3	(revision 9)
+++ 	(revision )
@@ -1,53 +1,0 @@
-.\"	@(#)fseek.3s	6.3 (Berkeley) 2/24/86
-.\"
-.TH FSEEK 3  "February 24, 1986"
-.AT 3
-.SH NAME
-fseek, ftell, rewind \- reposition a stream
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-int fseek(FILE *\fIstream\fP, long \fIoffset\fP, int \fIptrname\fP)
-long ftell(FILE *\fIstream\fP)
-void rewind(FILE *\fIstream\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Fseek
-sets the position of the next input or output
-operation on the
-.IR stream .
-The new position is at the signed distance
-.I offset
-bytes
-from the beginning, the current position, or the end of the file,
-according as 
-.I ptrname
-has the value 0, 1, or 2.
-.PP
-.B Fseek
-undoes any effects of
-.BR  ungetc (3).
-.PP
-.B Ftell
-returns the current value of the offset relative to the beginning
-of the file associated with the named
-.IR stream .
-It is measured in bytes on UNIX;
-on some other systems it is a magic cookie,
-and the only foolproof way to obtain an 
-.I offset
-for
-.BR fseek .
-.PP
-.BR Rewind "(\fIstream\fR)"
-is equivalent to
-.BR fseek "(\fIstream\fR, 0L, 0)."
-.SH "SEE ALSO"
-.BR lseek (2),
-.BR fopen (3).
-.SH DIAGNOSTICS
-.B Fseek
-returns \-1 for improper seeks, otherwise zero.
Index: trunk/minix/man/man3/g_h_b_n.3
===================================================================
--- trunk/minix/man/man3/g_h_b_n.3	(revision 9)
+++ 	(revision )
@@ -1,165 +1,0 @@
-.\" Copyright (c) 1983, 1987 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms are permitted provided
-.\" that: (1) source distributions retain this entire copyright notice and
-.\" comment, and (2) distributions including binaries display the following
-.\" acknowledgement:  ``This product includes software developed by the
-.\" University of California, Berkeley and its contributors'' in the
-.\" documentation or other materials provided with the distribution and in
-.\" all advertising materials mentioning features or use of this software.
-.\" 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
-.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-.\"
-.\"	@(#)gethostbyname.3	6.12 (Berkeley) 6/23/90
-.\"
-.TH GETHOSTBYNAME 3 "June 23, 1990"
-.UC 5
-.SH NAME
-g_h_b_n, gethostbyname, gethostbyaddr, gethostent, sethostent, endhostent, herror \- get network host entry
-.SH SYNOPSIS
-.B "#include <net/gen/netdb.h>
-.PP
-.B "extern int h_errno;
-.PP
-.B "struct hostent *gethostbyname(name)
-.br
-.B "char *name;
-.PP
-.B "struct hostent *gethostbyaddr(addr, len, type)
-.br
-.B "char *addr; int len, type;
-.PP
-.B "struct hostent *gethostent()
-.PP
-.B "sethostent(stayopen)
-.br
-.B "int stayopen;
-.PP
-.B "endhostent()
-.PP
-.B "herror(string)
-.br
-.B "char *string;
-.PP
-.SH DESCRIPTION
-.I Gethostbyname
-and
-.I gethostbyaddr
-each return a pointer to an object with the
-following structure describing an internet host
-referenced by name or by address, respectively.
-This structure contains the information obtained from the name server.
-.PP
-.nf
-struct	hostent {
-	char	*h_name;	/* official name of host */
-	char	**h_aliases;	/* alias list */
-	int	h_addrtype;	/* host address type */
-	int	h_length;	/* length of address */
-	char	**h_addr_list;	/* list of addresses from name server */
-};
-#define	h_addr  h_addr_list[0]	/* address, for backward compatibility */
-.ft R
-.ad
-.fi
-.PP
-The members of this structure are:
-.TP \w'h_addr_list'u+2n
-h_name
-Official name of the host.
-.TP \w'h_addr_list'u+2n
-h_aliases
-A zero terminated array of alternate names for the host.
-.TP \w'h_addr_list'u+2n
-h_addrtype
-The type of address being returned; currently always AF_INET.
-.TP \w'h_addr_list'u+2n
-h_length
-The length, in bytes, of the address.
-.TP \w'h_addr_list'u+2n
-h_addr_list
-A zero terminated array of network addresses for the host.
-Host addresses are returned in network byte order.
-.TP \w'h_addr_list'u+2n
-h_addr
-The first address in h_addr_list; this is for backward compatiblity.
-.PP
-When using the nameserver,
-.I gethostbyname
-will search for the named host in the current domain and its parents
-unless the name ends in a dot.
-If the name contains no dot, and if the environment variable ``HOSTALAIASES''
-contains the name of an alias file, the alias file will first be searched
-for an alias matching the input name.
-See
-.IR hostname (7)
-for the domain search procedure and the alias file format.
-.PP
-.I Sethostent
-may be used to request the use of a connected TCP socket for queries.
-If the
-.I stayopen
-flag is non-zero,
-this sets the option to send all queries to the name server using TCP
-and to retain the connection after each call to 
-.I gethostbyname
-or
-.IR gethostbyaddr .
-Otherwise, queries are performed using UDP datagrams.
-.PP
-.I Endhostent
-closes the TCP connection.
-.SH DIAGNOSTICS
-.PP
-Error return status from 
-.I gethostbyname
-and
-.I gethostbyaddr
-is indicated by return of a null pointer.
-The external integer
-.IR h_errno
-may then be checked to see whether this is a temporary failure
-or an invalid or unknown host.
-The routine
-.I herror
-can be used to print an error message describing the failure.
-If its argument
-.I string
-is non-NULL, it is printed, followed by a colon and a space.
-The error message is printed with a trailing newline.
-.PP
-.IR h_errno
-can have the following values:
-.RS
-.IP HOST_NOT_FOUND \w'HOST_NOT_FOUND'u+2n
-No such host is known.
-.IP TRY_AGAIN \w'HOST_NOT_FOUND'u+2n
-This is usually a temporary error
-and means that the local server did not receive
-a response from an authoritative server.
-A retry at some later time may succeed.
-.IP NO_RECOVERY \w'HOST_NOT_FOUND'u+2n
-Some unexpected server failure was encountered.
-This is a non-recoverable error.
-.IP NO_DATA \w'HOST_NOT_FOUND'u+2n
-The requested name is valid but does not have an IP address; 
-this is not a temporary error.  
-This means that the name is known to the name server but there is no address
-associated with this name.
-Another type of request to the name server using this domain name
-will result in an answer;
-for example, a mail-forwarder may be registered for this domain.
-.RE
-.SH "SEE ALSO"
-resolver(3), hostname(7), nonamed(8), named(8)
-.SH BUGS
-All information
-is contained in a static area
-so it must be copied if it is
-to be saved.  Only the Internet
-address format is currently understood.
Index: trunk/minix/man/man3/getc.3
===================================================================
--- trunk/minix/man/man3/getc.3	(revision 9)
+++ 	(revision )
@@ -1,79 +1,0 @@
-.\"	@(#)getc.3s	6.2 (Berkeley) 5/14/86
-.\"
-.TH GETC 3  "May 14, 1986"
-.AT 3
-.SH NAME
-getc, getchar, fgetc, getw \- get character or word from stream
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-int getc(FILE *\fIstream\fP)
-int getchar(void)
-int fgetc(FILE *\fIstream\fP)
-int getw(FILE *\fIstream\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Getc
-returns the next character from the named input
-.IR stream .
-.PP
-.BR Getchar ()
-is identical to 
-.BR getc ( stdin ).
-.PP
-.B Fgetc
-behaves like 
-.BR getc ,
-but is a genuine function, not a macro;
-it may be used to save object text.
-.PP
-.B Getw
-returns the next
-.B int
-from the named input
-.IR stream .
-It returns the constant
-.SM
-.B EOF
-upon end of file or error, but since that is a good
-integer value,
-.B feof
-and
-.BR ferror (3)
-should be used to check the success of
-.BR getw .
-.B Getw
-assumes no special alignment in the file.
-.SH "SEE ALSO"
-.BR clearerr (3),
-.BR fopen (3),
-.BR putc (3),
-.BR gets (3),
-.BR scanf (3),
-.BR fread (3),
-.BR ungetc (3).
-.SH DIAGNOSTICS
-These functions return the integer constant
-.SM
-.B EOF
-at end of file, upon read error,
-or if an attempt is made to read a file not opened by
-.BR fopen .
-The end-of-file condition is remembered,
-even on a terminal,
-and all subsequent attempts to read will return
-.B EOF
-until the condition is cleared with
-.BR clearerr (3).
-.SH BUGS
-Because it is implemented as a macro,
-.B getc
-treats a
-.I stream
-argument with side effects incorrectly.
-In particular,
-`getc(*f++);'
-doesn't work sensibly.
Index: trunk/minix/man/man3/getcwd.3
===================================================================
--- trunk/minix/man/man3/getcwd.3	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)getwd.3	6.2 (Berkeley) 5/12/86
-.\"
-.TH GETCWD 3 "May 12, 1986"
-.UC 5
-.SH NAME
-getcwd \- get current working directory pathname
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-char *getcwd(char *\fIpathname\fP, size_t \fIlen\fP)
-.fi
-.SH DESCRIPTION
-.B Getcwd
-copies the absolute pathname of the current working directory to
-.I pathname
-and returns a pointer to the result.
-.I Pathname
-is a character array of length
-.IR len .
-.SH DIAGNOSTICS
-.B Getcwd
-returns a null pointer and sets
-.B errno
-if an error occurs.  The error will reflect the system call errors that
-may occur if the path to the current directory is searched upwards to
-the root directory.  The error
-.B ERANGE
-is returned if the result does not fit within
-.I len
-bytes.
Index: trunk/minix/man/man3/getenv.3
===================================================================
--- trunk/minix/man/man3/getenv.3	(revision 9)
+++ 	(revision )
@@ -1,29 +1,0 @@
-.\"	@(#)getenv.3	6.1 (Berkeley) 5/15/85
-.\"
-.TH GETENV 3 "May 15, 1985"
-.AT 3
-.SH NAME
-getenv \- value for environment name
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdlib.h>
-
-char *getenv(const char *\fIname\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Getenv
-searches the environment list
-(see
-.BR environ (7))
-for a string of the form
-.IB name = value
-and returns a pointer to the string
-.I value
-if such a string is present, otherwise 
-.B getenv
-returns the null pointer.
-.SH SEE ALSO
-.BR environ (7),
-.BR execve (2).
Index: trunk/minix/man/man3/getgrent.3
===================================================================
--- trunk/minix/man/man3/getgrent.3	(revision 9)
+++ 	(revision )
@@ -1,136 +1,0 @@
-.TH GETGRENT 3
-.SH NAME
-getgrent, getgrnam, getgrgid, setgrent, endgrent, setgrfile \- group file routines
-.SH SYNOPSIS
-.ft B
-.nf
-#include <grp.h>
-
-struct group *getgrent(void)
-struct group *getgrnam(const char *\fIname\fP)
-struct group *getgrgid(gid_t \fIgid\fP)
-int setgrent(void)
-void endgrent(void)
-void setgrfile(const char *\fIfile\fP)
-.fi
-.ft P
-.SH DESCRIPTION
-These functions are used to obtain information from the group file.  They
-return this information in a
-.B struct group
-as defined by <grp.h>:
-.PP
-.nf
-.ta +4n +6n +15n
-struct group {
-	char	*gr_name;	/* login name */
-	char	*gr_passwd;	/* encrypted password */
-	gid_t	gr_gid;	/* numeric group id */
-	char	**gr_mem;	/* null-terminated list of group members */
-};
-.fi
-.PP
-.B Getgrent()
-reads the group file entry by entry.
-.B Getgrnam()
-scans the entire group file for the group with the given
-.IR name .
-.B Getgrgid()
-looks for the first group with the given
-.IR gid .
-The
-.B setgrent()
-and
-.B endgrent()
-functions are used to open and later close the group file.  With
-.B setgrfile()
-one can specify the file to read other than the normal group file.  This
-only sets the name, the next
-.B setgrent()
-call will open the file.  Do not touch the file name while it is active.
-Use
-.B setgrfile(NULL)
-to revert back to the normal group file.
-.PP
-The usual way to scan the group file is (error checking omitted):
-.PP
-.RS
-.nf
-.DT
-setgrent();
-while ((gr = getgrent()) != NULL)
-	if (appropriate_test(gr)) break;
-endgrent();
-.fi
-.RE
-.PP
-The
-.B gr
-variable contains the entry that is wanted if non-NULL.  The
-.B getgrnam()
-and
-.B getgrgid()
-functions are implemented as in this example, with error checking of course.
-.PP
-.B Getgrent()
-calls
-.B setgrent()
-if this has not yet been done.
-.B Setgrent()
-first calls
-.B endgrent()
-if the group file is still open.  (Other implementations may simply
-rewind the file.)
-.SH FILES
-.TP 15
-.B /etc/group
-The group file database.
-.SH "SEE ALSO"
-.BR getgroups (2),
-.BR initgroups (3),
-.BR getpwent (3),
-.BR passwd (5).
-.SH DIAGNOSTICS
-.B Setgrent()
-has the same return value and error codes as the
-.BR open (2)
-call it uses to open the group file.  The
-.BI get xxx ()
-functions return NULL on end of file, entry not found, or error.  You can
-set
-.B errno
-to zero before the call and check it after.
-.SH NOTES
-All
-.BI get xxx ()
-routines return a pointer to static storage that is overwritten in each call.
-.PP
-Only
-.B getgrnam()
-and
-.B getgrgid()
-are defined by \s-2POSIX\s+2.  The
-.B _MINIX_SOURCE
-macro must be defined before including <grp.h> to make the other functions
-visible.  The
-.B gr_passwd
-field is also not defined by \s-2POSIX\s+2, but is always visible.
-Portable code cannot reliably detect errors by setting
-.B errno
-to zero.  Under MINIX 3 it is better to make a
-.B getgrent()
-scan if you need to look up several group-id's or names, but portable code
-had better use several
-.B getgrgid()
-or
-.B getgrnam()
-calls.  The
-.B getgrent()
-is usually available on other systems, but may be very expensive.  See
-.BR initgroups (3)
-if you are after supplementary group id's.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
-
-.\"
-.\" $PchId: getgrent.3,v 1.2 1996/04/11 06:35:01 philip Exp $
Index: trunk/minix/man/man3/getloadavg.3
===================================================================
--- trunk/minix/man/man3/getloadavg.3	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-.\"	@(#)getloadavg.3
-.\"
-.TH GETLOADAVG 3 "Nov 14, 2005"
-.AT 3
-.SH NAME
-getloadavg \- system load average values
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdlib.h>
-
-int getloadavg(double *\fIaverages\fP, int \fInelem\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Getloadavg
-returns the system load average values as elements of 
-.IR averages
-up to
-a maximum of 
-.IR nelem
-elements.
-The system load average is the average number of
-runnable processes over a certain period. Currently the averages are
-delivered over the last 1, 5 and 15 minutes of system usage. So 
-currently the system maximum is 3.
-.SH RETURNS
-The returned value  of
-.B getloadavg
-is zero or more if the call was successful, or a negative value if the
-call was unsuccessful. If the call was successful, the number of
-elements entered into
-.IR averages
-is returned. 
-.SH SEE ALSO
-.BR uptime (1).
Index: trunk/minix/man/man3/getlogin.3
===================================================================
--- trunk/minix/man/man3/getlogin.3	(revision 9)
+++ 	(revision )
@@ -1,45 +1,0 @@
-.\"	@(#)getlogin.3	6.2 (Berkeley) 5/9/86
-.\"
-.TH GETLOGIN 3  "May 9, 1986"
-.AT 3
-.SH NAME
-getlogin \- get login name
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-char *getlogin(void)
-.fi
-.SH DESCRIPTION
-.B Getlogin
-returns a pointer to the login name as found in
-.BR /etc/utmp .
-It may be used in conjunction with
-.B getpwnam
-to locate the correct password file entry when the same user ID
-is shared by several login names.
-.PP
-If
-.B getlogin
-is called within a process that is not attached to a
-terminal, or if there is no entry in
-.B /etc/utmp
-for the process's terminal,
-.B getlogin
-returns a null pointer.
-A reasonable procedure for determining the login name is to first call
-.B getlogin
-and if it fails, to call
-.BR getpwuid ( getuid ()).
-.SH FILES
-/etc/utmp
-.SH "SEE ALSO"
-.BR getpwent (3),
-.BR utmp (5),
-.BR ttyslot (3)
-.SH DIAGNOSTICS
-Returns a null pointer if the name cannot be found.
-.SH BUGS
-The return values point to static data
-whose content is overwritten by each call.
Index: trunk/minix/man/man3/getopt.3
===================================================================
--- trunk/minix/man/man3/getopt.3	(revision 9)
+++ 	(revision )
@@ -1,150 +1,0 @@
-.\" Copyright (c) 1985 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)getopt.3	6.4 (Berkeley) 5/27/86
-.\"
-.TH GETOPT 3 "May 27, 1986"
-.UC 6
-.SH NAME
-getopt \- get option letter from argv
-.SH SYNOPSIS
-.ft B
-int getopt(argc, argv, optstring)
-.br
-int argc;
-.br
-char **argv;
-.br
-char *optstring;
-.sp
-extern char *optarg;
-.br
-extern int optind;
-.ft
-.SH DESCRIPTION
-.I Getopt
-returns the next option letter in
-.I argv
-that matches a letter in
-.IR optstring .
-.I Optstring
-is a string of recognized option letters;
-if a letter is followed by a colon, the option is expected to have
-an argument that may or may not be separated from it by white space.
-.I Optarg
-is set to point to the start of the option argument on return from
-.IR getopt .
-.PP
-.I Getopt
-places in
-.I optind
-the
-.I argv
-index of the next argument to be processed.
-Because
-.I optind
-is external, it is normally initialized to zero automatically
-before the first call to 
-.IR getopt .
-.PP
-When all options have been processed (i.e., up to the first
-non-option argument),
-.I getopt
-returns
-.BR EOF .
-The special option
-.B \-\-
-may be used to delimit the end of the options;
-.B EOF
-will be returned, and
-.B \-\-
-will be skipped.
-.SH DIAGNOSTICS
-.I Getopt
-prints an error message on
-.I stderr
-and returns a question mark
-.RB ( ? )
-when it encounters an option letter not included in
-.IR optstring .
-.SH EXAMPLE
-The following code fragment shows how one might process the arguments
-for a command that can take the mutually exclusive options
-.B a
-and
-.BR b ,
-and the options
-.B f
-and
-.BR o ,
-both of which require arguments:
-.PP
-.RS
-.nf
-main(argc, argv)
-int argc;
-char **argv;
-{
-	int c;
-	extern int optind;
-	extern char *optarg;
-	\&.
-	\&.
-	\&.
-	while ((c = getopt(argc, argv, "abf:o:")) != EOF)
-		switch (c) {
-		case `a':
-			if (bflg)
-				errflg++;
-			else
-				aflg++;
-			break;
-		case `b':
-			if (aflg)
-				errflg++;
-			else
-				bproc();
-			break;
-		case `f':
-			ifile = optarg;
-			break;
-		case `o':
-			ofile = optarg;
-			break;
-		case `?':
-		default:
-			errflg++;
-			break;
-		}
-	if (errflg) {
-		fprintf(stderr, "Usage: ...");
-		exit(2);
-	}
-	for (; optind < argc; optind++) {
-		\&.
-		\&.
-		\&.
-	}
-	\&.
-	\&.
-	\&.
-}
-.RE
-.SH HISTORY
-Written by Henry Spencer, working from a Bell Labs manual page.
-Modified by Keith Bostic to behave more like the System V version.
-.SH BUGS
-It is not obvious how
-`\-'
-standing alone should be treated;  this version treats it as
-a non-option argument, which is not always right.
-.PP
-Option arguments are allowed to begin with `\-';
-this is reasonable but reduces the amount of error checking possible.
-.PP
-.I Getopt
-is quite flexible but the obvious price must be paid:  there is much
-it could do that it doesn't, like
-checking mutually exclusive options, checking type of
-option arguments, etc.
Index: trunk/minix/man/man3/getpass.3
===================================================================
--- trunk/minix/man/man3/getpass.3	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-.\"	@(#)getpass.3	6.1 (Berkeley) 5/15/85
-.\"
-.TH GETPASS 3  "May 15, 1985"
-.AT 3
-.SH NAME
-getpass \- read a password
-.SH SYNOPSIS
-.nf
-.ft B
-#include <minix/minlib.h>
-
-char *getpass(const char *\fIprompt\fP)
-.fi
-.SH DESCRIPTION
-.B Getpass
-reads a password from the file
-.BR /dev/tty ,
-or if that cannot be opened, from the standard input,
-after prompting with the null-terminated string
-.I prompt
-and disabling echoing.
-A pointer is returned to a null-terminated string
-of at most 32 characters, excluding the null.
-.SH "SEE ALSO"
-.BR crypt (3).
-.SH BUGS
-The return value points to static data
-whose content is overwritten by each call.
Index: trunk/minix/man/man3/getpwent.3
===================================================================
--- trunk/minix/man/man3/getpwent.3	(revision 9)
+++ 	(revision )
@@ -1,139 +1,0 @@
-.TH GETPWENT 3
-.SH NAME
-getpwent, getpwnam, getpwuid, setpwent, endpwent, setpwfile \- password file routines
-.SH SYNOPSIS
-.ft B
-.nf
-#include <pwd.h>
-
-struct passwd *getpwent(void)
-struct passwd *getpwnam(const char *\fIname\fP)
-struct passwd *getpwuid(uid_t \fIuid\fP)
-int setpwent(void)
-void endpwent(void)
-void setpwfile(const char *\fIfile\fP)
-.fi
-.ft P
-.SH DESCRIPTION
-These functions are used to obtain information from the password file.  They
-return this information in a
-.B struct passwd
-as defined by <pwd.h>:
-.PP
-.nf
-.ta +4n +6n +15n
-struct passwd {
-	char	*pw_name;	/* login name */
-	char	*pw_passwd;	/* encrypted password */
-	uid_t	pw_uid;	/* numeric user id */
-	gid_t	pw_gid;	/* numeric group id */
-	char	*pw_gecos;	/* user full name and other info */
-	char	*pw_dir;	/* user's home directory */
-	char	*pw_shell;	/* name of the user's shell */
-};
-.fi
-.PP
-.B Getpwent()
-reads the password file entry by entry.
-.B Getpwnam()
-scans the entire password file for the user with the given
-.IR name .
-.B Getpwuid()
-looks for the first user with the given
-.IR uid .
-The
-.B setpwent()
-and
-.B endpwent()
-functions are used to open and later close the password file.  With
-.B setpwfile()
-one can specify the file to read other than the normal password file.  This
-only sets the name, the next
-.B setpwent()
-call will open the file.  Do not touch the file name while it is active.
-Use
-.B setpwfile(NULL)
-to revert back to the normal password file.
-.PP
-The usual way to scan the password file is (error checking omitted):
-.PP
-.RS
-.nf
-.DT
-setpwent();
-while ((pw = getpwent()) != NULL)
-	if (appropriate_test(pw)) break;
-endpwent();
-.fi
-.RE
-.PP
-The
-.B pw
-variable contains the entry that is wanted if non-NULL.  The
-.B getpwnam()
-and
-.B getpwuid()
-functions are implemented as in this example, with error checking of course.
-.PP
-.B Getpwent()
-calls
-.B setpwent()
-if this has not yet been done.
-.B Setpwent()
-first calls
-.B endpwent()
-if the password file is still open.  (Other implementations may simply
-rewind the file.)
-.SH FILES
-.TP 15
-.B /etc/passwd
-The password file database.
-.SH "SEE ALSO"
-.BR cuserid (3),
-.BR getlogin (3),
-.BR getgrent (3),
-.BR passwd (5).
-.SH DIAGNOSTICS
-.B Setpwent()
-has the same return value and error codes as the
-.BR open (2)
-call it uses to open the password file.  The
-.BI get xxx ()
-functions return NULL on end of file, entry not found, or error.  You can
-set
-.B errno
-to zero before the call and check it after.
-.SH NOTES
-All
-.BI get xxx ()
-routines return a pointer to static storage that is overwritten in each call.
-.PP
-Only
-.B getpwnam()
-and
-.B getpwuid()
-are defined by \s-2POSIX\s+2.  The
-.B _MINIX_SOURCE
-macro must be defined before including <pwd.h> to make the other functions
-visible.  The
-.B pw_passwd
-and
-.B pw_gecos
-fields are also not defined by \s-2POSIX\s+2, but are always visible.
-Portable code cannot reliably detect errors by setting
-.B errno
-to zero.  Under MINIX 3 it is better to make a
-.B getpwent()
-scan if you need to look up several user-id's or names, but portable code
-had better use several
-.B getpwuid()
-or
-.B getpwnam()
-calls.  The
-.B getpwent()
-is usually available on other systems, but may be very expensive.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
-
-.\"
-.\" $PchId: getpwent.3,v 1.2 1996/04/11 06:37:43 philip Exp $
Index: trunk/minix/man/man3/gets.3
===================================================================
--- trunk/minix/man/man3/gets.3	(revision 9)
+++ 	(revision )
@@ -1,68 +1,0 @@
-.\"	@(#)gets.3s	6.1 (Berkeley) 5/15/85
-.\"
-.TH GETS 3  "May 15, 1985"
-.AT 3
-.SH NAME
-gets, fgets \- get a string from a stream
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-char *gets(char *\fIs\fP)
-char *fgets(char *\fIs\fP, int \fIn\fP, FILE *\fIstream\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Gets
-reads a string into
-.I s
-from the standard input stream
-.BR stdin .
-The string is terminated by a newline
-character, which is replaced in
-.I s
-by a null character.
-.B Gets
-returns its argument.
-.PP
-.B Fgets
-reads 
-.IR n \-1
-characters, or up through a newline
-character, whichever comes first,
-from the
-.I stream
-into the string
-.IR s .
-The last character read into
-.I s
-is followed by a null character.
-.B Fgets
-returns its first argument.
-.SH "SEE ALSO"
-.BR puts (3),
-.BR getc (3),
-.BR scanf (3),
-.BR fread (3),
-.BR ferror (3).
-.SH DIAGNOSTICS
-.B Gets
-and
-.B fgets
-return the constant pointer 
-.SM
-.B NULL
-upon end of file or error.
-.SH BUGS
-.B Gets
-deletes a newline,
-.B fgets
-keeps it,
-all in the name of backward compatibility.
-.PP
-.B Gets
-is not present in the Minix-vmd C library for reasons that should be obvious.
-Use
-.B fgets
-instead.
Index: trunk/minix/man/man3/getservent.3
===================================================================
--- trunk/minix/man/man3/getservent.3	(revision 9)
+++ 	(revision )
@@ -1,112 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)getservent.3n	6.3 (Berkeley) 5/19/86
-.\"
-.TH GETSERVENT 3 "May 19, 1986"
-.UC 5
-.SH NAME
-getservent, getservbyport, getservbyname, setservent, endservent \- get service entry
-.SH SYNOPSIS
-.nf
-.ft B
-#include <netdb.h>
-.PP
-.ft B
-struct servent *getservent()
-.PP
-.ft B
-struct servent *getservbyname(name, proto)
-char *name, *proto;
-.PP
-.ft B
-struct servent *getservbyport(port, proto)
-int port; char *proto;
-.PP
-.ft B
-setservent(stayopen)
-int stayopen
-.PP
-.ft B
-endservent()
-.fi
-.SH DESCRIPTION
-.IR Getservent ,
-.IR getservbyname ,
-and
-.I getservbyport
-each return a pointer to an object with the
-following structure
-containing the broken-out
-fields of a line in the network services data base,
-.IR /etc/services .
-.RS
-.PP
-.nf
-struct	servent {
-	char	*s_name;	/* official name of service */
-	char	**s_aliases;	/* alias list */
-	int	s_port;		/* port service resides at */
-	char	*s_proto;	/* protocol to use */
-};
-.ft R
-.ad
-.fi
-.RE
-.PP
-The members of this structure are:
-.TP \w's_aliases'u+2n
-s_name
-The official name of the service.
-.TP \w's_aliases'u+2n
-s_aliases
-A zero terminated list of alternate names for the service.
-.TP \w's_aliases'u+2n
-s_port
-The port number at which the service resides.
-Port numbers are returned in network byte order.
-.TP \w's_aliases'u+2n
-s_proto
-The name of the protocol to use when contacting the
-service.
-.PP
-.I Getservent
-reads the next line of the file, opening the file if necessary.
-.PP
-.I Setservent
-opens and rewinds the file.  If the
-.I stayopen
-flag is non-zero,
-the net data base will not be closed after each call to 
-.I getservbyname
-or
-.IR getservbyport .
-.PP
-.I Endservent
-closes the file.
-.PP
-.I Getservbyname
-and
-.I getservbyport
-sequentially search from the beginning
-of the file until a matching
-protocol name or
-port number is found,
-or until EOF is encountered.
-If a protocol name is also supplied (non-NULL),
-searches must also match the protocol.
-.SH FILES
-/etc/services
-.SH "SEE ALSO"
-getprotoent(3), services(5)
-.SH DIAGNOSTICS
-Null pointer
-(0) returned on EOF or error.
-.SH BUGS
-All information
-is contained in a static area
-so it must be copied if it is
-to be saved.  Expecting port
-numbers to fit in a 32 bit
-quantity is probably naive.
Index: trunk/minix/man/man3/getttyent.3
===================================================================
--- trunk/minix/man/man3/getttyent.3	(revision 9)
+++ 	(revision )
@@ -1,107 +1,0 @@
-.TH GETTTYENT 3
-.SH NAME
-getttyent, getttynam, setttyent, endttyent \- interface to /etc/ttytab
-.SH SYNOPSIS
-.ft B
-.nf
-#include <ttyent.h>
-
-struct ttyent *getttyent(void)
-struct ttyent *getttynam(const char *\fIname\fP)
-int setttyent(void)
-void endttyent(void)
-.fi
-.ft P
-.SH DESCRIPTION
-The
-.B getttyent
-functions provide an interface to the /etc/ttytab.  (See
-.BR ttytab (5)).
-.PP
-To read one of these files one calls
-.B getttyent()
-several times to read the entries in the table until NULL is returned for
-end-of-file.
-.PP
-.B Getttyname()
-searches the
-.B ttytab
-file for the given terminal device.  It is equivalent to a call to
-.BR setttyent(),
-several calls to
-.B getttyent()
-to locate the entry, and a final
-.B endttyent()
-to close the file.
-.PP
-.B Setttyent()
-opens or rewinds the ttytab database, and
-.B endttyent() closes it.
-.B Getttyent()
-opens the database if not already open, but does not close it.
-.PP
-The struct ttyent is defined by <ttyent.h> as follows:
-.sp
-.nf
-.ta +4n +6n +15n
-struct ttyent {
-	char	*ty_name;	/* Name of the terminal device. */
-	char	*ty_type;	/* Terminal type name (termcap(3)). */
-	char	**ty_getty;	/* Program to run, normally getty. */
-	char	**ty_init;	/* Initialization command, normally stty. */
-};
-.fi
-.PP
-A valid entry has at least two strings, so both
-.B ty_name
-and
-.B ty_type
-are filled in.  The optional
-.B ty_getty
-and
-.B ty_init
-may be NULL (field omitted), point to a pointer that is NULL (null lenght
-field, i.e. ""), or an array of strings terminated by a NULL (field
-present).  For now no useful distinction can be made between a omitted field
-and an empty field, so treat both cases as an omission.
-.SH FILES
-.TP 15
-.B /etc/ttytab
-The terminal device database
-.SH "SEE ALSO"
-.BR ttyname (3),
-.BR ttyslot (3),
-.BR ttytab (5),
-.BR init (8).
-.SH DIAGNOSTICS
-.B Setttyent()
-has the same return value and error codes as the
-.BR open (2)
-call it uses to open the ttytab file.  The
-.BI get xxx ()
-functions return NULL on end of file, entry not found, or error.  You can
-set
-.B errno
-to zero before the call and check it after.
-.SH NOTES
-.B Getttyent()
-and
-.B getttynam()
-return a pointer to static storage that is overwritten in each call.
-.PP
-The MINIX 3
-.B struct ttyent
-has only the
-.B ty_name
-and
-.B ty_type
-fields in common with the BSD implementation.  This does not seem to be a
-problem, because most third party software that need to know about terminals
-only look at the
-.B ty_name
-field.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
-
-.\"
-.\" $PchId: getttyent.3,v 1.2 1996/04/11 06:57:26 philip Exp $
Index: trunk/minix/man/man3/hton.3
===================================================================
--- trunk/minix/man/man3/hton.3	(revision 9)
+++ 	(revision )
@@ -1,60 +1,0 @@
-.TH HTON 3
-.SH NAME
-hton, htons, htonl, ntohs, ntohl \- host to network byte order conversion
-.SH SYNOPSIS
-.ft B
-.nf
-#define _MINIX_SOURCE 1
-#include <stddef.h>
-#include <sys/types.h>
-
-#include <net/hton.h>
-
-u16_t htons(u16_t \fIhost_word\fP)
-u32_t htonl(u32_t \fIhost_dword\fP)
-u16_t ntohs(u16_t \fInetwork_word\fP)
-u32_t ntohl(u32_t \fInetwork_dword\fP)
-u16_t HTONS(u16_t \fIhost_word\fP)
-u32_t HTONL(u32_t \fIhost_dword\fP)
-u16_t NTOHS(u16_t \fInetwork_word\fP)
-u32_t NTOHL(u32_t \fInetwork_dword\fP)
-.fi
-.ft R
-.SH DESCRIPTION
-These macros convert 16-bit and 32-bit quantities to and from the network
-byte order used by the TCP/IP protocols.
-The function of the macros is encoded in their name.
-.B H
-means host byte order,
-.B n
-means network byte order,
-.B s
-means a 16-bit quantity and
-.B l
-means a 32-bit quantity.
-Thus
-.B htons
-converts a 16-bit quantity from host byte order to network byte order.
-The difference between the lower case and upper case variants is that
-the lower case variants evaluate the argument at most once and the
-upper case variants can be used for constant folding.
-That is,
-.PP
-.RS
-htonl(f(x))
-.RE
-.PP
-will call f(x) at most once and
-.PP
-.RS
-HTONS(0x10)
-.RE
-.PP
-will be equivalent to 0x10 on a big-endian machine and 0x1000 on a
-little-endian machine.
-.SH "SEE ALSO"
-.BR ip (4).
-.SH AUTHOR
-Philip Homburg (philip@cs.vu.nl)
-.\"
-.\" $PchId: hton.3,v 1.3 1996/02/22 21:10:01 philip Exp $
Index: trunk/minix/man/man3/int64.3
===================================================================
--- trunk/minix/man/man3/int64.3	(revision 9)
+++ 	(revision )
@@ -1,193 +1,0 @@
-.TH INT64 3
-.SH NAME
-int64, add64, add64u, add64ul, sub64, sub64u, sub64ul, diff64, cvu64, cvul64, cv64u, cv64ul, div64u, rem64u, mul64u, cmp64, cmp64u, cmp64ul, ex64lo, ex64hi, make64 \- 64 bit disk offset computations
-.SH SYNOPSIS
-.ft B
-.nf
-#include <minix/u64.h>
-
-u64_t add64(u64_t \fIi\fP, u64_t \fIj\fP)
-u64_t add64u(u64_t \fIi\fP, unsigned \fIj\fP)
-u64_t add64ul(u64_t \fIi\fP, unsigned long \fIj\fP)
-u64_t sub64(u64_t \fIi\fP, u64_t \fIj\fP)
-u64_t sub64u(u64_t \fIi\fP, unsigned \fIj\fP)
-u64_t sub64ul(u64_t \fIi\fP, unsigned long \fIj\fP)
-unsigned diff64(u64_t \fIi\fP, u64_t \fIj\fP)
-u64_t cvu64(unsigned \fIi\fP)
-u64_t cvul64(unsigned long \fIi\fP)
-unsigned cv64u(u64_t \fIi\fP)
-unsigned long cv64ul(u64_t \fIi\fP)
-unsigned long div64u(u64_t \fIi\fP, unsigned \fIj\fP)
-unsigned rem64u(u64_t \fIi\fP, unsigned \fIj\fP)
-u64_t mul64u(unsigned long \fIi\fP, unsigned \fIj\fP)
-int cmp64(u64_t \fIi\fP, u64_t \fIj\fP)
-int cmp64u(u64_t \fIi\fP, unsigned \fIj\fP)
-int cmp64ul(u64_t \fIi\fP, unsigned long \fIj\fP)
-unsigned long ex64lo(u64_t \fIi\fP)
-unsigned long ex64hi(u64_t \fIi\fP)
-u64_t make64(unsigned long \fIlo\fP, unsigned long \fIhi\fP)
-.fi
-.ft P
-.SH DESCRIPTION
-.de SP
-.if t .sp 0.4
-.if n .sp
-..
-The
-.B int64
-family of functions allow MINIX 3 to handle disks of up to 4 terabytes using
-32 bit sector numbers and 64 bit byte offsets on a machine where the C type
-.B long
-is 32 bits.  The <minix/u64.h> include file defines a 64 bit data
-type,
-.BR u64_t ,
-and a number of functions to operate on them.  Note that these functions are
-geared towards common disk offset and block computations, and do not provide
-a full set of 64 bit operations.  They are:
-.PP
-.TP
-.B "u64_t add64(u64_t \fIi\fP, u64_t \fIj\fP)"
-Add the 64 bit numbers
-.I i
-and
-.I j
-forming a 64 bit result.
-.TP
-.B "u64_t add64u(u64_t \fIi\fP, unsigned \fIj\fP)"
-Add an unsigned
-.I j
-to a 64 bit number
-.I i
-forming a 64 bit result.
-.TP
-.B "u64_t add64ul(u64_t \fIi\fP, unsigned long \fIj\fP)"
-Add an unsigned long
-.I j
-to a 64 bit number
-.I i
-forming a 64 bit result.
-.TP
-.B "u64_t sub64(u64_t \fIi\fP, u64_t \fIj\fP)"
-Subtract the 64 bit number
-.I j
-from the 64 bit number
-.I i
-forming a 64 bit result.
-.TP
-.B "u64_t sub64u(u64_t \fIi\fP, unsigned \fIj\fP)"
-Subtract the unsigned
-.I j
-from the 64 bit number
-.I i
-forming a 64 bit result.
-.TP
-.B "u64_t sub64ul(u64_t \fIi\fP, unsigned long \fIj\fP)"
-Subtract the unsigned long
-.I j
-from the 64 bit number
-.I i
-forming a 64 bit result.
-.TP
-.B "unsigned diff64(u64_t \fIi\fP, u64_t \fIj\fP)"
-Subtract the 64 bit number
-.I j
-from the 64 bit number
-.I i
-forming an unsigned.  Overflow is not checked.
-.TP
-.B "u64_t cvu64(unsigned \fIi\fP)"
-Convert an unsigned to a 64 bit number.
-.TP
-.B "u64_t cvul64(unsigned long \fIi\fP)"
-Convert an unsigned long to a 64 bit number.
-.TP
-.B "unsigned cv64u(u64_t \fIi\fP)"
-Convert a 64 bit number to an unsigned if it fits, otherwise return
-.BR UINT_MAX .
-.TP
-.B "unsigned long cv64ul(u64_t \fIi\fP)"
-Convert a 64 bit number to an unsigned long if it fits, otherwise return
-.BR ULONG_MAX .
-.TP
-.B "unsigned long div64u(u64_t \fIi\fP, unsigned \fIj\fP)"
-Divide the 64 bit number
-.I i
-by the unsigned
-.I j
-giving an unsigned long.  Overflow is not checked.  (Typical "byte offset to
-block number" conversion.)
-.TP
-.B "unsigned rem64u(u64_t \fIi\fP, unsigned \fIj\fP)"
-Compute the remainder of the division of the 64 bit number
-.I i
-by the unsigned
-.I j
-as an unsigned.  (Typical "byte offset within a block" computation.)
-.TP
-.B "u64_t mul64u(unsigned long \fIi\fP, unsigned \fIj\fP)"
-Multiply the unsigned long
-.I i
-by the unsigned
-.I j
-giving a 64 bit number.  (Typical "block number to byte offset" conversion.)
-.TP
-.B "int cmp64(u64_t \fIi\fP, u64_t \fIj\fP)"
-Compare two 64 bit numbers.
-Returns
-.B -1
-if
-.I i
-<
-.IR j ,
-.B 0
-if
-.I i
-==
-.IR j ,
-and
-.B 1
-if
-.I i
->
-.IR j .
-.TP
-.B "int cmp64u(u64_t \fIi\fP, unsigned \fIj\fP)"
-Likewise compare a 64 bit number with an unsigned.
-.TP
-.B "int cmp64ul(u64_t \fIi\fP, unsigned long \fIj\fP)"
-Likewise compare a 64 bit number with an unsigned long.
-.TP
-.B "unsigned long ex64lo(u64_t \fIi\fP)"
-Extract the low 32 bits of a 64 bit number.
-.TP
-.B "unsigned long ex64hi(u64_t \fIi\fP)"
-Extract the high 32 bits of a 64 bit number.
-.TP
-.B "u64_t make64(unsigned long \fIlo\fP, unsigned long \fIhi\fP)"
-Combine the low and high parts of a 64 bit number to a 64 bit number.  (The
-last three functions are used to pass 64 bit numbers in messages within the
-kernel.  They should not be used for anything else.)
-.SH "SEE ALSO"
-.BR fcntl (2),
-.BR controller (4).
-.SH NOTES
-With the usual disk block size of 512 bytes the maximum disk size is 512
-\(** 4 gigabytes = 2 terabytes.
-.PP
-Standard MINIX 3 only uses 64 bit computations within the disk drivers, so
-individual partitions are still limited to 4 gigabytes.  Minix-vmd has 64
-bit computations also in the file system code.
-.PP
-Special care must be taken when accessing disk devices.  For MINIX 3 one may
-have to temporarily change the start of the partition to go beyond 4 G.
-Minix-vmd can go beyond 4 G, but the
-.B lseek
-system call is still limited to a 32 bit offset.  One needs to use
-.PP
-.RS
-.BI "fcntl(" fd ", F_SEEK, u64_t " offset ")"
-.RE
-.PP
-to seek to a 64 bit position.
-.SH AUTHOR
-Kees J. Bot <kjb@cs.vu.nl>
Index: trunk/minix/man/man3/malloc.3
===================================================================
--- trunk/minix/man/man3/malloc.3	(revision 9)
+++ 	(revision )
@@ -1,117 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)malloc.3	6.3 (Berkeley) 5/14/86
-.\"
-.TH MALLOC 3  "May 14, 1986"
-.UC 4
-.SH NAME
-malloc, free, realloc, calloc, alloca \- memory allocator
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <stdlib.h>
-#include <alloca.h>
-
-void *malloc(size_t \fIsize\fP)
-void free(void *\fIptr\fP)
-void *realloc(void *\fIptr\fP, size_t \fIsize\fP)
-void *calloc(size_t \fInelem\fP, size_t \fIelsize\fP)
-void *alloca(size_t \fIsize\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Malloc
-and
-.B free
-provide a general-purpose memory allocation package.
-.B Malloc
-returns a pointer to a block of at least
-.I size
-bytes beginning on a word boundary.
-.PP
-The argument to
-.B free
-is a pointer to a block previously allocated by
-.BR malloc ;
-this space is made available for further allocation,
-but its contents are left undisturbed.
-A call with a null
-.I ptr
-is legal and does nothing.
-.PP
-Needless to say, grave disorder will result if the space assigned by
-.B malloc
-is overrun or if some random number is handed to
-.BR free .
-.PP
-.B Malloc
-maintains multiple lists of free blocks according to size,
-allocating space from the appropriate list.
-It calls
-.B sbrk
-(see
-.BR brk (2))
-to get more memory from the system when there is no
-suitable space already free.
-.PP
-.B Realloc
-changes the size of the block pointed to by
-.I ptr
-to
-.I size
-bytes and returns a pointer to the (possibly moved) block.
-The contents will be unchanged up to the lesser of the new and old sizes.
-A call with a null
-.I ptr
-is legal and has the same result as
-.BI malloc( size )\fR.
-.PP
-.B Calloc
-allocates space for an array of
-.I nelem
-elements of size
-.I elsize.
-The space is initialized to zeros.
-.PP
-.B Alloca
-allocates 
-.I size
-bytes of space in the stack frame of the caller.
-This temporary space is automatically freed on
-return.
-.PP
-Each of the allocation routines returns a pointer
-to space suitably aligned (after possible pointer coercion)
-for storage of any type of object.
-.SH SEE ALSO
-.BR brk (2).
-.SH DIAGNOSTICS
-.BR Malloc ,
-.BR realloc
-and
-.B calloc
-return a null pointer if there is no available memory or if the arena
-has been detectably corrupted by storing outside the bounds of a block.
-.SH NOTES
-Other implementations of
-.BR malloc ,
-.BR realloc
-or
-.BR calloc
-may return a null pointer if the size of the requested block is zero.  This
-implementation will always return a zero length block at a unique address,
-but you should keep in mind that a null return is possible if the program
-is run to another system and that this should not be mistakenly seen as
-an error.
-.SH BUGS
-When
-.B realloc
-returns a null pointer, the block pointed to by
-.I ptr
-may be destroyed.
-.PP
-.B Alloca
-is machine dependent; its use is discouraged.
Index: trunk/minix/man/man3/oneC_sum.3
===================================================================
--- trunk/minix/man/man3/oneC_sum.3	(revision 9)
+++ 	(revision )
@@ -1,45 +1,0 @@
-.TH ONEC_SUM 3
-.SH NAME
-oneC_sum \- One's complement internet checksum
-.SH SYNOPSIS
-.ft B
-.nf
-#define _MINIX_SOURCE 1
-#include <stddef.h>
-#include <sys/types.h>
-
-#include <net/gen/oneCsum.h>
-
-u16_t oneC_sum(u16_t \fIprev\fP, void *\fIdata\fP, size_t \fIsize\fP)
-.fi
-.ft R
-.SH DESCRIPTION
-.B OneC_sum
-is used to calculate the one's complement checksum needed for IP network
-packets.
-A good document about the Internet Checksum is RFC-1071 (Computing the
-Internet checksum).
-.PP
-.B OneC_sum
-expects three parameters:
-.TP 10
-.I prev
-The checksum of previous blocks of data that are to be included in the
-checksum.
-The value of prev in first call to oneC_sum should be 0.
-.TP
-.I data
-A pointer to the block of data.
-The data is interpreted as a series of 16 bit numbers in network byte order, but
-an odd number of bytes is also allowed.
-.TP
-.I size
-The size of the data in bytes.
-.SH "SEE ALSO"
-.BR ip (4).
-.br
-.B RFC-1071
-.SH AUTHOR
-Philip Homburg (philip@cs.vu.nl)
-.\"
-.\" $PchId: oneC_sum.3,v 1.3 1996/02/22 21:05:31 philip Exp $
Index: trunk/minix/man/man3/openpty.3
===================================================================
--- trunk/minix/man/man3/openpty.3	(revision 9)
+++ 	(revision )
@@ -1,18 +1,0 @@
-.TH OPENPTY 3 "May 15, 1985"
-.AT 3
-.SH NAME
-openpty \- library call to obtain a pty
-.SH SYNOPSIS
-.nf
-.ft B
-#include <libutil.h>
-
-int openpty(int *\fIamaster\fP, int *\fIaslave\fP, char *\fIname\fP, struct termios *\fItermp\fP, struct winsize *\fIwinp\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Openpty
-tries to obtain pty file descriptors by opening /dev/ttypX and
-/dev/ptypX, setting *\fIamaster\fP and *\fIaslave\fP to these fd's,
-changing ownership of the slave pty to the current process, and making
-it only group-writable by group tty.
Index: trunk/minix/man/man3/popen.3
===================================================================
--- trunk/minix/man/man3/popen.3	(revision 9)
+++ 	(revision )
@@ -1,51 +1,0 @@
-.\"	@(#)popen.3	6.1 (Berkeley) 5/15/85
-.\"
-.TH POPEN 3 "May 15, 1985"
-.AT 3
-.SH NAME
-popen, pclose \- initiate I/O to/from a process
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-FILE *popen(const char *command, const char *type)
-int pclose(FILE *stream)
-.SH DESCRIPTION
-The arguments to 
-.B popen
-are pointers to null-terminated strings containing respectively a
-shell command line and an I/O mode, either "r" for reading or "w" for
-writing.  It creates a pipe between the calling process and
-the command to be executed.  The value returned is a stream pointer that
-can be used (as appropriate) to write to the standard input
-of the command or read from its standard output.
-.PP
-A stream opened by
-.B popen
-should be closed by
-.BR pclose ,
-which waits for the associated process to terminate
-and returns the exit status of the command.
-.PP
-Because open files are shared, a type "r" command may be used as an input
-filter, and a type "w" as an output filter.
-.SH "SEE ALSO"
-.BR pipe (2),
-.BR fopen (3),
-.BR fclose (3),
-.BR system (3),
-.BR wait (2),
-.BR sh (1).
-.SH DIAGNOSTICS
-.B Popen
-returns a null pointer if files or processes cannot be created, or the shell 
-cannot be accessed.
-.SH BUGS
-Buffered reading before opening an input filter
-may leave the standard input of that filter mispositioned.
-Similar problems with an output filter may be
-forestalled by careful buffer flushing, for instance, with
-.BR fflush ,
-see
-.BR fclose (3).
Index: trunk/minix/man/man3/printf.3
===================================================================
--- trunk/minix/man/man3/printf.3	(revision 9)
+++ 	(revision )
@@ -1,264 +1,0 @@
-.\"	@(#)printf.3s	6.3 (Berkeley) 6/5/86
-.\"
-.TH PRINTF 3 "June 5, 1986"
-.AT 3
-.SH NAME
-printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf \- formatted output conversion
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdarg.h>
-
-int printf(const char *\fIformat\fP \fR[\fP, \fIarg\fP\fR] ...\fP);
-int fprintf(FILE *\fIstream\fP, const char *\fIformat\fP \fR[\fP, \fIarg\fP\fR] ...\fP);
-int sprintf(char *\fIs\fP, const char *\fIformat\fP \fR[\fP, \fIarg\fP\fR] ...\fP);
-int snprintf(char *\fIs\fP, size_t \fIn\fP, const char *\fIformat\fP \fR[\fP, \fIarg\fP\fR] ...\fP);
-int vprintf(const char *\fIformat\fP, va_list \fIargs\fP);
-int vfprintf(FILE *\fIstream\fP, const char *\fIformat\fP, va_list \fIargs\fP);
-int vsprintf(char *\fIs\fP, const char *\fIformat\fP, va_list \fIargs\fP);
-int vsnprintf(char *\fIs\fP, size_t \fIn\fP, const char *\fIformat\fP, va_list \fIargs\fP);
-.ft R
-.fi
-.SH DESCRIPTION
-.B Printf
-places output on the standard output stream
-.BR stdout .
-.B Fprintf
-places output on the named output
-.IR stream .
-.B Sprintf
-places `output' in the string
-.IR s ,
-followed by the character `\e0'.
-.B Snprintf
-(Minix-vmd only)
-is like
-.B sprintf
-except that no more than
-.IR n \-1
-characters are written to
-.I s
-followed by a `\e0'.
-.PP
-The
-.B v*printf
-functions can be used to make functions like the first four by using the
-.BR stdarg (3)
-method to process the argument.
-.PP
-Each of these functions converts, formats, and prints its arguments after
-the first under control of the first argument.
-The first argument is a character string which contains two types of objects:
-plain characters, which are simply copied to the output stream,
-and conversion specifications, each of which causes conversion and printing
-of the next successive
-.IR arg .
-.PP
-Each conversion specification is introduced by the character
-.BR % .
-The remainder of the conversion specification includes
-in the following order
-.TP
-\(bu
-Zero or more of following flags:
-.RS
-.TP
-\(bu
-a `#' character
-specifying that the value should be converted to an ``alternate form''.
-For 
-.BR c ,
-.BR d ,
-.BR s ,
-and
-.BR u
-conversions, this option has no effect.  For 
-.B o
-conversions, the precision of the number is increased to force the first
-character of the output string to a zero.  For 
-.BR x ( X )
-conversion, a non-zero result has the string 
-.BR 0x ( 0X )
-prepended to it.  For 
-.BR e ,
-.BR E ,
-.BR f ,
-.BR g ,
-and
-.BR G
-conversions, the result will always contain a decimal point, even if no
-digits follow the point (normally, a decimal point only appears in the
-results of those conversions if a digit follows the decimal point).  For
-.B g
-and
-.B G
-conversions, trailing zeros are not removed from the result as they
-would otherwise be.
-.TP
-\(bu
-a minus sign `\-' which specifies
-.I "left adjustment"
-of the converted value in the indicated field;
-.TP
-\(bu
-a `+' character specifying that there should always be
-a sign placed before the number when using signed conversions.
-.TP
-\(bu
-a space specifying that a blank should be left before a positive number
-during a signed conversion.  A `+' overrides a space if both are used.
-.RE
-.TP
-\(bu
-an optional digit string specifying a
-.I "field width;"
-if the converted value has fewer characters than the field width
-it will be blank-padded on the left (or right,
-if the left-adjustment indicator has been given) to make up the field width;
-if the field width begins with a zero,
-zero-padding will be done instead of blank-padding;
-.TP
-\(bu
-an optional period
-.RB ` . '
-which serves to separate the field width from the next digit string;
-.TP
-\(bu
-an optional digit string specifying a
-.I precision
-which specifies the number of digits to appear after the
-decimal point, for e- and f-conversion, or the maximum number of characters
-to be printed from a string;
-.TP
-\(bu
-the character
-.B l
-specifying that a following
-.BR d ,
-.BR o ,
-.BR x ,
-or
-.B u
-corresponds to a long integer
-.IR arg .
-.TP
-\(bu
-a character which indicates the type of
-conversion to be applied.
-.PP
-A field width or precision may be `*' instead of a digit string.
-In this case an integer
-.I arg
-supplies
-the field width or precision.
-.PP
-The conversion characters
-and their meanings are
-.TP
-.B dox
-The integer
-.I arg
-is converted to decimal, octal, or
-hexadecimal notation respectively.
-.TP
-.B X
-Like
-.BR x ,
-but use upper case instead of lower case.
-.TP
-.B f
-The float or double
-.I arg
-is converted to decimal notation
-in the style `[\fB\-\fR]ddd.ddd'
-where the number of d's after the decimal point
-is equal to the precision specification
-for the argument.
-If the precision
-is missing,
-6 digits are given;
-if the precision is explicitly 0, no digits and
-no decimal point are printed.
-.TP
-.B e
-The float or double
-.I arg
-is converted in the style
-`[\fB\-\fR]d\fB.\fRddd\fBe\fR\(+-dd'
-where there is one digit before the decimal point and
-the number after is equal to the
-precision specification for the argument;
-when the precision is missing,
-6 digits are produced.
-.TP
-.B g
-The float or double
-.I arg
-is printed in style
-.BR d ,
-in style
-.BR f ,
-or in
-style
-.BR e ,
-whichever gives full precision in minimum space.
-.TP
-.B c
-The character
-.I arg
-is printed.
-.TP
-.B s
-.I Arg
-is taken to be a string (character pointer)
-and characters from the string are printed until
-a null character or until
-the number of characters indicated by the precision
-specification is reached;
-however if the precision is 0 or missing
-all characters up to a null are printed.
-.TP
-.B u
-The unsigned integer
-.I arg
-is converted to decimal
-and printed.
-.TP
-.B %
-Print a `%'; no argument is converted.
-.PP
-In no case does a non-existent or small field width
-cause truncation of a field;
-padding takes place only if the specified field
-width exceeds the actual width.
-Characters generated by
-.B printf
-are printed by 
-.BR putc (3).
-.PP
-.B Examples
-.br
-To print a date and time in the form `Sunday, July 3, 10:02',
-where
-.I weekday
-and
-.I month
-are pointers to null-terminated strings:
-.PP
-.RS
-printf("%s, %s %d, %02d:%02d", weekday, month, day, hour, min);
-.RE
-.PP
-To print
-.if n pi
-.if t \(*p
-to 5 decimals:
-.IP
-printf("pi = %.5f", 4*atan(1.0));
-.SH "SEE ALSO"
-.BR putc (3),
-.BR scanf (3),
-.BR ecvt (3),
-.BR stdarg (3).
Index: trunk/minix/man/man3/putc.3
===================================================================
--- trunk/minix/man/man3/putc.3	(revision 9)
+++ 	(revision )
@@ -1,70 +1,0 @@
-.\"	@(#)putc.3s	6.2 (Berkeley) 11/6/85
-.\"
-.TH PUTC 3  "November 6, 1985"
-.AT 3
-.SH NAME
-putc, putchar, fputc, putw \- put character or word on a stream
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-int putc(int \fIc\fP, FILE *\fIstream\fP)
-int putchar(int \fIc\fP)
-int fputc(int \fIc\fP, FILE *\fIstream\fP)
-int putw(int \fIw\fP, FILE *\fIstream\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Putc
-appends the character
-.I c
-to the named output
-.IR stream .
-It returns the character written.
-.PP
-.BI Putchar( c )
-is defined as 
-.BI putc( c ", stdout)\fR."
-.PP
-.B Fputc
-behaves like 
-.BR putc ,
-but is a genuine function rather than a macro.
-.PP
-.B Putw
-appends word (that is,
-.BR int )
-.I w
-to the output
-.IR stream .
-It returns the word written.
-.B Putw
-neither assumes nor causes special alignment in the file.
-.SH "SEE ALSO"
-.BR fopen (3),
-.BR fclose (3),
-.BR getc (3),
-.BR puts (3),
-.BR printf (3),
-.BR fread (3).
-.SH DIAGNOSTICS
-These functions return the constant
-.SM
-.B EOF
-upon error.  Since this is a good integer,
-.BR ferror (3)
-should be used to detect 
-.B putw
-errors.
-.SH BUGS
-Because it is implemented as a macro,
-.B putc
-treats a
-.I stream
-argument with side effects improperly.  In particular
-`putc(c,\ *f++);'
-doesn't work sensibly.
-.PP
-Errors can occur long after the call to
-.BR putc .
Index: trunk/minix/man/man3/puts.3
===================================================================
--- trunk/minix/man/man3/puts.3	(revision 9)
+++ 	(revision )
@@ -1,43 +1,0 @@
-.\"	@(#)puts.3s	6.1 (Berkeley) 5/15/85
-.\"
-.TH PUTS 3  "May 15, 1985"
-.AT 3
-.SH NAME
-puts, fputs \- put a string on a stream
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-int puts(char *\fIs\fP)
-int fputs(char *\fIs\fP, FILE *\fIstream\fP)
-.ft P
-.fi
-.SH DESCRIPTION
-.B Puts
-copies the null-terminated string
-.I s
-to the standard output stream
-.B stdout
-and appends a
-newline character.
-.PP
-.B Fputs
-copies the null-terminated string
-.I s
-to the named output
-.IR stream .
-.PP
-Neither routine copies the terminal null character.
-.SH "SEE ALSO"
-.BR fopen (3),
-.BR gets (3),
-.BR putc (3),
-.BR printf (3),
-.BR ferror (3),
-.BR fread (3).
-.SH BUGS
-.B Puts
-appends a newline,
-.B fputs
-does not, all in the name of backward compatibility.
Index: trunk/minix/man/man3/qsort.3
===================================================================
--- trunk/minix/man/man3/qsort.3	(revision 9)
+++ 	(revision )
@@ -1,36 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)qsort.3	6.1 (Berkeley) 5/15/85
-.\"
-.TH QSORT 3  "May 15, 1985"
-.UC 4
-.SH NAME
-qsort \- quicker sort
-.SH SYNOPSIS
-.nf
-.ft B
-#include <sys/types.h>
-#include <stdlib.h>
-
-.fi
-.in +.5i
-.ti -.5i
-void qsort(void *\fIbase\fP, size_t \fInel\fP, size_t \fIwidth\fP, int (*\fIcompar\fP)(const void *, const void *))
-.in -.5i
-.ft R
-.SH DESCRIPTION
-.B Qsort
-is an implementation of the quicker-sort algorithm.
-The first argument is a pointer to the base of the data;
-the second is the number of elements;
-the third is the width of an element in bytes;
-the last is the name of the comparison routine
-to be called with two arguments which are pointers
-to the elements being compared.
-The routine must return an integer less than, equal to, or greater than 0
-according as the first argument is to be considered
-less than, equal to, or greater than the second.
-.SH "SEE ALSO"
-.BR sort (1).
Index: trunk/minix/man/man3/rand.3
===================================================================
--- trunk/minix/man/man3/rand.3	(revision 9)
+++ 	(revision )
@@ -1,33 +1,0 @@
-.\"	@(#)rand.3c	6.2 (Berkeley) 9/29/85
-.\"
-.TH RAND 3 "September 29, 1985"
-.AT 3
-.SH NAME
-rand, srand \- random number generator
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdlib.h>
-
-void srand(unsigned \fIseed\fP)
-unsigned rand(void)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Rand
-uses a multiplicative congruential
-random number generator with period
-.if t 2\u\s732\s0\d
-.if n 2**32
-to return successive pseudo-random
-numbers in the range from 0 to
-.BR RAND_MAX .
-.PP
-The generator is reinitialized by calling
-.B srand
-with 1 as argument.
-It can be set to a random starting point by calling
-.B srand
-with whatever you like as argument.
-.SH "SEE ALSO"
-.BR random (3).
Index: trunk/minix/man/man3/random.3
===================================================================
--- trunk/minix/man/man3/random.3	(revision 9)
+++ 	(revision )
@@ -1,131 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)random.3	6.2 (Berkeley) 9/29/85
-.\"
-.TH RANDOM 3 "September 29, 1985"
-.UC 5
-.SH NAME
-random, srandom, initstate, setstate \- better random number generator; routines for changing generators
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdlib.h>
-
-long random(void)
-void srandom(unsigned \fIseed\fP)
-char *initstate(unsigned \fIseed\fP, char *\fIstate\fP, int \fIn\fP)
-char *setstate(char *\fIstate\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.PP
-.B Random
-uses a non-linear additive feedback random number generator employing a
-default table of size 31 long integers to return successive pseudo-random
-numbers in the range from 0 to
-.if t 2\u\s731\s10\d\(mi1.
-.if n (2**31)\(mi1.
-The period of this random number generator is very large, approximately
-.if t 16\(mu(2\u\s731\s10\d\(mi1).
-.if n 16*((2**31)\(mi1).
-.PP
-.B Random/srandom
-have (almost) the same calling sequence and initialization properties as
-.B rand/srand.
-The difference is that
-.BR rand (3)
-produces a much less random sequence \(em in fact, the low dozen bits
-generated by rand go through a cyclic pattern.  All the bits generated by
-.B random
-are usable.  For example, ``random()&01'' will produce a random binary
-value.
-.PP
-Unlike
-.BR srand ,
-.B srandom
-does not return the old seed; the reason for this is that the amount of
-state information used is much more than a single word.  (Two other
-routines are provided to deal with restarting/changing random
-number generators).  Like
-.BR rand (3),
-however,
-.B random
-will by default produce a sequence of numbers that can be duplicated
-by calling
-.B srandom
-with 
-.B 1
-as the seed.
-.PP
-The
-.B initstate
-routine allows a state array, passed in as an argument, to be initialized
-for future use.  The size of the state array (in bytes) is used by
-.B initstate
-to decide how sophisticated a random number generator it should use -- the
-more state, the better the random numbers will be.
-(Current "optimal" values for the amount of state information are
-8, 32, 64, 128, and 256 bytes; other amounts will be rounded down to
-the nearest known amount.  Using less than 8 bytes will cause an error).
-The seed for the initialization (which specifies a starting point for
-the random number sequence, and provides for restarting at the same
-point) is also an argument.
-.B Initstate
-returns a pointer to the previous state information array.
-.PP
-Once a state has been initialized, the
-.B setstate
-routine provides for rapid switching between states.
-.B Setstate
-returns a pointer to the previous state array; its
-argument state array is used for further random number generation
-until the next call to
-.B initstate
-or
-.BR setstate .
-.PP
-Once a state array has been initialized, it may be restarted at a
-different point either by calling
-.B initstate
-(with the desired seed, the state array, and its size) or by calling
-both
-.B setstate
-(with the state array) and
-.B srandom
-(with the desired seed).
-The advantage of calling both
-.B setstate
-and
-.B srandom
-is that the size of the state array does not have to be remembered after
-it is initialized.
-.PP
-With 256 bytes of state information, the period of the random number
-generator is greater than
-.if t 2\u\s769\s10\d,
-.if n 2**69
-which should be sufficient for most purposes.
-.SH AUTHOR
-Earl T. Cohen
-.SH DIAGNOSTICS
-.PP
-If
-.B initstate
-is called with less than 8 bytes of state information, or if
-.B setstate
-detects that the state information has been garbled, error
-messages are printed on the standard error output.
-.SH "SEE ALSO"
-.BR rand (3).
-.SH NOTES
-.B initstate
-and
-.B setstate
-are not declared in
-.IR <stdlib.h> ,
-programmers must provide their own declarations.
-.SH BUGS
-About 2/3 the speed of
-.BR rand (3).
Index: trunk/minix/man/man3/rcmd.3
===================================================================
--- trunk/minix/man/man3/rcmd.3	(revision 9)
+++ 	(revision )
@@ -1,141 +1,0 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)rcmd.3	6.7 (Berkeley) 5/14/86
-.\"
-.TH RCMD 3 "May 14, 1986"
-.UC 5
-.SH NAME
-rcmd, rresvport, ruserok \- routines for returning a stream to a remote command
-.SH SYNOPSIS
-.nf
-.B "#include <sys/types.h>"
-.B "#include <net/netlib.h>"
-.PP
-.B "rem = rcmd(ahost, inport, locuser, remuser, cmd, fd2p);"
-.B char **ahost;
-.B int inport;
-.B "char *locuser, *remuser, *cmd;"
-.B int *fd2p;
-.PP
-.B s = rresvport(port);
-.B int *port;
-.PP
-.B "ruserok(rhost, superuser, ruser, luser);"
-.B char *rhost;
-.B int superuser;
-.B char *ruser, *luser;
-.fi
-.SH DESCRIPTION
-.I Rcmd
-is a routine used by the super-user to execute a command on
-a remote machine using an authentication scheme based
-on reserved port numbers.
-.I Rresvport
-is a routine which returns a descriptor to a socket
-with an address in the privileged port space.
-.I Ruserok
-is a routine used by servers
-to authenticate clients requesting service with
-.IR rcmd .
-All three functions are present in the same file and are used
-by the
-.IR rshd (8)
-server (among others).
-.PP
-.I Rcmd
-looks up the host
-.I *ahost
-using
-.IR gethostbyname (3),
-returning \-1 if the host does not exist.
-Otherwise
-.I *ahost
-is set to the standard name of the host
-and a connection is established to a server
-residing at the well-known Internet port
-.IR inport .
-.PP
-If the connection succeeds,
-a socket in the Internet domain of type SOCK_STREAM
-is returned to the caller, and given to the remote
-command as 
-.B stdin
-and
-.BR stdout .
-If
-.I fd2p
-is non-zero, then an auxiliary channel to a control
-process will be set up, and a descriptor for it will be placed
-in
-.IR *fd2p .
-The control process will return diagnostic
-output from the command (unit 2) on this channel, and will also
-accept bytes on this channel as being UNIX signal numbers, to be
-forwarded to the process group of the command.
-If
-.I fd2p
-is 0, then the 
-.B stderr
-(unit 2 of the remote
-command) will be made the same as the 
-.B stdout
-and no
-provision is made for sending arbitrary signals to the remote process,
-although you may be able to get its attention by using out-of-band data.
-.PP
-The protocol is described in detail in
-.IR rshd (8).
-.PP
-The
-.I rresvport
-routine is used to obtain a socket with a privileged
-address bound to it.  This socket is suitable for use
-by 
-.I rcmd
-and several other routines.  Privileged Internet ports are those
-in the range 0 to 1023.  Only the super-user
-is allowed to bind an address of this sort to a socket.
-.PP
-.I Ruserok
-takes a remote host's name, as returned by a
-.IR gethostbyaddr (3)
-routine, two user names and a flag indicating whether
-the local user's name is that of the super-user.  It then
-checks the files 
-.I /etc/hosts.equiv
-and, possibly, 
-.I .rhosts
-in the current working directory (normally the local
-user's home directory) to see if the request for
-service is allowed.  A 0 is returned if the machine
-name is listed in the ``hosts.equiv'' file, or the
-host and remote user name are found in the ``.rhosts''
-file; otherwise 
-.I ruserok
-returns \-1.  If the
-.I superuser
-flag is 1, the checking of the ``host.equiv'' file is
-bypassed.
-If the local domain (as obtained from \fIgethostname\fP\|(3))
-is the same as the remote domain, only the machine name need be specified.
-.SH SEE ALSO
-rlogin(1),
-rsh(1),
-intro(2),
-rexec(3),
-rexecd(8),
-rlogind(8),
-rshd(8)
-.SH DIAGNOSTICS
-.I Rcmd
-returns a valid socket descriptor on success.
-It returns -1 on error and prints a diagnostic message on the standard error.
-.PP
-.I Rresvport
-returns a valid, bound socket descriptor on success.
-It returns -1 on error with the global value
-.I errno
-set according to the reason for failure.
-The error code EAGAIN is overloaded to mean ``All network ports in use.''
Index: trunk/minix/man/man3/regex.3
===================================================================
--- trunk/minix/man/man3/regex.3	(revision 9)
+++ 	(revision )
@@ -1,541 +1,0 @@
-.\" Copyright (c) 1992, 1993, 1994 Henry Spencer.
-.\" Copyright (c) 1992, 1993, 1994
-.\"	The Regents of the University of California.  All rights reserved.
-.\"
-.\" This code is derived from software contributed to Berkeley by
-.\" Henry Spencer.
-.\"
-.\" 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.
-.\"
-.\"	@(#)regex.3	8.4 (Berkeley) 3/20/94
-.\"
-.TH REGEX 3 "March 20, 1994"
-.de ZR
-.\" one other place knows this name:  the SEE ALSO section
-.BR re_format (7) \\$1
-..
-.SH NAME
-regex, regcomp, regexec, regerror, regfree \- regular-expression library
-.SH SYNOPSIS
-.ft B
-.\".na
-#include <sys/types.h>
-.br
-#include <regex.h>
-.sp
-.in +.5i
-.ti -.5i
-int regcomp(regex_t *\fIpreg\fP, const char *\fIpattern\fP, int \fIcflags\fP);
-.ti -.5i
-int regexec(const regex_t *\fIpreg\fP, const char *\fIstring\fP,
-size_t \fInmatch\fP, regmatch_t \fIpmatch\fP[], int \fIeflags\fP);
-.ti -.5i
-size_t regerror(int \fIerrcode\fP, const regex_t *\fIpreg\fP,
-char *\fIerrbuf\fP, size_t \fIerrbuf_size\fP);
-.ti -.5i
-void regfree(regex_t *\fIpreg\fP);
-.in -.5i
-.ft R
-.SH DESCRIPTION
-These routines implement POSIX 1003.2 regular expressions (``RE''s);
-see
-.ZR .
-.B Regcomp
-compiles an RE written as a string into an internal form,
-.B regexec
-matches that internal form against a string and reports results,
-.B regerror
-transforms error codes from either into human-readable messages,
-and
-.B regfree
-frees any dynamically-allocated storage used by the internal form
-of an RE.
-.PP
-The header
-.I <regex.h>
-declares two structure types,
-.B regex_t
-and
-.BR regmatch_t ,
-the former for compiled internal forms and the latter for match reporting.
-It also declares the four functions,
-a type
-.BR regoff_t ,
-and a number of constants with names starting with ``REG_''.
-.PP
-.B Regcomp
-compiles the regular expression contained in the
-.I pattern
-string,
-subject to the flags in
-.IR cflags ,
-and places the results in the
-.B regex_t
-structure pointed to by
-.IR preg .
-.I Cflags
-is the bitwise OR of zero or more of the following flags:
-.IP REG_EXTENDED \w'REG_EXTENDED'u+2n
-Compile modern (``extended'') REs,
-rather than the obsolete (``basic'') REs that
-are the default.
-.IP REG_BASIC
-This is a synonym for 0,
-provided as a counterpart to REG_EXTENDED to improve readability.
-.IP REG_NOSPEC
-Compile with recognition of all special characters turned off.
-All characters are thus considered ordinary,
-so the ``RE'' is a literal string.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-REG_EXTENDED and REG_NOSPEC may not be used
-in the same call to
-.IR regcomp .
-.IP REG_ICASE
-Compile for matching that ignores upper/lower case distinctions.
-See
-.ZR .
-.IP REG_NOSUB
-Compile for matching that need only report success or failure,
-not what was matched.
-.IP REG_NEWLINE
-Compile for newline-sensitive matching.
-By default, newline is a completely ordinary character with no special
-meaning in either REs or strings.
-With this flag,
-`[^' bracket expressions and `.' never match newline,
-a `^' anchor matches the null string after any newline in the string
-in addition to its normal function,
-and the `$' anchor matches the null string before any newline in the
-string in addition to its normal function.
-.IP REG_PEND
-The regular expression ends,
-not at the first NUL,
-but just before the character pointed to by the
-.B re_endp
-member of the structure pointed to by
-.IR preg .
-The
-.B re_endp
-member is of type
-.BR "const\ char\ *" .
-This flag permits inclusion of NULs in the RE;
-they are considered ordinary characters.
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-.PP
-When successful,
-.B regcomp
-returns 0 and fills in the structure pointed to by
-.IR preg .
-One member of that structure
-(other than
-.BR re_endp )
-is publicized:
-.BR re_nsub ,
-of type
-.BR size_t ,
-contains the number of parenthesized subexpressions within the RE
-(except that the value of this member is undefined if the
-REG_NOSUB flag was used).
-If
-.B regcomp
-fails, it returns a non-zero error code;
-see DIAGNOSTICS.
-.PP
-.B Regexec
-matches the compiled RE pointed to by
-.I preg
-against the
-.IR string ,
-subject to the flags in
-.IR eflags ,
-and reports results using
-.IR nmatch ,
-.IR pmatch ,
-and the returned value.
-The RE must have been compiled by a previous invocation of
-.BR regcomp .
-The compiled form is not altered during execution of
-.BR regexec ,
-so a single compiled RE can be used simultaneously by multiple threads.
-.PP
-By default,
-the NUL-terminated string pointed to by
-.I string
-is considered to be the text of an entire line, minus any terminating
-newline.
-The
-.I eflags
-argument is the bitwise OR of zero or more of the following flags:
-.IP REG_NOTBOL \w'REG_STARTEND'u+2n
-The first character of
-the string
-is not the beginning of a line, so the `^' anchor should not match before it.
-This does not affect the behavior of newlines under REG_NEWLINE.
-.IP REG_NOTEOL
-The NUL terminating
-the string
-does not end a line, so the `$' anchor should not match before it.
-This does not affect the behavior of newlines under REG_NEWLINE.
-.IP REG_STARTEND
-The string is considered to start at
-\fIstring\fR\ + \fIpmatch\fR[0].\fBrm_so\fR
-and to have a terminating NUL located at
-\fIstring\fR\ + \fIpmatch\fR[0].\fBrm_eo\fR
-(there need not actually be a NUL at that location),
-regardless of the value of
-.IR nmatch .
-See below for the definition of
-.IR pmatch
-and
-.IR nmatch .
-This is an extension,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-Note that a non-zero \fBrm_so\fR does not imply REG_NOTBOL;
-REG_STARTEND affects only the location of the string,
-not how it is matched.
-.PP
-See
-.ZR
-for a discussion of what is matched in situations where an RE or a
-portion thereof could match any of several substrings of
-.IR string .
-.PP
-Normally,
-.B regexec
-returns 0 for success and the non-zero code REG_NOMATCH for failure.
-Other non-zero error codes may be returned in exceptional situations;
-see DIAGNOSTICS.
-.PP
-If REG_NOSUB was specified in the compilation of the RE,
-or if
-.I nmatch
-is 0,
-.B regexec
-ignores the
-.I pmatch
-argument (but see below for the case where REG_STARTEND is specified).
-Otherwise,
-.I pmatch
-points to an array of
-.I nmatch
-structures of type
-.BR regmatch_t .
-Such a structure has at least the members
-.B rm_so
-and
-.BR rm_eo ,
-both of type
-.B regoff_t
-(a signed arithmetic type at least as large as an
-.B off_t
-and a
-.BR ssize_t ),
-containing respectively the offset of the first character of a substring
-and the offset of the first character after the end of the substring.
-Offsets are measured from the beginning of the
-.I string
-argument given to
-.BR regexec .
-An empty substring is denoted by equal offsets,
-both indicating the character following the empty substring.
-.PP
-The 0th member of the
-.I pmatch
-array is filled in to indicate what substring of
-.I string
-was matched by the entire RE.
-Remaining members report what substring was matched by parenthesized
-subexpressions within the RE;
-member
-.I i
-reports subexpression
-.IR i ,
-with subexpressions counted (starting at 1) by the order of their opening
-parentheses in the RE, left to right.
-Unused entries in the array\(emcorresponding either to subexpressions that
-did not participate in the match at all, or to subexpressions that do not
-exist in the RE (that is, \fIi\fR\ > \fIpreg\fR\->\fBre_nsub\fR)\(emhave both
-.B rm_so
-and
-.B rm_eo
-set to \-1.
-If a subexpression participated in the match several times,
-the reported substring is the last one it matched.
-(Note, as an example in particular, that when the RE `(b*)+' matches `bbb',
-the parenthesized subexpression matches each of the three `b's and then
-an infinite number of empty strings following the last `b',
-so the reported substring is one of the empties.)
-.PP
-If REG_STARTEND is specified,
-.I pmatch
-must point to at least one
-.B regmatch_t
-(even if
-.I nmatch
-is 0 or REG_NOSUB was specified),
-to hold the input offsets for REG_STARTEND.
-Use for output is still entirely controlled by
-.IR nmatch ;
-if
-.I nmatch
-is 0 or REG_NOSUB was specified,
-the value of
-.IR pmatch [0]
-will not be changed by a successful
-.BR regexec .
-.PP
-.B Regerror
-maps a non-zero
-.I errcode
-from either
-.B regcomp
-or
-.B regexec
-to a human-readable, printable message.
-If
-.I preg
-is non-NULL,
-the error code should have arisen from use of
-the
-.B regex_t
-pointed to by
-.IR preg ,
-and if the error code came from
-.BR regcomp ,
-it should have been the result from the most recent
-.B regcomp
-using that
-.BR regex_t .
-.RI ( Regerror
-may be able to supply a more detailed message using information
-from the
-.BR regex_t .)
-.B Regerror
-places the NUL-terminated message into the buffer pointed to by
-.IR errbuf ,
-limiting the length (including the NUL) to at most
-.I errbuf_size
-bytes.
-If the whole message won't fit,
-as much of it as will fit before the terminating NUL is supplied.
-In any case,
-the returned value is the size of buffer needed to hold the whole
-message (including terminating NUL).
-If
-.I errbuf_size
-is 0,
-.I errbuf
-is ignored but the return value is still correct.
-.PP
-If the
-.I errcode
-given to
-.B regerror
-is first ORed with REG_ITOA,
-the ``message'' that results is the printable name of the error code,
-e.g. ``REG_NOMATCH'',
-rather than an explanation thereof.
-If
-.I errcode
-is REG_ATOI,
-then
-.I preg
-shall be non-NULL and the
-.B re_endp
-member of the structure it points to
-must point to the printable name of an error code;
-in this case, the result in
-.I errbuf
-is the decimal digits of
-the numeric value of the error code
-(0 if the name is not recognized).
-REG_ITOA and REG_ATOI are intended primarily as debugging facilities;
-they are extensions,
-compatible with but not specified by POSIX 1003.2,
-and should be used with
-caution in software intended to be portable to other systems.
-Be warned also that they are considered experimental and changes are possible.
-.PP
-.B Regfree
-frees any dynamically-allocated storage associated with the compiled RE
-pointed to by
-.IR preg .
-The remaining
-.B regex_t
-is no longer a valid compiled RE
-and the effect of supplying it to
-.B regexec
-or
-.B regerror
-is undefined.
-.PP
-None of these functions references global variables except for tables
-of constants;
-all are safe for use from multiple threads if the arguments are safe.
-.SH IMPLEMENTATION CHOICES
-There are a number of decisions that 1003.2 leaves up to the implementor,
-either by explicitly saying ``undefined'' or by virtue of them being
-forbidden by the RE grammar.
-This implementation treats them as follows.
-.PP
-See
-.ZR
-for a discussion of the definition of case-independent matching.
-.PP
-There is no particular limit on the length of REs,
-except insofar as memory is limited.
-Memory usage is approximately linear in RE size, and largely insensitive
-to RE complexity, except for bounded repetitions.
-See BUGS for one short RE using them
-that will run almost any system out of memory.
-.PP
-A backslashed character other than one specifically given a magic meaning
-by 1003.2 (such magic meanings occur only in obsolete [``basic''] REs)
-is taken as an ordinary character.
-.PP
-Any unmatched [ is a REG_EBRACK error.
-.PP
-Equivalence classes cannot begin or end bracket-expression ranges.
-The endpoint of one range cannot begin another.
-.PP
-RE_DUP_MAX, the limit on repetition counts in bounded repetitions, is 255.
-.PP
-A repetition operator (?, *, +, or bounds) cannot follow another
-repetition operator.
-A repetition operator cannot begin an expression or subexpression
-or follow `^' or `|'.
-.PP
-`|' cannot appear first or last in a (sub)expression or after another `|',
-i.e. an operand of `|' cannot be an empty subexpression.
-An empty parenthesized subexpression, `()', is legal and matches an
-empty (sub)string.
-An empty string is not a legal RE.
-.PP
-A `{' followed by a digit is considered the beginning of bounds for a
-bounded repetition, which must then follow the syntax for bounds.
-A `{' \fInot\fR followed by a digit is considered an ordinary character.
-.PP
-`^' and `$' beginning and ending subexpressions in obsolete (``basic'')
-REs are anchors, not ordinary characters.
-.SH SEE ALSO
-.BR grep (1),
-.BR re_format (7).
-.PP
-POSIX 1003.2, sections 2.8 (Regular Expression Notation)
-and
-B.5 (C Binding for Regular Expression Matching).
-.SH DIAGNOSTICS
-Non-zero error codes from
-.B regcomp
-and
-.B regexec
-include the following:
-.PP
-.nf
-.ta \w'REG_ECOLLATE'u+3n
-REG_NOMATCH	regexec() failed to match
-REG_BADPAT	invalid regular expression
-REG_ECOLLATE	invalid collating element
-REG_ECTYPE	invalid character class
-REG_EESCAPE	\e applied to unescapable character
-REG_ESUBREG	invalid backreference number
-REG_EBRACK	brackets [ ] not balanced
-REG_EPAREN	parentheses ( ) not balanced
-REG_EBRACE	braces { } not balanced
-REG_BADBR	invalid repetition count(s) in { }
-REG_ERANGE	invalid character range in [ ]
-REG_ESPACE	ran out of memory
-REG_BADRPT	?, *, or + operand invalid
-REG_EMPTY	empty (sub)expression
-REG_ASSERT	``can't happen''\(emyou found a bug
-REG_INVARG	invalid argument, e.g. negative-length string
-.fi
-.SH HISTORY
-Originally written by Henry Spencer.
-Altered for inclusion in the 4.4BSD distribution.
-.SH BUGS
-This is an alpha release with known defects.
-Please report problems.
-.PP
-There is one known functionality bug.
-The implementation of internationalization is incomplete:
-the locale is always assumed to be the default one of 1003.2,
-and only the collating elements etc. of that locale are available.
-.PP
-The back-reference code is subtle and doubts linger about its correctness
-in complex cases.
-.PP
-.B Regexec
-performance is poor.
-This will improve with later releases.
-.I Nmatch
-exceeding 0 is expensive;
-.I nmatch
-exceeding 1 is worse.
-.B Regexec
-is largely insensitive to RE complexity \fIexcept\fR that back
-references are massively expensive.
-RE length does matter; in particular, there is a strong speed bonus
-for keeping RE length under about 30 characters,
-with most special characters counting roughly double.
-.PP
-.B Regcomp
-implements bounded repetitions by macro expansion,
-which is costly in time and space if counts are large
-or bounded repetitions are nested.
-An RE like, say,
-`((((a{1,100}){1,100}){1,100}){1,100}){1,100}'
-will (eventually) run almost any existing machine out of swap space.
-.PP
-There are suspected problems with response to obscure error conditions.
-Notably,
-certain kinds of internal overflow,
-produced only by truly enormous REs or by multiply nested bounded repetitions,
-are probably not handled well.
-.PP
-Due to a mistake in 1003.2, things like `a)b' are legal REs because `)' is
-a special character only in the presence of a previous unmatched `('.
-This can't be fixed until the spec is fixed.
-.PP
-The standard's definition of back references is vague.
-For example, does
-`a\e(\e(b\e)*\e2\e)*d' match `abbbd'?
-Until the standard is clarified,
-behavior in such cases should not be relied on.
-.PP
-The implementation of word-boundary matching is a bit of a kludge,
-and bugs may lurk in combinations of word-boundary matching and anchoring.
Index: trunk/minix/man/man3/resolver.3
===================================================================
--- trunk/minix/man/man3/resolver.3	(revision 9)
+++ 	(revision )
@@ -1,280 +1,0 @@
-.\" Copyright (c) 1985 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms are permitted provided
-.\" that: (1) source distributions retain this entire copyright notice and
-.\" comment, and (2) distributions including binaries display the following
-.\" acknowledgement:  ``This product includes software developed by the
-.\" University of California, Berkeley and its contributors'' in the
-.\" documentation or other materials provided with the distribution and in
-.\" all advertising materials mentioning features or use of this software.
-.\" 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
-.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-.\"
-.\"	@(#)resolver.3	6.5 (Berkeley) 6/23/90
-.\"
-.TH RESOLVER 3 "June 23, 1990"
-.UC 4
-.SH NAME
-resolver, res_query, res_search, res_mkquery, res_send, res_init, dn_comp, dn_expand \- resolver routines
-.SH SYNOPSIS
-.B #include <sys/types.h>
-.br
-.B #include <net/gen/in.h>
-.br
-.B #include <net/gen/nameser.h>
-.br
-.B #include <net/gen/resolv.h>
-.PP
-.B "res_query(dname, class, type, answer, anslen)"
-.br
-.B char *dname;
-.br
-.B int class, type;
-.br
-.B u_char *answer;
-.br
-.B int anslen;
-.PP
-.B "res_search(dname, class, type, answer, anslen)"
-.br
-.B char *dname;
-.br
-.B int class, type;
-.br
-.B u_char *answer;
-.br
-.B int anslen;
-.PP
-.B "res_mkquery(op, dname, class, type, data, datalen, newrr, buf, buflen)"
-.br
-.B int op;
-.br
-.B char *dname;
-.br
-.B int class, type;
-.br
-.B char *data;
-.br
-.B int datalen;
-.br
-.B struct rrec *newrr;
-.br
-.B char *buf;
-.br
-.B int buflen;
-.PP
-.B res_send(msg, msglen, answer, anslen)
-.br
-.B char *msg;
-.br
-.B int msglen;
-.br
-.B char *answer;
-.br
-.B int anslen;
-.PP
-.B res_init()
-.PP
-.B dn_comp(exp_dn, comp_dn, length, dnptrs, lastdnptr)
-.br
-.B char *exp_dn, *comp_dn;
-.br
-.B int length;
-.br
-.B char **dnptrs, **lastdnptr;
-.PP
-.B dn_expand(msg, eomorig, comp_dn, exp_dn, length)
-.br
-.B char *msg, *eomorig, *comp_dn, exp_dn;
-.br
-.B int  length;
-.SH DESCRIPTION
-These routines are used for making, sending and interpreting
-query and reply messages with Internet domain name servers.
-.PP
-Global configuration and state information that is used by the
-resolver routines is kept in the structure
-.IR _res .
-Most of the values have reasonable defaults and can be ignored.
-Options
-stored in
-.I _res.options
-are defined in
-.I resolv.h
-and are as follows.
-Options are stored as a simple bit mask containing the bitwise ``or''
-of the options enabled.
-.IP RES_INIT
-True if the initial name server address and default domain name are
-initialized (i.e.,
-.I res_init
-has been called).
-.IP RES_DEBUG
-Print debugging messages.
-.IP RES_AAONLY
-Accept authoritative answers only.
-With this option,
-.I res_send
-should continue until it finds an authoritative answer or finds an error.
-Currently this is not implemented.
-.IP RES_USEVC
-Use TCP connections for queries instead of UDP datagrams.
-.IP RES_STAYOPEN
-Used with RES_USEVC to keep the TCP connection open between
-queries.
-This is useful only in programs that regularly do many queries.
-UDP should be the normal mode used.
-.IP RES_IGNTC
-Unused currently (ignore truncation errors, i.e., don't retry with TCP).
-.IP RES_RECURSE
-Set the recursion-desired bit in queries.
-This is the default.
-(\c
-.I res_send
-does not do iterative queries and expects the name server
-to handle recursion.)
-.IP RES_DEFNAMES
-If set,
-.I res_search
-will append the default domain name to single-component names
-(those that do not contain a dot).
-This option is enabled by default.
-.IP RES_DNSRCH
-If this option is set,
-.I res_search
-will search for host names in the current domain and in parent domains; see
-.IR hostname (7).
-This is used by the standard host lookup routine
-.IR gethostbyname (3).
-This option is enabled by default.
-.PP
-The
-.I res_init
-routine
-reads the configuration file (if any; see
-.IR resolver (5))
-to get the default domain name,
-search list and
-the Internet address of the local name server(s).
-If no server is configured, the host running
-the resolver is tried.
-The current domain name is defined by the hostname
-if not specified in the configuration file;
-it can be overridden by the environment variable LOCALDOMAIN.
-Initialization normally occurs on the first call
-to one of the following routines.
-.PP
-The
-.I res_query
-function provides an interface to the server query mechanism.
-It constructs a query, sends it to the local server,
-awaits a response, and makes preliminary checks on the reply.
-The query requests information of the specified
-.I type
-and
-.I class
-for the specified fully-qualified domain name
-.I dname .
-The reply message is left in the
-.I answer
-buffer with length
-.I anslen
-supplied by the caller.
-.PP
-The
-.I res_search
-routine makes a query and awaits a response like
-.IR res_query ,
-but in addition, it implements the default and search rules
-controlled by the RES_DEFNAMES and RES_DNSRCH options.
-It returns the first successful reply.
-.PP
-The remaining routines are lower-level routines used by
-.IR res_query .
-The
-.I res_mkquery
-function
-constructs a standard query message and places it in
-.IR buf .
-It returns the size of the query, or \-1 if the query is
-larger than
-.IR buflen .
-The query type
-.I op
-is usually QUERY, but can be any of the query types defined in
-.IR <arpa/nameser.h> .
-The domain name for the query is given by
-.IR dname .
-.I Newrr
-is currently unused but is intended for making update messages.
-.PP
-The
-.I res_send
-routine
-sends a pre-formatted query and returns an answer.
-It will call
-.I res_init
-if RES_INIT is not set, send the query to the local name server, and
-handle timeouts and retries.
-The length of the reply message is returned, or
-\-1 if there were errors.
-.PP
-The
-.I dn_comp
-function
-compresses the domain name
-.I exp_dn
-and stores it in
-.IR comp_dn .
-The size of the compressed name is returned or \-1 if there were errors.
-The size of the array pointed to by
-.I comp_dn
-is given by
-.IR length .
-The compression uses
-an array of pointers
-.I dnptrs
-to previously-compressed names in the current message.
-The first pointer points to
-to the beginning of the message and the list ends with NULL.
-The limit to the array is specified by
-.IR lastdnptr .
-A side effect of
-.I dn_comp
-is to update the list of pointers for
-labels inserted into the message
-as the name is compressed.
-If
-.I dnptr
-is NULL, names are not compressed.
-If
-.I lastdnptr
-is NULL, the list of labels is not updated.
-.PP
-The
-.I dn_expand
-entry
-expands the compressed domain name
-.I comp_dn
-to a full domain name
-The compressed name is contained in a query or reply message;
-.I msg
-is a pointer to the beginning of the message.
-The uncompressed name is placed in the buffer indicated by
-.I exp_dn
-which is of size
-.IR length .
-The size of compressed name is returned or \-1 if there was an error.
-.SH FILES
-/etc/resolv.conf	see resolver(5)
-.SH "SEE ALSO"
-gethostbyname(3), named(8), resolver(5), hostname(7),
-.br
-RFC1032, RFC1033, RFC1034, RFC1035, RFC974, 
-.br
-SMM:11 Name Server Operations Guide for BIND
Index: trunk/minix/man/man3/scanf.3
===================================================================
--- trunk/minix/man/man3/scanf.3	(revision 9)
+++ 	(revision )
@@ -1,251 +1,0 @@
-.\"	@(#)scanf.3s	6.1 (Berkeley) 5/15/85
-.\"
-.TH SCANF 3  "May 15, 1985"
-.AT 3
-.SH NAME
-scanf, fscanf, sscanf, vscanf, vfscanf, vsscanf \- formatted input conversion
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-#include <stdarg.h>
-
-int scanf(const char *\fIformat\fP \fR[\fP, \fIpointer\fP\fR] ...\fP)
-int fscanf(FILE *\fIstream\fP, const char *\fIformat\fP \fR[\fP, \fIpointer\fP\fR] ...\fP)
-int sscanf(const char *\fIs\fP, const char *\fIformat\fP \fR[\fP, \fIpointer\fP\fR] ...\fP)
-int vscanf(const char *\fIformat\fP, va_list \fIargs\fP)
-int vfscanf(FILE *\fIstream\fP, const char *\fIformat\fP, va_list \fIargs\fP)
-int vsscanf(const char *\fIs\fP, const char *\fIformat\fP, va_list \fIargs\fP)
-.SH DESCRIPTION
-.B Scanf
-reads from the standard input stream
-.BR stdin .
-.B Fscanf
-reads from the named input
-.IR stream .
-.B Sscanf
-reads from the character string
-.IR s .
-Each function reads characters, interprets
-them according to a format, and stores the results in its arguments.
-Each expects as arguments
-a control string
-.IR format ,
-described below,
-and a set of
-.I pointer
-arguments
-indicating where the converted input should be stored.
-.PP
-The
-.B v*scanf
-functions can be used to make functions like the first three by using the
-.BR stdarg (3)
-method to process the argument pointers.
-.PP
-The
-control string
-usually contains
-conversion specifications, which are used to direct interpretation
-of input sequences.
-The control string may contain:
-.TP 4
-1.
-Blanks, tabs or newlines,
-which match optional white space in the input.
-.TP 4
-2.
-An ordinary character (not %) which must match
-the next character of the input stream.
-.TP 4
-3.
-Conversion specifications, consisting of the
-character
-.BR % ,
-an optional assignment suppressing character
-.BR * ,
-an optional numerical maximum field width, and a conversion
-character.
-.PP
-A conversion specification directs the conversion of the
-next input field; the result
-is placed in the variable pointed to by the corresponding argument,
-unless assignment suppression was
-indicated by
-.BR * .
-An input field is defined as a string of non-space characters;
-it extends to the next inappropriate character or until the field
-width, if specified, is exhausted.
-.PP
-The conversion character indicates the interpretation of the
-input field; the corresponding pointer argument must
-usually be of a restricted type.
-The following conversion characters are legal:
-.TP 4
-.B  %
-a single `%' is expected
-in the input at this point;
-no assignment is done.
-.TP 4
-.B  d
-a decimal integer is expected;
-the corresponding argument should be an integer pointer.
-.TP 4
-.B  o
-an octal integer is expected;
-the corresponding argument should be a integer pointer.
-.TP 4
-.B  x
-a hexadecimal integer is expected;
-the corresponding argument should be an integer pointer.
-.ti -0.2i
-.TP 4
-.B  s
-a character string is expected;
-the corresponding argument should be a character pointer
-pointing to an array of characters large enough to accept the
-string and a terminating `\e0', which will be added.
-The input field is terminated by a space character
-or a newline.
-.TP 4
-.B  c
-a character is expected; the
-corresponding argument should be a character pointer.
-The normal skip over space characters is suppressed
-in this case;
-to read the next non-space character, try
-`%1s'.
-If a field width is given, the corresponding argument
-should refer to a character array, and the
-indicated number of characters is read.
-.TP 4
-.B efg
-a floating point number is expected;
-the next field is converted accordingly and stored through the
-corresponding argument, which should be a pointer to a
-.BR float .
-The input format for
-floating point numbers is
-an optionally signed
-string of digits
-possibly containing a decimal point, followed by an optional
-exponent field consisting of an E or e followed by an optionally signed integer.
-.TP 4
-.B  [
-indicates a string not to be delimited by space characters.
-The left bracket is followed by a set of characters and a right
-bracket; the characters between the brackets define a set
-of characters making up the string.
-If the first character
-is not circumflex (\|^\|), the input field
-is all characters until the first character not in the set between
-the brackets; if the first character
-after the left bracket is ^, the input field is all characters
-until the first character which is in the remaining set of characters
-between the brackets.
-The corresponding argument must point to a character array.
-.PP
-The conversion characters
-.BR d ,
-.B o
-and
-.B x
-may be capitalized or preceded by
-.B l
-to indicate that a pointer to
-.B long
-rather than to
-.B int
-is in the argument list.
-Similarly, the conversion characters
-.BR e ,
-.B f
-or
-.B g
-may be capitalized or
-preceded by
-.B l
-to indicate a pointer to 
-.B double
-rather than to 
-.BR float .
-The conversion characters
-.BR d ,
-.B o
-and
-.B x
-may be preceded by
-.B h
-to indicate a pointer to
-.B short
-rather than to
-.BR int .
-.PP
-The
-.B scanf
-functions return the number of successfully matched and assigned input
-items.
-This can be used to decide how many input items were found.
-The constant
-.SM
-.B EOF
-is returned upon end of input; note that this is different
-from 0, which means that no conversion was done;
-if conversion was intended, it was frustrated by an
-inappropriate character in the input.
-.PP
-For example, the call
-.IP "\&" 10
-int i; float x; char name[50];
-.br
-scanf("%d%f%s", &i, &x, name);
-.PP
-with the input line
-.IP
-25   54.32E\(mi1  thompson
-.PP
-will assign to
-.B i
-the value
-25,
-.B x
-the value 5.432, and
-.B name
-will contain `\fBthompson\e0\fP' .
-Or,
-.IP
-int i; float x; char name[50];
-.br
-scanf("%2d%f%*d%[1234567890]", &i, &x, name);
-.PP
-with input
-.IP
-56789 0123 56a72
-.PP
-will assign 56 to
-.BR i ,
-789.0 to
-.BR x ,
-skip `0123',
-and place the string `56\e0' in
-.BR name .
-The next call to
-.B getchar
-will return `a'.
-.SH "SEE ALSO"
-.BR atof (3),
-.BR getc (3),
-.BR printf (3),
-.BR stdarg (3).
-.SH DIAGNOSTICS
-The 
-.B scanf
-functions return
-.SM
-.B EOF
-on end of input,
-and a short count for missing or illegal data items.
-.SH BUGS
-The success of literal matches and suppressed
-assignments is not directly
-determinable.
Index: trunk/minix/man/man3/servxcheck.3
===================================================================
--- trunk/minix/man/man3/servxcheck.3	(revision 9)
+++ 	(revision )
@@ -1,120 +1,0 @@
-.TH SERVXCHECK 3
-.SH NAME
-servxcheck \- Internet service access check
-.SH SYNOPSIS
-.ft B
-.nf
-#define _MINIX_SOURCE 1
-#include </net/gen/netdb.h>
-
-int servxcheck(ipaddr_t \fIpeer\fP, const char *\fIservice\fP,
-	void (*\fIlogf\fP)(int \fIpass\fP, const char *\fIname\fP));
-char *servxfile(const char *\fIfile\fP);
-.fi
-.ft R
-.SH DESCRIPTION
-.B Servxcheck()
-is used by programs like
-.B inetd
-to perform an access check on the host connected to the other end of the TCP
-channel that has IP address
-.IR peer .
-.PP
-.B Servxcheck()
-translates the IP address to the
-associated host name if necessary, and checks if the host is granted access
-as guided by the file
-.BR /etc/serv.access .
-(See
-.BR serv.access (5).)
-The service name used to search the access file is passed by the caller as
-.IR service .
-These names should be the same as the service names in
-.BR /etc/services .
-.PP
-The caller should use the NWIOGTCPCONF ioctl() call to find out what the
-IP address of the remote end is.  It is wise to bypass the
-.B servxcheck()
-call if the remote end happens to be the local machine (remaddr == locaddr),
-so that local connections aren't impeded by slow checks.
-.B Servxcheck()
-will itself allow connections from 127.0.0.1/8 immediately, so you
-don't have to check for that.  Example of use:
-.PP
-.RS
-.nf
-.ta +4n +4n +4n
-if (ioctl(fd, NWIOGTCPCONF, &tcpconf) < 0
-	|| tcpconf.nwtc_remaddr == tcpconf.nwtc_locaddr
-	|| servxcheck(tcpconf.nwtc_remaddr, service_name, NULL)
-) {
-	serve();
-}
-.fi
-.RE
-.PP
-An attempt to connect to a service is logged if the access is denied.  You
-can use the special checkword "\fBlog\fP" to also log if access is granted.
-Logging will be done with
-.B syslog()
-at the
-.B warning
-level.
-A syntax error in the access file may be logged under the
-.B err
-level.
-The caller must use
-.B openlog()
-to set the appropriate logging facility.  One may do one's own logging by
-supplying a
-.I logf
-function that will be called by
-.B servxcheck
-with a first argument that is true if access is granted, false if
-denied, and a second argument that is the name of the remote host whose
-access has been checked.
-.PP
-The default is to fail the check unless the access file says otherwise.
-Strange errors make the check succeed.  (We do not want
-remote access to fail because of some system error.)  Note that this
-function is not meant to check access to the system, that's what
-passwords and such are for, but only to limit access to those who are
-allowed to use the services the system offers.
-.PP
-Connections from a machine to itself are accepted immediately.  No further
-checks, no logging.
-.PP
-.B Servxfile()
-may be used to specify a file other than the default
-.BR /etc/serv.access .
-This is useful for programs started from
-.B inetd
-that want to handle the access check themselves, using a private access file.
-The return value of
-.B servxfile()
-is the pathname of the old access file.  Only a pointer to the new path is
-saved, the caller must keep the string it points to intact.
-.SH FILES
-.TP 25n
-.B /etc/serv.access
-Default access check file.
-.SH "SEE ALSO"
-.BR syslog (3),
-.BR serv.access (5),
-.BR services (5),
-.BR inetd (8).
-.SH DIAGNOSTICS
-.B Servxcheck()
-returns 0 if the access is denied, 1 if granted.
-.PP
-Typical syslog message:
-.PP
-.RS
-Jan 10 20:27:20 flotsam inetd[174]: service 'shell' granted to jetsam.cs.vu.nl
-.RE
-.SH BUGS
-IP and DNS based access checks will stop most crackers, but not the really
-determined ones.  Luckily MINIX 3 is sufficiently strange to thwart the well
-known cracking schemes.  But don't ever allow yourself to feel secure.
-.SH AUTHOR
-Kees J. Bot <kjb@cs.vu.nl>
Index: trunk/minix/man/man3/setbuf.3
===================================================================
--- trunk/minix/man/man3/setbuf.3	(revision 9)
+++ 	(revision )
@@ -1,112 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)setbuf.3s	6.2 (Berkeley) 5/12/86
-.\"
-.TH SETBUF 3  "May 12, 1986"
-.UC 4
-.SH NAME
-setbuf, setvbuf \- assign buffering to a stream
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-int setbuf(FILE *\fIstream\fP, char *\fIbuf\fP)
-int setvbuf(FILE *\fIstream\fP, char *\fIbuf\fP, int \fItype\fP, size_t \fIsize\fP)
-.SH DESCRIPTION
-The three types of buffering available are unbuffered, block buffered,
-and line buffered.
-When an output stream is unbuffered, information appears on the
-destination file or terminal as soon as written;
-when it is block buffered many characters are saved up and written as a block;
-when it is line buffered characters are saved up until a newline is
-encountered or input is read from stdin.
-.B Fflush
-(see 
-.BR fclose (3))
-may be used to force the block out early.
-Normally all files are block buffered.
-A buffer is obtained from
-.BR  malloc (3)
-upon the first
-.B getc
-or
-.BR  putc (3)
-on the file.
-If the standard stream
-.B stdout
-refers to a terminal it is line buffered.
-The standard stream
-.B stderr
-is always unbuffered.
-.PP
-.B Setbuf
-is used after a stream has been opened but before it is read or written.
-The character array
-.I buf
-is used instead of an automatically allocated buffer.  If
-.I buf
-is the constant pointer
-.SM
-.BR NULL ,
-input/output will be completely unbuffered.
-A manifest constant 
-.SM
-.B BUFSIZ
-tells how big an array is needed:
-.IP
-.B char
-buf[BUFSIZ];
-.PP
-.BR Setvbuf ,
-an alternate form of 
-.BR setbuf ,
-is used after a stream has been opened but before it is read or written.
-It has three uses, depending on the value of the
-.IR type
-argument:
-.TP 5
-.B "setvbuf(\fIstream\fP, \fIbuf\fP, _IOFBF, \fIsize\fP)"
-Causes input/output to be fully buffered using the character array
-.I buf
-whose size is determined by the 
-.I size
-argument.
-If
-.I buf
-is the constant pointer
-.SM
-.BR NULL ,
-then an automatically allocated buffer will be used.
-.TP 5
-.B "setvbuf(\fIstream\fP, \fIbuf\fP, _IOLBF, \fIsize\fP)"
-Like above, except that output will be line buffered, i.e. the buffer will
-be flushed when a newline is written, the buffer is full, or input is
-requested.
-.TP 5
-.B "setvbuf(\fIstream\fP, \fIbuf\fP, _IONBF, \fIsize\fP)"
-Causes input/output to be completely unbuffered.
-.I Buf
-and
-.I size
-are ignored.
-.PP
-A file can be changed between unbuffered, line buffered, or block buffered
-by using
-.B freopen
-(see
-.BR fopen (3))
-followed by the appropriate
-.B setvbuf
-call.
-.SH "SEE ALSO"
-.BR fopen (3),
-.BR getc (3),
-.BR putc (3),
-.BR malloc (3),
-.BR fclose (3),
-.BR puts (3),
-.BR printf (3),
-.BR fread (3).
Index: trunk/minix/man/man3/sigset.3
===================================================================
--- trunk/minix/man/man3/sigset.3	(revision 9)
+++ 	(revision )
@@ -1,85 +1,0 @@
-.TH SIGSET 3
-.SH NAME
-sigset, sigaddset, sigdelset, sigemptyset, sigfillset, sigismember \- manipulate signal sets
-.SH SYNOPSIS
-.ft B
-#include <signal.h>
-
-.nf
-int sigaddset(sigset_t *\fIset\fP, int \fIsig\fP)
-int sigdelset(sigset_t *\fIset\fP, int \fIsig\fP)
-int sigemptyset(sigset_t *\fIset\fP)
-int sigfillset(sigset_t *\fIset\fP)
-int sigismember(const sigset_t *\fIset\fP, int \fIsig\fP)
-.fi
-.ft P
-.SH DESCRIPTION
-The system calls that handle signals, such as
-.BR sigaction (2)
-and
-.BR sigprocmask (2)
-use sets of signals to keep a process from being interrupted by those
-signals while executing a signal handler or a critical code segment.  These
-signal sets are manipulated by the following functions:
-.TP 5
-.B "int sigaddset(sigset_t *\fIset\fP, int \fIsig\fP)"
-Add signal
-.I sig
-to the signal set referenced by
-.IR set .
-.TP
-.B "int sigdelset(sigset_t *\fIset\fP, int \fIsig\fP)"
-Remove signal
-.I sig
-from the signal set referenced by
-.IR set .
-.TP
-.B "int sigemptyset(sigset_t *\fIset\fP)"
-Initialize the signal set referenced by
-.I set
-to an empty set.
-.TP
-.B "int sigfillset(sigset_t *\fIset\fP)"
-Initialize the signal set referenced by
-.I set
-to an full set, i.e. all signals are in the set.
-.TP
-.B "int sigismember(const sigset_t *\fIset\fP, int \fIsig\fP)"
-Return
-.B 1
-if the signal
-.I sig
-is present in the set referenced by
-.IR set ,
-.B 0
-otherwise.
-.SH "SEE ALSO"
-.BR sigaction (2),
-.BR sigpending (2),
-.BR sigprocmask (2),
-.BR sigsuspend (2).
-.SH DIAGNOSTICS
-All functions except
-.B sigismember
-return
-.B 0
-on success.
-.B Sigismember
-returns
-.B 0
-or
-.B 1
-on success.  They return
-.B \-1
-with error code
-.B EINVAL
-for an invalid signal number.  (They do not use
-.B EFAULT
-for a bad
-.I set
-address, but will simply cause a segmentation violation.)
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
-
-.\"
-.\" $PchId: sigset.3,v 1.2 1996/04/11 06:39:09 philip Exp $
Index: trunk/minix/man/man3/sleep.3
===================================================================
--- trunk/minix/man/man3/sleep.3	(revision 9)
+++ 	(revision )
@@ -1,31 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)sleep.3	6.2 (Berkeley) 5/12/86
-.\"
-.TH SLEEP 3  "May 12, 1986"
-.UC 4
-.SH NAME
-sleep \- suspend execution for interval
-.SH SYNOPSIS
-.nf
-.ft B
-#include <unistd.h>
-
-unsigned int sleep(unsigned int \fIseconds\fP)
-.fi
-.SH DESCRIPTION
-The current process is suspended from execution for the number
-of seconds specified by the argument.
-.PP
-The routine is implemented by setting an alarm timer
-and pausing until it occurs.
-The previous state of this timer is saved and restored.
-If the sleep time exceeds the time to the expiration of the
-previous timer,
-the process sleeps only until the signal would have occurred, and the
-signal is sent 1 second later.
-.SH "SEE ALSO"
-.BR alarm (2),
-.BR pause (2).
Index: trunk/minix/man/man3/stdarg.3
===================================================================
--- trunk/minix/man/man3/stdarg.3	(revision 9)
+++ 	(revision )
@@ -1,123 +1,0 @@
-.\"	@(#)varargs.3	6.3 (Berkeley) 5/15/86
-.\"
-.TH STDARG 3  "May 15, 1986"
-.AT 3
-.SH NAME
-stdarg \- variable argument list
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdarg.h>
-
-void va_start(va_list \fIap\fP, \fIargtypeN\fP \fIparmN\fP)
-\fItype\fP va_arg(va_list \fIap\fP, \fItype\fP)
-void va_end(va_list \fIap\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-This set of macros provides a means of writing portable procedures that
-accept variable argument lists.
-Routines having variable argument lists (such as
-.BR printf (3))
-that do not use
-.B stdarg
-are inherently nonportable, since different
-machines use different argument passing conventions.
-.PP
-A function that accepts a variable argument list is declared with "..." at
-the end of its parameter list.  It must have at least one normal argument
-before the "...".  For example:
-.PP
-.RS
-.nf
-int printf(const char *format, ...) { /* code */ }
-int fprintf(FILE *stream, const char *format, ...) { /* code */ }
-.fi
-.RE
-.PP
-.B va_list
-is a type which is used for the variable
-.I ap
-within the body of a variable argument function which is used to traverse
-the list.
-.PP
-.B va_start\c
-.RI ( ap ,
-.IR parmN )
-is called to initialize
-.I ap
-to the beginning of the list.  The last true parameter of the function,
-.IR parmN ,
-must be supplied to allow
-.B va_start
-to compute the address of the first variable parameter.
-.PP
-.B va_arg\c
-.RI ( ap ,
-.IR type )
-will return the next argument in the list pointed to by
-.IR ap .
-.I Type
-is the type to which the expected argument will be converted
-when passed as an argument.
-.PP
-Different types can be mixed, but it is up
-to the routine to know what type of argument is
-expected, since it cannot be determined at runtime.
-.PP
-.B va_end\c
-.RI ( ap )
-must be used to finish up.
-.PP
-Multiple traversals, each bracketed by
-.B va_start
-\&...
-.B va_end,
-are possible.
-.SH EXAMPLE
-.nf
-.ta +4n +4n +4n +4n
-	\fB#include\fP <stdarg.h>
-.sp 0.4
-	execl(\fBconst char\fP *path, \fB...\fP)
-	{
-		\fBva_list\fP ap;
-		\fBchar\fP *args[100];
-		\fBint\fP argno = 0;
-
-		\fBva_start\fP(ap, path);
-		\fBwhile\fP ((args[argno++] = \fBva_arg\fP(ap, \fBchar\fP *)) != NULL) {}
-		\fBva_end\fP(ap);
-		\fBreturn\fP execv(path, args);
-	}
-.DT
-.fi
-.SH NOTES
-It is up to the calling routine to determine how many arguments
-there are, since it is not possible to determine this from the
-stack frame.  For example,
-.B execl
-passes a null pointer to signal the end of the list.
-.B Printf
-can tell how many arguments are supposed to be there by the format.
-.PP
-The macros
-.B va_start
-and
-.B va_end
-may be arbitrarily complex;
-for example,
-.B va_start
-might contain an opening brace,
-which is closed by a matching brace in
-.BR va_end .
-Thus, they should only be used where they could
-be placed within a single complex statement.
-.SH BUGS
-It is impossible to properly show the macros as C declarations as is
-done in the synopsis.  They can never be coded as C functions, because
-all three macros use their arguments by address, and the
-.I type
-field is certainly impossible.
-Just look at them as being part of the C language, like
-.BR sizeof .
Index: trunk/minix/man/man3/stdio.3
===================================================================
--- trunk/minix/man/man3/stdio.3	(revision 9)
+++ 	(revision )
@@ -1,199 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)stdio.3s	6.2 (Berkeley) 5/13/86
-.\"
-.TH STDIO 3 "May 13, 1986"
-.UC 4
-.SH NAME
-stdio \- standard buffered input/output package
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-FILE *stdin;
-FILE *stdout;
-FILE *stderr;
-.ft R
-.fi
-.SH DESCRIPTION
-The functions in the standard I/O library constitute a user-level buffering
-scheme.  The in-line macros
-.B getc
-and
-.BR  putc (3)
-handle characters quickly.  The higher level routines
-.BR gets ,
-.BR fgets ,
-.BR scanf ,
-.BR fscanf ,
-.BR fread ,
-.BR puts ,
-.BR fputs ,
-.BR printf ,
-.BR fprintf ,
-.BR fwrite
-all use
-.B getc
-and
-.BR putc ;
-they can be freely intermixed.
-.PP
-A file with associated buffering is called a
-.IR stream ,
-and is declared to be a pointer to a defined type
-.SM
-.BR FILE .
-.BR  Fopen (3)
-creates certain descriptive data for a stream
-and returns a pointer to designate the stream in all further transactions.
-There are three normally open streams with constant pointers declared in
-the include file and associated with the standard open files:
-.TP 10n
-.B stdin
-standard input file
-.br
-.ns
-.TP
-.B stdout
-standard output file
-.br
-.ns
-.TP
-.B stderr
-standard error file
-.PP
-A constant `pointer'
-.SM
-.B NULL
-(0)
-designates no stream at all.
-.PP
-An integer constant
-.SM
-.B EOF
-(\-1) is returned upon end of file or error by integer functions that
-deal with streams.
-.PP
-Any routine that uses the standard input/output package
-must include the header file
-.RI < stdio.h >
-of pertinent macro definitions.
-The functions and constants mentioned in the standard I/O manual pages
-are declared in the include file and need no further declaration.
-The constants, and the following `functions' are
-implemented as macros; redeclaration of these names is perilous:
-.BR clearerr ,
-.BR getc ,
-.BR getchar ,
-.BR putc ,
-.BR putchar ,
-.BR feof ,
-.BR ferror ,
-.BR fileno .
-.SH "SEE ALSO"
-.BR open (2),
-.BR close (2),
-.BR read (2),
-.BR write (2),
-.BR fclose (3),
-.BR ferror (3),
-.BR fopen (3),
-.BR fread (3),
-.BR fseek (3),
-.BR getc (3),
-.BR gets (3),
-.BR printf (3),
-.BR putc (3),
-.BR puts (3),
-.BR scanf (3),
-.BR setbuf (3),
-.BR ungetc (3).
-.SH DIAGNOSTICS
-The value
-.SM
-.B EOF
-is returned uniformly to indicate that a
-.SM
-.B FILE
-pointer has not been initialized with
-.BR fopen ,
-input (output) has been attempted on an output (input) stream, or a
-.SM
-.B FILE
-pointer designates corrupt or otherwise unintelligible
-.SM
-.B FILE
-data.
-.PP
-For purposes of efficiency, this implementation of the standard library
-has been changed to line buffer output to a terminal by default and attempts
-to do this transparently by flushing the output whenever a 
-.BR read (2)
-from the standard input is necessary.  This is almost always transparent,
-but may cause confusion or malfunctioning of programs which use
-standard i/o routines but use
-.BR read (2)
-themselves to read from the standard input.
-.PP
-In cases where a large amount of computation is done after printing
-part of a line on an output terminal, it is necessary to
-.BR fflush (3)
-the standard output before going off and computing so that the output
-will appear.
-.SH BUGS
-The standard buffered functions do not interact well with certain other
-library and system functions, especially \fBfork\fP and \fBabort\fP.
-.SH "LIST OF FUNCTIONS"
-.sp 2
-.nf
-.ta \w'setlinebuf'u+2n +\w'setbuf(3)'u+10n
-\fBName\fP	\fBAppears on Page\fP	\fBDescription\fP
-.ta \w'setlinebuf'u+4n +\w'setbuf(3)'u+4n
-.sp 5p
-clearerr	ferror(3)	stream status inquiries
-fclose	fclose(3)	close or flush a stream
-fdopen	fopen(3)	open a stream
-feof	ferror(3)	stream status inquiries
-ferror	ferror(3)	stream status inquiries
-fflush	fclose(3)	close or flush a stream
-fgetc	getc(3)	get character or word from stream
-fgets	gets(3)	get a string from a stream
-fileno	ferror(3)	stream status inquiries
-fopen	fopen(3)	open a stream
-fprintf	printf(3)	formatted output conversion
-fputc	putc(3)	put character or word on a stream
-fputs	puts(3)	put a string on a stream
-fread	fread(3)	buffered binary input/output
-freopen	fopen(3)	open a stream
-fscanf	scanf(3)	formatted input conversion
-fseek	fseek(3)	reposition a stream
-ftell	fseek(3)	reposition a stream
-fwrite	fread(3)	buffered binary input/output
-getc	getc(3)	get character or word from stream
-getchar	getc(3)	get character or word from stream
-gets	gets(3)	get a string from a stream
-getw	getc(3)	get character or word from stream
-printf	printf(3)	formatted output conversion
-putc	putc(3)	put character or word on a stream
-putchar	putc(3)	put character or word on a stream
-puts	puts(3)	put a string on a stream
-putw	putc(3)	put character or word on a stream
-rewind	fseek(3)	reposition a stream
-scanf	scanf(3)	formatted input conversion
-setbuf	setbuf(3)	assign buffering to a stream
-setvbuf	setbuf(3)	assign buffering to a stream
-snprintf	printf(3)	formatted output conversion
-sprintf	printf(3)	formatted output conversion
-sscanf	scanf(3)	formatted input conversion
-ungetc	ungetc(3)	push character back into input stream
-vfprintf	printf(3)	formatted output conversion
-vfscanf	scanf(3)	formatted input conversion
-vprintf	printf(3)	formatted output conversion
-vscanf	scanf(3)	formatted input conversion
-vsnprintf	printf(3)	formatted output conversion
-vsprintf	printf(3)	formatted output conversion
-vsscanf	scanf(3)	formatted input conversion
-.fi
Index: trunk/minix/man/man3/string.3
===================================================================
--- trunk/minix/man/man3/string.3	(revision 9)
+++ 	(revision )
@@ -1,149 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)string.3	6.1 (Berkeley) 5/15/85
-.\"
-.TH STRING 3  "May 15, 1985"
-.UC 4
-.SH NAME
-string, strcat, strncat, strcmp, strncmp, strcpy, strncpy, strlen, strchr, strrchr, strerror, memcmp, memcpy, memmove, memchr, memset, index, rindex \- string operations
-.SH SYNOPSIS
-.nf
-.ft B
-#include <string.h>
-
-char *strcat(char *\fIs1\fP, const char *\fIs2\fP)
-char *strncat(char *\fIs1\fP, const char *\fIs2\fP, size_t \fIn\fP)
-int strcmp(const char *\fIs1\fP, const char *\fIs2\fP)
-int strncmp(const char *\fIs1\fP, const char *\fIs2\fP, size_t \fIn\fP)
-char *strcpy(char *\fIs1\fP, const char *\fIs2\fP)
-char *strncpy(char *\fIs1\fP, const char *\fIs2\fP, size_t \fIn\fP)
-size_t strlen(const char *\fIs\fP)
-char *strchr(const char *\fIs\fP, int \fIc\fP)
-char *strrchr(const char *\fIs\fP, int \fIc\fP)
-char *strerror(int \fIerrnum\fP)
-int memcmp(const void *\fIs1\fP, const void *\fIs2\fP, size_t \fIn\fP)
-void *memcpy(void *\fIs1\fP, const void *\fIs2\fP, size_t \fIn\fP)
-void *memmove(void *\fIs1\fP, const void *\fIs2\fP, size_t \fIn\fP)
-void *memchr(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP)
-void *memset(void *\fIs\fP, int \fIc\fP, size_t \fIn\fP)
-char *index(const char *\fIs\fP, int \fIc\fP)
-char *rindex(const char *\fIs\fP, int \fIc\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-These functions operate on null-terminated strings.
-They do not check for overflow of any receiving string.
-.PP
-.B Strcat
-appends a copy of string
-.I s2
-to the end of string
-.IR s1 .
-.B Strncat
-copies at most
-.I n
-characters.  Both return a pointer to the null-terminated result.
-.PP
-.B Strcmp
-compares its arguments and returns an integer
-greater than, equal to, or less than 0, according as
-.I s1
-is lexicographically greater than, equal to, or less than
-.IR s2 .
-.B Strncmp
-makes the same comparison but looks at at most
-.I n
-characters.
-.PP
-.B Strcpy
-copies string
-.I s2
-to
-.IR s1 ,
-stopping after the null character has been moved.
-.B Strncpy
-copies exactly
-.I n
-characters, truncating or null-padding
-.I s2;
-the target may not be null-terminated if the length of
-.I s2
-is
-.I n
-or more.  Both return
-.IR s1 .
-.PP
-.B Strlen
-returns the number of non-null characters in
-.IR s .
-.PP
-.B Strchr
-.RB ( strrchr )
-returns a pointer to the first (last) occurrence of character 
-.I c
-in string
-.I s,
-or null if
-.I c
-does not occur in the string.
-.PP
-.B Strerror
-returns the error string for the system call error
-.IR errnum .
-See
-.BR intro (2).
-.PP
-.B Memcmp
-is like
-.B strcmp
-except that the strings are memory blocks of length
-.IR n .
-Null characters are treated as ordinary characters.
-.PP
-.B Memcpy
-copies
-.I n
-bytes from the location pointed to by
-.I s2
-to
-.IR s1 .
-.B Memmove
-is like memcpy, except that it can handle overlap between the two strings.
-Both functions return
-.IR s1 .
-.PP
-.B Memchr
-returns a pointer to the first occurrence of character
-.I c
-in string
-.I s,
-or null if
-.I c
-does not occur in the string.
-.PP
-.B Memset
-sets
-.I n
-bytes to
-.I c
-starting at location
-.IR s .
-It returns
-.IR s .
-.PP
-.B Index
-and
-.B rindex
-are obsolete versions of
-.B strchr
-and
-.BR strrchr .
-New code should avoid using them.
-.SH NOTES
-Characters are compared as
-.BR "unsigned char" ,
-whether
-.B char
-itself is signed or not.
Index: trunk/minix/man/man3/syslog.3
===================================================================
--- trunk/minix/man/man3/syslog.3	(revision 9)
+++ 	(revision )
@@ -1,198 +1,0 @@
-.\" Written  Feb 1994 by Steve Greenland (stevegr@neosoft.com)
-.\"
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one
-.\" 
-.\" Since the Linux kernel and libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date.  The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.  The author(s) may not
-.\" have taken the same level of care in the production of this manual,
-.\" which is licensed free of charge, as they might when working
-.\" professionally.
-.\" 
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\"
-.\" from SYSLOG 3 "15 Feb 1994" "Linux" "Linux Programmer's Manual"
-.\" Modified for Minix porting by G. Falzoni <gfalzoni@inwind.it>
-.\" $Id: syslog.3,v 1.1 2006/04/03 14:59:51 beng Exp $
-.\"
-.\" Local macros
-.de Xr
-.BR \\$1 (\\$2)\\$3
-..
-.de LB
-.TP \\$1
-\\fB\\$2\\fR
-\\$3
-..
-.de LI
-.TP \\$1
-\\fI\\$2\\fR
-\\$3
-..
-.de LR
-.TP \\$1
-\\fR\\$2\\fR
-\\$3
-..
-.\" end local macros
-.TH SYSLOG 3 "Jan. 18, 2000"
-.SH NAME
-openlog, syslog, closelog \- send messages to the system logger
-.SH SYNOPSIS
-.B #include <syslog.h>
-.sp
-.BI "void openlog(char " *ident ", int " option ", int  " facility)
-.sp
-.BI "void syslog(int " priority ", char " *format ", ...)"
-.sp
-.BI "void closelog(void)"
-.sp
-.SH DESCRIPTION
-.B openlog()
-opens a connection to the system logger for a program.  The string pointed to by
-.I ident 
-is added to each message, and is typically set to the program name.  Values for
-.I option
-and
-.I facility
-are given in the next section.  Its use is optional.  It will automatically be called by 
-.B syslog()
-if necessary, in which case 
-.I ident
-will default to "syslog".
-.sp
-.B syslog()
-generates a log message, which will be distributed by 
-.Xr syslogd 8 .
-.I priority
-is a combination of the
-.I facility
-and the 
-.IR level , 
-values for which are given in the next section.  The remaining arguments
-are a 
-.IR format ,
-as in 
-.Xr printf 3
-and any arguments required by the 
-.IR format . 
-.\" except that the two character %m will be replaced by the error message string 
-.\" RI ( strerror )
-.\" corresponding to the present value of 
-.\" IR errno .
-.sp
-.B closelog()
-closes the descriptor being used to write to the system logger.  Its use is optional.
-.SH "PARAMETERS"
-This section lists the parameters used to set the values of 
-.IR option , " facility" ", and " priority .
-.SS option
-The
-.I option
-argument to 
-.B openlog()
-is an OR of any of these:
-.TP
-.B LOG_CONS
-write directly to system console if there is an error while sending to
-system logger
-.TP
-.B LOG_NDELAY
-open the connection immediately (normally, the connection is opened when
-the first message is logged)
-.TP
-.B LOG_PERROR
-print to stderr as well
-.TP
-.B LOG_PID
-include PID with each message
-.SS facility 
-The 
-.I facility
-argument is used to specify what type of program is logging the message.
-This lets the configuration file specify that messages from different
-facilities will be handled differently.
-.TP
-.B LOG_AUTH
-security/authorization messages (DEPRECATED Use 
-.B LOG_AUTHPRIV 
-instead)
-.TP
-.B LOG_AUTHPRIV
-security/authorization messages (private) 
-.TP
-.B LOG_CRON
-clock daemon 
-.RB ( cron " and " at )
-.TP
-.B LOG_DAEMON
-other system daemons
-.TP
-.B LOG_KERN
-kernel messages
-.TP
-.BR LOG_LOCAL0 " through " LOG_LOCAL7
-reserved for local use
-.TP
-.B LOG_LPR
-line printer subsystem
-.TP
-.B LOG_MAIL
-mail subsystem
-.TP
-.B LOG_NEWS
-USENET news subsystem
-.TP
-.B LOG_SYSLOG
-messages generated internally by
-.B syslogd 
-.TP
-.BR LOG_USER (default)
-generic user-level messages 
-.TP
-.B LOG_UUCP
-UUCP subsystem
-.SS level
-This determines the importance of the message.  The levels are, in order
-of decreasing importance:
-.TP
-.B LOG_EMERG
-system is unusable
-.TP
-.B LOG_ALERT
-action must be taken immediately
-.TP
-.B LOG_CRIT
-critical conditions
-.TP
-.B LOG_ERR
-error conditions
-.TP
-.B LOG_WARNING
-warning conditions
-.TP
-.B LOG_NOTICE
-normal, but significant, condition
-.TP
-.B LOG_INFO
-informational message
-.TP
-.B LOG_DEBUG
-debug-level message
-.SH HISTORY
-A
-.B syslog
-function call appeared in BSD 4.2.
-.SH SEE ALSO
-.Xr logger 1 , 
-.Xr syslog.conf 5 , 
-.Xr syslogd 8 .
Index: trunk/minix/man/man3/system.3
===================================================================
--- trunk/minix/man/man3/system.3	(revision 9)
+++ 	(revision )
@@ -1,30 +1,0 @@
-.\"	@(#)system.3	6.1 (Berkeley) 5/15/85
-.\"
-.TH SYSTEM 3 "May 15, 1985"
-.AT 3
-.SH NAME
-system \- issue a shell command
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdlib.h>
-
-int system(const char *\fIstring\fP)
-.fi
-.SH DESCRIPTION
-.B System
-causes the
-.I string
-to be given to
-.BR  sh (1)
-as input as if the string had been typed as a command
-at a terminal.
-The current process waits until the shell has
-completed, then returns the exit status of the shell.
-.SH "SEE ALSO"
-.BR sh (1),
-.BR popen (3),
-.BR execve (2),
-.BR wait (2).
-.SH DIAGNOSTICS
-Exit status 127 indicates the shell couldn't be executed.
Index: trunk/minix/man/man3/termcap.3
===================================================================
--- trunk/minix/man/man3/termcap.3	(revision 9)
+++ 	(revision )
@@ -1,167 +1,0 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
-.\"
-.\"	@(#)termcap.3x	6.1 (Berkeley) 5/15/85
-.\"
-.TH TERMCAP 3 "May 15, 1985"
-.UC 4
-.SH NAME
-termcap, tgetent, tgetnum, tgetflag, tgetstr, tgoto, tputs \- terminal independent operation routines
-.SH SYNOPSIS
-.nf
-.ft B
-#include <termcap.h>
-
-int tgetent(char *\fIbp\fP, char *\fIname\fP)
-int tgetflag(char *\fIid\fP)
-int tgetnum(char *\fIid\fP)
-char *tgetstr(char *\fIid\fP, char **\fIarea\fP)
-char *tgoto(char *\fIcm\fP, int \fIdestcol\fP, int \fIdestline\fP)
-int tputs(char *\fIcp\fP, int \fIaffcnt\fP, void (*\fIoutc\fP)(int))
-.ft R
-.fi
-.SH DESCRIPTION
-These functions extract and use capabilities from the terminal capability data
-base
-.BR termcap (5).
-These are low level routines;
-see
-.BR curses (3)
-for a higher level package.
-.PP
-.B Tgetent
-extracts the entry for terminal
-.I name
-into the buffer at
-.IR bp .
-.I Bp
-should be a character buffer of size
-1024 and must be retained through all subsequent calls
-to
-.BR tgetnum ,
-.BR tgetflag ,
-and
-.BR tgetstr .
-.B Tgetent
-returns \-1 if it cannot find a termcap
-file, 0 if the terminal name given does not have an entry,
-and 1 if all goes well.
-.PP
-.B Tgetent
-uses the following recipe to find the termcap file and entry
-.IR name :
-.PP
-.in +5n
-if $TERMCAP is itself a termcap entry for
-.I name
-.br
-then
-.in +5n
-use $TERMCAP
-.in -5n
-elif $TERMCAP names a file
-.br
-then
-.in +5n
-use entry
-.I name
-found in that file
-.in -5n
-elif this is Minix-vmd
-.br
-then
-.in +5n
-if $TERMPATH is defined
-.br
-then
-.in +5n
-search the termcap files named in $TERMPATH for the first occurance of a
-.I name
-entry and use that entry
-.in -5n
-else
-.in +5n
-the path
-.B $HOME/.termcap:/etc/termcap:/usr/etc/termcap"
-is searched for entry
-.I name
-.in -5n
-fi
-.in -5n
-fi
-.in -5n
-.RE
-.PP
-.B Tgetnum
-gets the numeric value of capability
-.IR id ,
-returning \-1 if is not given for the terminal.
-.B Tgetflag
-returns 1 if the specified capability is present in
-the terminal's entry, 0 if it is not.
-.B Tgetstr
-returns the string value of the capability
-.IR id ,
-places it in the buffer at
-.IR area ,
-and advances the
-.I area
-pointer.
-It decodes the abbreviations for this field described in
-.BR termcap (5),
-except for cursor addressing and padding information.
-.B Tgetstr
-returns NULL if the capability was not found.
-.PP
-.B Tgoto
-returns a cursor addressing string decoded from
-.I cm
-to go to column
-.I destcol
-in line
-.IR destline .
-It uses the external variables
-.B UP
-(from the \fBup\fR capability)
-and
-.B BC
-(if \fBbc\fR is given rather than \fBbs\fR)
-if necessary to avoid placing \fB\en\fR, \fB^D\fR or \fB^@\fR in
-the returned string.
-(Programs which call tgoto should be sure to turn off the XTABS bit(s),
-since
-.B tgoto
-may now output a tab.
-Note that programs using termcap should in general turn off XTABS
-anyway since some terminals use CTRL-I for other functions,
-such as nondestructive space.)
-If a \fB%\fR sequence is given which is not understood, then
-.B tgoto
-returns \*(lqOOPS\*(rq.
-.PP
-.B Tputs
-decodes the leading padding information of the string
-.IR cp ;
-.I affcnt
-gives the number of lines affected by the operation, or 1 if this is
-not applicable,
-.I outc
-is a routine which is called with each character in turn.
-The external variable
-.B ospeed
-should contain the output speed of the terminal as encoded by
-.BR stty (3).
-The external variable
-.B PC
-should contain a pad character to be used (from the \fBpc\fR capability)
-if a null (\fB^@\fR) is inappropriate.
-.SH SEE ALSO
-.BR curses (3),
-.BR termcap (5).
-.SH AUTHOR
-William Joy
-.SH NOTES
-The MINIX 3 implementation does not support any of the external variables,
-only the functions calls.  The Minix-vmd termcap does support it all,
-although noone in his right mind meddles with those variables.
Index: trunk/minix/man/man3/termios.3
===================================================================
--- trunk/minix/man/man3/termios.3	(revision 9)
+++ 	(revision )
@@ -1,155 +1,0 @@
-.TH TERMIOS 3
-.SH NAME
-termios, tcgetattr, tcsetattr, cfgetispeed, cfgetospeed, cfsetispeed, cfsetospeed, tcsendbreak, tcdrain, tcflush, tcflow \- change terminal attributes
-.SH SYNOPSIS
-.ft B
-.nf
-#include <termios.h>
-
-int tcgetattr(int \fIfd\fP, struct termios *\fItp\fP)
-int tcsetattr(int \fIfd\fP, int \fIaction\fP, const struct termios *\fItp\fP)
-
-speed_t cfgetispeed(const struct termios *\fItp\fP)
-speed_t cfgetospeed(const struct termios *\fItp\fP)
-int cfsetispeed(struct termios *\fItp\fP, speed_t \fIspeed\fP)
-int cfsetospeed(struct termios *\fItp\fP, speed_t \fIspeed\fP)
-
-int tcsendbreak(int \fIfd\fP, int \fIduration\fP)
-int tcdrain(int \fIfd\fP)
-int tcflush(int \fIfd\fP, int \fIqueue_selector\fP)
-int tcflow(int \fIfd\fP, int \fIaction\fP)
-.fi
-.ft P
-.SH DESCRIPTION
-.de SP
-.if t .sp 0.4
-.if n .sp
-..
-These are the user functions that modify the tty attributes mentioned in
-.BR tty (4).
-In the following,
-.I fd
-refers to an open terminal device file,
-.I tp
-is the address of a
-.BR "struct termios" ,
-and
-.I speed
-and values of type
-.B speed_t
-are equal to one of the
-.BR B0 ,
-.BR B50 ,
-etc. baud rate symbols.  All functions, symbols, and types are declared in
-.BR <termios.h> .
-.PP
-The effects of the tty functions are:
-.TP
-.B tcgetattr(\fIfd\fP, \fItp\fP)
-Get the current settings of the tty attributes.
-.TP
-.B tcsetattr(\fIfd\fP, TCSANOW, \fItp\fP)
-Set the terminal attributes.  The change occurs immediately.
-.TP
-.B tcsetattr(\fIfd\fP, TCSADRAIN, \fItp\fP)
-Set the terminal attributes.  The change occurs once all the output waiting
-in the output queues has been transmitted.  This should be used when options
-affecting output are changed.
-.TP
-.B tcsetattr(\fIfd\fP, TCSAFLUSH, \fItp\fP)
-Set the terminal attributes.  But first wait until all the output waiting
-in the output queues has been transmitted.  All input waiting in the input
-queues is then discarded and the change is made.  This should be used when
-switching from canonical to non-canonical mode or vice-versa.  (Oddly
-enough, this is seldom what you want, because it discards typeahead.  An
-editing shell does the Right Thing if it uses
-.B TCSANOW
-instead.  \s-2POSIX\s+2 may not guarantee good results, but in practice most
-systems make the canonical input available in raw mode.)
-.TP
-.B cfgetispeed(\fItp\fP)
-Return the input baud rate encoded in the termios structure.
-.TP
-.B cfgetospeed(\fItp\fP)
-Return the output baud rate encoded in the termios structure.
-.TP
-.B cfsetispeed(\fItp\fP, \fIspeed\fP)
-Encode the new input baud rate into the termios structure.
-.TP
-.B cfsetospeed(\fItp\fP, \fIspeed\fP)
-Encode the new output baud rate into the termios structure.
-.TP
-.B tcsendbreak(\fIfd\fP, \fIduration\fP)
-Emit a break condition on a serial line for a time indicated by
-.IR duration .
-(Always 0.4 seconds under MINIX 3,
-.I duration
-is ignored.)
-.TP
-.B tcdrain(\fIfd\fP)
-Wait until all output waiting in the output queues has been transmitted.
-.TP
-.B tcflush(\fIfd\fP, TCIFLUSH)
-Flush the input queue.  (I.e. discard it.)
-.TP
-.B tcflush(\fIfd\fP, TCOFLUSH)
-Flush the output queue.
-.TP
-.B tcflush(\fIfd\fP, TCIOFLUSH)
-Flush the input and output queues.
-.TP
-.B tcflow(\fIfd\fP, TCOOFF)
-Suspend output.  (Like the effect of
-.BR STOP .)
-.TP
-.B tcflow(\fIfd\fP, TCOON)
-Restart output.  (Like the effect of
-.BR START .)
-.TP
-.B tcflow(\fIfd\fP, TCIOFF)
-Transmit a
-.B STOP
-character intended to make the remote device stop transmitting data.
-.TP
-.B tcflow(\fIfd\fP, TCION)
-Transmit a
-.B START
-character to restart the remote device.
-.SH "SEE ALSO"
-.BR stty (1),
-.BR tty (4).
-.SH DIAGNOSTICS
-All functions return 0 unless otherwise specified, and \-1 on error with
-.B errno
-set to indicate the type of error.  The most notable errors are
-.B ENOTTY
-if
-.I fd
-does not refer to a terminal device, and
-.B EINTR
-if one of the functions waiting for output to drain is interrupted.
-.SH NOTES
-It may be interesting to know that the functions operating on the tty are
-directly translated into the following MINIX 3
-.B ioctl
-requests:
-.BR TCGETS ,
-.BR TCSETS
-(now),
-.BR TCSETSW
-(drain),
-.BR TCSETSF ,
-(flush),
-.BR TCSBRK ,
-.BR TCDRAIN ,
-.BR TCFLSH ,
-and
-.BR TCFLOW .
-You should only use this knowledge when trying to understand the tty driver
-code, of course.
-.SH BUGS
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
-
-.\"
-.\" $PchId: termios.3,v 1.2 1996/04/11 06:41:24 philip Exp $
Index: trunk/minix/man/man3/ttyname.3
===================================================================
--- trunk/minix/man/man3/ttyname.3	(revision 9)
+++ 	(revision )
@@ -1,28 +1,0 @@
-.TH TTYNAME 3
-.SH NAME
-ttyname \- file descriptor to terminal device name
-.SH SYNOPSIS
-.nf
-.ft B
-#define _POSIX_SOURCE	1
-#include <unistd.h>
-
-char *ttyname(int \fIfd\fP)
-.ft P
-.fi
-.SH DESCRIPTION
-.B Ttyname
-searches through the
-.B /dev
-directory for the terminal device file that is associated with file
-descriptor
-.IR fd .
-It returns the full path name of the terminal file if found, NULL is
-returned otherwise.
-.SH "SEE ALSO"
-.BR ttyslot (3).
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
-
-.\"
-.\" $PchId: ttyname.3,v 1.2 1996/04/11 06:42:17 philip Exp $
Index: trunk/minix/man/man3/ttyslot.3
===================================================================
--- trunk/minix/man/man3/ttyslot.3	(revision 9)
+++ 	(revision )
@@ -1,56 +1,0 @@
-.TH TTYSLOT 3
-.SH NAME
-ttyslot, fttyslot \- utmp slot number
-.SH SYNOPSIS
-.nf
-.ft B
-#define _MINIX_SOURCE 1
-#include <unistd.h>
-
-int ttyslot(void)
-int fttyslot(int \fIfd\fP)
-.fi
-.ft P
-.SH DESCRIPTION
-.B Ttyslot()
-returns the index of the login terminal in the
-.B utmp
-file.  It tries
-.B fttyslot()
-on file descriptors
-.BR 0,
-.BR 1,
-and
-.BR 2
-to find the index.
-.PP
-.B Fttyslot()
-returns the utmp index of the terminal associated with file descriptor
-.IR fd .
-First it tries to map
-.I fd
-to a terminal name with
-.BR ttyname (3),
-then it searches the
-.BR ttytab (5)
-database with the
-.BR getttyent (3)
-function for this terminal.  This means that the utmp slot number is the
-same as the ttytab entry number counting from 1.  The value 0 is returned if
-no slot number can be found for a file descriptor.
-.SH "SEE ALSO"
-.BR ttyname (3),
-.BR getttyent (3),
-.BR utmp (5),
-.BR ttytab (5),
-.BR init (8).
-.SH NOTES
-Since 0 is used as an error return this means that the first entry in the
-utmp file is not used.
-.PP
-.B Ttyslot()
-is often found in a UNIX implementation,
-.B fttyslot()
-is MINIX 3 specific.
-.SH AUTHOR
-Kees J. Bot (kjb@cs.vu.nl)
Index: trunk/minix/man/man3/ungetc.3
===================================================================
--- trunk/minix/man/man3/ungetc.3	(revision 9)
+++ 	(revision )
@@ -1,41 +1,0 @@
-.\"	@(#)ungetc.3s	6.1 (Berkeley) 5/15/85
-.\"
-.TH UNGETC 3  "May 15, 1985"
-.AT 3
-.SH NAME
-ungetc \- push character back into input stream
-.SH SYNOPSIS
-.nf
-.ft B
-#include <stdio.h>
-
-int ungetc(int \fIc\fP, FILE *\fIstream\fP)
-.ft R
-.fi
-.SH DESCRIPTION
-.B Ungetc
-pushes the character
-.I c
-back on an input stream.  That character will be returned by the next
-.B getc
-call on that stream.
-.B Ungetc 
-returns 
-.IR c .
-.PP
-One character of pushback is guaranteed provided
-something has been read from the stream and the stream is actually buffered.
-Attempts to push EOF are rejected.
-.PP
-.BR  Fseek (3)
-erases all memory of pushed back characters.
-.SH "SEE ALSO"
-.BR getc (3),
-.BR setbuf (3),
-.BR fseek (3).
-.SH DIAGNOSTICS
-.B Ungetc
-returns
-.SM
-.B EOF
-if it can't push a character back.
