OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [isoinfra/] [current/] [include/] [locale.h] - Blame information for rev 856

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_ISO_LOCALE_H
2
#define CYGONCE_ISO_LOCALE_H
3
/*========================================================================
4
//
5
//      locale.h
6
//
7
//      ISO locale functions
8
//
9
//========================================================================
10
// ####ECOSGPLCOPYRIGHTBEGIN####
11
// -------------------------------------------
12
// This file is part of eCos, the Embedded Configurable Operating System.
13
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
14
//
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
18
// version.
19
//
20
// eCos is distributed in the hope that it will be useful, but WITHOUT
21
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23
// for more details.
24
//
25
// You should have received a copy of the GNU General Public License
26
// along with eCos; if not, write to the Free Software Foundation, Inc.,
27
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
28
//
29
// As a special exception, if other files instantiate templates or use
30
// macros or inline functions from this file, or you compile this file
31
// and link it with other works to produce a work based on this file,
32
// this file does not by itself cause the resulting work to be covered by
33
// the GNU General Public License. However the source code for this file
34
// must still be made available in accordance with section (3) of the GNU
35
// General Public License v2.
36
//
37
// This exception does not invalidate any other reasons why a work based
38
// on this file might be covered by the GNU General Public License.
39
// -------------------------------------------
40
// ####ECOSGPLCOPYRIGHTEND####
41
//========================================================================
42
//#####DESCRIPTIONBEGIN####
43
//
44
// Author(s):     jlarmour
45
// Contributors:
46
// Date:          2000-04-14
47
// Purpose:       This file provides the locale functions required by
48
//                ISO C and POSIX 1003.1.
49
// Description:   The real contents of this file get set from the
50
//                configuration (set by the implementation)
51
// Usage:         #include <locale.h>
52
//
53
//####DESCRIPTIONEND####
54
//
55
//======================================================================
56
*/
57
 
58
/* CONFIGURATION */
59
 
60
#include <pkgconf/isoinfra.h>          /* Configuration header */
61
 
62
/* INCLUDES */
63
 
64
/* This is the "standard" way to get NULL from stddef.h,
65
 * which is the canonical location of the definitions.
66
 */
67
#define __need_NULL
68
#include <stddef.h>
69
 
70
#if CYGINT_ISO_LOCALE
71
# ifdef CYGBLD_ISO_LOCALE_HEADER
72
#  include CYGBLD_ISO_LOCALE_HEADER
73
# else
74
 
75
/* TYPE DEFINITIONS */
76
 
77
/* struct lconv contains information about numeric and monetary numbers
78
 * and is described in the ISO C standard section 7.4 */
79
 
80
struct lconv {
81
 
82
    /* the following affect formatted NONMONETARY QUANTITIES only */
83
    char *decimal_point;    /* decimal point                                */
84
    char *thousands_sep;    /* separates groups of digits before decimal
85
                               point                                        */
86
    char *grouping;         /* string whose elements indicate the size      */
87
                            /* of each group of digits                      */
88
 
89
    /* the following affect formatted MONETARY QUANTITIES only              */
90
    char *int_curr_symbol;   /* international curreny symbol                */
91
    char *currency_symbol;   /* local currency symbol                       */
92
    char *mon_decimal_point; /* decimal point                               */
93
    char *mon_thousands_sep; /* separator for groups of digits
94
                                before the decimal point                    */
95
    char *mon_grouping;      /* string whose elements indicate the size
96
                                of each group of digits                     */
97
    char *positive_sign;     /* string to indicate zero or positive value   */
98
    char *negative_sign;     /* string to indicate negative value           */
99
    char int_frac_digits;    /* number of digits after decimal point for
100
                                internationally formatted monetary nums     */
101
    char frac_digits;        /* number of digits after decimal point for
102
                                formatted monetary nums                     */
103
    char p_cs_precedes;      /* 1 if currency_symbol precedes non-negative
104
                                monetary quantity. 0 if succeeds            */
105
    char p_sep_by_space;     /* 1 if currency_symbol separated from value
106
                                of non-negative monetary quantity by space.
107
                                Otherwise 0.                                */
108
    char n_cs_precedes;      /* 1 if currency_symbol precedes negative
109
                                monetary quantity. 0 if succeeds            */
110
    char n_sep_by_space;     /* 1 if currency_symbol separated from value
111
                                of negative monetary quantity by space.
112
                                Otherwise 0.                                */
113
    char p_sign_posn;        /* set according to position of positive_sign  */
114
    char n_sign_posn;        /* set according to position of negative_sign  */
115
};
116
 
117
/* CONSTANTS */
118
 
119
#define LC_COLLATE  (1<<0)
120
#define LC_CTYPE    (1<<1)
121
#define LC_MONETARY (1<<2)
122
#define LC_NUMERIC  (1<<3)
123
#define LC_TIME     (1<<4)
124
#define LC_ALL      (LC_COLLATE|LC_CTYPE|LC_MONETARY|LC_NUMERIC|LC_TIME)
125
 
126
/* FUNCTION PROTOTYPES */
127
 
128
#ifdef __cplusplus
129
extern "C" {
130
#endif
131
 
132
extern char *
133
setlocale( int /* category */, const char * /* locale */ );
134
 
135
extern struct lconv *
136
localeconv( void );
137
 
138
#ifdef __cplusplus
139
} /* extern "C" */
140
#endif 
141
 
142
# endif /* #elif !defined(CYGBLD_ISO_LOCALE_HEADER) */
143
#endif /* CYGINT_ISO_LOCALE */
144
 
145
#endif /* CYGONCE_ISO_LOCALE_H multiple inclusion protection */
146
 
147
/* EOF locale.h */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.