Mercurial > ecos-v2_0-branch
annotate packages/language/c/libc/current/include/locale.h @ 66:bf00f99aec69 ecos-sw-2000-02-02
Merge from eCos master repository on 2000-02-02-19:16:44-GMT
| author | jlarmour |
|---|---|
| date | Wed, 02 Feb 2000 19:57:02 +0000 |
| parents | c38311975d4f |
| children |
| rev | line source |
|---|---|
| 0 | 1 #ifndef CYGONCE_LIBC_LOCALE_H |
| 2 #define CYGONCE_LIBC_LOCALE_H | |
| 3 //======================================================================== | |
| 4 // | |
| 5 // locale.h | |
| 6 // | |
| 7 // Standard ISO C internationalisation (i18n) and localisation (i10n) | |
| 8 // | |
| 9 //======================================================================== | |
| 10 //####COPYRIGHTBEGIN#### | |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
11 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
12 // ------------------------------------------- |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
13 // The contents of this file are subject to the Red Hat eCos Public License |
|
66
bf00f99aec69
Merge from eCos master repository on 2000-02-02-19:16:44-GMT
jlarmour
parents:
64
diff
changeset
|
14 // Version 1.1 (the "License"); you may not use this file except in |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
15 // compliance with the License. You may obtain a copy of the License at |
|
66
bf00f99aec69
Merge from eCos master repository on 2000-02-02-19:16:44-GMT
jlarmour
parents:
64
diff
changeset
|
16 // http://www.redhat.com/ |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
17 // |
|
66
bf00f99aec69
Merge from eCos master repository on 2000-02-02-19:16:44-GMT
jlarmour
parents:
64
diff
changeset
|
18 // Software distributed under the License is distributed on an "AS IS" |
|
64
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
19 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
20 // License for the specific language governing rights and limitations under |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
21 // the License. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
22 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
23 // The Original Code is eCos - Embedded Configurable Operating System, |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
24 // released September 30, 1998. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
25 // |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
26 // The Initial Developer of the Original Code is Red Hat. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
27 // Portions created by Red Hat are |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
28 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
29 // All Rights Reserved. |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
30 // ------------------------------------------- |
|
c38311975d4f
Merge from eCos master repository on 2000-01-28-04:28:11-GMT
jlarmour
parents:
2
diff
changeset
|
31 // |
| 0 | 32 //####COPYRIGHTEND#### |
| 33 //======================================================================== | |
| 34 //#####DESCRIPTIONBEGIN#### | |
| 35 // | |
| 2 | 36 // Author(s): jlarmour |
| 37 // Contributors: jlarmour | |
| 0 | 38 // Date: 1998-08-31 |
| 39 // Purpose: | |
| 40 // Description: This implementation is designed to implement the contents | |
| 41 // of ISO C section 7.4 | |
| 42 // Usage: #include <locale.h> | |
| 43 // | |
| 44 //####DESCRIPTIONEND#### | |
| 45 // | |
| 46 //======================================================================== | |
| 47 | |
| 48 // CONFIGURATION | |
| 49 | |
| 50 #include <pkgconf/libc.h> // Configuration header | |
| 51 | |
| 52 // Include the C library? | |
| 53 #ifdef CYGPKG_LIBC | |
| 54 | |
| 55 // INCLUDES | |
| 56 | |
| 57 #include <cyg/infra/cyg_type.h> // Common type definitions and support | |
| 58 #include <stddef.h> // locale.h must provide NULL | |
| 59 | |
| 60 // TYPE DEFINITIONS | |
| 61 | |
| 62 // struct lconv contains information about numeric and monetary numbers | |
| 63 // and is described in the ISO C standard section 7.4 | |
| 64 | |
| 65 struct lconv { | |
| 66 | |
| 67 // the following affect formatted NONMONETARY QUANTITIES only | |
| 68 char *decimal_point; // decimal point | |
| 69 char *thousands_sep; // separates groups of digits before decimal | |
| 70 // point | |
| 71 char *grouping; // string whose elements indicate the size | |
| 72 // of each group of digits | |
| 73 | |
| 74 // the following affect formatted MONETARY QUANTITIES only | |
| 75 char *int_curr_symbol; // international curreny symbol | |
| 76 char *currency_symbol; // local currency symbol | |
| 77 char *mon_decimal_point; // decimal point | |
| 78 char *mon_thousands_sep; // separator for groups of digits | |
| 79 // before the decimal point | |
| 80 char *mon_grouping; // string whose elements indicate the size | |
| 81 // of each group of digits | |
| 82 char *positive_sign; // string to indicate zero or positive value | |
| 83 char *negative_sign; // string to indicate negative value | |
| 84 char int_frac_digits; // number of digits after decimal point for | |
| 85 // internationally formatted monetary nums | |
| 86 char frac_digits; // number of digits after decimal point for | |
| 87 // formatted monetary nums | |
| 88 char p_cs_precedes; // 1 if currency_symbol precedes non-negative | |
| 89 // monetary quantity. 0 if succeeds | |
| 90 char p_sep_by_space; // 1 if currency_symbol separated from value | |
| 91 // of non-negative monetary quantity by space. | |
| 92 // Otherwise 0. | |
| 93 char n_cs_precedes; // 1 if currency_symbol precedes negative | |
| 94 // monetary quantity. 0 if succeeds | |
| 95 char n_sep_by_space; // 1 if currency_symbol separated from value | |
| 96 // of negative monetary quantity by space. | |
| 97 // Otherwise 0. | |
| 98 char p_sign_posn; // set according to position of positive_sign | |
| 99 char n_sign_posn; // set according to position of negative_sign | |
| 100 }; | |
| 101 | |
| 102 // CONSTANTS | |
| 103 | |
| 104 #define LC_COLLATE (1<<0) | |
| 105 #define LC_CTYPE (1<<1) | |
| 106 #define LC_MONETARY (1<<2) | |
| 107 #define LC_NUMERIC (1<<3) | |
| 108 #define LC_TIME (1<<4) | |
| 109 #define LC_ALL (LC_COLLATE|LC_CTYPE|LC_MONETARY|LC_NUMERIC|LC_TIME) | |
| 110 | |
| 111 // FUNCTION PROTOTYPES | |
| 112 | |
| 113 externC char * | |
| 114 setlocale( int /* category */, const char * /* locale */ ); | |
| 115 | |
| 116 externC struct lconv * | |
| 117 localeconv( void ); | |
| 118 | |
| 119 | |
| 120 #endif // ifdef CYGPKG_LIBC | |
| 121 | |
| 122 #endif // CYGONCE_LIBC_LOCALE_H multiple inclusion protection | |
| 123 | |
| 124 // EOF locale.h |
