Modular C
+ Collaboration diagram for C◼locale:

Modules

 C◼locale◼llong: symbols inserted from C◼llong.
 
 Platform features used by module C◼locale
 Some features are recovered or pre-computed specifically for the target platform by looking into the C include files:
 
 Specific macros to deal with the structure of module C◼locale.
 

Data Structures

struct  C◼locale
 The platform struct struct lconv. More...
 

Macros

#define C◼locale◼locale_type_decimal_point   char*
 
#define C◼locale◼locale_type_thousands_sep   char*
 
#define C◼locale◼locale_type_grouping   char*
 
#define C◼locale◼locale_type_mon_decimal_point   char*
 
#define C◼locale◼locale_type_mon_thousands_sep   char*
 
#define C◼locale◼locale_type_mon_grouping   char*
 
#define C◼locale◼locale_type_positive_sign   char*
 
#define C◼locale◼locale_type_negative_sign   char*
 
#define C◼locale◼locale_type_currency_symbol   char*
 
#define C◼locale◼locale_type_frac_digits   char
 
#define C◼locale◼locale_type_p_cs_precedes   char
 
#define C◼locale◼locale_type_n_cs_precedes   char
 
#define C◼locale◼locale_type_p_sep_by_space   char
 
#define C◼locale◼locale_type_n_sep_by_space   char
 
#define C◼locale◼locale_type_p_sign_posn   char
 
#define C◼locale◼locale_type_n_sign_posn   char
 
#define C◼locale◼locale_type_int_curr_symbol   char*
 
#define C◼locale◼locale_type_int_frac_digits   char
 
#define C◼locale◼locale_type_int_p_cs_precedes   char
 
#define C◼locale◼locale_type_int_n_cs_precedes   char
 
#define C◼locale◼locale_type_int_p_sep_by_space   char
 
#define C◼locale◼locale_type_int_n_sep_by_space   char
 
#define C◼locale◼locale_type_int_p_sign_posn   char
 
#define C◼locale◼locale_type_int_n_sign_posn   char
 
#define C◼locale◼locale_cmp_decimal_point   C◼str◼cmp
 
#define C◼locale◼locale_cmp_thousands_sep   C◼str◼cmp
 
#define C◼locale◼locale_cmp_grouping   C◼str◼cmp
 
#define C◼locale◼locale_cmp_mon_decimal_point   C◼str◼cmp
 
#define C◼locale◼locale_cmp_mon_thousands_sep   C◼str◼cmp
 
#define C◼locale◼locale_cmp_mon_grouping   C◼str◼cmp
 
#define C◼locale◼locale_cmp_positive_sign   C◼str◼cmp
 
#define C◼locale◼locale_cmp_negative_sign   C◼str◼cmp
 
#define C◼locale◼locale_cmp_currency_symbol   C◼str◼cmp
 
#define C◼locale◼locale_cmp_int_curr_symbol   C◼str◼cmp
 

Functions

_Bool C◼locale◼equal (C◼locale a, C◼locale b)
 
int C◼locale◼cmp (C◼locale a, C◼locale b)
 
char * C◼locale◼set (int, char const *)
 
C◼localeC◼locale◼conv (void)
 This aliases symbol localeconv. More...
 
void C◼locale◼init (void)
 An initialization function for the module. More...
 
void C◼locale◼atexit (void)
 A function called at exit. More...
 

Variables

char const *const C◼locale◼def
 the identifier of the native locale More...
 
static char const * C◼locale◼def_ = 0
 This aliases symbol ⸢C::locale::def⸣. More...
 

Detailed Description


Data Structure Documentation

§ C◼locale

struct C◼locale

The platform struct struct lconv.

Known fields: decimal_point thousands_sep grouping mon_decimal_point mon_thousands_sep mon_grouping positive_sign negative_sign currency_symbol frac_digits p_cs_precedes n_cs_precedes p_sep_by_space n_sep_by_space p_sign_posn n_sign_posn int_curr_symbol int_frac_digits int_p_cs_precedes int_n_cs_precedes int_p_sep_by_space int_n_sep_by_space int_p_sign_posn int_n_sign_posn

Definition at line 93 of file C-locale.c.

+ Collaboration diagram for C◼locale:

Data Fields

C◼locale◼locale_type_decimal_point decimal_point
 
C◼locale◼locale_type_thousands_sep thousands_sep
 
C◼locale◼locale_type_grouping grouping
 
C◼locale◼locale_type_int_curr_symbol int_curr_symbol
 
C◼locale◼locale_type_currency_symbol currency_symbol
 
C◼locale◼locale_type_mon_decimal_point mon_decimal_point
 
C◼locale◼locale_type_mon_thousands_sep mon_thousands_sep
 
C◼locale◼locale_type_mon_grouping mon_grouping
 
C◼locale◼locale_type_positive_sign positive_sign
 
C◼locale◼locale_type_negative_sign negative_sign
 
C◼locale◼locale_type_int_frac_digits int_frac_digits
 
C◼locale◼locale_type_frac_digits frac_digits
 
C◼locale◼locale_type_p_cs_precedes p_cs_precedes
 
C◼locale◼locale_type_p_sep_by_space p_sep_by_space
 
C◼locale◼locale_type_n_cs_precedes n_cs_precedes
 
C◼locale◼locale_type_n_sep_by_space n_sep_by_space
 
C◼locale◼locale_type_p_sign_posn p_sign_posn
 
C◼locale◼locale_type_n_sign_posn n_sign_posn
 
C◼locale◼locale_type_int_p_cs_precedes int_p_cs_precedes
 
C◼locale◼locale_type_int_p_sep_by_space int_p_sep_by_space
 
C◼locale◼locale_type_int_n_cs_precedes int_n_cs_precedes
 
C◼locale◼locale_type_int_n_sep_by_space int_n_sep_by_space
 
C◼locale◼locale_type_int_p_sign_posn int_p_sign_posn
 
C◼locale◼locale_type_int_n_sign_posn int_n_sign_posn
 

Field Documentation

§ currency_symbol

Definition at line 98 of file C-locale.c.

§ decimal_point

Definition at line 94 of file C-locale.c.

§ frac_digits

Definition at line 105 of file C-locale.c.

§ grouping

Definition at line 96 of file C-locale.c.

§ int_curr_symbol

Definition at line 97 of file C-locale.c.

§ int_frac_digits

Definition at line 104 of file C-locale.c.

§ int_n_cs_precedes

Definition at line 114 of file C-locale.c.

§ int_n_sep_by_space

Definition at line 115 of file C-locale.c.

§ int_n_sign_posn

Definition at line 117 of file C-locale.c.

§ int_p_cs_precedes

Definition at line 112 of file C-locale.c.

§ int_p_sep_by_space

Definition at line 113 of file C-locale.c.

§ int_p_sign_posn

Definition at line 116 of file C-locale.c.

§ mon_decimal_point

Definition at line 99 of file C-locale.c.

§ mon_grouping

Definition at line 101 of file C-locale.c.

§ mon_thousands_sep

Definition at line 100 of file C-locale.c.

§ n_cs_precedes

Definition at line 108 of file C-locale.c.

§ n_sep_by_space

Definition at line 109 of file C-locale.c.

§ n_sign_posn

Definition at line 111 of file C-locale.c.

§ negative_sign

Definition at line 103 of file C-locale.c.

§ p_cs_precedes

Definition at line 106 of file C-locale.c.

§ p_sep_by_space

Definition at line 107 of file C-locale.c.

§ p_sign_posn

Definition at line 110 of file C-locale.c.

§ positive_sign

Definition at line 102 of file C-locale.c.

§ thousands_sep

Definition at line 95 of file C-locale.c.

Macro Definition Documentation

§ C◼locale◼locale_cmp_currency_symbol

#define C◼locale◼locale_cmp_currency_symbol   C◼str◼cmp

Definition at line 505 of file C-locale.c.

§ C◼locale◼locale_cmp_decimal_point

#define C◼locale◼locale_cmp_decimal_point   C◼str◼cmp

Definition at line 497 of file C-locale.c.

§ C◼locale◼locale_cmp_grouping

#define C◼locale◼locale_cmp_grouping   C◼str◼cmp

Definition at line 499 of file C-locale.c.

§ C◼locale◼locale_cmp_int_curr_symbol

#define C◼locale◼locale_cmp_int_curr_symbol   C◼str◼cmp

Definition at line 506 of file C-locale.c.

§ C◼locale◼locale_cmp_mon_decimal_point

#define C◼locale◼locale_cmp_mon_decimal_point   C◼str◼cmp

Definition at line 500 of file C-locale.c.

§ C◼locale◼locale_cmp_mon_grouping

#define C◼locale◼locale_cmp_mon_grouping   C◼str◼cmp

Definition at line 502 of file C-locale.c.

§ C◼locale◼locale_cmp_mon_thousands_sep

#define C◼locale◼locale_cmp_mon_thousands_sep   C◼str◼cmp

Definition at line 501 of file C-locale.c.

§ C◼locale◼locale_cmp_negative_sign

#define C◼locale◼locale_cmp_negative_sign   C◼str◼cmp

Definition at line 504 of file C-locale.c.

§ C◼locale◼locale_cmp_positive_sign

#define C◼locale◼locale_cmp_positive_sign   C◼str◼cmp

Definition at line 503 of file C-locale.c.

§ C◼locale◼locale_cmp_thousands_sep

#define C◼locale◼locale_cmp_thousands_sep   C◼str◼cmp

Definition at line 498 of file C-locale.c.

§ C◼locale◼locale_type_currency_symbol

#define C◼locale◼locale_type_currency_symbol   char*

Definition at line 480 of file C-locale.c.

§ C◼locale◼locale_type_decimal_point

#define C◼locale◼locale_type_decimal_point   char*

Definition at line 472 of file C-locale.c.

§ C◼locale◼locale_type_frac_digits

#define C◼locale◼locale_type_frac_digits   char

Definition at line 481 of file C-locale.c.

§ C◼locale◼locale_type_grouping

#define C◼locale◼locale_type_grouping   char*

Definition at line 474 of file C-locale.c.

§ C◼locale◼locale_type_int_curr_symbol

#define C◼locale◼locale_type_int_curr_symbol   char*

Definition at line 488 of file C-locale.c.

§ C◼locale◼locale_type_int_frac_digits

#define C◼locale◼locale_type_int_frac_digits   char

Definition at line 489 of file C-locale.c.

§ C◼locale◼locale_type_int_n_cs_precedes

#define C◼locale◼locale_type_int_n_cs_precedes   char

Definition at line 491 of file C-locale.c.

§ C◼locale◼locale_type_int_n_sep_by_space

#define C◼locale◼locale_type_int_n_sep_by_space   char

Definition at line 493 of file C-locale.c.

§ C◼locale◼locale_type_int_n_sign_posn

#define C◼locale◼locale_type_int_n_sign_posn   char

Definition at line 495 of file C-locale.c.

§ C◼locale◼locale_type_int_p_cs_precedes

#define C◼locale◼locale_type_int_p_cs_precedes   char

Definition at line 490 of file C-locale.c.

§ C◼locale◼locale_type_int_p_sep_by_space

#define C◼locale◼locale_type_int_p_sep_by_space   char

Definition at line 492 of file C-locale.c.

§ C◼locale◼locale_type_int_p_sign_posn

#define C◼locale◼locale_type_int_p_sign_posn   char

Definition at line 494 of file C-locale.c.

§ C◼locale◼locale_type_mon_decimal_point

#define C◼locale◼locale_type_mon_decimal_point   char*

Definition at line 475 of file C-locale.c.

§ C◼locale◼locale_type_mon_grouping

#define C◼locale◼locale_type_mon_grouping   char*

Definition at line 477 of file C-locale.c.

§ C◼locale◼locale_type_mon_thousands_sep

#define C◼locale◼locale_type_mon_thousands_sep   char*

Definition at line 476 of file C-locale.c.

§ C◼locale◼locale_type_n_cs_precedes

#define C◼locale◼locale_type_n_cs_precedes   char

Definition at line 483 of file C-locale.c.

§ C◼locale◼locale_type_n_sep_by_space

#define C◼locale◼locale_type_n_sep_by_space   char

Definition at line 485 of file C-locale.c.

§ C◼locale◼locale_type_n_sign_posn

#define C◼locale◼locale_type_n_sign_posn   char

Definition at line 487 of file C-locale.c.

§ C◼locale◼locale_type_negative_sign

#define C◼locale◼locale_type_negative_sign   char*

Definition at line 479 of file C-locale.c.

§ C◼locale◼locale_type_p_cs_precedes

#define C◼locale◼locale_type_p_cs_precedes   char

Definition at line 482 of file C-locale.c.

§ C◼locale◼locale_type_p_sep_by_space

#define C◼locale◼locale_type_p_sep_by_space   char

Definition at line 484 of file C-locale.c.

§ C◼locale◼locale_type_p_sign_posn

#define C◼locale◼locale_type_p_sign_posn   char

Definition at line 486 of file C-locale.c.

§ C◼locale◼locale_type_positive_sign

#define C◼locale◼locale_type_positive_sign   char*

Definition at line 478 of file C-locale.c.

§ C◼locale◼locale_type_thousands_sep

#define C◼locale◼locale_type_thousands_sep   char*

Definition at line 473 of file C-locale.c.

Function Documentation

§ C◼locale◼atexit()

void C◼locale◼atexit ( void  )

A function called at exit.

A function called at quick_exit.

Definition at line 555 of file C-locale.c.

References C◼lib◼free(), and C◼locale◼def_.

555  {
556 #line 127 "/home/gustedt/build/cmod/C/C-locale.X"
558  C◼locale◼def_ = 0;
559 }
static char const * C◼locale◼def_
This aliases symbol ⸢C::locale::def⸣.
Definition: C-locale.c:541
void C◼lib◼free(void *)
+ Here is the call graph for this function:

§ C◼locale◼cmp()

int C◼locale◼cmp ( C◼locale  a,
C◼locale  b 
)
inline

Definition at line 509 of file C-locale.c.

References C◼locale◼conv(), C◼locale◼def, C◼locale◼locale_cmp(), and C◼locale◼set().

509 { return C◼locale◼locale_cmp(a, b); }
int C◼locale◼locale_cmp(C◼locale a, C◼locale b)
Compare member-wise.
Definition: C-locale.c:147
+ Here is the call graph for this function:

§ C◼locale◼conv()

int C◼locale◼conv ( void  )

This aliases symbol localeconv.

Referenced by C◼locale◼cmp().

+ Here is the caller graph for this function:

§ C◼locale◼equal()

_Bool C◼locale◼equal ( C◼locale  a,
C◼locale  b 
)
inline

Definition at line 508 of file C-locale.c.

References C◼locale◼locale_equal().

508 { return C◼locale◼locale_equal(a, b); }
_Bool C◼locale◼locale_equal(C◼locale a, C◼locale b)
Test member-wise equality.
Definition: C-locale.c:368
+ Here is the call graph for this function:

§ C◼locale◼init()

void C◼locale◼init ( void  )

An initialization function for the module.

Definition at line 543 of file C-locale.c.

References C◼lib◼malloc(), C◼locale◼ALL, C◼locale◼def_, C◼locale◼set(), C◼mem◼cpy(), and C◼str◼len().

543  {
544 #line 117 "/home/gustedt/build/cmod/C/C-locale.X"
545  char* backup = C◼locale◼set(C◼locale◼ALL, "");
546  char* found = C◼locale◼set(C◼locale◼ALL, 0);
547  if (found) {
548 #line 120 "/home/gustedt/build/cmod/C/C-locale.X"
549  C◼size len = C◼str◼len(found)+1;
551  }
553 }
void * C◼mem◼cpy(void *restrict, const void *restrict, C◼size)
static char const * C◼locale◼def_
This aliases symbol ⸢C::locale::def⸣.
Definition: C-locale.c:541
#define C◼locale◼ALL
Definition: C-locale.c:51
char * C◼locale◼set(int, char const *)
void * C◼lib◼malloc(C◼lib◼size)
C◼size C◼size
Definition: C-sizeptr.c:94
C◼size() C◼str◼len(char const *)
+ Here is the call graph for this function:

§ C◼locale◼set()

char* C◼locale◼set ( int  ,
char const *   
)

Referenced by C◼locale◼cmp(), and C◼locale◼init().

+ Here is the caller graph for this function:

Variable Documentation

§ C◼locale◼def

char const* const C◼locale◼def

the identifier of the native locale

This is initialized at module startup and will not change through the whole execution.

See also
C◼locale◼C

Referenced by C◼locale◼cmp().

§ C◼locale◼def_

int C◼locale◼def_ = 0
static

This aliases symbol ⸢C::locale::def⸣.

Definition at line 541 of file C-locale.c.

Referenced by C◼locale◼atexit(), and C◼locale◼init().