From 18ff9999274c2154db35366296639d26792f977e Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Thu, 16 Nov 2006 18:53:35 +0100 Subject: [PATCH] next_word is m_strnextsp Signed-off-by: Pierre Habouzit --- from.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/from.c b/from.c index 7122052..37ae147 100644 --- a/from.c +++ b/from.c @@ -20,14 +20,6 @@ #include "mutt.h" -static const char *next_word(const char *s) -{ - while (*s && !ISSPACE(*s)) - s++; - s = skipspaces(s); - return s; -} - int mutt_check_month (const char *s) { int i; @@ -67,7 +59,7 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) if (m_strncmp("From ", s, 5) != 0) return 0; - s = next_word (s); /* skip over the From part. */ + s = m_strnextsp(s); /* skip over the From part. */ if (!*s) return 0; @@ -106,7 +98,7 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) } } - s = next_word (s); + s = m_strnextsp(s); if (!*s) return 0; @@ -115,7 +107,7 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) * is the same as a three-letter abbreviation of the day of the week. */ if (is_day_name (s)) { - s = next_word (s); + s = m_strnextsp(s); if (!*s) return 0; } @@ -125,14 +117,14 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) return 0; /* day */ - s = next_word (s); + s = m_strnextsp(s); if (!*s) return 0; if (sscanf (s, "%d", &tm.tm_mday) != 1) return 0; /* time */ - s = next_word (s); + s = m_strnextsp(s); if (!*s) return 0; @@ -143,13 +135,13 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) else return 0; - s = next_word (s); + s = m_strnextsp(s); if (!*s) return 0; /* timezone? */ if (isalpha ((unsigned char) *s) || *s == '+' || *s == '-') { - s = next_word (s); + s = m_strnextsp(s); if (!*s) return 0; @@ -158,7 +150,7 @@ int is_from (const char *s, char *path, ssize_t pathlen, time_t * tp) * From xxxx@yyyyyyy.fr Wed Aug 2 00:39:12 MET DST 1995 */ if (isalpha ((unsigned char) *s)) { - s = next_word (s); + s = m_strnextsp(s); if (!*s) return 0; } -- 2.20.1