diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 14:04:36 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 14:04:36 (GMT) |
commit | f1ba03cea5b82699a984c80bd2deac14fdc8df18 (patch) | |
tree | ebe777c3e0b83f4c4cec9212731da9ebe0a0cfd3 /test/tcheck_version.c | |
parent | 10343c197906415388f2a4c8d292e21d25cf7381 (diff) | |
download | hdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.zip hdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.tar.gz hdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.tar.bz2 |
Source formatted
Diffstat (limited to 'test/tcheck_version.c')
-rw-r--r-- | test/tcheck_version.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/test/tcheck_version.c b/test/tcheck_version.c index 2611178..62c0138 100644 --- a/test/tcheck_version.c +++ b/test/tcheck_version.c @@ -29,17 +29,17 @@ #include "h5test.h" -#define progname "tcheck_version" +#define progname "tcheck_version" /* prototypes */ void showhelp(void); void parse(int ac, char **av); -void abort_intercept (int H5_ATTR_UNUSED sig); +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) @@ -53,43 +53,43 @@ showhelp(void) HDprintf("\t\t\tr for Release number (%d)\n", H5_VERS_RELEASE); } - void parse(int ac, char **av) { char *pt; - while (--ac > 0){ - 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: + while (--ac > 0) { + 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); + } + } } } @@ -103,7 +103,7 @@ parse(int ac, char **av) * This tries to eliminate those side effects. */ H5_ATTR_NORETURN void -abort_intercept (int H5_ATTR_UNUSED sig) +abort_intercept(int H5_ATTR_UNUSED sig) { HDexit(6); } |