Update of /cvsroot/mahogany/M/src/util
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31057/src/util

Modified Files:
        strutil.cpp 
Log Message:
removed DetectSignature class, unused now

Index: strutil.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/util/strutil.cpp,v
retrieving revision 1.132
retrieving revision 1.133
diff -b -u -2 -r1.132 -r1.133
--- strutil.cpp 11 Jul 2004 12:55:44 -0000      1.132
+++ strutil.cpp 14 Jul 2004 16:17:07 -0000      1.133
@@ -54,5 +54,4 @@
 extern const MOption MP_CRYPT_TWOFISH_OK;
 extern const MOption MP_MBOXDIR;
-extern const MOption MP_REPLY_SIG_SEPARATOR;
 
 // ----------------------------------------------------------------------------
@@ -1446,84 +1445,2 @@
 }
 
-DetectSignature::DetectSignature()
-{
-#if wxUSE_REGEX
-   // don't use RE at all by default because the manual code is faster
-   m_useRE = false;
-#endif
-}
-
-// Don't inline it with wxRegEx destructor call
-DetectSignature::~DetectSignature() {}
-
-bool DetectSignature::Initialize(Profile *profile)
-{
-#if wxUSE_REGEX
-   String sig = READ_CONFIG(profile, MP_REPLY_SIG_SEPARATOR);
-
-   if ( sig != GetStringDefault(MP_REPLY_SIG_SEPARATOR) )
-   {
-      // we have no choice but to use the user-supplied RE
-      m_reSig.reset(new wxRegEx);
-
-      // we implicitly anchor the RE at start/end of line
-      //
-      // VZ: couldn't we just use wxRE_NEWLINE in Compile() instead of "\r\n"?
-      String sigRE;
-      sigRE << '^' << sig << _T("\r\n");
-
-      if ( !m_reSig->Compile(sigRE, wxRE_NOSUB) )
-      {
-         wxLogError(_("Regular expression '%s' used for detecting the "
-                      "signature start is invalid, please modify it."),
-                    sigRE.c_str());
-
-         return false;
-      }
-      
-      m_useRE = true;
-   }
-#endif // wxUSE_REGEX
-   return true;
-}
-
-bool DetectSignature::StartsHere(const wxChar *cptr)
-{
-   bool isSig = false;
-#if wxUSE_REGEX
-   if ( m_useRE )
-   {
-      isSig = m_reSig->Matches(cptr);
-   }
-   else
-#endif // wxUSE_REGEX
-   {
-      // hard coded detection for standard signature separator "--"
-      // and the mailing list trailer "____...___"
-      if ( cptr[0] == '-' && cptr[1] == '-' )
-      {
-         // there may be an optional space after "--" (in fact the
-         // space should be there but some people don't put it)
-         const wxChar *p = cptr + 2;
-         if ( IsEndOfLine(p) || (*p == ' ' && IsEndOfLine(p + 1)) )
-         {
-            // looks like the start of the sig
-            isSig = true;
-         }
-      }
-      else if ( cptr[0] == '_' )
-      {
-         const wxChar *p = cptr + 1;
-         while ( *p == '_' )
-            p++;
-
-         // consider that there should be at least 5 underscores...
-         if ( IsEndOfLine(p) && p - cptr >= 5 )
-         {
-            // looks like the mailing list trailer
-            isSig = true;
-         }
-      }
-   }
-   return isSig;
-}



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to