summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2006-08-28 00:55:27 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2006-08-28 00:55:27 (GMT)
commit66d2d26f5d97eed437683c5c5e3fa15e7d368664 (patch)
tree20add75e189dd6446b48dba937d85f86099ed5a5
parent0265f1ca117cfeaea885f4619a2ad981dd92c9a0 (diff)
downloadhdf5-66d2d26f5d97eed437683c5c5e3fa15e7d368664.zip
hdf5-66d2d26f5d97eed437683c5c5e3fa15e7d368664.tar.gz
hdf5-66d2d26f5d97eed437683c5c5e3fa15e7d368664.tar.bz2
[svn-r12634] Purpose:
Code cleanup. Description: Removed argc and argv from the function arguments of h5tools_get_fapl() and h5tools_fopen(). They were used to call MPI_Init() which was no longer needed. Tested: heping (serial and parallel).
-rw-r--r--tools/h5copy/h5copy.c2
-rw-r--r--tools/h5dump/h5dump.c2
-rw-r--r--tools/h5ls/h5ls.c2
-rw-r--r--tools/h5repack/h5repack_copy.c2
-rw-r--r--tools/h5repack/h5repack_list.c2
-rw-r--r--tools/lib/h5tools.c14
-rw-r--r--tools/lib/h5tools.h3
7 files changed, 10 insertions, 17 deletions
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c
index a7908c3..c86726d 100644
--- a/tools/h5copy/h5copy.c
+++ b/tools/h5copy/h5copy.c
@@ -267,7 +267,7 @@ main (int argc, const char *argv[])
* open input file
*-------------------------------------------------------------------------*/
- fid_src = h5tools_fopen(fname_src, NULL, NULL, 0, argc, argv);
+ fid_src = h5tools_fopen(fname_src, NULL, NULL, 0);
/*-------------------------------------------------------------------------
* test for error in opening input file
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 7a49950..ef97752 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -3743,7 +3743,7 @@ main(int argc, const char *argv[])
}
fname = argv[opt_ind];
- fid = h5tools_fopen(fname, driver, NULL, 0, argc, argv);
+ fid = h5tools_fopen(fname, driver, NULL, 0);
if (fid < 0) {
error_msg(progname, "unable to open file \"%s\"\n", fname);
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 9a51ce2..b568bc9 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -2285,7 +2285,7 @@ main (int argc, const char *argv[])
file = -1;
while (fname && *fname) {
- file = h5tools_fopen(fname, preferred_driver, drivername, sizeof drivername, argc, argv);
+ file = h5tools_fopen(fname, preferred_driver, drivername, sizeof drivername);
if (file>=0) {
if (verbose_g) {
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index e59b6d0..c62407f 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -177,7 +177,7 @@ int copy_objects(const char* fnamein,
* open the files
*-------------------------------------------------------------------------
*/
- if ((fidin=h5tools_fopen(fnamein, NULL, NULL, 0, argc, argv))<0 ){
+ if ((fidin=h5tools_fopen(fnamein, NULL, NULL, 0))<0 ){
printf("<%s>: %s\n", fnamein, H5FOPENERROR );
goto out;
}
diff --git a/tools/h5repack/h5repack_list.c b/tools/h5repack/h5repack_list.c
index 5622811..b414398 100644
--- a/tools/h5repack/h5repack_list.c
+++ b/tools/h5repack/h5repack_list.c
@@ -47,7 +47,7 @@ int check_objects(const char* fname,
* open the file
*-------------------------------------------------------------------------
*/
- if ((fid=h5tools_fopen(fname, NULL, NULL, 0, argc, argv))<0){
+ if ((fid=h5tools_fopen(fname, NULL, NULL, 0))<0){
printf("<%s>: %s\n", fname, H5FOPENERROR );
return -1;
}
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 8530dfa..013cecf 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -171,13 +171,7 @@ h5tools_close(void)
*-------------------------------------------------------------------------
*/
static hid_t
-h5tools_get_fapl(const char *driver, unsigned *drivernum,
-#ifdef H5_HAVE_PARALLEL
-int argc, const char *argv[]
-#else /* H5_HAVE_PARALLEL */
-int UNUSED argc, const char UNUSED *argv[]
-#endif /* H5_HAVE_PARALLEL */
-)
+h5tools_get_fapl(const char *driver, unsigned *drivernum)
{
hid_t fapl = H5P_DEFAULT;
@@ -325,7 +319,7 @@ error:
*/
hid_t
h5tools_fopen(const char *fname, const char *driver, char *drivername,
- size_t drivername_size, int argc, const char *argv[])
+ size_t drivername_size)
{
unsigned drivernum;
hid_t fid = FAIL;
@@ -333,7 +327,7 @@ h5tools_fopen(const char *fname, const char *driver, char *drivername,
if (driver && *driver) {
/* Get the correct FAPL for the given driver */
- if((fapl=h5tools_get_fapl(driver,&drivernum,argc,argv))<0)
+ if((fapl=h5tools_get_fapl(driver,&drivernum))<0)
goto done;
H5E_BEGIN_TRY {
@@ -347,7 +341,7 @@ h5tools_fopen(const char *fname, const char *driver, char *drivername,
/* Try to open the file using each of the drivers */
for (drivernum = 0; drivernum < NUM_DRIVERS; drivernum++) {
/* Get the correct FAPL for the given driver */
- if((fapl=h5tools_get_fapl(drivernames[drivernum],NULL,argc,argv))<0)
+ if((fapl=h5tools_get_fapl(drivernames[drivernum],NULL))<0)
goto done;
H5E_BEGIN_TRY {
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 672d72a..357154b 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -367,8 +367,7 @@ extern int bin_form; /* binary form */
extern void h5tools_init(void);
extern void h5tools_close(void);
extern hid_t h5tools_fopen(const char *fname, const char *driver,
- char *drivername, size_t drivername_len,
- int argc, const char *argv[]);
+ char *drivername, size_t drivername_len);
extern int h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, hid_t dset,
hid_t p_typ, struct subset_t *sset, int indentlevel);
extern int h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, hid_t obj_id,