Revert "Change Windows startup"
This reverts commit acb85b18cf.
Some optlist issues arose on some platforms, but not all.
I need to investigate the cause of those.
This commit is contained in:
@@ -725,8 +725,7 @@ struct instance_globals_o {
|
||||
|
||||
/* options.c */
|
||||
|
||||
/* builtin_opt, syscf_, rc_file_, environ_, play_opt */
|
||||
enum option_phases opt_phase;
|
||||
int opt_phase; /* builtin_opt, syscf_, rc_file_, environ_, play_opt */
|
||||
boolean opt_initial;
|
||||
boolean opt_from_file;
|
||||
boolean opt_need_redraw; /* for doset() */
|
||||
|
||||
@@ -335,8 +335,6 @@ extern boolean parse_conf_file(FILE *fp, boolean (*proc)(char *arg));
|
||||
extern void set_configfile_name(const char *);
|
||||
extern char *get_configfile(void);
|
||||
extern const char *get_default_configfile(void);
|
||||
extern void rcfile(void);
|
||||
extern void rcfile_interface_options(void);
|
||||
|
||||
/* ### coloratt.c ### */
|
||||
|
||||
@@ -2322,10 +2320,6 @@ extern int msgtype_type(const char *, boolean) NONNULLARG1;
|
||||
extern void hide_unhide_msgtypes(boolean, int);
|
||||
extern void msgtype_free(void);
|
||||
extern void options_free_window_colors(void);
|
||||
extern void set_all_options_heeded(void);
|
||||
extern void set_all_options_disregarded(void);
|
||||
extern void heed_this_option(enum opt);
|
||||
extern void disregard_this_option(enum opt);
|
||||
#ifdef TTY_PERM_INVENT
|
||||
extern void check_perm_invent_again(void);
|
||||
#endif
|
||||
@@ -2351,7 +2345,6 @@ extern int dowhatdoes(void);
|
||||
extern char *dowhatdoes_core(char, char *) NONNULLARG2; /*might return NULL*/
|
||||
extern int dohelp(void);
|
||||
extern int dohistory(void);
|
||||
void allopt_array_init(void);
|
||||
|
||||
/* ### xxmain.c ### */
|
||||
|
||||
|
||||
@@ -102,6 +102,8 @@ typedef unsigned readLenType;
|
||||
#endif
|
||||
#define BOOL_RANDOM (-1)
|
||||
|
||||
enum optchoice { opt_in, opt_out};
|
||||
|
||||
/*
|
||||
* type nhsym: loadable symbols go into this type
|
||||
*/
|
||||
@@ -151,16 +153,6 @@ typedef uchar nhsym;
|
||||
#endif /* __GNUC__ || _MSC_VER */
|
||||
#endif /* !__clang__ */
|
||||
|
||||
#define SET__IS_VALUE_VALID(s) ((s < set_in_sysconf) || (s > set_wiznofuz))
|
||||
#include "optlist.h"
|
||||
enum opt {
|
||||
opt_prefix_only = -1,
|
||||
#define NHOPT_ENUM
|
||||
#include "optlist.h"
|
||||
#undef NHOPT_ENUM
|
||||
OPTCOUNT
|
||||
};
|
||||
|
||||
/*
|
||||
* Automatic inclusions for the subsidiary files.
|
||||
* Please don't change the order. It does matter.
|
||||
|
||||
@@ -702,6 +702,22 @@ enum nhcb_calls {
|
||||
NUM_NHCB
|
||||
};
|
||||
|
||||
/*
|
||||
* option setting restrictions
|
||||
*/
|
||||
|
||||
enum optset_restrictions {
|
||||
set_in_sysconf = 0, /* system config file option only */
|
||||
set_in_config = 1, /* config file option only */
|
||||
set_viaprog = 2, /* may be set via extern program, not seen in game */
|
||||
set_gameview = 3, /* may be set via extern program, displayed in game */
|
||||
set_in_game = 4, /* may be set via extern program or set in the game */
|
||||
set_wizonly = 5, /* may be set in the game if wizmode */
|
||||
set_wiznofuz = 6, /* wizard-mode only, but not by fuzzer */
|
||||
set_hidden = 7 /* placeholder for prefixed entries, never show it */
|
||||
};
|
||||
#define SET__IS_VALUE_VALID(s) ((s < set_in_sysconf) || (s > set_wiznofuz))
|
||||
|
||||
struct plinemsg_type {
|
||||
xint16 msgtype; /* one of MSGTYP_foo */
|
||||
struct nhregex *regex;
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
#ifndef OPTLIST_H
|
||||
#define OPTLIST_H
|
||||
|
||||
#ifdef OPTIONS_C
|
||||
static int optfn_boolean(int, int, boolean, char *, char *);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NOTE: If you add (or delete) an option, please review:
|
||||
* doc/options.txt
|
||||
@@ -12,37 +16,6 @@
|
||||
* updates that should accompany your change.
|
||||
*/
|
||||
|
||||
#define BACKWARD_COMPAT
|
||||
|
||||
extern int optfn_boolean(int, int, boolean, char *, char *);
|
||||
enum optchoice { opt_in, opt_out };
|
||||
|
||||
/*
|
||||
* option setting restrictions
|
||||
*/
|
||||
enum optset_restrictions {
|
||||
set_in_sysconf = 0, /* system config file option only */
|
||||
set_in_config = 1, /* config file option only */
|
||||
set_viaprog = 2, /* may be set via extern program, not seen in game */
|
||||
set_gameview = 3, /* may be set via extern program, displayed in game */
|
||||
set_in_game = 4, /* may be set via extern program or set in the game */
|
||||
set_wizonly = 5, /* may be set in the game if wizmode */
|
||||
set_wiznofuz = 6, /* wizard-mode only, but not by fuzzer */
|
||||
set_hidden = 7 /* placeholder for prefixed entries, never show it */
|
||||
};
|
||||
|
||||
/* these aren't the same as set_xxx */
|
||||
enum option_phases {
|
||||
phase_not_set = 0,
|
||||
builtin_opt = 1, /* compiled-in default value of an option */
|
||||
syscf_opt, /* sysconf setting of an option, overrides builtin */
|
||||
rc_file_opt, /* player's run-time config file setting, overrides syscf */
|
||||
environ_opt, /* player's environment NETHACKOPTIONS, overrides rc_file */
|
||||
cmdline_opt, /* program invocation command-line, overrides environ */
|
||||
play_opt, /* 'O' command, interactively set so overrides all */
|
||||
num_opt_phases
|
||||
};
|
||||
|
||||
enum OptType { BoolOpt, CompOpt, OthrOpt };
|
||||
enum Y_N { No, Yes };
|
||||
enum Off_On { Off, On };
|
||||
@@ -72,7 +45,7 @@ struct allopt_t {
|
||||
const char *alias;
|
||||
const char *descr;
|
||||
const char *prefixgw;
|
||||
boolean initval, has_handler, dupdetected, disregarded;
|
||||
boolean initval, has_handler, dupdetected;
|
||||
};
|
||||
|
||||
#endif /* OPTLIST_H */
|
||||
@@ -101,16 +74,16 @@ static int optfn_##a(int, int, boolean, char *, char *);
|
||||
#elif defined(NHOPT_PARSE)
|
||||
#define NHOPTB(a, sec, b, c, s, i, n, v, d, al, bp, termp, desc) \
|
||||
{ #a, OptS_##sec, 0, b, opt_##a, s, BoolOpt, n, v, d, No, termp, c, \
|
||||
bp, &optfn_boolean, al, desc, (const char *) 0, i, 0, 0 , 0 },
|
||||
bp, &optfn_boolean, al, desc, (const char *) 0, i, 0, 0 },
|
||||
#define NHOPTC(a, sec, b, c, s, n, v, d, h, al, z) \
|
||||
{ #a, OptS_##sec, 0, b, opt_##a, s, CompOpt, n, v, d, No, 0, c, \
|
||||
(boolean *) 0, &optfn_##a, al, z, (const char *) 0, Off, h, 0, 0 },
|
||||
(boolean *) 0, &optfn_##a, al, z, (const char *) 0, Off, h, 0 },
|
||||
#define NHOPTP(a, sec, b, c, s, n, v, d, h, al, z) \
|
||||
{ #a, OptS_##sec, 0, b, pfx_##a, s, CompOpt, n, v, d, Yes, 0, c, \
|
||||
(boolean *) 0, &pfxfn_##a, al, z, #a, Off, h, 0, 0 },
|
||||
(boolean *) 0, &pfxfn_##a, al, z, #a, Off, h, 0 },
|
||||
#define NHOPTO(m, sec, a, b, c, s, n, v, d, al, z) \
|
||||
{ m, OptS_##sec, 0, b, opt_##a, s, OthrOpt, n, v, d, No, 0, c, \
|
||||
(boolean *) 0, &optfn_##a, al, z, (const char *) 0, On, On, 0, 0 },
|
||||
(boolean *) 0, &optfn_##a, al, z, (const char *) 0, On, On, 0 },
|
||||
|
||||
/* this is not reliable because TILES_IN_GLYPHMAP might be defined
|
||||
* in a multi-interface binary but not apply to the current interface */
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
|
||||
#define OPTIONS_AT_RUNTIME /* build info done at runtime not text file */
|
||||
|
||||
#define EARLY_CONFIGFILE_PASS
|
||||
|
||||
/*
|
||||
* -----------------------------------------------------------------
|
||||
* The remaining code shouldn't need modification.
|
||||
|
||||
@@ -415,4 +415,79 @@ struct chain_procs {
|
||||
};
|
||||
#endif /* WINCHAIN */
|
||||
|
||||
#ifdef SAFEPROCS
|
||||
/*
|
||||
* window port routines available in sys/share/safeproc.c
|
||||
*/
|
||||
extern struct window_procs *get_safe_procs(int);
|
||||
extern void safe_init_nhwindows(int *, char **);
|
||||
extern void safe_player_selection(void);
|
||||
extern void safe_askname(void);
|
||||
extern void safe_get_nh_event(void);
|
||||
extern void safe_exit_nhwindows(const char *);
|
||||
extern void safe_suspend_nhwindows(const char *);
|
||||
extern void safe_resume_nhwindows(void);
|
||||
extern winid safe_create_nhwindow(int);
|
||||
extern void safe_clear_nhwindow(winid);
|
||||
extern void safe_display_nhwindow(winid, boolean);
|
||||
extern void safe_destroy_nhwindow(winid);
|
||||
extern void safe_curs(winid, int, int);
|
||||
extern void safe_putstr(winid, int, const char *);
|
||||
extern void safe_putmixed(winid, int, const char *);
|
||||
extern void safe_display_file(const char *, boolean);
|
||||
extern void safe_start_menu(winid, unsigned long);
|
||||
extern void safe_add_menu(winid, const glyph_info *, const ANY_P *,
|
||||
char, char, int, int, const char *,
|
||||
unsigned int);
|
||||
extern void safe_end_menu(winid, const char *);
|
||||
extern int safe_select_menu(winid, int, MENU_ITEM_P **);
|
||||
extern char safe_message_menu(char, int, const char *);
|
||||
extern void safe_mark_synch(void);
|
||||
extern void safe_wait_synch(void);
|
||||
#ifdef CLIPPING
|
||||
extern void safe_cliparound(int, int);
|
||||
#endif
|
||||
#ifdef POSITIONBAR
|
||||
extern void safe_update_positionbar(char *);
|
||||
#endif
|
||||
extern void safe_print_glyph(winid, coordxy, coordxy,
|
||||
const glyph_info *, const glyph_info *);
|
||||
extern void safe_raw_print(const char *);
|
||||
extern void safe_raw_print_bold(const char *);
|
||||
extern int safe_nhgetch(void);
|
||||
extern int safe_nh_poskey(coordxy *, coordxy *, int *);
|
||||
extern void safe_nhbell(void);
|
||||
extern int safe_doprev_message(void);
|
||||
extern char safe_yn_function(const char *, const char *, char);
|
||||
extern void safe_getlin(const char *, char *);
|
||||
extern int safe_get_ext_cmd(void);
|
||||
extern void safe_number_pad(int);
|
||||
extern void safe_delay_output(void);
|
||||
#ifdef CHANGE_COLOR
|
||||
extern void safe_change_color(int, long, int);
|
||||
#ifdef MAC
|
||||
extern void safe_change_background(int);
|
||||
extern short safe_set_font_name(winid, char *);
|
||||
#endif
|
||||
extern char *safe_get_color_string(void);
|
||||
#endif
|
||||
extern void safe_outrip(winid, int, time_t);
|
||||
extern void safe_preference_update(const char *);
|
||||
extern char *safe_getmsghistory(boolean);
|
||||
extern void safe_putmsghistory(const char *, boolean);
|
||||
extern void safe_status_init(void);
|
||||
extern void safe_status_finish(void);
|
||||
extern void safe_status_enablefield(int, const char *, const char *,
|
||||
boolean);
|
||||
extern void safe_status_update(int, genericptr_t, int, int, int,
|
||||
unsigned long *);
|
||||
extern boolean safe_can_suspend(void);
|
||||
extern void stdio_raw_print(const char *);
|
||||
extern void stdio_nonl_raw_print(const char *);
|
||||
extern void stdio_raw_print_bold(const char *);
|
||||
extern void stdio_wait_synch(void);
|
||||
extern void safe_update_inventory(int);
|
||||
extern win_request_info *safe_ctrl_nhwindow(winid, int, win_request_info *);
|
||||
extern int stdio_nhgetch(void);
|
||||
#endif /* SAFEPROCS */
|
||||
#endif /* WINPROCS_H */
|
||||
|
||||
Reference in New Issue
Block a user