summaryrefslogtreecommitdiffstats
path: root/tools/test/misc/talign.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/misc/talign.c')
-rw-r--r--tools/test/misc/talign.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/tools/test/misc/talign.c b/tools/test/misc/talign.c
index 08ebfc7..7f1f038 100644
--- a/tools/test/misc/talign.c
+++ b/tools/test/misc/talign.c
@@ -51,14 +51,14 @@ int main(void)
int result = 0;
herr_t error = 1;
- printf("%-70s", "Testing alignment in compound datatypes");
+ HDprintf("%-70s", "Testing alignment in compound datatypes");
- strcpy(string5, "Hi!");
+ HDstrcpy(string5, "Hi!");
HDunlink(fname);
fil = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
if (fil < 0) {
- puts("*FAILED*");
+ HDputs("*FAILED*");
return 1;
}
@@ -123,8 +123,8 @@ int main(void)
data = (char *)HDmalloc(H5Tget_size(fix));
if(!data) {
- perror("malloc() failed");
- abort();
+ HDperror("malloc() failed");
+ HDabort();
}
set = H5Dopen2(fil, setname, H5P_DEFAULT);
@@ -136,7 +136,7 @@ int main(void)
out:
if(error < 0) {
result = 1;
- puts("*FAILED - HDF5 library error*");
+ HDputs("*FAILED - HDF5 library error*");
} else if(!(H5_FLT_ABS_EQUAL(fok[0], fptr[0]))
|| !(H5_FLT_ABS_EQUAL(fok[1], fptr[1]))
|| !(H5_FLT_ABS_EQUAL(fnok[0], fptr[2]))
@@ -145,7 +145,7 @@ out:
result = 1;
mname = H5Tget_member_name(fix, 0);
- printf("%14s (%2d) %6s = %s\n",
+ HDprintf("%14s (%2d) %6s = %s\n",
mname ? mname : "(null)", (int)H5Tget_member_offset(fix,0),
string5, (char *)(data + H5Tget_member_offset(fix, 0)));
if(mname)
@@ -153,7 +153,7 @@ out:
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1)));
mname = H5Tget_member_name(fix, 1);
- printf("Data comparison:\n"
+ HDprintf("Data comparison:\n"
"%14s (%2d) %6f = %f\n"
" %6f = %f\n",
mname ? mname : "(null)", (int)H5Tget_member_offset(fix,1),
@@ -164,7 +164,7 @@ out:
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 2)));
mname = H5Tget_member_name(fix, 2);
- printf("%14s (%2d) %6f = %f\n"
+ HDprintf("%14s (%2d) %6f = %f\n"
" %6f = %6f\n",
mname ? mname : "(null)", (int)H5Tget_member_offset(fix,2),
(double)fnok[0], (double)fptr[0],
@@ -173,7 +173,7 @@ out:
H5free_memory(mname);
fptr = (float *)((void *)(data + H5Tget_member_offset(fix, 1)));
- printf("\n"
+ HDprintf("\n"
"Short circuit\n"
" %6f = %f\n"
" %6f = %f\n"
@@ -183,9 +183,9 @@ out:
(double)fok[1], (double)fptr[1],
(double)fnok[0], (double)fptr[2],
(double)fnok[1], (double)fptr[3]);
- puts("*FAILED - compound type alignmnent problem*");
+ HDputs("*FAILED - compound type alignmnent problem*");
} else {
- puts(" PASSED");
+ HDputs(" PASSED");
}
if(data)
@@ -200,7 +200,7 @@ out:
H5Pclose(plist);
H5Fclose(fil);
HDunlink(fname);
- fflush(stdout);
+ HDfflush(stdout);
return result;
}