From owner-freebsd-hackers Wed Oct 15 05:33:24 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA07610 for hackers-outgoing; Wed, 15 Oct 1997 05:33:24 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from hda.hda.com (hda-bicnet.bicnet.net [208.220.66.37]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id FAA07605 for ; Wed, 15 Oct 1997 05:33:21 -0700 (PDT) (envelope-from dufault@hda.hda.com) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id HAA11297; Wed, 15 Oct 1997 07:43:34 -0400 (EDT) From: Peter Dufault Message-Id: <199710151143.HAA11297@hda.hda.com> Subject: Re: Call for Fortran assistance. In-Reply-To: <199710150751.RAA02149@word.smith.net.au> from Mike Smith at "Oct 15, 97 05:21:46 pm" To: mike@smith.net.au (Mike Smith) Date: Wed, 15 Oct 1997 07:43:34 -0400 (EDT) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Unfortunately, the customer is providing some of the software for the > system, and their language of preference is Fortran. We've seen their > code before, and it's disgusting. Unfortunately, they have the > algorithmic technology that we need, and they're not willing to > document it well enough for us to reimplement in another language. > (They have also stalled us up against a deadline, so we really don't > have the time either.) If they have a single input file / single output file (I assume this is signal processing) how about hacking the run time to intercept the reads and writes to those specific logical units? You will probably find they have all their variables as globals in unnamed COMMON and maybe you can get in before MAIN and put them in shared memory and bypass the I/O, and the reads and writes are just synchronization points for your process. However, this is really stupid. If they won't or can't agree to putting CALL GETINPUT and CALL PUTRESULT into their code then you should be really nervous. BTW, struct used to do a decent job of cleaning up FORTRAN although it turned it into ratfor. There are also commercial products that do the same thing but will turn it into more modern dialects. The last time I had to do something like this I wrote a parser to inhale the mess and belch it out as tidied up F77. Sometimes you will be pleasantly surprised at the underlying invisible structure of some of this old legacy code. Peter -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Safety critical systems, Agency approval