* 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.
This commit is contained in:
Corinna Vinschen 2003-04-03 08:26:07 +00:00
parent d5292d66a4
commit d122b1cc73
6 changed files with 73 additions and 8 deletions

View File

@ -1,3 +1,11 @@
2001-04-02 Corinna Vinschen <corinna@vinschen.de>
* 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.
2003-04-01 Corinna Vinschen <corinna@vinschen.de>
* libc/stdio/sscanf.c: Update flags description.

View File

@ -49,6 +49,7 @@ size_t _EXFUN(wcsrtombs, (char * , const wchar_t ** , size_t, mbstate_t *));
wchar_t *_EXFUN(wcscat, (wchar_t * , const wchar_t *));
wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t));
int _EXFUN(wcscmp, (const wchar_t *, const wchar_t *));
int _EXFUN(wcscoll, (const wchar_t *, const wchar_t *));
wchar_t *_EXFUN(wcscpy, (wchar_t * , const wchar_t *));
size_t _EXFUN(wcscspn, (const wchar_t *, const wchar_t *));
size_t _EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t));

View File

@ -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

View File

@ -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)

View File

@ -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);
}

View File

@ -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
@ -52,6 +53,9 @@ declarations are in @file{wchar.h}.
@page
@include string/wcscmp.def
@page
@include string/wcscoll.def
@page
@include string/wcscpy.def