[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


Locale specification

The ANSI C Standard specifies that certain aspects of the C compiler are adaptable to different geographic locales. The locale.h header file provides facilities for handling different character sets and numeric and monetary formats. Metrowerks C supports only the "C" locale.

The lconv structure, defined in locale.h, specifies numeric and monetary formatting characteristics for converting numeric values to character strings. A call to localeconv() will return a pointer to an lconv structure containing the settings for the "C" locale Listing 15.1. An lconv member is assigned "CHAR_MAX" value if it is not applicable to the current locale.

lconv structure and contents returned by localeconv():
struct lconv {
	char    * decimal_point;
	char    * thousands_sep;
	char    * grouping;
	char    * int_curr_symbol;
	char    * currency_symbol;
	char    * mon_decimal_point;
	char    * mon_thousands_sep;
	char    * mon_grouping;
	char    * positive_sign;
	char    * negative_sign;
	char      int_frac_digits;
	char      frac_digits;
	char      p_cs_precedes;
	char      p_sep_by_space;
	char      n_cs_precedes;
	char      n_sep_by_space;
	char      p_sign_posn;
};


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 16, 2000