Merge branch 'keni-wincw2' into NetHack-3.7

Lots of manually resolved conflicts.
This commit is contained in:
nhkeni
2024-02-15 16:25:12 -05:00
36 changed files with 1035 additions and 348 deletions

View File

@@ -242,12 +242,33 @@
#ifndef CRASHREPORT
# ifdef MACOS
/* NB: This needs to be a full path unless it's in the playground. */
/*#define CRASHREPORT "NetHackCrashReport.JavaScript"*/
# define CRASHREPORT "/usr/bin/open"
# endif
# ifdef __linux__
/* NB: This expects to find the nhlua binary as "./nhlua" */
/*#define CRASHREPORT "nhcrashreport.lua"*/
# define CRASHREPORT "/usr/bin/xdg-open"
/* Define this if the terminal is filled with useless error messages
* when the browser launches. */
# define CRASHREPORT_EXEC_NOSTDERR
# endif
# ifdef WIN32
# define CRASHREPORT /* builtin helper */
# endif
#endif
#ifdef CRASHREPORT
# ifndef DUMPLOG
# define DUMPLOG // required to get ^P info
# endif
# ifdef MACOS
# define PANICTRACE
# endif
# ifdef __linux__
# define PANICTRACE
# endif
// This test isn't quite right: CNG is only available from Windows 2000 on.
// But we'll check that at runtime.
# ifdef WIN32
# define PANICTRACE
# endif
#endif

View File

@@ -248,6 +248,11 @@ struct instance_globals_c {
/* dog.c */
char catname[PL_PSIZ];
/* end.c */
char *crash_email; // email for crash reports
char *crash_name; // human name for crash reports
int crash_urlmax; // maximum length for the url of a crash report
/* symbols.c */
int currentgraphics;

View File

@@ -905,9 +905,11 @@ extern void dealloc_killer(struct kinfo *);
extern void save_killers(NHFILE *) NONNULLARG1;
extern void restore_killers(NHFILE *) NONNULLARG1;
#ifdef CRASHREPORT
extern boolean submit_web_report(const char *, char *);
extern boolean submit_web_report(int, const char *, const char *);
extern void crashreport_init(int, char *[]);
extern void crashreport_bidshow(void);
extern boolean swr_add_uricoded(const char *, char **, int *, char *);
extern int dobugreport(void);
#endif
extern char *build_english_list(char *) NONNULLARG1;
#if defined(PANICTRACE) && !defined(NO_SIGNAL)
@@ -1924,6 +1926,13 @@ extern int dosuspend(void);
extern void nt_regularize(char *);
extern int(*nt_kbhit)(void);
extern void Delay(int);
# ifdef CRASHREPORT
struct CRctxt;
extern struct CRctxt *ctxp;
extern int win32_cr_helper(char, struct CRctxt *, void *, int);
extern int win32_cr_gettrace(int, char *, int);
extern int *win32_cr_shellexecute(const char *);
# endif
#endif /* WIN32 */
#endif /* MICRO || WIN32 */

View File

@@ -418,7 +418,7 @@ enum earlyarg {
#ifdef WIN32
, ARG_WINDOWS
#endif
#ifdef CRASHREPORT
#if defined(CRASHREPORT)
, ARG_BIDSHOW
#endif
};

View File

@@ -232,6 +232,17 @@ static int optfn_##a(int, int, boolean, char *, char *);
NHOPTB(confirm, Advanced, 0, opt_out, set_in_game,
On, Yes, No, No, NoAlias, &flags.confirm, Term_False,
"ask before hitting tame or peaceful monsters")
#ifdef CRASHREPORT
NHOPTC(crash_email, Advanced, PL_NSIZ, opt_in, set_in_game,
No, Yes, No, No, NoAlias,
"email address for reporting")
NHOPTC(crash_name, Advanced, PL_NSIZ, opt_in, set_in_game,
No, Yes, No, No, NoAlias,
"your name for reporting")
NHOPTC(crash_urlmax, Advanced, PL_NSIZ, opt_in, set_in_game,
No, Yes, No, No, NoAlias,
"length of longest url we can generate")
#endif
#ifdef CURSES_GRAPHICS
NHOPTC(cursesgraphics, Advanced, 70, opt_in, set_in_config,
No, Yes, No, No, NoAlias,

View File

@@ -14,8 +14,9 @@ enum wp_ids { wp_tty = 1, wp_X11, wp_Qt, wp_mswin, wp_curses,
wp_chainin, wp_chainout, wp_safestartup, wp_shim,
wp_hup, wp_guistubs, wp_ttystubs,
#ifdef OUTDATED_STUFF
, wp_mac, wp_Gem, wp_Gnome, wp_amii, wp_amiv
wp_mac, wp_Gem, wp_Gnome, wp_amii, wp_amiv,
#endif
wp_trace // XXX do we need this? should chainin/out get an id? TBD
};
/* NB: this MUST match chain_procs below */
@@ -107,6 +108,7 @@ extern
/*
* If you wish to only support one window system and not use procedure
* pointers, add the appropriate #ifdef below.
* XXX which is what?
*/
#define init_nhwindows (*windowprocs.win_init_nhwindows)
@@ -370,7 +372,6 @@ struct chain_procs {
void (*win_end_menu)(CARGS, winid, const char *);
int (*win_select_menu)(CARGS, winid, int, MENU_ITEM_P **);
char (*win_message_menu)(CARGS, char, int, const char *);
void (*win_update_inventory)(CARGS, int);
void (*win_mark_synch)(CARGS);
void (*win_wait_synch)(CARGS);
#ifdef CLIPPING
@@ -418,6 +419,8 @@ struct chain_procs {
void (*win_status_update)(CARGS, int, genericptr_t, int, int, int,
unsigned long *);
boolean (*win_can_suspend)(CARGS);
void (*win_update_inventory)(CARGS, int);
win_request_info *(*win_ctrl_nhwindow)(CARGS, winid, int, win_request_info *);
};
#endif /* WINCHAIN */