1
0

template.c: cosmetic output improvements

This commit is contained in:
Intel A80486DX2-66 2024-01-12 20:58:10 +03:00
parent 76384284fe
commit bd02f2b6a6
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -277,10 +277,18 @@ main(void)
if (w % FREQUENCY_OF_STATUS_REPORTING == 0 ||
w >= product_minus_1 /* or if writing last sample */) {
printf(
"%sremaining samples = %18" PRIuMAX " (%.2Lf%% done)",
"%sremaining samples = %18" PRIuMAX " (%3.2Lf%% done)"
#if SEQUENTIAL_MODE
" (part %" PRIuMAX "/%" PRIuMAX ")"
#endif
,
ANSI_CLEAR,
product_minus_1 - w,
((long double) w * 100) / (long double) PRODUCT);
((long double) w * 100) / (long double) PRODUCT
#if SEQUENTIAL_MODE
, (uintmax_t) seq + 1, (uintmax_t) MAX
#endif
);
fflush(stdout);
}
#endif
@ -290,13 +298,15 @@ main(void)
printf("%s", ANSI_CLEAR);
// 5. log
#if !(SEQUENTIAL_MODE && VERBOSE_MODE)
#if SEQUENTIAL_MODE
printf("Writing out file " OUTPUT_FILE " (part %" PRIuMAX "/%"
PRIuMAX ", %.2Lf%%)...\n", (uintmax_t) seq + 1,
(uintmax_t) MAX,
((long double) seq * 100.L) / ((long double) MAX));
#else
printf("\nWriting out file " OUTPUT_FILE "...\n");
if (seq == 0)
#endif
printf(
#if !SEQUENTIAL_MODE
"\n"
#endif
"Writing out file " OUTPUT_FILE "...\n");
#endif
fflush(stdout);
#endif
@ -325,7 +335,11 @@ main(void)
// * end of program
#if !SILENT_MODE
printf("Done!\n");
printf(
#if SEQUENTIAL_MODE && VERBOSE_MODE
"\n"
#endif
"Done!\n");
#endif
return 0;