Update of /cvsroot/xine/xine-ui/src/xitk/xine-toolkit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32716/src/xitk/xine-toolkit
Modified Files:
font.c
Log Message:
Fix my brand new bugs.
Index: font.c
===================================================================
RCS file: /cvsroot/xine/xine-ui/src/xitk/xine-toolkit/font.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- font.c 26 Mar 2004 22:54:50 -0000 1.30
+++ font.c 27 Mar 2004 11:12:39 -0000 1.31
@@ -1262,9 +1262,7 @@
#ifdef HAVE_LANGINFO_CODESET
codeset = nl_langinfo(CODESET);
- printf("%s\n", codeset);
#endif
-
/*
* guess locale codeset according to shell variables
* when nl_langinfo(CODESET) isn't available or workig
@@ -1287,20 +1285,21 @@
if((mod = strchr(enc, '@')))
*mod = '\0';
- codeset = enc;
+ codeset = strdup(enc);
}
else {
const lang_locale_t *llocale = _get_first_lang_locale(lg);
if(llocale && llocale->encoding)
- codeset = llocale->encoding;
+ codeset = strdup(llocale->encoding);
}
free(lg);
}
- }
+ } else
+ codeset = strdup(codeset);
- return codeset ? strdup(codeset) : NULL;
+ return codeset;
}
xitk_recode_t *xitk_recode_init(const char *src_encoding, const char *dst_encoding) {
|