diff --git a/man3/addseverity.3 b/man3/addseverity.3 index cc8a5fc07..db965aa3c 100644 --- a/man3/addseverity.3 +++ b/man3/addseverity.3 @@ -51,7 +51,7 @@ New severity classes can also be added by setting the environment variable .SH "CONFORMING TO" This function is not specified in the X/Open Portability Guide although the -.BR fmtmsg () +.BR fmtmsg (3) function is. It is available on System V systems. diff --git a/man3/adjtime.3 b/man3/adjtime.3 index debe728ee..82d9ad5ae 100644 --- a/man3/adjtime.3 +++ b/man3/adjtime.3 @@ -30,7 +30,7 @@ adjtime \- correct the time to synchronise the system clock The .BR adjtime () function gradually adjusts the system clock (as returned by -.BR gettimeofday ()). +.BR gettimeofday (2)). The amount of time by which the clock is to be adjusted is specified in the structure pointed to by .IR delta . diff --git a/man3/asprintf.3 b/man3/asprintf.3 index 55a4d193f..9db724c8b 100644 --- a/man3/asprintf.3 +++ b/man3/asprintf.3 @@ -39,9 +39,9 @@ The functions and .BR vasprintf () are analogues of -.BR sprintf () +.BR sprintf (3) and -.BR vsprintf (), +.BR vsprintf (3), except that they allocate a string large enough to hold the output including the terminating null byte, and return a pointer to it via the first parameter. diff --git a/man3/assert.3 b/man3/assert.3 index ecd168d42..75dbac4f5 100644 --- a/man3/assert.3 +++ b/man3/assert.3 @@ -43,7 +43,7 @@ Otherwise, the macro .BR assert () prints an error message to standard error and terminates the program by calling -.BR abort () +.BR abort (3) if .I expression is false (i.e., compares equal to zero). diff --git a/man3/assert_perror.3 b/man3/assert_perror.3 index f8c039119..1eae80a5b 100644 --- a/man3/assert_perror.3 +++ b/man3/assert_perror.3 @@ -45,7 +45,7 @@ Otherwise, the macro .BR assert_perror () prints an error message to standard error and terminates the program by calling -.BR abort () +.BR abort (3) if .I errnum is non-zero. diff --git a/man3/atexit.3 b/man3/atexit.3 index 995d1f061..79f7e9dfa 100644 --- a/man3/atexit.3 +++ b/man3/atexit.3 @@ -51,7 +51,7 @@ The actual limit supported by an implementation can be obtained using .BR sysconf (3). .LP When a child process is created via -.BR fork (), +.BR fork (2), it inherits copies of its parents registrations. Upon a successful call to one of the .BR exec () @@ -90,11 +90,11 @@ main(void) } .fi .SH NOTES -Since glibc 2.2.3, \fBatexit\fP() (and \fBon_exit\fP()) +Since glibc 2.2.3, \fBatexit\fP() (and \fBon_exit\fP(3)) can be used to within a shared library to establish functions that are called when the shared library is unloaded. .PP -Functions registered using \fBatexit\fP() (and \fBon_exit\fP()) +Functions registered using \fBatexit\fP() (and \fBon_exit\fP(3)) are not called if a process terminates abnormally because of the delivery of a signal. .SH "CONFORMING TO" diff --git a/man3/bcmp.3 b/man3/bcmp.3 index f120f9706..a05e7ed8d 100644 --- a/man3/bcmp.3 +++ b/man3/bcmp.3 @@ -59,7 +59,7 @@ otherwise a non-zero result is returned. .SH "CONFORMING TO" 4.3BSD. This function is deprecated (marked as LEGACY in POSIX.1-2001): use -.BR memcmp () +.BR memcmp (3) in new programs. .SH "SEE ALSO" .BR memcmp (3), diff --git a/man3/bcopy.3 b/man3/bcopy.3 index f82ff92a6..616236aca 100644 --- a/man3/bcopy.3 +++ b/man3/bcopy.3 @@ -52,15 +52,15 @@ None. .SH "CONFORMING TO" 4.3BSD. This function is deprecated (marked as LEGACY in POSIX.1-2001): use -.BR memcpy () +.BR memcpy (3) or -.BR memmove () +.BR memmove (3) in new programs. Note that the first two parameters are interchanged for -.BR memcpy () +.BR memcpy (3) and -.BR memmove (). +.BR memmove (3). .SH "SEE ALSO" .BR memccpy (3), .BR memcpy (3), diff --git a/man3/btree.3 b/man3/btree.3 index c60e80bb4..e3fb2f830 100644 --- a/man3/btree.3 +++ b/man3/btree.3 @@ -44,7 +44,7 @@ btree \- btree database access method .fi .SH DESCRIPTION The routine -.BR dbopen () +.BR dbopen (3) is the library interface to database files. One of the supported file formats is btree files. The general description of the database access methods is in @@ -55,7 +55,7 @@ The btree data structure is a sorted, balanced tree structure storing associated key/data pairs. .PP The btree access method specific data structure provided to -.BR dbopen () +.BR dbopen (3) is defined in the include file as follows: .PP typedef struct { diff --git a/man3/bzero.3 b/man3/bzero.3 index c7f3555d9..84620ea97 100644 --- a/man3/bzero.3 +++ b/man3/bzero.3 @@ -48,7 +48,7 @@ None. .SH "CONFORMING TO" 4.3BSD. This function is deprecated (marked as LEGACY in POSIX.1-2001): use -.BR memset () +.BR memset (3) in new programs. .SH "SEE ALSO" .BR memset (3), diff --git a/man3/catopen.3 b/man3/catopen.3 index a688b665f..adef756d7 100644 --- a/man3/catopen.3 +++ b/man3/catopen.3 @@ -39,7 +39,7 @@ opens a message catalog and returns a catalog descriptor. The descriptor remains valid until .BR catclose () or -.BR exec (). +.BR execve (2). If a file descriptor is used to implement catalog descriptors then the FD_CLOEXEC flag will be set. .LP @@ -115,7 +115,7 @@ and sets to indicate the error. The possible error values include all possible values for the -.BR open () +.BR open (2) call. .LP The function @@ -145,7 +145,7 @@ These functions are available for Linux since libc 4.4.4c. In the case of linux libc4 and libc5, the catalog descriptor .I nl_catd is a -.BR mmap ()'ed +.BR mmap (2)'ed area of memory and not a file descriptor. The .I flag diff --git a/man3/cfree.3 b/man3/cfree.3 index ee468316e..ff12f6220 100644 --- a/man3/cfree.3 +++ b/man3/cfree.3 @@ -72,13 +72,13 @@ If you need it while porting something, add to your file. .LP A frequently asked question is "Can I use -.BR free () +.BR free (3) to free memory allocated with -.BR calloc (), +.BR calloc (3), or do I need .BR cfree ()?" Answer: use -.BR free (). +.BR free (3). .LP An SCO manual writes: "The cfree routine is provided for compliance to the iBCSe2 standard and simply calls free. @@ -88,7 +88,7 @@ arguments to cfree are not used." The SunOS version of .BR cfree () (which is a synonym for -.BR free ()) +.BR free (3)) returns 1 on success and 0 on failure. In case of error, .I errno diff --git a/man3/clearenv.3 b/man3/clearenv.3 index a12345af0..c554c516c 100644 --- a/man3/clearenv.3 +++ b/man3/clearenv.3 @@ -46,11 +46,11 @@ In glibc since glibc 2.0. .SH "CONFORMING TO" Various Unix variants (DG/UX, HP-UX, QNX, ...). POSIX.9 (bindings for FORTRAN77). -POSIX.1-1996 did not accept \fBclearenv\fP() and \fIputenv\fP(), +POSIX.1-1996 did not accept \fBclearenv\fP() and \fIputenv\fP(3), but changed its mind and scheduled these functions for some later issue of this standard (cf. B.4.6.1). However, POSIX.1-2001 -only adds \fIputenv\fP(), and rejected \fBclearenv\fP(). +only adds \fIputenv\fP(3), and rejected \fBclearenv\fP(). .SH NOTES Used in security-conscious applications. If it is unavailable @@ -65,8 +65,8 @@ will probably do. The DG/UX and Tru64 manpages write: If .I environ has been modified by anything other than the -.BR putenv (), -.BR getenv (), +.BR putenv (3), +.BR getenv (3), or .BR clearenv () functions, then diff --git a/man3/clock.3 b/man3/clock.3 index 93f83fbb4..b25d2ba23 100644 --- a/man3/clock.3 +++ b/man3/clock.3 @@ -64,7 +64,7 @@ the value returned by .BR clock () also includes the times of any children whose status has been collected via -.BR wait () +.BR wait (2) (or another wait-type call). Linux does not include the times of waited-for children in the value returned by @@ -74,7 +74,7 @@ value returned by .\" POSIX.1-2001 doesn't explicitly allow this, nor is there an .\" explicit prohibition. -- MTK The -.BR times () +.BR times (2) function, which explicitly returns (separate) information about the caller and its children, may be preferable. .SH "SEE ALSO" diff --git a/man3/daemon.3 b/man3/daemon.3 index d10c4dfe4..b27b6d2c7 100644 --- a/man3/daemon.3 +++ b/man3/daemon.3 @@ -58,7 +58,7 @@ will redirect standard input, standard output and standard error to \fI/dev/null\fP. .SH "RETURN VALUE" (This function forks, and if the -.BR fork () +.BR fork (2) succeeds, the parent does .\" not .IR in order not to underline _ .BR _exit (0), diff --git a/man3/dprintf.3 b/man3/dprintf.3 index e17cc6b91..83e4e98d7 100644 --- a/man3/dprintf.3 +++ b/man3/dprintf.3 @@ -39,9 +39,9 @@ The functions and .BR vdprintf () (as found in the glibc2 library) are exact analogues of -.BR fprintf () +.BR fprintf (3) and -.BR vfprintf (), +.BR vfprintf (3), except that they output to a file descriptor .I fd instead of to a given stream. @@ -51,7 +51,7 @@ Clearly, the names were badly chosen. Many systems (like MacOS) have incompatible functions called .BR dprintf (), usually some debugging version of -.BR printf (), +.BR printf (3), perhaps with a prototype like .BI "void dprintf(int level, const char *" format ", ...);" @@ -67,7 +67,7 @@ So, probably, it is better to avoid this function in programs intended to be portable. A better name would have been -.BR fdprintf (). +.BR fdprintf (3). .SH "CONFORMING TO" These functions are GNU extensions. .SH "SEE ALSO" diff --git a/man3/ecvt.3 b/man3/ecvt.3 index 99258b877..1eafca785 100644 --- a/man3/ecvt.3 +++ b/man3/ecvt.3 @@ -69,7 +69,7 @@ The static string is overwritten by each call to \fBecvt\fP() or .SH NOTES These functions are obsolete. Instead, -.BR sprintf () +.BR sprintf (3) is recommended. Linux libc4 and libc5 specified the type of .I ndigits diff --git a/man3/ecvt_r.3 b/man3/ecvt_r.3 index fdcffbb3d..501c76b19 100644 --- a/man3/ecvt_r.3 +++ b/man3/ecvt_r.3 @@ -71,7 +71,7 @@ These functions return 0 on success, and \-1 otherwise. .SH NOTES These functions are obsolete. Instead, -.BR sprintf () +.BR sprintf (3) is recommended. .SH "CONFORMING TO" These functions are GNU extensions. diff --git a/man3/errno.3 b/man3/errno.3 index e75fb4ce7..ecefe803f 100644 --- a/man3/errno.3 +++ b/man3/errno.3 @@ -482,7 +482,7 @@ where no longer needs to have the value it had upon return from .IR somecall () (i.e., it may have been changed by the -.BR printf ()). +.BR printf (3)). If the value of .I errno should be preserved across a library call, it must be saved: diff --git a/man3/euidaccess.3 b/man3/euidaccess.3 index c91bbcaf9..f21a5ec0d 100644 --- a/man3/euidaccess.3 +++ b/man3/euidaccess.3 @@ -35,12 +35,12 @@ euidaccess, eaccess \- check effective user's permissions for a file .fi .SH DESCRIPTION Like -.BR access (), +.BR access (2), .BR euidaccess () checks permissions and existence of the file identified by its argument .IR pathname . However, whereas -.BR access (), +.BR access (2), performs checks using the real user and group identifiers of the process, .BR euidaccess () uses the effective identifiers. @@ -49,7 +49,7 @@ uses the effective identifiers. is a mask consisting of one or more of .BR R_OK ", " W_OK ", " X_OK " and " F_OK , with the same meanings as for -.BR access (). +.BR access (2). .BR eaccess () is a synonym for @@ -65,7 +65,7 @@ asked for a permission that is denied, or some other error occurred), is set appropriately. .SH ERRORS As for -.BR access (). +.BR access (2). .SH "CONFORMING TO" These functions are non-standard. Some other systems have an diff --git a/man3/exec.3 b/man3/exec.3 index 74be7162a..a02b63eb6 100644 --- a/man3/exec.3 +++ b/man3/exec.3 @@ -64,7 +64,7 @@ The functions described in this manual page are front-ends for the function .BR execve (2). (See the manual page for -.BR execve () +.BR 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 is diff --git a/man3/exit.3 b/man3/exit.3 index 743dc7c11..4dca002d3 100644 --- a/man3/exit.3 +++ b/man3/exit.3 @@ -36,16 +36,16 @@ value of \fIstatus & 0377\fP is returned to the parent .BR wait (2)). .LP All functions registered with -\fBatexit\fP() and \fBon_exit\fP() +\fBatexit\fP(3) and \fBon_exit\fP(3) are called, in the reverse order of their registration. (It is possible for one of these functions to use -\fBatexit\fP() or \fBon_exit\fP() to register an additional +\fBatexit\fP(3) or \fBon_exit\fP(3) to register an additional function to be executed during exit processing; the new registration is added to the front of the list of functions that remain to be called.) .LP All open streams are flushed and closed. -Files created by \fBtmpfile\fP() are removed. +Files created by \fBtmpfile\fP(3) are removed. .LP The C standard specifies two constants, \fIEXIT_SUCCESS\fP and \fIEXIT_FAILURE\fP, @@ -58,8 +58,8 @@ SVr4, 4.3BSD, POSIX.1-2001, C89, C99. .SH NOTES .LP It is undefined what happens if one of the -functions registered using \fBatexit\fP() and \fBon_exit\fP() -calls either \fBexit\fP() or \fBlongjmp\fP(). +functions registered using \fBatexit\fP(3) and \fBon_exit\fP(3) +calls either \fBexit\fP() or \fBlongjmp\fP(3). .LP The use of EXIT_SUCCESS and EXIT_FAILURE is slightly more portable (to non-Unix environments) than that of 0 and some non-zero value @@ -84,7 +84,7 @@ it is not interested in the exit status, but is not waiting, the exiting process turns into a "zombie" process (which is nothing but a container for the single byte representing the exit status) so that the parent can learn the exit status when -it later calls one of the \fIwait\fP() functions. +it later calls one of the \fIwait\fP(2) functions. .LP If the implementation supports the SIGCHLD signal, this signal is sent to the parent. diff --git a/man3/fgetwc.3 b/man3/fgetwc.3 index 9b4d3df41..948c967c7 100644 --- a/man3/fgetwc.3 +++ b/man3/fgetwc.3 @@ -42,8 +42,8 @@ There is no reason ever to use it. For non-locking counterparts, see .BR unlocked_stdio (3). .SH "RETURN VALUE" -The \fBfgetwc\fP() function returns the next wide-character from the stream, or -WEOF. +The \fBfgetwc\fP() function returns the next wide-character +from the stream, or WEOF. .SH ERRORS Apart from the usual ones, there is .TP @@ -57,7 +57,7 @@ The behaviour of \fBfgetwc\fP() depends on the LC_CTYPE category of the current locale. .PP In the absence of additional information passed to the -.BR fopen () +.BR fopen (3) call, it is reasonable to expect that \fBfgetwc\fP() will actually read a multibyte sequence diff --git a/man3/fgetws.3 b/man3/fgetws.3 index dd3b086ed..2027e283d 100644 --- a/man3/fgetws.3 +++ b/man3/fgetws.3 @@ -47,7 +47,7 @@ The behaviour of \fBfgetws\fP() depends on the LC_CTYPE category of the current locale. .PP In the absence of additional information passed to the -.BR fopen () +.BR fopen (3) call, it is reasonable to expect that \fBfgetws\fP() will actually read a multibyte string diff --git a/man3/flockfile.3 b/man3/flockfile.3 index 2e2506b5d..5cc2ffb6b 100644 --- a/man3/flockfile.3 +++ b/man3/flockfile.3 @@ -63,8 +63,8 @@ other threads from coming in between. If the reason for doing this was to achieve greater efficiency, one does the I/O with the non-locking versions of the stdio functions: with -\fIgetc_unlocked\fP() and \fIputc_unlocked\fP() instead of -\fIgetc\fP() and \fIputc\fP(). +\fIgetc_unlocked\fP(3) and \fIputc_unlocked\fP(3) instead of +\fIgetc\fP(3) and \fIputc\fP(3). .LP The \fBflockfile\fP() function waits for *\fIfilehandle\fP to be no longer locked by a different thread, then makes the diff --git a/man3/fmtmsg.3 b/man3/fmtmsg.3 index b5a447b7f..119beb8fe 100644 --- a/man3/fmtmsg.3 +++ b/man3/fmtmsg.3 @@ -139,7 +139,7 @@ This value is printed as INFO. .PP The numeric values are between 0 and 4. Using -.BR addseverity () +.BR addseverity (3) or the environment variable .B SEV_LEVEL you can add more levels and strings to print. @@ -217,7 +217,7 @@ Error writing to the console. The functions .BR fmtmsg () and -.BR addseverity (), +.BR addseverity (3), and environment variables .B MSGVERB and diff --git a/man3/fopen.3 b/man3/fopen.3 index 6a08e9dc5..7a7fae1ab 100644 --- a/man3/fopen.3 +++ b/man3/fopen.3 @@ -116,9 +116,9 @@ between output and input, unless an input operation encounters end-of-file. result of writes other than the most recent.) Therefore it is good practice (and indeed sometimes necessary under Linux) to put an -.BR fseek () +.BR fseek (3) or -.BR fgetpos () +.BR fgetpos (3) operation between write and read operations on such a stream. This operation may be an apparent no-op (as in \fIfseek(..., 0L, SEEK_CUR)\fR called for its synchronizing side effect. diff --git a/man3/fpurge.3 b/man3/fpurge.3 index 5a94cc5ff..5467c9af6 100644 --- a/man3/fpurge.3 +++ b/man3/fpurge.3 @@ -45,7 +45,7 @@ For output streams this discards any unwritten output. For input streams this discards any input read from the underlying object but not yet obtained via .BR getc (3); -this includes any text pushed back via \fIungetc\fP(). See also +this includes any text pushed back via \fIungetc\fP(3). See also .BR fflush (3). .LP The function diff --git a/man3/fputwc.3 b/man3/fputwc.3 index 6a922281a..219883cbe 100644 --- a/man3/fputwc.3 +++ b/man3/fputwc.3 @@ -55,7 +55,7 @@ The behaviour of \fBfputwc\fP() depends on the LC_CTYPE category of the current locale. .PP In the absence of additional information passed to the -.BR fopen () +.BR fopen (3) call, it is reasonable to expect that \fBfputwc\fP() will actually write the multibyte sequence corresponding to the wide character \fIwc\fP. diff --git a/man3/fputws.3 b/man3/fputws.3 index ec2ffc6f1..2fcfc7984 100644 --- a/man3/fputws.3 +++ b/man3/fputws.3 @@ -39,7 +39,7 @@ The behaviour of \fBfputws\fP() depends on the LC_CTYPE category of the current locale. .PP In the absence of additional information passed to the -.BR fopen () +.BR fopen (3) call, it is reasonable to expect that \fBfputws\fP() will actually write the multibyte string corresponding to the wide-character string \fIws\fP. diff --git a/man3/fseeko.3 b/man3/fseeko.3 index 94845f97f..fa1f0423e 100644 --- a/man3/fseeko.3 +++ b/man3/fseeko.3 @@ -34,7 +34,7 @@ fseeko, ftello \- seek to or report file position .fi .SH DESCRIPTION The \fBfseeko\fP() and \fBftello\fP() functions are identical to -\fBfseek\fP() and \fBftell\fP() (see +\fBfseek\fP(3) and \fBftell\fP(3) (see .BR fseek (3)), respectively, except that the \fIoffset\fP argument of \fBfseeko\fP() and the return value of \fBftello\fP() is of type \fIoff_t\fP diff --git a/man3/fwide.3 b/man3/fwide.3 index f514c17d7..7f0c695a3 100644 --- a/man3/fwide.3 +++ b/man3/fwide.3 @@ -56,7 +56,7 @@ C99, POSIX.1-2001. .BR fwprintf (3) .SH NOTES Wide-character output to a byte oriented stream can be performed through the -\fBfprintf\fP() function with the %lc and %ls directives. +\fBfprintf\fP(3) function with the %lc and %ls directives. .PP Char oriented output to a wide-character oriented stream can be performed -through the \fBfwprintf\fP() function with the %c and %s directives. +through the \fBfwprintf\fP(3) function with the %c and %s directives. diff --git a/man3/gcvt.3 b/man3/gcvt.3 index f8e9d8127..4a167ec49 100644 --- a/man3/gcvt.3 +++ b/man3/gcvt.3 @@ -43,7 +43,7 @@ F format or E format. .SH NOTES This function is obsolete. Instead, -.BR sprintf () +.BR sprintf (3) is recommended. .SH "RETURN VALUE" The \fBgcvt\fP() function returns the address of the string pointed to diff --git a/man3/getcwd.3 b/man3/getcwd.3 index 19f826f06..200ce372e 100644 --- a/man3/getcwd.3 +++ b/man3/getcwd.3 @@ -73,7 +73,7 @@ is undefined. As an extension to the POSIX.1-2001 standard, Linux (libc4, libc5, glibc) .BR getcwd () allocates the buffer dynamically using -.BR malloc () +.BR malloc (3) if .I buf is NULL on call. @@ -86,7 +86,7 @@ is zero, when is allocated as big as necessary. It is possible (and, indeed, advisable) to -.BR free () +.BR free (3) the buffers if they have been obtained this way. .BR get_current_dir_name (), diff --git a/man3/getdate.3 b/man3/getdate.3 index 7db8675fe..68cbd6a42 100644 --- a/man3/getdate.3 +++ b/man3/getdate.3 @@ -141,7 +141,7 @@ values as given above for .IR getdate_err . .LP The POSIX.1-2001 specification for -.BR strptime () +.BR strptime (3) contains conversion specifications using the .B %E or @@ -151,7 +151,7 @@ modifier, while such specifications are not given for The glibc implementation implements .BR getdate () using -.BR strptime () +.BR strptime (3) so that automatically precisely the same conversions are supported by both. .LP The glibc implementation does not support the @@ -163,7 +163,7 @@ conversion specification. File containing format patterns. .TP .BR TZ ", " LC_TIME -Variables used by \fBstrptime\fP(). +Variables used by \fBstrptime\fP(3). .SH "CONFORMING TO" POSIX.1-2001 .SH "SEE ALSO" diff --git a/man3/getline.3 b/man3/getline.3 index 2ad990bb7..0acf8aeed 100644 --- a/man3/getline.3 +++ b/man3/getline.3 @@ -52,14 +52,14 @@ Alternatively, before calling .BR getline (), .IR "*lineptr" can contain a pointer to a -.BR malloc ()\-allocated +.BR malloc (3)\-allocated buffer .IR "*n" bytes in size. If the buffer is not large enough to hold the line, .BR getline () resizes it with -.BR realloc (), +.BR realloc (3), updating .IR "*lineptr" and diff --git a/man3/getpw.3 b/man3/getpw.3 index d3054ef12..5424d30f2 100644 --- a/man3/getpw.3 +++ b/man3/getpw.3 @@ -80,7 +80,7 @@ The function is dangerous as it may overflow the provided buffer .IR buf . It is obsoleted by -.BR getpwuid (). +.BR getpwuid (3). .SH "SEE ALSO" .BR endpwent (3), .BR fgetpwent (3), diff --git a/man3/getsubopt.3 b/man3/getsubopt.3 index 6fd2a5c33..ec28334dd 100644 --- a/man3/getsubopt.3 +++ b/man3/getsubopt.3 @@ -56,7 +56,7 @@ that might be passed in The .I tokens argument is pointer to a NULL-terminated list of the tokens that -.BR getsupobts () +.BR getsubopt () will look for in .IR optionp . The tokens should be distinct, null-terminated strings containing at diff --git a/man3/getumask.3 b/man3/getumask.3 index e6367162c..ae9483d05 100644 --- a/man3/getumask.3 +++ b/man3/getumask.3 @@ -49,7 +49,7 @@ mode_t getumask(void) .in -0.5i except that it is documented to be thread-safe (that is, shares a lock with the -.BR umask () +.BR umask (2) library call). .SH NOTES This function is documented but not implemented yet in glibc 2.2.5. diff --git a/man3/getutent.3 b/man3/getutent.3 index ff41e91c0..9848338e4 100644 --- a/man3/getutent.3 +++ b/man3/getutent.3 @@ -120,9 +120,9 @@ The following example adds and removes a utmp record, assuming it is run from within a pseudo terminal. For usage in a real application, you should check the return values of -.BR getpwuid () +.BR getpwuid (3) and -.BR ttyname (). +.BR ttyname (3). .PP .nf #include diff --git a/man3/getwchar.3 b/man3/getwchar.3 index 479801654..06d348b38 100644 --- a/man3/getwchar.3 +++ b/man3/getwchar.3 @@ -23,7 +23,7 @@ getwchar \- read a wide character from standard input .fi .SH DESCRIPTION The \fBgetwchar\fP() function is the wide-character equivalent of the -\fBgetchar\fP() function. +\fBgetchar\fP(3) function. It reads a wide character from \fBstdin\fP and returns it. If the end of stream is reached, or if \fIferror(stdin)\fP becomes @@ -42,8 +42,9 @@ C99 The behaviour of \fBgetwchar\fP() depends on the LC_CTYPE category of the current locale. .PP -It is reasonable to expect that \fBgetwchar\fP() will actually read a multibyte -sequence from standard input and then convert it to a wide character. +It is reasonable to expect that \fBgetwchar\fP() will actually +read a multibyte sequence from standard input and then +convert it to a wide character. .SH "SEE ALSO" .BR fgetwc (3), .BR unlocked_stdio (3) diff --git a/man3/gsignal.3 b/man3/gsignal.3 index 32e1160a3..aae5efea6 100644 --- a/man3/gsignal.3 +++ b/man3/gsignal.3 @@ -38,9 +38,9 @@ gsignal, ssignal \- software signal facility Don't use these functions under Linux. Due to a historical mistake, under Linux these functions are aliases for -.BR raise () +.BR raise (3) and -.BR signal (), +.BR signal (2), respectively. .LP Elsewhere, on System V-like systems, these functions implement diff --git a/man3/ilogb.3 b/man3/ilogb.3 index 1ed02ff3d..9b7ba1755 100644 --- a/man3/ilogb.3 +++ b/man3/ilogb.3 @@ -40,7 +40,7 @@ These functions return the exponent part of their argument as a signed integer. When no error occurs, these functions are equivalent to the corresponding -.BR logb () +.BR logb (3) functions, cast to (int). An error will occur for zero and infinity and NaN, and possibly for overflow. diff --git a/man3/iswalpha.3 b/man3/iswalpha.3 index e2eb50923..947c91858 100644 --- a/man3/iswalpha.3 +++ b/man3/iswalpha.3 @@ -22,7 +22,7 @@ iswalpha \- test for alphabetic wide character .fi .SH DESCRIPTION The \fBiswalpha\fP() function is the wide-character equivalent of the -\fBisalpha\fP() function. +\fBisalpha\fP(3) function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "alpha". .PP diff --git a/man3/iswblank.3 b/man3/iswblank.3 index 68e16ef5c..f189bd643 100644 --- a/man3/iswblank.3 +++ b/man3/iswblank.3 @@ -22,7 +22,7 @@ iswblank \- test for whitespace wide character .fi .SH DESCRIPTION The \fBiswblank\fP() function is the wide-character equivalent of the -\fBisblank\fP() function. +\fBisblank\fP(3) function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "blank". .PP diff --git a/man3/iswcntrl.3 b/man3/iswcntrl.3 index c1448620d..ee340a083 100644 --- a/man3/iswcntrl.3 +++ b/man3/iswcntrl.3 @@ -22,7 +22,7 @@ iswcntrl \- test for control wide character .fi .SH DESCRIPTION The \fBiswcntrl\fP() function is the wide-character equivalent of the -\fBiscntrl\fP() function. +\fBiscntrl\fP(3) function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "cntrl". .PP diff --git a/man3/iswdigit.3 b/man3/iswdigit.3 index 7a45f08f8..65a48dd4a 100644 --- a/man3/iswdigit.3 +++ b/man3/iswdigit.3 @@ -22,7 +22,7 @@ iswdigit \- test for decimal digit wide character .fi .SH DESCRIPTION The \fBiswdigit\fP() function is the wide-character equivalent of the -\fBisdigit\fP() function. +\fBisdigit\fP(3) function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "digit". .PP diff --git a/man3/iswgraph.3 b/man3/iswgraph.3 index 9aa1f8f74..6045edbf3 100644 --- a/man3/iswgraph.3 +++ b/man3/iswgraph.3 @@ -22,7 +22,7 @@ iswgraph \- test for graphic wide character .fi .SH DESCRIPTION The \fBiswgraph\fP() function is the wide-character equivalent of the -\fBisgraph\fP() function. +\fBisgraph\fP(3) function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "graph". .PP diff --git a/man3/iswlower.3 b/man3/iswlower.3 index 8d95a1ecd..f7f9f03b0 100644 --- a/man3/iswlower.3 +++ b/man3/iswlower.3 @@ -22,7 +22,7 @@ iswlower \- test for lowercase wide character .fi .SH DESCRIPTION The \fBiswlower\fP() function is the wide-character equivalent of the -\fBislower\fP() function. +\fBislower\fP(3) function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "lower". .PP diff --git a/man3/iswprint.3 b/man3/iswprint.3 index 38b2052b8..7b082ac8b 100644 --- a/man3/iswprint.3 +++ b/man3/iswprint.3 @@ -22,7 +22,7 @@ iswprint \- test for printing wide character .fi .SH DESCRIPTION The \fBiswprint\fP() function is the wide-character equivalent of the -\fBisprint\fP() function. +\fBisprint\fP(3) function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "print". .PP diff --git a/man3/iswpunct.3 b/man3/iswpunct.3 index 1357b757e..0d4f85a6a 100644 --- a/man3/iswpunct.3 +++ b/man3/iswpunct.3 @@ -22,7 +22,7 @@ iswpunct \- test for punctuation or symbolic wide character .fi .SH DESCRIPTION The \fBiswpunct\fP() function is the wide-character equivalent of the -\fBispunct\fP() function. +\fBispunct\fP(3) function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "punct". .PP diff --git a/man3/iswspace.3 b/man3/iswspace.3 index a1717212f..adac1eb56 100644 --- a/man3/iswspace.3 +++ b/man3/iswspace.3 @@ -22,7 +22,7 @@ iswspace \- test for whitespace wide character .fi .SH DESCRIPTION The \fBiswspace\fP() function is the wide-character equivalent of the -\fBisspace\fP() function. +\fBisspace\fP(3) function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "space". .PP diff --git a/man3/iswupper.3 b/man3/iswupper.3 index 3aaba77c8..aaf6f0e15 100644 --- a/man3/iswupper.3 +++ b/man3/iswupper.3 @@ -22,7 +22,7 @@ iswupper \- test for uppercase wide character .fi .SH DESCRIPTION The \fBiswupper\fP() function is the wide-character equivalent of the -\fBisupper\fP() function. +\fBisupper\fP(3) function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "upper". .PP diff --git a/man3/iswxdigit.3 b/man3/iswxdigit.3 index d4dd5914d..3d29c6cb1 100644 --- a/man3/iswxdigit.3 +++ b/man3/iswxdigit.3 @@ -22,7 +22,7 @@ iswxdigit \- test for hexadecimal digit wide character .fi .SH DESCRIPTION The \fBiswxdigit\fP() function is the wide-character equivalent of the -\fBisxdigit\fP() function. +\fBisxdigit\fP(3) function. It tests whether \fIwc\fP is a wide character belonging to the wide-character class "xdigit". .PP diff --git a/man3/localeconv.3 b/man3/localeconv.3 index 8b136a2ad..0729df1df 100644 --- a/man3/localeconv.3 +++ b/man3/localeconv.3 @@ -51,7 +51,7 @@ which behave according to the actual locale in use. C89, C99. .SH BUGS The -.BR printf () +.BR printf (3) family of functions may or may not honor the current locale. .SH "SEE ALSO" .BR locale (1), diff --git a/man3/lockf.3 b/man3/lockf.3 index 049030f7a..2564b135e 100644 --- a/man3/lockf.3 +++ b/man3/lockf.3 @@ -53,7 +53,7 @@ On Linux, this call is just an interface for (In general, the relation between .BR lockf () and -.BR fcntl () +.BR fcntl (2) is unspecified.) .LP Valid operations are given below: diff --git a/man3/longjmp.3 b/man3/longjmp.3 index f8aadb83a..c93368baa 100644 --- a/man3/longjmp.3 +++ b/man3/longjmp.3 @@ -36,20 +36,21 @@ longjmp, siglongjmp \- non-local jump to a saved stack context .fi .ad b .SH DESCRIPTION -\fBlongjmp\fP() and \fBsetjmp\fP() are useful for dealing with errors +\fBlongjmp\fP() and \fBsetjmp\fP(3) are useful for dealing with errors and interrupts encountered in a low-level subroutine of a program. \fBlongjmp\fP() restores the environment saved by the last call of -\fBsetjmp\fP() with the corresponding \fIenv\fP argument. +\fBsetjmp\fP(3) with the corresponding \fIenv\fP argument. After \fBlongjmp\fP() is completed, program execution continues as if the -corresponding call of \fBsetjmp\fP() had just returned the value -\fIval\fP. \fBlongjmp\fP() cannot cause 0 to be returned. +corresponding call of \fBsetjmp\fP(3) had just returned the value +\fIval\fP. +\fBlongjmp\fP() cannot cause 0 to be returned. If \fBlongjmp\fP() is invoked with a second argument of 0, 1 will be returned instead. .P \fBsiglongjmp\fP() is similar to \fBlongjmp\fP() except for the type of its \fIenv\fP argument. -If the \fBsigsetjmp\fP() call that set this +If the \fBsigsetjmp\fP(3) call that set this \fIenv\fP used a non-zero \fIsavesigs\fP flag, \fBsiglongjmp\fP() also restores the set of blocked signals. .SH "RETURN VALUE" diff --git a/man3/makecontext.3 b/man3/makecontext.3 index 9d22d4be1..2c9e578ab 100644 --- a/man3/makecontext.3 +++ b/man3/makecontext.3 @@ -34,7 +34,7 @@ makecontext, swapcontext \- manipulate user context In a System V-like environment, one has the type \fIucontext_t\fP defined in .I and the four functions -\fBgetcontext\fP(), \fBsetcontext\fP(), \fBmakecontext\fP() +\fBgetcontext\fP(3), \fBsetcontext\fP(3), \fBmakecontext\fP() and \fBswapcontext\fP() that allow user-level context switching between multiple threads of control within a process. .LP @@ -42,13 +42,13 @@ For the type and the first two functions, see .BR getcontext (2). .LP The \fBmakecontext\fP() function modifies the context pointed to -by \fIucp\fP (which was obtained from a call to \fBgetcontext\fP()). +by \fIucp\fP (which was obtained from a call to \fBgetcontext\fP(3)). Before invoking \fBmakecontext\fP(), the caller must allocate a new stack for this context and assign its address to \fIucp->uc_stack\fP, and define a successor context and assign its address to \fIucp->uc_link\fP. -When this context is later activated (using \fBsetcontext\fP() or +When this context is later activated (using \fBsetcontext\fP(3) or \fBswapcontext\fP()) the function \fIfunc\fP is called, and passed the series of integer .RI ( int ) @@ -86,7 +86,7 @@ SUSv2, POSIX.1-2001. .SH EXAMPLE .PP The example program below demonstrates the use of -.BR getcontext (), +.BR getcontext (3), .BR makecontext (), and .BR swapcontext (). diff --git a/man3/malloc.3 b/man3/malloc.3 index eb695edc0..03c99f659 100644 --- a/man3/malloc.3 +++ b/man3/malloc.3 @@ -169,7 +169,7 @@ If is set to 0, any detected heap corruption is silently ignored; if set to 1, a diagnostic is printed on stderr; if set to 2, -.BR abort () +.BR abort (3) is called immediately. This can be useful because otherwise a crash may happen much later, and the true cause for the problem diff --git a/man3/malloc_hook.3 b/man3/malloc_hook.3 index f53b5d986..8ce32255f 100644 --- a/man3/malloc_hook.3 +++ b/man3/malloc_hook.3 @@ -30,10 +30,10 @@ __after_morecore_hook \- malloc debugging variables .BI "void (*__after_morecore_hook)(void);" .SH DESCRIPTION The GNU C library lets you modify the behavior of -.BR malloc (), -.BR realloc (), +.BR malloc (3), +.BR realloc (3), and -.BR free () +.BR free (3) by specifying appropriate hook functions. You can use these hooks to help you debug programs that use dynamic memory allocation, @@ -60,20 +60,20 @@ The four functions pointed to by .BR __memalign_hook , .BR __free_hook have a prototype like the functions -.BR malloc (), -.BR realloc (), -.BR memalign (), -.BR free (), +.BR malloc (3), +.BR realloc (3), +.BR memalign (3), +.BR free (3), respectively, except that they have a final argument .I caller that gives the address of the caller of -.BR malloc (), +.BR malloc (3), etc. .LP The variable .B __after_morecore_hook points at a function that is called each time after -.BR sbrk () +.BR sbrk (2) was asked for more memory. .SH "EXAMPLE" Here is a short example of how to use these variables. diff --git a/man3/mblen.3 b/man3/mblen.3 index bd300b400..5f592f127 100644 --- a/man3/mblen.3 +++ b/man3/mblen.3 @@ -62,5 +62,5 @@ C99 The behaviour of \fBmblen\fP() depends on the LC_CTYPE category of the current locale. .PP -The function \fBmbrlen\fP() provides a better interface to the same +The function \fBmbrlen\fP(3) provides a better interface to the same functionality. diff --git a/man3/mbsinit.3 b/man3/mbsinit.3 index 78091d19d..6576eb0e0 100644 --- a/man3/mbsinit.3 +++ b/man3/mbsinit.3 @@ -31,18 +31,19 @@ state is needed for the sake of encodings such as ISO-2022 and UTF-7. .PP The initial state is the state at the beginning of conversion of a string. There are two kinds of state: The one used by multibyte to wide character -conversion functions, such as \fBmbsrtowcs\fP(), and the one used by wide -character to multibyte conversion functions, such as \fBwcsrtombs\fP(), +conversion functions, such as \fBmbsrtowcs\fP(3), and the one used by wide +character to multibyte conversion functions, such as \fBwcsrtombs\fP(3), but they both fit in a \fBmbstate_t\fP, and they both have the same representation for an initial state. .PP For 8-bit encodings, all states are equivalent to the initial state. For multibyte encodings like UTF-8, EUC-*, BIG5 or SJIS, the wide character to multibyte conversion functions never produce non-initial states, but the -multibyte to wide-character conversion functions like \fBmbrtowc\fP() do +multibyte to wide-character conversion functions like \fBmbrtowc\fP(3) do produce non-initial states when interrupted in the middle of a character. .PP -One possible way to create an mbstate_t in initial state is to set it to zero: +One possible way to create an mbstate_t in initial +state is to set it to zero: .nf mbstate_t state; memset(&state,0,sizeof(mbstate_t)); diff --git a/man3/mempcpy.3 b/man3/mempcpy.3 index dc382c9c9..d05aeab3d 100644 --- a/man3/mempcpy.3 +++ b/man3/mempcpy.3 @@ -24,7 +24,7 @@ mempcpy, wmempcpy \- copy memory area The .BR mempcpy () function is nearly identical to the -.BR memcpy () +.BR memcpy (3) function. It copies .I n diff --git a/man3/mq_getattr.3 b/man3/mq_getattr.3 index c33ea9d44..2cf1311ad 100644 --- a/man3/mq_getattr.3 +++ b/man3/mq_getattr.3 @@ -61,7 +61,7 @@ The .I mq_flags field contains flags associated with the open message queue description. This field is initialised when the queue is created by -.BR mq_open (). +.BR mq_open (3). The only flag that can appear in this field is .BR O_NONBLOCK . @@ -70,12 +70,12 @@ The and .I mq_msgsize fields are set when the message queue is created by -.BR mq_open (). +.BR mq_open (3). The .I mq_maxmsg field is an upper limit on the number of messages that may be placed on the queue using -.BR mq_send (). +.BR mq_send (3). The .I mq_msgsize field is an upper limit on the size of messages diff --git a/man3/mq_notify.3 b/man3/mq_notify.3 index 10c95f173..50965a529 100644 --- a/man3/mq_notify.3 +++ b/man3/mq_notify.3 @@ -141,10 +141,10 @@ the queue is emptied and a new message arrives. If another process or thread is waiting to read a message from an empty queue using -.BR mq_receive (), +.BR mq_receive (3), then any message notification registration is ignored: the message is delivered to the process or thread calling -.BR mq_receive (), +.BR mq_receive (3), and the message notification registration remains in effect. Notification occurs once: after a notification is delivered, diff --git a/man3/mq_open.3 b/man3/mq_open.3 index 2bced0b1c..a3ee68754 100644 --- a/man3/mq_open.3 +++ b/man3/mq_open.3 @@ -64,9 +64,9 @@ in .B O_NONBLOCK Open the queue in non-blocking mode. In circumstances where -.BR mq_receive () +.BR mq_receive (3) and -.BR mq_send () +.BR mq_send (3) would normally block, these functions instead fail with the error .BR EAGAIN . .TP diff --git a/man3/mtrace.3 b/man3/mtrace.3 index 2db2166c3..e98c12923 100644 --- a/man3/mtrace.3 +++ b/man3/mtrace.3 @@ -15,10 +15,10 @@ mtrace, muntrace \- malloc debugging The function .BR mtrace () installs handlers for -.BR malloc (), -.BR realloc () +.BR malloc (3), +.BR realloc (3) and -.BR free (). +.BR free (3). The function .BR muntrace () disables these handlers. diff --git a/man3/nan.3 b/man3/nan.3 index 0d83439c0..b6dd32b8c 100644 --- a/man3/nan.3 +++ b/man3/nan.3 @@ -32,9 +32,9 @@ and similarly calls to and .BR nanl () are equivalent to analogous calls to -.BR strtof () +.BR strtof (3) and -.BR strtold (). +.BR strtold (3). .PP The argument .I tagp diff --git a/man3/openpty.3 b/man3/openpty.3 index 6a14f8764..8e50dfd87 100644 --- a/man3/openpty.3 +++ b/man3/openpty.3 @@ -91,7 +91,7 @@ The .BR forkpty () function combines .BR openpty (), -.BR fork (), +.BR fork (2), and .BR login_tty () to create a new process operating in a pseudo-terminal. @@ -134,7 +134,7 @@ There are no available ttys. .LP .BR login_pty () will fail if -.BR ioctl () +.BR ioctl (2) fails to set .I fd to the controlling terminal of the current process. @@ -143,7 +143,7 @@ to the controlling terminal of the current process. will fail if either .BR openpty () or -.BR fork () +.BR fork (2) fails. .SH NOTES These functions are included in libutil, hence you'll need to add diff --git a/man3/popen.3 b/man3/popen.3 index ca7f4b501..115e2296a 100644 --- a/man3/popen.3 +++ b/man3/popen.3 @@ -74,7 +74,7 @@ is a normal standard I/O stream in all respects save that it must be closed with .BR pclose () rather than -.BR fclose (). +.BR fclose (3). Writing to such a stream writes to the standard input of the command; the command's standard output is the same as that of the process that called .BR popen (), @@ -92,7 +92,7 @@ The .BR pclose () function waits for the associated process to terminate and returns the exit status of the command as returned by -.BR wait4 (). +.BR wait4 (2). .SH "RETURN VALUE" The .BR popen () @@ -120,9 +120,9 @@ function does not set .I errno if memory allocation fails. If the underlying -.BR fork () +.BR fork (2) or -.BR pipe () +.BR pipe (2) fails, .I errno is set appropriately. diff --git a/man3/posix_memalign.3 b/man3/posix_memalign.3 index 432b192df..27207a1e0 100644 --- a/man3/posix_memalign.3 +++ b/man3/posix_memalign.3 @@ -113,32 +113,32 @@ parameter is correct. POSIX requires that memory obtained from .BR posix_memalign () can be freed using -.BR free (). +.BR free (3). Some systems provide no way to reclaim memory allocated with .BR memalign () or .BR valloc () (because one can only pass to -.BR free () +.BR free (3) a pointer gotten from -.BR malloc (), +.BR malloc (3), while e.g. .BR memalign () would call -.BR malloc () +.BR malloc (3) and then align the obtained value). .\" Other systems allow passing the result of .\" .IR valloc () .\" to -.\" .IR free (), +.\" .IR free (3), .\" but not to -.\" .IR realloc (). +.\" .IR realloc (3). GNU libc allows memory obtained from any of these three routines to be reclaimed with -.BR free (). +.BR free (3). GNU libc -.BR malloc () +.BR malloc (3) always returns 8-byte aligned memory addresses, so these routines are only needed if you require larger alignment values. .SH AVAILABILITY diff --git a/man3/printf.3 b/man3/printf.3 index 2781c4e64..0b626d5c4 100644 --- a/man3/printf.3 +++ b/man3/printf.3 @@ -672,7 +672,7 @@ modifier is present, the .I wint_t (wide character) argument is converted to a multibyte sequence by a call to the -.BR wcrtomb () +.BR wcrtomb (3) function, with a conversion state starting in the initial state, and the resulting multibyte string is written. .TP @@ -698,7 +698,7 @@ modifier is present: The argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the -.BR wcrtomb () +.BR wcrtomb (3) function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. diff --git a/man3/putgrent.3 b/man3/putgrent.3 index 739e5e18e..8e41da07c 100644 --- a/man3/putgrent.3 +++ b/man3/putgrent.3 @@ -14,7 +14,7 @@ putgrent \- write a group database entry to a file The .BR putgrent () function is the counterpart for -.BR fgetgrent (). +.BR fgetgrent (3). The function writes the content of the provided struct group into the file pointed to by .IR fp . diff --git a/man3/putwchar.3 b/man3/putwchar.3 index 7a5a94a3f..e849a5566 100644 --- a/man3/putwchar.3 +++ b/man3/putwchar.3 @@ -23,7 +23,7 @@ putwchar \- write a wide character to standard output .fi .SH DESCRIPTION The \fBputwchar\fP() function is the wide-character equivalent of the -\fBputchar\fP() function. +\fBputchar\fP(3) function. It writes the wide character \fIwc\fP to \fBstdout\fP. If \fIferror(stdout)\fP becomes true, it returns WEOF. If a wide character diff --git a/man3/qecvt.3 b/man3/qecvt.3 index c4095f022..609b7a0ce 100644 --- a/man3/qecvt.3 +++ b/man3/qecvt.3 @@ -43,10 +43,10 @@ The functions and .BR qgcvt () are identical to -.BR ecvt , -.BR fcvt +.BR ecvt (3), +.BR fcvt (3) and -.BR gcvt +.BR gcvt (3) respectively, except that they use a .I "long double" argument @@ -58,7 +58,7 @@ and .SH NOTES These functions are obsolete. Instead, -.BR sprintf () +.BR sprintf (3) is recommended. .SH "CONFORMING TO" SVr4. diff --git a/man3/qsort.3 b/man3/qsort.3 index 1ceafde9e..2a05e19da 100644 --- a/man3/qsort.3 +++ b/man3/qsort.3 @@ -64,11 +64,11 @@ SVr4, 4.3BSD, C89, C99. Library routines suitable for use as the .I compar argument include -.BR alphasort () +.BR alphasort (3) and -.BR versionsort (). +.BR versionsort (3). To compare C strings, the comparison function can call -.BR strcmp (), +.BR strcmp (3), as shown in the example below. .SH EXAMPLE For one example of use, see the example under diff --git a/man3/realpath.3 b/man3/realpath.3 index 89e45bbb6..b0c603e76 100644 --- a/man3/realpath.3 +++ b/man3/realpath.3 @@ -123,16 +123,16 @@ impossible to determine a suitable size for the output buffer, According to POSIX a buffer of size PATH_MAX suffices, but PATH_MAX need not be a defined constant, and may have to be obtained using -.BR pathconf (). +.BR pathconf (3). And asking -.BR pathconf () +.BR pathconf (3) does not really help, since on the one hand POSIX warns that the result of -.BR pathconf () +.BR pathconf (3) may be huge and unsuitable for mallocing memory. And on the other hand -.BR pathconf () +.BR pathconf (3) may return \-1 to signify that PATH_MAX is not bounded. .LP The libc4 and libc5 implementation contains a buffer overflow @@ -150,7 +150,7 @@ In 4.4BSD and Solaris the limit on the pathname length is MAXPATHLEN (found in ). SUSv2 prescribes PATH_MAX and NAME_MAX, as found in or provided by the -.BR pathconf () +.BR pathconf (3) function. A typical source fragment would be .LP diff --git a/man3/remove.3 b/man3/remove.3 index 746145f31..0882c0aaf 100644 --- a/man3/remove.3 +++ b/man3/remove.3 @@ -39,9 +39,9 @@ remove \- delete a name and possibly the file it refers to .BR remove () deletes a name from the filesystem. It calls -.BR unlink () +.BR unlink (2) for files, and -.BR rmdir () +.BR rmdir (2) for directories. If the removed name was the @@ -76,7 +76,7 @@ disappearance of files which are still being used. Under libc4 and libc5, .BR remove () was an alias for -.BR unlink () +.BR unlink (2) (and hence would not remove directories). .SH "SEE ALSO" .BR rm (1), diff --git a/man3/round.3 b/man3/round.3 index 3e41f6bd9..93809b138 100644 --- a/man3/round.3 +++ b/man3/round.3 @@ -39,7 +39,7 @@ Compile with \-std=c99; link with \-lm. These functions round \fIx\fP to the nearest integer, but round halfway cases away from zero (regardless of the current rounding direction), instead of to the nearest even integer like -.BR rint (). +.BR rint (3). .SH "RETURN VALUE" The rounded integer value. If \fIx\fP is integral or infinite, diff --git a/man3/rpmatch.3 b/man3/rpmatch.3 index 1f089f0ec..6592e0434 100644 --- a/man3/rpmatch.3 +++ b/man3/rpmatch.3 @@ -44,7 +44,7 @@ user-supplied response, perhaps obtained with \fBfgets\fP(3) or The user's language preference is taken into account per the environment variables \fBLANG\fP, \fBLC_MESSAGES\fP, and \fBLC_ALL\fP, -if the program has called \fBsetlocale\fP() to effect their changes. +if the program has called \fBsetlocale\fP(3) to effect their changes. Regardless of the locale, responses matching \fB^[Yy]\fP are always accepted as affirmative, and those matching \fB^[Nn]\fP are always diff --git a/man3/rtime.3 b/man3/rtime.3 index 61a95a94f..79cc26d91 100644 --- a/man3/rtime.3 +++ b/man3/rtime.3 @@ -35,11 +35,11 @@ In case of error \-1 is returned, and is set appropriately. .SH ERRORS All errors for underlying functions -.RB ( sendto (), -.BR poll (), -.BR recvfrom (), -.BR connect (), -.BR read ()) +.RB ( sendto (2), +.BR poll (2), +.BR recvfrom (2), +.BR connect (2), +.BR read (2)) can occur. Moreover: .TP diff --git a/man3/scalb.3 b/man3/scalb.3 index b92c4331e..5ab278ffa 100644 --- a/man3/scalb.3 +++ b/man3/scalb.3 @@ -55,7 +55,7 @@ by FLT_RADIX (probably 2) to the power If FLT_RADIX equals 2, then .BR scalbn () is equivalent to -.BR ldexp (). +.BR ldexp (3). The value of FLT_RADIX is found in .IR . diff --git a/man3/scandir.3 b/man3/scandir.3 index b458a79c4..0c1b56b83 100644 --- a/man3/scandir.3 +++ b/man3/scandir.3 @@ -53,9 +53,9 @@ The \fBscandir\fP() function scans the directory \fIdir\fP, calling \fIfilter\fP() on each directory entry. Entries for which \fIfilter\fP() returns non-zero are stored in strings allocated via -\fBmalloc\fP(), sorted using \fBqsort\fP() with the comparison +\fBmalloc\fP(3), sorted using \fBqsort\fP(3) with the comparison function \fIcompar\fP(), and collected in array \fInamelist\fP -which is allocated via \fBmalloc\fP(). +which is allocated via \fBmalloc\fP(3). If \fIfilter\fP is NULL, all entries are selected. .LP The diff --git a/man3/scanf.3 b/man3/scanf.3 index 99f13c9a0..f6af7367e 100644 --- a/man3/scanf.3 +++ b/man3/scanf.3 @@ -117,9 +117,9 @@ The function scans a variable argument list from the standard input and the .BR vsscanf () function scans it from a string; these are analogous to the -.BR vprintf () +.BR vprintf (3) and -.BR vsprintf () +.BR vsprintf (3) functions respectively. .PP The diff --git a/man3/seekdir.3 b/man3/seekdir.3 index 9beaf61be..0f53fc39c 100644 --- a/man3/seekdir.3 +++ b/man3/seekdir.3 @@ -37,8 +37,8 @@ stream. .fi .SH DESCRIPTION The \fBseekdir\fP() function sets the location in the directory stream -from which the next \fBreaddir\fP() call will start. \fBseekdir\fP() -should be used with an offset returned by \fBtelldir\fP(). +from which the next \fBreaddir\fP(2) call will start. +\fBseekdir\fP() should be used with an offset returned by \fBtelldir\fP(3). .SH "RETURN VALUE" The \fBseekdir\fP() function returns no value. .SH "CONFORMING TO" diff --git a/man3/sem_wait.3 b/man3/sem_wait.3 index 7a54d963d..295182bb4 100644 --- a/man3/sem_wait.3 +++ b/man3/sem_wait.3 @@ -148,7 +148,7 @@ set an alarm timer to generate a .B SIGALRM signal. This handler performs a -.BR sem_post () +.BR sem_post (3) to increment the semaphore that is being waited on in .I main() using diff --git a/man3/setjmp.3 b/man3/setjmp.3 index 23a9f00db..3be52b49a 100644 --- a/man3/setjmp.3 +++ b/man3/setjmp.3 @@ -36,20 +36,20 @@ setjmp, sigsetjmp \- save stack context for non-local goto .fi .ad b .SH DESCRIPTION -\fBsetjmp\fP() and \fBlongjmp\fP() are useful for dealing with errors +\fBsetjmp\fP() and \fBlongjmp\fP(3) are useful for dealing with errors and interrupts encountered in a low-level subroutine of a program. \fBsetjmp\fP() saves the stack context/environment in \fIenv\fP for -later use by \fBlongjmp\fP(). +later use by \fBlongjmp\fP(3). The stack context will be invalidated if the function which called \fBsetjmp\fP() returns. .P \fBsigsetjmp\fP() is similar to \fBsetjmp\fP(). If \fIsavesigs\fP is non-zero, the set of blocked signals is saved in \fIenv\fP and will be restored -if a \fBsiglongjmp\fP() is later performed with this \fIenv\fP. +if a \fBsiglongjmp\fP(3) is later performed with this \fIenv\fP. .SH "RETURN VALUE" \fBsetjmp\fP() and \fBsigsetjmp\fP() return 0 if returning directly, and -non-zero when returning from \fBlongjmp\fP() using the saved context. +non-zero when returning from \fBlongjmp\fP(3) using the saved context. .SH "CONFORMING TO" C89, C99, and POSIX.1-2001 specify \fBsetjmp\fP(). POSIX.1-2001 specifies \fBsigsetjmp\fP(). diff --git a/man3/setlocale.3 b/man3/setlocale.3 index 986f967f2..46ec7b6b1 100644 --- a/man3/setlocale.3 +++ b/man3/setlocale.3 @@ -141,17 +141,17 @@ A program may be made portable to all locales by calling .B setlocale(LC_ALL, """""") after program initialization, by using the values returned from a -.BR localeconv () +.BR localeconv (3) call for locale-dependent information, by using the multi-byte and wide character functions for text processing if .BR "MB_CUR_MAX > 1" , and by using -.BR strcoll () , -.BR wcscoll () +.BR strcoll (3) , +.BR wcscoll (3) or -.BR strxfrm (), -.BR wcsxfrm () +.BR strxfrm (3), +.BR wcsxfrm (3) to compare strings. .SH "RETURN VALUE" A successful call to @@ -175,7 +175,7 @@ locale (e.g. in libc-4.5.21 and libc-4.6.27), and the Russian (more precisely, "koi-8r") locale (e.g. in libc-4.6.27), so that having an environment variable LC_CTYPE=ISO-8859-1 sufficed to make -.BR isprint () +.BR isprint (3) return the right answer. These days non-English speaking Europeans have to work a bit harder, and must install actual locale files. diff --git a/man3/sigset.3 b/man3/sigset.3 index 2112b7c18..7a1915983 100644 --- a/man3/sigset.3 +++ b/man3/sigset.3 @@ -171,7 +171,7 @@ prototype more easily readable. The .BR sigset () function provides reliable signal handling semantics (as when calling -.BR sigaction () +.BR sigaction (2) with .I sa_mask equal to 0). @@ -179,7 +179,7 @@ equal to 0). On System V, the .BR signal () function provides unreliable semantics (as when calling -.BR sigaction () +.BR sigaction (2) with .I sa_mask equal to diff --git a/man3/sigvec.3 b/man3/sigvec.3 index 59766010b..af095b3d1 100644 --- a/man3/sigvec.3 +++ b/man3/sigvec.3 @@ -138,7 +138,7 @@ Handle the signal on the alternate signal stack (historically established under BSD using the obsolete .BR sigstack () function; the POSIX replacement is -.BR sigaltstack ()). +.BR sigaltstack (2)). .PP The .BR sigmask () diff --git a/man3/sleep.3 b/man3/sleep.3 index 30dc9988e..32545a382 100644 --- a/man3/sleep.3 +++ b/man3/sleep.3 @@ -44,13 +44,13 @@ POSIX.1-2001. may be implemented using .BR SIGALRM ; mixing calls to -.BR alarm () +.BR alarm (3) and .BR sleep () is a bad idea. .PP Using -.BR longjmp () +.BR longjmp (3) from a signal handler or modifying the handling of .B SIGALRM while sleeping will cause undefined results. diff --git a/man3/sockatmark.3 b/man3/sockatmark.3 index b6be8beb9..374da0384 100644 --- a/man3/sockatmark.3 +++ b/man3/sockatmark.3 @@ -66,7 +66,7 @@ can safely be called from a handler for the SIGURG signal. .BR sockatmark () is implemented using the .B SIOCATMARK -.BR ioctl () +.BR ioctl (2) operation. .SH "CONFORMING TO" POSIX.1-2001 diff --git a/man3/strcoll.3 b/man3/strcoll.3 index c0f976cb7..47d5ad38b 100644 --- a/man3/strcoll.3 +++ b/man3/strcoll.3 @@ -52,7 +52,7 @@ as appropriate for the current locale. SVr4, 4.3BSD, C89, C99. .SH NOTES In the \fI"POSIX"\fP or \fI"C"\fP locales \fBstrcoll\fP() is equivalent to -\fBstrcmp\fP(). +\fBstrcmp\fP(3). .SH "SEE ALSO" .BR bcmp (3), .BR memcmp (3), diff --git a/man3/strerror.3 b/man3/strerror.3 index 6c2cd5b5f..5d9098e33 100644 --- a/man3/strerror.3 +++ b/man3/strerror.3 @@ -57,7 +57,7 @@ The \fBstrerror\fP() function returns a string describing the error code passed in the argument \fIerrnum\fP, possibly using the LC_MESSAGES part of the current locale to select the appropriate language. This string must not be modified by the application, but may be -modified by a subsequent call to \fBperror\fP() or \fBstrerror\fP(). +modified by a subsequent call to \fBperror\fP(3) or \fBstrerror\fP(). No library function will modify this string. The \fBstrerror_r\fP() function is similar to \fBstrerror\fP(), but is diff --git a/man3/strptime.3 b/man3/strptime.3 index 6c8e2c99c..149f9ac8b 100644 --- a/man3/strptime.3 +++ b/man3/strptime.3 @@ -40,7 +40,7 @@ strptime \- convert a string representation of time to a time tm structure The .BR strptime () function is the converse function to -.BR strftime () +.BR strftime (3) and converts the character string pointed to by .I s to values which are stored in the @@ -271,7 +271,7 @@ returns NULL. SUSv2, POSIX.1-2001. .SH EXAMPLE The following example demonstrates the use of \fBstrptime\fP() -and \fBstrftime\fP(). +and \fBstrftime\fP(3). .sp .nf #include @@ -293,7 +293,7 @@ main(void) For reasons of symmetry, glibc tries to support for .BR strptime () the same format characters as for -.BR strftime (). +.BR strftime (3). (In most cases the corresponding fields are parsed, but no field in \fItm\fP is changed.) This leads to @@ -324,7 +324,7 @@ An RFC-822/ISO 8601 standard time zone specification. .B %Z The timezone name. .LP -Similarly, because of GNU extensions to \fIstrftime\fP(), +Similarly, because of GNU extensions to \fIstrftime\fP(3), %k is accepted as a synonym for %H, and %l should be accepted as a synonym for %I, and %P is accepted as a synonym for %p. Finally diff --git a/man3/strsep.3 b/man3/strsep.3 index f28fac171..624eca6c7 100644 --- a/man3/strsep.3 +++ b/man3/strsep.3 @@ -53,10 +53,10 @@ The \fBstrsep\fP() function returns a pointer to the token, that is, it returns the original value of *\fIstringp\fP. .SH NOTES The \fBstrsep\fP() function was introduced as a replacement for -\fBstrtok\fP(), since the latter cannot handle empty fields. -However, \fBstrtok\fP() conforms to C89/C99 and hence is more portable. +\fBstrtok\fP(3), since the latter cannot handle empty fields. +However, \fBstrtok\fP(3) conforms to C89/C99 and hence is more portable. .SH BUGS -This function suffers from the same problems as \fBstrtok\fP(). +This function suffers from the same problems as \fBstrtok\fP(3). In particular, it modifies the original string. Avoid it. .SH "CONFORMING TO" diff --git a/man3/strtoimax.3 b/man3/strtoimax.3 index 8a3a6a7d0..7dbe9a6d6 100644 --- a/man3/strtoimax.3 +++ b/man3/strtoimax.3 @@ -33,9 +33,9 @@ strtoimax, strtoumax \- convert string to integer .fi .SH DESCRIPTION These functions are just like -.BR strtol () +.BR strtol (3) and -.BR strtoul (), +.BR strtoul (3), except that they return a value of type .B intmax_t and diff --git a/man3/strverscmp.3 b/man3/strverscmp.3 index 32b4dd0d8..033bd3c5a 100644 --- a/man3/strverscmp.3 +++ b/man3/strverscmp.3 @@ -51,7 +51,7 @@ which again uses Thus, the task of .BR strverscmp () is to compare two strings and find the "right" order, while -.BR strcmp () +.BR strcmp (3) only finds the lexicographic order. This function does not use the locale category LC_COLLATE, so is meant mostly for situations @@ -66,7 +66,7 @@ Find the largest consecutive digit strings containing (or starting at, or ending at) this position. If one or both of these is empty, then return what -.BR strcmp () +.BR strcmp (3) would have returned (numerical ordering of byte values). Otherwise, compare both digit strings numerically, where digit strings with one or more leading zeroes are interpreted as if they have a decimal point diff --git a/man3/strxfrm.3 b/man3/strxfrm.3 index 7efadb874..8fb1487e5 100644 --- a/man3/strxfrm.3 +++ b/man3/strxfrm.3 @@ -36,9 +36,9 @@ strxfrm \- string transformation .fi .SH DESCRIPTION The \fBstrxfrm\fP() function transforms the \fIsrc\fP string into a -form such that the result of \fBstrcmp\fP() on two strings that have +form such that the result of \fBstrcmp\fP(3) on two strings that have been transformed with \fBstrxfrm\fP() is the same as the result of -\fBstrcoll\fP() on the two strings before their transformation. +\fBstrcoll\fP(3) on the two strings before their transformation. The first \fIn\fP characters of the transformed string are placed in \fIdest\fP. The transformation is based on the program's current @@ -53,7 +53,7 @@ contents of \fIdest\fP are indeterminate. SVr4, 4.3BSD, C89, C99 .SH NOTES In the \fI"POSIX"\fP or \fI"C"\fP locales \fBstrxfrm\fP() is equivalent to -copying the string with \fBstrncpy\fP(). +copying the string with \fBstrncpy\fP(3). .SH "SEE ALSO" .BR bcmp (3), .BR memcmp (3), diff --git a/man3/system.3 b/man3/system.3 index c762e3b52..8ac4f7631 100644 --- a/man3/system.3 +++ b/man3/system.3 @@ -51,7 +51,7 @@ and will be ignored. .SH "RETURN VALUE" The value returned is \-1 on error (e.g. -.BR fork () +.BR fork (2) failed), and the return status of the command otherwise. This latter return status is in the format @@ -139,7 +139,7 @@ the calling program has previously called .PP It is possible for the shell command to return 127, so that code is not a sure indication that the -.BR execve () +.BR execve (2) call failed. .SH "SEE ALSO" .BR sh (1), diff --git a/man3/tcgetsid.3 b/man3/tcgetsid.3 index 1b4b2efe1..10f2e6fdf 100644 --- a/man3/tcgetsid.3 +++ b/man3/tcgetsid.3 @@ -58,7 +58,7 @@ it has one but it is not described by .IR fd . .SH NOTES This function is implemented via the TIOCGSID -.BR ioctl (), +.BR ioctl (2), present since Linux 2.1.71. .SH "CONFORMING TO" diff --git a/man3/termios.3 b/man3/termios.3 index cab0eeac9..5cdf543ef 100644 --- a/man3/termios.3 +++ b/man3/termios.3 @@ -417,7 +417,7 @@ Recognized when ICANON is set, and then not passed as input. End-of-file character. More precisely: this character causes the pending tty buffer to be sent to the waiting user program without waiting for end-of-line. -If it is the first character of the line, the \fIread\fP() in the +If it is the first character of the line, the \fIread\fP(2) in the user program returns 0, which signifies end-of-file. Recognized when ICANON is set, and then not passed as input. .TP @@ -556,13 +556,13 @@ and if the .B IEXTEN flag is set: WERASE, REPRINT, LNEXT). A -.BR read () +.BR read (2) returns at most one line of input; if the -.BR read () +.BR read (2) requested fewer bytes than are available in the current line of input, then only as many bytes as requested are read, and the remaining characters will be available for a future -.BR read (). +.BR read (2). .PP In non-canonical mode input is available immediately (without the user having to type a line-delimiter character), @@ -577,35 +577,35 @@ completes; there are four distinct cases: .IP * 2 MIN == 0; TIME == 0: If data is available, -.BR read () +.BR read (2) returns immediately, with the lesser of the number of bytes available, or the number of bytes requested. If no data is available, -.BR read () +.BR read (2) returns 0. .IP * 2 MIN > 0; TIME == 0: -.BR read () +.BR read (2) blocks until the lesser of MIN bytes or the number of bytes requested are available, and returns the lesser of these two values. .IP * 2 MIN == 0; TIME > 0: TIME specifies the limit for a timer in tenths of a second. The timer is started when -.BR read () +.BR read (2) is called. -.BR read () +.BR read (2) returns either when at least one byte of data is available, or when the timer expires. If the timer expires without any input becoming available, -.BR read () +.BR read (2) returns 0. .IP * 2 MIN > 0; TIME > 0: TIME specifies the limit for a timer in tenths of a second. Once an initial byte of input becomes available, the timer is restarted after each further byte is received. -.BR read () +.BR read (2) returns either when the lesser of the number of bytes requested or MIN byte have been read, or when the inter-byte timeout expires. diff --git a/man3/tgamma.3 b/man3/tgamma.3 index a7fe9eab1..ab9a4fb8e 100644 --- a/man3/tgamma.3 +++ b/man3/tgamma.3 @@ -39,7 +39,7 @@ This function returns the value of the Gamma function for the argument \fIx\fP. It had to be called "true gamma function" since there is already a function -.BR gamma () +.BR gamma (3) that returns something else. .SH ERRORS In order to check for errors, set diff --git a/man3/timegm.3 b/man3/timegm.3 index a0c596cab..315c67eea 100644 --- a/man3/timegm.3 +++ b/man3/timegm.3 @@ -52,7 +52,7 @@ For a portable version of set the .B TZ environment variable to UTC, call -.BR mktime () +.BR mktime (3) and restore the value of .BR TZ . Something like diff --git a/man3/towctrans.3 b/man3/towctrans.3 index 0ac12a51b..ee874f11a 100644 --- a/man3/towctrans.3 +++ b/man3/towctrans.3 @@ -26,7 +26,7 @@ translates it according to the transliteration descriptor \fIdesc\fP. If \fIwc\fP is WEOF, WEOF is returned. .PP \fIdesc\fP must be a transliteration descriptor returned by -the \fBwctrans\fP() function. +the \fBwctrans\fP(3) function. .SH "RETURN VALUE" The \fBtowctrans\fP() function returns the translated wide character, or WEOF if \fIwc\fP is WEOF. diff --git a/man3/towlower.3 b/man3/towlower.3 index 67f6f4f25..5af8e592f 100644 --- a/man3/towlower.3 +++ b/man3/towlower.3 @@ -22,7 +22,7 @@ towlower \- convert a wide character to lowercase .fi .SH DESCRIPTION The \fBtowlower\fP() function is the wide-character equivalent of the -\fBtolower\fP() function. +\fBtolower\fP(3) function. If \fIwc\fP is a wide character, it is converted to lowercase. Characters which do not have case are returned unchanged. diff --git a/man3/towupper.3 b/man3/towupper.3 index 6d0680c86..2f571cf69 100644 --- a/man3/towupper.3 +++ b/man3/towupper.3 @@ -22,7 +22,7 @@ towupper \- convert a wide character to uppercase .fi .SH DESCRIPTION The \fBtowupper\fP() function is the wide-character equivalent of the -\fBtoupper\fP() function. +\fBtoupper\fP(3) function. If \fIwc\fP is a wide character, it is converted to uppercase. Characters which do not have case are returned unchanged. diff --git a/man3/ualarm.3 b/man3/ualarm.3 index 756166af5..fee46e82e 100644 --- a/man3/ualarm.3 +++ b/man3/ualarm.3 @@ -79,23 +79,23 @@ explicitly. .LP The interaction of this function with other timer functions such as -.BR alarm (), -.BR sleep (), -.BR nanosleep (), -.BR setitimer (), -.BR timer_create (), -.BR timer_delete (), -.BR timer_getoverrun (), -.BR timer_gettime (), -.BR timer_settime (), -.BR usleep () +.BR alarm (3), +.BR sleep (3), +.BR nanosleep (2), +.BR setitimer (2), +.BR timer_create (3), +.BR timer_delete (3), +.BR timer_getoverrun (3), +.BR timer_gettime (3), +.BR timer_settime (3), +.BR usleep (3) is unspecified. .LP This function is obsolete. Use .BR setitimer (2) or POSIX interval timers -.RB ( timer_create (), +.RB ( timer_create (3), etc.) instead. .SH "SEE ALSO" diff --git a/man3/usleep.3 b/man3/usleep.3 index 8ba1caa94..402f88c46 100644 --- a/man3/usleep.3 +++ b/man3/usleep.3 @@ -91,16 +91,16 @@ Use .LP The interaction of this function with the SIGALRM signal, and with other timer functions such as -.BR alarm (), -.BR sleep (), -.BR nanosleep (), -.BR setitimer (), -.BR timer_create (), -.BR timer_delete (), -.BR timer_getoverrun (), -.BR timer_gettime (), -.BR timer_settime (), -.BR ualarm () +.BR alarm (3), +.BR sleep (3), +.BR nanosleep (2), +.BR setitimer (2), +.BR timer_create (3), +.BR timer_delete (3), +.BR timer_getoverrun (3), +.BR timer_gettime (3), +.BR timer_settime (3), +.BR ualarm (3) is unspecified. .SH "SEE ALSO" .BR alarm (2), diff --git a/man3/wcpncpy.3 b/man3/wcpncpy.3 index e3a37da83..dd933dd9f 100644 --- a/man3/wcpncpy.3 +++ b/man3/wcpncpy.3 @@ -24,7 +24,7 @@ returning a pointer to its end .fi .SH DESCRIPTION The \fBwcpncpy\fP() function is the wide-character equivalent -of the \fBstpncpy\fP() function. +of the \fBstpncpy\fP(3) function. It copies at most \fIn\fP wide characters from the wide-character string pointed to by \fIsrc\fP, including the terminating L'\\0' character, to the array pointed to by \fIdest\fP. diff --git a/man3/wcscasecmp.3 b/man3/wcscasecmp.3 index 5c30f2198..745e5128e 100644 --- a/man3/wcscasecmp.3 +++ b/man3/wcscasecmp.3 @@ -21,7 +21,7 @@ wcscasecmp \- compare two wide-character strings, ignoring case .fi .SH DESCRIPTION The \fBwcscasecmp\fP() function is the wide-character equivalent of the -\fBstrcasecmp\fP() function. +\fBstrcasecmp\fP(3) function. It compares the wide-character string pointed to by \fIs1\fP and the wide-character string pointed to by \fIs2\fP, ignoring case differences (\fBtowupper\fP(), \fBtowlower\fP()). diff --git a/man3/wcscat.3 b/man3/wcscat.3 index 0b1ec619e..00ec6c3a9 100644 --- a/man3/wcscat.3 +++ b/man3/wcscat.3 @@ -22,7 +22,7 @@ wcscat \- concatenate two wide-character strings .fi .SH DESCRIPTION The \fBwcscat\fP() function is the wide-character equivalent -of the \fBstrcat\fP() function. +of the \fBstrcat\fP(3) function. It copies the wide-character string pointed to by \fIsrc\fP, including the terminating L'\\0' character, to the end of the wide-character string pointed to by \fIdest\fP. diff --git a/man3/wcschr.3 b/man3/wcschr.3 index c377c672a..bd30f0ed6 100644 --- a/man3/wcschr.3 +++ b/man3/wcschr.3 @@ -22,7 +22,7 @@ wcschr \- search a wide character in a wide-character string .fi .SH DESCRIPTION The \fBwcschr\fP() function is the wide-character equivalent -of the \fBstrchr\fP() function. +of the \fBstrchr\fP(3) function. It searches the first occurrence of \fIwc\fP in the wide-character string pointed to by \fIwcs\fP. .SH "RETURN VALUE" diff --git a/man3/wcscmp.3 b/man3/wcscmp.3 index efa751d05..cbecb3593 100644 --- a/man3/wcscmp.3 +++ b/man3/wcscmp.3 @@ -22,7 +22,7 @@ wcscmp \- compare two wide-character strings .fi .SH DESCRIPTION The \fBwcscmp\fP() function is the wide-character equivalent -of the \fBstrcmp\fP() function. +of the \fBstrcmp\fP(3) function. It compares the wide-character string pointed to by \fIs1\fP and the wide-character string pointed to by \fIs2\fP. .SH "RETURN VALUE" diff --git a/man3/wcscpy.3 b/man3/wcscpy.3 index c76cfd177..69e7d6169 100644 --- a/man3/wcscpy.3 +++ b/man3/wcscpy.3 @@ -22,7 +22,7 @@ wcscpy \- copy a wide-character string .fi .SH DESCRIPTION The \fBwcscpy\fP() function is the wide-character equivalent -of the \fBstrcpy\fP() function. +of the \fBstrcpy\fP(3) function. It copies the wide-character string pointed to by \fIsrc\fP, including the terminating L'\\0' character, to the array pointed to by \fIdest\fP. diff --git a/man3/wcscspn.3 b/man3/wcscspn.3 index c213626f1..dd444ef1a 100644 --- a/man3/wcscspn.3 +++ b/man3/wcscspn.3 @@ -22,7 +22,7 @@ wcscspn \- search a wide-character string for any of a set of wide characters .fi .SH DESCRIPTION The \fBwcscspn\fP() function is the wide-character equivalent -of the \fBstrcspn\fP() function. +of the \fBstrcspn\fP(3) function. It determines the length of the longest initial segment of \fIwcs\fP which consists entirely of wide-characters not listed in \fIreject\fP. In diff --git a/man3/wcsdup.3 b/man3/wcsdup.3 index c50d77c92..7f2049918 100644 --- a/man3/wcsdup.3 +++ b/man3/wcsdup.3 @@ -23,7 +23,7 @@ wcsdup \- duplicate a wide-character string .fi .SH DESCRIPTION The \fBwcsdup\fP() function is the wide-character equivalent -of the \fBstrdup\fP() function. +of the \fBstrdup\fP(3) function. It allocates and returns a new wide-character string whose initial contents is a duplicate of the wide-character string pointed to by \fIs\fP. .PP diff --git a/man3/wcslen.3 b/man3/wcslen.3 index b4fd81896..5f5efd4cc 100644 --- a/man3/wcslen.3 +++ b/man3/wcslen.3 @@ -22,7 +22,7 @@ wcslen \- determine the length of a wide-character string .fi .SH DESCRIPTION The \fBwcslen\fP() function is the wide-character equivalent -of the \fBstrlen\fP() function. +of the \fBstrlen\fP(3) function. It determines the length of the wide-character string pointed to by \fIs\fP, not including the terminating L'\\0' character. .SH "RETURN VALUE" diff --git a/man3/wcsncasecmp.3 b/man3/wcsncasecmp.3 index cd29b47c9..8141c9d94 100644 --- a/man3/wcsncasecmp.3 +++ b/man3/wcsncasecmp.3 @@ -21,7 +21,7 @@ wcsncasecmp \- compare two fixed-size wide-character strings, ignoring case .fi .SH DESCRIPTION The \fBwcsncasecmp\fP() function is the wide-character equivalent of the -\fBstrncasecmp\fP() function. +\fBstrncasecmp\fP(3) function. It compares the wide-character string pointed to by \fIs1\fP and the wide-character string pointed to by \fIs2\fP, but at most diff --git a/man3/wcsncat.3 b/man3/wcsncat.3 index e588d83c6..962c6035d 100644 --- a/man3/wcsncat.3 +++ b/man3/wcsncat.3 @@ -22,7 +22,7 @@ wcsncat \- concatenate two wide-character strings .fi .SH DESCRIPTION The \fBwcsncat\fP() function is the wide-character equivalent of the -\fBstrncat\fP() function. +\fBstrncat\fP(3) function. It copies at most \fIn\fP wide characters from the wide-character string pointed to by \fIsrc\fP to the end of the wide-character string pointed to by \fIdest\fP, and adds a terminating L'\\0' character. diff --git a/man3/wcsncmp.3 b/man3/wcsncmp.3 index e3b4e500e..35adf2121 100644 --- a/man3/wcsncmp.3 +++ b/man3/wcsncmp.3 @@ -22,7 +22,7 @@ wcsncmp \- compare two fixed-size wide-character strings .fi .SH DESCRIPTION The \fBwcsncmp\fP() function is the wide-character equivalent of the -\fBstrncmp\fP() function. +\fBstrncmp\fP(3) function. It compares the wide-character string pointed to by \fIs1\fP and the wide-character string pointed to by \fIs2\fP, but at most \fIn\fP wide characters from each string. diff --git a/man3/wcsncpy.3 b/man3/wcsncpy.3 index a8a2eaa71..9ca023d86 100644 --- a/man3/wcsncpy.3 +++ b/man3/wcsncpy.3 @@ -22,7 +22,7 @@ wcsncpy \- copy a fixed-size string of wide characters .fi .SH DESCRIPTION The \fBwcsncpy\fP() function is the wide-character equivalent of the -\fBstrncpy\fP() function. +\fBstrncpy\fP(3) function. It copies at most \fIn\fP wide characters from the wide-character string pointed to by \fIsrc\fP, including the terminating L'\\0' character, to the array pointed to by \fIdest\fP. diff --git a/man3/wcsnlen.3 b/man3/wcsnlen.3 index dff1f553a..18a964c12 100644 --- a/man3/wcsnlen.3 +++ b/man3/wcsnlen.3 @@ -21,7 +21,7 @@ wcsnlen \- determine the length of a fixed-size wide-character string .fi .SH DESCRIPTION The \fBwcsnlen\fP() function is the wide-character equivalent -of the \fBstrnlen\fP() function. +of the \fBstrnlen\fP(3) function. It returns the number of wide-characters in the string pointed to by \fIs\fP, not including the terminating L'\\0' character, but at most \fImaxlen\fP. diff --git a/man3/wcspbrk.3 b/man3/wcspbrk.3 index e5dca5e31..44e249c03 100644 --- a/man3/wcspbrk.3 +++ b/man3/wcspbrk.3 @@ -22,7 +22,7 @@ wcspbrk \- search a wide-character string for any of a set of wide characters .fi .SH DESCRIPTION The \fBwcspbrk\fP() function is the wide-character equivalent -of the \fBstrpbrk\fP() function. +of the \fBstrpbrk\fP(3) function. It searches for the first occurrence in the wide-character string pointed to by \fIwcs\fP of any of the characters in the wide-character diff --git a/man3/wcsrchr.3 b/man3/wcsrchr.3 index 88c4cc317..0ef3480b2 100644 --- a/man3/wcsrchr.3 +++ b/man3/wcsrchr.3 @@ -22,7 +22,7 @@ wcsrchr \- search a wide character in a wide-character string .fi .SH DESCRIPTION The \fBwcsrchr\fP() function is the wide-character equivalent -of the \fBstrrchr\fP() function. +of the \fBstrrchr\fP(3) function. It searches the last occurrence of \fIwc\fP in the wide-character string pointed to by \fIwcs\fP. .SH "RETURN VALUE" diff --git a/man3/wcsspn.3 b/man3/wcsspn.3 index 23e22c797..8f6106915 100644 --- a/man3/wcsspn.3 +++ b/man3/wcsspn.3 @@ -23,7 +23,7 @@ any of a set of wide characters .fi .SH DESCRIPTION The \fBwcsspn\fP() function is the wide-character equivalent of the -\fBstrspn\fP() function. +\fBstrspn\fP(3) function. It determines the length of the longest initial segment of \fIwcs\fP which consists entirely of wide-characters listed in \fIaccept\fP. In other diff --git a/man3/wcsstr.3 b/man3/wcsstr.3 index 6205da426..dbac85a4a 100644 --- a/man3/wcsstr.3 +++ b/man3/wcsstr.3 @@ -22,7 +22,7 @@ wcsstr \- locate a substring in a wide-character string .fi .SH DESCRIPTION The \fBwcsstr\fP() function is the wide-character equivalent of the -\fBstrstr\fP() function. +\fBstrstr\fP(3) function. It searches for the first occurrence of the wide-character string \fIneedle\fP (without its terminating L'\\0' character) as a substring in the wide-character string \fIhaystack\fP. diff --git a/man3/wcstoimax.3 b/man3/wcstoimax.3 index 73819a973..640abacac 100644 --- a/man3/wcstoimax.3 +++ b/man3/wcstoimax.3 @@ -35,9 +35,9 @@ wcstoimax, wcstoumax \- convert wide-character string to integer .fi .SH DESCRIPTION These functions are just like -.BR wcstol () +.BR wcstol (3) and -.BR wcstoul (), +.BR wcstoul (3), except that they return a value of type .I intmax_t and diff --git a/man3/wcstok.3 b/man3/wcstok.3 index 353e4f954..9b3690a53 100644 --- a/man3/wcstok.3 +++ b/man3/wcstok.3 @@ -22,7 +22,7 @@ wcstok \- split wide-character string into tokens .fi .SH DESCRIPTION The \fBwcstok\fP() function is the wide-character equivalent of the -\fBstrtok\fP() function, +\fBstrtok\fP(3) function, with an added argument to make it multithread-safe. It can be used to split a wide-character string \fIwcs\fP into tokens, where a token is diff --git a/man3/wcstombs.3 b/man3/wcstombs.3 index 84d9f4173..e2ece052e 100644 --- a/man3/wcstombs.3 +++ b/man3/wcstombs.3 @@ -48,16 +48,16 @@ The programmer must ensure that there is room for at least \fIn\fP bytes at \fIdest\fP. .PP If \fIdest\fP is NULL, \fIn\fP is ignored, and the conversion proceeds as -above, except that the converted bytes are not written out to memory, and that -no length limit exists. +above, except that the converted bytes are not written out to memory, +and that no length limit exists. .PP In order to avoid the case 2 above, the programmer should make sure \fIn\fP is greater or equal to \fIwcstombs(NULL,src,0)+1\fP. .SH "RETURN VALUE" The \fBwcstombs\fP() function returns the number of bytes that make up the converted part of multibyte sequence, not including the terminating null byte. -If a wide character was encountered which could not be converted, (size_t)(\-1) -is returned. +If a wide character was encountered which could not be +converted, (size_t)(\-1) is returned. .SH "CONFORMING TO" C99. .SH "SEE ALSO" diff --git a/man3/wctob.3 b/man3/wctob.3 index a163c3844..267638e6a 100644 --- a/man3/wctob.3 +++ b/man3/wctob.3 @@ -47,4 +47,4 @@ This function should never be used. Internationalized programs must never distinguish single-byte and multi-byte characters. Use the function -\fBwctomb\fP() instead. +\fBwctomb\fP(3) instead. diff --git a/man3/wctype.3 b/man3/wctype.3 index 4df2abb98..c8c50486d 100644 --- a/man3/wctype.3 +++ b/man3/wctype.3 @@ -27,7 +27,7 @@ In other words, it represents a class of wide characters. This type's nature is implementation dependent, but the special value \fI(wctype_t)0\fP denotes an invalid property. Nonzero \fBwctype_t\fP values -can be passed to the \fBiswctype\fP() function +can be passed to the \fBiswctype\fP(3) function to actually test whether a given wide character has the property. .PP @@ -36,18 +36,18 @@ The set of valid names depends on the LC_CTYPE category of the current locale, but the following names are valid in all locales. .nf - "alnum" \- realizes the \fBisalnum\fP() classification function - "alpha" \- realizes the \fBisalpha\fP() classification function - "blank" \- realizes the \fBisblank\fP() classification function - "cntrl" \- realizes the \fBiscntrl\fP() classification function - "digit" \- realizes the \fBisdigit\fP() classification function - "graph" \- realizes the \fBisgraph\fP() classification function - "lower" \- realizes the \fBislower\fP() classification function - "print" \- realizes the \fBisprint\fP() classification function - "punct" \- realizes the \fBispunct\fP() classification function - "space" \- realizes the \fBisspace\fP() classification function - "upper" \- realizes the \fBisupper\fP() classification function - "xdigit" \- realizes the \fBisxdigit\fP() classification function + "alnum" \- realizes the \fBisalnum\fP(3) classification function + "alpha" \- realizes the \fBisalpha\fP(3) classification function + "blank" \- realizes the \fBisblank\fP(3) classification function + "cntrl" \- realizes the \fBiscntrl\fP(3) classification function + "digit" \- realizes the \fBisdigit\fP(3) classification function + "graph" \- realizes the \fBisgraph\fP(3) classification function + "lower" \- realizes the \fBislower\fP(3) classification function + "print" \- realizes the \fBisprint\fP(3) classification function + "punct" \- realizes the \fBispunct\fP(3) classification function + "space" \- realizes the \fBisspace\fP(3) classification function + "upper" \- realizes the \fBisupper\fP(3) classification function + "xdigit" \- realizes the \fBisxdigit\fP(3) classification function .fi .SH "RETURN VALUE" The \fBwctype\fP() function returns a property descriptor diff --git a/man3/wmemchr.3 b/man3/wmemchr.3 index 7b4274229..03ce6a93a 100644 --- a/man3/wmemchr.3 +++ b/man3/wmemchr.3 @@ -22,7 +22,7 @@ wmemchr \- search a wide character in a wide-character array .fi .SH DESCRIPTION The \fBwmemchr\fP() function is the wide-character equivalent of the -\fBmemchr\fP() function. +\fBmemchr\fP(3) function. It searches the \fIn\fP wide characters starting at \fIs\fP for the first occurrence of the wide character \fIc\fP. .SH "RETURN VALUE" diff --git a/man3/wmemcmp.3 b/man3/wmemcmp.3 index c46e9a87a..3f8ecad96 100644 --- a/man3/wmemcmp.3 +++ b/man3/wmemcmp.3 @@ -21,7 +21,7 @@ wmemcmp \- compare two arrays of wide-characters .fi .SH DESCRIPTION The \fBwmemcmp\fP() function is the wide-character equivalent of the -\fBmemcmp\fP() function. +\fBmemcmp\fP(3) function. It compares the \fIn\fP wide-characters starting at \fIs1\fP and the \fIn\fP wide-characters starting at \fIs2\fP. .SH "RETURN VALUE" diff --git a/man3/wmemcpy.3 b/man3/wmemcpy.3 index 03daa8c5b..35f690b86 100644 --- a/man3/wmemcpy.3 +++ b/man3/wmemcpy.3 @@ -22,7 +22,7 @@ wmemcpy \- copy an array of wide-characters .fi .SH DESCRIPTION The \fBwmemcpy\fP() function is the wide-character equivalent of the -\fBmemcpy\fP() function. +\fBmemcpy\fP(3) function. It copies \fIn\fP wide characters from the array starting at \fIsrc\fP to the array starting at \fIdest\fP. .PP diff --git a/man3/wmemmove.3 b/man3/wmemmove.3 index 3d7e04431..4e75a9b35 100644 --- a/man3/wmemmove.3 +++ b/man3/wmemmove.3 @@ -22,7 +22,7 @@ wmemmove \- copy an array of wide-characters .fi .SH DESCRIPTION The \fBwmemmove\fP() function is the wide-character equivalent of the -\fBmemmove\fP() function. +\fBmemmove\fP(3) function. It copies \fIn\fP wide characters from the array starting at \fIsrc\fP to the array starting at \fIdest\fP. The arrays may diff --git a/man3/wmemset.3 b/man3/wmemset.3 index c5eb3c925..382c3295b 100644 --- a/man3/wmemset.3 +++ b/man3/wmemset.3 @@ -22,7 +22,7 @@ wmemset \- fill an array of wide-characters with a constant wide character .fi .SH DESCRIPTION The \fBwmemset\fP() function is the wide-character equivalent of the -\fBmemset\fP() function. +\fBmemset\fP(3) function. It fills the array of \fIn\fP wide-characters starting at \fIwcs\fP with \fIn\fP copies of the wide character \fIwc\fP. .SH "RETURN VALUE" diff --git a/man3/wprintf.3 b/man3/wprintf.3 index 963e218c4..eee2f510d 100644 --- a/man3/wprintf.3 +++ b/man3/wprintf.3 @@ -35,19 +35,19 @@ wide-character output conversion .SH DESCRIPTION The \fBwprintf\fP() family of functions is the wide-character equivalent of the -\fBprintf\fP() family of functions. +\fBprintf\fP(3) family of functions. It performs formatted output of wide characters. .PP The \fBwprintf\fP() and \fBvwprintf\fP() functions perform wide-character output to \fBstdout\fP. \fBstdout\fP must not be byte oriented; see function -\fBfwide\fP() for more information. +\fBfwide\fP(3) for more information. .PP The \fBfwprintf\fP() and \fBvfwprintf\fP() functions perform wide-character output to \fIstream\fP. \fIstream\fP must not be byte oriented; see function -\fBfwide\fP() for more information. +\fBfwide\fP(3) for more information. .PP The \fBswprintf\fP() and \fBvswprintf\fP() functions perform wide-character output @@ -57,8 +57,8 @@ room for at least \fImaxlen\fP wide characters at \fIwcs\fP. .PP These functions are like -the \fBprintf\fP(), \fBvprintf\fP(), \fBfprintf\fP(), -\fBvfprintf\fP(), \fBsprintf\fP(), \fBvsprintf\fP() +the \fBprintf\fP(3), \fBvprintf\fP(3), \fBfprintf\fP(3), +\fBvfprintf\fP(3), \fBsprintf\fP(3), \fBvsprintf\fP(3) functions except for the following differences: .TP @@ -70,8 +70,8 @@ The output consists of wide characters, not bytes. .TP .B \(bu \fBswprintf\fP() and \fBvswprintf\fP() take a \fImaxlen\fP argument, -\fBsprintf\fP() and \fBvsprintf\fP() do not. -(\fBsnprintf\fP() and \fBvsnprintf\fP() +\fBsprintf\fP(3) and \fBvsprintf\fP()3 do not. +(\fBsnprintf\fP(3) and \fBvsnprintf\fP(3) take a \fImaxlen\fP argument, but these functions do not return \-1 upon buffer overflow on Linux.) .PP @@ -83,7 +83,7 @@ If no modifier is present, the .I int argument is converted to a wide character by a call to the -.BR btowc () +.BR btowc (3) function, and the resulting wide character is written. If an .B l @@ -101,7 +101,7 @@ argument is expected to be a pointer to an array of character type in the initial shift state. Characters from the array are converted to wide characters (each by a call to the -.BR mbrtowc () +.BR mbrtowc (3) function with a conversion state starting in the initial state before the first byte). The resulting wide characters are written up to @@ -165,8 +165,8 @@ Therefore, in internationalized programs, the \fIformat\fP string should consist of ASCII wide characters only, or should be constructed at run time in an internationalized way (e.g. using -.BR gettext () +.BR gettext (3) or -.BR iconv (), +.BR iconv (3), followed by -.BR mbstowcs ()). +.BR mbstowcs (3)). diff --git a/man3/xdr.3 b/man3/xdr.3 index 582954413..45b07b96f 100644 --- a/man3/xdr.3 +++ b/man3/xdr.3 @@ -411,11 +411,10 @@ Similarly, when a stream's input buffer is empty, .I readit is called. The behavior of these two routines is similar to -the -system calls -.BR read () +the system calls +.BR read (2) and -.BR write (), +.BR write (2), except that .I handle is passed to the former routines as the first parameter. @@ -608,11 +607,11 @@ or Warning: the destroy routine associated with such .SM XDR streams calls -.BR fflush () +.BR fflush (3) on the .I file stream, but never -.BR fclose (). +.BR fclose (3). .br .if t .ne 9 .LP