xref: /onnv-gate/usr/src/lib/libxcurses/h/m_collat.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate  * Copyright (c) 1996, by Sun Microsystems, Inc.
24*0Sstevel@tonic-gate  * All rights reserved.
25*0Sstevel@tonic-gate  */
26*0Sstevel@tonic-gate 
27*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
28*0Sstevel@tonic-gate 
29*0Sstevel@tonic-gate /*
30*0Sstevel@tonic-gate  * collate.h will declare all the following routines in their header
31*0Sstevel@tonic-gate  * files -- if they conform to the mks extentions.
32*0Sstevel@tonic-gate  * If they don't conform, then we have to define them ourselves.
33*0Sstevel@tonic-gate  *
34*0Sstevel@tonic-gate  * Copyright 1992 by Mortice Kern Systems Inc.  All rights reserved.
35*0Sstevel@tonic-gate  *
36*0Sstevel@tonic-gate  * $Header: /rd/h/rcs/m_collat.h 1.10 1994/02/02 22:48:30 mark Exp $
37*0Sstevel@tonic-gate  */
38*0Sstevel@tonic-gate #ifndef	__M_M_COLLAT_H__
39*0Sstevel@tonic-gate #define	__M_M_COLLAT_H__
40*0Sstevel@tonic-gate 
41*0Sstevel@tonic-gate #include <m_i18n.h>
42*0Sstevel@tonic-gate 
43*0Sstevel@tonic-gate /*
44*0Sstevel@tonic-gate  * MKS i18n extentions for character collation support in POSIX.2
45*0Sstevel@tonic-gate  */
46*0Sstevel@tonic-gate 
47*0Sstevel@tonic-gate 
48*0Sstevel@tonic-gate /* m_collel_t: a type used to store collation elements
49*0Sstevel@tonic-gate  * 		This must be an unsigned type.
50*0Sstevel@tonic-gate  * M_MAX_COLLEL: maximum allowable value to be used for m_collel_t
51*0Sstevel@tonic-gate  * M_COLL_ERR  : error value returned by collation functions
52*0Sstevel@tonic-gate  */
53*0Sstevel@tonic-gate /*
54*0Sstevel@tonic-gate  * change this to "unsigned short" when we fix the rest of the code
55*0Sstevel@tonic-gate  * to use M_COLL_ERR
56*0Sstevel@tonic-gate  */
57*0Sstevel@tonic-gate typedef /* unsigned */ short m_collel_t;	/* Collating element */
58*0Sstevel@tonic-gate 
59*0Sstevel@tonic-gate #define __M_COLL_ERR	USHRT_MAX
60*0Sstevel@tonic-gate #define __M_COLL_MAX	M_COLL_ERR-1
61*0Sstevel@tonic-gate 
62*0Sstevel@tonic-gate #undef	m_ismccollel
63*0Sstevel@tonic-gate #define	m_ismccollel(c)	((c) >= M_CSETSIZE)
64*0Sstevel@tonic-gate extern int		m_collequiv (m_collel_t, m_collel_t **);
65*0Sstevel@tonic-gate extern int		m_collrange (m_collel_t,m_collel_t,m_collel_t **);
66*0Sstevel@tonic-gate extern int		m_collorder (m_collel_t **);
67*0Sstevel@tonic-gate extern	int		m_cclass (char *, m_collel_t **);
68*0Sstevel@tonic-gate extern m_collel_t	m_strtocoll (char *);
69*0Sstevel@tonic-gate extern char		*m_colltostr (m_collel_t);
70*0Sstevel@tonic-gate extern m_collel_t	m_getmccoll (const char **);
71*0Sstevel@tonic-gate extern m_collel_t	m_getwmccoll (const wchar_t **);
72*0Sstevel@tonic-gate extern m_collel_t	m_maxcoll (void);
73*0Sstevel@tonic-gate 
74*0Sstevel@tonic-gate #endif /*__M_M_COLLAT_H__*/
75