Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83 (MC840302); site boring.UUCP
Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!genrad!panda!talcott!harvard!seismo!mcvax!boring!steven
From: steven@boring.UUCP
Newsgroups: net.sources
Subject: Re: Check C identifiers for uniqueness
Message-ID: <6487@boring.UUCP>
Date: Mon, 1-Jul-85 13:49:30 EDT
Article-I.D.: boring.6487
Posted: Mon Jul  1 13:49:30 1985
Date-Received: Fri, 5-Jul-85 03:55:03 EDT
References: <6468@boring.UUCP>
Reply-To: steven@mcvax.UUCP (Steven Pemberton)
Organization: CWI, Amsterdam
Lines: 33
Apparently-To: rnews@mcvax.LOCAL

Someone complained that the two scripts that I submitted checked for the 7
limit for externals, and the 8 limit for internals, but not for the 6
character case-independent limit for externals.
Here is a script to check that. Beware that it uses 'grep -i' to grep case
independently, but on some systems a different flag is used. Change this if
necessary.

Steven Pemberton, CWI, Amsterdam; steven@mcvax.

------------------ CUT HERE -----------------------
: This is a shar archive. Extract with sh, not csh.
: The rest of this file will extract:
: 6limit
echo x - 6limit
sed -e 's/^X//' <<'Bye-Bye' >6limit
X: Check externals differ over first 7 chars
Xcase $# in
X1) ;;
X*) echo Usage: $0 executable-file ; exit 1;;
Xesac
X
Xtrap 'rm -f /tmp/lim1.$$ /tmp/lim2.$$; exit 1' 1 2 15
Xnm -g $1 | sed "s/^............//" >/tmp/lim1.$$
Xsed "s/^\(......\).*/\1/"  /tmp/lim2.$$
Xif test -s /tmp/lim2.$$
Xthen
X	echo The following externals don\'t differ in the first 6 characters:
X	sh /tmp/lim2.$$
Xelse
X	echo All externals differ in the first 7 characters
Xfi
Xrm -f /tmp/lim1.$$ /tmp/lim2.$$
Bye-Bye