1) Moved tprintf and related functions to their own file in common/libc/printf/tprintf.c.

This file is included by both libc and hostcompat.

2) Changed printf -> tprintf in all testbin programs
This commit is contained in:
Scott Haseley
2016-01-15 13:33:11 -05:00
parent 98ff530afb
commit 0ab862abfa
49 changed files with 501 additions and 478 deletions

View File

@@ -75,14 +75,14 @@ main(void)
for (k = 0; k < Dim; k++)
C[i][j] += A[i][k] * B[k][j];
printf("matmult-orig finished.\n");
tprintf("matmult-orig finished.\n");
r = C[Dim-1][Dim-1];
printf("answer is: %d (should be %d)\n", r, RIGHT);
tprintf("answer is: %d (should be %d)\n", r, RIGHT);
if (r != RIGHT) {
printf("FAILED\n");
tprintf("FAILED\n");
}
else {
printf("Passed.\n");
tprintf("Passed.\n");
}
return 0;
}

View File

@@ -79,12 +79,12 @@ main(void)
for (i = 0; i < Dim; i++)
r += C[i][i];
printf("matmult finished.\n");
printf("answer is: %d (should be %d)\n", r, RIGHT);
tprintf("matmult finished.\n");
tprintf("answer is: %d (should be %d)\n", r, RIGHT);
if (r != RIGHT) {
printf("FAILED\n");
tprintf("FAILED\n");
return 1;
}
printf("Passed.\n");
tprintf("Passed.\n");
return 0;
}