MISR Toolkit  1.5.1
hdf.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 files COPYING and Copyright.html. COPYING can be found at the root *
9  * of the source code distribution tree; Copyright.html can be found at *
10  * http://hdfgroup.org/products/hdf4/doc/Copyright.html. If you do not have *
11  * access to either file, you may request a copy from help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /* $Id: hdf.h 5584 2011-04-13 18:25:06Z bmribler $ */
15 
16 #ifndef HDF_H
17 #define HDF_H
18 
19 #include "h4config.h"
20 #include "hdfi.h"
21 #include "hlimits.h"
22 
23 /* Internal DF structure */
24 typedef struct
25  {
26  uint16 tag; /* tag of element */
27  uint16 ref; /* ref of element */
28  }
29 DFdi;
30 
31 /* For annotations */
32 /* enumerated types of the varous annotation types */
33 typedef enum
34 {
35  AN_UNDEF = -1,
36  AN_DATA_LABEL = 0, /* Data label */
37  AN_DATA_DESC, /* Data description */
38  AN_FILE_LABEL, /* File label */
39  AN_FILE_DESC /* File description */
40 } ann_type;
41 
42 /* internal file access codes */
43 
44 #define DFACC_READ 1
45 #define DFACC_WRITE 2
46 #define DFACC_CREATE 4
47 #define DFACC_ALL 7
48 
49 #define DFACC_RDONLY 1
50 #define DFACC_RDWR 3
51 #define DFACC_CLOBBER 4
52 
53 /* New file access codes (for Hstartaccess only, currently) */
54 #define DFACC_BUFFER 8 /* buffer the access to this AID */
55 #define DFACC_APPENDABLE 0x10 /* make this AID appendable */
56 #define DFACC_CURRENT 0x20 /* start looking for a tag/ref from the current */
57  /* location in the DD list (useful for continued */
58  /* searching ala findfirst/findnext) */
59 
60 /* External Element File access mode */
61 /* #define DFACC_CREATE 4 is for creating new external element file */
62 #define DFACC_OLD 1 /* for accessing existing ext. element file */
63 
64 /* The magic cookie for Hcache to cache all files */
65 #define CACHE_ALL_FILES (-2)
66 
67 /* File access modes */
68 /* 001--007 for different serial modes */
69 /* 011--017 for different parallel modes */
70 
71 #define DFACC_DEFAULT 000
72 #define DFACC_SERIAL 001
73 #define DFACC_PARALLEL 011
74 
75 /* used by Hnextread to determine where to start searching for the
76  next tag/ref to read */
77 
78 #define DF_START 0
79 #define DF_CURRENT 1
80 #define DF_END 2
81 
82 /* Used by Hfind to determine the direction to search for tag/ref's in the */
83 /* file. */
84 
85 #define DF_FORWARD 1
86 #define DF_BACKWARD 2
87 
88 /* return code - since some unix/c routines use 0 and -1 as their return
89  code, and some assumption had been made in the code about that, it is
90  important to keep these constants the same values. For explicitly
91  boolean functions, use TRUE and FALSE */
92 
93 #define SUCCEED 0
94 #define FAIL (-1)
95 
96 /* boolean values, reminder: NEVER compare with numeric values */
97 
98 #ifndef FALSE
99 # define FALSE 0
100 #endif
101 #ifndef TRUE
102 # define TRUE (!FALSE)
103 #endif
104 
105 /* macros */
106 #define STREQ(s, t) (HDstrcmp((s), (t)) == 0)
107 #define NSTREQ(s, t, n) (HDstrncmp((s), (t), (n)) == 0)
108 
109 /*
110  * Macros used for variable and function scoping in code.....
111  */
112 #ifndef EXPORT
113 #define EXPORT
114 #endif
115 
116 #ifndef PRIVATE
117 #define PRIVATE static
118 #endif
119 
120 /* Include the Number-type definitions */
121 #include "hntdefs.h"
122 
123 /* Include the Tag definitions */
124 #include "htags.h"
125 
126 /*
127  * interlacing supported by the vset.
128  */
129 
130 #define FULL_INTERLACE 0
131 #define NO_INTERLACE 1
132 
133 /* Some information about a number type - character strings to be displayed */
134 typedef struct hdf_ntinfo_t
135  {
136  char type_name[9]; /* longest possible string "float128" */
137  char byte_order[13]; /* "bigEndian" or "littleEndian" */
138  }
140 
141 /* type for File ID to send to Hlevel from Vxx interface */
142 typedef int32 HFILEID;
143 
144 typedef intn (*hdf_termfunc_t)(void); /* termination function typedef */
145 
146 /* .................................................................. */
147 
148 /* Publically accessible functions declarations. This includes all the
149  functions that are used by application programs. */
150 
151 #include "hbitio.h"
152 #include "hcomp.h"
153 #include "herr.h"
154 #include "hproto.h"
155 #include "hdatainfo.h" /* Add the data info header */
156 #include "vg.h" /* Add the Vgroup/Vdata header so the users don't have to */
157 #include "mfgr.h" /* Add the GR header so the users don't have to */
158 
159 /* these may eventaully evolve into real-life functions but not yet */
160 #define HDFopen(f,a,d) Hopen((f), (a), (d))
161 #define HDFclose(f) Hclose((f))
162 #define Vstart(f) Vinitialize((f))
163 #define Vend(f) Vfinish((f))
164 
165 /* Misc. macros for backward compability */
166 #define HDgettagname(tag) HDgettagdesc(tag)
167 
168 /* This is also defined in fmpio.h */
169 #define MP_PAGEALL 0x01 /* page the whole file i.e. no limit on 'maxcache'*/
170 
171 #endif /* HDF_H */
172 
int32 HFILEID
Definition: hdf.h:142
Definition: hdf.h:24
uint16 ref
Definition: hdf.h:27
char byte_order[13]
Definition: hdf.h:137
Definition: hdf.h:35
char type_name[9]
Definition: hdf.h:136
uint16 tag
Definition: hdf.h:26
ann_type
Definition: hdf.h:33
struct hdf_ntinfo_t hdf_ntinfo_t
intn(* hdf_termfunc_t)(void)
Definition: hdf.h:144

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