From 131a60ab2d0ca57f721e374466055cc9e2290ae9 Mon Sep 17 00:00:00 2001 From: Tonton Th Date: Fri, 31 Jan 2020 18:22:05 +0100 Subject: [PATCH] trace messages go to stderr --- tbb.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/tbb.c b/tbb.c index c11baf2..115d7b5 100644 --- a/tbb.c +++ b/tbb.c @@ -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 %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);