summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-07-29 16:43:59 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-07-29 16:43:59 (GMT)
commita34534c9b8321f4de9fadd836be926497f7461d4 (patch)
tree5c00d4cb7693ceed4b5e4d84f699953c7ccab048
parent14ea12a6baba9dfb4d63ce8579242a375d78c6a4 (diff)
downloadhdf5-a34534c9b8321f4de9fadd836be926497f7461d4.zip
hdf5-a34534c9b8321f4de9fadd836be926497f7461d4.tar.gz
hdf5-a34534c9b8321f4de9fadd836be926497f7461d4.tar.bz2
[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.
-rw-r--r--MANIFEST1
-rw-r--r--README2
-rw-r--r--acconfig.h9
-rwxr-xr-xconfigure306
-rw-r--r--configure.in35
-rw-r--r--doc/html/H5.format.html177
-rw-r--r--src/.distdep814
-rw-r--r--src/H5D.c27
-rw-r--r--src/H5G.c10
-rw-r--r--src/H5Gpublic.h11
-rw-r--r--src/H5O.c147
-rw-r--r--src/H5Omtime.c316
-rw-r--r--src/H5Oprivate.h7
-rw-r--r--src/H5T.c8
-rw-r--r--src/H5config.h.in25
-rw-r--r--src/H5private.h3
-rw-r--r--src/Makefile.in6
-rw-r--r--test/.distdep265
-rw-r--r--test/Makefile.in3
-rw-r--r--test/cmpd_dset.c2
-rw-r--r--tools/h5ls.c39
-rw-r--r--tools/h5tools.c98
-rw-r--r--tools/h5tools.h16
23 files changed, 1652 insertions, 675 deletions
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 <<EOF
+#line 1880 "configure"
+#include "confdefs.h"
+
+#include <sys/time.h>
+#include <time.h>
+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 <<EOF
+#line 1907 "configure"
+#include "confdefs.h"
+
+#include <sys/time.h>
+#include <time.h>
+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 <<EOF
+#line 1937 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <time.h>
+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 <<EOF
+#line 1971 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#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 <<EOF
+#line 2004 "configure"
+#include "confdefs.h"
+#include <time.h>
+#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 <<EOF
+#line 2038 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+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 <<EOF
-#line 1885 "configure"
+#line 2072 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1904,7 +2091,62 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1908: \"$ac_link\") 1>&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 <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&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 <<EOF
+#line 2127 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* 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 <<EOF
-#line 1934 "configure"
+#line 2176 "configure"
#include "confdefs.h"
#include<sys/types.h>
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 <<EOF
-#line 1951 "configure"
+#line 2193 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1970,7 +2212,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1974: \"$ac_link\") 1>&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 <<EOF
-#line 2014 "configure"
+#line 2256 "configure"
#include "confdefs.h"
int main() {
@@ -2059,7 +2301,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2063: \"$ac_compile\") 1>&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 <<EOF
-#line 2091 "configure"
+#line 2333 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2098: \"$ac_compile\") 1>&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 <<EOF
-#line 2127 "configure"
+#line 2369 "configure"
#include "confdefs.h"
int main() {
int __attribute__((unused)) f(void){return 1;}
; return 0; }
EOF
-if { (eval echo configure:2134: \"$ac_compile\") 1>&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 <<EOF
-#line 2152 "configure"
+#line 2394 "configure"
#include "confdefs.h"
int main() {
int f(void){return __FUNCTION__;}
; return 0; }
EOF
-if { (eval echo configure:2159: \"$ac_compile\") 1>&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 <<EOF
-#line 2184 "configure"
+#line 2426 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -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 <<EOF
-#line 2304 "configure"
+#line 2546 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2311: \"$ac_link\") 1>&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 <<EOF
-#line 2346 "configure"
+#line 2588 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2353: \"$ac_link\") 1>&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 <sys/time.h>
+#include <time.h>],[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 <sys/time.h>
+#include <time.h>], [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 <sys/types.h>
+#include <sys/time.h>
+#include <time.h>],[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<sys/types.h>],
[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.).
- <p><b>Format of Data:</b>
-
<p>
<center>
<table border align=center cellpadding=4 width="80%">
@@ -2838,36 +2836,153 @@
<hr>
<h3><a name="NameMessage">Name: Object Name</a></h3>
- <b>Type:</b> 0x000D<BR>
- <b>Length:</b> varies<BR>
- <b>Status:</b> Optional [required?], may not be repeated.<BR>
- <b>Purpose and Description:</b> 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.<BR>
- <b>Format of Data:</b>The data for the object name is just a sequence of ASCII
- characters with no special formatting.
+
+ <p><b>Type:</b> 0x000D<br>
+ <b>Length:</b> varies<br>
+ <b>Status:</b> Optional, may not be repeated.
+
+ <p><b>Purpose and Description:</b> 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.
+
+ <p>
+ <center>
+ <table border align=center cellpadding=4 width="80%">
+ <caption align=top>
+ <b>Name Message</b>
+ </caption>
+
+ <tr align=center>
+ <th width="25%">byte</th>
+ <th width="25%">byte</th>
+ <th width="25%">byte</th>
+ <th width="25%">byte</th>
+ </tr>
+
+ <tr align=center>
+ <td colspan=4><br>Name<br><br></td>
+ </tr>
+ </table>
+ </center>
+
+ <p>
+ <center>
+ <table align=center width="80%">
+ <tr>
+ <th width="30%">Field Name</th>
+ <th width="70%">Description</th>
+ </tr>
+
+ <tr valign=top>
+ <td>Name</td>
+ <td>A null terminated ASCII character string.</td>
+ </tr>
+ </table>
+ </center>
<hr>
- <h3><a name="ModifiedMessage">Name: Object Modification Date &amp; Time</a></h3>
- <b>Type:</b> 0x000E<BR>
- <b>Length:</b> fixed<BR>
- <b>Status:</b> Required?, may not be repeated.<BR>
- <b>Purpose and Description:</b> The object modification date and time is a
- timestamp which indicates (using ISO8601 date and time format) the last
- modification of a data object.<BR>
- <b>Format of Data:</b>
- The date is represented as a fixed length ASCII string according to the
- "complete calendar date representation, without hyphens" listed in the ISO8601
- standard.<br>
- 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.
-
- <h4><a name="ModifiedExample">Examples:</a></h4>
- "February 14, 1993, 1:10pm and 30 seconds" is represented as "19930214131030" in
- the ISO standard format.
+ <h3><a name="ModifiedMessage">Name: Object Modification Date &amp;
+ Time</a></h3>
+
+ <p><b>Type:</b> 0x000E<br>
+ <b>Length:</b> fixed<br>
+ <b>Status:</b> Optional, may not be repeated.
+
+ <p><b>Purpose and Description:</b> 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.
+
+ <p>
+ <center>
+ <table border align=center cellpadding=4 width="80%">
+ <caption align=top>
+ <b>Modification Time Message</b>
+ </caption>
+
+ <tr align=center>
+ <th width="25%">byte</th>
+ <th width="25%">byte</th>
+ <th width="25%">byte</th>
+ <th width="25%">byte</th>
+ </tr>
+
+ <tr align=center>
+ <td colspan=4>Year</td>
+ </tr>
+
+ <tr align=center>
+ <td colspan=2>Month</td>
+ <td colspan=2>Day of Month</td>
+ </tr>
+
+ <tr align=center>
+ <td colspan=2>Hour</td>
+ <td colspan=2>Minute</td>
+ </tr>
+
+ <tr align=center>
+ <td colspan=2>Second</td>
+ <td colspan=2>Reserved</td>
+ </tr>
+ </table>
+ </center>
+
+ <p>
+ <center>
+ <table align=center width="80%">
+ <tr>
+ <th width="30%">Field Name</th>
+ <th width="70%">Description</th>
+ </tr>
+
+ <tr valign=top>
+ <td>Year</td>
+ <td>The four-digit year as an ASCII string. For example,
+ "1998". All fields of this message should be interpreted
+ as coordinated universal time (UTC)</td>
+ </tr>
+
+ <tr valign=top>
+ <td>Month</td>
+ <td>The month number as a two digit ASCII string where
+ January is "01" and December is "12".</td>
+ </tr>
+
+ <tr valign=top>
+ <td>Day of Month</td>
+ <td>The day number within the month as a two digit ASCII
+ string. The first day of the month is "01".</td>
+ </tr>
+
+ <tr valign=top>
+ <td>Hour</td>
+ <td>The hour of the day as a two digit ASCII string where
+ midnight is "00" and 11:00pm is "23".</td>
+ </tr>
+
+ <tr valign=top>
+ <td>Minute</td>
+ <td>The minute of the hour as a two digit ASCII string where
+ the first minute of the hour is "00" and the last is
+ "59".</td>
+ </tr>
+
+ <tr valign=top>
+ <td>Second</td>
+ <td>The second of the minute as a two digit ASCII string
+ where the first second of the minute is "00" and the last
+ is "59".</td>
+ </tr>
+
+ <tr valign=top>
+ <td>Reserved</td>
+ <td>This field is reserved and should always be zero.</td>
+ </tr>
+ </table>
+ </center>
<hr>
<h3><a name="SharedMessage">Name: Shared Object Message</a></h3>
@@ -3140,7 +3255,7 @@ data-type.
<address><a href="mailto:koziol@ncsa.uiuc.edu">Quincey Koziol</a></address>
<address><a href="mailto:matzke@llnl.gov">Robb Matzke</a></address>
<!-- hhmts start -->
-Last modified: Mon Jul 20 13:49:08 EDT 1998
+Last modified: Fri Jul 24 15:10:57 EDT 1998
<!-- hhmts end -->
</body>
</html>
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 \
@@ -501,33 +227,33 @@ H5O.o: \
H5Sprivate.h \
H5Spublic.h \
H5Zprivate.h
-H5Oattr.o: \
- H5Oattr.c \
+H5Ocomp.o: \
+ H5Ocomp.c \
H5private.h \
H5public.h \
H5config.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
- H5Gprivate.h \
- H5Gpublic.h \
- H5Bprivate.h \
- H5Bpublic.h \
- H5Fprivate.h \
- H5Fpublic.h \
- H5Dpublic.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
-H5Ocomp.o: \
- H5Ocomp.c \
+H5Ocont.o: \
+ H5Ocont.c \
H5private.h \
H5public.h \
H5config.h \
@@ -551,8 +277,8 @@ H5Ocomp.o: \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h
-H5Ocont.o: \
- H5Ocont.c \
+H5Oname.o: \
+ H5Oname.c \
H5private.h \
H5public.h \
H5config.h \
@@ -576,8 +302,28 @@ H5Ocont.o: \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h
-H5Odtype.o: \
- H5Odtype.c \
+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
+H5Ostab.o: \
+ H5Ostab.c \
H5private.h \
H5public.h \
H5config.h \
@@ -601,33 +347,129 @@ H5Odtype.o: \
H5Tpublic.h \
H5Sprivate.h \
H5Spublic.h
-H5Oefl.o: \
- H5Oefl.c \
+H5Tbit.o: \
+ H5Tbit.c \
H5private.h \
H5public.h \
H5config.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.h \
- H5HLprivate.h \
- H5HLpublic.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
+H5Tconv.o: \
+ H5Tconv.c \
+ H5Iprivate.h \
+ H5Ipublic.h \
+ H5public.h \
+ H5config.h \
+ H5private.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 \
+ 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 \
+ H5Tpkg.h \
H5HGprivate.h \
H5HGpublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Dpublic.h \
H5Tprivate.h \
- H5Tpublic.h
-H5Olayout.o: \
- H5Olayout.c \
+ H5Tpublic.h \
+ H5Gprivate.h
+H5Farray.o: \
+ H5Farray.c \
H5private.h \
H5public.h \
H5config.h \
@@ -651,21 +493,48 @@ H5Olayout.o: \
H5Zprivate.h \
H5Zpublic.h \
H5Eprivate.h
-H5Oname.o: \
- H5Oname.c \
+H5Odtype.o: \
+ H5Odtype.c \
H5private.h \
H5public.h \
H5config.h \
H5Eprivate.h \
H5Epublic.h \
H5Ipublic.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 \
+ H5HGpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
+ H5Sprivate.h \
+ H5Spublic.h
+H5Oefl.o: \
+ H5Oefl.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5Ipublic.h \
+ H5HLprivate.h \
+ H5HLpublic.h \
H5Fprivate.h \
H5Fpublic.h \
H5Dpublic.h \
+ H5MMprivate.h \
+ H5MMpublic.h \
+ H5Oprivate.h \
+ H5Opublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
@@ -673,29 +542,32 @@ H5Oname.o: \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
- H5Tpublic.h \
- H5Sprivate.h \
- H5Spublic.h
-H5Onull.o: \
- H5Onull.c \
+ H5Tpublic.h
+H5Olayout.o: \
+ H5Olayout.c \
H5private.h \
H5public.h \
H5config.h \
- H5Oprivate.h \
- H5Opublic.h \
+ H5Dprivate.h \
+ H5Dpublic.h \
+ H5Ipublic.h \
H5Fprivate.h \
H5Fpublic.h \
- H5Ipublic.h \
- H5Dpublic.h \
H5Gprivate.h \
H5Gpublic.h \
H5Bprivate.h \
H5Bpublic.h \
+ H5Oprivate.h \
+ H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h \
H5Tprivate.h \
H5Tpublic.h \
- H5Sprivate.h
+ H5Sprivate.h \
+ H5Spublic.h \
+ H5Zprivate.h \
+ H5Zpublic.h \
+ H5Eprivate.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; idx<oh->nmesgs; 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 <matzke@llnl.gov>
+ * Friday, July 24, 1998
+ *
+ * Purpose: The object modification time message.
+ */
+#include <H5private.h>
+#include <H5Eprivate.h>
+#include <H5MMprivate.h>
+#include <H5Oprivate.h>
+
+#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<ndims; i++) {
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 5feabff..5978d92 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -3,6 +3,13 @@
/* Define to empty if the keyword does not work. */
#undef const
+/* Define if your struct tm has tm_zone. */
+#undef HAVE_TM_ZONE
+
+/* Define if you don't have tm_zone but do have the external array
+ tzname. */
+#undef HAVE_TZNAME
+
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
@@ -15,6 +22,9 @@
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define if your <sys/time.h> 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 <assert.h>
+# include <ctype.h>
# include <fcntl.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
+# include <sys/time.h>
# include <sys/types.h>
+# include <time.h>
# include <unistd.h>
#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<NX*NY; i++) {
s1[i].a = 8*i+0;
- s1[i].b = 2000*2*i;
+ s1[i].b = 2000+2*i;
s1[i].c[0] = 8*i+2;
s1[i].c[1] = 8*i+3;
s1[i].c[2] = 8*i+4;
diff --git a/tools/h5ls.c b/tools/h5ls.c
index 0ae0c21..c79c8d1 100644
--- a/tools/h5ls.c
+++ b/tools/h5ls.c
@@ -86,6 +86,7 @@ dump_dataset_values(hid_t dset)
memset(&info, 0, sizeof info);
info.idx_fmt = " (%s) ";
info.line_ncols = width_g;
+ if (verbose_g) info.cmpd_name = "%s=";
/*
* If the dataset is a 1-byte integer type then format it as an ASCI
@@ -177,6 +178,7 @@ list (hid_t group, const char *name, void __unused__ *op_data)
int i;
char buf[512], comment[50];
H5G_stat_t statbuf;
+ struct tm *tm;
/* Disable error reporting */
H5Eget_auto (&func, &edata);
@@ -185,13 +187,6 @@ list (hid_t group, const char *name, void __unused__ *op_data)
/* Print info about each name */
printf ("%-25s ", name);
- if (H5Gstat (group, name, TRUE, &statbuf)>=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; k<ndims; k++) nelmts *= dims[k];
+
+ if (nelmts>1) strcat(temp, OPT(info->arr_pre, "["));
+ for (i=0; i<nelmts; i++) {
+ if (i) strcat(temp, OPT(info->arr_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<nmembs; i++) {
+
+ /* Get the member type and fix it */
f_memb = H5Tget_member_type(f_type, i);
memb[i] = h5dump_fixtype(f_memb);
- size = ALIGN(size, H5Tget_size(memb[i])) + H5Tget_size(memb[i]);
H5Tclose(f_memb);
+ if (memb[i]<0) goto done;
+
+ /* Get the member dimensions */
+ ndims[i] = H5Tget_member_dims(f_type, i, dims+i*4, NULL);
+ assert(ndims[i]>=0 && ndims[i]<=4);
+ for (j=0, nelmts=1; j<ndims[i]; j++) nelmts *= dims[i*4+j];
+
+ /* Get the member name */
name[i] = H5Tget_member_name(f_type, i);
- if (memb[i]<0 || NULL==name[i]) goto done;
+ if (NULL==name[i]) goto done;
+
+ /*
+ * Compute the new offset so each member is aligned on a byte
+ * boundary which is the same as the member size.
+ */
+ size = ALIGN(size, H5Tget_size(memb[i])) +
+ nelmts * H5Tget_size(memb[i]);
}
m_type = H5Tcreate(H5T_COMPOUND, size);
- for (i=0, size=0; i<nmembs; i++) {
- H5Tinsert(m_type, name[i], size, memb[i]);
- size = ALIGN(size, H5Tget_size(memb[i])) + H5Tget_size(memb[i]);
+ for (i=0, offset=0; i<nmembs; i++) {
+ H5Tinsert_array(m_type, name[i], offset, ndims[i], dims+i*4,
+ NULL, memb[i]);
+ for (j=0, nelmts=1; j<ndims[i]; j++) nelmts *= dims[i*4+j];
+ offset = ALIGN(offset, H5Tget_size(memb[i])) +
+ nelmts * H5Tget_size(memb[i]);
}
break;
@@ -440,13 +482,15 @@ h5dump_fixtype(hid_t f_type)
done:
/* Clean up temp buffers */
- if (memb && name) {
+ if (memb && name && ndims && dims) {
for (i=0; i<nmembs; i++) {
if (memb[i]>=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