Identifier significance CHALLENGE

jim at ism780.UUCP jim at ism780.UUCP
Mon Dec 12 14:37:00 AEST 1983


I have posted to net.sources a simple program (shortc.c) which produces a
mapping from arbitrary-length identifiers to identifiers which are
unambiguous in the first N (default 7) characters.  It produces them as
#defines; all it takes is a flexnames version of cpp to compile the original
source files with a non-flexname compiler, with no modification beyond
including the output of shortc into the sources.  If such a cpp is not
available or creatable (not hard given any cpp source), the shortc output can
be turned into a sed script and the sources can be compiled after being
modified.  Such modification does not fill the sources with
identifiers like X12345 or MuWdIdr (for MultiWordIdentifier); rather it
converts

MultiWordIdentifier             MultiWordIdentifier
MultiWordThingy         into    AMultiWordThingy
MultiWordyProgrammer            BMultiWordyProgrammer

Not so tough.

-- Jim Balter (decvax!yale-co!ima!jim) Interactive Systems Corp

--------



More information about the Comp.lang.c mailing list