Merge branch 'keni-crashweb3' into NetHack-3.7
This commit is contained in:
1
win/macosx/.gitattributes
vendored
1
win/macosx/.gitattributes
vendored
@@ -1,2 +1,3 @@
|
||||
*.applescript NHSUBST
|
||||
*.JavaScript NHSUBST
|
||||
* NH_filestag=(file%s_for_macosx_versions)
|
||||
|
||||
28
win/macosx/NetHackCrashReport.JavaScript
Executable file
28
win/macosx/NetHackCrashReport.JavaScript
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/osascript -l JavaScript
|
||||
|
||||
// NetHack 3.7 tile.h $NHDT-Date: 1693083762 2023/08/26 21:02:42 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.1 $
|
||||
// Copyright (c) 2023 Kenneth Lorber
|
||||
// NetHack may be freely redistributed. See license for details.
|
||||
|
||||
// Call with URL then field value pairs. Opens a new browser window
|
||||
// to: URL?field=value+field=value.....
|
||||
// This program encodes the values; fieldnames don't require encoding.
|
||||
|
||||
// Should be installed in the playground.
|
||||
|
||||
function run(argv){
|
||||
|
||||
var url = argv[0];
|
||||
var argcp = 1;
|
||||
|
||||
url += "?cos=1"; // Start the query string and set mode
|
||||
while(argcp < argv.length){
|
||||
url += "&" + argv[argcp] + "=" + encodeURIComponent(argv[argcp+1])
|
||||
argcp += 2;
|
||||
}
|
||||
|
||||
var safari = Application('Safari');
|
||||
var nw = safari.make({ new:"document" });
|
||||
nw.url = url;
|
||||
safari.activate();
|
||||
}
|
||||
1
win/share/.gitattributes
vendored
1
win/share/.gitattributes
vendored
@@ -1,2 +1,3 @@
|
||||
tile.doc NHSUBST
|
||||
*.lua NHSUBST
|
||||
* NH_filestag=(file%s_for_versions_using_optional_tiles)
|
||||
|
||||
38
win/share/nhcrashreport.lua
Executable file
38
win/share/nhcrashreport.lua
Executable file
@@ -0,0 +1,38 @@
|
||||
#!./nhlua
|
||||
-- NetHack 3.7 nhcrashreport.lua $NHDT-Date: 1693083824 2023/08/26 21:03:44 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.0 $
|
||||
-- Copyright (c) 2023 Kenneth Lorber
|
||||
-- NetHack may be freely redistributed. See license for details.
|
||||
|
||||
-- Call with URL then field value pairs. Opens a new browser window
|
||||
-- to: URL?field=value+field=value.....
|
||||
-- This program encodes the values; fieldnames don't require encoding.
|
||||
--
|
||||
-- Should be installed in the playground.
|
||||
|
||||
----
|
||||
-- from
|
||||
-- https://github.com/daurnimator/lua-http/blob/master/http/util.lua
|
||||
-- Encodes a character as a percent encoded string
|
||||
local function char_to_pchar(c)
|
||||
return string.format("%%%02X", c:byte(1,1))
|
||||
end
|
||||
-- encodeURIComponent escapes all characters except the following: alphabetic, decimal digits, - _ . ! ~ * ' ( )
|
||||
local function encodeURIComponent(str)
|
||||
return (str:gsub("[^%w%-_%.%!%~%*%'%(%)]", char_to_pchar))
|
||||
end
|
||||
----
|
||||
|
||||
function un20(str)
|
||||
return str:gsub("%%20","+")
|
||||
end
|
||||
|
||||
url = table.remove(arg,1) .. "?cos=1"; -- Start the query string and set mode
|
||||
while #arg > 0 do
|
||||
local field = table.remove(arg,1)
|
||||
local value = table.remove(arg,1)
|
||||
url = url .. "&" .. field .. "=" .. un20(encodeURIComponent(value))
|
||||
end
|
||||
--print("url='"..url.."'")
|
||||
cmd = '/usr/bin/xdg-open "'..url..'"'
|
||||
os.execute(cmd)
|
||||
os.exit()
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 NetHackW.c $NHDT-Date: 1596498365 2020/08/03 23:46:05 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.72 $ */
|
||||
/* NetHack 3.7 NetHackW.c $NHDT-Date: 1693359674 2023/08/30 01:41:14 $ $NHDT-Branch: keni-crashweb2 $:$NHDT-Revision: 1.79 $ */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -123,7 +123,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
|
||||
windowprocs.win_wait_synch = mswin_wait_synch;
|
||||
|
||||
win10_init();
|
||||
early_init();
|
||||
early_init(0, NULL); /* Change as needed to support CRASHREPORT */
|
||||
|
||||
/* init application structure */
|
||||
_nethack_app.hApp = hInstance;
|
||||
|
||||
Reference in New Issue
Block a user