changeset 3370:eb7b398051f2

[gaim-migrate @ 3389] Is ISO-8859 a good default charset to use if one doesn't have nl_langinfo? committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Fri, 02 Aug 2002 05:19:52 +0000
parents ae9894ad81a0
children 363af6ce86a8
files gaim.spec.in src/core.h src/gaim.h src/util.c
diffstat 4 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gaim.spec.in	Fri Aug 02 05:01:07 2002 +0000
+++ b/gaim.spec.in	Fri Aug 02 05:19:52 2002 +0000
@@ -74,7 +74,7 @@
 %{prefix}/man/man1/gaim.1.gz
 %attr(755,root,root) %{prefix}/lib/gaim/*
 %{prefix}/share/locale/*/*/*
-%{prefix}/share/pixmaps/gaim.xpm
+%{prefix}/share/pixmaps/gaim.png
 %{prefix}/share/gnome/apps/Internet/gaim.desktop
 
 
@@ -85,7 +85,7 @@
 %{prefix}/man/man1/gaim.1.gz
 %{prefix}/lib/gaim/*
 %{prefix}/share/locale/*/*/*
-%{prefix}/share/pixmaps/gaim.xpm
+%{prefix}/share/pixmaps/gaim.png
 %{prefix}/share/pixmaps/gaim/*
 %{prefix}/share/gnome/apps/Internet/gaim.desktop
 %{sysconfdir}/CORBA/servers/*
--- a/src/core.h	Fri Aug 02 05:01:07 2002 +0000
+++ b/src/core.h	Fri Aug 02 05:19:52 2002 +0000
@@ -26,8 +26,14 @@
 #include <config.h>
 #endif
 
+#ifdef HAVE_ICONV
 #include <iconv.h>
+#endif
+
+#ifdef HAVE_LANGINFO_CODESET
 #include <langinfo.h>
+#endif
+
 #include <stdio.h>
 #include <time.h>
 #include <glib.h>
--- a/src/gaim.h	Fri Aug 02 05:01:07 2002 +0000
+++ b/src/gaim.h	Fri Aug 02 05:19:52 2002 +0000
@@ -433,8 +433,14 @@
 extern time_t get_time(int, int, int, int, int, int);
 extern FILE *gaim_mkstemp(gchar **);
 extern char *convert_string(char *, const char *, const char *);
+
+#ifdef HAVE_LANGINFO_CODESET
 #define utf8_to_str(in) convert_string(in, nl_langinfo(CODESET), "UTF-8");
 #define str_to_utf8(in) convert_string(in, "UTF-8", nl_langinfo(CODESET));
+#else
+#define utf8_to_str(in) convert_string(in, "ISO-8859-1", "UTF-8");
+#define str_to_utf8(in) convert_string(in, "UTF-8", "ISO-8859-1");
+#endif
 
 /*------------------------------------------------------------------------*/
 /*  Multi-Entry dialog and vCard dialog support                           */
--- a/src/util.c	Fri Aug 02 05:01:07 2002 +0000
+++ b/src/util.c	Fri Aug 02 05:19:52 2002 +0000
@@ -1121,6 +1121,7 @@
 
 char *convert_string(char *str, const char *destset, const char *srcset)
 {
+#ifdef HAVE_ICONV
 	char *buf;
 	iconv_t cd;
 	size_t insize = 0;
@@ -1158,6 +1159,8 @@
 	g_free(buf);
 
 	return ret;
+#else
+	return g_strdup(str);
 }
 
 void strip_linefeed(gchar *text)