Re: [PATCH] prompt_yn() accepts only keys from prompt_keys
Urs Janßen <[email protected]>
| Newsgroups | gmane.network.tin.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Feb 11, 2005 at 08:48:01PM +0100, Michael Bienia wrote:
> the attached patch makes prompt_yn() only accept keys listed in
> prompt_keys. By default these are ESC (GLOBAL_ABORT), q (GLOBAL_QUIT),
> y, Y (PROMPT_YES), n and N (PROMPT_NO).
>
> IMHO it is a cleaner solution to add the uppercase keys of
> PROMPT_{YES,NO} to the list of defined keys than to check for them
> seperately in prompt_yn(). Remains the question how should they get
> added to the list from a keymap file:
> - should the keys for "PromptNo" and "PromptYes" also get added
> automatically as uppercase (current approach)
sounds ok
> - or should they get added only when explicitly defined in the keymap
> file?
this would be the cleaner approach, but then we should make
keymap.sample look like:
PromptYes y Y
PromptNo n N
and describle the possibillity of multiple keybindings (in tin.5) and
check the rest of the code where we (silently) allow uppercase
answers and ...
urs
--
"Only whimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)" - Linus