[net.lang.c] 6 char externs -- a lint suggestion

bwf@ihldt.UUCP (Bill Fecht) (10/11/84)

A lint option could be included which would allow one to have it
check all internal names to be unique up to 'n' significant characters.

Then, if the number of significant characters in internal names is made
machine dependent, a programmer could certify that a program is portable
to machines which need to limit the number of significant characters on
externs.

It would also make it easier for someone to make changes to a program
so that it would "fit" on their machine.

bill (of course you could always write a program that would ...) fecht
ihnp4!ihtnt!bwf

guy@rlgvax.UUCP (Guy Harris) (10/13/84)

> A lint option could be included which would allow one to have it
> check all internal names to be unique up to 'n' significant characters.

Try "lint -p"; on the following program:

	mainxxbar()
	{
	}

	mainxxfoo()
	{
	}

it generates the following diagnostic:

	==============
	name multiply declared
	    mainxx   	futz.c(2) :: futz.c(6)

This also has the effect of checking against a "lint library" for a
portable subset of the standard C library, instead of the full UNIX C
library.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy