diff options
| author | Paul Saab <ps@FreeBSD.org> | 2000-07-11 01:37:17 +0000 |
|---|---|---|
| committer | Paul Saab <ps@FreeBSD.org> | 2000-07-11 01:37:17 +0000 |
| commit | 5d0e6f26abc696cf9036559a4c002f6fa8d65f25 (patch) | |
| tree | 81fde5ab91aa9f5233e0c111f754ff52bf4105e8 /usr.bin | |
| parent | 06bc5adf33fdadcbc64207296776baf106ce4f10 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/talk/io.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/talk/io.c b/usr.bin/talk/io.c index f7a4dd1429ac..40604e0105ef 100644 --- a/usr.bin/talk/io.c +++ b/usr.bin/talk/io.c @@ -103,10 +103,14 @@ talk() * We can't make the tty non_blocking, because * curses's output routines would screw up */ + int i; ioctl(0, FIONREAD, (struct sgttyb *) &nb); nb = read(0, buf, nb); display(&my_win, buf, nb); /* might lose data here because sockt is non-blocking */ + for (i = 0; i < nb; ++i) + if (buf[i] == '\r') + buf[i] = '\n'; write(sockt, buf, nb); } } |
