1 #ifndef CYGONCE_ISO_LOCALE_H
2 #define CYGONCE_ISO_LOCALE_H
3 /*========================================================================
7 // ISO locale functions
9 //========================================================================
10 //####ECOSGPLCOPYRIGHTBEGIN####
11 // -------------------------------------------
12 // This file is part of eCos, the Embedded Configurable Operating System.
13 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15 // eCos is free software; you can redistribute it and/or modify it under
16 // the terms of the GNU General Public License as published by the Free
17 // Software Foundation; either version 2 or (at your option) any later version.
19 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 // You should have received a copy of the GNU General Public License along
25 // with eCos; if not, write to the Free Software Foundation, Inc.,
26 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28 // As a special exception, if other files instantiate templates or use macros
29 // or inline functions from this file, or you compile this file and link it
30 // with other works to produce a work based on this file, this file does not
31 // by itself cause the resulting work to be covered by the GNU General Public
32 // License. However the source code for this file must still be made available
33 // in accordance with section (3) of the GNU General Public License.
35 // This exception does not invalidate any other reasons why a work based on
36 // this file might be covered by the GNU General Public License.
38 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
39 // at http://sources.redhat.com/ecos/ecos-license/
40 // -------------------------------------------
41 //####ECOSGPLCOPYRIGHTEND####
42 //========================================================================
43 //#####DESCRIPTIONBEGIN####
45 // Author(s): jlarmour
48 // Purpose: This file provides the locale functions required by
49 // ISO C and POSIX 1003.1.
50 // Description: The real contents of this file get set from the
51 // configuration (set by the implementation)
52 // Usage: #include <locale.h>
54 //####DESCRIPTIONEND####
56 //======================================================================
61 #include <pkgconf/isoinfra.h> /* Configuration header */
65 /* This is the "standard" way to get NULL from stddef.h,
66 * which is the canonical location of the definitions.
72 # ifdef CYGBLD_ISO_LOCALE_HEADER
73 # include CYGBLD_ISO_LOCALE_HEADER
76 /* TYPE DEFINITIONS */
78 /* struct lconv contains information about numeric and monetary numbers
79 * and is described in the ISO C standard section 7.4 */
83 /* the following affect formatted NONMONETARY QUANTITIES only */
84 char *decimal_point; /* decimal point */
85 char *thousands_sep; /* separates groups of digits before decimal
87 char *grouping; /* string whose elements indicate the size */
88 /* of each group of digits */
90 /* the following affect formatted MONETARY QUANTITIES only */
91 char *int_curr_symbol; /* international curreny symbol */
92 char *currency_symbol; /* local currency symbol */
93 char *mon_decimal_point; /* decimal point */
94 char *mon_thousands_sep; /* separator for groups of digits
95 before the decimal point */
96 char *mon_grouping; /* string whose elements indicate the size
97 of each group of digits */
98 char *positive_sign; /* string to indicate zero or positive value */
99 char *negative_sign; /* string to indicate negative value */
100 char int_frac_digits; /* number of digits after decimal point for
101 internationally formatted monetary nums */
102 char frac_digits; /* number of digits after decimal point for
103 formatted monetary nums */
104 char p_cs_precedes; /* 1 if currency_symbol precedes non-negative
105 monetary quantity. 0 if succeeds */
106 char p_sep_by_space; /* 1 if currency_symbol separated from value
107 of non-negative monetary quantity by space.
109 char n_cs_precedes; /* 1 if currency_symbol precedes negative
110 monetary quantity. 0 if succeeds */
111 char n_sep_by_space; /* 1 if currency_symbol separated from value
112 of negative monetary quantity by space.
114 char p_sign_posn; /* set according to position of positive_sign */
115 char n_sign_posn; /* set according to position of negative_sign */
120 #define LC_COLLATE (1<<0)
121 #define LC_CTYPE (1<<1)
122 #define LC_MONETARY (1<<2)
123 #define LC_NUMERIC (1<<3)
124 #define LC_TIME (1<<4)
125 #define LC_ALL (LC_COLLATE|LC_CTYPE|LC_MONETARY|LC_NUMERIC|LC_TIME)
127 /* FUNCTION PROTOTYPES */
134 setlocale( int /* category */, const char * /* locale */ );
136 extern struct lconv *
143 # endif /* #elif !defined(CYGBLD_ISO_LOCALE_HEADER) */
144 #endif /* CYGINT_ISO_LOCALE */
146 #endif /* CYGONCE_ISO_LOCALE_H multiple inclusion protection */