[net.unix] Lint Libraries

russell@isucs1.UUCP (07/12/85)

I have a question about lint that I would like answered.  I like to use the
power of the -C option to create lint libraries, but I have yet to find a
way to convert the lint library to a human readable form (like has been done
to the standard libraries).  If anyone knows how to make this conversion,
please let me know.

				Russell B. Jorgensen
				{umn-cs,okstate,csu-cs}!isucs1!russell

gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (07/21/85)

> I have a question about lint that I would like answered.  I like to use the
> power of the -C option to create lint libraries, but I have yet to find a
> way to convert the lint library to a human readable form (like has been done
> to the standard libraries).

Wrong way around.  START with a human-readable lint library source .c
and make the binary lint library from that.

psc@lzwi.UUCP (Paul S. R. Chisholm) (07/26/85)

< I can use my magic to change the color to red -- but I don't do windows. >

In article <331@isucs1.UUCP>, russell@isucs1.UUCP writes:
>                                                . . . I have yet to find a
> way to convert the lint library to a human readable form (like has been done
> to the standard libraries).
>	Russell B. Jorgensen	{umn-cs,okstate,csu-cs}!isucs1!russell

The readable lint libraries (e.g., /usr/lib/llib-lc or /usr/lib/llib-lc.c)
aren't created from the binaries; the binaries are created from the
readable versions.
You can create a (binary) lint library from a .c file with 'lint -c' on
System V Release 2.0, or by hacking at the /usr/bin/lint shell script
(beware the magic -H flag, which remembers where it stores common
messages about header files; just zap it each time).
-- 
       -Paul S. R. Chisholm       The above opinions are my own,
       {pegasus,vax135}!lzwi!psc  not necessarily those of any
       {mtgzz,ihnp4}!lznv!psc     telecommunications company.
       (*sigh* ihnp4!lzwi!psc does *NOT* work!!!  Use above paths.)
       "It must be fast, and it must be red, and it must have windows."

thomas@utah-gr.UUCP (Spencer W. Thomas) (07/31/85)

>In article <331@isucs1.UUCP>, russell@isucs1.UUCP writes:
>>                                                . . . I have yet to find a
>> way to convert the lint library to a human readable form (like has been done
>> to the standard libraries).

>
>The readable lint libraries (e.g., /usr/lib/llib-lc or /usr/lib/llib-lc.c)
>aren't created from the binaries; the binaries are created from the
>readable versions.

This is close, and may actually be the case for llib-lc.  However, lint
has this neat option (on 4.2, anyway) that lets you say
	lint -Cfoo *.c
and create the llib-lfoo library.  The problem is that error
diagnositics that refer to the library on future lint runs are sort of
useless (the line numbers, anyway).  It would be really nice to get a
human readable form from the binary form, just for the purpose of
interpreting the diagnostics, anyway.  The problem is, you can't do it
(at least, given just the llib-lfoo file).  The type names have all been
hashed away -- all the llib-lfoo file tells you for structures is the
size and a hashed identifier.  This allows lint to compare for the same
structure, but it can't reconstruct the names.  You could build a
llib-lfoo.c file (I think), but the names would have to be generated
ones :-(g0001, g0002, ...)  I looked at this for a couple of days some
time ago, but gave it up as a loss.  Instead I use a Gosling emacs
function that turns my .c files into a llib-lfoo.c file, then use lint
-C on that.  This relies, of course, on certain code formatting
practices, and is not foolproof.  There ought to be some way to hack the
C parser to do it (Hey!  now there's a use for the C grammar that was
posted to the net recently.)

-- 
=Spencer   ({ihnp4,decvax}!utah-cs!thomas, thomas@utah-cs.ARPA)
	"You don't get to choose how you're going to die.  Or when.
	 You can only decide how you're going to live." Joan Baez