mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-23 16:20:57 +08:00
---------------------- ./bin/snapshot Made same fix as for the release script yesterday. ./src/H5D.c ./src/H5Dprivate.h ./src/H5G.c ./src/H5Gprivate.h ./src/H5Gpublic.h ./src/H5O.c ./src/H5Oprivate.h ./src/H5RA.c ./src/H5RAprivate.h ./src/H5T.c ./src/H5Tprivate.h Improved object type checking. Instead of determining the object type by trying to open each of the possible types, we keep a table of associations between object type number (like H5G_GROUP, H5G_DATASET, H5D_TYPE, and H5D_RAGGED) and an `isa' function that returns true if the object header has the right messages to make the object a particular type. This mechanism also allows specialization of object types by permitting an object to satisfy more than one `isa' function. Added `isa' functions for groups, datasets, ragged arrays, and committed data types. ./src/H5config.h.in Added HAVE_STAT_ST_BLOCKS. I thought this had already been added, but apparently not. ./tools/h5ls.c Removed system include files since they're already included by H5private.h and since I wasn't including them portably anyway. By default, 1-byte integer types are printed as integer values instead of ASCII characters. However, the `-s' or `--string' command-line switch causes the data to be interpretted as ASCII. String data types are always printed as character data. Ragged arrays are now identified as ragged arrays and h5ls doesn't descend into the group automatically. This uses the new object type specialization stuff. ./tools/h5tools.c ./tools/h5tools.h Added the ability to print 1-byte integer types as either ASCII or numeric data instead of always ASCII. The default is to print as numeric data.
128 lines
4.4 KiB
C
128 lines
4.4 KiB
C
/*
|
|
* 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 compound array members.
|
|
*
|
|
* pre: A string to print at the beginning of each array. The
|
|
* default value is the left square bracket `['.
|
|
*
|
|
* sep: A string to print between array values. The default
|
|
* value is a comma.
|
|
*
|
|
* suf: A strint to print at the end of each array. The default
|
|
* value is a right square bracket `]'.
|
|
*/
|
|
const char *arr_pre;
|
|
const char *arr_sep;
|
|
const char *arr_suf;
|
|
|
|
/*
|
|
* Fields associated with compound data types.
|
|
*
|
|
* name: How the name of the struct member is printed in the
|
|
* values. By default the name is not printed, but a
|
|
* reasonable setting might be "%s=" which prints the name
|
|
* followed by an equal sign and then the value.
|
|
*
|
|
* sep: A string that separates one member from another. The
|
|
* default is a comma.
|
|
*
|
|
* pre: A string to print at the beginning of a compound type.
|
|
* The default is a left curly brace.
|
|
*
|
|
* suf: A string to print at the end of each compound type. The
|
|
* default is a right curly brace.
|
|
*/
|
|
const char *cmpd_name;
|
|
const char *cmpd_sep;
|
|
const char *cmpd_pre;
|
|
const char *cmpd_suf;
|
|
|
|
/*
|
|
* Fields associated with the individual elements.
|
|
*
|
|
* ascii: If set then print 1-byte integer values as an ASCII
|
|
* character (no quotes). If the character is one of the
|
|
* standard C escapes then print the escaped version. If
|
|
* the character is unprintable then print a 3-digit octal
|
|
* escape. If `ascii' is zero then then 1-byte integers are
|
|
* printed as numeric values. The default is zero.
|
|
*
|
|
* 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.
|
|
*/
|
|
int ascii;
|
|
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
|