Subject: Re: Using FITSIO in PC:s

From: William Pence <pence at tetra.gsfc.nasa.gov>
Date: Mon, 1 May 1995 15:51:56 -0400

Heikki Pollari wrote:

> I'd like to ask if anyone has experience on using the FITSIO package for writing
> bintables in PC. In the user's guide the catalog includes Microsoft Fortran 
> and Lahey Fortran. Currently we don't have any PC Fortran compiler but we are
> going to purchase one that could easily be used to compile the FITSIO routines.
> 
> Is it possible to call the FITSIO routines from C programs in PC using 
> suitable C and Fortran Complilers?  

This is all possible, however, the DOS 640k memory limit seriously
restricts the size of programs using FITSIO, so get a Fortran compiler
that doesn't have this limitation if at all possible.  If one must use
a compiler with this memory limit, there are a few simple modifications
that can be made to the FITSIO code to reduce the minimum memory
requirements (at the expense of limiting the number or size of the FITS
files that are opened).  See the FITSIO User's Guide in the beta
release of FITSIO V4.0 for more details.  It is available via anonymous
ftp from legacy.gsfc.nasa.gov in /software/fitsio/beta/.

It is also possible to use the 'f2c' program to compile FITSIO
if one does not have a real Fortran compiler.

A set of C macros are provided with FITSIO (in the file cfitsio.h)
to make it easier to call FITSIO from C programs.  

Bill Pence
HEASARC, NASA/GSFC

---

From: davis at space.mit.edu
Date: 10 May 1995 19:57:54 GMT

In article <199505011951.PAA15957 at tetra.gsfc.nasa.gov>, William Pence <pence at tetra.gsfc.nasa.gov> writes:
 : Heikki Pollari wrote:
 : > Is it possible to call the FITSIO routines from C programs in PC using 
 : > suitable C and Fortran Complilers?  
 : 
 : This is all possible, however, the DOS 640k memory limit seriously
 : restricts the size of programs using FITSIO, so get a Fortran compiler

It may be worse than this due to the 64K segment limitations.  I also
suggest using f2c with the 32bit DJGPP compiler to get around both of these
memory constraints.

Right now I am working on a new fits library written entirely in C.  I will
make sure that it runs under DJGPP.

--John