home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue6 / SDL.ZIP / !gcc / include / unixlib / h / locale < prev    next >
Encoding:
Text File  |  2006-09-17  |  4.0 KB  |  118 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/clib/locale.h,v $
  4.  * $Date: 2004/10/17 16:24:43 $
  5.  * $Revision: 1.5 $
  6.  * $State: Exp $
  7.  * $Author: joty $
  8.  *
  9.  ***************************************************************************/
  10.  
  11. /* ANSI Standard 4.4: Localisation <locale.h> */
  12.  
  13. #ifndef    __LOCALE_H
  14. #define    __LOCALE_H 1
  15.  
  16. #ifndef __UNIXLIB_FEATURES_H
  17. #include <features.h>
  18. #endif
  19.  
  20. __BEGIN_DECLS
  21.  
  22. /* Locale information types.
  23.    If you change these values, then you better fix setlocale().  */
  24.  
  25. /* String collation (functions 'strcoll' and 'strxfrm').  */
  26. #define LC_COLLATE 0
  27. /* Classification and conversion of characters, multibyte and
  28.    wide characters.  */
  29. #define LC_CTYPE 1
  30. /* Localisable natural-language messages.  */
  31. #define LC_MESSAGES 2
  32. /* Formatting of monetary values.  */
  33. #define LC_MONETARY 3
  34. /* Formatting of numeric values that are not monetary. */
  35. #define LC_NUMERIC 4
  36. /* Formatting of data and time values.  */
  37. #define LC_TIME 5
  38. /* Entire locale.  */
  39. #define LC_ALL 6
  40.  
  41. struct lconv
  42. {
  43.   /* Decimal-point separators used in formatting non-monetary quantities.  */
  44.   char *decimal_point;
  45.   /* Separators used to delimit groups of digits to the left of the
  46.      decimal point in formatting non-monetary quantities.  */
  47.   char *thousands_sep;
  48.   /* A string that specifies how to group the digits to the left
  49.      of the decimal point for non-monetary quantities.  */
  50.   char *grouping;
  51.   /* The international currency symbol for the selected locale.  */
  52.   char *int_curr_symbol;
  53.   /* The local currency symbol for the selected locale.  */
  54.   char *currency_symbol;
  55.   /* Decimal-point separators used in formatting monetary quantities.  */
  56.   char *mon_decimal_point;
  57.   /* Separators used to delimit groups of digits to the left of the
  58.      decimal point in formatting monetary quantities.  */
  59.   char *mon_thousands_sep;
  60.   /* A string that specifies how to group the digits to the left
  61.      of the decimal point for monetary quantities.  */
  62.   char *mon_grouping;
  63.   /* String used to indicate positive (or zero) monetary quantities.  */
  64.   char *positive_sign;
  65.   /* String used to indicate negative monetary quantities.  */
  66.   char *negative_sign;
  67.   /* Small integers indicating how many fractional digits should
  68.      be displayed in a monetary value in international (int_frac_digits)
  69.      and local formats (frac_digits).  */
  70.   char int_frac_digits;
  71.   char frac_digits;
  72.   /* Set to 1 is the 'currency_symbol' string should precede the
  73.      value of a monetary amount, 0 if the string should follow the value.  */
  74.   char p_cs_precedes;
  75.   /* Set to 1 if a space should appear between the 'currency_symbol'
  76.      string and the amount, 0 if no space should appear.  */
  77.   char p_sep_by_space;
  78.   /* Set to 1 is the 'currency_symbol' string should precede the
  79.      value of a monetary amount, 0 if the string should follow the value.  */
  80.   char n_cs_precedes;
  81.   /* Set to 1 if a space should appear between the 'currency_symbol'
  82.      string and the amount, 0 if no space should appear.  */
  83.   char n_sep_by_space;
  84.   /* Indicate how to position the sign for non-negative monetary quantities.  */
  85.   char p_sign_posn;
  86.   /* Indicate how to position the sign for negative monetary quantities.  */
  87.   char n_sign_posn;
  88. };
  89.  
  90. __BEGIN_NAMESPACE_STD
  91.  
  92. /* Sets the current locale for category 'category' to 'locale'.
  93.  
  94.    If 'category' is 'LC_ALL', this specifies the locale for
  95.    all purposes. The other possible values of 'category' specify
  96.    an individual purpose.  */
  97. extern char *setlocale (int __category, const char *__locale) __THROW;
  98.  
  99. /* Set the lconv structure with the current locale settings.  */
  100. extern struct lconv *localeconv (void) __THROW;
  101.  
  102. __END_NAMESPACE_STD
  103.  
  104. #ifdef __UNIXLIB_INTERNALS
  105. /* Territory number for each locale.  C locale is -1.  */
  106. extern int __locale_territory[LC_ALL + 1];
  107.  
  108. /* Set to 1 is setlocale has been called since the last call to
  109.    localeconv. localeconv uses this flag to cache the lconv structure.  */
  110. extern int __setlocale_called;
  111.  
  112. extern void __build_ctype_tables (int __territory) __THROW;
  113. #endif
  114.  
  115. __END_DECLS
  116.  
  117. #endif
  118.