From 064f007493a990a098f3f0f5ae66732c5747c837 Mon Sep 17 00:00:00 2001 From: Mike Pritchard Date: Wed, 27 Mar 1996 20:49:07 +0000 Subject: [PATCH] Added missing section numbers to a bunch of .Xr macros, or converted them into .Fn macros where appropriate. Also fixed up some minor formatting problems. --- lib/libc/compat-43/sigvec.2 | 4 ++-- lib/libc/gen/crypt.3 | 2 +- lib/libc/gen/ctermid.3 | 2 +- lib/libc/gen/exec.3 | 10 +++++----- lib/libc/gen/getmntinfo.3 | 2 +- lib/libc/gen/getpagesize.3 | 3 +-- lib/libc/gen/glob.3 | 3 ++- lib/libc/gen/popen.3 | 4 ++-- lib/libc/gen/signal.3 | 2 +- lib/libc/gen/sleep.3 | 2 +- lib/libc/gen/syslog.3 | 4 ++-- lib/libc/gen/unvis.3 | 2 +- lib/libc/locale/isupper.3 | 2 +- lib/libc/stdio/fopen.3 | 2 +- lib/libc/stdio/scanf.3 | 4 ++-- lib/libc/stdio/stdio.3 | 22 +++++++++++----------- lib/libc/stdio/tmpnam.3 | 2 +- lib/libc/stdlib/random.3 | 13 +++++++++---- lib/libc/stdtime/ctime.3 | 4 ++-- lib/libc/sys/_exit.2 | 2 +- lib/libc/sys/brk.2 | 6 +++--- lib/libc/sys/close.2 | 2 +- lib/libc/sys/fcntl.2 | 4 ++-- lib/libc/sys/fork.2 | 4 ++-- lib/libc/sys/getrlimit.2 | 2 +- lib/libc/sys/getsockopt.2 | 10 +++++----- lib/libc/sys/intro.2 | 2 +- lib/libc/sys/open.2 | 2 +- lib/libc/sys/rfork.2 | 2 +- lib/libc/sys/stat.2 | 2 +- lib/libc/sys/utimes.2 | 2 +- lib/libc/sys/vfork.2 | 4 ++-- 32 files changed, 69 insertions(+), 64 deletions(-) diff --git a/lib/libc/compat-43/sigvec.2 b/lib/libc/compat-43/sigvec.2 index 7288d00f2930..a37c988d5baa 100644 --- a/lib/libc/compat-43/sigvec.2 +++ b/lib/libc/compat-43/sigvec.2 @@ -102,9 +102,9 @@ must arrange to restore the previous context itself. When a signal is delivered to a process a new signal mask is installed for the duration of the process' signal handler (or until a -.Xr sigblock +.Xr sigblock 2 or -.Xr sigsetmask +.Xr sigsetmask 2 call is made). This mask is formed by taking the current signal mask, adding the signal to be delivered, and diff --git a/lib/libc/gen/crypt.3 b/lib/libc/gen/crypt.3 index d95f7040a059..28b51123e94e 100644 --- a/lib/libc/gen/crypt.3 +++ b/lib/libc/gen/crypt.3 @@ -54,7 +54,7 @@ .Fn des_cipher "const char *in" "char *out" "long salt" "int count" .Sh DESCRIPTION The -.Xr crypt +.Fn crypt function performs password encryption. It is derived from the diff --git a/lib/libc/gen/ctermid.3 b/lib/libc/gen/ctermid.3 index ff92420eda55..2e3e9e6d71bc 100644 --- a/lib/libc/gen/ctermid.3 +++ b/lib/libc/gen/ctermid.3 @@ -80,7 +80,7 @@ The current implementation detects no error conditions. .Xr ttyname 3 .Sh STANDARDS The -.Xr ctermid +.Fn ctermid function conforms to .St -p1003.1-88 . .Sh BUGS diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3 index 5c74adaa7987..bda6e9e6169f 100644 --- a/lib/libc/gen/exec.3 +++ b/lib/libc/gen/exec.3 @@ -65,7 +65,7 @@ new process image. The functions described in this manual page are front-ends for the function .Xr execve 2 . (See the manual page for -.Xr execve +.Xr execve 2 for detailed information about the replacement of the current process.) .Pp The initial argument for these functions is the pathname of a file which @@ -148,7 +148,7 @@ used. In addition, certain errors are treated specially. .Pp If permission is denied for a file (the attempted -.Xr execve +.Fn execve returned .Er EACCES ) , these functions will continue searching the rest of @@ -159,7 +159,7 @@ set to .Er EACCES . .Pp If the header of a file isn't recognized (the attempted -.Xr execve +.Fn execve returned .Er ENOEXEC ) , these functions will execute the shell with the path of @@ -167,7 +167,7 @@ the file as its first argument. (If this attempt fails, no further searching is done.) .Pp If the file is currently busy (the attempted -.Xr execve +.Fn execve returned .Er ETXTBUSY ) , these functions will sleep for several seconds, @@ -179,7 +179,7 @@ executes a file with the program tracing facilities enabled (see .Xr ptrace 2 ) . .Sh RETURN VALUES If any of the -.Xr exec +.Fn exec functions returns, an error will have occurred. The return value is \-1, and the global variable .Va errno diff --git a/lib/libc/gen/getmntinfo.3 b/lib/libc/gen/getmntinfo.3 index 9a28b2e38df4..da1d5ad4671b 100644 --- a/lib/libc/gen/getmntinfo.3 +++ b/lib/libc/gen/getmntinfo.3 @@ -48,7 +48,7 @@ The .Fn getmntinfo function returns an array of -.Xr statfs +.Fn statfs structures describing each currently mounted file system (see .Xr statfs 2 ) . .Pp diff --git a/lib/libc/gen/getpagesize.3 b/lib/libc/gen/getpagesize.3 index 1a2629740b73..ea7f587d3cb6 100644 --- a/lib/libc/gen/getpagesize.3 +++ b/lib/libc/gen/getpagesize.3 @@ -47,8 +47,7 @@ returns the number of bytes in a page. Page granularity is the granularity of many of the memory management calls. .Pp -The page size is a -.Xr system +The page size is a system page size and may not be the same as the underlying hardware page size. .Sh SEE ALSO diff --git a/lib/libc/gen/glob.3 b/lib/libc/gen/glob.3 index f28bc2a0025e..65c5674c31e2 100644 --- a/lib/libc/gen/glob.3 +++ b/lib/libc/gen/glob.3 @@ -220,7 +220,8 @@ to provide globbing from directories stored on tape. Pre-process the pattern string to expand .Ql {pat,pat,...} strings like -.Xr csh 1. The pattern +.Xr csh 1 . +The pattern .Ql {} is left unexpanded for historical reasons .Xr (Csh 1 diff --git a/lib/libc/gen/popen.3 b/lib/libc/gen/popen.3 index 6f89a5cbaf0c..db4adfa8cf59 100644 --- a/lib/libc/gen/popen.3 +++ b/lib/libc/gen/popen.3 @@ -170,9 +170,9 @@ The .Fn popen argument always calls -.Xr sh , +.Xr sh 1 , never calls -.Xr csh . +.Xr csh 1 . .Sh HISTORY A .Fn popen diff --git a/lib/libc/gen/signal.3 b/lib/libc/gen/signal.3 index 37ad60b64a8f..3fd52d8580c4 100644 --- a/lib/libc/gen/signal.3 +++ b/lib/libc/gen/signal.3 @@ -193,7 +193,7 @@ Otherwise, \-1 is returned and the global variable .Va errno is set to indicate the error. .Sh ERRORS -.Xr Signal +.Fn Signal will fail and no action will take place if one of the following occur: .Bl -tag -width [EINVAL] diff --git a/lib/libc/gen/sleep.3 b/lib/libc/gen/sleep.3 index 9e3c7976a13e..a56a80e00f94 100644 --- a/lib/libc/gen/sleep.3 +++ b/lib/libc/gen/sleep.3 @@ -70,7 +70,7 @@ A similar but less compatible function can be obtained with a single .Xr select 2 ; such a function would not restart after signals, but would not interfere with other uses of -.Xr setitimer . +.Xr setitimer 2 . .Sh RETURN VALUES .Sh SEE ALSO .Xr setitimer 2 , diff --git a/lib/libc/gen/syslog.3 b/lib/libc/gen/syslog.3 index 8a46d05d8b55..832fd9ce52e5 100644 --- a/lib/libc/gen/syslog.3 +++ b/lib/libc/gen/syslog.3 @@ -139,12 +139,12 @@ one or more of the following values: If .Fn syslog cannot pass the message to -.Xr syslogd +.Xr syslogd 8 it will attempt to write the message to the console .Pq Dq Pa /dev/console. .It Dv LOG_NDELAY Open the connection to -.Xr syslogd +.Xr syslogd 8 immediately. Normally the open is delayed until the first message is logged. Useful for programs that need to manage the order in which file diff --git a/lib/libc/gen/unvis.3 b/lib/libc/gen/unvis.3 index 807a851327b0..c65024d5915a 100644 --- a/lib/libc/gen/unvis.3 +++ b/lib/libc/gen/unvis.3 @@ -100,7 +100,7 @@ to zero. Call with each successive byte, along with a pointer to this integer, and a pointer to a destination character. The -.Xr unvis +.Fn unvis function has several return codes that must be handled properly. They are: .Bl -tag -width UNVIS_VALIDPUSH diff --git a/lib/libc/locale/isupper.3 b/lib/libc/locale/isupper.3 index 6035f0915f32..f8fb41305914 100644 --- a/lib/libc/locale/isupper.3 +++ b/lib/libc/locale/isupper.3 @@ -69,6 +69,6 @@ returns non-zero if the character tests true. .Xr ascii 7 .Sh STANDARDS The -.Xr isupper +.Fn isupper function conforms to .St -ansiC . diff --git a/lib/libc/stdio/fopen.3 b/lib/libc/stdio/fopen.3 index 23d790c79a03..87bb0494e0ab 100644 --- a/lib/libc/stdio/fopen.3 +++ b/lib/libc/stdio/fopen.3 @@ -142,7 +142,7 @@ The original stream (if it exists) is closed. The .Fa mode argument is used just as in the -.Xr fopen +.Fn fopen function. The primary use of the .Fn freopen diff --git a/lib/libc/stdio/scanf.3 b/lib/libc/stdio/scanf.3 index 377a60262a41..dbfff8871273 100644 --- a/lib/libc/stdio/scanf.3 +++ b/lib/libc/stdio/scanf.3 @@ -200,7 +200,7 @@ the next pointer must be a pointer to .Em int . .It Cm D Equivalent to -.Xr ld ; +.Cm ld ; this exists only for backwards compatibility. .It Cm i Matches an optionally signed integer; @@ -221,7 +221,7 @@ the next pointer must be a pointer to .Em unsigned int . .It Cm O Equivalent to -.Xr lo ; +.Cm lo ; this exists for backwards compatibility. .It Cm u Matches an optionally signed decimal integer; diff --git a/lib/libc/stdio/stdio.3 b/lib/libc/stdio/stdio.3 index 09d7e36a4e50..7ebc782d06e3 100644 --- a/lib/libc/stdio/stdio.3 +++ b/lib/libc/stdio/stdio.3 @@ -151,7 +151,7 @@ function. The .Nm stdio library is a part of the library -.Xr libc +.Nm libc and routines are automatically loaded as needed by the compilers .Xr cc 1 and @@ -192,15 +192,15 @@ without first removing their current definitions with .Dv stdin , .Dv stdout . Function versions of the macro functions -.Xr feof , -.Xr ferror , -.Xr clearerr , -.Xr fileno , -.Xr getc , -.Xr getchar , -.Xr putc , +.Fn feof , +.Fn ferror , +.Fn clearerr , +.Fn fileno , +.Fn getc , +.Fn getchar , +.Fn putc , and -.Xr putchar +.Fn putchar exist and will be used if the macros definitions are explicitly removed. .Sh SEE ALSO @@ -211,9 +211,9 @@ definitions are explicitly removed. .Sh BUGS The standard buffered functions do not interact well with certain other library and system functions, especially -.Xr vfork +.Xr vfork 2 and -.Xr abort . +.Xr abort 3 . .Sh STANDARDS The .Nm stdio diff --git a/lib/libc/stdio/tmpnam.3 b/lib/libc/stdio/tmpnam.3 index 3b053ee20042..d7e032697614 100644 --- a/lib/libc/stdio/tmpnam.3 +++ b/lib/libc/stdio/tmpnam.3 @@ -201,7 +201,7 @@ Second, most historic implementations provide only a limited number of possible temporary file names (usually 26) before file names will start being recycled. Third, the System V implementations of these functions (and of -.Xr mktemp ) +.Xr mktemp 3 ) use the .Xr access 2 function to determine whether or not the temporary file may be created. diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3 index 84680e27b411..d1b8208d521b 100644 --- a/lib/libc/stdlib/random.3 +++ b/lib/libc/stdlib/random.3 @@ -64,11 +64,16 @@ The period of this random number generator is very large, approximately .if n 16*((2**31)\(mi1). .Pp The -.Fn random Ns / Fn srandom -have (almost) the same calling sequence and initialization properties as -.Xr rand 3 Ns / Xr srand 3 . +.Fn random +and +.Fn srandom +functions have (almost) the same calling sequence and initialization properties as the +.Xr rand 3 +and +.Xr srand 3 +functions. The difference is that -.Xr rand +.Xr 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 .Fn random diff --git a/lib/libc/stdtime/ctime.3 b/lib/libc/stdtime/ctime.3 index ff6a8efd5967..1a6ba5a1b28e 100644 --- a/lib/libc/stdtime/ctime.3 +++ b/lib/libc/stdtime/ctime.3 @@ -89,9 +89,9 @@ environmental variable (see The function .Fn localtime uses -.Xr tzset +.Xr tzset 3 to initialize time conversion information if -.Xr tzset +.Xr tzset 3 has not already been called by the process. .Pp After filling in the tm structure, diff --git a/lib/libc/sys/_exit.2 b/lib/libc/sys/_exit.2 index 73e60627453a..12a5f7e0967d 100644 --- a/lib/libc/sys/_exit.2 +++ b/lib/libc/sys/_exit.2 @@ -53,7 +53,7 @@ This may entail delays, for example, waiting for output to drain; a process in this state may not be killed, as it is already dying. .It If the parent process of the calling process has an outstanding -.Xr wait +.Xr wait 2 call or catches the .Dv SIGCHLD diff --git a/lib/libc/sys/brk.2 b/lib/libc/sys/brk.2 index 7580f3855dbf..0cfca78a3486 100644 --- a/lib/libc/sys/brk.2 +++ b/lib/libc/sys/brk.2 @@ -94,7 +94,7 @@ it will not be possible to set the break beyond the .Em rlim_max value returned from a call to -.Xr getrlimit , +.Xr getrlimit 2 , e.g. .Dq qetext + rlp\(->rlim_max. (see @@ -114,7 +114,7 @@ otherwise -1 with .Va errno set to indicate why the allocation failed. .Sh ERRORS -.Xr Sbrk +.Fn Sbrk will fail and no additional memory will be allocated if one of the following are true: .Bl -tag -width [ENOMEM] @@ -139,7 +139,7 @@ Setting the break may fail due to a temporary lack of swap space. It is not possible to distinguish this from a failure caused by exceeding the maximum size of the data segment without consulting -.Xr getrlimit . +.Xr getrlimit 2 . .Sh HISTORY A .Nm diff --git a/lib/libc/sys/close.2 b/lib/libc/sys/close.2 index 3cb3d51d3b74..3a64dac01887 100644 --- a/lib/libc/sys/close.2 +++ b/lib/libc/sys/close.2 @@ -78,7 +78,7 @@ of the descriptors can be rearranged with or deleted with .Fn close before the -.Xr execve +.Xr execve 2 is attempted, but if some of these descriptors will still be needed if the execve fails, it is necessary to arrange for them to be closed if the execve succeeds. diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2 index 37fbb34e233d..87b97f076333 100644 --- a/lib/libc/sys/fcntl.2 +++ b/lib/libc/sys/fcntl.2 @@ -128,9 +128,9 @@ flags are as follows: .Bl -tag -width O_NONBLOCKX .It Dv O_NONBLOCK Non-blocking I/O; if no data is available to a -.Xr read +.Xr read 2 call, or if a -.Xr write +.Xr write 2 operation would block, the read or write call returns -1 with the error .Er EAGAIN . diff --git a/lib/libc/sys/fork.2 b/lib/libc/sys/fork.2 index 0c290f69bd1c..b8d465a0892d 100644 --- a/lib/libc/sys/fork.2 +++ b/lib/libc/sys/fork.2 @@ -59,9 +59,9 @@ for instance, file pointers in file objects are shared between the child and the parent, so that an .Xr lseek 2 on a descriptor in the child process can affect a subsequent -.Xr read +.Xr read 2 or -.Xr write +.Xr write 2 by the parent. This descriptor copying is also used by the shell to establish standard input and output for newly created processes diff --git a/lib/libc/sys/getrlimit.2 b/lib/libc/sys/getrlimit.2 index 33c3ddd86557..42b9028dada9 100644 --- a/lib/libc/sys/getrlimit.2 +++ b/lib/libc/sys/getrlimit.2 @@ -60,7 +60,7 @@ parameter is one of the following: .Bl -tag -width RLIMIT_FSIZEAA .It Li RLIMIT_CORE The largest size (in bytes) -.Xr core +.Xr core 5 file that may be created. .It Li RLIMIT_CPU The maximum amount of cpu time (in seconds) to be used by diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2 index ee0ab7289fef..55098bc413fa 100644 --- a/lib/libc/sys/getsockopt.2 +++ b/lib/libc/sys/getsockopt.2 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)getsockopt.2 8.3 (Berkeley) 4/19/94 -.\" $Id: getsockopt.2,v 1.3 1996/01/22 00:01:59 julian Exp $ +.\" $Id: getsockopt.2,v 1.4 1996/02/11 22:34:21 mpp Exp $ .\" .Dd November 3, 1995 .Dt GETSOCKOPT 2 @@ -190,7 +190,7 @@ is performed. If the socket promises reliable delivery of data and .Dv SO_LINGER is set, the system will block the process on the -.Xr close +.Xr close 2 attempt until it is able to transmit the data or until it decides it is unable to deliver the information (a timeout period, termed the linger interval, is specified in the @@ -201,7 +201,7 @@ is requested). If .Dv SO_LINGER is disabled and a -.Xr close +.Xr close 2 is issued, the system will process the close in a manner that allows the process to continue as quickly as possible. .Pp @@ -215,9 +215,9 @@ With protocols that support out-of-band data, the option requests that out-of-band data be placed in the normal data input queue as received; it will then be accessible with -.Xr recv +.Xr recv 2 or -.Xr read +.Xr read 2 calls without the .Dv MSG_OOB flag. diff --git a/lib/libc/sys/intro.2 b/lib/libc/sys/intro.2 index 070e4974f32c..79aad8a8a6b6 100644 --- a/lib/libc/sys/intro.2 +++ b/lib/libc/sys/intro.2 @@ -497,7 +497,7 @@ as the group, but is in a different process group. Note that when a process exits, the parent process for its children is changed to be -.Xr init , +.Nm init , which is in a separate session. Not all members of an orphaned process group are necessarily orphaned processes (those whose creating process has exited). diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index 479a20944ac7..bb7526250cb4 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -136,7 +136,7 @@ When a new file is created it is given the group of the directory which contains it. .Pp The new descriptor is set to remain open across -.Xr execve +.Xr execve 2 system calls; see .Xr close 2 and diff --git a/lib/libc/sys/rfork.2 b/lib/libc/sys/rfork.2 index 6158f51fd5df..9a86371b8563 100644 --- a/lib/libc/sys/rfork.2 +++ b/lib/libc/sys/rfork.2 @@ -82,7 +82,7 @@ will sleep, if necessary, until required process resources are available. .Pp .Fn Fork can be implemented as a call to -.Xr rfork "RFFDG|RFPROC" +.Fn rfork "RFFDG|RFPROC" but isn't for backwards compatibility. .Sh ERRORS .Fn Rfork diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2 index 27bc183ddeb0..51a5b2e5ff4b 100644 --- a/lib/libc/sys/stat.2 +++ b/lib/libc/sys/stat.2 @@ -256,7 +256,7 @@ depend on the time stamps being contiguous (in calls to .Xr symlink 7 .Sh BUGS Applying -.Xr fstat +.Fn fstat to a socket (and thus to a pipe) returns a zeroed buffer, except for the blocksize field, diff --git a/lib/libc/sys/utimes.2 b/lib/libc/sys/utimes.2 index 1ebeb37eecd9..125b6193c637 100644 --- a/lib/libc/sys/utimes.2 +++ b/lib/libc/sys/utimes.2 @@ -82,7 +82,7 @@ and the effective user ID of the process does not match the owner of the file, and is not the super-user, and write access is denied. .It Bq Er EFAULT -.Xr File +.Fa File or .Fa times points outside the process's allocated address space. diff --git a/lib/libc/sys/vfork.2 b/lib/libc/sys/vfork.2 index b708bde6ea16..0d0dbf02d3be 100644 --- a/lib/libc/sys/vfork.2 +++ b/lib/libc/sys/vfork.2 @@ -57,7 +57,7 @@ control until a call to .Xr execve 2 or an exit (either by a call to .Xr exit 3 -or abnormally.) +or abnormally). The parent process is suspended while the child is using its resources. .Pp .Fn Vfork @@ -66,7 +66,7 @@ the parent's context. .Pp .Fn Vfork can normally be used just like -.Xr fork . +.Xr fork 2 . It does not work, however, to return while running in the childs context from the procedure that called .Fn vfork