BSD 4_4 release
[unix-history] / usr / src / old / pcc / lint / lpass1 / lint.1
index 240a8ee..5999fa1 100644 (file)
@@ -1,23 +1,26 @@
-.\" Copyright (c) 1980 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1980, 1990 Regents of the University of California.
+.\" All rights reserved.
 .\"
 .\"
-.\"    @(#)lint.1      5.1 (Berkeley) %G%
+.\" This module is believed to contain source code proprietary to AT&T.
+.\" Use and redistribution is subject to the Berkeley Software License
+.\" Agreement and your Software Agreement with AT&T (Western Electric).
 .\"
 .\"
-.TH LINT 1 "7 March 1983"
-.UC 4
-.SH NAME
-lint \- a C program verifier
-.SH SYNOPSIS
-.B lint
-[
-.B \-abchnpuvx
-]
-file ...
-.SH DESCRIPTION
-.I Lint
+.\"    @(#)lint.1      6.6 (Berkeley) 8/9/91
+.\"
+.Dd August 9, 1991
+.Dt LINT 1
+.Os BSD 4
+.Sh NAME
+.Nm lint
+.Nd "a C program verifier"
+.Sh SYNOPSIS
+.Nm lint
+.Op Fl abchnpuvx
+.Ar file ...
+.Sh DESCRIPTION
+.Nm Lint
 attempts to detect features of the C program
 attempts to detect features of the C program
-.I files
+.Ar files
 which are
 likely to be bugs, or non-portable, or wasteful.
 It also checks the type usage of the program more strictly
 which are
 likely to be bugs, or non-portable, or wasteful.
 It also checks the type usage of the program more strictly
@@ -31,154 +34,148 @@ Moreover, the usage of functions is checked to find
 functions which return values in some places and not in others,
 functions called with varying numbers of arguments,
 and functions whose values are not used.
 functions which return values in some places and not in others,
 functions called with varying numbers of arguments,
 and functions whose values are not used.
-.PP
+.Pp
 By default, it is assumed that all the
 By default, it is assumed that all the
-.I files
+.Ar files
 are to be loaded together; they are checked for
 mutual compatibility.
 Function definitions for certain libraries are available to
 are to be loaded together; they are checked for
 mutual compatibility.
 Function definitions for certain libraries are available to
-.IR lint ;
+.Nm lint  ;
 these libraries are referred to by a
 conventional name,
 such as `\-lm', in the style of
 these libraries are referred to by a
 conventional name,
 such as `\-lm', in the style of
-.IR ld (1).
+.Xr ld  1  .
 Arguments ending in
 Arguments ending in
-.I .ln
+.Va .ln
 are also treated as library files.  To create lint libraries,
 use the
 are also treated as library files.  To create lint libraries,
 use the
-.B \-C
+.Fl C
 option:
 option:
-.IP
-lint \-Cfoo files . . .
-.PP
+.Pp
+.Dl lint \-Cfoo files . . .
+.Pp
 where
 where
-.I files
+.Ar files
 are the C sources of library
 are the C sources of library
-.I foo.
+.Ar foo .
 The result is a file
 The result is a file
-.I llib-lfoo.ln
+.Pa llib-lfoo .ln
 in the correct library format suitable for linting programs
 using
 in the correct library format suitable for linting programs
 using
-.I foo.
-.PP
+.Ar foo .
+.Pp
 Any number of the options in the following list
 may be used.
 The
 Any number of the options in the following list
 may be used.
 The
-.SM
-.BR \-D "\*S,"
-.SM
-.BR \-U "\*S,"
+.Fl D ,
+.Fl U
 and
 and
-.SM
-.B \-I
+.Fl I
 options of
 options of
-.IR cc (1)
+.Xr cc  1
 are also recognized as separate arguments.
 are also recognized as separate arguments.
-.TP
-.B p
+.Bl -tag -width flag
+.It Fl p
 Attempt to check portability to the
 Attempt to check portability to the
-.I IBM
+.Tn IBM
 and
 and
-.I GCOS
+.Tn GCOS
 dialects of C.
 dialects of C.
-.TP
-.B h
+.It Fl h
 Apply a number of heuristic tests to attempt to
 intuit bugs, improve style, and reduce waste.
 Apply a number of heuristic tests to attempt to
 intuit bugs, improve style, and reduce waste.
-.TP
-.B b
+.It Fl b
 Report
 Report
-.I break
+.Ar break
 statements that cannot be reached.
 (This is not the default because, unfortunately,
 most
 statements that cannot be reached.
 (This is not the default because, unfortunately,
 most
-.I lex
+.Xr lex 1
 and many
 and many
-.I yacc
+.Xr yacc 1
 outputs produce dozens of such comments.)
 outputs produce dozens of such comments.)
-.TP
-.B v
+.It Fl v
 Suppress complaints about unused arguments in functions.
 Suppress complaints about unused arguments in functions.
-.TP
-.B x
+.It Fl x
 Report variables referred to by extern declarations,
 but never used.
 Report variables referred to by extern declarations,
 but never used.
-.TP
-.B a
+.It Fl a
 Report assignments of long values to int variables.
 Report assignments of long values to int variables.
-.TP
-.B c
+.It Fl c
 Complain about casts which have questionable portability.
 Complain about casts which have questionable portability.
-.TP
-.B u
+.It Fl u
 Do not complain about functions and variables used and not
 defined, or defined and not used (this is suitable for running
 Do not complain about functions and variables used and not
 defined, or defined and not used (this is suitable for running
-.I lint
+.Nm lint
 on a subset of files out of a larger program).
 on a subset of files out of a larger program).
-.TP
-.B n
+.It Fl n
 Do not check compatibility against the standard library.
 Do not check compatibility against the standard library.
-.TP
-.B z
+.It Fl z
 Do not complain about structures that are never defined (e.g.
 using a structure pointer without knowing its contents.).
 Do not complain about structures that are never defined (e.g.
 using a structure pointer without knowing its contents.).
-.PP
-.IR Exit (2)
+.El
+.Pp
+.Xr Exit  2
 and other functions which do not return
 are not understood; this causes various lies.
 and other functions which do not return
 are not understood; this causes various lies.
-.PP
+.Pp
 Certain conventional comments in the C source
 will change the behavior of
 Certain conventional comments in the C source
 will change the behavior of
-.IR lint :
-.TP
-/*NOTREACHED*/
+.Nm lint  :
+.Bl -tag -width Ds
+.It Li /*NOTREACHED*/
 at appropriate points
 stops comments about unreachable code.
 at appropriate points
 stops comments about unreachable code.
-.TP
-.RI /*VARARGS n */
+.It Li /*VARARGS n */
 suppresses
 the usual checking for variable numbers of arguments
 in the following function declaration.
 The data types of the first
 suppresses
 the usual checking for variable numbers of arguments
 in the following function declaration.
 The data types of the first
-.I n
+.Ar n
 arguments are checked;
 a missing
 arguments are checked;
 a missing
-.I n
+.Ar n
 is taken to be 0.
 is taken to be 0.
-.TP
-/*NOSTRICT*/
+.It Li /*NOSTRICT*/
 shuts off strict type checking in the next expression.
 shuts off strict type checking in the next expression.
-.TP
-/*ARGSUSED*/
+.It Li /*ARGSUSED*/
 turns on the
 turns on the
-.B \-v
+.Fl v
 option for the next function.
 option for the next function.
-.TP
-/*LINTLIBRARY*/
+.It Li /*LINTLIBRARY*/
 at the beginning of a file shuts off complaints about
 unused functions in this file.
 at the beginning of a file shuts off complaints about
 unused functions in this file.
-.SH AUTHOR
+.Sh AUTHOR
 S.C. Johnson.  Lint library construction implemented by Edward Wang.
 S.C. Johnson.  Lint library construction implemented by Edward Wang.
-.SH FILES
-.ta \w'/usr/lib/lint/llib-port.ln  'u
-/usr/lib/lint/lint[12] programs
-.br
-/usr/lib/lint/llib-lc.ln       declarations for standard functions
-.br
-/usr/lib/lint/llib-lc  human readable version of above
-.br
-/usr/lib/lint/llib-port.ln     declarations for portable functions
-.br
-/usr/lib/lint/llib-port        human readable . . .
-.br
-llib-l*.ln     library created with
-.B \-C
-.SH SEE ALSO
-cc(1)
-.br
-S. C. Johnson,
-.I Lint, a C Program Checker
-.SH BUGS
+.Sh FILES
+.Bl -tag -width /usr/libdata/lint/llib-port.ln -compact
+.It Pa /usr/libdata/lint/llib-lc.ln
+Declarations for standard functions.
+.It Pa /usr/libdata/lint/llib-lc
+Human readable version of above.
+.It Pa /usr/lib/lintdata/llib-port.ln
+Declarations for portable functions.
+.It Pa /usr/lib/lintdata/llib-port
+Human readable.
+.It Pa llib-l*.ln
+Library created with
+.Fl C .
+.El
+.Sh SEE ALSO
+.Xr cc 1
+.Rs
+.%A S. C. Johnson,
+.%T "Lint, a C Program Checker"
+.Re
+.Sh HISTORY
+The
+.Nm lint
+program appeared in
+.At v7 .
+.Sh BUGS
 There are some things you just
 There are some things you just
-.B can't
+can't
 get lint to shut up about.
 get lint to shut up about.
+.Pp
+.Li /*NOSTRICT*/
+is not implemented in the current version (alas).