[nethack] 03/31: Drop obsolete patches
James Cowgill
jcowgill-guest at moszumanska.debian.org
Mon Mar 7 17:54:18 UTC 2016
This is an automated email from the git hooks/post-receive script.
jcowgill-guest pushed a commit to branch master
in repository nethack.
commit 9b279b80b3047d53917e7db0ee52b1fb0463cc24
Author: James Cowgill <james410 at cowgill.org.uk>
Date: Fri Feb 19 21:29:25 2016 +0000
Drop obsolete patches
0003 _GNU_SOURCE define - _GNU_SOURCE is now defined in config1.h
0011 menucolors - applied upstream
0012 paranoid hit - obsolete, equivalent is in 3.6.0
0014 sortloop - applied upstream
0016 fix format-security errors - fixed upstream
---
.../0003-Define-_GNU_SOURCE-for-RTLD_NEXT.patch | 21 -
...en-s-patch-to-add-colors-to-inventory-ite.patch | 566 --------
...t-asks-you-to-confirm-yes-instead-of-y-wh.patch | 143 --
...loot.dpatch-by-Jeroen-Demeyer-and-Jukka-L.patch | 569 --------
.../0016-fix-non-constant-format-strings.patch | 1414 --------------------
debian/patches/series | 5 -
6 files changed, 2718 deletions(-)
diff --git a/debian/patches/0003-Define-_GNU_SOURCE-for-RTLD_NEXT.patch b/debian/patches/0003-Define-_GNU_SOURCE-for-RTLD_NEXT.patch
deleted file mode 100644
index 448eaf0..0000000
--- a/debian/patches/0003-Define-_GNU_SOURCE-for-RTLD_NEXT.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From 66de1ffa3817ecc98617671b829f031c83bf740b Mon Sep 17 00:00:00 2001
-From: Joshua Kwan <joshk at triplehelix.org>
-Date: Thu, 24 Sep 2009 14:21:19 -0700
-Subject: Define _GNU_SOURCE for RTLD_NEXT.
-
----
- sys/unix/unixres.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/sys/unix/unixres.c b/sys/unix/unixres.c
-index 3e7f989..a6ac959 100644
---- a/sys/unix/unixres.c
-+++ b/sys/unix/unixres.c
-@@ -21,6 +21,7 @@
- # if defined(LINUX)
-
- /* requires dynamic linking with libc */
-+#define _GNU_SOURCE
- #include <dlfcn.h>
-
- static int
diff --git a/debian/patches/0011-Pasi-Kallinen-s-patch-to-add-colors-to-inventory-ite.patch b/debian/patches/0011-Pasi-Kallinen-s-patch-to-add-colors-to-inventory-ite.patch
deleted file mode 100644
index c99609f..0000000
--- a/debian/patches/0011-Pasi-Kallinen-s-patch-to-add-colors-to-inventory-ite.patch
+++ /dev/null
@@ -1,566 +0,0 @@
-From e322d347a77bca305979201e4cfb552f0ea01a0e Mon Sep 17 00:00:00 2001
-From: Pasi Kallinen <pkalli at cs.joensuu.fi>
-Date: Thu, 24 Sep 2009 14:21:19 -0700
-Subject: Pasi Kallinen's patch to add colors to inventory items.
-
----
- README.menucolor | 96 ++++++++++++++++++++++++++++++++++++++
- dat/opthelp | 18 ++++++++
- include/color.h | 18 ++++++++
- include/config.h | 9 ++++
- include/extern.h | 3 ++
- include/flag.h | 3 ++
- src/decl.c | 4 ++
- src/files.c | 4 ++
- src/options.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
- src/save.c | 26 +++++++++++
- util/makedefs.c | 7 +++
- win/tty/wintty.c | 43 +++++++++++++++++
- 12 files changed, 367 insertions(+)
- create mode 100644 README.menucolor
-
---- /dev/null
-+++ b/README.menucolor
-@@ -0,0 +1,96 @@
-+
-+ This is version 1.3 of the menucolors patch.
-+
-+ This patch allows the user to define in what color menus are shown.
-+ For example, putting
-+
-+ OPTIONS=menucolors
-+ MENUCOLOR=" blessed "=green
-+ MENUCOLOR=" holy "=green
-+ MENUCOLOR=" cursed "=red
-+ MENUCOLOR=" unholy "=red
-+ MENUCOLOR=" cursed .* (being worn)"=orange&underline
-+
-+ in the configuration file makes all known blessed items
-+ show up in green, all cursed items show up in red and
-+ all cursed worn items show up in orange and underlined
-+ when viewing inventory.
-+
-+ If you do not have GNU regex.h, comment
-+ #define MENU_COLOR_REGEX out from include/config.h
-+ and replace the MENUCOLOR lines in your config file with these:
-+
-+ MENUCOLOR="* blessed *"=green
-+ MENUCOLOR="* holy *"=green
-+ MENUCOLOR="* cursed *"=red
-+ MENUCOLOR="* unholy *"=red
-+ MENUCOLOR="* cursed * (being worn)"=orange&underline
-+
-+
-+ Colors: black, red, green, brown, blue, magenta, cyan, gray, orange,
-+ lightgreen, yellow, lightblue, lightmagenta, lightcyan, white.
-+ Attributes: none, bold, dim, underline, blink, inverse.
-+
-+ Note that the terminal is free to interpret the attributes however
-+ it wants.
-+
-+
-+ TODO/BUGS:
-+
-+ o Only works with TTY
-+ o You can't use '=' or '&' in the match-string.
-+ o Maybe add color-field to tty_menu_item in include/wintty.h
-+ (so there's no need to find the color for the line again)
-+ o Guidebook is not up to date
-+ o Better place to put the functions, colornames[] and attrnames[]?
-+ o Some menus do not need coloring; maybe add new parameter
-+ to process_menu_window()?
-+
-+
-+ FIXES:
-+
-+ v1.3:
-+ o Updated to use 3.4.3 codebase.
-+ o Added a text to #version to show menucolors is compiled in.
-+
-+ v1.2:
-+ o Updated to use 3.4.2 codebase.
-+
-+ v1.1:
-+ o Updated to use 3.4.1 codebase.
-+ o replaced USE_REGEX_MATCH with MENU_COLOR_REGEX
-+
-+ v1.04:
-+ o Oops! 1.03 worked only on *nixes... (GNU regex.h)
-+ o Compile-time option USE_REGEX_MATCH: if it's defined, use regex,
-+ otherwise use globbing. ('?' and '*' wildcards)
-+
-+ v1.03:
-+
-+ o Now using Nethack 3.4.0 codebase
-+ o Compile-time option MENU_COLOR
-+ o Strings match using regular expressions instead of globbing
-+ o You can use attribute with color (attr must come after '&')
-+ o Use ``MENUCOLOR="foo"=color'' instead of ``OPTIONS=menucolor=...''
-+ (Both work, but OPTIONS complains if you define menucolor
-+ more than once)
-+
-+ v1.02:
-+
-+ o Should now work with OS/2, thanks to Jukka Lahtinen
-+ o Strings match now using simple globbing. ('?' and '*' wildcards)
-+
-+ v1.01:
-+
-+ o Moved 'menucolors' boolean option, so now the options-menu
-+ is in alphabetical order.
-+ o Fixed 'menucolor' description in dat/opthelp.
-+ o menu_colorings is now initialized to null in src/decl.c.
-+
-+ v1.0:
-+
-+ o Initial release
-+
-+--
-+ Pasi Kallinen
-+ pkalli at cs.joensuu.fi
---- a/dat/opthelp
-+++ b/dat/opthelp
-@@ -74,6 +74,9 @@
- Boolean option if HPMON was set at compile time:
- hpmon color HP readout depending on how low it is [FALSE]
-
-+Boolean option if TEXTCOLOR and MENU_COLOR were set at compile time:
-+menucolors use different colors for menus [TRUE for micros]
-+
- Boolean option if TIMED_DELAY was set at compile time (tty interface only):
- timed_delay on unix and VMS, use a timer instead of sending
- extra screen output when attempting to pause for
-@@ -172,6 +175,21 @@
- still denote your gender using the "male" and "female"
- options, the "gender" option will take precedence. [RANDOM]
- horsename the name of your first horse [NONE]
-+menucolor Set colors for menus. (menucolor:"regex_string"=color)
-+ If boolean option ``menucolors'' is true, menus will be shown
-+ with different colors.
-+ For example, setting ``menucolor:" blessed "=green'' shows
-+ all lines in a menu with the text " blessed " in green.
-+ The string is matched using regular expressions.
-+ Valid values for the color are black, red, green, brown, blue,
-+ magenta, cyan, gray, orange, lightgreen, yellow, lightblue,
-+ lightmagenta, lightcyan and white.
-+ You can define menucolor as many times as you wish; those
-+ defined later will take precedence.
-+ Instead of using this with OPTIONS, consider using
-+ MENUCOLOR="regex_string"=color in the configuration file.
-+ Setting menucolor has effect only if TEXTCOLOR and MENU_COLOR
-+ were set at compile time. [NONE]
- menu_* create single character accelerators for menu commands. Below
- is a list of all commands. Each is followed by a list of window-
- ports that implement them: 'x' is X11, 't' is tty, 'g' is Gem,
---- a/include/color.h
-+++ b/include/color.h
-@@ -5,6 +5,12 @@
- #ifndef COLOR_H
- #define COLOR_H
-
-+#ifdef MENU_COLOR
-+# ifdef MENU_COLOR_REGEX
-+# include <regex.h>
-+# endif
-+#endif
-+
- /*
- * The color scheme used is tailored for an IBM PC. It consists of the
- * standard 8 colors, folowed by their bright counterparts. There are
-@@ -49,4 +55,16 @@
- #define DRAGON_SILVER CLR_BRIGHT_CYAN
- #define HI_ZAP CLR_BRIGHT_BLUE
-
-+#ifdef MENU_COLOR
-+struct menucoloring {
-+# ifdef MENU_COLOR_REGEX
-+ struct re_pattern_buffer match;
-+# else
-+ char *match;
-+# endif
-+ int color, attr;
-+ struct menucoloring *next;
-+};
-+#endif /* MENU_COLOR */
-+
- #endif /* COLOR_H */
---- a/include/config.h
-+++ b/include/config.h
-@@ -353,6 +353,17 @@
- * bugs left here.
- */
-
-+#ifdef TTY_GRAPHICS
-+# define MENU_COLOR
-+#ifdef __linux__
-+# define MENU_COLOR_REGEX
-+/* if MENU_COLOR_REGEX is defined, use regular expressions (GNU regex.h)
-+ * otherwise use pmatch() to match menu color lines.
-+ * pmatch() provides basic globbing: '*' and '?' wildcards.
-+ */
-+#endif
-+#endif
-+
- /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */
- #define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */
-
---- a/include/extern.h
-+++ b/include/extern.h
-@@ -1405,6 +1405,9 @@
- E int FDECL(add_autopickup_exception, (const char *));
- E void NDECL(free_autopickup_exceptions);
- #endif /* AUTOPICKUP_EXCEPTIONS */
-+#ifdef MENU_COLOR
-+E boolean FDECL(add_menu_coloring, (char *));
-+#endif /* MENU_COLOR */
-
- /* ### pager.c ### */
-
---- a/include/flag.h
-+++ b/include/flag.h
-@@ -186,6 +186,9 @@
- char prevmsg_window; /* type of old message window to use */
- boolean extmenu; /* extended commands use menu interface */
- #endif
-+#ifdef MENU_COLOR
-+ boolean use_menu_color; /* use color in menus; only if wc_color */
-+#endif
- #ifdef MFLOPPY
- boolean checkspace; /* check disk space before writing files */
- /* (in iflags to allow restore after moving
---- a/src/decl.c
-+++ b/src/decl.c
-@@ -235,6 +235,10 @@
- "white", /* CLR_WHITE */
- };
-
-+#ifdef MENU_COLOR
-+struct menucoloring *menu_colorings = 0;
-+#endif
-+
- struct c_common_strings c_common_strings = {
- "Nothing happens.", "That's enough tries!",
- "That is a silly thing to %s.", "shudder for a moment.",
---- a/src/files.c
-+++ b/src/files.c
-@@ -1794,6 +1794,10 @@
- } else if (match_varname(buf, "BOULDER", 3)) {
- (void) get_uchars(fp, buf, bufp, &iflags.bouldersym, TRUE,
- 1, "BOULDER");
-+ } else if (match_varname(buf, "MENUCOLOR", 9)) {
-+#ifdef MENU_COLOR
-+ (void) add_menu_coloring(bufp);
-+#endif
- } else if (match_varname(buf, "GRAPHICS", 4)) {
- len = get_uchars(fp, buf, bufp, translate, FALSE,
- MAXPCHARS, "GRAPHICS");
---- a/src/options.c
-+++ b/src/options.c
-@@ -128,6 +128,15 @@
- #else
- {"mail", (boolean *)0, TRUE, SET_IN_FILE},
- #endif
-+#ifdef MENU_COLOR
-+# ifdef MICRO
-+ {"menucolors", &iflags.use_menu_color, TRUE, SET_IN_GAME},
-+# else
-+ {"menucolors", &iflags.use_menu_color, FALSE, SET_IN_GAME},
-+# endif
-+#else
-+ {"menucolors", (boolean *)0, FALSE, SET_IN_GAME},
-+#endif
- #ifdef WIZARD
- /* for menu debugging only*/
- {"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME},
-@@ -249,6 +258,7 @@
- { "horsename", "the name of your (first) horse (e.g., horsename:Silver)",
- PL_PSIZ, DISP_IN_GAME },
- { "map_mode", "map display mode under Windows", 20, DISP_IN_GAME }, /*WC*/
-+ { "menucolor", "set menu colors", PL_PSIZ, SET_IN_FILE },
- { "menustyle", "user interface for object selection",
- MENUTYPELEN, SET_IN_GAME },
- { "menu_deselect_all", "deselect all items in a menu", 4, SET_IN_FILE },
-@@ -967,6 +977,120 @@
- }
- }
-
-+#ifdef MENU_COLOR
-+extern struct menucoloring *menu_colorings;
-+
-+static const struct {
-+ const char *name;
-+ const int color;
-+} colornames[] = {
-+ {"black", CLR_BLACK},
-+ {"red", CLR_RED},
-+ {"green", CLR_GREEN},
-+ {"brown", CLR_BROWN},
-+ {"blue", CLR_BLUE},
-+ {"magenta", CLR_MAGENTA},
-+ {"cyan", CLR_CYAN},
-+ {"gray", CLR_GRAY},
-+ {"orange", CLR_ORANGE},
-+ {"lightgreen", CLR_BRIGHT_GREEN},
-+ {"yellow", CLR_YELLOW},
-+ {"lightblue", CLR_BRIGHT_BLUE},
-+ {"lightmagenta", CLR_BRIGHT_MAGENTA},
-+ {"lightcyan", CLR_BRIGHT_CYAN},
-+ {"white", CLR_WHITE}
-+};
-+
-+static const struct {
-+ const char *name;
-+ const int attr;
-+} attrnames[] = {
-+ {"none", ATR_NONE},
-+ {"bold", ATR_BOLD},
-+ {"dim", ATR_DIM},
-+ {"underline", ATR_ULINE},
-+ {"blink", ATR_BLINK},
-+ {"inverse", ATR_INVERSE}
-+
-+};
-+
-+/* parse '"regex_string"=color&attr' and add it to menucoloring */
-+boolean
-+add_menu_coloring(str)
-+char *str;
-+{
-+ int i, c = NO_COLOR, a = ATR_NONE;
-+ struct menucoloring *tmp;
-+ char *tmps, *cs = strchr(str, '=');
-+ const char *err = (char *)0;
-+
-+ if (!cs || !str) return FALSE;
-+
-+ tmps = cs;
-+ tmps++;
-+ while (*tmps && isspace(*tmps)) tmps++;
-+
-+ for (i = 0; i < SIZE(colornames); i++)
-+ if (strstri(tmps, colornames[i].name) == tmps) {
-+ c = colornames[i].color;
-+ break;
-+ }
-+ if ((i == SIZE(colornames)) && (*tmps >= '0' && *tmps <='9'))
-+ c = atoi(tmps);
-+
-+ if (c > 15) return FALSE;
-+
-+ tmps = strchr(str, '&');
-+ if (tmps) {
-+ tmps++;
-+ while (*tmps && isspace(*tmps)) tmps++;
-+ for (i = 0; i < SIZE(attrnames); i++)
-+ if (strstri(tmps, attrnames[i].name) == tmps) {
-+ a = attrnames[i].attr;
-+ break;
-+ }
-+ if ((i == SIZE(attrnames)) && (*tmps >= '0' && *tmps <='9'))
-+ a = atoi(tmps);
-+ }
-+
-+ *cs = '\0';
-+ tmps = str;
-+ if ((*tmps == '"') || (*tmps == '\'')) {
-+ cs--;
-+ while (isspace(*cs)) cs--;
-+ if (*cs == *tmps) {
-+ *cs = '\0';
-+ tmps++;
-+ }
-+ }
-+
-+ tmp = (struct menucoloring *)alloc(sizeof(struct menucoloring));
-+#ifdef MENU_COLOR_REGEX
-+ tmp->match.translate = 0;
-+ tmp->match.fastmap = 0;
-+ tmp->match.buffer = 0;
-+ tmp->match.allocated = 0;
-+ tmp->match.regs_allocated = REGS_FIXED;
-+ err = re_compile_pattern(tmps, strlen(tmps), &tmp->match);
-+#else
-+ tmp->match = (char *)alloc(strlen(tmps)+1);
-+ (void) memcpy((genericptr_t)tmp->match, (genericptr_t)tmps, strlen(tmps)+1);
-+#endif
-+ if (err) {
-+ raw_printf("\nMenucolor regex error: %s\n", err);
-+ wait_synch();
-+ free(tmp);
-+ return FALSE;
-+ } else {
-+ tmp->next = menu_colorings;
-+ tmp->color = c;
-+ tmp->attr = a;
-+ menu_colorings = tmp;
-+ return TRUE;
-+ }
-+}
-+#endif /* MENU_COLOR */
-+
- void
- parseoptions(opts, tinitial, tfrom_file)
- register char *opts;
-@@ -1136,6 +1260,18 @@
- return;
- }
-
-+ /* menucolor:"regex_string"=color */
-+ fullname = "menucolor";
-+ if (match_optname(opts, fullname, 9, TRUE)) {
-+#ifdef MENU_COLOR
-+ if (negated) bad_negation(fullname, FALSE);
-+ else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0)
-+ if (!add_menu_coloring(op))
-+ badoption(opts);
-+#endif
-+ return;
-+ }
-+
- fullname = "msghistory";
- if (match_optname(opts, fullname, 3, TRUE)) {
- op = string_for_env_opt(fullname, opts, negated);
---- a/src/save.c
-+++ b/src/save.c
-@@ -48,6 +48,10 @@
- #define HUP
- #endif
-
-+#ifdef MENU_COLOR
-+extern struct menucoloring *menu_colorings;
-+#endif
-+
- /* need to preserve these during save to avoid accessing freed memory */
- static unsigned ustuck_id = 0, usteed_id = 0;
-
-@@ -953,12 +957,34 @@
- return;
- }
-
-+#ifdef MENU_COLOR
-+void
-+free_menu_coloring()
-+{
-+ struct menucoloring *tmp = menu_colorings;
-+
-+ while (tmp) {
-+ struct menucoloring *tmp2 = tmp->next;
-+# ifdef MENU_COLOR_REGEX
-+ (void) regfree(&tmp->match);
-+# else
-+ free(tmp->match);
-+# endif
-+ free(tmp);
-+ tmp = tmp2;
-+ }
-+}
-+#endif /* MENU_COLOR */
-+
- void
- freedynamicdata()
- {
- unload_qtlist();
- free_invbuf(); /* let_to_name (invent.c) */
- free_youbuf(); /* You_buf,&c (pline.c) */
-+#ifdef MENU_COLOR
-+ free_menu_coloring();
-+#endif
- tmp_at(DISP_FREEMEM, 0); /* temporary display effects */
- #ifdef FREE_ALL_MEMORY
- # define freeobjchn(X) (saveobjchn(0, X, FREE_SAVE), X = 0)
---- a/util/makedefs.c
-+++ b/util/makedefs.c
-@@ -679,6 +679,13 @@
- #ifdef MAIL
- "mail daemon",
- #endif
-+#ifdef MENU_COLOR
-+# ifdef MENU_COLOR_REGEX
-+ "menu colors via regular expressions",
-+# else
-+ "menu colors via pmatch",
-+# endif
-+#endif
- #ifdef GNUDOS
- "MSDOS protected mode",
- #endif
---- a/win/tty/wintty.c
-+++ b/win/tty/wintty.c
-@@ -125,6 +125,10 @@
- static char winpanicstr[] = "Bad window id %d";
- char defmorestr[] = "--More--";
-
-+#ifdef MENU_COLOR
-+extern struct menucoloring *menu_colorings;
-+#endif
-+
- #ifdef CLIPPING
- # if defined(USE_TILES) && defined(MSDOS)
- boolean clipping = FALSE; /* clipping on? */
-@@ -1128,6 +1132,28 @@
- }
- }
-
-+#ifdef MENU_COLOR
-+STATIC_OVL boolean
-+get_menu_coloring(str, color, attr)
-+char *str;
-+int *color, *attr;
-+{
-+ struct menucoloring *tmpmc;
-+ if (iflags.use_menu_color)
-+ for (tmpmc = menu_colorings; tmpmc; tmpmc = tmpmc->next)
-+# ifdef MENU_COLOR_REGEX
-+ if (re_search(&tmpmc->match, str, strlen(str), 0, 9999, 0) >= 0) {
-+# else
-+ if (pmatch(tmpmc->match, str)) {
-+# endif
-+ *color = tmpmc->color;
-+ *attr = tmpmc->attr;
-+ return TRUE;
-+ }
-+ return FALSE;
-+}
-+#endif /* MENU_COLOR */
-+
- STATIC_OVL void
- process_menu_window(window, cw)
- winid window;
-@@ -1204,6 +1230,10 @@
- for (page_lines = 0, curr = page_start;
- curr != page_end;
- page_lines++, curr = curr->next) {
-+#ifdef MENU_COLOR
-+ int color = NO_COLOR, attr = ATR_NONE;
-+ boolean menucolr = FALSE;
-+#endif
- if (curr->selector)
- *rp++ = curr->selector;
-
-@@ -1219,6 +1249,13 @@
- * actually output the character. We're faster doing
- * this.
- */
-+#ifdef MENU_COLOR
-+ if (iflags.use_menu_color &&
-+ (menucolr = get_menu_coloring(curr->str, &color,&attr))) {
-+ term_start_attr(attr);
-+ if (color != NO_COLOR) term_start_color(color);
-+ } else
-+#endif
- term_start_attr(curr->attr);
- for (n = 0, cp = curr->str;
- #ifndef WIN32CON
-@@ -1236,6 +1273,12 @@
- (void) putchar('#'); /* count selected */
- } else
- (void) putchar(*cp);
-+#ifdef MENU_COLOR
-+ if (iflags.use_menu_color && menucolr) {
-+ if (color != NO_COLOR) term_end_color();
-+ term_end_attr(attr);
-+ } else
-+#endif
- term_end_attr(curr->attr);
- }
- } else {
diff --git a/debian/patches/0012-Paranoid-hit-asks-you-to-confirm-yes-instead-of-y-wh.patch b/debian/patches/0012-Paranoid-hit-asks-you-to-confirm-yes-instead-of-y-wh.patch
deleted file mode 100644
index c7b761e..0000000
--- a/debian/patches/0012-Paranoid-hit-asks-you-to-confirm-yes-instead-of-y-wh.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 483e822617cd94a508038fab69853b26014cf67e Mon Sep 17 00:00:00 2001
-From: Joshua Kwan <joshk at triplehelix.org>
-Date: Thu, 24 Sep 2009 14:21:19 -0700
-Subject: Paranoid hit asks you to confirm 'yes' instead of 'y' when hitting
- peacefuls
-
----
- dat/opthelp | 3 +++
- doc/Guidebook.mn | 3 +++
- doc/Guidebook.tex | 4 ++++
- doc/Guidebook.txt | 4 ++++
- include/flag.h | 3 +++
- src/options.c | 3 +++
- src/uhitm.c | 18 ++++++++++++++++++
- 7 files changed, 38 insertions(+)
-
-diff --git a/dat/opthelp b/dat/opthelp
-index a2d624a..eefd333 100644
---- a/dat/opthelp
-+++ b/dat/opthelp
-@@ -61,6 +61,9 @@ news print any news from game administrator on startup [TRUE]
- Boolean option if MFLOPPY was set at compile time:
- checkspace check free disk space before writing files to disk [TRUE]
-
-+Boolean option if PARANOID was set at compile time:
-+paranoid_quit ask for explicit 'yes' when quitting [FALSE]
-+
- Boolean option if EXP_ON_BOTL was set at compile time:
- showexp display your accumulated experience points [FALSE]
-
-diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn
-index 8ac033d..a0edc2e 100644
---- a/doc/Guidebook.mn
-+++ b/doc/Guidebook.mn
-@@ -2031,6 +2031,9 @@ Specify the order to list object types in (default ``")[%?+!=/(*`0_'').
- The value of this option should be a string containing the
- symbols for the various object types. Any omitted types are filled in
- at the end from the previous order.
-+.lp paranoid_hit
-+If true, asks you to type the word ``yes'' when hitting any peaceful
-+monster, not just the letter ``y''.
- .lp perm_invent
- If true, always display your current inventory in a window. This only
- makes sense for windowing system interfaces that implement this feature.
-diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex
-index 9dd0be5..55a85ec 100644
---- a/doc/Guidebook.tex
-+++ b/doc/Guidebook.tex
-@@ -2491,6 +2491,10 @@ Specify the order to list object types in (default
- containing the symbols for the various object types. Any omitted types
- are filled in at the end from the previous order.
- %.lp
-+\item[\ib{paranoid\_hit}]
-+If true, asks you to type the word ``yes'' when hitting any peaceful
-+monster, not just the letter ``y''.
-+%.lp
- \item[\ib{perm\_invent}]
- If true, always display your current inventory in a window. This only
- makes sense for windowing system interfaces that implement this feature.
-diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt
-index cfc0ed4..82a8eeb 100644
---- a/doc/Guidebook.txt
-+++ b/doc/Guidebook.txt
-@@ -2612,6 +2612,10 @@
- Any omitted types are filled in at the end from the previous
- order.
-
-+ paranoid_hit
-+ If true, asks you to type the word ``yes'' when hitting any
-+ peaceful monster, not just the letter ``y''.
-+
- perm_invent
- If true, always display your current inventory in a window.
- This only makes sense for windowing system interfaces that im-
-diff --git a/include/flag.h b/include/flag.h
-index cf2958c..efe778e 100644
---- a/include/flag.h
-+++ b/include/flag.h
-@@ -222,6 +222,9 @@ struct instance_flags {
- boolean lan_mail; /* mail is initialized */
- boolean lan_mail_fetched; /* mail is awaiting display */
- #endif
-+#ifdef PARANOID
-+ boolean paranoid_hit; /* Ask for 'yes' when hitting peacefuls */
-+#endif
-
- #if defined(HPMON) && defined(TEXTCOLOR)
- boolean use_hpmon;
-diff --git a/src/options.c b/src/options.c
-index 0e253b4..e767a83 100644
---- a/src/options.c
-+++ b/src/options.c
-@@ -155,6 +155,9 @@ static struct Bool_Opt
- #else
- {"page_wait", (boolean *)0, FALSE, SET_IN_FILE},
- #endif
-+#ifdef PARANOID
-+ {"paranoid_hit", &iflags.paranoid_hit, FALSE, SET_IN_GAME},
-+#endif
- {"perm_invent", &flags.perm_invent, FALSE, SET_IN_GAME},
- {"popup_dialog", &iflags.wc_popup_dialog, FALSE, SET_IN_GAME}, /*WC*/
- {"prayconfirm", &flags.prayconfirm, TRUE, SET_IN_GAME},
-diff --git a/src/uhitm.c b/src/uhitm.c
-index 3dd028a..4a980d6 100644
---- a/src/uhitm.c
-+++ b/src/uhitm.c
-@@ -99,6 +99,9 @@ register struct monst *mtmp;
- struct obj *wep; /* uwep for attack(), null for kick_monster() */
- {
- char qbuf[QBUFSZ];
-+#ifdef PARANOID
-+ char buf[BUFSZ];
-+#endif
-
- /* if you're close enough to attack, alert any waiting monster */
- mtmp->mstrategy &= ~STRAT_WAITMASK;
-@@ -199,11 +202,26 @@ struct obj *wep; /* uwep for attack(), null for kick_monster() */
- return(FALSE);
- }
- if (canspotmon(mtmp)) {
-+#ifdef PARANOID
-+ Sprintf(qbuf, "Really attack %s? [no/yes]",
-+ mon_nam(mtmp));
-+ if (iflags.paranoid_hit) {
-+ getlin (qbuf, buf);
-+ (void) lcase (buf);
-+ if (strcmp (buf, "yes")) {
-+ flags.move = 0;
-+ return(TRUE);
-+ }
-+ } else {
-+#endif
- Sprintf(qbuf, "Really attack %s?", mon_nam(mtmp));
- if (yn(qbuf) != 'y') {
- flags.move = 0;
- return(TRUE);
- }
-+#ifdef PARANOID
-+ }
-+#endif
- }
- }
-
diff --git a/debian/patches/0014-94_enh_sortloot.dpatch-by-Jeroen-Demeyer-and-Jukka-L.patch b/debian/patches/0014-94_enh_sortloot.dpatch-by-Jeroen-Demeyer-and-Jukka-L.patch
deleted file mode 100644
index ac8b680..0000000
--- a/debian/patches/0014-94_enh_sortloot.dpatch-by-Jeroen-Demeyer-and-Jukka-L.patch
+++ /dev/null
@@ -1,569 +0,0 @@
-From f268f1f6066c0ec1a78c49be99babbe2ad927f8e Mon Sep 17 00:00:00 2001
-From: Joshua Kwan <joshk at triplehelix.org>
-Date: Thu, 24 Sep 2009 14:21:19 -0700
-Subject: =?UTF-8?q?94=5Fenh=5Fsortloot.dpatch=20by=20Jeroen=20Demeyer=20and=20?=
- =?UTF-8?q?Jukka=20Lahtinen=0ASort=20item=20lists=20alphabetically?=
-
----
- dat/opthelp | 5 +++++
- doc/Guidebook.mn | 12 ++++++++++
- doc/Guidebook.tex | 15 +++++++++++++
- doc/Guidebook.txt | 12 ++++++++++
- include/config.h | 1 +
- include/extern.h | 3 +++
- include/flag.h | 3 +++
- src/end.c | 44 ++++++++++++++++++++++++++++++++++++
- src/invent.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++
- src/objnam.c | 25 +++++++++++++++++++++
- src/options.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
- src/pickup.c | 41 ++++++++++++++++++++++++++++++++++
- 12 files changed, 288 insertions(+), 1 deletion(-)
-
-diff --git a/dat/opthelp b/dat/opthelp
-index 4fa8f49..3c9138f 100644
---- a/dat/opthelp
-+++ b/dat/opthelp
-@@ -132,6 +132,11 @@ runmode controls how often the map window is updated when performing
- scores the parts of the score list you wish to see when the game ends
- You choose a combination of top scores, scores around the top
- scores, and all of your own scores. [!own/3 top/2 around]
-+sortloot controls the sortloot patch [none]:
-+ full -- All pickup lists of items are sorted by item description
-+ loot -- When inventory letters are shown, has no effect.
-+ Otherwise sorts by description
-+ none -- Works the traditional way, like without the patch
- suppress_alert disable various version-specific warnings about changes
- in game play or the user interface, such as notification given
- for the 'Q' command that quitting is now done via #quit
-diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn
-index 55a9cee..c0bcfb1 100644
---- a/doc/Guidebook.mn
-+++ b/doc/Guidebook.mn
-@@ -2111,6 +2111,18 @@ the appearance of the display, not the way the game treats you.
- Show your approximate accumulated score on bottom line (default off).
- .lp "silent "
- Suppress terminal beeps (default on).
-+.lp sortloot
-+Controls the behavior of the sortloot patch that sorts pickup lists for
-+inventory and #loot commands and some others.
-+The possible values are:
-+.sd
-+.si
-+full - always sort the lists;
-+loot - only sort the lists that don't use inventory
-+ letters, like with the #loot and pickup commands;
-+none - show lists the traditional way without sorting.
-+.ei
-+.ed
- .lp sortpack
- Sort the pack contents by type when displaying inventory (default on).
- .lp sound
-diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex
-index 69a8594..ddc08db 100644
---- a/doc/Guidebook.tex
-+++ b/doc/Guidebook.tex
-@@ -2589,6 +2589,21 @@ Show your approximate accumulated score on bottom line (default off).
- \item[\ib{silent}]
- Suppress terminal beeps (default on).
- %.lp
-+\item[\ib{sortloot}]
-+Controls the behavior of the sortloot patch that sorts pickup lists for
-+inventory and \#loot commands and some others.
-+
-+The possible values are:
-+%.sd
-+%.si
-+{\tt full} --- always sort the lists;\\
-+{\tt loot} --- only sort the lists that don't use inventory
-+ letters, like with the \#loot and pickup commands;\\
-+{\tt none} --- show lists the traditional way without sorting.
-+%.ei
-+%.ed
-+%.lp
-+The default is 'none', the way an unpatched game works.
- \item[\ib{sortpack}]
- Sort the pack contents by type when displaying inventory (default on).
- %.lp
-diff --git a/doc/Guidebook.txt b/doc/Guidebook.txt
-index 17513e6..ba57778 100644
---- a/doc/Guidebook.txt
-+++ b/doc/Guidebook.txt
-@@ -2739,6 +2739,18 @@
- silent
- Suppress terminal beeps (default on).
-
-+ sortloot
-+ Controls the behavior of the sortloot patch that sorts
-+ pickup lists for inventory and #loot commands and some
-+ others.
-+ The possible values are:
-+
-+ full - always sort the lists
-+ loot - only sort the lists that don't use inventory
-+ letters, like with the #loot and pickup commands
-+ none - show lists the traditional way without sorting
-+ The default is 'none', the way an unpatched game works.
-+
- sortpack
- Sort the pack contents by type when displaying inventory (de-
- fault on).
-diff --git a/include/config.h b/include/config.h
-index 26b68b5..c7a55ee 100644
---- a/include/config.h
-+++ b/include/config.h
-@@ -342,6 +342,7 @@ typedef unsigned char uchar;
- #define PARANOID
-
- #define HPMON /* Color HP monitor */
-+#define SORTLOOT /* Sort yer loot by alphabetical order, not index */
-
- /* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson at ucivax) */
-
-diff --git a/include/extern.h b/include/extern.h
-index 2138f41..4c0225a 100644
---- a/include/extern.h
-+++ b/include/extern.h
-@@ -1378,6 +1378,9 @@ E char *FDECL(doname, (struct obj *));
- E boolean FDECL(not_fully_identified, (struct obj *));
- E char *FDECL(corpse_xname, (struct obj *,BOOLEAN_P));
- E char *FDECL(cxname, (struct obj *));
-+#ifdef SORTLOOT
-+E char *FDECL(cxname2, (struct obj *));
-+#endif
- E char *FDECL(killer_xname, (struct obj *));
- E const char *FDECL(singular, (struct obj *,char *(*)(OBJ_P)));
- E char *FDECL(an, (const char *));
-diff --git a/include/flag.h b/include/flag.h
-index efe778e..78a0c33 100644
---- a/include/flag.h
-+++ b/include/flag.h
-@@ -222,6 +222,9 @@ struct instance_flags {
- boolean lan_mail; /* mail is initialized */
- boolean lan_mail_fetched; /* mail is awaiting display */
- #endif
-+#ifdef SORTLOOT
-+ char sortloot; /* sort items to loot alphabetically */
-+#endif
- #ifdef PARANOID
- boolean paranoid_hit; /* Ask for 'yes' when hitting peacefuls */
- #endif
-diff --git a/src/end.c b/src/end.c
-index e33bd7f..7a79635 100644
---- a/src/end.c
-+++ b/src/end.c
-@@ -1065,6 +1065,11 @@ boolean identified, all_containers, want_dump;
- /* The original container_contents function */
- {
- register struct obj *box, *obj;
-+#ifdef SORTLOOT
-+ struct obj **oarray;
-+ int i,j,n;
-+ char *invlet;
-+#endif /* SORTLOOT */
- char buf[BUFSZ];
-
- for (box = list; box; box = box->nobj) {
-@@ -1073,13 +1078,52 @@ boolean identified, all_containers, want_dump;
- continue; /* wrong type of container */
- } else if (box->cobj) {
- winid tmpwin = create_nhwindow(NHW_MENU);
-+#ifdef SORTLOOT
-+ /* count the number of items */
-+ for (n = 0, obj = box->cobj; obj; obj = obj->nobj) n++;
-+ /* Make a temporary array to store the objects sorted */
-+ oarray = (struct obj **) alloc(n*sizeof(struct obj*));
-+
-+ /* Add objects to the array */
-+ i = 0;
-+ invlet = flags.inv_order;
-+ nextclass:
-+ for (obj = box->cobj; obj; obj = obj->nobj) {
-+ if (!flags.sortpack || obj->oclass == *invlet) {
-+ if (iflags.sortloot == 'f'
-+ || iflags.sortloot == 'l') {
-+ /* Insert object at correct index */
-+ for (j = i; j; j--) {
-+ if (strcmpi(cxname2(obj), cxname2(oarray[j-1]))>0
-+ || (flags.sortpack &&
-+ oarray[j-1]->oclass != obj->oclass))
-+ break;
-+ oarray[j] = oarray[j-1];
-+ }
-+ oarray[j] = obj;
-+ i++;
-+ } else {
-+ /* Just add it to the array */
-+ oarray[i++] = obj;
-+ }
-+ }
-+ } /* for loop */
-+ if (flags.sortpack) {
-+ if (*++invlet) goto nextclass;
-+ }
-+#endif /* SORTLOOT */
- Sprintf(buf, "Contents of %s:", the(xname(box)));
- putstr(tmpwin, 0, buf);
- putstr(tmpwin, 0, "");
- #ifdef DUMP_LOG
- if (dump_fp) dump("", buf);
- #endif
-+#ifdef SORTLOOT
-+ for (i = 0; i < n; i++) {
-+ obj = oarray[i];
-+#else
- for (obj = box->cobj; obj; obj = obj->nobj) {
-+#endif
- if (identified) {
- makeknown(obj->otyp);
- obj->known = obj->bknown =
-diff --git a/src/invent.c b/src/invent.c
-index 93bbc9b..a35da0a 100644
---- a/src/invent.c
-+++ b/src/invent.c
-@@ -1714,6 +1714,10 @@ long* out_cnt;
- #endif
- {
- struct obj *otmp;
-+#ifdef SORTLOOT
-+ struct obj **oarray;
-+ int i, j;
-+#endif
- char ilet, ret;
- char *invlet = flags.inv_order;
- int n, classcount;
-@@ -1793,10 +1797,66 @@ long* out_cnt;
- return ret;
- }
-
-+#ifdef SORTLOOT
-+ /* count the number of items */
-+ for (n = 0, otmp = invent; otmp; otmp = otmp->nobj)
-+ if(!lets || !*lets || index(lets, otmp->invlet)) n++;
-+
-+ /* Make a temporary array to store the objects sorted */
-+ oarray = (struct obj **)alloc(n*sizeof(struct obj*));
-+
-+ /* Add objects to the array */
-+ i = 0;
-+ for(otmp = invent; otmp; otmp = otmp->nobj)
-+ if(!lets || !*lets || index(lets, otmp->invlet)) {
-+ if (iflags.sortloot == 'f') {
-+ /* Insert object at correct index */
-+ for (j = i; j; j--) {
-+ if (strcmpi(cxname2(otmp), cxname2(oarray[j-1]))>0) break;
-+ oarray[j] = oarray[j-1];
-+ }
-+ oarray[j] = otmp;
-+ i++;
-+ } else {
-+ /* Just add it to the array */
-+ oarray[i++] = otmp;
-+ }
-+ }
-+#endif /* SORTLOOT */
-+
- start_menu(win);
- nextclass:
- classcount = 0;
- any.a_void = 0; /* set all bits to zero */
-+#ifdef SORTLOOT
-+ for(i = 0; i < n; i++) {
-+ otmp = oarray[i];
-+ ilet = otmp->invlet;
-+ if (!flags.sortpack || otmp->oclass == *invlet) {
-+ if (flags.sortpack && !classcount) {
-+ any.a_void = 0; /* zero */
-+ add_menu(win, NO_GLYPH, &any, 0, 0, ATR_INVERSE,
-+ let_to_name(*invlet, FALSE), MENU_UNSELECTED);
-+#ifdef DUMP_LOG
-+ if (want_dump)
-+ dump(" ", let_to_name(*invlet, FALSE));
-+#endif
-+ classcount++;
-+ }
-+ any.a_char = ilet;
-+ add_menu(win, obj_to_glyph(otmp),
-+ &any, ilet, 0, ATR_NONE, doname(otmp),
-+ MENU_UNSELECTED);
-+#ifdef DUMP_LOG
-+ if (want_dump) {
-+ char letbuf[7];
-+ sprintf(letbuf, " %c - ", ilet);
-+ dump(letbuf, doname(otmp));
-+ }
-+#endif
-+ }
-+ }
-+#else /* SORTLOOT */
- for(otmp = invent; otmp; otmp = otmp->nobj) {
- ilet = otmp->invlet;
- if(!lets || !*lets || index(lets, ilet)) {
-@@ -1825,6 +1885,7 @@ nextclass:
- }
- }
- }
-+#endif /* SORTLOOT */
- if (flags.sortpack) {
- if (*++invlet) goto nextclass;
- #ifdef WIZARD
-@@ -1834,6 +1895,9 @@ nextclass:
- }
- #endif
- }
-+#ifdef SORTLOOT
-+ free(oarray);
-+#endif
- end_menu(win, (char *) 0);
-
- n = select_menu(win, want_reply ? PICK_ONE : PICK_NONE, &selected);
-diff --git a/src/objnam.c b/src/objnam.c
-index 2130432..94b5040 100644
---- a/src/objnam.c
-+++ b/src/objnam.c
-@@ -15,6 +15,9 @@ static boolean FDECL(wishymatch, (const char *,const char *,BOOLEAN_P));
- #endif
- static char *NDECL(nextobuf);
- static void FDECL(add_erosion_words, (struct obj *, char *));
-+#ifdef SORTLOOT
-+char * FDECL(xname2, (struct obj *, boolean));
-+#endif
-
- struct Jitem {
- int item;
-@@ -233,6 +236,15 @@ boolean juice; /* whether or not to append " juice" to the name */
- char *
- xname(obj)
- register struct obj *obj;
-+#ifdef SORTLOOT
-+{
-+ return xname2(obj, FALSE);
-+}
-+char *
-+xname2(obj, ignore_oquan)
-+register struct obj *obj;
-+boolean ignore_oquan;
-+#endif
- {
- register char *buf;
- register int typ = obj->otyp;
-@@ -469,6 +481,9 @@ register struct obj *obj;
- default:
- Sprintf(buf,"glorkum %d %d %d", obj->oclass, typ, obj->spe);
- }
-+#ifdef SORTLOOT
-+ if (!ignore_oquan)
-+#endif
- if (obj->quan != 1L) Strcpy(buf, makeplural(buf));
-
- if (obj->onamelth && obj->dknown) {
-@@ -853,6 +868,16 @@ struct obj *obj;
- return corpse_xname(obj, FALSE);
- return xname(obj);
- }
-+#ifdef SORTLOOT
-+char *
-+cxname2(obj)
-+struct obj *obj;
-+{
-+ if (obj->otyp == CORPSE)
-+ return corpse_xname(obj, TRUE);
-+ return xname2(obj, TRUE);
-+}
-+#endif /* SORTLOOT */
-
- /* treat an object as fully ID'd when it might be used as reason for death */
- char *
-diff --git a/src/options.c b/src/options.c
-index b4ca5ca..e06d01f 100644
---- a/src/options.c
-+++ b/src/options.c
-@@ -330,6 +330,9 @@ static struct Comp_Opt
- { "scroll_amount", "amount to scroll map when scroll_margin is reached",
- 20, DISP_IN_GAME }, /*WC*/
- { "scroll_margin", "scroll map when this far from the edge", 20, DISP_IN_GAME }, /*WC*/
-+#ifdef SORTLOOT
-+ { "sortloot", "sort object selection lists by description", 4, SET_IN_GAME },
-+#endif
- #ifdef MSDOS
- { "soundcard", "type of sound card to use", 20, SET_IN_FILE },
- #endif
-@@ -562,6 +565,10 @@ initoptions()
- flags.pickup_types[0] = '\0';
- flags.pickup_burden = MOD_ENCUMBER;
-
-+#ifdef SORTLOOT
-+ iflags.sortloot = 'n';
-+#endif
-+
- for (i = 0; i < NUM_DISCLOSURE_OPTIONS; i++)
- flags.end_disclose[i] = DISCLOSE_PROMPT_DEFAULT_NO;
- switch_graphics(ASCII_GRAPHICS); /* set default characters */
-@@ -2002,6 +2009,24 @@ goodfruit:
- return;
- }
-
-+#ifdef SORTLOOT
-+ fullname = "sortloot";
-+ if (match_optname(opts, fullname, 4, TRUE)) {
-+ op = string_for_env_opt(fullname, opts, FALSE);
-+ if (op) {
-+ switch (tolower(*op)) {
-+ case 'n':
-+ case 'l':
-+ case 'f': iflags.sortloot = tolower(*op);
-+ break;
-+ default: badoption(opts);
-+ return;
-+ }
-+ }
-+ return;
-+ }
-+#endif /* SORTLOOT */
-+
- fullname = "suppress_alert";
- if (match_optname(opts, fullname, 4, TRUE)) {
- op = string_for_opt(opts, negated);
-@@ -2426,6 +2451,12 @@ static NEARDATA const char *runmodes[] = {
- "teleport", "run", "walk", "crawl"
- };
-
-+#ifdef SORTLOOT
-+static NEARDATA const char *sortltype[] = {
-+ "none", "loot", "full"
-+};
-+#endif
-+
- /*
- * Convert the given string of object classes to a string of default object
- * symbols.
-@@ -2703,7 +2734,7 @@ boolean setinitial,setfromfile;
- boolean retval = FALSE;
-
- /* Special handling of menustyle, pickup_burden, pickup_types,
-- * disclose, runmode, msg_window, menu_headings, and number_pad options.
-+ * disclose, runmode, msg_window, menu_headings, number_pad and sortloot
- #ifdef AUTOPICKUP_EXCEPTIONS
- * Also takes care of interactive autopickup_exception_handling changes.
- #endif
-@@ -2858,6 +2889,26 @@ boolean setinitial,setfromfile;
- }
- destroy_nhwindow(tmpwin);
- retval = TRUE;
-+#ifdef SORTLOOT
-+ } else if (!strcmp("sortloot", optname)) {
-+ const char *sortl_name;
-+ menu_item *sortl_pick = (menu_item *)0;
-+ tmpwin = create_nhwindow(NHW_MENU);
-+ start_menu(tmpwin);
-+ for (i = 0; i < SIZE(sortltype); i++) {
-+ sortl_name = sortltype[i];
-+ any.a_char = *sortl_name;
-+ add_menu(tmpwin, NO_GLYPH, &any, *sortl_name, 0,
-+ ATR_NONE, sortl_name, MENU_UNSELECTED);
-+ }
-+ end_menu(tmpwin, "Select loot sorting type:");
-+ if (select_menu(tmpwin, PICK_ONE, &sortl_pick) > 0) {
-+ iflags.sortloot = sortl_pick->item.a_char;
-+ free((genericptr_t)sortl_pick);
-+ }
-+ destroy_nhwindow(tmpwin);
-+ retval = TRUE;
-+#endif
- }
- #endif
- else if (!strcmp("align_message", optname) ||
-@@ -3239,6 +3290,17 @@ char *buf;
- if (iflags.wc_scroll_margin) Sprintf(buf, "%d",iflags.wc_scroll_margin);
- else Strcpy(buf, defopt);
- }
-+#ifdef SORTLOOT
-+ else if (!strcmp(optname, "sortloot")) {
-+ char *sortname = (char *)NULL;
-+ for (i=0; i < SIZE(sortltype) && sortname==(char *)NULL; i++) {
-+ if (iflags.sortloot == sortltype[i][0])
-+ sortname = (char *)sortltype[i];
-+ }
-+ if (sortname != (char *)NULL)
-+ Sprintf(buf, "%s", sortname);
-+ }
-+#endif
- else if (!strcmp(optname, "player_selection"))
- Sprintf(buf, "%s", iflags.wc_player_selection ? "prompts" : "dialog");
- #ifdef MSDOS
-diff --git a/src/pickup.c b/src/pickup.c
-index 07be607..8dea122 100644
---- a/src/pickup.c
-+++ b/src/pickup.c
-@@ -690,9 +690,15 @@ menu_item **pick_list; /* return list of items picked */
- int how; /* type of query */
- boolean FDECL((*allow), (OBJ_P));/* allow function */
- {
-+#ifdef SORTLOOT
-+ int i, j;
-+#endif
- int n;
- winid win;
- struct obj *curr, *last;
-+#ifdef SORTLOOT
-+ struct obj **oarray;
-+#endif
- char *pack;
- anything any;
- boolean printed_type_name;
-@@ -717,6 +723,33 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */
- return 1;
- }
-
-+#ifdef SORTLOOT
-+ /* Make a temporary array to store the objects sorted */
-+ oarray = (struct obj **)alloc(n*sizeof(struct obj*));
-+
-+ /* Add objects to the array */
-+ i = 0;
-+ for (curr = olist; curr; curr = FOLLOW(curr, qflags)) {
-+ if ((*allow)(curr)) {
-+ if (iflags.sortloot == 'f' ||
-+ (iflags.sortloot == 'l' && !(qflags & USE_INVLET)))
-+ {
-+ /* Insert object at correct index */
-+ for (j = i; j; j--)
-+ {
-+ if (strcmpi(cxname2(curr), cxname2(oarray[j-1]))>0) break;
-+ oarray[j] = oarray[j-1];
-+ }
-+ oarray[j] = curr;
-+ i++;
-+ } else {
-+ /* Just add it to the array */
-+ oarray[i++] = curr;
-+ }
-+ }
-+ }
-+#endif /* SORTLOOT */
-+
- win = create_nhwindow(NHW_MENU);
- start_menu(win);
- any.a_obj = (struct obj *) 0;
-@@ -730,7 +763,12 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */
- pack = flags.inv_order;
- do {
- printed_type_name = FALSE;
-+#ifdef SORTLOOT
-+ for (i = 0; i < n; i++) {
-+ curr = oarray[i];
-+#else /* SORTLOOT */
- for (curr = olist; curr; curr = FOLLOW(curr, qflags)) {
-+#endif /* SORTLOOT */
- if ((qflags & FEEL_COCKATRICE) && curr->otyp == CORPSE &&
- will_feel_cockatrice(curr, FALSE)) {
- destroy_nhwindow(win); /* stop the menu and revert */
-@@ -758,6 +796,9 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */
- pack++;
- } while (qflags & INVORDER_SORT && *pack);
-
-+#ifdef SORTLOOT
-+ free(oarray);
-+#endif
- end_menu(win, qstr);
- n = select_menu(win, how, pick_list);
- destroy_nhwindow(win);
diff --git a/debian/patches/0016-fix-non-constant-format-strings.patch b/debian/patches/0016-fix-non-constant-format-strings.patch
deleted file mode 100644
index 94dabc6..0000000
--- a/debian/patches/0016-fix-non-constant-format-strings.patch
+++ /dev/null
@@ -1,1414 +0,0 @@
-From 01b718a7e0faa11ba36313b661e38e345f49231d Mon Sep 17 00:00:00 2001
-From: "Bernhard R. Link" <brlink at debian.org>
-Date: Sun, 10 Jun 2012 14:28:44 +0200
-Subject: fix non-constant format strings
-
-With the default dpkg-buildflags, gcc reports format strings it
-cannot check as errors. This patch avoids all cases where gcc
-complains.
----
- include/extern.h | 1 +
- src/apply.c | 58 +++++++++++++++++++++++++++---------------------------
- src/artifact.c | 2 +-
- src/botl.c | 4 ++--
- src/cmd.c | 8 ++++----
- src/detect.c | 4 ++--
- src/dig.c | 2 +-
- src/do.c | 10 +++++-----
- src/dothrow.c | 2 +-
- src/dungeon.c | 2 +-
- src/eat.c | 6 +++---
- src/engrave.c | 8 ++++----
- src/hack.c | 6 +++---
- src/invent.c | 12 +++++------
- src/lock.c | 2 +-
- src/mail.c | 2 +-
- src/makemon.c | 2 +-
- src/mcastu.c | 2 +-
- src/mhitu.c | 8 ++++----
- src/mon.c | 2 +-
- src/mthrowu.c | 2 +-
- src/muse.c | 4 ++--
- src/pline.c | 6 ++++++
- src/polyself.c | 4 ++--
- src/potion.c | 6 +++---
- src/pray.c | 2 +-
- src/priest.c | 6 +++---
- src/questpgr.c | 2 +-
- src/read.c | 18 ++++++++---------
- src/region.c | 4 ++--
- src/restore.c | 2 +-
- src/rumors.c | 4 ++--
- src/shk.c | 6 +++---
- src/sounds.c | 18 ++++++++---------
- src/spell.c | 2 +-
- src/steed.c | 2 +-
- src/teleport.c | 12 +++++------
- src/timeout.c | 8 ++++----
- src/trap.c | 4 ++--
- src/uhitm.c | 2 +-
- src/zap.c | 24 +++++++++++-----------
- 41 files changed, 144 insertions(+), 137 deletions(-)
-
-diff --git a/include/extern.h b/include/extern.h
-index 4c0225a..3e986b3 100644
---- a/include/extern.h
-+++ b/include/extern.h
-@@ -1525,6 +1525,7 @@ E boolean FDECL(is_autopickup_exception, (struct obj *, BOOLEAN_P));
- /* ### pline.c ### */
-
- E void VDECL(pline, (const char *,...)) PRINTF_F(1,2);
-+E void FDECL(plines, (const char *));
- E void VDECL(Norep, (const char *,...)) PRINTF_F(1,2);
- E void NDECL(free_youbuf);
- E void VDECL(You, (const char *,...)) PRINTF_F(1,2);
-diff --git a/src/apply.c b/src/apply.c
-index f45e196..25f5b40 100644
---- a/src/apply.c
-+++ b/src/apply.c
-@@ -62,7 +62,7 @@ use_camera(obj)
- if(!getdir((char *)0)) return(0);
-
- if (obj->spe <= 0) {
-- pline(nothing_happens);
-+ plines(nothing_happens);
- return (1);
- }
- consume_obj_charge(obj, TRUE);
-@@ -802,7 +802,7 @@ struct obj **optr;
- if (!obj->cursed)
- (void) openit();
- else
-- pline(nothing_happens);
-+ plines(nothing_happens);
-
- } else if (obj->cursed) {
- coord mm;
-@@ -834,7 +834,7 @@ struct obj **optr;
- }
- res += openit();
- switch (res) {
-- case 0: pline(nothing_happens); break;
-+ case 0: plines(nothing_happens); break;
- case 1: pline("%s opens...", Something);
- learno = TRUE; break;
- default: pline("Things open around you...");
-@@ -846,7 +846,7 @@ struct obj **optr;
- amii_speaker( obj, "AeFeaeFeAefegw", AMII_OKAY_VOLUME );
- #endif
- if (findit() != 0) learno = TRUE;
-- else pline(nothing_happens);
-+ else plines(nothing_happens);
- }
-
- } /* charged BofO */
-@@ -1192,12 +1192,12 @@ dorub()
- update_inventory();
- } else if (rn2(2) && !Blind)
- You("see a puff of smoke.");
-- else pline(nothing_happens);
-+ else plines(nothing_happens);
- } else if (obj->otyp == BRASS_LANTERN) {
- /* message from Adventure */
- pline("Rubbing the electric lamp is not particularly rewarding.");
- pline("Anyway, nothing exciting happens.");
-- } else pline(nothing_happens);
-+ } else plines(nothing_happens);
- return 1;
- }
-
-@@ -1510,7 +1510,7 @@ struct obj *obj;
- }
-
- if (trouble_count == 0) {
-- pline(nothing_happens);
-+ plines(nothing_happens);
- return;
- } else if (trouble_count > 1) { /* shuffle */
- int i, j, k;
-@@ -1888,7 +1888,7 @@ struct obj *tstone;
- }
-
- if (Blind) {
-- pline(scritch);
-+ plines(scritch);
- return;
- } else if (Hallucination) {
- pline("Oh wow, man: Fractals!");
-@@ -1966,7 +1966,7 @@ struct obj *tstone;
- else if (streak_color)
- pline("You see %s streaks on the %s.", streak_color, stonebuf);
- else
-- pline(scritch);
-+ plines(scritch);
- return;
- }
-
-@@ -2172,7 +2172,7 @@ struct obj *obj;
- You("wrap your bullwhip around %s on the %s.",
- an(singular(otmp, xname)), surface(u.ux, u.uy));
- if (rnl(6) || pickup_object(otmp, 1L, TRUE) < 1)
-- pline(msg_slipsfree);
-+ plines(msg_slipsfree);
- return 1;
- }
- }
-@@ -2213,7 +2213,7 @@ struct obj *obj;
- wrapped_what = strcpy(buf, mon_nam(mtmp));
- } else if (proficient) {
- if (attack(mtmp)) return 1;
-- else pline(msg_snap);
-+ else plines(msg_snap);
- }
- }
- if (!wrapped_what) {
-@@ -2235,10 +2235,10 @@ struct obj *obj;
- vision_full_recalc = 1;
- }
- } else {
-- pline(msg_slipsfree);
-+ plines(msg_slipsfree);
- }
- if (mtmp) wakeup(mtmp);
-- } else pline(msg_snap);
-+ } else plines(msg_snap);
-
- } else if (mtmp) {
- if (!canspotmon(mtmp) &&
-@@ -2330,7 +2330,7 @@ struct obj *obj;
- break;
- }
- } else {
-- pline(msg_slipsfree);
-+ plines(msg_slipsfree);
- }
- wakeup(mtmp);
- } else {
-@@ -2340,7 +2340,7 @@ struct obj *obj;
- else You("flick your bullwhip towards %s.", mon_nam(mtmp));
- if (proficient) {
- if (attack(mtmp)) return 1;
-- else pline(msg_snap);
-+ else plines(msg_snap);
- }
- }
-
-@@ -2349,7 +2349,7 @@ struct obj *obj;
- You("snap your whip through thin air.");
-
- } else {
-- pline(msg_snap);
-+ plines(msg_snap);
-
- }
- return 1;
-@@ -2374,7 +2374,7 @@ use_pole (obj)
-
- /* Are you allowed to use the pole? */
- if (u.uswallow) {
-- pline(not_enough_room);
-+ plines(not_enough_room);
- return (0);
- }
- if (obj != uwep) {
-@@ -2384,7 +2384,7 @@ use_pole (obj)
- /* assert(obj == uwep); */
-
- /* Prompt for a location */
-- pline(where_to_hit);
-+ plines(where_to_hit);
- cc.x = u.ux;
- cc.y = u.uy;
- if (getpos(&cc, TRUE, "the spot to hit") < 0)
-@@ -2404,10 +2404,10 @@ use_pole (obj)
- } else if (!cansee(cc.x, cc.y) &&
- ((mtmp = m_at(cc.x, cc.y)) == (struct monst *)0 ||
- !canseemon(mtmp))) {
-- You(cant_see_spot);
-+ You("%s", cant_see_spot);
- return (res);
- } else if (!couldsee(cc.x, cc.y)) { /* Eyes of the Overworld */
-- You(cant_reach);
-+ You("%s", cant_reach);
- return res;
- }
-
-@@ -2426,7 +2426,7 @@ use_pole (obj)
- u.uconduct.weaphit++;
- } else
- /* Now you know that nothing is there... */
-- pline(nothing_happens);
-+ plines(nothing_happens);
- return (1);
- }
-
-@@ -2480,7 +2480,7 @@ use_grapple (obj)
-
- /* Are you allowed to use the hook? */
- if (u.uswallow) {
-- pline(not_enough_room);
-+ plines(not_enough_room);
- return (0);
- }
- if (obj != uwep) {
-@@ -2490,7 +2490,7 @@ use_grapple (obj)
- /* assert(obj == uwep); */
-
- /* Prompt for a location */
-- pline(where_to_hit);
-+ plines(where_to_hit);
- cc.x = u.ux;
- cc.y = u.uy;
- if (getpos(&cc, TRUE, "the spot to hit") < 0)
-@@ -2505,10 +2505,10 @@ use_grapple (obj)
- pline("Too far!");
- return (res);
- } else if (!cansee(cc.x, cc.y)) {
-- You(cant_see_spot);
-+ You("%s", cant_see_spot);
- return (res);
- } else if (!couldsee(cc.x, cc.y)) { /* Eyes of the Overworld */
-- You(cant_reach);
-+ You("%s", cant_reach);
- return res;
- }
-
-@@ -2588,7 +2588,7 @@ use_grapple (obj)
- }
- break;
- }
-- pline(nothing_happens);
-+ plines(nothing_happens);
- return (1);
- }
-
-@@ -2638,7 +2638,7 @@ do_break_wand(obj)
- setnotworn(obj); /* so we need to do this ourselves */
-
- if (obj->spe <= 0) {
-- pline(nothing_else_happens);
-+ plines(nothing_else_happens);
- goto discard_broken_wand;
- }
- obj->ox = u.ux;
-@@ -2654,7 +2654,7 @@ do_break_wand(obj)
- case WAN_ENLIGHTENMENT:
- case WAN_OPENING:
- case WAN_SECRET_DOOR_DETECTION:
-- pline(nothing_else_happens);
-+ plines(nothing_else_happens);
- goto discard_broken_wand;
- case WAN_DEATH:
- case WAN_LIGHTNING:
-@@ -2989,7 +2989,7 @@ doapply()
- (const char *)0);
- makeknown(HORN_OF_PLENTY);
- } else
-- pline(nothing_happens);
-+ plines(nothing_happens);
- break;
- case LAND_MINE:
- case BEARTRAP:
-diff --git a/src/artifact.c b/src/artifact.c
-index ef27bd5..8336d20 100644
---- a/src/artifact.c
-+++ b/src/artifact.c
-@@ -1191,7 +1191,7 @@ arti_invoke(obj)
- if(obj->otyp == CRYSTAL_BALL)
- use_crystal_ball(obj);
- else
-- pline(nothing_happens);
-+ plines(nothing_happens);
- return 1;
- }
-
-diff --git a/src/botl.c b/src/botl.c
-index 7defa38..dea4361 100644
---- a/src/botl.c
-+++ b/src/botl.c
-@@ -195,9 +195,9 @@ bot1()
- mbot[k] += 'A' - 'a';
- k++;
- }
-- Sprintf(nb = eos(nb), mbot);
-+ Sprintf(nb = eos(nb), "%s", mbot);
- } else
-- Sprintf(nb = eos(nb), rank());
-+ Sprintf(nb = eos(nb), "%s", rank());
-
- Sprintf(nb = eos(nb)," ");
- i = mrank_sz + 15;
-diff --git a/src/cmd.c b/src/cmd.c
-index c85d851..22487f7 100644
---- a/src/cmd.c
-+++ b/src/cmd.c
-@@ -602,7 +602,7 @@ wiz_level_change()
- else ret = sscanf(buf, "%d", &newlevel);
-
- if (ret != 1) {
-- pline(Never_mind);
-+ plines(Never_mind);
- return 0;
- }
- if (newlevel == u.ulevel) {
-@@ -2447,7 +2447,7 @@ coord *cc;
- {
- xchar new_x, new_y;
- if (!getdir(prompt)) {
-- pline(Never_mind);
-+ plines(Never_mind);
- return 0;
- }
- new_x = x + u.dx;
-@@ -2456,7 +2456,7 @@ coord *cc;
- cc->x = new_x;
- cc->y = new_y;
- } else {
-- if (emsg) pline(emsg);
-+ if (emsg) plines(emsg);
- return 0;
- }
- return 1;
-@@ -2727,7 +2727,7 @@ parse()
- if (multi > 9) {
- clear_nhwindow(WIN_MESSAGE);
- Sprintf(in_line, "Count: %d", multi);
-- pline(in_line);
-+ plines(in_line);
- mark_synch();
- }
- last_multi = multi;
-diff --git a/src/detect.c b/src/detect.c
-index 5da025f..6f5ca5e 100644
---- a/src/detect.c
-+++ b/src/detect.c
-@@ -808,7 +808,7 @@ struct obj *obj;
- case 3 : if (!resists_blnd(&youmonst)) {
- pline("%s your vision!", Tobjnam(obj, "damage"));
- make_blinded(Blinded + rnd(100),FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- } else {
- pline("%s your vision.", Tobjnam(obj, "assault"));
- You("are unaffected!");
-@@ -857,7 +857,7 @@ struct obj *obj;
- ch = yn_function("What do you look for?", (char *)0, '\0');
- /* Don't filter out ' ' here; it has a use */
- if ((ch != def_monsyms[S_GHOST]) && index(quitchars,ch)) {
-- if (flags.verbose) pline(Never_mind);
-+ if (flags.verbose) plines(Never_mind);
- return;
- }
- You("peer into %s...", the(xname(obj)));
-diff --git a/src/dig.c b/src/dig.c
-index 4c40a59..a93bebd 100644
---- a/src/dig.c
-+++ b/src/dig.c
-@@ -379,7 +379,7 @@ dig()
- feel_location(dpx, dpy);
- else
- newsym(dpx, dpy);
-- if(digtxt && !digging.quiet) pline(digtxt); /* after newsym */
-+ if(digtxt && !digging.quiet) plines(digtxt); /* after newsym */
- if(dmgtxt)
- pay_for_damage(dmgtxt, FALSE);
-
-diff --git a/src/do.c b/src/do.c
-index 858777f..42234a2 100644
---- a/src/do.c
-+++ b/src/do.c
-@@ -1310,7 +1310,7 @@ boolean at_stairs, falling, portal;
- Sprintf(buf, mesg, !Blind ? "looks" : "seems");
- mesg = buf;
- }
-- if (mesg) pline(mesg);
-+ if (mesg) plines(mesg);
- }
-
- #ifdef REINCARNATION
-@@ -1422,8 +1422,8 @@ final_level()
- }
- }
-
--static char *dfr_pre_msg = 0, /* pline() before level change */
-- *dfr_post_msg = 0; /* pline() after level change */
-+static char *dfr_pre_msg = 0, /* plines() before level change */
-+ *dfr_post_msg = 0; /* plines() after level change */
-
- /* change levels at the end of this turn, after monsters finish moving */
- void
-@@ -1459,7 +1459,7 @@ deferred_goto()
- int typmask = u.utotype; /* save it; goto_level zeroes u.utotype */
-
- assign_level(&dest, &u.utolev);
-- if (dfr_pre_msg) pline(dfr_pre_msg);
-+ if (dfr_pre_msg) plines(dfr_pre_msg);
- goto_level(&dest, !!(typmask&1), !!(typmask&2), !!(typmask&4));
- if (typmask & 0200) { /* remove portal */
- struct trap *t = t_at(u.ux, u.uy);
-@@ -1469,7 +1469,7 @@ deferred_goto()
- newsym(u.ux, u.uy);
- }
- }
-- if (dfr_post_msg) pline(dfr_post_msg);
-+ if (dfr_post_msg) plines(dfr_post_msg);
- }
- u.utotype = 0; /* our caller keys off of this */
- if (dfr_pre_msg)
-diff --git a/src/dothrow.c b/src/dothrow.c
-index 2c4389a..325ea88 100644
---- a/src/dothrow.c
-+++ b/src/dothrow.c
-@@ -770,7 +770,7 @@ boolean hitsroof;
- pline("It blinds you!");
- u.ucreamed += blindinc;
- make_blinded(Blinded + (long)blindinc, FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- }
- break;
- default:
-diff --git a/src/dungeon.c b/src/dungeon.c
-index b87b8bb..ff5c394 100644
---- a/src/dungeon.c
-+++ b/src/dungeon.c
-@@ -674,7 +674,7 @@ init_dungeons() /* initialize the "dungeon" structs */
- interject_assistance(1, INTERJECT_PANIC, (genericptr_t)tbuf,
- (genericptr_t)fqn_prefix[DATAPREFIX]);
- #endif
-- panic(tbuf);
-+ panic("%s", tbuf);
- }
-
- /* validate the data's version against the program's version */
-diff --git a/src/eat.c b/src/eat.c
-index 12e8d9b..27fe5bf 100644
---- a/src/eat.c
-+++ b/src/eat.c
-@@ -422,7 +422,7 @@ boolean message;
- occupation = 0; /* do this early, so newuhs() knows we're done */
- newuhs(FALSE);
- if (nomovemsg) {
-- if (message) pline(nomovemsg);
-+ if (message) plines(nomovemsg);
- nomovemsg = 0;
- } else if (message)
- You("finish eating %s.", food_xname(victual.piece, TRUE));
-@@ -1208,7 +1208,7 @@ struct obj *obj;
- } else if(!rn2(4) && !Blind) {
- pline("Everything suddenly goes dark.");
- make_blinded((long)d(2,10),FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- } else if(!rn2(3)) {
- const char *what, *where;
- if (!Blind)
-@@ -2360,7 +2360,7 @@ boolean incr;
- break;
- case WEAK:
- if (Hallucination)
-- pline((!incr) ?
-+ plines((!incr) ?
- "You still have the munchies." :
- "The munchies are interfering with your motor capabilities.");
- else if (incr &&
-diff --git a/src/engrave.c b/src/engrave.c
-index fe09b4f..11b1be4 100644
---- a/src/engrave.c
-+++ b/src/engrave.c
-@@ -890,7 +890,7 @@ doengrave()
- c = yn_function("Do you want to add to the current engraving?",
- ynqchars, 'y');
- if (c == 'q') {
-- pline(Never_mind);
-+ plines(Never_mind);
- return(0);
- }
- }
-@@ -983,7 +983,7 @@ doengrave()
- Tobjnam(otmp, "glow"), otense(otmp, "fade"));
- return(1);
- } else {
-- pline(Never_mind);
-+ plines(Never_mind);
- return(0);
- }
- }
-@@ -1100,12 +1100,12 @@ doengrave()
-
- make_engr_at(u.ux, u.uy, buf, (moves - multi), type);
-
-- if (post_engr_text[0]) pline(post_engr_text);
-+ if (post_engr_text[0]) plines(post_engr_text);
-
- if (doblind && !resists_blnd(&youmonst)) {
- You("are blinded by the flash!");
- make_blinded((long)rnd(50),FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- }
-
- return(1);
-diff --git a/src/hack.c b/src/hack.c
-index 0e89c3b..e636549 100644
---- a/src/hack.c
-+++ b/src/hack.c
-@@ -423,7 +423,7 @@ still_chewing(x,y)
-
- unblock_point(x, y); /* vision */
- newsym(x, y);
-- if (digtxt) You(digtxt); /* after newsym */
-+ if (digtxt) You("%s", digtxt); /* after newsym */
- if (dmgtxt) pay_for_damage(dmgtxt, FALSE);
- (void) memset((genericptr_t)&digging, 0, sizeof digging);
- return 0;
-@@ -2082,7 +2082,7 @@ const char *msg_override;
- multi = 0; /* caller will usually have done this already */
- if (msg_override) nomovemsg = msg_override;
- else if (!nomovemsg) nomovemsg = You_can_move_again;
-- if (*nomovemsg) pline(nomovemsg);
-+ if (*nomovemsg) plines(nomovemsg);
- nomovemsg = 0;
- u.usleep = 0;
- if (afternmv) (*afternmv)();
-@@ -2257,7 +2257,7 @@ const char *str;
- {
- if(near_capacity() >= EXT_ENCUMBER) {
- if(str)
-- pline(str);
-+ plines(str);
- else
- You_cant("do that while carrying so much stuff.");
- return 1;
-diff --git a/src/invent.c b/src/invent.c
-index a35da0a..ee401c5 100644
---- a/src/invent.c
-+++ b/src/invent.c
-@@ -976,7 +976,7 @@ register const char *let,*word;
- }
- if(index(quitchars,ilet)) {
- if(flags.verbose)
-- pline(Never_mind);
-+ plines(Never_mind);
- return((struct obj *)0);
- }
- if(ilet == '-') {
-@@ -1035,7 +1035,7 @@ register const char *let,*word;
- }
- if(ilet == '\033') {
- if(flags.verbose)
-- pline(Never_mind);
-+ plines(Never_mind);
- return((struct obj *)0);
- }
- /* they typed a letter (not a space) at the prompt */
-@@ -2347,7 +2347,7 @@ boolean picked_some;
- Sprintf(fbuf, "There is %s here.", an(dfeature));
-
- if (!otmp || is_lava(u.ux,u.uy) || (is_pool(u.ux,u.uy) && !Underwater)) {
-- if (dfeature) pline(fbuf);
-+ if (dfeature) plines(fbuf);
- read_engr_at(u.ux, u.uy); /* Eric Backus */
- if (!skip_objects && (Blind || !dfeature))
- You("%s no objects here.", verb);
-@@ -2356,14 +2356,14 @@ boolean picked_some;
- /* we know there is something here */
-
- if (skip_objects) {
-- if (dfeature) pline(fbuf);
-+ if (dfeature) plines(fbuf);
- read_engr_at(u.ux, u.uy); /* Eric Backus */
- There("are %s%s objects here.",
- (obj_cnt <= 10) ? "several" : "many",
- picked_some ? " more" : "");
- } else if (!otmp->nexthere) {
- /* only one object */
-- if (dfeature) pline(fbuf);
-+ if (dfeature) plines(fbuf);
- read_engr_at(u.ux, u.uy); /* Eric Backus */
- #ifdef INVISIBLE_OBJECTS
- if (otmp->oinvis && !See_invisible) verb = "feel";
-@@ -2817,7 +2817,7 @@ doorganize() /* inventory organizer by Del Lamb */
- Sprintf(qbuf, "Adjust letter to what [%s]?",buf);
- let = yn_function(qbuf, (char *)0, '\0');
- if(index(quitchars,let)) {
-- pline(Never_mind);
-+ plines(Never_mind);
- return(0);
- }
- if (let == '@' || !letter(let))
-diff --git a/src/lock.c b/src/lock.c
-index 4d5d333..f73b503 100644
---- a/src/lock.c
-+++ b/src/lock.c
-@@ -862,7 +862,7 @@ int x, y;
- default: impossible("magic (%d) attempted on door.", otmp->otyp);
- break;
- }
-- if (msg && cansee(x,y)) pline(msg);
-+ if (msg && cansee(x,y)) plines(msg);
- if (loudness > 0) {
- /* door was destroyed */
- wake_nearto(x, y, loudness);
-diff --git a/src/mail.c b/src/mail.c
-index 9b1e4f6..dd8fb4a 100644
---- a/src/mail.c
-+++ b/src/mail.c
-@@ -321,7 +321,7 @@ md_rush(md,tx,ty)
- if (fx == tx && fy == ty) break;
-
- if ((mon = m_at(fx,fy)) != 0) /* save monster at this position */
-- verbalize(md_exclamations());
-+ verbalize("%s", md_exclamations());
- else if (fx == u.ux && fy == u.uy)
- verbalize("Excuse me.");
-
-diff --git a/src/makemon.c b/src/makemon.c
-index 89098dd..32ae932 100644
---- a/src/makemon.c
-+++ b/src/makemon.c
-@@ -1779,7 +1779,7 @@ struct obj *bag;
- if (!bag || bag->otyp != BAG_OF_TRICKS) {
- impossible("bad bag o' tricks");
- } else if (bag->spe < 1) {
-- pline(nothing_happens);
-+ plines(nothing_happens);
- } else {
- boolean gotone = FALSE;
- int cnt = 1;
-diff --git a/src/mcastu.c b/src/mcastu.c
-index 93d3b8d..549caf4 100644
---- a/src/mcastu.c
-+++ b/src/mcastu.c
-@@ -590,7 +590,7 @@ int spellnum;
- (num_eyes == 1) ?
- body_part(EYE) : makeplural(body_part(EYE)));
- make_blinded(Half_spell_damage ? 100L : 200L, FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- dmg = 0;
- } else
- impossible("no reason for monster to cast blindness spell?");
-diff --git a/src/mhitu.c b/src/mhitu.c
-index c0711fc..7df5b5e 100644
---- a/src/mhitu.c
-+++ b/src/mhitu.c
-@@ -1036,7 +1036,7 @@ hitmu(mtmp, mattk)
- if (can_blnd(mtmp, &youmonst, mattk->aatyp, (struct obj*)0)) {
- if (!Blind) pline("%s blinds you!", Monnam(mtmp));
- make_blinded(Blinded+(long)dmg,FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- }
- dmg = 0;
- break;
-@@ -1742,7 +1742,7 @@ gulpmu(mtmp, mattk) /* monster swallows you, or damage if u.uswallow */
- if(!Blind) {
- You_cant("see in here!");
- make_blinded((long)tmp,FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- } else
- /* keep him blind until disgorged */
- make_blinded(Blinded+1,FALSE);
-@@ -1858,7 +1858,7 @@ common:
- if (mon_visible(mtmp) || (rnd(tmp /= 2) > u.ulevel)) {
- You("are blinded by a blast of light!");
- make_blinded((long)tmp, FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- } else if (flags.verbose)
- You("get the impression it was not terribly bright.");
- }
-@@ -1985,7 +1985,7 @@ gazemu(mtmp, mattk) /* monster gazes at you */
- /* not blind at this point implies you're wearing
- the Eyes of the Overworld; make them block this
- particular stun attack too */
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- else make_stunned((long)d(1,3),TRUE);
- }
- break;
-diff --git a/src/mon.c b/src/mon.c
-index c769953..74bb15c 100644
---- a/src/mon.c
-+++ b/src/mon.c
-@@ -2370,7 +2370,7 @@ struct monst *mon;
- You("cannot polymorph %s into that.", mon_nam(mon));
- else break;
- } while(++tries < 5);
-- if (tries==5) pline(thats_enough_tries);
-+ if (tries==5) plines(thats_enough_tries);
- }
- #endif /*WIZARD*/
- if (mndx == NON_PM) mndx = rn1(SPECIAL_PM - LOW_PM, LOW_PM);
-diff --git a/src/mthrowu.c b/src/mthrowu.c
-index 3038ced..0ce7832 100644
---- a/src/mthrowu.c
-+++ b/src/mthrowu.c
-@@ -450,7 +450,7 @@ m_throw(mon, x, y, dx, dy, range, obj)
- if (blindinc) {
- u.ucreamed += blindinc;
- make_blinded(Blinded + (long)blindinc, FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- }
- }
-
-diff --git a/src/muse.c b/src/muse.c
-index 86044e5..5628181 100644
---- a/src/muse.c
-+++ b/src/muse.c
-@@ -79,7 +79,7 @@ struct obj *obj;
- m_useup(mon, obj);
- mtmp = makemon(&mons[PM_GHOST], cc.x, cc.y, NO_MM_FLAGS);
- if (!mtmp) {
-- if (vis) pline(empty);
-+ if (vis) plines(empty);
- } else {
- if (vis) {
- pline("As %s opens the bottle, an enormous %s emerges!",
-@@ -102,7 +102,7 @@ struct obj *obj;
- m_useup(mon, obj);
- mtmp = makemon(&mons[PM_DJINNI], cc.x, cc.y, NO_MM_FLAGS);
- if (!mtmp) {
-- if (vis) pline(empty);
-+ if (vis) plines(empty);
- } else {
- if (vis)
- pline("In a cloud of smoke, %s emerges!",
-diff --git a/src/pline.c b/src/pline.c
-index 8210f8d..4f1149f 100644
---- a/src/pline.c
-+++ b/src/pline.c
-@@ -55,6 +55,12 @@ pline VA_DECL(const char *, line)
- Vsprintf(pbuf,line,VA_ARGS);
- line = pbuf;
- }
-+ plines(line);
-+}
-+
-+void
-+plines(const char *line) {
-+ if (!line || !*line) return;
- if (!iflags.window_inited) {
- raw_print(line);
- return;
-diff --git a/src/polyself.c b/src/polyself.c
-index b051acb..2f6552c 100644
---- a/src/polyself.c
-+++ b/src/polyself.c
-@@ -234,7 +234,7 @@ boolean forcecontrol;
-
- if(!Polymorph_control && !forcecontrol && !draconian && !iswere && !isvamp) {
- if (rn2(20) > ACURR(A_CON)) {
-- You(shudder_for_moment);
-+ You("%s", shudder_for_moment);
- losehp(rnd(30), "system shock", KILLED_BY_AN);
- exercise(A_CON, FALSE);
- return;
-@@ -256,7 +256,7 @@ boolean forcecontrol;
- You("cannot polymorph into that.");
- else break;
- } while(++tries < 5);
-- if (tries==5) pline(thats_enough_tries);
-+ if (tries==5) plines(thats_enough_tries);
- /* allow skin merging, even when polymorph is controlled */
- if (draconian &&
- (mntmp == armor_to_dragon(uarm->otyp) || tries == 5))
-diff --git a/src/potion.c b/src/potion.c
-index 04abd41..d4baf04 100644
---- a/src/potion.c
-+++ b/src/potion.c
-@@ -932,7 +932,7 @@ register const char *txt;
- You("have a %s feeling for a moment, then it passes.",
- Hallucination ? "normal" : "strange");
- else
-- pline(txt);
-+ plines(txt);
-
- if(!obj) /* e.g., crystal ball finds no traps */
- return;
-@@ -1280,7 +1280,7 @@ register struct obj *obj;
- pline("It suddenly gets dark.");
- }
- make_blinded(itimeout_incr(Blinded, rnd(5)), FALSE);
-- if (!Blind && !u.usleep) Your(vision_clears);
-+ if (!Blind && !u.usleep) Your("%s", vision_clears);
- break;
- case POT_WATER:
- if(u.umonnum == PM_GREMLIN) {
-@@ -1633,7 +1633,7 @@ dodip()
- obj == uball || obj == uskin ||
- obj_resists(obj->otyp == POT_POLYMORPH ?
- potion : obj, 5, 95)) {
-- pline(nothing_happens);
-+ plines(nothing_happens);
- } else {
- boolean was_wep = FALSE, was_swapwep = FALSE, was_quiver = FALSE;
- short save_otyp = obj->otyp;
-diff --git a/src/pray.c b/src/pray.c
-index 3caa8c4..d34046e 100644
---- a/src/pray.c
-+++ b/src/pray.c
-@@ -1333,7 +1333,7 @@ verbalize("In return for thy service, I grant thee the gift of Immortality!");
- } /* fake Amulet */
-
- if (value == 0) {
-- pline(nothing_happens);
-+ plines(nothing_happens);
- return (1);
- }
-
-diff --git a/src/priest.c b/src/priest.c
-index 5681930..effd0db 100644
---- a/src/priest.c
-+++ b/src/priest.c
-@@ -363,8 +363,8 @@ register int roomno;
- msg1 = buf;
- }
- if (can_speak) {
-- verbalize(msg1);
-- if (msg2) verbalize(msg2);
-+ verbalize("%s", msg1);
-+ if (msg2) verbalize("%s", msg2);
- }
- if(!sanctum) {
- /* !tended -> !shrined */
-@@ -433,7 +433,7 @@ register struct monst *priest;
- priest->mcanmove = 1;
- }
- priest->mpeaceful = 0;
-- verbalize(cranky_msg[rn2(3)]);
-+ verbalize("%s", cranky_msg[rn2(3)]);
- return;
- }
-
-diff --git a/src/questpgr.c b/src/questpgr.c
-index b4b80af..130169f 100644
---- a/src/questpgr.c
-+++ b/src/questpgr.c
-@@ -364,7 +364,7 @@ struct qtmsg *qt_msg;
- for (size = 0; size < qt_msg->size; size += (long)strlen(in_line)) {
- (void) dlb_fgets(in_line, 80, msg_file);
- convert_line();
-- pline(out_line);
-+ plines(out_line);
- }
-
- }
-diff --git a/src/read.c b/src/read.c
-index ab530f0..743d13a 100644
---- a/src/read.c
-+++ b/src/read.c
-@@ -156,14 +156,14 @@ static void
- stripspe(obj)
- register struct obj *obj;
- {
-- if (obj->blessed) pline(nothing_happens);
-+ if (obj->blessed) plines(nothing_happens);
- else {
- if (obj->spe > 0) {
- obj->spe = 0;
- if (obj->otyp == OIL_LAMP || obj->otyp == BRASS_LANTERN)
- obj->age = 0;
- Your("%s %s briefly.",xname(obj), otense(obj, "vibrate"));
-- } else pline(nothing_happens);
-+ } else plines(nothing_happens);
- }
- }
-
-@@ -320,7 +320,7 @@ int curse_bless;
- if (obj->spe < 3)
- Your("marker seems permanently dried out.");
- else
-- pline(nothing_happens);
-+ plines(nothing_happens);
- } else if (is_blessed) {
- n = rn1(16,15); /* 15..30 */
- if (obj->spe + n <= 50)
-@@ -378,7 +378,7 @@ int curse_bless;
- if (obj->spe < 5) {
- obj->spe++;
- p_glow1(obj);
-- } else pline(nothing_happens);
-+ } else plines(nothing_happens);
- }
- break;
- case HORN_OF_PLENTY:
-@@ -1284,7 +1284,7 @@ register struct obj *sobj;
- cc.x = u.ux;
- cc.y = u.uy;
- if (getpos(&cc, TRUE, "the desired position") < 0) {
-- pline(Never_mind);
-+ plines(Never_mind);
- return 0;
- }
- if (!cansee(cc.x, cc.y) || distu(cc.x, cc.y) >= 32) {
-@@ -1433,7 +1433,7 @@ do_class_genocide()
-
- for(j=0; ; j++) {
- if (j >= 5) {
-- pline(thats_enough_tries);
-+ plines(thats_enough_tries);
- return;
- }
- do {
-@@ -1602,7 +1602,7 @@ int how;
- } else {
- for(i = 0; ; i++) {
- if(i >= 5) {
-- pline(thats_enough_tries);
-+ plines(thats_enough_tries);
- return;
- }
- getlin("What monster do you want to genocide? [type the name]",
-@@ -1725,7 +1725,7 @@ int how;
- if (cnt)
- pline("Sent in some %s.", makeplural(buf));
- else
-- pline(nothing_happens);
-+ plines(nothing_happens);
- }
- }
-
-@@ -1845,7 +1845,7 @@ create_particular()
- } while (++tries < 5);
-
- if (tries == 5) {
-- pline(thats_enough_tries);
-+ plines(thats_enough_tries);
- } else {
- (void) cant_create(&which, FALSE);
- whichpm = &mons[which];
-diff --git a/src/region.c b/src/region.c
-index e4d12af..ec598e1 100644
---- a/src/region.c
-+++ b/src/region.c
-@@ -445,7 +445,7 @@ xchar
- !regions[i]->attach_2_u && !inside_region(regions[i], x, y)) {
- clear_hero_inside(regions[i]);
- if (regions[i]->leave_msg != NULL)
-- pline(regions[i]->leave_msg);
-+ plines(regions[i]->leave_msg);
- if ((f_indx = regions[i]->leave_f) != NO_CALLBACK)
- (void) (*callbacks[f_indx])(regions[i], (genericptr_t) 0);
- }
-@@ -456,7 +456,7 @@ xchar
- !regions[i]->attach_2_u && inside_region(regions[i], x, y)) {
- set_hero_inside(regions[i]);
- if (regions[i]->enter_msg != NULL)
-- pline(regions[i]->enter_msg);
-+ plines(regions[i]->enter_msg);
- if ((f_indx = regions[i]->enter_f) != NO_CALLBACK)
- (void) (*callbacks[f_indx])(regions[i], (genericptr_t) 0);
- }
-diff --git a/src/restore.c b/src/restore.c
-index aaabbed..cb7b581 100644
---- a/src/restore.c
-+++ b/src/restore.c
-@@ -737,7 +737,7 @@ boolean ghostly;
- else
- Sprintf(trickbuf, "This is level %d, not %d!", dlvl, lev);
- #ifdef WIZARD
-- if (wizard) pline(trickbuf);
-+ if (wizard) plines(trickbuf);
- #endif
- trickery(trickbuf);
- }
-diff --git a/src/rumors.c b/src/rumors.c
-index 3272d1c..fb2065a 100644
---- a/src/rumors.c
-+++ b/src/rumors.c
-@@ -152,7 +152,7 @@ int mechanism;
- return;
- else if (Blind) {
- if (mechanism == BY_COOKIE)
-- pline(fortune_msg);
-+ plines(fortune_msg);
- pline("What a pity that you cannot read it!");
- return;
- }
-@@ -170,7 +170,7 @@ int mechanism;
- exercise(A_WIS, TRUE);
- return;
- case BY_COOKIE:
-- pline(fortune_msg);
-+ plines(fortune_msg);
- /* FALLTHRU */
- case BY_PAPER:
- pline("It reads:");
-diff --git a/src/shk.c b/src/shk.c
-index 53c868b..fc30c7b 100644
---- a/src/shk.c
-+++ b/src/shk.c
-@@ -516,7 +516,7 @@ register char *enterstring;
- if (!index(empty_shops, *enterstring) &&
- in_rooms(u.ux, u.uy, SHOPBASE) !=
- in_rooms(u.ux0, u.uy0, SHOPBASE))
-- pline(no_shk);
-+ plines(no_shk);
- Strcpy(empty_shops, u.ushops);
- u.ushops[0] = '\0';
- return;
-@@ -528,7 +528,7 @@ register char *enterstring;
- /* dump core when referenced */
- eshkp->bill_p = (struct bill_x *) -1000;
- if (!index(empty_shops, *enterstring))
-- pline(no_shk);
-+ plines(no_shk);
- Strcpy(empty_shops, u.ushops);
- u.ushops[0] = '\0';
- return;
-@@ -1345,7 +1345,7 @@ proceed:
- else Strcat(sbuf,
- "for gold picked up and the use of merchandise.");
- } else Strcat(sbuf, "for the use of merchandise.");
-- pline(sbuf);
-+ plines(sbuf);
- #ifndef GOLDOBJ
- if (u.ugold + eshkp->credit < dtmp) {
- #else
-diff --git a/src/sounds.c b/src/sounds.c
-index ebd51aa..0740ab4 100644
---- a/src/sounds.c
-+++ b/src/sounds.c
-@@ -53,7 +53,7 @@ dosounds()
- "the splashing of a naiad.",
- "a soda fountain!",
- };
-- You_hear(fountain_msg[rn2(3)+hallu]);
-+ You_hear("%s", fountain_msg[rn2(3)+hallu]);
- }
- #ifdef SINK
- if (level.flags.nsinks && !rn2(300)) {
-@@ -62,7 +62,7 @@ dosounds()
- "a gurgling noise.",
- "dishes being washed!",
- };
-- You_hear(sink_msg[rn2(2)+hallu]);
-+ You_hear("%s", sink_msg[rn2(2)+hallu]);
- }
- #endif
- if (level.flags.has_court && !rn2(200)) {
-@@ -81,7 +81,7 @@ dosounds()
- /* finding one is enough, at least for now */
- int which = rn2(3)+hallu;
-
-- if (which != 2) You_hear(throne_msg[which]);
-+ if (which != 2) You_hear("%s", throne_msg[which]);
- else pline(throne_msg[2], uhis());
- return;
- }
-@@ -93,7 +93,7 @@ dosounds()
- "smell marsh gas!", /* so it's a smell...*/
- "hear Donald Duck!",
- };
-- You(swamp_msg[rn2(2)+hallu]);
-+ You("%s", swamp_msg[rn2(2)+hallu]);
- return;
- }
- if (level.flags.has_vault && !rn2(200)) {
-@@ -201,7 +201,7 @@ dosounds()
- mon_in_room(mtmp, BARRACKS) &&
- /* sleeping implies not-yet-disturbed (usually) */
- (mtmp->msleeping || ++count > 5)) {
-- You_hear(barracks_msg[rn2(3)+hallu]);
-+ You_hear("%s", barracks_msg[rn2(3)+hallu]);
- return;
- }
- }
-@@ -216,7 +216,7 @@ dosounds()
- if (DEADMONSTER(mtmp)) continue;
- if ((mtmp->msleeping || is_animal(mtmp->data)) &&
- mon_in_room(mtmp, ZOO)) {
-- You_hear(zoo_msg[rn2(2)+hallu]);
-+ You_hear("%s", zoo_msg[rn2(2)+hallu]);
- return;
- }
- }
-@@ -234,7 +234,7 @@ dosounds()
- "the chime of a cash register.",
- "Neiman and Marcus arguing!",
- };
-- You_hear(shop_msg[rn2(2)+hallu]);
-+ You_hear("%s", shop_msg[rn2(2)+hallu]);
- }
- return;
- }
-@@ -252,7 +252,7 @@ dosounds()
- "someone say \"No more woodchucks!\"",
- "a loud ZOT!" /* both rec.humor.oracle */
- };
-- You_hear(ora_msg[rn2(3)+hallu*2]);
-+ You_hear("%s", ora_msg[rn2(3)+hallu*2]);
- }
- return;
- }
-@@ -816,7 +816,7 @@ register struct monst *mtmp;
- }
-
- if (pline_msg) pline("%s %s", Monnam(mtmp), pline_msg);
-- else if (verbl_msg) verbalize(verbl_msg);
-+ else if (verbl_msg) verbalize("%s", verbl_msg);
- return(1);
- }
-
-diff --git a/src/spell.c b/src/spell.c
-index bd57569..afacac0 100644
---- a/src/spell.c
-+++ b/src/spell.c
-@@ -948,7 +948,7 @@ boolean atme;
- break;
- case SPE_JUMPING:
- if (!jump(max(role_skill,1)))
-- pline(nothing_happens);
-+ plines(nothing_happens);
- break;
- default:
- impossible("Unknown spell %d attempted.", spell);
-diff --git a/src/steed.c b/src/steed.c
-index 52e97dc..e9eeda2 100644
---- a/src/steed.c
-+++ b/src/steed.c
-@@ -58,7 +58,7 @@ use_saddle(otmp)
-
- /* Select an animal */
- if (u.uswallow || Underwater || !getdir((char *)0)) {
-- pline(Never_mind);
-+ plines(Never_mind);
- return 0;
- }
- if (!u.dx && !u.dy) {
-diff --git a/src/teleport.c b/src/teleport.c
-index c913e3c..e7c1e9f 100644
---- a/src/teleport.c
-+++ b/src/teleport.c
-@@ -552,7 +552,7 @@ dotele()
- else tele();
- (void) next_to_u();
- } else {
-- You(shudder_for_moment);
-+ You("%s", shudder_for_moment);
- return(0);
- }
- if (!trap) morehungry(100);
-@@ -663,7 +663,7 @@ level_tele()
- * we let negative values requests fall into the "heaven" loop.
- */
- if (Is_knox(&u.uz) && newlev > 0) {
-- You(shudder_for_moment);
-+ You("%s", shudder_for_moment);
- return;
- }
- /* if in Quest, the player sees "Home 1", etc., on the status
-@@ -680,13 +680,13 @@ level_tele()
- random_levtport:
- newlev = random_teleport_level();
- if (newlev == depth(&u.uz)) {
-- You(shudder_for_moment);
-+ You("%s", shudder_for_moment);
- return;
- }
- }
-
- if (!next_to_u()) {
-- You(shudder_for_moment);
-+ You("%s", shudder_for_moment);
- return;
- }
- #ifdef WIZARD
-@@ -812,7 +812,7 @@ register struct trap *ttmp;
- struct d_level target_level;
-
- if (!next_to_u()) {
-- You(shudder_for_moment);
-+ You("%s", shudder_for_moment);
- return;
- }
-
-@@ -846,7 +846,7 @@ struct trap *trap;
- shieldeff(u.ux, u.uy);
- You_feel("a wrenching sensation.");
- } else if (!next_to_u()) {
-- You(shudder_for_moment);
-+ You("%s", shudder_for_moment);
- } else if (trap->once) {
- deltrap(trap);
- newsym(u.ux,u.uy); /* get rid of trap symbol */
-diff --git a/src/timeout.c b/src/timeout.c
-index 6a336d6..0ad7550 100644
---- a/src/timeout.c
-+++ b/src/timeout.c
-@@ -31,7 +31,7 @@ stoned_dialogue()
- register long i = (Stoned & TIMEOUT);
-
- if (i > 0L && i <= SIZE(stoned_texts))
-- pline(stoned_texts[SIZE(stoned_texts) - i]);
-+ plines(stoned_texts[SIZE(stoned_texts) - i]);
- if (i == 5L)
- HFast = 0L;
- if (i == 3L)
-@@ -55,7 +55,7 @@ vomiting_dialogue()
-
- if ((((Vomiting & TIMEOUT) % 3L) == 2) && (i >= 0)
- && (i < SIZE(vomiting_texts)))
-- You(vomiting_texts[SIZE(vomiting_texts) - i - 1]);
-+ You("%s", vomiting_texts[SIZE(vomiting_texts) - i - 1]);
-
- switch ((int) i) {
- case 0:
-@@ -102,7 +102,7 @@ choke_dialogue()
- if (index(str, '%'))
- pline(str, hcolor(NH_BLUE));
- else
-- pline(str);
-+ plines(str);
- }
- }
- exercise(A_STR, FALSE);
-@@ -132,7 +132,7 @@ slime_dialogue()
- } else
- pline(str, an(Hallucination ? rndmonnam() : "green slime"));
- } else
-- pline(str);
-+ plines(str);
- }
- if (i == 3L) { /* limbs becoming oozy */
- HFast = 0L; /* lose intrinsic speed */
-diff --git a/src/trap.c b/src/trap.c
-index d336276..1724267 100644
---- a/src/trap.c
-+++ b/src/trap.c
-@@ -359,7 +359,7 @@ boolean td; /* td == TRUE : trap door or hole */
- dont_fall = "are jerked back by your pet!";
- }
- if (dont_fall) {
-- You(dont_fall);
-+ You("%s", dont_fall);
- /* hero didn't fall through, but any objects here might */
- impact_drop((struct obj *)0, u.ux, u.uy, 0);
- if (!td) {
-@@ -2498,7 +2498,7 @@ domagictrap()
- if (!resists_blnd(&youmonst)) {
- You("are momentarily blinded by a flash of light!");
- make_blinded((long)rn1(5,10),FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- } else if (!Blind) {
- You("see a flash of light!");
- } else
-diff --git a/src/uhitm.c b/src/uhitm.c
-index 4a980d6..b418a43 100644
---- a/src/uhitm.c
-+++ b/src/uhitm.c
-@@ -858,7 +858,7 @@ int thrown;
- mon->mblinded = 127;
- else mon->mblinded += tmp;
- } else {
-- pline(obj->otyp==CREAM_PIE ? "Splat!" : "Splash!");
-+ plines(obj->otyp==CREAM_PIE ? "Splat!" : "Splash!");
- setmangry(mon);
- }
- if (thrown) obfree(obj, (struct obj *)0);
-diff --git a/src/zap.c b/src/zap.c
-index 991c429..0f23b62 100644
---- a/src/zap.c
-+++ b/src/zap.c
-@@ -1835,7 +1835,7 @@ dozap()
- check_unpaid(obj);
-
- /* zappable addition done by GAN 11/03/86 */
-- if(!zappable(obj)) pline(nothing_happens);
-+ if(!zappable(obj)) plines(nothing_happens);
- else if(obj->cursed && !rn2(100)) {
- backfire(obj); /* the wand blows up in your face! */
- exercise(A_STR, FALSE);
-@@ -1912,7 +1912,7 @@ boolean ordinary;
- if (!resists_blnd(&youmonst)) {
- You(are_blinded_by_the_flash);
- make_blinded((long)rnd(100),FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- }
- break;
-
-@@ -2050,7 +2050,7 @@ boolean ordinary;
- case WAN_DEATH:
- case SPE_FINGER_OF_DEATH:
- if (nonliving(youmonst.data) || is_demon(youmonst.data)) {
-- pline((obj->otyp == WAN_DEATH) ?
-+ plines((obj->otyp == WAN_DEATH) ?
- "The wand shoots an apparently harmless beam at you."
- : "You seem no deader than before.");
- break;
-@@ -2093,7 +2093,7 @@ boolean ordinary;
- You(are_blinded_by_the_flash);
- make_blinded((long)damage, FALSE);
- makeknown(obj->otyp);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- }
- damage = 0; /* reset */
- break;
-@@ -2373,7 +2373,7 @@ struct obj *obj; /* wand or spell */
- case SPE_STONE_TO_FLESH:
- if (Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) ||
- Underwater || (Is_qstart(&u.uz) && u.dz < 0)) {
-- pline(nothing_happens);
-+ plines(nothing_happens);
- } else if (u.dz < 0) { /* we should do more... */
- pline("Blood drips on your %s.", body_part(FACE));
- } else if (u.dz > 0 && !OBJ_AT(u.ux, u.uy)) {
-@@ -2384,7 +2384,7 @@ struct obj *obj; /* wand or spell */
- e = engr_at(u.ux, u.uy);
- if (!(e && e->engr_type == ENGRAVE)) {
- if (is_pool(u.ux, u.uy) || is_ice(u.ux, u.uy))
-- pline(nothing_happens);
-+ plines(nothing_happens);
- else
- pline("Blood %ss %s your %s.",
- is_lava(u.ux, u.uy) ? "boil" : "pool",
-@@ -3463,7 +3463,7 @@ register int dx,dy;
- if (abstype == ZT_LIGHTNING && !resists_blnd(&youmonst)) {
- You(are_blinded_by_the_flash);
- make_blinded((long)d(nd,50),FALSE);
-- if (!Blind) Your(vision_clears);
-+ if (!Blind) Your("%s", vision_clears);
- }
- stop_occupation();
- nomul(0);
-@@ -3597,7 +3597,7 @@ boolean *shopdamage;
- if (ttmp) ttmp->tseen = 1;
- if (cansee(x,y)) msgtxt = "The water evaporates.";
- }
-- Norep(msgtxt);
-+ Norep("%s", msgtxt);
- if (lev->typ == ROOM) newsym(x,y);
- } else if(IS_FOUNTAIN(lev->typ)) {
- if (cansee(x,y))
-@@ -3721,12 +3721,12 @@ boolean *shopdamage;
- lev->doormask = new_doormask;
- unblock_point(x, y); /* vision */
- if (cansee(x, y)) {
-- pline(see_txt);
-+ plines(see_txt);
- newsym(x, y);
- } else if (sense_txt) {
-- You(sense_txt);
-+ You("%s", sense_txt);
- } else if (hear_txt) {
-- if (flags.soundok) You_hear(hear_txt);
-+ if (flags.soundok) You_hear("%s", hear_txt);
- }
- if (picking_at(x, y)) {
- stop_occupation();
-@@ -4111,7 +4111,7 @@ retry:
- if (!otmp) {
- pline("Nothing fitting that description exists in the game.");
- if (++tries < 5) goto retry;
-- pline(thats_enough_tries);
-+ plines(thats_enough_tries);
- otmp = readobjnam((char *)0, (struct obj *)0, TRUE);
- if (!otmp) return; /* for safety; should never happen */
- } else if (otmp == ¬hing) {
diff --git a/debian/patches/series b/debian/patches/series
index 79ce618..3ad31f9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,5 @@
0001-Make-sure-the-user-calling-recover-owns-the-file.patch
0002-Change-paths-in-the-default-manpage-to-what-is-used-.patch
-0003-Define-_GNU_SOURCE-for-RTLD_NEXT.patch
0004-Add-LISP-based-windowing-system.patch
0005-Simple-mail.patch
0006-Common-config.h-for-all-binary-packages.patch
@@ -8,12 +7,8 @@
0008-Use-usr-share-pixmaps-nethack-for-pretty-pictures.patch
0009-Better-way-to-do-it.patch
0010-Enables-color-HP-monitor-for-textmode-NetHack.patch
-0011-Pasi-Kallinen-s-patch-to-add-colors-to-inventory-ite.patch
-0012-Paranoid-hit-asks-you-to-confirm-yes-instead-of-y-wh.patch
0013-93_enh_dump.dpatch-by-Tom-Friedetzky-Jukka-Lahtinen-.patch
-0014-94_enh_sortloot.dpatch-by-Jeroen-Demeyer-and-Jukka-L.patch
0015-95_enh_engulf_prayers.dpatch-by-Joshua-Kwan.patch
-0016-fix-non-constant-format-strings.patch
0017-Debian-and-Linux-specifics-defined-in-unixconf.h.patch
0018-lisp-support-in-src-Makefile.patch
0019-stay-in-array-bounds.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/nethack.git
More information about the Pkg-games-commits
mailing list