/*****************************************************************************
* 
*							  NCSA HDF version 2.37
*								June 7, 1989
*
* NCSA HDF Version 2.37 source code and documentation are in the public domain.
* Specifically, we give to the public domain all rights for future licensing
* of the source code, all resale rights, and all publishing rights.
* 
* We ask, but do not require, that the following message be included in all
* derived works:
* 
* Portions developed at the National Center for Supercomputing Applications at
* the University of Illinois at Urbana-Champaign.
* 
* 
* THE UNIVERSITY OF ILLINOIS GIVES NO WARRANTY, EXPRESSED OR IMPLIED, FOR THE
* SOFTWARE AND/OR DOCUMENTATION PROVIDED, INCLUDING, WITHOUT LIMITATION,
* WARRANTY OF MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE
* 
*****************************************************************************/

/*------------------------------------------------------------------------------
 * File: 	df.h
 * Purpose:	header file for HDF routines
 * Invokes:	dfi.h
 * Contents: 
 *	Structure definitions: DFddh, DFdd, DFdesc, DFdle, DF, DFdi, DFdata
 *	Procedure type definitions
 *	Global variables
 *	Tag definitions
 *  Error return codes
 *	Logical constants
 * Remarks: This file is included with user programs
 *			Since it includes stdio.h etc., do not include these after df.h
 *----------------------------------------------------------------------------*/


#ifndef DFTG_NULL				/* avoid re-inclusion */

/* include DF (internal) header information */
#ifdef QAK
#include "dfi.h"
#else
/*****************************************************************************
* 
*							  NCSA HDF version 2.37
*								June 7, 1989
*
* NCSA HDF Version 2.37 source code and documentation are in the public domain.
* Specifically, we give to the public domain all rights for future licensing
* of the source code, all resale rights, and all publishing rights.
* 
* We ask, but do not require, that the following message be included in all
* derived works:
* 
* Portions developed at the National Center for Supercomputing Applications at
* the University of Illinois at Urbana-Champaign.
* 
* 
* THE UNIVERSITY OF ILLINOIS GIVES NO WARRANTY, EXPRESSED OR IMPLIED, FOR THE
* SOFTWARE AND/OR DOCUMENTATION PROVIDED, INCLUDING, WITHOUT LIMITATION,
* WARRANTY OF MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE
* 
*****************************************************************************/

/*------------------------------------------------------------------------------
 * File: 	dfi.h
 * Purpose:	HDF internal header file
 * Invokes:	stdio.h, sys/file.h
 * Contents: 
 *	Compilation parameters
 *	Machine-dependent definitions
 *	Flexibility definitions: i/o buffering, dynamic memory, structure i/o
 *	Size parameters
 * Remarks: To port to a new system, only dfi.h and Makefile need be modified.
 *			This file is included with user programs, but users do not see it.
 *----------------------------------------------------------------------------*/


#ifndef DF_MAGICK					/* avoid re-inclusion */

#define DF_MAGICK		"\016\003\023\001"		/* ^N^C^S^A */

#ifndef FILE
#include <stdio.h>
#endif


/*--------------------------------------------------------------------------*/
/*			Compilation Parameters for Flexibility and Portability 			*/

	/* modify this line to allow for machine dependencies */
#define PC

	/* modify this line for buffered/unbuffered i/o */
#define DF_BUFFIO

	/* modify this line for dynamic/static memory allocation */
#define DF_DYNAMIC

	/* modify this line if structures cannot be read/written as is */
#define DF_STRUCTOK


/*--------------------------------------------------------------------------*/
/*								MT/NT constants								*/
/*		four MT nibbles represent int, float, double, uchar 				*/
#define DFMT_SUN		0x1111
#define DFMT_ALLIANT	0x1111
#define DFMT_IRIS4		0x1111
#define DFMT_UNICOS		0x3331
#define DFMT_CTSS		0x3331
#define DFMT_VAX		0x2221
#define DFMT_PC			0x4144				/* note byte swapping */
#define DFMT_MAC		0x1111

#define DFNT_VERSION	1					/* current version of NT info */

	/* type info codes */
#define DFNT_UINT		1
#define	DFNT_INT		2
#define DFNT_UCHAR		3
#define DFNT_CHAR		4
#define DFNT_FLOAT		5
#define DFNT_DOUBLE		6

	/* class info codes for int */
#define DFNTI_MBO		1					/* Motorola byte order 2's compl */
#define DFNTI_VBO		2					/* Vax byte order 2's compl */
#define DFNTI_IBO		4					/* Intel byte order 2's compl */

	/* class info codes for float */
#define DFNTF_IEEE		1					/* IEEE format */
#define DFNTF_VAX		2					/* Vax format */
#define DFNTF_CRAY		3					/* Cray format */
#define DFNTF_PC		4					/* PC floats - flipped IEEE */

	/* class info codes for char */
#define DFNTC_BYTE		0					/* bitwise/numeric field */
#define DFNTC_ASCII		1					/* ASCII */
#define DFNTC_EBCDIC	5					/* EBCDIC */

/*--------------------------------------------------------------------------*/
/*						Machine dependencies								*/
#ifdef PC
#ifndef O_RDONLY
#include <fcntl.h>
#define L_INCR	1
#endif
#define int16 int
#define uint16 unsigned int
#define int32 long int
#define float32 double
#define DFmovmem(from, to, len)	memcpy(to, from, len)
#undef DF_STRUCTOK					/* structure writing will not work on PC */
#undef DF_BUFFIO					/* unbuffered i/o is faster */
long longswap();					/* provided elsewhere */

	/* in the next 3 lines, p is recast so right number of bytes passed */
	/* ### Note that all calls modify p.  Need to use temporary ptr */
#define UINT16READ(p, x)	{ x = intswap(*(int *)p); p+=2; }
#define INT16READ(p, x)		{ x = intswap(*(int *)p); p+=2; }
#define INT32READ(p, x)		{ x = longswap(*(long *)p); p+=4; }
#define UINT16WRITE(p, x)	{ *(int *)p = intswap(x); p+=2; }
#define INT16WRITE(p, x)	{ *(int *)p = intswap(x); p+=2; }
#define INT32WRITE(p, x)	{ *(long *)p = longswap(x); p+=4; }
#define DF_CREAT(name, prot) creat(name, prot)
#define DF_MT	DFMT_PC
#endif


#ifdef UNICOS
#ifndef O_RDONLY
#include <sys/fcntl.h>				/* for unbuffered i/o stuff */
#define L_INCR	1
#endif
#define int16 int
#define uint16 int
#define int32 int
#define float32 float
#define DFmovmem(from, to, len)	memcpy(to, from, len)
#undef DF_STRUCTOK			/* cannot directly read/write structures */
#define DF_CAPFNAMES		/* All caps names for Fortran */
#define UINT16READ(p, x)	{ x = ((*p++) & 255)<<8; x |= (*p++) & 255; }
#define INT16READ(p, x)		{ x = (*p++)<<8; x |= (*p++) & 255; }
#define INT32READ(p, x)		{ x = (*p++)<<24; x|=((*p++) & 255)<<16;	\
								x|=((*p++) & 255)<<8; x|=(*p++) & 255; }
#define UINT16WRITE(p, x)	{ *p++ = (x>>8) & 255; *p++ = x & 255; }
#define INT16WRITE(p, x)	{ *p++ = (x>>8) & 255; *p++ = x & 255; }
#define INT32WRITE(p, x)	{ *p++ = (x>>24) & 255; *p++ = (x>>16) & 255;	\
								*p++ = (x>>8) & 255; *p++ = x & 255; }
#define DF_CREAT(name, prot) creat(name, prot)
#define DF_MT	DFMT_UNICOS
#endif


#ifdef SUN
#if ! defined mc68010 && ! defined mc68020 && ! defined mc68030
#undef DF_STRUCTOK
#endif
#include <sys/file.h>				/* for unbuffered i/o stuff */
#define int16 short
#define uint16 unsigned short
#define int32 long
#define float32 float
#define DFmovmem(from, to, len)	memcpy(to, from, len)
#ifndef DF_STRUCTOK
#define UINT16READ(p, x) { x = ((*p++) & 255)<<8; x |= (*p++) & 255; }
#define INT16READ(p, x) { x = (*p++)<<8; x |= (*p++) & 255; }
#define INT32READ(p, x) { x = (*p++)<<24; x|=((*p++) & 255)<<16;	\
			x|=((*p++) & 255)<<8; x|=(*p++) & 255; }
#define UINT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; }
#define INT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; }
#define INT32WRITE(p, x) { *p++ = (x>>24) & 255; *p++ = (x>>16) & 255;	\
			*p++ = (x>>8) & 255; *p++ = x & 255; }
#endif
#define DF_CREAT(name, prot) creat(name, prot)
#define DF_MT	DFMT_SUN
#endif


#ifdef ALLIANT
#include <sys/file.h>				/* for unbuffered i/o stuff */
#define int16 short
#define uint16 unsigned short
#define int32 long
#define float32 float
#define DFmovmem(from, to, len)	bcopy(from, to, len)
#ifndef DF_STRUCTOK
#define UINT16READ(p, x) { DFmovmem(p, &x, 2); p+=2; }
#define INT16READ(p, x) { DFmovmem(p, &x, 2); p+=2; }
#define INT32READ(p, x) { DFmovmem(p, &x, 4); p+=4; }
#define UINT16WRITE(p, x) { DFmovmem(&x, p, 2); p+=2; }
#define INT16WRITE(p, x) { DFmovmem(&x, p, 2); p+=2; }
#define INT32WRITE(p, x) { DFmovmem(&x, p, 4); p+=4; }
#endif
#define DF_CREAT(name, prot) creat(name, prot)
#define DF_MT	DFMT_ALLIANT
#endif


#ifdef MAC
#include <memory.h> 			/* malloc stuff for MPW 3.0 */
#include <fcntl.h>				/* unbuffered IO stuff for MPW 3.0 */
#ifdef THINK_C
#include <unix.h>
#else
#include <Files.h>				/* for unbuffered i/o stuff */
#endif
#define int16 short
#define uint16 unsigned short
#define int32 long
#define float32 float
#define DFmovmem(from, to, len)	memcpy(to, from, len)
				/* LightSpeed C does not have memcpy */
#ifdef THINK_C
#define DFmovmem(from, to, len)	DFImemcopy(from, to, len)
#endif
#define malloc(x)   NewPtr((long)   (x))    /* don't use malloc on the Mac */
#define free(x)     DisposPtr((Ptr) (x))    /* don't use free on the Nac   */
#ifndef DF_STRUCTOK
#define UINT16READ(p, x) { DFmovmem(p, &x, 2); p+=2; }
#define INT16READ(p, x) { DFmovmem(p, &x, 2); p+=2; }
#define INT32READ(p, x) { DFmovmem(p, &x, 4); p+=4; }
#define UINT16WRITE(p, x) { DFmovmem(&x, p, 2); p+=2; }
#define INT16WRITE(p, x) { DFmovmem(&x, p, 2); p+=2; }
#define INT32WRITE(p, x) { DFmovmem(&x, p, 4); p+=4; }
#endif
#define DF_CREAT(name, prot) open(name, O_WRONLY|O_TRUNC|O_CREAT)
#define DF_MT	DFMT_MAC
#endif

#ifdef VMS
#undef DF_BUFFIO			/* use only unbuff i/o - buff i/o doesn't work! */
#include "dfivms.h"
#undef DF_STRUCTOK 
#include <file.h>				/* for unbuffered i/o stuff */
#define int16 short
#define uint16 unsigned short
#define int32 long
#define float32 float
#define DFmovmem(from, to, len)	memcpy(to, from, len)
#define DF_CAPFNAMES		/* All caps names for Fortran */
#ifndef DF_STRUCTOK
#define UINT16READ(p, x) { x = ((*p++) & 255)<<8; x |= (*p++) & 255; }
#define INT16READ(p, x) { x = (*p++)<<8; x |= (*p++) & 255; }
#define INT32READ(p, x) { x = (*p++)<<24; x|=((*p++) & 255)<<16;	\
			x|=((*p++) & 255)<<8; x|=(*p++) & 255; }
#define UINT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; }
#define INT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; }
#define INT32WRITE(p, x) { *p++ = (x>>24) & 255; *p++ = (x>>16) & 255;	\
			*p++ = (x>>8) & 255; *p++ = x & 255; }
#endif
#define DF_CREAT(name, prot) creat(name, prot)
#define DF_MT	DFMT_VAX
#endif


#ifdef IRIS4
#undef DF_STRUCTOK
#include <sys/types.h>
#include <sys/file.h>				/* for unbuffered i/o stuff */
#define int16 short
#define uint16 unsigned short
#define int32 long
#define float32 float
#define DFmovmem(from, to, len)	bcopy(from, to, len)
#ifndef DF_STRUCTOK
#define UINT16READ(p, x)	{ x = ((*p++) & 255)<<8; x |= (*p++) & 255; }
#define INT16READ(p, x)		{ x = (*p++)<<8; x |= (*p++) & 255; }
#define INT32READ(p, x)		{ x = (*p++)<<24; x|=((*p++) & 255)<<16;	\
								x|=((*p++) & 255)<<8; x|=(*p++) & 255; }
#define UINT16WRITE(p, x)	{ *p++ = (x>>8) & 255; *p++ = x & 255; }
#define INT16WRITE(p, x)	{ *p++ = (x>>8) & 255; *p++ = x & 255; }
#define INT32WRITE(p, x)	{ *p++ = (x>>24) & 255; *p++ = (x>>16) & 255;	\
								*p++ = (x>>8) & 255; *p++ = x & 255; }
#endif
#define DF_CREAT(name, prot) creat(name, prot)
#define DF_MT	DFMT_IRIS4
#endif


/*--------------------------------------------------------------------------*/
/*						Flexibility parameters 								*/

#ifdef DF_BUFFIO			/* set all calls to do buffered I/O */
#define DF_OPEN(x,y) fopen(x,y)
#define DF_CLOSE(x) fclose(x)
#define DF_SEEK(x,y,z) fseek(x,y,z)
#define DF_SKEND(x,y,z) fseek(x,y,z)
#define DF_TELL(x) ftell(x)
#define DF_READ(a,b,c,d) fread(a,b,c,d)
#define DF_WRITE(a,b,c,d) fwrite(a,b,c,d)
#define DF_FLUSH(a) fflush(a)
#ifdef PC
#define DF_RDACCESS "rb"
#define DF_WRACCESS "rb+"
#else
#define DF_RDACCESS "r"
#define DF_WRACCESS "r+"
#endif

#else
#define DF_OPEN(x,y) open(x,y)
#define DF_CLOSE(x) close(x)
#define DF_SEEK(x,y,z) lseek(x,y,z)
#define DF_SKEND(x,y,z) lseek(x,-1*y,z)
#define DF_TELL(x) lseek(x,0L,1)
#define DF_READ(a,b,c,d) read(d,a,b*c)
#define DF_WRITE(a,b,c,d) write(d,a,b*c)
#define DF_FLUSH(a) 							/* no need to flush */
#ifdef PC
#define DF_RDACCESS O_RDONLY | O_RAW
#define DF_WRACCESS O_RDWR | O_RAW
#else
#define DF_RDACCESS O_RDONLY
#define DF_WRACCESS O_RDWR
#endif
#endif


	/* if not allocating memory dynamically, need buffer for compression */
#ifndef DF_DYNAMIC
#define DF_TBUF
#endif

	/* if reading/writing structures not ok, need buffer for conversion */
#ifndef DF_TBUF
#ifndef DF_STRUCTOK
#define DF_TBUF
#endif
#endif

	/* set buffer size */
#ifdef DF_TBUF
#define DF_TBUFSZ	10000
#ifndef DFMASTER
extern
#endif
	unsigned char DFtbuf[DF_TBUFSZ];
#endif

/*--------------------------------------------------------------------------*/
/*							Size parameters									*/
#define DF_MAXDFS			32	/* How many DF's can be open at once */
#define DF_DEFAULTDDS		16	/* How many DD's a file has by default */
#define DF_MAXFNLEN			256	/* maximum length of filename parameters */

#endif
#endif

/*--------------------------------------------------------------------------*/
/*						Type declarations 									*/

typedef struct DFddh {		/* format of data descriptor headers as in file */
	int16
		dds;				/* number of dds in header block */
	int32	
		next;				/* offset of next header block */
	} DFddh;

		
typedef struct DFdd {		/* format of data descriptors as in file */
	uint16
		tag,				/* data tag */
		ref;				/* data reference number */
	int32
		offset,				/* offset of data element in file */
		length;				/* number of bytes */
	} DFdd;


	/* descriptor structure is same as dd structure.  ###Note: may be changed */
#define DFdesc	DFdd


	/* DLE is the internal structure which stores data descriptor information */
	/* It is a linked list of DDs */
typedef struct DFdle {		/* Data List element */
	struct DFdle
		*next;				/* link to next dle */
	DFddh
		ddh;				/* To store headers */
	DFdd
		dd[1];				/* dummy size */
	} DFdle;	


	/* DF is the internal structure associated with each DF file */
	/* It holds information associated with the file as a whole */
	/* ### Note: there are hooks for having multiple DF files open at a time */
typedef struct DF {
	DFdle
		*list,			/* Pointer to the DLE list */
		*last_dle;		/* last_dle and last_dd are used in searches to indicate
							element returned by previous call to DFfind */
	int
		type,			/* 0= not in use, 1= normal, -1 = multiple */
						/* this is a hook for when multiple files are open */
		access,			/* permitted access types: 0=none, 1=r, 2=w, 3=r/w */
		changed, 		/* True if anything in DDs modified since last write */
		last_tag,		/* Last tag searched for by DFfind */
		last_ref,		/* Last reference number searched for */
		last_dd,		/* see last_dle */
		defdds,			/* default numer of DD's in each block */
		up_access;		/* access permissions to element being read/updated */
						/* Used by DFstart */
	DFdd
		*up_dd;			/* DD of element being read/updated, used by DFstart */
  			/* file handle is a file pointer or file descriptor */
			/* depending on whether we use buffered or unbuffered i/o */
#ifdef DF_BUFFIO
	FILE *				/* file pointer */
#else
	int					/* file descriptor */
#endif
		file;			/* File handle for real file */
} DF;


typedef struct DFdi {	/* data identifier: specifies data element uniquely */
	uint16 tag;
	uint16 ref;
} DFdi;



typedef struct DFdata {	/* structure for returning status information */
	int version;		/* version number of program */
} DFdata;

/*--------------------------------------------------------------------------*/
/*							Procedure types 								*/

#ifndef VMS
DF *DFopen();
int32 DFgetelement();
int32 DFread();
int32 DFseek();
int32 DFwrite();
char *DFIgetspace(), *DFIfreespace(), *DFIf2cstring();
#else
int32 _DFgetelement();
int32 _DFread();
int32 _DFseek();
int32 _DFwrite();
char *_DFIgetspace(), *_DFIfreespace(), *_DFIf2cstring();
#endif

/*--------------------------------------------------------------------------*/
/*							Global Variables 								*/

#ifndef DFMASTER
extern
#endif
int
	DFerror;			/* Error code for DF routines */

/*--------------------------------------------------------------------------*/
/*							 Tag Definitions							    */

#define DFREF_WILDCARD 0	/* wildcard ref for searches */

#define DFTG_WILDCARD 0	/* wildcard tag for searches */
#define	DFTG_NULL	1		/* empty DD */

	/* utility set */
#define DFTG_FID	100		/* File identifier */
#define	DFTG_FD	101		/* File description */
#define	DFTG_TID	102		/* Tag identifier */
#define	DFTG_TD	103		/* Tag descriptor */
#define DFTG_DIL	104		/* data identifier label */
#define DFTG_DIA	105		/* data identifier annotation */
#define DFTG_NT	106		/* number type */
#define DFTG_MT	107		/* machine type */

	/* raster-8 set */
#define DFTG_ID8	200		/* 8-bit Image dimension */
#define DFTG_IP8	201		/* 8-bit Image palette */
#define DFTG_RI8	202		/* Raster-8 image */
#define DFTG_CI8	203		/* RLE compressed 8-bit image */
#define DFTG_II8	204		/* IMCOMP compressed 8-bit image */

	/* Raster Image set */
#define DFTG_ID	300		/* Image DimRec */
#define DFTG_LUT	301		/* Image Palette */
#define	DFTG_RI	302		/* Raster Image */
#define	DFTG_CI	303		/* Compressed Image */

#define DFTG_RIG	306		/* Raster Image Group */
#define DFTG_LD	307		/* Palette DimRec */
#define	DFTG_MD	308		/* Matte DimRec */
#define DFTG_MA	309		/* Matte Data */
#define DFTG_CCN	310		/* color correction */
#define DFTG_CFM	311		/* color format */
#define DFTG_AR	312		/* aspect ratio */
	
#define	DFTG_DRAW	400		/* Draw these images in sequence */
#define	DFTG_RUN	401		/* run this as a program/script */

#define DFTG_XYP	500		/* x-y position */
#define DFTG_MTO	501		/* machine-type override */

	/* Tektronix */
#define DFTG_T14	602		/* TEK 4014 data */
#define DFTG_T105	603		/* TEK 4105 data */

	/* Scientific Data set */
#define DFTG_SDG	700		/* Scientific Data Group */
#define DFTG_SDD	701		/* Scientific Data DimRec */
#define DFTG_SD	702		/* Scientific Data */
#define DFTG_SDS	703		/* Scales */
#define DFTG_SDL	704		/* Labels */
#define DFTG_SDU	705		/* Units */
#define DFTG_SDF	706		/* Formats */
#define DFTG_SDM	707		/* Max/Min */
#define DFTG_SDC	708		/* Coord sys */

	/* compression schemes */
#define DFTG_RLE	11		/* run length encoding */
#define DFTG_IMCOMP 12		/* IMCOMP compression */

/*--------------------------------------------------------------------------*/
/*							Error Return Codes 								*/

#define	DFE_NOERROR		0	/* No error */
#define	DFE_FNF			-1	/* File not found error */
#define	DFE_DENIED		-2	/* Access to file denied */
#define	DFE_ALROPEN		-3	/* File already open */
#define	DFE_TOOMANY		-4	/* Too Many DF's or files open */
#define DFE_BNAME		-5	/* Bad file name on open */
#define	DFE_BACC		-6	/* Bad file access mode */
#define DFE_BOPEN		-7	/* Other open error */
#define DFE_NOTOPEN		-8	/* File can't be closed 'cause it isn't open */
#define DFE_CANTCLOSE	-9	/* fclose wouldn't work! */
#define DFE_DFNULL		-10	/* DF is a null pointer */
#define DFE_ILLTYPE		-11	/* DF has an illegal type: internal error */
#define DFE_UNSUPPORTED	-12	/* Feature not currently supported */
#define DFE_BDDLIST	-13	/* The DD list is non-existent: internal error */
#define DFE_NOTDFFILE	-14	/* This is not a DF file and it is not 0 length */
#define DFE_SEEDTWICE	-15	/* The DD list already seeded: internal error */
#define	DFE_NOSPACE		-16	/* Malloc failed */
#define	DFE_NOSUCHTAG	-17	/* There is no such tag in the file: search failed*/
#define DFE_READERROR	-18	/* There was a read error */
#define DFE_WRITEERROR	-19	/* There was a write error */
#define DFE_SEEKERROR	-20	/* There was a seek error */
#define DFE_NOFREEDD	-21	/* There are no free DD's left: internal error */
#define DFE_BTAG		-22	/* illegal WILDCARD tag */
#define DFE_BREF		-23	/* illegal WILDCARD reference # */
#define DFE_RDONLY		-24	/* The DF is read only */
#define DFE_BCALL		-25	/* Calls in wrong order */
#define DFE_BPTR		-26 /* NULL ptr argument */
#define DFE_BLEN		-27	/* negative len specified */
#define DFE_BSEEK		-28	/* Attempt to seek past end of element */
#define DFE_NOMATCH		-29	/* No (more) DDs which match specified tag/ref */
#define DFE_NOTINSET	-30	/* Warning: Set contained unknown tag: ignored */
#define DFE_BDIM		-31	/* negative or zero dimensions specified */
#define DFE_BOFFSET	-32	/* Illegal offset specified */
#define DFE_BSCHEME	-33	/* Unknown compression scheme specified */
#define DFE_NODIM		-34	/* No dimension record associated with image */
#define DFE_NOTENOUGH	-35	/* space provided insufficient for size of data */
#define DFE_NOVALS		-36	/* Values not available */
#define DFE_CORRUPT		-37	/* File is corrupted */
#define DFE_BCONV		-37	/* Don't know how to convert data type */
#define DFE_BFP		-38	/* The file contained an illegal floating point no*/

/*--------------------------------------------------------------------------*/
/*							Logical Constants 								*/

#define DFACC_READ		1	/* Read Access */
#define DFACC_WRITE		2	/* Write Access */
#define DFACC_CREATE	4	/* force file to be created */
#define DFACC_ALL		7	/* the logical and of all the above values */

#endif
