Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/top/dist Allow interactive displays if the term...
details: https://anonhg.NetBSD.org/src/rev/7ed841ed6c28
branches: trunk
changeset: 790280:7ed841ed6c28
user: roy <roy%NetBSD.org@localhost>
date: Tue Oct 01 11:39:37 2013 +0000
description:
Allow interactive displays if the termcap entry does not have the `li'
setting but we can calculate the lines from ioctl.
diffstat:
external/bsd/top/dist/screen.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 6406cf93be4f -r 7ed841ed6c28 external/bsd/top/dist/screen.c
--- a/external/bsd/top/dist/screen.c Tue Oct 01 11:24:49 2013 +0000
+++ b/external/bsd/top/dist/screen.c Tue Oct 01 11:39:37 2013 +0000
@@ -273,8 +273,7 @@
/* set up common terminal capabilities */
if ((screen_length = tgetnum("li")) <= 0)
{
- screen_length = smart_terminal = 0;
- return No;
+ screen_length = 0;
}
/* screen_width is a little different */
@@ -329,6 +328,13 @@
sets lower_left. */
screen_getsize();
+ /* If screen_length is 0 from both termcap and ioctl then we are dumb */
+ if (screen_length == 0)
+ {
+ smart_terminal = No;
+ return No;
+ }
+
/* if stdout is not a terminal, pretend we are a dumb terminal */
#ifdef USE_SGTTY
if (ioctl(STDOUT, TIOCGETP, &old_settings) == -1)
Home |
Main Index |
Thread Index |
Old Index