diff options
| author | Paul Saab <ps@FreeBSD.org> | 2000-07-11 01:31:39 +0000 |
|---|---|---|
| committer | Paul Saab <ps@FreeBSD.org> | 2000-07-11 01:31:39 +0000 |
| commit | 11128de9739990e6d4b199d3b09e958aa68ba4c7 (patch) | |
| tree | 2fb0cd759a337bc5cd219838f598048f104998d5 /usr.bin/talk | |
| parent | 18b8dc18fd628079a13be46093089edc06595679 (diff) | |
Notes
Diffstat (limited to 'usr.bin/talk')
| -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 f7a4dd1429ac7..40604e0105efc 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); } } |
