diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-06 15:54:22 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-09-06 15:54:22 (GMT) |
commit | 3bed8703631cbcffb215ccd82235fcc293e14218 (patch) | |
tree | bf56b0bcd4f41986f17138059f6349df78f0c059 /tools/lib/h5trav.h | |
parent | 3eb8c81b8046d282ced9c2d94e7132058243013e (diff) | |
download | hdf5-3bed8703631cbcffb215ccd82235fcc293e14218.zip hdf5-3bed8703631cbcffb215ccd82235fcc293e14218.tar.gz hdf5-3bed8703631cbcffb215ccd82235fcc293e14218.tar.bz2 |
[svn-r14136] Description:
Move H5Gget_num_objs() and several minor macros, etc. to deprecated
symbols section, replacing it with H5Gget_info().
Tested on:
FreeBSD/32 6.2 (duty)
FreeBSD/64 6.2 (liberty)
Linux/32 2.6 (kagiso)
Linux/64 2.6 (smirom)
AIX/32 5.3 (copper)
Solaris/32 5.10 (linew)
Mac OS X/32 10.4.10 (amazon)
Diffstat (limited to 'tools/lib/h5trav.h')
-rw-r--r-- | tools/lib/h5trav.h | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index c11d835..4218013 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -32,9 +32,15 @@ typedef H5G_obj_t H5G_obj_t1; -typedef struct trav_info_t { - char *name; +typedef struct trav_path_t { + char *path; H5G_obj_t type; +} trav_path_t; + +typedef struct trav_info_t { + size_t nalloc; + size_t nused; + trav_path_t *paths; } trav_info_t; @@ -56,11 +62,10 @@ typedef struct trav_obj_t { haddr_t objno; /* 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 */ H5G_obj_t type; /* type of object */ trav_link_t *links; /* array of possible link names */ - int sizelinks; /* size of links array */ - unsigned nlinks; /* number of links */ + size_t sizelinks; /* size of links array */ + size_t nlinks; /* number of links */ } trav_obj_t; @@ -70,8 +75,8 @@ typedef struct trav_obj_t { */ typedef struct trav_table_t { - unsigned size; - unsigned nobjs; + size_t size; + size_t nobjs; trav_obj_t *objs; } trav_table_t; @@ -89,25 +94,37 @@ extern "C" { * "h5trav info" public functions *------------------------------------------------------------------------- */ -int h5trav_getinfo( hid_t fid, trav_info_t *info, int print ); -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); +int h5trav_getinfo(hid_t file_id, trav_info_t *info); +ssize_t h5trav_getindex(const trav_info_t *info, const char *obj); /*------------------------------------------------------------------------- * "h5trav table" public functions *------------------------------------------------------------------------- */ -int h5trav_getindext(const char *obj,trav_table_t *travt); int h5trav_gettable(hid_t fid, trav_table_t *travt); -void h5trav_printtable(trav_table_t *table); +int h5trav_getindext(const char *obj, const trav_table_t *travt); + +/*------------------------------------------------------------------------- + * "h5trav print" public functions + *------------------------------------------------------------------------- + */ +int h5trav_print(hid_t fid); #ifdef __cplusplus } #endif /*------------------------------------------------------------------------- + * info private functions + *------------------------------------------------------------------------- + */ + +void trav_info_init(trav_info_t **info); + +void trav_info_free(trav_info_t *info); + +/*------------------------------------------------------------------------- * table private functions *------------------------------------------------------------------------- */ @@ -116,25 +133,11 @@ void trav_table_init(trav_table_t **table); void trav_table_free(trav_table_t *table); -int trav_table_search(haddr_t objno, - trav_table_t *table ); - -void trav_table_add(haddr_t objno, - char *objname, - H5G_obj_t type, - trav_table_t *table); - void trav_table_addflags(unsigned *flags, char *objname, H5G_obj_t type, trav_table_t *table); - -void trav_table_addlink(trav_table_t *table, - int j /* the object index */, - char *path ); - - #endif /* H5TRAV_H__ */ |