So far we'd leave the cursor at the end of the Press any key to proceed
message as long as the user didn't type in anything yet, and generated
the newline only after.
Let's switch this around: let's output the newline before.
This should make boot-time output nicer since it means concurrent output
while we wait will start at the beginning of line, and not in the middle.
fputs(ansi_highlight_magenta(), stdout);
fputs("-- Press any key to proceed --", stdout);
fputs(ansi_normal(), stdout);
+ fputc('\n', stdout);
fflush(stdout);
char key = 0;
(void) read_one_char(stdin, &key, USEC_INFINITY, /* echo= */ false, /* need_nl= */ NULL);
- fputc('\n', stdout);
fputc('\n', stdout);
fflush(stdout);