summaryrefslogtreecommitdiffstats
path: root/hl/src
diff options
context:
space:
mode:
Diffstat (limited to 'hl/src')
-rw-r--r--hl/src/CMakeLists.txt8
-rw-r--r--hl/src/H5DO.c23
-rw-r--r--hl/src/H5DS.c680
-rw-r--r--hl/src/H5IM.c71
-rw-r--r--hl/src/H5LD.c12
-rw-r--r--hl/src/H5LT.c432
-rw-r--r--hl/src/H5LTanalyze.c1023
-rw-r--r--hl/src/H5LTanalyze.l11
-rw-r--r--hl/src/H5LTparse.c324
-rw-r--r--hl/src/H5LTparse.h10
-rw-r--r--hl/src/H5LTpublic.h2
-rw-r--r--hl/src/H5PT.c58
-rw-r--r--hl/src/H5TB.c115
-rw-r--r--hl/src/Makefile.in94
14 files changed, 1531 insertions, 1332 deletions
diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt
index 9bce694..c4ddf19 100644
--- a/hl/src/CMakeLists.txt
+++ b/hl/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.10)
+cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_SRC C)
#-----------------------------------------------------------------------------
@@ -38,6 +38,7 @@ if (NOT ONLY_SHARED_LIBS)
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
+ target_compile_options(${HDF5_HL_LIB_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
TARGET_C_PROPERTIES (${HDF5_HL_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_HL_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_HL_LIB_TARGET} ${HDF5_HL_LIB_NAME} STATIC 0)
@@ -52,9 +53,8 @@ if (BUILD_SHARED_LIBS)
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
- target_compile_definitions(${HDF5_HL_LIBSH_TARGET}
- PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
- )
+ target_compile_options(${HDF5_HL_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_C_FLAGS}")
+ target_compile_definitions(${HDF5_HL_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB")
TARGET_C_PROPERTIES (${HDF5_HL_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_HL_LIBSH_TARGET} PUBLIC ${HDF5_LIBSH_TARGET})
H5_SET_LIB_OPTIONS (${HDF5_HL_LIBSH_TARGET} ${HDF5_HL_LIB_NAME} SHARED "HL")
diff --git a/hl/src/H5DO.c b/hl/src/H5DO.c
index 057c43b..66997cb 100644
--- a/hl/src/H5DO.c
+++ b/hl/src/H5DO.c
@@ -90,7 +90,7 @@ H5DOread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *fi
* This routine is copied from the fast forward feature branch: features/hdf5_ff
* src/H5FF.c:H5DOappend() with the following modifications:
* 1) Remove and replace macro calls such as
- * FUNC_ENTER_API, H5TRACE, HGOTO_ERROR
+ * FUNC_ENTER_API, H5TRACE, HGOTO_ERROR
* accordingly because hl does not have these macros
* 2) Replace H5I_get_type() by H5Iget_type()
* 3) Replace H5P_isa_class() by H5Pisa_class()
@@ -103,10 +103,9 @@ H5DOread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *fi
*-------------------------------------------------------------------------
*/
herr_t
-H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
+H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
hid_t memtype, const void *buf)
{
- hbool_t created_dxpl = FALSE; /* Whether we created a DXPL */
hsize_t size[H5S_MAX_RANK]; /* The new size (after extension */
hsize_t old_size = 0; /* The size of the dimension to be extended */
int sndims; /* Number of dimensions in dataspace (signed) */
@@ -135,14 +134,10 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
if(H5I_DATASET != H5Iget_type(dset_id))
goto done;
- /* If the user passed in a default DXPL, create one to pass to H5Dwrite() */
- if(H5P_DEFAULT == dxpl_id) {
- if((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
+ /* If the user passed in a default DXPL, sanity check it */
+ if(H5P_DEFAULT != dxpl_id)
+ if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER))
goto done;
- created_dxpl = TRUE;
- } /* end if */
- else if(TRUE != H5Pisa_class(dxpl_id, H5P_DATASET_XFER))
- goto done;
/* Get the dataspace of the dataset */
if(FAIL == (space_id = H5Dget_space(dset_id)))
@@ -161,7 +156,7 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
if(H5Sget_simple_extent_dims(space_id, size, NULL) < 0)
goto done;
- /* Adjust the dimension size of the requested dimension,
+ /* Adjust the dimension size of the requested dimension,
* but first record the old dimension size
*/
old_size = size[axis];
@@ -240,12 +235,6 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension,
ret_value = SUCCEED;
done:
- /* Close dxpl if we created it vs. one was passed in */
- if(created_dxpl) {
- if(H5Pclose(dxpl_id) < 0)
- ret_value = FAIL;
- } /* end if */
-
/* Close old dataspace */
if(space_id != FAIL && H5Sclose(space_id) < 0)
ret_value = FAIL;
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c
index 067992f..eac4d23 100644
--- a/hl/src/H5DS.c
+++ b/hl/src/H5DS.c
@@ -11,9 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
#include "H5DSprivate.h"
#include "H5LTprivate.h"
#include "H5IMprivate.h"
@@ -25,29 +22,24 @@ static herr_t H5DS_is_reserved(hid_t did);
static hid_t H5DS_get_REFLIST_type(void);
/*-------------------------------------------------------------------------
-* Function: H5DSset_scale
-*
-* Purpose: The dataset DSID is converted to a Dimension Scale dataset.
-* Creates the CLASS attribute, set to the value "DIMENSION_SCALE"
-* and an empty REFERENCE_LIST attribute.
-* If DIMNAME is specified, then an attribute called NAME is created,
-* with the value DIMNAME.
-*
-* Return: Success: SUCCEED, Failure: FAIL
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 04, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5DSset_scale(hid_t dsid,
- const char *dimname)
+ * Function: H5DSset_scale
+ *
+ * Purpose: The dataset DSID is converted to a Dimension Scale dataset.
+ * Creates the CLASS attribute, set to the value "DIMENSION_SCALE"
+ * and an empty REFERENCE_LIST attribute.
+ * If DIMNAME is specified, then an attribute called NAME is created,
+ * with the value DIMNAME.
+ *
+ * Return: Success: SUCCEED, Failure: FAIL
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: January 04, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5DSset_scale(hid_t dsid, const char *dimname)
{
int has_dimlist;
H5I_type_t it;
@@ -95,34 +87,28 @@ herr_t H5DSset_scale(hid_t dsid,
/*-------------------------------------------------------------------------
-* Function: H5DSattach_scale
-*
-* Purpose: Define Dimension Scale DSID to be associated with dimension IDX
-* of Dataset DID. Entries are created in the DIMENSION_LIST and
-* REFERENCE_LIST attributes.
-*
-* Return:
-* Success: SUCCEED
-* Failure: FAIL
-*
-* Fails if: Bad arguments
-* If DSID is not a Dimension Scale
-* If DID is a Dimension Scale (A Dimension Scale cannot have scales)
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: December 20, 2004
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5DSattach_scale(hid_t did,
- hid_t dsid,
- unsigned int idx)
+ * Function: H5DSattach_scale
+ *
+ * Purpose: Define Dimension Scale DSID to be associated with dimension IDX
+ * of Dataset DID. Entries are created in the DIMENSION_LIST and
+ * REFERENCE_LIST attributes.
+ *
+ * Return:
+ * Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Fails if: Bad arguments
+ * If DSID is not a Dimension Scale
+ * If DID is a Dimension Scale (A Dimension Scale cannot have scales)
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: December 20, 2004
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5DSattach_scale(hid_t did, hid_t dsid, unsigned int idx)
{
int has_dimlist;
int has_reflist;
@@ -143,7 +129,7 @@ herr_t H5DSattach_scale(hid_t did,
H5O_info_t oi1, oi2;
H5I_type_t it1, it2;
int i;
- size_t len;
+ size_t len;
int found_ds=0;
htri_t is_scale;
@@ -156,7 +142,7 @@ herr_t H5DSattach_scale(hid_t did,
return FAIL;
/* the dataset cannot be a DS dataset */
- if ( is_scale == 1)
+ if (is_scale == 1)
return FAIL;
/* get info for the dataset in the parameter list */
@@ -177,7 +163,7 @@ herr_t H5DSattach_scale(hid_t did,
if ((it2 = H5Iget_type(dsid)) < 0)
return FAIL;
- if (H5I_DATASET!=it1 || H5I_DATASET!=it2)
+ if (H5I_DATASET != it1 || H5I_DATASET != it2)
return FAIL;
/* the DS dataset cannot have dimension scales */
@@ -202,19 +188,19 @@ herr_t H5DSattach_scale(hid_t did,
return FAIL;
/* get rank */
- if ((rank=H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* scalar rank */
- if (rank==0)
- rank=1;
+ if (rank == 0)
+ rank = 1;
/* close dataset space */
if (H5Sclose(sid) < 0)
return FAIL;
/* parameter range checking */
- if (idx>(unsigned)rank-1)
+ if (idx > (unsigned)rank-1)
return FAIL;
/*-------------------------------------------------------------------------
@@ -508,7 +494,7 @@ herr_t H5DSattach_scale(hid_t did,
*-------------------------------------------------------------------------
*/
- if((is_ds=H5DSis_scale(dsid)) < 0)
+ if((is_ds = H5DSis_scale(dsid)) < 0)
return FAIL;
if(is_ds == 0) {
@@ -535,39 +521,31 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5DSdetach_scale
-*
-* Purpose: If possible, deletes association of Dimension Scale DSID with
-* dimension IDX of Dataset DID. This deletes the entries in the
-* DIMENSION_LIST and REFERENCE_LIST attributes.
-*
-* Return:
-* Success: SUCCEED
-* Failure: FAIL
-*
-* Fails if: Bad arguments
-* The dataset DID or DSID do not exist.
-* The DSID is not a Dimension Scale
-* DSID is not attached to DID.
-* Note that a scale may be associated with more than dimension of the same dataset.
-* If so, the detach operation only deletes one of the associations, for DID.
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: December 20, 2004
-*
-* Comments:
-*
-* Modifications: Function didn't delete DIMENSION_LIST attribute, when
-* all dimension scales were detached from a dataset; added.
-* 2010/05/13 EIP
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5DSdetach_scale(hid_t did,
- hid_t dsid,
- unsigned int idx)
+ * Function: H5DSdetach_scale
+ *
+ * Purpose: If possible, deletes association of Dimension Scale DSID with
+ * dimension IDX of Dataset DID. This deletes the entries in the
+ * DIMENSION_LIST and REFERENCE_LIST attributes.
+ *
+ * Return:
+ * Success: SUCCEED
+ * Failure: FAIL
+ *
+ * Fails if: Bad arguments
+ * The dataset DID or DSID do not exist.
+ * The DSID is not a Dimension Scale
+ * DSID is not attached to DID.
+ * Note that a scale may be associated with more than dimension of the same dataset.
+ * If so, the detach operation only deletes one of the associations, for DID.
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: December 20, 2004
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5DSdetach_scale(hid_t did, hid_t dsid, unsigned int idx)
{
int has_dimlist;
int has_reflist;
@@ -598,7 +576,7 @@ herr_t H5DSdetach_scale(hid_t did,
/* check for valid types of identifiers */
- if(H5I_DATASET!=H5Iget_type(did) || H5I_DATASET!=H5Iget_type(dsid))
+ if(H5I_DATASET != H5Iget_type(did) || H5I_DATASET != H5Iget_type(dsid))
return FAIL;
if((is_scale = H5DSis_scale(did)) < 0)
@@ -626,7 +604,7 @@ herr_t H5DSdetach_scale(hid_t did,
*-------------------------------------------------------------------------
*/
/* try to find the attribute "DIMENSION_LIST" on the >>data<< dataset */
- if ((has_dimlist = H5LT_find_attribute(did,DIMENSION_LIST)) < 0)
+ if ((has_dimlist = H5LT_find_attribute(did, DIMENSION_LIST)) < 0)
return FAIL;
if (has_dimlist == 0)
@@ -637,7 +615,7 @@ herr_t H5DSdetach_scale(hid_t did,
return FAIL;
/* get rank */
- if ((rank=H5Sget_simple_extent_ndims(sid)) < 0)
+ if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
goto out;
/* close dataset space */
@@ -645,7 +623,7 @@ herr_t H5DSdetach_scale(hid_t did,
return FAIL;
/* parameter range checking */
- if (idx>(unsigned)rank-1)
+ if (idx > (unsigned)rank-1)
return FAIL;
/*-------------------------------------------------------------------------
@@ -704,8 +682,7 @@ herr_t H5DSdetach_scale(hid_t did,
goto out;
/* same object, reset */
- if(dsid_oi.fileno == tmp_oi.fileno && dsid_oi.addr == tmp_oi.addr)
- {
+ if(dsid_oi.fileno == tmp_oi.fileno && dsid_oi.addr == tmp_oi.addr) {
/* If there are more than one reference in the VL element
and the reference we found is not the last one,
copy the last one to replace the found one since the order
@@ -727,7 +704,7 @@ herr_t H5DSdetach_scale(hid_t did,
we do not need to continue the search if it is found */
found_ds = 1;
break;
- }
+ } /* end if */
} /* j */
} /* if */
@@ -795,7 +772,7 @@ herr_t H5DSdetach_scale(hid_t did,
if(H5Aread(aid, ntid, dsbuf) < 0)
goto out;
- for(ii=0; ii<nelmts; ii++) {
+ for(ii = 0; ii < nelmts; ii++) {
/* First check if we have the same dimension index */
if(idx == dsbuf[ii].dim_idx) {
/* get the reference to the dataset */
@@ -820,7 +797,7 @@ herr_t H5DSdetach_scale(hid_t did,
nelmts--;
found_dset=1;
break;
- } /* if */
+ } /* end if */
} /* if we have the same dimension index */
} /* ii */
@@ -911,35 +888,29 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5DSis_attached
-*
-* Purpose: Report if dimension scale DSID is currently attached to
-* dimension IDX of dataset DID by checking if DID has a pointer in the REFERENCE_LIST
-* attribute and DSID (scale ) has a pointer in the DIMENSION_LIST attribute
-*
-* Return:
-* 1: both the DS and the dataset pointers match
-* 0: one of them or both do not match
-* FAIL (-1): error
-*
-* Fails if: Bad arguments
-* If DSID is not a Dimension Scale
-* If DID is a Dimension Scale (A Dimension Scale cannot have scales)
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: February 18, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-htri_t H5DSis_attached(hid_t did,
- hid_t dsid,
- unsigned int idx)
+ * Function: H5DSis_attached
+ *
+ * Purpose: Report if dimension scale DSID is currently attached to
+ * dimension IDX of dataset DID by checking if DID has a pointer in the REFERENCE_LIST
+ * attribute and DSID (scale ) has a pointer in the DIMENSION_LIST attribute
+ *
+ * Return:
+ * 1: both the DS and the dataset pointers match
+ * 0: one of them or both do not match
+ * FAIL (-1): error
+ *
+ * Fails if: Bad arguments
+ * If DSID is not a Dimension Scale
+ * If DID is a Dimension Scale (A Dimension Scale cannot have scales)
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: February 18, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+htri_t
+H5DSis_attached(hid_t did, hid_t dsid, unsigned int idx)
{
int has_dimlist;
int has_reflist;
@@ -990,7 +961,7 @@ htri_t H5DSis_attached(hid_t did,
if ((it2 = H5Iget_type(dsid)) < 0)
return FAIL;
- if (H5I_DATASET!=it1 || H5I_DATASET!=it2)
+ if (H5I_DATASET != it1 || H5I_DATASET != it2)
return FAIL;
/*-------------------------------------------------------------------------
@@ -1040,7 +1011,7 @@ htri_t H5DSis_attached(hid_t did,
goto out;
/* read */
- if (H5Aread(aid,tid,buf) < 0)
+ if (H5Aread(aid, tid, buf) < 0)
goto out;
/* iterate all the REFs in this dimension IDX */
@@ -1050,7 +1021,7 @@ htri_t H5DSis_attached(hid_t did,
ref = ((hobj_ref_t *)buf[idx].p)[i];
/* get the scale id for this REF */
- if ((dsid_j = H5Rdereference2(did,H5P_DEFAULT,H5R_OBJECT,&ref)) < 0)
+ if ((dsid_j = H5Rdereference2(did, H5P_DEFAULT, H5R_OBJECT, &ref)) < 0)
goto out;
/* get info for DS in the parameter list */
@@ -1073,7 +1044,7 @@ htri_t H5DSis_attached(hid_t did,
/* close */
- if (H5Dvlen_reclaim(tid,sid,H5P_DEFAULT,buf) < 0)
+ if (H5Dvlen_reclaim(tid, sid, H5P_DEFAULT, buf) < 0)
goto out;
if (H5Sclose(sid) < 0)
goto out;
@@ -1123,7 +1094,7 @@ htri_t H5DSis_attached(hid_t did,
if (dsbuf == NULL)
goto out;
- if (H5Aread(aid,ntid,dsbuf) < 0)
+ if (H5Aread(aid, ntid, dsbuf) < 0)
goto out;
/*-------------------------------------------------------------------------
@@ -1131,7 +1102,7 @@ htri_t H5DSis_attached(hid_t did,
*-------------------------------------------------------------------------
*/
- for(i=0; i<nelmts; i++)
+ for(i = 0; i < nelmts; i++)
{
/* get the reference */
ref = dsbuf[i].ref;
@@ -1202,54 +1173,47 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5DSiterate_scales
-*
-* Purpose: H5DSiterate_scales iterates over the scales attached to dimension DIM
-* of dataset DID. For each scale in the list, the visitor_data and some
-* additional information, specified below, are passed to the visitor function.
-* The iteration begins with the IDX object in the group and the next element
-* to be processed by the operator is returned in IDX. If IDX is NULL, then the
-* iterator starts at zero.
-*
-* Parameters:
-*
-* hid_t DID; IN: the dataset
-* unsigned int DIM; IN: the dimension of the dataset
-* int *DS_IDX; IN/OUT: on input the dimension scale index to start iterating,
-* on output the next index to visit. If NULL, start at
-* the first position.
-* H5DS_iterate_t VISITOR; IN: the visitor function
-* void *VISITOR_DATA; IN: arbitrary data to pass to the visitor function.
-*
-* Iterate over all scales of DIM, calling an application callback
-* with the item, key and any operator data.
-*
-* The operator callback receives a pointer to the item ,
-* and the pointer to the operator data passed
-* in to H5SL_iterate ('op_data'). The return values from an operator are:
-* A. Zero causes the iterator to continue, returning zero when all
-* nodes of that type have been processed.
-* B. Positive causes the iterator to immediately return that positive
-* value, indicating short-circuit success.
-* C. Negative causes the iterator to immediately return that value,
-* indicating failure.
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 31, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5DSiterate_scales(hid_t did,
- unsigned int dim,
- int *ds_idx,
- H5DS_iterate_t visitor,
- void *visitor_data )
+ * Function: H5DSiterate_scales
+ *
+ * Purpose: H5DSiterate_scales iterates over the scales attached to dimension DIM
+ * of dataset DID. For each scale in the list, the visitor_data and some
+ * additional information, specified below, are passed to the visitor function.
+ * The iteration begins with the IDX object in the group and the next element
+ * to be processed by the operator is returned in IDX. If IDX is NULL, then the
+ * iterator starts at zero.
+ *
+ * Parameters:
+ *
+ * hid_t DID; IN: the dataset
+ * unsigned int DIM; IN: the dimension of the dataset
+ * int *DS_IDX; IN/OUT: on input the dimension scale index to start iterating,
+ * on output the next index to visit. If NULL, start at
+ * the first position.
+ * H5DS_iterate_t VISITOR; IN: the visitor function
+ * void *VISITOR_DATA; IN: arbitrary data to pass to the visitor function.
+ *
+ * Iterate over all scales of DIM, calling an application callback
+ * with the item, key and any operator data.
+ *
+ * The operator callback receives a pointer to the item ,
+ * and the pointer to the operator data passed
+ * in to H5SL_iterate ('op_data'). The return values from an operator are:
+ * A. Zero causes the iterator to continue, returning zero when all
+ * nodes of that type have been processed.
+ * B. Positive causes the iterator to immediately return that positive
+ * value, indicating short-circuit success.
+ * C. Negative causes the iterator to immediately return that value,
+ * indicating failure.
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: January 31, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5DSiterate_scales(hid_t did, unsigned int dim, int *ds_idx,
+ H5DS_iterate_t visitor, void *visitor_data )
{
hid_t scale_id;
int rank;
@@ -1403,24 +1367,20 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5DSset_label
-*
-* Purpose: Set label for the dimension IDX of dataset DID to the value LABEL
-*
-* Return: Success: SUCCEED, Failure: FAIL
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 11, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
+ * Function: H5DSset_label
+ *
+ * Purpose: Set label for the dimension IDX of dataset DID to the value LABEL
+ *
+ * Return: Success: SUCCEED, Failure: FAIL
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: January 11, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5DSset_label(hid_t did, unsigned int idx, const char *label)
{
int has_labels;
hid_t sid = -1; /* space ID */
@@ -1434,6 +1394,9 @@ herr_t H5DSset_label(hid_t did, unsigned int idx, const char *label)
char ** buf; /* discarding the 'const' qualifier in the free */
char const ** const_buf; /* buf calls */
} u;
+
+ HDmemset(&u, 0, sizeof(u));
+
/*-------------------------------------------------------------------------
* parameter checking
*-------------------------------------------------------------------------
@@ -1609,29 +1572,24 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5DSget_label
-*
-* Purpose: Read the label LABEL for dimension IDX of dataset DID
-* Up to 'size' characters are stored in 'label' followed by a '\0' string
-* terminator. If the label is longer than 'size'-1,
-* the string terminator is stored in the last position of the buffer to
-* properly terminate the string.
-*
-* Return: 0 if no label found, size of label if found, Failure: FAIL
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 11, 2005
-*
-* Comments:
-*
-* Modifications:
-* JIRA HDFFV-7673: Added a check to see if the label name exists,
-* if not then returns zero. July 30, 2011. MSB
-*
-*-------------------------------------------------------------------------
-*/
-ssize_t H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
+ * Function: H5DSget_label
+ *
+ * Purpose: Read the label LABEL for dimension IDX of dataset DID
+ * Up to 'size' characters are stored in 'label' followed by a '\0' string
+ * terminator. If the label is longer than 'size'-1,
+ * the string terminator is stored in the last position of the buffer to
+ * properly terminate the string.
+ *
+ * Return: 0 if no label found, size of label if found, Failure: FAIL
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: January 11, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+ssize_t
+H5DSget_label(hid_t did, unsigned int idx, char *label, size_t size)
{
int has_labels;
hid_t sid = -1; /* space ID */
@@ -1771,32 +1729,24 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5DSget_scale_name
-*
-* Purpose: Read the name of dataset scale DID into buffer NAME
-* Up to 'size' characters are stored in 'name' followed by a '\0' string
-* terminator. If the name is longer than 'size'-1,
-* the string terminator is stored in the last position of the buffer to
-* properly terminate the string.
-*
-* Return: size of name if found, zero if not found, Failure: FAIL
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 04, 2005
-*
-* Comments:
-*
-* Modifications:
-* The size of the name returned should not include the NULL termination
-* in its value so as to be consistent with other HDF5 APIs.
-*
-*-------------------------------------------------------------------------
-*/
-
-ssize_t H5DSget_scale_name(hid_t did,
- char *name,
- size_t size)
+ * Function: H5DSget_scale_name
+ *
+ * Purpose: Read the name of dataset scale DID into buffer NAME
+ * Up to 'size' characters are stored in 'name' followed by a '\0' string
+ * terminator. If the name is longer than 'size'-1,
+ * the string terminator is stored in the last position of the buffer to
+ * properly terminate the string.
+ *
+ * Return: size of name if found, zero if not found, Failure: FAIL
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: January 04, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+ssize_t
+H5DSget_scale_name(hid_t did, char *name, size_t size)
{
hid_t aid; /* attribute ID */
hid_t tid = -1; /* attribute type ID */
@@ -1898,51 +1848,49 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5DSis_scale
-*
-* Purpose: check if the dataset DID is a dimension scale
-*
-* Return: 1, is, 0, not, FAIL, error
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 04, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
+ * Function: H5DSis_scale
+ *
+ * Purpose: check if the dataset DID is a dimension scale
+ *
+ * Return: 1, is, 0, not, FAIL, error
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: January 04, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
htri_t H5DSis_scale(hid_t did)
{
- hid_t tid = -1; /* attribute type ID */
- hid_t aid = -1; /* attribute ID */
- herr_t has_class; /* has the "CLASS" attribute */
- htri_t is_ds; /* boolean return value */
- H5I_type_t it; /* ID type */
- char *buf; /* Name of attribute */
- hsize_t storage_size; /* Size of storage for attribute */
-
- /*-------------------------------------------------------------------------
+ hid_t tid = -1; /* attribute type ID */
+ hid_t aid = -1; /* attribute ID */
+ herr_t attr_class; /* has the "CLASS" attribute */
+ htri_t is_ds = -1; /* set to "not a dimension scale" */
+ H5I_type_t it; /* type of identifier */
+ char *buf = NULL; /* buffer to read name of attribute */
+ size_t string_size; /* size of storage for the attribute */
+ H5T_class_t type_class;
+ H5T_str_t strpad;
+
+ /*------------------------------------------------------------------------
* parameter checking
*-------------------------------------------------------------------------
*/
/* get ID type */
if ((it = H5Iget_type(did)) < 0)
- return FAIL;
+ goto out;
if(H5I_DATASET != it)
- return FAIL;
+ goto out;
/* try to find the attribute "CLASS" on the dataset */
- if((has_class = H5LT_find_attribute(did, "CLASS")) < 0)
- return FAIL;
+ if((attr_class = H5LT_find_attribute(did, "CLASS")) < 0)
+ goto out;
- if(has_class == 0)
+ if(attr_class == 0) {
is_ds = 0;
-
+ goto out;
+ }
else
{
if((aid = H5Aopen(did, "CLASS", H5P_DEFAULT)) < 0)
@@ -1951,19 +1899,33 @@ htri_t H5DSis_scale(hid_t did)
if((tid = H5Aget_type(aid)) < 0)
goto out;
- /* check to make sure attribute is a string */
- if(H5T_STRING != H5Tget_class(tid))
+ /* check to make sure attribute is a string;
+ if not, then it is not dimension scale */
+ if((type_class = H5Tget_class(tid)) < 0)
goto out;
-
- /* check to make sure string is null-terminated */
- if(H5T_STR_NULLTERM != H5Tget_strpad(tid))
+ if(H5T_STRING != type_class) {
+ is_ds = 0;
+ goto out;
+ }
+ /* check to make sure string is null-terminated;
+ if not, then it is not dimension scale */
+ if((strpad = H5Tget_strpad(tid)) < 0 )
goto out;
+ if(H5T_STR_NULLTERM != strpad) {
+ is_ds = 0;
+ goto out;
+ }
- /* allocate buffer large enough to hold string */
- if((storage_size = H5Aget_storage_size(aid)) == 0)
+ /* According to Spec string is ASCII and its size should be 16 to hold
+ "DIMENSION_SCALE" string */
+ if((string_size = H5Tget_size(tid)) == 0)
+ goto out;
+ if(string_size != 16) {
+ is_ds = 0;
goto out;
+ }
- buf = (char*)HDmalloc( (size_t)storage_size * sizeof(char) + 1);
+ buf = (char*)HDmalloc((size_t)string_size * sizeof(char));
if(buf == NULL)
goto out;
@@ -1972,10 +1934,9 @@ htri_t H5DSis_scale(hid_t did)
goto out;
/* compare strings */
- if(HDstrncmp(buf, DIMENSION_SCALE_CLASS, MIN(HDstrlen(DIMENSION_SCALE_CLASS),HDstrlen(buf)))==0)
+ if(HDstrncmp(buf, DIMENSION_SCALE_CLASS,
+ MIN(HDstrlen(DIMENSION_SCALE_CLASS),HDstrlen(buf)))==0)
is_ds = 1;
- else
- is_ds = 0;
HDfree(buf);
@@ -1984,44 +1945,35 @@ htri_t H5DSis_scale(hid_t did)
if (H5Aclose(aid) < 0)
goto out;
-
-
}
-
- return is_ds;
-
- /* error zone */
out:
- H5E_BEGIN_TRY {
- H5Aclose(aid);
- H5Tclose(tid);
- } H5E_END_TRY;
- return FAIL;
-
+ if(is_ds < 0) {
+ HDfree(buf);
+ H5E_BEGIN_TRY {
+ H5Aclose(aid);
+ H5Tclose(tid);
+ } H5E_END_TRY;
+ }
+ return is_ds;
}
/*-------------------------------------------------------------------------
-* Function: H5DSget_num_scales
-*
-* Purpose: get the number of scales linked to the IDX dimension of dataset DID
-*
-* Return:
-* Success: number of scales
-* Failure: FAIL
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: January 13, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-int H5DSget_num_scales(hid_t did,
- unsigned int idx)
+ * Function: H5DSget_num_scales
+ *
+ * Purpose: get the number of scales linked to the IDX dimension of dataset DID
+ *
+ * Return:
+ * Success: number of scales
+ * Failure: FAIL
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: January 13, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+H5DSget_num_scales(hid_t did, unsigned int idx)
{
int has_dimlist;
hid_t sid; /* space ID */
@@ -2124,25 +2076,20 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5DS_is_reserved
-*
-* Purpose: Verify that a dataset's CLASS is either an image, palette or table
-*
-* Return: true, false, fail
-*
-* Programmer: pvn@ncsa.uiuc.edu
-*
-* Date: March 19, 2005
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-static
-herr_t H5DS_is_reserved(hid_t did)
+ * Function: H5DS_is_reserved
+ *
+ * Purpose: Verify that a dataset's CLASS is either an image, palette or table
+ *
+ * Return: true, false, fail
+ *
+ * Programmer: Pedro Vicente
+ *
+ * Date: March 19, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5DS_is_reserved(hid_t did)
{
int has_class;
hid_t tid = -1;
@@ -2215,26 +2162,21 @@ out:
}
/*-------------------------------------------------------------------------
-* Function: H5DS_get_REFLIST_type
-*
-* Purpose: This is a helper function to return a native type for
-* the REFERENCE_LIST attribute.
-*
-* Return: Type identifier on success and negative on failure
-*
-* Programmer: epourmal@hdfgroup.org
-*
-* Date: May 22, 2010
-*
-* Comments:
-*
-* Modifications:
-*
-*-------------------------------------------------------------------------
-*/
-
-static
-hid_t H5DS_get_REFLIST_type(void)
+ * Function: H5DS_get_REFLIST_type
+ *
+ * Purpose: This is a helper function to return a native type for
+ * the REFERENCE_LIST attribute.
+ *
+ * Return: Type identifier on success and negative on failure
+ *
+ * Programmer: Elena Pourmal
+ *
+ * Date: May 22, 2010
+ *
+ *-------------------------------------------------------------------------
+ */
+static hid_t
+H5DS_get_REFLIST_type(void)
{
hid_t ntid_t = -1;
diff --git a/hl/src/H5IM.c b/hl/src/H5IM.c
index a4818b8..2b292dc 100644
--- a/hl/src/H5IM.c
+++ b/hl/src/H5IM.c
@@ -13,8 +13,6 @@
#include "H5IMprivate.h"
#include "H5LTprivate.h"
-#include <string.h>
-#include <stdlib.h>
/*-------------------------------------------------------------------------
* Function: H5IMmake_image_8bit
@@ -23,7 +21,7 @@
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: June 13, 2001
*
@@ -44,7 +42,7 @@ herr_t H5IMmake_image_8bit( hid_t loc_id,
hsize_t dims[IMAGE8_RANK];
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Initialize the image dimensions */
@@ -77,7 +75,7 @@ herr_t H5IMmake_image_8bit( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: June 13, 2001
*
@@ -104,9 +102,9 @@ herr_t H5IMmake_image_24bit( hid_t loc_id,
hsize_t dims[IMAGE24_RANK];
/* check the arguments */
- if (interlace == NULL)
+ if (interlace == NULL)
return -1;
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
@@ -162,7 +160,7 @@ herr_t H5IMmake_image_24bit( hid_t loc_id,
*
* Return:
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: May 28, 2001
*
@@ -180,7 +178,7 @@ static herr_t find_palette(hid_t loc_id,
int ret = H5_ITER_CONT;
/* check the arguments */
- if (name == NULL)
+ if (name == NULL)
return -1;
/* Shut compiler up */
@@ -204,7 +202,7 @@ static herr_t find_palette(hid_t loc_id,
*
* Return: Success: 1, Failure: 0
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: May 11, 2001
*
@@ -230,7 +228,7 @@ herr_t H5IM_find_palette( hid_t loc_id )
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: July 25, 2001
*
@@ -261,9 +259,9 @@ herr_t H5IMget_image_info( hid_t loc_id,
int has_attr;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
- if (interlace == NULL)
+ if (interlace == NULL)
return -1;
/*assume initially we have no palettes attached*/
@@ -274,7 +272,8 @@ herr_t H5IMget_image_info( hid_t loc_id,
return -1;
/* Try to find the attribute "INTERLACE_MODE" on the >>image<< dataset */
- has_attr = H5LT_find_attribute(did, "INTERLACE_MODE");
+ if ((has_attr = H5LT_find_attribute(did, "INTERLACE_MODE")) < 0)
+ goto out;
/* It exists, get it */
if(has_attr == 1)
@@ -411,7 +410,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: June 13, 2001
*
@@ -430,7 +429,7 @@ herr_t H5IMread_image( hid_t loc_id,
hid_t did;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Open the dataset. */
@@ -461,7 +460,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: May 01, 2001
*
@@ -483,7 +482,7 @@ herr_t H5IMmake_palette( hid_t loc_id,
int has_pal;
/* check the arguments */
- if (pal_name == NULL)
+ if (pal_name == NULL)
return -1;
/* Check if the dataset already exists */
@@ -517,7 +516,7 @@ herr_t H5IMmake_palette( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: May 01, 2001
*
@@ -548,11 +547,11 @@ herr_t H5IMlink_palette( hid_t loc_id,
hsize_t dim_ref;
int ok_pal;
-
+
/* check the arguments */
- if (image_name == NULL)
+ if (image_name == NULL)
return -1;
- if (pal_name == NULL)
+ if (pal_name == NULL)
return -1;
/* The image dataset may or may not have the attribute "PALETTE"
@@ -694,7 +693,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: September 10, 2001
*
@@ -717,9 +716,9 @@ herr_t H5IMunlink_palette( hid_t loc_id,
int ok_pal, has_pal;
/* check the arguments */
- if(image_name == NULL)
+ if(image_name == NULL)
return -1;
- if(pal_name == NULL)
+ if(pal_name == NULL)
return -1;
/* Try to find the palette dataset */
@@ -795,7 +794,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: July 22, 2001
*
@@ -818,7 +817,7 @@ herr_t H5IMget_npalettes( hid_t loc_id,
int has_pal;
/* check the arguments */
- if(image_name == NULL)
+ if(image_name == NULL)
return -1;
/*assume initially we have no palettes attached*/
@@ -886,7 +885,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: July 22, 2001
*
@@ -916,7 +915,7 @@ herr_t H5IMget_palette_info( hid_t loc_id,
hsize_t pal_maxdims[2];
/* check the arguments */
- if (image_name == NULL)
+ if (image_name == NULL)
return -1;
/* Open the dataset. */
@@ -1002,7 +1001,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: August 30, 2001
*
@@ -1030,9 +1029,9 @@ herr_t H5IMget_palette( hid_t loc_id,
hid_t pal_id;
/* check the arguments */
- if (image_name == NULL)
+ if (image_name == NULL)
return -1;
- if (pal_data == NULL)
+ if (pal_data == NULL)
return -1;
@@ -1109,7 +1108,7 @@ out:
*
* Return: true, false, fail
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: August 30, 2001
*
@@ -1133,7 +1132,7 @@ herr_t H5IMis_image( hid_t loc_id,
herr_t ret;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Assume initially fail condition */
@@ -1213,7 +1212,7 @@ out:
*
* Return: true, false, fail
*
-* Programmer: Pedro Vicente Nunes, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente Nunes
*
* Date: August 30, 2001
*
@@ -1237,7 +1236,7 @@ herr_t H5IMis_palette( hid_t loc_id,
herr_t ret;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Assume initially fail condition */
diff --git a/hl/src/H5LD.c b/hl/src/H5LD.c
index 1669a30..21975d1 100644
--- a/hl/src/H5LD.c
+++ b/hl/src/H5LD.c
@@ -11,10 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <stdio.h>
#include "H5LDprivate.h"
/*-------------------------------------------------------------------------
@@ -209,7 +205,7 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[]/*OUT*/, hid_t par_tid)
valid = FALSE;
end_of_fields = TRUE;
break;
-
+
case '\\': /* escape character */
++fields_ptr; /* skip it */
if(*fields_ptr == '\0')
@@ -241,7 +237,7 @@ H5LD_construct_vector(char *fields, H5LD_memb_t *listv[]/*OUT*/, hid_t par_tid)
gotcomma = TRUE;
break;
- default:
+ default:
*cur++ = *fields_ptr++;
gotmember = TRUE;
break;
@@ -438,7 +434,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
/* Get dataset's dataspace */
if((sid = H5Dget_space(did)) < 0)
goto done;
-
+
/* Get the number of dimensions */
if((ndims = H5Sget_simple_extent_ndims(sid)) < 0)
goto done;
@@ -508,7 +504,7 @@ H5LD_get_dset_elmts(hid_t did, const hsize_t *prev_dims, const hsize_t *cur_dims
/* Get the total size of the dataset's datatypes */
if(0 == (tot_tsize = H5LD_get_dset_type_size(did, NULL)))
goto done;
-
+
/* Allocate memory for reading in the elements in the dataset selection */
if(NULL == (sav_buf = tmp_buf = (char *)HDcalloc((size_t)num_elmts, tot_tsize)))
goto done;
diff --git a/hl/src/H5LT.c b/hl/src/H5LT.c
index 0074d02..55b1b9e 100644
--- a/hl/src/H5LT.c
+++ b/hl/src/H5LT.c
@@ -11,11 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "H5LTprivate.h"
/* For Lex and Yacc */
@@ -29,19 +24,19 @@ char *myinput;
size_t indent = 0;
-/* File Image operations
-
- A file image is a representation of an HDF5 file in a memory
- buffer. In order to perform operations on an image in a similar way
+/* File Image operations
+
+ A file image is a representation of an HDF5 file in a memory
+ buffer. In order to perform operations on an image in a similar way
to a file, the application buffer is copied to a FAPL buffer, which
- in turn is copied to a VFD buffer. Buffer copying can decrease
- performance, especially when using large file images. A solution to
- this issue is to simulate the copying of the application buffer,
- when actually the same buffer is used for the FAPL and the VFD.
- This is implemented by using callbacks that simulate the standard
- functions for memory management (additional callbacks are used for
- the management of associated data structures). From the application
- standpoint, a file handle can be obtained from a file image by using
+ in turn is copied to a VFD buffer. Buffer copying can decrease
+ performance, especially when using large file images. A solution to
+ this issue is to simulate the copying of the application buffer,
+ when actually the same buffer is used for the FAPL and the VFD.
+ This is implemented by using callbacks that simulate the standard
+ functions for memory management (additional callbacks are used for
+ the management of associated data structures). From the application
+ standpoint, a file handle can be obtained from a file image by using
the API routine H5LTopen_file_image(). This function takes a flag
argument that indicates the HDF5 library how to handle the given image;
several flag values can be combined by using the bitwise OR operator.
@@ -61,9 +56,9 @@ size_t indent = 0;
well. The application is responsible to release the image buffer.
*/
-/* Data structure to pass application data to callbacks. */
+/* Data structure to pass application data to callbacks. */
typedef struct {
- void *app_image_ptr; /* Pointer to application buffer */
+ void *app_image_ptr; /* Pointer to application buffer */
size_t app_image_size; /* Size of application buffer */
void *fapl_image_ptr; /* Pointer to FAPL buffer */
size_t fapl_image_size; /* Size of FAPL buffer */
@@ -88,17 +83,17 @@ static herr_t udata_free(void *udata);
/*-------------------------------------------------------------------------
-* Function: image_malloc
+* Function: image_malloc
*
* Purpose: Simulates malloc() function to avoid copying file images.
* The application buffer is set to the buffer on only one FAPL.
* Then the FAPL buffer can be copied to other FAPL buffers or
-* to only one VFD buffer.
+* to only one VFD buffer.
*
* Return: Address of "allocated" buffer, if successful. Otherwise, it returns
* NULL.
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -109,23 +104,23 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
{
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
void * return_value = NULL;
-
+
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
switch ( file_image_op ) {
/* the app buffer is "copied" to only one FAPL. Afterwards, FAPLs can be "copied" */
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET:
- if (udata->app_image_ptr == NULL)
+ if (udata->app_image_ptr == NULL)
goto out;
- if (udata->app_image_size != size)
+ if (udata->app_image_size != size)
goto out;
- if (udata->fapl_image_ptr != NULL)
+ if (udata->fapl_image_ptr != NULL)
goto out;
- if (udata->fapl_image_size != 0)
+ if (udata->fapl_image_size != 0)
goto out;
- if (udata->fapl_ref_count != 0)
+ if (udata->fapl_ref_count != 0)
goto out;
udata->fapl_image_ptr = udata->app_image_ptr;
@@ -135,11 +130,11 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
break;
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
- if (udata->fapl_image_ptr == NULL)
+ if (udata->fapl_image_ptr == NULL)
goto out;
- if (udata->fapl_image_size != size)
+ if (udata->fapl_image_size != size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
return_value = udata->fapl_image_ptr;
@@ -151,17 +146,17 @@ image_malloc(size_t size, H5FD_file_image_op_t file_image_op, void *_udata)
case H5FD_FILE_IMAGE_OP_FILE_OPEN:
/* FAPL buffer is "copied" to only one VFD buffer */
- if (udata->vfd_image_ptr != NULL)
+ if (udata->vfd_image_ptr != NULL)
goto out;
- if (udata->vfd_image_size != 0)
+ if (udata->vfd_image_size != 0)
goto out;
- if (udata->vfd_ref_count != 0)
+ if (udata->vfd_ref_count != 0)
goto out;
- if (udata->fapl_image_ptr == NULL)
+ if (udata->fapl_image_ptr == NULL)
goto out;
- if (udata->fapl_image_size != size)
+ if (udata->fapl_image_size != size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
udata->vfd_image_ptr = udata->fapl_image_ptr;
@@ -189,15 +184,15 @@ out:
/*-------------------------------------------------------------------------
* Function: image_memcpy
*
-* Purpose: Simulates memcpy() function to avoid copying file images.
+* Purpose: Simulates memcpy() function to avoid copying file images.
* The image buffer can be set to only one FAPL buffer, and
* "copied" to only one VFD buffer. The FAPL buffer can be
-* "copied" to other FAPLs buffers.
+* "copied" to other FAPLs buffers.
*
* Return: The address of the destination buffer, if successful. Otherwise, it
* returns NULL.
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -210,31 +205,31 @@ image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
switch(file_image_op) {
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET:
- if (dest != udata->fapl_image_ptr)
+ if (dest != udata->fapl_image_ptr)
goto out;
- if (src != udata->app_image_ptr)
+ if (src != udata->app_image_ptr)
goto out;
- if (size != udata->fapl_image_size)
+ if (size != udata->fapl_image_size)
goto out;
- if (size != udata->app_image_size)
+ if (size != udata->app_image_size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
break;
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY:
- if (dest != udata->fapl_image_ptr)
+ if (dest != udata->fapl_image_ptr)
goto out;
- if (src != udata->fapl_image_ptr)
+ if (src != udata->fapl_image_ptr)
goto out;
- if (size != udata->fapl_image_size)
+ if (size != udata->fapl_image_size)
goto out;
- if (udata->fapl_ref_count < 2)
+ if (udata->fapl_ref_count < 2)
goto out;
break;
@@ -242,17 +237,17 @@ image_memcpy(void *dest, const void *src, size_t size, H5FD_file_image_op_t file
goto out;
case H5FD_FILE_IMAGE_OP_FILE_OPEN:
- if (dest != udata->vfd_image_ptr)
+ if (dest != udata->vfd_image_ptr)
goto out;
- if (src != udata->fapl_image_ptr)
+ if (src != udata->fapl_image_ptr)
goto out;
- if (size != udata->vfd_image_size)
+ if (size != udata->vfd_image_size)
goto out;
- if (size != udata->fapl_image_size)
+ if (size != udata->fapl_image_size)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
- if (udata->vfd_ref_count != 1)
+ if (udata->vfd_ref_count != 1)
goto out;
break;
@@ -273,15 +268,15 @@ out:
/*-------------------------------------------------------------------------
-* Function: image_realloc
+* Function: image_realloc
*
* Purpose: Reallocates the shared application image buffer and updates data
-* structures that manage buffer "copying".
-*
+* structures that manage buffer "copying".
+*
* Return: Address of reallocated buffer, if successful. Otherwise, it returns
-* NULL.
+* NULL.
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -294,29 +289,29 @@ image_realloc(void *ptr, size_t size, H5FD_file_image_op_t file_image_op, void *
void * return_value = NULL;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- /* realloc() is not allowed when the HDF5 library won't release the image
+ /* realloc() is not allowed when the HDF5 library won't release the image
buffer because reallocation may change the address of the buffer. The
new address cannot be communicated to the application to release it. */
- if (udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)
- goto out;
+ if (udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)
+ goto out;
/* realloc() is not allowed if the image is open in read-only mode */
- if (!(udata->flags & H5LT_FILE_IMAGE_OPEN_RW))
- goto out;
+ if (!(udata->flags & H5LT_FILE_IMAGE_OPEN_RW))
+ goto out;
if (file_image_op == H5FD_FILE_IMAGE_OP_FILE_RESIZE) {
- if (udata->vfd_image_ptr != ptr)
- goto out;
+ if (udata->vfd_image_ptr != ptr)
+ goto out;
- if (udata->vfd_ref_count != 1)
+ if (udata->vfd_ref_count != 1)
goto out;
if (NULL == (udata->vfd_image_ptr = HDrealloc(ptr, size)))
- goto out;
-
+ goto out;
+
udata->vfd_image_size = size;
return_value = udata->vfd_image_ptr;
} /* end if */
@@ -337,9 +332,9 @@ out:
* reference counters. Shared application buffer is actually
* deallocated if there are no outstanding references.
*
-* Return: SUCCEED or FAIL
+* Return: SUCCEED or FAIL
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -351,19 +346,19 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata)
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
switch(file_image_op) {
case H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE:
- if (udata->fapl_image_ptr != ptr)
+ if (udata->fapl_image_ptr != ptr)
goto out;
- if (udata->fapl_ref_count == 0)
+ if (udata->fapl_ref_count == 0)
goto out;
udata->fapl_ref_count--;
- /* release the shared buffer only if indicated by the respective flag and there are no outstanding references */
+ /* release the shared buffer only if indicated by the respective flag and there are no outstanding references */
if (udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0 &&
!(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
HDfree(udata->fapl_image_ptr);
@@ -374,14 +369,14 @@ image_free(void *ptr, H5FD_file_image_op_t file_image_op, void *_udata)
break;
case H5FD_FILE_IMAGE_OP_FILE_CLOSE:
- if (udata->vfd_image_ptr != ptr)
+ if (udata->vfd_image_ptr != ptr)
goto out;
- if (udata->vfd_ref_count != 1)
+ if (udata->vfd_ref_count != 1)
goto out;
udata->vfd_ref_count--;
- /* release the shared buffer only if indicated by the respective flag and there are no outstanding references */
+ /* release the shared buffer only if indicated by the respective flag and there are no outstanding references */
if (udata->fapl_ref_count == 0 && udata->vfd_ref_count == 0 &&
!(udata->flags & H5LT_FILE_IMAGE_DONT_RELEASE)) {
HDfree(udata->vfd_image_ptr);
@@ -410,7 +405,7 @@ out:
/*-------------------------------------------------------------------------
-* Function: udata_copy
+* Function: udata_copy
*
* Purpose: Simulates the copying of the user data structure utilized in the
* management of the "copying" of file images.
@@ -418,7 +413,7 @@ out:
* Return: Address of "newly allocated" structure, if successful. Otherwise, it
* returns NULL.
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -430,9 +425,9 @@ udata_copy(void *_udata)
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- if (udata->ref_count == 0)
+ if (udata->ref_count == 0)
goto out;
udata->ref_count++;
@@ -449,11 +444,11 @@ out:
*
* Purpose: Simulates deallocation of the user data structure utilized in the
* management of the "copying" of file images. The data structure is
-* actually deallocated when there are no outstanding references.
+* actually deallocated when there are no outstanding references.
*
-* Return: SUCCEED or FAIL
+* Return: SUCCEED or FAIL
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -465,9 +460,9 @@ udata_free(void *_udata)
H5LT_file_image_ud_t *udata = (H5LT_file_image_ud_t *)_udata;
/* callback is only used if the application buffer is not actually copied */
- if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
+ if (!(udata->flags & H5LT_FILE_IMAGE_DONT_COPY))
goto out;
- if (udata->ref_count == 0)
+ if (udata->ref_count == 0)
goto out;
udata->ref_count--;
@@ -479,7 +474,7 @@ udata_free(void *_udata)
return(SUCCEED);
-out:
+out:
return(FAIL);
} /* end udata_free */
@@ -504,7 +499,7 @@ static herr_t H5LT_get_attribute_mem(hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Quincey Koziol, koziol@hdfgroup.org
+* Programmer: Quincey Koziol
*
* Date: October 10, 2007
*
@@ -522,7 +517,7 @@ H5LT_make_dataset_numerical( hid_t loc_id,
hid_t did = -1, sid = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Create the data space for the dataset. */
@@ -570,7 +565,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 19, 2001
*
@@ -599,7 +594,7 @@ herr_t H5LTmake_dataset( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -628,7 +623,7 @@ herr_t H5LTmake_dataset_char( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -657,7 +652,7 @@ herr_t H5LTmake_dataset_short( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -688,7 +683,7 @@ herr_t H5LTmake_dataset_int( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -717,7 +712,7 @@ herr_t H5LTmake_dataset_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -748,7 +743,7 @@ herr_t H5LTmake_dataset_float( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 14, 2001
*
@@ -778,7 +773,7 @@ herr_t H5LTmake_dataset_double( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: October 05, 2004
*
@@ -801,7 +796,7 @@ herr_t H5LTmake_dataset_string(hid_t loc_id,
size_t size;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* create a string data type */
@@ -852,11 +847,11 @@ out:
/*-------------------------------------------------------------------------
* Function: H5LTopen_file_image
*
-* Purpose: Open a user supplied file image using the core file driver.
+* Purpose: Open a user supplied file image using the core file driver.
*
* Return: File identifier, Failure: -1
*
-* Programmer: Christian Chilan
+* Programmer: Christian Chilan
*
* Date: October 3, 2011
*
@@ -871,22 +866,22 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
size_t min_incr = 65536; /* Minimum buffer increment */
double buf_prcnt = 0.1f; /* Percentage of buffer size to set
as increment */
- static long file_name_counter;
- H5FD_file_image_callbacks_t callbacks = {&image_malloc, &image_memcpy,
- &image_realloc, &image_free,
- &udata_copy, &udata_free,
+ static long file_name_counter;
+ H5FD_file_image_callbacks_t callbacks = {&image_malloc, &image_memcpy,
+ &image_realloc, &image_free,
+ &udata_copy, &udata_free,
(void *)NULL};
/* check arguments */
- if (buf_ptr == NULL)
+ if (buf_ptr == NULL)
goto out;
- if (buf_size == 0)
+ if (buf_size == 0)
goto out;
if (flags & (unsigned)~(H5LT_FILE_IMAGE_ALL))
goto out;
/* Create FAPL to transmit file image */
- if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
+ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
goto out;
/* set allocation increment to a percentage of the supplied buffer size, or
@@ -898,7 +893,7 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
alloc_incr = min_incr;
/* Configure FAPL to use the core file driver */
- if (H5Pset_fapl_core(fapl, alloc_incr, FALSE) < 0)
+ if (H5Pset_fapl_core(fapl, alloc_incr, FALSE) < 0)
goto out;
/* Set callbacks for file image ops ONLY if the file image is NOT copied */
@@ -932,10 +927,10 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
} /* end if */
/* Assign file image in user buffer to FAPL */
- if (H5Pset_file_image(fapl, buf_ptr, buf_size) < 0)
+ if (H5Pset_file_image(fapl, buf_ptr, buf_size) < 0)
goto out;
- /* set file open flags */
+ /* set file open flags */
if (flags & H5LT_FILE_IMAGE_OPEN_RW)
file_open_flags = H5F_ACC_RDWR;
else
@@ -943,17 +938,17 @@ hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags)
/* define a unique file name */
HDsnprintf(file_name, (sizeof(file_name) - 1), "file_image_%ld", file_name_counter++);
-
- /* Assign file image in FAPL to the core file driver */
- if ((file_id = H5Fopen(file_name, file_open_flags, fapl)) < 0)
+
+ /* Assign file image in FAPL to the core file driver */
+ if ((file_id = H5Fopen(file_name, file_open_flags, fapl)) < 0)
goto out;
/* Close FAPL */
- if (H5Pclose(fapl) < 0)
+ if (H5Pclose(fapl) < 0)
goto out;
- /* Return file identifier */
- return file_id;
+ /* Return file identifier */
+ return file_id;
out:
H5E_BEGIN_TRY {
@@ -970,7 +965,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Quincey Koziol, koziol@hdfgroup.org
+* Programmer: Quincey Koziol
*
* Date: October 8, 2007
*
@@ -983,7 +978,7 @@ H5LT_read_dataset_numerical(hid_t loc_id, const char *dset_name, hid_t tid, void
hid_t did;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Open the dataset. */
@@ -1012,7 +1007,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: June 13, 2001
*
@@ -1035,7 +1030,7 @@ herr_t H5LTread_dataset(hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1056,7 +1051,7 @@ herr_t H5LTread_dataset_char( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1077,7 +1072,7 @@ herr_t H5LTread_dataset_short( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1098,7 +1093,7 @@ herr_t H5LTread_dataset_int( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1119,7 +1114,7 @@ herr_t H5LTread_dataset_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1141,7 +1136,7 @@ herr_t H5LTread_dataset_float( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 5, 2001
*
@@ -1163,7 +1158,7 @@ herr_t H5LTread_dataset_double( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: October 05, 2004
*
@@ -1178,7 +1173,7 @@ herr_t H5LTread_dataset_string( hid_t loc_id,
hid_t tid = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Open the dataset. */
@@ -1216,7 +1211,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 4, 2001
*
@@ -1231,7 +1226,7 @@ herr_t H5LTget_dataset_ndims( hid_t loc_id,
hid_t sid = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* Open the dataset. */
@@ -1272,7 +1267,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 4, 2001
* Modified: February 28, 2006: checked for NULL parameters
@@ -1291,7 +1286,7 @@ herr_t H5LTget_dataset_info( hid_t loc_id,
hid_t sid = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
return -1;
/* open the dataset. */
@@ -1348,7 +1343,7 @@ out:
*
* Purpose: operator function used by H5LTfind_dataset
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: June 21, 2001
*
@@ -1368,9 +1363,9 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *op_d
int ret = 0;
/* check the arguments */
- if (name == NULL)
+ if (name == NULL)
return ret;
-
+
/* Shut the compiler up */
loc_id = loc_id;
linfo = linfo;
@@ -1392,7 +1387,7 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *op_d
* Purpose: Inquires if a dataset named dset_name exists attached
* to the object loc_id.
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: July 15, 2001
*
@@ -1407,13 +1402,18 @@ find_dataset(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *op_d
*
*-------------------------------------------------------------------------
*/
-
+/* H5Literate wants a non-const pointer but we have a const pointer in the API
+ * call. It's safe to ignore this because we control the callback, don't
+ * modify the op_data buffer (i.e.: dset_name) during the traversal, and the
+ * library never modifies that buffer.
+ */
+H5_GCC_DIAG_OFF(cast-qual)
herr_t
H5LTfind_dataset( hid_t loc_id, const char *dset_name )
{
return H5Literate(loc_id, H5_INDEX_NAME, H5_ITER_INC, 0, find_dataset, (void *)dset_name);
}
-
+H5_GCC_DIAG_ON(cast-qual)
/*-------------------------------------------------------------------------
*
@@ -1431,7 +1431,7 @@ H5LTfind_dataset( hid_t loc_id, const char *dset_name )
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: July 23, 2001
*
@@ -1455,11 +1455,11 @@ herr_t H5LTset_attribute_string( hid_t loc_id,
size_t attr_size;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
- if (attr_data == NULL)
+ if (attr_data == NULL)
return -1;
/* Open the object */
@@ -1529,7 +1529,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: July 25, 2001
*
@@ -1552,9 +1552,9 @@ herr_t H5LT_set_attribute_numerical( hid_t loc_id,
int has_attr;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
/* Open the object */
@@ -1608,7 +1608,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 7, 2001
*
@@ -1638,7 +1638,7 @@ herr_t H5LTset_attribute_char( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -1669,7 +1669,7 @@ herr_t H5LTset_attribute_uchar( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 7, 2001
*
@@ -1700,7 +1700,7 @@ herr_t H5LTset_attribute_short( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -1731,7 +1731,7 @@ herr_t H5LTset_attribute_ushort( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 7, 2001
*
@@ -1762,7 +1762,7 @@ herr_t H5LTset_attribute_int( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -1794,7 +1794,7 @@ herr_t H5LTset_attribute_uint( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 7, 2001
*
@@ -1824,7 +1824,7 @@ herr_t H5LTset_attribute_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Elena Pourmal, epourmal@ncsa.uiuc.edu
+* Programmer: Elena Pourmal
*
* Date: June 17, 2005
*
@@ -1856,7 +1856,7 @@ herr_t H5LTset_attribute_long_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -1888,7 +1888,7 @@ herr_t H5LTset_attribute_ulong( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: July 25, 2001
*
@@ -1921,7 +1921,7 @@ herr_t H5LTset_attribute_float( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 7, 2001
*
@@ -1952,7 +1952,7 @@ herr_t H5LTset_attribute_double( hid_t loc_id,
*
* Purpose: operator function used by H5LT_find_attribute
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: June 21, 2001
*
@@ -1969,7 +1969,7 @@ find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo,
int ret = H5_ITER_CONT;
/* check the arguments */
- if (name == NULL)
+ if (name == NULL)
return H5_ITER_CONT;
/* Shut compiler up */
@@ -1993,7 +1993,7 @@ find_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo,
* Purpose: Inquires if an attribute named attr_name exists attached to
* the object loc_id.
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: May 17, 2006
*
@@ -2015,7 +2015,7 @@ herr_t H5LTfind_attribute( hid_t loc_id, const char* attr_name )
*
* Purpose: Inquires if an attribute named attr_name exists attached to the object loc_id.
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: June 21, 2001
*
@@ -2033,13 +2033,18 @@ herr_t H5LTfind_attribute( hid_t loc_id, const char* attr_name )
*
*-------------------------------------------------------------------------
*/
-
+/* H5Aiterate wants a non-const pointer but we have a const pointer in the API
+ * call. It's safe to ignore this because we control the callback, don't
+ * modify the op_data buffer (i.e.: attr_name) during the traversal, and the
+ * library never modifies that buffer.
+ */
+H5_GCC_DIAG_OFF(cast-qual)
herr_t
H5LT_find_attribute( hid_t loc_id, const char* attr_name )
{
return H5Aiterate2(loc_id, H5_INDEX_NAME, H5_ITER_INC, NULL, find_attr, (void *)attr_name);
}
-
+H5_GCC_DIAG_ON(cast-qual)
/*-------------------------------------------------------------------------
@@ -2049,7 +2054,7 @@ H5LT_find_attribute( hid_t loc_id, const char* attr_name )
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 4, 2001
*
@@ -2066,9 +2071,9 @@ herr_t H5LTget_attribute_ndims( hid_t loc_id,
hid_t obj_id;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
/* Open the object */
@@ -2119,7 +2124,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 4, 2001
*
@@ -2139,9 +2144,9 @@ herr_t H5LTget_attribute_info( hid_t loc_id,
hid_t obj_id;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
/* Open the object */
@@ -2205,7 +2210,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
+* Programmer: Raymond Lu
*
* Date: October 6, 2004
*
@@ -2220,7 +2225,7 @@ hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type)
hid_t type_id;
/* check the arguments */
- if (text == NULL)
+ if (text == NULL)
return -1;
if(lang_type <= H5LT_LANG_ERR || lang_type >= H5LT_NO_LANG)
@@ -2255,7 +2260,7 @@ out:
*
* Return: void
*
-* Programmer: Raymond Lu, songyulu@hdfgroup.org
+* Programmer: Raymond Lu
*
* Date: 29 September 2011
*
@@ -2263,8 +2268,8 @@ out:
*
*-------------------------------------------------------------------------
*/
-static char*
-realloc_and_append(hbool_t _no_user_buf, size_t *len, char *buf, char *str_to_add)
+static char*
+realloc_and_append(hbool_t _no_user_buf, size_t *len, char *buf, const char *str_to_add)
{
size_t size_str_to_add, size_str;
@@ -2288,7 +2293,7 @@ realloc_and_append(hbool_t _no_user_buf, size_t *len, char *buf, char *str_to_ad
/* find the size of the current buffer */
size_str = HDstrlen(buf);
- /* Check to make sure the appended string does not
+ /* Check to make sure the appended string does not
* extend past the allocated buffer; if it does then truncate the string
*/
if(size_str < *len - 1) {
@@ -2315,7 +2320,7 @@ out:
*
* Return: void
*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
+* Programmer: Raymond Lu
*
* Date: December 6, 2005
*
@@ -2360,7 +2365,6 @@ print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt)
{
char **name = NULL; /*member names */
unsigned char *value = NULL; /*value array */
- unsigned char *copy = NULL; /*a pointer to value array */
int nmembs; /*number of members */
char tmp_str[TMP_LEN];
int nchars; /*number of output characters */
@@ -2418,17 +2422,15 @@ print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt)
nchars = HDsnprintf(tmp_str, TMP_LEN, "\"%s\"", name[i]);
if(!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
- HDsnprintf(tmp_str, TMP_LEN, "%*s ", MAX(0, 16 - nchars), "");
+ HDmemset(tmp_str, ' ', (size_t)MAX(3, 19 - nchars) + 1);
+ tmp_str[MAX(3, 19 - nchars)] = '\0';
if(!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
- /*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
- *strangely, unless use another pointer "copy".*/
- copy = value + (size_t)i * dst_size;
if (H5T_SGN_NONE == H5Tget_sign(native))
- HDsnprintf(tmp_str, TMP_LEN, "%u", *((unsigned int*)((void *)copy)));
+ HDsnprintf(tmp_str, TMP_LEN, "%u", *((unsigned int *)((void *)(value + (size_t)i * dst_size))));
else
- HDsnprintf(tmp_str, TMP_LEN, "%d", *((int*)((void *)copy)));
+ HDsnprintf(tmp_str, TMP_LEN, "%d", *((int *)((void *)(value + (size_t)i * dst_size))));
if(!(str = realloc_and_append(no_ubuf, str_len, str, tmp_str)))
goto out;
@@ -2450,8 +2452,12 @@ print_enum(hid_t type, char* str, size_t *str_len, hbool_t no_ubuf, size_t indt)
out:
if(0 == nmembs) {
- HDsnprintf(tmp_str, TMP_LEN, "\n%*s <empty>", (int)(indt + 4), "");
+ str = realloc_and_append(no_ubuf, str_len, str, "\n");
+ HDassert((indt + 4) < TMP_LEN);
+ HDmemset(tmp_str, ' ', (indt + 4) + 1);
+ tmp_str[(indt + 4)] = '\0';
str = realloc_and_append(no_ubuf, str_len, str, tmp_str);
+ str = realloc_and_append(no_ubuf, str_len, str, " <empty>");
} /* end if */
/* Release resources */
@@ -2478,7 +2484,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
+* Programmer: Raymond Lu
*
* Date: December 6, 2005
*
@@ -2525,7 +2531,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Raymond Lu, slu@ncsa.uiuc.edu
+* Programmer: Raymond Lu
*
* Date: December 20, 2005
*
@@ -2544,7 +2550,7 @@ char* H5LT_dtype_to_text(hid_t dtype, char *dt_str, H5LT_lang_t lang, size_t *sl
if(!(dt_str = realloc_and_append(no_user_buf, slen, dt_str, NULL)))
goto out;
-
+
if(lang != H5LT_DDL) {
HDsnprintf(dt_str, *slen, "only DDL is supported for now");
goto out;
@@ -3090,7 +3096,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3111,9 +3117,9 @@ herr_t H5LTget_attribute_string( hid_t loc_id,
hid_t obj_id;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
/* Open the object */
@@ -3121,9 +3127,9 @@ herr_t H5LTget_attribute_string( hid_t loc_id,
return -1;
/* Get the attribute */
- if ( H5LT_get_attribute_disk( obj_id, attr_name, data ) < 0 )
+ if ( H5LT_get_attribute_disk( obj_id, attr_name, data ) < 0 )
{
- H5Oclose(obj_id);
+ H5Oclose(obj_id);
return -1;
}
@@ -3142,7 +3148,7 @@ herr_t H5LTget_attribute_string( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3171,7 +3177,7 @@ herr_t H5LTget_attribute_char( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -3202,7 +3208,7 @@ herr_t H5LTget_attribute_uchar( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3231,7 +3237,7 @@ herr_t H5LTget_attribute_short( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -3262,7 +3268,7 @@ herr_t H5LTget_attribute_ushort( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3291,7 +3297,7 @@ herr_t H5LTget_attribute_int( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -3322,7 +3328,7 @@ herr_t H5LTget_attribute_uint( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3351,7 +3357,7 @@ herr_t H5LTget_attribute_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Elena Pourmal, epourmal@ncsa.uiuc.edu
+* Programmer: Elena Pourmal
*
* Date: June 17, 2005
*
@@ -3381,7 +3387,7 @@ herr_t H5LTget_attribute_long_long( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 8, 2004
*
@@ -3411,7 +3417,7 @@ herr_t H5LTget_attribute_ulong( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3443,7 +3449,7 @@ herr_t H5LTget_attribute_float( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3475,7 +3481,7 @@ herr_t H5LTget_attribute_double( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3514,7 +3520,7 @@ herr_t H5LTget_attribute( hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3537,9 +3543,9 @@ static herr_t H5LT_get_attribute_mem(hid_t loc_id,
hid_t attr_id = -1;
/* check the arguments */
- if (obj_name == NULL)
+ if (obj_name == NULL)
return -1;
- if (attr_name == NULL)
+ if (attr_name == NULL)
return -1;
/* Open the object */
@@ -3578,7 +3584,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: September 19, 2002
*
@@ -3628,7 +3634,7 @@ out:
*
* Return: FAIL on error, SUCCESS on success
*
-* Programmer: pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: January 04, 2005
*
@@ -3779,7 +3785,7 @@ H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid)
ret_value = FALSE;
goto done;
}
-
+
/* Determine if link resolves to an actual object */
if((obj_exists = H5Oexists_by_name(loc_id, tmp_path, H5P_DEFAULT)) < 0) {
ret_value = FAIL;
diff --git a/hl/src/H5LTanalyze.c b/hl/src/H5LTanalyze.c
index b6a7f58..e5f0bea 100644
--- a/hl/src/H5LTanalyze.c
+++ b/hl/src/H5LTanalyze.c
@@ -1,4 +1,4 @@
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2
+#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
#pragma GCC diagnostic ignored "-Wlarger-than="
@@ -30,11 +30,17 @@
#define yy_create_buffer H5LTyy_create_buffer
#define yy_delete_buffer H5LTyy_delete_buffer
-#define yy_flex_debug H5LTyy_flex_debug
+#define yy_scan_buffer H5LTyy_scan_buffer
+#define yy_scan_string H5LTyy_scan_string
+#define yy_scan_bytes H5LTyy_scan_bytes
#define yy_init_buffer H5LTyy_init_buffer
#define yy_flush_buffer H5LTyy_flush_buffer
#define yy_load_buffer_state H5LTyy_load_buffer_state
#define yy_switch_to_buffer H5LTyy_switch_to_buffer
+#define yypush_buffer_state H5LTyypush_buffer_state
+#define yypop_buffer_state H5LTyypop_buffer_state
+#define yyensure_buffer_stack H5LTyyensure_buffer_stack
+#define yy_flex_debug H5LTyy_flex_debug
#define yyin H5LTyyin
#define yyleng H5LTyyleng
#define yylex H5LTyylex
@@ -49,12 +55,246 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 39
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
+#ifdef yy_create_buffer
+#define H5LTyy_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer H5LTyy_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define H5LTyy_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer H5LTyy_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define H5LTyy_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer H5LTyy_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define H5LTyy_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string H5LTyy_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define H5LTyy_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes H5LTyy_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define H5LTyy_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer H5LTyy_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define H5LTyy_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer H5LTyy_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define H5LTyy_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state H5LTyy_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define H5LTyy_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer H5LTyy_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define H5LTyypush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state H5LTyypush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define H5LTyypop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state H5LTyypop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define H5LTyyensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack H5LTyyensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define H5LTyylex_ALREADY_DEFINED
+#else
+#define yylex H5LTyylex
+#endif
+
+#ifdef yyrestart
+#define H5LTyyrestart_ALREADY_DEFINED
+#else
+#define yyrestart H5LTyyrestart
+#endif
+
+#ifdef yylex_init
+#define H5LTyylex_init_ALREADY_DEFINED
+#else
+#define yylex_init H5LTyylex_init
+#endif
+
+#ifdef yylex_init_extra
+#define H5LTyylex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra H5LTyylex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define H5LTyylex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy H5LTyylex_destroy
+#endif
+
+#ifdef yyget_debug
+#define H5LTyyget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug H5LTyyget_debug
+#endif
+
+#ifdef yyset_debug
+#define H5LTyyset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug H5LTyyset_debug
+#endif
+
+#ifdef yyget_extra
+#define H5LTyyget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra H5LTyyget_extra
+#endif
+
+#ifdef yyset_extra
+#define H5LTyyset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra H5LTyyset_extra
+#endif
+
+#ifdef yyget_in
+#define H5LTyyget_in_ALREADY_DEFINED
+#else
+#define yyget_in H5LTyyget_in
+#endif
+
+#ifdef yyset_in
+#define H5LTyyset_in_ALREADY_DEFINED
+#else
+#define yyset_in H5LTyyset_in
+#endif
+
+#ifdef yyget_out
+#define H5LTyyget_out_ALREADY_DEFINED
+#else
+#define yyget_out H5LTyyget_out
+#endif
+
+#ifdef yyset_out
+#define H5LTyyset_out_ALREADY_DEFINED
+#else
+#define yyset_out H5LTyyset_out
+#endif
+
+#ifdef yyget_leng
+#define H5LTyyget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng H5LTyyget_leng
+#endif
+
+#ifdef yyget_text
+#define H5LTyyget_text_ALREADY_DEFINED
+#else
+#define yyget_text H5LTyyget_text
+#endif
+
+#ifdef yyget_lineno
+#define H5LTyyget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno H5LTyyget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define H5LTyyset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno H5LTyyset_lineno
+#endif
+
+#ifdef yywrap
+#define H5LTyywrap_ALREADY_DEFINED
+#else
+#define yywrap H5LTyywrap
+#endif
+
+#ifdef yyalloc
+#define H5LTyyalloc_ALREADY_DEFINED
+#else
+#define yyalloc H5LTyyalloc
+#endif
+
+#ifdef yyrealloc
+#define H5LTyyrealloc_ALREADY_DEFINED
+#else
+#define yyrealloc H5LTyyrealloc
+#endif
+
+#ifdef yyfree
+#define H5LTyyfree_ALREADY_DEFINED
+#else
+#define yyfree H5LTyyfree
+#endif
+
+#ifdef yytext
+#define H5LTyytext_ALREADY_DEFINED
+#else
+#define yytext H5LTyytext
+#endif
+
+#ifdef yyleng
+#define H5LTyyleng_ALREADY_DEFINED
+#else
+#define yyleng H5LTyyleng
+#endif
+
+#ifdef yyin
+#define H5LTyyin_ALREADY_DEFINED
+#else
+#define yyin H5LTyyin
+#endif
+
+#ifdef yyout
+#define H5LTyyout_ALREADY_DEFINED
+#else
+#define yyout H5LTyyout
+#endif
+
+#ifdef yy_flex_debug
+#define H5LTyy_flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug H5LTyy_flex_debug
+#endif
+
+#ifdef yylineno
+#define H5LTyylineno_ALREADY_DEFINED
+#else
+#define yylineno H5LTyylineno
+#endif
+
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@@ -125,60 +365,48 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
+/* begin standard C++ headers. */
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* Enter a start condition. This macro really ought to take a parameter,
* but we do it the disgusting crufty way forced on us by the ()-less
* definition of BEGIN.
*/
#define BEGIN (yy_start) = 1 + 2 *
-
/* Translate the current start state into a value that can be later handed
* to BEGIN to return to the state. The YYSTATE alias is for lex
* compatibility.
*/
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
-
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE H5LTyyrestart(H5LTyyin )
-
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
@@ -208,14 +436,14 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
typedef size_t yy_size_t;
#endif
-extern yy_size_t H5LTyyleng;
+extern int yyleng;
-extern FILE *H5LTyyin, *H5LTyyout;
+extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
#define YY_LESS_LINENO(n)
#define YY_LINENO_REWIND_TO(ptr)
@@ -223,16 +451,15 @@ extern FILE *H5LTyyin, *H5LTyyout;
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up H5LTyytext. */ \
+ /* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up H5LTyytext again */ \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -247,12 +474,12 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -275,7 +502,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -292,8 +519,8 @@ struct yy_buffer_state
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via H5LTyyrestart()), so that the user can continue scanning by
- * just pointing H5LTyyin at a new input file.
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
@@ -303,7 +530,7 @@ struct yy_buffer_state
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
@@ -314,103 +541,98 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)
-
/* Same as previous macro, but useful when we know that the buffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
-/* yy_hold_char holds the character lost when H5LTyytext is formed. */
+/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t H5LTyyleng;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
+static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
-/* Flag which is used to allow H5LTyywrap()'s to do buffer switches
- * instead of setting up a fresh H5LTyyin. A bit of a hack ...
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
-void H5LTyyrestart (FILE *input_file );
-void H5LTyy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE H5LTyy_create_buffer (FILE *file,int size );
-void H5LTyy_delete_buffer (YY_BUFFER_STATE b );
-void H5LTyy_flush_buffer (YY_BUFFER_STATE b );
-void H5LTyypush_buffer_state (YY_BUFFER_STATE new_buffer );
-void H5LTyypop_buffer_state (void );
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
-static void H5LTyyensure_buffer_stack (void );
-static void H5LTyy_load_buffer_state (void );
-static void H5LTyy_init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
-#define YY_FLUSH_BUFFER H5LTyy_flush_buffer(YY_CURRENT_BUFFER )
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
-YY_BUFFER_STATE H5LTyy_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE H5LTyy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE H5LTyy_scan_bytes (yyconst char *bytes,yy_size_t len );
-
-void *H5LTyyalloc (yy_size_t );
-void *H5LTyyrealloc (void *,yy_size_t );
-void H5LTyyfree (void * );
-
-#define yy_new_buffer H5LTyy_create_buffer
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- H5LTyyensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
-
#define yy_set_bol(at_bol) \
{ \
if ( ! YY_CURRENT_BUFFER ){\
- H5LTyyensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE ); \
+ yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
-
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
/* Begin user sect3 */
+typedef flex_uint8_t YY_CHAR;
-typedef unsigned char YY_CHAR;
-
-FILE *H5LTyyin = (FILE *) 0, *H5LTyyout = (FILE *) 0;
+FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
-extern int H5LTyylineno;
-
-int H5LTyylineno = 1;
+extern int yylineno;
+int yylineno = 1;
-extern char *H5LTyytext;
-#define yytext_ptr H5LTyytext
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up H5LTyytext.
+ * corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
- H5LTyyleng = (size_t) (yy_cp - yy_bp); \
+ yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-
#define YY_NUM_RULES 66
#define YY_END_OF_BUFFER 67
/* This struct is not used in this scanner,
@@ -420,7 +642,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_acclist[437] =
+static const flex_int16_t yy_acclist[437] =
{ 0,
64, 64, 64, 64, 67, 66, 64, 66, 64, 65,
66, 56, 66, 55, 66, 62, 66, 63, 66, 66,
@@ -472,7 +694,7 @@ static yyconst flex_int16_t yy_acclist[437] =
57, 21, 57, 34, 34, 57
} ;
-static yyconst flex_int16_t yy_accept[546] =
+static const flex_int16_t yy_accept[546] =
{ 0,
1, 2, 3, 4, 5, 6, 7, 9, 12, 14,
16, 18, 20, 21, 22, 23, 24, 26, 28, 30,
@@ -536,7 +758,7 @@ static yyconst flex_int16_t yy_accept[546] =
432, 434, 435, 437, 437
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -568,7 +790,7 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[42] =
+static const YY_CHAR yy_meta[42] =
{ 0,
1, 1, 1, 2, 3, 3, 3, 3, 3, 3,
3, 3, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -577,7 +799,7 @@ static yyconst flex_int32_t yy_meta[42] =
1
} ;
-static yyconst flex_int16_t yy_base[547] =
+static const flex_int16_t yy_base[547] =
{ 0,
0, 0, 41, 0, 610, 611, 81, 83, 611, 0,
611, 611, 56, 599, 580, 575, 611, 611, 611, 611,
@@ -641,7 +863,7 @@ static yyconst flex_int16_t yy_base[547] =
0, 611, 0, 611, 106, 275
} ;
-static yyconst flex_int16_t yy_def[547] =
+static const flex_int16_t yy_def[547] =
{ 0,
544, 1, 544, 3, 544, 544, 544, 544, 544, 545,
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
@@ -705,7 +927,7 @@ static yyconst flex_int16_t yy_def[547] =
546, 544, 546, 0, 544, 544
} ;
-static yyconst flex_int16_t yy_nxt[653] =
+static const flex_int16_t yy_nxt[653] =
{ 0,
6, 7, 8, 9, 10, 10, 10, 10, 10, 10,
10, 10, 11, 12, 6, 6, 13, 6, 6, 6,
@@ -781,7 +1003,7 @@ static yyconst flex_int16_t yy_nxt[653] =
544, 544
} ;
-static yyconst flex_int16_t yy_chk[653] =
+static const flex_int16_t yy_chk[653] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -857,15 +1079,15 @@ static yyconst flex_int16_t yy_chk[653] =
544, 544
} ;
-extern int H5LTyy_flex_debug;
-int H5LTyy_flex_debug = 0;
+extern int yy_flex_debug;
+int yy_flex_debug = 0;
static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
static char *yy_full_match;
static int yy_lp;
#define REJECT \
{ \
-*yy_cp = (yy_hold_char); /* undo effects of setting up H5LTyytext */ \
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
++(yy_lp); \
goto find_rule; \
@@ -874,7 +1096,7 @@ goto find_rule; \
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *H5LTyytext;
+char *yytext;
#line 1 "hl/src/H5LTanalyze.l"
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
@@ -893,17 +1115,24 @@ char *H5LTyytext;
* If you make any changes to H5LTanalyze.l, please run bin/genparser to
* recreate the output files.
*/
-#line 23 "hl/src/H5LTanalyze.l"
+#line 21 "hl/src/H5LTanalyze.l"
#include <stdlib.h>
#include <string.h>
#include <hdf5.h>
#include "H5LTparse.h"
-/* Turn off suggest const attribute warning in gcc */
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2
+/* Turn off suggest const & malloc attribute warnings in gcc */
+#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
#endif
+/* Turn off null dereference warnings in gcc.
+ * We have no control over this generated code.
+ */
+#if defined __GNUC__ && 600 <= __GNUC__ * 100
+#pragma GCC diagnostic ignored "-Wnull-dereference"
+#endif
+
int my_yyinput(char *, int);
#undef YY_INPUT
#define YY_INPUT(b, r, ms) (r=my_yyinput(b, ms))
@@ -951,8 +1180,9 @@ extern hbool_t is_opq_tag;
hbool_t first_quote = 1;
+#line 1162 "hl/src/H5LTanalyze.c"
-#line 936 "hl/src/H5LTanalyze.c"
+#line 1164 "hl/src/H5LTanalyze.c"
#define INITIAL 0
#define TAG_STRING 1
@@ -961,36 +1191,36 @@ hbool_t first_quote = 1;
#define YY_EXTRA_TYPE void *
#endif
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int H5LTyylex_destroy (void );
+int yylex_destroy ( void );
-int H5LTyyget_debug (void );
+int yyget_debug ( void );
-void H5LTyyset_debug (int debug_flag );
+void yyset_debug ( int debug_flag );
-YY_EXTRA_TYPE H5LTyyget_extra (void );
+YY_EXTRA_TYPE yyget_extra ( void );
-void H5LTyyset_extra (YY_EXTRA_TYPE user_defined );
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
-FILE *H5LTyyget_in (void );
+FILE *yyget_in ( void );
-void H5LTyyset_in (FILE * in_str );
+void yyset_in ( FILE * _in_str );
-FILE *H5LTyyget_out (void );
+FILE *yyget_out ( void );
-void H5LTyyset_out (FILE * out_str );
+void yyset_out ( FILE * _out_str );
-yy_size_t H5LTyyget_leng (void );
+ int yyget_leng ( void );
-char *H5LTyyget_text (void );
+char *yyget_text ( void );
-int H5LTyyget_lineno (void );
+int yyget_lineno ( void );
-void H5LTyyset_lineno (int line_number );
+void yyset_lineno ( int _line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -998,28 +1228,31 @@ void H5LTyyset_lineno (int line_number );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int H5LTyywrap (void );
+extern "C" int yywrap ( void );
#else
-extern int H5LTyywrap (void );
+extern int yywrap ( void );
#endif
#endif
- static void yyunput (int c,char *buf_ptr );
+#ifndef YY_NO_UNPUT
+ static void yyunput ( int c, char *buf_ptr );
+
+#endif
+
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy ( char *, const char *, int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen ( const char * );
#endif
#ifndef YY_NO_INPUT
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput ( void );
#else
-static int input (void );
+static int input ( void );
#endif
#endif
@@ -1039,7 +1272,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( H5LTyytext, H5LTyyleng, 1, H5LTyyout )) {} } while (0)
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1050,20 +1283,20 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
- (c = getc( H5LTyyin )) != EOF && c != '\n'; ++n ) \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( H5LTyyin ) ) \
+ if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, H5LTyyin))==0 && ferror(H5LTyyin)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
@@ -1071,7 +1304,7 @@ static int input (void );
break; \
} \
errno=0; \
- clearerr(H5LTyyin); \
+ clearerr(yyin); \
} \
}\
\
@@ -1104,12 +1337,12 @@ static int input (void );
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
-extern int H5LTyylex (void);
+extern int yylex (void);
-#define YY_DECL int H5LTyylex (void)
+#define YY_DECL int yylex (void)
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after H5LTyytext and H5LTyyleng
+/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
@@ -1118,7 +1351,7 @@ extern int H5LTyylex (void);
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
#define YY_RULE_SETUP \
@@ -1128,9 +1361,9 @@ extern int H5LTyylex (void);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
if ( !(yy_init) )
{
@@ -1142,39 +1375,39 @@ YY_DECL
/* Create the reject buffer large enough to save one state per allowed character. */
if ( ! (yy_state_buf) )
- (yy_state_buf) = (yy_state_type *)H5LTyyalloc(YY_STATE_BUF_SIZE );
+ (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
if ( ! (yy_state_buf) )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyylex()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! H5LTyyin )
- H5LTyyin = stdin;
+ if ( ! yyin )
+ yyin = stdin;
- if ( ! H5LTyyout )
- H5LTyyout = stdout;
+ if ( ! yyout )
+ yyout = stdout;
if ( ! YY_CURRENT_BUFFER ) {
- H5LTyyensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
}
{
-#line 84 "hl/src/H5LTanalyze.l"
+#line 89 "hl/src/H5LTanalyze.l"
-#line 1152 "hl/src/H5LTanalyze.c"
+#line 1383 "hl/src/H5LTanalyze.c"
- while ( 1 ) /* loops until end-of-file is reached */
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
yy_cp = (yy_c_buf_p);
- /* Support of H5LTyytext. */
+ /* Support of yytext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
@@ -1190,14 +1423,14 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 545 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
*(yy_state_ptr)++ = yy_current_state;
++yy_cp;
}
@@ -1206,7 +1439,9 @@ yy_match:
yy_find_action:
yy_current_state = *--(yy_state_ptr);
(yy_lp) = yy_accept[yy_current_state];
+
find_rule: /* we branch to this label when backing up */
+
for ( ; ; ) /* until we find what rule we matched */
{
if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
@@ -1230,282 +1465,282 @@ do_action: /* This label is used only to access EOF actions. */
{ /* beginning of action switch */
case 1:
YY_RULE_SETUP
-#line 86 "hl/src/H5LTanalyze.l"
+#line 91 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I8BE_TOKEN);}
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 87 "hl/src/H5LTanalyze.l"
+#line 92 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I8LE_TOKEN);}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 88 "hl/src/H5LTanalyze.l"
+#line 93 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I16BE_TOKEN);}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 89 "hl/src/H5LTanalyze.l"
+#line 94 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I16LE_TOKEN);}
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 90 "hl/src/H5LTanalyze.l"
+#line 95 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I32BE_TOKEN);}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 91 "hl/src/H5LTanalyze.l"
+#line 96 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I32LE_TOKEN);}
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 92 "hl/src/H5LTanalyze.l"
+#line 97 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I64BE_TOKEN);}
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 93 "hl/src/H5LTanalyze.l"
+#line 98 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_I64LE_TOKEN);}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 95 "hl/src/H5LTanalyze.l"
+#line 100 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U8BE_TOKEN);}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 96 "hl/src/H5LTanalyze.l"
+#line 101 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U8LE_TOKEN);}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 97 "hl/src/H5LTanalyze.l"
+#line 102 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U16BE_TOKEN);}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 98 "hl/src/H5LTanalyze.l"
+#line 103 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U16LE_TOKEN);}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 99 "hl/src/H5LTanalyze.l"
+#line 104 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U32BE_TOKEN);}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 100 "hl/src/H5LTanalyze.l"
+#line 105 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U32LE_TOKEN);}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 101 "hl/src/H5LTanalyze.l"
+#line 106 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U64BE_TOKEN);}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 102 "hl/src/H5LTanalyze.l"
+#line 107 "hl/src/H5LTanalyze.l"
{return hid(H5T_STD_U64LE_TOKEN);}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 104 "hl/src/H5LTanalyze.l"
+#line 109 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_CHAR_TOKEN);}
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 105 "hl/src/H5LTanalyze.l"
+#line 110 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_SCHAR_TOKEN);}
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 106 "hl/src/H5LTanalyze.l"
+#line 111 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_UCHAR_TOKEN);}
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 107 "hl/src/H5LTanalyze.l"
+#line 112 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_SHORT_TOKEN);}
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 108 "hl/src/H5LTanalyze.l"
+#line 113 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_USHORT_TOKEN);}
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 109 "hl/src/H5LTanalyze.l"
+#line 114 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_INT_TOKEN);}
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 110 "hl/src/H5LTanalyze.l"
+#line 115 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_UINT_TOKEN);}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 111 "hl/src/H5LTanalyze.l"
+#line 116 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LONG_TOKEN);}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 112 "hl/src/H5LTanalyze.l"
+#line 117 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_ULONG_TOKEN);}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 113 "hl/src/H5LTanalyze.l"
+#line 118 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LLONG_TOKEN);}
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 114 "hl/src/H5LTanalyze.l"
+#line 119 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_ULLONG_TOKEN);}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 116 "hl/src/H5LTanalyze.l"
+#line 121 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F32BE_TOKEN);}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 117 "hl/src/H5LTanalyze.l"
+#line 122 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F32LE_TOKEN);}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 118 "hl/src/H5LTanalyze.l"
+#line 123 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F64BE_TOKEN);}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 119 "hl/src/H5LTanalyze.l"
+#line 124 "hl/src/H5LTanalyze.l"
{return hid(H5T_IEEE_F64LE_TOKEN);}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 120 "hl/src/H5LTanalyze.l"
+#line 125 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_FLOAT_TOKEN);}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 121 "hl/src/H5LTanalyze.l"
+#line 126 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_DOUBLE_TOKEN);}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 122 "hl/src/H5LTanalyze.l"
+#line 127 "hl/src/H5LTanalyze.l"
{return hid(H5T_NATIVE_LDOUBLE_TOKEN);}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 124 "hl/src/H5LTanalyze.l"
+#line 129 "hl/src/H5LTanalyze.l"
{return token(H5T_STRING_TOKEN);}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 125 "hl/src/H5LTanalyze.l"
+#line 130 "hl/src/H5LTanalyze.l"
{return token(STRSIZE_TOKEN);}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 126 "hl/src/H5LTanalyze.l"
+#line 131 "hl/src/H5LTanalyze.l"
{return token(STRPAD_TOKEN);}
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 127 "hl/src/H5LTanalyze.l"
+#line 132 "hl/src/H5LTanalyze.l"
{return token(CSET_TOKEN);}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 128 "hl/src/H5LTanalyze.l"
+#line 133 "hl/src/H5LTanalyze.l"
{return token(CTYPE_TOKEN);}
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 129 "hl/src/H5LTanalyze.l"
+#line 134 "hl/src/H5LTanalyze.l"
{return token(H5T_STR_NULLTERM_TOKEN);}
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 130 "hl/src/H5LTanalyze.l"
+#line 135 "hl/src/H5LTanalyze.l"
{return token(H5T_STR_NULLPAD_TOKEN);}
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 131 "hl/src/H5LTanalyze.l"
+#line 136 "hl/src/H5LTanalyze.l"
{return token(H5T_STR_SPACEPAD_TOKEN);}
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 132 "hl/src/H5LTanalyze.l"
+#line 137 "hl/src/H5LTanalyze.l"
{return token(H5T_CSET_ASCII_TOKEN);}
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 133 "hl/src/H5LTanalyze.l"
+#line 138 "hl/src/H5LTanalyze.l"
{return token(H5T_CSET_UTF8_TOKEN);}
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 134 "hl/src/H5LTanalyze.l"
+#line 139 "hl/src/H5LTanalyze.l"
{return token(H5T_C_S1_TOKEN);}
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 135 "hl/src/H5LTanalyze.l"
+#line 140 "hl/src/H5LTanalyze.l"
{return token(H5T_FORTRAN_S1_TOKEN);}
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 136 "hl/src/H5LTanalyze.l"
+#line 141 "hl/src/H5LTanalyze.l"
{return token(H5T_VARIABLE_TOKEN);}
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 138 "hl/src/H5LTanalyze.l"
+#line 143 "hl/src/H5LTanalyze.l"
{return token(H5T_COMPOUND_TOKEN);}
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 139 "hl/src/H5LTanalyze.l"
+#line 144 "hl/src/H5LTanalyze.l"
{return token(H5T_ENUM_TOKEN);}
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 140 "hl/src/H5LTanalyze.l"
+#line 145 "hl/src/H5LTanalyze.l"
{return token(H5T_ARRAY_TOKEN);}
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 141 "hl/src/H5LTanalyze.l"
+#line 146 "hl/src/H5LTanalyze.l"
{return token(H5T_VLEN_TOKEN);}
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 143 "hl/src/H5LTanalyze.l"
+#line 148 "hl/src/H5LTanalyze.l"
{return token(H5T_OPAQUE_TOKEN);}
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 144 "hl/src/H5LTanalyze.l"
+#line 149 "hl/src/H5LTanalyze.l"
{return token(OPQ_SIZE_TOKEN);}
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 145 "hl/src/H5LTanalyze.l"
+#line 150 "hl/src/H5LTanalyze.l"
{return token(OPQ_TAG_TOKEN);}
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 147 "hl/src/H5LTanalyze.l"
+#line 152 "hl/src/H5LTanalyze.l"
{
if( is_str_size || (is_enum && is_enum_memb) ||
is_opq_size || (asindex>-1 && arr_stack[asindex].is_dim) ||
(csindex>-1 && cmpd_stack[csindex].is_field) ) {
- H5LTyylval.ival = atoi(H5LTyytext);
+ H5LTyylval.ival = atoi(yytext);
return NUMBER;
} else
REJECT;
@@ -1513,7 +1748,7 @@ YY_RULE_SETUP
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 157 "hl/src/H5LTanalyze.l"
+#line 162 "hl/src/H5LTanalyze.l"
{
/*if it's first quote, and is a compound field name or an enum symbol*/
if((is_opq_tag || is_enum || (csindex>-1 && cmpd_stack[csindex].is_field))
@@ -1528,12 +1763,12 @@ YY_RULE_SETUP
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
-#line 167 "hl/src/H5LTanalyze.l"
+#line 172 "hl/src/H5LTanalyze.l"
{
#ifdef H5_HAVE_WIN32_API
- H5LTyylval.sval = _strdup(H5LTyytext);
+ H5LTyylval.sval = _strdup(yytext);
#else /* H5_HAVE_WIN32_API */
- H5LTyylval.sval = strdup(H5LTyytext);
+ H5LTyylval.sval = strdup(yytext);
#endif /* H5_HAVE_WIN32_API */
BEGIN INITIAL;
return STRING;
@@ -1541,52 +1776,52 @@ YY_RULE_SETUP
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 177 "hl/src/H5LTanalyze.l"
+#line 182 "hl/src/H5LTanalyze.l"
{return token('{');}
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 178 "hl/src/H5LTanalyze.l"
+#line 183 "hl/src/H5LTanalyze.l"
{return token('}');}
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 179 "hl/src/H5LTanalyze.l"
+#line 184 "hl/src/H5LTanalyze.l"
{return token('[');}
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 180 "hl/src/H5LTanalyze.l"
+#line 185 "hl/src/H5LTanalyze.l"
{return token(']');}
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 181 "hl/src/H5LTanalyze.l"
+#line 186 "hl/src/H5LTanalyze.l"
{return token(':');}
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 182 "hl/src/H5LTanalyze.l"
+#line 187 "hl/src/H5LTanalyze.l"
{return token(';');}
YY_BREAK
case 64:
/* rule 64 can match eol */
YY_RULE_SETUP
-#line 183 "hl/src/H5LTanalyze.l"
+#line 188 "hl/src/H5LTanalyze.l"
;
YY_BREAK
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
-#line 184 "hl/src/H5LTanalyze.l"
+#line 189 "hl/src/H5LTanalyze.l"
{ return 0; }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 186 "hl/src/H5LTanalyze.l"
+#line 191 "hl/src/H5LTanalyze.l"
ECHO;
YY_BREAK
-#line 1570 "hl/src/H5LTanalyze.c"
+#line 1803 "hl/src/H5LTanalyze.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(TAG_STRING):
yyterminate();
@@ -1604,15 +1839,15 @@ ECHO;
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed H5LTyyin at a new source and called
- * H5LTyylex(). If so, then we have to assure
+ * just pointed yyin at a new source and called
+ * yylex(). If so, then we have to assure
* consistency between YY_CURRENT_BUFFER and our
* globals. Here is the right place to do so, because
* this is the first action (other than possibly a
* back-up) that will match for the new input source.
*/
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
- YY_CURRENT_BUFFER_LVALUE->yy_input_file = H5LTyyin;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
@@ -1665,11 +1900,11 @@ ECHO;
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( H5LTyywrap( ) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * H5LTyytext, we can now set up
+ * yytext, we can now set up
* yy_c_buf_p so that if some total
* hoser (like flex itself) wants to
* call the scanner after we return the
@@ -1719,7 +1954,7 @@ ECHO;
} /* end of action switch */
} /* end of scanning one token */
} /* end of user's declarations */
-} /* end of H5LTyylex */
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
*
@@ -1730,9 +1965,9 @@ ECHO;
*/
static int yy_get_next_buffer (void)
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
@@ -1761,7 +1996,7 @@ static int yy_get_next_buffer (void)
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
@@ -1774,7 +2009,7 @@ static int yy_get_next_buffer (void)
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -1800,7 +2035,7 @@ static int yy_get_next_buffer (void)
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- H5LTyyrestart(H5LTyyin );
+ yyrestart( yyin );
}
else
@@ -1814,12 +2049,15 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) H5LTyyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
@@ -1835,8 +2073,8 @@ static int yy_get_next_buffer (void)
static yy_state_type yy_get_previous_state (void)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
yy_current_state = (yy_start);
@@ -1845,14 +2083,14 @@ static int yy_get_next_buffer (void)
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 545 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
*(yy_state_ptr)++ = yy_current_state;
}
@@ -1866,16 +2104,16 @@ static int yy_get_next_buffer (void)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
{
- register int yy_is_jam;
+ int yy_is_jam;
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 545 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 544);
if ( ! yy_is_jam )
*(yy_state_ptr)++ = yy_current_state;
@@ -1883,22 +2121,24 @@ static int yy_get_next_buffer (void)
return yy_is_jam ? 0 : yy_current_state;
}
- static void yyunput (int c, register char * yy_bp )
+#ifndef YY_NO_UNPUT
+
+ static void yyunput (int c, char * yy_bp )
{
- register char *yy_cp;
+ char *yy_cp;
yy_cp = (yy_c_buf_p);
- /* undo effects of setting up H5LTyytext */
+ /* undo effects of setting up yytext */
*yy_cp = (yy_hold_char);
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register yy_size_t number_to_move = (yy_n_chars) + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ int number_to_move = (yy_n_chars) + 2;
+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
+ char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -1907,7 +2147,7 @@ static int yy_get_next_buffer (void)
yy_cp += (int) (dest - source);
yy_bp += (int) (dest - source);
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
- (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
+ (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
YY_FATAL_ERROR( "flex scanner push-back overflow" );
@@ -1920,6 +2160,8 @@ static int yy_get_next_buffer (void)
(yy_c_buf_p) = yy_cp;
}
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
@@ -1944,7 +2186,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -1961,14 +2203,14 @@ static int yy_get_next_buffer (void)
*/
/* Reset buffer status. */
- H5LTyyrestart(H5LTyyin );
+ yyrestart( yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( H5LTyywrap( ) )
- return EOF;
+ if ( yywrap( ) )
+ return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -1987,7 +2229,7 @@ static int yy_get_next_buffer (void)
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve H5LTyytext */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
return c;
@@ -1999,32 +2241,32 @@ static int yy_get_next_buffer (void)
*
* @note This function does not reset the start condition to @c INITIAL .
*/
- void H5LTyyrestart (FILE * input_file )
+ void yyrestart (FILE * input_file )
{
if ( ! YY_CURRENT_BUFFER ){
- H5LTyyensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- H5LTyy_create_buffer(H5LTyyin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- H5LTyy_init_buffer(YY_CURRENT_BUFFER,input_file );
- H5LTyy_load_buffer_state( );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
}
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
- void H5LTyy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
* with
- * H5LTyypop_buffer_state();
- * H5LTyypush_buffer_state(new_buffer);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
*/
- H5LTyyensure_buffer_stack ();
+ yyensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
@@ -2037,21 +2279,21 @@ static int yy_get_next_buffer (void)
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (H5LTyywrap()) processing, but the only time this flag
- * is looked at is after H5LTyywrap() is called, so it's safe
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
* to go ahead and always set it.
*/
(yy_did_buffer_switch_on_eof) = 1;
}
-static void H5LTyy_load_buffer_state (void)
+static void yy_load_buffer_state (void)
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- H5LTyyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
(yy_hold_char) = *(yy_c_buf_p);
}
@@ -2061,35 +2303,35 @@ static void H5LTyy_load_buffer_state (void)
*
* @return the allocated buffer state.
*/
- YY_BUFFER_STATE H5LTyy_create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) H5LTyyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_buf_size = size;
/* yy_ch_buf has to be 2 characters longer than the size given because
* we need to put in 2 end-of-buffer characters.
*/
- b->yy_ch_buf = (char *) H5LTyyalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- H5LTyy_init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
}
/** Destroy the buffer.
- * @param b a buffer created with H5LTyy_create_buffer()
+ * @param b a buffer created with yy_create_buffer()
*
*/
- void H5LTyy_delete_buffer (YY_BUFFER_STATE b )
+ void yy_delete_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
@@ -2099,27 +2341,27 @@ static void H5LTyy_load_buffer_state (void)
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- H5LTyyfree((void *) b->yy_ch_buf );
+ yyfree( (void *) b->yy_ch_buf );
- H5LTyyfree((void *) b );
+ yyfree( (void *) b );
}
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
- * such as during a H5LTyyrestart() or at EOF.
+ * such as during a yyrestart() or at EOF.
*/
- static void H5LTyy_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
{
int oerrno = errno;
- H5LTyy_flush_buffer(b );
+ yy_flush_buffer( b );
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then H5LTyy_init_buffer was _probably_
- * called from H5LTyyrestart() or through yy_get_next_buffer.
+ /* If b is the current buffer, then yy_init_buffer was _probably_
+ * called from yyrestart() or through yy_get_next_buffer.
* In that case, we don't want to reset the lineno or column.
*/
if (b != YY_CURRENT_BUFFER){
@@ -2136,7 +2378,7 @@ static void H5LTyy_load_buffer_state (void)
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
*
*/
- void H5LTyy_flush_buffer (YY_BUFFER_STATE b )
+ void yy_flush_buffer (YY_BUFFER_STATE b )
{
if ( ! b )
return;
@@ -2156,7 +2398,7 @@ static void H5LTyy_load_buffer_state (void)
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
}
/** Pushes the new state onto the stack. The new state becomes
@@ -2165,14 +2407,14 @@ static void H5LTyy_load_buffer_state (void)
* @param new_buffer The new state.
*
*/
-void H5LTyypush_buffer_state (YY_BUFFER_STATE new_buffer )
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
if (new_buffer == NULL)
return;
- H5LTyyensure_buffer_stack();
+ yyensure_buffer_stack();
- /* This block is copied from H5LTyy_switch_to_buffer. */
+ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
@@ -2186,8 +2428,8 @@ void H5LTyypush_buffer_state (YY_BUFFER_STATE new_buffer )
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from H5LTyy_switch_to_buffer. */
- H5LTyy_load_buffer_state( );
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
@@ -2195,18 +2437,18 @@ void H5LTyypush_buffer_state (YY_BUFFER_STATE new_buffer )
* The next element becomes the new top.
*
*/
-void H5LTyypop_buffer_state (void)
+void yypop_buffer_state (void)
{
if (!YY_CURRENT_BUFFER)
return;
- H5LTyy_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer(YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
if ((yy_buffer_stack_top) > 0)
--(yy_buffer_stack_top);
if (YY_CURRENT_BUFFER) {
- H5LTyy_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
@@ -2214,7 +2456,7 @@ void H5LTyypop_buffer_state (void)
/* Allocates the stack if it does not exist.
* Guarantees space for at least one push.
*/
-static void H5LTyyensure_buffer_stack (void)
+static void yyensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
@@ -2224,15 +2466,15 @@ static void H5LTyyensure_buffer_stack (void)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
- num_to_alloc = 1;
- (yy_buffer_stack) = (struct yy_buffer_state**)H5LTyyalloc
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyyensure_buffer_stack()" );
-
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
@@ -2241,15 +2483,15 @@ static void H5LTyyensure_buffer_stack (void)
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)H5LTyyrealloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyyensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -2261,9 +2503,9 @@ static void H5LTyyensure_buffer_stack (void)
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE H5LTyy_scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
@@ -2271,69 +2513,69 @@ YY_BUFFER_STATE H5LTyy_scan_buffer (char * base, yy_size_t size )
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
- b = (YY_BUFFER_STATE) H5LTyyalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
+ b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- H5LTyy_switch_to_buffer(b );
+ yy_switch_to_buffer( b );
return b;
}
-/** Setup the input buffer state to scan a string. The next call to H5LTyylex() will
+/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * H5LTyy_scan_bytes() instead.
+ * yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE H5LTyy_scan_string (yyconst char * yystr )
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
{
- return H5LTyy_scan_bytes(yystr,strlen(yystr) );
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
}
-/** Setup the input buffer state to scan the given bytes. The next call to H5LTyylex() will
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE H5LTyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
- yy_size_t i;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) H5LTyyalloc(n );
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in H5LTyy_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = H5LTyy_scan_buffer(buf,n );
+ b = yy_scan_buffer( buf, n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in H5LTyy_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
@@ -2347,9 +2589,9 @@ YY_BUFFER_STATE H5LTyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
@@ -2359,14 +2601,14 @@ static void yy_fatal_error (yyconst char* msg )
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up H5LTyytext. */ \
+ /* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- H5LTyytext[H5LTyyleng] = (yy_hold_char); \
- (yy_c_buf_p) = H5LTyytext + yyless_macro_arg; \
+ yytext[yyleng] = (yy_hold_char); \
+ (yy_c_buf_p) = yytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
- H5LTyyleng = yyless_macro_arg; \
+ yyleng = yyless_macro_arg; \
} \
while ( 0 )
@@ -2375,91 +2617,91 @@ static void yy_fatal_error (yyconst char* msg )
/** Get the current line number.
*
*/
-int H5LTyyget_lineno (void)
+int yyget_lineno (void)
{
-
- return H5LTyylineno;
+
+ return yylineno;
}
/** Get the input stream.
*
*/
-FILE *H5LTyyget_in (void)
+FILE *yyget_in (void)
{
- return H5LTyyin;
+ return yyin;
}
/** Get the output stream.
*
*/
-FILE *H5LTyyget_out (void)
+FILE *yyget_out (void)
{
- return H5LTyyout;
+ return yyout;
}
/** Get the length of the current token.
*
*/
-yy_size_t H5LTyyget_leng (void)
+int yyget_leng (void)
{
- return H5LTyyleng;
+ return yyleng;
}
/** Get the current token.
*
*/
-char *H5LTyyget_text (void)
+char *yyget_text (void)
{
- return H5LTyytext;
+ return yytext;
}
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
*
*/
-void H5LTyyset_lineno (int line_number )
+void yyset_lineno (int _line_number )
{
- H5LTyylineno = line_number;
+ yylineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
*
- * @see H5LTyy_switch_to_buffer
+ * @see yy_switch_to_buffer
*/
-void H5LTyyset_in (FILE * in_str )
+void yyset_in (FILE * _in_str )
{
- H5LTyyin = in_str ;
+ yyin = _in_str ;
}
-void H5LTyyset_out (FILE * out_str )
+void yyset_out (FILE * _out_str )
{
- H5LTyyout = out_str ;
+ yyout = _out_str ;
}
-int H5LTyyget_debug (void)
+int yyget_debug (void)
{
- return H5LTyy_flex_debug;
+ return yy_flex_debug;
}
-void H5LTyyset_debug (int bdebug )
+void yyset_debug (int _bdebug )
{
- H5LTyy_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from H5LTyylex_destroy(), so don't allocate here.
+ * This function is called from yylex_destroy(), so don't allocate here.
*/
- (yy_buffer_stack) = 0;
+ (yy_buffer_stack) = NULL;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = (char *) 0;
+ (yy_c_buf_p) = NULL;
(yy_init) = 0;
(yy_start) = 0;
@@ -2470,39 +2712,39 @@ static int yy_init_globals (void)
/* Defined in main.c */
#ifdef YY_STDINIT
- H5LTyyin = stdin;
- H5LTyyout = stdout;
+ yyin = stdin;
+ yyout = stdout;
#else
- H5LTyyin = (FILE *) 0;
- H5LTyyout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
- * H5LTyylex_init()
+ * yylex_init()
*/
return 0;
}
-/* H5LTyylex_destroy is for both reentrant and non-reentrant scanners. */
-int H5LTyylex_destroy (void)
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- H5LTyy_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer( YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- H5LTyypop_buffer_state();
+ yypop_buffer_state();
}
/* Destroy the stack itself. */
- H5LTyyfree((yy_buffer_stack) );
+ yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
- H5LTyyfree ( (yy_state_buf) );
+ yyfree ( (yy_state_buf) );
(yy_state_buf) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * H5LTyylex() is called, initialization will occur. */
+ * yylex() is called, initialization will occur. */
yy_init_globals( );
return 0;
@@ -2513,18 +2755,19 @@ int H5LTyylex_destroy (void)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
- register int i;
+
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s )
+static int yy_flex_strlen (const char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
@@ -2532,13 +2775,14 @@ static int yy_flex_strlen (yyconst char * s )
}
#endif
-void *H5LTyyalloc (yy_size_t size )
+void *yyalloc (yy_size_t size )
{
- return (void *) malloc( size );
+ return malloc(size);
}
-void *H5LTyyrealloc (void * ptr, yy_size_t size )
+void *yyrealloc (void * ptr, yy_size_t size )
{
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
@@ -2546,18 +2790,17 @@ void *H5LTyyrealloc (void * ptr, yy_size_t size )
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void H5LTyyfree (void * ptr )
+void yyfree (void * ptr )
{
- free( (char *) ptr ); /* see H5LTyyrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
-#line 185 "hl/src/H5LTanalyze.l"
-
+#line 191 "hl/src/H5LTanalyze.l"
int my_yyinput(char *buf, int max_size)
{
@@ -2570,11 +2813,11 @@ int my_yyinput(char *buf, int max_size)
int H5LTyyerror(const char *msg)
{
- printf("ERROR: %s before \"%s\".\n", msg, H5LTyytext);
+ printf("ERROR: %s before \"%s\".\n", msg, yytext);
return 0;
}
-int H5LTyywrap()
+int yywrap()
{
return(1);
}
diff --git a/hl/src/H5LTanalyze.l b/hl/src/H5LTanalyze.l
index b9b492e..cdd5b0d 100644
--- a/hl/src/H5LTanalyze.l
+++ b/hl/src/H5LTanalyze.l
@@ -23,11 +23,18 @@
#include <hdf5.h>
#include "H5LTparse.h"
-/* Turn off suggest const attribute warning in gcc */
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2
+/* Turn off suggest const & malloc attribute warnings in gcc */
+#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
#pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
#endif
+/* Turn off null dereference warnings in gcc.
+ * We have no control over this generated code.
+ */
+#if defined __GNUC__ && 600 <= __GNUC__ * 100
+#pragma GCC diagnostic ignored "-Wnull-dereference"
+#endif
+
int my_yyinput(char *, int);
#undef YY_INPUT
#define YY_INPUT(b, r, ms) (r=my_yyinput(b, ms))
diff --git a/hl/src/H5LTparse.c b/hl/src/H5LTparse.c
index 5835dcc..a9b3dc3 100644
--- a/hl/src/H5LTparse.c
+++ b/hl/src/H5LTparse.c
@@ -1,4 +1,4 @@
-#if __GNUC__ >= 4 && __GNUC_MINOR__ >=2
+#if defined __GNUC__ && 402 <= __GNUC__ * 100 + __GNUC_MINOR__
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
#pragma GCC diagnostic ignored "-Wlarger-than="
@@ -20,11 +20,11 @@
#elif defined _MSC_VER
#pragma warning(push, 1)
#endif
-/* A Bison parser, made by GNU Bison 3.0.2. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison implementation for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -66,7 +66,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.0.2"
+#define YYBISON_VERSION "3.0.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -92,7 +92,7 @@
#define yychar H5LTyychar
/* Copy the first part of user declarations. */
-#line 22 "hl/src/H5LTparse.y" /* yacc.c:339 */
+#line 20 "hl/src/H5LTparse.y" /* yacc.c:339 */
#include <stdio.h>
#include <string.h>
@@ -241,10 +241,10 @@ extern int H5LTyydebug;
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE YYSTYPE;
+
union YYSTYPE
{
-#line 74 "hl/src/H5LTparse.y" /* yacc.c:355 */
+#line 72 "hl/src/H5LTparse.y" /* yacc.c:355 */
int ival; /*for integer token*/
char *sval; /*for name string*/
@@ -252,6 +252,8 @@ union YYSTYPE
#line 232 "hl/src/H5LTparse.c" /* yacc.c:355 */
};
+
+typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
@@ -265,7 +267,7 @@ hid_t H5LTyyparse (void);
/* Copy the second part of user declarations. */
-#line 247 "hl/src/H5LTparse.c" /* yacc.c:358 */
+#line 249 "hl/src/H5LTparse.c" /* yacc.c:358 */
#ifdef short
# undef short
@@ -568,16 +570,16 @@ static const yytype_uint8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 107, 107, 108, 110, 111, 112, 113, 115, 116,
- 117, 118, 119, 122, 123, 124, 125, 126, 127, 128,
- 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
- 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
- 151, 152, 153, 154, 155, 156, 157, 161, 160, 169,
- 170, 172, 172, 209, 217, 218, 221, 223, 223, 232,
- 233, 235, 236, 235, 243, 246, 252, 253, 258, 259,
- 250, 267, 269, 273, 274, 282, 291, 298, 271, 322,
- 323, 325, 326, 327, 329, 330, 332, 333, 337, 336,
- 341, 342, 344, 344, 398, 400
+ 0, 105, 105, 106, 108, 109, 110, 111, 113, 114,
+ 115, 116, 117, 120, 121, 122, 123, 124, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
+ 149, 150, 151, 152, 153, 154, 155, 159, 158, 167,
+ 168, 170, 170, 207, 215, 216, 219, 221, 221, 230,
+ 231, 233, 234, 233, 241, 244, 250, 251, 256, 257,
+ 248, 265, 267, 271, 272, 280, 289, 296, 269, 320,
+ 321, 323, 324, 325, 327, 328, 330, 331, 335, 334,
+ 339, 340, 342, 342, 396, 398
};
#endif
@@ -1484,245 +1486,245 @@ yyreduce:
switch (yyn)
{
case 2:
-#line 107 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 105 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ memset(arr_stack, 0, STACK_SIZE*sizeof(struct arr_info)); /*initialize here?*/ }
-#line 1468 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1470 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 3:
-#line 108 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 106 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ return (yyval.hid);}
-#line 1474 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1476 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 13:
-#line 122 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 120 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I8BE); }
-#line 1480 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1482 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 14:
-#line 123 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 121 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I8LE); }
-#line 1486 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1488 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 15:
-#line 124 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 122 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I16BE); }
-#line 1492 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1494 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 16:
-#line 125 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 123 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I16LE); }
-#line 1498 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1500 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 17:
-#line 126 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 124 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I32BE); }
-#line 1504 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1506 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 18:
-#line 127 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 125 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I32LE); }
-#line 1510 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1512 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 19:
-#line 128 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 126 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I64BE); }
-#line 1516 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1518 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 20:
-#line 129 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 127 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_I64LE); }
-#line 1522 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1524 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 21:
-#line 130 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 128 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U8BE); }
-#line 1528 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1530 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 22:
-#line 131 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 129 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U8LE); }
-#line 1534 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1536 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 23:
-#line 132 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 130 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U16BE); }
-#line 1540 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1542 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 24:
-#line 133 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 131 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U16LE); }
-#line 1546 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1548 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 25:
-#line 134 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 132 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U32BE); }
-#line 1552 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1554 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 26:
-#line 135 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 133 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U32LE); }
-#line 1558 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1560 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 27:
-#line 136 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 134 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U64BE); }
-#line 1564 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1566 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 28:
-#line 137 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 135 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_STD_U64LE); }
-#line 1570 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1572 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 29:
-#line 138 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 136 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_CHAR); }
-#line 1576 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1578 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 30:
-#line 139 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 137 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_SCHAR); }
-#line 1582 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1584 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 31:
-#line 140 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 138 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_UCHAR); }
-#line 1588 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1590 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 32:
-#line 141 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 139 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_SHORT); }
-#line 1594 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1596 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 33:
-#line 142 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 140 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_USHORT); }
-#line 1600 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1602 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 34:
-#line 143 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 141 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_INT); }
-#line 1606 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1608 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 35:
-#line 144 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 142 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_UINT); }
-#line 1612 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1614 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 36:
-#line 145 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 143 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LONG); }
-#line 1618 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1620 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 37:
-#line 146 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 144 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_ULONG); }
-#line 1624 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1626 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 38:
-#line 147 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 145 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LLONG); }
-#line 1630 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1632 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 39:
-#line 148 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 146 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_ULLONG); }
-#line 1636 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1638 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 40:
-#line 151 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 149 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F32BE); }
-#line 1642 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1644 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 41:
-#line 152 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 150 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F32LE); }
-#line 1648 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1650 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 42:
-#line 153 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 151 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F64BE); }
-#line 1654 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1656 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 43:
-#line 154 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 152 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_IEEE_F64LE); }
-#line 1660 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1662 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 44:
-#line 155 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 153 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_FLOAT); }
-#line 1666 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1668 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 45:
-#line 156 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 154 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_DOUBLE); }
-#line 1672 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1674 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 46:
-#line 157 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 155 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tcopy(H5T_NATIVE_LDOUBLE); }
-#line 1678 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1680 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 47:
-#line 161 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 159 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ csindex++; cmpd_stack[csindex].id = H5Tcreate(H5T_COMPOUND, 1); /*temporarily set size to 1*/ }
-#line 1684 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1686 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 48:
-#line 163 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 161 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = cmpd_stack[csindex].id;
cmpd_stack[csindex].id = 0;
cmpd_stack[csindex].first_memb = 1;
csindex--;
}
-#line 1694 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1696 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 51:
-#line 172 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 170 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ cmpd_stack[csindex].is_field = 1; /*notify lexer a compound member is parsed*/ }
-#line 1700 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1702 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 52:
-#line 174 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 172 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
size_t origin_size, new_size;
hid_t dtype_id = cmpd_stack[csindex].id;
@@ -1757,117 +1759,117 @@ yyreduce:
new_size = H5Tget_size(dtype_id);
}
-#line 1739 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1741 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 53:
-#line 210 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 208 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
(yyval.sval) = strdup(yylval.sval);
free(yylval.sval);
yylval.sval = NULL;
}
-#line 1749 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1751 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 54:
-#line 217 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 215 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.ival) = 0; }
-#line 1755 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1757 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 55:
-#line 219 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 217 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.ival) = yylval.ival; }
-#line 1761 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1763 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 57:
-#line 223 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 221 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ asindex++; /*pushd onto the stack*/ }
-#line 1767 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1769 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 58:
-#line 225 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 223 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
(yyval.hid) = H5Tarray_create2((yyvsp[-1].hid), arr_stack[asindex].ndims, arr_stack[asindex].dims);
arr_stack[asindex].ndims = 0;
asindex--;
H5Tclose((yyvsp[-1].hid));
}
-#line 1778 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1780 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 61:
-#line 235 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 233 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ arr_stack[asindex].is_dim = 1; /*notice lexer of dimension size*/ }
-#line 1784 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1786 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 62:
-#line 236 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 234 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ unsigned ndims = arr_stack[asindex].ndims;
arr_stack[asindex].dims[ndims] = (hsize_t)yylval.ival;
arr_stack[asindex].ndims++;
arr_stack[asindex].is_dim = 0;
}
-#line 1794 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1796 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 65:
-#line 247 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 245 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = H5Tvlen_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
-#line 1800 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1802 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 66:
-#line 252 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 250 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_opq_size = 1; }
-#line 1806 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1808 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 67:
-#line 253 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 251 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
size_t size = (size_t)yylval.ival;
(yyval.hid) = H5Tcreate(H5T_OPAQUE, size);
is_opq_size = 0;
}
-#line 1816 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1818 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 68:
-#line 258 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 256 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_opq_tag = 1; }
-#line 1822 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1824 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 69:
-#line 259 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 257 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
H5Tset_tag((yyvsp[-6].hid), yylval.sval);
free(yylval.sval);
yylval.sval = NULL;
is_opq_tag = 0;
}
-#line 1833 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1835 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 70:
-#line 265 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 263 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ (yyval.hid) = (yyvsp[-8].hid); }
-#line 1839 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1841 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 73:
-#line 273 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 271 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_str_size = 1; }
-#line 1845 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1847 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 74:
-#line 274 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 272 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
if((yyvsp[-1].ival) == H5T_VARIABLE_TOKEN)
is_variable = 1;
@@ -1875,11 +1877,11 @@ yyreduce:
str_size = yylval.ival;
is_str_size = 0;
}
-#line 1857 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1859 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 75:
-#line 282 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 280 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
if((yyvsp[-1].ival) == H5T_STR_NULLTERM_TOKEN)
str_pad = H5T_STR_NULLTERM;
@@ -1888,33 +1890,33 @@ yyreduce:
else if((yyvsp[-1].ival) == H5T_STR_SPACEPAD_TOKEN)
str_pad = H5T_STR_SPACEPAD;
}
-#line 1870 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1872 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 76:
-#line 291 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 289 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
if((yyvsp[-1].ival) == H5T_CSET_ASCII_TOKEN)
str_cset = H5T_CSET_ASCII;
else if((yyvsp[-1].ival) == H5T_CSET_UTF8_TOKEN)
str_cset = H5T_CSET_UTF8;
}
-#line 1881 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1883 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 77:
-#line 298 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 296 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
if((yyvsp[-1].hid) == H5T_C_S1_TOKEN)
(yyval.hid) = H5Tcopy(H5T_C_S1);
else if((yyvsp[-1].hid) == H5T_FORTRAN_S1_TOKEN)
(yyval.hid) = H5Tcopy(H5T_FORTRAN_S1);
}
-#line 1892 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1894 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 78:
-#line 305 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 303 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
hid_t str_id = (yyvsp[-1].hid);
@@ -1931,71 +1933,71 @@ yyreduce:
(yyval.hid) = str_id;
}
-#line 1913 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1915 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 79:
-#line 322 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 320 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_VARIABLE_TOKEN;}
-#line 1919 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1921 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 81:
-#line 325 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 323 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_STR_NULLTERM_TOKEN;}
-#line 1925 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1927 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 82:
-#line 326 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 324 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_STR_NULLPAD_TOKEN;}
-#line 1931 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1933 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 83:
-#line 327 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 325 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_STR_SPACEPAD_TOKEN;}
-#line 1937 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1939 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 84:
-#line 329 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 327 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_CSET_ASCII_TOKEN;}
-#line 1943 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1945 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 85:
-#line 330 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 328 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.ival) = H5T_CSET_UTF8_TOKEN;}
-#line 1949 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1951 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 86:
-#line 332 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 330 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.hid) = H5T_C_S1_TOKEN;}
-#line 1955 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1957 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 87:
-#line 333 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 331 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{(yyval.hid) = H5T_FORTRAN_S1_TOKEN;}
-#line 1961 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1963 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 88:
-#line 337 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 335 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_enum = 1; enum_id = H5Tenum_create((yyvsp[-1].hid)); H5Tclose((yyvsp[-1].hid)); }
-#line 1967 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1969 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 89:
-#line 339 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 337 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{ is_enum = 0; /*reset*/ (yyval.hid) = enum_id; }
-#line 1973 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1975 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 92:
-#line 344 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 342 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
is_enum_memb = 1; /*indicate member of enum*/
#ifdef H5_HAVE_WIN32_API
@@ -2006,11 +2008,11 @@ yyreduce:
free(yylval.sval);
yylval.sval = NULL;
}
-#line 1988 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 1990 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
case 93:
-#line 355 "hl/src/H5LTparse.y" /* yacc.c:1646 */
+#line 353 "hl/src/H5LTparse.y" /* yacc.c:1646 */
{
char char_val=(char)yylval.ival;
short short_val=(short)yylval.ival;
@@ -2053,11 +2055,11 @@ yyreduce:
H5Tclose(super);
H5Tclose(native);
}
-#line 2035 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 2037 "hl/src/H5LTparse.c" /* yacc.c:1646 */
break;
-#line 2039 "hl/src/H5LTparse.c" /* yacc.c:1646 */
+#line 2041 "hl/src/H5LTparse.c" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
diff --git a/hl/src/H5LTparse.h b/hl/src/H5LTparse.h
index 3d7b4e8..e38116a 100644
--- a/hl/src/H5LTparse.h
+++ b/hl/src/H5LTparse.h
@@ -1,8 +1,8 @@
-/* A Bison parser, made by GNU Bison 3.0.2. */
+/* A Bison parser, made by GNU Bison 3.0.4. */
/* Bison interface for Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
+ Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -106,10 +106,10 @@ extern int H5LTyydebug;
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE YYSTYPE;
+
union YYSTYPE
{
-#line 74 "hl/src/H5LTparse.y" /* yacc.c:1909 */
+#line 72 "hl/src/H5LTparse.y" /* yacc.c:1909 */
int ival; /*for integer token*/
char *sval; /*for name string*/
@@ -117,6 +117,8 @@ union YYSTYPE
#line 119 "hl/src/H5LTparse.h" /* yacc.c:1909 */
};
+
+typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
diff --git a/hl/src/H5LTpublic.h b/hl/src/H5LTpublic.h
index 47be98a..6df7c4b 100644
--- a/hl/src/H5LTpublic.h
+++ b/hl/src/H5LTpublic.h
@@ -20,7 +20,7 @@
/* user supplied image buffer. The same image is open with the core driver. */
#define H5LT_FILE_IMAGE_DONT_RELEASE 0x0004 /* The HDF5 lib won't */
/* deallocate user supplied image buffer. The user application is reponsible */
-/* for doing so. */
+/* for doing so. */
#define H5LT_FILE_IMAGE_ALL 0x0007
typedef enum H5LT_lang_t {
diff --git a/hl/src/H5PT.c b/hl/src/H5PT.c
index 07d8bfb..fa140bc 100644
--- a/hl/src/H5PT.c
+++ b/hl/src/H5PT.c
@@ -11,8 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdlib.h>
-
#include "H5PTprivate.h"
#include "H5TBprivate.h"
@@ -53,8 +51,8 @@ static herr_t H5PT_get_index(htbl_t *table_id, hsize_t *pt_index);
*
* Return: Success: table ID, Failure: FAIL
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu (Author of H5PTcreate_fl)
- * James Laird, jlaird@ncsa.uiuc.edu (Author of H5PTcreate_fl)
+ * Programmer: Nat Furrer (Author of H5PTcreate_fl)
+ * James Laird (Author of H5PTcreate_fl)
*
* Date: March 12, 2004
*
@@ -182,8 +180,8 @@ error:
*
* Return: Success: table ID, Failure: Negative
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: March 12, 2004
*
@@ -301,8 +299,8 @@ error:
*
* Return: Success: table ID, Failure: Negative
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: March 10, 2004
*
@@ -426,8 +424,8 @@ H5PT_free_id(void *id)
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: March 10, 2004
*
@@ -475,8 +473,8 @@ error:
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: April 21, 2004
*
@@ -530,8 +528,8 @@ error:
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: March 12, 2004
*
@@ -583,8 +581,8 @@ error:
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: March 10, 2004
*
@@ -628,8 +626,8 @@ error:
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: March 12, 2004
*
@@ -680,8 +678,8 @@ error:
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: March 12, 2004
*
@@ -737,8 +735,8 @@ H5PT_get_index(htbl_t *table, hsize_t *pt_index)
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: April 23, 2004
*
@@ -795,8 +793,8 @@ herr_t H5PTget_index(hid_t table_id, hsize_t *pt_index)
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: March 12, 2004
*
@@ -832,8 +830,8 @@ error:
*
* Return: Success: SUCCEED, Failure: FAIL
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: March 12, 2004
*
@@ -861,8 +859,8 @@ herr_t H5PTis_valid(hid_t table_id)
*
* Return: True: 1, False: 0, Failure: FAIL
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: April 14, 2004
*
@@ -910,8 +908,8 @@ error:
* Return: Success: SUCCEED, Failure: FAIL
* -2 if memory was reclaimed but another error occurred
*
- * Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
- * James Laird, jlaird@ncsa.uiuc.edu
+ * Programmer: Nat Furrer
+ * James Laird
*
* Date: April 12, 2004
*
diff --git a/hl/src/H5TB.c b/hl/src/H5TB.c
index a4bcbd4..79d5cef 100644
--- a/hl/src/H5TB.c
+++ b/hl/src/H5TB.c
@@ -11,9 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdlib.h>
-#include <string.h>
-
#include "H5LTprivate.h"
#include "H5TBprivate.h"
@@ -55,7 +52,7 @@ static hid_t H5TB_create_type(hid_t loc_id,
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
* Quincey Koziol
*
* Date: January 17, 2001
@@ -102,7 +99,7 @@ herr_t H5TBmake_table(const char *table_title,
if (field_names == NULL) {
goto out;
}
-
+
dims[0] = nrecords;
dims_chunk[0] = chunk_size;
@@ -275,7 +272,7 @@ out:
* Return: Success: 0, Failure: -1
*
* Programmers:
-* Pedro Vicente, pvn@ncsa.uiuc.edu
+* Pedro Vicente
* Quincey Koziol
*
* Date: November 19, 2001
@@ -300,7 +297,7 @@ herr_t H5TBappend_records(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* get the original number of records and fields */
@@ -345,7 +342,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 19, 2001
*
@@ -374,7 +371,7 @@ herr_t H5TBwrite_records(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
@@ -442,7 +439,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 21, 2001
*
@@ -477,9 +474,9 @@ herr_t H5TBwrite_fields_name(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_names == NULL)
+ if (field_names == NULL)
goto out;
/* create xfer properties to preserve initialized data */
@@ -605,7 +602,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 21, 2001
*
@@ -640,7 +637,7 @@ herr_t H5TBwrite_fields_index(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* create xfer properties to preserve initialized data */
@@ -778,7 +775,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 20, 2001
*
@@ -801,7 +798,7 @@ herr_t H5TBread_table(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
@@ -853,7 +850,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 19, 2001
*
@@ -878,7 +875,7 @@ herr_t H5TBread_records(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* get the number of records and fields */
@@ -923,7 +920,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 19, 2001
*
@@ -959,9 +956,9 @@ herr_t H5TBread_fields_name(hid_t loc_id,
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_names == NULL)
+ if (field_names == NULL)
goto out;
/* open the dataset */
@@ -1029,7 +1026,7 @@ herr_t H5TBread_fields_name(hid_t loc_id,
/* check to make sure field was found, no reason to continue if it does not exist */
if(j == 0)
goto out;
-
+
/* get the dataspace handle */
if((sid = H5Dget_space(did)) < 0)
goto out;
@@ -1086,7 +1083,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 19, 2001
*
@@ -1121,7 +1118,7 @@ herr_t H5TBread_fields_index(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
@@ -1251,7 +1248,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 26, 2001
*
@@ -1281,9 +1278,9 @@ herr_t H5TBdelete_record(hid_t loc_id,
unsigned char *tmp_buf = NULL;
herr_t ret_val = -1;
-
+
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/*-------------------------------------------------------------------------
@@ -1413,7 +1410,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 26, 2001
*
@@ -1446,7 +1443,7 @@ herr_t H5TBinsert_record(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/*-------------------------------------------------------------------------
@@ -1569,7 +1566,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: December 5, 2001
*
@@ -1601,9 +1598,9 @@ herr_t H5TBadd_records_from(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name1 == NULL)
+ if (dset_name1 == NULL)
goto out;
- if (dset_name2 == NULL)
+ if (dset_name2 == NULL)
goto out;
/*-------------------------------------------------------------------------
@@ -1701,7 +1698,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: December 10, 2001
*
@@ -1754,11 +1751,11 @@ herr_t H5TBcombine_tables(hid_t loc_id1,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name1 == NULL)
+ if (dset_name1 == NULL)
goto out;
- if (dset_name2 == NULL)
+ if (dset_name2 == NULL)
goto out;
- if (dset_name3 == NULL)
+ if (dset_name3 == NULL)
goto out;
/*-------------------------------------------------------------------------
@@ -2059,7 +2056,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: January 30, 2002
*
@@ -2117,9 +2114,9 @@ herr_t H5TBinsert_field(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_name == NULL)
+ if (field_name == NULL)
goto out;
/* get the number of records and fields */
@@ -2480,7 +2477,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: January 30, 2002
*
@@ -2532,9 +2529,9 @@ herr_t H5TBdelete_field(hid_t loc_id,
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
- if (field_name == NULL)
+ if (field_name == NULL)
goto out;
/* get the number of records and fields */
@@ -2934,7 +2931,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: January 30, 2001
*
@@ -2960,7 +2957,7 @@ herr_t H5TBAget_title(hid_t loc_id,
*
* Return: Success: TRUE/FALSE, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: January 30, 2002
*
@@ -2982,7 +2979,7 @@ htri_t H5TBAget_fill(hid_t loc_id,
htri_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* get the number of records and fields */
@@ -3014,7 +3011,7 @@ htri_t H5TBAget_fill(hid_t loc_id,
out:
if(src_offset)
HDfree(src_offset);
-
+
return ret_val;
} /* end H5TBAget_fill() */
@@ -3033,7 +3030,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 19, 2001
*
@@ -3054,7 +3051,7 @@ herr_t H5TBget_table_info(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
@@ -3120,7 +3117,7 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 19, 2001
*
@@ -3145,7 +3142,7 @@ herr_t H5TBget_field_info(hid_t loc_id,
herr_t ret_val = -1;
/* check the arguments */
- if (dset_name == NULL)
+ if (dset_name == NULL)
goto out;
/* open the dataset. */
@@ -3240,7 +3237,7 @@ out:
*
* Return: Success: TRUE/FALSE, Failure: N/A
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: November 19, 2001
*
@@ -3253,9 +3250,9 @@ hbool_t H5TB_find_field(const char *field, const char *field_list)
const char *end;
/* check the arguments */
- if (field == NULL)
+ if (field == NULL)
return FALSE;
- if (field_list == NULL)
+ if (field_list == NULL)
return FALSE;
while((end = HDstrstr(start, ",")) != 0) {
@@ -3281,7 +3278,7 @@ hbool_t H5TB_find_field(const char *field, const char *field_list)
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: December 6, 2001
*
@@ -3345,7 +3342,7 @@ out:
*
* Return: Success: the memory type ID, Failure: -1
*
-* Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+* Programmer: Pedro Vicente
*
* Date: March 31, 2004
*
@@ -3445,8 +3442,8 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
-* James Laird, jlaird@ncsa.uiuc.edu
+* Programmer: Nat Furrer
+* James Laird
*
* Date: March 8, 2004
*
@@ -3512,8 +3509,8 @@ out:
*
* Return: Success: 0, Failure: -1
*
-* Programmer: Nat Furrer, nfurrer@ncsa.uiuc.edu
-* James Laird, jlaird@ncsa.uiuc.edu
+* Programmer: Nat Furrer
+* James Laird
*
* Date: March 8, 2004
*
diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in
index 2f50c40..d593f9f 100644
--- a/hl/src/Makefile.in
+++ b/hl/src/Makefile.in
@@ -419,14 +419,14 @@ AMTAR = @AMTAR@
# H5_CFLAGS holds flags that should be used when building hdf5,
# but which should not be exported to h5cc for building other programs.
-# AM_CFLAGS is an automake construct which should be used by Makefiles
+# AM_CFLAGS is an automake construct which should be used by Makefiles
# instead of CFLAGS, as CFLAGS is reserved solely for the user to define.
# This applies to FCFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS as well.
-AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@
+AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ @H5_ECFLAGS@
# Add include directories to the C preprocessor flags
AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src
-AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ @H5_ECXXFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@
AM_JAVACFLAGS = @AM_JAVACFLAGS@
@@ -446,6 +446,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CC_VERSION = @CC_VERSION@
CFLAGS = @CFLAGS@
+CLANG_SANITIZE_CHECKS = @CLANG_SANITIZE_CHECKS@
CODESTACK = @CODESTACK@
CONFIG_DATE = @CONFIG_DATE@
CONFIG_MODE = @CONFIG_MODE@
@@ -462,6 +463,7 @@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DEPRECATED_SYMBOLS = @DEPRECATED_SYMBOLS@
+DESIRED_FILE_LOCKING = @DESIRED_FILE_LOCKING@
DEV_WARNINGS = @DEV_WARNINGS@
DIRECT_VFD = @DIRECT_VFD@
DLLTOOL = @DLLTOOL@
@@ -498,8 +500,11 @@ H5_CFLAGS = @H5_CFLAGS@
H5_CLASSPATH = @H5_CLASSPATH@
H5_CPPFLAGS = @H5_CPPFLAGS@
H5_CXXFLAGS = @H5_CXXFLAGS@
+H5_ECFLAGS = @H5_ECFLAGS@
+H5_ECXXFLAGS = @H5_ECXXFLAGS@
H5_FCFLAGS = @H5_FCFLAGS@
H5_FORTRAN_SHARED = @H5_FORTRAN_SHARED@
+H5_IS_DARWIN = @H5_IS_DARWIN@
H5_JAVACFLAGS = @H5_JAVACFLAGS@
H5_JAVAFLAGS = @H5_JAVAFLAGS@
H5_JNIFLAGS = @H5_JNIFLAGS@
@@ -522,6 +527,7 @@ HL = @HL@
HL_FOR = @HL_FOR@
HSIZE_T = @HSIZE_T@
HSSIZE_T = @HSSIZE_T@
+IGNORE_DISABLED_FILE_LOCKS = @IGNORE_DISABLED_FILE_LOCKS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -558,6 +564,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MEMORYALLOCSANITYCHECK = @MEMORYALLOCSANITYCHECK@
+MIRROR_VFD = @MIRROR_VFD@
MKDIR_P = @MKDIR_P@
MPE = @MPE@
NM = @NM@
@@ -617,6 +624,7 @@ TIME = @TIME@
TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
+USE_FILE_LOCKING = @USE_FILE_LOCKING@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
@@ -652,6 +660,7 @@ docdir = $(exec_prefix)/doc
dvidir = @dvidir@
enable_shared = @enable_shared@
enable_static = @enable_static@
+examplesdir = @examplesdir@
exec_prefix = @exec_prefix@
fortran_linux_linker_option = @fortran_linux_linker_option@
host = @host@
@@ -708,15 +717,15 @@ LIBH5_HL = $(top_builddir)/hl/src/libhdf5_hl.la
LIBH5F_HL = $(top_builddir)/hl/fortran/src/libhdf5hl_fortran.la
LIBH5CPP_HL = $(top_builddir)/hl/c++/src/libhdf5_hl_cpp.la
-# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
-# has been removed. According to the official description of DESTDIR by Gnu at
-# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
-# prepended to the normal and complete install path that it precedes for the
-# purpose of installing in a temporary directory which is useful for building
-# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
-# '/' at the beginning of the normal install path. When DESTDIR is empty the
-# path then begins with '//', which is incorrect and causes problems at least for
-# Cygwin.
+# Note that in svn revision 19400 the '/' after DESTDIR in H5* variables below
+# has been removed. According to the official description of DESTDIR by Gnu at
+# http://www.gnu.org/prep/standards/html_node/DESTDIR.html, DESTDIR is
+# prepended to the normal and complete install path that it precedes for the
+# purpose of installing in a temporary directory which is useful for building
+# rpms and other packages. The '/' after ${DESTDIR} will be followed by another
+# '/' at the beginning of the normal install path. When DESTDIR is empty the
+# path then begins with '//', which is incorrect and causes problems at least for
+# Cygwin.
# Scripts used to build examples
# If only shared libraries have been installed, have h5cc build examples with
@@ -736,30 +745,30 @@ TRACE = perl $(top_srcdir)/bin/trace
# .chklog files are output from those tests.
# *.clog and *.clog2 are from the MPE option.
CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2
-LT_VERS_INTERFACE = 105
+LT_VERS_INTERFACE = 106
LT_VERS_REVISION = 0
-LT_VERS_AGE = 2
-LT_CXX_VERS_INTERFACE = 105
+LT_VERS_AGE = 3
+LT_CXX_VERS_INTERFACE = 106
LT_CXX_VERS_REVISION = 0
-LT_CXX_VERS_AGE = 2
-LT_F_VERS_INTERFACE = 102
-LT_F_VERS_REVISION = 1
-LT_F_VERS_AGE = 0
+LT_CXX_VERS_AGE = 3
+LT_F_VERS_INTERFACE = 103
+LT_F_VERS_REVISION = 0
+LT_F_VERS_AGE = 1
LT_HL_VERS_INTERFACE = 101
-LT_HL_VERS_REVISION = 3
+LT_HL_VERS_REVISION = 4
LT_HL_VERS_AGE = 1
LT_HL_CXX_VERS_INTERFACE = 101
-LT_HL_CXX_VERS_REVISION = 4
+LT_HL_CXX_VERS_REVISION = 5
LT_HL_CXX_VERS_AGE = 1
LT_HL_F_VERS_INTERFACE = 100
-LT_HL_F_VERS_REVISION = 5
+LT_HL_F_VERS_REVISION = 6
LT_HL_F_VERS_AGE = 0
-LT_JAVA_VERS_INTERFACE = 104
-LT_JAVA_VERS_REVISION = 1
-LT_JAVA_VERS_AGE = 4
-LT_TOOLS_VERS_INTERFACE = 101
-LT_TOOLS_VERS_REVISION = 3
-LT_TOOLS_VERS_AGE = 1
+LT_JAVA_VERS_INTERFACE = 105
+LT_JAVA_VERS_REVISION = 0
+LT_JAVA_VERS_AGE = 5
+LT_TOOLS_VERS_INTERFACE = 102
+LT_TOOLS_VERS_REVISION = 0
+LT_TOOLS_VERS_AGE = 0
# This library is our main target.
lib_LTLIBRARIES = libhdf5_hl.la
@@ -787,7 +796,7 @@ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \
PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \
$(EXTRA_PROG)
-chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
+chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST)
TEST_EXTENSIONS = .sh
SH_LOG_COMPILER = $(SHELL)
AM_SH_LOG_FLAGS =
@@ -1400,28 +1409,37 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
echo "============================" > $${log}; \
fi; \
if test "X$(FORTRAN_API)" = "Xyes"; then \
- echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
elif test "X$(CXX_API)" = "Xyes"; then \
- echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\
else \
- echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\
+ echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\
fi; \
else \
- echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \
+ echo "Testing: $${tname} $(TEST_FLAGS)"; \
if test -n "$(REALTIMEOUTPUT)"; then \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \
else \
- echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \
+ echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \
fi; \
fi; \
if test -n "$(REALTIMEOUTPUT)"; then \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \
+ fi; \
+ else \
+ if test -n "$(HDF5_DRIVER)"; then \
+ echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \
+ fi; \
+ fi; \
+ if test -n "$(REALTIMEOUTPUT)"; then \
echo "============================" | tee -a $${log}; \
else \
echo "============================" >> $${log}; \