LintPlus embedded-system support
----------------------------------------------------------------------

1. Overview.

This document discusses  LintPlus  cross-linting issues,  with special
attention to embedded systems.

Section 2 documents a  generic procedure  that can be used  for unsup-
ported targets.  Diab and Windows CE users should follow the instruct-
ions in  sections 3 and 4,  and read section 2 for background informa-
tion.

----------------------------------------------------------------------

2. Generic cross-linting procedure.

LintPlus supports a pre-defined set of target systems (Linux, Solaris,
HPUX, etc.).  Additionally,  Cleanscape will add specific  target sys-
tems, on request.  However,  the  standard version of  LintPlus can be
configured to  cross-lint for  other targets,  including embedded sys-
tems.

To  cross-lint  source code for an  arbitrary target system,  create a
LintPlus command line as follows:

        (a) Specify the LintPlus option switch "-Snohost".  This tells
            LintPlus  not to use the host system's  standard "include"
            files.

        (b) Add the switch "-system=none".  This tells LintPlus not to
            assume any particular target system.

        (c) Add the switch "--lib" (dash dash "lib"). This tells Lint-
            Plus  not to use the prototypes in  "syslib.c".  (For more
            information on "syslib.c", see the LintPlus manual.)

        (d) Add a switch similar to the following:

            -size=short:16,int:16,long:32

            This switch specifies target-system data-type sizes. Modi-
            fy the numbers  shown here  appropriately  for your target
            system.

        (e) Add a switch similar to  "-Ssysdir".  "sysdir" should be a
            full path for  the directory  which  contains the  target-
            system's standard "include" files ("stdio.h", etc.).

        (f) Add one or more  "-Dsymbol" option switches  to define any
            architecture symbols  required by  the  standard "include"
            files, or by the project itself.

        (g) Add  application-specific "-Dsymbol" or "-Idirectory" opt-
            ion switches, as required.  (Normally,  you can copy these
            switches from the project "Makefile".)

        (h) Add normal LintPlus analysis switches, such as "-ghstx".

For example:

        lplus -Snohost -system=none --lib \
              -size=short:16,int:32,long:32 \
              -S/opt/crosscompiler/include -Dsparc \
              -ghstx *.c

Note:  If LintPlus produces invalid syntax-error messages, the program
may be using  unsupported compiler extensions.  In this case,  contact
"support@cleanscape.net".

To fine-tune the results,  you may want  to modify  the definitions in
"syslib.c"  appropriately  for your  target system.  However,  this is
optional.  After "syslib.c" is modified,  the "--lib" switch should be
dropped.

If you'd like to have  Cleanscape modify  "syslib.c" for you,  contact
"support@cleanscape.net".

----------------------------------------------------------------------

3. Diab procedure.

To cross-lint for Diab targets,  build a  command line as described in
section 2.  Add  the switch "-Dwrdiab",  and  drop "--lib".  For exam-
ple:

        lplus -Snohost -system=none -Dwrdiab \
              -size=short:16,int:16,long:32 \
              -S/opt/diab/include -Dm88k \
              -ghstx *.c

----------------------------------------------------------------------

4. Windows CE procedure.

To cross-lint for Windows CE targets, build a command line as describ-
ed in section 2. Add the switch "-Dwince", and drop "--lib". For exam-
ple:

        lplus -Snohost -system=none -Dwince \
              -size=short:16,int:16,long:32 \
              -S/opt/wince/include -Dx86 \
              -ghstx *.c
