NetBSD Problem Report #55496
From www@netbsd.org Sat Jul 18 20:04:44 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 D6EC61A9241
for <gnats-bugs@gnats.NetBSD.org>; Sat, 18 Jul 2020 20:04:43 +0000 (UTC)
Message-Id: <20200718200442.D9B9E1A9242@mollari.NetBSD.org>
Date: Sat, 18 Jul 2020 20:04:43 +0000 (UTC)
From: jnaman806@gmail.com
Reply-To: jnaman806@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [libcurses] bkgrnd() doesn't works as expected
X-Send-Pr-Version: www-1.0
>Number: 55496
>Category: lib
>Synopsis: [libcurses] bkgrnd() doesn't works as expected
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: blymn
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 18 20:05:00 +0000 2020
>Closed-Date: Mon Apr 25 21:38:49 +0000 2022
>Last-Modified: Mon Apr 25 21:38:49 +0000 2022
>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:
bkgrnd() does not work as expected.
Expected:
bkgrnd(wch) followed by refresh() should update the rendition for all the characters.
Observed:
It does not update the screen, instead just updates the value of background character.
See bkgd() for more details, which is expected to behave similarly. bkgd() works correctly.
>How-To-Repeat:
A simple program like:
#include <curses.h>
#include <wchar.h>
int main() {
initscr();
cchar_t ch;
wchar_t wstr[] = {0x61, L'\0'};
setcchar(&ch, wstr, 0x100, 0, NULL);
//bkgd(0x61);
bkgrnd(&ch);
refresh();
getch();
endwin();
return 0;
}
>Fix:
wbkgrnd() needs to update window similar(though not exactly) to what is done in wbkgd() https://github.com/NetBSD/src/blob/599004e121bc2a54553b4fd7eb35303ba09956b1/lib/libcurses/background.c#L102
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: lib-bug-people->blymn
Responsible-Changed-By: blymn@NetBSD.org
Responsible-Changed-When: Thu, 16 Dec 2021 06:37:30 +0000
Responsible-Changed-Why:
I will claim this one.
From: "Brett Lymn" <blymn@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/55496 CVS commit: src/lib/libcurses
Date: Tue, 19 Apr 2022 22:26:57 +0000
Module Name: src
Committed By: blymn
Date: Tue Apr 19 22:26:57 UTC 2022
Modified Files:
src/lib/libcurses: background.c curses.c curses_private.h refresh.c
Log Message:
fix for PR 55496
* Fix bkgrndset so that it actually sets the background character in
in line with the SUSv2 specification.
* Add an internal function to copy a complex character
* Make the previously static celleq function into a libcurses private
function so that it can be called in other files.
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/lib/libcurses/background.c
cvs rdiff -u -r1.28 -r1.29 src/lib/libcurses/curses.c
cvs rdiff -u -r1.78 -r1.79 src/lib/libcurses/curses_private.h
cvs rdiff -u -r1.121 -r1.122 src/lib/libcurses/refresh.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Naman Jain <jnaman806@gmail.com>
To: gnats-bugs@netbsd.org
Cc: blymn@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: PR/55496 CVS commit: src/lib/libcurses
Date: Wed, 20 Apr 2022 19:47:19 +0530
--000000000000684e7405dd16a737
Content-Type: text/plain; charset="UTF-8"
It gives me a sense of accomplishment to see a bug filed by me getting
fixed eventually. Someone is keeping track of them.
Thanks, Brett.
Regards,
Naman Jain
On Wed, 20 Apr 2022 at 04:00, Brett Lymn <blymn@netbsd.org> wrote:
> The following reply was made to PR lib/55496; it has been noted by GNATS.
>
> From: "Brett Lymn" <blymn@netbsd.org>
> To: gnats-bugs@gnats.NetBSD.org
> Cc:
> Subject: PR/55496 CVS commit: src/lib/libcurses
> Date: Tue, 19 Apr 2022 22:26:57 +0000
>
> Module Name: src
> Committed By: blymn
> Date: Tue Apr 19 22:26:57 UTC 2022
>
> Modified Files:
> src/lib/libcurses: background.c curses.c curses_private.h refresh.c
>
> Log Message:
> fix for PR 55496
>
> * Fix bkgrndset so that it actually sets the background character in
> in line with the SUSv2 specification.
>
> * Add an internal function to copy a complex character
>
> * Make the previously static celleq function into a libcurses private
> function so that it can be called in other files.
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.29 -r1.30 src/lib/libcurses/background.c
> cvs rdiff -u -r1.28 -r1.29 src/lib/libcurses/curses.c
> cvs rdiff -u -r1.78 -r1.79 src/lib/libcurses/curses_private.h
> cvs rdiff -u -r1.121 -r1.122 src/lib/libcurses/refresh.c
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>
>
--000000000000684e7405dd16a737
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>It gives me a sense of accomplishment to=C2=A0see a b=
ug filed by me getting fixed eventually. Someone is keeping track of them.<=
/div><div><br></div><div>Thanks, Brett.</div><div><br></div><div>Regards,</=
div><div>Naman Jain</div></div><br><div class=3D"gmail_quote"><div dir=3D"l=
tr" class=3D"gmail_attr">On Wed, 20 Apr 2022 at 04:00, Brett Lymn <<a hr=
ef=3D"mailto:blymn@netbsd.org">blymn@netbsd.org</a>> wrote:<br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-lef=
t:1px solid rgb(204,204,204);padding-left:1ex">The following reply was made=
to PR lib/55496; it has been noted by GNATS.<br>
<br>
From: "Brett Lymn" <<a href=3D"mailto:blymn@netbsd.org" target=
=3D"_blank">blymn@netbsd.org</a>><br>
To: <a href=3D"mailto:gnats-bugs@gnats.NetBSD.org" target=3D"_blank">gnats-=
bugs@gnats.NetBSD.org</a><br>
Cc: <br>
Subject: PR/55496 CVS commit: src/lib/libcurses<br>
Date: Tue, 19 Apr 2022 22:26:57 +0000<br>
<br>
=C2=A0Module Name:=C2=A0 =C2=A0src<br>
=C2=A0Committed By:=C2=A0 blymn<br>
=C2=A0Date:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Tue Apr 19 22:26:57 UTC 2022<=
br>
<br>
=C2=A0Modified Files:<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 src/lib/libcurses: background.c curses.c curses=
_private.h refresh.c<br>
<br>
=C2=A0Log Message:<br>
=C2=A0fix for PR 55496<br>
<br>
=C2=A0 * Fix bkgrndset so that it actually sets the background character in=
<br>
=C2=A0 =C2=A0 in line with the SUSv2 specification.<br>
<br>
=C2=A0 * Add an internal function to copy a complex character<br>
<br>
=C2=A0 * Make the previously static celleq function into a libcurses privat=
e<br>
=C2=A0 =C2=A0 function so that it can be called in other files.<br>
<br>
<br>
=C2=A0To generate a diff of this commit:<br>
=C2=A0cvs rdiff -u -r1.29 -r1.30 src/lib/libcurses/background.c<br>
=C2=A0cvs rdiff -u -r1.28 -r1.29 src/lib/libcurses/curses.c<br>
=C2=A0cvs rdiff -u -r1.78 -r1.79 src/lib/libcurses/curses_private.h<br>
=C2=A0cvs rdiff -u -r1.121 -r1.122 src/lib/libcurses/refresh.c<br>
<br>
=C2=A0Please note that diffs are not public domain; they are subject to the=
<br>
=C2=A0copyright notices on the relevant files.<br>
<br>
</blockquote></div>
--000000000000684e7405dd16a737--
State-Changed-From-To: open->closed
State-Changed-By: blymn@NetBSD.org
State-Changed-When: Mon, 25 Apr 2022 21:38:49 +0000
State-Changed-Why:
Bug is fixed.
>Unformatted:
(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.