1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
|
README file for ftnchek version 2.11
Author: Robert Moniot
Fordham University
New York, NY 10023 USA
Telephone: (212) 636-6311
Internet: moniot@fordham.edu
Date: August 21, 1999
Ftnchek is written in a portable style of C. You must have a C
compiler for the machine on which you wish to build it. The URL for
ftnchek's home page is http://www.dsm.fordham.edu/~ftnchek. Source
code and other information is available there.
If the file you received is a UNIX compressed tar file, suffix .Z, you
should first unzip it using the UNIX ``uncompress'' command, and then
give it as input to ``tar'' to unpack the files. For example, assuming
the file has been placed in the desired directory, and is named
ftnchek.tar.Z, you would give the two UNIX commands
uncompress ftnchek.tar.Z
tar -xf ftnchek.tar
If the suffix is .gz instead of .Z, use the program ``gunzip'' in
place of ``uncompress''. The gunzip program is publicly available
from the GNU project.
The tar command creates a directory named ftnchek-2.11.0 containing the
files of the distribution. These files are described briefly below.
You should change directory to this directory and follow the
installation instructions.
INSTALLING FTNCHEK
------------------
See the file INSTALL for detailed instructions on how to install
ftnchek on your system. Once ftnchek is working, you can test it by
giving the command:
$ ftnchek -list -sym average
Then compare the output against the file ``average.out''. A more
thorough checkout is possible on Unix systems by giving the ``make
check'' command described in the INSTALL file.
NEW FEATURES
------------
Here are the new features in version 2.11, aside from bug fixes:
o New checks for aliasing of subprogram arguments to other
arguments and to COMMON variables. Note: These new checks
necessitated a change in project-file format, so project
files created with earlier versions of ftnchek are
incompatible and will need to be re-created.
o New setting: -errors=num that sets the limit on the
number of error messages in a ``cascade.''
o Changed the following options from numeric to option-list
form: -arguments, -array, -calltree, -common, -makedcls, and
-source. The earlier numeric form is still accepted, but
the newer forms give more detailed control over warnings.
o The Fortran 90 DO ... ENDDO construct, as well as the CYCLE
and EXIT statements, are now fully supported, including
construct names. Construct names are also accepted on IF,
THEN, ELSE, and ENDIF statements.
o Added recognition of the Fortran 90 relational operators.
o Added checking for embedded space in multi-character
operators such as //.
o Added recognition of Fortran-90 I/O keywords and one IBM/MVS
I/O keyword.
Bugs fixed:
o DEC-Fortran style PARAMETER statements (which lack
parentheses) are now correctly treated so that the
parameter's data type is that of the value assigned, rather
than being given by the first letter of the parameter name.
o Handling of #line directives caused erroneous line numbers
and file names to appear in error messages.
o In some situations ftnchek gave erroneous warnings saying
``Subprogram %MAIN multiply defined''.
o In the listing of common block references generated by
-crossref, the blocks are now listed in alphabetical order.
Previously the modules referencing each block were sorted,
but the blocks themselves were printed in the order of
occurrence in the source file.
o An INCLUDE file specified using a relative path is now
searched for relative to the directory of the source file
(before searching in the directories given by -include).
Previously it was searched for relative to the working
directory of the ftnchek process. (The new code is fully
correct only for Unix; for VMS and MS-DOS/Windows the code
may have some loopholes that I am unaware of, while for
MacOS and other OSes, it is not attempted. I would
appreciate assistance from anyone who has experience writing
such code for these other OSes.)
SOURCE FILES
------------
The minimum set of source files needed to compile ftnchek is:
Header files:
config.h ftnchek.h intrins.h iokeywds.h keywords.h
symtab.h tokdefs.h
C source:
exprtype.c forlex.c fortran.c ftnchek.c
pgsymtab.c plsymtab.c project.c symtab.c
An associated file, not needed to compile ftnchek, is the Yacc grammar:
fortran.y
The file fortran.c is generated from fortran.y by yacc or bison. The
file tokdefs.h is a copy of the y.tab.h file also generated from fortran.y.
For VMS, it is recommendend to obtain the file shell_mung.c. This
file is not necessary to build ftnchek, but without it wildcards in
file names on the command line will not be expanded. This file is no
longer bundled with ftnchek, but is obtainable at the ftnchek home
site and elsewhere.
There is a module definition file for IBM PC-OS/2:
ftnchek.def
AUXILIARY FILES
---------------
This section describes the auxiliary and documentation files included
with the distribution.
The example program used in the documentation, the result of running
Ftnchek on it, and the example program, corrected:
average.f average.out correct.f
NOTE: VAX/VMS users should rename "AVERAGE.F" to "AVERAGE.FOR".
DCL command files for building ftnchek on DEC VAX and Alpha under VMS:
build.com build-alpha.com cc.com link.com link-alpha.com
An awk script which converts declarations files into include files,
and a file used to create a shell script (to be installed as dcl2inc):
dcl2inc.awk dcl2inc.sh.in
Files used to create Makefile:
configure configure.in Makefile.in
Specialized makefiles for Borland C (MS-DOS), Macintosh Programmer's
Workbench, OS/2, UNIX or UNIX-like systems, and Microsoft C (Win95):
makefile.bc makefile.djgpp makefile.mpw makefile.os2
makefile.generic makefile.unix ftnchek210.dsp ftnchek210.dsw
The file configure_os2.cmd mimics configure in an OS/2 environment.
Use it to create a Makefile from Makefile.in, substituting appropriate
values for options and command paths for your system. The file
makefile.os2 is no longer supported, but should work if
configure_os2.cmd does not work for you.
The file makefile.unix is the former distribution makefile, with lots
of specific targets. It is no longer being maintained, but should
still work. Use configure to build a local Makefile instead. If you
cannot use configure for some reason, makefile.generic should be OK
for most cases, and can be fixed up to suit your needs. The file
makefile.generic is created from Makefile.in by the shell script
configure.generic. It uses vanilla configuration options. The
purpose of makefile.generic is to provide a starting point for editing
to suit a non-Unix system.
The ftnchek210 files are contributed by Alexander Knirsch
<knirsch@transsolar.com> for building ftnchek with Microsoft C++ 5.0.
Documentation files:
ftnchek.doc ftnchek user's manual in flat text format.
ftnchek.ps PostScript version of the same.
ftnchek.hlp Source for a HELP library for VMS systems.
ftnchek.man The file from which these files are derived.
html/*.html Hyptertext versions of the user's manual.
dcl2inc.doc dcl2inc user's manual in flat text format.
dcl2inc.ps same in PostScript.
man2ps script for converting man pages to PostScript.
project-doc.tex description of project-file format for people
interested in developing applications that
make use of the information these contain.
macro-doc.txt description of macro names used in ftnchek
source, for those interested in serious
customization or development of ftnchek. (Out-of-date.)
FAQ answers to frequently asked questions about ftnchek.
The Unix manual page, ftnchek.1, is generated from ftnchek.man during the
installation process. The VMS help library, ftnchek.hlb, is generated
from ftnchek.hlp by the build.com script.
A list of changes made since the original release of this version:
PATCHES
There is also a small file, project.magic, which can be added to your
system's magic file, so that the ``file'' program will recognize
project files for what they are.
The UNIX Makefile employs a private script, man2ps, for converting
manual pages to PostScript (linked to names me2ps, mm2ps, and ms2ps,
it will support the -me, -mm, and -ms formats as well). The script
currently knows about GNU groff, Sun Solaris 2.x troff + dpost and
psroff; it will use any of these, with groff preferred. For troff +
dpost, if you get errors like this
troff: Can't open /usr/lib/font/devpost/C.out; line 818, file <standard input>
you can repair them if you have appropriate privileges:
% cd /usr/lib/font/devpost
% ln CO C
% ln CO.name C.name
% ln CO.out C.out
These commands simply create links between a Courier font that Sun
named CO, and the one named C that is expected by ftnchek.man. If
some troff expert knows a better way to handle this, please tell us.
Additional alternatives in the man2ps script to support ditroff and
other vendors' troff-to-PostScript solutions will also be welcome.
CUSTOMIZING
-----------
Ftnchek has many options that affect what features it supports, the
sizes of various internal tables, and so forth. These options are
controlled by various macros. The important ones are either set
automatically by the configure script, or are described above. Users
who are interested in tinkering with these macro settings can read the
file macro-doc.txt, which describes many of the macros. However, the
description in this file is out of date, and you should consult the
source code for the current status of these and other macros.
|