Update of /cvsroot/meshdb/src/mailt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8917
Modified Files:
Tag: leonard-dev
util.c
Log Message:
convert "=?iso-8859-1?q?Tony?" to "Tony" for yahoo emails
Index: util.c
===================================================================
RCS file: /cvsroot/meshdb/src/mailt/util.c,v
retrieving revision 1.1.1.1.2.1
retrieving revision 1.1.1.1.2.2
diff -u -d -r1.1.1.1.2.1 -r1.1.1.1.2.2
--- util.c 8 Nov 2004 12:55:34 -0000 1.1.1.1.2.1
+++ util.c 8 Nov 2004 13:31:20 -0000 1.1.1.1.2.2
@@ -26,6 +26,7 @@
int spaces = 0;
/*
+ * =?iso-8859-1?q?F S?= -> F S
* u@h -> u@h
* F S <u@h> -> F S
* "F S" <u@h> -> F S
@@ -42,6 +43,17 @@
*sp = s;
*ep = e;
+ /* Hooray! for! Yahoo! */
+ if (s + 15 < e && memcmp(s, "=?iso-8859-1?q?", 15) == 0) {
+ cstring_t f;
+ for (f = s + 15; f + 1 < e; f++)
+ if (f[0] == '?' && f[1] == '=') {
+ *sp = s + 15;
+ *ep = f;
+ return;
+ }
+ }
+
/* Skip, and record text in angled brackets */
if (s < e && *s == '<') {
s++;
|