template.c: cosmetic output improvements
This commit is contained in:
parent
76384284fe
commit
bd02f2b6a6
@ -277,10 +277,18 @@ main(void)
|
|||||||
if (w % FREQUENCY_OF_STATUS_REPORTING == 0 ||
|
if (w % FREQUENCY_OF_STATUS_REPORTING == 0 ||
|
||||||
w >= product_minus_1 /* or if writing last sample */) {
|
w >= product_minus_1 /* or if writing last sample */) {
|
||||||
printf(
|
printf(
|
||||||
"%sremaining samples = %18" PRIuMAX " (%.2Lf%% done)",
|
"%sremaining samples = %18" PRIuMAX " (%3.2Lf%% done)"
|
||||||
|
#if SEQUENTIAL_MODE
|
||||||
|
" (part %" PRIuMAX "/%" PRIuMAX ")"
|
||||||
|
#endif
|
||||||
|
,
|
||||||
ANSI_CLEAR,
|
ANSI_CLEAR,
|
||||||
product_minus_1 - w,
|
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);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -290,13 +298,15 @@ main(void)
|
|||||||
printf("%s", ANSI_CLEAR);
|
printf("%s", ANSI_CLEAR);
|
||||||
|
|
||||||
// 5. log
|
// 5. log
|
||||||
|
#if !(SEQUENTIAL_MODE && VERBOSE_MODE)
|
||||||
#if SEQUENTIAL_MODE
|
#if SEQUENTIAL_MODE
|
||||||
printf("Writing out file " OUTPUT_FILE " (part %" PRIuMAX "/%"
|
if (seq == 0)
|
||||||
PRIuMAX ", %.2Lf%%)...\n", (uintmax_t) seq + 1,
|
#endif
|
||||||
(uintmax_t) MAX,
|
printf(
|
||||||
((long double) seq * 100.L) / ((long double) MAX));
|
#if !SEQUENTIAL_MODE
|
||||||
#else
|
"\n"
|
||||||
printf("\nWriting out file " OUTPUT_FILE "...\n");
|
#endif
|
||||||
|
"Writing out file " OUTPUT_FILE "...\n");
|
||||||
#endif
|
#endif
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
@ -325,7 +335,11 @@ main(void)
|
|||||||
|
|
||||||
// * end of program
|
// * end of program
|
||||||
#if !SILENT_MODE
|
#if !SILENT_MODE
|
||||||
printf("Done!\n");
|
printf(
|
||||||
|
#if SEQUENTIAL_MODE && VERBOSE_MODE
|
||||||
|
"\n"
|
||||||
|
#endif
|
||||||
|
"Done!\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user