[comp.archives] [fortran] Re: C to Fortran translator.

mwm@VACATION.VENARI.CS.CMU.EDU (Mark Maimone) (04/18/91)

Archive-name: languages/fortran/f2c/1991-04-11
Archive-directory: research.att.com:/dist/f2c/ [192.20.225.2]
Original-posting-by: mwm@VACATION.VENARI.CS.CMU.EDU (Mark Maimone)
Original-subject: Re: C to Fortran translator.
Reposted-by: emv@msen.com (Edward Vielmetti, MSEN)

Here's a repost of the initial announcement:

------------------------------------------------------------------------------
	Source for f2c, a Fortran 77 to C translator jointly developed by
folks from Bell Labs, Bellcore, and Carnegie Mellon, is now freely
available.

	F2c was derived from the original UNIX operating system's f77(1),
and the generated C follows f77's calling conventions; on some machines, the
resulting object files are interchangeable with (and behave
indistinguishably from) objects compiled by f77.  The main "advantage" of
f2c is that it converts ANSI standard Fortran 77 into C without manual
intervention, at least when invoked by a suitable script or makefile (that
may need to exercise an f2c option to ensure that COMMON blocks are defined
just once).  The main "problems" are that f2c does no code restructuring
(e.g., gotos are preserved) and that Fortran I/O gets converted into a bunch
of calls; thus the translated C code doesn't look too pretty, and in general
one would need to maintain the Fortran rather than its translation into C.
[F2c is not meant to displace the services of commercial vendors whose
business is to convert Fortran into maintainable C.]

	There is a plethora of options, many of which exist to support
different compilation environments for the translated C (e.g., ANSI C or C++
compatability, different type sizes, separate files for COMMON blocks to
appease "smart" linkers).  So far f2c (and f2c-generated source) has
compiled successfully on many machines:  Sun, Vax, IBMRT, Apollo, SGI, MIPS,
and Cray to name a few.

	F2c has been under test by the net community since the Fall of 1989
and has been verified on the NBS tests, several large math libraries,
floating point tests, even code for laying cable on the ocean floor!

	To find out about f2c, send the following E-mail message to netlib
(netlib@research.att.com or research!netlib):

	send index from f2c

Your message will be answered automatically (by a program -- see CACM vol.
30 #5 (May, 1987), pp. 403-407).  You will receive a reply explaining how to
automatically acquire f2c source (about 600K), f2c library source (130K),
and supporting info (man page, etc).  Or you can anonymous-FTP to
research.att.com and look in directory dist/f2c at these files:

	all.Z -- 250K compressed shar file for f2c
	f2c.ps.Z -- 24 page tech report describing f2c
	index -- general info about files
	libf77.Z, libi77.Z -- compressed shar files for libraries

****************************** DISCLAIMER ******************************
	     Careful! Anything free comes with no guarantee.
************************************************************************

----------------------------------------------------------------------
Mark Maimone				phone: (412) 268 - 7698
Carnegie Mellon Computer Science	email: mwm@cs.cmu.edu
grad student, vocal jazz and PDQ Bach enthusiast

-- comp.archives file verification
research.att.com
-rw-r--r--  1  112     other    234 Feb  4  1990 README
-rw-r--r--  1  112     other 262389 Apr 17 13:31 all.Z
-rw-r--r--  2  112     other   3289 Feb  6 01:13 f2c.1.Z
-rw-r--r--  2  112     other   3427 Feb  6 00:40 f2c.1t.Z
-rw-r--r--  1  112     other   2122 Jan 20  1990 f2c.h.Z
-rw-r--r--  1  112     other  61259 Feb  7 17:04 f2c.ps.Z
-rwxr-xr-x  1  112     other   1924 Mar  7  1990 fc.Z
-rw-r--r--  1  112     other  44278 Apr 17 13:38 fixes
-rw-r--r--  1  112     other  11312 Apr 17 13:45 index
-rw-r--r--  1  112     other  17179 Dec  8 13:32 libf77.Z
-rw-r--r--  1  112     other  42112 Feb  5 01:36 libi77.Z
drwxr-xr-x  2  112     other   1536 Feb  7 17:27 src
found f2c ok
research.att.com:/dist/f2c/