]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Various pages: SYNOPSIS: Use VLA syntax in function parameters
authorAlejandro Colomar <alx.manpages@gmail.com>
Fri, 26 Aug 2022 20:48:26 +0000 (22:48 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 9 Nov 2022 23:44:59 +0000 (00:44 +0100)
The WG14 charter for C23 added one principle to the ones in
previous standards:

[
15.  Application Programming Interfaces (APIs) should be
self-documenting when possible.  In particular, the order of
parameters in function declarations should be arranged such that
the size of an array appears before the array.  The purpose is to
allow Variable-Length Array (VLA) notation to be used. This not
only makes the code's purpose clearer to human readers, but also
makes static analysis easier.  Any new APIs added to the Standard
should take this into consideration.
]

ISO C doesn't allow using VLA syntax when the parameter used for
the size of the array is declared _after_ the parameter that is a
VLa.  That's a minor issue that could be easily changed in the
language without backwards-compatibility issues, and in fact it
seems to have been proposed, and not yet discarded, even if it's
not going to change in C23.

Since the manual pages SYNOPSIS are not bounded by strict C legal
syntax, but we already use some "tricks" to try to convey the most
information to the reader even if it might not be the most legal
syntax, we can also make a small compromise in this case, using
illegal syntax (at least not yet legalized) to add important
information to the function prototypes.

If we're lucky, compiler authors, and maybe even WG14 members, may
be satisfied by the syntax used in these manual pages, and may
decide to implement this feature to the language.

It seems to me a sound syntax that isn't ambiguous, even if it
deviates from the common pattern in C that declarations _always_
come before use.  But it's a reasonable tradeoff.

This change will make the contract between the programmer and the
implementation clearer just by reading a prototype.  For example,

  size_t strlcpy(char *restrict dst, const char *restrict src,
                 size_t size);

    vs

  size_t strlcpy(char dst[restrict .size], const char *restrict src,
                 size_t size);

the second prototype above makes it clear that the 'dst' buffer
will be safe from overflow, but the 'src' one clearly needs to be
NUL-terminated, or it might cause UB, since nothing tells the
function how long it is.

Link: <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2611.htm>
Cc: Ingo Schwarze <schwarze@openbsd.org>
Cc: JeanHeyd Meneide <wg14@soasis.org>
Cc: Martin Uecker <uecker@tugraz.at>
Cc: <gcc@gcc.gnu.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
72 files changed:
man3/confstr.3
man3/des_crypt.3
man3/fgetc.3
man3/fgetws.3
man3/getcwd.3
man3/getdirentries.3
man3/getgrent_r.3
man3/getgrnam.3
man3/gethostbyname.3
man3/getlogin.3
man3/getmntent.3
man3/getnameinfo.3
man3/getnetent_r.3
man3/getprotoent_r.3
man3/getpwent_r.3
man3/getpwnam.3
man3/getrpcent_r.3
man3/getservent_r.3
man3/getspnam.3
man3/inet_net_pton.3
man3/inet_ntop.3
man3/mblen.3
man3/mbrlen.3
man3/mbrtowc.3
man3/mbsnrtowcs.3
man3/mbsrtowcs.3
man3/mbstowcs.3
man3/mbtowc.3
man3/mempcpy.3
man3/mq_receive.3
man3/mq_send.3
man3/printf.3
man3/pthread_setname_np.3
man3/ptsname.3
man3/random.3
man3/random_r.3
man3/regex.3
man3/resolver.3
man3/rpc.3
man3/setaliasent.3
man3/setbuf.3
man3/setnetgrent.3
man3/stpncpy.3
man3/strcasecmp.3
man3/strcat.3
man3/strcmp.3
man3/strcpy.3
man3/strdup.3
man3/strerror.3
man3/strfmon.3
man3/strfromd.3
man3/strftime.3
man3/string.3
man3/strnlen.3
man3/strxfrm.3
man3/ttyname.3
man3/unlocked_stdio.3
man3/wcpncpy.3
man3/wcsncasecmp.3
man3/wcsncat.3
man3/wcsncmp.3
man3/wcsncpy.3
man3/wcsnlen.3
man3/wcsnrtombs.3
man3/wcsrtombs.3
man3/wcstombs.3
man3/wmemchr.3
man3/wmemcmp.3
man3/wmemcpy.3
man3/wmemmove.3
man3/wmemset.3
man3/wprintf.3

index 4cc06918ebb25ec9366a2cba5aff52de1cd9062e..9d3b5d72d3c241ec8b152653f8c3efc4eda0e1dd 100644 (file)
@@ -20,7 +20,7 @@ Standard C library
 .nf
 .B #include <unistd.h>
 .PP
-.BI "size_t confstr(int " "name" ", char *" buf ", size_t " size );
+.BI "size_t confstr(int " "name" ", char " buf [. size "], size_t " size );
 .fi
 .PP
 .RS -4
index a59519589cb30d4937d689f18f4d418bca5f536d..8806cc9fd5d0518d3d3512d27f069ba85090c306 100644 (file)
@@ -22,9 +22,11 @@ Standard C library
 .\" .B #include <des_crypt.h>
 .B #include <rpc/des_crypt.h>
 .PP
-.BI "int ecb_crypt(char *" key ", char *" data ", unsigned int " datalen ,
+.BI "int ecb_crypt(char *" key ", char " data [. datalen "], \
+unsigned int " datalen ,
 .BI "              unsigned int " mode );
-.BI "int cbc_crypt(char *" key ", char *" data ", unsigned int " datalen ,
+.BI "int cbc_crypt(char *" key ", char " data [. datalen "], \
+unsigned int " datalen ,
 .BI "              unsigned int " mode ", char *" ivec );
 .PP
 .BI "void des_setparity(char *" key );
index 010fc01703eaec14dfde77a1a642b36fb042907d..4cddbe59683f91ed4770e41a057b4de46803bb33 100644 (file)
@@ -18,7 +18,8 @@ Standard C library
 .BI "int getc(FILE *" stream );
 .B "int getchar(void);"
 .PP
-.BI "char *fgets(char *restrict " s ", int " size ", FILE *restrict " stream );
+.BI "char *fgets(char " s "[restrict ." size "], int " size ", \
+FILE *restrict " stream );
 .PP
 .BI "int ungetc(int " c ", FILE *" stream );
 .fi
index 24669f9482b58c968f87a54105b869e7f9f8e6c7..2069d20134f5915e7a1c1d1fe5f6c824ea6fe5b3 100644 (file)
@@ -20,7 +20,7 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "wchar_t *fgetws(wchar_t *restrict " ws ", int " n \
+.BI "wchar_t *fgetws(wchar_t " ws "[restrict ." n "], int " n \
 ", FILE *restrict " stream );
 .fi
 .SH DESCRIPTION
index 213ba18222e2df32c5f964815f555794f42dab15..23b622ead0251535ecd4249852dfbff4550fd9cd 100644 (file)
@@ -19,7 +19,7 @@ Standard C library
 .nf
 .B #include <unistd.h>
 .PP
-.BI "char *getcwd(char *" buf ", size_t " size );
+.BI "char *getcwd(char " buf [. size "], size_t " size );
 .B "char *get_current_dir_name(void);"
 .PP
 .BI "[[deprecated]] char *getwd(char " buf [PATH_MAX]);
index 495774d67c50c2e2c67f801981040bba5edb491f..90072c78b8e5852056a7866c035da67089774724 100644 (file)
@@ -14,7 +14,8 @@ Standard C library
 .nf
 .B #include <dirent.h>
 .PP
-.BI "ssize_t getdirentries(int " fd ", char *restrict " buf ", size_t " nbytes ,
+.BI "ssize_t getdirentries(int " fd ", char " buf "[restrict ." nbytes "], \
+size_t " nbytes ,
 .BI "                      off_t *restrict " basep );
 .fi
 .PP
index 3298865ccf61bbe5c52c27f92fa32d1a3f30390f..9cb23548b7fe2b54e6caaaadb3802a809f78329c 100644 (file)
@@ -13,10 +13,10 @@ Standard C library
 .B #include <grp.h>
 .PP
 .BI "int getgrent_r(struct group *restrict " gbuf ,
-.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "               struct group **restrict " gbufp );
 .BI "int fgetgrent_r(FILE *restrict " stream ", struct group *restrict " gbuf ,
-.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "               struct group **restrict " gbufp );
 .fi
 .PP
index 73e5a34df580772b2c4bdfff6257df5cb20d5764..0f27c6310060b93a6d74481779dd96193901c7c8 100644 (file)
@@ -26,10 +26,10 @@ Standard C library
 .PP
 .BI "int getgrnam_r(const char *restrict " name \
 ", struct group *restrict " grp ,
-.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "               struct group **restrict " result );
 .BI "int getgrgid_r(gid_t " gid ", struct group *restrict " grp ,
-.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "               struct group **restrict " result );
 .fi
 .PP
index 39e8c2a1fde5d1c9d743a8bcdbd5f8671bddedc5..d9a5d46095d4a4802015f3242e85b6a731d0fa96 100644 (file)
@@ -50,7 +50,7 @@ Standard C library
 .BI "struct hostent *gethostbyname2(const char *" name ", int " af );
 .PP
 .BI "int gethostent_r(struct hostent *restrict " ret ,
-.BI "                 char *restrict " buf ", size_t " buflen ,
+.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "                 struct hostent **restrict " result ,
 .BI "                 int *restrict " h_errnop );
 .PP
@@ -58,19 +58,19 @@ Standard C library
 .BI "int gethostbyaddr_r(const void *restrict " addr ", socklen_t " len \
 ", int " type ,
 .BI "                 struct hostent *restrict " ret ,
-.BI "                 char *restrict " buf ", size_t " buflen ,
+.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
 .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 *restrict " buf ", size_t " buflen ,
+.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
 .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 *restrict " buf ", size_t " buflen ,
+.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "                 struct hostent **restrict " result ,
 .BI "                 int *restrict " h_errnop );
 .fi
index 7658c615f1d8fd84a44bb84be69bc7a126ac8784..59253d7fa12e9357a8427619d775b1afca2b5e73 100644 (file)
@@ -16,7 +16,7 @@ Standard C library
 .B #include <unistd.h>
 .PP
 .B "char *getlogin(void);"
-.BI "int getlogin_r(char *" buf ", size_t " bufsize );
+.BI "int getlogin_r(char " buf [. bufsize "], size_t " bufsize );
 .PP
 .B #include <stdio.h>
 .PP
index 7900f1ae96b86eb00888c425dc80d4729661a404..8792fbef6008a16507f9410a0b9ef0e0f964155c 100644 (file)
@@ -37,7 +37,7 @@ Standard C library
 .PP
 .BI "struct mntent *getmntent_r(FILE *restrict " streamp ,
 .BI "              struct mntent *restrict " mntbuf ,
-.BI "              char *restrict " buf ", int " buflen );
+.BI "              char " buf "[restrict ." buflen "], int " buflen );
 .fi
 .PP
 .RS -4
index 02b0a16392bf4027dfc1c95a96dccf62a14fb6b6..cc3a89a383ba4bbd74ff044bc068bf28e54c4cac 100644 (file)
@@ -20,9 +20,9 @@ Standard C library
 .PP
 .BI "int getnameinfo(const struct sockaddr *restrict " addr \
 ", socklen_t " addrlen ,
-.BI "                char *restrict " host ", socklen_t " hostlen ,
-.BI "                char *restrict " serv ", socklen_t " servlen \
-", int " flags );
+.BI "                char " host "[restrict ." hostlen "], socklen_t " hostlen ,
+.BI "                char " serv "[restrict ." servlen "], socklen_t " servlen ,
+.BI "                int " flags );
 .fi
 .PP
 .RS -4
index 28a7d7d24f4206765cf78f0dc68c219f6c97b062..a05edf67614e51a3481043a44e6fc3d2a1ba2cc2 100644 (file)
@@ -15,17 +15,17 @@ Standard C library
 .B #include <netdb.h>
 .PP
 .BI "int getnetent_r(struct netent *restrict " result_buf ,
-.BI "                char *restrict " buf ", size_t " buflen ,
+.BI "                char " buf "[restrict ." buflen "], size_t " buflen ,
 .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 *restrict " buf ", size_t " buflen ,
+.BI "                char " buf "[restrict ." buflen "], size_t " buflen ,
 .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 *restrict " buf ", size_t " buflen ,
+.BI "                char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "                struct netent **restrict " result ,
 .BI "                int *restrict " h_errnop );
 .PP
index bef448467542b4ef3e4893d242804e534c2b5ff2..75469d31ec91c05b06e5676a45af8fb54893bd3d 100644 (file)
@@ -15,15 +15,15 @@ Standard C library
 .B #include <netdb.h>
 .PP
 .BI "int getprotoent_r(struct protoent *restrict " result_buf ,
-.BI "                  char *restrict " buf ", size_t " buflen ,
+.BI "                  char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "                  struct protoent **restrict " result );
 .BI "int getprotobyname_r(const char *restrict " name ,
 .BI "                  struct protoent *restrict " result_buf ,
-.BI "                  char *restrict " buf ", size_t " buflen ,
+.BI "                  char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "                  struct protoent **restrict " result );
 .BI "int getprotobynumber_r(int " proto ,
 .BI "                  struct protoent *restrict " result_buf ,
-.BI "                  char *restrict " buf ", size_t " buflen ,
+.BI "                  char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "                  struct protoent **restrict " result );
 .PP
 .fi
index 516517ace89920802204c25e64b0b05ea9163f54..c2e7629c534a1653c0e2a7004bb2f9290187bb88 100644 (file)
@@ -13,11 +13,11 @@ Standard C library
 .B #include <pwd.h>
 .PP
 .BI "int getpwent_r(struct passwd *restrict " pwbuf ,
-.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "               struct passwd **restrict " pwbufp );
 .BI "int fgetpwent_r(FILE *restrict " stream \
 ", struct passwd *restrict " pwbuf ,
-.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "               struct passwd **restrict " pwbufp );
 .fi
 .PP
index 7a6474e0197c2f85be859e699c2577b9299940be..c168eb11b078eeac8548f4d46f793d4f1cb54e6d 100644 (file)
@@ -28,12 +28,12 @@ Standard C library
 .BI "struct passwd *getpwnam(const char *" name );
 .BI "struct passwd *getpwuid(uid_t " uid );
 .PP
-.BI "int getpwnam_r(const char *restrict " name \
-", struct passwd *restrict " pwd ,
-.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "int getpwnam_r(const char *restrict " name ", \
+struct passwd *restrict " pwd ,
+.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "               struct passwd **restrict " result );
 .BI "int getpwuid_r(uid_t " uid ", struct passwd *restrict " pwd ,
-.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "               struct passwd **restrict " result );
 .fi
 .PP
index 081e1147a35cefe4b6187366168f88e9c0dec2c4..91396dd229c0d0cd9fcd0c0e68c7482d9fe0c282 100644 (file)
@@ -14,13 +14,13 @@ Standard C library
 .nf
 .B #include <netdb.h>
 .PP
-.BI "int getrpcent_r(struct rpcent *" result_buf ", char *" buf ,
+.BI "int getrpcent_r(struct rpcent *" result_buf ", char " buf [. buflen ],
 .BI "                size_t " buflen ", struct rpcent **" result );
 .BI "int getrpcbyname_r(const char *" name ,
-.BI "                struct rpcent *" result_buf ", char *" buf ,
+.BI "                struct rpcent *" result_buf ", char " buf [. buflen ],
 .BI "                size_t " buflen ", struct rpcent **" result );
 .BI "int getrpcbynumber_r(int " number ,
-.BI "                struct rpcent *" result_buf ", char *" buf ,
+.BI "                struct rpcent *" result_buf ", char " buf [. buflen ],
 .BI "                size_t " buflen ", struct rpcent **" result );
 .PP
 .fi
index c403311e3e974f5434d31dfdaceeb40d832c1d42..7e346d2e0087f3896b2648d30c5ebd0fa73bc6d1 100644 (file)
@@ -15,17 +15,17 @@ Standard C library
 .B #include <netdb.h>
 .PP
 .BI "int getservent_r(struct servent *restrict " result_buf ,
-.BI "                 char *restrict " buf ", size_t " buflen ,
+.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
 .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 *restrict " buf ", size_t " buflen ,
+.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "                 struct servent **restrict " result );
 .BI "int getservbyport_r(int " port ,
 .BI "                 const char *restrict " proto ,
 .BI "                 struct servent *restrict " result_buf ,
-.BI "                 char *restrict " buf ", size_t " buflen ,
+.BI "                 char " buf "[restrict ." buflen "], size_t " buflen ,
 .BI "                 struct servent **restrict " result );
 .PP
 .fi
index 06d703c36c4fb3f04788b5ba00caad6750f5ad8a..592d1958303ed8b23055809442bc8c806f3e3484 100644 (file)
@@ -34,14 +34,18 @@ Standard C library
 .B #include <shadow.h>
 .PP
 .BI "int getspent_r(struct spwd *" spbuf ,
-.BI "               char *" buf ", size_t " buflen ", struct spwd **" spbufp );
+.BI "               char " buf [. buflen "], size_t " buflen ", \
+struct spwd **" spbufp );
 .BI "int getspnam_r(const char *" name ", struct spwd *" spbuf ,
-.BI "               char *" buf ", size_t " buflen ", struct spwd **" spbufp );
+.BI "               char " buf [. buflen "], size_t " buflen ", \
+struct spwd **" spbufp );
 .PP
 .BI "int fgetspent_r(FILE *" stream ", struct spwd *" spbuf ,
-.BI "               char *" buf ", size_t " buflen ", struct spwd **" spbufp );
+.BI "               char " buf [. buflen "], size_t " buflen ", \
+struct spwd **" spbufp );
 .BI "int sgetspent_r(const char *" s ", struct spwd *" spbuf ,
-.BI "               char *" buf ", size_t " buflen ", struct spwd **" spbufp );
+.BI "               char " buf [. buflen "], size_t " buflen ", \
+struct spwd **" spbufp );
 .fi
 .PP
 .RS -4
index 1db845582af008bc609080794e01e9ebfed93405..0af4478b04388d827e45743c76570e6d171715d6 100644 (file)
@@ -15,7 +15,7 @@ Resolver library
 .BI "int inet_net_pton(int " af ", const char *" pres ,
 .BI "                    void *" netp ", size_t " nsize );
 .BI "char *inet_net_ntop(int " af ", const void *" netp ", int " bits ,
-.BI "                    char *" pres ", size_t " psize );
+.BI "                    char " pres [. psize "], size_t " psize );
 .fi
 .PP
 .RS -4
index b344a0c899ca1067646d73d2b48cb2c6d7553bd4..64a26eccef31e37aabf1d58822afde994e154f9b 100644 (file)
@@ -14,7 +14,7 @@ Standard C library
 .B #include <arpa/inet.h>
 .PP
 .BI "const char *inet_ntop(int " af ", const void *restrict " src ,
-.BI "                      char *restrict " dst ", socklen_t " size );
+.BI "                      char " dst "[restrict ." size "], socklen_t " size );
 .fi
 .SH DESCRIPTION
 This function converts the network address structure
index f0c2fd7363ed79b04b87c18e98dd2a4a7c74917b..861f41687ffd2e7badfb5d0c6695da38f1ee4034 100644 (file)
@@ -18,7 +18,7 @@ Standard C library
 .nf
 .B #include <stdlib.h>
 .PP
-.BI "int mblen(const char *" s ", size_t " n );
+.BI "int mblen(const char " s [. n "], size_t " n );
 .fi
 .SH DESCRIPTION
 If
index d7aac5e677c1db5953f84ebab8f7c72f3e6cf68b..71258fa5914d4c77e7579ffa522e7d204b6e6f10 100644 (file)
@@ -18,7 +18,7 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "size_t mbrlen(const char *restrict " s ", size_t " n ,
+.BI "size_t mbrlen(const char " s "[restrict ." n "], size_t " n ,
 .BI "              mbstate_t *restrict " ps );
 .fi
 .SH DESCRIPTION
index 804f87032a1a3397219c831f030338d049937d4a..8acb592306afa7b95b7b8348edc252af2127aca9 100644 (file)
@@ -19,9 +19,8 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "size_t mbrtowc(wchar_t *restrict " pwc ", const char *restrict " s \
-", size_t " n ,
-.BI "               mbstate_t *restrict " ps );
+.BI "size_t mbrtowc(wchar_t *restrict " pwc ", const char " s "[restrict ." n ],
+.BI "               size_t " n ", mbstate_t *restrict " ps );
 .fi
 .SH DESCRIPTION
 The main case for this function is when
index c53e4ecb14a47ca9709a8988a1498168931e7fca..b14d3b51a01facec4e46c4cc697d877cfa0bbdf7 100644 (file)
@@ -17,7 +17,7 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "size_t mbsnrtowcs(wchar_t *restrict " dest ", const char **restrict " src ,
+.BI "size_t mbsnrtowcs(wchar_t " dest "[restrict ." len "], const char **restrict " src ,
 .BI "                  size_t " nms ", size_t " len \
 ", mbstate_t *restrict " ps );
 .fi
index 57f7bbf61d3e5963bcd9d74da3e100a6b1b95dd2..69dc758b63492ca6994d0334daa77dd030d106ae 100644 (file)
@@ -18,7 +18,7 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "size_t mbsrtowcs(wchar_t *restrict " dest ", const char **restrict " src ,
+.BI "size_t mbsrtowcs(wchar_t " dest "[restrict ." len "], const char **restrict " src ,
 .BI "                 size_t " len ", mbstate_t *restrict " ps );
 .fi
 .SH DESCRIPTION
index c7d348f155a0e985cdad8ec4384a1791c46cd71d..69d3c3c3edb9b44b7b568ace3e3b84aea642d3ab 100644 (file)
@@ -19,7 +19,8 @@ Standard C library
 .nf
 .B #include <stdlib.h>
 .PP
-.BI "size_t mbstowcs(wchar_t *restrict " dest ", const char *restrict " src ,
+.BI "size_t mbstowcs(wchar_t " dest "[restrict ." n "], \
+const char *restrict " src ,
 .BI "                size_t " n );
 .fi
 .SH DESCRIPTION
index 858b2f3e35e8b3b679563e28ed90213258b6394f..cb91e2e154671f17f04effd2cd7b137b0384f5e6 100644 (file)
@@ -18,8 +18,8 @@ Standard C library
 .nf
 .B #include <stdlib.h>
 .PP
-.BI "int mbtowc(wchar_t *restrict " pwc ", const char *restrict " s \
-", size_t " n );
+.BI "int mbtowc(wchar_t *restrict " pwc ", const char " s "[restrict ." n "], \
+size_t " n );
 .fi
 .SH DESCRIPTION
 The main case for this function is when
index 84eb39d707a63db3178b54f72d6abf70d9830ba7..9ba5889d68850098e9fd78555103dcdac14a54a5 100644 (file)
@@ -22,9 +22,9 @@ Standard C library
 .BR "#define _GNU_SOURCE" "         /* See feature_test_macros(7) */"
 .B #include <wchar.h>
 .PP
-.BI "wchar_t *wmempcpy(wchar_t *restrict " dest \
-", const wchar_t *restrict " src ,
-.BI "                  size_t " n );
+.BI "wchar_t *wmempcpy(wchar_t " dest "[restrict ." n ],
+.BI "              const wchar_t " src "[restrict ." n ],
+.BI "              size_t " n );
 .fi
 .SH DESCRIPTION
 The
index 739b1f73cc4fb74ebe1fc81f253720c8f589e91b..81579817b949980daabee22bb5062db924800e31 100644 (file)
@@ -12,13 +12,14 @@ Real-time library
 .nf
 .B #include <mqueue.h>
 .PP
-.BI "ssize_t mq_receive(mqd_t " mqdes ", char *" msg_ptr ,
+.BI "ssize_t mq_receive(mqd_t " mqdes ", char " msg_ptr [. msg_len ],
 .BI "                   size_t " msg_len ", unsigned int *" msg_prio );
 .PP
 .B #include <time.h>
 .B #include <mqueue.h>
 .PP
-.BI "ssize_t mq_timedreceive(mqd_t " mqdes ", char *restrict " msg_ptr ,
+.BI "ssize_t mq_timedreceive(mqd_t " mqdes ", \
+char *restrict " msg_ptr [. msg_len ],
 .BI "                   size_t " msg_len ", unsigned int *restrict " msg_prio ,
 .BI "                   const struct timespec *restrict " abs_timeout );
 .fi
index c20b9251e70ca41f642dd1da15479397f0279b9a..8dc862697b2ea5ca0653c062fec49d4d78affee2 100644 (file)
@@ -12,13 +12,13 @@ Real-time library
 .nf
 .B #include <mqueue.h>
 .PP
-.BI "int mq_send(mqd_t " mqdes ", const char *" msg_ptr ,
+.BI "int mq_send(mqd_t " mqdes ", const char " msg_ptr [. msg_len ],
 .BI "              size_t " msg_len ", unsigned int " msg_prio );
 .PP
 .B #include <time.h>
 .B #include <mqueue.h>
 .PP
-.BI "int mq_timedsend(mqd_t " mqdes ", const char *" msg_ptr ,
+.BI "int mq_timedsend(mqd_t " mqdes ", const char " msg_ptr [. msg_len ],
 .BI "              size_t " msg_len ", unsigned int " msg_prio ,
 .BI "              const struct timespec *" abs_timeout );
 .fi
index 0f5d1175794ea3f63f79aab952d8575e8238eff8..85a5db632f9477f654550bdb6d01629b3dcd9bc9 100644 (file)
@@ -30,7 +30,7 @@ Standard C library
 .BI "            const char *restrict " format ", ...);"
 .BI "int sprintf(char *restrict " str ,
 .BI "            const char *restrict " format ", ...);"
-.BI "int snprintf(char *restrict " str ", size_t " size ,
+.BI "int snprintf(char " str "[restrict ." size "], size_t " size ,
 .BI "            const char *restrict " format ", ...);"
 .PP
 .BI "int vprintf(const char *restrict " format ", va_list " ap );
@@ -40,7 +40,7 @@ Standard C library
 .BI "            const char *restrict " format ", va_list " ap );
 .BI "int vsprintf(char *restrict " str ,
 .BI "            const char *restrict " format ", va_list " ap );
-.BI "int vsnprintf(char *restrict " str ", size_t " size ,
+.BI "int vsnprintf(char " str "[restrict ." size "], size_t " size ,
 .BI "            const char *restrict " format ", va_list " ap );
 .fi
 .PP
index c08cc95968f269704b0da94c626cf86aecd31fdd..df51c8e4f2e4e921cdbc845f7f31e8c6aab143e2 100644 (file)
@@ -15,7 +15,8 @@ POSIX threads library
 .B #include <pthread.h>
 .PP
 .BI "int pthread_setname_np(pthread_t " thread ", const char *" name );
-.BI "int pthread_getname_np(pthread_t " thread ", char *" name ", size_t " size );
+.BI "int pthread_getname_np(pthread_t " thread ", char " name [. size "], \
+size_t " size );
 .fi
 .SH DESCRIPTION
 By default, all the threads created using
index 6b37cfc36afa9847b48cbae058d46e38747290bb..38fead7625e4af7eddda6a64d18d3d01789fe868 100644 (file)
@@ -14,8 +14,8 @@ Standard C library
 .nf
 .B #include <stdlib.h>
 .PP
-.BI "char *ptsname(int " fd ");"
-.BI "int ptsname_r(int " fd ", char *" buf ", size_t " buflen ");"
+.BI "char *ptsname(int " fd );
+.BI "int ptsname_r(int " fd ", char " buf [. buflen "], size_t " buflen );
 .fi
 .PP
 .RS -4
index 752e7f9eef04efed72cab9c4db404ab8c64caa5c..6b4f90e6da540036ecaf9f0b5fefd222fc9508d0 100644 (file)
@@ -23,7 +23,7 @@ Standard C library
 .B long random(void);
 .BI "void srandom(unsigned int " seed );
 .PP
-.BI "char *initstate(unsigned int " seed ", char *" state ", size_t " n );
+.BI "char *initstate(unsigned int " seed ", char " state [. n "], size_t " n );
 .BI "char *setstate(char *" state );
 .fi
 .PP
index 66d5c3de9f53f5617b72a7f17035178f8f4b02e6..914e6ea25462f76705cf0677ead96e7589b15a69 100644 (file)
@@ -18,7 +18,8 @@ Standard C library
 .BI "             int32_t *restrict " result );
 .BI "int srandom_r(unsigned int " seed ", struct random_data *" buf );
 .PP
-.BI "int initstate_r(unsigned int " seed ", char *restrict " statebuf ,
+.BI "int initstate_r(unsigned int " seed ", \
+char " statebuf "[restrict ." statelen ],
 .BI "             size_t " statelen ", struct random_data *restrict " buf );
 .BI "int setstate_r(char *restrict " statebuf ,
 .BI "             struct random_data *restrict " buf );
index 4118656c511bf323b3005ab081beb75676c1e551..c49f0303b2bb9d11be009ee7ef411ce1c5555e0d 100644 (file)
@@ -21,11 +21,12 @@ Standard C library
 .BI "            int " cflags );
 .BI "int regexec(const regex_t *restrict " preg \
 ", const char *restrict " string ,
-.BI "            size_t " nmatch ", regmatch_t " pmatch "[restrict]\
-, int " eflags );
+.BI "            size_t " nmatch ", regmatch_t " pmatch "[restrict ." nmatch ],
+.BI "            int " eflags );
 .PP
 .BI "size_t regerror(int " errcode ", const regex_t *restrict " preg ,
-.BI "            char *restrict " errbuf ", size_t " errbuf_size );
+.BI "            char " errbuf "[restrict ." errbuf_size "], \
+size_t " errbuf_size );
 .BI "void regfree(regex_t *" preg );
 .fi
 .SH DESCRIPTION
index 5a5ea470d29318507c296240a651dc86899c84c5..070a87f1bcee951f0603d2dd5e3af195ecf36583 100644 (file)
@@ -35,34 +35,35 @@ Resolver library
 .PP
 .BI "int res_nquery(res_state " statep ,
 .BI "           const char *" dname ", int " class ", int " type ,
-.BI "           unsigned char *" answer ", int " anslen );
+.BI "           unsigned char " answer [. anslen "], int " anslen );
 .PP
 .BI "int res_nsearch(res_state " statep ,
 .BI "           const char *" dname ", int " class ", int " type ,
-.BI "           unsigned char *" answer ", int " anslen );
+.BI "           unsigned char " answer [. anslen "], int " anslen );
 .PP
 .BI "int res_nquerydomain(res_state " statep ,
 .BI "           const char *" name ", const char *" domain ,
-.BI "           int " class ", int " type ", unsigned char *" answer ,
+.BI "           int " class ", int " type ", unsigned char " answer [. anslen ],
 .BI "           int " anslen );
 .PP
 .BI "int res_nmkquery(res_state " statep ,
 .BI "           int " op ", const char *" dname ", int " class ,
-.BI "           int " type ", const unsigned char *" data ", int " datalen ,
+.BI "           int " type ", const unsigned char " data [. datalen "], \
+int " datalen ,
 .BI "           const unsigned char *" newrr ,
-.BI "           unsigned char *" buf ", int " buflen );
+.BI "           unsigned char " buf [. buflen "], int " buflen );
 .PP
 .BI "int res_nsend(res_state " statep ,
-.BI "           const unsigned char *" msg ", int " msglen ,
-.BI "           unsigned char *" answer ", int " anslen );
+.BI "           const unsigned char " msg [. msglen "], int " msglen ,
+.BI "           unsigned char " answer [. anslen "], int " anslen );
 .PP
-.BI "int dn_comp(const char *" exp_dn ", unsigned char *" comp_dn ,
+.BI "int dn_comp(const char *" exp_dn ", unsigned char " comp_dn [. length ],
 .BI "           int " length ", unsigned char **" dnptrs ,
 .BI "           unsigned char **" lastdnptr );
 .PP
 .BI "int dn_expand(const unsigned char *" msg ,
 .BI "           const unsigned char *" eomorig ,
-.BI "           const unsigned char *" comp_dn ", char *" exp_dn ,
+.BI "           const unsigned char *" comp_dn ", char " exp_dn [. length ],
 .BI "           int " length );
 .PP
 .B [[deprecated]] extern struct __res_state _res;
@@ -71,26 +72,27 @@ Resolver library
 .PP
 .B [[deprecated]]
 .BI "int res_query(const char *" dname ", int " class ", int " type ,
-.BI "           unsigned char *" answer ", int " anslen );
+.BI "           unsigned char " answer [. anslen "], int " anslen );
 .PP
 .B [[deprecated]]
 .BI "int res_search(const char *" dname ", int " class ", int " type ,
-.BI "           unsigned char *" answer ", int " anslen );
+.BI "           unsigned char " answer [. anslen "], int " anslen );
 .PP
 .B [[deprecated]]
 .BI "int res_querydomain(const char *" name ", const char *" domain ,
-.BI "           int " class ", int " type ", unsigned char *" answer ,
+.BI "           int " class ", int " type ", unsigned char " answer [. anslen ],
 .BI "           int " anslen );
 .PP
 .B [[deprecated]]
 .BI "int res_mkquery(int " op ", const char *" dname ", int " class ,
-.BI "           int " type ", const unsigned char *" data ", int " datalen ,
+.BI "           int " type ", const unsigned char " data [. datalen "], \
+int " datalen ,
 .BI "           const unsigned char *" newrr ,
-.BI "           unsigned char *" buf ", int " buflen );
+.BI "           unsigned char " buf [. buflen "], int " buflen );
 .PP
 .B [[deprecated]]
-.BI "int res_send(const unsigned char *" msg ", int " msglen ,
-.BI "           unsigned char *" answer ", int " anslen );
+.BI "int res_send(const unsigned char " msg [. msglen "], int " msglen ,
+.BI "           unsigned char " answer [. anslen "], int " anslen );
 .fi
 .SH DESCRIPTION
 .B Note:
index 44a0bb9898389e0ac18f8f7e08b458f9f9cf271a..95cfcbe2f3e81a03bfa7e2adcb887ca113fd6dbd 100644 (file)
@@ -74,7 +74,7 @@ This is the default authentication used by RPC.
 .PP
 .nf
 .BI "AUTH *authunix_create(char *" host ", uid_t " uid ", gid_t " gid ,
-.BI "                      int " len ", gid_t *" aup_gids );
+.BI "                      int " len ", gid_t " aup_gids [. len ]);
 .fi
 .IP
 Create and return an RPC authentication handle that contains
index 08d47f7a33a7bef32af940d3d64dce7cb5590915..1b5a5630f1dc7d53518caf6b5fbb301699ba951d 100644 (file)
@@ -20,13 +20,15 @@ Standard C library
 .PP
 .B "struct aliasent *getaliasent(void);"
 .BI "int getaliasent_r(struct aliasent *restrict " result ,
-.BI "                     char *restrict " buffer ", size_t " buflen ,
+.BI "                     char " buffer "[restrict ." buflen "], \
+size_t " buflen ,
 .BI "                     struct aliasent **restrict " res );
 .PP
 .BI "struct aliasent *getaliasbyname(const char *" name );
 .BI "int getaliasbyname_r(const char *restrict " name ,
 .BI "                     struct aliasent *restrict " result ,
-.BI "                     char *restrict " buffer ", size_t " buflen ,
+.BI "                     char " buffer "[restrict ." buflen "], \
+size_t " buflen ,
 .BI "                     struct aliasent **restrict " res );
 .fi
 .SH DESCRIPTION
index a09adba36caf8eec3aa462cc4d74054161282d19..78b399a8272b5f01fed93391c9ffc9026f7c900d 100644 (file)
@@ -27,11 +27,11 @@ Standard C library
 .nf
 .B #include <stdio.h>
 .PP
-.BI "int setvbuf(FILE *restrict " stream ", char *restrict " buf ,
+.BI "int setvbuf(FILE *restrict " stream ", char " buf "[restrict ." size ],
 .BI "            int " mode ", size_t " size );
 .PP
 .BI "void setbuf(FILE *restrict " stream ", char *restrict " buf );
-.BI "void setbuffer(FILE *restrict " stream ", char *restrict " buf ,
+.BI "void setbuffer(FILE *restrict " stream ", char " buf "[restrict ." size ],
 .BI "            size_t "  size );
 .BI "void setlinebuf(FILE *" stream );
 .fi
index 5d43114e31f212d56f6e59c44f6fa73812f84f12..59d572dabe0cbbc629f23bd96a8de83f97f5f820 100644 (file)
@@ -23,7 +23,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 *restrict " buf ", size_t " buflen );
+.BI "            char " buf "[restrict ." buflen "], size_t " buflen );
 .PP
 .BI "int innetgr(const char *" netgroup ", const char *" host ,
 .BI "            const char *" user ", const char *" domain );
index 492f344ebb3d6585a284e26916612b8b3f3d9e93..94f4ebb0440a8745d82bfbdc2b948f5891384fe0 100644 (file)
@@ -16,8 +16,9 @@ Standard C library
 .nf
 .B #include <string.h>
 .PP
-.BI "char *stpncpy(char *restrict " dest ", const char *restrict " src \
-", size_t " n );
+.BI "char *stpncpy(char " dest "[restrict ." n "], \
+const char " src "[restrict ." n ],
+.BI "              size_t " n );
 .fi
 .PP
 .RS -4
index 9feb7e26fb7add4d4a3543bc980729a6aca4d6d7..0e3da7bbc184d10ed38ec07b8fc69eef0c19d6b2 100644 (file)
@@ -18,7 +18,8 @@ Standard C library
 .B #include <strings.h>
 .PP
 .BI "int strcasecmp(const char *" s1 ", const char *" s2 );
-.BI "int strncasecmp(const char *" s1 ", const char *" s2 ", size_t " n );
+.BI "int strncasecmp(const char " s1 [. n "], const char " s2 [. n "], \
+size_t " n );
 .fi
 .SH DESCRIPTION
 The
index a4655eaceac81cfc6668af0503cfd18dde4bba47..a4a376ba9e05d03854691878a8fe98a061c9dc34 100644 (file)
@@ -20,8 +20,9 @@ Standard C library
 .B #include <string.h>
 .PP
 .BI "char *strcat(char *restrict " dest ", const char *restrict " src );
-.BI "char *strncat(char *restrict " dest ", const char *restrict " src \
-", size_t " n );
+.BI "char *strncat(char " dest "[restrict ." n "], \
+const char " src "[restrict ." n ],
+.BI "              size_t " n );
 .fi
 .SH DESCRIPTION
 The
index 824ab69e8011ede72edbbdb5cc25e4c754a5b252..711351e416ced5cc3d04ef0c5805cca34c00abe7 100644 (file)
@@ -21,7 +21,7 @@ Standard C library
 .B #include <string.h>
 .PP
 .BI "int strcmp(const char *" s1 ", const char *" s2 );
-.BI "int strncmp(const char *" s1 ", const char *" s2 ", size_t " n );
+.BI "int strncmp(const char " s1 [. n "], const char " s2 [. n "], size_t " n );
 .fi
 .SH DESCRIPTION
 The
index 4d8a430617fc90cdc9b665cc3e54b49102c23395..1b41e08a2f90355f9387a0c41df2e176689239b7 100644 (file)
@@ -23,8 +23,9 @@ Standard C library
 .B #include <string.h>
 .PP
 .BI "char *strcpy(char *restrict " dest ", const char *restrict " src );
-.BI "char *strncpy(char *restrict " dest ", const char *restrict " src \
-", size_t " n );
+.BI "char *strncpy(char " dest "[restrict ." n "], \
+const char " src "[restrict ." n ],
+.BI "              size_t " n );
 .fi
 .SH DESCRIPTION
 The
index 85174f0855134ffa95a9b645a7c88287a3538885..876848b3b3b39b1e7ec072f937d5f6f52ae5da00 100644 (file)
@@ -20,9 +20,9 @@ Standard C library
 .PP
 .BI "char *strdup(const char *" s );
 .PP
-.BI "char *strndup(const char *" s ", size_t " n );
+.BI "char *strndup(const char " s [. n "], size_t " n );
 .BI "char *strdupa(const char *" s );
-.BI "char *strndupa(const char *" s ", size_t " n );
+.BI "char *strndupa(const char " s [. n "], size_t " n );
 .fi
 .PP
 .RS -4
index ad8973413d856ea3721e8805a40528cba15990bd..862e153ee0d16507db08146af46e34ca943f62e2 100644 (file)
@@ -31,10 +31,10 @@ Standard C library
 .BI "const char *strerrorname_np(int " errnum );
 .BI "const char *strerrordesc_np(int " errnum );
 .PP
-.BI "int strerror_r(int " errnum ", char *" buf ", size_t " buflen );
+.BI "int strerror_r(int " errnum ", char " buf [. buflen "], size_t " buflen );
                /* XSI-compliant */
 .PP
-.BI "char *strerror_r(int " errnum ", char *" buf ", size_t " buflen );
+.BI "char *strerror_r(int " errnum ", char " buf [. buflen "], size_t " buflen );
                /* GNU-specific */
 .PP
 .BI "char *strerror_l(int " errnum ", locale_t " locale );
index efc713a1506a4b52790aec84281abce6125770c8..ef575e6233e4d74d553f49d81f144aff521053e5 100644 (file)
@@ -12,9 +12,10 @@ Standard C library
 .nf
 .B #include <monetary.h>
 .PP
-.BI "ssize_t strfmon(char *restrict " s ", size_t " max ,
+.BI "ssize_t strfmon(char " s "[restrict ." max "], size_t " max ,
 .BI "                const char *restrict " format ", ...);"
-.BI "ssize_t strfmon_l(char *restrict " s ", size_t " max ", locale_t " locale ,
+.BI "ssize_t strfmon_l(char " s "[restrict ." max "], size_t " max ", \
+locale_t " locale ,
 .BI "                const char *restrict " format ", ...);"
 .fi
 .SH DESCRIPTION
index 3e0b19df43247607242fe5dc450acf4ebb010cf8..4b13a27f1cfe672b9b4358775c0124cafba5f5f7 100644 (file)
@@ -20,11 +20,11 @@ Standard C library
 .nf
 .B #include <stdlib.h>
 .PP
-.BI "int strfromd(char *restrict " str ", size_t " n ,
+.BI "int strfromd(char " str "[restrict ." n "], size_t " n ,
 .BI "             const char *restrict " format ", double " fp ");"
-.BI "int strfromf(char *restrict " str ", size_t " n ,
+.BI "int strfromf(char " str "[restrict ." n "], size_t " n ,
 .BI "             const char *restrict " format ", float "fp ");"
-.BI "int strfroml(char *restrict " str ", size_t " n ,
+.BI "int strfroml(char " str "[restrict ." n "], size_t " n ,
 .BI "             const char *restrict " format ", long double " fp ");"
 .fi
 .PP
index 027aa4a2e09907311672540682aa8893c93a7dae..b10debf81757905710ba4714dab298a51ae2a6ab 100644 (file)
@@ -24,11 +24,11 @@ Standard C library
 .nf
 .B #include <time.h>
 .PP
-.BI "size_t strftime(char *restrict " s ", size_t " max ,
+.BI "size_t strftime(char " s "[restrict ." max "], size_t " max ,
 .BI "                const char *restrict " format ,
 .BI "                const struct tm *restrict " tm );
 .PP
-.BI "size_t strftime_l(char *restrict " s ", size_t " max ,
+.BI "size_t strftime_l(char " s "[restrict ." max "], size_t " max ,
 .BI "                const char *restrict " format ,
 .BI "                const struct tm *restrict " tm ,
 .BI "                locale_t " locale );
index 8cd7940372b3bf78c9bf252ec7bba443cf0f29f3..32e9d8f5a067e5a6f6c178fe207d8283a0653a00 100644 (file)
@@ -26,7 +26,8 @@ and
 .I s2
 ignoring case.
 .TP
-.BI "int strncasecmp(const char *" s1 ", const char *" s2 ", size_t " n );
+.BI "int strncasecmp(const char " s1 [. n "], const char " s2 [. n "], \
+size_t " n );
 Compare the first
 .I n
 bytes of the strings
@@ -112,8 +113,11 @@ Randomly swap the characters in
 Return the length of the string
 .IR s .
 .TP
-.BI "char *strncat(char *restrict " dest ", const char *restrict " src \
-", size_t " n );
+.nf
+.BI "char *strncat(char " dest "[restrict ." n "], \
+const char " src "[restrict ." n ],
+.BI "       size_t " n );
+.fi
 Append at most
 .I n
 bytes from the string
@@ -123,7 +127,7 @@ to the string
 returning a pointer to
 .IR dest .
 .TP
-.BI "int strncmp(const char *" s1 ", const char *" s2 ", size_t " n );
+.BI "int strncmp(const char " s1 [. n "], const char " s2 [. n "], size_t " n );
 Compare at most
 .I n
 bytes of the strings
@@ -131,8 +135,11 @@ bytes of the strings
 and
 .IR s2 .
 .TP
-.BI "char *strncpy(char *restrict " dest ", const char *restrict " src \
-", size_t " n );
+.nf
+.BI "char *strncpy(char " dest "[restrict ." n "], \
+const char " src "[restrict ." n ],
+.BI "       size_t " n );
+.fi
 Copy at most
 .I n
 bytes from string
@@ -179,8 +186,11 @@ Extract tokens from the string
 that are delimited by one of the bytes in
 .IR delim .
 .TP
-.BI "size_t strxfrm(char *restrict " dst ", const char *restrict " src \
-", size_t " n );
+.nf
+.BI "size_t strxfrm(char " dst "[restrict ." n "], \
+const char " src "[restrict ." n ],
+.BI "        size_t " n );
+.fi
 Transforms
 .I src
 to the current locale and copies the first
index c400bc9ff8d41e2bcc7fd6e69f89f72cd9d8eab4..8d26be7677d567f19914ff0546370e2088b1462a 100644 (file)
@@ -15,7 +15,7 @@ Standard C library
 .nf
 .B #include <string.h>
 .PP
-.BI "size_t strnlen(const char *" s ", size_t " maxlen );
+.BI "size_t strnlen(const char " s [. maxlen "], size_t " maxlen );
 .fi
 .PP
 .RS -4
index a2bb9be8aee84cf181eff2bf4e526773384c6d4c..d1ec4542c4f04a942912918f01410df31e480965 100644 (file)
@@ -17,7 +17,8 @@ Standard C library
 .nf
 .B #include <string.h>
 .PP
-.BI "size_t strxfrm(char *restrict " dest ", const char *restrict " src ,
+.BI "size_t strxfrm(char " dest "[restrict ." n "], \
+const char " src "[restrict ." n ],
 .BI "               size_t " n );
 .fi
 .SH DESCRIPTION
index a01fe4841156db778dd94cec9e33f1011f1e24ab..3a200bfc4219429a21363a3df6ac5f2b6a4f3407 100644 (file)
@@ -16,7 +16,7 @@ Standard C library
 .B #include <unistd.h>
 .PP
 .BI "char *ttyname(int " fd );
-.BI "int ttyname_r(int " fd ", char *" buf ", size_t " buflen );
+.BI "int ttyname_r(int " fd ", char " buf [. buflen "], size_t " buflen );
 .fi
 .SH DESCRIPTION
 The function
index 74cc9ca07bdc7a3a5110416aebde1b07ace43013..ad15a632aa17942d3efc2dc24c5654313f434e85 100644 (file)
@@ -33,7 +33,7 @@ Standard C library
 ", size_t " n ,
 .BI "                      FILE *restrict " stream );
 .PP
-.BI "char *fgets_unlocked(char *restrict " s ", int " n \
+.BI "char *fgets_unlocked(char " s "[restrict ." n "], int " n \
 ", FILE *restrict " stream );
 .BI "int fputs_unlocked(const char *restrict " s ", FILE *restrict " stream );
 .PP
@@ -47,7 +47,7 @@ Standard C library
 .BI "wint_t putwc_unlocked(wchar_t " wc ", FILE *" stream );
 .BI "wint_t putwchar_unlocked(wchar_t " wc );
 .PP
-.BI "wchar_t *fgetws_unlocked(wchar_t *restrict " ws ", int " n ,
+.BI "wchar_t *fgetws_unlocked(wchar_t " ws "[restrict ." n "], int " n ,
 .BI "                      FILE *restrict " stream );
 .BI "int fputws_unlocked(const wchar_t *restrict " ws ,
 .BI "                      FILE *restrict " stream );
index 54745c543b2aef218b3d82c99b6d87a241c0de50..77ad70eab7a48c9111572d17ef67f068876b3473 100644 (file)
@@ -18,8 +18,8 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "wchar_t *wcpncpy(wchar_t *restrict " dest \
-", const wchar_t *restrict " src ,
+.BI "wchar_t *wcpncpy(wchar_t " dest "[restrict ." n ],
+.BI "                 const wchar_t " src "[restrict ." n ],
 .BI "                 size_t " n );
 .fi
 .PP
index ebb9c2c993ba0dcc4c99b7a60a0e7763339773ff..0b072369a5537953233a36e9d682e4000da98ea4 100644 (file)
@@ -17,7 +17,8 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "int wcsncasecmp(const wchar_t *" s1 ", const wchar_t *" s2 ", size_t " n );
+.BI "int wcsncasecmp(const wchar_t " s1 [. n "], const wchar_t " s2 [. n "], s\
+ize_t " n );
 .fi
 .PP
 .RS -4
index 0b278c05d0dfe7b383f229a9dd51fa3815ed9f78..a7c146a5cf06831e5f96b3e1eb0ccdcdcf7a291f 100644 (file)
@@ -18,8 +18,8 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "wchar_t *wcsncat(wchar_t *restrict " dest \
-", const wchar_t *restrict " src ,
+.BI "wchar_t *wcsncat(wchar_t " dest "[restrict ." n ],
+.BI "                 const wchar_t " src "[restrict ." n ],
 .BI "                 size_t " n );
 .fi
 .SH DESCRIPTION
index 0fedd9529978df0d9a5055dc62214db2f974d396..7067ccf2ff740dd6072932425c04f8db1178400b 100644 (file)
@@ -18,7 +18,8 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "int wcsncmp(const wchar_t *" s1 ", const wchar_t *" s2 ", size_t " n );
+.BI "int wcsncmp(const wchar_t " s1 [. n "], const wchar_t " s2 [. n "], \
+size_t " n );
 .fi
 .SH DESCRIPTION
 The
index eac21d5c802f2b0da317e415bf77cc3d3167fdbf..c792ce823fbcfaca17ce7faab9cfb0829d415d8e 100644 (file)
@@ -18,8 +18,8 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "wchar_t *wcsncpy(wchar_t *restrict " dest \
-", const wchar_t *restrict " src ,
+.BI "wchar_t *wcsncpy(wchar_t " dest "[restrict ." n ],
+.BI "                 const wchar_t " src "[restrict ." n ],
 .BI "                 size_t " n );
 .fi
 .SH DESCRIPTION
index a81f1cd9e3ba337b1e0be5eb02b00c22bb45776c..c6e5d7cdcf387008e1b5e20b44c72acebee586a7 100644 (file)
@@ -17,7 +17,7 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "size_t wcsnlen(const wchar_t *" s ", size_t " maxlen );
+.BI "size_t wcsnlen(const wchar_t " s [. maxlen "], size_t " maxlen );
 .fi
 .PP
 .RS -4
index e5728a9aaf6aff33d53c19032f8f99e955e32f23..61f77a431c66e7904d1b68931dac1b93e53d8cd6 100644 (file)
@@ -17,9 +17,10 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "size_t wcsnrtombs(char *restrict " dest ", const wchar_t **restrict " src ,
-.BI "                  size_t " nwc ", size_t " len \
-", mbstate_t *restrict " ps );
+.BI "size_t wcsnrtombs(char " dest "[restrict ." len "], \
+const wchar_t **restrict " src ,
+.BI "                  size_t " nwc ", size_t " len ", \
+mbstate_t *restrict " ps );
 .fi
 .PP
 .RS -4
index 057feb717133bd7c868f7a97749b2744180d5678..bcf57dc870d148e2b750736d310cd998fa574c43 100644 (file)
@@ -18,7 +18,8 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "size_t wcsrtombs(char *restrict " dest ", const wchar_t **restrict " src ,
+.BI "size_t wcsrtombs(char " dest "[restrict ." len "], \
+const wchar_t **restrict " src ,
 .BI "                 size_t " len ", mbstate_t *restrict " ps );
 .fi
 .SH DESCRIPTION
index b20073df75fcb4afffafb8ae904f35b77af0c1c9..1e8fca593ffaa33a8112d0ca20cba3df5ffb6979 100644 (file)
@@ -18,7 +18,8 @@ Standard C library
 .nf
 .B #include <stdlib.h>
 .PP
-.BI "size_t wcstombs(char *restrict " dest ", const wchar_t *restrict " src ,
+.BI "size_t wcstombs(char " dest "[restrict ." n "], \
+const wchar_t *restrict " src ,
 .BI "                size_t " n );
 .fi
 .SH DESCRIPTION
index 4ae1c26155d92f03781c60ddb6dda2b56112c89a..72dbd706b0c39ea56a97837c9e052d9f79850bc1 100644 (file)
@@ -18,7 +18,7 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "wchar_t *wmemchr(const wchar_t *" s ", wchar_t " c ", size_t " n );
+.BI "wchar_t *wmemchr(const wchar_t " s [. n "], wchar_t " c ", size_t " n );
 .fi
 .SH DESCRIPTION
 The
index 7ba38f0134bd6795862830c21f0ebdc8cc035920..dcf5d2c748e2a438edb4f736ef6482cafb7a6efc 100644 (file)
@@ -17,7 +17,8 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "int wmemcmp(const wchar_t *" s1 ", const wchar_t *" s2 ", size_t " n );
+.BI "int wmemcmp(const wchar_t " s1 [. n "], const wchar_t " s2 [. n "], \
+size_t " n );
 .fi
 .SH DESCRIPTION
 The
index 79170e60af494aa2d2738d58108af83b5bfcac5c..4659514f9973f2cfcc380db7e60d38be7188262b 100644 (file)
@@ -18,8 +18,8 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "wchar_t *wmemcpy(wchar_t *restrict " dest \
-", const wchar_t *restrict " src ,
+.BI "wchar_t *wmemcpy(wchar_t " dest "[restrict ." n ],
+.BI "                 const wchar_t " src "[restrict ." n ],
 .BI "                 size_t " n );
 .fi
 .SH DESCRIPTION
index fddcd534ed31456dfc65c563b71007b31f1133f0..fd023a24a7d244db43a6c8ca9e6ea134ef99d8f0 100644 (file)
@@ -18,7 +18,8 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "wchar_t *wmemmove(wchar_t *" dest ", const wchar_t *" src ", size_t " n );
+.BI "wchar_t *wmemmove(wchar_t " dest [. n "], const wchar_t " src [. n "], \
+size_t " n );
 .fi
 .SH DESCRIPTION
 The
index 46c3b8f7d9a7ca0967f4e11469d37c308adf9f0a..706aa969c0b0ef56a1ae16b3f2bb57020ba6d045 100644 (file)
@@ -18,7 +18,7 @@ Standard C library
 .nf
 .B #include <wchar.h>
 .PP
-.BI "wchar_t *wmemset(wchar_t *" wcs ", wchar_t " wc ", size_t " n );
+.BI "wchar_t *wmemset(wchar_t " wcs [. n "], wchar_t " wc ", size_t " n );
 .fi
 .SH DESCRIPTION
 The
index afd9e6444474826486c8ced711a74c0b90eaaf5a..f3cdfa2c99b5d1e94dafd6ba58c60080f70c9f0b 100644 (file)
@@ -23,13 +23,13 @@ Standard C library
 .BI "int wprintf(const wchar_t *restrict " format ", ...);"
 .BI "int fwprintf(FILE *restrict " stream ,
 .BI "             const wchar_t *restrict " format ", ...);"
-.BI "int swprintf(wchar_t *restrict " wcs ", size_t " maxlen ,
+.BI "int swprintf(wchar_t " wcs "[restrict ." maxlen "], size_t " maxlen ,
 .BI "             const wchar_t *restrict " format ", ...);"
 .PP
 .BI "int vwprintf(const wchar_t *restrict " format ", va_list " args );
 .BI "int vfwprintf(FILE *restrict " stream ,
 .BI "             const wchar_t *restrict " format ", va_list " args );
-.BI "int vswprintf(wchar_t *restrict " wcs ", size_t " maxlen ,
+.BI "int vswprintf(wchar_t " wcs "[restrict ." maxlen "], size_t " maxlen ,
 .BI "             const wchar_t *restrict " format ", va_list " args );
 .fi
 .PP