lou (12/02/82)
If you give the `-Idirectory' preprocesor option to lint, it will take any `n' or `p' it finds in the directory name to mean the `-n' or `-p' keyletter, respectively. You end up getting either no lint library or the wrong one. The symptom is that lint suddenly complains about things like `printf' with variable arguments. The following diff shows the correction. The source copy of the shell script is in /usr/src/cmd/lint/SHELL, which is copied to /usr/bin/lint. Lou Warshawsky General Instrument R&D Chandler, AZ *** SHELL.old Thu Oct 9 17:52:36 1980 --- SHELL Wed Dec 1 16:08:51 1982 *************** *** 4,13 for A in $* do case $A in - -*n*) P= ;; - -*p*) P=port ;; - esac - case $A in *.ln) cat $A >>$T ;; -l*) cat $LL/llib$A.ln >>$T ;; -[IDOU]*) O="$O $A" ;; --- 4,9 ----- for A in $* do case $A in *.ln) cat $A >>$T ;; -l*) cat $LL/llib$A.ln >>$T ;; -[IDOU]*) O="$O $A" ;; *************** *** 12,18 -l*) cat $LL/llib$A.ln >>$T ;; -[IDOU]*) O="$O $A" ;; -X) LL=/usr/scj/lint L=/usr/scj/lint/lpass ;; ! -*) X="$X$A" ;; *) (/lib/cpp $O $A | ${L}1 $X >>$T)2>&1 esac done --- 8,18 ----- -l*) cat $LL/llib$A.ln >>$T ;; -[IDOU]*) O="$O $A" ;; -X) LL=/usr/scj/lint L=/usr/scj/lint/lpass ;; ! -*) case $A in ! -*n*) P= ;; ! -*p*) P=port ;; ! esac ! X="$X$A" ;; *) (/lib/cpp $O $A | ${L}1 $X >>$T)2>&1 esac done