| Libgretl Reference Manual |
|---|
gretl_intlgretl_intl — |
void gretl_push_c_numeric_locale (void); void gretl_pop_c_numeric_locale (void); int doing_nls (void); int reset_local_decpoint (void); int get_local_decpoint (void); char* iso_to_ascii (char *s); char* get_month_name (char *mname, int m); char* iso_gettext (const char *msgid); char* maybe_iso_gettext (const char *msgid); void set_gretl_charset (const char *s); const char* get_gretl_charset (void); const char* get_gnuplot_charset (void); int iso_latin_version (void); char* sprint_l2_to_html (char *targ, const char *s, size_t len); char* sprint_l2_to_ascii (char *targ, const char *s, size_t len); char* sprint_html_to_l2 (char *targ, const char *s); int print_as_html (const char *s, FILE *fp); int print_as_locale (const char *s, FILE *fp); int get_utf_width (const char *str, int width); int get_translated_width (const char *str); void check_for_console (PRN *prn); void console_off (void); #define UTF_WIDTH (s, w) #define TRANSLATED_WIDTH (s)
void gretl_push_c_numeric_locale (void);
Saves the current LC_NUMERIC locale and sets it to "C"
This way you can safely read write floating point numbers all in the
same format. You should make sure that code between
gretl_push_c_numeric_locale() and gretl_pop_c_numeric_locale()
doesn't do any setlocale calls or locale may end up in a strange setting.
Also make sure to always pop the C numeric locale after you've pushed it.
The calls can be nested.
void gretl_pop_c_numeric_locale (void);
Restores the LC_NUMERIC locale to what it was
before the matching gretl_push_c_numeric_locale(). If these calls
were nested, then this is a no-op until we get to the most outermost
layer. Code in between these should not do any setlocale calls
to change the LC_NUMERIC locale or things may come out very strange.
int reset_local_decpoint (void);
| Returns : | the character representing a decimal point in the current locale. |
int get_local_decpoint (void);
| Returns : | the character representing a decimal point in the current locale. |
char* sprint_l2_to_html (char *targ,
const char *s,
size_t len);
targ : |
|
s : |
|
len : |
|
| Returns : |
char* sprint_l2_to_ascii (char *targ,
const char *s,
size_t len);
targ : |
|
s : |
|
len : |
|
| Returns : |
| << plugins | gretl_win32 >> |