MISR Toolkit  1.5.1
h5tools.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 HDF5. The full HDF5 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/HDF5/releases. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /*
15  * Programmer: Robb Matzke <matzke@llnl.gov>
16  * Thursday, July 23, 1998
17  *
18  * Purpose: Support functions for the various tools.
19  */
20 #ifndef H5TOOLS_H__
21 #define H5TOOLS_H__
22 
23 #include "hdf5.h"
24 #include "h5tools_error.h"
25 
26 #define ESCAPE_HTML 1
27 #define OPT(X,S) ((X) ? (X) : (S))
28 #define OPTIONAL_LINE_BREAK "\001" /* Special strings embedded in the output */
29 #define START_OF_DATA 0x0001
30 #define END_OF_DATA 0x0002
31 
32 /* format for hsize_t */
33 #define HSIZE_T_FORMAT "%" H5_PRINTF_LL_WIDTH "u"
34 
35 #define H5TOOLS_DUMP_MAX_RANK H5S_MAX_RANK
36 
37 /* Stream macros */
38 #define FLUSHSTREAM(S) if(S != NULL) HDfflush(S)
39 #define PRINTSTREAM(S, F, ...) if(S != NULL) HDfprintf(S, F, __VA_ARGS__)
40 #define PRINTVALSTREAM(S, V) if(S != NULL) HDfprintf(S, V)
41 #define PUTSTREAM(X,S) do { if(S != NULL) HDfputs(X, S); } while(0)
42 
43 /*
44  * Strings for output - these were duplicated from the h5dump.h
45  * file in order to support region reference data display
46  */
47 #define ATTRIBUTE "ATTRIBUTE"
48 #define BLOCK "BLOCK"
49 #define SUPER_BLOCK "SUPER_BLOCK"
50 #define COMPRESSION "COMPRESSION"
51 #define CONCATENATOR "//"
52 #define COMPLEX "COMPLEX"
53 #define COUNT "COUNT"
54 #define CSET "CSET"
55 #define CTYPE "CTYPE"
56 #define DATA "DATA"
57 #define DATASPACE "DATASPACE"
58 #define EXTERNAL "EXTERNAL"
59 #define FILENO "FILENO"
60 #define HARDLINK "HARDLINK"
61 #define NLINK "NLINK"
62 #define OBJID "OBJECTID"
63 #define OBJNO "OBJNO"
64 #define S_SCALAR "SCALAR"
65 #define S_SIMPLE "SIMPLE"
66 #define S_NULL "NULL"
67 #define SOFTLINK "SOFTLINK"
68 #define EXTLINK "EXTERNAL_LINK"
69 #define UDLINK "USERDEFINED_LINK"
70 #define START "START"
71 #define STRIDE "STRIDE"
72 #define STRSIZE "STRSIZE"
73 #define STRPAD "STRPAD"
74 #define SUBSET "SUBSET"
75 #define FILTERS "FILTERS"
76 #define DEFLATE "COMPRESSION DEFLATE"
77 #define DEFLATE_LEVEL "LEVEL"
78 #define SHUFFLE "PREPROCESSING SHUFFLE"
79 #define FLETCHER32 "CHECKSUM FLETCHER32"
80 #define SZIP "COMPRESSION SZIP"
81 #define NBIT "COMPRESSION NBIT"
82 #define SCALEOFFSET "COMPRESSION SCALEOFFSET"
83 #define SCALEOFFSET_MINBIT "MIN BITS"
84 #define STORAGE_LAYOUT "STORAGE_LAYOUT"
85 #define CONTIGUOUS "CONTIGUOUS"
86 #define COMPACT "COMPACT"
87 #define CHUNKED "CHUNKED"
88 #define EXTERNAL_FILE "EXTERNAL_FILE"
89 #define FILLVALUE "FILLVALUE"
90 #define FILE_CONTENTS "FILE_CONTENTS"
91 #define PACKED_BITS "PACKED_BITS"
92 #define PACKED_OFFSET "OFFSET"
93 #define PACKED_LENGTH "LENGTH"
94 
95 #define BEGIN "{"
96 #define END "}"
97 
98 /*
99  * dump structure for output - this was duplicated from the h5dump.h
100  * file in order to support region reference data display
101  */
102 typedef struct h5tools_dump_header_t {
103  const char *name;
104  const char *filebegin;
105  const char *fileend;
106  const char *bootblockbegin;
107  const char *bootblockend;
108  const char *groupbegin;
109  const char *groupend;
110  const char *datasetbegin;
111  const char *datasetend;
112  const char *attributebegin;
113  const char *attributeend;
114  const char *datatypebegin;
115  const char *datatypeend;
116  const char *dataspacebegin;
117  const char *dataspaceend;
118  const char *databegin;
119  const char *dataend;
120  const char *softlinkbegin;
121  const char *softlinkend;
122  const char *extlinkbegin;
123  const char *extlinkend;
124  const char *udlinkbegin;
125  const char *udlinkend;
126  const char *subsettingbegin;
127  const char *subsettingend;
128  const char *startbegin;
129  const char *startend;
130  const char *stridebegin;
131  const char *strideend;
132  const char *countbegin;
133  const char *countend;
134  const char *blockbegin;
135  const char *blockend;
136 
137  const char *fileblockbegin;
138  const char *fileblockend;
139  const char *bootblockblockbegin;
140  const char *bootblockblockend;
141  const char *groupblockbegin;
142  const char *groupblockend;
143  const char *datasetblockbegin;
144  const char *datasetblockend;
145  const char *attributeblockbegin;
146  const char *attributeblockend;
147  const char *datatypeblockbegin;
148  const char *datatypeblockend;
149  const char *dataspaceblockbegin;
150  const char *dataspaceblockend;
151  const char *datablockbegin;
152  const char *datablockend;
153  const char *softlinkblockbegin;
154  const char *softlinkblockend;
155  const char *extlinkblockbegin;
156  const char *extlinkblockend;
157  const char *udlinkblockbegin;
158  const char *udlinkblockend;
159  const char *strblockbegin;
160  const char *strblockend;
161  const char *enumblockbegin;
162  const char *enumblockend;
163  const char *structblockbegin;
164  const char *structblockend;
165  const char *vlenblockbegin;
166  const char *vlenblockend;
167  const char *subsettingblockbegin;
168  const char *subsettingblockend;
169  const char *startblockbegin;
170  const char *startblockend;
171  const char *strideblockbegin;
172  const char *strideblockend;
173  const char *countblockbegin;
174  const char *countblockend;
175  const char *blockblockbegin;
176  const char *blockblockend;
177 
180  const char *dataspacedimbegin;
181  const char *dataspacedimend;
182 
184 
185 /*
186  * Information about how to format output.
187  */
188 typedef struct h5tool_format_t {
189  /*
190  * Fields associated with formatting numeric data. If a datatype matches
191  * multiple formats based on its size, then the first applicable format
192  * from this list is used. However, if `raw' is non-zero then dump all
193  * data in hexadecimal format without translating from what appears on
194  * disk.
195  *
196  * raw: If set then print all data as hexadecimal without
197  * performing any conversion from disk.
198  *
199  * fmt_raw: The printf() format for each byte of raw data. The
200  * default is `%02x'.
201  *
202  * fmt_int: The printf() format to use when rendering data which is
203  * typed `int'. The default is `%d'.
204  *
205  * fmt_uint: The printf() format to use when rendering data which is
206  * typed `unsigned'. The default is `%u'.
207  *
208  * fmt_schar: The printf() format to use when rendering data which is
209  * typed `signed char'. The default is `%d'. This format is
210  * used ony if the `ascii' field is zero.
211  *
212  * fmt_uchar: The printf() format to use when rendering data which is
213  * typed `unsigned char'. The default is `%u'. This format
214  * is used only if the `ascii' field is zero.
215  *
216  * fmt_short: The printf() format to use when rendering data which is
217  * typed `short'. The default is `%d'.
218  *
219  * fmt_ushort: The printf() format to use when rendering data which is
220  * typed `unsigned short'. The default is `%u'.
221  *
222  * fmt_long: The printf() format to use when rendering data which is
223  * typed `long'. The default is `%ld'.
224  *
225  * fmt_ulong: The printf() format to use when rendering data which is
226  * typed `unsigned long'. The default is `%lu'.
227  *
228  * fmt_llong: The printf() format to use when rendering data which is
229  * typed `long long'. The default depends on what printf()
230  * format is available to print this datatype.
231  *
232  * fmt_ullong: The printf() format to use when rendering data which is
233  * typed `unsigned long long'. The default depends on what
234  * printf() format is available to print this datatype.
235  *
236  * fmt_double: The printf() format to use when rendering data which is
237  * typed `double'. The default is `%g'.
238  *
239  * fmt_float: The printf() format to use when rendering data which is
240  * typed `float'. The default is `%g'.
241  *
242  * ascii: If set then print 1-byte integer values as an ASCII
243  * character (no quotes). If the character is one of the
244  * standard C escapes then print the escaped version. If
245  * the character is unprintable then print a 3-digit octal
246  * escape. If `ascii' is zero then then 1-byte integers are
247  * printed as numeric values. The default is zero.
248  *
249  * str_locale: Determines how strings are printed. If zero then strings
250  * are printed like in C except. If set to ESCAPE_HTML then
251  * strings are printed using HTML encoding where each
252  * character not in the class [a-zA-Z0-9] is substituted
253  * with `%XX' where `X' is a hexadecimal digit.
254  *
255  * str_repeat: If set to non-zero then any character value repeated N
256  * or more times is printed as 'C'*N
257  *
258  * Numeric data is also subject to the formats for individual elements.
259  */
261  const char *fmt_raw;
262  const char *fmt_int;
263  const char *fmt_uint;
264  const char *fmt_schar;
265  const char *fmt_uchar;
266  const char *fmt_short;
267  const char *fmt_ushort;
268  const char *fmt_long;
269  const char *fmt_ulong;
270  const char *fmt_llong;
271  const char *fmt_ullong;
272  const char *fmt_double;
273  const char *fmt_float;
274  int ascii;
276  unsigned str_repeat;
277 
278  /*
279  * Fields associated with compound array members.
280  *
281  * pre: A string to print at the beginning of each array. The
282  * default value is the left square bracket `['.
283  *
284  * sep: A string to print between array values. The default
285  * value is a ",\001" ("\001" indicates an optional line
286  * break).
287  *
288  * suf: A string to print at the end of each array. The default
289  * value is a right square bracket `]'.
290  *
291  * linebreaks: a boolean value to determine if we want to break the line
292  * after each row of an array.
293  */
294  const char *arr_pre;
295  const char *arr_sep;
296  const char *arr_suf;
298 
299  /*
300  * Fields associated with compound data types.
301  *
302  * name: How the name of the struct member is printed in the
303  * values. By default the name is not printed, but a
304  * reasonable setting might be "%s=" which prints the name
305  * followed by an equal sign and then the value.
306  *
307  * sep: A string that separates one member from another. The
308  * default is ", \001" (the \001 indicates an optional
309  * line break to allow structs to span multiple lines of
310  * output).
311  *
312  * pre: A string to print at the beginning of a compound type.
313  * The default is a left curly brace.
314  *
315  * suf: A string to print at the end of each compound type. The
316  * default is right curly brace.
317  *
318  * end: a string to print after we reach the last element of
319  * each compound type. prints out before the suf.
320  */
321  const char *cmpd_name;
322  const char *cmpd_sep;
323  const char *cmpd_pre;
324  const char *cmpd_suf;
325  const char *cmpd_end;
326 
327  /*
328  * Fields associated with vlen data types.
329  *
330  * sep: A string that separates one member from another. The
331  * default is ", \001" (the \001 indicates an optional
332  * line break to allow structs to span multiple lines of
333  * output).
334  *
335  * pre: A string to print at the beginning of a vlen type.
336  * The default is a left parentheses.
337  *
338  * suf: A string to print at the end of each vlen type. The
339  * default is a right parentheses.
340  *
341  * end: a string to print after we reach the last element of
342  * each compound type. prints out before the suf.
343  */
344  const char *vlen_sep;
345  const char *vlen_pre;
346  const char *vlen_suf;
347  const char *vlen_end;
348 
349  /*
350  * Fields associated with the individual elements.
351  *
352  * fmt: A printf(3c) format to use to print the value string
353  * after it has been rendered. The default is "%s".
354  *
355  * suf1: This string is appended to elements which are followed by
356  * another element whether the following element is on the
357  * same line or the next line. The default is a comma.
358  *
359  * suf2: This string is appended (after `suf1') to elements which
360  * are followed on the same line by another element. The
361  * default is a single space.
362  */
363  const char *elmt_fmt;
364  const char *elmt_suf1;
365  const char *elmt_suf2;
366 
367  /*
368  * Fields associated with the index values printed at the left edge of
369  * each line of output.
370  *
371  * n_fmt: Each index value is printed according to this printf(3c)
372  * format string which should include a format for a long
373  * integer. The default is "%lu".
374  *
375  * sep: Each integer in the index list will be separated from the
376  * others by this string, which defaults to a comma.
377  *
378  * fmt: After the index values are formated individually and
379  * separated from one another by some string, the entire
380  * resulting string will be formated according to this
381  * printf(3c) format which should include a format for a
382  * character string. The default is "%s".
383  */
384  const char *idx_n_fmt; /*index number format */
385  const char *idx_sep; /*separator between numbers */
386  const char *idx_fmt; /*entire index format */
387 
388  /*
389  * Fields associated with entire lines.
390  *
391  * ncols: Number of columns per line defaults to 80.
392  *
393  * per_line: If this field has a positive value then every Nth element
394  * will be printed at the beginning of a line.
395  *
396  * pre: Each line of output contains an optional prefix area
397  * before the data. This area can contain the index for the
398  * first datum (represented by `%s') as well as other
399  * constant text. The default value is `%s'.
400  *
401  * 1st: This is the format to print at the beginning of the first
402  * line of output. The default value is the current value of
403  * `pre' described above.
404  *
405  * cont: This is the format to print at the beginning of each line
406  * which was continued because the line was split onto
407  * multiple lines. This often happens with compound
408  * data which is longer than one line of output. The default
409  * value is the current value of the `pre' field
410  * described above.
411  *
412  * suf: This character string will be appended to each line of
413  * output. It should not contain line feeds. The default
414  * is the empty string.
415  *
416  * sep: A character string to be printed after every line feed
417  * defaulting to the empty string. It should end with a
418  * line feed.
419  *
420  * multi_new: Indicates the algorithm to use when data elements tend to
421  * occupy more than one line of output. The possible values
422  * are (zero is the default):
423  *
424  * 0: No consideration. Each new element is printed
425  * beginning where the previous element ended.
426  *
427  * 1: Print the current element beginning where the
428  * previous element left off. But if that would result
429  * in the element occupying more than one line and it
430  * would only occupy one line if it started at the
431  * beginning of a line, then it is printed at the
432  * beginning of the next line.
433  *
434  * multi_new: If an element is continued onto additional lines then
435  * should the following element begin on the next line? The
436  * default is to start the next element on the same line
437  * unless it wouldn't fit.
438  *
439  * indentlevel: a string that shows how far to indent if extra spacing
440  * is needed. dumper uses it.
441  */
442  unsigned line_ncols; /*columns of output */
443  size_t line_per_line; /*max elements per line */
444  const char *line_pre; /*prefix at front of each line */
445  const char *line_1st; /*alternate pre. on first line */
446  const char *line_cont; /*alternate pre. on continuation*/
447  const char *line_suf; /*string to append to each line */
448  const char *line_sep; /*separates lines */
449  int line_multi_new; /*split multi-line outputs? */
450  const char *line_indent; /*for extra identation if we need it*/
451 
452  /*used to skip the first set of checks for line length*/
454 
455  /*flag used to hide or show the file number for obj refs*/
457 
458  /*string used to format the output for the obje refs*/
459  const char *obj_format;
460 
461  /*flag used to hide or show the file number for dataset regions*/
463 
464  /*string used to format the output for the dataset regions*/
465  const char *dset_format;
466 
467  const char *dset_blockformat_pre;
468  const char *dset_ptformat_pre;
469  const char *dset_ptformat;
470 
471  /*print array indices in output matrix */
472  int pindex;
473 
474  /*escape non printable characters */
476 
478 
479 typedef struct h5tools_context_t {
480  size_t cur_column; /*current column for output */
481  size_t cur_elmt; /*current element/output line */
482  int need_prefix; /*is line prefix needed? */
483  unsigned ndims; /*dimensionality */
484  hsize_t p_min_idx[H5S_MAX_RANK]; /*min selected index */
485  hsize_t p_max_idx[H5S_MAX_RANK]; /*max selected index */
486  int prev_multiline; /*was prev datum multiline? */
487  size_t prev_prefix_len; /*length of previous prefix */
488  int continuation; /*continuation of previous data?*/
489  hsize_t size_last_dim; /*the size of the last dimension,
490  *needed so we can break after each
491  *row */
492  unsigned indent_level; /*the number of times we need some
493  *extra indentation */
494  unsigned default_indent_level; /*this is used when the indent level gets changed */
495  hsize_t acc[H5S_MAX_RANK]; /* accumulator position */
496  hsize_t pos[H5S_MAX_RANK]; /* matrix position */
497  hsize_t sm_pos; /* current stripmine element position */
499 
500 typedef struct subset_d {
502  unsigned int len;
503 } subset_d;
504 
505 /* a structure to hold the subsetting particulars for a dataset */
506 struct subset_t {
511 };
512 
513 /* The following include, h5tools_str.h, must be after the
514  * above stucts are defined. There is a dependency in the following
515  * include that hasn't been identified yet. */
516 
517 #include "h5tools_str.h"
518 
522 
523 #ifdef __cplusplus
524 extern "C" {
525 #endif
526 
527 H5TOOLS_DLLVAR unsigned packed_bits_num; /* number of packed bits to display */
528 H5TOOLS_DLLVAR unsigned packed_data_offset; /* offset of packed bits to display */
529 H5TOOLS_DLLVAR unsigned packed_data_length; /* length of packed bits to display */
530 H5TOOLS_DLLVAR unsigned long long packed_data_mask; /* mask in which packed bits to display */
531 H5TOOLS_DLLVAR FILE *rawattrstream; /* output stream for raw attribute data */
532 H5TOOLS_DLLVAR FILE *rawdatastream; /* output stream for raw data */
533 H5TOOLS_DLLVAR FILE *rawinstream; /* input stream for raw input */
534 H5TOOLS_DLLVAR FILE *rawoutstream; /* output stream for raw output */
535 H5TOOLS_DLLVAR FILE *rawerrorstream; /* output stream for raw error */
536 H5TOOLS_DLLVAR int bin_output; /* binary output */
537 H5TOOLS_DLLVAR int bin_form; /* binary form */
538 H5TOOLS_DLLVAR int region_output; /* region output */
539 H5TOOLS_DLLVAR int oid_output; /* oid output */
540 H5TOOLS_DLLVAR int data_output; /* data output */
541 H5TOOLS_DLLVAR int attr_data_output; /* attribute data output */
542 
543 /* sort parameters */
544 H5TOOLS_DLLVAR H5_index_t sort_by; /*sort_by [creation_order | name] */
545 H5TOOLS_DLLVAR H5_iter_order_t sort_order; /*sort_order [ascending | descending] */
546 
547 /* things to display or which are set via command line parameters */
548 H5TOOLS_DLLVAR int enable_error_stack; /* re-enable error stack; disable=0 enable=1 */
549 
550 /* Strings for output */
551 #define H5_TOOLS_GROUP "GROUP"
552 #define H5_TOOLS_DATASET "DATASET"
553 #define H5_TOOLS_DATATYPE "DATATYPE"
554 
555 /* Definitions of useful routines */
556 H5TOOLS_DLL void h5tools_init(void);
557 H5TOOLS_DLL void h5tools_close(void);
558 H5TOOLS_DLL int h5tools_set_data_output_file(const char *fname, int is_bin);
559 H5TOOLS_DLL int h5tools_set_attr_output_file(const char *fname, int is_bin);
560 H5TOOLS_DLL int h5tools_set_input_file(const char *fname, int is_bin);
561 H5TOOLS_DLL int h5tools_set_output_file(const char *fname, int is_bin);
562 H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin);
563 H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl,
564  const char *driver, char *drivername, size_t drivername_len);
569 H5TOOLS_DLL hbool_t h5tools_is_obj_same(hid_t loc_id1, const char *name1, hid_t loc_id2, const char *name2);
571 H5TOOLS_DLL hbool_t h5tools_is_zero(const void *_mem, size_t size);
572 H5TOOLS_DLL int h5tools_canreadf(const char* name, hid_t dcpl_id);
574 
575 H5TOOLS_DLL void h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info,
576  h5tools_context_t *ctx, hsize_t elmtno, int secnum);
578  h5tools_context_t *ctx, hsize_t elmtno, hsize_t *ptdata, int secnum);
579 
580 H5TOOLS_DLL int render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t nelmts);
581 H5TOOLS_DLL int render_bin_output_region_data_blocks(hid_t region_id, FILE *stream,
582  hid_t container, unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata);
584  FILE *stream, hid_t container);
585 H5TOOLS_DLL int render_bin_output_region_data_points(hid_t region_space, hid_t region_id,
586  FILE* stream, hid_t container, unsigned ndims, hid_t type_id, hsize_t npoints);
588  FILE *stream, hid_t container);
589 
591  h5tools_context_t *ctx, h5tools_str_t *buffer, hsize_t *curr_pos,
592  size_t ncols, hsize_t local_elmt_counter, hsize_t elmt_counter);
594  h5tools_context_t *ctx/*in,out*/,
595  h5tools_str_t *buffer/*string into which to render */,
596  hsize_t *curr_pos/*total data element position*/,
597  size_t ncols, hsize_t *ptdata,
598  hsize_t local_elmt_counter/*element counter*/,
599  hsize_t elmt_counter);
600 
601 #ifdef __cplusplus
602 }
603 #endif
604 
605 #endif /* H5TOOLS_H__ */
606 
const char * bootblockblockend
Definition: h5tools.h:140
hsize_t size_last_dim
Definition: h5tools.h:489
const char * cmpd_suf
Definition: h5tools.h:324
H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin)
H5TOOLS_DLL htri_t h5tools_detect_vlen(hid_t tid)
const char * udlinkblockend
Definition: h5tools.h:158
const char * datatypeblockend
Definition: h5tools.h:148
const char * obj_format
Definition: h5tools.h:459
unsigned default_indent_level
Definition: h5tools.h:494
#define H5TOOLS_DLLVAR
Definition: H5api_adpt.h:261
H5TOOLS_DLLVAR int bin_output
Definition: h5tools.h:536
int obj_hidefileno
Definition: h5tools.h:456
const char * dataspaceend
Definition: h5tools.h:117
H5TOOLS_DLLVAR FILE * rawerrorstream
Definition: h5tools.h:535
HDFFCLIBAPI intf * info
unsigned int hbool_t
Definition: H5public.h:142
const char * dataspacedescriptionbegin
Definition: h5tools.h:178
const char * fmt_long
Definition: h5tools.h:268
const char * filebegin
Definition: h5tools.h:104
const char * idx_n_fmt
Definition: h5tools.h:384
const char * datatypeblockbegin
Definition: h5tools.h:147
const char * startblockend
Definition: h5tools.h:170
const char * dataspacedimend
Definition: h5tools.h:181
const char * vlen_end
Definition: h5tools.h:347
const char * stridebegin
Definition: h5tools.h:130
#define H5TOOLS_DLL
Definition: H5api_adpt.h:260
const char * dataend
Definition: h5tools.h:119
int arr_linebreak
Definition: h5tools.h:297
subset_d start
Definition: h5tools.h:507
int line_multi_new
Definition: h5tools.h:449
H5TOOLS_DLL int h5tools_set_output_file(const char *fname, int is_bin)
const char * attributeblockbegin
Definition: h5tools.h:145
const char * line_pre
Definition: h5tools.h:444
const char * startblockbegin
Definition: h5tools.h:169
const char * udlinkblockbegin
Definition: h5tools.h:157
const char * fmt_ulong
Definition: h5tools.h:269
H5_index_t
Definition: H5public.h:305
struct subset_d subset_d
H5TOOLS_DLLVAR FILE * rawinstream
Definition: h5tools.h:533
const char * groupblockend
Definition: h5tools.h:142
H5TOOLS_DLL hid_t h5tools_get_little_endian_type(hid_t type)
const char * countblockbegin
Definition: h5tools.h:173
const char * cmpd_end
Definition: h5tools.h:325
HDFFCLIBAPI void intf dims[]
const char * datasetbegin
Definition: h5tools.h:110
const char * extlinkend
Definition: h5tools.h:123
const char * udlinkbegin
Definition: h5tools.h:124
const char * subsettingblockbegin
Definition: h5tools.h:167
const char * dset_ptformat_pre
Definition: h5tools.h:468
unsigned str_repeat
Definition: h5tools.h:276
H5TOOLS_DLL int render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t container, unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata)
const char * fmt_llong
Definition: h5tools.h:270
const char * vlenblockend
Definition: h5tools.h:166
const char * strideblockend
Definition: h5tools.h:172
const char * dataspaceblockend
Definition: h5tools.h:150
const char * udlinkend
Definition: h5tools.h:125
subset_d count
Definition: h5tools.h:509
const char * fmt_uchar
Definition: h5tools.h:265
H5TOOLS_DLLVAR int region_output
Definition: h5tools.h:538
const char * datatypeend
Definition: h5tools.h:115
const char * cmpd_sep
Definition: h5tools.h:322
const char * cmpd_name
Definition: h5tools.h:321
const char * blockblockend
Definition: h5tools.h:176
const char * extlinkbegin
Definition: h5tools.h:122
unsigned long long hsize_t
Definition: H5public.h:169
const char * softlinkbegin
Definition: h5tools.h:120
size_t cur_column
Definition: h5tools.h:480
const char * dataspacedimbegin
Definition: h5tools.h:180
hbool_t raw
Definition: h5tools.h:260
H5TOOLS_DLL int render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *stream, hid_t container, unsigned ndims, hid_t type_id, hsize_t npoints)
const char * blockblockbegin
Definition: h5tools.h:175
struct h5tools_context_t h5tools_context_t
unsigned int len
Definition: h5tools.h:502
const char * groupblockbegin
Definition: h5tools.h:141
const char * startbegin
Definition: h5tools.h:128
struct h5tools_dump_header_t h5tools_dump_header_t
const char * softlinkblockbegin
Definition: h5tools.h:153
H5TOOLS_DLL int render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t nelmts)
const char * strideblockbegin
Definition: h5tools.h:171
H5TOOLS_DLL hbool_t h5tools_is_obj_same(hid_t loc_id1, const char *name1, hid_t loc_id2, const char *name2)
subset_d block
Definition: h5tools.h:510
const char * databegin
Definition: h5tools.h:118
const char * elmt_fmt
Definition: h5tools.h:363
const char * datasetblockend
Definition: h5tools.h:144
const char * fmt_ullong
Definition: h5tools.h:271
HDFFCLIBAPI intf intf intf intf void * buffer
const char * extlinkblockbegin
Definition: h5tools.h:155
const char * datasetblockbegin
Definition: h5tools.h:143
const char * fmt_raw
Definition: h5tools.h:261
H5TOOLS_DLL hbool_t h5tools_is_zero(const void *_mem, size_t size)
unsigned indent_level
Definition: h5tools.h:492
H5TOOLS_DLLVAR FILE * rawdatastream
Definition: h5tools.h:532
int dset_hidefileno
Definition: h5tools.h:462
H5TOOLS_DLL int h5tools_can_encode(H5Z_filter_t filtn)
const char * dset_ptformat
Definition: h5tools.h:469
const char * fmt_float
Definition: h5tools.h:273
H5TOOLS_DLLVAR FILE * rawoutstream
Definition: h5tools.h:534
const char * fmt_double
Definition: h5tools.h:272
H5TOOLS_DLL void init_acc_pos(h5tools_context_t *ctx, hsize_t *dims)
const char * line_sep
Definition: h5tools.h:448
size_t line_per_line
Definition: h5tools.h:443
const char * strideend
Definition: h5tools.h:131
const char * bootblockblockbegin
Definition: h5tools.h:139
const char * countend
Definition: h5tools.h:133
const char * attributeend
Definition: h5tools.h:113
const char * name
Definition: h5tools.h:103
const char * line_suf
Definition: h5tools.h:447
const char * bootblockbegin
Definition: h5tools.h:106
H5TOOLS_DLL hbool_t render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *stream, hid_t container)
const char * enumblockbegin
Definition: h5tools.h:161
HDFFCLIBAPI _fcd fname
const char * groupend
Definition: h5tools.h:109
const char * idx_sep
Definition: h5tools.h:385
H5_iter_order_t
Definition: H5public.h:284
const char * arr_sep
Definition: h5tools.h:295
const char * countbegin
Definition: h5tools.h:132
const char * line_indent
Definition: h5tools.h:450
const char * strblockbegin
Definition: h5tools.h:159
const char * structblockend
Definition: h5tools.h:164
const char * dataspacedescriptionend
Definition: h5tools.h:179
const char * dataspaceblockbegin
Definition: h5tools.h:149
hsize_t * data
Definition: h5tools.h:501
H5TOOLS_DLLVAR int attr_data_output
Definition: h5tools.h:541
HDFFCLIBAPI intf * size
int hid_t
Definition: H5Ipublic.h:54
subset_d stride
Definition: h5tools.h:508
const char * attributebegin
Definition: h5tools.h:112
hsize_t sm_pos
Definition: h5tools.h:497
H5TOOLS_DLLVAR int bin_form
Definition: h5tools.h:537
const char * countblockend
Definition: h5tools.h:174
H5TOOLS_DLL hbool_t h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols, hsize_t local_elmt_counter, hsize_t elmt_counter)
const char * fileend
Definition: h5tools.h:105
const char * extlinkblockend
Definition: h5tools.h:156
const char * line_1st
Definition: h5tools.h:445
H5TOOLS_DLLVAR H5_iter_order_t sort_order
Definition: h5tools.h:545
const char * elmt_suf2
Definition: h5tools.h:365
const char * datablockend
Definition: h5tools.h:152
const char * blockbegin
Definition: h5tools.h:134
const char * startend
Definition: h5tools.h:129
H5TOOLS_DLLVAR unsigned packed_data_offset
Definition: h5tools.h:528
H5TOOLS_DLLVAR int data_output
Definition: h5tools.h:540
const char * bootblockend
Definition: h5tools.h:107
H5TOOLS_DLLVAR const h5tools_dump_header_t h5tools_standardformat
Definition: h5tools.h:520
const char * softlinkblockend
Definition: h5tools.h:154
const char * vlen_suf
Definition: h5tools.h:346
const char * datablockbegin
Definition: h5tools.h:151
H5TOOLS_DLL hid_t h5tools_get_big_endian_type(hid_t type)
const char * dset_blockformat_pre
Definition: h5tools.h:467
H5TOOLS_DLL int h5tools_set_attr_output_file(const char *fname, int is_bin)
const char * fileblockend
Definition: h5tools.h:138
const char * subsettingend
Definition: h5tools.h:127
const char * cmpd_pre
Definition: h5tools.h:323
H5TOOLS_DLL void h5tools_init(void)
H5TOOLS_DLL hbool_t h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols, hsize_t *ptdata, hsize_t local_elmt_counter, hsize_t elmt_counter)
const char * fmt_short
Definition: h5tools.h:266
H5TOOLS_DLL void h5tools_close(void)
const char * attributeblockend
Definition: h5tools.h:146
const char * vlen_sep
Definition: h5tools.h:344
const char * dataspacebegin
Definition: h5tools.h:116
int H5Z_filter_t
Definition: H5Zpublic.h:31
const char * strblockend
Definition: h5tools.h:160
size_t cur_elmt
Definition: h5tools.h:481
size_t prev_prefix_len
Definition: h5tools.h:487
HDFFCLIBAPI intf intf intf * type
const char * datasetend
Definition: h5tools.h:111
const char * fmt_ushort
Definition: h5tools.h:267
HDFFCLIBAPI intf intf * flags
const char * datatypebegin
Definition: h5tools.h:114
unsigned line_ncols
Definition: h5tools.h:442
#define H5S_MAX_RANK
Definition: H5Spublic.h:29
const char * vlen_pre
Definition: h5tools.h:345
const char * line_cont
Definition: h5tools.h:446
const char * idx_fmt
Definition: h5tools.h:386
const char * fmt_uint
Definition: h5tools.h:263
H5TOOLS_DLLVAR const h5tools_dump_header_t * h5tools_dump_header_format
Definition: h5tools.h:521
const char * subsettingbegin
Definition: h5tools.h:126
const char * softlinkend
Definition: h5tools.h:121
H5TOOLS_DLL void h5tools_region_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hsize_t elmtno, hsize_t *ptdata, int secnum)
struct h5tool_format_t h5tool_format_t
const char * elmt_suf1
Definition: h5tools.h:364
const char * structblockbegin
Definition: h5tools.h:163
H5TOOLS_DLLVAR FILE * rawattrstream
Definition: h5tools.h:531
int htri_t
Definition: H5public.h:143
const char * dset_format
Definition: h5tools.h:465
H5TOOLS_DLLVAR int oid_output
Definition: h5tools.h:539
H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, const char *driver, char *drivername, size_t drivername_len)
const char * blockend
Definition: h5tools.h:135
unsigned ndims
Definition: h5tools.h:483
H5TOOLS_DLLVAR H5_index_t sort_by
Definition: h5tools.h:544
const char * fmt_int
Definition: h5tools.h:262
const char * groupbegin
Definition: h5tools.h:108
H5TOOLS_DLL hbool_t render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *stream, hid_t container)
H5TOOLS_DLLVAR unsigned long long packed_data_mask
Definition: h5tools.h:530
const char * arr_pre
Definition: h5tools.h:294
H5TOOLS_DLL int h5tools_canreadf(const char *name, hid_t dcpl_id)
H5TOOLS_DLL int h5tools_set_input_file(const char *fname, int is_bin)
const char * arr_suf
Definition: h5tools.h:296
H5TOOLS_DLL int h5tools_set_data_output_file(const char *fname, int is_bin)
H5TOOLS_DLLVAR unsigned packed_data_length
Definition: h5tools.h:529
const char * subsettingblockend
Definition: h5tools.h:168
const char * fmt_schar
Definition: h5tools.h:264
H5TOOLS_DLLVAR h5tool_format_t h5tools_dataformat
Definition: h5tools.h:519
H5TOOLS_DLLVAR int enable_error_stack
Definition: h5tools.h:548
H5TOOLS_DLL htri_t h5tools_detect_vlen_str(hid_t tid)
const char * fileblockbegin
Definition: h5tools.h:137
const char * enumblockend
Definition: h5tools.h:162
const char * vlenblockbegin
Definition: h5tools.h:165
H5TOOLS_DLLVAR unsigned packed_bits_num
Definition: h5tools.h:527
H5TOOLS_DLL void h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hsize_t elmtno, int secnum)

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