* If standard output is not a terminal, no '\r' is written at the end of

printed lines anymore.
This commit is contained in:
Gunnar Ritter
2005-02-17 15:16:43 +00:00
parent 9fd9a3d91e
commit 124bd15ee6
3 changed files with 14 additions and 8 deletions

View File

@@ -73,7 +73,7 @@
#ifndef lint
#ifdef DOSCCS
static char sccsid[] = "@(#)ex_tty.c 1.28 (gritter) 2/17/05";
static char sccsid[] = "@(#)ex_tty.c 1.29 (gritter) 2/17/05";
#endif
#endif
@@ -96,8 +96,10 @@ gettmode(void)
{
speed_t pospeed;
if (tcgetattr(1, &tty) < 0)
if (tcgetattr(1, &tty) < 0) {
ospeed = B0;
return;
}
pospeed = cfgetospeed(&tty);
if (ospeed != pospeed)
value(SLOWOPEN) = pospeed < B1200;