home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue2 / SDL.ARC / !unixlib / source / clib / h / locale < prev    next >
Encoding:
Text File  |  2004-09-15  |  4.0 KB  |  114 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/clib/locale.h,v $
  4.  * $Date: 2004/04/12 13:03:37 $
  5.  * $Revision: 1.4 $
  6.  * $State: Exp $
  7.  * $Author: nick $
  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 <unixlib/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. /* Sets the current locale for category 'category' to 'locale'.
  42.  
  43.    If 'category' is 'LC_ALL', this specifies the locale for
  44.    all purposes. The other possible values of 'category' specify
  45.    an individual purpose.  */
  46. extern char *setlocale (int __category, const char *__locale) __THROW;
  47.  
  48. struct lconv
  49. {
  50.   /* Decimal-point separators used in formatting non-monetary quantities.  */
  51.   char *decimal_point;
  52.   /* Separators used to delimit groups of digits to the left of the
  53.      decimal point in formatting non-monetary quantities.  */
  54.   char *thousands_sep;
  55.   /* A string that specifies how to group the digits to the left
  56.      of the decimal point for non-monetary quantities.  */
  57.   char *grouping;
  58.   /* The international currency symbol for the selected locale.  */
  59.   char *int_curr_symbol;
  60.   /* The local currency symbol for the selected locale.  */
  61.   char *currency_symbol;
  62.   /* Decimal-point separators used in formatting monetary quantities.  */
  63.   char *mon_decimal_point;
  64.   /* Separators used to delimit groups of digits to the left of the
  65.      decimal point in formatting monetary quantities.  */
  66.   char *mon_thousands_sep;
  67.   /* A string that specifies how to group the digits to the left
  68.      of the decimal point for monetary quantities.  */
  69.   char *mon_grouping;
  70.   /* String used to indicate positive (or zero) monetary quantities.  */
  71.   char *positive_sign;
  72.   /* String used to indicate negative monetary quantities.  */
  73.   char *negative_sign;
  74.   /* Small integers indicating how many fractional digits should
  75.      be displayed in a monetary value in international (int_frac_digits)
  76.      and local formats (frac_digits).  */
  77.   char int_frac_digits;
  78.   char frac_digits;
  79.   /* Set to 1 is the 'currency_symbol' string should precede the
  80.      value of a monetary amount, 0 if the string should follow the value.  */
  81.   char p_cs_precedes;
  82.   /* Set to 1 if a space should appear between the 'currency_symbol'
  83.      string and the amount, 0 if no space should appear.  */
  84.   char p_sep_by_space;
  85.   /* Set to 1 is the 'currency_symbol' string should precede the
  86.      value of a monetary amount, 0 if the string should follow the value.  */
  87.   char n_cs_precedes;
  88.   /* Set to 1 if a space should appear between the 'currency_symbol'
  89.      string and the amount, 0 if no space should appear.  */
  90.   char n_sep_by_space;
  91.   /* Indicate how to position the sign for non-negative monetary quantities.  */
  92.   char p_sign_posn;
  93.   /* Indicate how to position the sign for negative monetary quantities.  */
  94.   char n_sign_posn;
  95. };
  96.  
  97. /* Set the lconv structure with the current locale settings.  */
  98. extern struct lconv *localeconv (void) __THROW;
  99.  
  100. #ifdef __UNIXLIB_INTERNALS
  101. /* Territory number for each locale.  C locale is -1.  */
  102. extern int __locale_territory[LC_ALL + 1];
  103.  
  104. /* Set to 1 is setlocale has been called since the last call to
  105.    localeconv. localeconv uses this flag to cache the lconv structure.  */
  106. extern int __setlocale_called;
  107.  
  108. extern void __build_ctype_tables (int __territory) __THROW;
  109. #endif
  110.  
  111. __END_DECLS
  112.  
  113. #endif
  114.