diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-08-13 20:53:35 (GMT) |
commit | 6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch) | |
tree | 5a7a112fe7a8a98c6fecb45b513789d15962eb3d /tools/lib/h5trav_table.c | |
parent | 6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff) | |
download | hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.zip hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.gz hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.bz2 |
[svn-r11245] Purpose:
Code cleanup
Description:
Trim trailing whitespace, which is making 'diff'ing the two branches
difficult.
Solution:
Ran this script in each directory:
foreach f (*.[ch] *.cpp)
sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f
end
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5committest
Diffstat (limited to 'tools/lib/h5trav_table.c')
-rw-r--r-- | tools/lib/h5trav_table.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/tools/lib/h5trav_table.c b/tools/lib/h5trav_table.c index 8e794aa..2ebcd6b 100644 --- a/tools/lib/h5trav_table.c +++ b/tools/lib/h5trav_table.c @@ -14,7 +14,7 @@ #include "h5trav.h" -#include "H5private.h" +#include "H5private.h" /*------------------------------------------------------------------------- * Function: trav_table_search @@ -33,11 +33,11 @@ int trav_table_search(haddr_t objno, trav_table_t *table ) { int i; - + for (i = 0; i < table->nobjs; i++) if (table->objs[i].objno == objno) return i; - + return -1; } @@ -56,18 +56,18 @@ int trav_table_search(haddr_t objno, trav_table_t *table ) *------------------------------------------------------------------------- */ -void trav_table_add(haddr_t objno, - char *name, - H5G_obj_t type, +void trav_table_add(haddr_t objno, + char *name, + H5G_obj_t type, trav_table_t *table) { int i; - + if (table->nobjs == table->size) { table->size *= 2; - table->objs = + table->objs = (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].flags[0] = table->objs[i].flags[1] = 0; @@ -79,7 +79,7 @@ void trav_table_add(haddr_t objno, table->objs[i].sizelinks = 0; } } - + i = table->nobjs++; table->objs[i].objno = objno; table->objs[i].flags[0] = table->objs[i].flags[1] = 0; @@ -105,18 +105,18 @@ void trav_table_add(haddr_t objno, *------------------------------------------------------------------------- */ -void trav_table_addflags(unsigned *flags, - char *name, - H5G_obj_t type, +void trav_table_addflags(unsigned *flags, + char *name, + H5G_obj_t type, trav_table_t *table) { int i; - + if (table->nobjs == table->size) { table->size *= 2; - table->objs = + table->objs = (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].flags[0] = table->objs[i].flags[1] = 0; @@ -128,7 +128,7 @@ void trav_table_addflags(unsigned *flags, table->objs[i].sizelinks = 0; } } - + i = table->nobjs++; table->objs[i].objno = 0; table->objs[i].flags[0] = flags[0]; @@ -144,7 +144,7 @@ void trav_table_addflags(unsigned *flags, /*------------------------------------------------------------------------- * Function: trav_table_init * - * Purpose: Initialize the table + * Purpose: Initialize the table * * Return: void * @@ -159,12 +159,12 @@ void trav_table_init( trav_table_t **tbl ) { int i; trav_table_t* table = (trav_table_t*) HDmalloc(sizeof(trav_table_t)); - + table->size = 20; table->nobjs = 0; - table->objs = + table->objs = (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].flags[0] = table->objs[i].flags[1] = 0; @@ -175,7 +175,7 @@ void trav_table_init( trav_table_t **tbl ) table->objs[i].nlinks = 0; table->objs[i].sizelinks = 0; } - + *tbl = table; } @@ -230,7 +230,7 @@ void trav_table_free( trav_table_t *table ) *------------------------------------------------------------------------- */ -void trav_table_addlink(trav_table_t *table, +void trav_table_addlink(trav_table_t *table, int j /* the object index */, char *path ) { @@ -243,8 +243,8 @@ void trav_table_addlink(trav_table_t *table, /* allocate space if necessary */ if (table->objs[j].nlinks == table->objs[j].sizelinks) { table->objs[j].sizelinks += 2; - table->objs[j].links = - (trav_link_t*)HDrealloc(table->objs[j].links, + table->objs[j].links = + (trav_link_t*)HDrealloc(table->objs[j].links, table->objs[j].sizelinks * sizeof(trav_link_t)); } |