aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Santos <dacs.git@brilhante.top>2022-03-11 16:23:05 +0000
committerDaniel Santos <dacs.git@brilhante.top>2022-03-11 16:23:05 +0000
commit45f470b6322db05e6830aaea01063357ebd27274 (patch)
treebfa3534c286ec1dcf8109ae7a5cd9ca81217dfe6
parent06d3c41779712614701992f054998db6409a2683 (diff)
downloadnumericx-c-45f470b6322db05e6830aaea01063357ebd27274.tar.gz
DEBUG messages more compact
* print_numeral() without '\n' * more compact DEBUG message Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
-rw-r--r--numericx.c18
1 files 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;
}