summaryrefslogtreecommitdiffstats
path: root/lib/libcurses/setterm.c
diff options
context:
space:
mode:
authorsef <sef@FreeBSD.org>1994-08-13 23:15:38 +0000
committersef <sef@FreeBSD.org>1994-08-13 23:15:38 +0000
commit75d40fe0bd2b890ceffb238a53e26b30cee120de (patch)
treebbb514854ed4891d87f8d7be9bbcca0b27533595 /lib/libcurses/setterm.c
parent5769d4da59542affce5fd4e48c98355e45206254 (diff)
downloadFreeBSD-src-75d40fe0bd2b890ceffb238a53e26b30cee120de.zip
FreeBSD-src-75d40fe0bd2b890ceffb238a53e26b30cee120de.tar.gz
Brought the 2.0 libcurses up-to-date with the current 4.4 stuff, as
distributed in keith bostic's nvi (got his permission first). Most changes are cosmetic, but a few errors (mostly in tty..c) were cleared up. Reviewed by: Sean Eric Fagan
Diffstat (limited to 'lib/libcurses/setterm.c')
-rw-r--r--lib/libcurses/setterm.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/libcurses/setterm.c b/lib/libcurses/setterm.c
index f611ac7..1d13490 100644
--- a/lib/libcurses/setterm.c
+++ b/lib/libcurses/setterm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1981, 1993
+ * Copyright (c) 1981, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -32,16 +32,18 @@
*/
#ifndef lint
-static char sccsid[] = "@(#)setterm.c 8.3 (Berkeley) 1/2/94";
+static char sccsid[] = "@(#)setterm.c 8.7 (Berkeley) 7/27/94";
#endif /* not lint */
-#include <sys/ioctl.h>
+#include <sys/ioctl.h> /* TIOCGWINSZ on old systems. */
-#include <curses.h>
#include <stdlib.h>
#include <string.h>
+#include <termios.h>
#include <unistd.h>
+#include "curses.h"
+
static void zap __P((void));
static char *sflags[] = {
@@ -152,8 +154,11 @@ setterm(type)
aoftspace = tspace;
ttytype = longname(genbuf, __ttytype);
- if ((!AL && !al) || (!DL && !dl))
- __noqch = 1;
+ /* If no scrolling commands, no quick change. */
+ __noqch =
+ (CS == NULL || HO == NULL ||
+ SF == NULL && sf == NULL || SR == NULL && sr == NULL) &&
+ (AL == NULL && al == NULL || DL == NULL && dl == NULL);
return (unknown ? ERR : OK);
}
OpenPOWER on IntegriCloud