diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-15 22:13:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 22:13:18 (GMT) |
commit | 44a00ef876ad3e1922847e93feac57c479217fbe (patch) | |
tree | 5e9fc677913a06a71eba1342633f92e93bd07a6c /tools/src/h5repack | |
parent | 59a90368cdb696205bdf15040d1a48b4f69af97f (diff) | |
download | hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.zip hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.gz hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.bz2 |
Strip HD prefix from string/char C API calls (#3540)
* Strip HD prefix from string/char C API calls
* HD(f)(put|get)(s|c)
* HDstr*
* HDv*printf
* HD(s)(print|scan)f
* HDperror
But NOT:
* HDstrcase*
* HDvasprintf
* HDstrtok_r
* HDstrndup
As those are not C99 and have portability work-around
implementations. They will be handled later.
* Fix th5_system.c screwup
Diffstat (limited to 'tools/src/h5repack')
-rw-r--r-- | tools/src/h5repack/h5repack_copy.c | 46 | ||||
-rw-r--r-- | tools/src/h5repack/h5repack_filters.c | 6 | ||||
-rw-r--r-- | tools/src/h5repack/h5repack_main.c | 46 | ||||
-rw-r--r-- | tools/src/h5repack/h5repack_opttable.c | 32 | ||||
-rw-r--r-- | tools/src/h5repack/h5repack_parse.c | 48 |
5 files changed, 89 insertions, 89 deletions
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index ef69510..942e266 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -725,7 +725,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti * and copy its attributes using that ID *------------------------------------------------------------------------- */ - if (HDstrcmp(travt->objs[i].name, "/") == 0) { + if (strcmp(travt->objs[i].name, "/") == 0) { if ((grp_out = H5Gopen2(fidout, "/", H5P_DEFAULT)) < 0) H5TOOLS_GOTO_ERROR((-1), "H5Gopen2 failed"); } @@ -778,7 +778,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti /* check if filters were requested for individual objects */ if (options->op_tbl->objs) { for (u = 0; u < options->op_tbl->nelems; u++) { - if (HDstrcmp(travt->objs[i].name, options->op_tbl->objs[u].path) == 0) + if (strcmp(travt->objs[i].name, options->op_tbl->objs[u].path) == 0) for (ifil = 0; ifil < options->op_tbl->objs[ifil].nfilters; ifil++) { if (options->op_tbl->objs[u].filter[ifil].filtn > 0) req_filter = 1; @@ -1528,7 +1528,7 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_ char f_objname[256]; /* filter objname */ int i; - HDstrcpy(strfilter, "\0"); + strcpy(strfilter, "\0"); /* get information about input filters */ if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0) @@ -1539,65 +1539,65 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_ if ((filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, cd_values, sizeof(f_objname), f_objname, NULL)) < 0) { - HDstrcat(strfilter, "ERROR "); + strcat(strfilter, "ERROR "); continue; } switch (filtn) { case H5Z_FILTER_NONE: - HDstrcat(strfilter, "NONE "); + strcat(strfilter, "NONE "); break; case H5Z_FILTER_DEFLATE: - HDstrcat(strfilter, "GZIP "); + strcat(strfilter, "GZIP "); #if defined(PRINT_DEBUG) { unsigned level = cd_values[0]; - HDsnprintf(temp, sizeof(temp), "(%d)", level); - HDstrcat(strfilter, temp); + snprintf(temp, sizeof(temp), "(%d)", level); + strcat(strfilter, temp); } #endif break; case H5Z_FILTER_SZIP: - HDstrcat(strfilter, "SZIP "); + strcat(strfilter, "SZIP "); #if defined(PRINT_DEBUG) { unsigned options_mask = cd_values[0]; /* from dcpl, not filt*/ unsigned ppb = cd_values[1]; - HDsnprintf(temp, sizeof(temp), "(%d,", ppb); - HDstrcat(strfilter, temp); + snprintf(temp, sizeof(temp), "(%d,", ppb); + strcat(strfilter, temp); if (options_mask & H5_SZIP_EC_OPTION_MASK) - HDstrcpy(temp, "EC) "); + strcpy(temp, "EC) "); else if (options_mask & H5_SZIP_NN_OPTION_MASK) - HDstrcpy(temp, "NN) "); + strcpy(temp, "NN) "); } - HDstrcat(strfilter, temp); + strcat(strfilter, temp); #endif break; case H5Z_FILTER_SHUFFLE: - HDstrcat(strfilter, "SHUF "); + strcat(strfilter, "SHUF "); break; case H5Z_FILTER_FLETCHER32: - HDstrcat(strfilter, "FLET "); + strcat(strfilter, "FLET "); break; case H5Z_FILTER_NBIT: - HDstrcat(strfilter, "NBIT "); + strcat(strfilter, "NBIT "); break; case H5Z_FILTER_SCALEOFFSET: - HDstrcat(strfilter, "SCALEOFFSET "); + strcat(strfilter, "SCALEOFFSET "); break; default: - HDstrcat(strfilter, "UD "); + strcat(strfilter, "UD "); break; } /* end switch */ } /* end for each filter */ @@ -1610,10 +1610,10 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_ else { char str[512], temp[512]; - HDstrcpy(str, "dset "); - HDstrcat(str, strfilter); - HDsnprintf(temp, sizeof(temp), " (%.3f:1)", ratio); - HDstrcat(str, temp); + strcpy(str, "dset "); + strcat(str, strfilter); + snprintf(temp, sizeof(temp), " (%.3f:1)", ratio); + strcat(str, temp); if (options->verbose == 2) printf(FORMAT_OBJ_TIME, str, read_time, write_time, objname); else diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index 512e4fa..9669d0c 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -57,7 +57,7 @@ aux_copy_obj(hid_t dcpl_id, /* dataset creation property list */ } objout->nfilters = nfilters; - HDstrcpy(objout->path, name); + strcpy(objout->path, name); if ((layout = H5Pget_layout(dcpl_id)) < 0) H5TOOLS_GOTO_ERROR((-1), "H5Pget_layout failed"); @@ -92,7 +92,7 @@ aux_find_obj(const char *name, /* object name from traverse list */ unsigned int i; for (i = 0; i < options->op_tbl->nelems; i++) { - if (HDstrcmp(options->op_tbl->objs[i].path, name) == 0) { + if (strcmp(options->op_tbl->objs[i].path, name) == 0) { *obj = options->op_tbl->objs[i]; return (int)i; } @@ -104,7 +104,7 @@ aux_find_obj(const char *name, /* object name from traverse list */ if (pname[0] == '/') pname++; - if (HDstrcmp(pdest, pname) == 0) { + if (strcmp(pdest, pname) == 0) { *obj = options->op_tbl->objs[i]; return (int)i; } diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index 13f0f19..afe0bc9 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -401,11 +401,11 @@ read_info(const char *filename, pack_opt_t *options) /* cycle until end of file reached */ while (1) { - if (EOF == HDfscanf(fp, "%9s", stype)) + if (EOF == fscanf(fp, "%9s", stype)) break; /* Info indicator must be for layout or filter */ - if (HDstrcmp(stype, "-l") != 0 && HDstrcmp(stype, "-f") != 0) { + if (strcmp(stype, "-l") != 0 && strcmp(stype, "-f") != 0) { error_msg("bad file format for %s", filename); h5tools_setstatus(EXIT_FAILURE); ret_value = EXIT_FAILURE; @@ -416,7 +416,7 @@ read_info(const char *filename, pack_opt_t *options) i = 0; c = '0'; while (c != ' ') { - if (HDfscanf(fp, "%c", &c) < 0 && ferror(fp)) { + if (fscanf(fp, "%c", &c) < 0 && ferror(fp)) { error_msg("fscanf error\n"); h5tools_setstatus(EXIT_FAILURE); ret_value = EXIT_FAILURE; @@ -428,7 +428,7 @@ read_info(const char *filename, pack_opt_t *options) c = '0'; /* go until end */ while (c != ' ') { - if (HDfscanf(fp, "%c", &c) < 0 && ferror(fp)) { + if (fscanf(fp, "%c", &c) < 0 && ferror(fp)) { error_msg("fscanf error\n"); h5tools_setstatus(EXIT_FAILURE); ret_value = EXIT_FAILURE; @@ -442,7 +442,7 @@ read_info(const char *filename, pack_opt_t *options) } comp_info[i - 1] = '\0'; /*cut the last " */ - if (!HDstrcmp(stype, "-l")) { + if (!strcmp(stype, "-l")) { if (h5repack_addlayout(comp_info, options) == -1) { error_msg("could not add chunk option\n"); h5tools_setstatus(EXIT_FAILURE); @@ -482,9 +482,9 @@ set_sort_by(const char *form) { H5_index_t idx_type = H5_INDEX_UNKNOWN; - if (!HDstrcmp(form, "name")) + if (!strcmp(form, "name")) idx_type = H5_INDEX_NAME; - else if (!HDstrcmp(form, "creation_order")) + else if (!strcmp(form, "creation_order")) idx_type = H5_INDEX_CRT_ORDER; return idx_type; @@ -505,9 +505,9 @@ set_sort_order(const char *form) { H5_iter_order_t iter_order = H5_ITER_UNKNOWN; - if (!HDstrcmp(form, "ascending")) + if (!strcmp(form, "ascending")) iter_order = H5_ITER_INC; - else if (!HDstrcmp(form, "descending")) + else if (!strcmp(form, "descending")) iter_order = H5_ITER_DEC; return iter_order; @@ -669,7 +669,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options) case 's': { int idx = 0; int ssize = 0; - char *msgPtr = HDstrchr(H5_optarg, ':'); + char *msgPtr = strchr(H5_optarg, ':'); options->latest = true; /* must use latest format */ if (msgPtr == NULL) { ssize = atoi(H5_optarg); @@ -679,18 +679,18 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options) else { char msgType[10]; - HDstrcpy(msgType, msgPtr + 1); + strcpy(msgType, msgPtr + 1); msgPtr[0] = '\0'; ssize = atoi(H5_optarg); - if (!HDstrncmp(msgType, "dspace", 6)) + if (!strncmp(msgType, "dspace", 6)) options->msg_size[0] = ssize; - else if (!HDstrncmp(msgType, "dtype", 5)) + else if (!strncmp(msgType, "dtype", 5)) options->msg_size[1] = ssize; - else if (!HDstrncmp(msgType, "fill", 4)) + else if (!strncmp(msgType, "fill", 4)) options->msg_size[2] = ssize; - else if (!HDstrncmp(msgType, "pline", 5)) + else if (!strncmp(msgType, "pline", 5)) options->msg_size[3] = ssize; - else if (!HDstrncmp(msgType, "attr", 4)) + else if (!strncmp(msgType, "attr", 4)) options->msg_size[4] = ssize; } } break; @@ -724,14 +724,14 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options) case 'S': { char strategy[MAX_NC_NAME]; - HDstrcpy(strategy, H5_optarg); - if (!HDstrcmp(strategy, "FSM_AGGR")) + strcpy(strategy, H5_optarg); + if (!strcmp(strategy, "FSM_AGGR")) options->fs_strategy = H5F_FSPACE_STRATEGY_FSM_AGGR; - else if (!HDstrcmp(strategy, "PAGE")) + else if (!strcmp(strategy, "PAGE")) options->fs_strategy = H5F_FSPACE_STRATEGY_PAGE; - else if (!HDstrcmp(strategy, "AGGR")) + else if (!strcmp(strategy, "AGGR")) options->fs_strategy = H5F_FSPACE_STRATEGY_AGGR; - else if (!HDstrcmp(strategy, "NONE")) + else if (!strcmp(strategy, "NONE")) options->fs_strategy = H5F_FSPACE_STRATEGY_NONE; else { error_msg("invalid file space management strategy `%s`\n", H5_optarg); @@ -865,7 +865,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options) infile = argv[H5_optind]; outfile = argv[H5_optind + 1]; - if (!HDstrcmp(infile, outfile)) { + if (!strcmp(infile, outfile)) { error_msg("file names cannot be the same\n"); usage(h5tools_getprogname()); h5tools_setstatus(EXIT_FAILURE); @@ -887,7 +887,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options) } /* If the input file uses the onion VFD, get the revision number */ - if (in_vfd_info.u.name && !HDstrcmp(in_vfd_info.u.name, "onion")) { + if (in_vfd_info.u.name && !strcmp(in_vfd_info.u.name, "onion")) { if (in_vfd_info.info) { errno = 0; onion_fa_in_g.revision_num = strtoull(in_vfd_info.info, NULL, 10); diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c index 8216e7a..8a9042d 100644 --- a/tools/src/h5repack/h5repack_opttable.c +++ b/tools/src/h5repack/h5repack_opttable.c @@ -28,7 +28,7 @@ init_packobject(pack_info_t *obj) { int j, k; - HDstrcpy(obj->path, "\0"); + strcpy(obj->path, "\0"); for (j = 0; j < H5_REPACK_MAX_NFILTERS; j++) { obj->filter[j].filtn = -1; obj->filter[j].cd_nelmts = CD_VALUES; @@ -196,7 +196,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac /* linear table search */ for (i = 0; i < table->nelems; i++) { /*already on the table */ - if (HDstrcmp(obj_list[j].obj, table->objs[i].path) == 0) { + if (strcmp(obj_list[j].obj, table->objs[i].path) == 0) { /* already chunk info inserted for this one; exit */ if (table->objs[i].chunk.rank > 0) { H5TOOLS_INFO("chunk information already inserted for <%s>\n", obj_list[j].obj); @@ -215,7 +215,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac /* keep the grow in a temp var */ I = table->nelems + added; added++; - HDstrcpy(table->objs[I].path, obj_list[j].obj); + strcpy(table->objs[I].path, obj_list[j].obj); aux_tblinsert_layout(table, I, pack); } /* cases where we have an already inserted name but there is a new name also @@ -223,11 +223,11 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac -f dset1:GZIP=1 -l dset1,dset2:CHUNK=20x20 dset1 is already inserted, but dset2 must also be */ - else if (found && HDstrcmp(obj_list[j].obj, table->objs[i].path) != 0) { + else if (found && strcmp(obj_list[j].obj, table->objs[i].path) != 0) { /* keep the grow in a temp var */ I = table->nelems + added; added++; - HDstrcpy(table->objs[I].path, obj_list[j].obj); + strcpy(table->objs[I].path, obj_list[j].obj); aux_tblinsert_layout(table, I, pack); } } /* j */ @@ -238,7 +238,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac for (j = 0; j < n_objs; j++) { I = table->nelems + added; added++; - HDstrcpy(table->objs[I].path, obj_list[j].obj); + strcpy(table->objs[I].path, obj_list[j].obj); aux_tblinsert_layout(table, I, pack); } } @@ -275,7 +275,7 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa /* linear table search */ for (i = 0; i < table->nelems; i++) { /*already on the table */ - if (HDstrcmp(obj_list[j].obj, table->objs[i].path) == 0) { + if (strcmp(obj_list[j].obj, table->objs[i].path) == 0) { /* insert */ aux_tblinsert_filter(table, i, filt); found = true; @@ -287,7 +287,7 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa /* keep the grow in a temp var */ I = table->nelems + added; added++; - HDstrcpy(table->objs[I].path, obj_list[j].obj); + strcpy(table->objs[I].path, obj_list[j].obj); aux_tblinsert_filter(table, I, filt); } /* cases where we have an already inserted name but there is a new name also @@ -295,11 +295,11 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa -l dset1:CHUNK=20x20 -f dset1,dset2:GZIP=1 dset1 is already inserted, but dset2 must also be */ - else if (found && HDstrcmp(obj_list[j].obj, table->objs[i].path) != 0) { + else if (found && strcmp(obj_list[j].obj, table->objs[i].path) != 0) { /* keep the grow in a temp var */ I = table->nelems + added; added++; - HDstrcpy(table->objs[I].path, obj_list[j].obj); + strcpy(table->objs[I].path, obj_list[j].obj); aux_tblinsert_filter(table, I, filt); } } /* j */ @@ -311,7 +311,7 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa for (j = 0; j < n_objs; j++) { I = table->nelems + added; added++; - HDstrcpy(table->objs[I].path, obj_list[j].obj); + strcpy(table->objs[I].path, obj_list[j].obj); aux_tblinsert_filter(table, I, filt); } } @@ -338,15 +338,15 @@ options_get_object(const char *path, pack_opttbl_t *table) for (i = 0; i < table->nelems; i++) { /* make full path (start with "/") to compare correctly */ - if (HDstrncmp(table->objs[i].path, "/", 1) != 0) { - HDstrcpy(tbl_path, "/"); - HDstrcat(tbl_path, table->objs[i].path); + if (strncmp(table->objs[i].path, "/", 1) != 0) { + strcpy(tbl_path, "/"); + strcat(tbl_path, table->objs[i].path); } else - HDstrcpy(tbl_path, table->objs[i].path); + strcpy(tbl_path, table->objs[i].path); /* found it */ - if (HDstrcmp(tbl_path, path) == 0) { + if (strcmp(tbl_path, path) == 0) { return (&table->objs[i]); } } diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c index f88ba6f..0317ef7 100644 --- a/tools/src/h5repack/h5repack_parse.c +++ b/tools/src/h5repack/h5repack_parse.c @@ -41,7 +41,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t { size_t i, m, u; char c; - size_t len = HDstrlen(str); + size_t len = strlen(str); int f, k, l, p, q, end_obj = -1, no_param = 0; unsigned j, n; char sobj[MAX_NC_NAME]; @@ -94,7 +94,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t else sobj[k + 1] = '\0'; - HDstrcpy(obj_list[n].obj, sobj); + strcpy(obj_list[n].obj, sobj); memset(sobj, 0, sizeof(sobj)); n++; k = -1; @@ -123,7 +123,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t * example SZIP=8,NN *------------------------------------------------------------------------- */ - if (HDstrcmp(scomp, "SZIP") == 0) { + if (strcmp(scomp, "SZIP") == 0) { l = -1; /* mask index check */ for (m = 0, u = i + 1; u < len; u++, m++) { if (str[u] == ',') { @@ -146,9 +146,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (l == 2) { smask[l] = '\0'; i = len - 1; /* end */ - if (HDstrcmp(smask, "NN") == 0) + if (strcmp(smask, "NN") == 0) filt->cd_values[j++] = H5_SZIP_NN_OPTION_MASK; - else if (HDstrcmp(smask, "EC") == 0) + else if (strcmp(smask, "EC") == 0) filt->cd_values[j++] = H5_SZIP_EC_OPTION_MASK; else { error_msg("szip mask must be 'NN' or 'EC' \n"); @@ -173,7 +173,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t * SOFF=3,DF *------------------------------------------------------------------------- */ - else if (HDstrcmp(scomp, "SOFF") == 0) { + else if (strcmp(scomp, "SOFF") == 0) { l = -1; /* mask index check */ for (m = 0, u = i + 1; u < len; u++, m++) { if (str[u] == ',') { @@ -196,9 +196,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t if (l == 2) { smask[l] = '\0'; i = len - 1; /* end */ - if (HDstrcmp(smask, "IN") == 0) + if (strcmp(smask, "IN") == 0) filt->cd_values[j++] = H5Z_SO_INT; - else if (HDstrcmp(smask, "DS") == H5Z_SO_FLOAT_DSCALE) + else if (strcmp(smask, "DS") == H5Z_SO_FLOAT_DSCALE) filt->cd_values[j++] = H5Z_SO_FLOAT_DSCALE; else { error_msg("scale type must be 'IN' or 'DS' \n"); @@ -216,7 +216,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t * UD=307,0,1,9 *------------------------------------------------------------------------- */ - else if (HDstrcmp(scomp, "UD") == 0) { + else if (strcmp(scomp, "UD") == 0) { l = -1; /* filter number index check */ f = -1; /* filter flag index check */ p = -1; /* CD_VAL count check */ @@ -298,7 +298,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t * H5Z_FILTER_NONE *------------------------------------------------------------------------- */ - if (HDstrcmp(scomp, "NONE") == 0) { + if (strcmp(scomp, "NONE") == 0) { filt->filtn = H5Z_FILTER_NONE; filt->cd_nelmts = 0; } @@ -307,7 +307,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t * H5Z_FILTER_DEFLATE *------------------------------------------------------------------------- */ - else if (HDstrcmp(scomp, "GZIP") == 0) { + else if (strcmp(scomp, "GZIP") == 0) { filt->filtn = H5Z_FILTER_DEFLATE; filt->cd_nelmts = 1; if (no_param) { /*no more parameters, GZIP must have parameter */ @@ -322,7 +322,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t * H5Z_FILTER_SZIP *------------------------------------------------------------------------- */ - else if (HDstrcmp(scomp, "SZIP") == 0) { + else if (strcmp(scomp, "SZIP") == 0) { filt->filtn = H5Z_FILTER_SZIP; filt->cd_nelmts = 2; if (no_param) { /*no more parameters, SZIP must have parameter */ @@ -337,7 +337,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t * H5Z_FILTER_SHUFFLE *------------------------------------------------------------------------- */ - else if (HDstrcmp(scomp, "SHUF") == 0) { + else if (strcmp(scomp, "SHUF") == 0) { filt->filtn = H5Z_FILTER_SHUFFLE; filt->cd_nelmts = 0; if (m > 0) { /*shuffle does not have parameter */ @@ -351,7 +351,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t * H5Z_FILTER_FLETCHER32 *------------------------------------------------------------------------- */ - else if (HDstrcmp(scomp, "FLET") == 0) { + else if (strcmp(scomp, "FLET") == 0) { filt->filtn = H5Z_FILTER_FLETCHER32; filt->cd_nelmts = 0; if (m > 0) { /*shuffle does not have parameter */ @@ -365,7 +365,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t * H5Z_FILTER_NBIT *------------------------------------------------------------------------- */ - else if (HDstrcmp(scomp, "NBIT") == 0) { + else if (strcmp(scomp, "NBIT") == 0) { filt->filtn = H5Z_FILTER_NBIT; filt->cd_nelmts = 0; if (m > 0) { /*nbit does not have parameter */ @@ -379,7 +379,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t * H5Z_FILTER_SCALEOFFSET *------------------------------------------------------------------------- */ - else if (HDstrcmp(scomp, "SOFF") == 0) { + else if (strcmp(scomp, "SOFF") == 0) { filt->filtn = H5Z_FILTER_SCALEOFFSET; filt->cd_nelmts = 2; if (no_param) { /*no more parameters, SOFF must have parameter */ @@ -393,7 +393,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t * User Defined Filter *------------------------------------------------------------------------- */ - else if (HDstrcmp(scomp, "UD") == 0) { + else if (strcmp(scomp, "UD") == 0) { /* parameters does not match count */ if (filt->cd_nelmts != j) { if (obj_list) @@ -448,7 +448,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t 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 ((strcmp(smask, "NN") != 0) && (strcmp(smask, "EC") != 0)) { if (obj_list) free(obj_list); error_msg("szip mask must be 'NN' or 'EC' \n"); @@ -486,7 +486,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about obj_list_t *obj_list = NULL; unsigned i, j, n; char c; - size_t len = HDstrlen(str); + size_t len = strlen(str); int k, end_obj = -1, c_index; char sobj[MAX_NC_NAME]; char sdim[10]; @@ -527,7 +527,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about sobj[k] = '\0'; else sobj[k + 1] = '\0'; - HDstrcpy(obj_list[n].obj, sobj); + strcpy(obj_list[n].obj, sobj); memset(sobj, 0, sizeof(sobj)); n++; k = -1; @@ -546,11 +546,11 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about for (j = (unsigned)(end_obj + 1), n = 0; n <= 5; j++, n++) { if (n == 5) { slayout[n] = '\0'; /*cut string */ - if (HDstrcmp(slayout, "COMPA") == 0) + if (strcmp(slayout, "COMPA") == 0) pack->layout = H5D_COMPACT; - else if (HDstrcmp(slayout, "CONTI") == 0) + else if (strcmp(slayout, "CONTI") == 0) pack->layout = H5D_CONTIGUOUS; - else if (HDstrcmp(slayout, "CHUNK") == 0) + else if (strcmp(slayout, "CHUNK") == 0) pack->layout = H5D_CHUNKED; else { error_msg("in parse layout, not a valid layout in <%s>\n", str); @@ -604,7 +604,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about else if (i == len - 1) { /*no more parameters */ sdim[k] = '\0'; k = 0; - if (HDstrcmp(sdim, "NONE") == 0) { + if (strcmp(sdim, "NONE") == 0) { pack->chunk.rank = -2; } else { |