1
0

template.c: optimize printf(..."\n") to puts(...)

This commit is contained in:
Intel A80486DX2-66 2024-05-19 11:32:04 +03:00
parent 2c4101ae82
commit e4a64e1ac6
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -101,7 +101,7 @@ main(void)
{ {
// * log -> welcome // * log -> welcome
#if !SILENT_MODE #if !SILENT_MODE
printf(":: C bytebeat generator runtime unit\n"); puts(":: C bytebeat generator runtime unit");
fflush(stdout); fflush(stdout);
#endif #endif
@ -139,11 +139,11 @@ main(void)
if (samples > 0) if (samples > 0)
printf("%" PRIuMAX " samples", samples); printf("%" PRIuMAX " samples", samples);
printf( puts(
#if VERBOSE_MODE || SEQUENTIAL_MODE #if VERBOSE_MODE || SEQUENTIAL_MODE
"\n" "\n"
#endif #endif
"\n" ""
); );
fflush(stdout); fflush(stdout);
@ -152,7 +152,7 @@ main(void)
// * write WAVE headers // * write WAVE headers
// 0. log // 0. log
#if SEQUENTIAL_MODE #if SEQUENTIAL_MODE
printf("Writing WAVE headers...\n"); puts("Writing WAVE headers...");
#endif #endif
// 1. open file // 1. open file
@ -314,11 +314,11 @@ main(void)
#if SEQUENTIAL_MODE #if SEQUENTIAL_MODE
if (seq == 0) if (seq == 0)
#endif #endif
printf( puts(
#if !SEQUENTIAL_MODE #if !SEQUENTIAL_MODE
"\n" "\n"
#endif #endif
"Writing out file " OUTPUT_FILE "...\n"); "Writing out file " OUTPUT_FILE "...");
#endif #endif
fflush(stdout); fflush(stdout);
#endif #endif
@ -347,11 +347,11 @@ main(void)
// * end of program // * end of program
#if !SILENT_MODE #if !SILENT_MODE
printf( puts(
#if SEQUENTIAL_MODE && VERBOSE_MODE #if SEQUENTIAL_MODE && VERBOSE_MODE
"\n" ""
#endif #endif
"Done!\n"); "Done!");
#endif #endif
return EXIT_SUCCESS; return EXIT_SUCCESS;