aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorRyan Pavlik <rpavlik@iastate.edu>2011-10-28 19:06:45 (GMT)
committerRyan Pavlik <rpavlik@iastate.edu>2011-10-31 15:54:09 (GMT)
commitb82999c1ac47b7b559815636f615d0c1ffa5cb56 (patch)
treeaeb9bc9f278bdbfba72f9d43cfe7395e5f7213bb /src/FbTk
parentd4f682c7bd1ca150693fa3028d0a8c6bdd1820fd (diff)
downloadfluxbox_paul-b82999c1ac47b7b559815636f615d0c1ffa5cb56.zip
fluxbox_paul-b82999c1ac47b7b559815636f615d0c1ffa5cb56.tar.bz2
FbTk/FbString.cc,Font.cc: Windows doesn't have nl_langinfo
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/FbString.cc4
-rw-r--r--src/FbTk/Font.cc4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/FbTk/FbString.cc b/src/FbTk/FbString.cc
index d62f5fa..5577f32 100644
--- a/src/FbTk/FbString.cc
+++ b/src/FbTk/FbString.cc
@@ -169,12 +169,12 @@ void init() {
169 setlocale(LC_CTYPE, ""); 169 setlocale(LC_CTYPE, "");
170 170
171#ifdef HAVE_ICONV 171#ifdef HAVE_ICONV
172#ifdef CODESET 172#if defined(CODESET) && !defined(_WIN32)
173 s_locale_codeset = nl_langinfo(CODESET); 173 s_locale_codeset = nl_langinfo(CODESET);
174#else // openbsd doesnt have this (yet?) 174#else // openbsd doesnt have this (yet?)
175 std::string locale = setlocale(LC_CTYPE, NULL); 175 std::string locale = setlocale(LC_CTYPE, NULL);
176 size_t pos = locale.find('.'); 176 size_t pos = locale.find('.');
177 if (pos != string::npos) 177 if (pos != std::string::npos)
178 s_locale_codeset = locale.substr(pos+1); 178 s_locale_codeset = locale.substr(pos+1);
179#endif // CODESET 179#endif // CODESET
180 180
diff --git a/src/FbTk/Font.cc b/src/FbTk/Font.cc
index ea0fbde..f06e6f6 100644
--- a/src/FbTk/Font.cc
+++ b/src/FbTk/Font.cc
@@ -136,11 +136,11 @@ Font::Font(const char *name):
136 s_multibyte = true; 136 s_multibyte = true;
137 137
138 // check for utf-8 mode 138 // check for utf-8 mode
139#ifdef CODESET 139#if defined(CODESET) && !defined(_WIN32)
140 char *locale_codeset = nl_langinfo(CODESET); 140 char *locale_codeset = nl_langinfo(CODESET);
141#else // openbsd doesnt have this (yet?) 141#else // openbsd doesnt have this (yet?)
142 char *locale_codeset = 0; 142 char *locale_codeset = 0;
143#endif // CODESET 143#endif // defined(CODESET) && !defined(_WIN32)
144 144
145 if (locale_codeset && strcmp("UTF-8", locale_codeset) == 0) { 145 if (locale_codeset && strcmp("UTF-8", locale_codeset) == 0) {
146 s_utf8mode = true; 146 s_utf8mode = true;