* 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:
parent
d5292d66a4
commit
d122b1cc73
@ -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>
|
2003-04-01 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* libc/stdio/sscanf.c: Update flags description.
|
* libc/stdio/sscanf.c: Update flags description.
|
||||||
|
@ -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(wcscat, (wchar_t * , const wchar_t *));
|
||||||
wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t));
|
wchar_t *_EXFUN(wcschr, (const wchar_t *, wchar_t));
|
||||||
int _EXFUN(wcscmp, (const wchar_t *, const 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 *));
|
wchar_t *_EXFUN(wcscpy, (wchar_t * , const wchar_t *));
|
||||||
size_t _EXFUN(wcscspn, (const 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));
|
size_t _EXFUN(wcslcat, (wchar_t *, const wchar_t *, size_t));
|
||||||
|
@ -48,6 +48,7 @@ GENERAL_SOURCES = \
|
|||||||
wcscat.c \
|
wcscat.c \
|
||||||
wcschr.c \
|
wcschr.c \
|
||||||
wcscmp.c \
|
wcscmp.c \
|
||||||
|
wcscoll.c \
|
||||||
wcscpy.c \
|
wcscpy.c \
|
||||||
wcscspn.c \
|
wcscspn.c \
|
||||||
wcslcat.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 \
|
memcmp.def strchr.def strlen.def strnlen.def strspn.def \
|
||||||
strcasecmp.def strncasecmp.def strlwr.def strupr.def memccpy.def \
|
strcasecmp.def strncasecmp.def strlwr.def strupr.def memccpy.def \
|
||||||
mempcpy.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 \
|
wcslcat.def wcslcpy.def wcslen.def wcsncat.def wcsncmp.def \
|
||||||
wcsncpy.def wcspbrk.def wcsrchr.def wcsspn.def wcsstr.def \
|
wcsncpy.def wcspbrk.def wcsrchr.def wcsspn.def wcsstr.def \
|
||||||
wmemchr.def wmemcmp.def wmemcpy.def wmemmove.def wmemset.def
|
wmemchr.def wmemcmp.def wmemcpy.def wmemmove.def wmemset.def
|
||||||
|
@ -154,6 +154,7 @@ GENERAL_SOURCES = \
|
|||||||
wcscat.c \
|
wcscat.c \
|
||||||
wcschr.c \
|
wcschr.c \
|
||||||
wcscmp.c \
|
wcscmp.c \
|
||||||
|
wcscoll.c \
|
||||||
wcscpy.c \
|
wcscpy.c \
|
||||||
wcscspn.c \
|
wcscspn.c \
|
||||||
wcslcat.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 \
|
memcmp.def strchr.def strlen.def strnlen.def strspn.def \
|
||||||
strcasecmp.def strncasecmp.def strlwr.def strupr.def memccpy.def \
|
strcasecmp.def strncasecmp.def strlwr.def strupr.def memccpy.def \
|
||||||
mempcpy.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 \
|
wcslcat.def wcslcpy.def wcslen.def wcsncat.def wcsncmp.def \
|
||||||
wcsncpy.def wcspbrk.def wcsrchr.def wcsspn.def wcsstr.def \
|
wcsncpy.def wcspbrk.def wcsrchr.def wcsspn.def wcsstr.def \
|
||||||
wmemchr.def wmemcmp.def wmemcpy.def wmemmove.def wmemset.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@strspn.$(OBJEXT) strtok.$(OBJEXT) strtok_r.$(OBJEXT) \
|
||||||
@USE_LIBTOOL_FALSE@strupr.$(OBJEXT) strxfrm.$(OBJEXT) strstr.$(OBJEXT) \
|
@USE_LIBTOOL_FALSE@strupr.$(OBJEXT) strxfrm.$(OBJEXT) strstr.$(OBJEXT) \
|
||||||
@USE_LIBTOOL_FALSE@swab.$(OBJEXT) u_strerr.$(OBJEXT) wcscat.$(OBJEXT) \
|
@USE_LIBTOOL_FALSE@swab.$(OBJEXT) u_strerr.$(OBJEXT) wcscat.$(OBJEXT) \
|
||||||
@USE_LIBTOOL_FALSE@wcschr.$(OBJEXT) wcscmp.$(OBJEXT) wcscpy.$(OBJEXT) \
|
@USE_LIBTOOL_FALSE@wcschr.$(OBJEXT) wcscmp.$(OBJEXT) wcscoll.$(OBJEXT) \
|
||||||
@USE_LIBTOOL_FALSE@wcscspn.$(OBJEXT) wcslcat.$(OBJEXT) \
|
@USE_LIBTOOL_FALSE@wcscpy.$(OBJEXT) wcscspn.$(OBJEXT) wcslcat.$(OBJEXT) \
|
||||||
@USE_LIBTOOL_FALSE@wcslcpy.$(OBJEXT) wcslen.$(OBJEXT) wcsncat.$(OBJEXT) \
|
@USE_LIBTOOL_FALSE@wcslcpy.$(OBJEXT) wcslen.$(OBJEXT) wcsncat.$(OBJEXT) \
|
||||||
@USE_LIBTOOL_FALSE@wcsncmp.$(OBJEXT) wcsncpy.$(OBJEXT) \
|
@USE_LIBTOOL_FALSE@wcsncmp.$(OBJEXT) wcsncpy.$(OBJEXT) \
|
||||||
@USE_LIBTOOL_FALSE@wcspbrk.$(OBJEXT) wcsrchr.$(OBJEXT) wcsspn.$(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@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@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@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@wcscat.lo wcschr.lo wcscmp.lo wcscoll.lo wcscpy.lo \
|
||||||
@USE_LIBTOOL_TRUE@wcslcat.lo wcslcpy.lo wcslen.lo wcsncat.lo wcsncmp.lo \
|
@USE_LIBTOOL_TRUE@wcscspn.lo wcslcat.lo wcslcpy.lo wcslen.lo wcsncat.lo \
|
||||||
@USE_LIBTOOL_TRUE@wcsncpy.lo wcspbrk.lo wcsrchr.lo wcsspn.lo wcsstr.lo \
|
@USE_LIBTOOL_TRUE@wcsncmp.lo wcsncpy.lo wcspbrk.lo wcsrchr.lo wcsspn.lo \
|
||||||
@USE_LIBTOOL_TRUE@wmemchr.lo wmemcmp.lo wmemcpy.lo wmemmove.lo \
|
@USE_LIBTOOL_TRUE@wcsstr.lo wmemchr.lo wmemcmp.lo wmemcpy.lo wmemmove.lo \
|
||||||
@USE_LIBTOOL_TRUE@wmemset.lo
|
@USE_LIBTOOL_TRUE@wmemset.lo
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||||
|
48
newlib/libc/string/wcscoll.c
Normal file
48
newlib/libc/string/wcscoll.c
Normal 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);
|
||||||
|
}
|
@ -14,6 +14,7 @@ declarations are in @file{wchar.h}.
|
|||||||
* wcscat:: Concatenate wide-character strings
|
* wcscat:: Concatenate wide-character strings
|
||||||
* wcschr:: Search for wide-character in string
|
* wcschr:: Search for wide-character in string
|
||||||
* wcscmp:: Wide-character string compare
|
* wcscmp:: Wide-character string compare
|
||||||
|
* wcscoll:: Locale specific Wide-character string compare
|
||||||
* wcscpy:: Copy wide-character string
|
* wcscpy:: Copy wide-character string
|
||||||
* wcscspn:: Count wide-chars not in string
|
* wcscspn:: Count wide-chars not in string
|
||||||
* wcslcat:: Concatenate wide-character strings to specified length
|
* wcslcat:: Concatenate wide-character strings to specified length
|
||||||
@ -52,6 +53,9 @@ declarations are in @file{wchar.h}.
|
|||||||
@page
|
@page
|
||||||
@include string/wcscmp.def
|
@include string/wcscmp.def
|
||||||
|
|
||||||
|
@page
|
||||||
|
@include string/wcscoll.def
|
||||||
|
|
||||||
@page
|
@page
|
||||||
@include string/wcscpy.def
|
@include string/wcscpy.def
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user