2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy is of the CDDL is also available via the Internet
9 * at http://www.illumos.org/license/CDDL.
13 * Copyright 2010 Nexenta Systems, Inc. All rights reserved.
14 * Copyright 2013 DEY Storage Systmes, Inc.
21 /* Common header files. */
25 #include <sys/types.h>
30 extern int mb_cur_max
;
31 extern int mb_cur_min
;
36 extern int undefok
; /* mostly ignore undefined symbols */
40 void yyerror(const char *);
42 void errf(const char *, ...);
43 void warn(const char *, ...);
45 int putl_category(const char *, FILE *);
46 int wr_category(void *, size_t, FILE *);
47 FILE *open_category(void);
48 void close_category(FILE *);
49 void copy_category(char *);
51 int get_category(void);
52 void reset_scanner(const char *);
53 void scan_to_eol(void);
54 void add_wcs(wchar_t);
55 wchar_t *get_wcs(void);
57 /* charmap.c - CHARMAP handling */
58 void init_charmap(void);
59 void add_charmap(const char *, int);
60 void add_charmap_undefined(char *);
61 void add_charmap_posix(void);
62 void add_charmap_range(char *, char *, int);
63 int lookup_charmap(const char *, wchar_t *);
64 int check_charmap_undefined(char *);
65 int check_charmap(wchar_t);
67 /* collate.o - LC_COLLATE handling */
68 typedef struct collelem collelem_t
;
69 typedef struct collsym collsym_t
;
70 void init_collate(void);
71 void define_collsym(char *);
72 void define_collelem(char *, wchar_t *);
73 void add_order_directive(void);
74 void add_order_bit(int);
75 void dump_collate(void);
76 collsym_t
*lookup_collsym(char *);
77 collelem_t
*lookup_collelem(char *);
78 void start_order_collelem(collelem_t
*);
79 void start_order_undefined(void);
80 void start_order_symbol(char *);
81 void start_order_char(wchar_t);
82 void start_order_ellipsis(void);
83 void end_order_collsym(collsym_t
*);
85 void add_weight_num(int);
86 void add_order_collelem(collelem_t
*);
87 void add_order_collsym(collsym_t
*);
88 void add_order_char(wchar_t);
89 void add_order_ignore(void);
90 void add_order_ellipsis(void);
91 void add_order_symbol(char *);
92 void add_order_subst(void);
93 void add_subst_char(wchar_t);
94 void add_subst_collsym(collsym_t
*);
95 void add_subst_collelem(collelem_t
*);
96 void add_subst_symbol(char *);
98 /* ctype.c - LC_CTYPE handling */
99 void init_ctype(void);
101 void add_ctype_range(int);
102 void add_width(int, int);
103 void add_width_range(int, int, int);
104 void add_caseconv(int, int);
105 void dump_ctype(void);
107 /* messages.c - LC_MESSAGES handling */
108 void init_messages(void);
109 void add_message(wchar_t *);
110 void dump_messages(void);
112 /* monetary.c - LC_MONETARY handling */
113 void init_monetary(void);
114 void add_monetary_str(wchar_t *);
115 void add_monetary_num(int);
116 void reset_monetary_group(void);
117 void add_monetary_group(int);
118 void dump_monetary(void);
120 /* numeric.c - LC_NUMERIC handling */
121 void init_numeric(void);
122 void add_numeric_str(wchar_t *);
123 void reset_numeric_group(void);
124 void add_numeric_group(int);
125 void dump_numeric(void);
127 /* time.c - LC_TIME handling */
128 void init_time(void);
129 void add_time_str(wchar_t *);
130 void reset_time_list(void);
131 void add_time_list(wchar_t *);
132 void check_time_list(void);
133 void dump_time(void);
135 /* wide.c - Wide character handling. */
136 int to_wide(wchar_t *, const char *);
137 int to_mbs(char *, wchar_t);
138 char *to_mb_string(const wchar_t *);
139 void set_wide_encoding(const char *);
140 const char *get_wide_encoding(void);
143 #define _(x) gettext(x)
144 #define INTERR errf(_("internal fault (%s:%d)"), __FILE__, __LINE__)