FreeCalypso > hg > freecalypso-sw
diff rvinterf/etm/ttymagic.c @ 183:85222710dc92
rvinterf/etm: implemented everything except the packet sending command
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 24 Nov 2013 08:03:27 +0000 |
parents | 13a0348ffce4 |
children |
line wrap: on
line diff
--- a/rvinterf/etm/ttymagic.c Sun Nov 24 06:59:09 2013 +0000 +++ b/rvinterf/etm/ttymagic.c Sun Nov 24 08:03:27 2013 +0000 @@ -87,3 +87,26 @@ } } } + +void +async_msg_output(msg) + char *msg; +{ + int msglen, i; + + msglen = strlen(msg); + if (ttyhacks) + putchar('\r'); + fputs(msg, stdout); + if (ttyhacks) + for (i = msglen; i < usercmd_len + 1; i++) + putchar(' '); + putchar('\n'); + if (!ttyhacks) + return; + /* reprint the input line */ + putchar('>'); + if (!usercmd_len) + return; + fwrite(usercmd, 1, usercmd_len, stdout); +}