BSD 4_2 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Sat, 26 Feb 1983 10:23:24 +0000 (02:23 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Sat, 26 Feb 1983 10:23:24 +0000 (02:23 -0800)
Work on file usr/man/man3/atof.3
Work on file usr/man/man3/abs.3
Work on file usr/man/man3/crypt.3
Work on file usr/man/man3/assert.3x
Work on file usr/man/man3/dbm.3x
Work on file usr/man/man3/end.3
Work on file usr/man/man3/ecvt.3
Work on file usr/man/man3/floor.3m
Work on file usr/man/man3/frexp.3
Work on file usr/man/man3/gamma.3m
Work on file usr/man/man3/getgrent.3
Work on file usr/man/man3/getpass.3
Work on file usr/man/man3/getpwent.3
Work on file usr/man/man3/j0.3m
Work on file usr/man/man3/mktemp.3
Work on file usr/man/man3/sin.3m
Work on file usr/man/man3/sinh.3m
Work on file usr/man/man3/getwd.3
Work on file usr/man/man3/valloc.3

Synthesized-from: CSRG/cd1/4.2

19 files changed:
usr/man/man3/abs.3 [new file with mode: 0644]
usr/man/man3/assert.3x [new file with mode: 0644]
usr/man/man3/atof.3 [new file with mode: 0644]
usr/man/man3/crypt.3 [new file with mode: 0644]
usr/man/man3/dbm.3x [new file with mode: 0644]
usr/man/man3/ecvt.3 [new file with mode: 0644]
usr/man/man3/end.3 [new file with mode: 0644]
usr/man/man3/floor.3m [new file with mode: 0644]
usr/man/man3/frexp.3 [new file with mode: 0644]
usr/man/man3/gamma.3m [new file with mode: 0644]
usr/man/man3/getgrent.3 [new file with mode: 0644]
usr/man/man3/getpass.3 [new file with mode: 0644]
usr/man/man3/getpwent.3 [new file with mode: 0644]
usr/man/man3/getwd.3 [new file with mode: 0644]
usr/man/man3/j0.3m [new file with mode: 0644]
usr/man/man3/mktemp.3 [new file with mode: 0644]
usr/man/man3/sin.3m [new file with mode: 0644]
usr/man/man3/sinh.3m [new file with mode: 0644]
usr/man/man3/valloc.3 [new file with mode: 0644]

diff --git a/usr/man/man3/abs.3 b/usr/man/man3/abs.3
new file mode 100644 (file)
index 0000000..c78dc9c
--- /dev/null
@@ -0,0 +1,20 @@
+.TH ABS 3 "18 January 1983"
+.SH NAME
+abs \- integer absolute value
+.SH SYNOPSIS
+.nf
+.B abs(i)
+.B int i;
+.fi
+.SH DESCRIPTION
+.I Abs
+returns the absolute value of its integer operand.
+.SH SEE ALSO
+floor(3M) for
+.I fabs
+.SH BUGS
+Applying the \fIabs\fP function to the most negative integer generates a
+result which is the most negative integer.  That is, 
+.IP "abs(0x80000000)"
+.LP
+returns 0x80000000 as a result.
diff --git a/usr/man/man3/assert.3x b/usr/man/man3/assert.3x
new file mode 100644 (file)
index 0000000..b2c7e22
--- /dev/null
@@ -0,0 +1,37 @@
+.TH ASSERT 3X "19 January 1983"
+.SH NAME
+assert \- program verification
+.SH SYNOPSIS
+.B #include <assert.h>
+.PP
+.B assert(expression)
+.SH DESCRIPTION
+.PP
+.I Assert
+is a macro that indicates
+.I expression
+is expected to be true at this point in the program.
+It causes an
+.IR exit (2)
+with a diagnostic comment on the standard output when
+.I expression
+is false (0).
+Compiling with the 
+.IR cc (1)
+option
+.SM
+.B \-DNDEBUG
+effectively deletes
+.I assert
+from the program.
+.SH DIAGNOSTICS
+`Assertion failed: file
+.I f
+line
+.I n.'
+.I F
+is the source file and
+.I n
+the source line number of the
+.I assert
+statement.
diff --git a/usr/man/man3/atof.3 b/usr/man/man3/atof.3
new file mode 100644 (file)
index 0000000..35c03ff
--- /dev/null
@@ -0,0 +1,35 @@
+.TH ATOF 3  "19 January 1983"
+.SH NAME
+atof, atoi, atol \- convert ASCII to numbers
+.SH SYNOPSIS
+.nf
+.B double atof(nptr)
+.B char *nptr;
+.PP
+.B atoi(nptr)
+.B char *nptr;
+.PP
+.B long atol(nptr)
+.B char *nptr;
+.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
+.I 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
+.I Atoi
+and
+.I atol
+recognize an optional string of spaces, then an optional sign, then a
+string of
+digits.
+.SH SEE ALSO
+scanf(3S)
+.SH BUGS
+There are no provisions for overflow.
diff --git a/usr/man/man3/crypt.3 b/usr/man/man3/crypt.3
new file mode 100644 (file)
index 0000000..7790ab5
--- /dev/null
@@ -0,0 +1,65 @@
+.TH CRYPT 3  "25 February 1983"
+.SH NAME
+crypt, setkey, encrypt \- DES encryption
+.SH SYNOPSIS
+.nf
+.B char *crypt(key, salt)
+.B char *key, *salt;
+.PP
+.B setkey(key)
+.B char *key;
+.PP
+.B encrypt(block, edflag)
+.B char *block;
+.fi
+.SH DESCRIPTION
+.I Crypt
+is the password encryption routine.
+It is based on the NBS Data Encryption Standard, with
+variations intended (among other things) to frustrate use of hardware
+implementations of the DES for key search.
+.PP
+The first argument to
+.I crypt
+is normally a user's typed password.
+The second is a 2-character string chosen from the
+set [a-zA-Z0-9./].
+The
+.I salt
+string is used to perturb the DES algorithm in one of 4096
+different ways, after which the password
+is used as the key to encrypt repeatedly a constant string.
+The returned value points to the encrypted password,
+in the same alphabet as the salt.
+The first two characters are the salt itself.
+.PP
+The other entries provide (rather primitive)
+access to the actual DES algorithm.
+The argument of
+.I setkey
+is a character array of length 64 containing only the characters
+with numerical value 0 and 1.
+If this string is divided into groups of 8,
+the low-order bit in each group is ignored,
+leading to a 56-bit key which is set into the machine.
+.PP
+The argument to the
+.I encrypt
+entry is likewise a character array of length 64
+containing 0's and 1's.
+The argument array is modified in place
+to a similar array
+representing the bits of the argument after having been
+subjected to the DES algorithm using the key set by
+.I setkey.
+If
+.I edflag
+is 0, the argument is encrypted;
+if non-zero,
+it is decrypted.
+.SH "SEE ALSO"
+passwd(1), passwd(5), login(1), getpass(3)
+.SH BUGS
+The return value
+points to static data whose content is overwritten
+by each call.
diff --git a/usr/man/man3/dbm.3x b/usr/man/man3/dbm.3x
new file mode 100644 (file)
index 0000000..5a34892
--- /dev/null
@@ -0,0 +1,113 @@
+.TH DBM 3X  "19 January 1983"
+.UC 4
+.SH NAME
+dbminit, fetch, store, delete, firstkey, nextkey \- data base subroutines
+.SH SYNOPSIS
+.nf
+.PP
+.B typedef struct {
+.B "   char *dptr;"
+.B "   int dsize;"
+.B } datum;
+.PP
+.B dbminit(file)
+.B char *file;
+.PP
+.B datum fetch(key)
+.B datum key;
+.PP
+.B store(key, content)
+.B datum key, content;
+.PP
+.B delete(key)
+.B datum key;
+.PP
+.B datum firstkey()
+.PP
+.B datum nextkey(key)
+.B datum key;
+.SH DESCRIPTION
+These functions maintain key/content pairs in a data base.
+The functions will handle very large (a billion blocks)
+databases and will access a keyed item in one or two file system accesses.
+The functions are obtained with the loader option
+.BR \-ldbm .
+.PP
+.IR Key s
+and
+.IR content s
+are described by the
+.I datum
+typedef.  A
+.I datum
+specifies a string of
+.I dsize
+bytes pointed to by
+.I dptr.
+Arbitrary binary data, as well as normal ASCII strings, are allowed.
+The data base is stored in two files.
+One file is a directory containing a bit map and has `.dir' as its suffix.
+The second file contains all data and has `.pag' as its suffix.
+.PP
+Before a database can be accessed, it must be opened by
+.I dbminit.
+At the time of this call, the files
+.IB file .dir
+and
+.IB file .pag
+must exist.
+(An empty database is created by creating zero-length
+`.dir' and `.pag' files.)
+.PP
+Once open, the data stored under a key is accessed by
+.I fetch
+and data is placed under a key by
+.IR store .
+A key (and its associated contents) is deleted by
+.IR delete .
+A linear pass through all keys in a database may be made,
+in an (apparently) random order, by use of
+.I firstkey
+and
+.IR nextkey .
+.I Firstkey
+will return the first key in the database.  With any key
+.I nextkey
+will return the next key in the database.
+This code will traverse the data base:
+.IP
+.B for
+(key = firstkey(); key.dptr != NULL; key = nextkey(key))
+.SH DIAGNOSTICS
+All functions that return an
+.I int
+indicate errors with negative values.  A zero return indicates ok.
+Routines that return a
+.I datum
+indicate errors with a null (0)
+.I dptr.
+.SH BUGS
+The `.pag' file will contain holes so that its apparent size is about
+four times its actual content.  Older UNIX systems may create real
+file blocks for these holes when touched.  These files cannot be copied
+by normal means (cp, cat, tp, tar, ar) without filling in the holes.
+.PP
+.I Dptr
+pointers returned by these subroutines point into static storage
+that is changed by subsequent calls.
+.PP
+The sum of the sizes of a key/content pair must not exceed
+the internal block size (currently 1024 bytes).
+Moreover all key/content pairs that hash together must fit on a single block.
+.I Store
+will return an error in the event that a disk block fills with inseparable data.
+.PP
+.I Delete
+does not physically reclaim file space,
+although it does make it available for reuse.
+.PP
+The order of keys presented by
+.I firstkey
+and
+.I nextkey
+depends on a hashing function, not on anything interesting.
diff --git a/usr/man/man3/ecvt.3 b/usr/man/man3/ecvt.3
new file mode 100644 (file)
index 0000000..1ab1f4c
--- /dev/null
@@ -0,0 +1,53 @@
+.TH ECVT 3  "19 January 1983"
+.SH NAME
+ecvt, fcvt, gcvt \- output conversion
+.SH SYNOPSIS
+.nf
+.B char *ecvt(value, ndigit, decpt, sign)
+.B double value;
+.B int ndigit, *decpt, *sign;
+.PP
+.B char *fcvt(value, ndigit, decpt, sign)
+.B double value;
+.B int ndigit, *decpt, *sign;
+.PP
+.B char *gcvt(value, ndigit, buf)
+.B double value;
+.B char *buf;
+.fi
+.SH DESCRIPTION
+.I Ecvt
+converts the 
+.I value
+to a null-terminated string of
+.I ndigit
+ASCII digits and returns a pointer thereto.
+The position of the decimal point relative to the
+beginning of the string is stored indirectly through
+.IR decpt ""
+(negative means to the left of the returned digits).
+If the sign of the result is negative, the word pointed to by
+.IR sign ""
+is non-zero, otherwise it is zero.  The low-order digit is rounded.
+.PP
+.IR Fcvt " is identical to " "ecvt\fR, except that the correct digit"
+has been rounded for Fortran F-format output of the number
+of digits specified by
+.IR \(*_ndigits .
+.PP
+.I Gcvt
+converts the
+.I value
+to a null-terminated ASCII string in
+.I buf
+and returns a pointer to 
+.I buf.
+It attempts to produce
+.I ndigit
+significant digits in Fortran F format if possible, otherwise E format,
+ready for printing.  Trailing zeros may be suppressed.
+.SH "SEE ALSO"
+printf(3)
+.SH BUGS
+The return values point to static data
+whose content is overwritten by each call.
diff --git a/usr/man/man3/end.3 b/usr/man/man3/end.3
new file mode 100644 (file)
index 0000000..679f50e
--- /dev/null
@@ -0,0 +1,36 @@
+.TH END 3  "19 January 1983"
+.SH NAME
+end, etext, edata \- last locations in program
+.SH SYNOPSIS
+.nf
+.B extern end;
+.B extern etext;
+.B extern edata;
+.fi
+.SH DESCRIPTION
+These names refer neither to routines nor to locations with interesting
+contents.  The address of
+.I etext
+is the first address above the program text,
+.I edata
+above the initialized data region, and
+.I end
+above the uninitialized data region.
+.PP
+When execution begins, the program break coincides with
+.I end,
+but it is reset by the routines
+.IR brk (2),
+.IR malloc (3), 
+standard input/output
+.RI ( stdio (3)),
+the profile
+.RB ( \-p )
+option of 
+.IR cc (1),
+etc.
+The current value of the program break is reliably returned by `sbrk(0)',
+see
+.IR brk (2).
+.SH "SEE ALSO"
+brk(2), malloc(3)
diff --git a/usr/man/man3/floor.3m b/usr/man/man3/floor.3m
new file mode 100644 (file)
index 0000000..f7dbbe6
--- /dev/null
@@ -0,0 +1,30 @@
+.TH FLOOR 3M  "19 January 1983"
+.SH NAME
+fabs, floor, ceil \- absolute value, floor, ceiling functions
+.SH SYNOPSIS
+.nf
+.B #include <math.h>
+.PP
+.B double floor(x)
+.B double x;
+.PP
+.B double ceil(x)
+.B double x;
+.PP
+.B double fabs(x)
+.B double x;
+.nf
+.SH DESCRIPTION
+.I Fabs
+returns the absolute value
+.RI | \|x\| |.
+.PP
+.I Floor
+returns the largest integer not greater than
+.IR x .
+.PP
+.I Ceil
+returns the smallest integer not less than
+.IR x .
+.SH SEE ALSO
+abs(3)
diff --git a/usr/man/man3/frexp.3 b/usr/man/man3/frexp.3
new file mode 100644 (file)
index 0000000..0430d94
--- /dev/null
@@ -0,0 +1,40 @@
+.TH FREXP 3 "19 January 1983"
+.SH NAME
+frexp, ldexp, modf \- split into mantissa and exponent
+.SH SYNOPSIS
+.nf
+.B double frexp(value, eptr)
+.B double value;
+.B int *eptr;
+.PP
+.B double ldexp(value, exp)
+.B double value;
+.PP
+.B double modf(value, iptr)
+.B double value, *iptr;
+.SH DESCRIPTION
+.I Frexp
+returns the mantissa of a double 
+.I value
+as a double quantity,
+.I x,
+of magnitude less than 1
+and stores an integer 
+.I n
+such that
+.I value
+=
+\fIx\fP\|\(**\|2\u\fIn\fP\d
+indirectly through 
+.I eptr.
+.PP
+.I Ldexp
+returns the quantity
+\fIvalue\|\(**\|2\u\fIexp\fP\d.
+.PP
+.I Modf
+returns the positive fractional part of
+.I value
+and stores the integer part indirectly
+through 
+.I iptr.
diff --git a/usr/man/man3/gamma.3m b/usr/man/man3/gamma.3m
new file mode 100644 (file)
index 0000000..d449498
--- /dev/null
@@ -0,0 +1,29 @@
+.TH GAMMA 3M  "19 January 1983"
+.SH NAME
+gamma \- log gamma function
+.SH SYNOPSIS
+.nf
+.B #include <math.h>
+.PP
+.B double gamma(x)
+.B double x;
+.fi
+.SH DESCRIPTION
+.I Gamma
+returns ln \||\|\(*G(\||\|\fIx\fR\||\|)\||\|.
+The sign of \(*G(\||\|\fIx\fR\||\|) is returned in the external integer
+.IR signgam .
+The following C program might be used to calculate \(*G:
+.PP
+.nf
+       y = gamma(x);
+       if (y > 88.0)
+               error();
+       y = exp(y);
+       if(signgam)
+               y = \-y;
+.fi
+.SH DIAGNOSTICS
+A huge value is returned for negative integer arguments.
+.SH BUGS
+There should be a positive indication of error.
diff --git a/usr/man/man3/getgrent.3 b/usr/man/man3/getgrent.3
new file mode 100644 (file)
index 0000000..f7113cf
--- /dev/null
@@ -0,0 +1,97 @@
+.TH GETGRENT 3  "19 January 1983"
+.SH NAME
+getgrent, getgrgid, getgrnam, setgrent, endgrent \- get group file entry
+.SH SYNOPSIS
+.nf
+.B #include <grp.h>
+.PP
+.B struct group *getgrent()
+.PP
+.B struct group *getgrgid(gid)
+.B int gid;
+.PP
+.B struct group *getgrnam(name)
+.B char *name;
+.PP
+.B setgrent()
+.PP
+.B endgrent()
+.fi
+.SH DESCRIPTION
+.I Getgrent,
+.I getgrgid
+and
+.I getgrnam
+each return pointers
+to an object
+with the following structure
+containing the broken-out
+fields of a line in the group file.
+.RS
+.PP
+.nf
+.so /usr/include/grp.h
+.fi
+.RE
+.PP
+The members of this structure are:
+.TP \w'gr_passwd'u+2n
+gr_name
+The name of the group.
+.br
+.ns
+.TP \w'gr_passwd'u+2n
+gr_passwd
+The encrypted password of the group.
+.br
+.ns
+.TP \w'gr_passwd'u+2n
+gr_gid
+The numerical group-ID.
+.br
+.ns
+.TP \w'gr_passwd'u+2n
+gr_mem
+Null-terminated vector
+of pointers to the individual
+member names.
+.PP
+.I Getgrent
+simply reads the next
+line while
+.I getgrgid
+and
+.I getgrnam
+search until a matching
+.I gid
+or
+.I name
+is found
+(or until EOF is encountered).
+Each routine picks up
+where the others leave off
+so successive calls may be used
+to search the entire file.
+.PP
+A call to
+.I setgrent
+has the effect of rewinding
+the group file
+to allow
+repeated searches.
+.I Endgrent
+may be called to
+close the group file
+when processing is complete.
+.SH FILES
+/etc/group
+.SH "SEE ALSO"
+getlogin(3), getpwent(3), group(5)
+.SH DIAGNOSTICS
+A null pointer
+(0) is 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.
diff --git a/usr/man/man3/getpass.3 b/usr/man/man3/getpass.3
new file mode 100644 (file)
index 0000000..271a988
--- /dev/null
@@ -0,0 +1,25 @@
+.TH GETPASS 3  "19 January 1983"
+.SH NAME
+getpass \- read a password
+.SH SYNOPSIS
+.nf
+.B char *getpass(prompt)
+.B char *prompt;
+.fi
+.SH DESCRIPTION
+.I Getpass
+reads a password from the file
+.IR /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 8 characters.
+.SH FILES
+/dev/tty
+.SH "SEE ALSO"
+crypt(3)
+.SH BUGS
+The return value points to static data
+whose content is overwritten by each call.
diff --git a/usr/man/man3/getpwent.3 b/usr/man/man3/getpwent.3
new file mode 100644 (file)
index 0000000..04ca062
--- /dev/null
@@ -0,0 +1,74 @@
+.TH GETPWENT 3  "19 January 1983"
+.SH NAME
+getpwent, getpwuid, getpwnam, setpwent, endpwent \- get password file entry
+.SH SYNOPSIS
+.nf
+.B #include <pwd.h>
+.PP
+.B struct passwd *getpwent()
+.PP
+.B struct passwd *getpwuid(uid)
+.B int uid;
+.PP
+.B struct passwd *getpwnam(name)
+.B char *name;
+.PP
+.B int setpwent()
+.PP
+.B int endpwent()
+.fi
+.SH DESCRIPTION
+.I Getpwent,
+.I getpwuid
+and
+.I getpwnam
+each return a pointer to an object with the
+following structure
+containing the broken-out
+fields of a line in the password file.
+.RS
+.PP
+.nf
+.so /usr/include/pwd.h
+.ft R
+.ad
+.fi
+.RE
+.PP
+The fields
+.I pw_quota
+and
+.I pw_comment
+are unused; the others have meanings described in
+.IR passwd (5).
+.PP
+.I Getpwent
+reads the next
+line (opening the file if necessary);
+.I setpwent
+rewinds the file;
+.I endpwent
+closes it.
+.PP
+.I Getpwuid
+and
+.I getpwnam
+search from the beginning until a matching
+.I uid
+or
+.I name
+is found
+(or until EOF is encountered).
+.SH FILES
+/etc/passwd
+.SH "SEE ALSO"
+getlogin(3), getgrent(3), passwd(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.
+.br
diff --git a/usr/man/man3/getwd.3 b/usr/man/man3/getwd.3
new file mode 100644 (file)
index 0000000..3e1d738
--- /dev/null
@@ -0,0 +1,24 @@
+.TH GETWD 3 "25 February 1983"
+.UC 4
+.SH NAME
+getwd \- get current working directory pathname
+.SH SYNOPSIS
+.nf
+.B char *getwd(pathname)
+.B char *pathname;
+.fi
+.SH DESCRIPTION
+.I Getwd
+copies the absolute pathname of the current working directory to
+.I pathname
+and returns a pointer to the result.
+.SH LIMITATIONS
+Maximum pathname length is MAXPATHLEN characters (1024).
+.SH DIAGNOSTICS
+.I Getwd
+returns zero and places a message in
+.I pathname
+if an error occurs.
+.SH BUGS
+.I Getwd
+may fail to return to the current directory if an error occurs.
diff --git a/usr/man/man3/j0.3m b/usr/man/man3/j0.3m
new file mode 100644 (file)
index 0000000..2a0b8df
--- /dev/null
@@ -0,0 +1,36 @@
+.TH J0 3M  "19 January 1983"
+.SH NAME
+j0, j1, jn, y0, y1, yn \- bessel functions
+.SH SYNOPSIS
+.nf
+.B #include <math.h>
+.PP
+.B double j0(x)
+.B double x;
+.PP
+.B double j1(x)
+.B double x;
+.PP
+.B double jn(n, x)
+.B double x;
+.PP
+.B double y0(x)
+.B double x;
+.PP
+.B double y1(x)
+.B double x;
+.PP
+.B double yn(n, x)
+.B double x;
+.fi
+.SH DESCRIPTION
+These functions calculate Bessel functions of the first
+and second kinds for real arguments and integer orders.
+.SH DIAGNOSTICS
+Negative arguments cause
+.I y0, y1,
+and
+.I yn
+to return a huge negative value and set
+.I errno
+to EDOM.
diff --git a/usr/man/man3/mktemp.3 b/usr/man/man3/mktemp.3
new file mode 100644 (file)
index 0000000..5c82ad0
--- /dev/null
@@ -0,0 +1,19 @@
+.TH MKTEMP 3  "19 January 1983"
+.SH NAME
+mktemp \- make a unique file name
+.SH SYNOPSIS
+.nf
+.B char *mktemp(template)
+.B char *template;
+.fi
+.SH DESCRIPTION
+.I Mktemp
+replaces
+.I template
+by a unique file name, and returns the
+address of the template.
+The template should look like a file name with six trailing
+X's, which will be replaced with the
+current process id and a unique letter.
+.SH "SEE ALSO"
+getpid(2)
diff --git a/usr/man/man3/sin.3m b/usr/man/man3/sin.3m
new file mode 100644 (file)
index 0000000..a3f14df
--- /dev/null
@@ -0,0 +1,64 @@
+.TH SIN 3M  "19 January 1983"
+.SH NAME
+sin, cos, tan, asin, acos, atan, atan2 \- trigonometric functions
+.SH SYNOPSIS
+.nf
+.B #include <math.h>
+.PP
+.B double sin(x)
+.B double x;
+.PP
+.B double cos(x)
+.B double x;
+.PP
+.B double asin(x)
+.B double x;
+.PP
+.B double acos(x)
+.B double x;
+.PP
+.B double atan(x)
+.B double x;
+.PP
+.B double atan2(x, y)
+.B double x, y;
+.fi
+.SH DESCRIPTION
+.I Sin, cos
+and
+.I tan
+return trigonometric functions of radian arguments.
+The magnitude of the argument should be checked
+by the caller to make sure the result is meaningful.
+.PP
+.I Asin
+returns the arc sin in the range \-\(*p/2 to \(*p/2.
+.PP
+.I Acos
+returns the arc cosine in the range 0 to \(*p.
+.PP
+.I Atan
+returns the arc tangent of
+.I x
+in the range \-\(*p/2 to \(*p/2.
+.PP
+.I Atan2
+returns the arc tangent of
+.I x/y
+in the range \-\(*p to \(*p.
+.SH DIAGNOSTICS
+Arguments of magnitude greater than 1 cause
+.I asin
+and
+.I acos
+to return value 0;
+.I errno
+is set to EDOM.  The value of
+.I tan
+at its singular points is a huge number, and
+.I errno
+is set to ERANGE.
+.SH BUGS
+The value of
+.I tan
+for arguments greater than about 2**31 is garbage.
diff --git a/usr/man/man3/sinh.3m b/usr/man/man3/sinh.3m
new file mode 100644 (file)
index 0000000..4a3f3c6
--- /dev/null
@@ -0,0 +1,22 @@
+.TH SINH 3M "19 January 1983"
+.SH NAME
+sinh, cosh, tanh \- hyperbolic functions
+.SH SYNOPSIS
+.nf
+.B #include <math.h>
+.PP
+.B double sinh(x)
+.PP
+.B double cosh(x)
+.B double x;
+.PP
+.B double tanh(x)
+.B double x;
+.fi
+.SH DESCRIPTION
+These functions compute the designated hyperbolic functions for real arguments.
+.SH DIAGNOSTICS
+.I Sinh
+and
+.I cosh
+return a huge value of appropriate sign when the correct value would overflow.
diff --git a/usr/man/man3/valloc.3 b/usr/man/man3/valloc.3
new file mode 100644 (file)
index 0000000..d3e6042
--- /dev/null
@@ -0,0 +1,26 @@
+.TH VALLOC 3 "19 January 1983"
+.UC
+.SH NAME
+valloc \- aligned memory allocator
+.SH SYNOPSIS
+.nf
+.B char *valloc(size)
+.B unsigned size;
+.fi
+.SH DESCRIPTION
+.I Valloc
+allocates
+.I size
+bytes aligned on a page boundary.
+It is implemented by calling
+.IR malloc (3)
+with a slightly larger request, saving the true beginning of the block
+allocated, and returning a properly aligned pointer.
+.SH DIAGNOSTICS
+.I Valloc
+returns a null pointer (0) if there is no available memory
+or if the arena has been detectably corrupted by storing outside the bounds
+of a block.
+.SH BUGS
+.I Vfree
+isn't implemented.