diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 20:43:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 20:43:30 (GMT) |
commit | 1e91d96fa02466ffe451319bdac1005f84dc7993 (patch) | |
tree | 4de04ef502c313dfd766497b20235188761146c0 /tools/src/h5diff | |
parent | 95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff) | |
download | hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2 |
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'tools/src/h5diff')
-rw-r--r-- | tools/src/h5diff/h5diff_common.c | 56 | ||||
-rw-r--r-- | tools/src/h5diff/h5diff_main.c | 12 | ||||
-rw-r--r-- | tools/src/h5diff/ph5diff_main.c | 28 |
3 files changed, 48 insertions, 48 deletions
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index a2fe5d9..51bc050 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -95,11 +95,11 @@ check_options(diff_opt_t *opts) * These options are mutually exclusive. */ if ((opts->delta_bool + opts->percent_bool + opts->use_system_epsilon) > 1) { - HDprintf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME); - HDprintf("use no more than one.\n"); - HDprintf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 " - "Reference Manual'.\n", - PROGRAMNAME); + printf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME); + printf("use no more than one.\n"); + printf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 " + "Reference Manual'.\n", + PROGRAMNAME); h5diff_exit(EXIT_FAILURE); } } @@ -122,7 +122,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const H5TOOLS_START_DEBUG(" "); /* process the command-line */ - HDmemset(opts, 0, sizeof(diff_opt_t)); + memset(opts, 0, sizeof(diff_opt_t)); /* assume equal contents initially */ opts->contents = 1; @@ -181,7 +181,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const } else { if (H5_optarg != NULL) - opts->mode_verbose_level = HDatoi(H5_optarg); + opts->mode_verbose_level = atoi(H5_optarg); else opts->mode_verbose_level = 0; } @@ -207,7 +207,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const case 'S': if (H5_optarg != NULL) - enable_error_stack = HDatoi(H5_optarg); + enable_error_stack = atoi(H5_optarg); else enable_error_stack = 1; break; @@ -216,9 +216,9 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const opts->exclude_path = 1; /* create linked list of excluding objects */ - if ((exclude_node = (struct exclude_path_list *)HDmalloc(sizeof(struct exclude_path_list))) == + if ((exclude_node = (struct exclude_path_list *)malloc(sizeof(struct exclude_path_list))) == NULL) { - HDprintf("Error: lack of memory!\n"); + printf("Error: lack of memory!\n"); h5diff_exit(EXIT_FAILURE); } @@ -249,8 +249,8 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const /* create linked list of excluding objects */ if ((exclude_attr_node = - (struct exclude_path_list *)HDmalloc(sizeof(struct exclude_path_list))) == NULL) { - HDprintf("Error: lack of memory!\n"); + (struct exclude_path_list *)malloc(sizeof(struct exclude_path_list))) == NULL) { + printf("Error: lack of memory!\n"); h5diff_exit(EXIT_FAILURE); } @@ -276,7 +276,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const opts->delta_bool = 1; if (check_d_input(H5_optarg) == -1) { - HDprintf("<-d %s> is not a valid option\n", H5_optarg); + printf("<-d %s> is not a valid option\n", H5_optarg); usage(); h5diff_exit(EXIT_FAILURE); } @@ -287,7 +287,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const case 'p': opts->percent_bool = 1; if (check_p_input(H5_optarg) == -1) { - HDprintf("<-p %s> is not a valid option\n", H5_optarg); + printf("<-p %s> is not a valid option\n", H5_optarg); usage(); h5diff_exit(EXIT_FAILURE); } @@ -301,7 +301,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const case 'n': opts->count_bool = 1; if (check_n_input(H5_optarg) == -1) { - HDprintf("<-n %s> is not a valid option\n", H5_optarg); + printf("<-n %s> is not a valid option\n", H5_optarg); usage(); h5diff_exit(EXIT_FAILURE); } @@ -322,7 +322,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const case '1': opts->vol_info[0].type = VOL_BY_VALUE; - opts->vol_info[0].u.value = (H5VL_class_value_t)HDatoi(H5_optarg); + opts->vol_info[0].u.value = (H5VL_class_value_t)atoi(H5_optarg); opts->custom_vol[0] = TRUE; break; @@ -338,7 +338,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const case '4': opts->vol_info[1].type = VOL_BY_VALUE; - opts->vol_info[1].u.value = (H5VL_class_value_t)HDatoi(H5_optarg); + opts->vol_info[1].u.value = (H5VL_class_value_t)atoi(H5_optarg); opts->custom_vol[1] = TRUE; break; @@ -354,7 +354,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const case '7': opts->vfd_info[0].type = VFD_BY_VALUE; - opts->vfd_info[0].u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + opts->vfd_info[0].u.value = (H5FD_class_value_t)atoi(H5_optarg); opts->custom_vfd[0] = TRUE; break; @@ -370,7 +370,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const case '0': opts->vfd_info[1].type = VFD_BY_VALUE; - opts->vfd_info[1].u.value = (H5FD_class_value_t)HDatoi(H5_optarg); + opts->vfd_info[1].u.value = (H5FD_class_value_t)atoi(H5_optarg); opts->custom_vfd[1] = TRUE; break; @@ -392,7 +392,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const errno = 0; onion_fa_g_1.revision_num = HDstrtoull(opts->vfd_info[0].info, NULL, 10); if (errno == ERANGE) { - HDprintf("Invalid onion revision specified for file 1\n"); + printf("Invalid onion revision specified for file 1\n"); usage(); h5diff_exit(EXIT_FAILURE); } @@ -409,7 +409,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const errno = 0; onion_fa_g_2.revision_num = HDstrtoull(opts->vfd_info[1].info, NULL, 10); if (errno == ERANGE) { - HDprintf("Invalid onion revision specified for file 2\n"); + printf("Invalid onion revision specified for file 2\n"); usage(); h5diff_exit(EXIT_FAILURE); } @@ -480,20 +480,20 @@ print_info(diff_opt_t *opts) return; if (opts->cmn_objs == 0) { - HDprintf("No common objects found. Files are not comparable.\n"); + printf("No common objects found. Files are not comparable.\n"); if (!opts->mode_verbose) - HDprintf("Use -v for a list of objects.\n"); + printf("Use -v for a list of objects.\n"); } if (opts->not_cmp == 1) { if (opts->mode_list_not_cmp == 0) { - HDprintf("--------------------------------\n"); - HDprintf("Some objects are not comparable\n"); - HDprintf("--------------------------------\n"); + printf("--------------------------------\n"); + printf("Some objects are not comparable\n"); + printf("--------------------------------\n"); if (opts->mode_verbose) - HDprintf("Use -c for a list of objects without details of differences.\n"); + printf("Use -c for a list of objects without details of differences.\n"); else - HDprintf("Use -c for a list of objects.\n"); + printf("Use -c for a list of objects.\n"); } } } diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c index 561f139..f2ab2f9 100644 --- a/tools/src/h5diff/h5diff_main.c +++ b/tools/src/h5diff/h5diff_main.c @@ -89,15 +89,15 @@ main(int argc, char *argv[]) for (i = 0; i < 2; i++) { if (opts.sset[i]) { if (opts.sset[i]->start.data) - HDfree(opts.sset[i]->start.data); + free(opts.sset[i]->start.data); if (opts.sset[i]->stride.data) - HDfree(opts.sset[i]->stride.data); + free(opts.sset[i]->stride.data); if (opts.sset[i]->count.data) - HDfree(opts.sset[i]->count.data); + free(opts.sset[i]->count.data); if (opts.sset[i]->block.data) - HDfree(opts.sset[i]->block.data); + free(opts.sset[i]->block.data); - HDfree(opts.sset[i]); + free(opts.sset[i]); opts.sset[i] = NULL; } } @@ -124,5 +124,5 @@ h5diff_exit(int status) { h5tools_close(); - HDexit(status); + exit(status); } diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index 64b1f28..82cb876 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -67,7 +67,7 @@ main(int argc, char *argv[]) MPI_Comm_size(MPI_COMM_WORLD, &g_nTasks); if (g_nTasks == 1) { - HDprintf("Only 1 task available...doing serial diff\n"); + printf("Only 1 task available...doing serial diff\n"); g_Parallel = 0; @@ -141,11 +141,11 @@ ph5diff_worker(int nID) { /* Open the files */ if ((file1_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) { - HDprintf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[0]); + printf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[0]); MPI_Abort(MPI_COMM_WORLD, 0); } if ((file2_id = H5Fopen(filenames[1], H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) { - HDprintf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[1]); + printf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[1]); MPI_Abort(MPI_COMM_WORLD, 0); } /* enable error reporting */ @@ -160,7 +160,7 @@ ph5diff_worker(int nID) /* Make certain we've received the filenames and opened the files already */ if (file1_id < 0 || file2_id < 0) { - HDprintf("ph5diff_worker: ERROR: work received before/without filenames\n"); + printf("ph5diff_worker: ERROR: work received before/without filenames\n"); break; } @@ -188,7 +188,7 @@ ph5diff_worker(int nID) char out_data[PRINT_DATA_MAX_SIZE]; int tmp; - HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE); + memset(out_data, 0, PRINT_DATA_MAX_SIZE); i = 0; rewind(overflow_file); @@ -198,7 +198,7 @@ ph5diff_worker(int nID) MPI_Send(out_data, PRINT_DATA_MAX_SIZE, MPI_BYTE, 0, MPI_TAG_PRINT_DATA, MPI_COMM_WORLD); i = 0; - HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE); + memset(out_data, 0, PRINT_DATA_MAX_SIZE); } } @@ -210,8 +210,8 @@ ph5diff_worker(int nID) overflow_file = NULL; } - HDfflush(stdout); - HDmemset(outBuff, 0, OUTBUFF_SIZE); + fflush(stdout); + memset(outBuff, 0, OUTBUFF_SIZE); outBuffOffset = 0; MPI_Send(&diffs, sizeof(diffs), MPI_BYTE, 0, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD); @@ -225,7 +225,7 @@ ph5diff_worker(int nID) break; } else { - HDprintf("ph5diff_worker: ERROR: invalid tag (%d) received\n", Status.MPI_TAG); + printf("ph5diff_worker: ERROR: invalid tag (%d) received\n", Status.MPI_TAG); break; } } @@ -252,7 +252,7 @@ print_manager_output(void) { /* If there was something we buffered, let's print it now */ if ((outBuffOffset > 0) && g_Parallel) { - HDprintf("%s", outBuff); + printf("%s", outBuff); if (overflow_file) { int tmp; @@ -263,12 +263,12 @@ print_manager_output(void) overflow_file = NULL; } - HDfflush(stdout); - HDmemset(outBuff, 0, OUTBUFF_SIZE); + fflush(stdout); + memset(outBuff, 0, OUTBUFF_SIZE); outBuffOffset = 0; } else if ((outBuffOffset > 0) && !g_Parallel) { - HDfprintf(stderr, "h5diff error: outBuffOffset>0, but we're not in parallel!\n"); + fprintf(stderr, "h5diff error: outBuffOffset>0, but we're not in parallel!\n"); } } @@ -303,5 +303,5 @@ h5diff_exit(int status) /* Always exit(0), since MPI implementations do weird stuff when they * receive a non-zero exit value. - QAK */ - HDexit(status); + exit(status); } |