Go to the documentation of this file. 50 #include <sys/types.h> 53 #define DFmovmem(from, to, len) bcopy(from, to, len) 56 #define UINT16READ(p, x) { x = ((*p++) & 255)<<8; x |= (*p++) & 255; } 57 #define INT16READ(p, x) { x = (*p++)<<8; x |= (*p++) & 255; } 58 #define INT32READ(p, x) { x = (*p++)<<24; x|=((*p++) & 255)<<16; \ 59 x|=((*p++) & 255)<<8; x|=(*p++) & 255; } 60 #define UINT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; } 61 #define INT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; } 62 #define INT32WRITE(p, x) { *p++ = (x>>24) & 255; *p++ = (x>>16) & 255; \ 63 *p++ = (x>>8) & 255; *p++ = x & 255; } 65 #define DF_CREAT(name, prot) creat(name, prot) 67 #define DF_MT DFMT_IRIX 72 #if ! defined mc68010 && ! defined mc68020 && ! defined mc68030 76 #define DFmovmem(from, to, len) memcpy(to, from, len) 78 #define UINT16READ(p, x) { x = ((*p++) & 255)<<8; x |= (*p++) & 255; } 79 #define INT16READ(p, x) { x = (*p++)<<8; x |= (*p++) & 255; } 80 #define INT32READ(p, x) { x = (*p++)<<24; x|=((*p++) & 255)<<16; \ 81 x|=((*p++) & 255)<<8; x|=(*p++) & 255; } 82 #define UINT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; } 83 #define INT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; } 84 #define INT32WRITE(p, x) { *p++ = (x>>24) & 255; *p++ = (x>>16) & 255; \ 85 *p++ = (x>>8) & 255; *p++ = x & 255; } 87 #define DF_CREAT(name, prot) creat(name, prot) 88 #define DF_MT DFMT_IBM6000 91 #if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) 103 #define DFmovmem(from, to, len) DFImemcopy(from, to, len) 105 #define DFmovmem(from, to, len) memcpy(to, from, len) 107 #define malloc(x) NewPtr((Size) (x)) 108 #define free(x) DisposPtr((Ptr) (x)) 110 #define UINT16READ(p, x) { x = ((*p++) & 255)<<8; x |= (*p++) & 255; } 111 #define INT16READ(p, x) { x = (*p++)<<8; x |= (*p++) & 255; } 112 #define INT32READ(p, x) { x = (*p++)<<24; x|=((*p++) & 255)<<16; \ 113 x|=((*p++) & 255)<<8; x|=(*p++) & 255; } 114 #define UINT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; } 115 #define INT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; } 116 #define INT32WRITE(p, x) { *p++ = (x>>24) & 255; *p++ = (x>>16) & 255; \ 117 *p++ = (x>>8) & 255; *p++ = x & 255; } 118 #define DF_CREAT(name, prot) mopen(name, O_WRONLY|O_TRUNC|O_CREAT) 119 #define DF_MT DFMT_MAC 131 #define DFmovmem(from, to, len) memcpy(to, from, len) 133 #define UINT16READ(p, x) { x = ((*p++) & 255)<<8; x |= (*p++) & 255; } 134 #define INT16READ(p, x) { x = (*p++)<<8; x |= (*p++) & 255; } 135 #define INT32READ(p, x) { x = (*p++)<<24; x|=((*p++) & 255)<<16; \ 136 x|=((*p++) & 255)<<8; x|=(*p++) & 255; } 137 #define UINT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; } 138 #define INT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; } 139 #define INT32WRITE(p, x) { *p++ = (x>>24) & 255; *p++ = (x>>16) & 255; \ 140 *p++ = (x>>8) & 255; *p++ = x & 255; } 142 #define DF_CREAT(name, prot) creat(name, prot) 143 #define DF_MT DFMT_VAX 147 #if ! defined mc68010 && ! defined mc68020 && ! defined mc68030 150 #include <sys/file.h> 152 #define uint8 unsigned char 153 #define int16 short int 154 #define uint16 unsigned short int 155 #define int32 long int 156 #define uint32 unsigned long int 157 #define float32 float 158 #define DFmovmem(from, to, len) memcpy(to, from, len) 160 #define UINT16READ(p, x) { x = ((*p++) & 255)<<8; x |= (*p++) & 255; } 161 #define INT16READ(p, x) { x = (*p++)<<8; x |= (*p++) & 255; } 162 #define INT32READ(p, x) { x = (*p++)<<24; x|=((*p++) & 255)<<16; \ 163 x|=((*p++) & 255)<<8; x|=(*p++) & 255; } 164 #define UINT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; } 165 #define INT16WRITE(p, x) { *p++ = (x>>8) & 255; *p++ = x & 255; } 166 #define INT32WRITE(p, x) { *p++ = (x>>24) & 255; *p++ = (x>>16) & 255; \ 167 *p++ = (x>>8) & 255; *p++ = x & 255; } 169 #define DF_CREAT(name, prot) creat(name, prot) 170 #define DF_MT DFMT_APOLLO 175 #if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) 176 # define DF_OPEN(x,y) mopen(x,y) 177 # define DF_CLOSE(x) mclose(x) 178 # define DF_SEEK(x,y,z) mlseek(x,y,z) 179 # define DF_SKEND(x,y,z) mlseek(x,-1*y,z) 180 # define DF_TELL(x) mlseek(x,0L,1) 181 # define DF_READ(a,b,c,d) mread(d,a,b*c) 182 # define DF_WRITE(a,b,c,d) mwrite(d,a,b*c) 184 # define DF_RDACCESS 0 185 # define DF_WRACCESS 0 186 # define DF_OPENERR(f) ((f) == -1) 189 #define DF_OPEN(x,y) fopen(x,y) 190 #define DF_CLOSE(x) fclose(x) 191 #define DF_SEEK(x,y,z) fseek(x,y,z) 192 #define DF_SKEND(x,y,z) fseek(x,y,z) 193 #define DF_TELL(x) ftell(x) 194 #define DF_READ(a,b,c,d) fread(a,b,c,d) 195 #define DF_WRITE(a,b,c,d) fwrite(a,b,c,d) 196 #define DF_FLUSH(a) fflush(a) 197 #define DF_OPENERR(f) (!(f)) 198 #define DF_RDACCESS "rb" 199 #define DF_WRACCESS "rb+" 202 #define DF_OPEN(x,y) open(x,y) 203 #define DF_CLOSE(x) close(x) 204 #define DF_SEEK(x,y,z) lseek(x,y,z) 205 #define DF_SKEND(x,y,z) lseek(x,-1*y,z) 206 #define DF_TELL(x) lseek(x,0L,1) 207 #define DF_READ(a,b,c,d) read(d,a,b*c) 208 #define DF_WRITE(a,b,c,d) write(d,a,b*c) 209 #define DF_OPENERR(f) ((f) == -1) 211 #define DF_RDACCESS O_RDONLY 212 #define DF_WRACCESS O_RDWR
MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52