changeset 12:2260fbd28b2a

fcsim-calypso-be: flush stdout
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 14 Mar 2021 07:17:26 +0000
parents 60fd23186e2e
children 7c26eac6ab00
files calypso/main.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/calypso/main.c	Sun Mar 14 07:14:33 2021 +0000
+++ b/calypso/main.c	Sun Mar 14 07:17:26 2021 +0000
@@ -62,8 +62,9 @@
 	parse_target_fd_opt(argc, argv);
 	set_serial_nonblock(0);
 	putchar('\n');
+	fflush(stdout);
 
-	while (fgets(inbuf, sizeof inbuf, stdin)) {
+	for (; fgets(inbuf, sizeof inbuf, stdin); fflush(stdout)) {
 		cp = index(inbuf, '\n');
 		if (!cp) {
 			printf("back end error: missing newline on input\n");