summaryrefslogtreecommitdiffstats
path: root/test/tcheck_version.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-03-25 00:39:37 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-03-25 00:39:37 (GMT)
commitfeb20aac304b39e18c70f88cae2f7cf7d5c82db2 (patch)
treee15d7e751af4e3c42e77ea955d91db4cf27a71cf /test/tcheck_version.c
parentbdac2ecdbff2c389a222b3d93ff1eb1d23ec6b23 (diff)
downloadhdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.zip
hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.gz
hdf5-feb20aac304b39e18c70f88cae2f7cf7d5c82db2.tar.bz2
Formats the source and updates the gcc warning pragmas
Diffstat (limited to 'test/tcheck_version.c')
-rw-r--r--test/tcheck_version.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/test/tcheck_version.c b/test/tcheck_version.c
index 70f49da..54be0fc 100644
--- a/test/tcheck_version.c
+++ b/test/tcheck_version.c
@@ -11,21 +11,21 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- /*
- * This tests the h5check_version() function.
- *
- * The default is to call the h5check_version() with the version information
- * in the header file and should incur no warnings or abort.
- * Options provided to call it with incorrect versions to test
- * if it will indeed issue the warning message and aborts. With environment
- * variable $HDF5_DISABLE_VERSION_CHECK sets to 1, it should issue warnings
- * but no abort. If it is 2, no warning or abort.
- *
- * Programmer: Albert Cheng
- * September 20, 2009
- * Modifications:
- * Added abort signal intercept. AKC - 2009/10/16 -
- */
+/*
+ * This tests the h5check_version() function.
+ *
+ * The default is to call the h5check_version() with the version information
+ * in the header file and should incur no warnings or abort.
+ * Options provided to call it with incorrect versions to test
+ * if it will indeed issue the warning message and aborts. With environment
+ * variable $HDF5_DISABLE_VERSION_CHECK sets to 1, it should issue warnings
+ * but no abort. If it is 2, no warning or abort.
+ *
+ * Programmer: Albert Cheng
+ * September 20, 2009
+ * Modifications:
+ * Added abort signal intercept. AKC - 2009/10/16 -
+ */
#include "h5test.h"
@@ -35,14 +35,14 @@
#define progname "tcheck_version"
- /* prototypes */
+/* prototypes */
void showhelp(void);
-void parse(int ac, char** av);
+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 major = H5_VERS_MAJOR;
+unsigned minor = H5_VERS_MINOR;
unsigned release = H5_VERS_RELEASE;
void
@@ -58,9 +58,9 @@ showhelp(void)
}
void
-parse(int ac, char** av)
+parse(int ac, char **av)
{
- char* pt;
+ char *pt;
while (--ac > 0) {
pt = *(++av);
@@ -70,28 +70,28 @@ parse(int ac, char** av)
}
else {
switch (*(++pt)) {
- case 't': /* option -t */
- switch (*(++pt)) {
- case 'M':
- major++;
- break;
- case 'm':
- minor++;
- break;
- case 'r':
- release++;
+ 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 -v parameter (%s). Aborted.\n", *av);
+ HDfprintf(stderr, "Unknown option(%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);
}
}
}
@@ -119,14 +119,14 @@ abort_intercept(int H5_ATTR_UNUSED sig)
* is no need to alert the user with a modal dialog box.
*/
int
-handle_crt_abort(int reportType, char* message, int* returnValue)
+handle_crt_abort(int reportType, char *message, int *returnValue)
{
return TRUE;
}
#endif
int
-main(int ac, char** av)
+main(int ac, char **av)
{
#ifdef H5_HAVE_WIN32_API
(void)_CrtSetReportHook2(_CRT_RPTHOOK_INSTALL, handle_crt_abort);