X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=from.c;h=59317898ca6eb5d91e7c1489554971202f6e28e8;hp=37ae147469c58162cb3b9eee7b4de300c368835f;hb=6ebff74ad242d4c56fb7762965b19cee14fd2daa;hpb=18ff9999274c2154db35366296639d26792f977e diff --git a/from.c b/from.c index 37ae147..5931789 100644 --- a/from.c +++ b/from.c @@ -7,16 +7,7 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include - -#include -#include -#include +#include #include "mutt.h" @@ -60,6 +51,7 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) return 0; s = m_strnextsp(s); /* skip over the From part. */ + s = skipspaces(s); if (!*s) return 0; @@ -99,6 +91,7 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) } s = m_strnextsp(s); + s = skipspaces(s); if (!*s) return 0; @@ -108,6 +101,7 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) */ if (is_day_name (s)) { s = m_strnextsp(s); + s = skipspaces(s); if (!*s) return 0; } @@ -118,6 +112,7 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) /* day */ s = m_strnextsp(s); + s = skipspaces(s); if (!*s) return 0; if (sscanf (s, "%d", &tm.tm_mday) != 1) @@ -125,6 +120,7 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) /* time */ s = m_strnextsp(s); + s = skipspaces(s); if (!*s) return 0; @@ -136,12 +132,14 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) return 0; s = m_strnextsp(s); + s = skipspaces(s); if (!*s) return 0; /* timezone? */ if (isalpha ((unsigned char) *s) || *s == '+' || *s == '-') { s = m_strnextsp(s); + s = skipspaces(s); if (!*s) return 0; @@ -151,6 +149,7 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) */ if (isalpha ((unsigned char) *s)) { s = m_strnextsp(s); + s = skipspaces(s); if (!*s) return 0; }