Deleted Added
full compact
lmonetary.c (116274) lmonetary.c (116875)
1/*
2 * Copyright (c) 2000, 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

--- 11 unchanged lines hidden (view full) ---

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
27#include <sys/cdefs.h>
1/*
2 * Copyright (c) 2000, 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

--- 11 unchanged lines hidden (view full) ---

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/lib/libc/locale/lmonetary.c 116274 2003-06-13 00:14:07Z jkh $");
28__FBSDID("$FreeBSD: head/lib/libc/locale/lmonetary.c 116875 2003-06-26 10:46:16Z phantom $");
29
30#include <limits.h>
31#include <stddef.h>
32#include <stdlib.h>
29
30#include <limits.h>
31#include <stddef.h>
32#include <stdlib.h>
33#include "lmonetary.h"
33
34#include "ldpart.h"
34#include "ldpart.h"
35#include "lmonetary.h"
35
36extern int __mlocale_changed;
37extern const char * __fix_locale_grouping_str(const char *);
38
39#define LCMONETARY_SIZE_FULL (sizeof(struct lc_monetary_T) / sizeof(char *))
40#define LCMONETARY_SIZE_MIN \
41 (offsetof(struct lc_monetary_T, int_p_cs_precedes) / \
42 sizeof(char *))

--- 64 unchanged lines hidden (view full) ---

107 M_ASSIGN_CHAR(n_cs_precedes);
108 M_ASSIGN_CHAR(n_sep_by_space);
109 M_ASSIGN_CHAR(p_sign_posn);
110 M_ASSIGN_CHAR(n_sign_posn);
111
112 /*
113 * The six additional C99 international monetary formatting
114 * parameters default to the national parameters when
36
37extern int __mlocale_changed;
38extern const char * __fix_locale_grouping_str(const char *);
39
40#define LCMONETARY_SIZE_FULL (sizeof(struct lc_monetary_T) / sizeof(char *))
41#define LCMONETARY_SIZE_MIN \
42 (offsetof(struct lc_monetary_T, int_p_cs_precedes) / \
43 sizeof(char *))

--- 64 unchanged lines hidden (view full) ---

108 M_ASSIGN_CHAR(n_cs_precedes);
109 M_ASSIGN_CHAR(n_sep_by_space);
110 M_ASSIGN_CHAR(p_sign_posn);
111 M_ASSIGN_CHAR(n_sign_posn);
112
113 /*
114 * The six additional C99 international monetary formatting
115 * parameters default to the national parameters when
115 * reading FreeBSD 4 LC_MONETARY data files.
116 * reading FreeBSD LC_MONETARY data files.
116 */
117#define M_ASSIGN_ICHAR(NAME) \
118 do { \
119 if (_monetary_locale.int_##NAME == NULL) \
120 _monetary_locale.int_##NAME = \
121 _monetary_locale.NAME; \
122 else \
123 M_ASSIGN_CHAR(int_##NAME); \

--- 30 unchanged lines hidden (view full) ---

154 "int_frac_digits = %d\n"
155 "frac_digits = %d\n"
156 "p_cs_precedes = %d\n"
157 "p_sep_by_space = %d\n"
158 "n_cs_precedes = %d\n"
159 "n_sep_by_space = %d\n"
160 "p_sign_posn = %d\n"
161 "n_sign_posn = %d\n",
117 */
118#define M_ASSIGN_ICHAR(NAME) \
119 do { \
120 if (_monetary_locale.int_##NAME == NULL) \
121 _monetary_locale.int_##NAME = \
122 _monetary_locale.NAME; \
123 else \
124 M_ASSIGN_CHAR(int_##NAME); \

--- 30 unchanged lines hidden (view full) ---

155 "int_frac_digits = %d\n"
156 "frac_digits = %d\n"
157 "p_cs_precedes = %d\n"
158 "p_sep_by_space = %d\n"
159 "n_cs_precedes = %d\n"
160 "n_sep_by_space = %d\n"
161 "p_sign_posn = %d\n"
162 "n_sign_posn = %d\n",
163 "int_p_cs_precedes = %d\n"
164 "int_p_sep_by_space = %d\n"
165 "int_n_cs_precedes = %d\n"
166 "int_n_sep_by_space = %d\n"
167 "int_p_sign_posn = %d\n"
168 "int_n_sign_posn = %d\n",
162 _monetary_locale.int_curr_symbol,
163 _monetary_locale.currency_symbol,
164 _monetary_locale.mon_decimal_point,
165 _monetary_locale.mon_thousands_sep,
166 _monetary_locale.mon_grouping,
167 _monetary_locale.positive_sign,
168 _monetary_locale.negative_sign,
169 _monetary_locale.int_frac_digits[0],
170 _monetary_locale.frac_digits[0],
171 _monetary_locale.p_cs_precedes[0],
172 _monetary_locale.p_sep_by_space[0],
173 _monetary_locale.n_cs_precedes[0],
174 _monetary_locale.n_sep_by_space[0],
175 _monetary_locale.p_sign_posn[0],
169 _monetary_locale.int_curr_symbol,
170 _monetary_locale.currency_symbol,
171 _monetary_locale.mon_decimal_point,
172 _monetary_locale.mon_thousands_sep,
173 _monetary_locale.mon_grouping,
174 _monetary_locale.positive_sign,
175 _monetary_locale.negative_sign,
176 _monetary_locale.int_frac_digits[0],
177 _monetary_locale.frac_digits[0],
178 _monetary_locale.p_cs_precedes[0],
179 _monetary_locale.p_sep_by_space[0],
180 _monetary_locale.n_cs_precedes[0],
181 _monetary_locale.n_sep_by_space[0],
182 _monetary_locale.p_sign_posn[0],
176 _monetary_locale.n_sign_posn[0]
183 _monetary_locale.n_sign_posn[0],
184 _monetary_locale.int_p_cs_precedes[0],
185 _monetary_locale.int_p_sep_by_space[0],
186 _monetary_locale.int_n_cs_precedes[0],
187 _monetary_locale.int_n_sep_by_space[0],
188 _monetary_locale.int_p_sign_posn[0],
189 _monetary_locale.int_n_sign_posn[0]
177);
178}
179#endif /* LOCALE_DEBUG */
190);
191}
192#endif /* LOCALE_DEBUG */