diff options
Diffstat (limited to 'src/H5Pdcpl.c')
-rw-r--r-- | src/H5Pdcpl.c | 133 |
1 files changed, 0 insertions, 133 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 4926cbd..3561c65 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -93,7 +93,6 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, \ H5D_VDS_ERROR, HSIZE_UNDEF, -1, -1, FALSE \ } -#ifdef H5_HAVE_C99_DESIGNATED_INITIALIZER #define H5D_DEF_STORAGE_COMPACT \ { \ H5D_COMPACT, \ @@ -142,41 +141,6 @@ H5D_VIRTUAL, H5O_LAYOUT_VERSION_4, H5D_LOPS_VIRTUAL, {H5D_DEF_LAYOUT_CHUNK_INIT}, \ H5D_DEF_STORAGE_VIRTUAL \ } -#else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ -/* Note that the compact & chunked layout initialization values are using the - * contiguous layout initialization in the union, because the contiguous - * layout is first in the union. These values are overridden in the - * H5P__init_def_layout() routine. -QAK - */ -#define H5D_DEF_LAYOUT_COMPACT \ - { \ - H5D_COMPACT, H5O_LAYOUT_VERSION_DEFAULT, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, \ - { \ - H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT \ - } \ - } -#define H5D_DEF_LAYOUT_CONTIG \ - { \ - H5D_CONTIGUOUS, H5O_LAYOUT_VERSION_DEFAULT, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, \ - { \ - H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT \ - } \ - } -#define H5D_DEF_LAYOUT_CHUNK \ - { \ - H5D_CHUNKED, H5O_LAYOUT_VERSION_DEFAULT, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, \ - { \ - H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT \ - } \ - } -#define H5D_DEF_LAYOUT_VIRTUAL \ - { \ - H5D_VIRTUAL, H5O_LAYOUT_VERSION_4, NULL, {H5D_DEF_LAYOUT_CHUNK_INIT}, \ - { \ - H5D_CONTIGUOUS, H5D_DEF_STORAGE_CONTIG_INIT \ - } \ - } -#endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ /* ======== Dataset creation properties ======== */ /* Definitions for storage layout property */ @@ -245,9 +209,6 @@ /* General routines */ static herr_t H5P__set_layout(H5P_genplist_t *plist, const H5O_layout_t *layout); -#ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER -static herr_t H5P__init_def_layout(void); -#endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ /* Property class callbacks */ static herr_t H5P__dcrt_reg_prop(H5P_genclass_t *pclass); @@ -320,18 +281,10 @@ static const H5O_efl_t H5D_def_efl_g = H5D_CRT_EXT_FILE_LIST_DEF; /* Default static const unsigned H5O_ohdr_min_g = H5D_CRT_MIN_DSET_HDR_SIZE_DEF; /* Default object header minimization */ /* Defaults for each type of layout */ -#ifdef H5_HAVE_C99_DESIGNATED_INITIALIZER static const H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; static const H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; static const H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; static const H5O_layout_t H5D_def_layout_virtual_g = H5D_DEF_LAYOUT_VIRTUAL; -#else /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ -static H5O_layout_t H5D_def_layout_compact_g = H5D_DEF_LAYOUT_COMPACT; -static H5O_layout_t H5D_def_layout_contig_g = H5D_DEF_LAYOUT_CONTIG; -static H5O_layout_t H5D_def_layout_chunk_g = H5D_DEF_LAYOUT_CHUNK; -static H5O_layout_t H5D_def_layout_virtual_g = H5D_DEF_LAYOUT_VIRTUAL; -static hbool_t H5P_dcrt_def_layout_init_g = FALSE; -#endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ /*------------------------------------------------------------------------- * Function: H5P__dcrt_reg_prop @@ -1926,47 +1879,6 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__set_layout() */ -#ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER - -/*------------------------------------------------------------------------- - * Function: H5P__init_def_layout - * - * Purpose: Set the default layout information for the various types of - * dataset layouts - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: Quincey Koziol - * Tuesday, January 13, 2009 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5P__init_def_layout(void) -{ - const H5O_layout_chunk_t def_layout_chunk = H5D_DEF_LAYOUT_CHUNK_INIT; - const H5O_storage_compact_t def_store_compact = H5D_DEF_STORAGE_COMPACT_INIT; - const H5O_storage_chunk_t def_store_chunk = H5D_DEF_STORAGE_CHUNK_INIT; - const H5O_storage_virtual_t def_store_virtual = H5D_DEF_STORAGE_VIRTUAL_INIT; - - FUNC_ENTER_PACKAGE_NOERR - - /* Initialize the default layout info for non-contigous layouts */ - H5D_def_layout_compact_g.storage.type = H5D_COMPACT; - H5D_def_layout_compact_g.storage.u.compact = def_store_compact; - H5D_def_layout_chunk_g.u.chunk = def_layout_chunk; - H5D_def_layout_chunk_g.storage.type = H5D_CHUNKED; - H5D_def_layout_chunk_g.storage.u.chunk = def_store_chunk; - H5D_def_layout_virtual_g.storage.type = H5D_VIRTUAL; - H5D_def_layout_virtual_g.storage.u.virt = def_store_virtual; - - /* Note that we've initialized the default values */ - H5P_dcrt_def_layout_init_g = TRUE; - - FUNC_LEAVE_NOAPI(SUCCEED) -} /* end H5P__init_def_layout() */ -#endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ - /*------------------------------------------------------------------------- * Function: H5Pset_layout * @@ -1997,15 +1909,6 @@ H5Pset_layout(hid_t plist_id, H5D_layout_t layout_type) if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") -#ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER - /* If the compiler doesn't support C99 designated initializers, check if - * the default layout structs have been initialized yet or not. *ick* -QAK - */ - if (!H5P_dcrt_def_layout_init_g) - if (H5P__init_def_layout() < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't initialize default layout info") -#endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ - /* Get pointer to correct default layout */ switch (layout_type) { case H5D_COMPACT: @@ -2114,15 +2017,6 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/]) if (!dim) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no chunk dimensions specified") -#ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER - /* If the compiler doesn't support C99 designated initializers, check if - * the default layout structs have been initialized yet or not. *ick* -QAK - */ - if (!H5P_dcrt_def_layout_init_g) - if (H5P__init_def_layout() < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't initialize default layout info") -#endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ - /* Verify & initialize property's chunk dims */ H5MM_memcpy(&chunk_layout, &H5D_def_layout_chunk_g, sizeof(H5D_def_layout_chunk_g)); HDmemset(&chunk_layout.u.chunk.dim, 0, sizeof(chunk_layout.u.chunk.dim)); @@ -2254,15 +2148,6 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const if (H5D_virtual_check_mapping_pre(vspace, src_space, H5O_VIRTUAL_STATUS_USER) < 0) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "invalid mapping selections") -#ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER - /* If the compiler doesn't support C99 designated initializers, check if - * the default layout structs have been initialized yet or not. *ick* -QAK - */ - if (!H5P_dcrt_def_layout_init_g) - if (H5P__init_def_layout() < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't initialize default layout info") -#endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ - /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") @@ -2734,15 +2619,6 @@ H5Pset_chunk_opts(hid_t plist_id, unsigned options) if (options & ~(H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS)) HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "unknown chunk options") -#ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER - /* If the compiler doesn't support C99 designated initializers, check if - * the default layout structs have been initialized yet or not. *ick* -QAK - */ - if (!H5P_dcrt_def_layout_init_g) - if (H5P__init_def_layout() < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't initialize default layout info") -#endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ - /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") @@ -2794,15 +2670,6 @@ H5Pget_chunk_opts(hid_t plist_id, unsigned *options /*out*/) FUNC_ENTER_API(FAIL) H5TRACE2("e", "ix", plist_id, options); -#ifndef H5_HAVE_C99_DESIGNATED_INITIALIZER - /* If the compiler doesn't support C99 designated initializers, check if - * the default layout structs have been initialized yet or not. *ick* -QAK - */ - if (!H5P_dcrt_def_layout_init_g) - if (H5P__init_def_layout() < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't initialize default layout info") -#endif /* H5_HAVE_C99_DESIGNATED_INITIALIZER */ - /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE))) HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") |