summaryrefslogtreecommitdiff
path: root/library/backend/vcc_yacc.cpp
Unidiff
Diffstat (limited to 'library/backend/vcc_yacc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/vcc_yacc.cpp33
1 files changed, 16 insertions, 17 deletions
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
@@ -462,5 +462,5 @@ static void enterProps(const char *s)
462static void enterAttr(const char *s1, const char *s2) 462static void enterAttr(const char *s1, const char *s2)
463 { 463 {
464 const char *p1, *p2; 464 const char *p1, *p2=0;
465 p1 = lookupProp_(s1); 465 p1 = lookupProp_(s1);
466 if (s2) { 466 if (s2) {
@@ -834,5 +834,5 @@ static void finiLex() {
834 * a decoded buffer (allocated with new). See RFC 1521. 834 * a decoded buffer (allocated with new). See RFC 1521.
835 */ 835 */
836static char * lexGetDataFromBase64() 836static int lexGetDataFromBase64()
837 { 837 {
838 unsigned long bytesLen = 0, bytesMax = 0; 838 unsigned long bytesLen = 0, bytesMax = 0;
@@ -847,4 +847,5 @@ static char * lexGetDataFromBase64()
847 while (1) { 847 while (1) {
848 c = lexGetc(); 848 c = lexGetc();
849 lexSkipWhite();
849 if (c == '\n') { 850 if (c == '\n') {
850 ++mime_lineNum; 851 ++mime_lineNum;
@@ -869,6 +870,4 @@ static char * lexGetDataFromBase64()
869 b = 0; 870 b = 0;
870 pad++; 871 pad++;
871 } else if ((c == ' ') || (c == '\t')) {
872 continue;
873 } else { /* error condition */ 872 } else { /* error condition */
874 if (bytes) free(bytes); 873 if (bytes) free(bytes);
@@ -879,12 +878,15 @@ static char * lexGetDataFromBase64()
879 c = lexGetc(); 878 c = lexGetc();
880 while (c != EOF) { 879 while (c != EOF) {
881 if (c == '\n' && lexLookahead() == '\n') { 880 if (c == '\n') {
882 ++mime_lineNum; 881 lexSkipWhite();
883 break; 882 if(lexLookahead() == '\n') {
883 ++mime_lineNum;
884 break;
885 }
884 } 886 }
885 c = lexGetc(); 887 c = lexGetc();
886 } 888 }
887 } 889 }
888 return NULL; 890 return c != EOF;
889 } 891 }
890 trip = (trip << 6) | b; 892 trip = (trip << 6) | b;
@@ -932,5 +934,5 @@ static char * lexGetDataFromBase64()
932 free(oldBytes); 934 free(oldBytes);
933 } 935 }
934 return 0; 936 return bytesLen;
935 } 937 }
936 938
@@ -963,5 +965,5 @@ static char* lexGetQuotedPrintable()
963 lexClearToken(); 965 lexClearToken();
964 966
965 while (c != EOF && c != ';') { 967 while (c != EOF && (c != ';' || !fieldedProp)) {
966 if (c == '\n') { 968 if (c == '\n') {
967 // break, leave '\n' on remaining chars. 969 // break, leave '\n' on remaining chars.
@@ -1053,9 +1055,6 @@ static int yylex() {
1053 if (lexWithinMode(L_BASE64)) { 1055 if (lexWithinMode(L_BASE64)) {
1054 /* get each char and convert to bin on the fly... */ 1056 /* get each char and convert to bin on the fly... */
1055 p = lexGetDataFromBase64(); 1057 yylval.str = NULL;
1056#if 0 1058 return lexGetDataFromBase64() ? STRING : 0;
1057 yylval.str = p;
1058 return STRING;
1059 #endif
1060 } 1059 }
1061 else if (lexWithinMode(L_QUOTED_PRINTABLE)) { 1060 else if (lexWithinMode(L_QUOTED_PRINTABLE)) {
@@ -1239,5 +1238,5 @@ void mime_error_(char *s)
1239 } 1238 }
1240 1239
1241#line 1240 "y.tab.c" 1240#line 1241 "y.tab.c"
1242#define YYABORT goto yyabort 1241#define YYABORT goto yyabort
1243#define YYREJECT goto yyabort 1242#define YYREJECT goto yyabort
@@ -1539,5 +1538,5 @@ case 45:
1539 } 1538 }
1540break; 1539break;
1541#line 1540 "y.tab.c" 1540#line 1541 "y.tab.c"
1542 } 1541 }
1543 yyssp -= yym; 1542 yyssp -= yym;