diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2003-12-17 14:07:41 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2003-12-17 14:07:41 (GMT) |
commit | cd7b4b8b90adc487f9cd4ee05f2425eeb5f7f84d (patch) | |
tree | d8f78540c20e8e338086b4bcb0d07374baf7d165 /tools/lib | |
parent | 52a46001cbeeb902d0fe7779ddcbbf0da0907c15 (diff) | |
download | hdf5-cd7b4b8b90adc487f9cd4ee05f2425eeb5f7f84d.zip hdf5-cd7b4b8b90adc487f9cd4ee05f2425eeb5f7f84d.tar.gz hdf5-cd7b4b8b90adc487f9cd4ee05f2425eeb5f7f84d.tar.bz2 |
[svn-r7966] Purpose:
h5repack new features
Description:
added debugging functions and a hard link generated dataset for the test suite
Solution:
Platforms tested:
linux
solaris 2.7
IRIX
Misc. update:
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5diff.c | 49 | ||||
-rw-r--r-- | tools/lib/h5trav.c | 48 | ||||
-rw-r--r-- | tools/lib/h5trav.h | 7 |
3 files changed, 55 insertions, 49 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 1a5e1f3..3b59b0e 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -536,55 +536,6 @@ int diff( hid_t file1_id, } -/*------------------------------------------------------------------------- - * Function: diff_list - * - * Purpose: print list of objects in file - * - * Return: void - * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: May 9, 2003 - * - * Comments: - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -#ifdef NOT_YET -void diff_list( const char *filename, int nobjects, trav_info_t *info ) -{ - int i; - - printf("File <%s>: # of entries = %d\n", filename, nobjects ); - for ( i = 0; i < nobjects; i++) - { - switch ( info[i].type ) - { - case H5G_GROUP: - printf(" %-10s %s\n", "group", info[i].name ); - break; - case H5G_DATASET: - printf(" %-10s %s\n", "dataset", info[i].name ); - break; - case H5G_TYPE: - printf(" %-10s %s\n", "datatype", info[i].name ); - break; - case H5G_LINK: - printf(" %-10s %s\n", "link", info[i].name ); - break; - default: - printf(" %-10s %s\n", "User defined object", info[i].name ); - break; - } - } - -} -#endif - - diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 4747aad..fc64fc7 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -467,3 +467,51 @@ int traverse( hid_t loc_id, return inserted_objs; } + + + +/*------------------------------------------------------------------------- + * Function: diff_list + * + * Purpose: print list of objects in file + * + * Return: void + * + * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu + * + * Date: May 9, 2003 + * + * Comments: + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +void h5trav_printinfo(int nobjs, trav_info_t *travi) +{ + int i; + for ( i = 0; i < nobjs; i++) + { + switch ( travi[i].type ) + { + case H5G_GROUP: + printf(" %-10s %s\n", "group", travi[i].name ); + break; + case H5G_DATASET: + printf(" %-10s %s\n", "dataset", travi[i].name ); + break; + case H5G_TYPE: + printf(" %-10s %s\n", "datatype", travi[i].name ); + break; + case H5G_LINK: + printf(" %-10s %s\n", "link", travi[i].name ); + break; + default: + printf(" %-10s %s\n", "User defined object", travi[i].name ); + break; + } + } +} + + + diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index 15c82ca..1f826bb 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -17,6 +17,10 @@ #include "hdf5.h" +#if 0 +#define H5_TRAV_DEBUG +#endif + /*------------------------------------------------------------------------- * public struct to store name and type of an object @@ -73,6 +77,9 @@ extern "C" { int h5trav_getinfo( hid_t file_id, trav_info_t *info ); int h5trav_getindex( const char *obj, int nobjs, trav_info_t *info ); void h5trav_freeinfo( trav_info_t *info, int nobjs ); +void h5trav_printinfo(int nobjs, trav_info_t *info); + + #ifdef __cplusplus } |