mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
a34534c9b8
---------------------- ./MANIFEST ./doc/html/H5.format.html ./src/H5O.c ./src/H5Oprivate.h ./src/H5Omtime.c [NEW] ./src/H5private.h ./src/Makefile.in Added the modification time message. If an object header has this message then it's value is updated with the current time whenever anything changes in the object header. ./acconfig.h ./configure.in Alas, there seems to be no standard way to convert a string time like 19980727122800 in UTC to a time_t since mktime() only converts local times to time_t. So I've modified the configuration to check for various ways of getting the time zone information: * Added checks for the `tm_gmtoff' field of `struct tm'. * Added a check for the `timezone' global variable. * Added a check for `struct timezone'. * Added a check for BSDgettimeofday(). * Added a check for gettimeofday() although it doesn't actually set the timezone argument on some systems. * Added a check to see if `tm_zone' is a member of `struct tm'. * Added a check to see if `tzname' is a global variable. * Added a check to see if `struct tm' is defined in time.h or sys/time.h. It's not difficult to get the right UTC modification message into the object header, but some systems might have problems getting the right time back out (Irix64 is one) and those systems will report zero for the H5G_stat_t.mtime from an H5Gstat() call as if the mtime message isn't even present. It will, however, continue to be updated as normal. ./src/H5G.c ./src/H5Gpublic.h The H5G_stat_t struct now contains an `mtime' field which will hold the object modification time. If the object has no object modification time then the `mtime' will be initialized to zero. Fixed a bug in H5G_stat() that caused the `objno' field of the H5G_stat_t to be set incorrectly on some machines. ./src/H5D.c Writing to external datasets fail if the hdf5 file is not open for writing. A modification time message is added to the dataset object header when it's created and H5O_touch() is called from H5D_write() to update that message. ./src/H5T.c Fixed a bug in H5Tget_member_dims() that caused a segmentation fault if one of the output array arguments was the null pointer. Relaxed the member dimension checking in H5Tinsert_array() so it can also be used for scalar members. ./test/Makefile.in Added additional file names to the `mostlyclean' target. ./tools/h5dump.c ./tools/h5tools.h Increased the temporary buffer size to 1MB. Added support for printing compound data types with array members. When printing H5T_NATIVE_CHAR and H5T_NATIVE_UCHAR we escape double quote characters. ./tools/h5ls.c Changed the output format a little because we were starting to get too much info to fit on a line. Without `--verbose' each object occupies one line of output. Otherwise, additional information is printed below the object name: object file address, comment, and modification time. If `--dump' is given then the data is printed after the other information. ./test/cmpd_dset.c Changed the way the dataset is initialized to be more uniform.
120 lines
4.0 KiB
C
120 lines
4.0 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.
|
|
*
|
|
* 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
|