Debian Bug report logs - #415596
"dialog --gauge" cannot display new prompt beginning with a number

version graph

Package: dialog; Maintainer for dialog is Santiago Vila <sanvila@debian.org>; Source for dialog is src:dialog.

Reported by: kissg@ssg.ki.iif.hu

Date: Tue, 20 Mar 2007 16:42:08 UTC

Severity: normal

Found in version dialog/1.0-20050306-1

Fixed in version dialog/1.1-20070325-1

Done: Santiago Vila <sanvila@debian.org>

Bug is archived. No further changes may be made.

Forwarded to Thomas Dickey <dickey@his.com>

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Santiago Vila <sanvila@debian.org>:
Bug#415596; Package dialog. Full text and rfc822 format available.

Acknowledgement sent to kissg@ssg.ki.iif.hu:
New Bug report received and forwarded. Copy sent to Santiago Vila <sanvila@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Gabor Kiss <kissg@bakacsin.ki.iif.hu>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: "dialog --gauge" cannot display new prompt beginning with a number
Date: Tue, 20 Mar 2007 17:21:37 +0100
Package: dialog
Version: 1.0-20050306-1
Severity: normal

Manual writes:
	If the standard input reads the string "XXX", then
	subsequent lines up to another "XXX" are used
	for a new prompt.

Meanwile source file guage.c (sic! :-) contains this:
        if (isMarker(buf)) {
            /*
             * Historically, next line should be percentage, but one of the
             * worse-written clones of 'dialog' assumes the number is missing.
             * (Gresham's Law applied to software).
             */
            status = read_data(buf, dialog_state.pipe_input);
            if_FINISH(status, break);
            if_RESIZE(status, goto retry);

            prompt_buf[0] = '\0';
            if (decode_percent(buf))		<<--- WHY ??? :-(
                percent = atoi(buf);
            else
                strcpy(prompt_buf, buf);
....

So I cannot send a new prompt line "13200 files remaining" or so
because code interprets 13200 as percentage and messes up the
screen even if it is between "XXX" lines.

Version 1.0-20060221 also suffers from this problem.

Gabor

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.19
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages dialog depends on:
ii  debianutils           2.8.4              Miscellaneous utilities specific t
ii  libc6                 2.3.2.ds1-22sarge5 GNU C Library: Shared libraries an
ii  libncursesw5          5.4-4              Shared libraries for terminal hand

-- no debconf information



Reply sent to Santiago Vila <sanvila@unex.es>:
You have marked Bug as forwarded. Full text and rfc822 format available.

Message #8 received at 415596-forwarded@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@unex.es>
To: Thomas Dickey <dickey@his.com>
Cc: 415596-forwarded@bugs.debian.org, Gabor Kiss <kissg@bakacsin.ki.iif.hu>
Subject: Bug#415596: "dialog --gauge" cannot display new prompt beginning with a number (fwd)
Date: Sun, 25 Mar 2007 14:04:22 +0200 (CEST)
Hi. Received this from the debian BTS:

---------- Forwarded message ----------
From: Gabor Kiss <kissg@bakacsin.ki.iif.hu>
Reply-To: kissg@ssg.ki.iif.hu, 415596@bugs.debian.org
To: Debian Bug Tracking System <submit@bugs.debian.org>
Date: Tue, 20 Mar 2007 17:21:37 +0100
Subject: Bug#415596: "dialog --gauge" cannot display new prompt beginning with a number

Package: dialog
Version: 1.0-20050306-1
Severity: normal

Manual writes:
	If the standard input reads the string "XXX", then
	subsequent lines up to another "XXX" are used
	for a new prompt.

Meanwile source file guage.c (sic! :-) contains this:
        if (isMarker(buf)) {
            /*
             * Historically, next line should be percentage, but one of the
             * worse-written clones of 'dialog' assumes the number is missing.
             * (Gresham's Law applied to software).
             */
            status = read_data(buf, dialog_state.pipe_input);
            if_FINISH(status, break);
            if_RESIZE(status, goto retry);

            prompt_buf[0] = '\0';
            if (decode_percent(buf))		<<--- WHY ??? :-(
                percent = atoi(buf);
            else
                strcpy(prompt_buf, buf);
....

So I cannot send a new prompt line "13200 files remaining" or so
because code interprets 13200 as percentage and messes up the
screen even if it is between "XXX" lines.

Version 1.0-20060221 also suffers from this problem.

Gabor

[...]



Information forwarded to debian-bugs-dist@lists.debian.org, Santiago Vila <sanvila@debian.org>:
Bug#415596; Package dialog. Full text and rfc822 format available.

Acknowledgement sent to dickey@his.com:
Extra info received and forwarded to list. Copy sent to Santiago Vila <sanvila@debian.org>. Full text and rfc822 format available.

Message #13 received at 415596@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: 415596@bugs.debian.org
Subject: re: #415596 "dialog --gauge" cannot display new prompt beginning with a number
Date: Sun, 25 Mar 2007 17:27:38 -0400
[Message part 1 (text/plain, inline)]
This quirk dates back before I started working on dialog in 1999.

The gauge widget appeared in dialog 0.6 in 1995 (which in turn
was reported based on dialog 0.5 from 1994).  I don't believe I have
a copy of the 0.5 series.

Some investigation shows that the quirk was first mentioned in 1997
by John Gatewood Ham for dialog 0.6z, and the manpage noted:

	.IP "\fB\-\-guage \fItext height width percent\fR" 
	.RB "A " guage " box displays a meter along the bottom of the box. 
	The meter indicates the percentage.  New percentages are read from 
	standard input, one integer per line.  The meter is updated 
	to reflect each new percentage.  If stdin is XXX, then the first 
	line following is taken as an integer percentage, then subsequent 
	lines up to another XXX are used for a new prompt. 
	The guage exits when EOF is reached on stdin.

However, the code for dialog 0.6c (1995/8/11) has the same quirk.
Ditto dialog 0.6 from Redhat (1995/1/15).

The manpage chunk for Debian's 1999 version did not incorporate that
remark about the "first line following":

	.IP "\fB\-\-guage \fItext height width percent\fR"
	.RB "A " guage " box displays a meter along the bottom of the box.
	The meter indicates the percentage.  New percentages are read from
	standard input, one integer per line.  The meter is updated
	to reflect each new percentage.  If stdin is XXX, then subsequent
	lines up to another XXX are used for a new prompt.
	The guage exits when EOF is reached on stdin.

Since this is longstanding behavior of dialog, I'm inclined to document
it, and consider suggestions for adding an option to make it behave
as the documentation implied.

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[signature.asc (application/pgp-signature, inline)]

Reply sent to Santiago Vila <sanvila@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to kissg@ssg.ki.iif.hu:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #18 received at 415596-close@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@debian.org>
To: 415596-close@bugs.debian.org
Subject: Bug#415596: fixed in dialog 1.1-20070325-1
Date: Sun, 01 Apr 2007 12:47:03 +0000
Source: dialog
Source-Version: 1.1-20070325-1

We believe that the bug you reported is fixed in the latest version of
dialog, which is due to be installed in the Debian FTP archive:

dialog_1.1-20070325-1.diff.gz
  to pool/main/d/dialog/dialog_1.1-20070325-1.diff.gz
dialog_1.1-20070325-1.dsc
  to pool/main/d/dialog/dialog_1.1-20070325-1.dsc
dialog_1.1-20070325-1_powerpc.deb
  to pool/main/d/dialog/dialog_1.1-20070325-1_powerpc.deb
dialog_1.1-20070325.orig.tar.gz
  to pool/main/d/dialog/dialog_1.1-20070325.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 415596@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Santiago Vila <sanvila@debian.org> (supplier of updated dialog package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun,  1 Apr 2007 14:23:12 +0200
Source: dialog
Binary: dialog
Architecture: source powerpc
Version: 1.1-20070325-1
Distribution: unstable
Urgency: low
Maintainer: Santiago Vila <sanvila@debian.org>
Changed-By: Santiago Vila <sanvila@debian.org>
Description: 
 dialog     - Displays user-friendly dialog boxes from shell scripts
Closes: 415022 415596
Changes: 
 dialog (1.1-20070325-1) unstable; urgency=low
 .
   * New upstream release.
   * Resizing of msgbox should now work (Closes: #415022).
   * Fixed documentation regarding gauge and "XXX" string (Closes: #415596).
Files: 
 93c9318483450700eb0c922c4ce97751 593 misc optional dialog_1.1-20070325-1.dsc
 885a94081bb2630de82d787d0e0a1c4d 364516 misc optional dialog_1.1-20070325.orig.tar.gz
 3ff4408efa0a7debd21081e1ec1efe23 8799 misc optional dialog_1.1-20070325-1.diff.gz
 d7afacdd71caaa37151e73955544818b 258834 misc optional dialog_1.1-20070325-1_powerpc.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGD6UNd9Uuvj7yPNYRArSmAJ4zvBuczyiONw25LTPT707GHuSWJwCfZ43m
3rWGUOB9ij8EK4BCfIXpCOU=
=AWol
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 27 Jun 2007 07:36:01 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 15:21:13 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.