all repos — fluxbox @ 9121ec43af44863c96aaedbb8cdc72047f72656a

custom fork of the fluxbox windowmanager

checking for have iconv
fluxgen fluxgen
commit

9121ec43af44863c96aaedbb8cdc72047f72656a

parent

c37b8ec735c0f9f4782e354fec1be2f8ab053509

2 files changed, 18 insertions(+), 3 deletions(-)

jump to
M src/FbTk/Font.ccsrc/FbTk/Font.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: Font.cc,v 1.14 2004/08/31 15:26:39 rathnor Exp $ +//$Id: Font.cc,v 1.15 2004/08/31 20:27:08 fluxgen Exp $ #include "StringUtil.hh"

@@ -94,6 +94,7 @@ #ifdef HAVE_SETLOCALE

#include <locale.h> #endif //HAVE_SETLOCALE +#ifdef HAVE_ICONV /** Recodes the text from one encoding to another assuming cd is correct

@@ -103,7 +104,7 @@ @param len number of chars to convert

@return the recoded string, or 0 on failure */ char* recode(iconv_t cd, - const char *msg, size_t size) { + const char *msg, size_t size) { // If empty message, yes this can happen, return if(strlen(msg) == 0 || size == 0)

@@ -140,7 +141,13 @@ }

return new_msg_ptr; } +#else +char *recode(iconv_t cd, + const char *msg, size_t size) { + return 0; +} +#endif // HAVE_ICONV int extract_halo_options(const std::string& opts, std::string& color) { std::list< std::string > tokens;
M src/FbTk/Font.hhsrc/FbTk/Font.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: Font.hh,v 1.10 2004/08/18 16:30:33 rathnor Exp $ +//$Id: Font.hh,v 1.11 2004/08/31 20:27:08 fluxgen Exp $ #ifndef FBTK_FONT_HH #define FBTK_FONT_HH

@@ -30,7 +30,13 @@

#include <string> #include <memory> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif // HAVE_CONFIG_H + +#ifdef HAVE_ICONV #include <iconv.h> +#endif // HAVE_ICONV namespace FbTk {

@@ -111,7 +117,9 @@ int m_shadow_offx; ///< offset y for shadow

int m_shadow_offy; ///< offset x for shadow bool m_halo; ///< halo text std::string m_halo_color; ///< halo color +#ifdef HAVE_ICONV iconv_t m_iconv; +#endif // HAVE_ICONV }; } //end namespace FbTk