From b9f027105cbfd10bf8657111936e86fbbe825b25 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 3 Apr 2007 15:32:52 +0000 Subject: [PATCH] ffix --- man2/epoll_wait.2 | 2 +- man2/lookup_dcookie.2 | 2 +- man2/set_thread_area.2 | 2 +- man3/addseverity.3 | 1 - man3/aio_cancel.3 | 1 - man3/aio_error.3 | 1 - man3/aio_fsync.3 | 1 - man3/aio_read.3 | 1 - man3/aio_return.3 | 1 - man3/aio_suspend.3 | 1 - man3/aio_write.3 | 1 - man3/argz_add.3 | 3 +- man3/atof.3 | 2 +- man3/atoi.3 | 2 +- man3/bindresvport.3 | 4 +- man3/bsearch.3 | 50 ++++++++-------- man3/canonicalize_file_name.3 | 2 +- man3/catgets.3 | 12 ++-- man3/dbopen.3 | 36 +++++------- man3/dprintf.3 | 2 +- man3/ecvt_r.3 | 10 ++-- man3/encrypt.3 | 5 +- man3/ether_aton.3 | 32 ++++------- man3/fcloseall.3 | 1 - man3/fenv.3 | 6 +- man3/fmemopen.3 | 2 +- man3/fread.3 | 8 ++- man3/getdate.3 | 2 +- man3/getgrouplist.3 | 4 +- man3/gethostbyname.3 | 39 ++++++------- man3/getumask.3 | 15 +++-- man3/glob.3 | 11 ++-- man3/hsearch.3 | 6 +- man3/hypot.3 | 2 +- man3/iconv.3 | 4 +- man3/killpg.3 | 6 +- man3/lseek64.3 | 2 +- man3/mbsnrtowcs.3 | 2 +- man3/mq_send.3 | 6 +- man3/openpty.3 | 8 ++- man3/ptsname.3 | 2 +- man3/putgrent.3 | 13 ++--- man3/putpwent.3 | 19 +++--- man3/recno.3 | 24 +++----- man3/rpmatch.3 | 2 +- man3/rtime.3 | 39 ++++++------- man3/rtnetlink.3 | 81 +++++++++++++------------- man3/setaliasent.3 | 40 +++++++------ man3/signbit.3 | 2 +- man3/sigsetops.3 | 3 - man3/strdup.3 | 2 - man3/strerror.3 | 4 -- man3/strfmon.3 | 7 ++- man3/strftime.3 | 2 +- man3/strptime.3 | 40 ++++++------- man3/strtoimax.3 | 4 +- man3/timegm.3 | 4 +- man3/tsearch.3 | 105 ++++++++++++++++++---------------- man3/unlocked_stdio.3 | 4 +- man3/wcsnrtombs.3 | 2 +- man3/wcsrtombs.3 | 2 +- man3/wcstoimax.3 | 4 +- man3/wcstok.3 | 6 +- man3/wordexp.3 | 21 +++---- man3/wprintf.3 | 4 +- man3/xcrypt.3 | 6 +- 66 files changed, 358 insertions(+), 382 deletions(-) diff --git a/man2/epoll_wait.2 b/man2/epoll_wait.2 index 1b6ba0a6d0..c26a5a808e 100644 --- a/man2/epoll_wait.2 +++ b/man2/epoll_wait.2 @@ -29,7 +29,7 @@ epoll_wait \- wait for an I/O event on an epoll file descriptor .nf .B #include .sp -.BI "int epoll_wait(int " epfd ", struct epoll_event * " events , +.BI "int epoll_wait(int " epfd ", struct epoll_event *" events , .BI " int " maxevents ", int " timeout); .fi .SH DESCRIPTION diff --git a/man2/lookup_dcookie.2 b/man2/lookup_dcookie.2 index aa8ca4df83..298124a40b 100644 --- a/man2/lookup_dcookie.2 +++ b/man2/lookup_dcookie.2 @@ -29,7 +29,7 @@ lookup_dcookie \- return a directory entry's path .SH SYNOPSIS .sp -.BI "int lookup_dcookie(u64 " cookie ", char * " buffer ", size_t " len ); +.BI "int lookup_dcookie(u64 " cookie ", char *" buffer ", size_t " len ); .SH DESCRIPTION Look up the full path of the directory entry specified by the value .I cookie diff --git a/man2/set_thread_area.2 b/man2/set_thread_area.2 index f16bece6d8..260265729a 100644 --- a/man2/set_thread_area.2 +++ b/man2/set_thread_area.2 @@ -12,7 +12,7 @@ set_thread_area \- Set a Thread Local Storage (TLS) area .br .B #include .sp -.BI "int set_thread_area (struct user_desc *" u_info ); +.BI "int set_thread_area(struct user_desc *" u_info ); .SH "DESCRIPTION" .BR set_thread_area () sets an entry in the current thread's Thread Local Storage (TLS) array. diff --git a/man3/addseverity.3 b/man3/addseverity.3 index 26bccf1ba1..792e08e307 100644 --- a/man3/addseverity.3 +++ b/man3/addseverity.3 @@ -14,7 +14,6 @@ addseverity \- introduce new severity classes .B #include .sp .BI "int addseverity(int " severity ", const char *" s ); -.sp .fi .SH DESCRIPTION This function allows the introduction of new severity classes diff --git a/man3/aio_cancel.3 b/man3/aio_cancel.3 index 2600626dd0..61991e94e6 100644 --- a/man3/aio_cancel.3 +++ b/man3/aio_cancel.3 @@ -28,7 +28,6 @@ aio_cancel \- cancel an outstanding asynchronous I/O request .B "#include " .sp .BI "int aio_cancel(int " fd ", struct aiocb *" aiocbp ); -.sp .SH DESCRIPTION The .BR aio_cancel () diff --git a/man3/aio_error.3 b/man3/aio_error.3 index 6af3562f79..4665a58617 100644 --- a/man3/aio_error.3 +++ b/man3/aio_error.3 @@ -28,7 +28,6 @@ aio_error \- get error status of asynchronous I/O operation .B "#include " .sp .BI "int aio_error(const struct aiocb *" aiocbp ); -.sp .SH DESCRIPTION The .BR aio_error () diff --git a/man3/aio_fsync.3 b/man3/aio_fsync.3 index ee4ee04af8..dce247d540 100644 --- a/man3/aio_fsync.3 +++ b/man3/aio_fsync.3 @@ -28,7 +28,6 @@ aio_fsync \- asynchronous file synchronization .B "#include " .sp .BI "int aio_fsync(int " op ", struct aiocb *" aiocbp ); -.sp .SH DESCRIPTION The .BR aio_fsync () diff --git a/man3/aio_read.3 b/man3/aio_read.3 index 2750d0376a..c48688c424 100644 --- a/man3/aio_read.3 +++ b/man3/aio_read.3 @@ -28,7 +28,6 @@ aio_read \- asynchronous read .B "#include " .sp .BI "int aio_read(struct aiocb *" aiocbp ); -.sp .SH DESCRIPTION The .BR aio_read () diff --git a/man3/aio_return.3 b/man3/aio_return.3 index 0d0b21b94b..1e1fa677c0 100644 --- a/man3/aio_return.3 +++ b/man3/aio_return.3 @@ -28,7 +28,6 @@ aio_return \- get return status of asynchronous I/O operation .B "#include " .sp .BI "ssize_t aio_return(struct aiocb *" aiocbp ); -.sp .SH DESCRIPTION The .BR aio_return () diff --git a/man3/aio_suspend.3 b/man3/aio_suspend.3 index 3e4941489c..53d81c4b7b 100644 --- a/man3/aio_suspend.3 +++ b/man3/aio_suspend.3 @@ -31,7 +31,6 @@ aio_suspend \- wait for asynchronous I/O operation or timeout .BI "int aio_suspend(const struct aiocb * const " cblist [], .br .BI " int " n ", const struct timespec *" timeout ); -.sp .fi .SH DESCRIPTION The diff --git a/man3/aio_write.3 b/man3/aio_write.3 index 19eaf85197..3e589e4559 100644 --- a/man3/aio_write.3 +++ b/man3/aio_write.3 @@ -28,7 +28,6 @@ aio_write \- asynchronous write .B "#include " .sp .BI "int aio_write(struct aiocb *" aiocbp ); -.sp .SH DESCRIPTION The .BR aio_write () diff --git a/man3/argz_add.3 b/man3/argz_add.3 index 7e78b3563d..af0089e135 100644 --- a/man3/argz_add.3 +++ b/man3/argz_add.3 @@ -46,7 +46,7 @@ argz_next, argz_replace, argz_stringify \- functions to handle an argz list .BI "argz_extract(char *" argz ", size_t " argz_len ", char **" argv ); .sp .BI "error_t" -.BI "argz_insert (char **" argz ", size_t *" argz_len ", char *" before , +.BI "argz_insert(char **" argz ", size_t *" argz_len ", char *" before , .ti 20n .BI "const char *" entry ); .sp @@ -60,7 +60,6 @@ argz_next, argz_replace, argz_stringify \- functions to handle an argz list .sp .BI "void" .BI "argz_stringify(char *" argz ", size_t " len ", int " sep ); -.sp .SH DESCRIPTION These functions are glibc-specific. .LP diff --git a/man3/atof.3 b/man3/atof.3 index b6784fee60..1c35265ca1 100644 --- a/man3/atof.3 +++ b/man3/atof.3 @@ -40,7 +40,7 @@ The \fBatof\fP() function converts the initial portion of the string pointed to by \fInptr\fP to double. The behaviour is the same as .sp .RS -.B strtod(nptr, (char **)NULL); +.B strtod(nptr, (char **) NULL); .RE .sp except that \fBatof\fP() does not detect errors. diff --git a/man3/atoi.3 b/man3/atoi.3 index 965f9bcab8..40f4927424 100644 --- a/man3/atoi.3 +++ b/man3/atoi.3 @@ -50,7 +50,7 @@ pointed to by \fInptr\fP to The behaviour is the same as .sp .RS -.B strtol(nptr, (char **)NULL, 10); +.B strtol(nptr, (char **) NULL, 10); .RE .sp except that \fBatoi\fP() does not detect errors. diff --git a/man3/bindresvport.3 b/man3/bindresvport.3 index 3f51fe3b65..d2d94416f1 100644 --- a/man3/bindresvport.3 +++ b/man3/bindresvport.3 @@ -9,9 +9,7 @@ bindresvport \- bind a socket to a privileged IP port .B #include .B #include .LP -.B int bindresvport(sd, sin) -.B int sd; -.B struct sockaddr_in \(**sin; +.BI "int bindresvport(int " sd ", struct sockaddr_in **" sin ); .fi .SH DESCRIPTION .LP diff --git a/man3/bsearch.3 b/man3/bsearch.3 index d747641646..cd8e124214 100644 --- a/man3/bsearch.3 +++ b/man3/bsearch.3 @@ -67,37 +67,41 @@ then retrieves desired elements using #include struct mi { - int nr; - char *name; + int nr; + char *name; } months[] = { - { 1, "jan" }, { 2, "feb" }, { 3, "mar" }, { 4, "apr" }, - { 5, "may" }, { 6, "jun" }, { 7, "jul" }, { 8, "aug" }, - { 9, "sep" }, {10, "oct" }, {11, "nov" }, {12, "dec" } + { 1, "jan" }, { 2, "feb" }, { 3, "mar" }, { 4, "apr" }, + { 5, "may" }, { 6, "jun" }, { 7, "jul" }, { 8, "aug" }, + { 9, "sep" }, {10, "oct" }, {11, "nov" }, {12, "dec" } }; #define nr_of_months (sizeof(months)/sizeof(months[0])) -static int compmi(const void *m1, const void *m2) { - struct mi *mi1 = (struct mi *) m1; - struct mi *mi2 = (struct mi *) m2; - return strcmp(mi1\->name, mi2\->name); +static int +compmi(const void *m1, const void *m2) +{ + struct mi *mi1 = (struct mi *) m1; + struct mi *mi2 = (struct mi *) m2; + return strcmp(mi1\->name, mi2\->name); } -int main(int argc, char **argv) { - int i; +int +main(int argc, char **argv) +{ + int i; - qsort(months, nr_of_months, sizeof(struct mi), compmi); - for (i = 1; i < argc; i++) { - struct mi key, *res; - key.name = argv[i]; - res = bsearch(&key, months, nr_of_months, - sizeof(struct mi), compmi); - if (res == NULL) - printf("'%s': unknown month\en", argv[i]); - else - printf("%s: month #%d\en", res->name, res->nr); - } - return 0; + qsort(months, nr_of_months, sizeof(struct mi), compmi); + for (i = 1; i < argc; i++) { + struct mi key, *res; + key.name = argv[i]; + res = bsearch(&key, months, nr_of_months, + sizeof(struct mi), compmi); + if (res == NULL) + printf("'%s': unknown month\en", argv[i]); + else + printf("%s: month #%d\en", res->name, res->nr); + } + return 0; } .fi .\" this example referred to in qsort.3 diff --git a/man3/canonicalize_file_name.3 b/man3/canonicalize_file_name.3 index 6113d53ee3..bd2b49341d 100644 --- a/man3/canonicalize_file_name.3 +++ b/man3/canonicalize_file_name.3 @@ -11,7 +11,7 @@ canonicalize_file_name \- return the canonicalized filename .br .B #include .sp -.BI "char *canonicalize_file_name (const char *" path ");" +.BI "char *canonicalize_file_name(const char *" path ");" .SH DESCRIPTION The call .I canonicalize_file_name(path) diff --git a/man3/catgets.3 b/man3/catgets.3 index f67546c0eb..7ea0403913 100644 --- a/man3/catgets.3 +++ b/man3/catgets.3 @@ -25,15 +25,13 @@ .SH NAME catgets \- get message from a message catalog .SH SYNOPSIS -.LP .nf -.ft B -#include -.ft +.B #include + +.BI "char *catgets(nl_catd " catalog ", int " set_number \ +", int " message_number , +.BI " const char *" message ); .fi -.LP -.BI "char *catgets(nl_catd " catalog ", int " set_number , -.BI "int " message_number ", const char *" message ); .SH DESCRIPTION .BR catgets () reads the message diff --git a/man3/dbopen.3 b/man3/dbopen.3 index 8fd0cf8486..95f2408611 100644 --- a/man3/dbopen.3 +++ b/man3/dbopen.3 @@ -37,16 +37,13 @@ dbopen \- database access methods .SH SYNOPSIS .nf -.ft B -#include -#include -#include +.B #include +.B #include +.B #include -DB * -dbopen(const char *file, int flags, int mode, DBTYPE type, -.ti +5 -const void *openinfo); -.ft R +.BI "DB *dbopen(const char *" file ", int " flags ", int " mode \ +", DBTYPE " type , +.BI " const void *" openinfo ); .fi .SH DESCRIPTION .BR dbopen () @@ -121,18 +118,15 @@ least the following fields: .sp .nf typedef struct { -.RS -DBTYPE type; -int (*close)(const DB *db); -int (*del)(const DB *db, const DBT *key, u_int flags); -int (*fd)(const DB *db); -int (*get)(const DB *db, DBT *key, DBT *data, u_int flags); -int (*put)(const DB *db, DBT *key, const DBT *data, -.ti +5 -u_int flags); -int (*sync)(const DB *db, u_int flags); -int (*seq)(const DB *db, DBT *key, DBT *data, u_int flags); -.RE + DBTYPE type; + int (*close)(const DB *db); + int (*del)(const DB *db, const DBT *key, u_int flags); + int (*fd)(const DB *db); + int (*get)(const DB *db, DBT *key, DBT *data, u_int flags); + int (*put)(const DB *db, DBT *key, const DBT *data, + u_int flags); + int (*sync)(const DB *db, u_int flags); + int (*seq)(const DB *db, DBT *key, DBT *data, u_int flags); } DB; .fi .PP diff --git a/man3/dprintf.3 b/man3/dprintf.3 index 12459e0666..9d75da13f4 100644 --- a/man3/dprintf.3 +++ b/man3/dprintf.3 @@ -54,7 +54,7 @@ usually some debugging version of .BR printf (), perhaps with a prototype like -.BI "void dprintf (int level, const char *" format ", ...);" +.BI "void dprintf(int level, const char *" format ", ...);" where the first parameter is a debugging level (and output is to .IR stderr ). diff --git a/man3/ecvt_r.3 b/man3/ecvt_r.3 index 7b715a7fa8..524f5bbd67 100644 --- a/man3/ecvt_r.3 +++ b/man3/ecvt_r.3 @@ -29,19 +29,21 @@ .SH NAME ecvt_r, fcvt_r, qecvt_r, qfcvt_r \- convert a floating-point number to a string .SH SYNOPSIS +.nf .B #include .sp .BI "int ecvt_r(double " number ", int " ndigits ", int *" decpt , -.BI "int *" sign ", char *" buf ", size_t " len ); +.BI " int *" sign ", char *" buf ", size_t " len ); .sp .BI "int fcvt_r(double " number ", int " ndigits ", int *" decpt , -.BI "int *" sign ", char *" buf ", size_t " len ); +.BI " int *" sign ", char *" buf ", size_t " len ); .sp .BI "int qecvt_r(long double " number ", int " ndigits ", int *" decpt , -.BI "int *" sign ", char *" buf ", size_t " len ); +.BI " int *" sign ", char *" buf ", size_t " len ); .sp .BI "int qfcvt_r(long double " number ", int " ndigits ", int *" decpt , -.BI "int *" sign ", char *" buf ", size_t " len ); +.BI " int *" sign ", char *" buf ", size_t " len ); +.fi .SH DESCRIPTION The functions .BR ecvt_r (), diff --git a/man3/encrypt.3 b/man3/encrypt.3 index 826ad88d63..d0d45c7803 100644 --- a/man3/encrypt.3 +++ b/man3/encrypt.3 @@ -41,9 +41,10 @@ encrypt, setkey, encrypt_r, setkey_r \- encrypt 64-bit messages .br .BI "#include " .sp -.BI "void setkey_r (const char *" key ", struct crypt_data *" data ); +.BI "void setkey_r(const char *" key ", struct crypt_data *" data ); .br -.BI "void encrypt_r (char *" block ", int " edflag ", struct crypt_data *" data ); +.BI "void encrypt_r(char *" block ", int " edflag \ +", struct crypt_data *" data ); .sp Each of these requires linking with .BR \-lcrypt . diff --git a/man3/ether_aton.3 b/man3/ether_aton.3 index c059435cfa..486e686ea4 100644 --- a/man3/ether_aton.3 +++ b/man3/ether_aton.3 @@ -36,29 +36,23 @@ ether_ntoa_r, ether_aton_r \- Ethernet address manipulation routines .nf .B #include .sp -.BI "char *" -.BI "ether_ntoa(const struct ether_addr *" addr ); +.BI "char *ether_ntoa(const struct ether_addr *" addr ); .sp -.BI "struct ether_addr *" -.BI "ether_aton(const char *" asc ); +.BI "struct ether_addr *ether_aton(const char *" asc ); .sp -.BI "int" -.BI "ether_ntohost(char *" hostname ", const struct ether_addr *" addr ); +.BI "int ether_ntohost(char *" hostname ", const struct ether_addr *" addr ); .sp -.BI "int" -.BI "ether_hostton(const char *" hostname ", struct ether_addr *" addr ); +.BI "int ether_hostton(const char *" hostname ", struct ether_addr *" addr ); .sp -.BI "int" -.BI "ether_line(const char *" line ", struct ether_addr *" addr , -.BI " char *" hostname ); +.BI "int ether_line(const char *" line ", struct ether_addr *" addr , +.BI " char *" hostname ); .sp /* GNU extensions */ .br -.BI "char *" -.BI "ether_ntoa_r(const struct ether_addr *" addr ", char *" buf ); +.BI "char *ether_ntoa_r(const struct ether_addr *" addr ", char *" buf ); .sp -.BI "struct ether_addr *" -.BI "ether_aton_r(const char *" asc ", struct ether_addr *" addr ); +.BI "struct ether_addr *ether_aton_r(const char *" asc , +.BI " struct ether_addr *" addr ); .fi .SH DESCRIPTION \fBether_aton\fP() converts the 48-bit Ethernet host address \fIasc\fP @@ -99,15 +93,13 @@ respectively, and do not use static buffers. .PP The structure \fIether_addr\fP is defined in \fInet/ethernet.h\fP as: .sp -.RS +.in +0.5i .nf -.ta 8n 16n struct ether_addr { - u_int8_t ether_addr_octet[6]; + u_int8_t ether_addr_octet[6]; } -.ta .fi -.RE +.in -0.5i .SH BUGS The glibc 2.2.5 implementation of ether_line() is broken. .SH "CONFORMING TO" diff --git a/man3/fcloseall.3 b/man3/fcloseall.3 index 05ae7f66bb..f300951dea 100644 --- a/man3/fcloseall.3 +++ b/man3/fcloseall.3 @@ -19,7 +19,6 @@ fcloseall \- close all open streams .SH SYNOPSIS .B #define _GNU_SOURCE -.sp .B #include .sp .B int fcloseall(void); diff --git a/man3/fenv.3 b/man3/fenv.3 index ed82494cda..c3632a943f 100644 --- a/man3/fenv.3 +++ b/man3/fenv.3 @@ -229,11 +229,11 @@ to query the state. .br .B "#include " .sp -.BI "int feenableexcept (int " excepts ); +.BI "int feenableexcept(int " excepts ); .br -.BI "int fedisableexcept (int " excepts ); +.BI "int fedisableexcept(int " excepts ); .br -.BI "int fegetexcept (void);" +.BI "int fegetexcept(void);" .br .fi .LP diff --git a/man3/fmemopen.3 b/man3/fmemopen.3 index 0b31911dd3..ebf4c08d5b 100644 --- a/man3/fmemopen.3 +++ b/man3/fmemopen.3 @@ -13,7 +13,7 @@ fmemopen, open_memstream \- open memory as stream .BI "FILE *fmemopen(void *"buf ", size_t "size "," .BI "const char *" mode ");" .sp -.BI "FILE *open_memstream(char ** "ptr ", size_t *" sizeloc ) +.BI "FILE *open_memstream(char **" ptr ", size_t *" sizeloc ) .SH DESCRIPTION The .BR fmemopen () diff --git a/man3/fread.3 b/man3/fread.3 index 61167426a1..cd044ee061 100644 --- a/man3/fread.3 +++ b/man3/fread.3 @@ -44,13 +44,15 @@ .SH NAME fread, fwrite \- binary stream input/output .SH SYNOPSIS +.nf .B #include .sp -.BI "size_t fread(void *" ptr ", size_t " size ", size_t " nmemb , -.BI "FILE *" stream ); +.BI "size_t fread(void *" ptr ", size_t " size ", size_t " nmemb \ +", FILE *" stream ); .sp .BI "size_t fwrite(const void *" ptr ", size_t " size ", size_t " nmemb , -.BI "FILE *" stream ); +.BI " FILE *" stream ); +.fi .SH DESCRIPTION The function .BR fread () diff --git a/man3/getdate.3 b/man3/getdate.3 index bc190d2c93..4074ca0de3 100644 --- a/man3/getdate.3 +++ b/man3/getdate.3 @@ -32,7 +32,7 @@ getdate \- convert a string to struct tm .br .B "#include " .sp -.BI "struct tm *getdate (const char *" string ); +.BI "struct tm *getdate(const char *" string ); .sp .BI "extern int getdate_err;" .sp 2 diff --git a/man3/getgrouplist.3 b/man3/getgrouplist.3 index 06a214ccb9..f7041545d0 100644 --- a/man3/getgrouplist.3 +++ b/man3/getgrouplist.3 @@ -10,8 +10,8 @@ getgrouplist \- list of groups a user belongs to .sp .B #include .sp -.BI "int getgrouplist (const char *" user ", gid_t " group , -.in 25 +.BI "int getgrouplist(const char *" user ", gid_t " group , +.in 24 .BI "gid_t *" groups ", int *" ngroups ); .SH DESCRIPTION The diff --git a/man3/gethostbyname.3 b/man3/gethostbyname.3 index 0ce15f7ed3..2f8a8b4c65 100644 --- a/man3/gethostbyname.3 +++ b/man3/gethostbyname.3 @@ -45,9 +45,8 @@ herror, hstrerror \- get network host entry .BI "struct hostent *gethostbyname(const char *" name ); .sp .BR "#include " " /* for AF_INET */" -.BI "struct hostent *" -.br -.BI "gethostbyaddr(const void *" addr ", int " len ", int " type ); +.BI "struct hostent *gethostbyaddr(const void *" addr \ +", int " len ", int " type ); .sp .BI "void sethostent(int " stayopen ); .sp @@ -56,26 +55,26 @@ herror, hstrerror \- get network host entry .BI "void herror(const char *" s ); .sp .BI "const char *hstrerror(int " err ); -.sp 2 +.sp /* System V/POSIX extension */ .br .B struct hostent *gethostent(void); -.sp 2 +.sp /* GNU extensions */ .br .BI "struct hostent *gethostbyname2(const char *" name ", int " af ); .sp .BI "int gethostent_r(" -.BI " struct hostent *" ret ", char *" buf ", size_t " buflen , -.BI " struct hostent **" result ", int *" h_errnop ); +.BI " struct hostent *" ret ", char *" buf ", size_t " buflen , +.BI " struct hostent **" result ", int *" h_errnop ); .sp .BI "int gethostbyname_r(const char *" name , -.BI " struct hostent *" ret ", char *" buf ", size_t " buflen , -.BI " struct hostent **" result ", int *" h_errnop ); +.BI " struct hostent *" ret ", char *" buf ", size_t " buflen , +.BI " struct hostent **" result ", int *" h_errnop ); .sp .BI "int gethostbyname2_r(const char *" name ", int " af, -.BI " struct hostent *" ret ", char *" buf ", size_t " buflen , -.BI " struct hostent **" result ", int *" h_errnop ); +.BI " struct hostent *" ret ", char *" buf ", size_t " buflen , +.BI " struct hostent **" result ", int *" h_errnop ); .fi .SH DESCRIPTION The @@ -158,21 +157,19 @@ followed by .PP The \fIhostent\fP structure is defined in \fI\fP as follows: .sp -.RS +.in +0.5i .nf .ne 7 -.ta 8n 16n 32n struct hostent { - char *h_name; /* official name of host */ - char **h_aliases; /* alias list */ - int h_addrtype; /* host address type */ - int h_length; /* length of address */ - char **h_addr_list; /* list of addresses */ + char *h_name; /* official name of host */ + char **h_aliases; /* alias list */ + int h_addrtype; /* host address type */ + int h_length; /* length of address */ + char **h_addr_list; /* list of addresses */ } -#define h_addr h_addr_list[0] /* for backward compatibility */ -.ta +#define h_addr h_addr_list[0] /* for backward compatibility */ .fi -.RE +.in -0.5i .PP The members of the \fIhostent\fP structure are: .TP diff --git a/man3/getumask.3 b/man3/getumask.3 index 685a13393e..86b63e6952 100644 --- a/man3/getumask.3 +++ b/man3/getumask.3 @@ -35,15 +35,18 @@ getumask \- get file creation mask .SH DESCRIPTION This function returns the current file creation mask. It is equivalent to -.RS +.in +0.5i .nf -mode_t getumask(void) { - mode_t mask = umask(0); - umask(mask); - return mask; + +mode_t getumask(void) +{ + mode_t mask = umask(0); + umask(mask); + return mask; } + .fi -.RE +.in -0.5i except that it is documented to be thread-safe (that is, shares a lock with the .BR umask () diff --git a/man3/glob.3 b/man3/glob.3 index fd9f6018bd..363e49c52d 100644 --- a/man3/glob.3 +++ b/man3/glob.3 @@ -71,13 +71,10 @@ present as an extension): .br .nf .in 10 -typedef struct -{ -.in 14 - size_t gl_pathc; /* Count of paths matched so far */ - char **gl_pathv; /* List of matched pathnames. */ - size_t gl_offs; /* Slots to reserve in `gl_pathv'. */ -.in 10 +typedef struct { + size_t gl_pathc; /* Count of paths matched so far */ + char **gl_pathv; /* List of matched pathnames. */ + size_t gl_offs; /* Slots to reserve in `gl_pathv'. */ } glob_t; .fi .PP diff --git a/man3/hsearch.3 b/man3/hsearch.3 index 1034dac3bf..e978bcbbfa 100644 --- a/man3/hsearch.3 +++ b/man3/hsearch.3 @@ -31,6 +31,7 @@ .SH NAME hcreate, hdestroy, hsearch \- hash table management .SH SYNOPSIS +.nf .B #include .sp .BI "int hcreate(size_t " nel ); @@ -45,10 +46,11 @@ hcreate, hdestroy, hsearch \- hash table management .sp .BI "int hcreate_r(size_t " nel ", struct hsearch_data *" tab ); .sp -.BI "int hsearch_r(ENTRY " item ", ACTION " action , -.BI "ENTRY **" ret ", struct hsearch_data *" tab ); +.BI "int hsearch_r(ENTRY " item ", ACTION " action ", ENTRY **" ret , +.BI " struct hsearch_data *" tab ); .sp .BI "void hdestroy_r(struct hsearch_data *" tab ); +.fi .SH DESCRIPTION The three functions .BR hcreate (), diff --git a/man3/hypot.3 b/man3/hypot.3 index 25a474db25..774a391d23 100644 --- a/man3/hypot.3 +++ b/man3/hypot.3 @@ -39,7 +39,7 @@ hypot, hypotf, hypotl \- Euclidean distance function .br .BI "float hypotf(float " x ", float " y ); .br -.BI "long double hypotl (long double " x ", long double " y ); +.BI "long double hypotl(long double " x ", long double " y ); .fi .sp Link with \-lm. diff --git a/man3/iconv.3 b/man3/iconv.3 index 5377c93c77..d79ac964b5 100644 --- a/man3/iconv.3 +++ b/man3/iconv.3 @@ -21,8 +21,8 @@ iconv \- perform character set conversion .B #include .sp .BI "size_t iconv(iconv_t " cd , -.BI " char **" inbuf ", size_t *" inbytesleft , -.BI " char **" outbuf ", size_t *" outbytesleft ); +.BI " char **" inbuf ", size_t *" inbytesleft , +.BI " char **" outbuf ", size_t *" outbytesleft ); .fi .SH DESCRIPTION The argument \fIcd\fP must be a conversion descriptor created using the diff --git a/man3/killpg.3 b/man3/killpg.3 index 446ada9f8c..861945a73a 100644 --- a/man3/killpg.3 +++ b/man3/killpg.3 @@ -45,10 +45,12 @@ is equal to zero. .PP If .I pgrp -is greater than 1, it is equivalent to +is greater than 1, it is equivalent to: .nf .sp -.BI kill(\-pgrp , signal ); +.in +0.5i +.B kill(\-pgrp , signal); +.in -0.5i .fi .SH "RETURN VALUE" The value returned is \-1 on error, or 0 for success. diff --git a/man3/lseek64.3 b/man3/lseek64.3 index ca1b0f89e5..9668ef11b2 100644 --- a/man3/lseek64.3 +++ b/man3/lseek64.3 @@ -149,7 +149,7 @@ The prototype is: .nf .sp .in +5n -.BI "int _llseek (int " fd ", off_t " offset_hi ", off_t " offset_lo , +.BI "int _llseek(int " fd ", off_t " offset_hi ", off_t " offset_lo , .BI "loff_t *" result ", int " whence ); .in -5n .fi diff --git a/man3/mbsnrtowcs.3 b/man3/mbsnrtowcs.3 index 623335c9f6..c3dd0a99ec 100644 --- a/man3/mbsnrtowcs.3 +++ b/man3/mbsnrtowcs.3 @@ -18,7 +18,7 @@ mbsnrtowcs \- convert a multibyte string to a wide character string .B #include .sp .BI "size_t mbsnrtowcs(wchar_t *" dest ", const char **" src , -.BI " size_t " nms ", size_t " len ", mbstate_t *" ps ); +.BI " size_t " nms ", size_t " len ", mbstate_t *" ps ); .fi .SH DESCRIPTION The \fBmbsnrtowcs\fP() function is like the \fBmbsrtowcs\fP() function, except that diff --git a/man3/mq_send.3 b/man3/mq_send.3 index c780003672..a041eea6b1 100644 --- a/man3/mq_send.3 +++ b/man3/mq_send.3 @@ -28,15 +28,15 @@ mq_send, mq_timedsend \- send a message to a message queue .B #include .sp .BI "mqd_t mq_send(mqd_t " mqdes ", const char *" msg_ptr , -.BI " size_t " msg_len ", unsigned " msg_prio ); +.BI " size_t " msg_len ", unsigned " msg_prio ); .sp .B #define _XOPEN_SOURCE 600 .B #include .B #include .sp .BI "mqd_t mq_timedsend(mqd_t " mqdes ", const char *" msg_ptr , -.BI " size_t " msg_len ", unsigned " msg_prio , -.BI " const struct timespec *" abs_timeout ); +.BI " size_t " msg_len ", unsigned " msg_prio , +.BI " const struct timespec *" abs_timeout ); .fi .SH DESCRIPTION .BR mq_send () diff --git a/man3/openpty.3 b/man3/openpty.3 index dd5d356a85..9209fc3587 100644 --- a/man3/openpty.3 +++ b/man3/openpty.3 @@ -33,19 +33,23 @@ .SH NAME openpty, login_tty, forkpty \- tty utility functions .SH SYNOPSIS +.nf .B #include \ /* for openpty and forkpty */ .br .B #include /* for login_tty */ .sp -.BI "int openpty(int *" amaster ", int *" aslave ", char *" name ", struct termios *" termp ", struct winsize * " winp ); +.BI "int openpty(int *" amaster ", int *" aslave ", char *" name , +.BI " struct termios *" termp ", struct winsize *" winp ); .sp .BI "int login_tty(int " fd ); .sp -.BI "pid_t forkpty(int *" amaster ", char *" name ", struct termios *" termp ", struct winsize *" winp ); +.BI "pid_t forkpty(int *" amaster ", char *" name ", struct termios *" termp , +.BI " struct winsize *" winp ); .sp Link with \-lutil. +.fi .SH DESCRIPTION The .BR openpty () diff --git a/man3/ptsname.3 b/man3/ptsname.3 index 4469d922a4..f2122bf47c 100644 --- a/man3/ptsname.3 +++ b/man3/ptsname.3 @@ -18,7 +18,7 @@ ptsname, ptsname_r \- get the name of the slave pseudo-terminal .br .B #include .sp -.BI "char *ptsname_r(int " fd ", char * " buf ", size_t " buflen ");" +.BI "char *ptsname_r(int " fd ", char *" buf ", size_t " buflen ");" .fi .SH DESCRIPTION The diff --git a/man3/putgrent.3 b/man3/putgrent.3 index 4dae937579..35e1f12177 100644 --- a/man3/putgrent.3 +++ b/man3/putgrent.3 @@ -10,7 +10,6 @@ putgrent \- write a group database entry to a file .B #include .sp .BI "int putgrent(const struct group *" grp ", FILE *" fp ); -.sp .SH DESCRIPTION The .BR putgrent () @@ -23,16 +22,16 @@ The list of group members must be NULL terminated or NULL initialized. .sp The struct group is defined as follows: .sp -.RS +.in +0.5i .nf struct group { - char *gr_name; /* group name */ - char *gr_passwd; /* group password */ - gid_t gr_gid; /* group ID */ - char **gr_mem; /* group members */ + char *gr_name; /* group name */ + char *gr_passwd; /* group password */ + gid_t gr_gid; /* group ID */ + char **gr_mem; /* group members */ }; .fi -.RE +.in -0.5i .SH "RETURN VALUE" The function returns zero on success, and a non-zero value on error. .SH "CONFORMING TO" diff --git a/man3/putpwent.3 b/man3/putpwent.3 index c62bed0682..b5da3b69ef 100644 --- a/man3/putpwent.3 +++ b/man3/putpwent.3 @@ -42,21 +42,20 @@ structure \fIp\fP in the file associated with \fIstream\fP. .PP The \fIpasswd\fP structure is defined in \fI\fP as follows: .sp -.RS +.in +0.5i .nf -.ta 8n 16n 32n struct passwd { - char *pw_name; /* user name */ - char *pw_passwd; /* user password */ - uid_t pw_uid; /* user ID */ - gid_t pw_gid; /* group ID */ - char *pw_gecos; /* real name */ - char *pw_dir; /* home directory */ - char *pw_shell; /* shell program */ + char *pw_name; /* user name */ + char *pw_passwd; /* user password */ + uid_t pw_uid; /* user ID */ + gid_t pw_gid; /* group ID */ + char *pw_gecos; /* real name */ + char *pw_dir; /* home directory */ + char *pw_shell; /* shell program */ }; .ta .fi -.RE +.in -0.5i .SH "RETURN VALUE" The \fBputpwent\fP() function returns 0 on success, or \-1 if an error occurs. diff --git a/man3/recno.3 b/man3/recno.3 index 8f02f17859..8e1f017710 100644 --- a/man3/recno.3 +++ b/man3/recno.3 @@ -64,23 +64,17 @@ The recno access method specific data structure provided to .I dbopen is defined in the include file as follows: .PP +.nf typedef struct { -.RS -u_long flags; -.br -u_int cachesize; -.br -u_int psize; -.br -int lorder; -.br -size_t reclen; -.br -u_char bval; -.br -char *bfname; -.RE + u_long flags; + u_int cachesize; + u_int psize; + int lorder; + size_t reclen; + u_char bval; + char *bfname; } RECNOINFO; +.fi .PP The elements of this structure are defined as follows: .TP diff --git a/man3/rpmatch.3 b/man3/rpmatch.3 index 50cde896aa..d8831bd1ed 100644 --- a/man3/rpmatch.3 +++ b/man3/rpmatch.3 @@ -32,7 +32,7 @@ rpmatch \- determine if the answer to a question is affirmative or negative \fB#define _SVID_SOURCE \fB#include -\fBint rpmatch (const char *\fIresponse\fB); +\fBint rpmatch(const char *\fIresponse\fB); .fi .SH DESCRIPTION \fBrpmatch\fP() handles a user response to yes or no questions, with diff --git a/man3/rtime.3 b/man3/rtime.3 index f4e55db1ac..4334e50150 100644 --- a/man3/rtime.3 +++ b/man3/rtime.3 @@ -9,13 +9,12 @@ .SH NAME rtime \- get time from a remote machine .SH SYNOPSIS -.sp +.nf .B "#include " .sp -.BI "int rtime(struct sockaddr_in *" addrp , -.BI "struct rpc_timeval *" timep , -.BI "struct rpc_timeval *" timeout ); -.sp +.BI "int rtime(struct sockaddr_in *" addrp ", struct rpc_timeval *" timep , +.BI " struct rpc_timeval *" timeout ); +.fi .SH DESCRIPTION This function uses the Time Server Protocol as described in RFC\ 868 to obtain the time from a remote machine. @@ -70,24 +69,24 @@ int use_tcp = 0; char *servername = "linux"; int main() { - struct sockaddr_in name; - struct rpc_timeval time1 = {0,0}; - struct rpc_timeval timeout = {1,0}; - struct hostent *hent; - int ret; + struct sockaddr_in name; + struct rpc_timeval time1 = {0,0}; + struct rpc_timeval timeout = {1,0}; + struct hostent *hent; + int ret; - memset((char *)&name, 0, sizeof(name)); - sethostent(1); - hent = gethostbyname(servername); - memcpy((char *)&name.sin_addr, hent->h_addr, hent->h_length); + memset((char *)&name, 0, sizeof(name)); + sethostent(1); + hent = gethostbyname(servername); + memcpy((char *)&name.sin_addr, hent->h_addr, hent->h_length); - ret = rtime(&name, &time1, use_tcp ? NULL : &timeout); - if (ret < 0) - perror("rtime error"); - else - printf("%s", ctime((time_t *)&time1.tv_sec)); + ret = rtime(&name, &time1, use_tcp ? NULL : &timeout); + if (ret < 0) + perror("rtime error"); + else + printf("%s", ctime((time_t *) &time1.tv_sec)); - return 0; + return 0; } .fi .SH "NOTES" diff --git a/man3/rtnetlink.3 b/man3/rtnetlink.3 index 9deb2524cd..4fa90e4539 100644 --- a/man3/rtnetlink.3 +++ b/man3/rtnetlink.3 @@ -16,20 +16,21 @@ rtnetlink \- Macros to manipulate rtnetlink messages .br .B #include -.BI "rtnetlink_socket = socket(PF_NETLINK, int " socket_type ", NETLINK_ROUTE);" -.br -.B int RTA_OK(struct rtattr *rta, int rtabuflen); -.br -.B void *RTA_DATA(struct rtattr *rta); -.br -.B unsigned int RTA_PAYLOAD(struct rtattr *rta); -.br -.B struct rtattr *RTA_NEXT(struct rtattr *rta, unsigned int rtabuflen); -.br -.B unsigned int RTA_LENGTH(unsigned int length); -.br -.B unsigned int RTA_SPACE(unsigned int length); -.br +.BI "rtnetlink_socket = socket(PF_NETLINK, int " socket_type \ +", NETLINK_ROUTE);" +.sp +.BI "int RTA_OK(struct rtattr *" rta ", int " rtabuflen ); +.sp +.BI "void *RTA_DATA(struct rtattr *" rta ); +.sp +.BI "unsigned int RTA_PAYLOAD(struct rtattr *" rta ); +.sp +.BI "struct rtattr *RTA_NEXT(struct rtattr *" rta \ +", unsigned int " rtabuflen ); +.sp +.BI "unsigned int RTA_LENGTH(unsigned int " length ); +.sp +.BI "unsigned int RTA_SPACE(unsigned int "length ); .SH DESCRIPTION All .BR rtnetlink (7) @@ -37,7 +38,6 @@ messages consist of a .BR netlink (7) message header and appended attributes. The attributes should be only manipulated using the macros provided here. - .PP .BI RTA_OK( rta ", " attrlen ) returns true if @@ -74,41 +74,40 @@ bytes of data plus the header. returns the amount of space which will be needed in the message with .I len bytes of data. - .SH EXAMPLE .\" FIXME would be better to use libnetlink in the EXAMPLE code here Creating a rtnetlink message to set a MTU of a device. .nf - struct { - struct nlmsghdr nh; - struct ifinfomsg if; - char attrbuf[512]; - } req; - struct rtattr *rta; - unsigned int mtu = 1000; - int rtnetlink_sk = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); + struct { + struct nlmsghdr nh; + struct ifinfomsg if; + char attrbuf[512]; + } req; - memset(&req, 0, sizeof(req)); - req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); - req.nh.nlmsg_flags = NLM_F_REQUEST; - req.nh.nlmsg_type = RTML_NEWLINK; - req.if.ifi_family = AF_UNSPEC; - req.if.ifi_index = INTERFACE_INDEX; - req.if.ifi_change = 0xffffffff; /* ???*/ - rta = (struct rtattr *)(((char *) &req) + - NLMSG_ALIGN(n->nlmsg_len)); - rta->rta_type = IFLA_MTU; - rta->rta_len = sizeof(unsigned int); - req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len) + - RTA_LENGTH(sizeof(mtu)); - memcpy(RTA_DATA(rta), &mtu, sizeof (mtu)); - send(rtnetlink_sk, &req, req.n.nlmsg_len); -.fi + struct rtattr *rta; + unsigned int mtu = 1000; + int rtnetlink_sk = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); + + memset(&req, 0, sizeof(req)); + req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); + req.nh.nlmsg_flags = NLM_F_REQUEST; + req.nh.nlmsg_type = RTML_NEWLINK; + req.if.ifi_family = AF_UNSPEC; + req.if.ifi_index = INTERFACE_INDEX; + req.if.ifi_change = 0xffffffff; /* ???*/ + rta = (struct rtattr *)(((char *) &req) + + NLMSG_ALIGN(n->nlmsg_len)); + rta->rta_type = IFLA_MTU; + rta->rta_len = sizeof(unsigned int); + req.n.nlmsg_len = NLMSG_ALIGN(req.n.nlmsg_len) + + RTA_LENGTH(sizeof(mtu)); + memcpy(RTA_DATA(rta), &mtu, sizeof (mtu)); + send(rtnetlink_sk, &req, req.n.nlmsg_len); +.fi .SH BUGS This manual page is lacking and incomplete. - .SH "SEE ALSO" .BR netlink (3), .BR netlink (7), diff --git a/man3/setaliasent.3 b/man3/setaliasent.3 index 4f60e7c718..ddaf80e17e 100644 --- a/man3/setaliasent.3 +++ b/man3/setaliasent.3 @@ -18,16 +18,13 @@ getaliasbyname, getaliasbyname_r \- read an alias entry .sp .BI "int getaliasent_r(struct aliasent *" result "," .br -.BI " char *" buffer ", size_t " buflen ", struct aliasent **" res ); +.BI " char *" buffer ", size_t " buflen ", struct aliasent **" res ); .sp .BI "struct aliasent *getaliasbyname(const char *" name ); .sp -.BI "int getaliasbyname_r(const char *" name , +.BI "int getaliasbyname_r(const char *" name ", struct aliasent *" result , .br -.BI " struct aliasent *" result , -.br -.BI " char *" buffer ", size_t " buflen ", struct aliasent **" res ); -.sp +.BI " char *" buffer ", size_t " buflen ", struct aliasent **" res ); .SH DESCRIPTION One of the databases available with the Name Service Switch (NSS) is the aliases database, that contains mail aliases. (To find out @@ -51,27 +48,36 @@ The function closes the aliases database. .PP .BR getaliasent_r () -is the reentrant version of the previous function. The requested structure +is the reentrant version of the previous function. +The requested structure is stored via the first argument but the programmer needs to fill the other -arguments also. Not providing enough space causes the function to fail. +arguments also. +Not providing enough space causes the function to fail. .PP The function .BR getaliasbyname () -takes the name argument and searches the aliases database. The entry is -returned as a pointer to a struct aliasent. +takes the name argument and searches the aliases database. +The entry is returned as a pointer to a +.IR "struct aliasent" . .PP .BR getaliasbyname_r () -is the reentrant version of the previous function. The requested structure +is the reentrant version of the previous function. +The requested structure is stored via the second argument but the programmer need to fill the other -arguments also. Not providing enough space causes the function to fail. +arguments also. +Not providing enough space causes the function to fail. .PP -The struct aliasent is defined in . +The +.I "struct aliasent" +is defined in +.IR : .nf + struct aliasent { - char *alias_name; /* alias name */ - size_t alias_members_len; - char **alias_members; /* alias name list */ - int alias_local; + char *alias_name; /* alias name */ + size_t alias_members_len; + char **alias_members; /* alias name list */ + int alias_local; }; .fi .SH FILES diff --git a/man3/signbit.3 b/man3/signbit.3 index a9c13f8896..70ff57b6a9 100644 --- a/man3/signbit.3 +++ b/man3/signbit.3 @@ -7,7 +7,7 @@ signbit \- test sign of a real floating point number .SH SYNOPSIS .B "#include " .sp -.BI "int signbit (" X ");" +.BI "int signbit(" X ");" .sp Compile with \-std=c99; link with \-lm. .SH DESCRIPTION diff --git a/man3/sigsetops.3 b/man3/sigsetops.3 index 120a3e8e2c..aa749a1603 100644 --- a/man3/sigsetops.3 +++ b/man3/sigsetops.3 @@ -25,11 +25,9 @@ .\" and sigorset() .\" .TH SIGSETOPS 3 2005-11-17 "Linux 2.6.14" "Linux Programmer's Manual" - .SH NAME sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX signal set operations. - .SH SYNOPSIS .B #include .sp @@ -42,7 +40,6 @@ signal set operations. .BI "int sigdelset(sigset_t *" set ", int " signum ); .sp .BI "int sigismember(const sigset_t *" set ", int " signum ); - .SH DESCRIPTION The .BR sigsetops (3) diff --git a/man3/strdup.3 b/man3/strdup.3 index ce9dd56739..9136c2853e 100644 --- a/man3/strdup.3 +++ b/man3/strdup.3 @@ -44,7 +44,6 @@ strdup, strndup, strdupa, strndupa \- duplicate a string .BI "char *strdupa(const char *" s ); .br .BI "char *strndupa(const char *" s ", size_t " n ); -.sp .fi .SH DESCRIPTION The \fBstrdup\fP() function returns a pointer to a new string which @@ -58,7 +57,6 @@ characters are copied, and a terminating null byte ('\\0') is added. \fBstrdupa\fP() and \fBstrndupa\fP() are similar, but use \fBalloca(3)\fP to allocate the buffer. They are only available when using the GNU GCC suite, and suffer from the same limitations described in \fBalloca(3)\fP. - .SH "RETURN VALUE" The \fBstrdup\fP() function returns a pointer to the duplicated string, or NULL if insufficient memory was available. diff --git a/man3/strerror.3 b/man3/strerror.3 index 2755d604e4..eb1de25f1c 100644 --- a/man3/strerror.3 +++ b/man3/strerror.3 @@ -93,7 +93,6 @@ then at most bytes are stored (the string may be truncated if .I buflen is too small) and the string always includes a terminating null byte. - .SH "RETURN VALUE" The \fBstrerror\fP() and \fBstrerror_r\fP() functions return the appropriate error description string, @@ -103,7 +102,6 @@ The XSI-compliant \fBstrerror_r\fP() function returns 0 on success; on error, \-1 is returned and .I errno is set to indicate the error. - .SH ERRORS .TP .B EINVAL @@ -113,7 +111,6 @@ is not a valid error number. .TP .B ERANGE Insufficient storage was supplied to contain the error description string. - .SH "CONFORMING TO" \fBstrerror\fP() is specified by POSIX.1-2001, C89, C99. \fBstrerror_r\fP() is specified by POSIX.1-2001. @@ -140,7 +137,6 @@ returns a string something like "Error nnn occurred" and sets to .B EINVAL if the error number is unknown. - .SH "SEE ALSO" .BR err (3), .BR errno (3), diff --git a/man3/strfmon.3 b/man3/strfmon.3 index 06d1d57a09..79df038b7a 100644 --- a/man3/strfmon.3 +++ b/man3/strfmon.3 @@ -24,12 +24,10 @@ .SH NAME strfmon \- convert monetary value to a string .SH SYNOPSIS -.nf .B #include .sp .BI "ssize_t strfmon(char *" s ", size_t " max ", const char *" format , .B "...);" -.fi .SH DESCRIPTION The \fBstrfmon\fP() function formats the specified amounts according to the format specification \fIformat\fP and places the @@ -111,13 +109,17 @@ to E2BIG, returns \-1, and the contents of the array is undefined. The call .RS .nf + strfmon(buf, sizeof(buf), "[%^=*#6n] [%=*#6i]", 1234.567, 1234.567); + .fi .RE outputs .RS + [ fl **1234,57] [ NLG **1 234,57] + .RE in the Dutch locale (with fl for "florijnen" and NLG for Netherlands Guilders). The grouping character is very ugly because it takes as much space @@ -128,6 +130,7 @@ and "NLG" is preceded by one and followed by two spaces. This may be a bug in the locale files. The Italian, Australian, Swiss and Portuguese locales yield .RS + [ L. **1235] [ ITL **1.235] .br [ $**1234.57] [ AUD **1,234.57] diff --git a/man3/strftime.3 b/man3/strftime.3 index 14843d685c..c10445ddd0 100644 --- a/man3/strftime.3 +++ b/man3/strftime.3 @@ -40,7 +40,7 @@ strftime \- format date and time .B #include .sp .BI "size_t strftime(char *" s ", size_t " max ", const char *" format , -.BI " const struct tm *" tm ); +.BI " const struct tm *" tm ); .fi .SH DESCRIPTION The \fBstrftime\fP() function formats the broken-down time \fItm\fP diff --git a/man3/strptime.3 b/man3/strptime.3 index 6b7a4eacf2..a732a3bfec 100644 --- a/man3/strptime.3 +++ b/man3/strptime.3 @@ -236,24 +236,21 @@ The year (offset from %C) using the locale's alternative numeric symbols. The broken-down time structure \fItm\fP is defined in \fI\fP as follows: .sp -.RS +.in +0.5i .nf -.ne 12 -.ta 8n 16n 32n struct tm { - int tm_sec; /* seconds */ - int tm_min; /* minutes */ - int tm_hour; /* hours */ - int tm_mday; /* day of the month */ - int tm_mon; /* month */ - int tm_year; /* year */ - int tm_wday; /* day of the week */ - int tm_yday; /* day in the year */ - int tm_isdst; /* daylight saving time */ + int tm_sec; /* seconds */ + int tm_min; /* minutes */ + int tm_hour; /* hours */ + int tm_mday; /* day of the month */ + int tm_mon; /* month */ + int tm_year; /* year */ + int tm_wday; /* day of the week */ + int tm_yday; /* day in the year */ + int tm_isdst; /* daylight saving time */ }; -.ta .fi -.RE +.in -0.5i .SH "RETURN VALUE" The return value of the function is a pointer to the first character not processed in this function call. In case the input string @@ -270,21 +267,18 @@ The following example demonstrates the use of \fBstrptime\fP() and \fBstrftime\fP(). .sp .nf -.ne 12 -.ta 8n 16n #include #include int main() { - struct tm tm; - char buf[255]; + struct tm tm; + char buf[255]; - strptime("2001-11-12 18:31:01", "%Y-%m-%d %H:%M:%S", &tm); - strftime(buf, sizeof(buf), "%d %b %Y %H:%M", &tm); - puts(buf); - return 0; + strptime("2001-11-12 18:31:01", "%Y-%m-%d %H:%M:%S", &tm); + strftime(buf, sizeof(buf), "%d %b %Y %H:%M", &tm); + puts(buf); + return 0; } -.ta .fi .SH "GNU EXTENSIONS" For reasons of symmetry, glibc tries to support for diff --git a/man3/strtoimax.3 b/man3/strtoimax.3 index 9fa25a05fd..5f623bee3e 100644 --- a/man3/strtoimax.3 +++ b/man3/strtoimax.3 @@ -27,9 +27,9 @@ strtoimax, strtoumax \- convert string to integer .nf .B #include .sp -.BI "intmax_t strtoimax (const char *" nptr ", char **" endptr ", int " base ); +.BI "intmax_t strtoimax(const char *" nptr ", char **" endptr ", int " base ); .br -.BI "uintmax_t strtoumax (const char *" nptr ", char **" endptr ", int " base ); +.BI "uintmax_t strtoumax(const char *" nptr ", char **" endptr ", int " base ); .fi .SH DESCRIPTION These functions are just like diff --git a/man3/timegm.3 b/man3/timegm.3 index 8cffcd3e74..0a8289dee9 100644 --- a/man3/timegm.3 +++ b/man3/timegm.3 @@ -27,9 +27,9 @@ timegm, timelocal \- inverses for gmtime and localtime .nf .B #include .sp -.BI "time_t timelocal (struct tm *" tm ); +.BI "time_t timelocal(struct tm *" tm ); .sp -.BI "time_t timegm (struct tm *" tm ); +.BI "time_t timegm(struct tm *" tm ); .SH DESCRIPTION The functions .BR timelocal () diff --git a/man3/tsearch.3 b/man3/tsearch.3 index d19fa033b0..acb1880933 100644 --- a/man3/tsearch.3 +++ b/man3/tsearch.3 @@ -29,15 +29,15 @@ tsearch, tfind, tdelete, twalk, tdestroy \- manage a binary tree .B #include .sp .BI "void *tsearch(const void *" key ", void **" rootp , -.BI " int(*" compar ")(const void *, const void *));" +.BI " int (*" compar ")(const void *, const void *));" .sp .BI "void *tfind(const void *" key ", const void **" rootp , -.BI " int(*" compar ")(const void *, const void *));" +.BI " int (*" compar ")(const void *, const void *));" .sp .BI "void *tdelete(const void *" key ", void **" rootp , -.BI " int(*" compar ")(const void *, const void *));" +.BI " int (*" compar ")(const void *, const void *));" .sp -.BI "void twalk(const void *" root ", void(*" action ")(const void *" nodep , +.BI "void twalk(const void *" root ", void (*" action ")(const void *" nodep , .BI " const VISIT " which , .BI " const int " depth "));" .sp @@ -45,7 +45,7 @@ tsearch, tfind, tdelete, twalk, tdestroy \- manage a binary tree .br .B #include .sp -.BI "void tdestroy (void *" root ", void (*" free_node ")(void *" nodep )); +.BI "void tdestroy(void *" root ", void (*" free_node ")(void *" nodep )); .RE .fi .SH DESCRIPTION @@ -133,60 +133,65 @@ tree, where duplicate numbers are collapsed, then prints the numbers in order. .sp .nf - #include - #include - #include - #include +#include +#include +#include +#include - void *root = NULL; +void *root = NULL; - void *xmalloc(unsigned n) { - void *p; - p = malloc(n); - if (p) return p; - fprintf(stderr, "insufficient memory\\n"); - exit(1); - } +void *xmalloc(unsigned n) +{ + void *p; + p = malloc(n); + if (p) + return p; + fprintf(stderr, "insufficient memory\\n"); + exit(1); +} - int compare(const void *pa, const void *pb) { - if (*(int *)pa < *(int *)pb) return \-1; - if (*(int *)pa > *(int *)pb) return 1; - return 0; - } +int compare(const void *pa, const void *pb) { + if (*(int *) pa < *(int *) pb) + return \-1; + if (*(int *) pa > *(int *) pb) + return 1; + return 0; +} - void action(const void *nodep, const VISIT which, const int depth) { - int *datap; +void action(const void *nodep, const VISIT which, const int depth) { + int *datap; - switch(which) { - case preorder: - break; - case postorder: - datap = *(int **)nodep; - printf("%6d\\n", *datap); - break; - case endorder: - break; - case leaf: - datap = *(int **)nodep; - printf("%6d\\n", *datap); - break; - } + switch(which) { + case preorder: + break; + case postorder: + datap = *(int **)nodep; + printf("%6d\\n", *datap); + break; + case endorder: + break; + case leaf: + datap = *(int **) nodep; + printf("%6d\\n", *datap); + break; } +} - int main() { - int i, *ptr; - void *val; +int main() { + int i, *ptr; + void *val; - srand(time(NULL)); - for (i = 0; i < 12; i++) { - ptr = (int *)xmalloc(sizeof(int)); - *ptr = rand()&0xff; - val = tsearch((void *)ptr, &root, compare); - if (val == NULL) exit(1); - } - twalk(root, action); - return 0; + srand(time(NULL)); + for (i = 0; i < 12; i++) { + ptr = (int *) xmalloc(sizeof(int)); + *ptr = rand() & 0xff; + val = tsearch((void *) ptr, &root, compare); + if (val == NULL) + exit(1); } + twalk(root, action); + return 0; +} .fi .SH "CONFORMING TO" SVr4, POSIX.1-2001. diff --git a/man3/unlocked_stdio.3 b/man3/unlocked_stdio.3 index bcbfdd3bfc..a1c9a4ca11 100644 --- a/man3/unlocked_stdio.3 +++ b/man3/unlocked_stdio.3 @@ -43,9 +43,9 @@ .BI "int fgetc_unlocked(FILE *" stream ); .BI "int fputc_unlocked(int " c ", FILE *" stream ); .BI "size_t fread_unlocked(void *" ptr ", size_t " size ", size_t " n , -.BI " FILE *" stream ); +.BI " FILE *" stream ); .BI "size_t fwrite_unlocked(const void *" ptr ", size_t " size ", size_t " n , -.BI " FILE *" stream ); +.BI " FILE *" stream ); .sp .B #define _GNU_SOURCE .B #include diff --git a/man3/wcsnrtombs.3 b/man3/wcsnrtombs.3 index 539298f0b0..e214c5634c 100644 --- a/man3/wcsnrtombs.3 +++ b/man3/wcsnrtombs.3 @@ -18,7 +18,7 @@ wcsnrtombs \- convert a wide character string to a multibyte string .B #include .sp .BI "size_t wcsnrtombs(char *" dest ", const wchar_t **" src ", size_t " nwc , -.BI " size_t " len ", mbstate_t *" ps ); +.BI " size_t " len ", mbstate_t *" ps ); .fi .SH DESCRIPTION The \fBwcsnrtombs\fP() function is like the \fBwcsrtombs\fP() function, diff --git a/man3/wcsrtombs.3 b/man3/wcsrtombs.3 index 67ef2ece65..1953773ecc 100644 --- a/man3/wcsrtombs.3 +++ b/man3/wcsrtombs.3 @@ -19,7 +19,7 @@ wcsrtombs \- convert a wide character string to a multibyte string .B #include .sp .BI "size_t wcsrtombs(char *" dest ", const wchar_t **" src , -.BI " size_t " len ", mbstate_t *" ps ); +.BI " size_t " len ", mbstate_t *" ps ); .fi .SH DESCRIPTION If \fIdest\fP is not a NULL pointer, the \fBwcsrtombs\fP() function converts diff --git a/man3/wcstoimax.3 b/man3/wcstoimax.3 index b01ef4c2b2..4c06a63fb8 100644 --- a/man3/wcstoimax.3 +++ b/man3/wcstoimax.3 @@ -29,9 +29,9 @@ wcstoimax, wcstoumax \- convert wide-character string to integer .br .B #include .sp -.BI "intmax_t wcstoimax (const wchar_t *" nptr ", wchar_t **" endptr ", int " base ); +.BI "intmax_t wcstoimax(const wchar_t *" nptr ", wchar_t **" endptr ", int " base ); .br -.BI "uintmax_t wcstoumax (const wchar_t *" nptr ", wchar_t **" endptr ", int " base ); +.BI "uintmax_t wcstoumax(const wchar_t *" nptr ", wchar_t **" endptr ", int " base ); .fi .SH DESCRIPTION These functions are just like diff --git a/man3/wcstok.3 b/man3/wcstok.3 index 05d743299c..cf47c6de2c 100644 --- a/man3/wcstok.3 +++ b/man3/wcstok.3 @@ -54,9 +54,9 @@ wchar_t *wcs = ...; wchar_t *token; wchar_t *state; for (token = wcstok(wcs, " \\t\\n", &state); - token != NULL; - token = wcstok(NULL, " \\t\\n", &state)) { - ... + token != NULL; + token = wcstok(NULL, " \\t\\n", &state)) { + ... } .fi .SH "CONFORMING TO" diff --git a/man3/wordexp.3 b/man3/wordexp.3 index a6ff0bd318..ea0d5b8f7e 100644 --- a/man3/wordexp.3 +++ b/man3/wordexp.3 @@ -80,17 +80,18 @@ First a small example. The output is approximately that of "ls [a-c]*.c". #include #include -int main(int argc, char **argv) { - wordexp_t p; - char **w; - int i; +int main(int argc, char **argv) +{ + wordexp_t p; + char **w; + int i; - wordexp("[a-c]*.c", &p, 0); - w = p.we_wordv; - for (i=0; i .sp .BI "int vwprintf(const wchar_t *" format ", va_list " args ); .BI "int vfwprintf(FILE *" stream ", const wchar_t *" format ", va_list " args ); .BI "int vswprintf(wchar_t *" wcs ", size_t " maxlen , -.BI " const wchar_t *" format ", va_list " args ); +.BI " const wchar_t *" format ", va_list " args ); .fi .SH DESCRIPTION The \fBwprintf\fP() family of functions is the wide-character equivalent of the diff --git a/man3/xcrypt.3 b/man3/xcrypt.3 index 2d3bf62c75..fc75c651a3 100644 --- a/man3/xcrypt.3 +++ b/man3/xcrypt.3 @@ -13,11 +13,11 @@ xencrypt, xdecrypt, passwd2des \- RFS password encryption .sp .B "#include " .sp -.BI "void passwd2des (char " *passwd ", char *" key ");" +.BI "void passwd2des(char " *passwd ", char *" key ");" .sp -.BI "int xencrypt (char *" secret ", char *" passwd ");" +.BI "int xencrypt(char *" secret ", char *" passwd ");" .sp -.BI "int xdecrypt (char *" secret ", char *" passwd ");" +.BI "int xdecrypt(char *" secret ", char *" passwd ");" .sp .SH DESCRIPTION The function -- 2.39.5