summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-04-20 00:19:46 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-04-20 00:19:46 (GMT)
commit365ca1225d447e1680d9c0dbe00c375655c3948d (patch)
tree509845d3928879ed774f8c48d44acb669565f1c2 /tools/lib
parentbeb0079ae11d4932a1ce91545e49801ac206c75a (diff)
downloadhdf5-365ca1225d447e1680d9c0dbe00c375655c3948d.zip
hdf5-365ca1225d447e1680d9c0dbe00c375655c3948d.tar.gz
hdf5-365ca1225d447e1680d9c0dbe00c375655c3948d.tar.bz2
[svn-r8397] Purpose:
h5repack in 1.6 Description: 2 functions we re added to /src: H5Premove filter and H5Iget_file_id Solution: Platforms tested: linux solaris AIX Misc. update:
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/Makefile.in9
-rw-r--r--tools/lib/h5tools.h2
-rw-r--r--tools/lib/h5trav.h6
-rw-r--r--tools/lib/h5trav_table.c18
4 files changed, 20 insertions, 15 deletions
diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in
index b6b979e..070bdcc 100644
--- a/tools/lib/Makefile.in
+++ b/tools/lib/Makefile.in
@@ -1,4 +1,3 @@
-## HDF5 Library Makefile(.in)
##
## Copyright by the Board of Trustees of the University of Illinois.
## All rights reserved.
@@ -11,7 +10,9 @@
## is linked from the top-level documents page. It can also be found at
## http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have
## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
-##
+##
+## HDF5 Library Makefile(.in)
+##
top_srcdir=@top_srcdir@
top_builddir=../..
srcdir=@srcdir@
@@ -40,7 +41,7 @@ PROGS=$(PUB_PROGS) $(TEST_PROGS)
## Source and object files for the library; do not install
##
-LIB_SRC=h5tools.c h5tools_str.c h5tools_utils.c
+LIB_SRC=h5tools.c h5tools_str.c h5tools_utils.c h5diff.c h5diff_array.c h5diff_attr.c h5diff_dset.c h5diff_util.c h5trav.c h5trav_table.c h5tools_filters.c
LIB_OBJ=$(LIB_SRC:.c=.lo)
PUB_LIB=
AUX_LIB=$(LIB)
@@ -48,7 +49,7 @@ AUX_LIB=$(LIB)
TEST_SRC=talign.c
TEST_OBJ=$(TEST_SRC:.c=.lo)
-PRIVATE_HDR=h5tools.h h5tools_str.h
+PRIVATE_HDR=h5tools.h h5tools_str.h h5diff.h h5trav.h
## Programs have to be built before they can be tested!
##
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 96e2bd1..f4fbb3d 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -482,4 +482,6 @@ extern int h5tools_dump_dset(FILE *stream, const h5dump_t *info, hid_t dset
extern int h5tools_dump_mem(FILE *stream, const h5dump_t *info, hid_t obj_id,
hid_t type, hid_t space, void *mem, int indentlevel);
+extern int h5tools_canreadf(const char* name,
+ hid_t dcpl_id);
#endif /* H5TOOLS_H__ */
diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h
index 5f68da4..af41a4e 100644
--- a/tools/lib/h5trav.h
+++ b/tools/lib/h5trav.h
@@ -54,7 +54,7 @@ typedef struct trav_link_t {
*/
typedef struct trav_obj_t {
- haddr_t objno; /* object number from H5Gget_objinfo */
+ unsigned long objno[2];/* object number from H5Gget_objinfo */
unsigned flags[2]; /* h5diff.object is present or not in both files*/
char *name; /* name */
int displayed; /* hard link already traversed once */
@@ -117,10 +117,10 @@ void trav_table_init(trav_table_t **table);
void trav_table_free(trav_table_t *table);
-int trav_table_search(haddr_t objno,
+int trav_table_search(unsigned long *objno,
trav_table_t *table );
-void trav_table_add(haddr_t objno,
+void trav_table_add(unsigned long *objno,
char *objname,
H5G_obj_t type,
trav_table_t *table);
diff --git a/tools/lib/h5trav_table.c b/tools/lib/h5trav_table.c
index 8e794aa..940fc0e 100644
--- a/tools/lib/h5trav_table.c
+++ b/tools/lib/h5trav_table.c
@@ -30,12 +30,12 @@
*-------------------------------------------------------------------------
*/
-int trav_table_search(haddr_t objno, trav_table_t *table )
+int trav_table_search(unsigned long *objno, trav_table_t *table )
{
int i;
for (i = 0; i < table->nobjs; i++)
- if (table->objs[i].objno == objno)
+ if (table->objs[i].objno[0] == *objno && table->objs[i].objno[1] == *(objno + 1))
return i;
return -1;
@@ -56,7 +56,7 @@ int trav_table_search(haddr_t objno, trav_table_t *table )
*-------------------------------------------------------------------------
*/
-void trav_table_add(haddr_t objno,
+void trav_table_add(unsigned long *objno,
char *name,
H5G_obj_t type,
trav_table_t *table)
@@ -69,7 +69,7 @@ void trav_table_add(haddr_t objno,
(trav_obj_t*)HDrealloc(table->objs, table->size * sizeof(trav_obj_t));
for (i = table->nobjs; i < table->size; i++) {
- table->objs[i].objno = 0;
+ table->objs[i].objno[0] = table->objs[i].objno[1] = 0;
table->objs[i].flags[0] = table->objs[i].flags[1] = 0;
table->objs[i].displayed = 0;
table->objs[i].type = H5G_UNKNOWN;
@@ -81,7 +81,8 @@ void trav_table_add(haddr_t objno,
}
i = table->nobjs++;
- table->objs[i].objno = objno;
+ table->objs[i].objno[0] = objno[0];
+ table->objs[i].objno[1] = objno[1];
table->objs[i].flags[0] = table->objs[i].flags[1] = 0;
HDfree(table->objs[i].name);
table->objs[i].name = (char *)HDstrdup(name);
@@ -118,7 +119,7 @@ void trav_table_addflags(unsigned *flags,
(trav_obj_t*)HDrealloc(table->objs, table->size * sizeof(trav_obj_t));
for (i = table->nobjs; i < table->size; i++) {
- table->objs[i].objno = 0;
+ table->objs[i].objno[0] = table->objs[i].objno[1] = 0;
table->objs[i].flags[0] = table->objs[i].flags[1] = 0;
table->objs[i].displayed = 0;
table->objs[i].type = H5G_UNKNOWN;
@@ -130,7 +131,8 @@ void trav_table_addflags(unsigned *flags,
}
i = table->nobjs++;
- table->objs[i].objno = 0;
+ table->objs[i].objno[0] = 0;
+ table->objs[i].objno[1] = 0;
table->objs[i].flags[0] = flags[0];
table->objs[i].flags[1] = flags[1];
HDfree(table->objs[i].name);
@@ -166,7 +168,7 @@ void trav_table_init( trav_table_t **tbl )
(trav_obj_t*)HDmalloc(table->size * sizeof(trav_obj_t));
for (i = 0; i < table->size; i++) {
- table->objs[i].objno = 0;
+ table->objs[i].objno[0] = table->objs[i].objno[1] = 0;
table->objs[i].flags[0] = table->objs[i].flags[1] = 0;
table->objs[i].displayed = 0;
table->objs[i].type = H5G_UNKNOWN;