Update of /cvsroot/mahogany/M/src/modules/viewflt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21849/src/modules/viewflt

Modified Files:
        QuoteURL.cpp 
Log Message:
accept different quote markers in the same message as long as they use '>'

Index: QuoteURL.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/viewflt/QuoteURL.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -b -u -2 -r1.25 -r1.26
--- QuoteURL.cpp        23 Oct 2004 23:16:55 -0000      1.25
+++ QuoteURL.cpp        11 Nov 2004 21:36:56 -0000      1.26
@@ -88,4 +88,6 @@
    void SetQuoteAtLevel(size_t level, const String& s)
    {
+      if ( level >= m_quoteAtLevel.size() )
+      {
       ASSERT_MSG( level == m_quoteAtLevel.size(),
                      _T("should set quote prefixes in order") );
@@ -93,4 +95,9 @@
       m_quoteAtLevel.push_back(s);
    }
+      else // modify existing quote
+      {
+         m_quoteAtLevel[level] = s;
+      }
+   }
 
    const String& GetQuoteAtLevel(size_t level) const
@@ -356,8 +363,8 @@
             break;
 
-         // '*' is too often used for other purposes, check that we really have
-         // something like a whole paragraph quoted with it before deciding
-         // that we really should accept it as a quoting character
-         if ( *c == '*' && *next != *c )
+         // '*' and '}' are too often used for other purposes, check that we
+         // really have something like a whole paragraph quoted with it before
+         // deciding that we really should accept it as a quoting character
+         if ( (*c == '*' || *c == '}') && *next != *c )
             break;
 
@@ -369,5 +376,13 @@
          if ( wxStrncmp(lastQuote, quoteData.GetQuoteAtLevel(level),
                            c - lastQuote + 1) != 0 )
+         {
+            // consider that '>' is always a "true" quote character...
+            // otherwise we fail to recognize too many strange messages where
+            // different quoting styles are used
+            if ( *c != '>' )
             break;
+
+            quoteData.SetQuoteAtLevel(level, String(lastQuote, c + 1));
+         }
       }
 



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to