[alt.sources.wanted] Gimmie, Gimmie Fortran to C converters!

aslas@acad2.alaska.edu (Leif Sawyer) (04/16/91)

First, a big round of thanks to all who helped me get the dirent.* stuff
for VMS (all one of you! ;-) 

Second, Now that the previous problem has been fixed, I've come up against
another block.  I'm now in need of a (VaxVMS) Fortran to C converter.
Heck, I'd even be happy if it was the SUN OS source... I've looked high and 
low and in ftp sites round the way- haven't seen a thing.  

-- 

=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
| Leif Sawyer -= ASLAS@acad2.alaska.edu | WWIVNet (The Patroler) -= 27@9702 |
| Also works  -= ASLAS@acad3.alaska.edu | Whaddaya 'spect from programmer?  |
| USnail -= 3631 E. 42nd Circle #7 Anch, AK 99508 |  #define FLAME /dev/nul |
| "Caviar and Cigarettes-Well versed in etiquette,extrodinarily nice.."     |
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

thad@public.BTR.COM (Thaddeus P. Floryan) (04/16/91)

In article <1991Apr15.225756.1@acad2.alaska.edu> aslas@acad2.alaska.edu (Leif Sawyer) writes:
>[...]
>Second, Now that the previous problem has been fixed, I've come up against
>another block.  I'm now in need of a (VaxVMS) Fortran to C converter.
>Heck, I'd even be happy if it was the SUN OS source... I've looked high and 
>low and in ftp sites round the way- haven't seen a thing.  

'Sfunny this should come up just now!  :-)

One person at my office recently wanted to convert some old Fortran programs
from our DEC-20 system to run on her home computer, so I briefly assisted her
with a bizarre multi-stage operation:

1) copied the files from one of our DEC-20 to one of our VAX/VMS systems

2) while she painstakingly removed all vestiges of DEC-specific "oddities"
   from the Fortran code and got it to work on the VAX (no mean feat, I tell
   you), I grabbed the f2c program from research.att.com [IP 192.20.225.2]
   and made those sources available to her on the VAX

3) she then (with my assisting the UNIX:VMS differences) brought f2c up and
   running under VMS 5.3-1

4) another round of removing yet MORE DEC-specific Fortranisms before f2c
   cleanly translated and permitted the creation of a correctly-running C
   translation under VMS.  Sheesh, though I haven't used Fortran much in
   over two decades, even I was astonished at how much DEC-specific and
   NON-PORTABLE stuff can creep into Fortran code over the years.  One that
   was painful was VMS Fortran's "relaxed" handling of unit numbers ... none
   of that was documented well in the DEC manuals and when I finally found THE
   obscure page with the info, had copies made and pasted into all the OTHER
   DEC Fortran manuals (such as the Language Reference Manual (sheesh)).

5) with the Fortran and C versions of the program passing regression and
   comprehensive testing on the VAX, the last stage was simply to bring up
   f2c on her home system and perform one final Fortran to C translation
   (which she's probably doing right now as I'm typing this :-)

The f2c program comes up cleanly on every UNIX system I've tested it, and it
wasn't too much trouble to bring it up under VAX/VMS.  I strongly urge you to
get the original sources from research.att.com and if there's any interest
(via email) I'll be happy to either post or email the context diffs re: changes
for VMS ... you'd probably have to apply the patches by hand unless you know of
a "patch" port to VMS.

Please note that we used VAX/C 3.1 originally and 3.2 for the final compile.
And note that I had to "fix" some of DEC's header files in SYS$LIBRARY

The f2c docs are in Postscript-ready form, and the docs also reference some
commercially-available products which produce "more maintainable" translations
to C.

My thanks to the fine people at AT&T who produced f2c and offer it publicly!
The version used for the above exercise was the Jan 18, 1991 one.

Thad Floryan [ thad@btr.com (OR) {decwrl, mips, fernwood}!btr!thad ]