summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5repack/h5repack_parse.c')
-rw-r--r--tools/h5repack/h5repack_parse.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c
index d3c6014..5258c4e 100644
--- a/tools/h5repack/h5repack_parse.c
+++ b/tools/h5repack/h5repack_parse.c
@@ -63,7 +63,7 @@ obj_list_t* parse_filter(const char *str,
/* initialize compression info */
- memset(filt,0,sizeof(filter_info_t));
+ HDmemset(filt,0,sizeof(filter_info_t));
*is_glb = 0;
/* check for the end of object list and number of objects */
@@ -105,7 +105,7 @@ obj_list_t* parse_filter(const char *str,
{
if ( c==',') sobj[k]='\0'; else sobj[k+1]='\0';
HDstrcpy(obj_list[n].obj,sobj);
- memset(sobj,0,sizeof(sobj));
+ HDmemset(sobj,0,sizeof(sobj));
n++;
k=-1;
}
@@ -113,7 +113,7 @@ obj_list_t* parse_filter(const char *str,
/* nothing after : */
if (end_obj+1==(int)len)
{
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("input Error: Invalid compression type in <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -151,7 +151,7 @@ obj_list_t* parse_filter(const char *str,
}
c = str[u];
if (!isdigit(c) && l==-1){
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("compression parameter not digit in <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -211,7 +211,7 @@ obj_list_t* parse_filter(const char *str,
}
c = str[u];
if (!isdigit(c) && l==-1){
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("compression parameter is not a digit in <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -255,7 +255,7 @@ obj_list_t* parse_filter(const char *str,
{
c = str[u];
if (!isdigit(c)){
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("compression parameter is not a digit in <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -301,7 +301,7 @@ obj_list_t* parse_filter(const char *str,
filt->cd_nelmts = 1;
if (no_param)
{ /*no more parameters, GZIP must have parameter */
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("missing compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -317,7 +317,7 @@ obj_list_t* parse_filter(const char *str,
filt->cd_nelmts = 2;
if (no_param)
{ /*no more parameters, SZIP must have parameter */
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("missing compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -333,7 +333,7 @@ obj_list_t* parse_filter(const char *str,
filt->cd_nelmts = 0;
if (m>0)
{ /*shuffle does not have parameter */
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("extra parameter in SHUF <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -348,7 +348,7 @@ obj_list_t* parse_filter(const char *str,
filt->cd_nelmts = 0;
if (m>0)
{ /*shuffle does not have parameter */
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("extra parameter in FLET <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -363,7 +363,7 @@ obj_list_t* parse_filter(const char *str,
filt->cd_nelmts = 0;
if (m>0)
{ /*nbit does not have parameter */
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("extra parameter in NBIT <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -378,13 +378,13 @@ obj_list_t* parse_filter(const char *str,
filt->cd_nelmts = 2;
if (no_param)
{ /*no more parameters, SOFF must have parameter */
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("missing compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
}
}
else {
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("invalid filter type in <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -407,7 +407,7 @@ obj_list_t* parse_filter(const char *str,
case H5Z_FILTER_DEFLATE:
if (filt->cd_values[0]>9 )
{
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("invalid compression parameter in <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -422,19 +422,19 @@ obj_list_t* parse_filter(const char *str,
pixels_per_block=filt->cd_values[0];
if ((pixels_per_block%2)==1)
{
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("pixels_per_block is not even in <%s>\n",str);
exit(EXIT_FAILURE);
}
if (pixels_per_block>H5_SZIP_MAX_PIXELS_PER_BLOCK)
{
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("pixels_per_block is too large in <%s>\n",str);
exit(EXIT_FAILURE);
}
if ( (HDstrcmp(smask,"NN")!=0) && (HDstrcmp(smask,"EC")!=0) )
{
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("szip mask must be 'NN' or 'EC' \n");
exit(EXIT_FAILURE);
}
@@ -486,9 +486,9 @@ obj_list_t* parse_layout(const char *str,
char slayout[10];
- memset(sdim, '\0', sizeof(sdim));
- memset(sobj, '\0', sizeof(sobj));
- memset(slayout, '\0', sizeof(slayout));
+ HDmemset(sdim, '\0', sizeof(sdim));
+ HDmemset(sobj, '\0', sizeof(sobj));
+ HDmemset(slayout, '\0', sizeof(slayout));
/* check for the end of object list and number of objects */
for ( i=0, n=0; i<len; i++)
@@ -526,7 +526,7 @@ obj_list_t* parse_layout(const char *str,
{
if ( c==',') sobj[k]='\0'; else sobj[k+1]='\0';
HDstrcpy(obj_list[n].obj,sobj);
- memset(sobj,0,sizeof(sobj));
+ HDmemset(sobj,0,sizeof(sobj));
n++;
k=-1;
}
@@ -535,7 +535,7 @@ obj_list_t* parse_layout(const char *str,
/* nothing after : */
if (end_obj+1==(int)len)
{
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("in parse layout, no characters after : in <%s>\n",str);
exit(EXIT_FAILURE);
}
@@ -576,7 +576,7 @@ obj_list_t* parse_layout(const char *str,
if (j>(int)len)
{
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("in parse layout, <%s> Chunk dimensions missing\n",str);
exit(EXIT_FAILURE);
}
@@ -590,7 +590,7 @@ obj_list_t* parse_layout(const char *str,
if (!isdigit(c) && c!='x'
&& c!='N' && c!='O' && c!='N' && c!='E'
){
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("in parse layout, <%s> Not a valid character in <%s>\n",
sdim,str);
exit(EXIT_FAILURE);
@@ -603,7 +603,7 @@ obj_list_t* parse_layout(const char *str,
k=0;
pack->chunk.chunk_lengths[c_index]=atoi(sdim);
if (pack->chunk.chunk_lengths[c_index]==0) {
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("in parse layout, <%s> conversion to number in <%s>\n",
sdim,str);
exit(EXIT_FAILURE);
@@ -621,7 +621,7 @@ obj_list_t* parse_layout(const char *str,
{
pack->chunk.chunk_lengths[c_index]=atoi(sdim);
if (pack->chunk.chunk_lengths[c_index]==0){
- if (obj_list) free(obj_list);
+ if (obj_list) HDfree(obj_list);
error_msg("in parse layout, <%s> conversion to number in <%s>\n",
sdim,str);
exit(EXIT_FAILURE);