
Richard Gerber, who is in the Physics department at the University
of Illinois, has ported much of HDF to an Amiga, and is sharing 
with us the changes that he had to make.  He used HDF 3.1, release 2.

Everything in this directory, including the rest of this README
file, is from Richard.  Thank you, Richard.

======================================================================

Hi,

I have so far built an HDF library on the Amiga using the functions
contained in the files

df.c
dfgroup.c
dfkit.c
dfp.c
dfcomp.c
dfr8.c
dfsd.c

All files were compiled exactly as found in the directory HDF/src, except
for the files dfsd.c and dfkit.c and the header file dfi.h.
I used the SAS/C V5.10 (previously Lattice C) compiler. The  
compiler options I used are explained below.
The file dfsd.c uses a macro DFconvert() which my compiler does not like.
I get a "string too long or not terminated error". I have sent SAS a copy
of the source and they are investigating the problem. I the meantime, I 
noticed the the DFconvert macro was orginally coded as a function call.
Comments in the source code indicate that DFconvert can be used as a
function by defining FUNC_CONV. I have done this. 
Unfortunately, this causes an error when trying to compile the file
dfkit.c. It appears to me that this is due to an error in the code. I have
simply commented out the offending call and replaced it with what looks
to me like the correct call. LOOK OUT!
The SAS/C compiler generated an error when trying to compile dfsd.c unless
I changed a few variables on lines 1212 and 1213 to register variables. SAS is
looking into this also.
 
I have tried two test programs. They are both included here.
All works well except for the function calls DFSDsetminmax() followed by ...
DFSDgetminmax() as used in the C program given on page 4.27 of the NCSA
HDF Calling Interfaces and Utilities, Version 3.0, November 1989.
My source for that program (test2.c) and the program rand.c are included here. I
changed rand.c to call the function drand48() to get a random number. 
The output from this program is included here also as "test2.out". The
binary file created by this program is also included (testsds.df).
My source code test2.c and rand.c produce the proper result when compiled
and linked with the HDF library on the Cray 2.


The compiler options I used told the compiler to: 
(1) use Amiga IEEE math library routines
(2) force full ANSI compatibility w/ full diagnostics on non-ANSI constructs
(3) define SUN and FUNC_CONV
(4) use large data model

For SAS/C this went:

(1) lc -b0 -ca -fi -dSUN -dFUNC_CONV file.c

on all the source files I mentioned above.

(2) oml HDF.lib A file.o

on all the object files that resulted from doing (1) above.

This built a library called HDF.lib using the definitions defined by NCSA
for a SUN.
The test programs were then linked with the libraries:
lcmieee.lib
HDF.lib
lc.lib

Oh yes, I also had to comment out an include file that was requested when
SUN was defined (in dfi.h).

I would like to hear about any experiences anyone has with this code. I
am next going to try to incorporate this library into some vizualization
software I am writing for the Amiga. The minmax() function error is very
worrysome. I would be interested to know if this problem persists on 
68010, 68020 and 68030 machines and with the Manx compiler. You can
write to me at

gerber@rigel.astro.uiuc.edu


