#ifndef NOPP
garbage:
#endif
- if (040 < ch && ch < 0177)
- lexerror("garbage char %c", ch);
- else
+ if (040 < ch && ch < 0177) {
+ return ptok->tk_symb = ch;
+ } else {
lexerror("garbage char \\%03o", ch);
+ }
goto again;
case STSIMP: /* a simple character, no part of compound token*/
return ptok->tk_symb = ch;
*/
register char *ptr = idf->id_macro->mc_text;
int err = 0;
+ int func = idf->id_macro->mc_nps != -1;
char *stringify();
ASSERT(ptr[idf->id_macro->mc_length] == '\0');
ptr++;
} while (*ptr != delim || *ptr == '\0');
add2repl(repl, *ptr++);
- } else if (*ptr == '#') {
+ } else if (func && *ptr == '#') {
if (*++ptr == '#') {
register int tmpindex;
/* ## - paste operator */
repl->r_text[tmpindex] = TOKSEP;
}
}
- } else /* # operator */
- ptr = stringify(repl, ptr, args);
+ } else { /* # operator */
+ ptr = stringify(repl, ptr, args);
+ }
} else if (*ptr & FORMALP) {
/* insert actual parameter */
register int n = *ptr++ & 0177;
if (*(repl->r_ptr - 1) != TOKSEP)
add2repl(repl, TOKSEP);
- } else
+ } else {
add2repl(repl, *ptr++);
+ }
}
if (err)
lexerror("illegal use of the ## operator");