aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Font.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-08-31 20:27:08 (GMT)
committerfluxgen <fluxgen>2004-08-31 20:27:08 (GMT)
commit9121ec43af44863c96aaedbb8cdc72047f72656a (patch)
tree8b47c297b7352a043c3be9358c3a63c35b79ff71 /src/FbTk/Font.cc
parentc37b8ec735c0f9f4782e354fec1be2f8ab053509 (diff)
downloadfluxbox_paul-9121ec43af44863c96aaedbb8cdc72047f72656a.zip
fluxbox_paul-9121ec43af44863c96aaedbb8cdc72047f72656a.tar.bz2
checking for have iconv
Diffstat (limited to 'src/FbTk/Font.cc')
-rw-r--r--src/FbTk/Font.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/FbTk/Font.cc b/src/FbTk/Font.cc
index 774e92a..8ba5a0a 100644
--- a/src/FbTk/Font.cc
+++ b/src/FbTk/Font.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22//$Id: Font.cc,v 1.14 2004/08/31 15:26:39 rathnor Exp $ 22//$Id: Font.cc,v 1.15 2004/08/31 20:27:08 fluxgen Exp $
23 23
24 24
25#include "StringUtil.hh" 25#include "StringUtil.hh"
@@ -94,6 +94,7 @@ namespace {
94#include <locale.h> 94#include <locale.h>
95#endif //HAVE_SETLOCALE 95#endif //HAVE_SETLOCALE
96 96
97#ifdef HAVE_ICONV
97/** 98/**
98 Recodes the text from one encoding to another 99 Recodes the text from one encoding to another
99 assuming cd is correct 100 assuming cd is correct
@@ -103,7 +104,7 @@ namespace {
103 @return the recoded string, or 0 on failure 104 @return the recoded string, or 0 on failure
104*/ 105*/
105char* recode(iconv_t cd, 106char* recode(iconv_t cd,
106 const char *msg, size_t size) { 107 const char *msg, size_t size) {
107 108
108 // If empty message, yes this can happen, return 109 // If empty message, yes this can happen, return
109 if(strlen(msg) == 0 || size == 0) 110 if(strlen(msg) == 0 || size == 0)
@@ -140,7 +141,13 @@ char* recode(iconv_t cd,
140 141
141 return new_msg_ptr; 142 return new_msg_ptr;
142} 143}
144#else
143 145
146char *recode(iconv_t cd,
147 const char *msg, size_t size) {
148 return 0;
149}
150#endif // HAVE_ICONV
144 151
145int extract_halo_options(const std::string& opts, std::string& color) { 152int extract_halo_options(const std::string& opts, std::string& color) {
146 std::list< std::string > tokens; 153 std::list< std::string > tokens;