NetBSD Problem Report #636
From gnats Sun Dec 11 12:00:36 1994
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id MAA00214 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 11 Dec 1994 12:00:36 -0800
Message-Id: <199412110723.SAA14881@zen.void.oz.au>
Date: Sun, 11 Dec 1994 18:23:21 +1100
From: sjg@zen.void.oz.au
Reply-To: sjg@zen.void.oz.au
To: gnats-bugs@NetBSD.ORG
Subject: tput args
X-Send-Pr-Version: 3.2
>Number: 636
>Category: bin
>Synopsis: tput cm args should be reversed for compatability with other *NIX
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Dec 11 12:05:04 +0000 1994
>Closed-Date: Tue Dec 13 00:20:15 +0000 1994
>Last-Modified:
>Originator: Simon J. Gerraty
>Release: 1.0
>Organization:
Simon J. Gerraty <sjg@zen.void.oz.au>
#include <disclaimer> /* imagine something _very_ witty here */
>Environment:
System: NetBSD zen.void.oz.au 1.0 NetBSD 1.0 (ZEN) #5: Thu Dec 1 09:06:16 EST 1994 root@zen.void.oz.au:/e0/usr.src/sys/arch/i386/compile/ZEN i386
>Description:
tput reversing the order of row/col args to tput cm makes it
more compatable with SunOS,HP-UX,Solaris etc.
>How-To-Repeat:
I have a shell based menu system that runs on
SunOS,Solaris,HP-UX and many other UNIX systems, NetBSD's tput
has its row/col args for cursor positioning transposed as
compared to the other systems.
A simple fix (below) to tput makes more compatable with other *NIX.
>Fix:
Apply the following patch.
*** usr.bin/tput/tput.c~ Sat Mar 19 21:01:58 1994
--- usr.bin/tput/tput.c Sun Dec 11 18:06:01 1994
***************
*** 237,250 ****
(void)fprintf(stderr, errfew, 2, cap);
return NULL;
}
! arg_cols = atoi(*argv);
argv++;
if (!*argv || *argv[0] == '\0') {
(void)fprintf(stderr, errfew, 2, cap);
return NULL;
}
! arg_rows = atoi(*argv);
(void) tputs(tgoto(str, arg_cols, arg_rows), arg_rows, outc);
break;
--- 237,250 ----
(void)fprintf(stderr, errfew, 2, cap);
return NULL;
}
! arg_rows = atoi(*argv);
argv++;
if (!*argv || *argv[0] == '\0') {
(void)fprintf(stderr, errfew, 2, cap);
return NULL;
}
! arg_cols = atoi(*argv);
(void) tputs(tgoto(str, arg_cols, arg_rows), arg_rows, outc);
break;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: jtc
State-Changed-When: Tue Dec 13 00:20:15 1994
State-Changed-Why:
tput didn't even match it's own documentation.
applied equiv. patch --- code had changed slightly since 44lite merge.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.