diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 2001-08-12 19:52:57 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 2001-08-12 19:52:57 +0000 |
commit | c2e1d74226b20206e9e33c41723486628cdeb3a1 (patch) | |
tree | fd5bcdb6cb8d286780cb6c21305c3939ab76d8d6 /games/rogue/message.c | |
parent | 7eaf07daccb49c3c8beb61622d11e876aa317c65 (diff) |
make get_input_line more general (only affects wizard mode)
make special attacks a bit less likely in wizard mode
remove declarations of a few nonexistant functions
Diffstat (limited to 'games/rogue/message.c')
-rw-r--r-- | games/rogue/message.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/games/rogue/message.c b/games/rogue/message.c index 455303f35d6..5d66689b640 100644 --- a/games/rogue/message.c +++ b/games/rogue/message.c @@ -1,4 +1,4 @@ -/* $OpenBSD: message.c,v 1.6 2000/07/24 00:56:05 pjanzen Exp $ */ +/* $OpenBSD: message.c,v 1.7 2001/08/12 19:52:56 pjanzen Exp $ */ /* $NetBSD: message.c,v 1.5 1995/04/22 10:27:43 cgd Exp $ */ /* @@ -136,8 +136,9 @@ check_message() } int -get_input_line(prompt, insert, buf, if_cancelled, add_blank, do_echo) - char *prompt, *buf, *insert; +get_input_line(prompt, insert, buf, buf_size, if_cancelled, add_blank, do_echo) + char *prompt, *insert, *buf; + int buf_size; char *if_cancelled; boolean add_blank; boolean do_echo; @@ -157,7 +158,7 @@ get_input_line(prompt, insert, buf, if_cancelled, add_blank, do_echo) } while (((ch = rgetchar()) != '\r') && (ch != '\n') && (ch != CANCEL)) { - if ((ch >= ' ') && (ch <= '~') && (i < MAX_TITLE_LENGTH-2)) { + if ((ch >= ' ') && (ch <= '~') && (i < buf_size - 2)) { if ((ch != ' ') || (i > 0)) { buf[i++] = ch; if (do_echo) { |