2005-05-30 [colin] 1.9.11cvs22
authorColin Leroy <colin@colino.net>
Mon, 30 May 2005 20:12:57 +0000 (20:12 +0000)
committerColin Leroy <colin@colino.net>
Mon, 30 May 2005 20:12:57 +0000 (20:12 +0000)
* src/common/utils.c
Fix bug #651 (Confused Attract by Subject)
Patch by M. Benkmann <haferfrost@web.de>
* AUTHORS

AUTHORS
ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/common/utils.c

diff --git a/AUTHORS b/AUTHORS
index e1d53a0..6902eb8 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -225,4 +225,4 @@ contributors (beside the above; based on Changelog)
        Markus Schwarzenberg
        Luca Cavalli
        Tim Mann
-
+       M. Benkmann
index 475ddfe..0907a4f 100644 (file)
@@ -1,3 +1,10 @@
+2005-05-30 [colin]     1.9.11cvs22
+
+       * src/common/utils.c
+               Fix bug #651 (Confused Attract by Subject)
+               Patch by M. Benkmann <haferfrost@web.de>
+       * AUTHORS
+
 2005-05-30 [colin]     1.9.11cvs21
 
        * src/compose.c
index 116c127..0098222 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 0 -r 1 doc/src/rfc2368.txt; cvs diff -u -r 1.382.2.121 -r 1.382.2.122 src/compose.c; ) > 1.9.11cvs19.patchset
 ( cvs diff -u -r 1.2.4.6 -r 1.2.4.7 src/common/template.c; ) > 1.9.11cvs20.patchset
 ( cvs diff -u -r 1.382.2.122 -r 1.382.2.123 src/compose.c; cvs diff -u -r 1.52.2.10 -r 1.52.2.11 src/prefs_folder_item.c; cvs diff -u -r 1.49.2.41 -r 1.49.2.42 src/procmime.c; ) > 1.9.11cvs21.patchset
+( cvs diff -u -r 1.36.2.30 -r 1.36.2.31 src/common/utils.c; cvs diff -u -r 1.100.2.20 -r 1.100.2.21 AUTHORS; ) > 1.9.11cvs22.patchset
index 4983469..ca5d4e5 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=21
+EXTRA_VERSION=22
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 369fe16..c6772ee 100644 (file)
@@ -636,34 +636,38 @@ void trim_subject_for_sort(gchar *str)
 
 void trim_subject(gchar *str)
 {
-       register guchar *srcp, *destp;
+       register guchar *srcp;
        gchar op, cl;
        gint in_brace;
+       
+       g_strstrip(str);
 
-       destp = str + subject_get_prefix_length(str);
+       srcp = str + subject_get_prefix_length(str);
 
-       if (*destp == '[') {
+       if (*srcp == '[') {
                op = '[';
                cl = ']';
-       } else if (*destp == '(') {
+       } else if (*srcp == '(') {
                op = '(';
                cl = ')';
        } else
-               return;
+               op = 0;
 
-       srcp = destp + 1;
-       in_brace = 1;
-       while (*srcp) {
-               if (*srcp == op)
-                       in_brace++;
-               else if (*srcp == cl)
-                       in_brace--;
-               srcp++;
-               if (in_brace == 0)
-                       break;
+       if (op) {
+               ++srcp;
+               in_brace = 1;
+               while (*srcp) {
+                       if (*srcp == op)
+                               in_brace++;
+                       else if (*srcp == cl)
+                               in_brace--;
+                       srcp++;
+                       if (in_brace == 0)
+                               break;
+               }
        }
        while (isspace(*srcp)) srcp++;
-       memmove(destp, srcp, strlen(srcp) + 1);
+       memmove(str, srcp, strlen(srcp) + 1);
 }
 
 void eliminate_parenthesis(gchar *str, gchar op, gchar cl)