summaryrefslogtreecommitdiffstats
path: root/usr.bin/ncftp/main.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-08-04 08:05:18 +0000
committerache <ache@FreeBSD.org>1995-08-04 08:05:18 +0000
commit2e718b4cda54fcd730fbd6065ecc66b8494eeab2 (patch)
tree6897bfca475cf2fdb1cbe1f858a1c4eb31b1109c /usr.bin/ncftp/main.c
parent7c489bde4376762aba4b947a3ae6b6c9b8075645 (diff)
downloadFreeBSD-src-2e718b4cda54fcd730fbd6065ecc66b8494eeab2.zip
FreeBSD-src-2e718b4cda54fcd730fbd6065ecc66b8494eeab2.tar.gz
Add missing ospeed initialization.
Diffstat (limited to 'usr.bin/ncftp/main.c')
-rw-r--r--usr.bin/ncftp/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/usr.bin/ncftp/main.c b/usr.bin/ncftp/main.c
index b0a11c4..80b5015 100644
--- a/usr.bin/ncftp/main.c
+++ b/usr.bin/ncftp/main.c
@@ -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 */
OpenPOWER on IntegriCloud