MISR Toolkit  1.5.1
hdfi.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF. The full HDF copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /* $Id$ */
15 
16 #ifndef HDFI_H
17 #define HDFI_H
18 
19 #ifdef GOT_MACHINE
20 #undef GOT_MACHINE
21 #endif
22 
23 /*--------------------------------------------------------------------------*/
24 /* MT/NT constants */
25 /* Four MT nibbles represent double, float, int, uchar (from most */
26 /* significant to least significant). */
27 /* Each "column" in the "table" below is essentially independant of the */
28 /* other "columns", for example the CONVEXNATIVE entry means that the */
29 /* floating point formats are in Convex native format but the integers */
30 /* are big-endian and standard sizes */
31 /* If you add another value to this "table", you need to add another */
32 /* DFNTF_xxx entry in hntdefs.h */
33 /* The values for each nibble are: */
34 /* 1 - Big Endian */
35 /* (i.e. Big-Endian, 32-bit architecture w/IEEE Floats) */
36 /* 2 - VAX */
37 /* (i.e. Middle-Endian, 32-bit architecture w/VAX Floats) */
38 /* 3 - Cray */
39 /* (i.e. Big-Endian, all 64-bit architecture w/Cray Floats) */
40 /* 4 - Little Endian */
41 /* (i.e. Little-Endian, 32-bit architecture w/IEEE Floats) */
42 /* 5 - Convex */
43 /* (i.e. Big-Endian, 32-bit architecture w/Convex Native Floats) */
44 /* 6 - Fujitsu VP */
45 /* (i.e. Big-Endian, 32-bit architecture w/Fujitsu Native Floats) */
46 /* 7 - Cray MPP */
47 /* (i.e. Big-Endian, 32-bit architecture w/IEEE Floats, but no 16-bit type) */
48 /* 8 - Cray IEEE */
49 /* (i.e. Big-Endian, all 64-bit architecture w/IEEE Floats) */
50 /*--------------------------------------------------------------------------*/
51 #define DFMT_SUN 0x1111
52 #define DFMT_SUN_INTEL 0x4441
53 #define DFMT_ALLIANT 0x1111
54 #define DFMT_IRIX 0x1111
55 #define DFMT_APOLLO 0x1111
56 #define DFMT_IBM6000 0x1111
57 #define DFMT_HP9000 0x1111
58 #define DFMT_CONVEXNATIVE 0x5511
59 #define DFMT_CONVEX 0x1111
60 #define DFMT_UNICOS 0x3331
61 #define DFMT_UNICOSIEEE 0x1831
62 #define DFMT_CTSS 0x3331
63 #define DFMT_VAX 0x2221
64 #define DFMT_MIPSEL 0x4441
65 #define DFMT_PC 0x4441
66 #define DFMT_APPLE 0x1111
67 #define DFMT_APPLE_INTEL 0x4441
68 #define DFMT_MAC 0x1111
69 #define DFMT_SUN386 0x4441
70 #define DFMT_NEXT 0x1111
71 #define DFMT_MOTOROLA 0x1111
72 #define DFMT_ALPHA 0x4441
73 #define DFMT_VP 0x6611
74 #define DFMT_I860 0x4441
75 #define DFMT_IA64 0x4441
76 #define DFMT_LINUX64 0x4441
77 #define DFMT_POWERPC64 0x1111
78 
79 /* I/O library constants */
80 #define UNIXUNBUFIO 1
81 #define UNIXBUFIO 2
82 #define MACIO 3
83 
84 
85 /* Standard header files needed all the time */
86 #include <stdio.h>
87 #include <stdlib.h>
88 #include <limits.h>
89 #include <string.h>
90 
91 #include "H4api_adpt.h"
92 
93 
94 /*-------------------------------------------------------------------------
95  * Define options for each platform
96  *-------------------------------------------------------------------------*/
97 
98 /*
99  * Meaning of each defined macros (not completed yet)
100  *
101  * BIG_LONGS--Define when long is not "equal" to int32. True in cases
102  * where (int32 *) is not compatible with (long *). Should
103  * be renamed as LONGNEINT32.
104  */
105 
106 #if (defined(SUN) || defined(sun) || defined(__sun__) || defined(__SUNPRO_C)) & !defined(__i386)
107 #ifdef __STDC__
108 #define ANSISUN
109 #else /* __STDC__ */
110 #define KNRSUN
111 #endif /* __STDC__ */
112 #endif /* SUN || sun */
113 
114 #if defined(ANSISUN)
115 
116 #if !defined(SUN)
117 #define SUN
118 #endif
119 
120 #ifdef GOT_MACHINE
121 If you get an error on this line more than one machine type has been defined.
122 Please check your Makefile.
123 #endif
124 #define GOT_MACHINE
125 
126 #include <unistd.h> /* for some file I/O stuff */
127 #include <sys/time.h>
128 #include <sys/file.h> /* for unbuffered i/o stuff */
129 #include <sys/stat.h>
130 #if (defined __sun) && (defined __amd64 || defined __i386) /* SunOS on Intel; 32 and 64-bit modes */
131 #define DF_MT DFMT_SUN_INTEL
132 #else
133 #define DF_MT DFMT_SUN
134 #endif /* __sun */
135 typedef void VOID;
136 typedef void *VOIDP;
137 typedef char *_fcd;
138 typedef char char8;
139 typedef unsigned char uchar8;
140 typedef char int8;
141 typedef unsigned char uint8;
142 typedef short int int16;
143 typedef unsigned short int uint16;
144 #ifdef _LP64 /* 64-bit environment */
145 typedef int int32;
146 typedef unsigned int uint32;
147 #else /* 32-bit environment */
148 typedef long int int32;
149 typedef unsigned long int uint32;
150 #endif
151 typedef int intn;
152 typedef unsigned int uintn;
153 typedef int intf; /* size of INTEGERs in Fortran compiler */
154 typedef float float32;
155 typedef double float64;
156 #ifdef _LP64 /* 64-bit environment */
157 typedef long hdf_pint_t; /* an integer the same size as a pointer */
158 #else /* 32-bit environment */
159 typedef int hdf_pint_t; /* an integer the same size as a pointer */
160 #endif
161 #define FNAME_POST_UNDERSCORE
162 #define _fcdtocp(desc) (desc)
163 #define FILELIB UNIXBUFIO
164 
165 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
166 
167 /* Determine the memory manager we are going to use. Valid values are: */
168 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
169 /* what each does */
170 #define JMEMSYS MEM_ANSI
171 #define HAVE_STDC
172 #define INCLUDES_ARE_ANSI
173 
174 #endif /* ANSISUN */
175 
176 #if defined(KNRSUN)
177 
178 #if !defined(SUN)
179 #define SUN
180 #endif
181 
182 #ifdef GOT_MACHINE
183 If you get an error on this line more than one machine type has been defined.
184 Please check your Makefile.
185 #endif
186 #define GOT_MACHINE
187 
188 # define BSD
189 #define DUMBCC /* because it is. for later use in macros */
190 #ifndef __GNUC__
191 #include <memory.h>
192 #endif /* __GNUC__ */
193 #include <unistd.h>
194 #include <sys/file.h> /* for unbuffered i/o stuff */
195 #include <sys/stat.h>
196 #define DF_MT DFMT_SUN
197 typedef void VOID;
198 typedef char *VOIDP;
199 typedef char *_fcd;
200 typedef char char8;
201 typedef unsigned char uchar8;
202 typedef char int8;
203 typedef unsigned char uint8;
204 typedef short int int16;
205 typedef unsigned short int uint16;
206 typedef long int int32;
207 typedef unsigned long int uint32;
208 typedef int intn;
209 typedef unsigned int uintn;
210 typedef int intf; /* size of INTEGERs in Fortran compiler */
211 typedef float float32;
212 typedef double float64;
213 typedef int hdf_pint_t; /* an integer the same size as a pointer */
214 #define FNAME_POST_UNDERSCORE
215 #define _fcdtocp(desc) (desc)
216 #define FILELIB UNIXBUFIO
217 
218 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
219 
220 /* Determine the memory manager we are going to use. Valid values are: */
221 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
222 /* what each does */
223 #define JMEMSYS MEM_ANSI
224 
225 #ifdef __GNUC__
226 #define HAVE_STDC
227 #define INCLUDES_ARE_ANSI
228 #endif
229 
230 #endif /* SUN */
231 
232 
233 #if defined(IBM6000) || defined(_AIX)
234 
235 #ifndef IBM6000
236 #define IBM6000
237 #endif
238 
239 #ifdef GOT_MACHINE
240 If you get an error on this line more than one machine type has been defined.
241 Please check your Makefile.
242 #endif
243 #define GOT_MACHINE
244 
245 # define BSD
246 
247 #ifndef __GNUC__
248 #include <memory.h>
249 #endif /* __GNUC__ */
250 #include <sys/file.h> /* for unbuffered i/o stuff */
251 #include <sys/stat.h>
252 #define DF_MT DFMT_IBM6000
253 typedef void VOID;
254 typedef void *VOIDP;
255 typedef char *_fcd;
256 #ifndef _ALL_SOURCE
257 typedef char int8;
258 typedef short int int16;
259 typedef int int32;
260 #endif
261 typedef char char8;
262 typedef unsigned char uchar8;
263 typedef unsigned char uint8;
264 typedef unsigned short int uint16;
265 typedef unsigned int uint32;
266 typedef int intn;
267 typedef unsigned int uintn;
268 typedef float float32;
269 typedef double float64;
270 typedef int intf; /* size of INTEGERs in Fortran compiler */
271 #ifdef AIX5L64
272 typedef long hdf_pint_t; /* an integer the same size as a pointer */
273 #else /*AIX5L64 */
274 typedef int hdf_pint_t; /* an integer the same size as a pointer */
275 #endif /*AIX5L64 */
276 #define _fcdtocp(desc) (desc)
277 #define FILELIB UNIXBUFIO
278 
279 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
280 
281 /* Determine the memory manager we are going to use. Valid values are: */
282 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
283 /* what each does */
284 #define JMEMSYS MEM_ANSI
285 
286 #define HAVE_STDC
287 #define INCLUDES_ARE_ANSI
288 
289 #endif /* IBM6000 */
290 
291 #if defined(HP9000) || (!defined(__convexc__) && (defined(hpux) || defined(__hpux)))
292 
293 #ifndef HP9000
294 #define HP9000
295 #endif
296 
297 #ifdef GOT_MACHINE
298 If you get an error on this line more than one machine type has been defined.
299 Please check your Makefile.
300 #endif
301 #define GOT_MACHINE
302 
303 #ifndef HAVE_UNISTD_H
304 #define HAVE_UNISTD_H /* unistd.h - close, fork,..etc */
305 #endif
306 
307 # define BSD
308 #ifndef __GNUC__
309 #include <memory.h>
310 #endif /* __GNUC__ */
311 #include <sys/file.h> /* for unbuffered i/o stuff */
312 #include <sys/stat.h>
313 #define DF_MT DFMT_HP9000
314 typedef void VOID;
315 typedef void *VOIDP;
316 typedef char *_fcd;
317 typedef char char8;
318 typedef unsigned char uchar8;
319 typedef char int8;
320 typedef unsigned char uint8;
321 typedef short int int16;
322 typedef unsigned short int uint16;
323 #ifdef _LP64 /* 64-bit environment */
324 typedef int int32;
325 typedef unsigned int uint32;
326 #else /* 32-bit environment */
327 typedef long int int32;
328 typedef unsigned long int uint32;
329 #endif
330 typedef int intn;
331 typedef unsigned int uintn;
332 typedef float float32;
333 typedef double float64;
334 typedef int intf; /* size of INTEGERs in Fortran compiler */
335 #ifdef _LP64 /* 64-bit environment */
336 typedef long hdf_pint_t; /* an integer the same size as a pointer */
337 #else /* 32-bit environment */
338 typedef int hdf_pint_t; /* an integer the same size as a pointer */
339 #endif
340 #define _fcdtocp(desc) (desc)
341 #define FILELIB UNIXBUFIO
342 
343 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
344 
345 /* Determine the memory manager we are going to use. Valid values are: */
346 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
347 /* what each does */
348 #define JMEMSYS MEM_ANSI
349 
350 #endif /* HP9000 */
351 
352 
353 #if defined(IRIX) || defined(IRIS4) || defined(sgi) || defined(__sgi__) || defined(__sgi)
354 
355 #ifndef IRIX
356 #define IRIX
357 #endif
358 
359 #if (_MIPS_SZLONG == 64)
360 /* IRIX 64 bits objects. It is nearly the same as the conventional
361  * 32 bits objects. Let them share IRIX definitions for now.
362  */
363 #define IRIX64
364 #endif
365 
366 
367 #ifdef GOT_MACHINE
368 If you get an error on this line more than one machine type has been defined.
369 Please check your Makefile.
370 #endif
371 #define GOT_MACHINE 1
372 
373 /*
374  * BSD was originally defined with no value. But some newer SGI system
375  * header files (e.g., resolv.h) assume it has a value and evaluate it
376  * in expressions, thus causing compiling errors. This has been reported
377  * to SGI as bug #781568. SGI could not provide a list of the semantics
378  * of BSD values and suggested a work around of setting BSD to 1.
379  */
380 # define BSD 1
381 #ifndef __GNUC__
382 #include <memory.h>
383 #endif /* __GNUC__ */
384 #include <sys/file.h> /* for unbuffered i/o stuff */
385 #include <sys/stat.h>
386 #define DF_MT DFMT_IRIX
387 typedef void VOID;
388 typedef void *VOIDP;
389 typedef char *_fcd;
390 typedef signed char char8;
391 typedef unsigned char uchar8;
392 typedef signed char int8;
393 typedef unsigned char uint8;
394 typedef short int int16;
395 typedef unsigned short int uint16;
396 typedef int int32;
397 typedef unsigned int uint32;
398 typedef int intn;
399 typedef unsigned int uintn;
400 typedef float float32;
401 typedef double float64;
402 typedef int intf; /* size of INTEGERs in Fortran compiler */
403 typedef long hdf_pint_t; /* an integer the same size as a pointer */
404 #define FNAME_POST_UNDERSCORE
405 #define _fcdtocp(desc) (desc)
406 #define FILELIB UNIXBUFIO
407 /*
408 #ifdef IRIX64
409 #define BIG_LONGS
410 #endif
411 */
412 
413 
414 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
415 
416 /* Determine the memory manager we are going to use. Valid values are: */
417 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
418 /* what each does */
419 #define JMEMSYS MEM_ANSI
420 
421 #define HAVE_STDC
422 #define INCLUDES_ARE_ANSI
423 
424 #endif /* IRIX */
425 
426 /* CRAY XT3
427  * Note from RedStorm helpdesk,
428  * When I compile a C code with the '-v' option, it indicates that the compile
429  * is done with the macros __QK_USER__ and __LIBCATAMOUNT__ defined. In
430  * addition, there are other macros like __x86_64__ defined as well, to
431  * indicate processor type. __QK_USER__ might be a good check for Catamount,
432  * and __x86_64__ might be good for Opteron node. You might try something
433  * like the following in a header file:
434  */
435 #if ((defined(__QK_USER__)) && (defined(__x86_64__)))
436 #define __CRAY_XT3__
437 #endif
438 
439 #if defined(CONVEX) || defined(CONVEXNATIVE) || defined(__convexc__)
440 
441 #ifndef CONVEX
442 #define CONVEX
443 #endif
444 
445 #ifdef GOT_MACHINE
446 If you get an error on this line more than one machine type has been defined.
447 Please check your Makefile.
448 #endif
449 #define GOT_MACHINE
450 
451 #include <sys/types.h>
452 #include <sys/stat.h>
453 /* For Convex machines with native format floats */
454 #ifdef CONVEXNATIVE
455 #define DF_MT DFMT_CONVEXNATIVE
456 #else
457 #define DF_MT DFMT_CONVEX
458 #endif
459 typedef void VOID;
460 typedef void *VOIDP;
461 typedef char *_fcd;
462 typedef char char8;
463 typedef unsigned char uchar8;
464 typedef char int8;
465 typedef unsigned char uint8;
466 typedef short int int16;
467 typedef unsigned short int uint16;
468 typedef long int int32;
469 typedef unsigned long int uint32;
470 typedef int intn;
471 typedef unsigned int uintn;
472 typedef float float32;
473 typedef double float64;
474 typedef int intf; /* size of INTEGERs in Fortran compiler */
475 typedef int hdf_pint_t; /* an integer the same size as a pointer */
476 #define _fcdtocp(desc) (desc)
477 #define FILELIB UNIXBUFIO
478 
479 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
480 
481 /* Determine the memory manager we are going to use. Valid values are: */
482 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
483 /* what each does */
484 #define JMEMSYS MEM_ANSI
485 #define RIGHT_SHIFT_IS_UNSIGNED
486 #define INCLUDES_ARE_ANSI
487 #define HAVE_STDC
488 
489 #endif /* CONVEX */
490 
491 
492 #if defined (__APPLE__)
493 
494 #ifndef __APPLE__
495 #define __APPLE__
496 #endif
497 #ifdef __LITTLE_ENDIAN__
498 #define DF_MT DFMT_APPLE_INTEL
499 #else
500 #define DF_MT DFMT_APPLE
501 #endif
502 #ifdef GOT_MACHINE
503 If you get an error on this line more than one machine type has been defined.
504 Please check your Makefile.
505 #endif
506 #define GOT_MACHINE 1
507 
508 #ifndef __GNUC__
509 #define DUMBCC /* because it is. for later use in macros */
510 #endif /* __GNUC__ */
511 
512 #include <sys/types.h>
513 #include <sys/file.h> /* for unbuffered i/o stuff */
514 #include <sys/stat.h>
515 #ifdef __i386
516 #ifndef INTEL86
517 #define INTEL86 /* we need this Intel define or bad things happen later */
518 #endif /* INTEL86 */
519 #endif /* __i386 */
520 
521 typedef void VOID;
522 typedef void *VOIDP;
523 typedef char *_fcd;
524 typedef char char8;
525 typedef unsigned char uchar8;
526 typedef char int8;
527 typedef unsigned char uint8;
528 typedef short int16;
529 typedef unsigned short uint16;
530 typedef int int32;
531 typedef unsigned int uint32;
532 typedef int intn;
533 typedef unsigned int uintn;
534 typedef float float32;
535 typedef double float64;
536 typedef int intf; /* size of INTEGERs in Fortran compiler */
537 typedef long hdf_pint_t; /* an integer the same size as a pointer */
538 #define _fcdtocp(desc) (desc)
539 #define FILELIB UNIXBUFIO
540 
541 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
542 
543 /* Determine the memory manager we are going to use. Valid values are: */
544 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
545 /* what each does */
546 #define JMEMSYS MEM_ANSI
547 
548 #endif /* __APPLE__ */
549 
550 
551 
552 /* Metrowerks Mac compiler defines some PC stuff so need to exclude this on the Mac */
553 #if !(defined (__APPLE__))
554 
555 #if defined _M_ALPHA || defined _M_X64 || defined _M_IA64 || defined _M_IX86 || defined INTEL86 || defined M_I86 || defined M_I386 || defined DOS386 || defined __i386 || defined UNIX386 || defined i386
556 #ifndef INTEL86
557 #define INTEL86
558 #endif /* INTEL86 */
559 
560 #if !defined UNIX386 && (defined unix || defined __unix)
561 #define UNIX386
562 #endif /* UNIX386 */
563 
564 #if !defined DOS386 && defined M_I386
565 #define DOS386
566 #endif /* M_I386 && !DOS386 */
567 
568 #if defined _WINDOWS || defined _WIN32
569 #define WIN386
570 #endif /* _WINDOWS | _WIN32 */
571 
572 #if defined WIN386 || defined DOS386 || defined UNIX386
573 #define INTEL386
574 #endif /* WIN386 | DOS386 | UNIX386 */
575 
576 #ifdef GOT_MACHINE
577 If you get an error on this line more than one machine type has been defined.
578 Please check your Makefile.
579 #endif
580 #define GOT_MACHINE 1
581 
582 #if defined _WINDOWS || defined _WIN32
583 #pragma comment( lib, "oldnames" )
584 #endif
585 
586 #include <fcntl.h>
587 #ifdef UNIX386
588 #include <sys/types.h> /* for unbuffered file I/O */
589 #include <sys/stat.h>
590 #include <unistd.h>
591 #else /* !UNIX386 */
592 #include <sys\types.h> /* for unbuffered file I/O */
593 #include <sys\stat.h>
594 #include <io.h>
595 #include <conio.h> /* for debugging getch() calls */
596 #include <malloc.h>
597 #endif /* UNIX386 */
598 #include <ctype.h> /* for character macros */
599 #ifdef __WATCOMC__
600 #include <stddef.h> /* for the 'fortran' pragma */
601 #endif
602 
603 
604 #if defined WIN386
605 #ifndef GMEM_MOVEABLE /* check if windows header is already included */
606 #include <windows.h> /* include the windows headers */
607 #include <winnt.h>
608 #define HAVE_BOOLEAN
609 #endif /* GMEM_MOVEABLE */
610 #endif /* WIN386 */
611 
612 #define DF_MT DFMT_PC
613 
614 #ifndef VOID /* The stupid windows.h header file uses a #define instead of a typedef */
615 typedef void VOID;
616 #endif /* end VOID */
617 typedef void * VOIDP;
618 typedef char * _fcd;
619 typedef char char8;
620 typedef unsigned char uchar8;
621 typedef char int8;
622 typedef unsigned char uint8;
623 typedef short int int16;
624 typedef unsigned short int uint16;
625 typedef long int int32;
626 typedef unsigned long int uint32;
627 typedef int intn;
628 typedef unsigned int uintn;
629 typedef float float32;
630 typedef double float64;
631 typedef long intf; /* size of INTEGERs in Fortran compiler */
632 #ifdef _WIN64
633 typedef long long hdf_pint_t; /* 8-byte pointer */
634 #else
635 typedef int hdf_pint_t; /* 4-byte pointer */
636 #endif /* _WIN64 */
637 
638 #if defined _M_ALPHA
639 #define FNAME_PRE_UNDERSCORE
640 #endif
641 
642 #if defined UNIX386
643 #ifdef H4_ABSOFT
644 #define FNAME(x) x
645 #define DF_CAPFNAMES
646 #else
647 #define FNAME_POST_UNDERSCORE
648 #endif
649 #elif defined INTEL386
650 #define DF_CAPFNAMES
651 #endif
652 #define _fcdtocp(desc) (desc)
653 
654 #define FILELIB UNIXBUFIO
655 
656 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
657 
658 /* Determine the memory manager we are going to use. Valid values are: */
659 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
660 /* what each does */
661 #define JMEMSYS MEM_ANSI
662 #define HAVE_STDC
663 #define INCLUDES_ARE_ANSI
664 
665 #endif /* INTEL86 */
666 #endif /* !(defined(__APPLE__)) */
667 
668 /*-----------------------------------------------------*/
669 #if defined(NEXT) || defined(NeXT)
670 
671 #ifndef NEXT
672 #define NEXT
673 #endif
674 
675 #ifdef GOT_MACHINE
676 If you get an error on this line more than one machine type has been defined.
677 Please check your Makefile.
678 #endif
679 #define GOT_MACHINE
680 
681 #define isascii(c) (isprint(c) || iscntrl(c))
682 #ifndef __GNUC__
683 #include <memory.h>
684 #endif /* __GNUC__ */
685 #include <sys/file.h> /* for unbuffered i/o stuff */
686 #include <sys/stat.h>
687 #define DF_MT DFMT_NEXT
688 typedef void VOID;
689 typedef void *VOIDP;
690 typedef char *_fcd;
691 typedef char char8;
692 typedef unsigned char uchar8;
693 typedef char int8;
694 typedef unsigned char uint8;
695 typedef short int int16;
696 typedef unsigned short int uint16;
697 typedef long int int32;
698 typedef unsigned long int uint32;
699 typedef int intn;
700 typedef unsigned int uintn;
701 typedef int intf; /* size of INTEGERs in Fortran compiler */
702 typedef float float32;
703 typedef double float64;
704 typedef int hdf_pint_t; /* an integer the same size as a pointer */
705 #define FNAME_POST_UNDERSCORE
706 #define _fcdtocp(desc) (desc)
707 #define FILELIB UNIXBUFIO
708 
709 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
710 
711 /* Determine the memory manager we are going to use. Valid values are: */
712 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
713 /* what each does */
714 #define JMEMSYS MEM_ANSI
715 
716 #define HAVE_STDC
717 #define INCLUDES_ARE_ANSI
718 
719 #endif /* NEXT */
720 
721 /*-----------------------------------------------------*/
722 #if defined(MOTOROLA) || defined(m88k)
723 
724 #ifdef GOT_MACHINE
725 If you get an error on this line more than one machine type has been defined.
726 Please check your Makefile.
727 #endif
728 #define GOT_MACHINE
729 
730 #ifndef __GNUC__
731 #include <memory.h>
732 #endif /* __GNUC__ */
733 #include <unistd.h>
734 #include <sys/file.h> /* for unbuffered i/o stuff */
735 #include <sys/stat.h>
736 #ifndef O_RDONLY
737 #include <fcntl.h> /* for unbuffered i/o stuff */
738 #endif /*O_RDONLY*/
739 #define DF_MT DFMT_MOTOROLA
740 typedef void VOID;
741 typedef void *VOIDP;
742 typedef char *_fcd;
743 typedef char char8;
744 typedef unsigned char uchar8;
745 typedef char int8;
746 typedef unsigned char uint8;
747 typedef short int int16;
748 typedef unsigned short int uint16;
749 typedef long int int32;
750 typedef unsigned long int uint32;
751 typedef int intn;
752 typedef unsigned int uintn;
753 typedef int intf; /* size of INTEGERs in Fortran compiler */
754 typedef float float32;
755 typedef double float64;
756 typedef int hdf_pint_t; /* an integer the same size as a pointer */
757 #define FNAME_POST_UNDERSCORE
758 #define _fcdtocp(desc) (desc)
759 #define FILELIB UNIXBUFIO
760 
761 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
762 
763 /* Determine the memory manager we are going to use. Valid values are: */
764 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
765 /* what each does */
766 #define JMEMSYS MEM_ANSI
767 
768 #endif /* MOTOROLA */
769 
770 /*-----------------------------------------------------*/
771 #if defined DEC_ALPHA || (defined __alpha && defined __unix__)
772 
773 #ifndef DEC_ALPHA
774 #define DEC_ALPHA
775 #endif
776 
777 #ifdef GOT_MACHINE
778 If you get an error on this line more than one machine type has been defined.
779 Please check your Makefile.
780 #endif
781 #define GOT_MACHINE
782 
783 #include <sys/file.h> /* for unbuffered i/o stuff */
784 #include <sys/stat.h>
785 #define DF_MT DFMT_ALPHA
786 typedef void VOID;
787 typedef void *VOIDP;
788 typedef char *_fcd;
789 typedef char char8;
790 typedef unsigned char uchar8;
791 typedef char int8;
792 typedef unsigned char uint8;
793 typedef short int int16;
794 typedef unsigned short int uint16;
795 #ifndef __rpc_types_h
796 typedef int int32;
797 typedef unsigned int uint32;
798 #endif /* __rpc_types_h */
799 typedef int intn;
800 typedef unsigned int uintn;
801 typedef int intf; /* size of INTEGERs in Fortran compiler */
802 typedef float float32;
803 typedef double float64;
804 typedef long hdf_pint_t; /* an integer the same size as a pointer */
805 #define FNAME_POST_UNDERSCORE
806 #define _fcdtocp(desc) (desc)
807 #define FILELIB UNIXBUFIO
808 
809 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
810 
811 /* Determine the memory manager we are going to use. Valid values are: */
812 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
813 /* what each does */
814 #define JMEMSYS MEM_ANSI
815 
816 #ifdef __GNUC__
817 #define HAVE_STDC
818 #define INCLUDES_ARE_ANSI
819 #endif
820 
821 #endif /* DEC_ALPHA */
822 
823 /*-----------------------------------------------------*/
824 #if defined VP | defined __uxpm__
825 
826 #ifndef VP
827 #define VP
828 #endif
829 
830 #ifdef GOT_MACHINE
831 If you get an error on this line more than one machine type has been defined.
832 Please check your Makefile.
833 #endif
834 #define GOT_MACHINE 1
835 
836 #include <memory.h>
837 #include <sys/types.h>
838 #include <sys/stat.h>
839 #define DF_MT DFMT_VP
840 typedef void VOID;
841 typedef void *VOIDP;
842 typedef char *_fcd;
843 typedef char char8;
844 typedef unsigned char uchar8;
845 typedef char int8;
846 typedef unsigned char uint8;
847 typedef short int int16;
848 typedef unsigned short int uint16;
849 typedef long int int32;
850 typedef unsigned long int uint32;
851 typedef int intn;
852 typedef unsigned int uintn;
853 typedef int intf; /* size of INTEGERs in Fortran compiler */
854 typedef float float32;
855 typedef double float64;
856 typedef int hdf_pint_t; /* an integer the same size as a pointer */
857 #define FNAME_POST_UNDERSCORE
858 #define _fcdtocp(desc) (desc)
859 #define FILELIB UNIXBUFIO
860 
861 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
862 
863 /* Determine the memory manager we are going to use. Valid values are: */
864 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
865 /* what each does */
866 #define JMEMSYS MEM_ANSI
867 
868 #endif /* VP */
869 
870 /*-----------------------------------------------------*/
871 #if defined I860 | defined i860
872 
873 #ifndef I860
874 #define I860
875 #endif
876 
877 #ifdef GOT_MACHINE
878 If you get an error on this line more than one machine type has been defined.
879 Please check your Makefile.
880 #endif
881 #define GOT_MACHINE 1
882 
883 #include <sys/types.h>
884 #include <sys/file.h> /* for unbuffered i/o stuff */
885 #include <sys/stat.h>
886 #include <unistd.h> /* mis-using def. for SEEK_SET, but oh well */
887 #define DF_MT DFMT_I860
888 typedef void VOID;
889 typedef void *VOIDP;
890 typedef char *_fcd;
891 typedef char char8;
892 typedef unsigned char uchar8;
893 typedef char int8;
894 typedef unsigned char uint8;
895 typedef short int16;
896 typedef unsigned short uint16;
897 typedef int int32;
898 typedef unsigned int uint32;
899 typedef int intn;
900 typedef unsigned int uintn;
901 typedef float float32;
902 typedef double float64;
903 typedef int intf; /* size of INTEGERs in Fortran compiler */
904 typedef int hdf_pint_t; /* an integer the same size as a pointer */
905 #define _fcdtocp(desc) (desc)
906 #define FNAME_POST_UNDERSCORE
907 #define FILELIB UNIXBUFIO
908 
909 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
910 
911 /* Determine the memory manager we are going to use. Valid values are: */
912 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
913 /* what each does */
914 #define JMEMSYS MEM_ANSI
915 
916 #endif /* I860 */
917 
918 
919 /*-----------------------------------------------------*/
920 /* Power PC 5 64 */
921 #if defined __powerpc64__
922 
923 #ifdef GOT_MACHINE
924 If you get an error on this line more than one machine type has been defined.
925 Please check your Makefile.
926 #endif
927 #define GOT_MACHINE
928 
929 #include <sys/file.h> /* for unbuffered i/o stuff */
930 #include <sys/stat.h>
931 #define DF_MT DFMT_POWERPC64
932 typedef void VOID;
933 typedef void *VOIDP;
934 typedef char *_fcd;
935 typedef char char8;
936 typedef unsigned char uchar8;
937 typedef char int8;
938 typedef unsigned char uint8;
939 typedef short int int16;
940 typedef unsigned short int uint16;
941 typedef int int32;
942 typedef unsigned int uint32;
943 typedef int intn;
944 typedef unsigned int uintn;
945 typedef int intf; /* size of INTEGERs in Fortran compiler */
946 typedef float float32;
947 typedef double float64;
948 typedef long hdf_pint_t; /* an integer the same size as a pointer */
949 #if defined __GNUC__
950 #define FNAME_POST_UNDERSCORE
951 #endif
952 #define _fcdtocp(desc) (desc)
953 #define FILELIB UNIXBUFIO
954 
955 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
956 
957 /* Determine the memory manager we are going to use. Valid values are: */
958 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
959 /* what each does */
960 #define JMEMSYS MEM_ANSI
961 
962 #ifdef __GNUC__
963 #define HAVE_STDC
964 #define INCLUDES_ARE_ANSI
965 #endif
966 
967 /*-----------------------------------------------------*/
968 #endif /*power PC 5 64 */
969 /* Linux 64 */
970 #if defined(__linux__) && defined __x86_64__ && !(defined SUN) /* i.e. 64-bit Linux but not SunOS on Intel */
971 
972 #ifdef GOT_MACHINE
973 If you get an error on this line more than one machine type has been defined.
974 Please check your Makefile.
975 #endif
976 #define GOT_MACHINE
977 
978 #include <sys/file.h> /* for unbuffered i/o stuff */
979 #include <sys/stat.h>
980 #define DF_MT DFMT_LINUX64
981 typedef void VOID;
982 typedef void *VOIDP;
983 typedef char *_fcd;
984 typedef char char8;
985 typedef unsigned char uchar8;
986 typedef char int8;
987 typedef unsigned char uint8;
988 typedef short int int16;
989 typedef unsigned short int uint16;
990 typedef int int32;
991 typedef unsigned int uint32;
992 typedef int intn;
993 typedef unsigned int uintn;
994 typedef int intf; /* size of INTEGERs in Fortran compiler */
995 typedef float float32;
996 typedef double float64;
997 typedef long hdf_pint_t; /* an integer the same size as a pointer */
998 #define FNAME_POST_UNDERSCORE
999 #define _fcdtocp(desc) (desc)
1000 #define FILELIB UNIXBUFIO
1001 
1002 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
1003 
1004 /* Determine the memory manager we are going to use. Valid values are: */
1005 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
1006 /* what each does */
1007 #define JMEMSYS MEM_ANSI
1008 
1009 #ifdef __GNUC__
1010 #define HAVE_STDC
1011 #define INCLUDES_ARE_ANSI
1012 #endif
1013 
1014 #endif /*Linux 64 */
1015 
1016 /*-----------------------------------------------------*/
1017 /* 64-bit Free BSD */
1018 
1019 #if defined __FreeBSD__ && defined __x86_64__
1020 
1021 #ifdef GOT_MACHINE
1022 If you get an error on this line more than one machine type has been defined.
1023 Please check your Makefile.
1024 #endif
1025 #define GOT_MACHINE
1026 
1027 #include <sys/file.h> /* for unbuffered i/o stuff */
1028 #include <sys/stat.h>
1029 #define DF_MT DFMT_LINUX64
1030 typedef void VOID;
1031 typedef void *VOIDP;
1032 typedef char *_fcd;
1033 typedef char char8;
1034 typedef unsigned char uchar8;
1035 typedef char int8;
1036 typedef unsigned char uint8;
1037 typedef short int int16;
1038 typedef unsigned short int uint16;
1039 typedef int int32;
1040 typedef unsigned int uint32;
1041 typedef int intn;
1042 typedef unsigned int uintn;
1043 typedef int intf; /* size of INTEGERs in Fortran compiler */
1044 typedef float float32;
1045 typedef double float64;
1046 typedef long hdf_pint_t; /* an integer the same size as a pointer */
1047 #define FNAME_POST_UNDERSCORE
1048 #define _fcdtocp(desc) (desc)
1049 #define FILELIB UNIXBUFIO
1050 
1051 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
1052 
1053 /* Determine the memory manager we are going to use. Valid values are: */
1054 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
1055 /* what each does */
1056 #define JMEMSYS MEM_ANSI
1057 
1058 #ifdef __GNUC__
1059 #define HAVE_STDC
1060 #define INCLUDES_ARE_ANSI
1061 #endif
1062 
1063 #endif /*64-bit FreeBSD */
1064 
1065 /*-----------------------------------------------------*/
1066 
1067 /* IA64 running Linux */
1068 #if defined __ia64 && !(defined(hpux) || defined(__hpux))
1069 
1070 #ifdef GOT_MACHINE
1071 If you get an error on this line more than one machine type has been defined.
1072 Please check your Makefile.
1073 #endif
1074 #define GOT_MACHINE
1075 
1076 #include <sys/file.h> /* for unbuffered i/o stuff */
1077 #include <sys/stat.h>
1078 #define DF_MT DFMT_IA64
1079 typedef void VOID;
1080 typedef void *VOIDP;
1081 typedef char *_fcd;
1082 typedef char char8;
1083 typedef unsigned char uchar8;
1084 typedef char int8;
1085 typedef unsigned char uint8;
1086 typedef short int int16;
1087 typedef unsigned short int uint16;
1088 typedef int int32;
1089 typedef unsigned int uint32;
1090 typedef int intn;
1091 typedef unsigned int uintn;
1092 typedef int intf; /* size of INTEGERs in Fortran compiler */
1093 typedef float float32;
1094 typedef double float64;
1095 typedef long hdf_pint_t; /* an integer the same size as a pointer */
1096 #define FNAME_POST_UNDERSCORE
1097 #define _fcdtocp(desc) (desc)
1098 #define FILELIB UNIXBUFIO
1099 
1100 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
1101 
1102 /* Determine the memory manager we are going to use. Valid values are: */
1103 /* MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS. See the JPEG docs for details on */
1104 /* what each does */
1105 #define JMEMSYS MEM_ANSI
1106 
1107 #ifdef __GNUC__
1108 #define HAVE_STDC
1109 #define INCLUDES_ARE_ANSI
1110 #endif
1111 
1112 #endif /* IA64 */
1113 
1114 #ifndef GOT_MACHINE
1115 No machine type has been defined. Your Makefile needs to have someing like
1116 -DSUN or -DUNICOS in order for the HDF internal structures to be defined
1117 correctly.
1118 #endif
1119 
1120 /*-----------------------------------------------------*/
1121 /* encode and decode macros */
1122 /*-----------------------------------------------------*/
1123 
1124 # define INT16ENCODE(p, i) \
1125 { *(p) = (uint8)(((uintn)(i) >> 8) & 0xff); (p)++; \
1126  *(p) = (uint8)((uintn)(i) & 0xff); (p)++; }
1127 
1128 # define UINT16ENCODE(p, i) \
1129 { *(p) = (uint8)(((uintn)(i) >> 8) & 0xff); (p)++; *(p) = (uint8)((i) & 0xff); (p)++; }
1130 
1131 # define INT32ENCODE(p, i) \
1132 { *(p) = (uint8)(((uint32)(i) >> 24) & 0xff); (p)++; \
1133  *(p) = (uint8)(((uint32)(i) >> 16) & 0xff); (p)++; \
1134  *(p) = (uint8)(((uint32)(i) >> 8) & 0xff); (p)++; \
1135  *(p) = (uint8)((uint32)(i) & 0xff); (p)++; }
1136 
1137 # define UINT32ENCODE(p, i) \
1138 { *(p) = (uint8)(((i) >> 24) & 0xff); (p)++; \
1139  *(p) = (uint8)(((i) >> 16) & 0xff); (p)++; \
1140  *(p) = (uint8)(((i) >> 8) & 0xff); (p)++; \
1141  *(p) = (uint8)((i) & 0xff); (p)++; }
1142 
1143 # define NBYTEENCODE(d, s, n) \
1144 { HDmemcpy(d,s,n); p+=n }
1145 
1146 /* DECODE converts big endian bytes pointed by p to integer values and store
1147  * it in i. For signed values, need to do sign-extension when converting
1148  * the 1st byte which carries the sign bit.
1149  * The macros does not require i be of a certain byte sizes. It just requires
1150  * i be big enough to hold the intended value range. E.g. INT16DECODE works
1151  * correctly even if i is actually a 64bit int like in a Cray.
1152  */
1153 
1154 # define INT16DECODE(p, i) \
1155 { (i) = ((*(p) & 0x80) ? ~0xffff : 0x00) | ((int16)(*(p) & 0xff) << 8); (p)++; \
1156  (i) |= (int16)((*(p) & 0xff)); (p)++; }
1157 
1158 # define UINT16DECODE(p, i) \
1159 { (i) = (uint16)((*(p) & 0xff) << 8); (p)++; \
1160  (i) |= (uint16)(*(p) & 0xff); (p)++; }
1161 
1162 # define INT32DECODE(p, i) \
1163 { (i) = (int32)(((int32)*(p) & 0x80) ? ~0xffffffff : 0x00) | ((int32)(*(p) & 0xff) << 24); (p)++; \
1164  (i) |= ((int32)(*(p) & 0xff) << 16); (p)++; \
1165  (i) |= ((int32)(*(p) & 0xff) << 8); (p)++; \
1166  (i) |= (*(p) & 0xff); (p)++; }
1167 
1168 # define UINT32DECODE(p, i) \
1169 { (i) = ((uint32)(*(p) & 0xff) << 24); (p)++; \
1170  (i) |= ((uint32)(*(p) & 0xff) << 16); (p)++; \
1171  (i) |= ((uint32)(*(p) & 0xff) << 8); (p)++; \
1172  (i) |= (uint32)(*(p) & 0xff); (p)++; }
1173 
1174 /* Note! the NBYTEDECODE macro is backwards from the memcpy() routine, */
1175 /* in the spirit of the other DECODE macros */
1176 # define NBYTEDECODE(s, d, n) \
1177 { HDmemcpy(d,s,n); p+=n }
1178 
1179 /*----------------------------------------------------------------
1180 ** MACRO FCALLKEYW for any special fortran-C stub keyword
1181 **
1182 ** Microsoft C and Fortran need __fortran for Fortran callable C
1183 ** routines.
1184 **
1185 ** MACRO FRETVAL for any return value from a fortran-C stub function
1186 ** Replaces the older FCALLKEYW macro.
1187 **---------------------------------------------------------------*/
1188 #ifdef FRETVAL
1189 #undef FRETVAL
1190 #endif
1191 
1192 #ifndef FRETVAL /* !MAC */
1193 # define FCALLKEYW /*NONE*/
1194 # define FRETVAL(x) x
1195 #endif
1196 
1197 
1198 /*----------------------------------------------------------------
1199 ** MACRO FNAME for any fortran callable routine name.
1200 **
1201 ** This macro prepends, appends, or does not modify a name
1202 ** passed as a macro parameter to it based on the FNAME_PRE_UNDERSCORE,
1203 ** FNAME_POST_UNDERSCORE macros set for a specific system.
1204 **
1205 **---------------------------------------------------------------*/
1206 #if defined(FNAME_PRE_UNDERSCORE) && defined(FNAME_POST_UNDERSCORE)
1207 # define FNAME(x) _##x##_
1208 #endif
1209 #if defined(FNAME_PRE_UNDERSCORE) && !defined(FNAME_POST_UNDERSCORE)
1210 # define FNAME(x) _##x
1211 #endif
1212 #if !defined(FNAME_PRE_UNDERSCORE) && defined(FNAME_POST_UNDERSCORE)
1213 # define FNAME(x) x##_
1214 #endif
1215 #if !defined(FNAME_PRE_UNDERSCORE) && !defined(FNAME_POST_UNDERSCORE)
1216 # define FNAME(x) x
1217 #endif
1218 
1219 /**************************************************************************
1220 * Generally useful macro definitions
1221 **************************************************************************/
1222 #ifndef MIN
1223 #define MIN(a,b) (((a)<(b)) ? (a) : (b))
1224 #endif
1225 #ifndef MAX
1226 #define MAX(a,b) (((a)>(b)) ? (a) : (b))
1227 #endif
1228 
1229 /**************************************************************************
1230 * Debugging Allocation functions
1231 **************************************************************************/
1232 #ifdef MALDEBUG
1233 #include "maldebug.h"
1234 #endif
1235 
1236 /**************************************************************************
1237 * Macros to work around ANSI C portability problems.
1238 **************************************************************************/
1239 #ifdef DUMBCC
1240 #define CONSTR(v,s) char *v=s
1241 #else
1242 #define CONSTR(v,s) static const char v[]=s
1243 #endif
1244 
1245 /* Old-style memory allocation function aliases -QAK */
1246 #define HDgetspace HDmalloc
1247 #define HDclearspace HDcalloc
1248 #define HDregetspace HDrealloc
1249 #define HDfreespace HDfree
1250 
1251 /**************************************************************************
1252 * Allocation functions defined differently
1253 **************************************************************************/
1254 #if !defined(MALLOC_CHECK)
1255 # define HDmalloc(s) (malloc((size_t)s))
1256 # define HDcalloc(a,b) (calloc((size_t)a,(size_t)b))
1257 # define HDfree(p) (free((void*)p))
1258 # define HDrealloc(p,s) (realloc((void*)p,(size_t)s))
1259 #endif /* !defined MALLOC_CHECK */
1260 /* Macro to free space and clear pointer to NULL */
1261 #define HDfreenclear(p) { if((p)!=NULL) HDfree(p); p=NULL; }
1262 
1263 /**************************************************************************
1264 * String functions defined differently
1265 **************************************************************************/
1266 
1267 # define HDstrcat(s1,s2) (strcat((s1),(s2)))
1268 # define HDstrcmp(s,t) (strcmp((s),(t)))
1269 # define HDstrcpy(s,d) (strcpy((s),(d)))
1270 # define HDstrlen(s) (strlen((const char *)(s)))
1271 # define HDstrncmp(s1,s2,n) (strncmp((s1),(s2),(n)))
1272 # define HDstrncpy(s1,s2,n) (strncpy((s1),(s2),(n)))
1273 # define HDstrchr(s,c) (strchr((s),(c)))
1274 # define HDstrrchr(s,c) (strrchr((s),(c)))
1275 # define HDstrtol(s,e,b) (strtol((s),(e),(b)))
1276 
1277 
1278 /**************************************************************************
1279 * Memory functions defined differently
1280 **************************************************************************/
1281 
1282 # define HDmemcpy(dst,src,n) (memcpy((void *)(dst),(const void *)(src),(size_t)(n)))
1283 # define HDmemset(dst,c,n) (memset((void *)(dst),(intn)(c),(size_t)(n)))
1284 # define HDmemcmp(dst,src,n) (memcmp((const void *)(dst),(const void *)(src),(size_t)(n)))
1285 
1286 
1287 /**************************************************************************
1288 * Misc. functions
1289 **************************************************************************/
1290 #define HDstat(path, result) (stat(path, result))
1291 #define HDgetenv(s1) (getenv(s1))
1292 #define HDputenv(s1) (putenv(s1))
1293 #define HDltoa(v) (ltoa(v))
1294 #if defined (SUN) && defined(__GNUC__)
1295 #define HDatexit(f) (0) /* we punt on the SUN using gcc */
1296 #else /* !SUN & GCC */
1297 #define HDatexit(f) (atexit(f))
1298 #endif /* !SUN & GCC */
1299 
1300 /* Compatibility #define for V3.3, should be taken out by v4.0 - QAK */
1301 /* Commented out only, just in case any legacy code is still using it out there.
1302  Will be removed in a few maintenance releases. -BMR, Jun 5, 2016
1303 #define DFSDnumber DFSDndatasets */
1304 
1305 #endif /* HDFI_H */
1306 
char * _fcd
Definition: H5f90i.h:37
#define intf
Definition: cdeflate.h:31
HDFFCLIBAPI _fcd intf intf * order
#define HDF
Definition: mfhdf.h:20
HDFFCLIBAPI intf intf intf * type

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52