incl(1C++)


incl -- produce #include hierarchy for C and C++ source code

Synopsis

   incl [ -Aklv ] [ -b boxName] [ -h height ] [ -L language ]
        [ -o base ] [ -w width ][ -I include-directory ] file... 

Description

incl prints the #include hierarchy for the C++ source code contained, directly or indirectly, in the given collection of files. In the absence of any -L options, the standard output consists of lines of the form

       A #includes B

where A and B are file names, and A #include's B. Notice that all files, including those directly or indirectly included by the specified files, are searched for #include's.

Output languages

If graphic output is desired, the -L option can be used. The output language can be any of "ps" (postscript), "dag", "pic", "tex", or "dvi". Multiple -L options are allowed. incl places its output for these languages in the file(s) incloutext, where ext is the name of the language.

If any of the input files to incl is dag source, (presumably produced by a previous run of incl), then the #include graph contained therein is incorporated into the current graph. It is up to the user to make certain that the settings of the a, i, and noptions which were used to produce the input dag source match the current settings.

TeX output produced by incl can be included in any tex or latex document by the following sequence of commands:

       \input{inclout}
       \centerline{\box\graph}

where inclout.tex is the TeX file produced by incl.

Additional options to incl are as follows:

-k Only print the file names, not the enclosing <> or " characters. See "Bugs" for why you would want to do this.

-l Print full path names of files (the default is to print the name as it appears in the first file scanned that #includes it).

-I include-directory Search in include-directory when looking for #include files. These directories are searched in order, followed by the standard C++ include directory (/usr/include/CCunless defined otherwise in the incl shell script), followed by /usr/include. If a file is not found, a warning message is printed on stderr.

The following options apply only to graphic output specified by -L:

-A Print ascii output on the standard output in addition to any output(s) specified by -L.

-v Orient the #include graph vertically rather than horizontally.

-b boxName (With -Ltex.) Make boxName, rather than "graph", be the name of the box defined by the TeX code.

-w width, -h height Scale the graph width inches wide, height inches high. width and height should be dimensionless inches, e.g., -h5.2. The default graph size is 8.5x10.

-o base Use base, rather than inclout, as the base name for all output files. base may be any arbitrary path name; any extension on base is ignored.

Example

incl -L tex -L dvi *.h

produces page-sized TeX and dvi versions of the #include hierarchy for the header files in the current directory. The outputs are on inclout.tex and inclout.dvi, respectively. (Notice that inclout.dvi is not what one would get by directly running tex on inclout.tex.)

Notes

dag is an AT&T proprietary tool.

References

hier(1C++),

Bugs

incl performs its own expansion of #include directives, instead of analyzing the output of the C++ preprocessor. This means that it is possible for the output of incl to be different from the actual #include hierarchy expanded at compile time. This bug should probably be removed in a future release.

Some versions of tpic (the pic-to-TeX converter) gets confused by quotes appearing around file names; use the -k flag in this case to suppress the quotes.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004