[comp.unix.programmer] Human-readable lint libraries

elias@theory.tn.cornell.edu (Doug Elias) (10/20/90)

As the last line of the Sun man-page for "lint" reads:
  ...it is still useful to produce stripped down lint library 
  source files and to use  them  to generate lint libraries.

However, there are no flags (or combinations of same) which
seem to result in the production of said "stripped down lint
library source files".  Does anyone out there have any suggestions
(besides the obvious -- "make it yourself by hand") as to how
to go about creating these?  One of the people in the group
is currently writing a simple little program which will pull
out all #includes and function definitions, but if somebody out 
there already has some s/w which creates lint source files, we'd
really like to hear about it.

Many thanks, and please respond via email.

doug
-- 
#    ____       Internet:   elias@theory.tn.cornell.edu
#  dr _|_)oug   USmail:     Adv. Comp. Res. Inst./Cornell Theory Center
#    (_|                    704A TheoryCtrBldg/C.U./Ithaca/N.Y./14853-5201
#    (_|__      MaBelle:    607-254-8826   Fax: 607-254-8888

mutchler@zule.EBay.Sun.COM (Dan Mutchler) (10/20/90)

In article <1990Oct19.172042.26917@batcomputer.tn.cornell.edu> elias@theory.tn.cornell.edu (Doug Elias) writes:

   As the last line of the Sun man-page for "lint" reads:
     ...it is still useful to produce stripped down lint library 
     source files and to use  them  to generate lint libraries.

   However, there are no flags (or combinations of same) which
   seem to result in the production of said "stripped down lint
   library source files".  Does anyone out there have any suggestions
   (besides the obvious -- "make it yourself by hand") as to how
   to go about creating these?  One of the people in the group
   is currently writing a simple little program which will pull
   out all #includes and function definitions, but if somebody out 
   there already has some s/w which creates lint source files, we'd
   really like to hear about it.

   Many thanks, and please respond via email.

   doug
   -- 
   #    ____       Internet:   elias@theory.tn.cornell.edu
   #  dr _|_)oug   USmail:     Adv. Comp. Res. Inst./Cornell Theory Center
   #    (_|                    704A TheoryCtrBldg/C.U./Ithaca/N.Y./14853-5201
   #    (_|__      MaBelle:    607-254-8826   Fax: 607-254-8888



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.
--

Dan Mutchler                       | ARPA/Internet:  mutchler@zule.EBay.Sun.COM
Sun Federal System Engineer        | UUCP:           ...!sun!mutchler
--------------------------------------------------------------------------
Flying back from Lubbock, I saw Jesus on the plane
Or maybe it was Elvis, You know they kind of look the same.
                     -- Don Henley

lm@slovax.Sun.COM (Larry McVoy) (10/21/90)

In article <1990Oct19.172042.26917@batcomputer.tn.cornell.edu> elias@theory.tn.cornell.edu (Doug Elias) writes:
>As the last line of the Sun man-page for "lint" reads:
>  ...it is still useful to produce stripped down lint library 
>  source files and to use  them  to generate lint libraries.

Sigh.  Doing it by hand is usually required.  You pick up cproto off of one
of the archives and modify it trivially to produce a 90% solution.  You still
have to pick up things like

int	errno;	/* declare errno because it is an exported global */

and cproto won't help you there.

The other thing you can do is just use the real source.  I discourage this
within Sun because we like to ship the source to the lint libs;
programmers actually grep through them to see which way the args go.
This means that you should say

bcopy(src, dest, len)

not

bcopy(p1, p2, i)

Using cproto usually works for this because the source is usually good
about meaningful names.
---
Larry McVoy, Sun Microsystems     (415) 336-7627       ...!sun!lm or lm@sun.com