Update of /cvsroot/mahogany/M/src/modules/viewflt
In directory sc8-pr-cvs1:/tmp/cvs-serv29342/src/modules/viewflt
Modified Files:
PGP.cpp QuoteURL.cpp Rot13.cpp Signature.cpp TextMarkup.cpp
Trailer.cpp
Log Message:
unicode fixes - it links now
Index: PGP.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/viewflt/PGP.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -b -u -2 -r1.19 -r1.20
--- PGP.cpp 18 Sep 2003 16:31:02 -0000 1.19
+++ PGP.cpp 13 Oct 2003 00:41:14 -0000 1.20
@@ -54,8 +54,8 @@
// all PGP messages in ASCII armour start with a line whose prefix is this
-#define PGP_BEGIN_PREFIX "-----BEGIN PGP "
+#define PGP_BEGIN_PREFIX _T("-----BEGIN PGP ")
// .. and suffix is that
-#define PGP_BEGIN_SUFFIX "MESSAGE-----"
+#define PGP_BEGIN_SUFFIX _T("MESSAGE-----")
// PGP signature block starts with this line
@@ -63,9 +63,9 @@
// end of the PGP encrypted message or signature block starts with this
-#define PGP_END_PREFIX "-----END PGP "
+#define PGP_END_PREFIX _T("-----END PGP ")
// end ends with either of those
-#define PGP_END_CRYPT_SUFFIX "MESSAGE-----"
-#define PGP_END_SIG_SUFFIX "SIGNATURE-----"
+#define PGP_END_CRYPT_SUFFIX _T("MESSAGE-----")
+#define PGP_END_SIG_SUFFIX _T("SIGNATURE-----")
// ============================================================================
@@ -81,5 +81,5 @@
false, // initially disabled
gettext_noop("PGP"),
- "(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>");
+ _T("(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>"));
// ----------------------------------------------------------------------------
@@ -144,8 +144,8 @@
// there should be a BEGIN line near the start of the message
bool foundBegin = false;
- const char *start = text.c_str();
+ const wxChar *start = text.c_str();
for ( size_t numLines = 0; numLines < 10; numLines++ )
{
- if ( strncmp(start, PGP_BEGIN_PREFIX, strlen(PGP_BEGIN_PREFIX)) == 0 )
+ if ( wxStrncmp(start, PGP_BEGIN_PREFIX, wxStrlen(PGP_BEGIN_PREFIX)) == 0 )
{
foundBegin = true;
@@ -155,5 +155,5 @@
// try the next line (but only if not already at the end)
if ( *start )
- start = strchr(start, '\n');
+ start = wxStrchr(start, '\n');
else
break;
@@ -167,7 +167,7 @@
{
// is the message just signed or encrypted?
- const char *tail = start + strlen(PGP_BEGIN_PREFIX);
+ const wxChar *tail = start + wxStrlen(PGP_BEGIN_PREFIX);
bool isKey = false;
- bool isSigned = strncmp(tail, "SIGNED ", 7 /* strlen("SIGNED ") */) == 0;
+ bool isSigned = wxStrncmp(tail, _T("SIGNED "), 7 /* strlen("SIGNED ") */) == 0;
if ( isSigned )
{
@@ -176,5 +176,5 @@
else
{
- isKey = strncmp(tail, "PUBLIC KEY ", 11 /* strlen("PUBLIC KEY ") */) == 0;
+ isKey = wxStrncmp(tail, _T("PUBLIC KEY "), 11 /* strlen("PUBLIC KEY ") */)
== 0;
}
@@ -186,5 +186,5 @@
bool ok = !isKey;
- if ( ok && strncmp(tail, PGP_BEGIN_SUFFIX, strlen(PGP_BEGIN_SUFFIX)) != 0 )
+ if ( ok && wxStrncmp(tail, PGP_BEGIN_SUFFIX, wxStrlen(PGP_BEGIN_SUFFIX)) != 0 )
{
wxLogWarning(_("The BEGIN line doesn't end with expected suffix."));
@@ -194,9 +194,9 @@
// end of the PGP part
- const char *end = NULL; // unneeded but suppresses the compiler warning
+ const wxChar *end = NULL; // unneeded but suppresses the compiler warning
if ( ok ) // ok, it starts with something valid
{
// now locate the end line
- const char *pc = start + text.length() - 1;
+ const wxChar *pc = start + text.length() - 1;
bool foundEnd = false;
@@ -215,7 +215,7 @@
pc++;
- if ( strncmp(pc, PGP_END_PREFIX, strlen(PGP_END_PREFIX)) == 0 )
+ if ( wxStrncmp(pc, PGP_END_PREFIX, wxStrlen(PGP_END_PREFIX)) == 0 )
{
- tail = pc + strlen(PGP_END_PREFIX);
+ tail = pc + wxStrlen(PGP_END_PREFIX);
foundEnd = true;
@@ -248,8 +248,8 @@
if ( ok )
{
- const char * const suffix = isSigned ? PGP_END_SIG_SUFFIX
+ const wxChar * const suffix = isSigned ? PGP_END_SIG_SUFFIX
: PGP_END_CRYPT_SUFFIX;
- if ( strncmp(tail, suffix, strlen(suffix)) != 0 )
+ if ( wxStrncmp(tail, suffix, wxStrlen(suffix)) != 0 )
{
wxLogWarning(_("Mismatch between BEGIN and END lines."));
Index: QuoteURL.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/viewflt/QuoteURL.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -u -2 -r1.9 -r1.10
--- QuoteURL.cpp 30 Sep 2003 23:00:59 -0000 1.9
+++ QuoteURL.cpp 13 Oct 2003 00:41:14 -0000 1.10
@@ -167,9 +167,9 @@
int
-CountQuoteLevel(const char *string, int max_white, int max_alpha)
+CountQuoteLevel(const wxChar *string, int max_white, int max_alpha)
{
int levels = 0;
- for ( const char *c = string; *c != 0 && *c != '\n'; c++)
+ for ( const wxChar *c = string; *c != 0 && *c != '\n'; c++)
{
// skip white space
@@ -234,5 +234,5 @@
true, // enabled by default
gettext_noop("Quotes and URLs"),
- "(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>");
+ _T("(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>"));
// ----------------------------------------------------------------------------
Index: Rot13.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/viewflt/Rot13.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -b -u -2 -r1.4 -r1.5
--- Rot13.cpp 15 Sep 2003 17:01:42 -0000 1.4
+++ Rot13.cpp 13 Oct 2003 00:41:14 -0000 1.5
@@ -57,5 +57,5 @@
false, // initially disabled
gettext_noop("ROT13"),
- "(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>");
+ _T("(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>"));
void
Index: Signature.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/viewflt/Signature.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -b -u -2 -r1.11 -r1.12
--- Signature.cpp 30 Sep 2003 23:00:59 -0000 1.11
+++ Signature.cpp 13 Oct 2003 00:41:14 -0000 1.12
@@ -141,5 +141,5 @@
true, // initially enabled
gettext_noop("Signature"),
- "(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>");
+ _T("(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>"));
void
@@ -157,6 +157,6 @@
String signature;
- const char *start = text.c_str();
- const char *pc = start + text.length() - 1;
+ const wxChar *start = text.c_str();
+ const wxChar *pc = start + text.length() - 1;
// while we're not too far from end
Index: TextMarkup.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/viewflt/TextMarkup.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -u -2 -r1.10 -r1.11
--- TextMarkup.cpp 11 Oct 2003 23:15:15 -0000 1.10
+++ TextMarkup.cpp 13 Oct 2003 00:41:14 -0000 1.11
@@ -61,5 +61,5 @@
true, // enabled by default
gettext_noop("Trivial Markup"),
- "(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>");
+ _T("(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>"));
/*
Index: Trailer.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/viewflt/Trailer.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -b -u -2 -r1.13 -r1.14
--- Trailer.cpp 18 Sep 2003 16:31:03 -0000 1.13
+++ Trailer.cpp 13 Oct 2003 00:41:14 -0000 1.14
@@ -60,5 +60,5 @@
true, // initially enabled
gettext_noop("Trailer"),
- "(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>");
+ _T("(c) 2002 Vadim Zeitlin <[EMAIL PROTECTED]>"));
void
@@ -74,6 +74,6 @@
return;
- const char *start = text.c_str();
- const char *pc = start + text.length() - 1;
+ const wxChar *start = text.c_str();
+ const wxChar *pc = start + text.length() - 1;
// while we're not too far from end
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates