Human-readable lint libraries

Kent Landfield kent at sparky.IMD.Sterling.COM
Fri Nov 2 02:34:59 AEST 1990


In article <4212 at auspex.auspex.com> guy at 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 at 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



More information about the Comp.unix.misc mailing list