]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man3/: Don't use 'length' to refer to buffer size
authorAlejandro Colomar <alx@kernel.org>
Tue, 24 Dec 2024 22:10:28 +0000 (23:10 +0100)
committerAlejandro Colomar <alx@kernel.org>
Tue, 24 Dec 2024 22:10:28 +0000 (23:10 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
17 files changed:
man/man3/getgrent_r.3
man/man3/getgrnam.3
man/man3/gethostbyname.3
man/man3/getmntent.3
man/man3/getnetent_r.3
man/man3/getprotoent_r.3
man/man3/getpwent_r.3
man/man3/getpwnam.3
man/man3/getrpcent_r.3
man/man3/getservent_r.3
man/man3/getspnam.3
man/man3/ptsname.3
man/man3/rtnetlink.3
man/man3/setaliasent.3
man/man3/setnetgrent.3
man/man3/strerror.3
man/man3/ttyname.3

index 6b7962e6e79a799ef12db1b52220ea20d756c017..aec5fcd3c8cfaacbe8cb8e527e5a45ffcd62236e 100644 (file)
@@ -14,10 +14,10 @@ Standard C library
 .B #include <grp.h>
 .P
 .BI "int getgrent_r(struct group *restrict " gbuf ,
-.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "               char " buf "[restrict ." size "], size_t " size ,
 .BI "               struct group **restrict " gbufp );
 .BI "int fgetgrent_r(FILE *restrict " stream ", struct group *restrict " gbuf ,
-.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "               char " buf "[restrict ." size "], size_t " size ,
 .BI "               struct group **restrict " gbufp );
 .fi
 .P
@@ -83,7 +83,7 @@ that can hold a \fIstruct group\fP.
 And next the buffer
 .I buf
 of size
-.I buflen
+.I size
 that can hold additional strings.
 The result of these functions, the \fIstruct group\fP read from the stream,
 is stored in the provided buffer
@@ -150,8 +150,8 @@ Other systems use the prototype
 .P
 .in +4n
 .EX
-struct group *getgrent_r(struct group *grp, char *buf,
-                         int buflen);
+struct group *getgrent_r(struct group *grp, char buf[.size],
+                         int size);
 .EE
 .in
 .P
@@ -159,7 +159,7 @@ or, better,
 .P
 .in +4n
 .EX
-int getgrent_r(struct group *grp, char *buf, int buflen,
+int getgrent_r(struct group *grp, char buf[.size], int size,
                FILE **gr_fp);
 .EE
 .in
index aab9697074eac113112e7c76c3e80d904077da53..d87e095007b3f99282a46d7187ebbd5cfe18066c 100644 (file)
@@ -27,10 +27,10 @@ Standard C library
 .P
 .BI "int getgrnam_r(const char *restrict " name \
 ", struct group *restrict " grp ,
-.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "               char " buf "[restrict ." size "], size_t " size ,
 .BI "               struct group **restrict " result );
 .BI "int getgrgid_r(gid_t " gid ", struct group *restrict " grp ,
-.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "               char " buf "[restrict ." size "], size_t " size ,
 .BI "               struct group **restrict " result );
 .fi
 .P
@@ -98,7 +98,7 @@ The string fields pointed to by the members of the
 structure are stored in the buffer
 .I buf
 of size
-.IR buflen .
+.IR size .
 A pointer to the result (in case of success) or NULL (in case no entry
 was found or an error occurred) is stored in
 .IR *result .
index 1c55d5dd6cff8b85cb597f1ee6874c22c738615e..690a3b82e3d5fe102f56e7fe7737758a7ed351da 100644 (file)
@@ -51,7 +51,7 @@ Standard C library
 .BI "struct hostent *gethostbyname2(const char *" name ", int " af );
 .P
 .BI "int gethostent_r(struct hostent *restrict " ret ,
-.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                 char " buf "[restrict ." bufsize "], size_t " bufsize ,
 .BI "                 struct hostent **restrict " result ,
 .BI "                 int *restrict " h_errnop );
 .P
@@ -59,19 +59,19 @@ Standard C library
 .BI "int gethostbyaddr_r(const void " addr "[restrict ." size "], socklen_t " size ,
 .BI "                 int " type ,
 .BI "                 struct hostent *restrict " ret ,
-.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                 char " buf "[restrict ." bufsize "], size_t " bufsize ,
 .BI "                 struct hostent **restrict " result ,
 .BI "                 int *restrict " h_errnop );
 .B [[deprecated]]
 .BI "int gethostbyname_r(const char *restrict " name ,
 .BI "                 struct hostent *restrict " ret ,
-.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                 char " buf "[restrict ." bufsize "], size_t " bufsize ,
 .BI "                 struct hostent **restrict " result ,
 .BI "                 int *restrict " h_errnop );
 .B [[deprecated]]
 .BI "int gethostbyname2_r(const char *restrict " name ", int " af,
 .BI "                 struct hostent *restrict " ret ,
-.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                 char " buf "[restrict ." bufsize "], size_t " bufsize ,
 .BI "                 struct hostent **restrict " result ,
 .BI "                 int *restrict " h_errnop );
 .fi
@@ -512,7 +512,7 @@ structure
 which will be filled in on success, and a temporary work buffer
 .I buf
 of size
-.IR buflen .
+.IR bufsize .
 After the call,
 .I result
 will point to the result on success.
index 6d194d51e2c43965e546fedd23694723c29c7091..9f134d6ad71d0d3a1a7d80f46a683fadcf89d821 100644 (file)
@@ -38,7 +38,7 @@ Standard C library
 .P
 .BI "struct mntent *getmntent_r(FILE *restrict " streamp ,
 .BI "              struct mntent *restrict " mntbuf ,
-.BI "              char " buf "[restrict ." buflen "], int " buflen );
+.BI "              char " buf "[restrict ." size "], int " size );
 .fi
 .P
 .RS -4
@@ -135,7 +135,7 @@ and stores the strings pointed to by the entries in that structure
 in the provided array
 .I buf
 of size
-.IR buflen .
+.IR size .
 .P
 The
 .I mntent
index 5614c3cb8007d0370ad923c5345ef53bd7285074..8d6fcda73262b24611f83557561d8c99de2f4f2d 100644 (file)
@@ -16,17 +16,17 @@ Standard C library
 .B #include <netdb.h>
 .P
 .BI "int getnetent_r(struct netent *restrict " result_buf ,
-.BI "                char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                char " buf "[restrict ." size "], size_t " size ,
 .BI "                struct netent **restrict " result ,
 .BI "                int *restrict " h_errnop );
 .BI "int getnetbyname_r(const char *restrict " name ,
 .BI "                struct netent *restrict " result_buf ,
-.BI "                char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                char " buf "[restrict ." size "], size_t " size ,
 .BI "                struct netent **restrict " result ,
 .BI "                int *restrict " h_errnop );
 .BI "int getnetbyaddr_r(uint32_t " net ", int " type ,
 .BI "                struct netent *restrict " result_buf ,
-.BI "                char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                char " buf "[restrict ." size "], size_t " size ,
 .BI "                struct netent **restrict " result ,
 .BI "                int *restrict " h_errnop );
 .P
@@ -76,13 +76,13 @@ array is used to store the string fields pointed to by the returned
 structure.
 (The nonreentrant functions allocate these strings in static storage.)
 The size of this array is specified in
-.IR buflen .
+.IR size .
 If
 .I buf
 is too small, the call fails with the error
 .BR ERANGE ,
 and the caller must try again with a larger buffer.
-(A buffer of length 1024 bytes should be sufficient for most applications.)
+(A buffer of size 1024 bytes should be sufficient for most applications.)
 .\" I can find no information on the required/recommended buffer size;
 .\" the nonreentrant functions use a 1024 byte buffer -- mtk.
 .P
@@ -123,7 +123,7 @@ No more records in database.
 is too small.
 Try again with a larger buffer
 (and increased
-.IR buflen ).
+.IR size ).
 .SH ATTRIBUTES
 For an explanation of the terms used in this section, see
 .BR attributes (7).
index 08e87a0757d6b06f21d4f58c7872adff89eb749c..09c9092fab925ac4aca566da53286db198dd32b9 100644 (file)
@@ -16,15 +16,15 @@ Standard C library
 .B #include <netdb.h>
 .P
 .BI "int getprotoent_r(struct protoent *restrict " result_buf ,
-.BI "                  char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                  char " buf "[restrict ." size "], size_t " size ,
 .BI "                  struct protoent **restrict " result );
 .BI "int getprotobyname_r(const char *restrict " name ,
 .BI "                  struct protoent *restrict " result_buf ,
-.BI "                  char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                  char " buf "[restrict ." size "], size_t " size ,
 .BI "                  struct protoent **restrict " result );
 .BI "int getprotobynumber_r(int " proto ,
 .BI "                  struct protoent *restrict " result_buf ,
-.BI "                  char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                  char " buf "[restrict ." size "], size_t " size ,
 .BI "                  struct protoent **restrict " result );
 .P
 .fi
@@ -73,13 +73,13 @@ array is used to store the string fields pointed to by the returned
 structure.
 (The nonreentrant functions allocate these strings in static storage.)
 The size of this array is specified in
-.IR buflen .
+.IR size .
 If
 .I buf
 is too small, the call fails with the error
 .BR ERANGE ,
 and the caller must try again with a larger buffer.
-(A buffer of length 1024 bytes should be sufficient for most applications.)
+(A buffer of size 1024 bytes should be sufficient for most applications.)
 .\" I can find no information on the required/recommended buffer size;
 .\" the nonreentrant functions use a 1024 byte buffer.
 .\" The 1024 byte value is also what the Solaris man page suggests. -- mtk
@@ -113,7 +113,7 @@ No more records in database.
 is too small.
 Try again with a larger buffer
 (and increased
-.IR buflen ).
+.IR size ).
 .SH ATTRIBUTES
 For an explanation of the terms used in this section, see
 .BR attributes (7).
@@ -142,7 +142,7 @@ to retrieve the protocol record for the protocol named
 in its first command-line argument.
 If a second (integer) command-line argument is supplied,
 it is used as the initial value for
-.IR buflen ;
+.IR size ;
 if
 .BR getprotobyname_r ()
 fails with the error
@@ -154,11 +154,11 @@ The following shell session shows a couple of sample runs:
 .EX
 .RB "$" " ./a.out tcp 1"
 ERANGE! Retrying with larger buffer
-getprotobyname_r() returned: 0 (success)  (buflen=78)
+getprotobyname_r() returned: 0 (success)  (size=78)
 p_name=tcp; p_proto=6; aliases=TCP
 .RB "$" " ./a.out xxx 1"
 ERANGE! Retrying with larger buffer
-getprotobyname_r() returned: 0 (success)  (buflen=100)
+getprotobyname_r() returned: 0 (success)  (size=100)
 Call failed/record not found
 .EE
 .in
@@ -179,21 +179,21 @@ Call failed/record not found
 int
 main(int argc, char *argv[])
 {
-    int buflen, erange_cnt, s;
+    int size, erange_cnt, s;
     struct protoent result_buf;
     struct protoent *result;
     char buf[MAX_BUF];
 \&
     if (argc < 2) {
-        printf("Usage: %s proto\-name [buflen]\[rs]n", argv[0]);
+        printf("Usage: %s proto\-name [size]\[rs]n", argv[0]);
         exit(EXIT_FAILURE);
     }
 \&
-    buflen = 1024;
+    size = 1024;
     if (argc > 2)
-        buflen = atoi(argv[2]);
+        size = atoi(argv[2]);
 \&
-    if (buflen > MAX_BUF) {
+    if (size > MAX_BUF) {
         printf("Exceeded buffer limit (%d)\[rs]n", MAX_BUF);
         exit(EXIT_FAILURE);
     }
@@ -201,7 +201,7 @@ main(int argc, char *argv[])
     erange_cnt = 0;
     do {
         s = getprotobyname_r(argv[1], &result_buf,
-                             buf, buflen, &result);
+                             buf, size, &result);
         if (s == ERANGE) {
             if (erange_cnt == 0)
                 printf("ERANGE! Retrying with larger buffer\[rs]n");
@@ -210,18 +210,18 @@ main(int argc, char *argv[])
             /* Increment a byte at a time so we can see exactly
                what size buffer was required. */
 \&
-            buflen++;
+            size++;
 \&
-            if (buflen > MAX_BUF) {
+            if (size > MAX_BUF) {
                 printf("Exceeded buffer limit (%d)\[rs]n", MAX_BUF);
                 exit(EXIT_FAILURE);
             }
         }
     } while (s == ERANGE);
 \&
-    printf("getprotobyname_r() returned: %s  (buflen=%d)\[rs]n",
+    printf("getprotobyname_r() returned: %s  (size=%d)\[rs]n",
            (s == 0) ? "0 (success)" : (s == ENOENT) ? "ENOENT" :
-           strerror(s), buflen);
+           strerror(s), size);
 \&
     if (s != 0 || result == NULL) {
         printf("Call failed/record not found\[rs]n");
index ccb6266d57f7d363b1d09f23317135de7bc3dc29..bb502ea20138e60bec92e6f4f8748e1e8abcaffd 100644 (file)
@@ -14,11 +14,11 @@ Standard C library
 .B #include <pwd.h>
 .P
 .BI "int getpwent_r(struct passwd *restrict " pwbuf ,
-.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "               char " buf "[restrict ." size "], size_t " size ,
 .BI "               struct passwd **restrict " pwbufp );
 .BI "int fgetpwent_r(FILE *restrict " stream \
 ", struct passwd *restrict " pwbuf ,
-.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "               char " buf "[restrict ." size "], size_t " size ,
 .BI "               struct passwd **restrict " pwbufp );
 .fi
 .P
@@ -88,7 +88,7 @@ that can hold a \fIstruct passwd\fP.
 And next the buffer
 .I buf
 of size
-.I buflen
+.I size
 that can hold additional strings.
 The result of these functions, the \fIstruct passwd\fP read from the stream,
 is stored in the provided buffer
@@ -152,7 +152,7 @@ Other systems use the prototype
 .in +4n
 .EX
 struct passwd *
-getpwent_r(struct passwd *pwd, char *buf, int buflen);
+getpwent_r(struct passwd *pwd, char buf[.size], int size);
 .EE
 .in
 .P
@@ -161,7 +161,7 @@ or, better,
 .in +4n
 .EX
 int
-getpwent_r(struct passwd *pwd, char *buf, int buflen,
+getpwent_r(struct passwd *pwd, char buf[.size], int size,
            FILE **pw_fp);
 .EE
 .in
index 17b811f59f3d2f6c153f8c3ff00496d13841dfc7..0d41204a3b2bec0bfde805c9e305684e997fd9a6 100644 (file)
@@ -31,10 +31,10 @@ Standard C library
 .P
 .BI "int getpwnam_r(const char *restrict " name ", \
 struct passwd *restrict " pwd ,
-.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "               char " buf "[restrict ." size "], size_t " size ,
 .BI "               struct passwd **restrict " result );
 .BI "int getpwuid_r(uid_t " uid ", struct passwd *restrict " pwd ,
-.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "               char " buf "[restrict ." size "], size_t " size ,
 .BI "               struct passwd **restrict " result );
 .fi
 .P
@@ -104,7 +104,7 @@ The string fields pointed to by the members of the
 structure are stored in the buffer
 .I buf
 of size
-.IR buflen .
+.IR size .
 A pointer to the result (in case of success) or NULL (in case no entry
 was found or an error occurred) is stored in
 .IR *result .
index 33866ef7e7a3eea3904145afe589f6e99182918b..704c77a095832f2f955dafde4bbd681c077b4ff7 100644 (file)
@@ -15,14 +15,14 @@ Standard C library
 .nf
 .B #include <netdb.h>
 .P
-.BI "int getrpcent_r(struct rpcent *" result_buf ", char " buf [. buflen ],
-.BI "                size_t " buflen ", struct rpcent **" result );
+.BI "int getrpcent_r(struct rpcent *" result_buf ", char " buf [. size ],
+.BI "                size_t " size ", struct rpcent **" result );
 .BI "int getrpcbyname_r(const char *" name ,
-.BI "                struct rpcent *" result_buf ", char " buf [. buflen ],
-.BI "                size_t " buflen ", struct rpcent **" result );
+.BI "                struct rpcent *" result_buf ", char " buf [. size ],
+.BI "                size_t " size ", struct rpcent **" result );
 .BI "int getrpcbynumber_r(int " number ,
-.BI "                struct rpcent *" result_buf ", char " buf [. buflen ],
-.BI "                size_t " buflen ", struct rpcent **" result );
+.BI "                struct rpcent *" result_buf ", char " buf [. size ],
+.BI "                size_t " size ", struct rpcent **" result );
 .P
 .fi
 .RS -4
@@ -70,13 +70,13 @@ array is used to store the string fields pointed to by the returned
 structure.
 (The nonreentrant functions allocate these strings in static storage.)
 The size of this array is specified in
-.IR buflen .
+.IR size .
 If
 .I buf
 is too small, the call fails with the error
 .BR ERANGE ,
 and the caller must try again with a larger buffer.
-(A buffer of length 1024 bytes should be sufficient for most applications.)
+(A buffer of size 1024 bytes should be sufficient for most applications.)
 .\" I can find no information on the required/recommended buffer size;
 .\" the nonreentrant functions use a 1024 byte buffer -- mtk.
 .P
@@ -109,7 +109,7 @@ No more records in database.
 is too small.
 Try again with a larger buffer
 (and increased
-.IR buflen ).
+.IR size ).
 .SH ATTRIBUTES
 For an explanation of the terms used in this section, see
 .BR attributes (7).
index 83ea63885b94bdfbe5690319e760e77ba6de30b4..698e158a21fa809799732d25a4fb1da3a2433293 100644 (file)
@@ -16,17 +16,17 @@ Standard C library
 .B #include <netdb.h>
 .P
 .BI "int getservent_r(struct servent *restrict " result_buf ,
-.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                 char " buf "[restrict ." size "], size_t " size ,
 .BI "                 struct servent **restrict " result );
 .BI "int getservbyname_r(const char *restrict " name ,
 .BI "                 const char *restrict " proto ,
 .BI "                 struct servent *restrict " result_buf ,
-.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                 char " buf "[restrict ." size "], size_t " size ,
 .BI "                 struct servent **restrict " result );
 .BI "int getservbyport_r(int " port ,
 .BI "                 const char *restrict " proto ,
 .BI "                 struct servent *restrict " result_buf ,
-.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
+.BI "                 char " buf "[restrict ." size "], size_t " size ,
 .BI "                 struct servent **restrict " result );
 .P
 .fi
@@ -75,13 +75,13 @@ array is used to store the string fields pointed to by the returned
 structure.
 (The nonreentrant functions allocate these strings in static storage.)
 The size of this array is specified in
-.IR buflen .
+.IR size .
 If
 .I buf
 is too small, the call fails with the error
 .BR ERANGE ,
 and the caller must try again with a larger buffer.
-(A buffer of length 1024 bytes should be sufficient for most applications.)
+(A buffer of size 1024 bytes should be sufficient for most applications.)
 .\" I can find no information on the required/recommended buffer size;
 .\" the nonreentrant functions use a 1024 byte buffer -- mtk.
 .P
@@ -114,7 +114,7 @@ No more records in database.
 is too small.
 Try again with a larger buffer
 (and increased
-.IR buflen ).
+.IR size ).
 .SH ATTRIBUTES
 For an explanation of the terms used in this section, see
 .BR attributes (7).
@@ -143,7 +143,7 @@ to retrieve the service record for the port and protocol named
 in its first command-line argument.
 If a third (integer) command-line argument is supplied,
 it is used as the initial value for
-.IR buflen ;
+.IR size ;
 if
 .BR getservbyport_r ()
 fails with the error
@@ -155,10 +155,10 @@ The following shell session shows a couple of sample runs:
 .EX
 .RB "$" " ./a.out 7 tcp 1"
 ERANGE! Retrying with larger buffer
-getservbyport_r() returned: 0 (success)  (buflen=87)
+getservbyport_r() returned: 0 (success)  (size=87)
 s_name=echo; s_proto=tcp; s_port=7; aliases=
 .RB "$" " ./a.out 77777 tcp"
-getservbyport_r() returned: 0 (success)  (buflen=1024)
+getservbyport_r() returned: 0 (success)  (size=1024)
 Call failed/record not found
 .EE
 .in
@@ -179,14 +179,14 @@ Call failed/record not found
 int
 main(int argc, char *argv[])
 {
-    int buflen, erange_cnt, port, s;
+    int size, erange_cnt, port, s;
     struct servent result_buf;
     struct servent *result;
     char buf[MAX_BUF];
     char *protop;
 \&
     if (argc < 3) {
-        printf("Usage: %s port\-num proto\-name [buflen]\[rs]n", argv[0]);
+        printf("Usage: %s port\-num proto\-name [size]\[rs]n", argv[0]);
         exit(EXIT_FAILURE);
     }
 \&
@@ -194,11 +194,11 @@ main(int argc, char *argv[])
     protop = (strcmp(argv[2], "null") == 0 ||
               strcmp(argv[2], "NULL") == 0) ?  NULL : argv[2];
 \&
-    buflen = 1024;
+    size = 1024;
     if (argc > 3)
-        buflen = atoi(argv[3]);
+        size = atoi(argv[3]);
 \&
-    if (buflen > MAX_BUF) {
+    if (size > MAX_BUF) {
         printf("Exceeded buffer limit (%d)\[rs]n", MAX_BUF);
         exit(EXIT_FAILURE);
     }
@@ -206,7 +206,7 @@ main(int argc, char *argv[])
     erange_cnt = 0;
     do {
         s = getservbyport_r(port, protop, &result_buf,
-                            buf, buflen, &result);
+                            buf, size, &result);
         if (s == ERANGE) {
             if (erange_cnt == 0)
                 printf("ERANGE! Retrying with larger buffer\[rs]n");
@@ -215,18 +215,18 @@ main(int argc, char *argv[])
             /* Increment a byte at a time so we can see exactly
                what size buffer was required. */
 \&
-            buflen++;
+            size++;
 \&
-            if (buflen > MAX_BUF) {
+            if (size > MAX_BUF) {
                 printf("Exceeded buffer limit (%d)\[rs]n", MAX_BUF);
                 exit(EXIT_FAILURE);
             }
         }
     } while (s == ERANGE);
 \&
-    printf("getservbyport_r() returned: %s  (buflen=%d)\[rs]n",
+    printf("getservbyport_r() returned: %s  (size=%d)\[rs]n",
            (s == 0) ? "0 (success)" : (s == ENOENT) ? "ENOENT" :
-           strerror(s), buflen);
+           strerror(s), size);
 \&
     if (s != 0 || result == NULL) {
         printf("Call failed/record not found\[rs]n");
index 39a168d6bc51c45580ca06c4f68dc2a7c45cb84f..a49e44d23c5a2ee3eace141f78c3c593d1976d83 100644 (file)
@@ -35,17 +35,17 @@ Standard C library
 .B #include <shadow.h>
 .P
 .BI "int getspent_r(struct spwd *" spbuf ,
-.BI "               char " buf [. buflen "], size_t " buflen ", \
+.BI "               char " buf [. size "], size_t " size ", \
 struct spwd **" spbufp );
 .BI "int getspnam_r(const char *" name ", struct spwd *" spbuf ,
-.BI "               char " buf [. buflen "], size_t " buflen ", \
+.BI "               char " buf [. size "], size_t " size ", \
 struct spwd **" spbufp );
 .P
 .BI "int fgetspent_r(FILE *" stream ", struct spwd *" spbuf ,
-.BI "               char " buf [. buflen "], size_t " buflen ", \
+.BI "               char " buf [. size "], size_t " size ", \
 struct spwd **" spbufp );
 .BI "int sgetspent_r(const char *" s ", struct spwd *" spbuf ,
-.BI "               char " buf [. buflen "], size_t " buflen ", \
+.BI "               char " buf [. size "], size_t " size ", \
 struct spwd **" spbufp );
 .fi
 .P
@@ -169,7 +169,7 @@ This shadow password structure contains pointers to strings, and these strings
 are stored in the buffer
 .I buf
 of size
-.IR buflen .
+.IR size .
 A pointer to the result (in case of success) or NULL (in case no entry
 was found or an error occurred) is stored in
 .IR *spbufp .
index 5a91c9cb47f49a186ce57c52bd93bc9e49690ec1..732d0db0ebadcddbd6cefb9cbcc929418bd1caaa 100644 (file)
@@ -16,7 +16,7 @@ Standard C library
 .B #include <stdlib.h>
 .P
 .BI "char *ptsname(int " fd );
-.BI "int ptsname_r(int " fd ", char " buf [. buflen "], size_t " buflen );
+.BI "int ptsname_r(int " fd ", char " buf [. size "], size_t " size );
 .fi
 .P
 .RS -4
@@ -52,7 +52,7 @@ It returns the name of the slave pseudoterminal device as a
 null-terminated string in the buffer pointed to by
 .IR buf .
 The
-.I buflen
+.I size
 argument specifies the number of bytes available in
 .IR buf .
 .SH RETURN VALUE
index c55be3f5a13a0c35133d19919a98887824b6743a..57dba37f8ca87174f8b32956096af4dd9ad6fb68 100644 (file)
@@ -20,13 +20,13 @@ Standard C library
 .BI "rtnetlink_socket = socket(AF_NETLINK, int " socket_type \
 ", NETLINK_ROUTE);"
 .P
-.BI "int RTA_OK(struct rtattr *" rta ", int " rtabuflen );
+.BI "int RTA_OK(struct rtattr *" rta ", int " size );
 .P
 .BI "void *RTA_DATA(struct rtattr *" rta );
 .BI "unsigned int RTA_PAYLOAD(struct rtattr *" rta );
 .P
 .BI "struct rtattr *RTA_NEXT(struct rtattr *" rta \
-", unsigned int " rtabuflen );
+", unsigned int " size );
 .P
 .BI "unsigned int RTA_LENGTH(unsigned int " size );
 .BI "unsigned int RTA_SPACE(unsigned int "size );
@@ -39,15 +39,15 @@ messages consist of a
 message header and appended attributes.
 The attributes should be manipulated only using the macros provided here.
 .P
-.BI RTA_OK( rta ", " attrlen )
+.BI RTA_OK( rta ", " size )
 returns true if
 .I rta
 points to a valid routing attribute;
-.I attrlen
+.I size
 is the running size of the attribute buffer.
 When not true then you must assume there are no more attributes in the
 message, even if
-.I attrlen
+.I size
 is nonzero.
 .P
 .BI RTA_DATA( rta )
@@ -56,11 +56,11 @@ returns a pointer to the start of this attribute's data.
 .BI RTA_PAYLOAD( rta )
 returns the size of this attribute's data.
 .P
-.BI RTA_NEXT( rta ", " attrlen )
+.BI RTA_NEXT( rta ", " size )
 gets the next attribute after
 .IR rta .
 Calling this macro will update
-.IR attrlen .
+.IR size .
 You should use
 .B RTA_OK
 to check the validity of the returned pointer.
index ed5817e41c41ffc66cded78e299e25f08f834742..c3dfadb7ace8f65bdc2d6def3f3ce66d11cddf3f 100644 (file)
@@ -21,15 +21,15 @@ Standard C library
 .P
 .B "struct aliasent *getaliasent(void);"
 .BI "int getaliasent_r(struct aliasent *restrict " result ,
-.BI "                     char " buffer "[restrict ." buflen "], \
-size_t " buflen ,
+.BI "                     char " buffer "[restrict ." size "], \
+size_t " size ,
 .BI "                     struct aliasent **restrict " res );
 .P
 .BI "struct aliasent *getaliasbyname(const char *" name );
 .BI "int getaliasbyname_r(const char *restrict " name ,
 .BI "                     struct aliasent *restrict " result ,
-.BI "                     char " buffer "[restrict ." buflen "], \
-size_t " buflen ,
+.BI "                     char " buffer "[restrict ." size "], \
+size_t " size ,
 .BI "                     struct aliasent **restrict " res );
 .fi
 .SH DESCRIPTION
index bc6f041dd771c2bdf955af258996fed3afa44cbe..88b24cbca0597fdbd15052b72540b69c6f803301 100644 (file)
@@ -24,7 +24,7 @@ Standard C library
 .BI "            char **restrict " user ", char **restrict " domain );
 .BI "int getnetgrent_r(char **restrict " host ,
 .BI "            char **restrict " user ", char **restrict " domain ,
-.BI "            char " buf "[restrict ." buflen "], size_t " buflen );
+.BI "            char " buf "[restrict ." size "], size_t " size );
 .P
 .BI "int innetgr(const char *" netgroup ", const char *" host ,
 .BI "            const char *" user ", const char *" domain );
index e4679f4d5368a3f1bbeae467800c49399c1ea127..14ef5d72da416f0998c233d6b45cb71e22b8a4c4 100644 (file)
@@ -32,10 +32,10 @@ Standard C library
 .BI "const char *strerrorname_np(int " errnum );
 .BI "const char *strerrordesc_np(int " errnum );
 .P
-.BI "int strerror_r(int " errnum ", char " buf [. buflen "], size_t " buflen );
+.BI "int strerror_r(int " errnum ", char " buf [. size "], size_t " size );
                /* XSI-compliant */
 .P
-.BI "char *strerror_r(int " errnum ", char " buf [. buflen "], size_t " buflen );
+.BI "char *strerror_r(int " errnum ", char " buf [. size "], size_t " size );
                /* GNU-specific */
 .P
 .BI "char *strerror_l(int " errnum ", locale_t " locale );
@@ -132,8 +132,8 @@ The XSI-compliant
 is preferred for portable applications.
 It returns the error string in the user-supplied buffer
 .I buf
-of length
-.IR buflen .
+of size
+.IR size .
 .P
 The GNU-specific
 .BR strerror_r ()
@@ -147,9 +147,9 @@ is unused).
 If the function stores a string in
 .IR buf ,
 then at most
-.I buflen
+.I size
 bytes are stored (the string may be truncated if
-.I buflen
+.I size
 is too small and
 .I errnum
 is unknown).
index fe24b8d3ca3fdccd57b3d83712304d8906a98f5f..cb417684b84567f951e526ee5dacdaaf7da4d42a 100644 (file)
@@ -17,7 +17,7 @@ Standard C library
 .B #include <unistd.h>
 .P
 .BI "char *ttyname(int " fd );
-.BI "int ttyname_r(int " fd ", char " buf [. buflen "], size_t " buflen );
+.BI "int ttyname_r(int " fd ", char " buf [. size "], size_t " size );
 .fi
 .SH DESCRIPTION
 The function
@@ -31,8 +31,8 @@ The function
 .BR ttyname_r ()
 stores this pathname in the buffer
 .I buf
-of length
-.IR buflen .
+of size
+.IR size .
 .SH RETURN VALUE
 The function
 .BR ttyname ()
@@ -60,7 +60,7 @@ does not refer to a terminal device.
 .TP
 .B ERANGE
 .RB ( ttyname_r ())
-.I buflen
+.I size
 was too small to allow storing the pathname.
 .SH ATTRIBUTES
 For an explanation of the terms used in this section, see