Using identifiers with more than 7 chars. #$%@

jpn at teddy.UUCP jpn at teddy.UUCP
Wed Mar 5 05:03:47 AEST 1986


>[FLAME ON!]
>
>I  wish  that the people that post sources to the net would try to keep
>in mind that some of us have compilers that can't swollow  indentifiers
>that are longer than seven (7) characters long.

I cannot sympathize.  I have a program that was posted to the net some
time ago called "shortc" which takes all conflicting long identifiers in
a set of source files, and outputs #defines to differentiate them (which
you can either insert into each source file, or into a header included
by each file).  5 minutes work, and ANY program with long identifiers can
be made to run.

Of course, if the pre-processor you have is ALSO limited to 7 characters,
then you may STILL have a problem, since shortc assumes the preprocessor
can differentiate all identifiers in the program.  Of course, if this is
the case, I would throw away that compiler, and start over!

Of course, even with a bogus compiler, and a bogus preprocessor, you can
still take the output of shortc and apply the changes by hand yourself!  The
program will be less readable after this transformation, though.  No
doubt shortc could be modified to output awk scripts, or something, to
automate this process.

Is there enough interest to have this program re-posted to the net?


John P. Nelson (decvax!genrad!teddy!jpn seismo!harvard!talcott!panda!teddy!jpn)



More information about the Comp.sources.unix mailing list