Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.134
 
1.135
 
MAIN:plunky:20110605084350
 
cpp.c
_>6565 int tflag;      /* traditional cpp syntax */
 6666 #ifdef PCC_DEBUG
 6767 int dflag;      /* debug printouts */
<> 68+static void imp(const char *);
  69+static void prline(const usch *s);
  70+static void prrep(const usch *s);
6871 #define DPRINT(x) if (dflag) printf x
 6972 #define DDPRINT(x) if (dflag > 1) printf x
<> 73+#define IMP(x) if (dflag > 1) imp(x)
7074 #else
 7175 #define DPRINT(x)
 7276 #define DDPRINT(x)
<> 77+#define IMP(x)
7378 #endif
 7479 
 7580 int ofd;
     
 !
128133 #define ENTER   1
 129134 
 130135 static int readargs(struct symtab *sp, const usch **args);
<>131 -void prline(const usch *s);
 132 -static void prrep(const usch *s);
133136 static void exparg(int);
 134137 static void subarg(struct symtab *sp, const usch **args, int);
 135138 void define(void);
     
 !
140143 void usage(void);
 141144 usch *xstrdup(const usch *str);
 142145 static void addidir(char *idir, struct incs **ww);
<>143 -void imp(const char *);
 144 -#define IMP(x) if (dflag>1) imp(x)
145146 
 146147 int
 147148 main(int argc, char **argv)
     
 !
984985                         return n; /* already blocked */
 985986         bptr[bidx++] = n;
 986987         /* XXX - check for sp buffer overflow */
<> 988+#ifdef PCC_DEBUG
987989         if (dflag>1) {
 988990                 printf("donex %d (%d) blocking:\n", bidx, n);
 989991                 printf("donex %s(%d) blocking:", norep[n]->namep, n);
 990992                 for (i = bidx-1; i >= 0; i--)
 991993                         printf(" '%s'", norep[bptr[i]]->namep);
 992994                 printf("\n");
 993995         }
<> 996+#endif
994997         return n;
 995998 }
 996999 
     
 !
13401343         if (readargs(sp, argary)) {
 13411344                 /* Bailed out in the middle of arg list */
 13421345                 unpstr(bp);
<>1343 -                if (dflag>1)printf("%d:noreadargs\n", lvl);
  1346+                DDPRINT(("%d:noreadargs\n", lvl));
13441347                 stringbuf = bp;
 13451348                 return 0;
 13461349         }
     
 !
14251428                     iswsnl(stringbuf[-1]) && stringbuf[-3] != EBLOCK)
 14261429                         stringbuf--;
 14271430                 savch('\0');
<> 1431+#ifdef PCC_DEBUG
14281432                 if (dflag) {
 14291433                         printf("readargs: save arg %d '", i);
 14301434                         prline(args[i]);
 14311435                         printf("'\n");
 14321436                 }
<> 1437+#endif
14331438         }
 14341439 
 14351440         IMP("RDA2");
     
 !
15081513 
 15091514         sp = vp;
 15101515         instr = snuff = 0;
<> 1516+#ifdef PCC_DEBUG
15111517         if (dflag>1) {
 15121518                 printf("%d:subarg ARGlist for %s: '", lvl, nl->namep);
 15131519                 prrep(vp);
 15141520                 printf("'\n");
 15151521         }
<> 1522+#endif
15161523 
 15171524         /*
 15181525          * push-back replacement-list onto lex buffer while replacing
     
 !
15381545 #endif
 15391546                         } else
 15401547                                 bp = ap = args[(int)*--sp];
<> 1548+#ifdef PCC_DEBUG
15411549                         if (dflag>1){
 15421550                                 printf("%d:subarg GOTwarn; arglist '", lvl);
 15431551                                 prline(bp);
 15441552                                 printf("'\n");
 15451553                         }
<> 1554+#endif
15461555                         if (sp[2] != CONC && !snuff && sp[-1] != CONC) {
 15471556                                 /*
 15481557                                  * Expand an argument; 6.10.3.1:
     
 !
16811690         readmac--;
 16821691 }
 16831692 
<>1684 -void
  1693+#ifdef PCC_DEBUG
  1694+static void
16851695 imp(const char *str)
 16861696 {
 16871697         printf("%s (%d) '", str, bidx);
 16881698         prline(ifiles->curptr);
 16891699         printf("'\n");
 16901700 }
 16911701 
<>1692 -void
  1702+static void
16931703 prrep(const usch *s)
 16941704 {
 16951705         while (*s) {
     
 !
17041714         }
 17051715 }
 17061716 
<>1707 -void
  1717+static void
17081718 prline(const usch *s)
 17091719 {
 17101720         while (*s) {
     
 !
17191729                 s++;
 17201730         }
 17211731 }
<> 1732+#endif
<_17221733 
 17231734 usch *
 17241735 savstr(const usch *str)
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-02 23:30 +0200