xref: /titanic_52/usr/src/cmd/ast/libast/i386/lc.h (revision 906afcb89d0412cc073b95c2d701a804a8cdb62c)
1 /* : : generated by cmd/ast/tools/lcgen : : */
2 #pragma prototyped
3 
4 #ifndef _LC_H
5 #define _LC_H			1
6 
7 #include <ast.h>
8 
9 #define LC_abbreviated		0x00001
10 #define LC_checked		0x00002
11 #define LC_debug		0x00004
12 #define LC_default		0x00008
13 #define LC_defined		0x00010
14 #define LC_local		0x00020
15 #define LC_primary		0x00040
16 #define LC_qualified		0x00080
17 #define LC_undefined		0x00100
18 #define LC_utf8			0x00200
19 #define LC_verbose		0x00400
20 #define LC_setlocale		0x10000
21 #define LC_setenv		0x20000
22 #define LC_user			0x40000
23 
24 #define LC_language_attribute_max	2
25 #define LC_territory_language_max	4
26 
27 struct Lc_s;
28 
29 typedef struct Lc_info_s
30 {
31 	const struct Lc_s*	lc;
32 	unsigned long		number;
33 	void*			data;
34 } Lc_info_t;
35 
36 typedef struct Lc_attribute_s
37 {
38 	const char*		name;
39 	unsigned long		flags;
40 	unsigned long		index;
41 } Lc_attribute_t;
42 
43 typedef struct Lc_charset_s
44 {
45 	const char*		code;
46 	const char*		alternates;
47 	const char*		ms;
48 	unsigned long		index;
49 } Lc_charset_t;
50 
51 typedef struct Lc_language_s
52 {
53 	const char*		code;
54 	const char*		name;
55 	const char*		alternates;
56 	const Lc_charset_t*	charset;
57 	unsigned long		flags;
58 	unsigned long		index;
59 	const Lc_attribute_t*	attributes[LC_language_attribute_max];
60 } Lc_language_t;
61 
62 typedef struct Lc_territory_s
63 {
64 	const char*		code;
65 	const char*		name;
66 	unsigned long		flags;
67 	unsigned long		index;
68 	const Lc_language_t*	languages[LC_territory_language_max];
69 #ifdef _LC_TERRITORY_PRIVATE_
70 	_LC_TERRITORY_PRIVATE_
71 #endif
72 } Lc_territory_t;
73 
74 typedef struct Lc_map_s
75 {
76 	const char*		code;
77 	const Lc_language_t*	language;
78 	const Lc_territory_t*	territory;
79 	const Lc_charset_t*	charset;
80 	const Lc_attribute_t*	attribute;
81 } Lc_map_t;
82 
83 typedef struct Lc_attribute_list_s
84 {
85 	struct Lc_attribute_list_s*	next;
86 	const Lc_attribute_t*		attribute;
87 } Lc_attribute_list_t;
88 
89 typedef struct Lc_s
90 {
91 	const char*		name;
92 	const char*		code;
93 	const Lc_language_t*	language;
94 	const Lc_territory_t*	territory;
95 	const Lc_charset_t*	charset;
96 	const Lc_attribute_list_t*	attributes;
97 	unsigned long		flags;
98 	unsigned long		index;
99 #ifdef _LC_PRIVATE_
100 	_LC_PRIVATE_
101 #endif
102 } Lc_t;
103 
104 struct Lc_category_s;
105 
106 typedef int (*Lc_category_set_f)(struct Lc_category_s*);
107 
108 typedef struct Lc_category_s
109 {
110 	const char*		name;
111 	int			external;
112 	int			internal;
113 	Lc_category_set_f	setf;
114 	Lc_t*			prev;
115 	unsigned int		flags;
116 } Lc_category_t;
117 
118 #if _BLD_ast && defined(__EXPORT__)
119 #define extern		__EXPORT__
120 #endif
121 
122 extern size_t		lccanon(Lc_t*, unsigned long flags, char*, size_t);
123 extern Lc_category_t*	lccategories(void);
124 extern int		lcindex(int, int);
125 extern Lc_info_t*	lcinfo(int);
126 extern Lc_t*		lcmake(const char*);
127 extern Lc_t*		lcscan(Lc_t*);
128 
129 #undef	extern
130 
131 #endif
132