DEBUG messages more compact

* print_numeral() without '\n'
 * more compact DEBUG message

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
This commit is contained in:
Daniel Santos 2022-03-11 16:23:05 +00:00
parent 06d3c41779
commit 45f470b632
1 changed files with 9 additions and 9 deletions

View File

@ -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;
}