reuse the same line of text when showing progress
This commit is contained in:
parent
c57232fee6
commit
33b497d0a2
1 changed files with 15 additions and 0 deletions
15
main.c
15
main.c
|
|
@ -478,9 +478,19 @@ void calculate_simplifications(void)
|
|||
{
|
||||
int left = N - todo_n;
|
||||
|
||||
if (print_with_color)
|
||||
{
|
||||
printf("\e[2K");
|
||||
}
|
||||
|
||||
printf("%i of %i (%.2f%%): [%i] ", left, N, (100.0 * left / N), cost);
|
||||
|
||||
print(truthtable, 0), puts("");
|
||||
|
||||
if (print_with_color)
|
||||
{
|
||||
printf("\e[1A");
|
||||
}
|
||||
}
|
||||
|
||||
// consider NOT:
|
||||
|
|
@ -670,6 +680,11 @@ void calculate_simplifications(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (verbose && print_with_color)
|
||||
{
|
||||
printf("\e[2K");
|
||||
}
|
||||
}
|
||||
|
||||
void get_simplifications(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue