MISR Toolkit  1.5.1
hconv.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 /*-----------------------------------------------------------------------------
17  * File: hconv.h
18  * Purpose: header file for data conversion information & structures
19  * Invokes:
20  * Contents:
21  * Structure definitions:
22  * Constant definitions: lots...
23  *---------------------------------------------------------------------------*/
24 
25 /* avoid re-inclusion */
26 #ifndef _HCONV_H
27 #define _HCONV_H
28 
29 /* This looks redundant because previously, VMS platform would undefine DUFF. */
30 /* Don't know why. -AKC 2014/1/18 */
31 #define DUFF
32 #ifdef DUFF
33 #define DUFF_sb4b
34 
35 #define DUFF_ui2i
36 #define DUFF_ui2s
37 #define DUFF_uo2i
38 #define DUFF_ui4i
39 #define DUFF_ui4s
40 #define DUFF_uo4i
41 #define DUFF_ui4f
42 #define DUFF_uo4f
43 #define DUFF_ui8f
44 #define DUFF_uo8f
45 
46 #define DUFF_lui2i
47 #define DUFF_lui2s
48 #define DUFF_luo2i
49 #define DUFF_lui4i
50 #define DUFF_lui4s
51 #define DUFF_luo4i
52 #define DUFF_lui4f
53 #define DUFF_luo4f
54 #define DUFF_lui8f
55 #define DUFF_luo8f
56 #endif
57 
58 /*****************************************************************************/
59 /* CONSTANT DEFINITIONS */
60 /*****************************************************************************/
61 /* Generally Big-Endian machines */
62 #if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__)
63 # define UI8_IN DFKnb1b /* Unsigned Integer, 8 bits */
64 # define UI8_OUT DFKnb1b
65 # define SI16_IN DFKnb2b /* S = Signed */
66 # define SI16_OUT DFKnb2b
67 # define UI16_IN DFKnb2b
68 # define UI16_OUT DFKnb2b
69 # define SI32_IN DFKnb4b
70 # define SI32_OUT DFKnb4b
71 # define UI32_IN DFKnb4b
72 # define UI32_OUT DFKnb4b
73 # define F32_IN DFKnb4b /* Float, 32 bits */
74 # define F32_OUT DFKnb4b
75 # define F64_IN DFKnb8b
76 # define F64_OUT DFKnb8b
77 
78 # define LUI8_IN DFKnb1b /* Little Endian Unsigned Integer, 8 bits */
79 # define LUI8_OUT DFKnb1b
80 # define LSI16_IN DFKsb2b
81 # define LSI16_OUT DFKsb2b
82 # define LUI16_IN DFKsb2b
83 # define LUI16_OUT DFKsb2b
84 # define LSI32_IN DFKsb4b
85 # define LSI32_OUT DFKsb4b
86 # define LUI32_IN DFKsb4b
87 # define LUI32_OUT DFKsb4b
88 # define LF32_IN DFKsb4b
89 # define LF32_OUT DFKsb4b
90 # define LF64_IN DFKsb8b
91 # define LF64_OUT DFKsb8b
92 
93 #else /* must be INTEL86 || MIPSEL || DEC_ALPHA || I860 || SUN386 || IA64 || Linux64 (Generally, little-endian machines */
94 # define UI8_IN DFKnb1b /* Big-Endian IEEE support */
95 # define UI8_OUT DFKnb1b /* The s in DFKsb2b is for swap */
96 # define SI16_IN DFKsb2b
97 # define SI16_OUT DFKsb2b
98 # define UI16_IN DFKsb2b
99 # define UI16_OUT DFKsb2b
100 # define SI32_IN DFKsb4b
101 # define SI32_OUT DFKsb4b
102 # define UI32_IN DFKsb4b
103 # define UI32_OUT DFKsb4b
104 # define F32_IN DFKsb4b
105 # define F32_OUT DFKsb4b
106 # define F64_IN DFKsb8b
107 # define F64_OUT DFKsb8b
108 
109 # define LUI8_IN DFKnb1b /* Little-Endian IEEE support */
110 # define LUI8_OUT DFKnb1b
111 # define LSI16_IN DFKnb2b
112 # define LSI16_OUT DFKnb2b
113 # define LUI16_IN DFKnb2b
114 # define LUI16_OUT DFKnb2b
115 # define LSI32_IN DFKnb4b
116 # define LSI32_OUT DFKnb4b
117 # define LUI32_IN DFKnb4b
118 # define LUI32_OUT DFKnb4b
119 # define LF32_IN DFKnb4b
120 # define LF32_OUT DFKnb4b
121 # define LF64_IN DFKnb8b
122 # define LF64_OUT DFKnb8b
123 
124 #endif /* !INTEL86 && !MIPS && !DEC_ALPHA && !I860 && !SUN386 && !IA64 && !Linux64*/
125 
126 /* All Machines currently use the same routines */
127 /* for Native mode "conversions" */
128 # define NUI8_IN DFKnb1b
129 # define NUI8_OUT DFKnb1b
130 # define NSI16_IN DFKnb2b
131 # define NSI16_OUT DFKnb2b
132 # define NUI16_IN DFKnb2b
133 # define NUI16_OUT DFKnb2b
134 # define NSI32_IN DFKnb4b
135 # define NSI32_OUT DFKnb4b
136 # define NUI32_IN DFKnb4b
137 # define NUI32_OUT DFKnb4b
138 # define NF32_IN DFKnb4b
139 # define NF32_OUT DFKnb4b
140 # define NF64_IN DFKnb8b
141 # define NF64_OUT DFKnb8b
142 
143 /*****************************************************************************/
144 /* STRUCTURE DEFINTIONS */
145 /*****************************************************************************/
146 union fpx
147  {
148  float f;
149  long l;
150  };
151 
152 union float_uint_uchar
153  {
154  float32 f;
155  int32 i;
156  unsigned char c[4];
157  };
158 
159 #endif /* _HCONV_H */
float f
Definition: hconv.h:261
long l
Definition: hconv.h:262
Definition: hconv.h:259

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