home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue4 / SDL / gcc346 / !gcc / include / libscl / h / locale < prev    next >
Encoding:
Text File  |  2006-09-17  |  4.6 KB  |  119 lines

  1. /* locale.h standard header for the RISC OS SharedCLibrary.
  2.    Copyright (c) 1997-2005 Nick Burrett
  3.    All rights reserved.
  4.  
  5.    Redistribution and use in source and binary forms, with or without
  6.    modification, are permitted provided that the following conditions
  7.    are met:
  8.    1. Redistributions of source code must retain the above copyright
  9.       notice, this list of conditions and the following disclaimer.
  10.    2. Redistributions in binary form must reproduce the above copyright
  11.       notice, this list of conditions and the following disclaimer in the
  12.       documentation and/or other materials provided with the distribution.
  13.    3. The name of the author may not be used to endorse or promote products
  14.       derived from this software without specific prior written permission.
  15.  
  16.    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  17.    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  18.    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  19.    IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  20.    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  21.    NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  22.    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  23.    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24.    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  25.    THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
  26.  
  27. #ifndef __LOCALE_H
  28. #define __LOCALE_H
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. /* Locale information types.  */
  35.  
  36. /* String collation (functions 'strcoll' and 'strxfrm').  */
  37. #define LC_COLLATE 1
  38.  
  39. /* Classification and conversion of characters, multibyte and
  40.    wide characters.  */
  41. #define LC_CTYPE 2
  42.  
  43. /* Formatting of monetary values.  */
  44. #define LC_MONETARY 4
  45.  
  46. /* Formatting of numeric values that are not monetary. */
  47. #define LC_NUMERIC 8
  48.  
  49. /* Formatting of data and time values.  */
  50. #define LC_TIME 16
  51.  
  52. /* Entire locale.  */
  53. #define LC_ALL 31
  54.  
  55. /* Sets the current locale for category 'category' to 'locale'.
  56.  
  57.    If 'category' is 'LC_ALL', this specifies the locale for
  58.    all purposes. The other possible values of 'category' specify
  59.    an individual purpose.  */
  60. extern char *setlocale (int __category, const char *__locale);
  61.  
  62. struct lconv
  63. {
  64.   /* Decimal-point separators used in formatting non-monetary quantities.  */
  65.   char *decimal_point;
  66.   /* Separators used to delimit groups of digits to the left of the
  67.      decimal point in formatting non-monetary quantities.  */
  68.   char *thousands_sep;
  69.   /* A string that specifies how to group the digits to the left
  70.      of the decimal point for non-monetary quantities.  */
  71.   char *grouping;
  72.   /* The international currency symbol for the selected locale.  */
  73.   char *int_curr_symbol;
  74.   /* The local currency symbol for the selected locale.  */
  75.   char *currency_symbol;
  76.   /* Decimal-point separators used in formatting monetary quantities.  */
  77.   char *mon_decimal_point;
  78.   /* Separators used to delimit groups of digits to the left of the
  79.      decimal point in formatting monetary quantities.  */
  80.   char *mon_thousands_sep;
  81.   /* A string that specifies how to group the digits to the left
  82.      of the decimal point for monetary quantities.  */
  83.   char *mon_grouping;
  84.   /* String used to indicate positive (or zero) monetary quantities.  */
  85.   char *positive_sign;
  86.   /* String used to indicate negative monetary quantities.  */
  87.   char *negative_sign;
  88.   /* Small integers indicating how many fractional digits should
  89.      be displayed in a monetary value in international (int_frac_digits)
  90.      and local formats (frac_digits).  */
  91.   char int_frac_digits;
  92.   char frac_digits;
  93.   /* Set to 1 is the 'currency_symbol' string should precede the
  94.      value of a monetary amount, 0 if the string should follow the value.  */
  95.   char p_cs_precedes;
  96.   /* Set to 1 if a space should appear between the 'currency_symbol'
  97.      string and the amount, 0 if no space should appear.  */
  98.   char p_sep_by_space;
  99.   /* Set to 1 is the 'currency_symbol' string should precede the
  100.      value of a monetary amount, 0 if the string should follow the value.  */
  101.   char n_cs_precedes;
  102.   /* Set to 1 if a space should appear between the 'currency_symbol'
  103.      string and the amount, 0 if no space should appear.  */
  104.   char n_sep_by_space;
  105.   /* Indicate how to position the sign for non-negative monetary quantities.  */
  106.   char p_sign_posn;
  107.   /* Indicate how to position the sign for negative monetary quantities.  */
  108.   char n_sign_posn;
  109. };
  110.  
  111. /* Set the lconv structure with the current locale settings.  */
  112. extern struct lconv *localeconv (void);
  113.  
  114. #ifdef __cplusplus
  115. }
  116. #endif
  117.  
  118. #endif
  119.