diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5A.c | 6 | ||||
-rw-r--r-- | src/H5L.c | 4 | ||||
-rw-r--r-- | src/H5Lpkg.h | 19 | ||||
-rw-r--r-- | src/H5Lprivate.h | 20 | ||||
-rw-r--r-- | src/H5Pprivate.h | 6 | ||||
-rw-r--r-- | src/H5Pstrcpl.c | 13 |
6 files changed, 53 insertions, 15 deletions
@@ -252,14 +252,14 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type, /* If the creation property list is H5P_DEFAULT, use the default character encoding */ if(acpl_id == H5P_DEFAULT) - attr->encoding = H5P_CHAR_ENCODING_DEF; + attr->encoding = H5F_DEFAULT_CSET; else { /* Get a local copy of the attribute creation property list */ if (NULL == (ac_plist = H5I_object(acpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") - if(H5P_get(ac_plist, H5P_CHAR_ENCODING_NAME, &(attr->encoding)) < 0) + if(H5P_get(ac_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &(attr->encoding)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get character encoding flag") } /* end else */ @@ -1037,7 +1037,7 @@ H5Aget_create_plist(hid_t attr_id) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list") /* Set the character encoding on the new property list */ - if(H5P_set(new_plist, H5P_CHAR_ENCODING_NAME, &(attr->encoding)) < 0) + if(H5P_set(new_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &(attr->encoding)) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set character encoding") ret_value = new_plist_id; @@ -1210,7 +1210,7 @@ H5L_create_real(H5G_loc_t *link_loc, const char *link_name, H5G_name_t *obj_path target_flags |= H5G_CRT_INTMD_GROUP; /* Get character encoding property */ - if(H5P_get(lc_plist, H5P_CHAR_ENCODING_NAME, &char_encoding) < 0) + if(H5P_get(lc_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &char_encoding) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for character encoding") } /* end if */ @@ -1963,7 +1963,7 @@ H5L_move(H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc, target_flags |= H5G_CRT_INTMD_GROUP; /* Get character encoding property */ - if(H5P_get(lc_plist, H5P_CHAR_ENCODING_NAME, &char_encoding) < 0) + if(H5P_get(lc_plist, H5P_STRCRT_CHAR_ENCODING_NAME, &char_encoding) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for character encoding") } /* end if */ diff --git a/src/H5Lpkg.h b/src/H5Lpkg.h index 6811049..cd8da09 100644 --- a/src/H5Lpkg.h +++ b/src/H5Lpkg.h @@ -30,6 +30,24 @@ /* Get package's private header */ #include "H5Lprivate.h" +/* Other private headers needed by this file */ + + +/**************************/ +/* Package Private Macros */ +/**************************/ + + +/****************************/ +/* Package Private Typedefs */ +/****************************/ + + +/*****************************/ +/* Package Private Variables */ +/*****************************/ + + /******************************/ /* Package Private Prototypes */ /******************************/ @@ -38,6 +56,5 @@ H5_DLL herr_t H5L_create_ud(H5G_loc_t *link_loc, const char *link_name, const void * ud_data, size_t ud_data_size, H5L_type_t type, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id); - #endif /* _H5Lpkg_H */ diff --git a/src/H5Lprivate.h b/src/H5Lprivate.h index 1816e7d..d41a18a 100644 --- a/src/H5Lprivate.h +++ b/src/H5Lprivate.h @@ -13,7 +13,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * This file contains private information about the H5DL module + * This file contains private information about the H5L module * for dealing with links in an HDF5 file. */ #ifndef _H5Lprivate_H @@ -26,6 +26,10 @@ #include "H5Gprivate.h" #include "H5Oprivate.h" +/**************************/ +/* Library Private Macros */ +/**************************/ + /* Default number of soft links to traverse */ #define H5L_NUM_LINKS 16 @@ -36,6 +40,20 @@ #define H5L_ACS_NLINKS_NAME "max soft links" /* Number of soft links to traverse */ #define H5L_ACS_ELINK_PREFIX_NAME "external link prefix" /* External link prefix */ +/****************************/ +/* Library Private Typedefs */ +/****************************/ + + +/*****************************/ +/* Library Private Variables */ +/*****************************/ + + +/******************************/ +/* Library Private Prototypes */ +/******************************/ + /* General operations on links */ H5_DLL herr_t H5L_link(H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc, hid_t lcpl_id, hid_t lapl_id, hid_t dxpl_id); diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h index 3d39251..eb765b4 100644 --- a/src/H5Pprivate.h +++ b/src/H5Pprivate.h @@ -29,10 +29,8 @@ /* Library Private Macros */ /**************************/ -/* String creation properties */ -#define H5P_CHAR_ENCODING_NAME "character_encoding" -#define H5P_CHAR_ENCODING_SIZE sizeof(H5T_cset_t) -#define H5P_CHAR_ENCODING_DEF H5F_DEFAULT_CSET +/* ======== String creation property names ======== */ +#define H5P_STRCRT_CHAR_ENCODING_NAME "character_encoding" /* Character set encoding for string */ /****************************/ diff --git a/src/H5Pstrcpl.c b/src/H5Pstrcpl.c index 46fe02d..f45c267 100644 --- a/src/H5Pstrcpl.c +++ b/src/H5Pstrcpl.c @@ -41,6 +41,11 @@ /* Local Macros */ /****************/ +/* ======== String creation properties ======== */ +/* Definitions for character set encoding property */ +#define H5P_STRCRT_CHAR_ENCODING_SIZE sizeof(H5T_cset_t) +#define H5P_STRCRT_CHAR_ENCODING_DEF H5F_DEFAULT_CSET + /******************/ /* Local Typedefs */ @@ -105,13 +110,13 @@ const H5P_libclass_t H5P_CLS_STRCRT[1] = {{ herr_t H5P_strcrt_reg_prop(H5P_genclass_t *pclass) { - H5T_cset_t char_encoding = H5P_CHAR_ENCODING_DEF; /* Default character set encoding */ + H5T_cset_t char_encoding = H5P_STRCRT_CHAR_ENCODING_DEF; /* Default character set encoding */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5P_strcrt_reg_prop, FAIL) /* Register character encoding */ - if(H5P_register(pclass, H5P_CHAR_ENCODING_NAME, H5P_CHAR_ENCODING_SIZE, + if(H5P_register(pclass, H5P_STRCRT_CHAR_ENCODING_NAME, H5P_STRCRT_CHAR_ENCODING_SIZE, &char_encoding, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class") @@ -152,7 +157,7 @@ H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set the character encoding */ - if(H5P_set(plist, H5P_CHAR_ENCODING_NAME, &encoding) < 0) + if(H5P_set(plist, H5P_STRCRT_CHAR_ENCODING_NAME, &encoding) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set character encoding") done: @@ -186,7 +191,7 @@ H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/) /* Get value */ if(encoding) - if(H5P_get(plist, H5P_CHAR_ENCODING_NAME, encoding) < 0) + if(H5P_get(plist, H5P_STRCRT_CHAR_ENCODING_NAME, encoding) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get character encoding flag") done: |