From 411195c75f7d630c20f2c673f26f59a0bc0257af Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Wed, 21 Aug 2002 11:02:56 +0000 Subject: [PATCH] suggestions from --- doc/window.doc | 4 ++++ win/win32/mswproc.c | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/window.doc b/doc/window.doc index 7e17b2814..47fe77915 100644 --- a/doc/window.doc +++ b/doc/window.doc @@ -157,6 +157,10 @@ char yn_function(const char *ques, const char *choices, char default) Place this value in the global "yn_number" and return '#'. -- This uses the top line in the tty window-port, other ports might use a popup. + -- If choices is NULL, all possible inputs are accepted and + returned, preserving case (upper or lower.) This means that + if the calling function needs an exact match, it must handle + user input correctness itself. getlin(const char *ques, char *input) -- Prints ques as a prompt and reads a single line of text, up to a newline. The string entered is returned without the diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index b865c364a..7a559dcfa 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -1431,9 +1431,8 @@ char mswin_yn_function(const char *question, const char *choices, while (result<0) { ShowCaret(mswin_hwnd_from_winid(WIN_MESSAGE)); ch=mswin_nhgetch(); - if (choices == ynchars || choices == ynqchars || - choices == ynaqchars || choices == ynNaqchars) - ch = lowc(ch); + if (choices) + ch = lowc(ch); HideCaret(mswin_hwnd_from_winid(WIN_MESSAGE)); if (ch=='\033') { result=yn_esc_map;