diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5F.c | 10 | ||||
-rw-r--r-- | src/H5FDmulti.c | 47 | ||||
-rw-r--r-- | src/H5Fpublic.h | 6 |
3 files changed, 11 insertions, 52 deletions
@@ -484,15 +484,15 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) /* Check/fix arguments */ if(!filename || !*filename) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file name") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file name") /* In this routine, we only accept the following flags: - * H5F_ACC_EXCL, H5F_ACC_TRUNC and H5F_ACC_DEBUG + * H5F_ACC_EXCL and H5F_ACC_TRUNC */ - if(flags & ~(H5F_ACC_EXCL | H5F_ACC_TRUNC | H5F_ACC_DEBUG)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags") + if(flags & ~(H5F_ACC_EXCL | H5F_ACC_TRUNC)) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags") /* The H5F_ACC_EXCL and H5F_ACC_TRUNC flags are mutually exclusive */ if((flags & H5F_ACC_EXCL) && (flags & H5F_ACC_TRUNC)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mutually exclusive flags for file creation") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "mutually exclusive flags for file creation") /* Check file creation property list */ if(H5P_DEFAULT == fcpl_id) diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index b1f094c..bc61374 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -30,18 +30,11 @@ /* Disable certain warnings in PC-Lint: */ /*lint --emacro( {534, 830}, H5P_DEFAULT, H5P_FILE_ACCESS, H5P_DATASET_XFER) */ -/*lint --emacro( {534, 830}, H5F_ACC_DEBUG, H5F_ACC_RDWR) */ /*lint --emacro( {534, 830}, H5FD_MULTI) */ /*lint -esym( 534, H5Eclear2, H5Epush2) */ #include "hdf5.h" -/* - * Define H5FD_MULTI_DEBUG if you want the ability to print debugging - * messages to the standard error stream. Messages are only printed if the - * file is opened with the H5F_ACC_DEBUG flag. - */ -#define H5FD_MULTI_DEBUG #ifndef FALSE #define FALSE 0 @@ -796,19 +789,6 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) * files at the end. */ if (map_changed) { -#ifdef H5FD_MULTI_DEBUG - if (file->flags & H5F_ACC_DEBUG) { - fprintf(stderr, "H5FD_MULTI: member map override\n"); - fprintf(stderr, " old value: "); - ALL_MEMBERS(mt) { - fprintf(stderr, "%s%d", mt?", ":"", (int)(file->fa.memb_map[mt])); - } END_MEMBERS; - fprintf(stderr, "\n new value: "); - ALL_MEMBERS(mt) { - fprintf(stderr, "%s%d", mt?", ":"", (int)(map[mt])); - } END_MEMBERS; - } -#endif /* Commit map */ ALL_MEMBERS(mt) { file->fa.memb_map[mt] = map[mt]; @@ -821,11 +801,6 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) } END_MEMBERS; ALL_MEMBERS(mt) { if (!in_use[mt] && file->memb[mt]) { -#ifdef H5FD_MULTI_DEBUG - if (file->flags & H5F_ACC_DEBUG) { - fprintf(stderr, "H5FD_MULTI: close member %d\n", (int)mt); - } -#endif (void)H5FDclose(file->memb[mt]); file->memb[mt] = NULL; } @@ -1109,20 +1084,10 @@ H5FD_multi_close(H5FD_t *_file) /* Close as many members as possible */ ALL_MEMBERS(mt) { if (file->memb[mt]) { -#ifdef H5FD_MULTI_DEBUG - if (file->flags & H5F_ACC_DEBUG) { - fprintf(stderr, "H5FD_MULTI: closing member %d\n", (int)mt); - } -#endif if (H5FDclose(file->memb[mt])<0) { -#ifdef H5FD_MULTI_DEBUG - if (file->flags & H5F_ACC_DEBUG) { - fprintf(stderr, "H5FD_MULTI: close failed\n"); - } -#endif - nerrors++; + nerrors++; } else { - file->memb[mt] = NULL; + file->memb[mt] = NULL; } } } END_MEMBERS; @@ -1895,18 +1860,10 @@ open_members(H5FD_multi_t *file) */ sprintf(tmp, file->fa.memb_name[mt], file->name); -#ifdef H5FD_MULTI_DEBUG - if(file->flags & H5F_ACC_DEBUG) - fprintf(stderr, "H5FD_MULTI: open member %d \"%s\"\n", (int)mt, tmp); -#endif H5E_BEGIN_TRY { file->memb[mt] = H5FDopen(tmp, file->flags, file->fa.memb_fapl[mt], HADDR_UNDEF); } H5E_END_TRY; if(!file->memb[mt]) { -#ifdef H5FD_MULTI_DEBUG - if(file->flags & H5F_ACC_DEBUG) - fprintf(stderr, "H5FD_MULTI: open failed for member %d\n", (int)mt); -#endif if(!file->fa.relax || (file->flags & H5F_ACC_RDWR)) nerrors++; } diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index f32b3e0..aa6cc2a 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -41,12 +41,14 @@ * We're assuming that these constants are used rather early in the hdf5 * session. * + * Note that H5F_ACC_DEBUG is deprecated (nonfuncational) but retained as a + * symbol for backward compatibility. */ #define H5F_ACC_RDONLY (H5CHECK 0x0000u) /*absence of rdwr => rd-only */ #define H5F_ACC_RDWR (H5CHECK 0x0001u) /*open for read and write */ #define H5F_ACC_TRUNC (H5CHECK 0x0002u) /*overwrite existing files */ #define H5F_ACC_EXCL (H5CHECK 0x0004u) /*fail if file already exists*/ -#define H5F_ACC_DEBUG (H5CHECK 0x0008u) /*print debug info */ +/* NOTE: 0x0008u was H5F_ACC_DEBUG, now deprecated */ #define H5F_ACC_CREAT (H5CHECK 0x0010u) /*create non-existing files */ /* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the @@ -221,7 +223,7 @@ H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag); #ifndef H5_NO_DEPRECATED_SYMBOLS /* Macros */ - +#define H5F_ACC_DEBUG (H5CHECK 0x0000u) /*print debug info (deprecated)*/ /* Typedefs */ |