1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Add wcscoll(3).

This commit is contained in:
Jonas 'Sortie' Termansen 2013-07-19 22:49:25 +02:00
parent 8d674a43e1
commit a9d8712435
3 changed files with 33 additions and 1 deletions

View file

@ -164,6 +164,7 @@ wchar/wcscat.o \
wchar/wcschrnul.o \
wchar/wcschr.o \
wchar/wcscmp.o \
wchar/wcscoll.o \
wchar/wcscpy.o \
wchar/wcscspn.o \
wchar/wcslen.o \

View file

@ -69,6 +69,7 @@ wchar_t* wcscat(wchar_t* __restrict, const wchar_t* __restrict);
wchar_t* wcschr(const wchar_t*, wchar_t);
wchar_t* wcschrnul(const wchar_t*, wchar_t);
int wcscmp(const wchar_t*, const wchar_t*);
int wcscoll(const wchar_t*, const wchar_t*);
wchar_t* wcscpy(wchar_t* __restrict, const wchar_t* __restrict);
size_t wcscspn(const wchar_t*, const wchar_t*);
size_t wcslen(const wchar_t*);
@ -101,7 +102,6 @@ int vswprintf(wchar_t* __restrict, size_t, const wchar_t* __restrict, va_list);
int vswscanf(const wchar_t* __restrict, const wchar_t* __restrict, va_list);
int vwprintf(const wchar_t* __restrict, va_list);
int vwscanf(const wchar_t* __restrict, va_list);
int wcscoll(const wchar_t*, const wchar_t*);
int wcsncmp(const wchar_t*, const wchar_t*, size_t);
int wcswidth(const wchar_t*, size_t);
int wctob(wint_t);

31
libc/wchar/wcscoll.cpp Normal file
View file

@ -0,0 +1,31 @@
/*******************************************************************************
Copyright(C) Jonas 'Sortie' Termansen 2013.
This file is part of the Sortix C Library.
The Sortix C Library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
The Sortix C Library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see <http://www.gnu.org/licenses/>.
wchar/wcscoll.cpp
Compare two strings using the current locale.
*******************************************************************************/
#include <wchar.h>
extern "C" int wcscoll(const wchar_t* s1, const wchar_t* s2)
{
// TODO: Pay attention to locales.
return wcscmp(s1, s2);
}