From: Pierre Habouzit Date: Thu, 16 Aug 2007 07:55:40 +0000 (+0200) Subject: Rewrite is_from efficiently, and put it in lib-mime where it belongs. X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=cfe08f2ca21af629f74268f1f1425a5fec0494cd Rewrite is_from efficiently, and put it in lib-mime where it belongs. Signed-off-by: Pierre Habouzit --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8637b37..67bede3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -288,7 +288,6 @@ MADMUTT_SOURCES(madmuttsrc madmuttgen copy.c editmsg.c flags.c - from.c handler.c headers.c help.c diff --git a/from.c b/from.c deleted file mode 100644 index 5931789..0000000 --- a/from.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright notice from original mutt: - * Copyright (C) 1996-2000 Michael R. Elkins - * - * This file is part of mutt-ng, see http://www.muttng.org/. - * It's licensed under the GNU General Public License, - * please see the file GPL in the top level source directory. - */ - -#include - -#include "mutt.h" - -int mutt_check_month (const char *s) -{ - int i; - - for (i = 0; i < 12; i++) - if (m_strncasecmp(s, Months[i], 3) == 0) - return (i); - return (-1); /* error */ -} - -static int is_day_name (const char *s) -{ - int i; - - if ((m_strlen(s) < 3) || !*(s + 3) || !ISSPACE (*(s + 3))) - return 0; - for (i = 0; i < 7; i++) - if (m_strncasecmp(s, Weekdays[i], 3) == 0) - return 1; - return 0; -} - -/* - * A valid message separator looks like: - * - * From [ ]