NetBSD Problem Report #55434

From www@netbsd.org  Tue Jun 30 10:18:56 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3432E1A9217
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 30 Jun 2020 10:18:56 +0000 (UTC)
Message-Id: <20200630101855.200DD1A9218@mollari.NetBSD.org>
Date: Tue, 30 Jun 2020 10:18:55 +0000 (UTC)
From: jnaman806@gmail.com
Reply-To: jnaman806@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Bug in hline() in libcurses
X-Send-Pr-Version: www-1.0

>Number:         55434
>Category:       lib
>Synopsis:       Bug in hline() in libcurses
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 30 10:20:00 +0000 2020
>Last-Modified:  Tue Jun 30 21:15:01 +0000 2020
>Originator:     Naman Jain
>Release:        NetBSD 9.0
>Organization:
IIT Kanpur
>Environment:
NetBSD localhost 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
hline() do not advance the cursor position. But with the following commands,i.e. when the line moves past the right-hand side of stdscr, the cursor moves to the next line.

>How-To-Repeat:
In tests/libcurses, the following test

include start
call OK mvhline 3 75 `\000A` 10
call OK refresh

gives [cup4;76XAAAAAcup5;76X] as the output. (COLS = 80 for testframe psuedo-terminal)

Equivalent C program,

#include <curses.h>
int main() {
    initscr();
    mvhline(3,COLS-5,'A', 10);
    refresh();
    getch();
    endwin();
    return 0;
}




>Fix:

>Audit-Trail:
From: "Valeriy E. Ushakov" <uwe@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55434 CVS commit: src/lib/libcurses
Date: Tue, 30 Jun 2020 21:02:24 +0000

 Module Name:	src
 Committed By:	uwe
 Date:		Tue Jun 30 21:02:24 UTC 2020

 Modified Files:
 	src/lib/libcurses: line.c

 Log Message:
 whline_set - save/restore the y coordinate too.
 Reaching the right side of the screen can cause a line wrap.
 PR lib/55434


 To generate a diff of this commit:
 cvs rdiff -u -r1.11 -r1.12 src/lib/libcurses/line.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Valeriy E. Ushakov" <uwe@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/55434 CVS commit: src/lib/libcurses
Date: Tue, 30 Jun 2020 21:10:13 +0000

 Module Name:	src
 Committed By:	uwe
 Date:		Tue Jun 30 21:10:13 UTC 2020

 Modified Files:
 	src/lib/libcurses: line.c

 Log Message:
 whline - save/restore the y coordinate too.
 Reaching the right side of the screen can cause a line wrap.
 Forgot to apply the fix to the !HAVE_WCHAR case.
 PR lib/55434


 To generate a diff of this commit:
 cvs rdiff -u -r1.12 -r1.13 src/lib/libcurses/line.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.