1
0

template.c: reformat

This commit is contained in:
Intel A80486DX2-66 2024-06-03 00:21:26 +03:00
parent 9d295685a5
commit c78966cad0
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -120,20 +120,20 @@ main(void)
"\n" "\n"
"Sample rate: " INT2STR(SAMPLE_RATE) " Hz\n" "Sample rate: " INT2STR(SAMPLE_RATE) " Hz\n"
"Channels: " INT2STR(CHANNELS) "Channels: " INT2STR(CHANNELS)
#if CHANNELS <= 2 # if CHANNELS <= 2
" (" " ("
# if CHANNELS == 2 # if CHANNELS == 2
"stereo" "stereo"
# else # else
"mono" "mono"
# endif # endif
")" ")"
#endif # endif
"\n" "\n"
"Bit depth: " "Bit depth: "
#if !IS_SIGNED # if !IS_SIGNED
"un" "un"
#endif # endif
"signed " INT2STR(BIT_DEPTH) "-bit\n" "signed " INT2STR(BIT_DEPTH) "-bit\n"
"Duration: "); "Duration: ");
@ -155,9 +155,9 @@ main(void)
if (samples > 0) if (samples > 0)
printf("%" PRIuMAX " samples", samples); printf("%" PRIuMAX " samples", samples);
#if VERBOSE_MODE || SEQUENTIAL_MODE # if VERBOSE_MODE || SEQUENTIAL_MODE
puts("\n"); puts("\n");
#endif # endif
fflush(stdout); fflush(stdout);
#endif #endif
@ -306,16 +306,16 @@ main(void)
time >= gen_length_minus_1 /* or if writing last sample */) { time >= gen_length_minus_1 /* or if writing last sample */) {
printf( printf(
"%sremaining samples = %18" PRIuMAX " (%3.2Lf%% done)" "%sremaining samples = %18" PRIuMAX " (%3.2Lf%% done)"
#if SEQUENTIAL_MODE # if SEQUENTIAL_MODE
" (part %" PRIuMAX "/%" PRIuMAX ")" " (part %" PRIuMAX "/%" PRIuMAX ")"
#endif # endif
, ,
_ANSI_CLEAR_STRING, _ANSI_CLEAR_STRING,
gen_length_minus_1 - time, gen_length_minus_1 - time,
((long double) time * 100) / (long double) GEN_LENGTH ((long double) time * 100) / (long double) GEN_LENGTH
#if SEQUENTIAL_MODE # if SEQUENTIAL_MODE
, (uintmax_t) seq + 1, (uintmax_t) MAX , (uintmax_t) seq + 1, (uintmax_t) MAX
#endif # endif
); );
fflush(stdout); fflush(stdout);
} }
@ -326,16 +326,16 @@ main(void)
printf(_ANSI_CLEAR_STRING); printf(_ANSI_CLEAR_STRING);
// 5. log // 5. log
#if !(SEQUENTIAL_MODE && VERBOSE_MODE) # if !(SEQUENTIAL_MODE && VERBOSE_MODE)
#if SEQUENTIAL_MODE # if SEQUENTIAL_MODE
if (seq == 0) if (seq == 0)
#endif # endif
puts( puts(
#if !SEQUENTIAL_MODE # if !SEQUENTIAL_MODE
"\n" "\n"
#endif # endif
"Writing out file " OUTPUT_FILE "..."); "Writing out file " OUTPUT_FILE "...");
#endif # endif
fflush(stdout); fflush(stdout);
#endif #endif
@ -364,9 +364,9 @@ main(void)
// * end of program // * end of program
#if !SILENT_MODE #if !SILENT_MODE
puts( puts(
#if SEQUENTIAL_MODE && VERBOSE_MODE # if SEQUENTIAL_MODE && VERBOSE_MODE
"\n" "\n"
#endif # endif
"Done!"); "Done!");
#endif #endif