FreeCalypso > hg > fc-sim-tools
changeset 7:b25d4dfe5798
fcsim-calypso-be actually works now
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 14 Mar 2021 05:33:51 +0000 |
parents | 0a21a7ffe144 |
children | 34bbb0585cab |
files | calypso/tpinterf.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/calypso/tpinterf.c Sun Mar 14 05:26:58 2021 +0000 +++ b/calypso/tpinterf.c Sun Mar 14 05:33:51 2021 +0000 @@ -136,10 +136,10 @@ char buf[1024], *cp; fd_set fds; struct timeval tv; - int cc, newline = 1, termflag = 0; + int cc, newline = 1, termflag = 0, finish = 0; unsigned goodchar; - for (goodchar = 0; ; ) { + for (goodchar = 0; !finish; ) { FD_ZERO(&fds); FD_SET(target_fd, &fds); tv.tv_sec = timeout; @@ -164,8 +164,10 @@ } for (cp = buf + goodchar; cc; cp++) { cc--; - if (*cp == '=' && newline && !cc) + if (*cp == '=' && newline && !cc) { + finish = 1; break; + } if (*cp == '\n') { newline = 1; termflag = 1;