summaryrefslogtreecommitdiffstats
path: root/test/swmr_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/swmr_common.c')
-rw-r--r--test/swmr_common.c33
1 files changed, 24 insertions, 9 deletions
diff --git a/test/swmr_common.c b/test/swmr_common.c
index 41a24ac..f857263 100644
--- a/test/swmr_common.c
+++ b/test/swmr_common.c
@@ -1,3 +1,18 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * 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://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
#include "swmr_common.h"
static unsigned symbol_mapping[NMAPPING] = {0, 0, 0, 0, 1, 1, 2, 3, 4};
@@ -28,21 +43,21 @@ create_symbol_datatype(void)
/* Create opaque datatype to represent other information for this record */
if((opaq_type_id = H5Tcreate(H5T_OPAQUE, DTYPE_SIZE)) < 0)
- return(-1);
+ return -1;
/* Create compound datatype for symbol */
if((sym_type_id = H5Tcreate(H5T_COMPOUND, sizeof(symbol_t))) < 0)
- return(-1);
+ return -1;
/* Insert fields in symbol datatype */
if(H5Tinsert(sym_type_id, "rec_id", HOFFSET(symbol_t, rec_id), H5T_NATIVE_UINT64) < 0)
- return(-1);
+ return -1;
if(H5Tinsert(sym_type_id, "info", HOFFSET(symbol_t, info), opaq_type_id) < 0)
- return(-1);
+ return -1;
/* Close opaque datatype */
if(H5Tclose(opaq_type_id) < 0)
- return(-1);
+ return -1;
return(sym_type_id);
} /* end create_symbol_datatype() */
@@ -52,7 +67,7 @@ generate_name(char *name_buf, unsigned level, unsigned count)
{
sprintf(name_buf, "%u-%04u", level, count);
- return(0);
+ return 0;
} /* end generate_name() */
int
@@ -70,10 +85,10 @@ generate_symbols(void)
strcpy(symbol_info[u][v].name, name_buf);
symbol_info[u][v].dsid = -1;
symbol_info[u][v].nrecords = 0;
- } /* end for */
+ } /* end for */
} /* end for */
- return(0);
+ return 0;
} /* end generate_symbols() */
int
@@ -88,6 +103,6 @@ shutdown_symbols(void)
free(symbol_info[u]);
} /* end for */
- return(0);
+ return 0;
} /* end shutdown_symbols() */