Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/string')
-rw-r--r--newlib/libc/string/bcmp.c2
-rw-r--r--newlib/libc/string/memchr.c4
-rw-r--r--newlib/libc/string/memcmp.c4
-rw-r--r--newlib/libc/string/strcasecmp.c4
-rw-r--r--newlib/libc/string/strcoll.c2
-rw-r--r--newlib/libc/string/strcspn.c2
-rw-r--r--newlib/libc/string/strerror_r.c2
-rw-r--r--newlib/libc/string/strings.tex12
-rw-r--r--newlib/libc/string/strlwr.c6
-rw-r--r--newlib/libc/string/strncasecmp.c4
-rw-r--r--newlib/libc/string/strncat.c1
-rw-r--r--newlib/libc/string/strndup_r.c14
-rw-r--r--newlib/libc/string/strnlen.c4
-rw-r--r--newlib/libc/string/strpbrk.c2
-rw-r--r--newlib/libc/string/strtok.c26
-rw-r--r--newlib/libc/string/strupr.c4
-rw-r--r--newlib/libc/string/wcscat.c1
-rw-r--r--newlib/libc/string/wcschr.c1
-rw-r--r--newlib/libc/string/wcscmp.c1
-rw-r--r--newlib/libc/string/wcscoll.c2
-rw-r--r--newlib/libc/string/wcscpy.c1
-rw-r--r--newlib/libc/string/wcscspn.c1
-rw-r--r--newlib/libc/string/wcslcat.c12
-rw-r--r--newlib/libc/string/wcslcpy.c8
-rw-r--r--newlib/libc/string/wcslen.c1
-rw-r--r--newlib/libc/string/wcsncat.c1
-rw-r--r--newlib/libc/string/wcsncmp.c1
-rw-r--r--newlib/libc/string/wcsncpy.c1
-rw-r--r--newlib/libc/string/wcsnlen.c9
-rw-r--r--newlib/libc/string/wcspbrk.c1
-rw-r--r--newlib/libc/string/wcsrchr.c1
-rw-r--r--newlib/libc/string/wcsspn.c2
-rw-r--r--newlib/libc/string/wcsstr.c2
-rw-r--r--newlib/libc/string/wcstrings.tex16
-rw-r--r--newlib/libc/string/wcswidth.c18
-rw-r--r--newlib/libc/string/wcwidth.c12
-rw-r--r--newlib/libc/string/wmemchr.c9
-rw-r--r--newlib/libc/string/wmemcmp.c9
-rw-r--r--newlib/libc/string/wmemcpy.c9
-rw-r--r--newlib/libc/string/wmemmove.c15
-rw-r--r--newlib/libc/string/wmemset.c11
41 files changed, 104 insertions, 134 deletions
diff --git a/newlib/libc/string/bcmp.c b/newlib/libc/string/bcmp.c
index e8d057352..23e7c26a2 100644
--- a/newlib/libc/string/bcmp.c
+++ b/newlib/libc/string/bcmp.c
@@ -21,6 +21,8 @@ DESCRIPTION
object pointed to by <[s1]> with the object pointed to by <[s2]>.
This function is identical to <<memcmp>>.
+
+
RETURNS
The function returns an integer greater than, equal to or
diff --git a/newlib/libc/string/memchr.c b/newlib/libc/string/memchr.c
index 7c1a584b7..2fd3c861d 100644
--- a/newlib/libc/string/memchr.c
+++ b/newlib/libc/string/memchr.c
@@ -28,9 +28,9 @@ RETURNS
<[c]> is not found, then <<NULL>> is returned.
PORTABILITY
-<<memchr>> is ANSI C.
+<<memchr>>> is ANSI C.
-<<memchr>> requires no supporting OS subroutines.
+<<memchr>> requires no supporting OS subroutines.
QUICKREF
memchr ansi pure
diff --git a/newlib/libc/string/memcmp.c b/newlib/libc/string/memcmp.c
index 4a871fa60..ac7a194a6 100644
--- a/newlib/libc/string/memcmp.c
+++ b/newlib/libc/string/memcmp.c
@@ -95,8 +95,8 @@ _DEFUN (memcmp, (m1, m2, n),
/* check m mod LBLOCKSIZE remaining characters */
- s1 = (unsigned char*)a1;
- s2 = (unsigned char*)a2;
+ s1 = (char*)a1;
+ s2 = (char*)a2;
}
while (n--)
diff --git a/newlib/libc/string/strcasecmp.c b/newlib/libc/string/strcasecmp.c
index f96f7f5c9..4dcfc784a 100644
--- a/newlib/libc/string/strcasecmp.c
+++ b/newlib/libc/string/strcasecmp.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<strcasecmp>>---case-insensitive character string compare
+ <<strcasecmp>>---case insensitive character string compare
INDEX
strcasecmp
@@ -22,7 +22,7 @@ DESCRIPTION
RETURNS
If <<*<[a]>>> sorts lexicographically after <<*<[b]>>> (after
- both are converted to uppercase), <<strcasecmp>> returns a
+ both are converted to upper case), <<strcasecmp>> returns a
number greater than zero. If the two strings match,
<<strcasecmp>> returns zero. If <<*<[a]>>> sorts
lexicographically before <<*<[b]>>>, <<strcasecmp>> returns a
diff --git a/newlib/libc/string/strcoll.c b/newlib/libc/string/strcoll.c
index 65dc38037..8760b2217 100644
--- a/newlib/libc/string/strcoll.c
+++ b/newlib/libc/string/strcoll.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<strcoll>>---locale-specific character string compare
+ <<strcoll>>---locale specific character string compare
INDEX
strcoll
diff --git a/newlib/libc/string/strcspn.c b/newlib/libc/string/strcspn.c
index 403330c94..fe68b8f51 100644
--- a/newlib/libc/string/strcspn.c
+++ b/newlib/libc/string/strcspn.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<strcspn>>---count characters not in string
+ <<strcspn>>---count chars not in string
INDEX
strcspn
diff --git a/newlib/libc/string/strerror_r.c b/newlib/libc/string/strerror_r.c
index be5358f3e..956a1f485 100644
--- a/newlib/libc/string/strerror_r.c
+++ b/newlib/libc/string/strerror_r.c
@@ -30,7 +30,7 @@ This function returns a pointer to a string. Your application must
not modify that string.
PORTABILITY
-<<strerror_r>> is a GNU extension.
+<<strerror_r>> is a gnu extension.
<<strerror_r>> requires no supporting OS subroutines.
diff --git a/newlib/libc/string/strings.tex b/newlib/libc/string/strings.tex
index 3ca732f79..7f9106ee9 100644
--- a/newlib/libc/string/strings.tex
+++ b/newlib/libc/string/strings.tex
@@ -22,18 +22,16 @@ managing areas of memory. The corresponding declarations are in
* strcat:: Concatenate strings
* strchr:: Search for character in string
* strcmp:: Character string compare
-* strcoll:: Locale-specific character string compare
+* strcoll:: Locale specific character string compare
* strcpy:: Copy string
* strcspn:: Count chars not in string
* strerror:: Convert error number to string
-* strerror_r:: Convert error number to string
* strlen:: Character string length
-* strlwr:: Convert string to lowercase
+* strlwr:: Convert string to lower case
* strncasecmp:: Compare strings ignoring case
* strncat:: Concatenate strings
* strncmp:: Character string compare
* strncpy:: Counted copy string
-* strnlen:: Character string length
* strpbrk:: Find chars in string
* strrchr:: Reverse search for character in string
* strspn:: Find initial match
@@ -105,9 +103,6 @@ managing areas of memory. The corresponding declarations are in
@include string/strerror.def
@page
-@include string/strerror_r.def
-
-@page
@include string/strlen.def
@page
@@ -126,9 +121,6 @@ managing areas of memory. The corresponding declarations are in
@include string/strncpy.def
@page
-@include string/strnlen.def
-
-@page
@include string/strpbrk.def
@page
diff --git a/newlib/libc/string/strlwr.c b/newlib/libc/string/strlwr.c
index 47096d430..cf0d45f71 100644
--- a/newlib/libc/string/strlwr.c
+++ b/newlib/libc/string/strlwr.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<strlwr>>---force string to lowercase
+ <<strlwr>>---force string to lower case
INDEX
strlwr
@@ -15,8 +15,8 @@ TRAD_SYNOPSIS
char *<[a]>;
DESCRIPTION
- <<strlwr>> converts each character in the string at <[a]> to
- lowercase.
+ <<strlwr>> converts each characters in the string at <[a]> to
+ lower case.
RETURNS
<<strlwr>> returns its argument, <[a]>.
diff --git a/newlib/libc/string/strncasecmp.c b/newlib/libc/string/strncasecmp.c
index c877ba53c..28c6cc44f 100644
--- a/newlib/libc/string/strncasecmp.c
+++ b/newlib/libc/string/strncasecmp.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<strncasecmp>>---case-insensitive character string compare
+ <<strncasecmp>>---case insensitive character string compare
INDEX
strncasecmp
@@ -24,7 +24,7 @@ DESCRIPTION
RETURNS
If <<*<[a]>>> sorts lexicographically after <<*<[b]>>> (after
- both are converted to uppercase), <<strncasecmp>> returns a
+ both are converted to upper case), <<strncasecmp>> returns a
number greater than zero. If the two strings are equivalent,
<<strncasecmp>> returns zero. If <<*<[a]>>> sorts
lexicographically before <<*<[b]>>>, <<strncasecmp>> returns a
diff --git a/newlib/libc/string/strncat.c b/newlib/libc/string/strncat.c
index 0f29247a8..57ca068eb 100644
--- a/newlib/libc/string/strncat.c
+++ b/newlib/libc/string/strncat.c
@@ -28,6 +28,7 @@ WARNINGS
Note that a null is always appended, so that if the copy is
limited by the <[length]> argument, the number of characters
appended to <[dst]> is <<n + 1>>.
+
RETURNS
This function returns the initial value of <[dst]>
diff --git a/newlib/libc/string/strndup_r.c b/newlib/libc/string/strndup_r.c
index 2acf63dec..86d9eec44 100644
--- a/newlib/libc/string/strndup_r.c
+++ b/newlib/libc/string/strndup_r.c
@@ -2,22 +2,16 @@
#include <stdlib.h>
#include <string.h>
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
+
char *
_DEFUN (_strndup_r, (reent_ptr, str, n),
struct _reent *reent_ptr _AND
_CONST char *str _AND
size_t n)
{
- _CONST char *ptr = str;
- size_t len;
- char *copy;
-
- while (n-- > 0 && *ptr)
- ptr++;
-
- len = ptr - str;
-
- copy = _malloc_r (reent_ptr, len + 1);
+ size_t len = MIN(strlen (str), n);
+ char *copy = _malloc_r (reent_ptr, len + 1);
if (copy)
{
memcpy (copy, str, len);
diff --git a/newlib/libc/string/strnlen.c b/newlib/libc/string/strnlen.c
index ed60e9371..b9a3b5e77 100644
--- a/newlib/libc/string/strnlen.c
+++ b/newlib/libc/string/strnlen.c
@@ -25,7 +25,7 @@ RETURNS
<<strnlen>> returns the character count or <[n]>.
PORTABILITY
-<<strnlen>> is a GNU extension.
+<<strnlen>> is a Gnu extension.
<<strnlen>> requires no supporting OS subroutines.
@@ -42,7 +42,7 @@ _DEFUN (strnlen, (str, n),
{
_CONST char *start = str;
- while (n-- > 0 && *str)
+ while (*str && n-- > 0)
str++;
return str - start;
diff --git a/newlib/libc/string/strpbrk.c b/newlib/libc/string/strpbrk.c
index 5668db395..e7f2dd2b6 100644
--- a/newlib/libc/string/strpbrk.c
+++ b/newlib/libc/string/strpbrk.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<strpbrk>>---find characters in string
+ <<strpbrk>>---find chars in string
INDEX
strpbrk
diff --git a/newlib/libc/string/strtok.c b/newlib/libc/string/strtok.c
index 7640fb73d..8d53290c7 100644
--- a/newlib/libc/string/strtok.c
+++ b/newlib/libc/string/strtok.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<strtok>>, <<strtok_r>>, <<strsep>>---get next token from a string
+ <<strtok>>,<<strtok_r>>,<<strsep>>---get next token from a string
INDEX
strtok
@@ -40,25 +40,25 @@ DESCRIPTION
The first time that <<strtok>> is called, <<*<[source]>>> should be
specified; subsequent calls, wishing to obtain further tokens from
the same string, should pass a null pointer instead. The separator
- string, <<*<[delimiters]>>>, must be supplied each time and may
+ string, <<*<[delimiters]>>>, must be supplied each time, and may
change between calls.
The <<strtok>> function returns a pointer to the beginning of each
subsequent token in the string, after replacing the separator
- character itself with a null character. When no more tokens remain,
+ character itself with a NUL character. When no more tokens remain,
a null pointer is returned.
The <<strtok_r>> function has the same behavior as <<strtok>>, except
- a pointer to placeholder <<*<[lasts]>>> must be supplied by the caller.
+ a pointer to placeholder <<*[lasts]>> must be supplied by the caller.
The <<strsep>> function is similar in behavior to <<strtok>>, except
- a pointer to the string pointer must be supplied <<<[source_ptr]>>> and
- the function does not skip leading delimiters. When the string starts
- with a delimiter, the delimiter is changed to the null character and
+ a pointer to the string pointer must be supplied <<[source_ptr]>> and
+ the function does not skip leading delimeters. When the string starts
+ with a delimeter, the delimeter is changed to the NUL character and
the empty string is returned. Like <<strtok_r>> and <<strtok>>, the
- <<*<[source_ptr]>>> is updated to the next character following the
- last delimiter found or NULL if the end of string is reached with
- no more delimiters.
+ <<*[source_ptr]>> is updated to the next character following the
+ last delimeter found or NULL if the end of string is reached with
+ no more delimeters.
RETURNS
<<strtok>>, <<strtok_r>>, and <<strsep>> all return a pointer to the
@@ -66,13 +66,13 @@ RETURNS
<<strsep>>, a token may be the empty string.
NOTES
- <<strtok>> is unsafe for multi-threaded applications. <<strtok_r>>
- and <<strsep>> are thread-safe and should be used instead.
+ <<strtok>> is unsafe for multi-thread applications. <<strtok_r>>
+ and <<strsep>> are MT-Safe and should be used instead.
PORTABILITY
<<strtok>> is ANSI C.
<<strtok_r>> is POSIX.
-<<strsep>> is a BSD extension.
+<<strsep>> is a BSD-extension.
<<strtok>>, <<strtok_r>>, and <<strsep>> require no supporting OS subroutines.
diff --git a/newlib/libc/string/strupr.c b/newlib/libc/string/strupr.c
index 3f346b840..d7f7c129d 100644
--- a/newlib/libc/string/strupr.c
+++ b/newlib/libc/string/strupr.c
@@ -15,8 +15,8 @@ TRAD_SYNOPSIS
char *<[a]>;
DESCRIPTION
- <<strupr>> converts each character in the string at <[a]> to
- uppercase.
+ <<strupr>> converts each characters in the string at <[a]> to
+ upper case.
RETURNS
<<strupr>> returns its argument, <[a]>.
diff --git a/newlib/libc/string/wcscat.c b/newlib/libc/string/wcscat.c
index 54c0b503b..b3a3bd987 100644
--- a/newlib/libc/string/wcscat.c
+++ b/newlib/libc/string/wcscat.c
@@ -27,7 +27,6 @@ RETURNS
PORTABILITY
<<wcscat>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wcschr.c b/newlib/libc/string/wcschr.c
index fb35d1f42..acc07a521 100644
--- a/newlib/libc/string/wcschr.c
+++ b/newlib/libc/string/wcschr.c
@@ -24,7 +24,6 @@ RETURNS
PORTABILITY
<<wcschr>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wcscmp.c b/newlib/libc/string/wcscmp.c
index 03089620d..279f3a90c 100644
--- a/newlib/libc/string/wcscmp.c
+++ b/newlib/libc/string/wcscmp.c
@@ -26,7 +26,6 @@ RETURNS
PORTABILITY
<<wcscmp>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wcscoll.c b/newlib/libc/string/wcscoll.c
index 0f0513a58..9287af38c 100644
--- a/newlib/libc/string/wcscoll.c
+++ b/newlib/libc/string/wcscoll.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<wcscoll>>---locale-specific wide-character string compare
+ <<wcscoll>>---locale specific wide-character string compare
INDEX
wcscoll
diff --git a/newlib/libc/string/wcscpy.c b/newlib/libc/string/wcscpy.c
index ede693d9c..5a72338ce 100644
--- a/newlib/libc/string/wcscpy.c
+++ b/newlib/libc/string/wcscpy.c
@@ -23,7 +23,6 @@ RETURNS
PORTABILITY
<<wcscpy>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wcscspn.c b/newlib/libc/string/wcscspn.c
index 5ab965690..7e53cc15d 100644
--- a/newlib/libc/string/wcscspn.c
+++ b/newlib/libc/string/wcscspn.c
@@ -23,7 +23,6 @@ RETURNS
PORTABILITY
<<wcscspn>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wcslcat.c b/newlib/libc/string/wcslcat.c
index 75c085b5b..adf683ad5 100644
--- a/newlib/libc/string/wcslcat.c
+++ b/newlib/libc/string/wcslcat.c
@@ -14,12 +14,12 @@ TRAD_SYNOPSIS
size_t <[siz]>;
DESCRIPTION
- The <<wcslcat>> function appends wide characters from <[src]> to
+ The <<wcslcat>> function appends wide-characters from <[src]> to
end of the <[dst]> wide-character string so that the resultant
- wide-character string is not more than <[siz]> wide characters
- including the terminating null wide-character code. A terminating
- null wide character is always added unless <[siz]> is 0. Thus,
- the maximum number of wide characters that can be appended from
+ wide-character string is not more than <[siz]> wide-characters
+ including terminating null wide-character code. A terminating
+ null wide-character is always added unless <[siz]> is 0. Thus,
+ the maximum number of wide-characters that can be appended from
<[src]> is <[siz]> - 1. If copying takes place between objects
that overlap, the behaviour is undefined.
@@ -28,7 +28,7 @@ RETURNS
wide-character string length of <[src]> (does not include
terminating null wide-characters). If the return value is
greater than or equal to <[siz]>, then truncation occurred and
- not all wide characters from <[src]> were appended.
+ not all wide-characters from <[src]> were appended.
PORTABILITY
No supporting OS subroutines are required.
diff --git a/newlib/libc/string/wcslcpy.c b/newlib/libc/string/wcslcpy.c
index 21c030b38..ac7d01863 100644
--- a/newlib/libc/string/wcslcpy.c
+++ b/newlib/libc/string/wcslcpy.c
@@ -14,16 +14,16 @@ TRAD_SYNOPSIS
size_t <[siz]>;
DESCRIPTION
- <<wcslcpy>> copies wide characters from <[src]> to <[dst]>
+ <<wcslcpy>> copies wide-characters from <[src]> to <[dst]>
such that up to <[siz]> - 1 characters are copied. A
terminating null is appended to the result, unless <[siz]>
is zero.
RETURNS
- <<wcslcpy>> returns the number of wide characters in <[src]>,
- not including the terminating null wide character. If the
+ <<wcslcpy>> returns the number of wide-characters in <[src]>,
+ not including the terminating null wide-character. If the
return value is greater than or equal to <[siz]>, then
- not all wide characters were copied from <[src]> and truncation
+ not all wide-characters were copied from <[src]> and truncation
occurred.
PORTABILITY
diff --git a/newlib/libc/string/wcslen.c b/newlib/libc/string/wcslen.c
index d671551af..d68f00a72 100644
--- a/newlib/libc/string/wcslen.c
+++ b/newlib/libc/string/wcslen.c
@@ -21,7 +21,6 @@ RETURNS
PORTABILITY
<<wcslen>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wcsncat.c b/newlib/libc/string/wcsncat.c
index fd77c0cc8..2ba293497 100644
--- a/newlib/libc/string/wcsncat.c
+++ b/newlib/libc/string/wcsncat.c
@@ -29,7 +29,6 @@ RETURNS
PORTABILITY
<<wcsncat>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wcsncmp.c b/newlib/libc/string/wcsncmp.c
index 1897f5c4e..48cb96c25 100644
--- a/newlib/libc/string/wcsncmp.c
+++ b/newlib/libc/string/wcsncmp.c
@@ -30,7 +30,6 @@ RETURNS
PORTABILITY
<<wcsncmp>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wcsncpy.c b/newlib/libc/string/wcsncpy.c
index b53e9c332..afe75a238 100644
--- a/newlib/libc/string/wcsncpy.c
+++ b/newlib/libc/string/wcsncpy.c
@@ -30,7 +30,6 @@ RETURNS
PORTABILITY
<<wcsncpy>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wcsnlen.c b/newlib/libc/string/wcsnlen.c
index 9d680d603..e84342d3d 100644
--- a/newlib/libc/string/wcsnlen.c
+++ b/newlib/libc/string/wcsnlen.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<wcsnlen>>---get fixed-size wide-character string length
+ <<wcsnlen>>---get fixed-size wide character string length
INDEX
wcsnlen
@@ -16,8 +16,8 @@ TRAD_SYNOPSIS
size_t <[maxlen]>;
DESCRIPTION
- The <<wcsnlen>> function computes the number of wide-character codes
- in the wide-character string pointed to by <[s]> not including the
+ The <<wcsnlen>> function computes the number of wide character codes
+ in the wide character string pointed to by <[s]> not including the
terminating L'\0' wide character but at most <[maxlen]> wide
characters.
@@ -27,8 +27,7 @@ RETURNS
characters.
PORTABILITY
-<<wcsnlen>> is a GNU extension.
-
+<<wcsnlen>> is GNU extension..
<<wcsnlen>> requires no supporting OS subroutines.
*/
diff --git a/newlib/libc/string/wcspbrk.c b/newlib/libc/string/wcspbrk.c
index fbdf9e49c..bfe793b15 100644
--- a/newlib/libc/string/wcspbrk.c
+++ b/newlib/libc/string/wcspbrk.c
@@ -23,7 +23,6 @@ RETURNS
PORTABILITY
<<wcspbrk>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wcsrchr.c b/newlib/libc/string/wcsrchr.c
index 495d95a15..d3dc7431e 100644
--- a/newlib/libc/string/wcsrchr.c
+++ b/newlib/libc/string/wcsrchr.c
@@ -27,7 +27,6 @@ RETURNS
PORTABILITY
<<wcsrchr>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wcsspn.c b/newlib/libc/string/wcsspn.c
index e83f42f4f..f0b2fb99f 100644
--- a/newlib/libc/string/wcsspn.c
+++ b/newlib/libc/string/wcsspn.c
@@ -23,7 +23,6 @@ RETURNS
PORTABILITY
<<wcsspn>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
@@ -76,7 +75,6 @@ _DEFUN (wcsspn, (s, set),
{
if (*p == *q)
break;
- q++;
}
if (!*q)
goto done;
diff --git a/newlib/libc/string/wcsstr.c b/newlib/libc/string/wcsstr.c
index 0b00396ea..30fc4631f 100644
--- a/newlib/libc/string/wcsstr.c
+++ b/newlib/libc/string/wcsstr.c
@@ -14,7 +14,7 @@ TRAD_SYNOPSIS
DESCRIPTION
The <<wcsstr>> function locates the first occurrence in the
wide-character string pointed to by <[big]> of the sequence of
- wide characters (excluding the terminating null wide character) in the
+ wide-characters (excluding the terminating null wide-character) in the
wide-character string pointed to by <[little]>.
RETURNS
diff --git a/newlib/libc/string/wcstrings.tex b/newlib/libc/string/wcstrings.tex
index df6edc47c..ad0a60788 100644
--- a/newlib/libc/string/wcstrings.tex
+++ b/newlib/libc/string/wcstrings.tex
@@ -2,21 +2,21 @@
@chapter Wide Character Strings (@file{wchar.h})
This chapter describes wide-character string-handling functions and
-managing areas of memory containing wide characters. The corresponding
+managing areas of memory containing wide-characters. The corresponding
declarations are in @file{wchar.h}.
@menu
-* wmemchr:: Find wide character in memory
+* wmemchr:: Find wide-character in memory
* wmemcmp:: Compare two wide-character memory areas
* wmemcpy:: Copy wide-character memory regions
* wmemmove:: Move possibly overlapping wide-character memory
-* wmemset:: Set an area of memory to a specified wide character
+* wmemset:: Set an area of memory to a specified wide-character
* wcscat:: Concatenate wide-character strings
-* wcschr:: Search for wide character in string
+* wcschr:: Search for wide-character in string
* wcscmp:: Wide-character string compare
-* wcscoll:: Locale-specific wide-character string compare
+* wcscoll:: Locale specific Wide-character string compare
* wcscpy:: Copy wide-character string
-* wcscspn:: Count wide characters not in string
+* wcscspn:: Count wide-chars not in string
* wcslcat:: Concatenate wide-character strings to specified length
* wcslcpy:: Copy wide-character string to specified length
* wcslen:: Wide-character string length
@@ -24,8 +24,8 @@ declarations are in @file{wchar.h}.
* wcsncmp:: Wide-character string compare
* wcsncpy:: Counted copy wide-character string
* wcsnlen:: Wide-character string length with maximum limit
-* wcspbrk:: Find wide characters in string
-* wcsrchr:: Reverse search for wide character in string
+* wcspbrk:: Find wide-chars in string
+* wcsrchr:: Reverse search for wide-character in string
* wcsspn:: Find initial match in wide-character string
* wcsstr:: Find wide-character string segment
* wcswidth:: Number of column positions of a wide-character string
diff --git a/newlib/libc/string/wcswidth.c b/newlib/libc/string/wcswidth.c
index 8a9670eb1..bd3d9bbad 100644
--- a/newlib/libc/string/wcswidth.c
+++ b/newlib/libc/string/wcswidth.c
@@ -17,22 +17,22 @@ TRAD_SYNOPSIS
DESCRIPTION
The <<wcswidth>> function shall determine the number of column
- positions required for <[n]> wide-character codes (or fewer than <[n]>
+ positions required for n wide-character codes (or fewer than n
wide-character codes if a null wide-character code is encountered
- before <[n]> wide-character codes are exhausted) in the string pointed
- to by <[pwcs]>.
+ before n wide-character codes are exhausted) in the string pointed
+ to by pwcs.
RETURNS
- The <<wcswidth>> function either shall return 0 (if <[pwcs]> points to a
+ The <<wcswidth>> function either shall return 0 (if pwcs points to a
null wide-character code), or return the number of column positions
- to be occupied by the wide-character string pointed to by <[pwcs]>, or
- return -1 (if any of the first <[n]> wide-character codes in the
- wide-character string pointed to by <[pwcs]> is not a printable
+ to be occupied by the wide-character string pointed to by pwcs, or
+ return -1 (if any of the first n wide-character codes in the
+ wide-character string pointed to by pwcs is not a printable
wide-character code).
PORTABILITY
-<<wcswidth>> has been introduced in the Single UNIX Specification Volume 2.
-<<wcswidth>> has been marked as an extension in the Single UNIX Specification Volume 3.
+<<wcswidth>> has been introduced in the Single UNIX Specification Volume 2
+<<wcswidth>> has been marked as extension in Single UNIX Specification Volume 3
*/
#include <_ansi.h>
diff --git a/newlib/libc/string/wcwidth.c b/newlib/libc/string/wcwidth.c
index d886b4aca..2cbd59e18 100644
--- a/newlib/libc/string/wcwidth.c
+++ b/newlib/libc/string/wcwidth.c
@@ -16,15 +16,15 @@ TRAD_SYNOPSIS
DESCRIPTION
The <<wcwidth>> function shall determine the number of column
- positions required for the wide character <[wc]>. The application
- shall ensure that the value of <[wc]> is a character representable
+ positions required for the wide character wc. The application
+ shall ensure that the value of wc is a character representable
as a wchar_t, and is a wide-character code corresponding to a
valid character in the current locale.
RETURNS
- The <<wcwidth>> function shall either return 0 (if <[wc]> is a null
+ The <<wcwidth>> function shall either return 0 (if wc is a null
wide-character code), or return the number of column positions to
- be occupied by the wide-character code <[wc]>, or return -1 (if <[wc]>
+ be occupied by the wide-character code wc, or return -1 (if wc
does not correspond to a printable wide-character code).
The current implementation of <<wcwidth>> simply sets the width
@@ -32,8 +32,8 @@ RETURNS
tables around.
PORTABILITY
-<<wcwidth>> has been introduced in the Single UNIX Specification Volume 2.
-<<wcwidth>> has been marked as an extension in the Single UNIX Specification Volume 3.
+<<wcwidth>> has been introduced in the Single UNIX Specification Volume 2
+<<wcwidth>> has been marked as extension in Single UNIX Specification Volume 3
*/
#include <_ansi.h>
diff --git a/newlib/libc/string/wmemchr.c b/newlib/libc/string/wmemchr.c
index b582b8948..e99991324 100644
--- a/newlib/libc/string/wmemchr.c
+++ b/newlib/libc/string/wmemchr.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<wmemchr>>---find a wide character in memory
+ <<wmemchr>>---find a wide-character in memory
ANSI_SYNOPSIS
@@ -15,9 +15,9 @@ TRAD_SYNOPSIS
DESCRIPTION
The <<wmemchr>> function locates the first occurrence of <[c]> in the
- initial <[n]> wide characters of the object pointed to be <[s]>. This
+ initial <[n]> wide-characters of the object pointed to be <[s]>. This
function is not affected by locale and all wchar_t values are treated
- identically. The null wide character and wchar_t values not
+ identically. The null wide-character and wchar_t values not
corresponding to valid characters are not treated specially.
If <[n]> is zero, <[s]> must be a valid pointer and the function
@@ -25,12 +25,11 @@ DESCRIPTION
RETURNS
The <<wmemchr>> function returns a pointer to the located
- wide character, or a null pointer if the wide character does not occur
+ wide-character, or a null pointer if the wide-character does not occur
in the object.
PORTABILITY
<<wmemchr>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wmemcmp.c b/newlib/libc/string/wmemcmp.c
index af9ee3207..51072942c 100644
--- a/newlib/libc/string/wmemcmp.c
+++ b/newlib/libc/string/wmemcmp.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<wmemcmp>>---compare wide characters in memory
+ <<wmemcmp>>---compare wide-characters in memory
ANSI_SYNOPSIS
#include <wchar.h>
@@ -13,10 +13,10 @@ TRAD_SYNOPSIS
size_t <[n]>;
DESCRIPTION
- The <<wmemcmp>> function compares the first <[n]> wide characters of the
- object pointed to by <[s1]> to the first <[n]> wide characters of the
+ The <<wmemcmp>> function compares the first <[n]> wide-characters of the
+ object pointed to by <[s1]> to the first <[n]> wide-characters of the
object pointed to by <[s2]>. This function is not affected by locale
- and all wchar_t values are treated identically. The null wide character
+ and all wchar_t values are treated identically. The null wide-character
and wchar_t values not corresponding to valid characters are not treated
specially.
@@ -30,7 +30,6 @@ RETURNS
PORTABILITY
<<wmemcmp>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wmemcpy.c b/newlib/libc/string/wmemcpy.c
index 748e8e196..c3a96a32d 100644
--- a/newlib/libc/string/wmemcpy.c
+++ b/newlib/libc/string/wmemcpy.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<wmemcpy>>---copy wide characters in memory
+ <<wmemcpy>>---copy wide-characters in memory
ANSI_SYNOPSIS
#include <wchar.h>
@@ -13,21 +13,20 @@ TRAD_SYNOPSIS
size_t <[n]>;
DESCRIPTION
- The <<wmemcpy>> function copies <[n]> wide characters from the object
+ The <<wmemcpy>> function copies <[n]> wide-characters from the object
pointed to by <[s]> to the object pointed to be <[d]>. This function
is not affected by locale and all wchar_t values are treated
- identically. The null wide character and wchar_t values not
+ identically. The null wide-character and wchar_t values not
corresponding to valid characters are not treated specially.
If <[n]> is zero, <[d]> and <[s]> must be a valid pointers, and the
- function copies zero wide characters.
+ function copies zero wide-characters.
RETURNS
The <<wmemcpy>> function returns the value of <[d]>.
PORTABILITY
<<wmemcpy>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wmemmove.c b/newlib/libc/string/wmemmove.c
index e20a26ae9..f49e359f3 100644
--- a/newlib/libc/string/wmemmove.c
+++ b/newlib/libc/string/wmemmove.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<wmemmove>>---copy wide characters in memory with overlapping areas
+ <<wmemmove>>---wmemmove - copy wide-characters in memory with overlapping areas
ANSI_SYNOPSIS
#include <wchar.h>
@@ -13,27 +13,26 @@ TRAD_SYNOPSIS
size_t <[n]>;
DESCRIPTION
- The <<wmemmove>> function copies <[n]> wide characters from the object
+ The <<wmemmove>> function copies <[n]> wide-characters from the object
pointed to by <[s]> to the object pointed to by <[d]>. Copying takes
- place as if the <[n]> wide characters from the object pointed to by
- <[s]> are first copied into a temporary array of <[n]> wide characters
+ place as if the <[n]> wide-characters from the object pointed to by
+ <[s]> are first copied into a temporary array of <[n]> wide-characters
that does not overlap the objects pointed to by <[d]> or <[s]>, and then
- the <[n]> wide characters from the temporary array are copied into the
+ the <[n]> wide-characters from the temporary array are copied into the
object pointed to by <[d]>.
This function is not affected by locale and all wchar_t values are
- treated identically. The null wide character and wchar_t values not
+ treated identically. The null wide-character and wchar_t values not
corresponding to valid characters are not treated specially.
If <[n]> is zero, <[d]> and <[s]> must be a valid pointers, and the
- function copies zero wide characters.
+ function copies zero wide-characters.
RETURNS
The <<wmemmove>> function returns the value of <[d]>.
PORTABILITY
<<wmemmove>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/string/wmemset.c b/newlib/libc/string/wmemset.c
index 0af6f91d5..4e05b93b6 100644
--- a/newlib/libc/string/wmemset.c
+++ b/newlib/libc/string/wmemset.c
@@ -1,6 +1,6 @@
/*
FUNCTION
- <<wmemset>>---set wide characters in memory
+ <<wmemset>>---set wide-characters in memory
ANSI_SYNOPSIS
#include <wchar.h>
@@ -14,20 +14,19 @@ TRAD_SYNOPSIS
DESCRIPTION
The <<wmemset>> function copies the value of <[c]> into each of the
- first <[n]> wide characters of the object pointed to by <[s]>. This
+ first <[n]> wide-characters of the object pointed to by <[s]>. This
function is not affected by locale and all wchar_t values are treated
- identically. The null wide character and wchar_t values not
+ identically. The null wide-character and wchar_t values not
corresponding to valid characters are not treated specially.
If <[n]> is zero, <[s]> must be a valid pointer and the function
- copies zero wide characters.
+ copies zero wide-characters.
RETURNS
- The <<wmemset>> function returns the value of <[s]>.
+ The <<wmemset>> functions returns the value of <[s]>.
PORTABILITY
<<wmemset>> is ISO/IEC 9899/AMD1:1995 (ISO C).
-
No supporting OS subroutines are required.
*/