summaryrefslogtreecommitdiff
path: root/library
Side-by-side diff
Diffstat (limited to 'library') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/vcc.y29
-rw-r--r--library/backend/vcc_yacc.cpp33
-rw-r--r--library/backend/vobject.cpp5
-rw-r--r--library/backend/vobject_p.h4
4 files changed, 32 insertions, 39 deletions
diff --git a/library/backend/vcc.y b/library/backend/vcc.y
index 4c79368..bec2955 100644
--- a/library/backend/vcc.y
+++ b/library/backend/vcc.y
@@ -443,3 +443,3 @@ static void enterAttr(const char *s1, const char *s2)
{
- const char *p1, *p2;
+ const char *p1, *p2=0;
p1 = lookupProp_(s1);
@@ -815,3 +815,3 @@ static void finiLex() {
*/
-static char * lexGetDataFromBase64()
+static int lexGetDataFromBase64()
{
@@ -828,2 +828,3 @@ static char * lexGetDataFromBase64()
c = lexGetc();
+ lexSkipWhite();
if (c == '\n') {
@@ -850,4 +851,2 @@ static char * lexGetDataFromBase64()
pad++;
- } else if ((c == ' ') || (c == '\t')) {
- continue;
} else { /* error condition */
@@ -860,5 +859,8 @@ static char * lexGetDataFromBase64()
while (c != EOF) {
- if (c == '\n' && lexLookahead() == '\n') {
- ++mime_lineNum;
- break;
+ if (c == '\n') {
+ lexSkipWhite();
+ if(lexLookahead() == '\n') {
+ ++mime_lineNum;
+ break;
+ }
}
@@ -867,3 +869,3 @@ static char * lexGetDataFromBase64()
}
- return NULL;
+ return c != EOF;
}
@@ -913,3 +915,3 @@ static char * lexGetDataFromBase64()
}
- return 0;
+ return bytesLen;
}
@@ -944,3 +946,3 @@ static char* lexGetQuotedPrintable()
- while (c != EOF && c != ';') {
+ while (c != EOF && (c != ';' || !fieldedProp)) {
if (c == '\n') {
@@ -1034,7 +1036,4 @@ static int yylex() {
/* get each char and convert to bin on the fly... */
- p = lexGetDataFromBase64();
-#if 0
- yylval.str = p;
- return STRING;
-#endif
+ yylval.str = NULL;
+ return lexGetDataFromBase64() ? STRING : 0;
}
diff --git a/library/backend/vcc_yacc.cpp b/library/backend/vcc_yacc.cpp
index 5f53aef..4006bc2 100644
--- a/library/backend/vcc_yacc.cpp
+++ b/library/backend/vcc_yacc.cpp
@@ -463,3 +463,3 @@ static void enterAttr(const char *s1, const char *s2)
{
- const char *p1, *p2;
+ const char *p1, *p2=0;
p1 = lookupProp_(s1);
@@ -835,3 +835,3 @@ static void finiLex() {
*/
-static char * lexGetDataFromBase64()
+static int lexGetDataFromBase64()
{
@@ -848,2 +848,3 @@ static char * lexGetDataFromBase64()
c = lexGetc();
+ lexSkipWhite();
if (c == '\n') {
@@ -870,4 +871,2 @@ static char * lexGetDataFromBase64()
pad++;
- } else if ((c == ' ') || (c == '\t')) {
- continue;
} else { /* error condition */
@@ -880,5 +879,8 @@ static char * lexGetDataFromBase64()
while (c != EOF) {
- if (c == '\n' && lexLookahead() == '\n') {
- ++mime_lineNum;
- break;
+ if (c == '\n') {
+ lexSkipWhite();
+ if(lexLookahead() == '\n') {
+ ++mime_lineNum;
+ break;
+ }
}
@@ -887,3 +889,3 @@ static char * lexGetDataFromBase64()
}
- return NULL;
+ return c != EOF;
}
@@ -933,3 +935,3 @@ static char * lexGetDataFromBase64()
}
- return 0;
+ return bytesLen;
}
@@ -964,3 +966,3 @@ static char* lexGetQuotedPrintable()
- while (c != EOF && c != ';') {
+ while (c != EOF && (c != ';' || !fieldedProp)) {
if (c == '\n') {
@@ -1054,7 +1056,4 @@ static int yylex() {
/* get each char and convert to bin on the fly... */
- p = lexGetDataFromBase64();
-#if 0
- yylval.str = p;
- return STRING;
-#endif
+ yylval.str = NULL;
+ return lexGetDataFromBase64() ? STRING : 0;
}
@@ -1240,3 +1239,3 @@ void mime_error_(char *s)
-#line 1240 "y.tab.c"
+#line 1241 "y.tab.c"
#define YYABORT goto yyabort
@@ -1540,3 +1539,3 @@ case 45:
break;
-#line 1540 "y.tab.c"
+#line 1541 "y.tab.c"
}
diff --git a/library/backend/vobject.cpp b/library/backend/vobject.cpp
index 4c8de70..9263c3a 100644
--- a/library/backend/vobject.cpp
+++ b/library/backend/vobject.cpp
@@ -44,5 +44,3 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
-#ifndef MWERKS
-#include <malloc.h>
-#endif
+#include <stdlib.h>
@@ -759,3 +757,2 @@ static struct PreDefProp propNames[] = {
{ VCQPProp, VCQuotedPrintableProp, 0, 0 },
- { VCQPProp, VCBase64Prop, 0, 0 },
{ VCQuickTimeProp, 0, 0, 0 },
diff --git a/library/backend/vobject_p.h b/library/backend/vobject_p.h
index f969898..3c9d0d3 100644
--- a/library/backend/vobject_p.h
+++ b/library/backend/vobject_p.h
@@ -101,5 +101,3 @@ For example:
#undef DLLEXPORT
- //#include <qtopia/qpeglobal.h>
-#include <qglobal.h>
-
+#include <qtopia/global.h>
#if defined(QTOPIA_MAKEDLL)