Bug 5044 - dialog does not work in some cases
dialog does not work in some cases
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: dialog (Show other bugs)
6.0
i386 Linux
low Severity low
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-09-10 10:33 EDT by roganov
Modified: 2014-03-16 22:09 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-01-20 11:28:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description roganov 1999-09-10 10:33:32 EDT
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 08:44:59 EST
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 11:28:59 EST
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 11:32:59 EST
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 11:51:59 EST
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.