The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
locale.h
Go to the documentation of this file.
1#pragma once
2
3/**
4 * @file locale.h
5 * @brief locales. ginnOS has one: "C" (also called "POSIX"). text is
6 * UTF-8 bytes, numbers use '.', and nothing is translated.
7 */
8
9#include <stddef.h>
10
11#define LC_CTYPE 0
12#define LC_NUMERIC 1
13#define LC_TIME 2
14#define LC_COLLATE 3
15#define LC_MONETARY 4
16#define LC_MESSAGES 5
17#define LC_ALL 6
18
19/**
20 * how numbers and money are written. in the "C" locale the strings are
21 * empty (no grouping, no currency) except decimal_point, and the char
22 * fields are CHAR_MAX (not given).
23 */
51
52/**
53 * choose the locale of a category, or ask for it.
54 * @param locale "C", "POSIX" or "" (the default, also "C"); NULL asks.
55 * @return "C", or NULL if that locale is not there (nothing changes).
56 */
57char *setlocale(int category, const char *locale);
58
59/**
60 * @return the number and money formats of the locale ("C").
61 */
62struct lconv *localeconv(void);
NULL, size_t, ptrdiff_t, offsetof.
char * setlocale(int category, const char *locale)
choose the locale of a category, or ask for it.
struct lconv * localeconv(void)
how numbers and money are written.
Definition locale.h:25
char * mon_grouping
Definition locale.h:33
char int_p_cs_precedes
Definition locale.h:44
char * mon_decimal_point
Definition locale.h:31
char p_sign_posn
Definition locale.h:42
char int_p_sign_posn
Definition locale.h:48
char int_n_cs_precedes
Definition locale.h:46
char p_sep_by_space
Definition locale.h:39
char * negative_sign
Definition locale.h:35
char * decimal_point
Definition locale.h:26
char * grouping
Definition locale.h:28
char * mon_thousands_sep
Definition locale.h:32
char int_n_sign_posn
Definition locale.h:49
char int_frac_digits
Definition locale.h:36
char * positive_sign
Definition locale.h:34
char frac_digits
Definition locale.h:37
char n_sep_by_space
Definition locale.h:41
char * int_curr_symbol
Definition locale.h:29
char n_cs_precedes
Definition locale.h:40
char int_n_sep_by_space
Definition locale.h:47
char n_sign_posn
Definition locale.h:43
char int_p_sep_by_space
Definition locale.h:45
char * thousands_sep
Definition locale.h:27
char p_cs_precedes
Definition locale.h:38
char * currency_symbol
Definition locale.h:30