diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5.c | 567 | ||||
-rw-r--r-- | src/H5D.c | 12 | ||||
-rw-r--r-- | src/H5Distore.c | 4 | ||||
-rw-r--r-- | src/H5Dseq.c | 4 | ||||
-rw-r--r-- | src/H5FD.c | 12 | ||||
-rw-r--r-- | src/H5Farray.c | 4 | ||||
-rw-r--r-- | src/H5Fistore.c | 4 | ||||
-rw-r--r-- | src/H5Fseq.c | 4 | ||||
-rw-r--r-- | src/H5P.c | 186 | ||||
-rw-r--r-- | src/H5Pprivate.h | 8 | ||||
-rw-r--r-- | src/H5Ppublic.h | 39 |
11 files changed, 454 insertions, 390 deletions
@@ -1970,26 +1970,26 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) case H5I_TEMPLATE_5: case H5I_TEMPLATE_6: case H5I_TEMPLATE_7: + /* These will eventually go away when the old-style */ + /* property lists are converted to generic property */ + /* lists -QAK */ switch (H5P_get_class(id_type)) { - case H5P_FILE_CREATE: - fprintf(out, "H5P_FILE_CREATE"); - break; - case H5P_FILE_ACCESS: - fprintf(out, "H5P_FILE_ACCESS"); - break; - case H5P_DATASET_CREATE: - fprintf(out, "H5P_DATASET_CREATE"); - break; - case H5P_DATASET_XFER: - fprintf(out, "H5P_DATASET_XFER"); - break; - case H5P_MOUNT: - fprintf(out, "H5P_MOUNT"); - break; - default: - fprintf (out, "H5I_TEMPLATE_%d", - (int)(id_type-H5I_TEMPLATE_0)); - break; + case H5P_FILE_CREATE_OLD: + fprintf(out, "H5P_FILE_CREATE"); + break; + case H5P_FILE_ACCESS_OLD: + fprintf(out, "H5P_FILE_ACCESS"); + break; + case H5P_DATASET_CREATE_OLD: + fprintf(out, "H5P_DATASET_CREATE"); + break; + case H5P_MOUNT_OLD: + fprintf(out, "H5P_MOUNT"); + break; + default: + fprintf (out, "H5I_TEMPLATE_%d", + (int)(id_type-H5I_TEMPLATE_0)); + break; } break; case H5I_GROUP: @@ -2013,6 +2013,15 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) case H5I_REFERENCE: fprintf (out, "H5I_REFERENCE"); break; + case H5I_VFL: + fprintf (out, "H5I_VFL"); + break; + case H5I_GENPROP_CLS: + fprintf (out, "H5I_GENPROP_CLS"); + break; + case H5I_GENPROP_LST: + fprintf (out, "H5I_GENPROP_LST"); + break; case H5I_NGROUPS: fprintf (out, "H5I_NGROUPS"); break; @@ -2126,80 +2135,83 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) fprintf(out, "NULL"); } } else { - H5P_class_t plist_class = va_arg (ap, H5P_class_t); + /* Before deleting the last of these old-style lists, convert */ + /* this chunk of code to print the class of the property list */ + /* using the generic property list classes - QAK */ + H5P_class_t_old plist_class = va_arg (ap, H5P_class_t_old); switch (plist_class) { - case H5P_NO_CLASS: - fprintf (out, "H5P_NO_CLASS"); - break; - case H5P_FILE_CREATE: - fprintf (out, "H5P_FILE_CREATE"); - break; - case H5P_FILE_ACCESS: - fprintf (out, "H5P_FILE_ACCESS"); - break; - case H5P_DATASET_CREATE: - fprintf (out, "H5P_DATASET_CREATE"); - break; - case H5P_DATASET_XFER: - fprintf (out, "H5P_DATASET_XFER"); - break; - default: - fprintf (out, "%ld", (long)plist_class); - break; + case H5P_NO_CLASS_OLD: + fprintf (out, "H5P_NO_CLASS"); + break; + case H5P_FILE_CREATE_OLD: + fprintf (out, "H5P_FILE_CREATE"); + break; + case H5P_FILE_ACCESS_OLD: + fprintf (out, "H5P_FILE_ACCESS"); + break; + case H5P_DATASET_CREATE_OLD: + fprintf (out, "H5P_DATASET_CREATE"); + break; + case H5P_MOUNT_OLD: + fprintf (out, "H5P_MOUNT"); + break; + default: + fprintf (out, "%ld", (long)plist_class); + break; } } break; case 'r': if (ptr) { - if (vp) { - fprintf (out, "0x%lx", (unsigned long)vp); - } else { - fprintf(out, "NULL"); - } + if (vp) { + fprintf (out, "0x%lx", (unsigned long)vp); + } else { + fprintf(out, "NULL"); + } } else { - hobj_ref_t ref = va_arg (ap, hobj_ref_t); - fprintf (out, "Reference Object=%p", &ref); + hobj_ref_t ref = va_arg (ap, hobj_ref_t); + fprintf (out, "Reference Object=%p", &ref); } break; case 'R': switch (type[1]) { - case 't': - if (ptr) { - if (vp) { - fprintf(out, "0x%lx", (unsigned long)vp); - } else { - fprintf(out, "NULL"); - } - } else { - H5R_type_t reftype = va_arg(ap, H5R_type_t); - switch (reftype) { - case H5R_BADTYPE: - fprintf(out, "H5R_BADTYPE"); - break; - case H5R_OBJECT: - fprintf(out, "H5R_OBJECT"); - break; - case H5R_DATASET_REGION: - fprintf(out, "H5R_DATASET_REGION"); - break; - case H5R_INTERNAL: - fprintf(out, "H5R_INTERNAL"); - break; - case H5R_MAXTYPE: - fprintf(out, "H5R_MAXTYPE"); - break; - default: - fprintf(out, "BADTYPE(%ld)", (long)reftype); - break; - } - } - break; - - default: - fprintf(out, "BADTYPE(S%c)", type[1]); - goto error; + case 't': + if (ptr) { + if (vp) { + fprintf(out, "0x%lx", (unsigned long)vp); + } else { + fprintf(out, "NULL"); + } + } else { + H5R_type_t reftype = va_arg(ap, H5R_type_t); + switch (reftype) { + case H5R_BADTYPE: + fprintf(out, "H5R_BADTYPE"); + break; + case H5R_OBJECT: + fprintf(out, "H5R_OBJECT"); + break; + case H5R_DATASET_REGION: + fprintf(out, "H5R_DATASET_REGION"); + break; + case H5R_INTERNAL: + fprintf(out, "H5R_INTERNAL"); + break; + case H5R_MAXTYPE: + fprintf(out, "H5R_MAXTYPE"); + break; + default: + fprintf(out, "BADTYPE(%ld)", (long)reftype); + break; + } + } + break; + + default: + fprintf(out, "BADTYPE(S%c)", type[1]); + goto error; } break; @@ -2215,21 +2227,21 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } else { H5S_class_t cls = va_arg(ap, H5S_class_t); switch (cls) { - case H5S_NO_CLASS: - fprintf(out, "H5S_NO_CLASS"); - break; - case H5S_SCALAR: - fprintf(out, "H5S_SCALAR"); - break; - case H5S_SIMPLE: - fprintf(out, "H5S_SIMPLE"); - break; - case H5S_COMPLEX: - fprintf(out, "H5S_COMPLEX"); - break; - default: - fprintf(out, "%ld", (long)cls); - break; + case H5S_NO_CLASS: + fprintf(out, "H5S_NO_CLASS"); + break; + case H5S_SCALAR: + fprintf(out, "H5S_SCALAR"); + break; + case H5S_SIMPLE: + fprintf(out, "H5S_SIMPLE"); + break; + case H5S_COMPLEX: + fprintf(out, "H5S_COMPLEX"); + break; + default: + fprintf(out, "%ld", (long)cls); + break; } } break; @@ -2244,18 +2256,18 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } else { H5S_seloper_t so = va_arg(ap, H5S_seloper_t); switch (so) { - case H5S_SELECT_NOOP: - fprintf(out, "H5S_NOOP"); - break; - case H5S_SELECT_SET: - fprintf(out, "H5S_SELECT_SET"); - break; - case H5S_SELECT_OR: - fprintf(out, "H5S_SELECT_OR"); - break; - default: - fprintf(out, "%ld", (long)so); - break; + case H5S_SELECT_NOOP: + fprintf(out, "H5S_NOOP"); + break; + case H5S_SELECT_SET: + fprintf(out, "H5S_SELECT_SET"); + break; + case H5S_SELECT_OR: + fprintf(out, "H5S_SELECT_OR"); + break; + default: + fprintf(out, "%ld", (long)so); + break; } } break; @@ -2291,15 +2303,15 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } else { H5T_cset_t cset = va_arg (ap, H5T_cset_t); switch (cset) { - case H5T_CSET_ERROR: - fprintf (out, "H5T_CSET_ERROR"); - break; - case H5T_CSET_ASCII: - fprintf (out, "H5T_CSET_ASCII"); - break; - default: - fprintf (out, "%ld", (long)cset); - break; + case H5T_CSET_ERROR: + fprintf (out, "H5T_CSET_ERROR"); + break; + case H5T_CSET_ASCII: + fprintf (out, "H5T_CSET_ASCII"); + break; + default: + fprintf (out, "%ld", (long)cset); + break; } } break; @@ -2314,18 +2326,18 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } else { H5T_pers_t pers = va_arg(ap, H5T_pers_t); switch (pers) { - case H5T_PERS_DONTCARE: - fprintf(out, "H5T_PERS_DONTCARE"); - break; - case H5T_PERS_SOFT: - fprintf(out, "H5T_PERS_SOFT"); - break; - case H5T_PERS_HARD: - fprintf(out, "H5T_PERS_HARD"); - break; - default: - fprintf(out, "%ld", (long)pers); - break; + case H5T_PERS_DONTCARE: + fprintf(out, "H5T_PERS_DONTCARE"); + break; + case H5T_PERS_SOFT: + fprintf(out, "H5T_PERS_SOFT"); + break; + case H5T_PERS_HARD: + fprintf(out, "H5T_PERS_HARD"); + break; + default: + fprintf(out, "%ld", (long)pers); + break; } } break; @@ -2340,21 +2352,21 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } else { H5T_norm_t norm = va_arg (ap, H5T_norm_t); switch (norm) { - case H5T_NORM_ERROR: - fprintf (out, "H5T_NORM_ERROR"); - break; - case H5T_NORM_IMPLIED: - fprintf (out, "H5T_NORM_IMPLIED"); - break; - case H5T_NORM_MSBSET: - fprintf (out, "H5T_NORM_MSBSET"); - break; - case H5T_NORM_NONE: - fprintf (out, "H5T_NORM_NONE"); - break; - default: - fprintf (out, "%ld", (long)norm); - break; + case H5T_NORM_ERROR: + fprintf (out, "H5T_NORM_ERROR"); + break; + case H5T_NORM_IMPLIED: + fprintf (out, "H5T_NORM_IMPLIED"); + break; + case H5T_NORM_MSBSET: + fprintf (out, "H5T_NORM_MSBSET"); + break; + case H5T_NORM_NONE: + fprintf (out, "H5T_NORM_NONE"); + break; + default: + fprintf (out, "%ld", (long)norm); + break; } } break; @@ -2369,24 +2381,24 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } else { H5T_order_t order = va_arg (ap, H5T_order_t); switch (order) { - case H5T_ORDER_ERROR: - fprintf (out, "H5T_ORDER_ERROR"); - break; - case H5T_ORDER_LE: - fprintf (out, "H5T_ORDER_LE"); - break; - case H5T_ORDER_BE: - fprintf (out, "H5T_ORDER_BE"); - break; - case H5T_ORDER_VAX: - fprintf (out, "H5T_ORDER_VAX"); - break; - case H5T_ORDER_NONE: - fprintf (out, "H5T_ORDER_NONE"); - break; - default: - fprintf (out, "%ld", (long)order); - break; + case H5T_ORDER_ERROR: + fprintf (out, "H5T_ORDER_ERROR"); + break; + case H5T_ORDER_LE: + fprintf (out, "H5T_ORDER_LE"); + break; + case H5T_ORDER_BE: + fprintf (out, "H5T_ORDER_BE"); + break; + case H5T_ORDER_VAX: + fprintf (out, "H5T_ORDER_VAX"); + break; + case H5T_ORDER_NONE: + fprintf (out, "H5T_ORDER_NONE"); + break; + default: + fprintf (out, "%ld", (long)order); + break; } } break; @@ -2401,21 +2413,21 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } else { H5T_pad_t pad = va_arg (ap, H5T_pad_t); switch (pad) { - case H5T_PAD_ERROR: - fprintf (out, "H5T_PAD_ERROR"); - break; - case H5T_PAD_ZERO: - fprintf (out, "H5T_PAD_ZERO"); - break; - case H5T_PAD_ONE: - fprintf (out, "H5T_PAD_ONE"); - break; - case H5T_PAD_BACKGROUND: - fprintf (out, "H5T_PAD_BACKGROUND"); - break; - default: - fprintf (out, "%ld", (long)pad); - break; + case H5T_PAD_ERROR: + fprintf (out, "H5T_PAD_ERROR"); + break; + case H5T_PAD_ZERO: + fprintf (out, "H5T_PAD_ZERO"); + break; + case H5T_PAD_ONE: + fprintf (out, "H5T_PAD_ONE"); + break; + case H5T_PAD_BACKGROUND: + fprintf (out, "H5T_PAD_BACKGROUND"); + break; + default: + fprintf (out, "%ld", (long)pad); + break; } } break; @@ -2430,18 +2442,18 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } else { H5T_sign_t sign = va_arg (ap, H5T_sign_t); switch (sign) { - case H5T_SGN_ERROR: - fprintf (out, "H5T_SGN_ERROR"); - break; - case H5T_SGN_NONE: - fprintf (out, "H5T_SGN_NONE"); - break; - case H5T_SGN_2: - fprintf (out, "H5T_SGN_2"); - break; - default: - fprintf (out, "%ld", (long)sign); - break; + case H5T_SGN_ERROR: + fprintf (out, "H5T_SGN_ERROR"); + break; + case H5T_SGN_NONE: + fprintf (out, "H5T_SGN_NONE"); + break; + case H5T_SGN_2: + fprintf (out, "H5T_SGN_2"); + break; + default: + fprintf (out, "%ld", (long)sign); + break; } } break; @@ -2456,36 +2468,36 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } else { H5T_class_t type_class = va_arg(ap, H5T_class_t); switch (type_class) { - case H5T_NO_CLASS: - fprintf(out, "H5T_NO_CLASS"); - break; - case H5T_INTEGER: - fprintf(out, "H5T_INTEGER"); - break; - case H5T_FLOAT: - fprintf(out, "H5T_FLOAT"); - break; - case H5T_TIME: - fprintf(out, "H5T_TIME"); - break; - case H5T_STRING: - fprintf(out, "H5T_STRING"); - break; - case H5T_BITFIELD: - fprintf(out, "H5T_BITFIELD"); - break; - case H5T_OPAQUE: - fprintf(out, "H5T_OPAQUE"); - break; - case H5T_COMPOUND: - fprintf(out, "H5T_COMPOUND"); - break; - case H5T_ENUM: - fprintf(out, "H5T_ENUM"); - break; - default: - fprintf(out, "%ld", (long)type_class); - break; + case H5T_NO_CLASS: + fprintf(out, "H5T_NO_CLASS"); + break; + case H5T_INTEGER: + fprintf(out, "H5T_INTEGER"); + break; + case H5T_FLOAT: + fprintf(out, "H5T_FLOAT"); + break; + case H5T_TIME: + fprintf(out, "H5T_TIME"); + break; + case H5T_STRING: + fprintf(out, "H5T_STRING"); + break; + case H5T_BITFIELD: + fprintf(out, "H5T_BITFIELD"); + break; + case H5T_OPAQUE: + fprintf(out, "H5T_OPAQUE"); + break; + case H5T_COMPOUND: + fprintf(out, "H5T_COMPOUND"); + break; + case H5T_ENUM: + fprintf(out, "H5T_ENUM"); + break; + default: + fprintf(out, "%ld", (long)type_class); + break; } } break; @@ -2500,21 +2512,21 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } else { H5T_str_t str = va_arg(ap, H5T_str_t); switch (str) { - case H5T_STR_ERROR: - fprintf(out, "H5T_STR_ERROR"); - break; - case H5T_STR_NULLTERM: - fprintf(out, "H5T_STR_NULLTERM"); - break; - case H5T_STR_NULLPAD: - fprintf(out, "H5T_STR_NULLPAD"); - break; - case H5T_STR_SPACEPAD: - fprintf(out, "H5T_STR_SPACEPAD"); - break; - default: - fprintf(out, "%ld", (long)str); - break; + case H5T_STR_ERROR: + fprintf(out, "H5T_STR_ERROR"); + break; + case H5T_STR_NULLTERM: + fprintf(out, "H5T_STR_NULLTERM"); + break; + case H5T_STR_NULLPAD: + fprintf(out, "H5T_STR_NULLPAD"); + break; + case H5T_STR_SPACEPAD: + fprintf(out, "H5T_STR_SPACEPAD"); + break; + default: + fprintf(out, "%ld", (long)str); + break; } } break; @@ -2572,6 +2584,7 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } } else { size_t size = va_arg (ap, size_t); + HDfprintf (out, "%Zu", size); asize[argno] = (hssize_t)size; } @@ -2579,48 +2592,50 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) case 'Z': switch (type[1]) { - case 'f': - if (ptr) { - if (vp) { - fprintf (out, "0x%lx", (unsigned long)vp); - } else { - fprintf(out, "NULL"); - } - } else { - H5Z_filter_t id = va_arg (ap, H5Z_filter_t); - if (H5Z_FILTER_DEFLATE==id) { - fprintf (out, "H5Z_FILTER_DEFLATE"); - } else { - fprintf (out, "%ld", (long)id); - } - } - break; - - case 's': - if (ptr) { - if (vp) { - fprintf (out, "0x%lx", (unsigned long)vp); - if (vp && asize_idx>=0 && asize[asize_idx]>=0) { - ssize_t *p = (ssize_t*)vp; - fprintf(out, " {"); - for (i=0; i<asize[asize_idx]; i++) { - HDfprintf(out, "%s%Zd", i?", ":"", p[i]); - } - fprintf(out, "}"); - } - } else { - fprintf(out, "NULL"); - } - } else { - ssize_t ssize = va_arg (ap, ssize_t); - HDfprintf (out, "%Zd", ssize); - asize[argno] = (hssize_t)ssize; - } - break; - - default: - fprintf (out, "BADTYPE(Z%c)", type[1]); - goto error; + case 'f': + if (ptr) { + if (vp) { + fprintf (out, "0x%lx", (unsigned long)vp); + } else { + fprintf(out, "NULL"); + } + } else { + H5Z_filter_t id = va_arg (ap, H5Z_filter_t); + + if (H5Z_FILTER_DEFLATE==id) { + fprintf (out, "H5Z_FILTER_DEFLATE"); + } else { + fprintf (out, "%ld", (long)id); + } + } + break; + + case 's': + if (ptr) { + if (vp) { + fprintf (out, "0x%lx", (unsigned long)vp); + if (vp && asize_idx>=0 && asize[asize_idx]>=0) { + ssize_t *p = (ssize_t*)vp; + fprintf(out, " {"); + for (i=0; i<asize[asize_idx]; i++) { + HDfprintf(out, "%s%Zd", i?", ":"", p[i]); + } + fprintf(out, "}"); + } + } else { + fprintf(out, "NULL"); + } + } else { + ssize_t ssize = va_arg (ap, ssize_t); + + HDfprintf (out, "%Zd", ssize); + asize[argno] = (hssize_t)ssize; + } + break; + + default: + fprintf (out, "BADTYPE(Z%c)", type[1]); + goto error; } break; @@ -2634,7 +2649,7 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...) } } - error: +error: va_end (ap); if (returning) { fprintf (out, ";\n"); @@ -875,7 +875,7 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, plist_id= H5P_DATASET_XFER_DEFAULT; if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); if (!buf) HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer"); @@ -973,7 +973,7 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, plist_id= H5P_DATASET_XFER_DEFAULT; if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); if (!buf) HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer"); @@ -1783,7 +1783,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, assert(mem_type); assert(buf); assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); /* Initialize these before any errors can occur */ HDmemset(&mem_iter,0,sizeof(H5S_sel_iter_t)); @@ -2230,7 +2230,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, assert(mem_type); assert(buf); assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); #ifdef H5_HAVE_PARALLEL /* If MPIO is used, no VL datatype support yet. */ @@ -3133,7 +3133,7 @@ H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf) plist_id= H5P_DATASET_XFER_DEFAULT; if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms"); /* Call H5Diterate with args, etc. */ @@ -3299,7 +3299,7 @@ H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "no temporary buffers available"); /* Change to the custom memory allocation routines for reading VL data */ - if((vlen_bufsize.xfer_pid=H5Pcreate_list(H5P_DATASET_XFER_NEW))<0) + if((vlen_bufsize.xfer_pid=H5Pcreate_list(H5P_DATASET_XFER))<0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "no dataset xfer plists available"); if(H5Pset_vlen_mem_manager(vlen_bufsize.xfer_pid,H5D_vlen_get_buf_size_alloc,&vlen_bufsize,NULL,NULL)<0) diff --git a/src/H5Distore.c b/src/H5Distore.c index c5f12a3..4ddb4d4 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -1501,7 +1501,7 @@ H5F_istore_lock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, ent->chunk = chunk; assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); H5Pget(dxpl_id,H5D_XFER_BTREE_SPLIT_RATIO_NAME,&(ent->split_ratios)); /* Add it to the cache */ @@ -1644,7 +1644,7 @@ H5F_istore_unlock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, x.chunk = chunk; assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); H5Pget(dxpl_id,H5D_XFER_BTREE_SPLIT_RATIO_NAME,&(x.split_ratios)); H5F_istore_flush_entry (f, &x, TRUE); diff --git a/src/H5Dseq.c b/src/H5Dseq.c index b1c7c3b..45a6815 100644 --- a/src/H5Dseq.c +++ b/src/H5Dseq.c @@ -174,7 +174,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(real_buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); #ifdef H5_HAVE_PARALLEL { @@ -548,7 +548,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(real_buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); #ifdef H5_HAVE_PARALLEL { @@ -292,11 +292,11 @@ H5FD_get_class(hid_t id) } else if (H5I_VFL==H5I_get_type(id)) { ret_value = H5I_object(id); } else if (H5I_GENPROP_LST == H5I_get_type(id) && - TRUE==H5Pisa_class(id,H5P_DATASET_XFER_NEW)) { + TRUE==H5Pisa_class(id,H5P_DATASET_XFER)) { ret_value = H5FD_get_class(H5P_peek_hid_t(id,H5D_XFER_VFL_ID_NAME)); } else { switch (H5P_get_class(id)) { - case H5P_FILE_ACCESS: + case H5P_FILE_ACCESS_OLD: if (NULL==(fapl=H5I_object(id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list"); @@ -1968,7 +1968,7 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size if (H5P_DEFAULT == dxpl_id) dxpl_id= H5P_DATASET_XFER_DEFAULT; if (H5I_GENPROP_LST != H5I_get_type(dxpl_id) || - TRUE!=H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(dxpl_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); if (!buf) HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null result buffer"); @@ -2008,7 +2008,7 @@ H5FD_read(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz FUNC_ENTER(H5FD_read, FAIL); assert(file && file->cls); assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); assert(buf); #ifndef H5_HAVE_PARALLEL @@ -2121,7 +2121,7 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz if (H5P_DEFAULT == dxpl_id) dxpl_id= H5P_DATASET_XFER_DEFAULT; if (H5I_GENPROP_LST != H5I_get_type(dxpl_id) || - TRUE!=H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(dxpl_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data transfer property list"); if (!buf) HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null buffer"); @@ -2164,7 +2164,7 @@ H5FD_write(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t si FUNC_ENTER(H5FD_write, FAIL); assert(file && file->cls); assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); assert(buf); #ifndef H5_HAVE_PARALLEL diff --git a/src/H5Farray.c b/src/H5Farray.c index ff69cfa..54dd376 100644 --- a/src/H5Farray.c +++ b/src/H5Farray.c @@ -167,7 +167,7 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); /* Make a local copy of size so we can modify it */ H5V_vector_cpy(layout->ndims, hslab_size, _hslab_size); @@ -454,7 +454,7 @@ H5F_arr_write(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); /* Make a local copy of _size so we can modify it */ H5V_vector_cpy(layout->ndims, hslab_size, _hslab_size); diff --git a/src/H5Fistore.c b/src/H5Fistore.c index c5f12a3..4ddb4d4 100644 --- a/src/H5Fistore.c +++ b/src/H5Fistore.c @@ -1501,7 +1501,7 @@ H5F_istore_lock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, ent->chunk = chunk; assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); H5Pget(dxpl_id,H5D_XFER_BTREE_SPLIT_RATIO_NAME,&(ent->split_ratios)); /* Add it to the cache */ @@ -1644,7 +1644,7 @@ H5F_istore_unlock(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, x.chunk = chunk; assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); H5Pget(dxpl_id,H5D_XFER_BTREE_SPLIT_RATIO_NAME,&(x.split_ratios)); H5F_istore_flush_entry (f, &x, TRUE); diff --git a/src/H5Fseq.c b/src/H5Fseq.c index b1c7c3b..45a6815 100644 --- a/src/H5Fseq.c +++ b/src/H5Fseq.c @@ -174,7 +174,7 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(real_buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); #ifdef H5_HAVE_PARALLEL { @@ -548,7 +548,7 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, assert(real_buf); /* Make certain we have the correct type of property list */ assert(H5I_GENPROP_LST==H5I_get_type(dxpl_id)); - assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER_NEW)); + assert(TRUE==H5Pisa_class(dxpl_id,H5P_DATASET_XFER)); #ifdef H5_HAVE_PARALLEL { @@ -34,6 +34,15 @@ static int interface_initialize_g = 0; #define INTERFACE_INIT H5P_init_interface static herr_t H5P_init_interface(void); +/* hid_t aliases for old H5P_class_t enum values */ +/* These go away as each old-style property list is converted to a generic */ +/* property list -QAK */ +hid_t H5P_NO_CLASS=(hid_t)H5P_NO_CLASS_OLD; +hid_t H5P_FILE_CREATE=(hid_t)H5P_FILE_CREATE_OLD; +hid_t H5P_FILE_ACCESS=(hid_t)H5P_FILE_ACCESS_OLD; +hid_t H5P_DATASET_CREATE=(hid_t)H5P_DATASET_CREATE_OLD; +hid_t H5P_MOUNT=(hid_t)H5P_MOUNT_OLD; + /* * Predefined property list classes. These are initialized at runtime by * H5P_init_interface() in this source file. @@ -167,14 +176,14 @@ H5P_init_interface(void) FUNC_ENTER(H5P_init_interface, FAIL); - assert(H5P_NCLASSES <= H5I_TEMPLATE_MAX - H5I_TEMPLATE_0); + assert(H5P_NCLASSES_OLD <= H5I_TEMPLATE_MAX - H5I_TEMPLATE_0); /* * Initialize the mappings between property list classes and atom * groups. We keep the two separate because property list classes are * publicly visible but atom groups aren't. */ - for (i = 0; i < H5P_NCLASSES; i++) { + for (i = 0; i < H5P_NCLASSES_OLD; i++) { status = H5I_init_group((H5I_type_t)(H5I_TEMPLATE_0 +i), H5I_TEMPID_HASHSIZE, 0, (H5I_free_t)H5P_close); if (status < 0) @@ -269,20 +278,20 @@ H5P_term_interface(void) /* Destroy HDF5 library property classes & lists */ /* Check if there are any open property list classes or lists */ - for (i=0; i<H5P_NCLASSES; i++) + for (i=0; i<H5P_NCLASSES_OLD; i++) n += H5I_nmembers((H5I_type_t)(H5I_TEMPLATE_0+i)); n += H5I_nmembers(H5I_GENPROP_CLS); n += H5I_nmembers(H5I_GENPROP_LST); /* If there are any open classes or groups, attempt to get rid of them. */ if (n) { - for (i=0; i<H5P_NCLASSES; i++) + for (i=0; i<H5P_NCLASSES_OLD; i++) H5I_clear_group((H5I_type_t)(H5I_TEMPLATE_0+i), FALSE); H5I_clear_group(H5I_GENPROP_CLS, FALSE); H5I_clear_group(H5I_GENPROP_LST, FALSE); } else { /* Close the ID groups which hold the property list classes & lists */ - for (i=0; i<H5P_NCLASSES; i++) { + for (i=0; i<H5P_NCLASSES_OLD; i++) { H5I_destroy_group((H5I_type_t)(H5I_TEMPLATE_0 + i)); n++; /*H5I*/ } @@ -317,45 +326,61 @@ H5P_term_interface(void) *------------------------------------------------------------------------- */ hid_t -H5Pcreate(H5P_class_t type) +H5Pcreate(hid_t type) { hid_t ret_value = FAIL; const void *src = NULL; H5P_t *new_plist = NULL; + H5P_class_t_old old_type; FUNC_ENTER(H5Pcreate, FAIL); H5TRACE1("i","p",type); - /* Allocate a new property list and initialize it with default values */ - switch (type) { - case H5P_FILE_CREATE: - src = &H5F_create_dflt; - break; - case H5P_FILE_ACCESS: - src = &H5F_access_dflt; - break; - case H5P_DATASET_CREATE: - src = &H5D_create_dflt; - break; - case H5P_MOUNT: - src = &H5F_mount_dflt; - break; - default: - HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, - "unknown property list class"); - } - - /* Copy the property list */ - if (NULL==(new_plist=H5P_copy(type, src))) { - HRETURN_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, - "unable to copy default property list"); - } - - /* Atomize the new property list */ - if ((ret_value = H5P_create(type, new_plist)) < 0) { - HRETURN_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, - "unable to register property list"); - } + /* Kludge to detect generic property creations and divert them to the */ + /* generic property list creation routine - QAK */ + if (H5I_GENPROP_CLS == H5I_get_type(type)) { + if((ret_value=H5Pcreate_list(type))<0) + HRETURN_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create property list"); + } /* end if */ + else { + /* Set the type of the property list to create for older property lists */ + old_type=(H5P_class_t_old)type; +assert( old_type==H5P_FILE_CREATE_OLD || + old_type==H5P_FILE_ACCESS_OLD || + old_type==H5P_DATASET_CREATE_OLD || + old_type==H5P_MOUNT_OLD); + + /* Allocate a new property list and initialize it with default values */ + switch (old_type) { + case H5P_FILE_CREATE_OLD: + src = &H5F_create_dflt; + break; + case H5P_FILE_ACCESS_OLD: + src = &H5F_access_dflt; + break; + case H5P_DATASET_CREATE_OLD: + src = &H5D_create_dflt; + break; + case H5P_MOUNT_OLD: + src = &H5F_mount_dflt; + break; + default: + HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, + "unknown property list class"); + } /* end switch */ + + /* Copy the property list */ + if (NULL==(new_plist=H5P_copy(old_type, src))) { + HRETURN_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, + "unable to copy default property list"); + } /* end if */ + + /* Atomize the new property list */ + if ((ret_value = H5P_create(old_type, new_plist)) < 0) { + HRETURN_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, + "unable to register property list"); + } /* end if */ + } /* end else */ FUNC_LEAVE(ret_value); } @@ -381,14 +406,14 @@ H5Pcreate(H5P_class_t type) *------------------------------------------------------------------------- */ hid_t -H5P_create(H5P_class_t type, H5P_t *plist) +H5P_create(H5P_class_t_old type, H5P_t *plist) { hid_t ret_value = FAIL; FUNC_ENTER(H5P_create, FAIL); /* check args */ - assert(type >= 0 && type < H5P_NCLASSES); + assert(type >= 0 && type < H5P_NCLASSES_OLD); assert(plist); /* Atomize the new property list */ @@ -427,13 +452,22 @@ H5Pclose(hid_t plist_id) /* Check arguments */ if (plist_id==H5P_DEFAULT) HRETURN(SUCCEED); - if (H5P_get_class (plist_id)<0) { - HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); - } - - /* When the reference count reaches zero the resources are freed */ - if (H5I_dec_ref(plist_id) < 0) - HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "problem freeing property list"); + + /* Kludge to detect generic property creations and divert them to the */ + /* generic property list creation routine - QAK */ + if (H5I_GENPROP_LST == H5I_get_type(plist_id)) { + if(H5Pclose_list(plist_id)<0) + HRETURN_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to close property list"); + } /* end if */ + else { + if (H5P_get_class (plist_id)<0) { + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); + } + + /* When the reference count reaches zero the resources are freed */ + if (H5I_dec_ref(plist_id) < 0) + HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "problem freeing property list"); + } /* end else */ FUNC_LEAVE (SUCCEED); } @@ -470,7 +504,7 @@ H5P_close(void *_plist) /* Some property lists may need to do special things */ switch (plist->cls) { - case H5P_FILE_ACCESS: + case H5P_FILE_ACCESS_OLD: if (fa_list->driver_id>=0) { H5FD_fapl_free(fa_list->driver_id, fa_list->driver_info); H5I_dec_ref(fa_list->driver_id); @@ -479,16 +513,16 @@ H5P_close(void *_plist) } break; - case H5P_FILE_CREATE: + case H5P_FILE_CREATE_OLD: break; - case H5P_DATASET_CREATE: + case H5P_DATASET_CREATE_OLD: H5O_reset(H5O_FILL, &(dc_list->fill)); H5O_reset(H5O_EFL, &(dc_list->efl)); H5O_reset(H5O_PLINE, &(dc_list->pline)); break; - case H5P_MOUNT: + case H5P_MOUNT_OLD: break; default: @@ -519,10 +553,10 @@ H5P_close(void *_plist) * *------------------------------------------------------------------------- */ -H5P_class_t +hid_t H5Pget_class(hid_t plist_id) { - H5P_class_t ret_value = H5P_NO_CLASS; + hid_t ret_value = H5P_NO_CLASS; FUNC_ENTER(H5Pget_class, H5P_NO_CLASS); H5TRACE1("p","i",plist_id); @@ -548,13 +582,13 @@ H5Pget_class(hid_t plist_id) * *------------------------------------------------------------------------- */ -H5P_class_t +H5P_class_t_old H5P_get_class(hid_t plist_id) { H5I_type_t group; - H5P_class_t ret_value = H5P_NO_CLASS; + H5P_class_t_old ret_value = H5P_NO_CLASS; - FUNC_ENTER(H5P_get_class, H5P_NO_CLASS); + FUNC_ENTER(H5P_get_class, H5P_NO_CLASS_OLD); if ((group = H5I_get_type(plist_id)) < 0 || group >= H5I_TEMPLATE_MAX || @@ -563,7 +597,7 @@ H5P_get_class(hid_t plist_id) "not a property list"); } - ret_value = (H5P_class_t)(group - H5I_TEMPLATE_0); + ret_value = (H5P_class_t_old)(group - H5I_TEMPLATE_0); FUNC_LEAVE(ret_value); } @@ -833,7 +867,7 @@ H5Pcopy(hid_t plist_id) { const void *plist = NULL; void *new_plist = NULL; - H5P_class_t type; + H5P_class_t_old type; hid_t ret_value = FAIL; H5I_type_t group; @@ -900,7 +934,7 @@ H5Pcopy(hid_t plist_id) *------------------------------------------------------------------------- */ void * -H5P_copy (H5P_class_t type, const void *src) +H5P_copy (H5P_class_t_old type, const void *src) { size_t size; H5P_t *dst = NULL; @@ -912,19 +946,19 @@ H5P_copy (H5P_class_t type, const void *src) /* How big is the property list */ switch (type) { - case H5P_FILE_CREATE: + case H5P_FILE_CREATE_OLD: size = sizeof(H5F_create_t); break; - case H5P_FILE_ACCESS: + case H5P_FILE_ACCESS_OLD: size = sizeof(H5F_access_t); break; - case H5P_DATASET_CREATE: + case H5P_DATASET_CREATE_OLD: size = sizeof(H5D_create_t); break; - case H5P_MOUNT: + case H5P_MOUNT_OLD: size = sizeof(H5F_mprop_t); break; @@ -947,10 +981,10 @@ H5P_copy (H5P_class_t type, const void *src) /* Deep-copy pointers */ switch (type) { - case H5P_FILE_CREATE: + case H5P_FILE_CREATE_OLD: break; - case H5P_FILE_ACCESS: + case H5P_FILE_ACCESS_OLD: fa_dst = (H5F_access_t*)dst; if (fa_dst->driver_id>=0) { @@ -960,7 +994,7 @@ H5P_copy (H5P_class_t type, const void *src) } break; - case H5P_DATASET_CREATE: + case H5P_DATASET_CREATE_OLD: dc_src = (const H5D_create_t*)src; dc_dst = (H5D_create_t*)dst; @@ -984,7 +1018,7 @@ H5P_copy (H5P_class_t type, const void *src) } break; - case H5P_MOUNT: + case H5P_MOUNT_OLD: /* Nothing to do */ break; @@ -2290,7 +2324,7 @@ H5Pget_buffer(hid_t plist_id, void **tconv/*out*/, void **bkg/*out*/) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, 0, "not a dataset transfer property list"); /* Return values */ @@ -2348,7 +2382,7 @@ H5Pset_hyper_cache(hid_t plist_id, unsigned cache, unsigned limit) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list"); /* Update property list */ @@ -2386,7 +2420,7 @@ H5Pget_hyper_cache(hid_t plist_id, unsigned *cache/*out*/, /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Return values */ @@ -2431,7 +2465,7 @@ H5Pset_preserve(hid_t plist_id, hbool_t status) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Update property list */ @@ -2469,7 +2503,7 @@ H5Pget_preserve(hid_t plist_id) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); @@ -2790,7 +2824,7 @@ H5Pget_btree_ratios(hid_t plist_id, double *left/*out*/, double *middle/*out*/, /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Get the split ratios */ @@ -2842,7 +2876,7 @@ H5Pset_btree_ratios(hid_t plist_id, double left, double middle, /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); if (left<0.0 || left>1.0 || middle<0.0 || middle>1.0 || right<0.0 || right>1.0) @@ -3147,7 +3181,7 @@ H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Update property list */ @@ -3189,7 +3223,7 @@ H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func/*out*/, /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); if(alloc_func!=NULL) { @@ -3412,7 +3446,7 @@ H5Pset_hyper_vector_size(hid_t plist_id, size_t vector_size) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); if (vector_size<1) @@ -3448,7 +3482,7 @@ H5Pget_hyper_vector_size(hid_t plist_id, size_t *vector_size/*out*/) /* Check arguments */ if (H5I_GENPROP_LST != H5I_get_type(plist_id) || - TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER_NEW)) + TRUE!=H5Pisa_class(plist_id,H5P_DATASET_XFER)) HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list"); /* Return values */ diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index fa67af4..61916f1 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -98,13 +98,13 @@ typedef struct { H5D_create_t dcreate; /* Dataset creation properties */ H5F_mprop_t mount; /* Mounting properties */ } u; - H5P_class_t cls; /* Property list class */ + H5P_class_t_old cls; /* Property list class */ } H5P_t; /* Private functions, not part of the publicly documented API */ __DLL__ herr_t H5P_init(void); -__DLL__ hid_t H5P_create(H5P_class_t type, H5P_t *plist); -__DLL__ void *H5P_copy(H5P_class_t type, const void *src); +__DLL__ hid_t H5P_create(H5P_class_t_old type, H5P_t *plist); +__DLL__ void *H5P_copy(H5P_class_t_old type, const void *src); __DLL__ herr_t H5P_close(void *plist); __DLL__ herr_t H5P_register(H5P_genclass_t *pclass, const char *name, size_t size, void *def_value, H5P_prp_create_func_t prp_create, H5P_prp_set_func_t prp_set, @@ -112,7 +112,7 @@ __DLL__ herr_t H5P_register(H5P_genclass_t *pclass, const char *name, size_t siz H5P_prp_copy_func_t prp_copy, H5P_prp_close_func_t prp_close); __DLL__ herr_t H5P_get(hid_t plist_id, const char *name, void *value); __DLL__ herr_t H5P_set(hid_t plist_id, const char *name, void *value); -__DLL__ H5P_class_t H5P_get_class(hid_t tid); +__DLL__ H5P_class_t_old H5P_get_class(hid_t tid); __DLL__ hid_t H5P_get_driver(hid_t plist_id); /* Private functions to "peek" at properties of a certain type */ diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h index a4a6522..fec9801 100644 --- a/src/H5Ppublic.h +++ b/src/H5Ppublic.h @@ -37,15 +37,30 @@ typedef long off_t; /*__MWERKS__*/ /* Property list classes */ -typedef enum H5P_class_t { - H5P_NO_CLASS = -1, /*error return value */ - H5P_FILE_CREATE = 0, /*file creation properties */ - H5P_FILE_ACCESS = 1, /*file access properties */ - H5P_DATASET_CREATE = 2, /*dataset creation properties */ - H5P_DATASET_XFER = 3, /*data transfer properties */ - H5P_MOUNT = 4, /*file mounting properties */ - H5P_NCLASSES /*this must be last! */ -} H5P_class_t; +typedef enum H5P_class_t_old { + H5P_NO_CLASS_OLD = -1, /*error return value */ + H5P_FILE_CREATE_OLD = 0, /*file creation properties */ + H5P_FILE_ACCESS_OLD = 1, /*file access properties */ + H5P_DATASET_CREATE_OLD= 2, /*dataset creation properties */ + H5P_MOUNT_OLD = 3, /*file mounting properties */ + H5P_NCLASSES_OLD /*this must be last! */ +} H5P_class_t_old; + +/* This typedef should go in the v1.4 compat section when all the internal */ +/* property lists are switched to generic property lists - QAK */ +typedef hid_t H5P_class_t; /* Alias H5P_class_t to hid_t */ +/* hid_t aliases for old H5P_class_t enum values */ +/* These go away as each old-style property list is converted to a generic */ +/* property list -QAK */ +/* Also - merge/delete H5Pcreate and H5Pcreate_list */ +/* - merge/delete H5Pget_class and H5Pget_class_new */ +/* - merge/delete H5Pcopy and H5Pcopy_new */ +/* - merge/delete H5Pclose and H5Pclose_list */ +__DLLVAR__ hid_t H5P_NO_CLASS; +__DLLVAR__ hid_t H5P_FILE_CREATE; +__DLLVAR__ hid_t H5P_FILE_ACCESS; +__DLLVAR__ hid_t H5P_DATASET_CREATE; +__DLLVAR__ hid_t H5P_MOUNT; /* H5P_DATASET_XFER was the name from the beginning through 1.2. It was * changed to H5P_DATA_XFER on v1.3.0. Then it was changed back to @@ -86,7 +101,7 @@ extern "C" { #define H5P_FILE_ACCESS_HASH_SIZE 17 #define H5P_DATASET_CREATE_NEW (H5open(), H5P_CLS_DATASET_CREATE_g) #define H5P_DATASET_CREATE_HASH_SIZE 17 -#define H5P_DATASET_XFER_NEW (H5open(), H5P_CLS_DATASET_XFER_g) +#define H5P_DATASET_XFER (H5open(), H5P_CLS_DATASET_XFER_g) #define H5P_DATASET_XFER_HASH_SIZE 17 #define H5P_MOUNT_NEW (H5open(), H5P_CLS_MOUNT_g) #define H5P_MOUNT_HASH_SIZE 17 @@ -146,10 +161,10 @@ __DLL__ herr_t H5Premove(hid_t plist_id, const char *name); __DLL__ herr_t H5Punregister(hid_t pclass_id, const char *name); __DLL__ herr_t H5Pclose_list(hid_t plist_id); __DLL__ herr_t H5Pclose_class(hid_t plist_id); -__DLL__ hid_t H5Pcreate(H5P_class_t type); +__DLL__ hid_t H5Pcreate(hid_t type); __DLL__ herr_t H5Pclose(hid_t plist_id); __DLL__ hid_t H5Pcopy(hid_t plist_id); -__DLL__ H5P_class_t H5Pget_class(hid_t plist_id); +__DLL__ hid_t H5Pget_class(hid_t plist_id); __DLL__ herr_t H5Pget_version(hid_t plist_id, int *boot/*out*/, int *freelist/*out*/, int *stab/*out*/, int *shhdr/*out*/); |