Update of /cvsroot/mahogany/M/src/mail
In directory usw-pr-cvs1:/tmp/cvs-serv570/src/mail

Modified Files:
        MessageCC.cpp 
Log Message:
return the values of all headers with the given name from GetHeaderLine[s] 
concatenated instead of only the first one

Index: MessageCC.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MessageCC.cpp,v
retrieving revision 1.129
retrieving revision 1.130
diff -b -u -2 -r1.129 -r1.130
--- MessageCC.cpp       11 Jun 2002 20:22:28 -0000      1.129
+++ MessageCC.cpp       8 Jul 2002 14:24:25 -0000       1.130
@@ -597,4 +597,8 @@
    bool inName = true;
 
+   // the index of the header name for the current header in names or
+   // wxNOT_FOUND if this is a header we hadn't seen yet
+   int idxName = wxNOT_FOUND;
+
    // note that we can stop when *pc == 0 as the header must be terminated
    // by "\r\n" preceding it anyhow
@@ -643,5 +647,13 @@
                if ( pc[1] != ' ' && pc[1] != '\t' )
                {
+                  if ( idxName == wxNOT_FOUND )
+                  {
                   values.Add(s);
+                  }
+                  else // add to the previous value
+                  {
+                     values[(size_t)idxName] << "\r\n" << s;
+                  }
+
                   inName = true;
 
@@ -660,5 +672,12 @@
             if ( inName )
             {
+               idxName = names.Index(s);
+               if ( idxName == wxNOT_FOUND )
+               {
+                  // a new header
                names.Add(s);
+               }
+               //else: will append to the previous value
+
                if ( *++pc != ' ' )
                {



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Oh, it's good to be a geek.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to