summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cb3aff5)
multiple lines, lint's line numbers get screwed up.
SCCS-vsn: old/cpp/cpp.c 1.14
-static char sccsid[] = "@(#)cpp.c 1.13 %G%";
+static char sccsid[] = "@(#)cpp.c 1.14 %G%";
#endif lint
#ifdef FLEXNAMES
#endif lint
#ifdef FLEXNAMES
char *space, *newspace;
char *formal[MAXFRM]; /* formal[n] is name of nth formal */
char formtxt[BUFSIZ]; /* space for formal names */
char *space, *newspace;
char *formal[MAXFRM]; /* formal[n] is name of nth formal */
char formtxt[BUFSIZ]; /* space for formal names */
+ int opt_passcom=passcom;
+
+ passcom=0; /* don't put comments in macro expansions */
++flslvl; /* prevent macro expansion during 'define' */
p=skipbl(p); pin=inp;
if ((toktyp+COFF)[*pin]!=IDENT) {
++flslvl; /* prevent macro expansion during 'define' */
p=skipbl(p); pin=inp;
if ((toktyp+COFF)[*pin]!=IDENT) {
- ppwarn("illegal macro name"); while (*inp!='\n') p=skipbl(p); return(p);
+ ppwarn("illegal macro name"); while (*inp!='\n') p=skipbl(p);
+ passcom=opt_passcom; return(p);
}
np=slookup(pin,p,1);
if (oldval=np->value) free(lastcopy); /* was previously defined */
}
np=slookup(pin,p,1);
if (oldval=np->value) free(lastcopy); /* was previously defined */
/* warn if a redefinition is different from old value.
*/
space=psav=malloc(BUFSIZ);
/* warn if a redefinition is different from old value.
*/
space=psav=malloc(BUFSIZ);
- if (space==NULL) {pperror("too much defining"); return(p);}
+ if (space==NULL) {
+ pperror("too much defining");
+ passcom=opt_passcom;
+ return(p);
+ }
*psav++ = '\0';
for (;;) {/* accumulate definition until linefeed */
outp=inp=p; p=cotoken(p); pin=inp;
*psav++ = '\0';
for (;;) {/* accumulate definition until linefeed */
outp=inp=p; p=cotoken(p); pin=inp;
*/
np->value += newspace-space;
}
*/
np->value += newspace-space;
}