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:
authorCorinna Vinschen <corinna@vinschen.de>2003-04-03 12:26:07 +0400
committerCorinna Vinschen <corinna@vinschen.de>2003-04-03 12:26:07 +0400
commitd122b1cc731dd279337fc1f8119667e1a4356f72 (patch)
treed0b96a3aff7c13f4fe9015dcc054c436e2bb8aa6 /newlib/libc/string
parentd5292d66a4988dd92c5f844b4a2874b4e69b9e2b (diff)
* libc/include/wchar.h: Add definition for wcscoll.
* libc/string/Makefile.am: Add wcscoll.c. * libc/string/Makefile.in: Regenerated. * libc/string/wcscoll.c: New file. * libc/string/wcstrings.tex: Add wcscoll.
Diffstat (limited to 'newlib/libc/string')
-rw-r--r--newlib/libc/string/Makefile.am4
-rw-r--r--newlib/libc/string/Makefile.in16
-rw-r--r--newlib/libc/string/wcscoll.c48
-rw-r--r--newlib/libc/string/wcstrings.tex4
4 files changed, 64 insertions, 8 deletions
diff --git a/newlib/libc/string/Makefile.am b/newlib/libc/string/Makefile.am
index cc7c9e732..ea7cace9d 100644
--- a/newlib/libc/string/Makefile.am
+++ b/newlib/libc/string/Makefile.am
@@ -48,6 +48,7 @@ GENERAL_SOURCES = \
wcscat.c \
wcschr.c \
wcscmp.c \
+ wcscoll.c \
wcscpy.c \
wcscspn.c \
wcslcat.c \
@@ -104,7 +105,8 @@ memchr.def strcat.def strerror.def strerror_r.def strrchr.def \
memcmp.def strchr.def strlen.def strnlen.def strspn.def \
strcasecmp.def strncasecmp.def strlwr.def strupr.def memccpy.def \
mempcpy.def \
-wcscat.def wcschr.def wcscmp.def wcscpy.def wcscspn.def \
+wcscat.def wcschr.def wcscmp.def wcscoll.def \
+wcscpy.def wcscspn.def \
wcslcat.def wcslcpy.def wcslen.def wcsncat.def wcsncmp.def \
wcsncpy.def wcspbrk.def wcsrchr.def wcsspn.def wcsstr.def \
wmemchr.def wmemcmp.def wmemcpy.def wmemmove.def wmemset.def
diff --git a/newlib/libc/string/Makefile.in b/newlib/libc/string/Makefile.in
index 14f7b74f0..d2a3c7bc7 100644
--- a/newlib/libc/string/Makefile.in
+++ b/newlib/libc/string/Makefile.in
@@ -154,6 +154,7 @@ GENERAL_SOURCES = \
wcscat.c \
wcschr.c \
wcscmp.c \
+ wcscoll.c \
wcscpy.c \
wcscspn.c \
wcslcat.c \
@@ -202,7 +203,8 @@ memchr.def strcat.def strerror.def strerror_r.def strrchr.def \
memcmp.def strchr.def strlen.def strnlen.def strspn.def \
strcasecmp.def strncasecmp.def strlwr.def strupr.def memccpy.def \
mempcpy.def \
-wcscat.def wcschr.def wcscmp.def wcscpy.def wcscspn.def \
+wcscat.def wcschr.def wcscmp.def wcscoll.def \
+wcscpy.def wcscspn.def \
wcslcat.def wcslcpy.def wcslen.def wcsncat.def wcsncmp.def \
wcsncpy.def wcspbrk.def wcsrchr.def wcsspn.def wcsstr.def \
wmemchr.def wmemcmp.def wmemcpy.def wmemmove.def wmemset.def
@@ -239,8 +241,8 @@ LIBS = @LIBS@
@USE_LIBTOOL_FALSE@strspn.$(OBJEXT) strtok.$(OBJEXT) strtok_r.$(OBJEXT) \
@USE_LIBTOOL_FALSE@strupr.$(OBJEXT) strxfrm.$(OBJEXT) strstr.$(OBJEXT) \
@USE_LIBTOOL_FALSE@swab.$(OBJEXT) u_strerr.$(OBJEXT) wcscat.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@wcschr.$(OBJEXT) wcscmp.$(OBJEXT) wcscpy.$(OBJEXT) \
-@USE_LIBTOOL_FALSE@wcscspn.$(OBJEXT) wcslcat.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wcschr.$(OBJEXT) wcscmp.$(OBJEXT) wcscoll.$(OBJEXT) \
+@USE_LIBTOOL_FALSE@wcscpy.$(OBJEXT) wcscspn.$(OBJEXT) wcslcat.$(OBJEXT) \
@USE_LIBTOOL_FALSE@wcslcpy.$(OBJEXT) wcslen.$(OBJEXT) wcsncat.$(OBJEXT) \
@USE_LIBTOOL_FALSE@wcsncmp.$(OBJEXT) wcsncpy.$(OBJEXT) \
@USE_LIBTOOL_FALSE@wcspbrk.$(OBJEXT) wcsrchr.$(OBJEXT) wcsspn.$(OBJEXT) \
@@ -258,10 +260,10 @@ LTLIBRARIES = $(noinst_LTLIBRARIES)
@USE_LIBTOOL_TRUE@strncmp.lo strncpy.lo strnlen.lo strpbrk.lo \
@USE_LIBTOOL_TRUE@strrchr.lo strsep.lo strspn.lo strtok.lo strtok_r.lo \
@USE_LIBTOOL_TRUE@strupr.lo strxfrm.lo strstr.lo swab.lo u_strerr.lo \
-@USE_LIBTOOL_TRUE@wcscat.lo wcschr.lo wcscmp.lo wcscpy.lo wcscspn.lo \
-@USE_LIBTOOL_TRUE@wcslcat.lo wcslcpy.lo wcslen.lo wcsncat.lo wcsncmp.lo \
-@USE_LIBTOOL_TRUE@wcsncpy.lo wcspbrk.lo wcsrchr.lo wcsspn.lo wcsstr.lo \
-@USE_LIBTOOL_TRUE@wmemchr.lo wmemcmp.lo wmemcpy.lo wmemmove.lo \
+@USE_LIBTOOL_TRUE@wcscat.lo wcschr.lo wcscmp.lo wcscoll.lo wcscpy.lo \
+@USE_LIBTOOL_TRUE@wcscspn.lo wcslcat.lo wcslcpy.lo wcslen.lo wcsncat.lo \
+@USE_LIBTOOL_TRUE@wcsncmp.lo wcsncpy.lo wcspbrk.lo wcsrchr.lo wcsspn.lo \
+@USE_LIBTOOL_TRUE@wcsstr.lo wmemchr.lo wmemcmp.lo wmemcpy.lo wmemmove.lo \
@USE_LIBTOOL_TRUE@wmemset.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
diff --git a/newlib/libc/string/wcscoll.c b/newlib/libc/string/wcscoll.c
new file mode 100644
index 000000000..fb656521a
--- /dev/null
+++ b/newlib/libc/string/wcscoll.c
@@ -0,0 +1,48 @@
+/*
+FUNCTION
+ <<wcscoll>>---locale specific wide-character string compare
+
+INDEX
+ wcscoll
+
+ANSI_SYNOPSIS
+ #include <string.h>
+ int wcscoll(const char *<[stra]>, const char * <[strb]>);
+
+TRAD_SYNOPSIS
+ #include <string.h>
+ int wcscoll(<[stra]>, <[strb]>)
+ char *<[stra]>;
+ char *<[strb]>;
+
+DESCRIPTION
+ <<wcscoll>> compares the wide-character string pointed to by
+ <[stra]> to the wide-character string pointed to by <[strb]>,
+ using an interpretation appropriate to the current <<LC_COLLATE>>
+ state.
+
+ The current implementation of <<wcscoll>> simply uses <<wcscmp>>
+ and does not support any language-specific sorting.
+
+RETURNS
+ If the first string is greater than the second string,
+ <<wcscoll>> returns a number greater than zero. If the two
+ strings are equivalent, <<wcscoll>> returns zero. If the first
+ string is less than the second string, <<wcscoll>> returns a
+ number less than zero.
+
+PORTABILITY
+<<wcscoll>> is ISO/IEC 9899/AMD1:1995 (ISO C).
+*/
+
+#include <_ansi.h>
+#include <wchar.h>
+
+int
+_DEFUN (wcscoll, (a, b),
+ _CONST wchar_t *a _AND
+ _CONST wchar_t *b)
+
+{
+ return wcscmp (a, b);
+}
diff --git a/newlib/libc/string/wcstrings.tex b/newlib/libc/string/wcstrings.tex
index ccd029f49..7c72eab54 100644
--- a/newlib/libc/string/wcstrings.tex
+++ b/newlib/libc/string/wcstrings.tex
@@ -14,6 +14,7 @@ declarations are in @file{wchar.h}.
* wcscat:: Concatenate wide-character strings
* wcschr:: Search for wide-character in string
* wcscmp:: Wide-character string compare
+* wcscoll:: Locale specific Wide-character string compare
* wcscpy:: Copy wide-character string
* wcscspn:: Count wide-chars not in string
* wcslcat:: Concatenate wide-character strings to specified length
@@ -53,6 +54,9 @@ declarations are in @file{wchar.h}.
@include string/wcscmp.def
@page
+@include string/wcscoll.def
+
+@page
@include string/wcscpy.def
@page