Insure++ Reference - Configuration Files
Insure++ programs read options from files called
.psrc, which may exist at
various locations in the file system. These options control the
behavior of Insure++ and programs compiled with Insure++.
The files are processed in the order specified below.
Earlier versions of Insure++ used configuration files called
.insure. These files are still
supported by this version, but will not be in the next. Any of the
options on the following pages can also be used in the
.insure files, but without the
insure++." prefix. However, we recommend that
users move to the newer
.psrc file as soon as they can.
In each case, options found in later files override those seen earlier.
All files mentioned above will be processed and the options set before
any source files are processed. You can also override these options
at runtime by using the
Typically, compiler-dependent options are stored in the first location,
site-dependent options are stored in the second location, user-dependent
options are stored in the third location, and project-dependent options
are stored in the fourth location.
-Zop is commonly
used for file-dependent options, and
commonly used for temporary options.
Insure++ configuration files are simple ASCII files created and
modified with a normal text editor.
Entries which begin with the character '#' are
treated as comments and ignored, as are blank lines.
All keywords can be specified in either upper
or lower case, and embedded underbar characters ('_') are ignored.
Arguments can normally be entered in either case, except where this has
specific meaning, such as in directory or file
If a line is too long, or would look better on multiple lines, you can
use the '\' character as a continuation line.
Many projects involve porting applications to several different
platforms or the use of more than one compiler. Insure++ deals
with this by using two built-in variables, which denote the machine
architecture on which you are running and
the name of the compiler you are using. Anywhere that you would normally
specify a pathname or filename, you can then use these values to switch
between various options, each specific to a particular machine or
For example, environment variables,
HOME directories) and the
"%" notation described in
are expanded when processing filenames, so the command
loads an interface file with a name such as
in which the environment variable
Home has been replaced by its value and the
macros have been expanded to indicate the architecture
and compiler name in use.
There is one additional comment that must be made here. In the
.psrc files, there are several
interface_library options of the form
Despite appearances, the
PARASOFT used above is
not a true environment variable. If the
environment variable is not set by the user, it will be
expanded automatically by Insure++ itself.
The following sections describe the interpretation of the various
parameters. They are divided into two classes: compile time and
runtime. Modifying one of the former options requires that files be
recompiled before it can take effect. The latter class merely requires
that the program be executed again.
Some options have default values, which are printed in the following
section in boldface.
A number of the Insure++ options can specify filenames for
various configuration and/or output files. You may either enter a
simple filename or give a template which takes the form of a string of
characters with tokens such as
embedded in it. Each of these is expanded to indicate a certain property
of your program as indicated in the following tables. The first table
lists the options that can be used at both compile and runtime.
Machine architecture on which you are running, e.g.,
Abbreviated name of the compiler you are using, e.g.,
Insure++ version number, e.g. 4.0
Insure++ version number without '.' characters, e.g.,
version 4.0 becomes 40.
.tqs file format version number, e.g., 4.0.0.
Similar to '
%t' but with '.' characters removed.
This second table lists the tokens available only at runtime.
Time of program compilation in format:
Time of program execution in format:
Integer sufficient to make filename unique, starting at 0
Name of executable
Directory containing executable
Thus, the name template
when executed with a program called
foo at 10:30 a.m.
on the 21st of March 1993, might generate a report file with the name
(The last two digits are the seconds after 10:30 on which execution
You can also include environment variables in these filenames so
generates the same filename as the previous example, but also ensures
that the output is placed in the
of the user's
Several of the Insure++ options have effects during both compilation
and program execution. When the option is active it is controlled by an extra
qualifier keyword as shown in the examples below.
suppresses errors in the
READ_NULL class during
program execution. An error in this class detected during compilation
would still be reported.
enables the display of this error category during compilation, but not
during program execution. Compile time options also apply at link
If you wish to apply the same option to both compilation and
execution, simply omit the qualifier.
On the command line, the
-Zoi options are processed from left to right,
after all other
.psrc files, and before
processing any source code. Therefore, the following command line
would tell Insure++ to compile all the files with the
insure -Zoi "compiler gcc" -o foo foo.c
-Zop foo.def foo2.c -Zoi "compiler g++"
foo3.c -Zoi "compiler cc"
Insure++ now encodes certain options at compile-time into the
actual binary that is built. Basically, Insure++ uses the
information available at compile time, e.g. compiler name or executable
name, and encodes a
.psrc option into the binary
itself. This option can be overridden in a
file using the ! character. For example, if you build your
executable with one name and run it in another directory or with a
a different name, you could use an option like
to override the option inside the binary.
Insure++ Reference TOC