Add CRASHREPORT, show contact form on panic/impossible
When calling panic() or impossible(), create the option of opening a browser window with most of the fields already populated. Code for MacOS and linux is included; other ports are affected by argument change to early_init which are done but not tested. To enable, define CRASHREPORT in config.h and set CRASHREPORTURL in sysconf to (for the moment at least) http[s]://www.nethack.org/common/contactcr.html Adds --grep-defined option to makedefs for Makefiles. Adds "bid" (binary identifier), an MD4 of the main nethack binary. This is ONLY for helping (in the future) contact.html to set the "NetHack from" field automatically for our own binaries. This can be faked, but the user can lie so nothing lost. There's nothing magic about MD4; other ports can use anything that prodcues a long apparently random string we can match against. - new option --bidshow for us to get the MD4 of a released binary so I can add it to the website. Only available in wizard mode and not in nethack.6. - typo macos -> macosx in hints file No support for packaging builds as I'm not sure what that would look like. Adds a javascript helper for MacOS. Adds a lua helper for linux (and builds and installs nhlua).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 makedefs.c $NHDT-Date: 1655402416 2022/06/16 18:00:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.215 $ */
|
||||
/* NetHack 3.7 makedefs.c $NHDT-Date: 1693083328 2023/08/26 20:55:28 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.226 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */
|
||||
/* Copyright (c) M. Stephenson, 1990, 1991. */
|
||||
@@ -571,6 +571,15 @@ do_ext_makedefs(int argc, char **argv)
|
||||
}
|
||||
CONTINUE;
|
||||
}
|
||||
IS_OPTION("grep-defined"){
|
||||
struct grep_var *p;
|
||||
|
||||
CONSUME;
|
||||
p = grepsearch(argv[0]);
|
||||
// NB: Exit status is ready for the shell:
|
||||
// 0=defined, 1=not defined
|
||||
makedefs_exit(!(p && p->is_defined));
|
||||
}
|
||||
#ifdef notyet
|
||||
IS_OPTION("help") {
|
||||
}
|
||||
|
||||
278
util/mdgrep.h
278
util/mdgrep.h
@@ -1,277 +1,283 @@
|
||||
/*
|
||||
* NetHack 3.7 mdgrep.h $NHDT-Date: 1596498259 2020/08/03 23:44:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.14 $
|
||||
* NetHack 3.7 mdgrep.h $NHDT-Date: 1693083343 2023/08/26 20:55:43 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.18 $
|
||||
* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008
|
||||
* NetHack may be freely redistributed. See license for details.
|
||||
*
|
||||
* This file generated by mdgrep.pl version 1.7.
|
||||
* This file generated by mdgrep.pl version 1.23.
|
||||
* DO NOT EDIT! Your changes will be lost.
|
||||
*/
|
||||
static struct grep_var grep_vars[] = { { "0", 0 },
|
||||
{ "1", 1 },
|
||||
static struct grep_var grep_vars[]={
|
||||
{"0", 0},
|
||||
{"1", 1},
|
||||
#if defined(ALLDOCS)
|
||||
{ "ALLDOCS", 1 },
|
||||
{"ALLDOCS", 1},
|
||||
#else
|
||||
{ "ALLDOCS", 0 },
|
||||
{"ALLDOCS", 0},
|
||||
#endif
|
||||
#if defined(AMIGA)
|
||||
{ "AMIGA", 1 },
|
||||
{"AMIGA", 1},
|
||||
#else
|
||||
{ "AMIGA", 0 },
|
||||
{"AMIGA", 0},
|
||||
#endif
|
||||
#if defined(AMII_GRAPHICS)
|
||||
{ "AMII_GRAPHICS", 1 },
|
||||
{"AMII_GRAPHICS", 1},
|
||||
#else
|
||||
{ "AMII_GRAPHICS", 0 },
|
||||
{"AMII_GRAPHICS", 0},
|
||||
#endif
|
||||
#if defined(ASCIIGRAPH)
|
||||
{ "ASCIIGRAPH", 1 },
|
||||
{"ASCIIGRAPH", 1},
|
||||
#else
|
||||
{ "ASCIIGRAPH", 0 },
|
||||
{"ASCIIGRAPH", 0},
|
||||
#endif
|
||||
#if defined(BETA)
|
||||
{ "BETA", 1 },
|
||||
{"BETA", 1},
|
||||
#else
|
||||
{ "BETA", 0 },
|
||||
{"BETA", 0},
|
||||
#endif
|
||||
#if defined(BSD_JOB_CONTROL)
|
||||
{ "BSD_JOB_CONTROL", 1 },
|
||||
{"BSD_JOB_CONTROL", 1},
|
||||
#else
|
||||
{ "BSD_JOB_CONTROL", 0 },
|
||||
{"BSD_JOB_CONTROL", 0},
|
||||
#endif
|
||||
#if defined(CLIPPING)
|
||||
{ "CLIPPING", 1 },
|
||||
{"CLIPPING", 1},
|
||||
#else
|
||||
{ "CLIPPING", 0 },
|
||||
{"CLIPPING", 0},
|
||||
#endif
|
||||
#if defined(COMPRESS)
|
||||
{ "COMPRESS", 1 },
|
||||
{"COMPRESS", 1},
|
||||
#else
|
||||
{ "COMPRESS", 0 },
|
||||
{"COMPRESS", 0},
|
||||
#endif
|
||||
#if defined(CRASHREPORT)
|
||||
{"CRASHREPORT", 1},
|
||||
#else
|
||||
{"CRASHREPORT", 0},
|
||||
#endif
|
||||
#if defined(DLB)
|
||||
{ "DLB", 1 },
|
||||
{"DLB", 1},
|
||||
#else
|
||||
{ "DLB", 0 },
|
||||
{"DLB", 0},
|
||||
#endif
|
||||
{ "FALSE", 0 },
|
||||
{"FALSE", 0},
|
||||
#if defined(GEM_GRAPHICS)
|
||||
{ "GEM_GRAPHICS", 1 },
|
||||
{"GEM_GRAPHICS", 1},
|
||||
#else
|
||||
{ "GEM_GRAPHICS", 0 },
|
||||
{"GEM_GRAPHICS", 0},
|
||||
#endif
|
||||
#if defined(GNOME_GRAPHICS)
|
||||
{ "GNOME_GRAPHICS", 1 },
|
||||
{"GNOME_GRAPHICS", 1},
|
||||
#else
|
||||
{ "GNOME_GRAPHICS", 0 },
|
||||
{"GNOME_GRAPHICS", 0},
|
||||
#endif
|
||||
#if defined(HANGUPHANDLING)
|
||||
{ "HANGUPHANDLING", 1 },
|
||||
{"HANGUPHANDLING", 1},
|
||||
#else
|
||||
{ "HANGUPHANDLING", 0 },
|
||||
{"HANGUPHANDLING", 0},
|
||||
#endif
|
||||
#if defined(INSURANCE)
|
||||
{ "INSURANCE", 1 },
|
||||
{"INSURANCE", 1},
|
||||
#else
|
||||
{ "INSURANCE", 0 },
|
||||
#endif
|
||||
#if defined(LIFE)
|
||||
{ "LIFE", 1 },
|
||||
#else
|
||||
{ "LIFE", 0 },
|
||||
{"INSURANCE", 0},
|
||||
#endif
|
||||
#if defined(MAC)
|
||||
{ "MAC", 1 },
|
||||
{"MAC", 1},
|
||||
#else
|
||||
{ "MAC", 0 },
|
||||
{"MAC", 0},
|
||||
#endif
|
||||
#if defined(MAC_GRAPHICS)
|
||||
{ "MAC_GRAPHICS", 1 },
|
||||
{"MAC_GRAPHICS", 1},
|
||||
#else
|
||||
{ "MAC_GRAPHICS", 0 },
|
||||
{"MAC_GRAPHICS", 0},
|
||||
#endif
|
||||
#if defined(MAIL)
|
||||
{ "MAIL", 1 },
|
||||
{"MAIL", 1},
|
||||
#else
|
||||
{ "MAIL", 0 },
|
||||
{"MAIL", 0},
|
||||
#endif
|
||||
#if defined(MFLOPPY)
|
||||
{ "MFLOPPY", 1 },
|
||||
{"MFLOPPY", 1},
|
||||
#else
|
||||
{ "MFLOPPY", 0 },
|
||||
{"MFLOPPY", 0},
|
||||
#endif
|
||||
#if defined(MSDOS)
|
||||
{ "MSDOS", 1 },
|
||||
{"MSDOS", 1},
|
||||
#else
|
||||
{ "MSDOS", 0 },
|
||||
{"MSDOS", 0},
|
||||
#endif
|
||||
#if defined(MSWIN_GRAPHICS)
|
||||
{ "MSWIN_GRAPHICS", 1 },
|
||||
{"MSWIN_GRAPHICS", 1},
|
||||
#else
|
||||
{ "MSWIN_GRAPHICS", 0 },
|
||||
{"MSWIN_GRAPHICS", 0},
|
||||
#endif
|
||||
#if defined(NOCWD_ASSUMPTIONS)
|
||||
{ "NOCWD_ASSUMPTIONS", 1 },
|
||||
{"NOCWD_ASSUMPTIONS", 1},
|
||||
#else
|
||||
{ "NOCWD_ASSUMPTIONS", 0 },
|
||||
{"NOCWD_ASSUMPTIONS", 0},
|
||||
#endif
|
||||
#if defined(NOSAVEONHANGUP)
|
||||
{ "NOSAVEONHANGUP", 1 },
|
||||
{"NOSAVEONHANGUP", 1},
|
||||
#else
|
||||
{ "NOSAVEONHANGUP", 0 },
|
||||
{"NOSAVEONHANGUP", 0},
|
||||
#endif
|
||||
#if defined(OS2)
|
||||
{ "OS2", 1 },
|
||||
{"OS2", 1},
|
||||
#else
|
||||
{ "OS2", 0 },
|
||||
{"OS2", 0},
|
||||
#endif
|
||||
#if defined(POSIX_JOB_CONTROL)
|
||||
{ "POSIX_JOB_CONTROL", 1 },
|
||||
{"POSIX_JOB_CONTROL", 1},
|
||||
#else
|
||||
{ "POSIX_JOB_CONTROL", 0 },
|
||||
{"POSIX_JOB_CONTROL", 0},
|
||||
#endif
|
||||
#if defined(QT_GRAPHICS)
|
||||
{ "QT_GRAPHICS", 1 },
|
||||
{"QT_GRAPHICS", 1},
|
||||
#else
|
||||
{ "QT_GRAPHICS", 0 },
|
||||
{"QT_GRAPHICS", 0},
|
||||
#endif
|
||||
#if defined(RANDOM)
|
||||
{ "RANDOM", 1 },
|
||||
{"RANDOM", 1},
|
||||
#else
|
||||
{ "RANDOM", 0 },
|
||||
{"RANDOM", 0},
|
||||
#endif
|
||||
#if defined(SAFERHANGUP)
|
||||
{ "SAFERHANGUP", 1 },
|
||||
{"SAFERHANGUP", 1},
|
||||
#else
|
||||
{ "SAFERHANGUP", 0 },
|
||||
{"SAFERHANGUP", 0},
|
||||
#endif
|
||||
#if defined(SECURE)
|
||||
{ "SECURE", 1 },
|
||||
{"SECURE", 1},
|
||||
#else
|
||||
{ "SECURE", 0 },
|
||||
{"SECURE", 0},
|
||||
#endif
|
||||
#if defined(SHELL)
|
||||
{ "SHELL", 1 },
|
||||
{"SHELL", 1},
|
||||
#else
|
||||
{ "SHELL", 0 },
|
||||
{"SHELL", 0},
|
||||
#endif
|
||||
#if defined(SUSPEND)
|
||||
{ "SUSPEND", 1 },
|
||||
{"SUSPEND", 1},
|
||||
#else
|
||||
{ "SUSPEND", 0 },
|
||||
{"SUSPEND", 0},
|
||||
#endif
|
||||
#if defined(TEXTCOLOR)
|
||||
{ "TEXTCOLOR", 1 },
|
||||
{"TEXTCOLOR", 1},
|
||||
#else
|
||||
{ "TEXTCOLOR", 0 },
|
||||
#endif
|
||||
#if defined(TOS)
|
||||
{ "TOS", 1 },
|
||||
#else
|
||||
{ "TOS", 0 },
|
||||
#endif
|
||||
{ "TRUE", 1 },
|
||||
#if defined(TTY_GRAPHICS)
|
||||
{ "TTY_GRAPHICS", 1 },
|
||||
#else
|
||||
{ "TTY_GRAPHICS", 0 },
|
||||
#endif
|
||||
#if defined(UNICODE_DRAWING)
|
||||
{ "UNICODE_DRAWING", 1 },
|
||||
#else
|
||||
{ "UNICODE_DRAWING", 0 },
|
||||
#endif
|
||||
#if defined(UNICODE_PLAYERTEXT)
|
||||
{ "UNICODE_PLAYERTEXT", 1 },
|
||||
#else
|
||||
{ "UNICODE_PLAYERTEXT", 0 },
|
||||
#endif
|
||||
#if defined(UNICODE_WIDEWINPORT)
|
||||
{ "UNICODE_WIDEWINPORT", 1 },
|
||||
#else
|
||||
{ "UNICODE_WIDEWINPORT", 0 },
|
||||
#endif
|
||||
#if defined(UNIX)
|
||||
{ "UNIX", 1 },
|
||||
#else
|
||||
{ "UNIX", 0 },
|
||||
#endif
|
||||
#if defined(USER_SOUNDS)
|
||||
{ "USER_SOUNDS", 1 },
|
||||
#else
|
||||
{ "USER_SOUNDS", 0 },
|
||||
{"TEXTCOLOR", 0},
|
||||
#endif
|
||||
#if defined(TILES_IN_GLYPHMAP)
|
||||
{ "TILES_IN_GLYPHMAP", 1 },
|
||||
{"TILES_IN_GLYPHMAP", 1},
|
||||
#else
|
||||
{ "TILES_IN_GLYPHMAP", 0 },
|
||||
{"TILES_IN_GLYPHMAP", 0},
|
||||
#endif
|
||||
#if defined(TOS)
|
||||
{"TOS", 1},
|
||||
#else
|
||||
{"TOS", 0},
|
||||
#endif
|
||||
{"TRUE", 1},
|
||||
#if defined(TTY_GRAPHICS)
|
||||
{"TTY_GRAPHICS", 1},
|
||||
#else
|
||||
{"TTY_GRAPHICS", 0},
|
||||
#endif
|
||||
#if defined(UNICODE_DRAWING)
|
||||
{"UNICODE_DRAWING", 1},
|
||||
#else
|
||||
{"UNICODE_DRAWING", 0},
|
||||
#endif
|
||||
#if defined(UNICODE_PLAYERTEXT)
|
||||
{"UNICODE_PLAYERTEXT", 1},
|
||||
#else
|
||||
{"UNICODE_PLAYERTEXT", 0},
|
||||
#endif
|
||||
#if defined(UNICODE_WIDEWINPORT)
|
||||
{"UNICODE_WIDEWINPORT", 1},
|
||||
#else
|
||||
{"UNICODE_WIDEWINPORT", 0},
|
||||
#endif
|
||||
#if defined(UNIX)
|
||||
{"UNIX", 1},
|
||||
#else
|
||||
{"UNIX", 0},
|
||||
#endif
|
||||
#if defined(USER_SOUNDS)
|
||||
{"USER_SOUNDS", 1},
|
||||
#else
|
||||
{"USER_SOUNDS", 0},
|
||||
#endif
|
||||
#if defined(VAR_PLAYGROUND)
|
||||
{ "VAR_PLAYGROUND", 1 },
|
||||
{"VAR_PLAYGROUND", 1},
|
||||
#else
|
||||
{ "VAR_PLAYGROUND", 0 },
|
||||
{"VAR_PLAYGROUND", 0},
|
||||
#endif
|
||||
#if defined(VMS)
|
||||
{ "VMS", 1 },
|
||||
{"VMS", 1},
|
||||
#else
|
||||
{ "VMS", 0 },
|
||||
{"VMS", 0},
|
||||
#endif
|
||||
#if defined(WIN32)
|
||||
{ "WIN32", 1 },
|
||||
{"WIN32", 1},
|
||||
#else
|
||||
{ "WIN32", 0 },
|
||||
{"WIN32", 0},
|
||||
#endif
|
||||
#if defined(WIN32_PLATFORM_HPCPRO)
|
||||
{ "WIN32_PLATFORM_HPCPRO", 1 },
|
||||
{"WIN32_PLATFORM_HPCPRO", 1},
|
||||
#else
|
||||
{ "WIN32_PLATFORM_HPCPRO", 0 },
|
||||
{"WIN32_PLATFORM_HPCPRO", 0},
|
||||
#endif
|
||||
#if defined(WIN32_PLATFORM_WFSP)
|
||||
{ "WIN32_PLATFORM_WFSP", 1 },
|
||||
{"WIN32_PLATFORM_WFSP", 1},
|
||||
#else
|
||||
{ "WIN32_PLATFORM_WFSP", 0 },
|
||||
{"WIN32_PLATFORM_WFSP", 0},
|
||||
#endif
|
||||
#if defined(WINNT)
|
||||
{"WINNT", 1},
|
||||
#else
|
||||
{"WINNT", 0},
|
||||
#endif
|
||||
#if defined(WIN_CE)
|
||||
{ "WIN_CE", 1 },
|
||||
{"WIN_CE", 1},
|
||||
#else
|
||||
{ "WIN_CE", 0 },
|
||||
{"WIN_CE", 0},
|
||||
#endif
|
||||
#if defined(WIN_CE_POCKETPC)
|
||||
{ "WIN_CE_POCKETPC", 1 },
|
||||
{"WIN_CE_POCKETPC", 1},
|
||||
#else
|
||||
{ "WIN_CE_POCKETPC", 0 },
|
||||
{"WIN_CE_POCKETPC", 0},
|
||||
#endif
|
||||
#if defined(WIN_CE_PS2xx)
|
||||
{ "WIN_CE_PS2xx", 1 },
|
||||
{"WIN_CE_PS2xx", 1},
|
||||
#else
|
||||
{ "WIN_CE_PS2xx", 0 },
|
||||
{"WIN_CE_PS2xx", 0},
|
||||
#endif
|
||||
#if defined(WIN_CE_SMARTPHONE)
|
||||
{ "WIN_CE_SMARTPHONE", 1 },
|
||||
{"WIN_CE_SMARTPHONE", 1},
|
||||
#else
|
||||
{ "WIN_CE_SMARTPHONE", 0 },
|
||||
{"WIN_CE_SMARTPHONE", 0},
|
||||
#endif
|
||||
{ "WIZARD", 1 },
|
||||
#if defined(X11_GRAPHICS)
|
||||
{ "X11_GRAPHICS", 1 },
|
||||
{"X11_GRAPHICS", 1},
|
||||
#else
|
||||
{ "X11_GRAPHICS", 0 },
|
||||
{"X11_GRAPHICS", 0},
|
||||
#endif
|
||||
#if defined(ZEROCOMP)
|
||||
{ "ZEROCOMP", 1 },
|
||||
{"ZEROCOMP", 1},
|
||||
#else
|
||||
{ "ZEROCOMP", 0 },
|
||||
{"ZEROCOMP", 0},
|
||||
#endif
|
||||
#if defined(ZLIB_COMP)
|
||||
{ "ZLIB_COMP", 1 },
|
||||
{"ZLIB_COMP", 1},
|
||||
#else
|
||||
{ "ZLIB_COMP", 0 },
|
||||
{"ZLIB_COMP", 0},
|
||||
#endif
|
||||
#if defined(__BEOS__)
|
||||
{ "__BEOS__", 1 },
|
||||
{"__BEOS__", 1},
|
||||
#else
|
||||
{ "__BEOS__", 0 },
|
||||
{"__BEOS__", 0},
|
||||
#endif
|
||||
{ 0, 0 } };
|
||||
{0,0}
|
||||
};
|
||||
|
||||
/* Command ids */
|
||||
#define TODO_GREP 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!perl
|
||||
# NetHack 3.7 mdgrep.pl $NHDT-Date: 1596498260 2020/08/03 23:44:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.20 $
|
||||
# NetHack 3.7 mdgrep.pl $NHDT-Date: 1693083351 2023/08/26 20:55:51 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.24 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
VAR_PLAYGROUND DLB SHELL SUSPEND NOSAVEONHANGUP HANGUPHANDLING
|
||||
BSD_JOB_CONTROL MAIL POSIX_JOB_CONTROL INSURANCE
|
||||
UNICODE_DRAWING UNICODE_WIDEWINPORT UNICODE_PLAYERTEXT
|
||||
CRASHREPORT
|
||||
/;
|
||||
|
||||
# Miscellaneous
|
||||
@@ -53,10 +54,10 @@
|
||||
|
||||
$outfile = "mdgrep.h";
|
||||
sub start_file {
|
||||
($rev) = ('$NHDT-Revision: 1.20 $') =~ m/: (.*) .$/;
|
||||
my $date = '$NHDT-Date: 1596498261 2020/08/03 23:44:21 $';
|
||||
my $branch = '$NHDT-Branch: NetHack-3.7 $';
|
||||
my $revision = '$NHDT-Revision: 1.20 $';
|
||||
($rev) = ('$NHDT-Revision: 1.24 $') =~ m/: (.*) .$/;
|
||||
my $date = '$NHDT-Date: 1693083351 2023/08/26 20:55:51 $';
|
||||
my $branch = '$NHDT-Branch: keni-crashweb2 $';
|
||||
my $revision = '$NHDT-Revision: 1.24 $';
|
||||
open(OUT, ">$outfile") || die "open $outfile: $!";
|
||||
# NB: Date and Revision below will be modified when mdgrep.h is written to
|
||||
# git - this is correct (but it means you must commit changes to mdgrep.pl
|
||||
|
||||
Reference in New Issue
Block a user