home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / armlinux / alpha / PARTITIONS / USR_GZ / usr / include / locale.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-14  |  3.6 KB  |  99 lines

  1. /* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3.  
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public License as
  6. published by the Free Software Foundation; either version 2 of the
  7. License, or (at your option) any later version.
  8.  
  9. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12. Library General Public License for more details.
  13.  
  14. You should have received a copy of the GNU Library General Public
  15. License along with the GNU C Library; see the file COPYING.LIB.  If
  16. not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
  17. Cambridge, MA 02139, USA.  */
  18.  
  19. /*
  20.  *    ANSI Standard: 4.4 LOCALIZATION    <locale.h>
  21.  */
  22.  
  23. #ifndef    _LOCALE_H
  24.  
  25. #define    _LOCALE_H    1
  26. #include <features.h>
  27.  
  28. __BEGIN_DECLS
  29.  
  30. /* These are the possibilities for the first argument to setlocale.
  31.    Note that although they are bit masks, they cannot be OR'd together
  32.    to form a new argument to pass.  They must be used one at a time.  */
  33. #define    LC_COLLATE    (1 << 0)
  34. #define    LC_CTYPE    (1 << 1)
  35. #define    LC_MONETARY    (1 << 2)
  36. #define    LC_NUMERIC    (1 << 3)
  37. #define    LC_TIME        (1 << 4)
  38. #define    LC_RESPONSE    (1 << 5)
  39. #define    LC_MESSAGES    (1 << 6)
  40. #define    LC_ALL        (LC_COLLATE|LC_CTYPE|LC_MONETARY|LC_NUMERIC|LC_TIME|\
  41.              LC_RESPONSE|LC_MESSAGES)
  42.  
  43.  
  44. /* Structure giving information about numeric and monetary notation.  */
  45. struct lconv
  46. {
  47.   /* Numeric (non-monetary) information.  */
  48.  
  49.   char *decimal_point;        /* Decimal point character.  */
  50.   char *thousands_sep;        /* Thousands separator.  */
  51.   /* Each element is the number of digits in each group;
  52.      elements with higher indices are farther left.
  53.      An element with value CHAR_MAX means that no further grouping is done.
  54.      An element with value 0 means that the previous element is used
  55.      for all groups farther left.  */
  56.   char *grouping;
  57.  
  58.   /* Monetary information.  */
  59.  
  60.   /* First three chars are a currency symbol from ISO 4217.
  61.      Fourth char is the separator.  Fifth char is '\0'.  */
  62.   char *int_curr_symbol;
  63.   char *currency_symbol;    /* Local currency symbol.  */
  64.   char *mon_decimal_point;    /* Decimal point character.  */
  65.   char *mon_thousands_sep;    /* Thousands separator.  */
  66.   char *mon_grouping;        /* Like `grouping' element (above).  */
  67.   char *positive_sign;        /* Sign for positive values.  */
  68.   char *negative_sign;        /* Sign for negative values.  */
  69.   char int_frac_digits;        /* Int'l fractional digits.  */
  70.   char frac_digits;        /* Local fractional digits.  */
  71.   /* 1 if currency_symbol precedes a positive value, 0 if succeeds.  */
  72.   char p_cs_precedes;
  73.   /* 1 iff a space separates currency_symbol from a positive value.  */
  74.   char p_sep_by_space;
  75.   /* 1 if currency_symbol precedes a negative value, 0 if succeeds.  */
  76.   char n_cs_precedes;
  77.   /* 1 iff a space separates currency_symbol from a negative value.  */
  78.   char n_sep_by_space;
  79.   /* Positive and negative sign positions:
  80.      0 Parentheses surround the quantity and currency_symbol.
  81.      1 The sign string precedes the quantity and currency_symbol.
  82.      2 The sign string succedes the quantity and currency_symbol.
  83.      3 The sign string immediately precedes the currency_symbol.
  84.      4 The sign string immediately succedes the currency_symbol.  */
  85.   char p_sign_posn;
  86.   char n_sign_posn;
  87. };
  88.  
  89.  
  90. /* Set and/or return the current locale.  */
  91. extern char *setlocale __P ((int __category, __const char *__locale));
  92.  
  93. /* Return the numeric/monetary information for the current locale.  */
  94. extern struct lconv *localeconv __P ((void));
  95.  
  96. __END_DECLS
  97.  
  98. #endif /* locale.h  */
  99.