Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 5044 - dialog does not work in some cases
Summary: dialog does not work in some cases
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dialog
Version: 6.0
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-09-10 14:33 UTC by roganov
Modified: 2014-03-17 02:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-01-20 16:28:51 UTC


Attachments (Terms of Use)

Description roganov 1999-09-10 14:33:32 UTC
The 'dialog' tool provided in RH 6.0 distribution does
not work in some cases.  Two known bugs are:

1.
	 dialog --yesno "hello" 80 20
       leads to:
         Segmentation fault (core dumped)

(above example just swaps correct "width" and "height")

2.
       for i in 20 40 60 80 ; do echo $i ; sleep 1 ; done |\
            dialog --gauge "hello" 20 70 0
       leads to:
            Broken pipe

Comment 1 ard 2000-01-20 13:44:59 UTC
This patch excludes the loop patch.
The loop patch checks that fd0 is a tty. Which, in case the --gauge
option is given, is a pipe.
--- dialog-0.6.spec.orig	Thu Jan 20 14:45:14 2000
+++ dialog-0.6.spec	Thu Jan 20 14:45:18 2000
@@ -23,7 +23,7 @@
 %setup -q
 %patch0 -p1 -b .ncurses
 %patch1 -p1 -b .opt
-%patch2 -p1 -b .loop
+# %patch2 -p1 -b .loop
 cd src
 make depend

Comment 2 Bill Nottingham 2000-01-20 16:28:59 UTC
Second is fixed in dialog-0.6-15; as for the
first, we're taking patches to make it smarter.

Comment 3 ard 2000-01-20 16:32:59 UTC
Allright, then we got a gauge, but thats a gauge without the bar I used to
know. I patched gauge.c a little, and now it has the status IWGEFM
(It Works Good Enough For Me :)).
Ehh, does Marc still maintain dialog?
--- gauge.c.orig	Mon Jan 16 00:48:14 1995
+++ gauge.c	Thu Jan 20 17:37:12 2000
@@ -72,17 +72,18 @@
 	  waddch(dialog, ' ');
       }

-      wattrset(dialog, title_attr);
-      wmove(dialog, height - 3, (width / 2) - 2);
-      sprintf(buf, "%3d%%", percent);
-      waddstr(dialog, buf);
-
       x = (percent * (width - 8)) / 100;
       wattrset(dialog, item_selected_attr);
       wmove(dialog, height - 3, 4);
       for (i = 0; i < x; i++) {
-	  waddch(dialog, winch(dialog));
+//waddch(dialog, winch(dialog));
+	  waddch(dialog, ACS_BLOCK);
       }
+      wattrset(dialog, title_attr);
+      wmove(dialog, height - 3, (width / 2) - 2);
+      sprintf(buf, "%3d%%", percent);
+      waddstr(dialog, buf);
+

       wrefresh(dialog);

Comment 4 ard 2000-01-20 16:51:59 UTC
Hmmm,
Debian has a cdialog0.9 version, based on dialog 0.6c
I will look into rpm'ing that version.
New features include time out etc...


Note You need to log in before you can comment on or make changes to this bug.