Add missing ospeed initialization.

This commit is contained in:
Andrey A. Chernov 1995-08-04 08:05:18 +00:00
parent 083cb36a3f
commit 95729168e4
2 changed files with 15 additions and 3 deletions

View File

@ -29,6 +29,10 @@
# endif
#endif /* CURSES */
#if defined(CURSES) && defined(SGTTYB)
# include <sgtty.h>
#endif
#include "util.h"
#include "cmds.h"
#include "main.h"
@ -1104,6 +1108,10 @@ int termcap_get(char **dest, char *attr)
void termcap_init(void)
{
char *term;
#ifdef SGTTYB
struct sgttyb ttyb;
extern short ospeed;
#endif
if ((term = getenv("TERM")) == NULL) {
term = "dumb"; /* TAR */
@ -1123,6 +1131,10 @@ void termcap_init(void)
tcl_bold = strlen(tcap_boldface);
tcl_uline = strlen(tcap_underline);
tcl_rev = strlen(tcap_reverse);
#ifdef SGTTYB
if (ioctl(fileno(stdout), TIOCGETP, &ttyb) == 0)
ospeed = ttyb.sg_ospeed;
#endif
}
} /* termcap_init */

View File

@ -446,10 +446,10 @@ extern int errno;
# ifndef SYSDIRH
# define SYSDIRH 1
# endif
# ifndef SGTTYB
# define SGTTYB
# endif
# endif
# ifndef SGTTYB
# define SGTTYB
# endif
#endif
/*