home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue2 / SDL.ARC / !gcc / include / libscl / h / locale < prev    next >
Encoding:
Text File  |  2004-09-05  |  3.2 KB  |  98 lines

  1. /* locale.h
  2.  
  3.    For use with the GNU compilers and the SharedCLibrary.
  4.    (c) Copyright 1997, Nick Burrett.  */
  5.  
  6. #ifndef __LOCALE_H
  7. #define __LOCALE_H
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12.  
  13. /* Locale information types.  */
  14.  
  15. /* String collation (functions 'strcoll' and 'strxfrm').  */
  16. #define LC_COLLATE 1
  17.  
  18. /* Classification and conversion of characters, multibyte and
  19.    wide characters.  */
  20. #define LC_CTYPE 2
  21.  
  22. /* Formatting of monetary values.  */
  23. #define LC_MONETARY 4
  24.  
  25. /* Formatting of numeric values that are not monetary. */
  26. #define LC_NUMERIC 8
  27.  
  28. /* Formatting of data and time values.  */
  29. #define LC_TIME 16
  30.  
  31. /* Entire locale.  */
  32. #define LC_ALL 31
  33.  
  34. /* Sets the current locale for category 'category' to 'locale'.
  35.  
  36.    If 'category' is 'LC_ALL', this specifies the locale for
  37.    all purposes. The other possible values of 'category' specify
  38.    an individual purpose.  */
  39. extern char *setlocale (int __category, const char *__locale);
  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. /* Set the lconv structure with the current locale settings.  */
  91. extern struct lconv *localeconv (void);
  92.  
  93. #ifdef __cplusplus
  94. }
  95. #endif
  96.  
  97. #endif
  98.