home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / f2csrc.zip / f2csrc / f2c.1 < prev    next >
Text File  |  1994-03-05  |  6KB  |  197 lines

  1.  
  2.      F2C(1)                            F2C(1)
  3.  
  4.      NAME
  5.       f2c -    Convert    Fortran    77 to C    or C++
  6.  
  7.      SYNOPSIS
  8.       f2c [    option ... ] file ...
  9.  
  10.      DESCRIPTION
  11.       F2c converts Fortran 77 source code in files with names end-
  12.       ing in `.f' or `.F' to C (or C++) source files in the    cur-
  13.       rent directory, with `.c' substituted    for the    final `.f' or
  14.       `.F'.     If no Fortran files are named,    f2c reads Fortran from
  15.       standard input and writes C on standard output.  File    names
  16.       that end with    `.p' or    `.P' are taken to be prototype files,
  17.       as produced by option    `-P', and are read first.
  18.  
  19.       The following    options    have the same meaning as in f77(1).
  20.  
  21.       -C   Compile code to check that subscripts are within
  22.            declared    array bounds.
  23.  
  24.       -I2  Render INTEGER and LOGICAL as short, INTEGER*4 as long
  25.            int.  Assume the    default    libF77 and libI77:  allow only
  26.            INTEGER*4 (and no LOGICAL) variables in INQUIREs.
  27.            Option `-I4' confirms the default rendering of INTEGER
  28.            as long int.
  29.  
  30.       -onetrip
  31.            Compile DO loops    that are performed at least once if
  32.            reached.     (Fortran 77 DO    loops are not performed    at all
  33.            if the upper limit is smaller than the lower limit.)
  34.  
  35.       -U   Honor the case of variable and external names.  Fortran
  36.            keywords    must be    in lower case.
  37.  
  38.       -u   Make the    default    type of    a variable `undefined' rather
  39.            than using the default Fortran rules.
  40.  
  41.       -w   Suppress    all warning messages, or, if the option    is
  42.            `-w66', just Fortran 66 compatibility warnings.
  43.  
  44.       The following    options    are peculiar to    f2c.
  45.  
  46.       -A   Produce ANSI C.    Default    is old-style C.
  47.  
  48.       -a   Make local variables automatic rather than static
  49.            unless they appear in a DATA, EQUIVALENCE, NAMELIST, or
  50.            SAVE statement.
  51.  
  52.       -C++ Output C++ code.
  53.  
  54.       -c   Include original    Fortran    source as comments.
  55.  
  56.      Page 1               Local          (printed 3/5/94)
  57.  
  58.      F2C(1)                            F2C(1)
  59.  
  60.       -ddir
  61.            Write `.c' files    in directory dir instead of the    cur-
  62.            rent directory.
  63.  
  64.       -E   Declare uninitialized COMMON to be Extern (overridably
  65.            defined in f2c.h    as extern).
  66.  
  67.       -ec  Place uninitialized COMMON blocks in separate files:
  68.            COMMON /ABC/ appears in file abc_com.c.    Option `-e1c'
  69.            bundles the separate files into the output file,    with
  70.            comments    that give an unbundling    sed(1) script.
  71.  
  72.       -ext Complain    about f77(1) extensions.
  73.  
  74.       -f   Assume free-format input: accept    text after column 72
  75.            and do not pad fixed-format lines shorter than 72 char-
  76.            acters with blanks.
  77.  
  78.       -72  Treat text appearing after column 72 as an error.
  79.  
  80.       -g   Include original    Fortran    line numbers in    #line lines.
  81.  
  82.       -h   Emulate Fortran 66's treatment of Hollerith: try    to
  83.            align character strings on word (or, if the option is
  84.            `-hd', on double-word) boundaries.
  85.  
  86.       -i2  Similar to -I2, but assume a modified libF77 and    libI77
  87.            (compiled with -Df2c_i2), so INTEGER and    LOGICAL    vari-
  88.            ables may be assigned by    INQUIRE    and array lengths are
  89.            stored in short ints.
  90.  
  91.       -kr  Use temporary values to enforce Fortran expression
  92.            evaluation where    K&R (first edition) parenthesization
  93.            rules allow rearrangement.  If the option is `-krd',
  94.            use double precision temporaries    even for single-
  95.            precision operands.
  96.  
  97.       -P   Write a file.P of ANSI (or C++) prototypes for defini-
  98.            tions in    each input file.f or file.F.  When reading
  99.            Fortran from standard input, write prototypes at    the
  100.            beginning of standard output.  Option -Ps implies -P
  101.            and gives exit status 4 if rerunning f2c    may change
  102.            prototypes or declarations.
  103.  
  104.       -p   Supply preprocessor definitions to make common-block
  105.            members look like local variables.
  106.  
  107.       -R   Do not promote REAL functions and operations to DOUBLE
  108.            PRECISION.  Option `-!R'    confirms the default, which
  109.            imitates    f77.
  110.  
  111.       -r   Cast values of REAL functions (including    intrinsics) to
  112.  
  113.      Page 2               Local          (printed 3/5/94)
  114.  
  115.      F2C(1)                            F2C(1)
  116.  
  117.            REAL.
  118.  
  119.       -r8  Promote REAL to DOUBLE PRECISION, COMPLEX to DOUBLE
  120.            COMPLEX.
  121.  
  122.       -s   Preserve    multidimensional subscripts.
  123.  
  124.       -Tdir
  125.            Put temporary files in directory    dir.
  126.  
  127.       -w8  Suppress    warnings when COMMON or    EQUIVALENCE forces
  128.            odd-word    alignment of doubles.
  129.  
  130.       -Wn  Assume n    characters/word    (default 4) when initializing
  131.            numeric variables with character    data.
  132.  
  133.       -z   Do not implicitly recognize DOUBLE COMPLEX.
  134.  
  135.       -!bs Do not recognize    backslash escapes (\", \', \0, \\, \b,
  136.            \f, \n, \r, \t, \v) in character    strings.
  137.  
  138.       -!c  Inhibit C output, but produce -P    output.
  139.  
  140.       -!I  Reject include statements.
  141.  
  142.       -!i8 Disallow    INTEGER*8.
  143.  
  144.       -!it Don't infer types of untyped EXTERNAL procedures    from
  145.            use as parameters to previously defined or prototyped
  146.            procedures.
  147.  
  148.       -!P  Do not attempt to infer ANSI or C++ prototypes from
  149.            usage.
  150.  
  151.       The resulting    C invokes the support routines of f77; object
  152.       code should be loaded    by f77 or with ld(1) or    cc(1) options
  153.       -lF77    -lI77 -lm.  Calling conventions    are those of f77: see
  154.       the reference    below.
  155.  
  156.      FILES
  157.       file.[fF]
  158.            input file
  159.  
  160.       *.c  output file
  161.  
  162.       /usr/include/f2c.h
  163.            header file
  164.  
  165.       /usr/lib/libF77.a
  166.            intrinsic function library
  167.  
  168.       /usr/lib/libI77.a
  169.  
  170.      Page 3               Local          (printed 3/5/94)
  171.  
  172.      F2C(1)                            F2C(1)
  173.  
  174.            Fortran I/O library
  175.  
  176.       /lib/libc.a
  177.            C library, see section 3
  178.  
  179.      SEE ALSO
  180.       S. I.    Feldman    and P. J. Weinberger, `A Portable Fortran 77
  181.       Compiler', UNIX Time Sharing System Programmer's Manual,
  182.       Tenth    Edition, Volume    2, AT&T    Bell Laboratories, 1990.
  183.  
  184.      DIAGNOSTICS
  185.       The diagnostics produced by f2c are intended to be self-
  186.       explanatory.
  187.  
  188.      BUGS
  189.       Floating-point constant expressions are simplified in    the
  190.       floating-point arithmetic of the machine running f2c,    so
  191.       they are typically accurate to at most 16 or 17 decimal
  192.       places.
  193.       Untypable EXTERNAL functions are declared int.
  194.  
  195.      Page 4               Local          (printed 3/5/94)
  196.  
  197.