xref: /illumos-gate/usr/src/lib/libxcurses/h/m_collat.h (revision 1da57d55)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
57c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
67c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
77c478bd9Sstevel@tonic-gate  * with the License.
87c478bd9Sstevel@tonic-gate  *
97c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate  * and limitations under the License.
137c478bd9Sstevel@tonic-gate  *
147c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate  *
207c478bd9Sstevel@tonic-gate  * CDDL HEADER END
217c478bd9Sstevel@tonic-gate  */
227c478bd9Sstevel@tonic-gate /*
237c478bd9Sstevel@tonic-gate  * Copyright (c) 1996, by Sun Microsystems, Inc.
247c478bd9Sstevel@tonic-gate  * All rights reserved.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate /*
287c478bd9Sstevel@tonic-gate  * collate.h will declare all the following routines in their header
297c478bd9Sstevel@tonic-gate  * files -- if they conform to the mks extentions.
307c478bd9Sstevel@tonic-gate  * If they don't conform, then we have to define them ourselves.
317c478bd9Sstevel@tonic-gate  *
327c478bd9Sstevel@tonic-gate  * Copyright 1992 by Mortice Kern Systems Inc.  All rights reserved.
337c478bd9Sstevel@tonic-gate  *
347c478bd9Sstevel@tonic-gate  * $Header: /rd/h/rcs/m_collat.h 1.10 1994/02/02 22:48:30 mark Exp $
357c478bd9Sstevel@tonic-gate  */
367c478bd9Sstevel@tonic-gate #ifndef	__M_M_COLLAT_H__
377c478bd9Sstevel@tonic-gate #define	__M_M_COLLAT_H__
387c478bd9Sstevel@tonic-gate 
397c478bd9Sstevel@tonic-gate #include <m_i18n.h>
407c478bd9Sstevel@tonic-gate 
417c478bd9Sstevel@tonic-gate /*
427c478bd9Sstevel@tonic-gate  * MKS i18n extentions for character collation support in POSIX.2
437c478bd9Sstevel@tonic-gate  */
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate 
467c478bd9Sstevel@tonic-gate /* m_collel_t: a type used to store collation elements
477c478bd9Sstevel@tonic-gate  * 		This must be an unsigned type.
487c478bd9Sstevel@tonic-gate  * M_MAX_COLLEL: maximum allowable value to be used for m_collel_t
497c478bd9Sstevel@tonic-gate  * M_COLL_ERR  : error value returned by collation functions
507c478bd9Sstevel@tonic-gate  */
517c478bd9Sstevel@tonic-gate /*
527c478bd9Sstevel@tonic-gate  * change this to "unsigned short" when we fix the rest of the code
53*1da57d55SToomas Soome  * to use M_COLL_ERR
547c478bd9Sstevel@tonic-gate  */
557c478bd9Sstevel@tonic-gate typedef /* unsigned */ short m_collel_t;	/* Collating element */
567c478bd9Sstevel@tonic-gate 
577c478bd9Sstevel@tonic-gate #define __M_COLL_ERR	USHRT_MAX
587c478bd9Sstevel@tonic-gate #define __M_COLL_MAX	M_COLL_ERR-1
597c478bd9Sstevel@tonic-gate 
607c478bd9Sstevel@tonic-gate #undef	m_ismccollel
617c478bd9Sstevel@tonic-gate #define	m_ismccollel(c)	((c) >= M_CSETSIZE)
627c478bd9Sstevel@tonic-gate extern int		m_collequiv (m_collel_t, m_collel_t **);
637c478bd9Sstevel@tonic-gate extern int		m_collrange (m_collel_t,m_collel_t,m_collel_t **);
647c478bd9Sstevel@tonic-gate extern int		m_collorder (m_collel_t **);
657c478bd9Sstevel@tonic-gate extern	int		m_cclass (char *, m_collel_t **);
667c478bd9Sstevel@tonic-gate extern m_collel_t	m_strtocoll (char *);
677c478bd9Sstevel@tonic-gate extern char		*m_colltostr (m_collel_t);
687c478bd9Sstevel@tonic-gate extern m_collel_t	m_getmccoll (const char **);
697c478bd9Sstevel@tonic-gate extern m_collel_t	m_getwmccoll (const wchar_t **);
707c478bd9Sstevel@tonic-gate extern m_collel_t	m_maxcoll (void);
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate #endif /*__M_M_COLLAT_H__*/
73