xref: /titanic_51/usr/src/head/langinfo.h (revision 2d08521bd15501c8370ba2153b9cca4f094979d0)
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 2003 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate /*	Copyright (c) 1988 AT&T	*/
287c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
297c478bd9Sstevel@tonic-gate 
30*2d08521bSGarrett D'Amore /*
31*2d08521bSGarrett D'Amore  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32*2d08521bSGarrett D'Amore  */
33*2d08521bSGarrett D'Amore 
347c478bd9Sstevel@tonic-gate 
357c478bd9Sstevel@tonic-gate #ifndef	_LANGINFO_H
367c478bd9Sstevel@tonic-gate #define	_LANGINFO_H
377c478bd9Sstevel@tonic-gate 
387c478bd9Sstevel@tonic-gate #include <sys/feature_tests.h>
397c478bd9Sstevel@tonic-gate #include <nl_types.h>
407c478bd9Sstevel@tonic-gate 
417c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
427c478bd9Sstevel@tonic-gate extern "C" {
437c478bd9Sstevel@tonic-gate #endif
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate /*
467c478bd9Sstevel@tonic-gate  * The seven days of the week in their full beauty
477c478bd9Sstevel@tonic-gate  */
487c478bd9Sstevel@tonic-gate 
497c478bd9Sstevel@tonic-gate #define	DAY_1	  1	/* sunday */
507c478bd9Sstevel@tonic-gate #define	DAY_2	  2	/* monday */
517c478bd9Sstevel@tonic-gate #define	DAY_3	  3	/* tuesday */
527c478bd9Sstevel@tonic-gate #define	DAY_4	  4	/* wednesday */
537c478bd9Sstevel@tonic-gate #define	DAY_5	  5	/* thursday */
547c478bd9Sstevel@tonic-gate #define	DAY_6	  6	/* friday */
557c478bd9Sstevel@tonic-gate #define	DAY_7	  7	/* saturday */
567c478bd9Sstevel@tonic-gate 
577c478bd9Sstevel@tonic-gate /*
587c478bd9Sstevel@tonic-gate  * The abbreviated seven days of the week
597c478bd9Sstevel@tonic-gate  */
607c478bd9Sstevel@tonic-gate 
617c478bd9Sstevel@tonic-gate #define	ABDAY_1	  8  /* sun */
627c478bd9Sstevel@tonic-gate #define	ABDAY_2	  9  /* mon */
637c478bd9Sstevel@tonic-gate #define	ABDAY_3	  10 /* tue */
647c478bd9Sstevel@tonic-gate #define	ABDAY_4	  11 /* wed */
657c478bd9Sstevel@tonic-gate #define	ABDAY_5	  12 /* thu */
667c478bd9Sstevel@tonic-gate #define	ABDAY_6	  13 /* fri */
677c478bd9Sstevel@tonic-gate #define	ABDAY_7	  14 /* sat */
687c478bd9Sstevel@tonic-gate 
697c478bd9Sstevel@tonic-gate /*
707c478bd9Sstevel@tonic-gate  * The full names of the twelve months...
717c478bd9Sstevel@tonic-gate  */
727c478bd9Sstevel@tonic-gate 
737c478bd9Sstevel@tonic-gate #define	MON_1	  15 /* january */
747c478bd9Sstevel@tonic-gate #define	MON_2	  16 /* february */
757c478bd9Sstevel@tonic-gate #define	MON_3	  17 /* march */
767c478bd9Sstevel@tonic-gate #define	MON_4	  18 /* april */
777c478bd9Sstevel@tonic-gate #define	MON_5	  19 /* may */
787c478bd9Sstevel@tonic-gate #define	MON_6	  20 /* june */
797c478bd9Sstevel@tonic-gate #define	MON_7	  21 /* july */
807c478bd9Sstevel@tonic-gate #define	MON_8	  22 /* august */
817c478bd9Sstevel@tonic-gate #define	MON_9	  23 /* september */
827c478bd9Sstevel@tonic-gate #define	MON_10	  24 /* october */
837c478bd9Sstevel@tonic-gate #define	MON_11	  25 /* november */
847c478bd9Sstevel@tonic-gate #define	MON_12	  26 /* december */
857c478bd9Sstevel@tonic-gate 
867c478bd9Sstevel@tonic-gate /*
877c478bd9Sstevel@tonic-gate  * ... and their abbreviated form
887c478bd9Sstevel@tonic-gate  */
897c478bd9Sstevel@tonic-gate 
907c478bd9Sstevel@tonic-gate #define	ABMON_1	  27 /* jan */
917c478bd9Sstevel@tonic-gate #define	ABMON_2	  28 /* feb */
927c478bd9Sstevel@tonic-gate #define	ABMON_3	  29 /* mar */
937c478bd9Sstevel@tonic-gate #define	ABMON_4	  30 /* apr */
947c478bd9Sstevel@tonic-gate #define	ABMON_5	  31 /* may */
957c478bd9Sstevel@tonic-gate #define	ABMON_6	  32 /* jun */
967c478bd9Sstevel@tonic-gate #define	ABMON_7	  33 /* jul */
977c478bd9Sstevel@tonic-gate #define	ABMON_8	  34 /* aug */
987c478bd9Sstevel@tonic-gate #define	ABMON_9	  35 /* sep */
997c478bd9Sstevel@tonic-gate #define	ABMON_10  36 /* oct */
1007c478bd9Sstevel@tonic-gate #define	ABMON_11  37 /* nov */
1017c478bd9Sstevel@tonic-gate #define	ABMON_12  38 /* dec */
1027c478bd9Sstevel@tonic-gate 
1037c478bd9Sstevel@tonic-gate /*
1047c478bd9Sstevel@tonic-gate  * plus some special strings you might need to know
1057c478bd9Sstevel@tonic-gate  */
1067c478bd9Sstevel@tonic-gate 
1077c478bd9Sstevel@tonic-gate #define	RADIXCHAR 39	/* radix character */
1087c478bd9Sstevel@tonic-gate #define	THOUSEP	  40	/* separator for thousand */
1097c478bd9Sstevel@tonic-gate /* YESSTR and NOSTR marked as legacy in XPG5 and removed in SUSv3 */
1107c478bd9Sstevel@tonic-gate #if !defined(_XPG6) || defined(__EXTENSIONS__)
1117c478bd9Sstevel@tonic-gate #define	YESSTR	  41    /* affirmative response for yes/no queries */
1127c478bd9Sstevel@tonic-gate #define	NOSTR	  42  	/* negative response for yes/no queries */
1137c478bd9Sstevel@tonic-gate #endif /* !defined(_XPG6) || defined(__EXTENSIONS__ */
1147c478bd9Sstevel@tonic-gate #define	CRNCYSTR  43 	/* currency symbol */
1157c478bd9Sstevel@tonic-gate 
1167c478bd9Sstevel@tonic-gate /*
1177c478bd9Sstevel@tonic-gate  * Default string used to format date and time
1187c478bd9Sstevel@tonic-gate  *	e.g. Sunday, August 24 21:08:38 MET 1986
1197c478bd9Sstevel@tonic-gate  */
1207c478bd9Sstevel@tonic-gate 
1217c478bd9Sstevel@tonic-gate #define	D_T_FMT	  44 	/* string for formatting date and time */
1227c478bd9Sstevel@tonic-gate #define	D_FMT	  45	/* date format */
1237c478bd9Sstevel@tonic-gate #define	T_FMT	  46	/* time format */
1247c478bd9Sstevel@tonic-gate #define	AM_STR	  47	/* am string */
1257c478bd9Sstevel@tonic-gate #define	PM_STR	  48	/* pm string */
1267c478bd9Sstevel@tonic-gate 
1277c478bd9Sstevel@tonic-gate /*
1287c478bd9Sstevel@tonic-gate  * Additions for XPG4 (XSH4) Compliance
1297c478bd9Sstevel@tonic-gate  */
1307c478bd9Sstevel@tonic-gate 
1317c478bd9Sstevel@tonic-gate #define	CODESET		49	/* codeset name */
1327c478bd9Sstevel@tonic-gate #define	T_FMT_AMPM	50	/* am or pm time format string */
1337c478bd9Sstevel@tonic-gate #define	ERA		51	/* era description segments */
1347c478bd9Sstevel@tonic-gate #define	ERA_D_FMT	52	/* era date format string */
1357c478bd9Sstevel@tonic-gate #define	ERA_D_T_FMT	53	/* era date and time format string */
1367c478bd9Sstevel@tonic-gate #define	ERA_T_FMT	54	/* era time format string */
1377c478bd9Sstevel@tonic-gate #define	ALT_DIGITS	55	/* alternative symbols for digits */
1387c478bd9Sstevel@tonic-gate #define	YESEXPR		56	/* affirmative response expression */
1397c478bd9Sstevel@tonic-gate #define	NOEXPR		57	/* negative response expression */
1407c478bd9Sstevel@tonic-gate #define	_DATE_FMT	58	/* strftime format for date(1) */
1417c478bd9Sstevel@tonic-gate 
1427c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE)
1437c478bd9Sstevel@tonic-gate #define	MAXSTRMSG	58 /* Maximum number of strings in langinfo */
1447c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) */
1457c478bd9Sstevel@tonic-gate 
1467c478bd9Sstevel@tonic-gate /*
1477c478bd9Sstevel@tonic-gate  * and the definitions of functions langinfo(3C)
1487c478bd9Sstevel@tonic-gate  */
1497c478bd9Sstevel@tonic-gate #if defined(__STDC__)
1507c478bd9Sstevel@tonic-gate char   *nl_langinfo(nl_item);	/* get a string from the database	*/
1517c478bd9Sstevel@tonic-gate #else
1527c478bd9Sstevel@tonic-gate char   *nl_langinfo();		/* get a string from the database	*/
1537c478bd9Sstevel@tonic-gate #endif
1547c478bd9Sstevel@tonic-gate 
155*2d08521bSGarrett D'Amore #if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
156*2d08521bSGarrett D'Amore #ifndef	_LOCALE_T
157*2d08521bSGarrett D'Amore #define	_LOCALE_T
158*2d08521bSGarrett D'Amore typedef struct locale *locale_t;
159*2d08521bSGarrett D'Amore #endif
160*2d08521bSGarrett D'Amore 
161*2d08521bSGarrett D'Amore #if defined(__STDC__)
162*2d08521bSGarrett D'Amore char	*nl_langinfo_l(nl_item, locale_t);
163*2d08521bSGarrett D'Amore #else
164*2d08521bSGarrett D'Amore char	*nl_langinfo_l();
165*2d08521bSGarrett D'Amore #endif
166*2d08521bSGarrett D'Amore #endif
167*2d08521bSGarrett D'Amore 
1687c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
1697c478bd9Sstevel@tonic-gate }
1707c478bd9Sstevel@tonic-gate #endif
1717c478bd9Sstevel@tonic-gate 
1727c478bd9Sstevel@tonic-gate #endif	/* _LANGINFO_H */
173