sl@0: /* sl@0: * Copyright (c) 1999 sl@0: * Silicon Graphics Computer Systems, Inc. sl@0: * sl@0: * Copyright (c) 1999 sl@0: * Boris Fomitchev sl@0: * sl@0: * This material is provided "as is", with absolutely no warranty expressed sl@0: * or implied. Any use is at your own risk. sl@0: * sl@0: * Permission to use or copy this software for any purpose is hereby granted sl@0: * without fee, provided the above notices are retained on all copies. sl@0: * Permission to modify the code and to distribute modified code is granted, sl@0: * provided the above notices are retained, and a notice that the code was sl@0: * modified is included with the above copyright notice. sl@0: * sl@0: */ sl@0: # include "stlport_prefix.h" sl@0: #include "c_locale.h" sl@0: #include sl@0: sl@0: # ifdef _STLP_REAL_LOCALE_IMPLEMENTED sl@0: sl@0: // here, we'll put C locale implementation for those compilers where sl@0: // it has to be done in C++ sl@0: sl@0: # else sl@0: sl@0: /* This is a "stub" implementation of the "c_locale.h" interface, sl@0: intended for operating systems where we have not yet written sl@0: a real implementation. A C++ library using this stub implementation sl@0: is still standard-conforming, since the C++ standard does not require sl@0: that any locales other than "C" be supported. sl@0: */ sl@0: sl@0: /* Framework functions */ sl@0: sl@0: struct _Locale_ctype /* { } */ ; sl@0: struct _Locale_numeric /* { } */; sl@0: struct _Locale_time /* { } */; sl@0: struct _Locale_collate /*{ } */; sl@0: struct _Locale_monetary /* { } */; sl@0: struct _Locale_messages /* { } */; sl@0: sl@0: # ifdef __cplusplus sl@0: _STLP_BEGIN_NAMESPACE sl@0: extern "C" { sl@0: # define __DUMMY_PAR sl@0: # define __DUMMY_PAR1 sl@0: # define __DUMMY_PAR2 sl@0: # define __DUMMY_PAR3 sl@0: # define __DUMMY_PAR4 sl@0: # define __DUMMY_PAR5 sl@0: # define __DUMMY_PAR6 sl@0: # define __DUMMY_PAR7 sl@0: # define __DUMMY_PAR8 sl@0: # endif sl@0: sl@0: void* _Locale_ctype_create(const char * __DUMMY_PAR) sl@0: { return 0; } sl@0: void* _Locale_numeric_create(const char * __DUMMY_PAR) sl@0: { return 0; } sl@0: void*_Locale_time_create(const char * __DUMMY_PAR) sl@0: { return 0; } sl@0: void* _Locale_collate_create(const char *__DUMMY_PAR) sl@0: { return 0; } sl@0: void* _Locale_monetary_create(const char * __DUMMY_PAR) sl@0: { return 0; } sl@0: void* _Locale_messages_create(const char *__DUMMY_PAR) sl@0: { return 0; } sl@0: sl@0: const char* _Locale_ctype_default(char*) { return 0; } sl@0: const char* _Locale_numeric_default(char *) { return 0; } sl@0: const char* _Locale_time_default(char*) { return 0; } sl@0: const char* _Locale_collate_default(char*) { return 0; } sl@0: const char* _Locale_monetary_default(char*) { return 0; } sl@0: const char* _Locale_messages_default(char*) { return 0; } sl@0: sl@0: char* _Locale_ctype_name(const void* __DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: char* _Locale_numeric_name(const void* __DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: char* _Locale_time_name(const void* __DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: char* _Locale_collate_name(const void* __DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: char* _Locale_monetary_name(const void* __DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: char* _Locale_messages_name(const void* __DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: sl@0: void _Locale_ctype_destroy(void* __DUMMY_PAR) {} sl@0: void _Locale_numeric_destroy(void* __DUMMY_PAR) {} sl@0: void _Locale_time_destroy(void* __DUMMY_PAR) {} sl@0: void _Locale_collate_destroy(void* __DUMMY_PAR) {} sl@0: void _Locale_monetary_destroy(void* __DUMMY_PAR) {} sl@0: void _Locale_messages_destroy(void* __DUMMY_PAR) {} sl@0: sl@0: char* _Locale_extract_ctype_name(const char* __DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: char* _Locale_extract_numeric_name(const char*__DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: char* _Locale_extract_time_name(const char*__DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: char* _Locale_extract_collate_name(const char*__DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: char* _Locale_extract_monetary_name(const char*__DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: char* _Locale_extract_messages_name(const char*__DUMMY_PAR1, char* __DUMMY_PAR) sl@0: { return 0; } sl@0: sl@0: char* _Locale_compose_name(char*__DUMMY_PAR1, const char*__DUMMY_PAR2, const char*__DUMMY_PAR3, sl@0: const char*__DUMMY_PAR4, sl@0: const char*__DUMMY_PAR5, const char*__DUMMY_PAR6, const char*__DUMMY_PAR7, const char*__DUMMY_PAR8) sl@0: { return 0; } sl@0: sl@0: sl@0: /* ctype */ sl@0: sl@0: const _Locale_mask_t* _Locale_ctype_table(struct _Locale_ctype* __DUMMY_PAR) sl@0: { return 0; } sl@0: int _Locale_toupper(struct _Locale_ctype*__DUMMY_PAR1, int __DUMMY_PAR) { return 0; } sl@0: int _Locale_tolower(struct _Locale_ctype*__DUMMY_PAR1, int __DUMMY_PAR) { return 0; } sl@0: sl@0: # ifndef _STLP_NO_WCHAR_T sl@0: _Locale_mask_t _Locale_wchar_ctype(struct _Locale_ctype*__DUMMY_PAR1, wint_t __DUMMY_PAR2, _Locale_mask_t __DUMMY_PAR3) sl@0: { return 0; } sl@0: wint_t _Locale_wchar_tolower(struct _Locale_ctype*__DUMMY_PAR1, wint_t __DUMMY_PAR) sl@0: { return 0; } sl@0: wint_t _Locale_wchar_toupper(struct _Locale_ctype*__DUMMY_PAR1, wint_t __DUMMY_PAR) sl@0: { return 0; } sl@0: # endif sl@0: sl@0: # ifndef _STLP_NO_MBSTATE_T sl@0: sl@0: int _Locale_mb_cur_max (struct _Locale_ctype * __DUMMY_PAR) { return 0; } sl@0: int _Locale_mb_cur_min (struct _Locale_ctype * __DUMMY_PAR) { return 0; } sl@0: int _Locale_is_stateless (struct _Locale_ctype * __DUMMY_PAR) { return 1; } sl@0: #ifndef _STLP_NO_WCHAR_T sl@0: wint_t _Locale_btowc(struct _Locale_ctype * __DUMMY_PAR1, int __DUMMY_PAR) { return 0; } sl@0: int _Locale_wctob(struct _Locale_ctype * __DUMMY_PAR2, wint_t __DUMMY_PAR) { return 0; } sl@0: sl@0: size_t _Locale_mbtowc(struct _Locale_ctype *__DUMMY_PAR1, sl@0: wchar_t *__DUMMY_PAR2, sl@0: const char *__DUMMY_PAR3, size_t __DUMMY_PAR4, sl@0: mbstate_t *__DUMMY_PAR5) { sl@0: return (size_t) -1; sl@0: } sl@0: size_t _Locale_wctomb(struct _Locale_ctype *__DUMMY_PAR1, sl@0: char *__DUMMY_PAR2, size_t __DUMMY_PAR3, sl@0: const wchar_t __DUMMY_PAR4, sl@0: mbstate_t *__DUMMY_PAR5) { sl@0: return (size_t) -1; sl@0: } sl@0: # endif sl@0: sl@0: size_t _Locale_unshift(struct _Locale_ctype *__DUMMY_PAR1, sl@0: mbstate_t *__DUMMY_PAR2, sl@0: char *__DUMMY_PAR3, size_t __DUMMY_PAR4, char ** __DUMMY_PAR5) { sl@0: return (size_t) -1; sl@0: } sl@0: sl@0: # endif /* _STLP_NO_MBSTATE_T */ sl@0: sl@0: sl@0: /* Collate */ sl@0: int _Locale_strcmp(struct _Locale_collate* __DUMMY_PAR1, sl@0: const char* __DUMMY_PAR2, size_t __DUMMY_PAR3, const char* __DUMMY_PAR4, sl@0: size_t __DUMMY_PAR5) { sl@0: return 0; sl@0: } sl@0: sl@0: # ifndef _STLP_NO_WCHAR_T sl@0: sl@0: int _Locale_strwcmp(struct _Locale_collate* __DUMMY_PAR1, sl@0: const wchar_t* __DUMMY_PAR2, size_t __DUMMY_PAR3, sl@0: const wchar_t* __DUMMY_PAR4, size_t __DUMMY_PAR5) { sl@0: return 0; sl@0: } sl@0: sl@0: # endif sl@0: sl@0: size_t _Locale_strxfrm(struct _Locale_collate* __DUMMY_PAR1, sl@0: char* __DUMMY_PAR2, size_t __DUMMY_PAR3, sl@0: const char* __DUMMY_PAR4, size_t __DUMMY_PAR5) { sl@0: return 0; sl@0: } sl@0: sl@0: # ifndef _STLP_NO_WCHAR_T sl@0: sl@0: size_t _Locale_strwxfrm(struct _Locale_collate* __DUMMY_PAR1, sl@0: wchar_t* __DUMMY_PAR2, size_t __DUMMY_PAR3, sl@0: const wchar_t* __DUMMY_PAR4, size_t __DUMMY_PAR5) sl@0: { sl@0: return 0; sl@0: } sl@0: sl@0: # endif sl@0: sl@0: /* Numeric */ sl@0: sl@0: char _Locale_decimal_point(struct _Locale_numeric* __DUMMY_PAR) { return '.'; } sl@0: char _Locale_thousands_sep(struct _Locale_numeric* __DUMMY_PAR) { return ','; } sl@0: const char* _Locale_grouping(struct _Locale_numeric * __DUMMY_PAR) sl@0: { return ""; } sl@0: sl@0: const char * _Locale_true(struct _Locale_numeric * __DUMMY_PAR) { return 0; } sl@0: const char * _Locale_false(struct _Locale_numeric * __DUMMY_PAR) { return 0; } sl@0: sl@0: sl@0: /* Monetary */ sl@0: sl@0: const char* _Locale_int_curr_symbol(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return 0; } sl@0: const char* _Locale_currency_symbol(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return 0; } sl@0: char _Locale_mon_decimal_point(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return '.'; } sl@0: char _Locale_mon_thousands_sep(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return ','; } sl@0: const char* _Locale_mon_grouping(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return ""; } sl@0: const char* _Locale_positive_sign(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return ""; } sl@0: const char* _Locale_negative_sign(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return ""; } sl@0: char _Locale_int_frac_digits(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return CHAR_MAX; } sl@0: char _Locale_frac_digits(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return CHAR_MAX; } sl@0: int _Locale_p_cs_precedes(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return CHAR_MAX; } sl@0: int _Locale_p_sep_by_space(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return CHAR_MAX; } sl@0: int _Locale_p_sign_posn(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return CHAR_MAX; } sl@0: int _Locale_n_cs_precedes(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return CHAR_MAX; } sl@0: int _Locale_n_sep_by_space(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return CHAR_MAX; } sl@0: int _Locale_n_sign_posn(struct _Locale_monetary * __DUMMY_PAR) sl@0: { return CHAR_MAX; } sl@0: sl@0: sl@0: /* Time */ sl@0: const char * _Locale_full_monthname(struct _Locale_time * __DUMMY_PAR1, int __DUMMY_PAR2) sl@0: { return 0; } sl@0: const char * _Locale_abbrev_monthname(struct _Locale_time * __DUMMY_PAR1, int __DUMMY_PAR2) sl@0: { return 0; } sl@0: const char * _Locale_full_dayofweek(struct _Locale_time * __DUMMY_PAR1, int __DUMMY_PAR2) sl@0: { return 0; } sl@0: const char * _Locale_abbrev_dayofweek(struct _Locale_time * __DUMMY_PAR1, int __DUMMY_PAR2) sl@0: { return 0; } sl@0: sl@0: const char* _Locale_d_t_fmt(struct _Locale_time* __DUMMY_PAR) { return 0; } sl@0: const char* _Locale_d_fmt(struct _Locale_time* __DUMMY_PAR) { return 0; } sl@0: const char* _Locale_t_fmt(struct _Locale_time* __DUMMY_PAR) { return 0; } sl@0: const char* _Locale_long_d_t_fmt(struct _Locale_time* __DUMMY_PAR){ return 0; } sl@0: const char* _Locale_long_d_fmt(struct _Locale_time* __DUMMY_PAR) { return 0; } sl@0: const char* _Locale_am_str(struct _Locale_time* __DUMMY_PAR) { return 0; } sl@0: const char* _Locale_pm_str(struct _Locale_time* __DUMMY_PAR) { return 0; } sl@0: const char* _Locale_t_fmt_ampm(struct _Locale_time* __DUMMY_PAR) { return 0; } sl@0: sl@0: /* Messages */ sl@0: sl@0: int _Locale_catopen(struct _Locale_messages* __DUMMY_PAR1, const char* __DUMMY_PAR) sl@0: { return -1; } sl@0: void _Locale_catclose(struct _Locale_messages* __DUMMY_PAR1, int __DUMMY_PAR) {} sl@0: const char* _Locale_catgets(struct _Locale_messages* __DUMMY_PAR1, int __DUMMY_PAR2, sl@0: int __DUMMY_PAR3, int __DUMMY_PAR4, sl@0: const char *dfault) sl@0: { return dfault; } sl@0: sl@0: #ifdef __cplusplus sl@0: } /* extern C */ sl@0: _STLP_END_NAMESPACE sl@0: #endif sl@0: sl@0: #endif /* real locale */