-rw-r--r-- | library/backend/vcc.y | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/library/backend/vcc.y b/library/backend/vcc.y index 6781312..94a8fea 100644 --- a/library/backend/vcc.y +++ b/library/backend/vcc.y | |||
@@ -121,9 +121,9 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. | |||
121 | 121 | ||
122 | //#ifdef PALMTOPCENTER | 122 | //#ifdef PALMTOPCENTER |
123 | //#include <qpe/vobject_p.h> | 123 | //#include <qpe/vobject_p.h> |
124 | //#else | 124 | //#else |
125 | #include <qtopia/private/vobject_p.h> | 125 | #include "vobject_p.h" |
126 | //#endif | 126 | //#endif |
127 | 127 | ||
128 | /**** Types, Constants ****/ | 128 | /**** Types, Constants ****/ |
129 | 129 | ||
@@ -722,18 +722,24 @@ static char* lexGet1Value() { | |||
722 | int c; | 722 | int c; |
723 | lexSkipWhite(); | 723 | lexSkipWhite(); |
724 | c = lexLookahead(); | 724 | c = lexLookahead(); |
725 | lexClearToken(); | 725 | lexClearToken(); |
726 | while (c != EOF && c != ';') { | 726 | while (c != EOF && (c != ';' || !fieldedProp)) { |
727 | if (c == '\\' ) { | 727 | if (c == '\\' ) { |
728 | int a; | 728 | int a; |
729 | lexSkipLookahead(); | 729 | lexSkipLookahead(); |
730 | a = lexLookahead(); | 730 | a = lexLookahead(); |
731 | if ( a != ';' ) { | 731 | if ( a == ';' ) { |
732 | lexAppendc('\\'); | ||
733 | } else { | ||
734 | lexAppendc( ';' ); | 732 | lexAppendc( ';' ); |
735 | lexSkipLookahead(); | 733 | lexSkipLookahead(); |
734 | } else if ( a == '\n' ) { | ||
735 | lexAppendc( '\n' ); | ||
736 | lexSkipLookahead(); | ||
737 | } else if ( a == '\\' ) { | ||
738 | lexAppendc( '\\' ); | ||
739 | lexSkipLookahead(); | ||
740 | } else { | ||
741 | lexAppendc('\\'); | ||
736 | } | 742 | } |
737 | } else if (c == '\n') { | 743 | } else if (c == '\n') { |
738 | int a; | 744 | int a; |
739 | lexSkipLookahead(); | 745 | lexSkipLookahead(); |
@@ -960,8 +966,9 @@ static char* lexGetQuotedPrintable() | |||
960 | } else { | 966 | } else { |
961 | // we have been sent buggy stuff. doesn't matter | 967 | // we have been sent buggy stuff. doesn't matter |
962 | // what we do so long as we keep going. | 968 | // what we do so long as we keep going. |
963 | // should probably spit an error here | 969 | // should probably spit an error here |
970 | lexSkipLookahead(); | ||
964 | c = lexLookahead(); | 971 | c = lexLookahead(); |
965 | continue; | 972 | continue; |
966 | } | 973 | } |
967 | 974 | ||
@@ -977,8 +984,9 @@ static char* lexGetQuotedPrintable() | |||
977 | } else { | 984 | } else { |
978 | // we have been sent buggy stuff. doesn't matter | 985 | // we have been sent buggy stuff. doesn't matter |
979 | // what we do so long as we keep going. | 986 | // what we do so long as we keep going. |
980 | // should probably spit an error here | 987 | // should probably spit an error here |
988 | lexSkipLookahead(); | ||
981 | c = lexLookahead(); | 989 | c = lexLookahead(); |
982 | continue; | 990 | continue; |
983 | } | 991 | } |
984 | 992 | ||
@@ -999,9 +1007,9 @@ static int yylex() { | |||
999 | 1007 | ||
1000 | int lexmode = LEXMODE(); | 1008 | int lexmode = LEXMODE(); |
1001 | if (lexmode == L_VALUES) { | 1009 | if (lexmode == L_VALUES) { |
1002 | int c = lexGetc(); | 1010 | int c = lexGetc(); |
1003 | if (c == ';') { | 1011 | if (c == ';' && fieldedProp) { |
1004 | DBG_(("db: SEMICOLON\n")); | 1012 | DBG_(("db: SEMICOLON\n")); |
1005 | lexPushLookaheadc(c); | 1013 | lexPushLookaheadc(c); |
1006 | handleMoreRFC822LineBreak(c); | 1014 | handleMoreRFC822LineBreak(c); |
1007 | lexSkipLookahead(); | 1015 | lexSkipLookahead(); |
@@ -1053,14 +1061,16 @@ static int yylex() { | |||
1053 | switch(c) { | 1061 | switch(c) { |
1054 | case ':': { | 1062 | case ':': { |
1055 | /* consume all line separator(s) adjacent to each other */ | 1063 | /* consume all line separator(s) adjacent to each other */ |
1056 | /* ignoring linesep immediately after colon. */ | 1064 | /* ignoring linesep immediately after colon. */ |
1065 | /* I don't see this in the spec, and it breaks null values -- WA | ||
1057 | c = lexLookahead(); | 1066 | c = lexLookahead(); |
1058 | while (strchr("\n",c)) { | 1067 | while (strchr("\n",c)) { |
1059 | lexSkipLookahead(); | 1068 | lexSkipLookahead(); |
1060 | c = lexLookahead(); | 1069 | c = lexLookahead(); |
1061 | ++mime_lineNum; | 1070 | ++mime_lineNum; |
1062 | } | 1071 | } |
1072 | */ | ||
1063 | DBG_(("db: COLON\n")); | 1073 | DBG_(("db: COLON\n")); |
1064 | return COLON; | 1074 | return COLON; |
1065 | } | 1075 | } |
1066 | case ';': | 1076 | case ';': |