Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.3
 
1.4
 
MAIN:ragge:20040822103230
 
cpp.c
_>680680 {
 681681         struct symtab *nl;
 682682         int c, noexp = 0, gotspc;
<> 683+        usch *och;
683684 
 684685 if (dflag)printf("expmac\n");
 685686 if (dflag && rp)printf("do not expand %s\n", rp->sp->namep);
     
 !
689690                 case EXPAND: noexp--; break;
 690691 
 691692                 case IDENT:
<> 693+                        /* workaround if an arg will be concatenated */
  694+                        och = stringbuf;
  695+                        savstr(yytext);
  696+                        savch('\0');
  697+//printf("id: str %s\n", och);
  698+                        if ((c = yylex()) == EXPAND) {
  699+//printf("funnet expand\n");
  700+                                if ((c = yylex()) == NOEXP) {
  701+//printf("funnet noexp\n");
  702+                                        if ((c = yylex()) == IDENT) {
  703+//printf("funnet ident %s%s\n", och, yytext);
  704+                                                stringbuf--;
  705+                                                savstr(yytext);
  706+                                                savch('\0');
  707+                                                cunput(NOEXP);
  708+                                                unpstr(och);
  709+                                                noexp--;
  710+                                                stringbuf = och;
  711+                                                continue;
  712+                                        } else {
  713+//printf("ofunnet ident\n");
  714+                                                unpstr(yytext);
  715+                                                unpstr(och);
  716+                                                stringbuf = och;
  717+                                                continue;
  718+                                        }
  719+                                } else {
  720+//printf("ofunnet inoexp\n");
  721+                                        unpstr(yytext);
  722+                                        cunput(EXPAND);
  723+                                        unpstr(och);
  724+                                        yylex();
  725+                                }
  726+                        } else {
  727+                                unpstr(yytext);
  728+                                unpstr(och);
  729+                                yylex();
  730+//printf("ofunnet expand: yytext %s\n", yytext);
  731+                        }
  732+                        stringbuf = och;
  733+
692734                         if ((nl = lookup(yytext, FIND)) == NULL)
 693735                                 goto def;
<> 736+
694737                         if (canexpand(rp, nl) == 0)
 695738                                 goto def;
 696739                         if (noexp == 0) {
     
 !
738781         struct recur *rp;
 739782 {
 740783         usch **args, *obuf, *ap, *bp, *sp;
<>741 -        int narg, c, i, plev, instr, snuff;
  784+        int narg, c, i, plev, snuff;
742785 
 743786 if (dflag)printf("expdef %s rp %s\n", vp, (rp ? (char *)rp->sp->namep : ""));
 744787         if ((c = yylex()) != '(')
     
 !
786829         }
 787830 #endif
 788831         sp = vp;
<>789 -        instr = snuff = 0;
  832+        snuff = 0;
790833 
 791834         /*
 792835          * push-back replacement-list onto lex buffer while replacing
     
 !
821864                                 if (snuff && (*bp == '\\' || *bp == '"'))
 822865                                         cunput('\\');
 823866                         }
<>824 -                } else {
  867+                } else
825868                         cunput(*sp);
<>826 -                        if (instr && (*sp == '"' || *sp == '\\'))
 827 -                                        cunput('\\');
 828 -                }
<_829869                 sp--;
 830870         }
 831871         stringbuf = obuf;
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-27 11:07 +0100