trace messages go to stderr

This commit is contained in:
Tonton Th 2020-01-31 18:22:05 +01:00
parent db2c41eac1
commit 131a60ab2d

23
tbb.c
View File

@ -23,7 +23,7 @@ if (NULL==bublist) {
print_bublist_desc(bublist, 1);
foo = free_bubulles(bublist, 0);
printf("free bubulles -> %d\n", foo);
fprintf(stderr, "free bubulles -> %d\n", foo);
}
/* --------------------------------------------------------------------- */
@ -37,17 +37,20 @@ bublist = alloc_bubulles("push & pop", nbelm, 0);
for (idx=0; idx<nbelm; idx++) {
bubulle.p.x = (double)idx;
bubulle.p.y = bubulle.p.z = 0.3;
if (idx & 0xf0)
bubulle.p.y = bubulle.p.z = 0.3;
else
bubulle.p.y = bubulle.p.z = 0.8;
foo = push_bubulle(bublist, &bubulle);
}
/* WTF ? where is the 'pop' test ? */
foo = bubulles_to_data("dummy-file", NULL, bublist, 0);
printf("ecriture bubulles -> %d\n", foo);
fprintf(stderr, "ecriture bubulles -> %d\n", foo);
foo = free_bubulles(bublist, 0);
printf("free bubulles -> %d\n", foo);
fprintf(stderr, "free bubulles -> %d\n", foo);
return 0;
}
@ -78,23 +81,23 @@ in = nbre / 2;
out = nbre + 42;
foo = peek_bubulle(bublist, &bubulle, in);
printf("peek 1 -> %7d\n", foo);
fprintf(stderr, "peek 1 -> %7d\n", foo);
foo = niceprint_bubulle(&bubulle, 0);
printf("niceprint -> %7d\n", foo);
fprintf(stderr, "niceprint -> %7d\n", foo);
foo = peek_bubulle(bublist, &bubulle, out);
printf("peek 2 -> %7d\n", foo);
fprintf(stderr, "peek 2 -> %7d\n", foo);
bubulle.p.y = 3.14159;
foo = poke_bubulle(bublist, &bubulle, in);
printf("poke 1 -> %7d\n", foo);
fprintf(stderr, "poke 2 -> %7d\n", foo);
foo = peek_bubulle(bublist, &bubulle, in);
printf("peek 3 -> %7d\n", foo);
fprintf(stderr, "peek 3 -> %7d\n", foo);
foo = niceprint_bubulle(&bubulle, 0);
printf("niceprint -> %7d\n", foo);
fprintf(stderr, "niceprint -> %7d\n", foo);
free_bubulles(bublist, 0);