home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / forut062.zip / ForUtil-0.62 / man / doc / scan_commons.txt < prev   
Text File  |  1996-08-28  |  8KB  |  265 lines

  1.  
  2.  
  3.  
  4. SCAN_COMMONS(1)       ForUtil Fortran Tools       SCAN_COMMONS(1)
  5.  
  6.  
  7. NAME
  8.        scan_commons - create a fortran f77 commons database.
  9.  
  10.  
  11. SYNOPSIS
  12.        scan_commons  [-afhqrsv]  -Eext  -Idir  -ddatabase  -xname
  13.        [files]
  14.  
  15.  
  16. DESCRIPTION
  17.        scan_commons builds a database from the contents of common
  18.        blocks or variable declarations.  scan_commons is intended
  19.        to work with f77 include files  containing  common  blocks
  20.        and  global  variable declarations, but can works with f77
  21.        source files.
  22.  
  23.        The following variable declarations are recognized:  CHAR-
  24.        ACTER,  COMMON,  COMPLEX, DOUBLE PRECISION, INTEGER, LOGI-
  25.        CAL, PARAMETER and REAL.
  26.  
  27.        The generated database can  subsequently  be  used  for  a
  28.        quick  lookup  using  get_common(1)  to  see  in which f77
  29.        include file a certain common variable is defined.
  30.  
  31.        scan_commons uses the GNU database manager gdbm for  stor-
  32.        ing, checking and retrieving items in the database.
  33.  
  34.  
  35. OPTIONS
  36.        -a     Add  duplicate  commons if they are defined in dif-
  37.               ferent include files. If you choose not to use this
  38.               flag,  duplicate  commons  defined in different f77
  39.               include files will not be stored in  the  generated
  40.               database.
  41.  
  42.  
  43.        -f     Store  filenames only. The default is to store path
  44.               and  filename.   Use  this   option   to   preserve
  45.               diskspace  (or  memory if you are running this tool
  46.               under MS-DOS).
  47.  
  48.  
  49.        -h, --help
  50.               gives a short overview of every option.
  51.  
  52.  
  53.        -q     be really quiet. This will only print fatal  errors
  54.               on stderr.  Usefull if called from a script.
  55.  
  56.  
  57.        -r     re-organize  the  database after creation/updating.
  58.               This may take a long time since  the  old  database
  59.               will be read, sorted and written again. This option
  60.               can be used standalone.
  61.  
  62.  
  63.  
  64. Linux                      August 1996                          1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SCAN_COMMONS(1)       ForUtil Fortran Tools       SCAN_COMMONS(1)
  71.  
  72.  
  73.        -s     safe operation: every time a common  is  found  the
  74.               database  will  be  updated  immediatly. Using this
  75.               option can slow  the  generation  or  update  of  a
  76.               database seriously down since no caching will done.
  77.  
  78.  
  79.        -v     Be verbose.  scan_commons will print out a list  of
  80.               directories  to visit, what extensions it is using,
  81.               the number of files it has to scan, a complete list
  82.               of  all  files to scan and a status report of every
  83.               file scanned.  The output of these statistics is as
  84.               follows:
  85.  
  86.               Statistics for file foo.inc (9/67)
  87.               commons found      : 16
  88.                      The total number of commons found in foo.inc
  89.               duplicate commons  : 3
  90.                      The total number of duplicate commons  found
  91.                      in foo.inc. These duplicates can be found in
  92.                      another include file.
  93.               commons rejected   : 0
  94.                      Number of commons rejected. This number  can
  95.                      be different from 0 if you are performing an
  96.                      update of a database.
  97.               commons accepted   : 19
  98.                      Total number of commons accepted  for  stor-
  99.                      age.
  100.               commons stored     : 19
  101.                      Total number of commons actually stored.
  102.  
  103.  
  104.        --version
  105.               Shows the version number of scan_commons
  106.  
  107.  
  108.        -Eext  Extensions scan_commons must use to determine which
  109.               files it has to scan. Up to eight -E  are  allowed.
  110.               Use  -E-  to  specify  no  extension.   The default
  111.               extension is the empty extension.
  112.  
  113.  
  114.        -Idir  Using this option tells scan_commons which directo-
  115.               ries it has to search for f77 files containing com-
  116.               mon blocks. Only the contents of that directory are
  117.               scanned.  Subdirectories  are ignored.  Up to 64 -I
  118.               are allowed.
  119.  
  120.  
  121.        -ddatabase
  122.               Name of the database to create  or  update.  If  no
  123.               database  is  specified,  scan_commons looks at the
  124.               value of the environment  variable  COMMON_DATABASE
  125.               If   this  variable  points  to  a  database,  that
  126.               database will be used.
  127.  
  128.  
  129.  
  130. Linux                      August 1996                          2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SCAN_COMMONS(1)       ForUtil Fortran Tools       SCAN_COMMONS(1)
  137.  
  138.  
  139.        -xname Tells scan_commons to exclude the named  file  when
  140.               scanning the files found with the -I -E options. Up
  141.               to 64 -x are allowed.
  142.  
  143.  
  144.        [files]
  145.               Additional files to scan for common blocks
  146.  
  147.  
  148. DIAGNOSTICS
  149.        The following warning messages can occur:
  150.  
  151.        Warning: intended comment found
  152.               scan_commons has detected a comment (a line  begin-
  153.               ning  with a *, c or C) which does not start at the
  154.               beginning of a line but before the seventh  column.
  155.  
  156.        Warning: more than 19 continuation lines near line XX
  157.               scan_commons  has  detected more than 19 successive
  158.               continuation lines. XX  indicates  near  what  line
  159.               this occurs.
  160.  
  161.        Parse Error: unbalanced brace or delimiter
  162.               a  unbalanced brace or delimiter has been detected.
  163.               When this happens, scan_commons will tell you  near
  164.               what  line  this error occured. This is a non-fatal
  165.               error.
  166.  
  167.        Internal Parse Error: Invalid token range
  168.  
  169.        Internal Parse Error: Failed to remove common keywords
  170.               These are internal parser errors, which  will  most
  171.               likely  never be generated.  If these occur, please
  172.               contact the author. These errors are fatal.
  173.  
  174.  
  175. COMPATIBILITY
  176.        The generated database can be shared without  problems  on
  177.        different 32bit systems, but you can not access a database
  178.        generated on a 32bit system from a 16 or 64 bit system.
  179.  
  180.        The MS-DOS versions have been built  with  flex  2.53  (no
  181.        changes to the source code) and gdbm 1.7.3, which required
  182.        some work to get it working under MS-DOS.
  183.  
  184.        scan_commons has run under HP-UX 9 and 10, SGI IRIX 5.2  &
  185.        5.3, DEC OSF1, SunOs 4.1 and 4.3, Cray Unicos, IBM AIX 3.2
  186.        & 4.1, Linux and MSDOS 6.2.  scan_commons also runs  in  a
  187.        dos box under Windows 3.1, 3.11 and Win95.
  188.  
  189.  
  190. ENVIRONMENT
  191.        COMMON_DATABASE
  192.               Points  to  the location of a common database. This
  193.  
  194.  
  195.  
  196. Linux                      August 1996                          3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SCAN_COMMONS(1)       ForUtil Fortran Tools       SCAN_COMMONS(1)
  203.  
  204.  
  205.               environment variable is only used if the -ddatabase
  206.               option is not given.
  207.  
  208.  
  209. DISTRIBUTION POLICY
  210.        All  utilities  in  this  fortran  utility  suite are dis-
  211.        tributed under the GNU Public License.
  212.  
  213.  
  214. BUGS
  215.        A known bug is a malloc  failure  when  updating  a  large
  216.        database  under  MS-DOS.   This is a gdbm-related failure,
  217.        and the only  solution  is  to  create  several,  smaller,
  218.        databases.
  219.  
  220.        If  a  bug occurs, it will most likely be generated by the
  221.        MS-DOS versions of these tools. This will be mainly due to
  222.        the 640kb memory limit MS-DOS has.
  223.  
  224.        If  you  think you have found a bug, you can send email to
  225.        the author, describing what the bug is, how you  generated
  226.        it  and if you can reproduce it. Also specify the platform
  227.        where this bug occured.
  228.  
  229.  
  230. AUTHOR
  231.        Koen D'Hondt
  232.        ripley@xs4all.nl
  233.        (C)Copyright 1995-1996 by Ripley Software Development
  234.  
  235.  
  236. SEE ALSO
  237.        get_common(1),   list_commons(1),   fflow(1),   ffscan(1),
  238.        ftags(1)
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. Linux                      August 1996                          4
  263.  
  264.  
  265.