Neglect any leading whitespace in the header contents.
2000-11-13 Jeffrey Stedfast <fejj@helixcode.com> * filter-message-search.c (header_matches): Neglect any leading whitespace in the header contents. (header_starts_with): Same. (header_ends_with): Same. (header_soundex): Same. svn path=/trunk/; revision=6562
This commit is contained in:
committed by
Jeffrey Stedfast
parent
cd92ba2727
commit
ba34e2908d
@ -1,3 +1,11 @@
|
||||
2000-11-13 Jeffrey Stedfast <fejj@helixcode.com>
|
||||
|
||||
* filter-message-search.c (header_matches): Neglect any leading
|
||||
whitespace in the header contents.
|
||||
(header_starts_with): Same.
|
||||
(header_ends_with): Same.
|
||||
(header_soundex): Same.
|
||||
|
||||
2000-11-12 Jeffrey Stedfast <fejj@helixcode.com>
|
||||
|
||||
* filter-driver.c (filter_driver_filter_message): If there is a
|
||||
|
||||
@ -124,6 +124,9 @@ header_matches (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMe
|
||||
gboolean is_lowercase = TRUE;
|
||||
char *c;
|
||||
|
||||
/* remove any leading white space... */
|
||||
for ( ; *contents && isspace (*contents); contents++);
|
||||
|
||||
for (c = match; *c; c++) {
|
||||
if (isalpha (*c) && isupper (*c)) {
|
||||
is_lowercase = FALSE;
|
||||
@ -131,6 +134,8 @@ header_matches (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMe
|
||||
}
|
||||
}
|
||||
|
||||
printf ("comparing: '%s' with '%s'\n", contents, match);
|
||||
|
||||
if (is_lowercase) {
|
||||
if (!g_strcasecmp (contents, match))
|
||||
matched = TRUE;
|
||||
@ -168,6 +173,9 @@ header_starts_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, Filt
|
||||
gboolean is_lowercase = TRUE;
|
||||
char *c;
|
||||
|
||||
/* remove any leading white space... */
|
||||
for ( ; *contents && isspace (*contents); contents++);
|
||||
|
||||
for (c = match; *c; c++) {
|
||||
if (isalpha (*c) && isupper (*c)) {
|
||||
is_lowercase = FALSE;
|
||||
@ -212,6 +220,9 @@ header_ends_with (struct _ESExp *f, int argc, struct _ESExpResult **argv, Filter
|
||||
gboolean is_lowercase = TRUE;
|
||||
char *c, *end;
|
||||
|
||||
/* remove any leading white space... */
|
||||
for ( ; *contents && isspace (*contents); contents++);
|
||||
|
||||
for (c = match; *c; c++) {
|
||||
if (isalpha (*c) && isupper (*c)) {
|
||||
is_lowercase = FALSE;
|
||||
@ -323,6 +334,9 @@ header_soundex (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMe
|
||||
contents = camel_medium_get_header (CAMEL_MEDIUM (fms->message), header);
|
||||
|
||||
if (contents) {
|
||||
/* remove any leading white space... */
|
||||
for ( ; *contents && isspace (*contents); contents++);
|
||||
|
||||
if (!soundexcmp (contents, match))
|
||||
matched = TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user