aboutsummaryrefslogtreecommitdiff
path: root/manual/string.texi
diff options
context:
space:
mode:
authorRical Jasan <ricaljasan@pacific.net>2017-06-15 21:12:39 -0700
committerRical Jasan <ricaljasan@pacific.net>2017-06-15 21:26:20 -0700
commitd08a7e4cbe43d5e4e4b14dea950fea623d96c1a1 (patch)
tree6f27987046ae0e8804f4d641c99ff1666652117a /manual/string.texi
parent27691d5cec9b896ea0792151a27c6d7d7a4065ea (diff)
downloadglibc-d08a7e4cbe43d5e4e4b14dea950fea623d96c1a1.tar.xz
glibc-d08a7e4cbe43d5e4e4b14dea950fea623d96c1a1.zip
manual: Replace summary.awk with summary.pl.
The Summary is now generated from @standards, and syntax-checking is performed. If invalid @standards syntax is detected, summary.pl will fail, reporting all errors. Failure and error reporting is disabled for now, however, since much of the manual is still incomplete wrt. header and standards annotations. Note that the sorting order of the Summary has changed; summary.pl respects the locale, like summary.awk did, but the use of LC_ALL=C is introduced in the Makefile. Other notable deviations are improved detection of the annotated elements' names, which are used for sorting, and improved detection of the @node used to reference into the manual. The most noticeable difference in the rendered Summary is that entries may now contain multiple lines, one for each header and standard combination. summary.pl accepts a `--help' option, which details the expected syntax of @standards. If errors are reported, the user is directed to this feature for further information. * manual/Makefile: Generate summary.texi with summary.pl. Force use of the C locale. Update Perl dependency comment. * manual/header.texi: Update reference to summary.awk. * manual/macros.texi: Refer authors to `summary.pl --help'. * manual/summary.awk: Remove file. * manual/summary.pl: New file. Generate summary.texi, and check for @standards-related syntax errors. * manual/argp.texi: Convert header and standards @comments to @standards. * manual/arith.texi: Likewise. * manual/charset.texi: Likewise. * manual/conf.texi: Likewise. * manual/creature.texi: Likewise. * manual/crypt.texi: Likewise. * manual/ctype.texi: Likewise. * manual/debug.texi: Likewise. * manual/errno.texi: Likewise. * manual/filesys.texi: Likewise. * manual/getopt.texi: Likewise. * manual/job.texi: Likewise. * manual/lang.texi: Likewise. * manual/llio.texi: Likewise. * manual/locale.texi: Likewise. * manual/math.texi: Likewise. * manual/memory.texi: Likewise. * manual/message.texi: Likewise. * manual/pattern.texi: Likewise. * manual/pipe.texi: Likewise. * manual/process.texi: Likewise. * manual/resource.texi: Likewise. * manual/search.texi: Likewise. * manual/setjmp.texi: Likewise. * manual/signal.texi: Likewise. * manual/socket.texi: Likewise. * manual/startup.texi: Likewise. * manual/stdio.texi: Likewise. * manual/string.texi: Likewise. * manual/sysinfo.texi: Likewise. * manual/syslog.texi: Likewise. * manual/terminal.texi: Likewise. * manual/threads.texi: Likewise. * manual/time.texi: Likewise. * manual/users.texi: Likewise.
Diffstat (limited to 'manual/string.texi')
-rw-r--r--manual/string.texi301
1 files changed, 101 insertions, 200 deletions
diff --git a/manual/string.texi b/manual/string.texi
index b8810d66b7..272148f388 100644
--- a/manual/string.texi
+++ b/manual/string.texi
@@ -227,9 +227,8 @@ You can get the length of a string using the @code{strlen} function.
This function is declared in the header file @file{string.h}.
@pindex string.h
-@comment string.h
-@comment ISO
@deftypefun size_t strlen (const char *@var{s})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{strlen} function returns the length of the
string @var{s} in bytes. (In other words, it returns the offset of the
@@ -294,9 +293,8 @@ bytes) is needed often it is better to work with wide characters.
The wide character equivalent is declared in @file{wchar.h}.
-@comment wchar.h
-@comment ISO
@deftypefun size_t wcslen (const wchar_t *@var{ws})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{wcslen} function is the wide character equivalent to
@code{strlen}. The return value is the number of wide characters in the
@@ -310,9 +308,8 @@ also the number of wide characters.
This function was introduced in @w{Amendment 1} to @w{ISO C90}.
@end deftypefun
-@comment string.h
-@comment GNU
@deftypefun size_t strnlen (const char *@var{s}, size_t @var{maxlen})
+@standards{GNU, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
If the array @var{s} of size @var{maxlen} contains a null byte,
the @code{strnlen} function returns the length of the string @var{s} in
@@ -334,9 +331,8 @@ strnlen (string, 5)
This function is a GNU extension and is declared in @file{string.h}.
@end deftypefun
-@comment wchar.h
-@comment GNU
@deftypefun size_t wcsnlen (const wchar_t *@var{ws}, size_t @var{maxlen})
+@standards{GNU, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
@code{wcsnlen} is the wide character equivalent to @code{strnlen}. The
@var{maxlen} parameter specifies the maximum number of wide characters.
@@ -381,9 +377,8 @@ section, there are a few others like @code{sprintf} (@pxref{Formatted
Output Functions}) and @code{scanf} (@pxref{Formatted Input
Functions}).
-@comment string.h
-@comment ISO
@deftypefun {void *} memcpy (void *restrict @var{to}, const void *restrict @var{from}, size_t @var{size})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{memcpy} function copies @var{size} bytes from the object
beginning at @var{from} into the object beginning at @var{to}. The
@@ -403,9 +398,8 @@ memcpy (new, old, arraysize * sizeof (struct foo));
@end smallexample
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun {wchar_t *} wmemcpy (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom}, size_t @var{size})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{wmemcpy} function copies @var{size} wide characters from the object
beginning at @var{wfrom} into the object beginning at @var{wto}. The
@@ -429,9 +423,8 @@ The value returned by @code{wmemcpy} is the value of @var{wto}.
This function was introduced in @w{Amendment 1} to @w{ISO C90}.
@end deftypefun
-@comment string.h
-@comment GNU
@deftypefun {void *} mempcpy (void *restrict @var{to}, const void *restrict @var{from}, size_t @var{size})
+@standards{GNU, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{mempcpy} function is nearly identical to the @code{memcpy}
function. It copies @var{size} bytes from the object beginning at
@@ -457,9 +450,8 @@ combine (void *o1, size_t s1, void *o2, size_t s2)
This function is a GNU extension.
@end deftypefun
-@comment wchar.h
-@comment GNU
@deftypefun {wchar_t *} wmempcpy (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom}, size_t @var{size})
+@standards{GNU, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{wmempcpy} function is nearly identical to the @code{wmemcpy}
function. It copies @var{size} wide characters from the object
@@ -486,9 +478,8 @@ wmempcpy (wchar_t *restrict wto, const wchar_t *restrict wfrom,
This function is a GNU extension.
@end deftypefun
-@comment string.h
-@comment ISO
@deftypefun {void *} memmove (void *@var{to}, const void *@var{from}, size_t @var{size})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
@code{memmove} copies the @var{size} bytes at @var{from} into the
@var{size} bytes at @var{to}, even if those two blocks of space
@@ -499,9 +490,8 @@ bytes which also belong to the block at @var{to}.
The value returned by @code{memmove} is the value of @var{to}.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun {wchar_t *} wmemmove (wchar_t *@var{wto}, const wchar_t *@var{wfrom}, size_t @var{size})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
@code{wmemmove} copies the @var{size} wide characters at @var{wfrom}
into the @var{size} wide characters at @var{wto}, even if those two
@@ -527,9 +517,8 @@ The value returned by @code{wmemmove} is the value of @var{wto}.
This function is a GNU extension.
@end deftypefun
-@comment string.h
-@comment SVID
@deftypefun {void *} memccpy (void *restrict @var{to}, const void *restrict @var{from}, int @var{c}, size_t @var{size})
+@standards{SVID, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function copies no more than @var{size} bytes from @var{from} to
@var{to}, stopping if a byte matching @var{c} is found. The return
@@ -538,27 +527,24 @@ or a null pointer if no byte matching @var{c} appeared in the first
@var{size} bytes of @var{from}.
@end deftypefun
-@comment string.h
-@comment ISO
@deftypefun {void *} memset (void *@var{block}, int @var{c}, size_t @var{size})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function copies the value of @var{c} (converted to an
@code{unsigned char}) into each of the first @var{size} bytes of the
object beginning at @var{block}. It returns the value of @var{block}.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun {wchar_t *} wmemset (wchar_t *@var{block}, wchar_t @var{wc}, size_t @var{size})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function copies the value of @var{wc} into each of the first
@var{size} wide characters of the object beginning at @var{block}. It
returns the value of @var{block}.
@end deftypefun
-@comment string.h
-@comment ISO
@deftypefun {char *} strcpy (char *restrict @var{to}, const char *restrict @var{from})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This copies bytes from the string @var{from} (up to and including
the terminating null byte) into the string @var{to}. Like
@@ -566,9 +552,8 @@ the terminating null byte) into the string @var{to}. Like
overlap. The return value is the value of @var{to}.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun {wchar_t *} wcscpy (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This copies wide characters from the wide string @var{wfrom} (up to and
including the terminating null wide character) into the string
@@ -576,8 +561,8 @@ including the terminating null wide character) into the string
the strings overlap. The return value is the value of @var{wto}.
@end deftypefun
-@comment SVID
@deftypefun {char *} strdup (const char *@var{s})
+@standards{SVID, ???}
@safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
This function copies the string @var{s} into a newly
allocated string. The string is allocated using @code{malloc}; see
@@ -586,9 +571,8 @@ for the new string, @code{strdup} returns a null pointer. Otherwise it
returns a pointer to the new string.
@end deftypefun
-@comment wchar.h
-@comment GNU
@deftypefun {wchar_t *} wcsdup (const wchar_t *@var{ws})
+@standards{GNU, wchar.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
This function copies the wide string @var{ws}
into a newly allocated string. The string is allocated using
@@ -599,9 +583,8 @@ pointer. Otherwise it returns a pointer to the new wide string.
This function is a GNU extension.
@end deftypefun
-@comment string.h
-@comment Unknown origin
@deftypefun {char *} stpcpy (char *restrict @var{to}, const char *restrict @var{from})
+@standards{Unknown origin, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is like @code{strcpy}, except that it returns a pointer to
the end of the string @var{to} (that is, the address of the terminating
@@ -622,9 +605,8 @@ Its behavior is undefined if the strings overlap. The function is
declared in @file{string.h}.
@end deftypefun
-@comment wchar.h
-@comment GNU
@deftypefun {wchar_t *} wcpcpy (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom})
+@standards{GNU, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is like @code{wcscpy}, except that it returns a pointer to
the end of the string @var{wto} (that is, the address of the terminating
@@ -638,9 +620,8 @@ The behavior of @code{wcpcpy} is undefined if the strings overlap.
@code{wcpcpy} is a GNU extension and is declared in @file{wchar.h}.
@end deftypefun
-@comment string.h
-@comment GNU
@deftypefn {Macro} {char *} strdupa (const char *@var{s})
+@standards{GNU, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This macro is similar to @code{strdup} but allocates the new string
using @code{alloca} instead of @code{malloc} (@pxref{Variable Size
@@ -665,18 +646,16 @@ passing.
This function is only available if GNU CC is used.
@end deftypefn
-@comment string.h
-@comment BSD
@deftypefun void bcopy (const void *@var{from}, void *@var{to}, size_t @var{size})
+@standards{BSD, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This is a partially obsolete alternative for @code{memmove}, derived from
BSD. Note that it is not quite equivalent to @code{memmove}, because the
arguments are not in the same order and there is no return value.
@end deftypefun
-@comment string.h
-@comment BSD
@deftypefun void bzero (void *@var{block}, size_t @var{size})
+@standards{BSD, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This is a partially obsolete alternative for @code{memset}, derived from
BSD. Note that it is not as general as @code{memset}, because the only
@@ -696,9 +675,8 @@ functions in their conventions. @xref{Copying Strings and Arrays}.
@samp{strcat} is declared in the header file @file{string.h} while
@samp{wcscat} is declared in @file{wchar.h}.
-@comment string.h
-@comment ISO
@deftypefun {char *} strcat (char *restrict @var{to}, const char *restrict @var{from})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{strcat} function is similar to @code{strcpy}, except that the
bytes from @var{from} are concatenated or appended to the end of
@@ -721,9 +699,8 @@ This function has undefined results if the strings overlap.
As noted below, this function has significant performance issues.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun {wchar_t *} wcscat (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{wcscat} function is similar to @code{wcscpy}, except that the
wide characters from @var{wfrom} are concatenated or appended to the end of
@@ -885,8 +862,8 @@ in their header conventions. @xref{Copying Strings and Arrays}. The
@samp{str} functions are declared in the header file @file{string.h}
and the @samp{wc} functions are declared in the file @file{wchar.h}.
-@comment string.h
@deftypefun {char *} strncpy (char *restrict @var{to}, const char *restrict @var{from}, size_t @var{size})
+@standards{???, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is similar to @code{strcpy} but always copies exactly
@var{size} bytes into @var{to}.
@@ -908,9 +885,8 @@ greater than the length of @var{from}. As noted below, this function
is generally a poor choice for processing text.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun {wchar_t *} wcsncpy (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom}, size_t @var{size})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is similar to @code{wcscpy} but always copies exactly
@var{size} wide characters into @var{wto}.
@@ -933,9 +909,8 @@ example, as noted below, this function is generally a poor choice for
processing text.
@end deftypefun
-@comment string.h
-@comment GNU
@deftypefun {char *} strndup (const char *@var{s}, size_t @var{size})
+@standards{GNU, string.h}
@safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
This function is similar to @code{strdup} but always copies at most
@var{size} bytes into the newly allocated string.
@@ -953,9 +928,8 @@ processing text.
@code{strndup} is a GNU extension.
@end deftypefun
-@comment string.h
-@comment GNU
@deftypefn {Macro} {char *} strndupa (const char *@var{s}, size_t @var{size})
+@standards{GNU, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is similar to @code{strndup} but like @code{strdupa} it
allocates the new string using @code{alloca} @pxref{Variable Size
@@ -972,9 +946,8 @@ processing text.
@code{strndupa} is only available if GNU CC is used.
@end deftypefn
-@comment string.h
-@comment GNU
@deftypefun {char *} stpncpy (char *restrict @var{to}, const char *restrict @var{from}, size_t @var{size})
+@standards{GNU, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is similar to @code{stpcpy} but copies always exactly
@var{size} bytes into @var{to}.
@@ -1001,9 +974,8 @@ As noted below, this function is generally a poor choice for
processing text.
@end deftypefun
-@comment wchar.h
-@comment GNU
@deftypefun {wchar_t *} wcpncpy (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom}, size_t @var{size})
+@standards{GNU, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is similar to @code{wcpcpy} but copies always exactly
@var{wsize} wide characters into @var{wto}.
@@ -1032,9 +1004,8 @@ processing text.
@code{wcpncpy} is a GNU extension.
@end deftypefun
-@comment string.h
-@comment ISO
@deftypefun {char *} strncat (char *restrict @var{to}, const char *restrict @var{from}, size_t @var{size})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is like @code{strcat} except that not more than @var{size}
bytes from @var{from} are appended to the end of @var{to}, and
@@ -1067,9 +1038,8 @@ choice for processing text. Also, this function has significant
performance issues. @xref{Concatenating Strings}.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun {wchar_t *} wcsncat (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom}, size_t @var{size})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is like @code{wcscat} except that not more than @var{size}
wide characters from @var{from} are appended to the end of @var{to},
@@ -1156,9 +1126,8 @@ This is canonically done with an expression like @w{@samp{! strcmp (s1, s2)}}.
All of these functions are declared in the header file @file{string.h}.
@pindex string.h
-@comment string.h
-@comment ISO
@deftypefun int memcmp (const void *@var{a1}, const void *@var{a2}, size_t @var{size})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The function @code{memcmp} compares the @var{size} bytes of memory
beginning at @var{a1} against the @var{size} bytes of memory beginning
@@ -1170,9 +1139,8 @@ If the contents of the two blocks are equal, @code{memcmp} returns
@code{0}.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun int wmemcmp (const wchar_t *@var{a1}, const wchar_t *@var{a2}, size_t @var{size})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The function @code{wmemcmp} compares the @var{size} wide characters
beginning at @var{a1} against the @var{size} wide characters beginning
@@ -1223,9 +1191,8 @@ struct foo
you are better off writing a specialized comparison function to compare
@code{struct foo} objects instead of comparing them with @code{memcmp}.
-@comment string.h
-@comment ISO
@deftypefun int strcmp (const char *@var{s1}, const char *@var{s2})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{strcmp} function compares the string @var{s1} against
@var{s2}, returning a value that has the same sign as the difference
@@ -1243,9 +1210,8 @@ strings are written in into account. To get that one has to use
@code{strcoll}.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun int wcscmp (const wchar_t *@var{ws1}, const wchar_t *@var{ws2})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{wcscmp} function compares the wide string @var{ws1}
@@ -1264,9 +1230,8 @@ strings are written in into account. To get that one has to use
@code{wcscoll}.
@end deftypefun
-@comment string.h
-@comment BSD
@deftypefun int strcasecmp (const char *@var{s1}, const char *@var{s2})
+@standards{BSD, string.h}
@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
@c Although this calls tolower multiple times, it's a macro, and
@c strcasecmp is optimized so that the locale pointer is read only once.
@@ -1283,9 +1248,8 @@ regards these characters as parts of the alphabet they do match.
@code{strcasecmp} is derived from BSD.
@end deftypefun
-@comment wchar.h
-@comment GNU
@deftypefun int wcscasecmp (const wchar_t *@var{ws1}, const wchar_t *@var{ws2})
+@standards{GNU, wchar.h}
@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
@c Since towlower is not a macro, the locale object may be read multiple
@c times.
@@ -1299,9 +1263,8 @@ regards these characters as parts of the alphabet they do match.
@code{wcscasecmp} is a GNU extension.
@end deftypefun
-@comment string.h
-@comment ISO
@deftypefun int strncmp (const char *@var{s1}, const char *@var{s2}, size_t @var{size})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is the similar to @code{strcmp}, except that no more than
@var{size} bytes are compared. In other words, if the two
@@ -1309,9 +1272,8 @@ strings are the same in their first @var{size} bytes, the
return value is zero.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun int wcsncmp (const wchar_t *@var{ws1}, const wchar_t *@var{ws2}, size_t @var{size})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function is similar to @code{wcscmp}, except that no more than
@var{size} wide characters are compared. In other words, if the two
@@ -1319,9 +1281,8 @@ strings are the same in their first @var{size} wide characters, the
return value is zero.
@end deftypefun
-@comment string.h
-@comment BSD
@deftypefun int strncasecmp (const char *@var{s1}, const char *@var{s2}, size_t @var{n})
+@standards{BSD, string.h}
@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
This function is like @code{strncmp}, except that differences in case
are ignored, and the compared parts of the arguments should consist of
@@ -1333,9 +1294,8 @@ uppercase and lowercase characters are related.
@code{strncasecmp} is a GNU extension.
@end deftypefun
-@comment wchar.h
-@comment GNU
@deftypefun int wcsncasecmp (const wchar_t *@var{ws1}, const wchar_t *@var{s2}, size_t @var{n})
+@standards{GNU, wchar.h}
@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
This function is like @code{wcsncmp}, except that differences in case
are ignored. Like @code{wcscasecmp}, it is locale dependent how
@@ -1367,9 +1327,8 @@ strncmp ("hello, world", "hello, stupid world!!!", 5)
@result{} 0 /* @r{The initial 5 bytes are the same.} */
@end smallexample
-@comment string.h
-@comment GNU
@deftypefun int strverscmp (const char *@var{s1}, const char *@var{s2})
+@standards{GNU, string.h}
@safety{@prelim{}@mtsafe{@mtslocale{}}@assafe{}@acsafe{}}
@c Calls isdigit multiple times, locale may change in between.
The @code{strverscmp} function compares the string @var{s1} against
@@ -1448,9 +1407,8 @@ strverscmp ("foo.009", "foo.0")
@code{strverscmp} is a GNU extension.
@end deftypefun
-@comment string.h
-@comment BSD
@deftypefun int bcmp (const void *@var{a1}, const void *@var{a2}, size_t @var{size})
+@standards{BSD, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This is an obsolete alias for @code{memcmp}, derived from BSD.
@end deftypefun
@@ -1496,9 +1454,8 @@ likely to be more efficient to use @code{strxfrm} or @code{wcsxfrm} to
transform all the strings just once, and subsequently compare the
transformed strings with @code{strcmp} or @code{wcscmp}.
-@comment string.h
-@comment ISO
@deftypefun int strcoll (const char *@var{s1}, const char *@var{s2})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
@c Calls strcoll_l with the current locale, which dereferences only the
@c LC_COLLATE data pointer.
@@ -1507,9 +1464,8 @@ collating sequence of the current locale for collation (the
@code{LC_COLLATE} locale). The arguments are multibyte strings.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun int wcscoll (const wchar_t *@var{ws1}, const wchar_t *@var{ws2})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
@c Same as strcoll, but calling wcscoll_l.
The @code{wcscoll} function is similar to @code{wcscmp} but uses the
@@ -1549,9 +1505,8 @@ sort_strings (char **array, int nstrings)
@end smallexample
@cindex converting string to collation order
-@comment string.h
-@comment ISO
@deftypefun size_t strxfrm (char *restrict @var{to}, const char *restrict @var{from}, size_t @var{size})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
The function @code{strxfrm} transforms the multibyte string
@var{from} using the
@@ -1580,9 +1535,8 @@ what size the allocated array should be. It does not matter what
@var{to} is if @var{size} is zero; @var{to} may even be a null pointer.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun size_t wcsxfrm (wchar_t *restrict @var{wto}, const wchar_t *@var{wfrom}, size_t @var{size})
+@standards{ISO, wchar.h}
@safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{}}}
The function @code{wcsxfrm} transforms wide string @var{wfrom}
using the collation transformation determined by the locale currently
@@ -1740,9 +1694,8 @@ declared in the header file @file{string.h}.
@cindex search functions (for strings)
@cindex string search functions
-@comment string.h
-@comment ISO
@deftypefun {void *} memchr (const void *@var{block}, int @var{c}, size_t @var{size})
+@standards{ISO, string.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
This function finds the first occurrence of the byte @var{c} (converted
to an @code{unsigned char}) in the initial @var{size} bytes of the
@@ -1750,9 +1703,8 @@ object beginning at @var{block}. The return value is a pointer to the
located byte, or a null pointer if no match was found.
@end deftypefun
-@comment wchar.h
-@comment ISO
@deftypefun {wchar_t *} wmemchr (const wchar_t *@var{block}, wchar_t @var{wc}, size_t @var{size})
+@standards{ISO, wchar.h}
@safety