Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.71
 
1.72
 
MAIN:ragge:20071119053115
 
cpp.c
_>424424                 slow = 0;
 425425                 return;
 426426         }
<>427 -        if (yylex() != STRING)
  427+        if (yylex() != STRING || yytext[0] == 'L')
428428                 goto bad;
 429429         c = strlen((char *)yytext);
 430430         if (llen < c) {
     
 !
576576         if ((c = yylex()) == '(') {
 577577                 narg = 0;
 578578                 /* function-like macros, deal with identifiers */
<> 579+                c = definp();
579580                 for (;;) {
<>580 -                        c = definp();
581581                         if (c == ')')
 582582                                 break;
 583583                         if (c == ELLIPS) {
     
 !
587587                                 break;
 588588                         }
 589589                         if (c == IDENT) {
<> 590+                                /* make sure there is no arg of same name */
  591+                                for (i = 0; i < narg; i++)
  592+                                        if (!strcmp((char *) args[i], yytext))
  593+                                                error("Duplicate macro "
  594+                                                  "parameter \"%s\"", yytext);
590595                                 len = strlen(yytext);
 591596                                 args[narg] = alloca(len+1);
 592597                                 strlcpy((char *)args[narg], yytext, len+1);
 593598                                 narg++;
<>594 -                                if ((c = definp()) == ',')
  599+                                if ((c = definp()) == ',') {
  600+                                        if ((c = definp()) == ')')
  601+                                                goto bad;
595602                                         continue;
<> 603+                                }
596604                                 if (c == ')')
 597605                                         break;
<>598 -                                goto bad;
599606                         }
 600607                         goto bad;
 601608                 }
     
 !
609616         while (c == WSPACE)
 610617                 c = yylex();
 611618 
<> 619+        /* replacement list cannot start with ## operator */
  620+        if (c == CONCAT)
  621+                goto bad;
  622+
612623         /* parse replacement-list, substituting arguments */
 613624         savch('\0');
 614625         while (c != '\n') {
     
 !
685696         while (stringbuf > sbeg) {
 686697                 if (stringbuf[-1] == ' ' || stringbuf[-1] == '\t')
 687698                         stringbuf--;
<> 699+                /* replacement list cannot end with ## operator */
  700+                else if (stringbuf[-1] == CONC)
  701+                        goto bad;
<_688702                 else
 689703                         break;
 690704         }
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-18 16:28 +0100