Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.15
 
1.16
 
MAIN:ragge:20040904082906
 
cpp.c
_>7979 #include "cpp.h"
 8080 
 8181 #define MAXARG  250     /* # of args to a macro, limited by char value */
<>82 -#define SBSIZE  40000
 83 -#define SYMSIZ  2000
  82+#define SBSIZE  200000
  83+#define SYMSIZ  6000
8484 
 8585 static usch     sbf[SBSIZE];
 8686 /* C command */
     
 !
103103 struct incs {
 104104         struct incs *next;
 105105         char *dir;
<>106 -} *incdir[2];
 107 -#define INCINC 0
 108 -#define SYSINC 1
  106+} *incdir[3];
  107+#define DOTINC 0
  108+#define INCINC 1
  109+#define SYSINC 2
109110 
 110111 static struct symtab *filloc;
 111112 static struct symtab *linloc;
     
 !
158159         struct symtab *nl, *thisnl;
 159160         register int c, gotspc, ch;
 160161         usch *osp;
<> 162+        char *idir;
161163 
<>162 -        incs.dir = ".";
 163 -        incs.next = NULL;
 164 -        incdir[INCINC] = &incs;
 165 -
166164         while ((ch = getopt(argc, argv, "D:I:S:U:td")) != -1)
 167165                 switch (ch) {
 168166                 case 'D': /* Define something */
     
 !
219217         argv += optind;
 220218 
 221219         exfail = 0;
<> 220+        incs.dir = ".";
222221         if (argc) {
 223222                 if (freopen(argv[0], "r", stdin) == NULL) {
 224223                         fprintf(stderr, "Can't open %s", argv[0]);
 225224                         exit(8);
 226225                 }
<> 226+                if ((idir = strrchr(argv[0], '/')) != NULL) {
  227+                        *idir = 0;
  228+                        incs.dir = argv[0];
  229+                }
227230         }
<> 231+        incs.next = NULL;
  232+        incdir[DOTINC] = &incs;
  233+
228234         if (pushfile(argc ? argv[0] : "<stdin>"))
 229235                 error("cannot open %s", argv[0]);
 230236 
     
 !
327333                 }
 328334         }
 329335         fclose(obuf);
<> 336+        if (trulvl || flslvl)
  337+                error("unterminated conditional");
330338         return exfail;
 331339 }
 332340 
     
 !
424432                         ++trulvl;
 425433                 else
 426434                         ++flslvl;
<> 435+        } else if (CHECK(pragma)) {
  436+                goto exit;
427437         } else if (CHECK(elif)) {
 428438                 if (flslvl == 0)
 429439                         elflvl = trulvl;
     
 !
533543                         savstr(yystr);
 534544                 }
 535545                 savch('\0');
<>536 -                it = SYSINC;
  546+                it = INCINC;
537547         } else {
 538548                 yystr[strlen(yystr)-1] = 0;
 539549                 fn = &yystr[1];
<>540 -                it = INCINC;
  550+                it = DOTINC;
541551         }
 542552 
 543553         /* create search path and try to open file */
<>544 -        for (i = it; i < 2; i++) {
  554+        for (i = it; i < 3; i++) {
<_545555                 for (w = incdir[i]; w; w = w->next) {
 546556                         usch *nm = stringbuf;
 547557 
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-10-31 06:37 +0100