This is the lint-PLUS "readme" file. For newer versions of Linux, download "lintplus.taz" or "lplus_glibc. tar.Z" (these two files are identical). For older versions of Linux, download "lplus_libc5.tar.Z". For quick-start instructions, see the next section. For complete in- structions, see Appendix A of "lplusman.txt". For new command-line switches, see the release notes after the quick- start instructions. Recent additions include header-file search opt- ions, Alpha Linux support, integer-size options, and unprototyped- function reports. ---------------------------------------------------------------------- quick-start instructions ---------------------------------------------------------------------- Quick-start instructions for experienced users: (a) Create a program directory (such as "/usr/local/lplus"). (b) Set the environment variable CSILINT to the program- directory path. "sh" users should also "export CSILINT". (c) Set the environment variable CSIHOST to "localhost". "sh" users should also "export CSIHOST". (d) Unpack the program files in the program directory. For example (under Linux): cd /usr/local/lplus tar zxvf /tmp/lintplus.taz (e) Add the program directory to the "path" searchlist: PATH=$CSILINT:$PATH # "sh" users set path = ( $CSILINT $path ) ; rehash # "csh" users (f) Execute "lplus -license=activate". This should display a server code. Write down the server code, then call Clean- scape at (650) 864-9600 and ask for assistance. ---------------------------------------------------------------------- lint-PLUS release notes ---------------------------------------------------------------------- LintPlus now supports Diab and Windows CE targets. For additional information, see the file "crosslint.txt". ---------------------------------------------------------------------- LintPlus now supports Linux targets. Two related option switches have been added: -system=linux -system=linux-alpha "-system=linux" specifies an Intel Linux target. If lint-PLUS is running under Intel Linux, this is the default mode of operation. "-system=linux-alpha" specifies an Alpha Linux tar- get. If lint-PLUS is running under Alpha Linux, this is t he default mode of operation. Can also use "linux_alpha", "LinuxAlpha", etc. ---------------------------------------------------------------------- Under Linux, lint-PLUS now supports kernel-aware programs (i.e., code that relies on kernel data structures). Two related option switches have been added: -kernel Required for kernel-aware Linux programs. "-kernel" is equivalent to the compiler switch "-D__KERNEL__". Can also use "-kern". --kernel Cancels any preceding "-kernel" switch. "--kernel" is equivalent to "-U__KERNEL__". Can also use "--kern". ---------------------------------------------------------------------- For Linux and Solaris hosts, if LintPlus can't find a "standard" (angle-bracketed) header file elsewhere, it now checks the internal "gcc" standard-include directory (where applicable). For HPUX hosts, this search is turned off by default, but can be turn- ed on. Note: LintPlus locates the "gcc" standard-include directory automatic- ally. Three related option switches have been added: -find=gcc Enables the search described above. For Linux and Solaris hosts, this is the default mode of opera- tion. -find=nogcc Disables this search. Note: If "-Snohost" is used, "-find=gcc" is ignored. "-Snohost" implies "-find=nogcc". For additional in- formation, see the following sections. --find Equivalent to "-find=nogcc,noproject" (see the next section). ---------------------------------------------------------------------- For most UNIX hosts, if LintPlus can't find a "local" (double-quoted) header file elsewhere, it now searches "nearby" directories. Technical details: If a source file loads a "local" (double-quoted) header file which can't be located using the normal rules, LintPlus moves up one directory level, relative to the source directory, then searches the directory tree (to a maximum of three levels). If the header file isn't found, lintPLUS moves up another directory level and makes a second attempt. To speed up subsequent searches, matching paths are cached. Three related option switches have been added: -find=project Enables the search described above. This is the de- fault mode of operation. Can also use "-find=proj". -find=noproject Disables this search. Can also use "-find=noproj". --find Equivalent to "-find=nogcc,noproject" (see the pre- ceding section). ---------------------------------------------------------------------- Two additional switches related specifically to "standard" header files have been added: -Snohost -Snolocal Normally, LintPlus searches directories specified by both "-I" and "-S" switches for "standard" (angle-bracketed) header files. It also searches "/usr/include", "/usr/local/include", and internal "gcc" directories (where applicable). If "-Snolocal" is specified, LintPlus doesn't search "-I" directories for "standard" header files. If "-Snohost" is specified, LintPlus doesn't search the host sys- tem's standard-include directories ("/usr/include", "/usr/local/in- clude", and/or internal "gcc" directories). Note: "-Snolocal" may be abbreviated to "-Snoloc". ---------------------------------------------------------------------- The following "magic comments" have been added: /* DISABLE = ALL */ /* ENABLE = ALL */ To disable local-error messages at a given point inside a 'C' file, insert the "magic comment" /* DISABLE = ALL */ at the appropriate location. To enable local-error messages, insert the "magic comment" /* ENABLE = ALL */ at the appropriate location. /* DISABLE = ANY */ /* ENABLE = ANY */ Same as above. "DISABLE = ANY" is an alias for "DISABLE = ALL". "ENABLE = ANY" is an alias for "ENABLE = ALL". ---------------------------------------------------------------------- The following "data size" option switches have been added: -size=short:16,int:32,long:64 - under UNIX /size=(short:16,int:32,long:64) - under VMS The "size" switch may be used to specify the size of one or more data types. Sizes are expressed in bits, and must be divisible by eight. Sizes may be specified individually, or as a group. For example, under UNIX, the following two lines are equivalent: -size=int:64 -size=long:64 -size=int:64,long:64 -64 (or /64 for VMS) The "64" switch sets the size of the "int" and "long" data types to 64 bits. This switch is equivalent to "-size=int:64,long:64" (under UNIX) or "/size=(int:64,long:64)" (under VMS). ---------------------------------------------------------------------- The following "miscellaneous" option switches have been added: -dashes (or /dashes for VMS) If "dashes" is specified, lint-PLUS inserts a separa- tor (i.e., a row of dashes) before each local-mode error message. -strict (or /strict for VMS) "strict" adds extra checks to "global mode". If no arguments are specified, "strict" performs both of the "strict=..." tests described below. Note: "strict" turns "global mode" on. -strict=intsize - under UNIX /strict=intsize - under VMS If integers, longs and/or shorts are the same size on a given system, "global mode" normally disre- gards global-variable discrepancies of the following form: extern int foo; /* source file #1 */ extern long foo; /* source file #2 */ extern short foo; /* source file #3 */ If "strict=intsize" is used, "global mode" reports discrepancies of this type, regardless. Note (a): This option affects inter-module checking. lint-PLUS will report intra-module conflicts (discrep- ancies inside a source file) as "local mode" errors, whether or not "intsize" is used. Note (b): The "portability" option ("p" or "port") turns "strict=intsize" on. -strict=proto - under UNIX /strict=proto - under VMS If "strict" (or "strict=proto") is selected, "global mode" adds a separate section to the output which lists "unprototyped" function calls; i.e., calls to functions which are not prototyped in code preceding the call.