xref: /dragonfly/include/langinfo.h (revision 600b876a)
1 /*-
2  * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24  * SUCH DAMAGE.
25  *
26  * $FreeBSD: head/include/langinfo.h 233600 2012-03-28 12:11:54Z theraven $
27  */
28 
29 #ifndef _LANGINFO_H_
30 #define	_LANGINFO_H_
31 
32 #include <sys/cdefs.h>
33 
34 #ifndef _NL_ITEM_DECLARED
35 typedef	int	nl_item;
36 #define	_NL_ITEM_DECLARED
37 #endif
38 
39 #define	CODESET		0	/* codeset name */
40 #define	D_T_FMT		1	/* string for formatting date and time */
41 #define	D_FMT		2	/* date format string */
42 #define	T_FMT		3	/* time format string */
43 #define	T_FMT_AMPM	4	/* a.m. or p.m. time formatting string */
44 #define	AM_STR		5	/* Ante Meridian affix */
45 #define	PM_STR		6	/* Post Meridian affix */
46 
47 /* week day names */
48 #define	DAY_1		7
49 #define	DAY_2		8
50 #define	DAY_3		9
51 #define	DAY_4		10
52 #define	DAY_5		11
53 #define	DAY_6		12
54 #define	DAY_7		13
55 
56 /* abbreviated week day names */
57 #define	ABDAY_1		14
58 #define	ABDAY_2		15
59 #define	ABDAY_3		16
60 #define	ABDAY_4		17
61 #define	ABDAY_5		18
62 #define	ABDAY_6		19
63 #define	ABDAY_7		20
64 
65 /* month names */
66 #define	MON_1		21
67 #define	MON_2		22
68 #define	MON_3		23
69 #define	MON_4		24
70 #define	MON_5		25
71 #define	MON_6		26
72 #define	MON_7		27
73 #define	MON_8		28
74 #define	MON_9		29
75 #define	MON_10		30
76 #define	MON_11		31
77 #define	MON_12		32
78 
79 /* abbreviated month names */
80 #define	ABMON_1		33
81 #define	ABMON_2		34
82 #define	ABMON_3		35
83 #define	ABMON_4		36
84 #define	ABMON_5		37
85 #define	ABMON_6		38
86 #define	ABMON_7		39
87 #define	ABMON_8		40
88 #define	ABMON_9		41
89 #define	ABMON_10	42
90 #define	ABMON_11	43
91 #define	ABMON_12	44
92 
93 #define	ERA		45	/* era description segments */
94 #define	ERA_D_FMT	46	/* era date format string */
95 #define	ERA_D_T_FMT	47	/* era date and time format string */
96 #define	ERA_T_FMT	48	/* era time format string */
97 #define	ALT_DIGITS	49	/* alternative symbols for digits */
98 
99 #define	RADIXCHAR	50	/* radix char */
100 #define	THOUSEP		51	/* separator for thousands */
101 
102 #define	YESEXPR		52	/* affirmative response expression */
103 #define	NOEXPR		53	/* negative response expression */
104 
105 #if __BSD_VISIBLE || (__XSI_VISIBLE && __XSI_VISIBLE < 600)
106 #define	YESSTR		54	/* affirmative response for yes/no queries */
107 #define	NOSTR		55	/* negative response for yes/no queries */
108 #endif
109 
110 #define	CRNCYSTR	56	/* currency symbol */
111 
112 #if __BSD_VISIBLE
113 #define	D_MD_ORDER	57	/* month/day order (local extension) */
114 
115 /* standalone months forms for %OB */
116 #define	ALTMON_1	58
117 #define	ALTMON_2	59
118 #define	ALTMON_3	60
119 #define	ALTMON_4	61
120 #define	ALTMON_5	62
121 #define	ALTMON_6	63
122 #define	ALTMON_7	64
123 #define	ALTMON_8	65
124 #define	ALTMON_9	66
125 #define	ALTMON_10	67
126 #define	ALTMON_11	68
127 #define	ALTMON_12	69
128 #endif /* __BSD_VISIBLE */
129 
130 __BEGIN_DECLS
131 #if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE
132 char	*nl_langinfo(nl_item);
133 #endif
134 
135 #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
136 #include <xlocale/_langinfo.h>
137 #endif
138 __END_DECLS
139 
140 #endif /* !_LANGINFO_H_ */
141