Annotation of researchv10no/cmd/cflow/li, revision 1.1

1.1     ! root        1: L=/src/cmd/lint
        !             2: LL="$L $HOME/lib"
        !             3: 
        !             4: H=/usr/tmp/hlint$$     # header buffer file
        !             5: O="-C -Dlint"          # cpp options
        !             6: P=unix
        !             7: PATH=/bin:/usr/bin 
        !             8: S=/usr/tmp/slint$$     # string buffer file
        !             9: T=/usr/tmp/lint.$$     # intermediate file
        !            10: X=
        !            11: 
        !            12: trap "rm -f $T $H $S; exit" 1 2 3 15
        !            13: 
        !            14: for A in $*
        !            15: do
        !            16:        case $A in
        !            17:        -[IDU]*)        O="$O $A" ;;
        !            18:        -L*)    LL="`expr $A : '-L\(.*\)'` $LL";;
        !            19:        -l*)    ln=llib$A.ln
        !            20:                LN=
        !            21:                for ll in $LL
        !            22:                do
        !            23:                        if [ -f $ll/$ln ]
        !            24:                        then LN=$ll/$ln
        !            25:                        fi
        !            26:                done
        !            27:                if [ "$LN" ]
        !            28:                then cat $LN >> $T
        !            29:                else echo "$0: $ln: not found"
        !            30:                fi ;;
        !            31:        -*n*)   P=""  X="$X$A" ;; 
        !            32:        -*p*)   P="port"  X="$X$A" ;;
        !            33:        -*)     X="$X$A" ;;
        !            34:        *.c)    (/lib/cpp $O $A | $L/lint1 $X -H$H -S$S $A >>$T)2>&1 ;;
        !            35:        *.ln)   cat $A >> $T;;
        !            36:        *)      echo "$0: bad file or option ignored: $A" ;;
        !            37:        esac
        !            38: done
        !            39: 
        !            40: case $P in
        !            41:        unix)   cat $L/llib-lc.ln >>$T ;;
        !            42:        port)   cat $L/llib-port.ln >>$T ;;
        !            43: esac
        !            44: 
        !            45: if [ -s $H ]
        !            46: then
        !            47:        $L/lint2 -T$T $X -H$H -S$S
        !            48: fi
        !            49: 
        !            50: rm -f $T $H $S

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.