summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/h5trav.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5diff/h5trav.c')
-rw-r--r--tools/h5diff/h5trav.c71
1 files changed, 20 insertions, 51 deletions
diff --git a/tools/h5diff/h5trav.c b/tools/h5diff/h5trav.c
index dad344d..039db0f 100644
--- a/tools/h5diff/h5trav.c
+++ b/tools/h5diff/h5trav.c
@@ -1,12 +1,24 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * 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. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
#include <stdio.h>
#include <stdlib.h>
#include "hdf5.h"
#include "h5trav.h"
-
-
#ifndef FALSE
#define FALSE 0
#endif
@@ -18,8 +30,6 @@
#define FAIL -1
#endif
-
-
/* functions for traversal */
int traverse( hid_t loc_id, const char *group_name, table_t *table, info_t *info, int *idx );
herr_t get_nobjects( hid_t loc_id, const char *group_name );
@@ -32,14 +42,12 @@ int table_search(unsigned long *objno, table_t *table );
void table_add(unsigned long *objno, char *objname, table_t *table );
-
-
/*-------------------------------------------------------------------------
* Function: H5get_object_info
*
* Purpose:
*
- * Return: Success: 0, Failure: -11
+ * Return:
*
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
*
@@ -72,9 +80,6 @@ int H5get_object_info( hid_t file_id, info_t *info )
}
-
-
-
/*-------------------------------------------------------------------------
* Function: count_objects
*
@@ -105,9 +110,6 @@ static herr_t count_objects( hid_t loc_id, const char *name, void *op_data)
return 0;
}
-
-
-
/*-------------------------------------------------------------------------
* Function: get_nobjects
*
@@ -141,7 +143,6 @@ herr_t get_nobjects( hid_t loc_id, const char *group_name )
}
-
/*-------------------------------------------------------------------------
* Function: opget_info
*
@@ -209,18 +210,12 @@ herr_t get_name_type( hid_t loc_id, const char *group_name, int idx, char **name
return 0;
}
-
-
-
-
-
-
/*-------------------------------------------------------------------------
* Function: traverse
*
* Purpose:
*
- * Return: Success: 0, Failure: -11
+ * Return:
*
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
*
@@ -233,8 +228,6 @@ herr_t get_name_type( hid_t loc_id, const char *group_name, int idx, char **name
*-------------------------------------------------------------------------
*/
-
-
int traverse( hid_t loc_id, const char *group_name, table_t *table, info_t *info, int *idx )
{
@@ -267,8 +260,6 @@ int traverse( hid_t loc_id, const char *group_name, table_t *table, info_t *info
strcat( path, "/" );
strcat( path, name );
-
-
/* disable error reporting */
H5Eget_auto(&func, &edata);
H5Eset_auto(NULL, NULL);
@@ -326,10 +317,6 @@ int traverse( hid_t loc_id, const char *group_name, table_t *table, info_t *info
}
}
-
-
-
-
break;
@@ -340,8 +327,6 @@ int traverse( hid_t loc_id, const char *group_name, table_t *table, info_t *info
case H5G_DATASET:
-
-
/* increment */
inserted_objs++;
@@ -381,8 +366,6 @@ int traverse( hid_t loc_id, const char *group_name, table_t *table, info_t *info
case H5G_TYPE:
-
-
/* increment */
inserted_objs++;
@@ -404,8 +387,6 @@ int traverse( hid_t loc_id, const char *group_name, table_t *table, info_t *info
case H5G_LINK:
-
-
/* increment */
inserted_objs++;
@@ -442,7 +423,7 @@ int traverse( hid_t loc_id, const char *group_name, table_t *table, info_t *info
*
* Purpose:
*
- * Return: Success: 0, Failure: -11
+ * Return:
*
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
*
@@ -472,7 +453,7 @@ int table_search(unsigned long *objno, table_t *table )
*
* Purpose:
*
- * Return: Success: 0, Failure: -11
+ * Return:
*
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
*
@@ -485,8 +466,6 @@ int table_search(unsigned long *objno, table_t *table )
*-------------------------------------------------------------------------
*/
-
-
void table_add(unsigned long *objno, char *objname, table_t *table)
{
int i;
@@ -518,7 +497,7 @@ void table_add(unsigned long *objno, char *objname, table_t *table)
*
* Purpose:
*
- * Return: Success: 0, Failure: -11
+ * Return:
*
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
*
@@ -557,7 +536,7 @@ void table_init( table_t **tbl )
*
* Purpose:
*
- * Return: Success: 0, Failure: -11
+ * Return:
*
* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
*
@@ -575,16 +554,6 @@ void table_free( table_t *table )
int i;
-
-#if 0
- printf("Table: # of entries = %d\n", table->nobjs);
- for ( i = 0; i < table->nobjs; i++)
- printf("%lu %lu %s %d %d\n", table->objs[i].objno[0],
- table->objs[i].objno[1],
- table->objs[i].objname,
- table->objs[i].displayed, table->objs[i].recorded);
-#endif
-
for ( i = 0; i < table->nobjs; i++)
free( table->objs[i].objname );