diff calypso/main.c @ 12:2260fbd28b2a

fcsim-calypso-be: flush stdout
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 14 Mar 2021 07:17:26 +0000
parents f6b03af63bf7
children
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");