Merge branch 'NetHack-3.7' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.7
This commit is contained in:
@@ -31,6 +31,11 @@
|
|||||||
#define ACTIVATE_WARNING_PRAGMAS
|
#define ACTIVATE_WARNING_PRAGMAS
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__clang__) && defined(__cplusplus)
|
||||||
|
#ifndef ACTIVATE_WARNING_PRAGMAS
|
||||||
|
#define ACTIVATE_WARNING_PRAGMAS
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ACTIVATE_WARNING_PRAGMAS
|
#ifdef ACTIVATE_WARNING_PRAGMAS
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
|
|||||||
@@ -550,6 +550,8 @@ fixup_death(int how)
|
|||||||
#define NOTIFY_NETHACK_BUGS
|
#define NOTIFY_NETHACK_BUGS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
/*VARARGS1*/
|
/*VARARGS1*/
|
||||||
void panic
|
void panic
|
||||||
VA_DECL(const char *, str)
|
VA_DECL(const char *, str)
|
||||||
@@ -630,6 +632,8 @@ VA_DECL(const char *, str)
|
|||||||
really_done(PANICKED);
|
really_done(PANICKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
should_query_disclose_option(int category, char *defquery)
|
should_query_disclose_option(int category, char *defquery)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1257,6 +1257,8 @@ shuffle_int_array(int *indices, int count)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wrap snprintf for use in the main code.
|
* Wrap snprintf for use in the main code.
|
||||||
*
|
*
|
||||||
@@ -1292,4 +1294,6 @@ nh_snprintf(const char *func, int line, char *str, size_t size,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
/*hacklib.c*/
|
/*hacklib.c*/
|
||||||
|
|||||||
+12
@@ -80,6 +80,8 @@ putmesg(const char *line)
|
|||||||
|
|
||||||
static void vpline(const char *, va_list);
|
static void vpline(const char *, va_list);
|
||||||
|
|
||||||
|
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
void
|
void
|
||||||
pline(const char *line, ...)
|
pline(const char *line, ...)
|
||||||
{
|
{
|
||||||
@@ -199,6 +201,8 @@ pline_done:
|
|||||||
--in_pline;
|
--in_pline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
/* pline() variant which can override MSGTYPE handling or suppress
|
/* pline() variant which can override MSGTYPE handling or suppress
|
||||||
message history (tty interface uses pline() to issue prompts and
|
message history (tty interface uses pline() to issue prompts and
|
||||||
they shouldn't be blockable via MSGTYPE=hide) */
|
they shouldn't be blockable via MSGTYPE=hide) */
|
||||||
@@ -390,6 +394,8 @@ raw_printf(const char *line, ...)
|
|||||||
va_end(the_args);
|
va_end(the_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vraw_printf(const char *line, va_list the_args)
|
vraw_printf(const char *line, va_list the_args)
|
||||||
{
|
{
|
||||||
@@ -450,6 +456,8 @@ impossible(const char *s, ...)
|
|||||||
g.program_state.in_impossible = 0;
|
g.program_state.in_impossible = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
#if defined(MSGHANDLER) && (defined(POSIX_TYPES) || defined(__GNUC__))
|
#if defined(MSGHANDLER) && (defined(POSIX_TYPES) || defined(__GNUC__))
|
||||||
static boolean use_pline_handler = TRUE;
|
static boolean use_pline_handler = TRUE;
|
||||||
|
|
||||||
@@ -496,6 +504,8 @@ execplinehandler(const char *line)
|
|||||||
*/
|
*/
|
||||||
static void vconfig_error_add(const char *, va_list);
|
static void vconfig_error_add(const char *, va_list);
|
||||||
|
|
||||||
|
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
void
|
void
|
||||||
config_error_add(const char *str, ...)
|
config_error_add(const char *str, ...)
|
||||||
{
|
{
|
||||||
@@ -528,6 +538,8 @@ vconfig_error_add(const char *str, va_list the_args)
|
|||||||
config_erradd(buf);
|
config_erradd(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
/* nhassert_failed is called when an nhassert's condition is false */
|
/* nhassert_failed is called when an nhassert's condition is false */
|
||||||
void
|
void
|
||||||
nhassert_failed(const char *expression, const char *filepath, int line)
|
nhassert_failed(const char *expression, const char *filepath, int line)
|
||||||
|
|||||||
@@ -462,6 +462,8 @@ init_linux_cons(void)
|
|||||||
}
|
}
|
||||||
#endif /* __linux__ */
|
#endif /* __linux__ */
|
||||||
|
|
||||||
|
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
#ifndef __begui__ /* the Be GUI will define its own error proc */
|
#ifndef __begui__ /* the Be GUI will define its own error proc */
|
||||||
/* fatal error */
|
/* fatal error */
|
||||||
void
|
void
|
||||||
@@ -480,3 +482,6 @@ error(const char *s, ...)
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
#endif /* !__begui__ */
|
#endif /* !__begui__ */
|
||||||
|
|
||||||
|
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ extern void vms_abort(void);
|
|||||||
boolean panicking;
|
boolean panicking;
|
||||||
void panic(const char *, ...);
|
void panic(const char *, ...);
|
||||||
|
|
||||||
|
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
void panic
|
void panic
|
||||||
VA_DECL(const char *, str)
|
VA_DECL(const char *, str)
|
||||||
{
|
{
|
||||||
@@ -46,6 +48,8 @@ VA_DECL(const char *, str)
|
|||||||
exit(EXIT_FAILURE); /* redundant */
|
exit(EXIT_FAILURE); /* redundant */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
#ifdef ALLOCA_HACK
|
#ifdef ALLOCA_HACK
|
||||||
/*
|
/*
|
||||||
* In case bison-generated foo_yacc.c tries to use alloca(); if we don't
|
* In case bison-generated foo_yacc.c tries to use alloca(); if we don't
|
||||||
|
|||||||
@@ -565,6 +565,8 @@ QHBoxLayout *NetHackQtStatusWindow::InitHitpointBar()
|
|||||||
return hpbar; // caller will add our result to vbox layout
|
return hpbar; // caller will add our result to vbox layout
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
// when hitpoint bar is enabled, calculate and draw it, otherwise remove it
|
// when hitpoint bar is enabled, calculate and draw it, otherwise remove it
|
||||||
void NetHackQtStatusWindow::HitpointBar()
|
void NetHackQtStatusWindow::HitpointBar()
|
||||||
{
|
{
|
||||||
@@ -665,6 +667,8 @@ void NetHackQtStatusWindow::HitpointBar()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update the displayed status. The current code in botl.c updates
|
* Update the displayed status. The current code in botl.c updates
|
||||||
* two lines of information. Both lines are always updated one after
|
* two lines of information. Both lines are always updated one after
|
||||||
|
|||||||
@@ -642,6 +642,8 @@ tt_status_fixup(void)
|
|||||||
XtGetValues(X11_status_labels[0], args, num_args);
|
XtGetValues(X11_status_labels[0], args, num_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
/* core requests updating one status field (or is indicating that it's time
|
/* core requests updating one status field (or is indicating that it's time
|
||||||
to flush all updated fields); tty-style handling */
|
to flush all updated fields); tty-style handling */
|
||||||
static void
|
static void
|
||||||
@@ -810,6 +812,8 @@ X11_status_update_tty(int fld, genericptr_t ptr, int chg UNUSED, int percent,
|
|||||||
(void) XFlush(XtDisplay(X11_status_labels[0]));
|
(void) XFlush(XtDisplay(X11_status_labels[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static void
|
static void
|
||||||
X11_status_update_fancy(int fld, genericptr_t ptr, int chg UNUSED,
|
X11_status_update_fancy(int fld, genericptr_t ptr, int chg UNUSED,
|
||||||
@@ -1444,6 +1448,8 @@ hilight_label(Widget w) /* label widget */
|
|||||||
swap_fg_bg(w);
|
swap_fg_bg(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_val(struct X_status_value *attr_rec, long new_value)
|
update_val(struct X_status_value *attr_rec, long new_value)
|
||||||
{
|
{
|
||||||
@@ -1652,6 +1658,8 @@ update_val(struct X_status_value *attr_rec, long new_value)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
/* overloaded condition is being cleared without going through update_val()
|
/* overloaded condition is being cleared without going through update_val()
|
||||||
so that an alternate can be shown; put this one back to default settings */
|
so that an alternate can be shown; put this one back to default settings */
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user