From 45f470b6322db05e6830aaea01063357ebd27274 Mon Sep 17 00:00:00 2001 From: Daniel Santos Date: Fri, 11 Mar 2022 16:23:05 +0000 Subject: DEBUG messages more compact * print_numeral() without '\n' * more compact DEBUG message Signed-off-by: Daniel Santos --- numericx.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/numericx.c b/numericx.c index 2684ee4..44cd648 100644 --- a/numericx.c +++ b/numericx.c @@ -161,8 +161,6 @@ print_numeral(numeral_ptr* numeral) numeral = numeral->next; } } - - printf("\n"); } void @@ -245,32 +243,34 @@ main(int argc, char* argv[]) while( !is_the_same(counting, number) ) { if(DEBUG) - { - puts("----"); print_numeral(result); - } + if( TO_INFINITE_BASE ) increment(result, to_first, to_last, (to_first + 1)); else increment(result, to_first, to_last, to_first); if(DEBUG) + { + printf(" | "); print_numeral(counting); + printf("\n"); + } increment(counting, from_first, from_last, from_first); } - if(DEBUG) - puts("----"); /* print */ if(DEBUG) { - printf("counting: "); + print_numeral(result); + printf(" | "); print_numeral(counting); - printf("result: "); + printf("\n"); } print_numeral(result); + printf("\n"); return EXIT_SUCCESS; } -- cgit 1.4.1-2-gfad0