shawn@mit-eddie.UUCP (Shawn McKay) (01/27/85)
I am looking for something to run over broken BSD software, that will aid me in finding the clasic problem: DonotUseLongIdentifiersOnSoftwareYouWishToShare() DonotUseLongIdentifiersOnSoftwareYouWishToDistribute() ^ That's about the limit to what most V7 compilers can handle. Why people are willing to pay such a high price for a trivial thing like this I don't know, but if anyone out there feels like I do on this, and wrote a long identifier hunter, (Not to tell me about all long identifiers, just the ones that kill each other like the one above), then I would be greatly appriciative. Thanks In Advance, -- Shawn Uucp: mit-eddie!shawn Arpa: Shawn at Mit-Mc
grogers@uiucdcsb.UUCP (01/29/85)
Since I cannot write programs with variable names less than 30 characters long, what I really need is a preprocessor that will map long names to short names. We should have a preprocessor to pass short names to the compiler & loader and a postprocessor to undo this in any error messages. This way I could use all the long names I want and never see the short ones. Because of separate compilation, the mapping will have to be predetermined and static. If someone has already done this, please post or send hints. If not then I will post one in a few weeks. Greg Rogers University of Illinois at Urbana-Champaign grogers@uiucdcs
donn@utah-gr.UUCP (Donn Seeley) (01/29/85)
From: shawn@mit-eddie.UUCP (Shawn McKay) I am looking for something to run over broken BSD software, that will aid me in finding [long identifier clashes]... [If the software is broken, then why are you stealing it?] Rather than write your own long-identifier detector or borrow some bug-ridden net.sources hack, I suggest you make use of a little-known and (when known) oft-ignored program named 'lint'. ------------------------------------------------------------------------ % cat problem.c main() { DonotUseLongIdentifiersOnSoftwareYouWishToShare(); DonotUseLongIdentifiersOnSoftwareYouWishToDistribute(); exit( 0 ); } DonotUseLongIdentifiersOnSoftwareYouWishToShare() { return; } DonotUseLongIdentifiersOnSoftwareYouWishToDistribute() { return; } % lint -hp problem.c problem.c: donotu multiply declared problem.c(9) :: problem.c(14) % ------------------------------------------------------------------------ Charter member of the Society for the Prevention of Cruelty to Software, Donn Seeley University of Utah CS Dept donn@utah-cs.arpa 40 46' 6"N 111 50' 34"W (801) 581-5668 decvax!utah-cs!donn
ksbszabo@wateng.UUCP (Kevin Szabo) (01/31/85)
In article <1321@utah-gr.UUCP> donn@utah-gr.UUCP (Donn Seeley) writes: > From: shawn@mit-eddie.UUCP (Shawn McKay) > I am looking for something to run over broken BSD software, > that will aid me in finding [long identifier clashes]... >Rather than write your own long-identifier detector or borrow some >bug-ridden net.sources hack, I suggest you make use of a little-known >and (when known) oft-ignored program named 'lint'. I would like to bring to your attention that LINT is often substandard at some institutions. The one we have on our Orcatech workstation croaks if filenames are longer the 13 chars! Yes, I know, bug the vender. Well I have ... with slow results. The only other option is to lint under BSD, unfortunately BSD lint gives you a choice of either a) flexnames OR b) 6 char case insensitive. I refuse to convolute my names any more than I have already had too (to create 7 char case sensitive), and thus the BSD lint was useless. Fortunately I had access to the source for LINT and could patch things up so that it would look for the fairly common 7 char externs. Also, multiply defined externals is handled differently by some compilers. For some reason our compiler & lint do not complain about the following piece of code: int nonunique; int nonunique; main() {;} Is there a reason for such behaviour? The V7 compiler I used to work with croaked in the loader phase with an incomprehensible error message when it had cases like these. Anyway, Hugh Redelmeier (hcrvx1!hugh) distributed CLASH a week or two ago. It should do what you need. Kevin (hopefully followups to this will go to net.lang.c) -- Kevin Szabo watmath!wateng!ksbszabo (U of Waterloo VLSI Group, Waterloo Ont.)