6 character external identifiers
Tony L. Hansen
hansen at pegasus.UUCP
Mon Jul 16 08:07:50 AEST 1984
> There is a rather elegant way to replace long external identifiers by
> shorter ones: use the C preprocessor. It should be easy to write a
> program which generates a set of lines to a file "rename.h" like:
>
> #define ThisIsAVeryLongName _1ThisIsAVeryLongName
> #define ThisIsAnother _2ThisIsAnother
> etc.
>
> .... It especially works well with the
> ANSI standard because the preprocessor has to distinguish such long
> names. ....
>
> [This idea was used by James Gosling to get Emacs on a PDP. ....]
I don't recall in Henry Spencer's summary any mention on the significant
character limits on the C preprocessor. Will that remain at the old limit of
8 characters, will it be extended as well to 31 characters, or will it go to
an infinite limit as currently allowed by the BSD and S5r2 flexnames
implementation?
If it stays at 8 characters, then the above-mentioned CPP hack will not
work. I ran into this very problem when I tried to use James Gosling's CPP
hack to put his Emacs on a System III and System V machine. (I eventually
wound up throwing out his CPP hack and did the preprocessing with m4, which
has never [that I know of] had a limit on identifier length.) CPP just
wasn't capable of differentiationg between AFunctionToDoThis() and
AFunctionToDoThat().
Henry, what's the scoop on the length of CPP identifiers? Did I miss
something in your original note?
Tony Hansen
pegasus!hansen
More information about the Comp.lang.c
mailing list