Update of /cvsroot/mahogany/M/src/mail
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21687/src/mail
Modified Files:
MailFolder.cpp
Log Message:
changed MailFolder::SaveMessageAsMBOX() to take ptr+len instead of a String (it is
wasteful as leads to unnecessary copy)
Index: MailFolder.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/MailFolder.cpp,v
retrieving revision 1.312
retrieving revision 1.313
diff -b -u -2 -r1.312 -r1.313
--- MailFolder.cpp 16 Jul 2004 10:31:23 -0000 1.312
+++ MailFolder.cpp 13 Aug 2004 21:53:43 -0000 1.313
@@ -1201,7 +1201,10 @@
/* static */
-bool MailFolder::SaveMessageAsMBOX(const String& filename, const wxChar *content)
+bool
+MailFolder::SaveMessageAsMBOX(const String& filename,
+ const void *content,
+ size_t len)
{
- wxFile out(filename, wxFile::write);
+ wxFile out(filename, wxFile::write_append);
bool ok = out.IsOpened();
if ( ok )
@@ -1215,5 +1218,6 @@
// find the from address
static const wxChar *FROM_HEADER = _T("From: ");
- const wxChar *p = wxStrstr(content, FROM_HEADER);
+ const wxChar *
+ p = wxStrstr(static_cast<const char *>(content), FROM_HEADER);
if ( !p )
{
@@ -1252,5 +1256,4 @@
{
// write the body
- size_t len = wxStrlen(content);
ok = out.Write(content, len) == len;
}
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates