Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!sparky!kent From: kent@sparky.IMD.Sterling.COM (Kent Landfield) Newsgroups: comp.unix.misc Subject: Re: Human-readable lint libraries Message-ID: <1990Nov1.153459.5162@sparky.IMD.Sterling.COM> Date: 1 Nov 90 15:34:59 GMT References: <1990Oct19.172042.26917@batcomputer.tn.cornell.edu> <4212@auspex.auspex.com> Organization: Sterling Software, Bellevue, NE. Lines: 77 In article <4212@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: > > > However, there are no flags (or combinations of same) which > > seem to result in the production of said "stripped down lint > > library source files". > >... > > >From the lint manual page: > > > > -Clibrary > > Create a lint library with the name llib-llibrary.ln. > > > >Also, -i will generate a .ln file with just the routines and the call > >lines. > >llib-ZZZ, you can go look at line NNN of llib-ZZZ (that being the >stripped-down "lint" library source file) and see what parameters the >routine expects. The following script makes the looking easier. It's a simple tool but quite useful. -Kent+ ------------------------ lhelp --------------------------- #!/bin/sh # # lhelp # # Kent Landfield # # This script is used to get the parameters a routine needs # to be called with. This is set up for SunOS. If you are not # on a Sun, change the LINT_LIBS and L to reflect your systems # lint library configuration. # # If you have lint libraries that you have developed for # your projects, fill in PROJECT with the appropriate paths. # # Note: It is best to have the entire definition on a single line.. # int draw_box(x1,y1,x2,y2) short x1,y1,x2,y2; { return(0); } # L=/usr/lib/lint LINT_LIBS="$L/llib-lc $L/llib-lcgi $L/llib-lcore $L/llib-lcurses \ $L/llib-lkvm $L/llib-llwp $L/llib-lm $L/llib-lmp \ $L/llib-lpixrect $L/llib-lplot $L/llib-lsuntool $L/llib-lsunwindow \ $L/llib-ltermcap" PROJECT_LINTLIBS="" case $# in 0) echo "usage: $0 libfunction ..."; exit 1;; *) ;; esac while [ "$1" != "" ] do for lib in $LINT_LIBS $PROJECT_LINTLIBS do entry=`grep $1 $lib` if [ "$entry" != "" ] then echo "$lib" echo "$entry" fi done if [ "$2" != "" ] then echo fi shift done -- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM Sterling Software, IMD UUCP: uunet!sparky!kent 1404 Ft. Crook Rd. South Phone: (402) 291-8300 Bellevue, NE. 68005-2969 FAX: (402) 291-4362