Bug#245982: marked as done (cdebconf: newt frontend incorectly truncates long lines)
Your message dated Sat, 29 May 2004 18:18:53 -0300
with message-id <20040529211853.GA17354@kitenet.net>
and subject line closing fixed bugs
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 26 Apr 2004 15:55:21 +0000
>From eugen@univ.kiev.ua Mon Apr 26 08:55:21 2004
Return-path: <eugen@univ.kiev.ua>
Received: from boy.univ.kiev.ua (mail.univ.kiev.ua) [193.125.78.122]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1BI8S1-0005eY-00; Mon, 26 Apr 2004 08:55:21 -0700
Received: from intel4.icc.univ.kiev.ua (intel4.icc.univ.kiev.ua [10.25.0.243])
by mail.univ.kiev.ua (8.12.2/8.12.2) with ESMTP id i3QFtGCl091644;
Mon, 26 Apr 2004 18:55:16 +0300 (EEST)
Received: from eugen by intel4.icc.univ.kiev.ua with local (Exim 4.32)
id 1BI8Rv-0007jY-Vf; Mon, 26 Apr 2004 18:55:15 +0300
Content-Type: multipart/mixed; boundary="===============0462120984=="
MIME-Version: 1.0
From: Eugeniy Meshcheryakov <eugen@univ.kiev.ua>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: cdebconf: newt frontend incorectly truncates long lines
X-Mailer: reportbug 2.58
Date: Mon, 26 Apr 2004 18:55:15 +0300
Message-Id: <E1BI8Rv-0007jY-Vf@intel4.icc.univ.kiev.ua>
Sender: Eugeniy Meshcheryakov <eugen@univ.kiev.ua>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-7.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level:
X-CrossAssassin-Score: 1
This is a multi-part MIME message sent by reportbug.
--===============0462120984==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Package: cdebconf
Version: svn, 26.04.2004
Severity: normal
Tags: patch d-i
Newt frontend incorectly truncates long lines in select and
multiselect elements. You can see this in languagechooser menu, just
look at Russian entry. Attached patch fixes this bug.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.26
Locale: LANG=uk_UA, LC_CTYPE=uk_UA
--===============0462120984==
Content-Type: text/x-c; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cdebconf-longlines.diff"
Index: cdebconf/src/modules/frontend/newt/newt.c
===================================================================
--- cdebconf/src/modules/frontend/newt/newt.c (revision 14415)
+++ cdebconf/src/modules/frontend/newt/newt.c (working copy)
@@ -457,7 +457,7 @@
int t_width_title, t_width_buttons;
char **choices, **choices_trans, **defvals, *answer;
int count = 0, defcount, i, k, ret, def;
- const char *p;
+ char *p;
size_t res;
wchar_t c;
int *tindex = NULL;
@@ -508,9 +508,12 @@
sel_width = win_width-8;
for (i = 0; i < count; i++) {
if (strwidth(choices_trans[i]) > sel_width) {
- for (res = 0, p = choices_trans[i]; (k = mbtowc (&c, p, MB_LEN_MAX)) > 0 && res < sel_width; p += k)
- res += wcwidth (c);
- choices_trans[i][res] = 0;
+ for (res = 0, p = choices_trans[i]; (k = mbtowc (&c, p, MB_LEN_MAX)) > 0; p += k) {
+ res += wcwidth (c);
+ if (res > sel_width)
+ break;
+ }
+ *p = 0;
}
}
}
@@ -610,7 +613,7 @@
int *tindex = NULL;
const char *indices = q_get_indices(q);
char *full_description = get_full_description(q);
- const char *p;
+ char *p;
size_t res;
int k;
wchar_t c;
@@ -656,9 +659,12 @@
sel_width = win_width-8;
for (i = 0; i < count; i++) {
if (strwidth(choices_trans[i]) > sel_width) {
- for (res = 0, p = choices_trans[i]; (k = mbtowc (&c, p, MB_LEN_MAX)) > 0 && res < sel_width; p += k)
- res += wcwidth (c);
- choices_trans[i][res] = 0;
+ for (res = 0, p = choices_trans[i]; (k = mbtowc (&c, p, MB_LEN_MAX)) > 0; p += k) {
+ res += wcwidth (c);
+ if (res > sel_width)
+ break;
+ }
+ *p = 0;
}
}
}
--===============0462120984==--
---------------------------------------
Received: (at 245982-done) by bugs.debian.org; 29 May 2004 21:19:49 +0000
>From joey@kitenet.net Sat May 29 14:19:49 2004
Return-path: <joey@kitenet.net>
Received: from kitenet.net [64.62.161.42] (postfix)
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1BUBF7-0000pB-00; Sat, 29 May 2004 14:19:49 -0700
Received: from dragon.kitenet.net (ip46035.poa.virtua.com.br [200.213.46.35])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "Joey Hess", Issuer "Joey Hess" (verified OK))
by kitenet.net (Postfix) with ESMTP
id 1B7E517ED0; Sat, 29 May 2004 21:19:49 +0000 (GMT)
Received: by dragon.kitenet.net (Postfix, from userid 1000)
id 090B66E0C2; Sat, 29 May 2004 18:18:53 -0300 (BRT)
Date: Sat, 29 May 2004 18:18:53 -0300
From: Joey Hess <joeyh@debian.org>
To: 237291-done@bugs.debian.org, 237419-done@bugs.debian.org,
238353-done@bugs.debian.org, 239997-done@bugs.debian.org,
249344-done@bugs.debian.org, 248676-done@bugs.debian.org,
249786-done@bugs.debian.org, 219632-done@bugs.debian.org,
245224-done@bugs.debian.org, 245982-done@bugs.debian.org
Subject: closing fixed bugs
Message-ID: <20040529211853.GA17354@kitenet.net>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1"
Content-Disposition: inline
User-Agent: Mutt/1.5.6i
Delivered-To: 245982-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no
version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level:
X-CrossAssassin-Score: 7
--RnlQjJ0d97Da+TV1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Closing d-i bugs that were marked fixed. If the bug you reported is
still a problem, please write back.
--=20
see shy jo
--RnlQjJ0d97Da+TV1
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAuP49d8HHehbQuO8RAsl9AKCTGCrAKtnxh9Ki8OviyqIcan1UoQCffB6b
j5zy+0V8TUMDq2DM6ZNBLkc=
=IWET
-----END PGP SIGNATURE-----
--RnlQjJ0d97Da+TV1--
Reply to: