Revision: 7284
http://svn.sourceforge.net/mahogany/?rev=7284&view=rev
Author: vadz
Date: 2007-06-12 17:05:23 -0700 (Tue, 12 Jun 2007)
Log Message:
-----------
more Unicode compilation fixes
Modified Paths:
--------------
trunk/M/src/classes/QuotedText.cpp
trunk/M/src/gui/wxComposeView.cpp
trunk/M/src/gui/wxMenuDefs.cpp
trunk/M/src/mail/Address.cpp
trunk/M/src/modules/LayoutViewer.cpp
trunk/M/src/modules/crypt/PGPEngine.cpp
trunk/M/src/modules/spam/HeadersFilter.cpp
trunk/M/src/modules/viewflt/PGP.cpp
trunk/M/src/util/ColourNames.cpp
trunk/M/src/util/strutil.cpp
Modified: trunk/M/src/classes/QuotedText.cpp
===================================================================
--- trunk/M/src/classes/QuotedText.cpp 2007-06-06 22:42:28 UTC (rev 7283)
+++ trunk/M/src/classes/QuotedText.cpp 2007-06-13 00:05:23 UTC (rev 7284)
@@ -109,7 +109,7 @@
// find the beginning of the and next line
- const wxChar *nextStart = wxStrchr(string, '\n');
+ const wxChar *nextStart = wxStrchr(string, _T('\n'));
// it's simpler to pretend that the next line is the same as this one
// instead of checking for it all the time below
@@ -231,7 +231,8 @@
if ( next - string > 50 )
{
// we also check "wrapped" line is short enough
- const wxChar *nextnext = wxStrchr(nextStart + 1 /* skip \n */,
'\n');
+ const wxChar *nextnext = wxStrchr(nextStart + 1 /* skip \n */,
+ _T('\n'));
if ( !nextnext ||
(nextnext - next > 25) ||
(!IsBlankLine(nextnext + 1) &&
Modified: trunk/M/src/gui/wxComposeView.cpp
===================================================================
--- trunk/M/src/gui/wxComposeView.cpp 2007-06-06 22:42:28 UTC (rev 7283)
+++ trunk/M/src/gui/wxComposeView.cpp 2007-06-13 00:05:23 UTC (rev 7284)
@@ -2845,7 +2845,7 @@
for ( const wxChar *pc = pcStart; ; )
{
// find and skip over the next macro occurence
- pc = wxStrchr(pc, '$');
+ pc = wxStrchr(pc, _T('$'));
if ( !pc++ )
break;
Modified: trunk/M/src/gui/wxMenuDefs.cpp
===================================================================
--- trunk/M/src/gui/wxMenuDefs.cpp 2007-06-06 22:42:28 UTC (rev 7283)
+++ trunk/M/src/gui/wxMenuDefs.cpp 2007-06-13 00:05:23 UTC (rev 7284)
@@ -659,7 +659,7 @@
#ifdef DEBUG
const wxString label(wxGetTranslation(GetMenuItem(n).label));
if ( !label.empty() ) {
- const wxChar *p = wxStrchr(label, '&');
+ const wxChar *p = wxStrchr(label, _T('&'));
if ( p == NULL ) {
wxLogWarning(_T("Menu label '%s' doesn't have keyboard
accelerator."),
label.c_str());
Modified: trunk/M/src/mail/Address.cpp
===================================================================
--- trunk/M/src/mail/Address.cpp 2007-06-06 22:42:28 UTC (rev 7283)
+++ trunk/M/src/mail/Address.cpp 2007-06-13 00:05:23 UTC (rev 7284)
@@ -295,7 +295,7 @@
// we need to quote the personal part if it's not an atext as defined by RFC
// 2822 (TODO: reuse IsATextChar() from matchurl.cpp!)
- bool doQuote = wxStrpbrk(name, _T(",;\"")) != (const wxChar *)NULL;
+ bool doQuote = wxStrpbrk(name, ",;\"") != NULL;
if ( doQuote )
{
address = _T('"');
Modified: trunk/M/src/modules/LayoutViewer.cpp
===================================================================
--- trunk/M/src/modules/LayoutViewer.cpp 2007-06-06 22:42:28 UTC (rev
7283)
+++ trunk/M/src/modules/LayoutViewer.cpp 2007-06-13 00:05:23 UTC (rev
7284)
@@ -587,7 +587,7 @@
do
{
const wxChar *p0 = text;
- const wxChar *p = wxStrchr(p0, '\n');
+ const wxChar *p = wxStrchr(p0, _T('\n'));
if ( p )
{
textRest = text.substr(p - p0 + 1);
Modified: trunk/M/src/modules/crypt/PGPEngine.cpp
===================================================================
--- trunk/M/src/modules/crypt/PGPEngine.cpp 2007-06-06 22:42:28 UTC (rev
7283)
+++ trunk/M/src/modules/crypt/PGPEngine.cpp 2007-06-13 00:05:23 UTC (rev
7284)
@@ -448,7 +448,7 @@
}
else if ( code == _T("IMPORTED") )
{
- const wxChar * const pSpace = wxStrchr(pc, ' ');
+ const wxChar * const pSpace = wxStrchr(pc, _T(' '));
if ( pSpace )
{
log->SetPublicKey(String(pc, pSpace));
Modified: trunk/M/src/modules/spam/HeadersFilter.cpp
===================================================================
--- trunk/M/src/modules/spam/HeadersFilter.cpp 2007-06-06 22:42:28 UTC (rev
7283)
+++ trunk/M/src/modules/spam/HeadersFilter.cpp 2007-06-13 00:05:23 UTC (rev
7284)
@@ -553,15 +553,16 @@
// we look for at least that many consecutive spaces before starting looking
// for a junk tail
static const size_t NUM_SPACES = 6;
+ static const wxChar *SPACES = _T(" ");
// and the tail should have at least that many symbols
static const size_t LEN_TAIL = 4;
- // and the sumb of both should be at least equal to this (very short tails
+ // and the sum of both should be at least equal to this (very short tails
// without many preceding spaces could occur in a legal message)
static const size_t LEN_SPACES_AND_TAIL = 15;
- const wxChar *p = wxStrstr(subject, String(_T(' '), NUM_SPACES));
+ const wxChar *p = wxStrstr(subject, SPACES);
if ( !p )
return false;
@@ -748,8 +749,8 @@
}
// check if the domains match
- const wxChar *domain1 = wxStrchr(pc, '.'),
- *domain2 = wxStrchr(pc2, '.');
+ const wxChar *domain1 = wxStrchr(pc, _T('.')),
+ *domain2 = wxStrchr(pc2, _T('.'));
if ( !domain1 || !domain2 )
{
Modified: trunk/M/src/modules/viewflt/PGP.cpp
===================================================================
--- trunk/M/src/modules/viewflt/PGP.cpp 2007-06-06 22:42:28 UTC (rev 7283)
+++ trunk/M/src/modules/viewflt/PGP.cpp 2007-06-13 00:05:23 UTC (rev 7284)
@@ -174,7 +174,7 @@
if ( !*p )
break;
- p = wxStrchr(start, '\n');
+ p = wxStrchr(start, _T('\n'));
if ( !p )
break; // no more text
Modified: trunk/M/src/util/ColourNames.cpp
===================================================================
--- trunk/M/src/util/ColourNames.cpp 2007-06-06 22:42:28 UTC (rev 7283)
+++ trunk/M/src/util/ColourNames.cpp 2007-06-13 00:05:23 UTC (rev 7284)
@@ -38,7 +38,7 @@
// first check if it's a RGB specification
int red, green, blue;
- if ( wxSscanf(name, customColourString, &red, &green, &blue) == 3 )
+ if ( wxSscanf(name.wx_str(), customColourString, &red, &green, &blue) == 3 )
{
// it's a custom colour
if ( colour )
Modified: trunk/M/src/util/strutil.cpp
===================================================================
--- trunk/M/src/util/strutil.cpp 2007-06-06 22:42:28 UTC (rev 7283)
+++ trunk/M/src/util/strutil.cpp 2007-06-13 00:05:23 UTC (rev 7284)
@@ -356,7 +356,7 @@
String
strutil_getfilename(const String& path)
{
- const wxChar *pLast1 = wxStrrchr(path, '/');
+ const wxChar *pLast1 = wxStrrchr(path, _T('/'));
size_t nPos1 = pLast1 ? pLast1 - path.c_str() : 0;
// under Windows we understand both '/' and '\\' as path separators, but
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates