/*
 * aegis - project change supervisor
 * Copyright (C) 2000, 2002, 2004, 2006-2008 Peter Miller
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 ***************************************************************************
FlexeLint for C/C++ (U32) Ver. 7.50, Copyright Gimpel Software 1985-1997

     Error Inhibition Options (- inhibits and + enables error messages)
            (# may include wild-card characters '?' and '*')

-e#   inhibit message number #          -e(#) for next expression
!e#   inhibit message # this line       --e(#) for entire current expression
-eai  args differ sub-integer           -epn  pointers to nominal
-ean  args differ nominally             -eps  pointers to same size
-eas  args same size                    -epu  pointers to signed-unsigned
-eau  args differ signed-unsigned       -epp  pointers are pointers
-efile(#,<File>)  by number, file       -epuc pointers to sgnd-unsgnd chars
-elib(#)  within library headers        -epnc pointers to nominal chars
-elibsym(#) for all library symbols     -emacro(#,Symbol) within macro
-efunc(#,<Func>)  by number, function   -emacro((#),Symbol) within expr macro
-esym(#,Symbol)  by number, symbol      -etd(<TypeDiff>) ignore type diff.
-w<Lev> set warning level (0,1,2,3,4)   -wlib(<Lev>) set wrng. lvl. for library

                    Size Options (default value(s))

-sc#   sizeof(char) (1)                 -slc#  sizeof(long char) (2)
-ss#   sizeof(short) (2)                -si#   sizeof(int) (4)
-sl#   sizeof(long) (4)                 -sll#  sizeof(long long) (8)
-sf#   sizeof(float) (4)                -sd#   sizeof(double) (8)
-sld#  sizeof(long double) (16)         -sp#   sizeof(all pointers) (4)
-spD#  size of data ptrs (4)            -spP#  size of program ptrs (4)
-smp#  size of all member ptrs (4)      -smpD# size of mem ptr (data) (4)
-smpP# size of mem ptrs (prog) (4)      -sw#   size of wide char (2)
-sb#   bits in a byte (8)


     Verbosity Options (- output to stdout only, + to stderr and stdout)
                    Format: {-+}v[oish#][mf<int>]

Zero or more of:
   o: list options  i: show indirect files  s: give storage report
   h: dump strong type hierarchy  #: append file ID nos.
One of:
   m: Module names  f: header Files (implies m)
   <int>:  every <int> lines (implies f)
Special cases (no suboptions):
   -v   Turn off verbosity        +v   direct verbosity to both


                           Flag Options
          (+ sets,- resets, ++ increments and -- decrements flag)

fab  ABbreviated structures (OFF)       fai  pointed-to Arg is Initialized (ON)
fan  ANonymous unions (OFF)             fas  Anonymous Structures (OFF)
fba  Bit Addressability (OFF)           fbc  Boolean Constants 0b... (OFF)
fbo  Activate bool, true, false (ON)    fbu  force Bit fields Unsigned (OFF)
fce  continue-on-error (OFF)            fcp  (C++) Force C++ processing (OFF)
fct  Create Tags (OFF)                  fcu  char-is-unsigned (OFF)
fdc  (C++) Distinguish plain Char (ON)  fdh  append '.h' to header names (OFF)
fdi  Directory of Including file(ON)    fdl  pointer-diff.-is-long (OFF)
fdr  deduce-return-mode (OFF)           feb  enum's can be Bitfields (ON)
fem  allow Early Modifiers (OFF)        ffb  for clause creates Block (ON)
ffd  promote floats to double (OFF)     ffo  flush output each msg (ON)
ffn  full file name (OFF)               fhd  hierarchy down warning (ON)
fhg  hierarchy uses graph. chars (OFF)  fhs  hierarchy of strong types (ON)
fhx  hierarchy of index types (ON)      fie  integer-model-for-enums (OFF)
fiq  ignore default qualifier (OFF)     fis  integral consts. are signed (OFF)
fil  indentation check of labels (OFF)  fim  -i can have multiple dirs. (ON)
fkp  K&R preprocessor (OFF)             flb  library (OFF)
flc  allow long char (OFF)              flf  (C++) process lib func defs (OFF)
fll  allow long long int (OFF)          fln  activate #line (ON)
fmd  multiple definitons (OFF)          fna  (C++) allow 'operator new[]' (ON)
fnc  nested comments (OFF)              fnt  (C++) Nested Tags (ON)
fod  Output Declared to object (OFF)    fol  Output Library to object (OFF)
fpa  PAuse before exiting (OFF)         fpc  Pointer Casts retain lvalue(OFF)
fpm  Precision is Max of args (OFF)     fpn  pointer param may be NULL (OFF)
fps  Parameters within Strings (OFF)    frb  Files fopen'ed with "rb" (OFF)
fsa  structure-assignment (ON)          fsc  strings are const char * (OFF)
fsu  string unsigned (OFF)              ftf  raw template functions (OFF)
ful  unsigned long (ON)                 fva  variable arguments (OFF)
fvo  void data type (ON)                fvr  varying-return-mode (OFF)
fwc  use internal wchar_t (OFF)         fwu  wchar_t is unsigned (OFF)
fxa  eXact array arg. (OFF)             fxc  eXact char arg. (OFF)
fxf  eXact float arg. (OFF)             fxs  eXact short arg. (OFF)
fzl  sizeof-is-long (OFF)               fzu  sizeof-is-unsigned (ON)

                     Message Formatting Options

-h[abfFrsm/<M>/]<I>]<ht>   message height (default = -ha_3)
  (<ht> is msg ht., position indicator <I> placed a=above or b=below line,
   f= more file info, F= always file info, r= repeat line, s= space between
   messages, m/<M>/ Macro Indicator is <M>,  mn= no macros )
-width(<Width>,<Indent>)  message width (default = -width(79,4))
-format=...               specifies message format
-format4a=,  -format4b=   specifies format if msg. ht. = 4

                          Other Options

-A                     only ANSI keywords
-/+b                   No/Redirect Banner line
-c<code>               compiler code
-/+cpp(extension)      remove/add .ext for C++ files
-d<name>[=<value>]     defines symbol
-D<nm>[=<val>][;<nm>[=<val>]]... define set of symbols
+d... or +D...  same as -d or -D except it locks in definitions
+ext(ext[,ext]...)     extensions -- defaults to +ext(lnt,cpp,c)
-father(Parent,Children) a stricter verson of parent
-function(f0,f1[,f2]...)  make function f1 (, f2 ...) like
    f0;  f0 can be free, exit, longjmp, or realloc
-header(file)          auto-includes file in each module
-i<directory>          #include directory
-idlen(<n>[,opt])      report identifier clashes in <n> chars
                       opt: x=external, p=preprocessor, c=compiler
-ident(<chars>)        add identifier characters
-incvar(name)          change name of INCLUDE environment variable
-index(flags,ixtype,type(s)) establish ixtype as index type
    flags: c == allow Constants, d == allow Dimensions
+libclass([all,angle,ansi,foreign]...) default library headers
-/+libdir(directory[,...])  deny or specify library directory
-/+libh(header[,...])  deny or specify library header by name
-library               sets library flag
-limit(<n>)            limits the number of messages
+lnt(ext)              file.ext is treated like file.lnt
-lobbase(filename)     establish a lob base file
-/+macros              halve/double the maximum macro size
-maxopen(<n>)          assumed number of openable files
-oo[(filename)]        Output to lint object file
-ol(filename)          Output library file
-od[options](filename)    Output declarations of defined external
    objects and functions including prototypes,
    options: f=only functions, i=internal functions, s=structs
             <width>=specify break width
-oe(filename)          Redirect to standard Error (+oe appends)
-os(filename)          Redirect to standard out (+os appends)
-p[(n)]                just preprocess, n == max output width
-parent(Parent,Children) augment strong type hierarchy
-ppw(word[,...])       removes(-) or adds(+) pre-processor
+ppw(word[,...])       keywords, eg: +ppw(ident) enables #ident
+pragma(name,action)   associates action 'on' or 'off' with name
-printf(#,id[,...])    printf-like, # is arg. no. of format
-restore               resets error inhibitions
-rw(word[,...])        removes(-) or adds(+) reserved words
+rw(word[,...])        word = '*ms' implies all MS keywords
-save                  saves error inhibitions
------> quit (q), previous (p), or next [n]
-scanf(#,id[,...])     scanf-like, # is arg. no. of format
-sem(name,sem[,sem]...) associates a set of semantics with a function
-size(flags,amount)    report large aggregates; flags: a auto, s static
-strong(Flags,Type(s)) check strong types ..., Flags are:
    A[irpacz] == on Asgn to (except Init, Ret, Param, Asgn op, Consts, Zero);
    J[erocz] == on Joining (except Eqlty, Rel, Other ops, Constants, Zero);
    X == on eXtraction;   l == allow library;    B[f] or b[f] == strong and
    weak Boolean (f == length-1 bit fields are NOT Boolean)
-t#                    set tab size to #
-u                     unit checkout
-unreachable           a point in a program is unreachable
-u<name>               undefines <name>
--u<name>              ignore past and future defines of <name>
-w<level>              set warning level (0,1,2,3,4)
-wlib(<level>)         set warning level for msgs. within library
-wprintf(#,id[,...])   wide char version of -printf
-wscanf(#,id[,...])    wide char version of -scanf
-zero[(#)]             sets exit code to 0, unless msg. no. < #
-$                     permits $ in identifiers

                     Compiler-dependency Options

-a#<predicate>(tokens)  (Unix) Assert the truth of #<predicate> for tokens
-d<name>()[=<value>]   define function-like macro
-#d<name>[=<value>]    defines symbol (for #include only)
-overload(X)           hex constant X sets esoteric overload resolution flags
-plus(Char)            identifies Char as an alternate option char equiv to +
-template(X)           hex constant X sets esoteric template flags

                    Compiler-dependency Keywords

_bit         1 bit wide type            _gobble      ignore next token
_to_brackets ignore next expression     _to_semi     ignore until ;
 ***************************************************************************
 */

#if 0
if [find_command flint] then
    all += lint.targets;
#endif

flint-flags =
        ;

lint.targets: [fromto %0%.cc %0%.lob [match_mask %1/%0%.cc [source_files]]];

%1/%0%.lob: %1/%0%.cc: etc/lint.flags.lnt
{
    flint
        [flint-flags]
        [stringset
            [prepost "-I" "/etc/flint" [search_list]]
            [prepost "-I" "/%1" [search_list]]
            [cc_include_flags]
            -I/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/include
            -I/usr/include
        ]
        [resolve etc/lint.flags.lnt]
        [resolve %0%.cc]
        "-oo'("[target]")'";
    /* I haven't got enuf disk space, and we're not using them anyway,
       so nuke the .lob files */
    cp /dev/null [target]
        set silent;
}
