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 /test/testframe.c | |
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 'test/testframe.c')
-rw-r--r-- | test/testframe.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/test/testframe.c b/test/testframe.c index f3cf781..1583c60 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -72,12 +72,12 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const { /* Sanity checking */ if (HDstrlen(TheDescr) >= MAXTESTDESC) { - HDprintf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC); - HDexit(EXIT_FAILURE); + printf("Test description ('%s') too long, increase MAXTESTDESC(%d).\n", TheDescr, MAXTESTDESC); + exit(EXIT_FAILURE); } /* end if */ if (HDstrlen(TheName) >= MAXTESTNAME) { - HDprintf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME); - HDexit(EXIT_FAILURE); + printf("Test name too long, increase MAXTESTNAME(%d).\n", MAXTESTNAME); + exit(EXIT_FAILURE); } /* end if */ /* Check for increasing the Test array size */ @@ -86,10 +86,10 @@ AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), const unsigned newAlloc = MAX(1, TestAlloc * 2); /* New array size */ /* Reallocate array */ - if (NULL == (newTest = (TestStruct *)HDrealloc(Test, newAlloc * sizeof(TestStruct)))) { - HDprintf("Out of memory for tests, Index = %u, TestAlloc = %u, newAlloc = %u\n", Index, TestAlloc, - newAlloc); - HDexit(EXIT_FAILURE); + if (NULL == (newTest = (TestStruct *)realloc(Test, newAlloc * sizeof(TestStruct)))) { + printf("Out of memory for tests, Index = %u, TestAlloc = %u, newAlloc = %u\n", Index, TestAlloc, + newAlloc); + exit(EXIT_FAILURE); } /* end if */ /* Update info */ @@ -230,7 +230,7 @@ TestParseCmdLine(int argc, char *argv[]) } else { TestUsage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } else if (((HDstrcmp(*argv, "-exclude") == 0) || (HDstrcmp(*argv, "-x") == 0))) { @@ -241,7 +241,7 @@ TestParseCmdLine(int argc, char *argv[]) } else { TestUsage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } else if (((HDstrcmp(*argv, "-begin") == 0) || (HDstrcmp(*argv, "-b") == 0))) { @@ -252,7 +252,7 @@ TestParseCmdLine(int argc, char *argv[]) } else { TestUsage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } else if (((HDstrcmp(*argv, "-only") == 0) || (HDstrcmp(*argv, "-o") == 0))) { @@ -272,7 +272,7 @@ TestParseCmdLine(int argc, char *argv[]) } else { TestUsage(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0)) @@ -281,7 +281,7 @@ TestParseCmdLine(int argc, char *argv[]) enable_error_stack = 1; else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) { TestUsage(); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0)) SetTestNoCleanup(); @@ -295,7 +295,7 @@ TestParseCmdLine(int argc, char *argv[]) if (NULL != TestPrivateParser) { ret_code = TestPrivateParser(argc + 1, argv - 1); if (ret_code != 0) - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } } @@ -378,7 +378,7 @@ void TestShutdown(void) { if (Test) - HDfree(Test); + free(Test); } /* @@ -530,7 +530,7 @@ ParseTestVerbosity(char *argv) else if (*argv == 'h') SetTestVerbosity(VERBO_HI); else - SetTestVerbosity(HDatoi(argv)); + SetTestVerbosity(atoi(argv)); } /* @@ -574,9 +574,9 @@ TestErrPrintf(const char *format, ...) num_errs++; /* Print the requested information */ - HDva_start(arglist, format); + va_start(arglist, format); ret_value = HDvprintf(format, arglist); - HDva_end(arglist); + va_end(arglist); /* Return the length of the string produced (like printf() does) */ return ret_value; @@ -624,7 +624,7 @@ SetTest(const char *testname, int action) break; default: /* error */ - HDprintf("*** ERROR: Unknown action (%d) for SetTest\n", action); + printf("*** ERROR: Unknown action (%d) for SetTest\n", action); break; } } @@ -646,7 +646,7 @@ TestAlarmOn(void) alarm_sec = (unsigned)HDstrtoul(env_val, (char **)NULL, 10); /* Set the number of seconds before alarm goes off */ - HDalarm((unsigned)alarm_sec); + alarm((unsigned)alarm_sec); #endif } @@ -656,6 +656,6 @@ TestAlarmOff(void) { #ifdef H5_HAVE_ALARM /* Set the number of seconds to zero */ - HDalarm(0); + alarm(0); #endif } |