lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Jul 2006 16:09:03 +0200 (CEST)
From:	Roman Zippel <zippel@...ux-m68k.org>
To:	Sam Ravnborg <sam@...nborg.org>
cc:	LKML <linux-kernel@...r.kernel.org>, Petr Baudis <pasky@...e.cz>
Subject: Re: [PATCH/RFC] kconfig/lxdialog: make lxdialof a built-in

Hi,

On Thu, 27 Jul 2006, Sam Ravnborg wrote:

> Dedided to take another stamp on an old TODO item of making lxdialog
> a built-in. Following patch is first step to do so.
> The patch makes it a built-in - but with two open issues that I yet
> have to address.

Looks good. :)
There is a NULL pointer problem with empty menus, item_cur is NULL and a 
select or exit will cause a segfault in item_set_selected().

> I will during the weekend try to address the resize issue.

Wasn't it working at some point?
Anyway, it doesn't has to be overly complex either, e.g. if you delay it 
to the next key event, it's fine too. The signal handler would just set a 
flag and when wgetch returns, the display is reinitialized.

> The double ESC ESC thing I dunno how to fix.

I think the easiest would be to just ignore the first ESC, it matches the 
documented behaviour and e.g. mc has the same behaviour. The delay of the 
single ESC makes it a bit annoying/confusing to use, so that sticking to 
the double ESC is IMO safer.
I played with it a little and below is an example, which implements this 
behaviour for the menu window. 

bye, Roman


Index: linux-2.6-git/scripts/kconfig/lxdialog/menubox.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/lxdialog/menubox.c	2006-07-28 14:54:49.000000000 +0200
+++ linux-2.6-git/scripts/kconfig/lxdialog/menubox.c	2006-07-28 15:50:15.000000000 +0200
@@ -265,6 +265,14 @@ int dialog_menu(const char *title, const
 
 	while (key != ESC) {
 		key = wgetch(menu);
+		if (key == ESC) {
+			notimeout(menu, TRUE);
+			keypad(menu, FALSE);
+			key = wgetch(menu);
+			notimeout(menu, FALSE);
+			keypad(menu, TRUE);
+		}
+		
 
 		if (key < 256 && isalpha(key))
 			key = tolower(key);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ