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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [isoinfra/] [v2_0/] [include/] [locale.h] - Blame information for rev 403

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

Line No. Rev Author Line
1 27 unneback
#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 Red Hat, 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 version.
18
//
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
22
// for more details.
23
//
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.
27
//
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.
34
//
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.
37
//
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####
44
//
45
// Author(s):     jlarmour
46
// Contributors:
47
// Date:          2000-04-14
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>
53
//
54
//####DESCRIPTIONEND####
55
//
56
//======================================================================
57
*/
58
 
59
/* CONFIGURATION */
60
 
61
#include <pkgconf/isoinfra.h>          /* Configuration header */
62
 
63
/* INCLUDES */
64
 
65
/* This is the "standard" way to get NULL from stddef.h,
66
 * which is the canonical location of the definitions.
67
 */
68
#define __need_NULL
69
#include <stddef.h>
70
 
71
#if CYGINT_ISO_LOCALE
72
# ifdef CYGBLD_ISO_LOCALE_HEADER
73
#  include CYGBLD_ISO_LOCALE_HEADER
74
# else
75
 
76
/* TYPE DEFINITIONS */
77
 
78
/* struct lconv contains information about numeric and monetary numbers
79
 * and is described in the ISO C standard section 7.4 */
80
 
81
struct lconv {
82
 
83
    /* the following affect formatted NONMONETARY QUANTITIES only */
84
    char *decimal_point;    /* decimal point                                */
85
    char *thousands_sep;    /* separates groups of digits before decimal
86
                               point                                        */
87
    char *grouping;         /* string whose elements indicate the size      */
88
                            /* of each group of digits                      */
89
 
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.
108
                                Otherwise 0.                                */
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.
113
                                Otherwise 0.                                */
114
    char p_sign_posn;        /* set according to position of positive_sign  */
115
    char n_sign_posn;        /* set according to position of negative_sign  */
116
};
117
 
118
/* CONSTANTS */
119
 
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)
126
 
127
/* FUNCTION PROTOTYPES */
128
 
129
#ifdef __cplusplus
130
extern "C" {
131
#endif
132
 
133
extern char *
134
setlocale( int /* category */, const char * /* locale */ );
135
 
136
extern struct lconv *
137
localeconv( void );
138
 
139
#ifdef __cplusplus
140
} /* extern "C" */
141
#endif 
142
 
143
# endif /* #elif !defined(CYGBLD_ISO_LOCALE_HEADER) */
144
#endif /* CYGINT_ISO_LOCALE */
145
 
146
#endif /* CYGONCE_ISO_LOCALE_H multiple inclusion protection */
147
 
148
/* EOF locale.h */

powered by: WebSVN 2.1.0

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