X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Flocale-util.h;h=e48aa3d9af04c1c13cba5e849f45bc7afd3d6fad;hb=086821244b5113f00a0ef993b78dc56aae2a8f6c;hp=7be9af2b4ed228236a24629564a6812e709e74c7;hpb=7568345034f2890af745747783c5abfbf6eccf0f;p=elogind.git diff --git a/src/shared/locale-util.h b/src/shared/locale-util.h index 7be9af2b4..e48aa3d9a 100644 --- a/src/shared/locale-util.h +++ b/src/shared/locale-util.h @@ -21,5 +21,34 @@ along with systemd; If not, see . ***/ +#include + +#include "macro.h" + +typedef enum LocaleVariable { + /* We don't list LC_ALL here on purpose. People should be + * using LANG instead. */ + + VARIABLE_LANG, + VARIABLE_LANGUAGE, + VARIABLE_LC_CTYPE, + VARIABLE_LC_NUMERIC, + VARIABLE_LC_TIME, + VARIABLE_LC_COLLATE, + VARIABLE_LC_MONETARY, + VARIABLE_LC_MESSAGES, + VARIABLE_LC_PAPER, + VARIABLE_LC_NAME, + VARIABLE_LC_ADDRESS, + VARIABLE_LC_TELEPHONE, + VARIABLE_LC_MEASUREMENT, + VARIABLE_LC_IDENTIFICATION, + _VARIABLE_LC_MAX, + _VARIABLE_LC_INVALID = -1 +} LocaleVariable; + int get_locales(char ***l); bool locale_is_valid(const char *name); + +const char* locale_variable_to_string(LocaleVariable i) _const_; +LocaleVariable locale_variable_from_string(const char *s) _pure_;