diff options
author | James Laird <jlaird@hdfgroup.org> | 2006-01-02 19:20:19 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2006-01-02 19:20:19 (GMT) |
commit | 216a6e99047f32a8cdf857f6cf3b195d605549a1 (patch) | |
tree | 8f48cea87963afad81a38fd70edb45238848299e /src/H5P.c | |
parent | 63e522aa138db60749a97f0d6896934b8a6d338c (diff) | |
download | hdf5-216a6e99047f32a8cdf857f6cf3b195d605549a1.zip hdf5-216a6e99047f32a8cdf857f6cf3b195d605549a1.tar.gz hdf5-216a6e99047f32a8cdf857f6cf3b195d605549a1.tar.bz2 |
[svn-r11850] Purpose:
Feature
Description:
Added character encoding and attribute creation property lists.
Solution:
Attributes' character encoding is set via the ACPL.
The default is ASCII, with UTF-8 being the other option currently.
Platforms tested:
heping, mir, sleipnir, copper
Diffstat (limited to 'src/H5P.c')
-rw-r--r-- | src/H5P.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -54,6 +54,7 @@ hid_t H5P_CLS_GROUP_CREATE_g = FAIL; hid_t H5P_CLS_GROUP_ACCESS_g = FAIL; hid_t H5P_CLS_DATATYPE_CREATE_g = FAIL; hid_t H5P_CLS_DATATYPE_ACCESS_g = FAIL; +hid_t H5P_CLS_ATTRIBUTE_CREATE_g = FAIL; /* * Predefined property lists for each predefined class. These are initialized @@ -70,6 +71,7 @@ hid_t H5P_LST_GROUP_CREATE_g = FAIL; hid_t H5P_LST_GROUP_ACCESS_g = FAIL; hid_t H5P_LST_DATATYPE_CREATE_g = FAIL; hid_t H5P_LST_DATATYPE_ACCESS_g = FAIL; +hid_t H5P_LST_ATTRIBUTE_CREATE_g = FAIL; /* Track the revision count of a class, to make comparisons faster */ static unsigned H5P_next_rev=0; @@ -403,6 +405,15 @@ H5P_init_interface(void) if ((H5P_CLS_DATATYPE_ACCESS_g = H5I_register (H5I_GENPROP_CLS, pclass))<0) HGOTO_ERROR (H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register property list class"); + /* Allocate the attribute creation class */ + assert(H5P_CLS_ATTRIBUTE_CREATE_g==(-1)); + if (NULL==(pclass = H5P_create_class (ocrt_class,"attribute create",1,NULL,NULL,NULL,NULL,NULL,NULL))) + HGOTO_ERROR (H5E_PLIST, H5E_CANTINIT, FAIL, "class initialization failed"); + + /* Register the attribute creation class */ + if ((H5P_CLS_ATTRIBUTE_CREATE_g = H5I_register (H5I_GENPROP_CLS, pclass))<0) + HGOTO_ERROR (H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't register property list class"); + done: FUNC_LEAVE_NOAPI(ret_value); } @@ -461,6 +472,7 @@ H5P_term_interface(void) H5P_LST_GROUP_ACCESS_g = H5P_LST_DATATYPE_CREATE_g = H5P_LST_DATATYPE_ACCESS_g = + H5P_LST_ATTRIBUTE_CREATE_g = H5P_LST_MOUNT_g = (-1); } /* end if */ } /* end if */ @@ -482,6 +494,7 @@ H5P_term_interface(void) H5P_CLS_GROUP_ACCESS_g = H5P_CLS_DATATYPE_CREATE_g = H5P_CLS_DATATYPE_ACCESS_g = + H5P_CLS_ATTRIBUTE_CREATE_g = H5P_CLS_MOUNT_g = (-1); } /* end if */ } /* end if */ |