home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
forut062.zip
/
ForUtil-0.62
/
man
/
preformat
/
scan_commons.1
< prev
Wrap
Text File
|
1996-08-28
|
9KB
|
265 lines
SCAN_COMMONS(1) ForUtil Fortran Tools SCAN_COMMONS(1)
NNAAMMEE
scan_commons - create a fortran f77 commons database.
SSYYNNOOPPSSIISS
ssccaann__ccoommmmoonnss [[--aaffhhqqrrssvv]] --EE_e_x_t --II_d_i_r --dd_d_a_t_a_b_a_s_e --xx_n_a_m_e
[[ffiilleess]]
DDEESSCCRRIIPPTTIIOONN
ssccaann__ccoommmmoonnss builds a database from the contents of common
blocks or variable declarations. ssccaann__ccoommmmoonnss is intended
to work with f77 include files containing common blocks
and global variable declarations, but can works with f77
source files.
The following variable declarations are recognized: CCHHAARR--
AACCTTEERR,, CCOOMMMMOONN,, CCOOMMPPLLEEXX,, DDOOUUBBLLEE PPRREECCIISSIIOONN,, IINNTTEEGGEERR,, LLOOGGII--
CCAALL,, PPAARRAAMMEETTEERR and RREEAALL..
The generated database can subsequently be used for a
quick lookup using ggeett__ccoommmmoonn(1) to see in which f77
include file a certain common variable is defined.
ssccaann__ccoommmmoonnss uses the GNU database manager gdbm for stor-
ing, checking and retrieving items in the database.
OOPPTTIIOONNSS
--aa Add duplicate commons if they are defined in dif-
ferent include files. If you choose not to use this
flag, duplicate commons defined in different f77
include files will not be stored in the generated
database.
--ff Store filenames only. The default is to store path
and filename. Use this option to preserve
diskspace (or memory if you are running this tool
under MS-DOS).
--hh,, ----hheellpp
gives a short overview of every option.
--qq be really quiet. This will only print fatal errors
on stderr. Usefull if called from a script.
--rr re-organize the database after creation/updating.
This may take a long time since the old database
will be read, sorted and written again. This option
can be used standalone.
Linux August 1996 1
SCAN_COMMONS(1) ForUtil Fortran Tools SCAN_COMMONS(1)
--ss safe operation: every time a common is found the
database will be updated immediatly. Using this
option can slow the generation or update of a
database seriously down since no caching will done.
--vv Be verbose. ssccaann__ccoommmmoonnss will print out a list of
directories to visit, what extensions it is using,
the number of files it has to scan, a complete list
of all files to scan and a status report of every
file scanned. The output of these statistics is as
follows:
Statistics for file foo.inc (9/67)
commons found : 16
The total number of commons found in foo.inc
duplicate commons : 3
The total number of duplicate commons found
in foo.inc. These duplicates can be found in
another include file.
commons rejected : 0
Number of commons rejected. This number can
be different from 0 if you are performing an
update of a database.
commons accepted : 19
Total number of commons accepted for stor-
age.
commons stored : 19
Total number of commons actually stored.
----vveerrssiioonn
Shows the version number of ssccaann__ccoommmmoonnss
--EE_e_x_t Extensions ssccaann__ccoommmmoonnss must use to determine which
files it has to scan. Up to eight -E are allowed.
Use _-_E_- to specify no extension. The default
extension is the empty extension.
--II_d_i_r Using this option tells ssccaann__ccoommmmoonnss which directo-
ries it has to search for f77 files containing com-
mon blocks. Only the contents of that directory are
scanned. Subdirectories are ignored. Up to 64 -I
are allowed.
--dd_d_a_t_a_b_a_s_e
Name of the database to create or update. If no
database is specified, ssccaann__ccoommmmoonnss looks at the
value of the environment variable CCOOMMMMOONN__DDAATTAABBAASSEE
If this variable points to a database, that
database will be used.
Linux August 1996 2
SCAN_COMMONS(1) ForUtil Fortran Tools SCAN_COMMONS(1)
--xx_n_a_m_e Tells ssccaann__ccoommmmoonnss to exclude the named file when
scanning the files found with the _-_I _-_E options. Up
to 64 -x are allowed.
[[ffiilleess]]
Additional files to scan for common blocks
DDIIAAGGNNOOSSTTIICCSS
The following warning messages can occur:
WWaarrnniinngg:: iinntteennddeedd ccoommmmeenntt ffoouunndd
scan_commons has detected a comment (a line begin-
ning with a *, c or C) which does not start at the
beginning of a line but before the seventh column.
WWaarrnniinngg:: mmoorree tthhaann 1199 ccoonnttiinnuuaattiioonn lliinneess nneeaarr lliinnee XXXX
scan_commons has detected more than 19 successive
continuation lines. XX indicates near what line
this occurs.
PPaarrssee EErrrroorr:: uunnbbaallaanncceedd bbrraaccee oorr ddeelliimmiitteerr
a unbalanced brace or delimiter has been detected.
When this happens, ssccaann__ccoommmmoonnss will tell you near
what line this error occured. This is a non-fatal
error.
IInntteerrnnaall PPaarrssee EErrrroorr:: IInnvvaalliidd ttookkeenn rraannggee
IInntteerrnnaall PPaarrssee EErrrroorr:: FFaaiilleedd ttoo rreemmoovvee ccoommmmoonn kkeeyywwoorrddss
These are internal parser errors, which will most
likely never be generated. If these occur, please
contact the author. These errors are fatal.
CCOOMMPPAATTIIBBIILLIITTYY
The generated database can be shared without problems on
different 32bit systems, but you can not access a database
generated on a 32bit system from a 16 or 64 bit system.
The MS-DOS versions have been built with flex 2.53 (no
changes to the source code) and gdbm 1.7.3, which required
some work to get it working under MS-DOS.
ssccaann__ccoommmmoonnss has run under HP-UX 9 and 10, SGI IRIX 5.2 &
5.3, DEC OSF1, SunOs 4.1 and 4.3, Cray Unicos, IBM AIX 3.2
& 4.1, Linux and MSDOS 6.2. ssccaann__ccoommmmoonnss also runs in a
dos box under Windows 3.1, 3.11 and Win95.
EENNVVIIRROONNMMEENNTT
CCOOMMMMOONN__DDAATTAABBAASSEE
Points to the location of a common database. This
Linux August 1996 3
SCAN_COMMONS(1) ForUtil Fortran Tools SCAN_COMMONS(1)
environment variable is only used if the --dd_d_a_t_a_b_a_s_e
option is not given.
DDIISSTTRRIIBBUUTTIIOONN PPOOLLIICCYY
All utilities in this fortran utility suite are dis-
tributed under the GNU Public License.
BBUUGGSS
A known bug is a malloc failure when updating a large
database under MS-DOS. This is a gdbm-related failure,
and the only solution is to create several, smaller,
databases.
If a bug occurs, it will most likely be generated by the
MS-DOS versions of these tools. This will be mainly due to
the 640kb memory limit MS-DOS has.
If you think you have found a bug, you can send email to
the author, describing what the bug is, how you generated
it and if you can reproduce it. Also specify the platform
where this bug occured.
AAUUTTHHOORR
Koen D'Hondt
ripley@xs4all.nl
(C)Copyright 1995-1996 by Ripley Software Development
SSEEEE AALLSSOO
ggeett__ccoommmmoonn(1), lliisstt__ccoommmmoonnss(1), ffffllooww(1), ffffssccaann(1),
ffttaaggss(1)
Linux August 1996 4