all repos — fluxbox @ e8a6f45c9ef86451921d64285d1ab4f41dca351e

custom fork of the fluxbox windowmanager

fix compile in hosts without HAVE_ICONV
simonb simonb
commit

e8a6f45c9ef86451921d64285d1ab4f41dca351e

parent

b8dc91871e116f51a061597e40e60d89d9f715cb

2 files changed, 8 insertions(+), 5 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,8 @@

(Format: Year/Month/Day) Changes for 0.9.16: *06/06/10: + * Fix building on machines without iconv [sf.net #1499402] (Simon) + FbTk/FbString.cc * Fix some external tab alignment on shade (Simon) FbWinFrame.cc * Fix container size rounding for right alignment (Simon)
M src/FbTk/FbString.ccsrc/FbTk/FbString.cc

@@ -56,14 +56,14 @@ #endif // HAVE_ICONV

/// Initialise all of the iconv conversion descriptors void init() { + setlocale(LC_CTYPE, ""); + +#ifdef HAVE_ICONV if (iconv_convs != 0) return; iconv_convs = new iconv_t[CONVSIZE]; - setlocale(LC_CTYPE, ""); - -#ifdef HAVE_ICONV #ifdef CODESET std::string locale_codeset = nl_langinfo(CODESET); #else // openbsd doesnt have this (yet?)

@@ -90,16 +90,17 @@

} void shutdown() { +#ifdef HAVE_ICONV if (iconv_convs == 0) return; -#ifdef HAVE_ICONV + for (int i=0; i < CONVSIZE; ++i) if (iconv_convs[i] != (iconv_t)(-1)) iconv_close(iconv_convs[i]); -#endif // HAVE_ICONV delete[] iconv_convs; iconv_convs = 0; +#endif // HAVE_ICONV }