Renaming outp to outbufp because outp() is an existing function

This commit is contained in:
Pan7 2014-12-26 12:52:10 +01:00
parent 36f65fd7c5
commit 6de3f51c23
4 changed files with 11 additions and 11 deletions

View File

@ -9,7 +9,7 @@ char rcsid[] = "cpp.c - faked rcsid";
#define OUTS 16384 #define OUTS 16384
char outbuf[OUTS]; char outbuf[OUTS];
char *outp = outbuf; char *outbufp = outbuf;
Source *cursource; Source *cursource;
int nerrs; int nerrs;
struct token nltoken = { NL, 0, 0, 0, 1, (uchar*)"\n" }; struct token nltoken = { NL, 0, 0, 0, 1, (uchar*)"\n" };
@ -51,7 +51,7 @@ process(Tokenrow *trp)
for (;;) { for (;;) {
if (trp->tp >= trp->lp) { if (trp->tp >= trp->lp) {
trp->tp = trp->lp = trp->bp; trp->tp = trp->lp = trp->bp;
outp = outbuf; outbufp = outbuf;
anymacros |= gettokens(trp, 1); anymacros |= gettokens(trp, 1);
trp->tp = trp->bp; trp->tp = trp->bp;
} }

View File

@ -143,7 +143,7 @@ void setobjname(char *);
char *basepath( char *fname ); char *basepath( char *fname );
extern char *outp; extern char *outbufp;
extern Token nltoken; extern Token nltoken;
extern Source *cursource; extern Source *cursource;
extern char *curtime; extern char *curtime;

View File

@ -120,7 +120,7 @@ genline(void)
static Tokenrow tr = { &ta, &ta, &ta+1, 1 }; static Tokenrow tr = { &ta, &ta, &ta+1, 1 };
uchar *p; uchar *p;
ta.t = p = (uchar*)outp; ta.t = p = (uchar*)outbufp;
strcpy((char*)p, "#line "); strcpy((char*)p, "#line ");
p += sizeof("#line ")-1; p += sizeof("#line ")-1;
p = (uchar*)outnum((char*)p, cursource->line); p = (uchar*)outnum((char*)p, cursource->line);
@ -133,8 +133,8 @@ genline(void)
strcpy((char*)p, cursource->filename); strcpy((char*)p, cursource->filename);
p += strlen((char*)p); p += strlen((char*)p);
*p++ = '"'; *p++ = '\n'; *p++ = '"'; *p++ = '\n';
ta.len = (char*)p-outp; ta.len = (char*)p-outbufp;
outp = (char*)p; outbufp = (char*)p;
tr.tp = tr.bp; tr.tp = tr.bp;
puttokens(&tr); puttokens(&tr);
} }

View File

@ -470,10 +470,10 @@ builtin(Tokenrow *trp, int biname)
/* most are strings */ /* most are strings */
tp->type = STRING; tp->type = STRING;
if (tp->wslen) { if (tp->wslen) {
*outp++ = ' '; *outbufp++ = ' ';
tp->wslen = 1; tp->wslen = 1;
} }
op = outp; op = outbufp;
*op++ = '"'; *op++ = '"';
switch (biname) { switch (biname) {
@ -508,7 +508,7 @@ builtin(Tokenrow *trp, int biname)
} }
if (tp->type==STRING) if (tp->type==STRING)
*op++ = '"'; *op++ = '"';
tp->t = (uchar*)outp; tp->t = (uchar*)outbufp;
tp->len = op - outp; tp->len = op - outbufp;
outp = op; outbufp = op;
} }