Move nls globals into #ifdef NLS

This commit is contained in:
Mathias Gumz 2015-02-04 21:06:32 +01:00
parent 461d4b7dbd
commit 53b3120b32

View file

@ -66,15 +66,14 @@ using std::string;
namespace {
#if defined(NLS)
const char UTF8_SUFFIX[] = "-UTF-8.cat";
const size_t UTF8_SUFFIX_LEN = sizeof(UTF8_SUFFIX)-1; // without \0
const char DEFAULT_CATFILE[] = "fluxbox.cat";
const char ENV_CATFILE[] = "FLUXBOX_CATFILE";
const char ENV_CATDIR[] = "FLUXBOX_CATDIR";
const nl_catd INVALID_CATALOG = (nl_catd)(-1);
nl_catd s_catalog_fd = INVALID_CATALOG;
const char* getCatalogDir() {
const char* cat_dir = getenv(ENV_CATDIR);
@ -84,6 +83,12 @@ const char* getCatalogDir() {
return LOCALEPATH;
}
#endif
const nl_catd INVALID_CATALOG = (nl_catd)(-1);
nl_catd s_catalog_fd = INVALID_CATALOG;
std::string join_str(size_t n, ...) {
std::string s;