From af6712f96302b76dcb8e52e14a9daf308c4dbb65 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 24 Mar 2004 13:19:07 +0000 Subject: [PATCH] more tweaks to i18nLibFileSearch git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8523 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/ChangeLog | 4 ++++ src/support/filetools.C | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 39415ee926..5015e26529 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,7 @@ +2004-03-24 Jean-Marc Lasgouttes + + * filetools.C (i18nLibFileSearch): simplify the logic a bit + 2004-03-23 Jean-Marc Lasgouttes * filetools.C (i18nLibFileSearch): fix the logic to match closely diff --git a/src/support/filetools.C b/src/support/filetools.C index 05109c76b3..5388a376f0 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -315,12 +315,8 @@ i18nLibFileSearch(string const & dir, string const & name, variable. But we don't use the value if the currently selected locale is the C locale. This is a GNU extension. */ /* [Otherwise] We have to proceed with the POSIX methods of - looking to `LC_ALL', `LC_xxx', and `LANG'. On some systems - this can be done by the `setlocale' function itself. */ + looking to `LC_ALL', `LC_xxx', and `LANG'. */ -#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL - lang = setlocale(LC_MESSAGES, NULL); -#else string lang = GetEnv("LC_ALL"); if (lang.empty()) { lang = GetEnv("LC_MESSAGES"); @@ -330,10 +326,9 @@ i18nLibFileSearch(string const & dir, string const & name, lang = "C"; } } -#endif string const language = GetEnv("LANGUAGE"); - if (lang != "C" && !language.empty()) + if (lang != "C" && lang != "POSIX" && !language.empty()) lang = language; lang = token(lang, '_', 0); -- 2.39.5