Since type_t is different between lint1.h and lint2.h include the
appropriate file depending on the pass. Make the argument mismatch
error print the type names of the types involved. Now that we have
a tyname() function we can fix the rest of the pass2 warnings to be
more explanatory, but not now.
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
C99 support.
- turn lerror() into a macro so that the filename and the line number of the
error are printed before we abort.
- recurse in type printing to provide the proper type name.
XXX Note that the overflow code for many cases seems to be buggy. I've
only fixed one bug that was bothering me. A set of regression tests
and extensive testing are needed.
- convert to ANSI KNF
- remove trailing whitespace
- translate some comments from german into english
code compiles and runs clean, and tested by running "make lint" against
xlint source using previous and this lint produces same results.
global or local declaration/definition/statement. Originally they were
valid on the current and next line, which made it hard to suppress
warnings in constructs with more then one line.
LONGLONG can now be used to suppress errors or warnings in the next
declaration, definition or statement.