blob: 966eaffe88770636a13a7738fd605bed1e9861a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
/*
* Copyright © 1998 NCSA
* All rights reserved.
*
* Programmer: Robb Matzke <matzke@llnl.gov>
* Thursday, July 23, 1998
*
* Purpose: Support functions for the various tools.
*/
#ifndef _H5TOOLS_H
#define _H5TOOLS_H
#include <hdf5.h>
#include <stdio.h>
/*
* Information about how to format output.
*/
typedef struct h5dump_t {
/*
* Fields associated with the individual elements.
*
* fmt: A printf(3c) format to use to print the value string
* after it has been rendered. The default is "%s".
*
* suf1: This string is appended to elements which are followed by
* another element whether the following element is on the
* same line or the next line. The default is a comma.
*
* suf2: This string is appended (after `suf1') to elements which
* are followed on the same line by another element. The
* default is a single space.
*/
const char *elmt_fmt;
const char *elmt_suf1;
const char *elmt_suf2;
/*
* Fields associated with the index values printed at the left edge of
* each line of output.
*
* n_fmt: Each index value is printed according to this printf(3c)
* format string which should include a format for a long
* integer. The default is "%lu".
*
* sep: Each integer in the index list will be separated from the
* others by this string, which defaults to a comma.
*
* fmt: After the index values are formated individually and
* separated from one another by some string, the entire
* resulting string will be formated according to this
* printf(3c) format which should include a format for a
* character string. The default is "%s".
*/
const char *idx_n_fmt; /*index number format */
const char *idx_sep; /*separator between numbers */
const char *idx_fmt; /*entire index format */
/*
* Fields associated with entire lines.
*
* ncols: Number of columns per line defaults to 80.
*
* suf: This character string will be appended to each line of
* output. It should not contain line feeds. The default
* is the empty string.
*
* sep: A character string to be printed after every line feed
* defaulting to the empty string. It should end with a
* line feed.
*/
int line_ncols; /*columns of output */
const char *line_suf; /*string to append to each line */
const char *line_sep; /*separates lines */
} h5dump_t;
int h5dump(FILE *stream, const h5dump_t *info, hid_t dset, hid_t p_type);
#endif
|