]> granicus.if.org Git - nethack/commitdiff
window.doc getlin clarification
authorcohrs <cohrs>
Thu, 24 Jan 2002 03:13:56 +0000 (03:13 +0000)
committercohrs <cohrs>
Thu, 24 Jan 2002 03:13:56 +0000 (03:13 +0000)
Clarify the getlin interface, which is used with the implicit assumption
that an input buffer of size BUFSZ (including the nul) is sufficient.

doc/window.doc

index 5cfb86caeeb44e5558c8541a01f19c77c6abbbdb..de6f3a5ad3a366f88fb135686df2cb6f7830df33 100644 (file)
@@ -164,6 +164,9 @@ getlin(const char *ques, char *input)
                -- getlin() must call flush_screen(1) before doing anything.
                -- This uses the top line in the tty window-port, other
                   ports might use a popup.
+               -- getlin() can assume the input buffer is at least BUFSZ
+                  bytes in size and must truncate inputs to fit, including
+                  the nul character.
 int get_ext_cmd(void)
                -- Get an extended command in a window-port specific way.
                   An index into extcmdlist[] is returned on a successful