diff options
Diffstat (limited to 'man3')
48 files changed, 252 insertions, 218 deletions
diff --git a/man3/ctime.3 b/man3/ctime.3 index 15c85171e9..bb1b4a6fdd 100644 --- a/man3/ctime.3 +++ b/man3/ctime.3 @@ -414,7 +414,6 @@ The glibc version of \fIstruct tm\fP has additional fields .PP .in +4n .EX -.sp const char *tm_zone; /* Timezone abbreviation */ .EE .in diff --git a/man3/dysize.3 b/man3/dysize.3 index a906d5b232..1b2796ca25 100644 --- a/man3/dysize.3 +++ b/man3/dysize.3 @@ -44,9 +44,13 @@ Feature Test Macro Requirements for glibc (see .SH DESCRIPTION The function returns 365 for a normal year and 366 for a leap year. The calculation for leap year is based on: -.sp +.PP +.in +4n +.EX (year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0) -.sp +.EE +.in +.PP The formula is defined in the macro .I __isleap(year) also found in diff --git a/man3/fenv.3 b/man3/fenv.3 index 40c6c1bf43..1c8a8b1000 100644 --- a/man3/fenv.3 +++ b/man3/fenv.3 @@ -315,20 +315,18 @@ and to set individual floating-point traps, and .BR fegetexcept () to query the state. -.sp +.PP .nf +.EX .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" -.br .B "#include <fenv.h>" .sp .BI "int feenableexcept(int " excepts ); -.br .BI "int fedisableexcept(int " excepts ); -.br .B "int fegetexcept(void);" -.br +.EE .fi -.LP +.PP The .BR feenableexcept () and diff --git a/man3/fmtmsg.3 b/man3/fmtmsg.3 index 59c1756ff6..a7a7b1aea5 100644 --- a/man3/fmtmsg.3 +++ b/man3/fmtmsg.3 @@ -80,8 +80,7 @@ is a synonym for The .I classification argument is the sum of values describing 4 types of information. -.br -.sp +.PP The first value defines the output channel. .TP 12n .B MM_PRINT @@ -187,19 +186,19 @@ print nothing. If the user puts .B SEV_LEVEL with a format like -.sp +.PP .RS SEV_LEVEL=[description[:description[:...]]] .RE -.sp +.PP in the environment of the process before the first call to .BR fmtmsg (), where each description is of the form -.sp +.PP .RS severity-keyword,level,printstring .RE -.sp +.PP then .BR fmtmsg () will also accept the indicated values for the level (in addition to diff --git a/man3/ftok.3 b/man3/ftok.3 index 657dcda67e..859a05f132 100644 --- a/man3/ftok.3 +++ b/man3/ftok.3 @@ -83,10 +83,12 @@ T} Thread safety MT-Safe POSIX.1-2001, POSIX.1-2008. .SH NOTES On some ancient systems, the prototype was: -.sp -.RS +.PP +.in +4n +.EX .BI "key_t ftok(char *" pathname ", char " proj_id ); -.RE +.EE +.in .PP Today, .I proj_id diff --git a/man3/ftw.3 b/man3/ftw.3 index 7af24dc101..e9a358a7c9 100644 --- a/man3/ftw.3 +++ b/man3/ftw.3 @@ -311,7 +311,7 @@ If set, stay within the same filesystem If set, do not follow symbolic links. (This is what you want.) If not set, symbolic links are followed, but no file is reported twice. -.sp +.IP If \fBFTW_PHYS\fP is not set, but \fBFTW_DEPTH\fP is set, then the function .IR fn () diff --git a/man3/getaddrinfo.3 b/man3/getaddrinfo.3 index d7bf8b650c..77376fbc10 100644 --- a/man3/getaddrinfo.3 +++ b/man3/getaddrinfo.3 @@ -116,8 +116,8 @@ struct addrinfo { char *ai_canonname; struct addrinfo *ai_next; }; -.fi .in +.fi .PP The .I hints diff --git a/man3/getgrent_r.3 b/man3/getgrent_r.3 index 452df644c0..274b2aad1a 100644 --- a/man3/getgrent_r.3 +++ b/man3/getgrent_r.3 @@ -151,28 +151,28 @@ the POSIX version of functions like .BR getpwnam_r (3). Other systems use the prototype .sp -.nf .in +4n +.nf struct group *getgrent_r(struct group *grp, char *buf, int buflen); -.in .fi +.in .sp or, better, .sp -.nf .in +4n +.nf int getgrent_r(struct group *grp, char *buf, int buflen, FILE **gr_fp); -.in .fi +.in .SH NOTES The function .BR getgrent_r () is not really reentrant since it shares the reading position in the stream with all other threads. .SH EXAMPLE -.nf +.EX #define _GNU_SOURCE #include <grp.h> #include <stdio.h> @@ -202,7 +202,7 @@ main(void) endgrent(); exit(EXIT_SUCCESS); } -.fi +.EE .\" perhaps add error checking - should use strerror_r .\" #include <errno.h> .\" #include <stdlib.h> diff --git a/man3/gethostbyname.3 b/man3/gethostbyname.3 index 9859cfdf3a..0b415b0cea 100644 --- a/man3/gethostbyname.3 +++ b/man3/gethostbyname.3 @@ -261,7 +261,6 @@ The \fIhostent\fP structure is defined in \fI<netdb.h>\fP as follows: .sp .in +4n .nf -.ne 7 struct hostent { char *h_name; /* official name of host */ char **h_aliases; /* alias list */ diff --git a/man3/getopt.3 b/man3/getopt.3 index 2900b0c66a..c51c2bf8ab 100644 --- a/man3/getopt.3 +++ b/man3/getopt.3 @@ -227,9 +227,9 @@ is a pointer to the first element of an array of declared in .I <getopt.h> as +.PP .in +4n .nf -.sp struct option { const char *name; int has_arg; @@ -402,8 +402,8 @@ to handle two program options: with no associated value; and .IR "\-t val" , which expects an associated value. -.nf -.sp +.PP +.EX #include <unistd.h> #include <stdlib.h> #include <stdio.h> @@ -447,13 +447,13 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } -.fi +.EX .SS getopt_long() The following example program illustrates the use of .BR getopt_long () with most of its features. -.nf -.sp +.PP +.EE #include <stdio.h> /* for printf */ #include <stdlib.h> /* for exit */ #include <getopt.h> @@ -532,7 +532,7 @@ main(int argc, char **argv) exit(EXIT_SUCCESS); } -.fi +.EE .SH SEE ALSO .BR getopt (1), .BR getsubopt (3) diff --git a/man3/getpw.3 b/man3/getpw.3 index 9d6b121d3b..dfdc259e07 100644 --- a/man3/getpw.3 +++ b/man3/getpw.3 @@ -46,10 +46,12 @@ The function reconstructs the password line entry for the given user ID \fIuid\fP in the buffer \fIbuf\fP. The returned buffer contains a line of format -.sp -.RS +.PP +.in +4n +.EE .B name:passwd:uid:gid:gecos:dir:shell -.RE +.EE +.in .PP The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows: .sp diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3 index 752c69b9e1..0a1db7e5be 100644 --- a/man3/getpwent_r.3 +++ b/man3/getpwent_r.3 @@ -153,12 +153,12 @@ the POSIX version of functions like .BR getpwnam_r (3). Other systems use the prototype .sp -.nf .in +4n +.nf struct passwd * getpwent_r(struct passwd *pwd, char *buf, int buflen); -.in .fi +.in .sp or, better, .sp @@ -175,7 +175,7 @@ The function is not really reentrant since it shares the reading position in the stream with all other threads. .SH EXAMPLE -.nf +.EX #define _GNU_SOURCE #include <pwd.h> #include <stdio.h> @@ -199,7 +199,7 @@ main(void) endpwent(); exit(EXIT_SUCCESS); } -.fi +.EE .\" perhaps add error checking - should use strerror_r .\" #include <errno.h> .\" #include <stdlib.h> diff --git a/man3/getsubopt.3 b/man3/getsubopt.3 index deca6bc7ec..cb79812cf9 100644 --- a/man3/getsubopt.3 +++ b/man3/getsubopt.3 @@ -61,9 +61,11 @@ which is separated from the suboption name by an equal sign. The following is an example of the kind of string that might be passed in .IR optionp : -.sp +.PP .in +4n +.EX .B ro,name=xyz +.EE .in .PP The diff --git a/man3/getutent.3 b/man3/getutent.3 index 582b564347..d3ced4394c 100644 --- a/man3/getutent.3 +++ b/man3/getutent.3 @@ -225,20 +225,19 @@ with the prototype given above for All these functions are obsolete now on non-Linux systems. POSIX.1-2001 and POSIX.1-2008, following SUSv1, does not have any of these functions, but instead uses -.sp +.PP +.in +4n +.EX .B #include <utmpx.h> -.sp +.PP .B struct utmpx *getutxent(void); -.br .B struct utmpx *getutxid(const struct utmpx *); -.br .B struct utmpx *getutxline(const struct utmpx *); -.br .B struct utmpx *pututxline(const struct utmpx *); -.br .B void setutxent(void); -.br .B void endutxent(void); +.EE +.in .PP These functions are provided by glibc, and perform the same task as their equivalents without the "x", but use @@ -268,20 +267,21 @@ is an alias for .SS Glibc notes The above functions are not thread-safe. Glibc adds reentrant versions -.sp -.nf +.PP +.in +4n +.EX .B #include <utmp.h> -.sp +.PP .BI "int getutent_r(struct utmp *" ubuf ", struct utmp **" ubufp ); -.sp +.PP .BI "int getutid_r(struct utmp *" ut , .BI " struct utmp *" ubuf ", struct utmp **" ubufp ); -.sp +.PP .BI "int getutline_r(struct utmp *" ut , .BI " struct utmp *" ubuf ", struct utmp **" ubufp ); -.fi -.sp -.in -4n +.EE +.in +.PP Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .in diff --git a/man3/glob.3 b/man3/glob.3 index 767e2cd64a..73eac9d268 100644 --- a/man3/glob.3 +++ b/man3/glob.3 @@ -333,7 +333,9 @@ These will store their error code in One example of use is the following code, which simulates typing .sp .in +4n +.EX ls \-l *.c ../*.c +.EE .in .sp in the shell: diff --git a/man3/if_nameindex.3 b/man3/if_nameindex.3 index 477fb0a58d..06391172af 100644 --- a/man3/if_nameindex.3 +++ b/man3/if_nameindex.3 @@ -45,10 +45,10 @@ The structure contains at least the following entries: .sp .in +4n -.nf - unsigned int if_index; /* Index of interface (1, 2, ...) */ - char *if_name; /* Null-terminated name ("eth0", etc.) */ -.fi +.EX +unsigned int if_index; /* Index of interface (1, 2, ...) */ +char *if_name; /* Null-terminated name ("eth0", etc.) */ +.EE .in .PP The diff --git a/man3/inet.3 b/man3/inet.3 index e39e317f4a..168c352585 100644 --- a/man3/inet.3 +++ b/man3/inet.3 @@ -212,13 +212,13 @@ is defined in as: .sp .in +4n -.nf +.EX typedef uint32_t in_addr_t; struct in_addr { in_addr_t s_addr; }; -.fi +.EE .in .SH ATTRIBUTES For an explanation of the terms used in this section, see diff --git a/man3/lseek64.3 b/man3/lseek64.3 index 6579ab819a..c15afd4690 100644 --- a/man3/lseek64.3 +++ b/man3/lseek64.3 @@ -62,35 +62,35 @@ and .BR _llseek (2). .SS lseek() Prototype: -.nf -.sp +.PP .in +4n +.EX .BI "off_t lseek(int " fd ", off_t " offset ", int " whence ); +.EE .in -.fi -.sp +.PP .BR lseek (2) uses the type .IR off_t . This is a 32-bit signed type on 32-bit architectures, unless one compiles with -.nf -.sp +.PP .in +4n +.EX #define _FILE_OFFSET_BITS 64 +.EE .in -.sp -.fi +.PP in which case it is a 64-bit signed type. .SS lseek64() Prototype: -.nf -.sp +.PP .in +4n +.EX .BI "off64_t lseek64(int " fd ", off64_t " offset ", int " whence ); +.EE .in -.fi -.sp +.PP The library routine .BR lseek64 () uses a 64-bit type even when @@ -99,13 +99,13 @@ is a 32-bit type. Its prototype (and the type .IR off64_t ) is available only when one compiles with -.nf -.sp +.PP .in +4n +.EX #define _LARGEFILE64_SOURCE +.EE .in -.sp -.fi +.PP The function .BR lseek64 () .\" in glibc 2.0.94, not in 2.0.6 @@ -113,13 +113,13 @@ is available since glibc 2.1, and is defined to be an alias for .BR llseek (). .SS llseek() Prototype: -.nf -.sp +.PP .in +4n +.EX .BI "loff_t llseek(int " fd ", loff_t " offset ", int " whence ); +.EE .in -.fi -.sp +.PP The type .I loff_t is a 64-bit signed type. @@ -133,25 +133,25 @@ the above prototype, or something equivalent, to their own source. When users complained about data loss caused by a miscompilation of .BR e2fsck (8), glibc 2.1.3 added the link-time warning -.sp +.PP .in +4n "the \`llseek\' function may be dangerous; use \`lseek64\' instead." .in -.sp +.PP This makes this function unusable if one desires a warning-free compilation. .SS _llseek() On 32-bit architectures, this is the system call that is used to implement all of the above functions. The prototype is: -.nf -.sp +.PP .in +4n +.EX .BI "int _llseek(int " fd ", off_t " offset_hi ", off_t " offset_lo , .BI " loff_t *" result ", int " whence ); +.EE .in -.fi -.sp +.PP For more details, see .BR llseek (2). .PP diff --git a/man3/malloc_hook.3 b/man3/malloc_hook.3 index 98be198e09..9c871b9eee 100644 --- a/man3/malloc_hook.3 +++ b/man3/malloc_hook.3 @@ -91,8 +91,8 @@ Programmers should instead preempt calls to the relevant functions by defining and exporting functions such as "malloc" and "free". .SH EXAMPLE Here is a short example of how to use these variables. -.sp -.nf +.PP +.EX #include <stdio.h> #include <malloc.h> @@ -136,7 +136,7 @@ my_malloc_hook(size_t size, const void *caller) return result; } -.fi +.EX .SH SEE ALSO .BR mallinfo (3), .BR malloc (3), diff --git a/man3/mbrtowc.3 b/man3/mbrtowc.3 index 8d7ac21a84..5b2f32c9ec 100644 --- a/man3/mbrtowc.3 +++ b/man3/mbrtowc.3 @@ -143,9 +143,11 @@ object .I a can be initialized to the initial state by zeroing it, for example using -.sp +.PP .in +4n +.EE memset(&a, 0, sizeof(a)); +.EE .in .SH RETURN VALUE The diff --git a/man3/mkstemp.3 b/man3/mkstemp.3 index fa7db1fbbc..f35687e520 100644 --- a/man3/mkstemp.3 +++ b/man3/mkstemp.3 @@ -172,7 +172,7 @@ and .BR mkostemp (): The last six characters of \fItemplate\fP were not XXXXXX; now \fItemplate\fP is unchanged. -.sp +.IP For .BR mkstemps () and diff --git a/man3/mq_receive.3 b/man3/mq_receive.3 index 278265593b..d94b5a55b9 100644 --- a/man3/mq_receive.3 +++ b/man3/mq_receive.3 @@ -102,9 +102,9 @@ struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* nanoseconds */ }; - .fi .in +.PP If no message is available, and the timeout has already expired by the time of the call, .BR mq_timedreceive () diff --git a/man3/mq_send.3 b/man3/mq_send.3 index c8693d5338..5485a83238 100644 --- a/man3/mq_send.3 +++ b/man3/mq_send.3 @@ -104,16 +104,16 @@ points to a structure which specifies how long the call will block. This value is an absolute timeout in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC), specified in the following structure: -.sp +.PP .in +4n .nf struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* nanoseconds */ }; - .fi .in +.PP If the message queue is full, and the timeout has already expired by the time of the call, .BR mq_timedsend () diff --git a/man3/posix_spawn.3 b/man3/posix_spawn.3 index 3d123c9ca4..c6e0c61f16 100644 --- a/man3/posix_spawn.3 +++ b/man3/posix_spawn.3 @@ -576,16 +576,16 @@ In the first run, the command is executed in the child, and the .BR posix_spawn () call employs no file actions or attributes objects. -.sp +.PP .in +4 -.nf +.EX $ \fB./a.out date\fP PID of child: 7634 Tue Feb 1 19:47:50 CEST 2011 Child status: exited, status=0 -.fi +.EE .in -.sp +.PP In the next run, the .I \-c command-line option is used to create a file actions object that closes @@ -593,16 +593,16 @@ standard output in the child. Consequently, .BR date (1) fails when trying to perform output and exits with a status of 1. -.sp +.PP .in +4 -.nf +.EX $ \fB./a.out -c date\fP PID of child: 7636 date: write error: Bad file descriptor Child status: exited, status=1 -.fi +.EE .in -.sp +.PP In the next run, the .I \-s command-line option is used to create an attributes object that @@ -617,9 +617,9 @@ Therefore, to kill the child, is necessary .RB ( SIGKILL can't be blocked). -.sp +.PP .in +4 -.nf +.EX $ \fB./a.out -s sleep 60 &\fP [1] 7637 $ PID of child: 7638 @@ -628,19 +628,19 @@ $ \fBkill 7638\fP $ \fBkill -KILL 7638\fP $ Child status: killed by signal 9 [1]+ Done ./a.out -s sleep 60 -.fi +.EE .in -.sp +.PP When we try to execute a nonexistent command in the child, the .BR exec (3) fails and the child exits with a status of 127. -.sp +.PP .in +4 -.nf +.EX $ \fB./a.out xxxxx PID of child: 10190 Child status: exited, status=127 -.fi +.EE .in .SS Program source .EX diff --git a/man3/putgrent.3 b/man3/putgrent.3 index 15b74cf14d..f331af1b75 100644 --- a/man3/putgrent.3 +++ b/man3/putgrent.3 @@ -29,14 +29,14 @@ The is defined as follows: .sp .in +4n -.nf +.EX struct group { char *gr_name; /* group name */ char *gr_passwd; /* group password */ gid_t gr_gid; /* group ID */ char **gr_mem; /* group members */ }; -.fi +.EE .in .SH RETURN VALUE The function returns zero on success, and a nonzero value on error. diff --git a/man3/putpwent.3 b/man3/putpwent.3 index ed9c5256a9..b3fca6ee14 100644 --- a/man3/putpwent.3 +++ b/man3/putpwent.3 @@ -58,7 +58,7 @@ structure \fIp\fP in the file associated with \fIstream\fP. The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows: .sp .in +4n -.nf +.EX struct passwd { char *pw_name; /* username */ char *pw_passwd; /* user password */ @@ -68,7 +68,7 @@ struct passwd { char *pw_dir; /* home directory */ char *pw_shell; /* shell program */ }; -.fi +.EE .in .SH RETURN VALUE The diff --git a/man3/qsort.3 b/man3/qsort.3 index e6efbfea2a..85756215ff 100644 --- a/man3/qsort.3 +++ b/man3/qsort.3 @@ -124,8 +124,8 @@ For one example of use, see the example under .PP Another example is the following program, which sorts the strings given in its command-line arguments: -.sp -.nf +.PP +.EX #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -156,7 +156,7 @@ main(int argc, char *argv[]) puts(argv[j]); exit(EXIT_SUCCESS); } -.fi +.EE .SH SEE ALSO .BR sort (1), .BR alphasort (3), diff --git a/man3/raise.3 b/man3/raise.3 index ce9c56efa1..d20c54c439 100644 --- a/man3/raise.3 +++ b/man3/raise.3 @@ -40,19 +40,19 @@ The .BR raise () function sends a signal to the calling process or thread. In a single-threaded program it is equivalent to -.sp +.PP .in +4n -.nf +.EX kill(getpid(), sig); -.fi +.EE .in .PP In a multithreaded program it is equivalent to -.sp +.PP .in +4n -.nf +.EX pthread_kill(pthread_self(), sig); -.fi +.EE .in .PP If the signal causes a handler to be called, diff --git a/man3/rand.3 b/man3/rand.3 index e69d13afc1..17117d1002 100644 --- a/man3/rand.3 +++ b/man3/rand.3 @@ -185,7 +185,7 @@ and possibly useful when one needs the same sequence on two different machines. .sp .in +4n -.nf +.EX static unsigned long next = 1; /* RAND_MAX assumed to be 32767 */ @@ -197,16 +197,16 @@ int myrand(void) { void mysrand(unsigned int seed) { next = seed; } -.fi +.EE .in .PP The following program can be used to display the pseudo-random sequence produced by .BR rand () when given a particular seed. +.PP .in +4n -.nf - +.EX #include <stdlib.h> #include <stdio.h> @@ -232,7 +232,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } -.fi +.EX .in .SH SEE ALSO .BR drand48 (3), diff --git a/man3/rtime.3 b/man3/rtime.3 index 78faf05001..4cd71a6b22 100644 --- a/man3/rtime.3 +++ b/man3/rtime.3 @@ -99,8 +99,8 @@ is not commented out. The program connects to a computer called "linux". Using "localhost" does not work. The result is the localtime of the computer "linux". -.sp -.nf +.PP +.EX #include <stdio.h> #include <stdlib.h> #include <errno.h> @@ -136,7 +136,7 @@ main(void) exit(EXIT_SUCCESS); } -.fi +.EE .SH SEE ALSO .\" .BR netdate (1), .BR ntpdate (1), diff --git a/man3/setaliasent.3 b/man3/setaliasent.3 index f3a2cf368b..8e3091ce77 100644 --- a/man3/setaliasent.3 +++ b/man3/setaliasent.3 @@ -137,8 +137,8 @@ alias_ent *alias_getbyname(char *name); The following example compiles with .IR "gcc example.c \-o example" . It will dump all names in the alias database. -.sp -.nf +.PP +.EX #include <aliases.h> #include <stdio.h> #include <stdlib.h> @@ -162,7 +162,7 @@ main(void) endaliasent(); exit(EXIT_SUCCESS); } -.fi +.EE .SH SEE ALSO .BR getgrent (3), .BR getpwent (3), diff --git a/man3/setbuf.3 b/man3/setbuf.3 index 918445e4fa..eb90e5b406 100644 --- a/man3/setbuf.3 +++ b/man3/setbuf.3 @@ -201,8 +201,8 @@ points to still exists by the time .I stream is closed, which also happens at program termination. For example, the following is invalid: -.nf -.sp +.PP +.EX #include <stdio.h> int @@ -213,7 +213,7 @@ main(void) printf("Hello, world!\\n"); return 0; } -.fi +.PP .SH SEE ALSO .BR stdbuf (1), .BR fclose (3), diff --git a/man3/shm_open.3 b/man3/shm_open.3 index df89a1a72a..7624b4404b 100644 --- a/man3/shm_open.3 +++ b/man3/shm_open.3 @@ -109,7 +109,7 @@ is listed in .BR open (2). (Symbolic definitions of these constants can be obtained by including .IR <sys/stat.h> .) -.sp +.IP A new shared memory object initially has zero length\(emthe size of the object can be set using .BR ftruncate (2). diff --git a/man3/significand.3 b/man3/significand.3 index 4421fc1754..daa0d364e7 100644 --- a/man3/significand.3 +++ b/man3/significand.3 @@ -40,9 +40,11 @@ These functions return the mantissa of .I x scaled to the range [1,2). They are equivalent to -.sp +.PP .in +4n +.EX scalb(x, (double) \-ilogb(x)) +.EE .in .PP This function exists mainly for use in certain standardized tests diff --git a/man3/sigqueue.3 b/man3/sigqueue.3 index 4d77a37230..39b79667f8 100644 --- a/man3/sigqueue.3 +++ b/man3/sigqueue.3 @@ -59,12 +59,12 @@ argument is used to specify an accompanying item of data (either an integer or a pointer value) to be sent with the signal, and has the following type: .sp .in +4n -.nf +.EX union sigval { int sival_int; void *sival_ptr; }; -.fi +.EE .in .PP If the receiving process has installed a handler for this signal using the diff --git a/man3/statvfs.3 b/man3/statvfs.3 index 8f36837f3a..1059805621 100644 --- a/man3/statvfs.3 +++ b/man3/statvfs.3 @@ -236,13 +236,15 @@ function will use information from that field rather than scanning .IR /proc/mounts . .PP The glibc implementations of -.sp -.nf - pathconf(path, _PC_REC_XFER_ALIGN); - pathconf(path, _PC_ALLOC_SIZE_MIN); - pathconf(path, _PC_REC_MIN_XFER_SIZE); -.fi -.sp +.PP +.in +4n +.EX +pathconf(path, _PC_REC_XFER_ALIGN); +pathconf(path, _PC_ALLOC_SIZE_MIN); +pathconf(path, _PC_REC_MIN_XFER_SIZE); +.EE +.in +.PP respectively use the .IR f_frsize , .IR f_frsize , diff --git a/man3/strfromd.3 b/man3/strfromd.3 index 1563792507..b51380d5ea 100644 --- a/man3/strfromd.3 +++ b/man3/strfromd.3 @@ -84,7 +84,11 @@ and .BR strfroml () functions are equivalent to .PP - snprintf(str, n, format, fp); +.in +4n +.EX +snprintf(str, n, format, fp); +.EE +.in .PP except for the .I format @@ -189,7 +193,7 @@ T} Thread safety MT-Safe locale \^ Asynchronous signal safety AS-Unsafe heap \^ Asynchronous cancellation safety AC-Unsafe mem .TE -.sp +.sp 1 Note: these attributes are preliminary. .SH CONFORMING TO C99, ISO/IEC TS 18661-1. @@ -207,39 +211,39 @@ To convert the value 12.1 as a float type to a string using decimal notation, resulting in "12.100000": .sp .in +4 -.nf +.EX #define __STDC_WANT_IEC_60559_BFP_EXT__ #include <stdlib.h> int ssize = 10; char s[ssize]; strfromf(s, ssize, "%f", 12.1); -.fi +.EE .in .sp To convert the value 12.3456 as a float type to a string using decimal notation with two digits of precision, resulting in "12.35": .sp .in +4 -.nf +.EX #define __STDC_WANT_IEC_60559_BFP_EXT__ #include <stdlib.h> int ssize = 10; char s[ssize]; strfromf(s, ssize, "%.2f", 12.3456); -.fi +.EE .in .sp To convert the value 12.345e19 as a double type to a string using scientific notation with zero digits of precision, resulting in "1E+20": .sp .in +4 -.nf +.EX #define __STDC_WANT_IEC_60559_BFP_EXT__ #include <stdlib.h> int ssize = 10; char s[ssize]; strfromd(s, ssize, "%.E", 12.345e19); -.fi +.EE .in .SH SEE ALSO .BR atof (3), diff --git a/man3/strptime.3 b/man3/strptime.3 index f6b362aa0a..552cbdf1f2 100644 --- a/man3/strptime.3 +++ b/man3/strptime.3 @@ -59,7 +59,7 @@ is defined in as follows: .sp .in +4n -.nf +.EX struct tm { int tm_sec; /* Seconds (0-60) */ int tm_min; /* Minutes (0-59) */ @@ -71,7 +71,7 @@ struct tm { int tm_yday; /* Day in the year (0-365, 1 Jan = 0) */ int tm_isdst; /* Daylight saving time */ }; -.fi +.EE .in .PP For more details on the @@ -418,7 +418,7 @@ The following example demonstrates the use of and .BR strftime (3). .sp -.nf +.EX #define _XOPEN_SOURCE #include <stdio.h> #include <stdlib.h> @@ -437,7 +437,7 @@ main(void) puts(buf); exit(EXIT_SUCCESS); } -.fi +.EE .SH SEE ALSO .BR time (2), .BR getdate (3), diff --git a/man3/strtol.3 b/man3/strtol.3 index eaf430c085..c661e4fa5c 100644 --- a/man3/strtol.3 +++ b/man3/strtol.3 @@ -202,9 +202,9 @@ implementation-defined numeric strings. BSD also has .sp .in +4n -.nf +.EX .BI "quad_t strtoq(const char *" nptr ", char **" endptr ", int " base ); -.sp +.EX .in .fi with completely analogous definition. diff --git a/man3/strtoul.3 b/man3/strtoul.3 index 25b44a269e..9b78e49948 100644 --- a/man3/strtoul.3 +++ b/man3/strtoul.3 @@ -199,13 +199,13 @@ In locales other than the "C" locale, other strings may be accepted. supported.) .LP BSD also has -.sp +.PP .in +4n -.nf +.EX .BI "u_quad_t strtouq(const char *" nptr ", char **" endptr ", int " base ); -.sp -.in -4n -.fi +.EE +.in +.PP with completely analogous definition. Depending on the wordsize of the current architecture, this may be equivalent to diff --git a/man3/termios.3 b/man3/termios.3 index fe00a0951a..18881a06d0 100644 --- a/man3/termios.3 +++ b/man3/termios.3 @@ -94,13 +94,13 @@ that is a pointer to a \fItermios\fP structure. This structure contains at least the following members: .sp .in +4n -.nf +.EX tcflag_t c_iflag; /* input modes */ tcflag_t c_oflag; /* output modes */ tcflag_t c_cflag; /* control modes */ tcflag_t c_lflag; /* local modes */ cc_t c_cc[NCCS]; /* special characters */ -.fi +.EE .in .PP The values that may be assigned to these fields are described below. @@ -292,7 +292,7 @@ or .B _BSD_SOURCE or .BR _SVID_SOURCE ] -.sp +.IP (POSIX says that the baud speed is stored in the .I termios structure without specifying where precisely, and provides diff --git a/man3/tgamma.3 b/man3/tgamma.3 index 657ec2cb0d..568087bd49 100644 --- a/man3/tgamma.3 +++ b/man3/tgamma.3 @@ -43,26 +43,33 @@ These functions calculate the Gamma function of .IR x . .PP The Gamma function is defined by -.sp - Gamma(x) = integral from 0 to infinity of t^(x\-1) e^\-t dt -.sp +.PP +.RS +Gamma(x) = integral from 0 to infinity of t^(x\-1) e^\-t dt +.RE +.PP It is defined for every real number except for nonpositive integers. For nonnegative integral .I m one has -.sp - Gamma(m+1) = m! -.sp +.PP +.RS +Gamma(m+1) = m! +.RE +.PP and, more generally, for all .IR x : -.sp - Gamma(x+1) = x * Gamma(x) -.sp +.PP +.RS +Gamma(x+1) = x * Gamma(x) +.RE +.PP Furthermore, the following is valid for all values of .I x outside the poles: -.sp - Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x) +.PP +.RS +Gamma(x) * Gamma(1 \- x) = PI / sin(PI * x) .PP .SH RETURN VALUE On success, these functions return Gamma(x). diff --git a/man3/timeradd.3 b/man3/timeradd.3 index ac780e1f5d..cf6d061f77 100644 --- a/man3/timeradd.3 +++ b/man3/timeradd.3 @@ -62,12 +62,12 @@ structures, defined in as: .sp .in +4n -.nf +.EX struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec; /* microseconds */ }; -.fi +.EE .in .PP .BR timeradd () diff --git a/man3/tsearch.3 b/man3/tsearch.3 index 4d277867a0..a5aa962afd 100644 --- a/man3/tsearch.3 +++ b/man3/tsearch.3 @@ -233,8 +233,8 @@ implementation, but is not in the System V documentation. The following program inserts twelve random numbers into a binary tree, where duplicate numbers are collapsed, then prints the numbers in order. -.sp -.nf +.PP +.EX #define _GNU_SOURCE /* Expose declaration of tdestroy() */ #include <search.h> #include <stdlib.h> @@ -305,7 +305,7 @@ main(void) tdestroy(root, free); exit(EXIT_SUCCESS); } -.fi +.EE .SH SEE ALSO .BR bsearch (3), .BR hsearch (3), diff --git a/man3/tzset.3 b/man3/tzset.3 index 2ceef94234..70e455aceb 100644 --- a/man3/tzset.3 +++ b/man3/tzset.3 @@ -93,11 +93,13 @@ The value of can be one of two formats. The first format is a string of characters that directly represent the timezone to be used: -.sp -.RS +.PP +.in +4n +.EX .IR "std offset" [ dst [ offset ][, start [ /time ], end [ /time ]]] -.RE -.sp +.EE +.in +.PP There are no spaces in the specification. The \fIstd\fP string specifies an abbreviation for the timezone and must be three or more alphabetic characters. @@ -111,10 +113,12 @@ The \fIoffset\fP is positive if the local timezone is west of the Prime Meridian and negative if it is east. The hour must be between 0 and 24, and the minutes and seconds 00 and 59: -.sp -.RS +.PP +.in +4n +.EX .RI [ + | - ] hh [ :mm [ :ss ]] -.RE +.EE +.in .PP The \fIdst\fP string and \fIoffset\fP specify the name and offset for the corresponding daylight saving timezone. @@ -153,18 +157,21 @@ where the standard time (NZST) is 12 hours ahead of UTC, and daylight saving time (NZDT), 13 hours ahead of UTC, runs from the first Sunday in October to the third Sunday in March, and the changeovers happen at the default time of 02:00:00: -.nf - - TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0" -.fi +.in +4n +.EX +TZ="NZST-12:00:00NZDT-13:00:00,M10.1.0,M3.3.0" +.EE +.in .PP The second format specifies that the timezone information should be read from a file: -.sp -.RS +.PP +.in +4n +.EX :[filespec] -.RE -.sp +.EE +.in +.PP If the file specification \fIfilespec\fP is omitted, or its value cannot be interpreted, then Coordinated Universal Time (UTC) is used. If \fIfilespec\fP is given, it specifies another @@ -176,10 +183,12 @@ If the colon is omitted each of the above \fBTZ\fP formats will be tried. .PP Here's an example, once more for New Zealand: -.nf - - TZ=":Pacific/Auckland" -.fi +.PP +.in +4n +.EX +TZ=":Pacific/Auckland" +.EE +.in .SH ENVIRONMENT .TP .B TZ diff --git a/man3/updwtmp.3 b/man3/updwtmp.3 index 48ba242e09..fd997f4c86 100644 --- a/man3/updwtmp.3 +++ b/man3/updwtmp.3 @@ -81,12 +81,13 @@ Present on Solaris, NetBSD, and perhaps other systems. For consistency with the other "utmpx" functions (see .BR getutxent (3)), glibc provides (since version 2.1): -.nf -.sp +.PP +.in +4n +.EX .B #include <utmpx.h> -.sp .BI "void updwtmpx (const char *" wtmpx_file ", const struct utmpx *" utx ); -.fi +.EE +.in .PP This function performs the same task as .BR updwtmp (), diff --git a/man3/usleep.3 b/man3/usleep.3 index d2a95e35f5..9e317ab79c 100644 --- a/man3/usleep.3 +++ b/man3/usleep.3 @@ -125,15 +125,15 @@ in the range [0,1000000]. Programs will be more portable if they never mention this type explicitly. Use +.PP .in +4n -.nf -.sp +.EX #include <unistd.h> \&... unsigned int usecs; \&... usleep(usecs); -.fi +.EE .in .LP The interaction of this function with the @@ -151,7 +151,7 @@ signal, and with other timer functions such as .BR ualarm (3) is unspecified. .SH SEE ALSO -.BR alarm (2), +BR alarm (2), .BR getitimer (2), .BR nanosleep (2), .BR select (2), diff --git a/man3/wcstok.3 b/man3/wcstok.3 index fa82246aba..73aa0db829 100644 --- a/man3/wcstok.3 +++ b/man3/wcstok.3 @@ -97,8 +97,8 @@ wide-character string is destructively modified during the operation. .SH EXAMPLE The following code loops over the tokens contained in a wide-character string. -.sp -.nf +.PP +.EX wchar_t *wcs = ...; wchar_t *token; wchar_t *state; @@ -107,7 +107,7 @@ for (token = wcstok(wcs, " \\t\\n", &state); token = wcstok(NULL, " \\t\\n", &state)) { ... } -.fi +.EE .SH SEE ALSO .BR strtok (3), .BR wcschr (3) |
