]> granicus.if.org Git - nethack/commitdiff
suggestions from <Someone>
authornethack.allison <nethack.allison>
Wed, 21 Aug 2002 11:02:56 +0000 (11:02 +0000)
committernethack.allison <nethack.allison>
Wed, 21 Aug 2002 11:02:56 +0000 (11:02 +0000)
doc/window.doc
win/win32/mswproc.c

index 7e17b2814a5de643694e6102cce0bc74e4b5fcbe..47fe7791535751f6ef60443500163bc5d2c67655 100644 (file)
@@ -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
index b865c364a759292280e9e7bcaf467c4aee72dbc6..7a559dcfaff647b66fc030a6593b2f0baefbaa85 100644 (file)
@@ -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;