Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/cpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#define OUTS 16384
char outbuf[OUTS];
char *outp = outbuf;
char *outptr = outbuf;
Source *cursource;
int nerrs;
struct token nltoken = { NL, 0, 0, 0, 1, (uchar*)"\n" };
Expand Down Expand Up @@ -50,7 +50,7 @@ process(Tokenrow *trp)
for (;;) {
if (trp->tp >= trp->lp) {
trp->tp = trp->lp = trp->bp;
outp = outbuf;
outptr = outbuf;
anymacros |= gettokens(trp, 1);
trp->tp = trp->bp;
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void iniths(void);
void setobjname(char *);
#define rowlen(tokrow) ((tokrow)->lp - (tokrow)->bp)

extern char *outp;
extern char *outptr;
extern Token nltoken;
extern Source *cursource;
extern char *curtime;
Expand Down
6 changes: 3 additions & 3 deletions cpp/include.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ genline(void)
static Tokenrow tr = { &ta, &ta, &ta+1, 1 };
uchar *p;

ta.t = p = (uchar*)outp;
ta.t = p = (uchar*)outptr;
strcpy((char*)p, "#line ");
p += sizeof("#line ")-1;
p = (uchar*)outnum((char*)p, cursource->line);
*p++ = ' '; *p++ = '"';
strcpy((char*)p, cursource->filename);
p += strlen((char*)p);
*p++ = '"'; *p++ = '\n';
ta.len = (char*)p-outp;
outp = (char*)p;
ta.len = (char*)p-outptr;
outptr = (char*)p;
tr.tp = tr.bp;
puttokens(&tr);
}
Expand Down
10 changes: 5 additions & 5 deletions cpp/macro.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,10 @@ builtin(Tokenrow *trp, int biname)
/* most are strings */
tp->type = STRING;
if (tp->wslen) {
*outp++ = ' ';
*outptr++ = ' ';
tp->wslen = 1;
}
op = outp;
op = outptr;
*op++ = '"';
switch (biname) {

Expand Down Expand Up @@ -510,7 +510,7 @@ builtin(Tokenrow *trp, int biname)
}
if (tp->type==STRING)
*op++ = '"';
tp->t = (uchar*)outp;
tp->len = op - outp;
outp = op;
tp->t = (uchar*)outptr;
tp->len = op - outptr;
outptr = op;
}