Modules |
Files |
Inheritance Tree |
Inheritance Graph |
Name Index |
Config
File: Synopsis/Parser/C++/occ/test.cc
1|
2| typedef struct __locale_struct
3| {
4|
5| struct locale_data *__locales[13];
6|
7|
8| const unsigned short int *__ctype_b;
9| const int *__ctype_tolower;
10| const int *__ctype_toupper;
11|
12|
13| const char *__names[13];
14| } *__locale_t;
15|
16|
17| extern __locale_t uselocale (__locale_t __dataset) throw ();
18|
19| namespace __gnu_cxx
20| {
21| extern "C" __typeof(uselocale) __uselocale;
22| }
23|
24|
25| namespace std
26| {
27| typedef __locale_t __c_locale;
28|
29| template<typename _Tv>
30| int
31| __convert_from_v(char* __out, const int __size, const char* __fmt,
32|
33| _Tv __v, const __c_locale& __cloc, int __prec = -1)
34| {
35| __c_locale __old = __gnu_cxx::__uselocale(__cloc);
36| int __ret;
37|
38| if (__prec >= 0)
39| __ret = snprintf(__out, __size, __fmt, __prec, __v);
40| else
41| __ret = snprintf(__out, __size, __fmt, __v);
42| __gnu_cxx::__uselocale(__old);
43|
44|
45|
46|
47| return __ret;
48| }
49| }