From a34534c9b8321f4de9fadd836be926497f7461d4 Mon Sep 17 00:00:00 2001 From: Robb Matzke Date: Wed, 29 Jul 1998 11:43:59 -0500 Subject: [svn-r546] Changes since 19980724 ---------------------- ./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. --- MANIFEST | 1 + README | 2 +- acconfig.h | 9 + configure | 306 +++++++++++++++-- configure.in | 35 ++ doc/html/H5.format.html | 177 ++++++++-- src/.distdep | 892 ++++++++++++++++++++++++------------------------ src/H5D.c | 27 +- src/H5G.c | 10 +- src/H5Gpublic.h | 11 +- src/H5O.c | 147 +++++++- src/H5Omtime.c | 316 +++++++++++++++++ src/H5Oprivate.h | 7 + src/H5T.c | 8 +- src/H5config.h.in | 25 ++ src/H5private.h | 3 + src/Makefile.in | 6 +- test/.distdep | 265 +++++++------- test/Makefile.in | 3 +- test/cmpd_dset.c | 2 +- tools/h5ls.c | 39 ++- tools/h5tools.c | 98 ++++-- tools/h5tools.h | 16 + 23 files changed, 1691 insertions(+), 714 deletions(-) create mode 100644 src/H5Omtime.c diff --git a/MANIFEST b/MANIFEST index 34a2b7f..44fdb5e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -211,6 +211,7 @@ ./src/H5Odtype.c ./src/H5Oefl.c ./src/H5Olayout.c +./src/H5Omtime.c ./src/H5Oname.c ./src/H5Onull.c ./src/H5Oprivate.h diff --git a/README b/README index e6cd82f..e158b58 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This is hdf5-1.0.36 released on 1998-06-24 14:20 UTC +This is hdf5-1.0.38 released on 1998-06-29 16:05 UTC Please refer to the INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/acconfig.h b/acconfig.h index ee300ea..5d3b861 100644 --- a/acconfig.h +++ b/acconfig.h @@ -12,3 +12,12 @@ /* The width parameter for printf formats for type `long long', us. `ll' */ #undef PRINTF_LL_WIDTH + +/* Define if `tm_gmtoff' is a member of `struct tm' */ +#undef HAVE_TM_GMTOFF + +/* Define if `timezone' is a global variable */ +#undef HAVE_TIMEZONE + +/* Define if `struct timezone' is defined */ +#undef HAVE_STRUCT_TIMEZONE diff --git a/configure b/configure index af5ee24..0dbfde1 100755 --- a/configure +++ b/configure @@ -1873,15 +1873,202 @@ EOF esac +echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 +echo "configure:1878: checking for tm_gmtoff in struct tm" >&5 +cat > conftest.$ac_ext < +#include +int main() { +struct tm tm; tm.tm_gmtoff=0; +; return 0; } +EOF +if { (eval echo configure:1889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define HAVE_TM_GMTOFF 1 +EOF + +echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + +echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6 +echo "configure:1905: checking for global timezone variable" >&5 +cat > conftest.$ac_ext < +#include +int main() { +timezone=0; +; return 0; } +EOF +if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define HAVE_TIMEZONE 1 +EOF + +echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + +echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 +echo "configure:1932: checking whether struct tm is in sys/time.h or time.h" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +int main() { +struct tm *tp; tp->tm_sec; +; return 0; } +EOF +if { (eval echo configure:1945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm=time.h +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_tm=sys/time.h +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_tm" 1>&6 +if test $ac_cv_struct_tm = sys/time.h; then + cat >> confdefs.h <<\EOF +#define TM_IN_SYS_TIME 1 +EOF + +fi + +echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 +echo "configure:1966: checking for tm_zone in struct tm" >&5 +if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include <$ac_cv_struct_tm> +int main() { +struct tm tm; tm.tm_zone; +; return 0; } +EOF +if { (eval echo configure:1979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_struct_tm_zone=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_struct_tm_zone=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6 +if test "$ac_cv_struct_tm_zone" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_TM_ZONE 1 +EOF + +else + echo $ac_n "checking for tzname""... $ac_c" 1>&6 +echo "configure:1999: checking for tzname" >&5 +if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#endif +int main() { +atoi(*tzname); +; return 0; } +EOF +if { (eval echo configure:2014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_var_tzname=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_var_tzname=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_var_tzname" 1>&6 + if test $ac_cv_var_tzname = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_TZNAME 1 +EOF + + fi +fi + +echo $ac_n "checking for struct timezone""... $ac_c" 1>&6 +echo "configure:2036: checking for struct timezone" >&5 +cat > conftest.$ac_ext < +#include +#include +int main() { +struct timezone tz; tz.tz_minuteswest=0; +; return 0; } +EOF +if { (eval echo configure:2048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_TIMEZONE 1 +EOF + +echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + for ac_func in getpwuid gethostname system getrusage fork waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1880: checking for $ac_func" >&5 +echo "configure:2067: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +for ac_func in gettimeofday BSDgettimeofday +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2122: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1930,24 +2172,24 @@ done cat > conftest.$ac_ext < int main() { off64_t n = 0; ; return 0; } EOF -if { (eval echo configure:1941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* for ac_func in lseek64 fseek64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1946: checking for $ac_func" >&5 +echo "configure:2188: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2005,12 +2247,12 @@ rm -f conftest* echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2009: checking for working const" >&5 +echo "configure:2251: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2080,21 +2322,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2084: checking for inline" >&5 +echo "configure:2326: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2121,16 +2363,16 @@ esac echo $ac_n "checking for __attribute__ extension""... $ac_c" 1>&6 -echo "configure:2125: checking for __attribute__ extension" >&5 +echo "configure:2367: checking for __attribute__ extension" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_ATTRIBUTE 1 @@ -2146,16 +2388,16 @@ fi rm -f conftest* echo $ac_n "checking for __FUNCTION__ extension""... $ac_c" 1>&6 -echo "configure:2150: checking for __FUNCTION__ extension" >&5 +echo "configure:2392: checking for __FUNCTION__ extension" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_FUNCTION 1 @@ -2171,7 +2413,7 @@ fi rm -f conftest* echo $ac_n "checking how to print long long""... $ac_c" 1>&6 -echo "configure:2175: checking how to print long long" >&5 +echo "configure:2417: checking how to print long long" >&5 if eval "test \"`echo '$''{'hdf5_cv_printf_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2180,7 +2422,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -2191,7 +2433,7 @@ else sprintf(s,"%${hdf5_cv_printf_ll}d",x); exit (strcmp(s,"1099511627776"));} EOF -if { (eval echo configure:2195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then break else @@ -2212,7 +2454,7 @@ EOF echo $ac_n "checking for debug flags""... $ac_c" 1>&6 -echo "configure:2216: checking for debug flags" >&5 +echo "configure:2458: checking for debug flags" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" @@ -2244,7 +2486,7 @@ if test "X" != "X$DEBUG_PKG"; then fi echo $ac_n "checking for API tracing""... $ac_c" 1>&6 -echo "configure:2248: checking for API tracing" >&5; +echo "configure:2490: checking for API tracing" >&5; # Check whether --enable-trace or --disable-trace was given. if test "${enable_trace+set}" = set; then enableval="$enable_trace" @@ -2267,7 +2509,7 @@ if test "${enable_parallel+set}" = set; then fi echo $ac_n "checking for parallel support""... $ac_c" 1>&6 -echo "configure:2271: checking for parallel support" >&5; +echo "configure:2513: checking for parallel support" >&5; case "X-$PARALLEL" in @@ -2292,7 +2534,7 @@ EOF CFLAGS="$CFLAGS $MPI_LIB" RUNTEST="$RUNTEST" echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:2296: checking for main in -lmpi" >&5 +echo "configure:2538: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2300,14 +2542,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2334,7 +2576,7 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for main in -lmpio""... $ac_c" 1>&6 -echo "configure:2338: checking for main in -lmpio" >&5 +echo "configure:2580: checking for main in -lmpio" >&5 ac_lib_var=`echo mpio'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2342,14 +2584,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpio $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else diff --git a/configure.in b/configure.in index c6d7542..4128971 100644 --- a/configure.in +++ b/configure.in @@ -174,11 +174,46 @@ case $HSIZET in ;; esac +dnl ---------------------------------------------------------------------- +dnl How does one figure out the local time zone? Anyone know of a +dnl Posix way to do this? +dnl + +dnl First check if `struct tm' has a `tm_gmtoff' member. +AC_MSG_CHECKING(for tm_gmtoff in struct tm) +AC_TRY_COMPILE([ +#include +#include ],[struct tm tm; tm.tm_gmtoff=0;], +AC_DEFINE(HAVE_TM_GMTOFF) +AC_MSG_RESULT(yes), +AC_MSG_RESULT(no)) + +dnl Check whether the global variable `timezone' is defined. +AC_MSG_CHECKING(for global timezone variable) +AC_TRY_LINK([ +#include +#include ], [timezone=0;], +AC_DEFINE(HAVE_TIMEZONE) +AC_MSG_RESULT(yes), +AC_MSG_RESULT(no)) + +dnl Check whether `struct timezone' is defined. +AC_STRUCT_TIMEZONE +AC_MSG_CHECKING(for struct timezone) +AC_TRY_COMPILE([ +#include +#include +#include ],[struct timezone tz; tz.tz_minuteswest=0;], +AC_DEFINE(HAVE_STRUCT_TIMEZONE) +AC_MSG_RESULT(yes), +AC_MSG_RESULT(no)) + dnl ---------------------------------------------------------------------- dnl Check for functions. dnl AC_CHECK_FUNCS(getpwuid gethostname system getrusage fork waitpid) +AC_CHECK_FUNCS(gettimeofday BSDgettimeofday) AC_TRY_COMPILE([#include], [off64_t n = 0;], diff --git a/doc/html/H5.format.html b/doc/html/H5.format.html index 3dd2bc5..7813856 100644 --- a/doc/html/H5.format.html +++ b/doc/html/H5.format.html @@ -2716,8 +2716,6 @@ associated with any type of object which has an object header (groups, datasets, named types and spaces, etc.). -

Format of Data: -

@@ -2838,36 +2836,153 @@

Name: Object Name

- Type: 0x000D
- Length: varies
- Status: Optional [required?], may not be repeated.
- Purpose and Description: The object name is designed to be a short - description of the instance of the data object (the class may be a short - description of the "type" of the object). An object name is a sequence of - non-zero ('\0') ASCII characters with no other formatting included by the - library.
- Format of Data:The data for the object name is just a sequence of ASCII - characters with no special formatting. + +

Type: 0x000D
+ Length: varies
+ Status: Optional, may not be repeated. + +

Purpose and Description: The object name or comment is + designed to be a short description of an object. An object name + is a sequence of non-zero ('\0') ASCII characters with no other + formatting included by the library. + +

+

+
+ + + + + + + + + + + + +
+ Name Message +
bytebytebytebyte

Name

+
+ +

+

+ + + + + + + + + + +
Field NameDescription
NameA null terminated ASCII character string.
+

-

Name: Object Modification Date & Time

- Type: 0x000E
- Length: fixed
- Status: Required?, may not be repeated.
- Purpose and Description: The object modification date and time is a - timestamp which indicates (using ISO8601 date and time format) the last - modification of a data object.
- Format of Data: - The date is represented as a fixed length ASCII string according to the - "complete calendar date representation, without hyphens" listed in the ISO8601 - standard.
- The time of day is represented as a fixed length ASCII string according - to the "complete local time of day representation, without hyphens" - listed in the ISO8601 standard. - -

Examples:

- "February 14, 1993, 1:10pm and 30 seconds" is represented as "19930214131030" in - the ISO standard format. +

Name: Object Modification Date & + Time

+ +

Type: 0x000E
+ Length: fixed
+ Status: Optional, may not be repeated. + +

Purpose and Description: The object modification date + and time is a timestamp which indicates (using ISO-8601 date and + time format) the last modification of an object. The time is + updated when any object header message changes according to the + system clock where the change was posted. + +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Modification Time Message +
bytebytebytebyte
Year
MonthDay of Month
HourMinute
SecondReserved
+
+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field NameDescription
YearThe four-digit year as an ASCII string. For example, + "1998". All fields of this message should be interpreted + as coordinated universal time (UTC)
MonthThe month number as a two digit ASCII string where + January is "01" and December is "12".
Day of MonthThe day number within the month as a two digit ASCII + string. The first day of the month is "01".
HourThe hour of the day as a two digit ASCII string where + midnight is "00" and 11:00pm is "23".
MinuteThe minute of the hour as a two digit ASCII string where + the first minute of the hour is "00" and the last is + "59".
SecondThe second of the minute as a two digit ASCII string + where the first second of the minute is "00" and the last + is "59".
ReservedThis field is reserved and should always be zero.
+

Name: Shared Object Message

@@ -3140,7 +3255,7 @@ data-type.
Quincey Koziol
Robb Matzke
-Last modified: Mon Jul 20 13:49:08 EDT 1998 +Last modified: Fri Jul 24 15:10:57 EDT 1998 diff --git a/src/.distdep b/src/.distdep index 3e0c443..c8e7e52 100644 --- a/src/.distdep +++ b/src/.distdep @@ -1,64 +1,3 @@ -H5.o: \ - H5.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Ipublic.h \ - H5Dpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Iprivate.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h \ - H5Ppublic.h \ - H5Zpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h -H5A.o: \ - H5A.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Dprivate.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h H5AC.o: \ H5AC.c \ H5private.h \ @@ -84,101 +23,6 @@ H5B.o: \ H5Bpublic.h \ H5Eprivate.h \ H5Epublic.h -H5D.o: \ - H5D.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Dprivate.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5HLprivate.h \ - H5HLpublic.h \ - H5MFprivate.h \ - H5MFpublic.h \ - H5MMprivate.h \ - H5MMpublic.h -H5E.o: \ - H5E.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h -H5F.o: \ - H5F.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h \ - H5Ppublic.h \ - H5Zpublic.h \ - H5Tprivate.h \ - H5Tpublic.h -H5Farray.o: \ - H5Farray.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Dprivate.h \ - H5Dpublic.h \ - H5Ipublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h H5Fcore.o: \ H5Fcore.c \ H5private.h \ @@ -199,49 +43,6 @@ H5Ffamily.o: \ H5Ipublic.h \ H5Fprivate.h \ H5Fpublic.h -H5Fistore.o: \ - H5Fistore.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Dprivate.h \ - H5Dpublic.h \ - H5Ipublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MFprivate.h \ - H5MFpublic.h \ - H5MMprivate.h \ - H5MMpublic.h -H5Flow.o: \ - H5Flow.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5MMprivate.h \ - H5MMpublic.h H5Fmpio.o: \ H5Fmpio.c \ H5private.h \ @@ -283,16 +84,6 @@ H5Fsec2.o: \ H5Dpublic.h \ H5MMprivate.h \ H5MMpublic.h -H5Fsplit.o: \ - H5Fsplit.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ - H5Fprivate.h \ - H5Fpublic.h H5Fstdio.o: \ H5Fstdio.c \ H5private.h \ @@ -306,56 +97,6 @@ H5Fstdio.o: \ H5Dpublic.h \ H5MMprivate.h \ H5MMpublic.h -H5G.o: \ - H5G.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Ipublic.h \ - H5Dpublic.h \ - H5Dprivate.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Gpkg.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5HLprivate.h -H5Gent.o: \ - H5Gent.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ - H5Gpkg.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5HLprivate.h \ - H5HLpublic.h H5Gnode.o: \ H5Gnode.c \ H5private.h \ @@ -416,21 +157,6 @@ H5Gstab.o: \ H5Tpublic.h \ H5Sprivate.h \ H5Spublic.h -H5HG.o: \ - H5HG.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Ipublic.h \ - H5Dpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5HGprivate.h \ - H5HGpublic.h H5HL.o: \ H5HL.c \ H5private.h \ @@ -476,20 +202,117 @@ H5O.o: \ H5private.h \ H5public.h \ H5config.h \ - H5ACprivate.h \ - H5ACpublic.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5MFprivate.h \ + H5MFpublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h +H5Ocomp.o: \ + H5Ocomp.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h +H5Ocont.o: \ + H5Ocont.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h +H5Oname.o: \ + H5Oname.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h +H5Onull.o: \ + H5Onull.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Oprivate.h \ + H5Opublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Ipublic.h \ H5Dpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MFprivate.h \ - H5MFpublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ @@ -498,11 +321,9 @@ H5O.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h -H5Oattr.o: \ - H5Oattr.c \ + H5Sprivate.h +H5Ostab.o: \ + H5Ostab.c \ H5private.h \ H5public.h \ H5config.h \ @@ -526,56 +347,152 @@ H5Oattr.o: \ H5Tpublic.h \ H5Sprivate.h \ H5Spublic.h -H5Ocomp.o: \ - H5Ocomp.c \ +H5Tbit.o: \ + H5Tbit.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ + H5Iprivate.h \ + H5Tpkg.h \ + H5HGprivate.h \ + H5HGpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ H5Gprivate.h \ H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ + H5Bprivate.h +H5Tconv.o: \ + H5Tconv.c \ + H5Iprivate.h \ + H5Ipublic.h \ + H5public.h \ + H5config.h \ + H5private.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Tpkg.h \ H5HGprivate.h \ H5HGpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h -H5Ocont.o: \ - H5Ocont.c \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h +H5Flow.o: \ + H5Flow.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5MMprivate.h \ + H5MMpublic.h +H5Fsplit.o: \ + H5Fsplit.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Fprivate.h \ + H5Fpublic.h +H5Gent.o: \ + H5Gent.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Gpkg.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5HLprivate.h \ + H5HLpublic.h +H5HG.o: \ + H5HG.c \ H5private.h \ H5public.h \ H5config.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ H5Eprivate.h \ H5Epublic.h \ + H5HGprivate.h \ + H5HGpublic.h +H5Tinit.o: \ + H5Tinit.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ H5Ipublic.h \ + H5Eprivate.h \ + H5Epublic.h \ H5MMprivate.h \ H5MMpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ + H5Tpkg.h \ + H5HGprivate.h \ + H5HGpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Gprivate.h +H5Farray.o: \ + H5Farray.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Dprivate.h \ + H5Dpublic.h \ + H5Ipublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ H5Sprivate.h \ - H5Spublic.h + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h H5Odtype.o: \ H5Odtype.c \ H5private.h \ @@ -651,51 +568,6 @@ H5Olayout.o: \ H5Zprivate.h \ H5Zpublic.h \ H5Eprivate.h -H5Oname.o: \ - H5Oname.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h -H5Onull.o: \ - H5Onull.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Ipublic.h \ - H5Dpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h H5Osdspace.o: \ H5Osdspace.c \ H5private.h \ @@ -746,23 +618,30 @@ H5Oshared.o: \ H5Tpublic.h \ H5Sprivate.h \ H5Spublic.h -H5Ostab.o: \ - H5Ostab.c \ +H5E.o: \ + H5E.c \ H5private.h \ H5public.h \ H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ H5Eprivate.h \ H5Epublic.h \ + H5MMprivate.h +H5Fistore.o: \ + H5Fistore.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Dprivate.h \ + H5Dpublic.h \ H5Ipublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ @@ -770,22 +649,32 @@ H5Ostab.o: \ H5Tprivate.h \ H5Tpublic.h \ H5Sprivate.h \ - H5Spublic.h -H5P.o: \ - H5P.c \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5MFprivate.h \ + H5MFpublic.h \ + H5MMprivate.h \ + H5MMpublic.h +H5Oattr.o: \ + H5Oattr.c \ H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ + H5Eprivate.h \ + H5Epublic.h \ H5Ipublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ - H5Dprivate.h \ - H5Gprivate.h \ - H5Gpublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ @@ -793,23 +682,15 @@ H5P.o: \ H5Tprivate.h \ H5Tpublic.h \ H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h -H5S.o: \ - H5S.c \ + H5Spublic.h +H5Z.o: \ + H5Z.c \ H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ H5Eprivate.h \ H5Epublic.h \ + H5Ipublic.h \ H5MMprivate.h \ H5MMpublic.h \ H5Oprivate.h \ @@ -825,7 +706,10 @@ H5S.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h H5Sall.o: \ H5Sall.c \ H5private.h \ @@ -851,8 +735,8 @@ H5Sall.o: \ H5Tpublic.h \ H5Zprivate.h \ H5Zpublic.h -H5Shyper.o: \ - H5Shyper.c \ +H5Ssimp.o: \ + H5Ssimp.c \ H5private.h \ H5public.h \ H5config.h \ @@ -876,70 +760,126 @@ H5Shyper.o: \ H5Tpublic.h \ H5Zprivate.h \ H5Zpublic.h -H5Spoint.o: \ - H5Spoint.c \ +H5T.o: \ + H5T.c \ H5private.h \ H5public.h \ H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ + H5Dprivate.h \ + H5Dpublic.h \ H5Ipublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h -H5Ssimp.o: \ - H5Ssimp.c \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Iprivate.h +H5V.o: \ + H5V.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5Sprivate.h \ - H5Spublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h +H5.o: \ + H5.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5ACprivate.h \ + H5ACpublic.h \ H5Fprivate.h \ H5Fpublic.h \ + H5Ipublic.h \ H5Dpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Iprivate.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Pprivate.h \ + H5Ppublic.h \ + H5Zpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Zprivate.h \ - H5Zpublic.h -H5T.o: \ - H5T.c \ + H5Tpublic.h +H5F.o: \ + H5F.c \ H5private.h \ H5public.h \ H5config.h \ - H5Dprivate.h \ - H5Dpublic.h \ + H5Iprivate.h \ H5Ipublic.h \ + H5ACprivate.h \ + H5ACpublic.h \ H5Fprivate.h \ H5Fpublic.h \ + H5Dpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Pprivate.h \ + H5Ppublic.h \ + H5Zpublic.h \ + H5Tprivate.h \ + H5Tpublic.h +H5G.o: \ + H5G.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ + H5Dprivate.h \ + H5Gprivate.h \ + H5Gpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ @@ -950,70 +890,92 @@ H5T.o: \ H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Iprivate.h -H5Tbit.o: \ - H5Tbit.c \ + H5Eprivate.h \ + H5Epublic.h \ + H5Gpkg.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5HLprivate.h +H5P.o: \ + H5P.c \ H5private.h \ H5public.h \ H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ H5Iprivate.h \ - H5Tpkg.h \ - H5HGprivate.h \ - H5HGpublic.h \ + H5Ipublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ + H5Dprivate.h \ H5Gprivate.h \ H5Gpublic.h \ - H5Bprivate.h -H5Tconv.o: \ - H5Tconv.c \ - H5Iprivate.h \ - H5Ipublic.h \ - H5public.h \ - H5config.h \ - H5private.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ H5Eprivate.h \ H5Epublic.h \ H5MMprivate.h \ H5MMpublic.h \ - H5Tpkg.h \ - H5HGprivate.h \ - H5HGpublic.h \ + H5Pprivate.h +H5Shyper.o: \ + H5Shyper.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h -H5Tinit.o: \ - H5Tinit.c \ + H5Zprivate.h \ + H5Zpublic.h +H5Spoint.o: \ + H5Spoint.c \ H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ H5Eprivate.h \ H5Epublic.h \ + H5Ipublic.h \ H5MMprivate.h \ H5MMpublic.h \ - H5Tpkg.h \ - H5HGprivate.h \ - H5HGpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Gprivate.h + H5Tpublic.h H5TB.o: \ H5TB.c \ H5private.h \ @@ -1024,23 +986,23 @@ H5TB.o: \ H5Eprivate.h \ H5Epublic.h \ H5MMprivate.h -H5V.o: \ - H5V.c \ +H5A.o: \ + H5A.c \ H5private.h \ H5public.h \ H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ + H5Iprivate.h \ H5Ipublic.h \ - H5Oprivate.h \ - H5Opublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ + H5Dprivate.h \ H5Gprivate.h \ H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ @@ -1048,15 +1010,21 @@ H5V.o: \ H5Sprivate.h \ H5Spublic.h \ H5Zprivate.h \ - H5Zpublic.h -H5Z.o: \ - H5Z.c \ + H5Zpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Pprivate.h +H5S.o: \ + H5S.c \ H5private.h \ H5public.h \ H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ H5Eprivate.h \ H5Epublic.h \ - H5Ipublic.h \ H5MMprivate.h \ H5MMpublic.h \ H5Oprivate.h \ @@ -1072,10 +1040,7 @@ H5Z.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h + H5Sprivate.h H5Sselect.o: \ H5Sselect.c \ H5private.h \ @@ -1101,3 +1066,26 @@ H5Sselect.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h +H5Omtime.o: \ + H5Omtime.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h diff --git a/src/H5D.c b/src/H5D.c index a6621af..1a88560 100644 --- a/src/H5D.c +++ b/src/H5D.c @@ -753,7 +753,8 @@ H5Dextend (hid_t dset_id, const hsize_t *size) * Errors: * DATASET CANTINIT Can't update dataset header. * DATASET CANTINIT Problem with the dataset name. - * DATASET CANTINIT Fail in file space allocation for chunks"); + * DATASET CANTINIT Fail in file space allocation for + * chunks * * Programmer: Robb Matzke * Thursday, December 4, 1997 @@ -762,6 +763,9 @@ H5Dextend (hid_t dset_id, const hsize_t *size) * Robb Matzke, 9 Jun 1998 * The data space message is no longer cached in the dataset struct. * + * Robb Matzke, 27 Jul 1998 + * Added the MTIME message to the dataset object header. + * *------------------------------------------------------------------------- */ H5D_t * @@ -896,6 +900,14 @@ H5D_create(H5G_t *loc, const char *name, const H5T_t *type, const H5S_t *space, HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, NULL, "unable to update compression header message"); } + + /* + * Add a modification time message. + */ + if (H5O_touch(&(new_dset->ent), TRUE)<0) { + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, + "unable to update modification time message"); + } /* * Initialize storage. We assume that external storage is already @@ -1597,6 +1609,11 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, HDmemset(&bkg_iter,0,sizeof(H5S_sel_iter_t)); HDmemset(&file_iter,0,sizeof(H5S_sel_iter_t)); + if (0==(dataset->ent.file->intent & H5F_ACC_RDWR)) { + HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, + "no write intent on file"); + } + if (!file_space) { if (NULL==(free_this_space=H5S_read (&(dataset->ent)))) { HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, FAIL, @@ -1849,6 +1866,14 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, } } + /* + * Update modification time. We have to do this explicitly because + * writing to a dataset doesn't necessarily change the object header. + */ + if (H5O_touch(&(dataset->ent), FALSE)<0) { + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, + "unable to update modification time"); + } succeed: ret_value = SUCCEED; diff --git a/src/H5G.c b/src/H5G.c index c875814..75ce590 100644 --- a/src/H5G.c +++ b/src/H5G.c @@ -1982,10 +1982,16 @@ H5G_stat (H5G_t *loc, const char *name, hbool_t follow_link, if (statbuf) { if (H5G_CACHED_SLINK!=obj_ent.type) { statbuf->objno[0] = (unsigned long)(obj_ent.header.offset); - statbuf->objno[1] = (unsigned long)(obj_ent.header.offset >> - 8*sizeof(long)); + if (sizeof(obj_ent.header.offset)>sizeof(long)) { + statbuf->objno[1] = (unsigned long)(obj_ent.header.offset >> + 8*sizeof(long)); + } statbuf->nlink = H5O_link (&obj_ent, 0); statbuf->type = H5G_LINK; + if (NULL==H5O_read(&obj_ent, H5O_MTIME, 0, &(statbuf->mtime))) { + H5E_clear(); + statbuf->mtime = 0; + } } else { if (NULL==H5O_read (&grp_ent, H5O_STAB, 0, &stab_mesg) || NULL==(s=H5HL_peek (grp_ent.file, &(stab_mesg.heap_addr), diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h index 217ad7e..f4de521 100644 --- a/src/H5Gpublic.h +++ b/src/H5Gpublic.h @@ -42,11 +42,12 @@ typedef enum H5G_link_t { /* Information about an object */ typedef struct H5G_stat_t { - unsigned long fileno[2]; - unsigned long objno[2]; - unsigned nlink; - int type; - size_t linklen; + unsigned long fileno[2]; /*file number */ + unsigned long objno[2]; /*object number */ + unsigned nlink; /*number of hard links to object*/ + int type; /*basic object type */ + time_t mtime; /*modification time */ + size_t linklen; /*symbolic link value length */ } H5G_stat_t; diff --git a/src/H5O.c b/src/H5O.c index dde5917..c3bb495 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -35,6 +35,7 @@ static intn H5O_alloc(H5F_t *f, H5O_t *oh, const H5O_class_t *type, size_t size); static intn H5O_alloc_extend_chunk(H5O_t *oh, intn chunkno, size_t size); static intn H5O_alloc_new_chunk(H5F_t *f, H5O_t *oh, size_t size); +static herr_t H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force); /* H5O inherits cache-like properties from H5AC */ static const H5AC_class_t H5AC_OHDR[1] = {{ @@ -64,7 +65,7 @@ static const H5O_class_t *const message_type_g[] = { H5O_COMPRESS, /*0x000B Data storage -- compressed object */ H5O_ATTR, /*0x000C Attribute list */ H5O_NAME, /*0x000D Object name */ - NULL, /*0x000E Object modification date and time */ + H5O_MTIME, /*0x000E Object modification date and time */ NULL, /*0x000F Shared header message */ H5O_CONT, /*0x0010 Object header continuation */ H5O_STAB, /*0x0011 Symbol table */ @@ -1235,6 +1236,9 @@ H5O_modify(H5G_entry_t *ent, const H5O_class_t *type, intn overwrite, "unable to copy message to object header"); } } + + /* Update the modification time message if any */ + H5O_touch_oh(ent->file, oh, FALSE); oh->mesg[idx].flags = flags; oh->mesg[idx].dirty = TRUE; @@ -1252,6 +1256,126 @@ H5O_modify(H5G_entry_t *ent, const H5O_class_t *type, intn overwrite, /*------------------------------------------------------------------------- + * Function: H5O_touch_oh + * + * Purpose: If FORCE is non-zero then create a modification time message + * unless one already exists. Then update any existing + * modification time message with the current time. + * + * Return: Success: SUCCEED + * + * Failure: FAIL + * + * Programmer: Robb Matzke + * Monday, July 27, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static herr_t +H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force) +{ + intn idx; + time_t now = time(NULL); + size_t size; + + FUNC_ENTER(H5O_touch_oh, FAIL); + assert(oh); + + /* Look for existing message */ + for (idx=0; idxnmesgs; idx++) { + if (H5O_MTIME==oh->mesg[idx].type) break; + } + + /* Create a new message */ + if (idx==oh->nmesgs) { + if (!force) HRETURN(SUCCEED); /*nothing to do*/ + size = (H5O_MTIME->raw_size)(f, &now); + size = H5O_ALIGN(size); + if ((idx=H5O_alloc(f, oh, H5O_MTIME, size))<0) { + HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, + "unable to allocate space for modification time " + "message"); + } + } + + /* Update the native part */ + if (NULL==oh->mesg[idx].native) { + if (NULL==(oh->mesg[idx].native = H5MM_malloc(sizeof(time_t)))) { + HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, + "memory allocation failed for modification time " + "message"); + } + } + *((time_t*)(oh->mesg[idx].native)) = now; + oh->mesg[idx].dirty = TRUE; + oh->dirty = TRUE; + + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5O_touch + * + * Purpose: Touch an object by setting the modification time to the + * current time and marking the object as dirty. Unless FORCE + * is non-zero, nothing happens if there is no MTIME message in + * the object header. + * + * Return: Success: SUCCEED + * + * Failure: FAIL + * + * Programmer: Robb Matzke + * Monday, July 27, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5O_touch(H5G_entry_t *ent, hbool_t force) +{ + H5O_t *oh = NULL; + herr_t ret_value = FAIL; + + FUNC_ENTER(H5O_touch, FAIL); + + /* check args */ + assert(ent); + assert(ent->file); + assert(H5F_addr_defined(&(ent->header))); + if (0==(ent->file->intent & H5F_ACC_RDWR)) { + HGOTO_ERROR(H5E_OHDR, H5E_WRITEERROR, FAIL, + "no write intent on file"); + } + + /* Get the object header */ + if (NULL==(oh=H5AC_protect(ent->file, H5AC_OHDR, &(ent->header), + NULL, NULL))) { + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, + "unable to load object header"); + } + + /* Create/Update the modification time message */ + if (H5O_touch_oh(ent->file, oh, force)<0) { + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, + "unable to update object modificaton time"); + } + ret_value = SUCCEED; + + done: + if (oh && H5AC_unprotect(ent->file, H5AC_OHDR, &(ent->header), oh)<0) { + HRETURN_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, + "unable to release object header"); + } + FUNC_LEAVE(ret_value); +} + + +/*------------------------------------------------------------------------- * Function: H5O_remove * * Purpose: Removes the specified message from the object header. @@ -1347,6 +1471,7 @@ H5O_remove(H5G_entry_t *ent, const H5O_class_t *type, intn sequence) oh->mesg[i].native = H5O_free (type, oh->mesg[i].native); oh->mesg[i].dirty = TRUE; oh->dirty = TRUE; + H5O_touch_oh(ent->file, oh, FALSE); } } @@ -1789,6 +1914,7 @@ H5O_alloc(H5F_t *f, H5O_t *oh, const H5O_class_t *type, size_t size) oh->mesg[null_idx].chunkno = oh->mesg[idx].chunkno; oh->mesg[idx].raw_size = size; } + /* initialize the new message */ oh->mesg[idx].type = type; oh->mesg[idx].dirty = TRUE; @@ -1996,16 +2122,17 @@ H5O_debug(H5F_t *f, const haddr_t *addr, FILE * stream, intn indent, } /* decode the message */ - if (NULL == oh->mesg[i].native && oh->mesg[i].type->decode) { - if (oh->mesg[i].flags & H5O_FLAG_SHARED) { - decode = H5O_SHARED->decode; - debug = H5O_SHARED->debug; - } else { - decode = oh->mesg[i].type->decode; - debug = oh->mesg[i].type->debug; - } - oh->mesg[i].native = (decode)(f, oh->mesg[i].raw, NULL); + if (oh->mesg[i].flags & H5O_FLAG_SHARED) { + decode = H5O_SHARED->decode; + debug = H5O_SHARED->debug; } else { + decode = oh->mesg[i].type->decode; + debug = oh->mesg[i].type->debug; + } + if (NULL==oh->mesg[i].native && oh->mesg[i].type->decode) { + oh->mesg[i].native = (decode)(f, oh->mesg[i].raw, NULL); + } + if (NULL==oh->mesg[i].native) { debug = NULL; } diff --git a/src/H5Omtime.c b/src/H5Omtime.c new file mode 100644 index 0000000..ae85abb --- /dev/null +++ b/src/H5Omtime.c @@ -0,0 +1,316 @@ +/* + * Copyright © 1998 NCSA + * All rights reserved. + * + * Programmer: Robb Matzke + * Friday, July 24, 1998 + * + * Purpose: The object modification time message. + */ +#include +#include +#include +#include + +#define PABLO_MASK H5O_mtime_mask + +static void *H5O_mtime_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh); +static herr_t H5O_mtime_encode(H5F_t *f, uint8 *p, const void *_mesg); +static void *H5O_mtime_copy(const void *_mesg, void *_dest); +static size_t H5O_mtime_size(H5F_t *f, const void *_mesg); +static herr_t H5O_mtime_debug(H5F_t *f, const void *_mesg, FILE * stream, + intn indent, intn fwidth); + +/* This message derives from H5O */ +const H5O_class_t H5O_MTIME[1] = {{ + H5O_MTIME_ID, /*message id number */ + "mtime", /*message name for debugging */ + sizeof(time_t), /*native message size */ + H5O_mtime_decode, /*decode message */ + H5O_mtime_encode, /*encode message */ + H5O_mtime_copy, /*copy the native value */ + H5O_mtime_size, /*raw message size */ + NULL, /*free internal memory */ + NULL, /*get share method */ + NULL, /*set share method */ + H5O_mtime_debug, /*debug the message */ +}}; + +/* Interface initialization */ +static hbool_t interface_initialize_g = FALSE; +#define INTERFACE_INIT NULL + + +/*------------------------------------------------------------------------- + * Function: H5O_mtime_decode + * + * Purpose: Decode a modification time message and return a pointer to a + * new time_t value. + * + * Return: Success: Ptr to new message in native struct. + * + * Failure: NULL + * + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 24 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static void * +H5O_mtime_decode(H5F_t __unused__ *f, const uint8 *p, + H5O_shared_t __unused__ *sh) +{ + time_t *mesg, the_time; + intn i; + struct tm tm; + static int ncalls=0; + + FUNC_ENTER(H5O_mtime_decode, NULL); + + /* check args */ + assert(f); + assert(p); + assert (!sh); + + /* Initialize time zone information */ + if (0==ncalls++) tzset(); + + /* decode */ + for (i=0; i<14; i++) { + if (!isdigit(p[i])) { + HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, + "badly formatted modification time message"); + } + } + + /* + * Convert YYYYMMDDhhmmss UTC to a time_t. This is a little problematic + * because mktime() operates on local times. We convert to local time + * and then figure out the adjustment based on the local time zone and + * daylight savings setting. + */ + memset(&tm, 0, sizeof tm); + tm.tm_year = (p[0]-'0')*1000 + (p[1]-'0')*100 + + (p[2]-'0')*10 + (p[3]-'0') - 1900; + tm.tm_mon = (p[4]-'0')*10 + (p[5]-'0') - 1; + tm.tm_mday = (p[6]-'0')*10 + (p[7]-'0'); + tm.tm_hour = (p[8]-'0')*10 + (p[9]-'0'); + tm.tm_min = (p[10]-'0')*10 + (p[11]-'0'); + tm.tm_sec = (p[12]-'0')*10 + (p[13]-'0'); + tm.tm_isdst = -1; /*figure it out*/ + if ((time_t)-1==(the_time=mktime(&tm))) { + HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, + "badly formatted modification time message"); + } + +#if defined(HAVE_TM_GMTOFF) + /* FreeBSD, OSF 4.0 */ + the_time += tm.tm_gmtoff; +#elif defined(HAVE_TIMEZONE) + /* Linux */ + the_time -= timezone - (tm.tm_isdst?3600:0); +#elif defined(HAVE_BSDGETTIMEOFDAY) && defined(HAVE_STRUCT_TIMEZONE) + /* Irix5.3 */ + { + struct timezone tz; + if (BSDgettimeofday(NULL, &tz)<0) { + HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, + "unable to obtain local timezone information"); + } + the_time -= tz.tz_minuteswest*60 - (tm.tm_idst?3600:0); + } +#elif defined(HAVE_GETTIMEOFDAY) && defined(HAVE_STRUCT_TIMEZONE) + { + struct timezone tz; + if (gettimeofday(NULL, &tz)<0) { + HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, + "unable to obtain local timezone information"); + } + the_time -= tz.tz_minuteswest*60 - (tm.tm_isdst?3600:0); + } +#else + /* + * The catch-all. If we can't convert a character string universal + * coordinated time to a time_t value reliably then we can't decode the + * modification time message. This really isn't as bad as it sounds -- + * the only way a user can get the modification time is from H5Gstat() + * and H5G_stat() can gracefully recover. + */ + + /* Irix64 */ + HRETURN_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, + "unable to obtain local timezone information"); +#endif + + /* The return value */ + if (NULL==(mesg = H5MM_calloc(sizeof(time_t)))) { + HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, + "memory allocation failed"); + } + *mesg = the_time; + + FUNC_LEAVE((void*)mesg); +} + + +/*------------------------------------------------------------------------- + * Function: H5O_mtime_encode + * + * Purpose: Encodes a modification time message. + * + * Return: Success: SUCCEED + * + * Failure: FAIL + * + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 24 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static herr_t +H5O_mtime_encode(H5F_t __unused__ *f, uint8 *p, const void *_mesg) +{ + const time_t *mesg = (const time_t *) _mesg; + struct tm *tm; + + + FUNC_ENTER(H5O_mtime_encode, FAIL); + + /* check args */ + assert(f); + assert(p); + assert(mesg); + + /* encode */ + tm = gmtime(mesg); + sprintf(p, "%04d%02d%02d%02d%02d%02d", + 1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday, + tm->tm_hour, tm->tm_min, tm->tm_sec); + + FUNC_LEAVE(SUCCEED); +} + + +/*------------------------------------------------------------------------- + * Function: H5O_mtime_copy + * + * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if + * necessary. + * + * Return: Success: Ptr to _DEST + * + * Failure: NULL + * + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 24 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static void * +H5O_mtime_copy(const void *_mesg, void *_dest) +{ + const time_t *mesg = (const time_t *) _mesg; + time_t *dest = (time_t *) _dest; + + FUNC_ENTER(H5O_mtime_copy, NULL); + + /* check args */ + assert(mesg); + if (!dest && NULL==(dest = H5MM_calloc(sizeof(time_t)))) { + HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, + "memory allocation failed"); + } + + /* copy */ + *dest = *mesg; + + FUNC_LEAVE((void *) dest); +} + +/*------------------------------------------------------------------------- + * Function: H5O_mtime_size + * + * Purpose: Returns the size of the raw message in bytes not + * counting the message type or size fields, but only the data + * fields. This function doesn't take into account + * alignment. + * + * Return: Success: Message data size in bytes w/o alignment. + * + * Failure: FAIL + * + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 14 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static size_t +H5O_mtime_size(H5F_t __unused__ *f, const void __unused__ *mesg) +{ + FUNC_ENTER(H5O_mtime_size, 0); + + /* check args */ + assert(f); + assert(mesg); + + FUNC_LEAVE(16); +} + + +/*------------------------------------------------------------------------- + * Function: H5O_mtime_debug + * + * Purpose: Prints debugging info for the message. + * + * Return: Success: SUCCEED + * + * Failure: FAIL + * + * Programmer: Robb Matzke + * matzke@llnl.gov + * Jul 24 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static herr_t +H5O_mtime_debug(H5F_t __unused__ *f, const void *_mesg, FILE *stream, + intn indent, intn fwidth) +{ + const time_t *mesg = (const time_t *)_mesg; + struct tm *tm; + char buf[128]; + + FUNC_ENTER(H5O_mtime_debug, FAIL); + + /* check args */ + assert(f); + assert(mesg); + assert(stream); + assert(indent >= 0); + assert(fwidth >= 0); + + /* debug */ + tm = localtime(mesg); + + + strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %z", tm); + fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, + "Time:", buf); + + FUNC_LEAVE(SUCCEED); +} + diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index 7f6cabb..92ba11a 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -200,6 +200,12 @@ typedef struct H5O_name_t { } H5O_name_t; /* + * Modification time message. The message is just a `time_t'. + */ +#define H5O_MTIME_ID 0x000e +extern const H5O_class_t H5O_MTIME[1]; + +/* * Shared object message. This message ID never really appears in an object * header. Instead, bit 2 of the `Flags' field will be set and the ID field * will be the ID of the pointed-to message. @@ -253,6 +259,7 @@ void *H5O_read (H5G_entry_t *ent, const H5O_class_t *type, intn sequence, void *mesg); intn H5O_modify (H5G_entry_t *ent, const H5O_class_t *type, intn overwrite, uintn flags, const void *mesg); +herr_t H5O_touch(H5G_entry_t *ent, hbool_t force); herr_t H5O_remove (H5G_entry_t *ent, const H5O_class_t *type, intn sequence); herr_t H5O_reset (const H5O_class_t *type, void *native); void *H5O_free (const H5O_class_t *type, void *mesg); diff --git a/src/H5T.c b/src/H5T.c index bf0f03b..0d37c02 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -2639,8 +2639,8 @@ H5Tget_member_dims (hid_t type_id, int membno, /* Value */ ndims = dt->u.compnd.memb[membno].ndims; for (i = 0; i < ndims; i++) { - if (dims[i]) dims[i] = dt->u.compnd.memb[membno].dim[i]; - if (perm[i]) perm[i] = dt->u.compnd.memb[membno].perm[i]; + if (dims) dims[i] = dt->u.compnd.memb[membno].dim[i]; + if (perm) perm[i] = dt->u.compnd.memb[membno].perm[i]; } FUNC_LEAVE(ndims); @@ -2816,10 +2816,10 @@ H5Tinsert_array (hid_t parent_id, const char *name, size_t offset, if (!name || !*name) { HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no member name"); } - if (ndims<1 || ndims>4) { + if (ndims<0 || ndims>4) { HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid dimensionality"); } - if (!dim) { + if (ndims>0 && !dim) { HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no dimensions specified"); } for (i=0; i declares struct tm. */ +#undef TM_IN_SYS_TIME + /* Define if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN @@ -34,6 +44,15 @@ /* The width parameter for printf formats for type `long long', us. `ll' */ #undef PRINTF_LL_WIDTH +/* Define if `tm_gmtoff' is a member of `struct tm' */ +#undef HAVE_TM_GMTOFF + +/* Define if `timezone' is a global variable */ +#undef HAVE_TIMEZONE + +/* Define if `struct timezone' is defined */ +#undef HAVE_STRUCT_TIMEZONE + /* The number of bytes in a double. */ #undef SIZEOF_DOUBLE @@ -61,6 +80,9 @@ /* The number of bytes in a size_t. */ #undef SIZEOF_SIZE_T +/* Define if you have the BSDgettimeofday function. */ +#undef HAVE_BSDGETTIMEOFDAY + /* Define if you have the fork function. */ #undef HAVE_FORK @@ -76,6 +98,9 @@ /* Define if you have the getrusage function. */ #undef HAVE_GETRUSAGE +/* Define if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY + /* Define if you have the lseek64 function. */ #undef HAVE_LSEEK64 diff --git a/src/H5private.h b/src/H5private.h index 2dac272..7f26ff3 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -32,11 +32,14 @@ */ #ifdef STDC_HEADERS # include +# include # include # include # include # include +# include # include +# include # include #endif diff --git a/src/Makefile.in b/src/Makefile.in index 4eaebdd..681e285 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -18,9 +18,9 @@ LIB_SRC=H5.c H5A.c H5AC.c H5B.c H5D.c H5E.c H5F.c H5Farray.c H5Fcore.c \ H5Ffamily.c H5Fistore.c H5Flow.c H5Fmpio.c H5Fsec2.c H5Fsplit.c \ H5Fstdio.c H5G.c H5Gent.c H5Gnode.c H5Gstab.c H5HG.c H5HL.c H5I.c H5MF.c \ H5MM.c H5O.c H5Oattr.c H5Ocomp.c H5Ocont.c H5Odtype.c H5Oefl.c \ - H5Olayout.c H5Oname.c H5Onull.c H5Osdspace.c H5Oshared.c H5Ostab.c H5P.c \ - H5S.c H5Sall.c H5Shyper.c H5Spoint.c H5Ssimp.c H5Sselect.c H5T.c H5Tbit.c \ - H5Tconv.c H5Tinit.c H5TB.c H5V.c H5Z.c + H5Olayout.c H5Omtime.c H5Oname.c H5Onull.c H5Osdspace.c H5Oshared.c \ + H5Ostab.c H5P.c H5S.c H5Sall.c H5Shyper.c H5Spoint.c H5Ssimp.c \ + H5Sselect.c H5T.c H5Tbit.c H5Tconv.c H5Tinit.c H5TB.c H5V.c H5Z.c LIB_OBJ=$(LIB_SRC:.c=.o) diff --git a/test/.distdep b/test/.distdep index 767ca09..a98c168 100644 --- a/test/.distdep +++ b/test/.distdep @@ -1,33 +1,3 @@ -testhdf5.o: \ - testhdf5.c \ - testhdf5.h \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h -tattr.o: \ - tattr.c \ - testhdf5.h \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Eprivate.h \ - ../src/H5Epublic.h \ - ../src/H5Ipublic.h \ - ../src/hdf5.h \ - ../src/H5Apublic.h \ - ../src/H5ACpublic.h \ - ../src/H5Bpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Fpublic.h \ - ../src/H5Gpublic.h \ - ../src/H5HGpublic.h \ - ../src/H5HLpublic.h \ - ../src/H5MFpublic.h \ - ../src/H5MMpublic.h \ - ../src/H5Opublic.h \ - ../src/H5Ppublic.h \ - ../src/H5Zpublic.h \ - ../src/H5Spublic.h tfile.o: \ tfile.c \ testhdf5.h \ @@ -130,61 +100,6 @@ tstab.o: \ ../src/H5Tpublic.h \ ../src/H5Sprivate.h \ ../src/H5Spublic.h -th5s.o: \ - th5s.c \ - testhdf5.h \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Eprivate.h \ - ../src/H5Epublic.h \ - ../src/H5Ipublic.h \ - ../src/H5Bprivate.h \ - ../src/H5Bpublic.h \ - ../src/H5Fprivate.h \ - ../src/H5Fpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Sprivate.h \ - ../src/H5Spublic.h \ - ../src/H5Gprivate.h \ - ../src/H5Gpublic.h \ - ../src/H5Oprivate.h \ - ../src/H5Opublic.h \ - ../src/H5HGprivate.h \ - ../src/H5HGpublic.h \ - ../src/H5Tprivate.h \ - ../src/H5Tpublic.h \ - ../src/H5Zprivate.h \ - ../src/H5Zpublic.h \ - ../src/H5Pprivate.h -dtypes.o: \ - dtypes.c \ - ../src/hdf5.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Ipublic.h \ - ../src/H5Apublic.h \ - ../src/H5ACpublic.h \ - ../src/H5Bpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Epublic.h \ - ../src/H5Fpublic.h \ - ../src/H5Gpublic.h \ - ../src/H5HGpublic.h \ - ../src/H5HLpublic.h \ - ../src/H5MFpublic.h \ - ../src/H5MMpublic.h \ - ../src/H5Opublic.h \ - ../src/H5Ppublic.h \ - ../src/H5Zpublic.h \ - ../src/H5Spublic.h \ - ../src/H5Tpublic.h \ - ../src/H5Tpkg.h \ - ../src/H5HGprivate.h \ - ../src/H5Fprivate.h \ - ../src/H5private.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h hyperslab.o: \ hyperslab.c \ ../src/H5private.h \ @@ -216,8 +131,8 @@ istore.o: \ ../src/H5Tprivate.h \ ../src/H5Tpublic.h \ ../src/H5Sprivate.h -dsets.o: \ - dsets.c \ +extend.o: \ + extend.c \ ../src/hdf5.h \ ../src/H5public.h \ ../src/H5config.h \ @@ -236,10 +151,9 @@ dsets.o: \ ../src/H5Opublic.h \ ../src/H5Ppublic.h \ ../src/H5Zpublic.h \ - ../src/H5Spublic.h \ - ../src/H5Tpublic.h -cmpd_dset.o: \ - cmpd_dset.c \ + ../src/H5Spublic.h +external.o: \ + external.c \ ../src/hdf5.h \ ../src/H5public.h \ ../src/H5config.h \ @@ -258,9 +172,10 @@ cmpd_dset.o: \ ../src/H5Opublic.h \ ../src/H5Ppublic.h \ ../src/H5Zpublic.h \ - ../src/H5Spublic.h -extend.o: \ - extend.c \ + ../src/H5Spublic.h \ + ../src/H5Tpublic.h +iopipe.o: \ + iopipe.c \ ../src/hdf5.h \ ../src/H5public.h \ ../src/H5config.h \ @@ -279,9 +194,27 @@ extend.o: \ ../src/H5Opublic.h \ ../src/H5Ppublic.h \ ../src/H5Zpublic.h \ - ../src/H5Spublic.h -external.o: \ - external.c \ + ../src/H5Spublic.h \ + ../src/H5Tpublic.h +gheap.o: \ + gheap.c \ + ../src/H5private.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Eprivate.h \ + ../src/H5Epublic.h \ + ../src/H5Ipublic.h \ + ../src/H5Fprivate.h \ + ../src/H5Fpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Gprivate.h \ + ../src/H5Gpublic.h \ + ../src/H5Bprivate.h \ + ../src/H5Bpublic.h \ + ../src/H5HGprivate.h \ + ../src/H5HGpublic.h +shtype.o: \ + shtype.c \ ../src/hdf5.h \ ../src/H5public.h \ ../src/H5config.h \ @@ -300,10 +233,9 @@ external.o: \ ../src/H5Opublic.h \ ../src/H5Ppublic.h \ ../src/H5Zpublic.h \ - ../src/H5Spublic.h \ - ../src/H5Tpublic.h -iopipe.o: \ - iopipe.c \ + ../src/H5Spublic.h +links.o: \ + links.c \ ../src/hdf5.h \ ../src/H5public.h \ ../src/H5config.h \ @@ -324,25 +256,8 @@ iopipe.o: \ ../src/H5Zpublic.h \ ../src/H5Spublic.h \ ../src/H5Tpublic.h -gheap.o: \ - gheap.c \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Eprivate.h \ - ../src/H5Epublic.h \ - ../src/H5Ipublic.h \ - ../src/H5Fprivate.h \ - ../src/H5Fpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Gprivate.h \ - ../src/H5Gpublic.h \ - ../src/H5Bprivate.h \ - ../src/H5Bpublic.h \ - ../src/H5HGprivate.h \ - ../src/H5HGpublic.h -shtype.o: \ - shtype.c \ +chunk.o: \ + chunk.c \ ../src/hdf5.h \ ../src/H5public.h \ ../src/H5config.h \ @@ -361,7 +276,25 @@ shtype.o: \ ../src/H5Opublic.h \ ../src/H5Ppublic.h \ ../src/H5Zpublic.h \ - ../src/H5Spublic.h + ../src/H5Spublic.h \ + ../src/H5Tpublic.h +bittests.o: \ + bittests.c \ + ../src/H5Tpkg.h \ + ../src/H5HGprivate.h \ + ../src/H5HGpublic.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Fprivate.h \ + ../src/H5Fpublic.h \ + ../src/H5Ipublic.h \ + ../src/H5private.h \ + ../src/H5Dpublic.h \ + ../src/H5Tprivate.h \ + ../src/H5Tpublic.h \ + ../src/H5Gprivate.h \ + ../src/H5Gpublic.h \ + ../src/H5Bprivate.h big.o: \ big.c \ ../src/hdf5.h \ @@ -385,8 +318,14 @@ big.o: \ ../src/H5Spublic.h \ ../src/H5Tpublic.h \ ../src/H5private.h -links.o: \ - links.c \ +testhdf5.o: \ + testhdf5.c \ + testhdf5.h \ + ../src/H5private.h \ + ../src/H5public.h \ + ../src/H5config.h +dsets.o: \ + dsets.c \ ../src/hdf5.h \ ../src/H5public.h \ ../src/H5config.h \ @@ -407,8 +346,8 @@ links.o: \ ../src/H5Zpublic.h \ ../src/H5Spublic.h \ ../src/H5Tpublic.h -chunk.o: \ - chunk.c \ +dtypes.o: \ + dtypes.c \ ../src/hdf5.h \ ../src/H5public.h \ ../src/H5config.h \ @@ -428,24 +367,64 @@ chunk.o: \ ../src/H5Ppublic.h \ ../src/H5Zpublic.h \ ../src/H5Spublic.h \ - ../src/H5Tpublic.h -bittests.o: \ - bittests.c \ + ../src/H5Tpublic.h \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ - ../src/H5HGpublic.h \ + ../src/H5Fprivate.h \ + ../src/H5private.h \ + ../src/H5Tprivate.h \ + ../src/H5Gprivate.h +th5s.o: \ + th5s.c \ + testhdf5.h \ + ../src/H5private.h \ ../src/H5public.h \ ../src/H5config.h \ + ../src/H5Eprivate.h \ + ../src/H5Epublic.h \ + ../src/H5Ipublic.h \ + ../src/H5Bprivate.h \ + ../src/H5Bpublic.h \ ../src/H5Fprivate.h \ ../src/H5Fpublic.h \ - ../src/H5Ipublic.h \ - ../src/H5private.h \ ../src/H5Dpublic.h \ + ../src/H5Sprivate.h \ + ../src/H5Spublic.h \ + ../src/H5Gprivate.h \ + ../src/H5Gpublic.h \ + ../src/H5Oprivate.h \ + ../src/H5Opublic.h \ + ../src/H5HGprivate.h \ + ../src/H5HGpublic.h \ ../src/H5Tprivate.h \ ../src/H5Tpublic.h \ - ../src/H5Gprivate.h \ + ../src/H5Zprivate.h \ + ../src/H5Zpublic.h \ + ../src/H5Pprivate.h +tattr.o: \ + tattr.c \ + testhdf5.h \ + ../src/H5private.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Eprivate.h \ + ../src/H5Epublic.h \ + ../src/H5Ipublic.h \ + ../src/hdf5.h \ + ../src/H5Apublic.h \ + ../src/H5ACpublic.h \ + ../src/H5Bpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Fpublic.h \ ../src/H5Gpublic.h \ - ../src/H5Bprivate.h + ../src/H5HGpublic.h \ + ../src/H5HLpublic.h \ + ../src/H5MFpublic.h \ + ../src/H5MMpublic.h \ + ../src/H5Opublic.h \ + ../src/H5Ppublic.h \ + ../src/H5Zpublic.h \ + ../src/H5Spublic.h tselect.o: \ tselect.c \ testhdf5.h \ @@ -468,5 +447,25 @@ tselect.o: \ ../src/H5MMpublic.h \ ../src/H5Opublic.h \ ../src/H5Ppublic.h \ + ../src/H5Zpublic.h +cmpd_dset.o: \ + cmpd_dset.c \ + ../src/hdf5.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Ipublic.h \ + ../src/H5Apublic.h \ + ../src/H5ACpublic.h \ + ../src/H5Bpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Epublic.h \ + ../src/H5Fpublic.h \ + ../src/H5Gpublic.h \ + ../src/H5HGpublic.h \ + ../src/H5HLpublic.h \ + ../src/H5MFpublic.h \ + ../src/H5MMpublic.h \ + ../src/H5Opublic.h \ + ../src/H5Ppublic.h \ ../src/H5Zpublic.h \ ../src/H5Spublic.h diff --git a/test/Makefile.in b/test/Makefile.in index 7c64e6e..3103f0e 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -23,7 +23,8 @@ MOSTLYCLEAN=cmpd_dset.h5 dataset.h5 extend.h5 istore.h5 tfile1.h5 tfile2.h5 \ extern_4.raw extern_4b.raw iopipe.raw iopipe.h5 gheap0.h5 \ gheap1.h5 gheap2.h5 gheap3.h5 gheap4.h5 shtype0.h5 shtype1.h5 \ shtype2a.h5 shtype2b.h5 shtype3.h5 links.h5 chunk.h5 big.data \ - big[0-9][0-9][0-9][0-9][0-9].h5 + big[0-9][0-9][0-9][0-9][0-9].h5 dtypes1.h5 dtypes2.h5 tattr.h5 \ + tselect.h5 # Source and object files for programs... The TEST_SRC list contains all the # source files and is used for things like dependencies, archiving, etc. The diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index 8c2e6d7..4961eab 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -182,7 +182,7 @@ STEP 1: Initialize dataset `s1' and store it on disk in native order.\n"); /* Initialize the dataset */ for (i=0; i=0) { - sprintf (buf, "%lu:%lu:%lu:%lu", - statbuf.fileno[1], statbuf.fileno[0], - statbuf.objno[1], statbuf.objno[0]); - printf ("%-20s ", buf); - } - if ((obj=H5Dopen (group, name))>=0) { hsize_t size[64]; hsize_t maxsize[64]; @@ -209,7 +204,6 @@ list (hid_t group, const char *name, void __unused__ *op_data) printf ("}\n"); H5Dclose (space); H5Aiterate (obj, NULL, list_attr, NULL); - if (dump_g) dump_dataset_values(obj); H5Dclose (obj); } else if ((obj=H5Gopen (group, name))>=0) { printf ("Group\n"); @@ -228,11 +222,30 @@ list (hid_t group, const char *name, void __unused__ *op_data) printf ("Unknown Type\n"); } - /* Display the comment if the object has one */ - comment[0] = '\0'; - H5Gget_comment(group, name, sizeof(comment), comment); - strcpy(comment+sizeof(comment)-4, "..."); - if (comment[0]) printf("%26s%s\n", "", comment); + if (verbose_g>0) { + if (H5Gstat(group, name, TRUE, &statbuf)>=0) { + printf(" %-10s %lu:%lu:%lu:%lu\n", + "Location:", statbuf.fileno[1], statbuf.fileno[0], + statbuf.objno[1], statbuf.objno[0]); + if (statbuf.mtime>0 && NULL!=(tm = localtime(&(statbuf.mtime)))) { + strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm); + printf(" %-10s %s\n", "Modtime:", buf); + } + } + + /* Display the comment if the object has one */ + comment[0] = '\0'; + H5Gget_comment(group, name, sizeof(comment), comment); + strcpy(comment+sizeof(comment)-4, "..."); + if (comment[0]) printf(" %-10s %s\n", "Comment:", comment); + } + + if (dump_g && (obj=H5Dopen(group, name))) { + /* Turn on error reporting before dumping the data */ + H5Eset_auto(func, edata); + dump_dataset_values(obj); + H5Dclose(obj); + } /* Restore error reporting */ H5Eset_auto (func, edata); diff --git a/tools/h5tools.c b/tools/h5tools.c index 7941377..fae2251 100644 --- a/tools/h5tools.c +++ b/tools/h5tools.c @@ -22,7 +22,7 @@ * size of that temporary buffer in bytes. For efficiency's sake, choose the * largest value suitable for your machine (for testing use a small value). */ -#define H5DUMP_BUFSIZE 1024 +#define H5DUMP_BUFSIZE (1024*1024) #define OPT(X,S) ((X)?(X):(S)) #define MIN(X,Y) ((X)<(Y)?(X):(Y)) @@ -103,10 +103,10 @@ h5dump_prefix(char *s/*out*/, const h5dump_t *info, hsize_t elmtno, int ndims, static void h5dump_sprint(char *s/*out*/, const h5dump_t *info, hid_t type, void *vp) { - size_t i, n, offset; + size_t i, n, offset, size, dims[4], nelmts; char temp[1024], *name; hid_t memb; - int nmembs, j; + int nmembs, j, k, ndims; if (H5Tequal(type, H5T_NATIVE_DOUBLE)) { sprintf(temp, "%g", *((double*)vp)); @@ -115,6 +115,9 @@ h5dump_sprint(char *s/*out*/, const h5dump_t *info, hid_t type, void *vp) } else if (H5Tequal(type, H5T_NATIVE_CHAR) || H5Tequal(type, H5T_NATIVE_UCHAR)) { switch (*((char*)vp)) { + case '"': + strcpy(temp, "\\\""); + break; case '\\': strcpy(temp, "\\\\"); break; @@ -164,7 +167,18 @@ h5dump_sprint(char *s/*out*/, const h5dump_t *info, hid_t type, void *vp) /* The value */ offset = H5Tget_member_offset(type, j); memb = H5Tget_member_type(type, j); - h5dump_sprint(temp+strlen(temp), info, memb, (char*)vp+offset); + size = H5Tget_size(memb); + ndims = H5Tget_member_dims(type, j, dims, NULL); + assert(ndims>=0 && ndims<=4); + for (k=0, nelmts=1; k1) strcat(temp, OPT(info->arr_pre, "[")); + for (i=0; iarr_sep, ",")); + h5dump_sprint(temp+strlen(temp), info, memb, + (char*)vp+offset+i*size); + } + if (nelmts>1) strcat(temp, OPT(info->arr_suf, "]")); H5Tclose(memb); } strcat(temp, OPT(info->cmpd_suf, "}")); @@ -361,8 +375,8 @@ h5dump_fixtype(hid_t f_type) hid_t m_type=-1, f_memb; hid_t *memb=NULL; char **name=NULL; - int nmembs, i; - size_t size; + int nmembs, i, j, *ndims=NULL; + size_t size, offset, *dims=NULL, nelmts; size = H5Tget_size(f_type); switch (H5Tget_class(f_type)) { @@ -385,7 +399,7 @@ h5dump_fixtype(hid_t f_type) } else { m_type = H5Tcopy(H5T_NATIVE_LLONG); } - H5Tset_sign(m_type, H5Tget_size(f_type)); + H5Tset_sign(m_type, H5Tget_sign(f_type)); break; case H5T_FLOAT: @@ -404,23 +418,51 @@ h5dump_fixtype(hid_t f_type) break; case H5T_COMPOUND: + /* + * We have to do this in two steps. The first step scans the file + * type and converts the members to native types and remembers all + * their names and sizes, computing the size of the memory compound + * type at the same time. Then we create the memory compound type + * and add the members. + */ nmembs = H5Tget_nmembers(f_type); memb = calloc(nmembs, sizeof(hid_t)); name = calloc(nmembs, sizeof(char*)); + ndims = calloc(nmembs, sizeof(int)); + dims = calloc(nmembs*4, sizeof(size_t)); for (i=0, size=0; i=0 && ndims[i]<=4); + for (j=0, nelmts=1; j=0) H5Tclose(memb[i]); if (name[i]) free(name[i]); } free(memb); free(name); + free(ndims); + free(dims); } return m_type; @@ -456,9 +500,10 @@ h5dump_fixtype(hid_t f_type) /*------------------------------------------------------------------------- * Function: h5dump * - * Purpose: Print some values from a dataset. The values to print are - * determined by the P_SPACE argument and the format to use to - * print them is determined by the P_TYPE argument. + * Purpose: Print some values from a dataset DSET to the file STREAM + * after converting all types to P_TYPE (which should be a + * native type). If P_TYPE is a negative value then it will be + * computed from the dataset type using only native types. * * Return: Success: 0 * @@ -478,16 +523,14 @@ h5dump(FILE *stream, const h5dump_t *info, hid_t dset, hid_t _p_type) hid_t p_type = _p_type; hid_t f_type; int status; + h5dump_t info_dflt; - /* Check the data space */ - f_space = H5Dget_space(dset); - if (H5Sis_simple(f_space)<=0) return -1; - H5Sclose(f_space); - - /* - * Check the data type. If the caller didn't supply a data type then - * use an appropriate native data type. - */ + /* Use default values */ + if (!stream) stream = stdout; + if (!info) { + memset(&info_dflt, 0, sizeof info_dflt); + info = &info_dflt; + } if (p_type<0) { f_type = H5Dget_type(dset); p_type = h5dump_fixtype(f_type); @@ -495,6 +538,11 @@ h5dump(FILE *stream, const h5dump_t *info, hid_t dset, hid_t _p_type) if (p_type<0) return -1; } + /* Check the data space */ + f_space = H5Dget_space(dset); + if (H5Sis_simple(f_space)<=0) return -1; + H5Sclose(f_space); + /* Print the data */ status = h5dump_simple(stream, info, dset, p_type); if (p_type!=_p_type) H5Tclose(p_type); diff --git a/tools/h5tools.h b/tools/h5tools.h index 3b9b231..374bb71 100644 --- a/tools/h5tools.h +++ b/tools/h5tools.h @@ -18,6 +18,22 @@ */ 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 -- cgit v0.12