localeconv.3 (da44487bd7bb2fcd7fade9f0403dc3b6f2916168) localeconv.3 (b9384efc1c264c63a53d8c420461ef9c0c17c2b1)
1.\" Copyright (c) 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Donn Seeley at BSDI.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

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

81 char int_p_sign_posn;
82 char int_n_sign_posn;
83};
84.Ed
85.Pp
86The individual fields have the following meanings:
87.Pp
88.Bl -tag -width mon_decimal_point
1.\" Copyright (c) 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Donn Seeley at BSDI.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

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

81 char int_p_sign_posn;
82 char int_n_sign_posn;
83};
84.Ed
85.Pp
86The individual fields have the following meanings:
87.Pp
88.Bl -tag -width mon_decimal_point
89.It Fa decimal_point
89.It Va decimal_point
90The decimal point character, except for currency values,
91cannot be an empty string.
90The decimal point character, except for currency values,
91cannot be an empty string.
92.It Fa thousands_sep
92.It Va thousands_sep
93The separator between groups of digits
94before the decimal point, except for currency values.
93The separator between groups of digits
94before the decimal point, except for currency values.
95.It Fa grouping
95.It Va grouping
96The sizes of the groups of digits, except for currency values.
97This is a pointer to a vector of integers, each of size
96The sizes of the groups of digits, except for currency values.
97This is a pointer to a vector of integers, each of size
98.Va char ,
98.Vt char ,
99representing group size from low order digit groups
100to high order (right to left).
101The list may be terminated with 0 or
102.Dv CHAR_MAX .
103If the list is terminated with 0,
104the last group size before the 0 is repeated to account for all the digits.
105If the list is terminated with
106.Dv CHAR_MAX ,
107no more grouping is performed.
99representing group size from low order digit groups
100to high order (right to left).
101The list may be terminated with 0 or
102.Dv CHAR_MAX .
103If the list is terminated with 0,
104the last group size before the 0 is repeated to account for all the digits.
105If the list is terminated with
106.Dv CHAR_MAX ,
107no more grouping is performed.
108.It Fa int_curr_symbol
108.It Va int_curr_symbol
109The standardized international currency symbol.
109The standardized international currency symbol.
110.It Fa currency_symbol
110.It Va currency_symbol
111The local currency symbol.
111The local currency symbol.
112.It Fa mon_decimal_point
112.It Va mon_decimal_point
113The decimal point character for currency values.
113The decimal point character for currency values.
114.It Fa mon_thousands_sep
114.It Va mon_thousands_sep
115The separator for digit groups in currency values.
115The separator for digit groups in currency values.
116.It Fa mon_grouping
116.It Va mon_grouping
117Like
117Like
118.Fa grouping
118.Va grouping
119but for currency values.
119but for currency values.
120.It Fa positive_sign
120.It Va positive_sign
121The character used to denote nonnegative currency values,
122usually the empty string.
121The character used to denote nonnegative currency values,
122usually the empty string.
123.It Fa negative_sign
123.It Va negative_sign
124The character used to denote negative currency values,
125usually a minus sign.
124The character used to denote negative currency values,
125usually a minus sign.
126.It Fa int_frac_digits
126.It Va int_frac_digits
127The number of digits after the decimal point
128in an international-style currency value.
127The number of digits after the decimal point
128in an international-style currency value.
129.It Fa frac_digits
129.It Va frac_digits
130The number of digits after the decimal point
131in the local style for currency values.
130The number of digits after the decimal point
131in the local style for currency values.
132.It Fa p_cs_precedes
132.It Va p_cs_precedes
1331 if the currency symbol precedes the currency value
134for nonnegative values, 0 if it follows.
1331 if the currency symbol precedes the currency value
134for nonnegative values, 0 if it follows.
135.It Fa p_sep_by_space
135.It Va p_sep_by_space
1361 if a space is inserted between the currency symbol
137and the currency value for nonnegative values, 0 otherwise.
1361 if a space is inserted between the currency symbol
137and the currency value for nonnegative values, 0 otherwise.
138.It Fa n_cs_precedes
138.It Va n_cs_precedes
139Like
139Like
140.Fa p_cs_precedes
140.Va p_cs_precedes
141but for negative values.
141but for negative values.
142.It Fa n_sep_by_space
142.It Va n_sep_by_space
143Like
143Like
144.Fa p_sep_by_space
144.Va p_sep_by_space
145but for negative values.
145but for negative values.
146.It Fa p_sign_posn
146.It Va p_sign_posn
147The location of the
147The location of the
148.Fa positive_sign
148.Va positive_sign
149with respect to a nonnegative quantity and the
149with respect to a nonnegative quantity and the
150.Fa currency_symbol ,
150.Va currency_symbol ,
151coded as follows:
151coded as follows:
152.Pp
152.Bl -tag -width 3n -compact
153.It Li 0
154Parentheses around the entire string.
155.It Li 1
156Before the string.
157.It Li 2
158After the string.
159.It Li 3
160Just before
153.Bl -tag -width 3n -compact
154.It Li 0
155Parentheses around the entire string.
156.It Li 1
157Before the string.
158.It Li 2
159After the string.
160.It Li 3
161Just before
161.Fa currency_symbol .
162.Va currency_symbol .
162.It Li 4
163Just after
163.It Li 4
164Just after
164.Fa currency_symbol .
165.Va currency_symbol .
165.El
166.El
166.It Fa n_sign_posn
167.It Va n_sign_posn
167Like
168Like
168.Fa p_sign_posn
169.Va p_sign_posn
169but for negative currency values.
170but for negative currency values.
170.It Fa int_p_cs_precedes
171.It Va int_p_cs_precedes
171Same as
172Same as
172.Fa p_cs_precedes ,
173.Va p_cs_precedes ,
173but for internationally formatted monetary quantities.
174but for internationally formatted monetary quantities.
174.It Fa int_n_cs_precedes
175.It Va int_n_cs_precedes
175Same as
176Same as
176.Fa n_cs_precedes ,
177.Va n_cs_precedes ,
177but for internationally formatted monetary quantities.
178but for internationally formatted monetary quantities.
178.It Fa int_p_sep_by_space
179.It Va int_p_sep_by_space
179Same as
180Same as
180.Fa p_sep_by_space ,
181.Va p_sep_by_space ,
181but for internationally formatted monetary quantities.
182but for internationally formatted monetary quantities.
182.It Fa int_n_sep_by_space
183.It Va int_n_sep_by_space
183Same as
184Same as
184.Fa n_sep_by_space ,
185.Va n_sep_by_space ,
185but for internationally formatted monetary quantities.
186but for internationally formatted monetary quantities.
186.It Fa int_p_sign_posn
187.It Va int_p_sign_posn
187Same as
188Same as
188.Fa p_sign_posn ,
189.Va p_sign_posn ,
189but for internationally formatted monetary quantities.
190but for internationally formatted monetary quantities.
190.It Fa int_n_sign_posn
191.It Va int_n_sign_posn
191Same as
192Same as
192.Fa n_sign_posn ,
193.Va n_sign_posn ,
193but for internationally formatted monetary quantities.
194.El
195.Pp
196Unless mentioned above,
197an empty string as a value for a field
198indicates a zero length result or
199a value that is not in the current locale.
200A
201.Dv CHAR_MAX
202result similarly denotes an unavailable value.
203.Sh RETURN VALUES
204The
205.Fn localeconv
206function returns a pointer to a static object
207which may be altered by later calls to
194but for internationally formatted monetary quantities.
195.El
196.Pp
197Unless mentioned above,
198an empty string as a value for a field
199indicates a zero length result or
200a value that is not in the current locale.
201A
202.Dv CHAR_MAX
203result similarly denotes an unavailable value.
204.Sh RETURN VALUES
205The
206.Fn localeconv
207function returns a pointer to a static object
208which may be altered by later calls to
208.Fn setlocale
209.Xr setlocale 3
209or
210.Fn localeconv .
211.Sh ERRORS
212No errors are defined.
213.Sh SEE ALSO
214.Xr setlocale 3 ,
215.Xr strfmon 3
216.Sh STANDARDS
217The
218.Fn localeconv
219function conforms to
220.St -isoC-99 .
221.Sh HISTORY
222The
223.Fn localeconv
224function first appeared in
225.Bx 4.4 .
210or
211.Fn localeconv .
212.Sh ERRORS
213No errors are defined.
214.Sh SEE ALSO
215.Xr setlocale 3 ,
216.Xr strfmon 3
217.Sh STANDARDS
218The
219.Fn localeconv
220function conforms to
221.St -isoC-99 .
222.Sh HISTORY
223The
224.Fn localeconv
225function first appeared in
226.Bx 4.4 .