xref: /openbsd-src/lib/libc/locale/wcscoll.c (revision 4a39ccd02c887d988c1a5398dd2142879056da5f)
1*4a39ccd0Sderaadt /*	$OpenBSD: wcscoll.c,v 1.2 2012/12/05 23:20:00 deraadt Exp $ */
2c9b8e388Sstsp /*	$NetBSD: wcscoll.c,v 1.1 2003/03/02 22:18:16 tshiozak Exp $	*/
3c9b8e388Sstsp 
4c9b8e388Sstsp /*-
5c9b8e388Sstsp  * Copyright (c)2003 Citrus Project,
6c9b8e388Sstsp  * All rights reserved.
7c9b8e388Sstsp  *
8c9b8e388Sstsp  * Redistribution and use in source and binary forms, with or without
9c9b8e388Sstsp  * modification, are permitted provided that the following conditions
10c9b8e388Sstsp  * are met:
11c9b8e388Sstsp  * 1. Redistributions of source code must retain the above copyright
12c9b8e388Sstsp  *    notice, this list of conditions and the following disclaimer.
13c9b8e388Sstsp  * 2. Redistributions in binary form must reproduce the above copyright
14c9b8e388Sstsp  *    notice, this list of conditions and the following disclaimer in the
15c9b8e388Sstsp  *    documentation and/or other materials provided with the distribution.
16c9b8e388Sstsp  *
17c9b8e388Sstsp  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18c9b8e388Sstsp  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19c9b8e388Sstsp  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20c9b8e388Sstsp  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21c9b8e388Sstsp  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22c9b8e388Sstsp  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23c9b8e388Sstsp  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24c9b8e388Sstsp  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25c9b8e388Sstsp  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26c9b8e388Sstsp  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27c9b8e388Sstsp  * SUCH DAMAGE.
28c9b8e388Sstsp  */
29c9b8e388Sstsp 
30c9b8e388Sstsp #include <assert.h>
31c9b8e388Sstsp #include <wchar.h>
32c9b8e388Sstsp 
33c9b8e388Sstsp /*
34c9b8e388Sstsp  * Compare strings with using collating information.
35c9b8e388Sstsp  */
36c9b8e388Sstsp int
wcscoll(const wchar_t * s1,const wchar_t * s2)37c9b8e388Sstsp wcscoll(const wchar_t *s1, const wchar_t *s2)
38c9b8e388Sstsp {
39c9b8e388Sstsp 	/* XXX: LC_COLLATE should be implemented. */
40c9b8e388Sstsp 	return (wcscmp(s1, s2));
41c9b8e388Sstsp }
42