Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/tset If there is no "set column" capability, don't t...



details:   https://anonhg.NetBSD.org/src/rev/fdaa3b1fd093
branches:  trunk
changeset: 487409:fdaa3b1fd093
user:      simonb <simonb%NetBSD.org@localhost>
date:      Wed Jun 07 13:21:43 2000 +0000

description:
If there is no "set column" capability, don't try to use the "cursor
set" capability - just use the last-resort of using spaces.  Fixes the
``problem'' where "tset -Q" would move the cursor to the 24th line of an
xterm irrespective of where the cursor was before tset was run.

diffstat:

 usr.bin/tset/set.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r 853e711d5060 -r fdaa3b1fd093 usr.bin/tset/set.c
--- a/usr.bin/tset/set.c        Wed Jun 07 13:18:36 2000 +0000
+++ b/usr.bin/tset/set.c        Wed Jun 07 13:21:43 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: set.c,v 1.7 1997/10/14 02:07:59 lukem Exp $    */
+/*     $NetBSD: set.c,v 1.8 2000/06/07 13:21:43 simonb Exp $   */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)set.c      8.2 (Berkeley) 2/28/94";
 #endif
-__RCSID("$NetBSD: set.c,v 1.7 1997/10/14 02:07:59 lukem Exp $");
+__RCSID("$NetBSD: set.c,v 1.8 2000/06/07 13:21:43 simonb Exp $");
 #endif /* not lint */
 
 #include <stdio.h>
@@ -290,7 +290,7 @@
 {
        int c;
        char *capsp, *clear_tabs;
-       char *set_column, *set_pos, *set_tab, *tg_out;
+       char *set_column, *set_tab, *tg_out;
        char caps[1024];
 
        capsp = caps;
@@ -302,7 +302,6 @@
        }
 
        set_column = tgetstr("ch", &capsp);
-       set_pos = set_column ? NULL : tgetstr("cm", &capsp);
 
        if (set_tab) {
                for (c = 8; c < columns; c += 8) {
@@ -313,8 +312,6 @@
                        tg_out = "OOPS";
                        if (set_column)
                                tg_out = tgoto(set_column, 0, c);
-                       if (*tg_out == 'O' && set_pos)
-                               tg_out = tgoto(set_pos, c, lines - 1);
                        if (*tg_out != 'O')
                                tputs(tg_out, 1, outc);
                        else



Home | Main Index | Thread Index | Old Index