[ekg2-commit] ekg2: stuff.c (HEAD) [darkjames]

CVS commit cvs w toxygen.net
Czw, 3 Maj 2007, 00:31:48 CEST


Module name:	ekg2
Changes by:	darkjames	2007-05-03 00:31:46

Modified files:
	stuff.c

Log message:
fix connecting to tlen when we have ISO-8859-2 term.

Index: stuff.c
===================================================================
RCS file: /home/cvs/ekg2/ekg/stuff.c,v
diff -d -u -r1.191 -r1.192
--- stuff.c	2 May 2007 20:57:20 -0000	1.191
+++ stuff.c	2 May 2007 22:31:45 -0000	1.192
@@ -2855,6 +2855,9 @@
 	int		rev_used;	/**< Like above, but for rev; if !rev, value undefined */
 	int		is_utf;	/**< Used internally for mutt_convert_string() */
 };
+
+static iconv_t iconv_same;
+
 #endif
 
 /**
@@ -2881,8 +2884,8 @@
 		to	= config_console_charset;
 	if (!xstrcasecmp(from, to)) { /* if they're the same */
 		if (rev)
-			*rev = NULL;
-		return NULL;
+			*rev = &iconv_same;
+		return &iconv_same;
 	}
 
 		/* maybe we've already got some converter for this charsets */
@@ -2978,6 +2981,9 @@
 	if (!ptr) /* we can be called with NULL ptr */
 		return;
 
+	if (ptr == &iconv_same)
+		return;
+
 	for (lp = ekg_converters; lp; lp = lp->next) {
 		struct ekg_converter *c = lp->data;
 
@@ -3037,6 +3043,9 @@
 	list_t lp;
 	int is_utf = 0;
 
+	if (ptr == &iconv_same)
+		return xstrdup(ps);
+
 	if (!ps || !*ps || !ptr)
 		return NULL;
 


Więcej informacji o liście dyskusyjnej ekg2-commit