CPP Bug Fixes
lou at aerospace
lou at aerospace
Tue Sep 20 00:21:00 AEST 1983
From: Lou Nelson <lou at aerospace>
At long last I am sending out a fix for the problem with CPP
that I reported last month. The delay is because of some
unbelievable disk problems I will report later. Thanks for
your help.
-------------------------------------------------------------
From: kelem (Steve Kelem)
Subject: Change to C preprocessor source
To: lou
Here are the changes to the C preprocessor source dated 83/03/30, no SCCS
identification, modified by Reiser@???.
The source file is "/usr/src/cmd/cpp/cpp.c".
The following changes can be applied by putting the following commands
in a file and executing them in the directory /usr/src/cmd/cpp.
The old version of cpp.c will be copied into the file cpp.c.old,
and will always be available as revision 2.1 from s.cpp.c.
These commands will install /lib/cpp according to the Makefile in the source
directory.
If you do not have SCCS, the line containing %W% %G% should be changed so that
those two strings read instead as "@(#) cpp.c 2.1.1.1 8/9/83".
Steve Kelem (kelem at aerospace)
-----------------------------
admin -icpp.c -r2 -fb s.cpp.c
mv cpp.c cpp.c.old
get -e -t -b s.cpp.c
ed cpp.c << "CPPLINEFIX"
764c
register char *cp; char filname[BUFSIZ];
cp = filname;
outp=inp=p; *--outp='#';
/* read the new line number */
do { p=cotoken(p);
} while (!isnum(*inp));
/* decrement the line number so that the next line will have that number */
lineno[ifno] = atoi(inp) -2;
/* skip the blank token */
inp=p; p=cotoken(p);
/* catenate each of the input tokens into the freshly allocated (null)
filname on the stack */
for (;;) {
inp=p; p=cotoken(p);
if (*inp=='\n') {--p; *cp='\0'; break;}
while (inp<p) *cp++= *inp++;
}
/* replace the current filename on the stack by copying the name
from the stack (filname) into the static area and assigning a pointer
to the static value into the stack */
fnames[ifno] = copy(filname);
More information about the Comp.unix
mailing list