1 /*
2 Copyright (c) 2016 Corinna Vinschen <corinna@vinschen.de>
3  */
4 /*
5 FUNCTION
6 	<<wcscoll_l>>---locale-specific wide-character string compare
7 
8 INDEX
9 	wcscoll_l
10 
11 SYNOPSIS
12 	#include <wchar.h>
13 	int wcscoll_l(const wchar_t *<[stra]>, const wchar_t * <[strb]>,
14 		      locale_t <[locale]>);
15 
16 DESCRIPTION
17 	<<wcscoll_l>> compares the wide-character string pointed to by
18 	<[stra]> to the wide-character string pointed to by <[strb]>,
19 	using an interpretation appropriate to the current <<LC_COLLATE>>
20 	state.
21 
22 	(NOT Cygwin:) The current implementation of <<wcscoll_l>> simply
23 	uses <<wcscmp>> and does not support any language-specific sorting.
24 
25 	If <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the
26 	behaviour is undefined.
27 
28 RETURNS
29 	If the first string is greater than the second string,
30 	<<wcscoll_l>> returns a number greater than zero.  If the two
31 	strings are equivalent, <<wcscoll_l>> returns zero.  If the first
32 	string is less than the second string, <<wcscoll_l>> returns a
33 	number less than zero.
34 
35 PORTABILITY
36 <<wcscoll_l>> is POSIX-1.2008.
37 */
38 
39 #define _DEFAULT_SOURCE
40 #include <_ansi.h>
41 #include <wchar.h>
42 
43 int
wcscoll_l(const wchar_t * a,const wchar_t * b,struct __locale_t * locale)44 wcscoll_l (const wchar_t *a, const wchar_t *b, struct __locale_t *locale)
45 {
46   (void) locale;
47   return wcscmp (a, b);
48 }
49