/home/ntakagi/work/STLport-5.1.5/src/c_locale_glibc/c_locale_glibc.c File Reference

#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stl/c_locale.h>
#include <limits.h>
#include <wctype.h>
#include <locale.h>
#include <argz.h>
#include "gcc_localeinfo.h"
#include <nl_types.h>

Go to the source code of this file.

Classes

struct  _Locale_ctype
struct  _Locale_numeric
struct  _Locale_time
struct  _Locale_collate
struct  _Locale_monetary
struct  _Locale_messages

Defines

#define __LOCALE_PATH   "/usr/share/locale"

Typedefs

typedef _Locale_ctype L_ctype_t
typedef _Locale_numeric L_numeric_t
typedef _Locale_time L_time_t
typedef _Locale_collate L_collate_t
typedef _Locale_monetary L_monetary_t
typedef _Locale_messages L_messages_t

Functions

wint_t btowc (int c)
int wctob (wint_t c)
size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
size_t mbrlen (const char *s, size_t n, mbstate_t *ps)
void _Locale_init ()
void _Locale_final ()
_Locale_name_hint_Locale_get_ctype_hint (struct _Locale_ctype *ctype)
_Locale_name_hint_Locale_get_numeric_hint (struct _Locale_numeric *numeric)
_Locale_name_hint_Locale_get_time_hint (struct _Locale_time *time)
_Locale_name_hint_Locale_get_collate_hint (struct _Locale_collate *collate)
_Locale_name_hint_Locale_get_monetary_hint (struct _Locale_monetary *monetary)
_Locale_name_hint_Locale_get_messages_hint (struct _Locale_messages *messages)
char const * _Locale_name (const struct locale_data *gcc_data, char *buf)
locale_data_Find_locale (char *locale_path, size_t locale_path_len, int category, char **name)
locale_data_Category_create (const char *name, int category)
const char * _Locale_ctype_default (char *buf)
const char * _Locale_numeric_default (char *buf)
const char * _Locale_time_default (char *buf)
const char * _Locale_collate_default (char *buf)
const char * _Locale_monetary_default (char *buf)
const char * _Locale_messages_default (char *buf)
void * _Locale_numeric_create (const char *name, struct _Locale_name_hint *hint)
char const * _Locale_numeric_name (const void *lnum, char *buf)
void _Locale_numeric_destroy (void *lnum)
char const * _Locale_extract_numeric_name (const char *cname, char *buf, struct _Locale_name_hint *hint)
char _Locale_decimal_point (struct _Locale_numeric *lnum)
char _Locale_thousands_sep (struct _Locale_numeric *lnum)
const char * _Locale_grouping (struct _Locale_numeric *lnum)
const char * _Locale_true (struct _Locale_numeric *l)
const char * _Locale_false (struct _Locale_numeric *l)
void * _Locale_monetary_create (const char *name, struct _Locale_name_hint *hint)
char const * _Locale_monetary_name (const void *lmon, char *buf)
void _Locale_monetary_destroy (void *lmon)
char const * _Locale_extract_monetary_name (const char *cname, char *buf, struct _Locale_name_hint *hint)
const char * _Locale_int_curr_symbol (struct _Locale_monetary *lmon)
const char * _Locale_currency_symbol (struct _Locale_monetary *lmon)
char _Locale_mon_decimal_point (struct _Locale_monetary *lmon)
char _Locale_mon_thousands_sep (struct _Locale_monetary *lmon)
const char * _Locale_mon_grouping (struct _Locale_monetary *lmon)
const char * _Locale_positive_sign (struct _Locale_monetary *lmon)
const char * _Locale_negative_sign (struct _Locale_monetary *lmon)
char _Locale_int_frac_digits (struct _Locale_monetary *lmon)
char _Locale_frac_digits (struct _Locale_monetary *lmon)
int _Locale_p_cs_precedes (struct _Locale_monetary *lmon)
int _Locale_p_sep_by_space (struct _Locale_monetary *lmon)
int _Locale_p_sign_posn (struct _Locale_monetary *lmon)
int _Locale_n_cs_precedes (struct _Locale_monetary *lmon)
int _Locale_n_sep_by_space (struct _Locale_monetary *lmon)
int _Locale_n_sign_posn (struct _Locale_monetary *lmon)
void * _Locale_time_create (const char *name, struct _Locale_name_hint *hint)
char const * _Locale_time_name (const void *ltime, char *buf)
char const * _Locale_extract_time_name (const char *cname, char *buf, struct _Locale_name_hint *hint)
void _Locale_time_destroy (void *ltime)
const char * _Locale_full_monthname (struct _Locale_time *ltime, int month)
const char * _Locale_abbrev_monthname (struct _Locale_time *ltime, int month)
const char * _Locale_full_dayofweek (struct _Locale_time *ltime, int day)
const char * _Locale_abbrev_dayofweek (struct _Locale_time *ltime, int day)
const char * _Locale_d_t_fmt (struct _Locale_time *ltime)
const char * _Locale_long_d_t_fmt (struct _Locale_time *ltime)
const char * _Locale_d_fmt (struct _Locale_time *ltime)
const char * _Locale_long_d_fmt (struct _Locale_time *ltime)
const char * _Locale_t_fmt (struct _Locale_time *ltime)
const char * _Locale_am_str (struct _Locale_time *ltime)
const char * _Locale_pm_str (struct _Locale_time *ltime)
const char * _Locale_t_fmt_ampm (struct _Locale_time *ltime)
void * _Locale_messages_create (const char *name, struct _Locale_name_hint *hint)
char const * _Locale_messages_name (const void *lmsg, char *buf)
void _Locale_messages_destroy (void *lmsg)
char const * _Locale_extract_messages_name (const char *cname, char *buf, struct _Locale_name_hint *hint)
int _Locale_catopen (struct _Locale_messages *l, const char *cat_name)
void _Locale_catclose (struct _Locale_messages *l, int catalog)
const char * _Locale_catgets (struct _Locale_messages *l, int catalog, int set_num, int msg_num, const char *dfault)
void * _Locale_ctype_create (const char *name, struct _Locale_name_hint *hint)
char const * _Locale_ctype_name (const void *lctype, char *buf)
void _Locale_ctype_destroy (void *lctype)
char const * _Locale_extract_ctype_name (const char *cname, char *buf, struct _Locale_name_hint *hint)
const _Locale_mask_t_Locale_ctype_table (struct _Locale_ctype *lctype)
int _Locale_toupper (struct _Locale_ctype *lctype, int c)
int _Locale_tolower (struct _Locale_ctype *lctype, int c)
_Locale_mask_t _Locale_wchar_ctype (struct _Locale_ctype *loc, wint_t wc, _Locale_mask_t which_bits)
wint_t __towctrans_ld (wint_t wc, wctrans_t desc, const struct locale_data *locale)
wint_t _Locale_wchar_tolower (struct _Locale_ctype *locale, wint_t wc)
wint_t _Locale_wchar_toupper (struct _Locale_ctype *locale, wint_t wc)
int _Locale_mb_cur_max (struct _Locale_ctype *lctype)
int _Locale_mb_cur_min (struct _Locale_ctype *l)
int _Locale_is_stateless (struct _Locale_ctype *l)
wint_t _Locale_btowc (struct _Locale_ctype *l, int c)
int _Locale_wctob (struct _Locale_ctype *l, wint_t c)
size_t _Locale_mbtowc (struct _Locale_ctype *l, wchar_t *to, const char *from, size_t n, mbstate_t *shift_state)
size_t _Locale_wctomb (struct _Locale_ctype *l, char *to, size_t n, const wchar_t c, mbstate_t *shift_state)
size_t _Locale_unshift (struct _Locale_ctype *l, mbstate_t *st, char *buf, size_t n, char **next)
void * _Locale_collate_create (const char *name, struct _Locale_name_hint *hint)
char const * _Locale_collate_name (const void *lcollate, char *buf)
void _Locale_collate_destroy (void *lcollate)
char const * _Locale_extract_collate_name (const char *cname, char *buf, struct _Locale_name_hint *hint)
char const * _Locale_compose_name (char *buf, const char *ctype, const char *numeric, const char *time, const char *collate, const char *monetary, const char *messages, const char *default_name)
int _Locale_strcmp (struct _Locale_collate *l, const char *s1, size_t n1, const char *s2, size_t n2)
int _Locale_strwcmp (struct _Locale_collate *l, const wchar_t *s1, size_t n1, const wchar_t *s2, size_t n2)
size_t _Locale_strxfrm (struct _Locale_collate *lcollate, char *dest, size_t dest_n, const char *src, size_t src_n)
size_t _Locale_strwxfrm (struct _Locale_collate *lcollate, wchar_t *dest, size_t dest_n, const wchar_t *src, size_t src_n)


Define Documentation

#define __LOCALE_PATH   "/usr/share/locale"

Definition at line 149 of file c_locale_glibc.c.

Referenced by _Category_create().


Typedef Documentation

typedef struct _Locale_collate L_collate_t

typedef struct _Locale_ctype L_ctype_t

typedef struct _Locale_numeric L_numeric_t

typedef struct _Locale_time L_time_t


Function Documentation

wint_t __towctrans_ld ( wint_t  wc,
wctrans_t  desc,
const struct locale_data locale 
)

Definition at line 597 of file c_locale_glibc.c.

References wint_t.

struct locale_data* _Category_create ( const char *  name,
int  category 
)

Definition at line 152 of file c_locale_glibc.c.

References __LOCALE_PATH, and _Find_locale().

Referenced by _Locale_monetary_create(), and _Locale_numeric_create().

struct locale_data* _Find_locale ( char *  locale_path,
size_t  locale_path_len,
int  category,
char **  name 
)

Definition at line 133 of file c_locale_glibc.c.

Referenced by _Category_create().

const char* _Locale_abbrev_dayofweek ( struct _Locale_time ltime,
int  day 
)

Definition at line 385 of file c_locale_glibc.c.

const char* _Locale_abbrev_monthname ( struct _Locale_time ltime,
int  month 
)

Definition at line 377 of file c_locale_glibc.c.

const char* _Locale_am_str ( struct _Locale_time ltime  ) 

Definition at line 406 of file c_locale_glibc.c.

wint_t _Locale_btowc ( struct _Locale_ctype l,
int  c 
)

Definition at line 627 of file c_locale_glibc.c.

void _Locale_catclose ( struct _Locale_messages l,
int  catalog 
)

Definition at line 453 of file c_locale_glibc.c.

const char* _Locale_catgets ( struct _Locale_messages l,
int  catalog,
int  set_num,
int  msg_num,
const char *  dfault 
)

Definition at line 456 of file c_locale_glibc.c.

int _Locale_catopen ( struct _Locale_messages l,
const char *  cat_name 
)

Definition at line 450 of file c_locale_glibc.c.

void* _Locale_collate_create ( const char *  name,
struct _Locale_name_hint hint 
)

Definition at line 689 of file c_locale_glibc.c.

const char* _Locale_collate_default ( char *  buf  ) 

Definition at line 211 of file c_locale_glibc.c.

References _Locale_extract_collate_name(), and _Locale_MAX_COMPOSITE_NAME.

void _Locale_collate_destroy ( void *  lcollate  ) 

Definition at line 699 of file c_locale_glibc.c.

char const* _Locale_collate_name ( const void *  lcollate,
char *  buf 
)

Definition at line 695 of file c_locale_glibc.c.

char const* _Locale_compose_name ( char *  buf,
const char *  ctype,
const char *  numeric,
const char *  time,
const char *  collate,
const char *  monetary,
const char *  messages,
const char *  default_name 
)

Definition at line 709 of file c_locale_glibc.c.

void* _Locale_ctype_create ( const char *  name,
struct _Locale_name_hint hint 
)

Definition at line 488 of file c_locale_glibc.c.

const char* _Locale_ctype_default ( char *  buf  ) 

Definition at line 187 of file c_locale_glibc.c.

References _Locale_extract_ctype_name(), and _Locale_MAX_COMPOSITE_NAME.

void _Locale_ctype_destroy ( void *  lctype  ) 

Definition at line 524 of file c_locale_glibc.c.

char const* _Locale_ctype_name ( const void *  lctype,
char *  buf 
)

Definition at line 520 of file c_locale_glibc.c.

References _Locale_name().

const _Locale_mask_t* _Locale_ctype_table ( struct _Locale_ctype lctype  ) 

Definition at line 531 of file c_locale_glibc.c.

const char* _Locale_currency_symbol ( struct _Locale_monetary lmon  ) 

Definition at line 311 of file c_locale_glibc.c.

const char* _Locale_d_fmt ( struct _Locale_time ltime  ) 

const char* _Locale_d_t_fmt ( struct _Locale_time ltime  ) 

Definition at line 389 of file c_locale_glibc.c.

char _Locale_decimal_point ( struct _Locale_numeric lnum  ) 

char const* _Locale_extract_collate_name ( const char *  cname,
char *  buf,
struct _Locale_name_hint hint 
)

Definition at line 704 of file c_locale_glibc.c.

char const* _Locale_extract_ctype_name ( const char *  cname,
char *  buf,
struct _Locale_name_hint hint 
)

Definition at line 528 of file c_locale_glibc.c.

char const* _Locale_extract_messages_name ( const char *  cname,
char *  buf,
struct _Locale_name_hint hint 
)

Definition at line 435 of file c_locale_glibc.c.

char const* _Locale_extract_monetary_name ( const char *  cname,
char *  buf,
struct _Locale_name_hint hint 
)

Definition at line 304 of file c_locale_glibc.c.

char const* _Locale_extract_numeric_name ( const char *  cname,
char *  buf,
struct _Locale_name_hint hint 
)

Definition at line 255 of file c_locale_glibc.c.

char const* _Locale_extract_time_name ( const char *  cname,
char *  buf,
struct _Locale_name_hint hint 
)

Definition at line 366 of file c_locale_glibc.c.

const char* _Locale_false ( struct _Locale_numeric l  ) 

Definition at line 281 of file c_locale_glibc.c.

void _Locale_final (  ) 

Definition at line 43 of file c_locale_glibc.c.

char _Locale_frac_digits ( struct _Locale_monetary lmon  ) 

Definition at line 332 of file c_locale_glibc.c.

const char* _Locale_full_dayofweek ( struct _Locale_time ltime,
int  day 
)

Definition at line 381 of file c_locale_glibc.c.

const char* _Locale_full_monthname ( struct _Locale_time ltime,
int  month 
)

Definition at line 373 of file c_locale_glibc.c.

struct _Locale_name_hint* _Locale_get_collate_hint ( struct _Locale_collate collate  ) 

Definition at line 79 of file c_locale_glibc.c.

struct _Locale_name_hint* _Locale_get_ctype_hint ( struct _Locale_ctype ctype  ) 

Definition at line 73 of file c_locale_glibc.c.

struct _Locale_name_hint* _Locale_get_messages_hint ( struct _Locale_messages messages  ) 

Definition at line 83 of file c_locale_glibc.c.

struct _Locale_name_hint* _Locale_get_monetary_hint ( struct _Locale_monetary monetary  ) 

Definition at line 81 of file c_locale_glibc.c.

struct _Locale_name_hint* _Locale_get_numeric_hint ( struct _Locale_numeric numeric  ) 

Definition at line 75 of file c_locale_glibc.c.

struct _Locale_name_hint* _Locale_get_time_hint ( struct _Locale_time time  ) 

Definition at line 77 of file c_locale_glibc.c.

const char* _Locale_grouping ( struct _Locale_numeric lnum  ) 

void _Locale_init (  ) 

Definition at line 40 of file c_locale_glibc.c.

const char* _Locale_int_curr_symbol ( struct _Locale_monetary lmon  ) 

Definition at line 308 of file c_locale_glibc.c.

char _Locale_int_frac_digits ( struct _Locale_monetary lmon  ) 

Definition at line 329 of file c_locale_glibc.c.

int _Locale_is_stateless ( struct _Locale_ctype l  ) 

Definition at line 625 of file c_locale_glibc.c.

const char* _Locale_long_d_fmt ( struct _Locale_time ltime  ) 

const char* _Locale_long_d_t_fmt ( struct _Locale_time ltime  ) 

Definition at line 392 of file c_locale_glibc.c.

int _Locale_mb_cur_max ( struct _Locale_ctype lctype  ) 

Definition at line 617 of file c_locale_glibc.c.

int _Locale_mb_cur_min ( struct _Locale_ctype l  ) 

Definition at line 621 of file c_locale_glibc.c.

size_t _Locale_mbtowc ( struct _Locale_ctype l,
wchar_t *  to,
const char *  from,
size_t  n,
mbstate_t shift_state 
)

Definition at line 644 of file c_locale_glibc.c.

References mbrlen(), and mbrtowc().

void* _Locale_messages_create ( const char *  name,
struct _Locale_name_hint hint 
)

Definition at line 420 of file c_locale_glibc.c.

const char* _Locale_messages_default ( char *  buf  ) 

void _Locale_messages_destroy ( void *  lmsg  ) 

Definition at line 430 of file c_locale_glibc.c.

char const* _Locale_messages_name ( const void *  lmsg,
char *  buf 
)

Definition at line 426 of file c_locale_glibc.c.

char _Locale_mon_decimal_point ( struct _Locale_monetary lmon  ) 

Definition at line 314 of file c_locale_glibc.c.

const char* _Locale_mon_grouping ( struct _Locale_monetary lmon  ) 

Definition at line 320 of file c_locale_glibc.c.

char _Locale_mon_thousands_sep ( struct _Locale_monetary lmon  ) 

Definition at line 317 of file c_locale_glibc.c.

void* _Locale_monetary_create ( const char *  name,
struct _Locale_name_hint hint 
)

Definition at line 287 of file c_locale_glibc.c.

References _Category_create(), and _Locale_monetary::gcc_data.

const char* _Locale_monetary_default ( char *  buf  ) 

void _Locale_monetary_destroy ( void *  lmon  ) 

Definition at line 299 of file c_locale_glibc.c.

char const* _Locale_monetary_name ( const void *  lmon,
char *  buf 
)

Definition at line 294 of file c_locale_glibc.c.

References _Locale_name().

int _Locale_n_cs_precedes ( struct _Locale_monetary lmon  ) 

Definition at line 344 of file c_locale_glibc.c.

int _Locale_n_sep_by_space ( struct _Locale_monetary lmon  ) 

Definition at line 347 of file c_locale_glibc.c.

int _Locale_n_sign_posn ( struct _Locale_monetary lmon  ) 

Definition at line 350 of file c_locale_glibc.c.

char const* _Locale_name ( const struct locale_data gcc_data,
char *  buf 
)

const char* _Locale_negative_sign ( struct _Locale_monetary lmon  ) 

Definition at line 326 of file c_locale_glibc.c.

void* _Locale_numeric_create ( const char *  name,
struct _Locale_name_hint hint 
)

Definition at line 239 of file c_locale_glibc.c.

References _Category_create(), and _Locale_numeric::gcc_data.

const char* _Locale_numeric_default ( char *  buf  ) 

Definition at line 195 of file c_locale_glibc.c.

References _Locale_extract_numeric_name(), and _Locale_MAX_COMPOSITE_NAME.

void _Locale_numeric_destroy ( void *  lnum  ) 

Definition at line 250 of file c_locale_glibc.c.

char const* _Locale_numeric_name ( const void *  lnum,
char *  buf 
)

Definition at line 246 of file c_locale_glibc.c.

References _Locale_name().

int _Locale_p_cs_precedes ( struct _Locale_monetary lmon  ) 

Definition at line 335 of file c_locale_glibc.c.

int _Locale_p_sep_by_space ( struct _Locale_monetary lmon  ) 

Definition at line 338 of file c_locale_glibc.c.

int _Locale_p_sign_posn ( struct _Locale_monetary lmon  ) 

Definition at line 341 of file c_locale_glibc.c.

const char* _Locale_pm_str ( struct _Locale_time ltime  ) 

Definition at line 409 of file c_locale_glibc.c.

const char* _Locale_positive_sign ( struct _Locale_monetary lmon  ) 

Definition at line 323 of file c_locale_glibc.c.

int _Locale_strcmp ( struct _Locale_collate l,
const char *  s1,
size_t  n1,
const char *  s2,
size_t  n2 
)

Definition at line 752 of file c_locale_glibc.c.

int _Locale_strwcmp ( struct _Locale_collate l,
const wchar_t *  s1,
size_t  n1,
const wchar_t *  s2,
size_t  n2 
)

Definition at line 768 of file c_locale_glibc.c.

size_t _Locale_strwxfrm ( struct _Locale_collate lcollate,
wchar_t *  dest,
size_t  dest_n,
const wchar_t *  src,
size_t  src_n 
)

Definition at line 808 of file c_locale_glibc.c.

size_t _Locale_strxfrm ( struct _Locale_collate lcollate,
char *  dest,
size_t  dest_n,
const char *  src,
size_t  src_n 
)

Definition at line 782 of file c_locale_glibc.c.

const char* _Locale_t_fmt ( struct _Locale_time ltime  ) 

Definition at line 403 of file c_locale_glibc.c.

const char* _Locale_t_fmt_ampm ( struct _Locale_time ltime  ) 

char _Locale_thousands_sep ( struct _Locale_numeric lnum  ) 

void* _Locale_time_create ( const char *  name,
struct _Locale_name_hint hint 
)

Definition at line 356 of file c_locale_glibc.c.

const char* _Locale_time_default ( char *  buf  ) 

Definition at line 203 of file c_locale_glibc.c.

References _Locale_extract_time_name(), and _Locale_MAX_COMPOSITE_NAME.

void _Locale_time_destroy ( void *  ltime  ) 

Definition at line 369 of file c_locale_glibc.c.

char const* _Locale_time_name ( const void *  ltime,
char *  buf 
)

Definition at line 362 of file c_locale_glibc.c.

References _Locale_name().

int _Locale_tolower ( struct _Locale_ctype lctype,
int  c 
)

Definition at line 537 of file c_locale_glibc.c.

int _Locale_toupper ( struct _Locale_ctype lctype,
int  c 
)

Definition at line 534 of file c_locale_glibc.c.

const char* _Locale_true ( struct _Locale_numeric l  ) 

Definition at line 279 of file c_locale_glibc.c.

size_t _Locale_unshift ( struct _Locale_ctype l,
mbstate_t st,
char *  buf,
size_t  n,
char **  next 
)

Definition at line 679 of file c_locale_glibc.c.

_Locale_mask_t _Locale_wchar_ctype ( struct _Locale_ctype loc,
wint_t  wc,
_Locale_mask_t  which_bits 
)

wint_t _Locale_wchar_tolower ( struct _Locale_ctype locale,
wint_t  wc 
)

Definition at line 609 of file c_locale_glibc.c.

wint_t _Locale_wchar_toupper ( struct _Locale_ctype locale,
wint_t  wc 
)

Definition at line 612 of file c_locale_glibc.c.

int _Locale_wctob ( struct _Locale_ctype l,
wint_t  c 
)

Definition at line 640 of file c_locale_glibc.c.

size_t _Locale_wctomb ( struct _Locale_ctype l,
char *  to,
size_t  n,
const wchar_t  c,
mbstate_t shift_state 
)

Definition at line 657 of file c_locale_glibc.c.

References wcrtomb().

wint_t btowc ( int  c  ) 

Referenced by _Locale_btowc().

size_t mbrlen ( const char *  s,
size_t  n,
mbstate_t ps 
)

Referenced by _Locale_mbtowc().

size_t mbrtowc ( wchar_t *  pwc,
const char *  s,
size_t  n,
mbstate_t ps 
)

Referenced by _Locale_mbtowc().

size_t wcrtomb ( char *  s,
wchar_t  wc,
mbstate_t ps 
)

Referenced by _Locale_wctomb().

int wctob ( wint_t  c  ) 

Referenced by _Locale_wctob().



Generated on Mon Mar 10 15:32:47 2008 by  doxygen 1.5.1