]>
Commit | Line | Data |
---|---|---|
75683450 LP |
1 | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ |
2 | ||
3 | #pragma once | |
4 | ||
5 | /*** | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2014 Lennart Poettering | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | ***/ | |
23 | ||
81a12ba6 RC |
24 | #include <stdbool.h> |
25 | ||
26 | #include "macro.h" | |
27 | ||
a3428668 MS |
28 | typedef enum LocaleVariable { |
29 | /* We don't list LC_ALL here on purpose. People should be | |
30 | * using LANG instead. */ | |
31 | ||
32 | VARIABLE_LANG, | |
33 | VARIABLE_LANGUAGE, | |
34 | VARIABLE_LC_CTYPE, | |
35 | VARIABLE_LC_NUMERIC, | |
36 | VARIABLE_LC_TIME, | |
37 | VARIABLE_LC_COLLATE, | |
38 | VARIABLE_LC_MONETARY, | |
39 | VARIABLE_LC_MESSAGES, | |
40 | VARIABLE_LC_PAPER, | |
41 | VARIABLE_LC_NAME, | |
42 | VARIABLE_LC_ADDRESS, | |
43 | VARIABLE_LC_TELEPHONE, | |
44 | VARIABLE_LC_MEASUREMENT, | |
45 | VARIABLE_LC_IDENTIFICATION, | |
46 | _VARIABLE_LC_MAX, | |
47 | _VARIABLE_LC_INVALID = -1 | |
48 | } LocaleVariable; | |
49 | ||
75683450 LP |
50 | int get_locales(char ***l); |
51 | bool locale_is_valid(const char *name); | |
a3428668 MS |
52 | |
53 | const char* locale_variable_to_string(LocaleVariable i) _const_; | |
54 | LocaleVariable locale_variable_from_string(const char *s) _pure_; |