:::::::::::::: Makfile.diff :::::::::::::: 6,7c6 < #LIBS = -L/usr6/clow/lib -ldf -lpixrect < LIBS = -ldf --- > LIBS = -L/usr6/clow/lib -ldf -lpixrect 11,12c10,11 < template.c write.c annotate.c dfkit.c < HDRS = he.h dfconvert.h --- > template.c write.c annotate.c > HDRS = he.h 15c14 < template.o write.o annotate.o dfkit.o --- > template.o write.o annotate.o 24c23 < #? cx $(SRCS) > he.x --- > cx $(SRCS) > he.x :::::::::::::: cond.c.diff :::::::::::::: 8c8 < HE_PRED *pred, *parsePred();/* predicates */ --- > HE_PRED *pred; /* predicates */ 47c47 < HE_PRED *pred, *parsePred();/* predicate structure */ --- > HE_PRED *pred; /* predicate structure */ :::::::::::::: dfi.h.diff :::::::::::::: 3,4c3,4 < * NCSA HDF version 3.10r3 < * Dec 6, 1990 --- > * NCSA HDF version 2.0 > * December 20, 1988 6,8c6,8 < * NCSA HDF Version 3.10r3 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. --- > * NCSA HDF Version 2.0 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. 15a16 > * 22,76c23,26 < #ifdef RCSID < static char RcsId[] = "@(#)$Revision: 3.14 $" < #endif < /* < $Header: /pita/work/HDF/dev/RCS/src/dfi.h,v 3.14 90/10/02 14:16:49 clow beta $ < $Log: dfi.h,v $ < * Revision 3.14 90/10/02 14:16:49 clow < * fixed error in the define of DFmovmem in the MIPSEL segment < * < * Revision 3.13 90/09/18 15:09:10 clow < * Added MIPSEL to 'list of approved machine types' < * < * Revision 3.12 90/09/14 12:49:07 mfolk < * *** empty log message *** < * < * Revision 3.11 90/08/30 14:51:59 mfolk < * Add DFMT_MIPSEL 0x4441 machine type and #ifdef section for MIPSEL. < * This should cover DEC3100 needs. < * < * Revision 3.10 90/07/31 13:30:15 mfolk < * Added typedef double float64; to all machine types, so that this < * dfi.h would work with fp2hdf as changed by INEL. (Mike Folk) < * < * Revision 3.9 90/07/16 11:25:56 clow < * added #if's so that the compiler will complain if MACHINE is set wrongly. < * < * Revision 3.8 90/07/05 17:00:08 clow < * Changed the lower value of DF_TBUF 512 < * < * Revision 3.7 90/06/28 09:41:26 clow < * Added segment for APOLLO machines < * < * Revision 3.6 90/05/23 15:47:37 clow < * added MACRO "DF_OPENERR" to give uniform error open checking, < * especially for unbufferred I/O open < * < * Revision 3.5 90/05/18 11:09:12 clow < * added missing #endif < * < * Revision 3.4 90/05/17 17:06:00 clow < * added _fcd and _fcdtocp for LS FORTRAN so we don't have to go through < * an extra layer of Fortran stubs < * < * Revision 3.4 90/05/17 16:04:14 clow < * added _fcd and _fcdtocp for LS FORTRAN so we don't have to go through < * an extra layer of Fortran stubs < * < * Revision 3.3 90/05/14 23:15:45 clow < * added definition of MACRO "FCALLKEYW" < * < */ < /*----------------------------------------------------------------------------- < * File: dfi.h < * Purpose: HDF internal header file < * Invokes: stdio.h, sys/file.h --- > /*------------------------------------------------------------------------------ > * File: dfi.h > * Purpose: HDF internal header file > * Invokes: stdio.h, sys/file.h 78,81c28,31 < * Compilation parameters < * Machine-dependent definitions < * Flexibility definitions: i/o buffering, dynamic memory, structure i/o < * Size parameters --- > * Compilation parameters > * Machine-dependent definitions > * Flexibility definitions: i/o buffering, dynamic memory, structure i/o > * Size parameters 83,84c33,34 < * This file is included with user programs, but users do not see it. < *---------------------------------------------------------------------------*/ --- > * This file is included with user programs, but users do not see it. > *----------------------------------------------------------------------------*/ 87c37 < #ifndef DF_MAGICK /* avoid re-inclusion */ --- > #ifndef DF_MAGICK /* avoid re-inclusion */ 89c39 < #define DF_MAGICK "\016\003\023\001" /* ^N^C^S^A */ --- > #define DF_MAGICK "\016\003\023\001" /* ^N^C^S^A */ 93c43 < #endif /*FILE*/ --- > #endif FILE 94a45 > 96c47 < /* Compilation Parameters for Flexibility and Portability */ --- > /* Compilation Parameters for Flexibility and Portability */ 98,100c49,50 < /* modify this line to allow for machine dependencies */ < /*#define SUN*/ < /**IMPORTANT** this is now in the in the makefile */ --- > /* modify this line to allow for machine dependencies */ > #define SUN 102,104c52,53 < #if defined(vax) && defined(ultrix) < #define VAXULT < #endif --- > /* modify this line for buffered/unbuffered i/o */ > #define DF_BUFFIO 106,112c55,56 < #if !defined(SUN) && !defined(SUN386) && !defined(VMS) && !defined(ALLIANT) < #if !defined(IRIS4) && !defined(MAC) && !defined(UNICOS) && !defined(MIPSEL) < #if !defined(VAXULT) < if there is error on this line, the MACHINE type is defined wrong!!! < #endif < #endif < #endif --- > /* modify this line for dynamic/static memory allocation */ > #define DF_DYNAMIC 114,115c58,59 < /* modify this line for buffered/unbuffered i/o */ < #define DF_BUFFIO --- > /* modify this line if structures cannot be read/written as is */ > #define DF_STRUCTNOK 117,118d60 < /* modify this line for dynamic/static memory allocation */ < #define DF_DYNAMIC 120,125d61 < /* modify this line if structures cannot be read/written as is */ < #undef DF_STRUCTOK /* leave it this way - hdfsh expects it */ < < /* Current version number */ < #define DFVERSION 3.00 < 127,140c63,71 < /* 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_APOLLO 0x1111 < #define DFMT_UNICOS 0x3331 < #define DFMT_CTSS 0x3331 < #define DFMT_VAX 0x2221 < #define DFMT_MIPSEL 0x4441 < #define DFMT_PC 0x4144 /* note byte swapping ??? */ < /* check this... */ < #define DFMT_MAC 0x1111 < #define DFMT_SUN386 0x1444 --- > /* MT/NT constants */ > /* four MT nibbles represent int, float, double, uchar */ > #define DFMT_SUN 0x1111 > #define DFMT_ALLIANT 0x1111 > #define DFMT_UNICOS 0x3331 > #define DFMT_CTSS 0x3331 > #define DFMT_VAX 0x2221 > #define DFMT_PC 0x4144 /* note byte swapping */ > #define DFMT_MAC 0x1111 142c73 < #define DFNT_VERSION 1 /* current version of NT info */ --- > #define DFNT_VERSION 1 /* current version of NT info */ 144,150c75,81 < /* 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 --- > /* 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 152,155c83,86 < /* 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 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 */ 157,161c88,92 < /* 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 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 */ 163,166c94,97 < /* class info codes for char */ < #define DFNTC_BYTE 0 /* bitwise/numeric field */ < #define DFNTC_ASCII 1 /* ASCII */ < #define DFNTC_EBCDIC 5 /* EBCDIC */ --- > /* class info codes for char */ > #define DFNTC_BYTE 0 /* bitwise/numeric field */ > #define DFNTC_ASCII 1 /* ASCII */ > #define DFNTC_EBCDIC 5 /* EBCDIC */ 168,171d98 < /* array order */ < #define DFO_FORTRAN 1 /* column major order */ < #define DFO_C 2 /* row major order */ < 173c100 < /* Machine dependencies */ --- > /* Machine dependencies */ 177,186c104,113 < #define L_INCR 1 < #endif /*O_RDONLY*/ < typedef int int16; < typedef unsigned int uint16; < typedef long int int32; < typedef double float32; < #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 */ --- > #define L_INCR 1 > #endif O_RDONLY > #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 */ 188,200c115,125 < /* 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 = ((*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_PC < #endif /*PC*/ --- > /* 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 PC 205,226c130,150 < #include /* for unbuffered i/o stuff */ < #define L_INCR 1 < #endif /*O_RDONLY*/ < typedef int int16; < typedef int uint16; < typedef int int32; < typedef float float32; < typedef double float64; < #define DFmovmem(from, to, len) memcpy(to, from, len) < #undef DF_STRUCTOK /* cannot directly read/write structures */ < #define DF_CAPFNAMES /* fortran names are in all caps */ < #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 /*UNICOS*/ --- > #include /* for unbuffered i/o stuff */ > #define L_INCR 1 > #endif O_RDONLY > #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 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 UNICOS > 228d151 < 230,239c153,158 < #if ! defined mc68010 && ! defined mc68020 && ! defined mc68030 < #undef DF_STRUCTOK < #endif < #include /* for unbuffered i/o stuff */ < typedef short int16; < typedef unsigned short uint16; < typedef long int32; < typedef float float32; < typedef double float64; < #define DFmovmem(from, to, len) memcpy(to, from, len) --- > #include /* 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) 241,373d159 < #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 /*DF_STRUCTOK*/ < #define DF_CREAT(name, prot) creat(name, prot) < #define DF_MT DFMT_SUN < #endif /*SUN*/ < < #ifdef SUN386 < #undef DF_STRUCTOK < #include /* for unbuffered i/o stuff */ < typedef short int16; < typedef unsigned short uint16; < typedef long int32; < typedef float float32; < typedef double float64; < #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 /*DF_STRUCTOK*/ < #define DF_CREAT(name, prot) creat(name, prot) < #define DF_MT DFMT_SUN386 < #endif /* SUN386 */ < < #ifdef ALLIANT < #include /* for unbuffered i/o stuff */ < typedef short int16; < typedef unsigned short uint16; < typedef long int32; < typedef float float32; < typedef double float64; < #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 /*DF_STRUCTOK*/ < #define DF_CREAT(name, prot) creat(name, prot) < #define DF_MT DFMT_ALLIANT < #endif /*ALLIANT*/ < < < #ifdef IRIS4 < #undef DF_STRUCTOK < #include < #include /* for unbuffered i/o stuff */ < typedef short int16; < typedef unsigned short uint16; < typedef long int32; < typedef float float32; < typedef double float64; < #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 /*DF_STRUCTOK*/ < #define DF_CREAT(name, prot) creat(name, prot) < #define DF_MT DFMT_IRIS4 < #endif /*IRIS4*/ < < < #ifdef MIPSEL < #undef DF_STRUCTOK < #include < #include /* for unbuffered i/o stuff */ < typedef short int16; < typedef unsigned short uint16; < typedef long int32; < typedef float float32; < typedef double float64; < #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 /*DF_STRUCTOK*/ < #define DF_CREAT(name, prot) creat(name, prot) < #define DF_MT DFMT_MIPSEL < #endif /*MIPSEL*/ < < < #ifdef MAC < #undef DF_BUFFIO /* use unbuffered i/o */ < #include /* malloc stuff for MPW 3.0 */ < #include /* unbuffered IO stuff for MPW 3.0 */ < #ifdef THINK_C /* for LightSpeed C */ < #include < #else /*THINK_C MPW, possibly others */ < #include /* for unbuffered i/o stuff */ < #endif /*THINK_C*/ < #define DF_CAPFNAMES /* fortran names are in all caps */ < #define DF_DYNAMIC /* use dynamic allocation */ < typedef short int16; < typedef unsigned short uint16; < typedef long int32; < typedef float float32; < typedef double float64; < #ifdef THINK_C /* LightSpeed C does not have memcpy */ < #define DFmovmem(from, to, len) DFImemcopy(from, to, len) < #else /*THINK_C*/ < #define DFmovmem(from, to, len) memcpy(to, from, len) < #endif /*THINK_C*/ < #define malloc(x) NewPtr((Size) (x)) /* don't use malloc on the Mac */ < #define free(x) DisposPtr((Ptr) (x)) /* don't use free on the Nac */ < #undef DF_STRUCTOK 376,377c162,163 < #define INT32READ(p, x) { x = (*p++)<<24; x|=((*p++) & 255)<<16; \ < x|=((*p++) & 255)<<8; x|=(*p++) & 255; } --- > #define INT32READ(p, x) { x = (*p++)<<24; x|=((*p++) & 255)<<16; \ > x|=((*p++) & 255)<<8; x|=(*p++) & 255; } 380,384c166,171 < #define INT32WRITE(p, x) { *p++ = (x>>24) & 255; *p++ = (x>>16) & 255; \ < *p++ = (x>>8) & 255; *p++ = x & 255; } < #define DF_CREAT(name, prot) mopen(name, O_WRONLY|O_TRUNC|O_CREAT) < #define DF_MT DFMT_MAC < #endif /*MAC*/ --- > #define INT32WRITE(p, x) { *p++ = (x>>24) & 255; *p++ = (x>>16) & 255; \ > *p++ = (x>>8) & 255; *p++ = x & 255; } > #endif DF_STRUCTOK > #define DF_CREAT(name, prot) creat(name, prot) > #define DF_MT DFMT_SUN > #endif SUN 386,400c173,180 < #ifdef VMS < /*#undef DF_BUFFIO should be buff !!!!*/ < /* use only unbuff i/o - buff doesn't work! */ < #ifndef DFopen /* avoid double includes */ < #include "dfivms.h" < #endif /*DFopen*/ < #undef DF_STRUCTOK < #define DF_CAPFNAMES /* fortran names are in all caps */ < #include /* for unbuffered i/o stuff */ < typedef short int16; < typedef unsigned short uint16; < typedef long int32; < typedef float float32; < typedef double float64; < #define DFmovmem(from, to, len) memcpy(to, from, len) --- > > #ifdef ALLIANT > #include /* 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) 402,410c182,188 < #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 /*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 DF_STRUCTOK 412,413c190,191 < #define DF_MT DFMT_VAX < #endif /*VMS*/ --- > #define DF_MT DFMT_ALLIANT > #endif ALLIANT 415,435d192 < #ifdef VAXULT < #include < #include /* for unbuffered i/o stuff */ < typedef short int16; < typedef unsigned short uint16; < typedef long int32; < typedef float float32; < typedef double float64; < #define DFmovmem(from, to, len) memcpy(to, from, len) < #undef 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; } < #define DF_CREAT(name, prot) creat(name, prot) < #define DF_MT DFMT_VAX < #endif /*VAXULT*/ 437,441c194,195 < #ifdef APOLLO < #if ! defined mc68010 && ! defined mc68020 && ! defined mc68030 < #undef DF_STRUCTOK < #endif < #include /* for unbuffered i/o stuff */ --- > #ifdef MAC > #include /* for unbuffered i/o stuff */ 446c200,204 < #define DFmovmem(from, to, len) memcpy(to, from, len) --- > #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 THINK_C 448,456c206,212 < #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 /*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 DF_STRUCTOK 458,459c214,215 < #define DF_MT DFMT_APOLLO < #endif /*APOLLO*/ --- > #define DF_MT DFMT_MAC > #endif MAC 463,477c219,221 < /* Flexibility parameters */ < #ifdef MAC /* MAC specific file manager calls */ < # define DF_OPEN(x,y) mopen(x,y) < # define DF_CLOSE(x) mclose(x) < # define DF_SEEK(x,y,z) mlseek(x,y,z) < # define DF_SKEND(x,y,z) mlseek(x,-1*y,z) < # define DF_TELL(x) mlseek(x,0L,1) < # define DF_READ(a,b,c,d) mread(d,a,b*c) < # define DF_WRITE(a,b,c,d) mwrite(d,a,b*c) < # define DF_FLUSH(a) /* no need to flush */ < # define DF_RDACCESS 0 /* dummy */ < # define DF_WRACCESS 0 /* dummy */ < # define DF_OPENERR(f) ((f) == -1) < #else /* !MAC */ < #ifdef DF_BUFFIO /* set all calls to do buffered I/O */ --- > /* Flexibility parameters */ > > #ifdef DF_BUFFIO /* set all calls to do buffered I/O */ 486d229 < #define DF_OPENERR(f) (!(f)) 490c233 < #else /*PC*/ --- > #else PC 493c236 < #endif /*PC*/ --- > #endif PC 495c238 < #else /*DF_BUFFIO unbuffered i/o */ --- > #else DF_BUFFIO /* unbuffered i/o */ 500c243 < #define DF_TELL(x) lseek(x,0L,1) --- > #define DF_TELL(x) lseek(x,0L,L_INCR) 503,513c246,254 < #define DF_OPENERR(f) ((f) == -1) < #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 /*!PC*/ < #endif /*DF_BUFFIO*/ < #endif /* !MAC */ --- > #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 PC > #define DF_RDACCESS O_RDONLY > #define DF_WRACCESS O_RDWR > #endif PC > #endif DF_BUFFIO 516c257 < /* if not allocating memory dynamically, need buffer for compression */ --- > /* if not allocating memory dynamically, need buffer for compression */ 519,520c260 < #define DF_TBUFSZ 10000 /* buffer size */ < #endif /*DF_DYNAMIC*/ --- > #endif DF_DYNAMIC 522c262 < /* if reading/writing structures not ok, need buffer for conversion */ --- > /* if reading/writing structures not ok, need buffer for conversion */ 526,528c266,267 < #define DF_TBUFSZ 512 /* buffer size can be smaller */ < #endif /*DF_STRUCTOK*/ < #endif /*DF_TBUF*/ --- > #endif DF_STRUCTOK > #endif DF_TBUF 530c269 < /* set buffer size */ --- > /* set buffer size */ 531a271 > #define DF_TBUFSZ 10000 534,536c274,276 < #endif /*DFMASTER*/ < char DFtbuf[DF_TBUFSZ]; < #endif /*DF_TBUF*/ --- > #endif DFMASTER > unsigned char DFtbuf[DF_TBUFSZ]; > #endif DF_TBUF 538,567d277 < /* VMS str descriptor conversion macro */ < #if defined(VMS) < # define _fcdtocp(desc) ((char *) *((char **) &desc[4])) < typedef char *_fcd; < #else /* !VMS */ < #if defined(UNICOS) < # include < #else /* !VMS && !UNICOS */ < #if defined(MAC) /* with LS_FORTRAN */ < # define _fcdtocp(descp) (*((char**)(descp))) < typedef char** _fcd; < #else /* !VMS && !UNICOS && !MAC */ < # define _fcdtocp(desc) (desc) < typedef char *_fcd; < #endif < #endif /* !VMS && !UNICOS */ < #endif /* !VMS */ < < /* < MACRO FCALLKEYW for any special fortran-C stub keyword < < MacIntosh MPW LS-fortran needs pascal since it can interface best with < pascal functions < */ < #if defined(MAC) /* with LS FORTRAN */ < # define FCALLKEYW pascal < #else /* !MAC */ < # define FCALLKEYW /*NONE*/ < #endif < 569,572c279,282 < /* 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 */ --- > /* 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 64 /* maximum length of filename parameters */ 574,590c284 < #ifndef MAC < char *strncpy(); < char *strcpy(); < #ifdef ultrix < #ifdef MIPSEL < char *malloc(); < #else < void *malloc(); < #endif MIPSEL < void *memcpy(); < #else < char *malloc(); < char *memcpy(); < #endif ultrix < #endif /* !MAC */ < < #endif /*DF_MAGICK*/ --- > #endif DF_MAGICK :::::::::::::: dump.c.diff :::::::::::::: 3,4d2 < #include "dfconvert.h" < #include 82,84c80,81 < int eltLength, error, userNT; < int fileNT = DFNTF_IEEE; < char *data, *fdata; --- > int eltLength; > char *data; 86d82 < unsigned long swaptest = 1; 100,120d95 < /* swap bytes or convert floating point to host format */ < if(strcmp(format, "-a")) { < if(strcmp(format, "-f")) { < if (*(char *) &swaptest) { < _swapshort( data, eltLength); < } < } else { < userNT = (DF_MT>>8) & 0x0f; /* get third nibble from right */ < if(userNT != fileNT) { < fdata = (char *) malloc(eltLength); < if (!fdata) { < fprintf(stderr, "Unable to allocate space for floating point conversion.\n"); < return HE_FAIL; < } < DFconvert(data, fdata, DFNT_FLOAT, fileNT, userNT, < eltLength>>2, error); < free(data); < data = fdata; < } < } < } 152,187d126 < } < < _swapshort (bp, n) < register char *bp; < register unsigned n; < { < register char c; < register char *ep = bp + n; < < while (bp < ep) { < c = *bp; < *bp = *(bp + 1); < bp++; < *bp++ = c; < } < } < < _swaplong (bp, n) < register char *bp; < register unsigned n; < { < register char c; < register char *ep = bp + n; < register char *sp; < < while (bp < ep) { < sp = bp + 3; < c = *sp; < *sp = *bp; < *bp++ = c; < sp = bp + 1; < c = *sp; < *sp = *bp; < *bp++ = c; < bp += 2; < } :::::::::::::: he.c.diff :::::::::::::: 21d20 < void cmdLoop(); 82c81 < HE_CMD *cmd, *getCmd(); --- > HE_CMD *cmd; :::::::::::::: he.h.diff :::::::::::::: 13a14,21 > char *malloc(); > > #ifdef __STDC__ > typedef int (*HE_FUNC)(struct he_cmd*); > #else __STDC__ > typedef int (*HE_FUNC)(); > #endif __STDC__ > 89,93c97 < #ifdef __STDC__ < int (*func)(struct he_cmd*); < #else __STDC__ < int (*func)(); < #endif __STDC__ --- > HE_FUNC func; 97,102d100 < #ifdef __STDC__ < typedef int (*HE_FUNC)(struct he_cmd*); < #else __STDC__ < typedef int (*HE_FUNC)(); < #endif __STDC__ < 125a124 > extern char *malloc(); :::::::::::::: hehdf.c.diff :::::::::::::: 124d123 < char *catStr(); 213d211 < char *copyStr(); :::::::::::::: info.c.diff :::::::::::::: 118d117 < void infoDesc(); :::::::::::::: parse.c.diff :::::::::::::: 29,32d28 < int HEopen(), HEclose(), HEnext(), HEprev(), HEalias(), HEunalias(); < int HEdisplay(), HEinfo(), HEif(), HEselect(), HEwait(), HEdelete(), HEquit(); < int HEdump(), HEgetR8(), HEputR8(), HEput(), HErevert(), HEwrite(); < int HEannotate(), HEhelp(); 212c208 < char *word, *copyStr(); --- > char *word; 216d211 < HE_CMD *findAlias(); 344d338 < char *copyStr(); :::::::::::::: pred.c.diff :::::::::::::: 94c94 < char *tok, *nextToken(), *nextWord(), *copyStr(); --- > char *tok; :::::::::::::: template.c.diff :::::::::::::: 15d14 < void fillTemplate();