( cvs diff -u -r 1.60.2.10 -r 1.60.2.11 src/addressbook.c; ) > 0.9.12cvs108.1.patchset
( cvs diff -u -r 1.207.2.15 -r 1.207.2.16 src/folderview.c; ) > 0.9.12cvs110.1.patchset
( cvs diff -u -r 1.207.2.16 -r 1.207.2.17 src/folderview.c; cvs diff -u -r 1.274.2.19 -r 1.274.2.20 src/mainwindow.c; ) > 0.9.12cvs112.1.patchset
+( cvs diff -u -r 1.654.2.215 -r 1.654.2.216 configure.ac; cvs diff -u -r 1.22.2.2 -r 1.22.2.3 src/quote_fmt_parse.y; ) > 0.9.12cvs113.1.patchset
guchar *p;
gchar *str;
- str = alloca(strlen(msginfo->fromname) + 1);
- if (str != NULL) {
- strcpy(str, msginfo->fromname);
- p = str;
- while (*p && !isspace(*p)) p++;
- *p = '\0';
- INSERT(str);
+ p = strchr(msginfo->fromname, ',');
+ if (p != NULL) {
+ /* fromname is like "Duck, Donald" */
+ p++;
+ while (*p && isspace(*p)) p++;
+ str = alloca(strlen(p) + 1);
+ if (str != NULL) {
+ strcpy(str, p);
+ INSERT(str);
+ }
+ } else {
+ /* fromname is like "Donald Duck" */
+ str = alloca(strlen(msginfo->fromname) + 1);
+ if (str != NULL) {
+ strcpy(str, msginfo->fromname);
+ p = str;
+ while (*p && !isspace(*p)) p++;
+ *p = '\0';
+ INSERT(str);
+ }
}
}
}
str = alloca(strlen(msginfo->fromname) + 1);
if (str != NULL) {
strcpy(str, msginfo->fromname);
- p = str;
- while (*p && !isspace(*p)) p++;
- if (*p) {
- /* We found a space. Get first none-space char and
- insert rest of string from there. */
- while (*p && isspace(*p)) p++;
- if (*p) {
- INSERT(p);
- } else {
- /* If there is no none-space char, just insert
- whole fromname. */
+ p = strchr(str, ',');
+ if (p != NULL) {
+ /* fromname is like "Duck, Donald" */
+ *p = '\0';
INSERT(str);
- }
} else {
- /* If there is no space, just insert whole fromname. */
- INSERT(str);
+ /* fromname is like "Donald Duck" */
+ p = str;
+ while (*p && !isspace(*p)) p++;
+ if (*p) {
+ /* We found a space. Get first
+ none-space char and insert
+ rest of string from there. */
+ while (*p && isspace(*p)) p++;
+ if (*p) {
+ INSERT(p);
+ } else {
+ /* If there is no none-space
+ char, just insert whole
+ fromname. */
+ INSERT(str);
+ }
+ } else {
+ /* If there is no space, just
+ insert whole fromname. */
+ INSERT(str);
+ }
}
}
}