windows: mh_mbox reverted the test for From lines...
This commit is contained in:
parent
813b87722b
commit
5ba0be5e58
@ -22,10 +22,15 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include "safesysstat.h"
|
#include "safesysstat.h"
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#ifndef _WIN32
|
|
||||||
#include <regex.h>
|
#if 1 || defined(_WIN32)
|
||||||
#else
|
#define USING_STD_REGEX
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USING_STD_REGEX
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
#else
|
||||||
|
#include <regex.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -387,17 +392,16 @@ static const char *frompat =
|
|||||||
// exactly like: From ^M (From followed by space and eol). We only
|
// exactly like: From ^M (From followed by space and eol). We only
|
||||||
// test for this if QUIRKS_TBIRD is set
|
// test for this if QUIRKS_TBIRD is set
|
||||||
static const char *miniTbirdFrom = "^From $";
|
static const char *miniTbirdFrom = "^From $";
|
||||||
#ifndef _WIN32
|
#ifndef USING_STD_REGEX
|
||||||
static regex_t fromregex;
|
static regex_t fromregex;
|
||||||
static regex_t minifromregex;
|
static regex_t minifromregex;
|
||||||
#define M_regexec(A,B,C,D,E) regexec(&(A),B,C,D,E)
|
#define M_regexec(A,B,C,D,E) regexec(&(A),B,C,D,E)
|
||||||
#else
|
#else
|
||||||
basic_regex<char> fromregex;
|
basic_regex<char> fromregex;
|
||||||
basic_regex<char> minifromregex;
|
basic_regex<char> minifromregex;
|
||||||
#define REG_ICASE std::regex_constants::icase
|
|
||||||
#define REG_NOSUB std::regex_constants::nosubs
|
#define REG_NOSUB std::regex_constants::nosubs
|
||||||
#define REG_EXTENDED std::regex_constants::extended
|
#define REG_EXTENDED std::regex_constants::extended
|
||||||
#define M_regexec(A, B, C, D, E) regex_match(B,A)
|
#define M_regexec(A, B, C, D, E) (!regex_match(B,A))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -412,7 +416,7 @@ static void compileregexes()
|
|||||||
// that we are alone.
|
// that we are alone.
|
||||||
if (regcompiled)
|
if (regcompiled)
|
||||||
return;
|
return;
|
||||||
#ifndef _WIN32
|
#ifndef USING_STD_REGEX
|
||||||
regcomp(&fromregex, frompat, REG_NOSUB|REG_EXTENDED);
|
regcomp(&fromregex, frompat, REG_NOSUB|REG_EXTENDED);
|
||||||
regcomp(&minifromregex, miniTbirdFrom, REG_NOSUB|REG_EXTENDED);
|
regcomp(&minifromregex, miniTbirdFrom, REG_NOSUB|REG_EXTENDED);
|
||||||
#else
|
#else
|
||||||
@ -516,7 +520,7 @@ bool MimeHandlerMbox::next_document()
|
|||||||
((m_quirks & MBOXQUIRK_TBIRD) &&
|
((m_quirks & MBOXQUIRK_TBIRD) &&
|
||||||
!M_regexec(minifromregex, line, 0, 0, 0)))
|
!M_regexec(minifromregex, line, 0, 0, 0)))
|
||||||
) {
|
) {
|
||||||
LOGDEB1(("MimeHandlerMbox: msgnum %d, "
|
LOGDEB0(("MimeHandlerMbox: msgnum %d, "
|
||||||
"From_ at line %d: [%s]\n", m_msgnum, m_lineno, line));
|
"From_ at line %d: [%s]\n", m_msgnum, m_lineno, line));
|
||||||
if (storeoffsets)
|
if (storeoffsets)
|
||||||
m_offsets.push_back(message_end);
|
m_offsets.push_back(message_end);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user