diff options
author | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2018-11-01 17:03:34 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2018-11-01 17:03:34 (GMT) |
commit | 4f62c084f1b0502bc984edd8ce380bea22518bd3 (patch) | |
tree | 864bdc70375a1390deea07fd140fc55cafd9e725 /test/use_append_chunk.c | |
parent | d1d2cf776d4f7b809e3cc1bda1a001ea147dfa89 (diff) | |
download | hdf5-4f62c084f1b0502bc984edd8ce380bea22518bd3.zip hdf5-4f62c084f1b0502bc984edd8ce380bea22518bd3.tar.gz hdf5-4f62c084f1b0502bc984edd8ce380bea22518bd3.tar.bz2 |
Fixed fprintf to HDfprintf in the following routines:
1) read_uc_file() in use_common.c
2) main() of use_append_chunk.c and use_append_mchunks.c
Diffstat (limited to 'test/use_append_chunk.c')
-rw-r--r-- | test/use_append_chunk.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c index 7dda732..fb906b6 100644 --- a/test/use_append_chunk.c +++ b/test/use_append_chunk.c @@ -130,7 +130,7 @@ main(int argc, char *argv[]) /* initialization */ if (setup_parameters(argc, argv) < 0){ - Hgoto_error(1); + Hgoto_error(1); } /* Determine the need to send/wait message file*/ @@ -148,20 +148,20 @@ main(int argc, char *argv[]) /* Create file */ /* ============*/ if (UC_opts.launch != UC_READER){ - printf("Creating skeleton data file for test...\n"); - if (create_uc_file() < 0){ - fprintf(stderr, "***encounter error\n"); - Hgoto_error(1); - }else - printf("File created.\n"); + HDprintf("Creating skeleton data file for test...\n"); + if (create_uc_file() < 0){ + HDfprintf(stderr, "***encounter error\n"); + Hgoto_error(1); + }else + HDprintf("File created.\n"); } if (UC_opts.launch==UC_READWRITE){ - /* fork process */ - if((childpid = HDfork()) < 0) { - HDperror("fork"); - Hgoto_error(1); - }; + /* fork process */ + if((childpid = HDfork()) < 0) { + HDperror("fork"); + Hgoto_error(1); + }; }; mypid = HDgetpid(); @@ -169,22 +169,22 @@ main(int argc, char *argv[]) /* launch reader */ /* ============= */ if (UC_opts.launch != UC_WRITER){ - /* child process launch the reader */ - if(0 == childpid) { - printf("%d: launch reader process\n", mypid); - if (read_uc_file(send_wait) < 0){ - fprintf(stderr, "read_uc_file encountered error\n"); - exit(1); - } - exit(0); - } + /* child process launch the reader */ + if(0 == childpid) { + HDprintf("%d: launch reader process\n", mypid); + if (read_uc_file(send_wait) < 0){ + HDfprintf(stderr, "read_uc_file encountered error\n"); + exit(1); + } + exit(0); + } } /* ============= */ /* launch writer */ /* ============= */ /* this process continues to launch the writer */ - printf("%d: continue as the writer process\n", mypid); + HDprintf("%d: continue as the writer process\n", mypid); name = UC_opts.filename; @@ -198,12 +198,12 @@ main(int argc, char *argv[]) /* Open the file */ if((fid = H5Fopen(name, H5F_ACC_RDWR | (UC_opts.use_swmr ? H5F_ACC_SWMR_WRITE : 0), fapl)) < 0) { - fprintf(stderr, "H5Fopen failed\n"); + HDfprintf(stderr, "H5Fopen failed\n"); Hgoto_error(1); } if(write_uc_file(send_wait, fid) < 0) { - fprintf(stderr, "write_uc_file encountered error\n"); + HDfprintf(stderr, "write_uc_file encountered error\n"); Hgoto_error(1); } @@ -218,24 +218,24 @@ main(int argc, char *argv[]) /* Close the file */ if(H5Fclose(fid) < 0) { - fprintf(stderr, "Failed to close file id\n"); + HDfprintf(stderr, "Failed to close file id\n"); Hgoto_error(1); } /* Close the property list */ if(H5Pclose(fapl) < 0) { - fprintf(stderr, "Failed to property list\n"); + HDfprintf(stderr, "Failed to close the property list\n"); Hgoto_error(1); } if (WIFEXITED(child_status)){ if ((child_ret_value=WEXITSTATUS(child_status)) != 0){ - printf("%d: child process exited with non-zero code (%d)\n", + HDprintf("%d: child process exited with non-zero code (%d)\n", mypid, child_ret_value); Hgoto_error(2); } } else { - printf("%d: child process terminated abnormally\n", mypid); + HDprintf("%d: child process terminated abnormally\n", mypid); Hgoto_error(2); } } @@ -243,9 +243,9 @@ main(int argc, char *argv[]) done: /* Print result and exit */ if (ret_value != 0){ - printf("Error(s) encountered\n"); + HDprintf("Error(s) encountered\n"); }else{ - printf("All passed\n"); + HDprintf("All passed\n"); } return(ret_value); |