INFANTS Mini-Users' Guide
INFANTS generates hypertext copies of selected
FORTRAN source code files including an index page
that categorizes all identified programs, modules, subroutines, functions,
and interfaces. The hypertext versions contain links from any usage of
the declarations to their definitions. Thus, you can use a standard HTML
web browser to navigate your source code following any desired execution
path by simply clicking on the calling links. In addition, uses of user
defined types and operators (allowed in FORTRAN90/95)
are linked to their definitions. Together, this combination of links allows
new project members to grasp the structure and philosophy of a collection
of source files quickly. Large software teams can also benefit by frequent
review of this representation of structure and philosophy and use the
html files as a significant augmentation to any formal documentation that
may exist.
When multiple definitions are identically named (ignoring case) multiple
links are provided. Since INFANTS doesn't pretend
to be a compiler it can't determine scope. Therefore, links to each of
the multiple definitions are included for the user to decide upon. The
index.html file makes these multiple definitions quite obvious
and can be used to identify and eliminate them if they are not desired.
One possible source for such multiplicity is duplicate source files in
different directories. As a safety against this, unique file names are
generated for each output html file.
The
INFANTS user interface allows interactive selection
of FORTRAN
source files and the output directory. Alternatively, you can collect
them at startup with command line options: use '-r' to have INFANTS
recurse through the directories; use '-e <ext>' for every
extension you want to gather. For example, 'infants -r -e f -e f90'
would collect all the *.f and *.f90 files in the current directory and
below. The interface also allows easy control of levels and styles for syntax highlighting from the corresponding panel. The bottom
strip provides progress feedback while generating html files. Each of
these features is discussed in greater detail below. The screen shot at
right serves as reference -- clicking on a portion of it will take you
to its brief discussion.
The "Generate HTML" button is prominently
positioned, just waiting to be pressed after you've made all your selections.
The first selection to be made is the output
directory, which must already exist. You can type it in directly or
select it using a file browser accessed through the "Browse..."
button. The directory will contain all of the html files including the
index index.html; no subdirectories will be created. The trailing
slash is not necessary, but will be present when using the browser results.
Syntax highlighting refers to formatting
special FORTRAN key words in bold and/or italic
styles. There are several levels (1,2,3) that increasingly format more
key words. Selecting "none" in the level menu will bypass all
such formatting. The levels are:
level 1
|
level 2 adds
|
level 3 adds
|
program,
module, subroutine, function, interface, type
|
if, then,
else, elseif, endif, do, while, until, continue, enddo, select,
case
|
allocate,
deallocate
|
When INFANTS starts the list of selected
files is empty. Files are selected from the mini-file
selector on the right and added to the selected files on the left
by clicking on the "<<<"
button between the panels. They are removed by clicking the ">>>"
button. To pick files in either panel use the standard mouse click alone
to pick a single entry; shift-click to extend a selection to adjacent
members; and control-click to extend selections to non-adjacent files.
The mini-file selector uses a bold font for directory names. Clicking
on one will open that directory. The current and parent directories are
represented with a single and double dot, respectively. The current directory
can be refreshed by clicking the single dot. You can move up to the parent
directory by clicking the double dot. You can also move up any number
of directories by using the directory menu
at the top of the mini-file selector.
The very bottom section provides a progress
meter in the left hand box. During generation of the html files the
meter will move incrementally as each file is processed. At 50%, the first
pass (collecting descriptors) will be complete; the second half measures
progress of writing the html files. In addition to the meter, the long,
right hand box will display the current file name being processed. For
modest collections of source files, or several hundred kilobytes of source
code, the meter and current file name will stream by too quickly to read.
Its purpose is to show activity more informative than an hour glass cursor
for large projects.
|