]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/basic/locale-util.h
rlimit: don't assume getrlimit() always succeeds
[thirdparty/systemd.git] / src / basic / locale-util.h
CommitLineData
75683450
LP
1#pragma once
2
3/***
4 This file is part of systemd.
5
6 Copyright 2014 Lennart Poettering
7
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version.
12
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
20***/
21
8752c575 22#include <libintl.h>
81a12ba6
RC
23#include <stdbool.h>
24
25#include "macro.h"
26
a3428668
MS
27typedef enum LocaleVariable {
28 /* We don't list LC_ALL here on purpose. People should be
29 * using LANG instead. */
30
31 VARIABLE_LANG,
32 VARIABLE_LANGUAGE,
33 VARIABLE_LC_CTYPE,
34 VARIABLE_LC_NUMERIC,
35 VARIABLE_LC_TIME,
36 VARIABLE_LC_COLLATE,
37 VARIABLE_LC_MONETARY,
38 VARIABLE_LC_MESSAGES,
39 VARIABLE_LC_PAPER,
40 VARIABLE_LC_NAME,
41 VARIABLE_LC_ADDRESS,
42 VARIABLE_LC_TELEPHONE,
43 VARIABLE_LC_MEASUREMENT,
44 VARIABLE_LC_IDENTIFICATION,
45 _VARIABLE_LC_MAX,
46 _VARIABLE_LC_INVALID = -1
47} LocaleVariable;
48
75683450
LP
49int get_locales(char ***l);
50bool locale_is_valid(const char *name);
a3428668 51
8752c575
LP
52#define _(String) gettext(String)
53#define N_(String) String
54void init_gettext(void);
55
56bool is_locale_utf8(void);
57
323b7dc9
ZJS
58typedef enum {
59 TREE_VERTICAL,
60 TREE_BRANCH,
61 TREE_RIGHT,
62 TREE_SPACE,
63 TRIANGULAR_BULLET,
64 BLACK_CIRCLE,
65 ARROW,
66 MDASH,
67 _SPECIAL_GLYPH_MAX
68} SpecialGlyph;
8752c575 69
dff4bf93 70const char *special_glyph(SpecialGlyph code) _const_;
8752c575 71
a3428668
MS
72const char* locale_variable_to_string(LocaleVariable i) _const_;
73LocaleVariable locale_variable_from_string(const char *s) _pure_;