Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.2
 
1.3
 
MAIN:ragge:20040821135113
 
cpp.c
_>160160 static void expmac(struct recur *);
 161161 static int canexpand(struct recur *, struct symtab *np);
 162162 static void unpstr(usch *);
<> 163+static void include(void);
163164 
 164165 int
 165166 main(int argc, char **argv)
     
 !
287288                 case STRING:
 288289                 case WSPACE:
 289290                 case NL:
<> 291+                default:
290292                         fputs(yytext, obuf);
 291293                         break;
<>292 -
 293 -                default:
 294 -                        putc(c, obuf);
 295 -                        break;
296294                 }
 297295         }
 298296         fclose(obuf);
     
 !
318316         if (np == incloc) {
 319317                 if (flslvl)
 320318                         goto exit;
<>321 -                if (yylex() != WSPACE || yylex() != STRING)
 322 -                        return error("bad include");
 323 -                yytext[strlen(yytext)-1] = 0;
 324 -                pushfile(&yytext[1]);
  319+                include();
325320                 return;
 326321         } else if (np == elsloc) {
 327322                 if (flslvl) {
     
 !
375370 }
 376371 
 377372 void
<> 373+include()
  374+{
  375+        struct symtab *nl;
  376+        usch *osp, *instr;
  377+        int c;
  378+
  379+        if (yylex() != WSPACE)
  380+                goto bad;
  381+        if ((c = yylex()) != STRING && c != '<' && c != IDENT)
  382+                goto bad;
  383+
  384+        if (c == IDENT) {
  385+                instr = osp = stringbuf;
  386+                if ((nl = lookup(yytext, FIND)) == NULL)
  387+                        goto bad;
  388+                if (subst(yytext, nl, NULL) == 0)
  389+                        goto bad;
  390+                savch('\0');
  391+        } else {
  392+                yytext[strlen(yytext)-1] = 0;
  393+                instr = &yytext[1];
  394+        }
  395+        pushfile(instr);
  396+        if (c == IDENT)
  397+                stringbuf = osp;
  398+        return;
  399+
  400+bad:    error("bad include");
  401+}
  402+
  403+void
378404 define()
 379405 {
 380406         struct symtab *np;
     
 !
542568         register struct symtab *sp;
 543569         int i, c, around;
 544570 
<>545 -if (dflag)printf("lookup\n");
  571+if (dflag)printf("lookup '%s'\n", namep);
<_546572         np = namep;
 547573         around = i = 0;
 548574         while ((c = *np++))
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-09-16 06:55 +0200