This file was deleted.

This file was deleted.

@@ -115,7 +115,25 @@ bool configfile_init() {
errors = tmp;
}

_configptr = &_config;
if( ret == false ) {
GString *message = g_string_new("Unable to load any configuration files. Looked in");
bool comma = false;
for( const char * const *location = locations; *location != NULL; location++ ) {
const char *fmt;
if( comma ) {
fmt = ", %s";
} else {
fmt = " %s";
comma = true;
}
g_string_append_printf(message, fmt, *location);
}
pline("%s", message->str);
g_string_free(message, true);
} else {
_configptr = &_config;
}

return ret;
}

@@ -148,11 +148,6 @@ static struct Bool_Opt
#else
{"menucolors", (boolean *)0, FALSE, SET_IN_GAME},
#endif
#if defined(STATUS_COLORS) && defined(TEXTCOLOR)
{"statuscolors", &iflags.use_status_colors, TRUE, SET_IN_GAME},
#else
{"statuscolors", (boolean *)0, TRUE, SET_IN_GAME},
#endif
#ifdef WIZARD
/* for menu debugging only*/
{"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME},
@@ -222,6 +217,11 @@ static struct Bool_Opt
{"sound", &flags.soundok, TRUE, SET_IN_GAME},
{"sparkle", &flags.sparkle, TRUE, SET_IN_GAME},
{"standout", &flags.standout, FALSE, SET_IN_GAME},
#if defined(STATUS_COLORS) && defined(TEXTCOLOR)
{"statuscolors", &iflags.use_status_colors, TRUE, SET_IN_GAME},
#else
{"statuscolors", (boolean *)0, TRUE, SET_IN_GAME},
#endif
{"splash_screen", &iflags.wc_splash_screen, TRUE, DISP_IN_GAME}, /*WC*/
{"tiled_map", &iflags.wc_tiled_map, PREFER_TILED, DISP_IN_GAME}, /*WC*/
{"time", &flags.time, FALSE, SET_IN_GAME},
@@ -13,7 +13,9 @@
#include <fcntl.h>
#endif
#include <assert.h>
#include <locale.h>

#include <glib.h>
#include <mysql.h>
#include <libconfig.h>

@@ -59,7 +61,7 @@ static boolean wiz_error_flag = FALSE;

static void segv_handler( int sig ) {
fflush(stdout);
award_achievement(AID_CRASH);
if( !wizard || getenv("NETHACK_SEGV_ACHIEVE") == NULL ) award_achievement(AID_CRASH);
if( kill(getpid(), SIGSEGV) == -1 ) {
perror("kill");
exit(EXIT_FAILURE);
@@ -109,6 +111,30 @@ char *argv[];
}
#endif

if( setlocale(LC_ALL, "C.UTF8") == NULL ) {
const char *locale = setlocale(LC_ALL, "");
if( locale == NULL ) {
fprintf(stderr, "Unable to set locale to native\n");
exit(EXIT_FAILURE);
}
// This will also match utf >= 16, but I'm not sure that's a problem.
if( g_strstr_len(locale, -1, "UTF") == NULL ) {
fprintf(stderr, "Your locale does not support UTF characters\n");
exit(EXIT_FAILURE);
}
}

/*
* This is a fix for terminals like PuTTY which ignore VT100 line drawing
* characters when in UTF-8 mode. See ncurses(3X) for documentation on the
* option. There is a wishlist item to implement support for this in PuTTY
* (http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/utf8-plus-vt100.html)
*/
if( setenv("NCURSES_NO_UTF8_ACS", "1", 0) == -1 ) {
perror("setenv");
exit(EXIT_FAILURE);
}

#ifdef SIMPLE_MAIL
/* figure this out early */
e_simple = nh_getenv("SIMPLEMAIL");
@@ -22,11 +22,10 @@ $(LEV_COMP): EXE_OBJECTS := $(LEV_COMP_OBJECTS) $(LEV_LEX_OBJECTS) $(LEV_YACC_OB

$(RX): $(RX_OBJECTS)
$(RX): EXE_OBJECTS := $(RX_OBJECTS)
$(RX): EXE_LIBRARIES := $(NCURSES_LIBRARIES)

$(BOARD): $(BOARD_OBJECTS)
$(BOARD): EXE_OBJECTS := $(BOARD_OBJECTS)
$(BOARD): EXE_LIBRARIES := $(NCURSES_LIBRARIES)
$(BOARD): EXE_LIBRARIES := $(NCURSESW_LIBRARIES)

$(ALLOC_OBJECTS): $(ALLOC_SOURCES)