summaryrefslogtreecommitdiffstats
path: root/test/tcheck_version.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-08-15 21:46:00 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-08-15 21:46:15 (GMT)
commit64e6665b5442fc3f46cc7e2b00fe0a1b59f03b22 (patch)
tree138fc73e4863a87dee28574d4d827b2f5a403d84 /test/tcheck_version.c
parent3a504899eef1a66031c6f52623c24bb4e51ca51e (diff)
downloadhdf5-64e6665b5442fc3f46cc7e2b00fe0a1b59f03b22.zip
hdf5-64e6665b5442fc3f46cc7e2b00fe0a1b59f03b22.tar.gz
hdf5-64e6665b5442fc3f46cc7e2b00fe0a1b59f03b22.tar.bz2
Add HD prefix to tests
Diffstat (limited to 'test/tcheck_version.c')
-rw-r--r--test/tcheck_version.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/test/tcheck_version.c b/test/tcheck_version.c
index 574d7c9..2611178 100644
--- a/test/tcheck_version.c
+++ b/test/tcheck_version.c
@@ -29,7 +29,7 @@
#include "h5test.h"
-#define progname "tcheck_version"
+#define progname "tcheck_version"
/* prototypes */
void showhelp(void);
@@ -37,20 +37,20 @@ void parse(int ac, char **av);
void abort_intercept (int H5_ATTR_UNUSED sig);
/* global variables */
-unsigned major = H5_VERS_MAJOR;
-unsigned minor = H5_VERS_MINOR;
-unsigned release = H5_VERS_RELEASE;
+unsigned major = H5_VERS_MAJOR;
+unsigned minor = H5_VERS_MINOR;
+unsigned release = H5_VERS_RELEASE;
void
showhelp(void)
{
- printf("Usage: " progname " [-h] [-t<vers>]\n");
- printf("\t-h\tShow this page and version information\n");
- printf("\t-t<vers>: Test by changing (adding 1 to) the <vers> to trigger\n");
- printf("\t\t the warning. <vers> can be:\n");
- printf("\t\t\tM for Major version number (%d)\n", H5_VERS_MAJOR);
- printf("\t\t\tm for Minor version number (%d)\n", H5_VERS_MINOR);
- printf("\t\t\tr for Release number (%d)\n", H5_VERS_RELEASE);
+ HDprintf("Usage: " progname " [-h] [-t<vers>]\n");
+ HDprintf("\t-h\tShow this page and version information\n");
+ HDprintf("\t-t<vers>: Test by changing (adding 1 to) the <vers> to trigger\n");
+ HDprintf("\t\t the warning. <vers> can be:\n");
+ HDprintf("\t\t\tM for Major version number (%d)\n", H5_VERS_MAJOR);
+ HDprintf("\t\t\tm for Minor version number (%d)\n", H5_VERS_MINOR);
+ HDprintf("\t\t\tr for Release number (%d)\n", H5_VERS_RELEASE);
}
@@ -60,36 +60,36 @@ parse(int ac, char **av)
char *pt;
while (--ac > 0){
- pt = *(++av);
- if (*pt != '-') {
- fprintf(stderr, "Unknown option(%s). Aborted.\n", *av);
- exit(EXIT_FAILURE);
- }else{
- switch(*(++pt)) {
- case 't': /* option -t */
- switch(*(++pt)) {
- case 'M':
- major++;
- break;
- case 'm':
- minor++;
- break;
- case 'r':
- release++;
- break;
- default:
- fprintf(stderr, "Unknown -v parameter (%s). Aborted.\n", *av);
- exit(EXIT_FAILURE);
- }
- break;
- case 'h': /* help page */
- showhelp();
- exit(EXIT_SUCCESS);
- default:
- fprintf(stderr, "Unknown option(%s). Aborted.\n", *av);
- exit(EXIT_FAILURE);
- }
- }
+ pt = *(++av);
+ if (*pt != '-') {
+ HDfprintf(stderr, "Unknown option(%s). Aborted.\n", *av);
+ HDexit(EXIT_FAILURE);
+ }else{
+ switch(*(++pt)) {
+ case 't': /* option -t */
+ switch(*(++pt)) {
+ case 'M':
+ major++;
+ break;
+ case 'm':
+ minor++;
+ break;
+ case 'r':
+ release++;
+ break;
+ default:
+ HDfprintf(stderr, "Unknown -v parameter (%s). Aborted.\n", *av);
+ HDexit(EXIT_FAILURE);
+ }
+ break;
+ case 'h': /* help page */
+ showhelp();
+ HDexit(EXIT_SUCCESS);
+ default:
+ HDfprintf(stderr, "Unknown option(%s). Aborted.\n", *av);
+ HDexit(EXIT_FAILURE);
+ }
+ }
}
}