Merge branch 'NetHack-3.7-Jan2020' into NetHack-3.7

This commit is contained in:
nhmall
2020-01-27 13:24:15 -05:00
55 changed files with 1909 additions and 1660 deletions

View File

@@ -1,2 +1,2 @@
*.p NHSUBST
* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.4)
* NH_filestag=(file%s_for_Amiga_versions_-_untested_for_3.6.5)

View File

@@ -1 +1 @@
* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.4)
* NH_filestag=(file%s_for_Atari_version_-_untested_for_3.6.5)

View File

@@ -1 +1 @@
* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.4)
* NH_filestag=(file%s_for_BeOS_version_-_untested_for_3.6.5)

View File

@@ -4,6 +4,6 @@ Makefile.* NHSUBST
Install.* NHSUBST
moveinit.pat NH_header=no
vesa.h NH_header=no
* NH_filestag=(file%s_for_MSDOS_version_-_tested_for_3.6.4_via_partial_cross-compile_only)
* NH_filestag=(file%s_for_MSDOS_version)
nhico.uu NH_filestag=(file%s_for_running_MSDOS_binary_under_Windows)
nhpif.uu NH_filestag=>nhico.uu

View File

@@ -1,2 +1,2 @@
Makefile.* NHSUBST
* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.4)
* NH_filestag=(file%s_for_OS/2_version_-_untested_for_3.6.5)

View File

@@ -5,16 +5,16 @@ dgn_comp.h NH_header=no
lev_comp.h NH_header=no
Makefile.lib NH_header=no
Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.4)
#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.4)
Makefile.lib NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.5)
#termcap.uu NH_filestag=(file%s_for_MSDOS_and_OS/2_versions_-_untested_for_3.6.5)
termcap.uu NH_filestag=>Makefile.lib
pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_Amiga,_and_Atari_versions_-_untested_for_3.6.4)
pcmain.c NH_filestag=(file_for_MSDOS,_OS/2,_Amiga,_and_Atari_versions_-_untested_for_3.6.5)
pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2_and_Atari_versions_-_tested_on_MSDOS_for_3.6.4_via_partial_cross-compile_only)
pcsys.c NH_filestag=(file%s_for_MSDOS,_OS/2_and_Atari_versions_-_tested_on_MSDOS_for_3.6.5_via_partial_cross-compile_only)
pcunix.c NH_filestag=>pcsys.c
NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.4)
NetHack.cnf NH_filestag=(file_for_MSDOS,_OS/2,_and_Atari_versions_-_untested_for_3.6.5)
pctty.c NH_filestag=>NetHack.cnf
ioctl.c NH_filestag=(file%s_for_UNIX_and_Be_versions)

View File

@@ -123,8 +123,11 @@ spec_levs:
quest_levs:
touch quest_levs
spotless:
-rm -f spec_levs quest_levs *.lev $(VARDAT)
# gitinfo.txt is optionally made by src/Makefile when creating date.h
clean:
-rm -f gitinfo.txt
spotless: clean
-rm -f nhdat x11tiles beostiles pet_mark.xbm pilemark.xbm rip.xpm mapbg.xpm
-rm -f rip.img GEM_RSC.RSC title.img nh16.img NetHack.ad
-rm -f nhsplash.xpm nhtiles.bmp

View File

@@ -308,6 +308,7 @@ install: rootcheck $(GAME) recover $(VARDAT) spec_levs
clean:
( cd src ; $(MAKE) clean )
( cd util ; $(MAKE) clean )
( cd dat ; $(MAKE) clean )
( cd doc ; $(MAKE) clean )
( cd lib/lua-$(LUA_VERSION)/src && $(MAKE) clean )

View File

@@ -151,6 +151,14 @@
54FCE8292223261F00F393C8 /* isaac64.c in Sources */ = {isa = PBXBuildFile; fileRef = 54FCE8282223261F00F393C8 /* isaac64.c */; };
/* End PBXBuildFile section */
inputFiles = (
);
inputFiles = (
);
inputFiles = (
);
inputFiles = (
);
/* Begin PBXContainerItemProxy section */
316B91CA21A3BD7C00EC3E81 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
@@ -976,7 +984,7 @@
3189576921A1FCC100FB2ABE /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1120;
LastUpgradeCheck = 1130;
ORGANIZATIONNAME = "Bart House";
TargetAttributes = {
3189577021A1FCC100FB2ABE = {
@@ -1837,6 +1845,10 @@
};
name = Release;
};
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_IDENTITY = "-";
31B8A44F21A26A4B0055BD01 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1120"
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1120"
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1120"
LastUpgradeVersion = "1130"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -26,8 +26,8 @@ home directory you might perform these steps.
If you have old record and logfile entries from a previous NetHack version,
you might want to save copies before they get overwritten by the new empty
files; old saved games and bones files from 3.6.0 through to 3.6.3 should
work with 3.6.4 but even older saved games and bones files from 3.4.3 will
files; old saved games and bones files from 3.6.0 through to 3.6.4 should
work with 3.6.5 but even older saved games and bones files from 3.4.3 will
not. If you are installing from the RPM, there is no need to save the old
record and logfile; they are automatically preserved.

View File

@@ -95,7 +95,7 @@ MAXPLAYERS=10
# Only available if NetHack was compiled with DUMPLOG
# Allows following placeholders:
# %% literal '%'
# %v version (eg. "3.6.4-0")
# %v version (eg. "3.6.5-0")
# %u game UID
# %t game start time, UNIX timestamp format
# %T current time, UNIX timestamp format

View File

@@ -355,6 +355,7 @@ char *argv[];
return 0;
}
/* caveat: argv elements might be arbitrary long */
static void
process_options(argc, argv)
int argc;
@@ -383,11 +384,10 @@ char *argv[];
load_symset("DECGraphics", PRIMARY);
switch_symbols(TRUE);
} else {
raw_printf("Unknown option: %s", *argv);
raw_printf("Unknown option: %.60s", *argv);
}
break;
case 'X':
discover = TRUE, wizard = FALSE;
break;
#ifdef NEWS
@@ -413,7 +413,7 @@ char *argv[];
load_symset("RogueIBM", ROGUESET);
switch_symbols(TRUE);
} else {
raw_printf("Unknown option: %s", *argv);
raw_printf("Unknown option: %.60s", *argv);
}
break;
case 'p': /* profession (role) */
@@ -451,7 +451,7 @@ char *argv[];
flags.initrole = i;
break;
}
/* else raw_printf("Unknown option: %s", *argv); */
/* else raw_printf("Unknown option: %.60s", *argv); */
}
}

View File

@@ -38,11 +38,12 @@
[.sys .os2] -- OS/2
[.sys .share .sounds] -- AIFF format audio files
[.sys .unix] -- guess :-)
[.sys .unit .hints] -- configuration data for setup.sh
[.sys .unix .hints] -- configuration data for setup.sh
[.sys .wince] -- Windows CE
[.sys .wince .ceinc] -- more WinCE
[.sys .wince .ceinc .sys] -- ditto
[.sys .winnt] -- Windows NT
[.win .curses] - window routines for curses interface
[.win .gem] -- window routines for Atari/GEM
[.win .gnome] -- window routines for Unix/GNOME
[.win .Qt] -- window routines for Qt
@@ -150,7 +151,18 @@ Notes:
work with 3.7.0. The scoreboard file (RECORD) from 3.6.x or 3.4.x or
3.3.x will work.
2. To specify user-preference options in your environment, define the
2. If pline.c fails to compile, edit vmsconf.h and uncomment
#define NO_VSNPRINTF
to avoid calling a C library routine that wasn't available on older
versions of VMS. (Note: in the distributed sources, this has already
been uncommented.)
3. vmsbuild.com includes commands to try to build the 'curses' interface
but they won't work. That interface requires 'ncurses' or 'PDcurses',
not the older 'curses' (neither the VMS-specific variation nor the
BSD-derived one) included with the C run-time library.
4. To specify user-preference options in your environment, define the
logical name NETHACKOPTIONS to have the value of a quoted string
containing a comma separated list of option values. The option names
are case-insensitive.
@@ -183,7 +195,7 @@ Notes:
placed in the playground directory by install.com. Also, an example
configuration file can be found in [.win.X11]nethack.rc.)
3. [As mentioned above, the set of Makefiles is out of date so disregard
5. [As mentioned above, the set of Makefiles is out of date so disregard
this note....]
Instead of using vmsbuild.com to compile and link everything, you can
use the set of Makefiles found in the vms subdirectory, provided you
@@ -224,7 +236,7 @@ Notes:
[Note: Makefile.* have been updated occasionally but not exercised
for a long time, so might not be in working order.]
4. termcap is an ASCII data file containing descriptions of terminal
6. termcap is an ASCII data file containing descriptions of terminal
capabilities and the escape sequences that software must use to take
advantage of them. If you do not already have a termcap file in use
on your system there is a small one in file [.SYS.SHARE]TERMCAP. It
@@ -252,11 +264,11 @@ Notes:
termcap file, otherwise a message about "Unknown terminal type" will
be printed and NetHack will exit.
5. Both vmsbuild.com and Makefile.src have provisions to build nethack's
7. Both vmsbuild.com and Makefile.src have provisions to build nethack's
'curses' interface, but the source code for it won't compile using
the implementation of curses which is supplied with VMS.
6. NetHack contains code which attempts to make it secure in case it's
8. NetHack contains code which attempts to make it secure in case it's
installed with privileges (to allow the playground to be protected
against world write access). This has only undergone limited testing,
so install NetHack with privileges at your own risk. If you discover
@@ -309,7 +321,7 @@ Notes:
built NetHack, you can relink with tracebacks disabled by doing
$ @[.SYS.VMS]VMSBUILD "LINK" "" "" "/noTrace/noDebug"
7. If you can't or won't install nethack.exe with privileges and if you
9. If you can't or won't install nethack.exe with privileges and if you
don't have access to a privileged account yourself, then if you intend
to allow other users to access your copy of NetHack you should probably
place an ACL on the playground directory and its save subdirectory.
@@ -342,7 +354,7 @@ Notes:
you to run recover.exe on behalf of other users, because you won't be
able to create files owned by them unless you have elevated privileges.
8. Many NetHack commands can be aborted by sending it the <escape>
10. Many NetHack commands can be aborted by sending it the <escape>
character when it wants input. This is displayed as ESC inside the
game. Digital VK201 keyboards (used by VT2xx and VT3xx and older
VAXstations) and VK401 keyboards (used by VT4xx, newer VAXstations,
@@ -382,7 +394,7 @@ Notes:
be sure to remember to eventually reattach to the NetHack subprocess;
otherwise the game in progress won't get saved when you logout.
9. NetHack optionally maintains a logfile which receives one line appended
11. NetHack optionally maintains a logfile which receives one line appended
to it whenever a game ends. This can be disabled entirely by adding
an "#undef LOGFILE" directive to vmsconf.h prior to building the
program, or it can be disabled later by removing the file(s) LOGFILE.;*
@@ -393,7 +405,7 @@ Notes:
more elaborate log file named XLOGFILE containing more information is
handled similarly.
10. Some attempt at support for VMS versions earlier than V4.6 has been
12. Some attempt at support for VMS versions earlier than V4.6 has been
included, but no such obsolete system was available for testing it.
vmsbuild.com detects the need for the extra support routines and
arranges automatically for them to be compiled. The reason that
@@ -404,7 +416,7 @@ Notes:
[That was written many years ago and the chance of it still working
is very small.]
11. vmsbuild.com collects almost all of the object files (xxx.OBJ) into
13. vmsbuild.com collects almost all of the object files (xxx.OBJ) into
an object library (NETHACK.OLB) as it compiles the source files.
This should prevent the quota-exceeded problems from the linker
that some sites have reported for prior versions. Note that if you
@@ -416,7 +428,7 @@ Notes:
If you forget to replace the library entry, your newly compiled code
will not be included in the new executable image.
12. To access "wizard mode"--intended for debugging purposes, not to
14. To access "wizard mode"--intended for debugging purposes, not to
spoil the game with unlimited wishes--you must be running from the
username compiled into the game via Local_WIZARD in vmsconf.h, and
you must specify "-D" on the command line when invoking NetHack.
@@ -427,10 +439,10 @@ Notes:
Any character name you specify will be ignored in favor of "wizard".
[More out of date information. Rather than compile-time Local_WIZARD,
uses(s) allowed to entre wizard mode are now controlled by the entry
users(s) allowed to entre wizard mode are now controlled by the entry
WIZARDS in the file SYSCONF.]
13. At program startup time, NetHack uses the empty file PERM to prevent
15. At program startup time, NetHack uses the empty file PERM to prevent
two different processes from using the same character name (under the
same UIC ownership) at the same time. It does this by temporarily
giving that file a second directory entry named PERM.LOCK, then
@@ -472,7 +484,7 @@ Notes:
is accomplished using temporary entry RECORD.LOCK and LOGFILE using
entry LOGFILE.LOCK.
14. Unless you have both Motif and the Athena Widget set from MIT, you
16. Unless you have both Motif and the Athena Widget set from MIT, you
will not be able to use the X11 interface on VMS. Even if you do
have both those things, such a configuration has not been tested and
there are no provisions for it in vmsbuild.com. Makefile.src does
@@ -498,7 +510,7 @@ Notes:
window manager in order for any changes to take effect; it's easiest
to just make the session manager quit and then log in again.
15. If necessary, send problem reports via e-mail to
17. If necessary, send problem reports via e-mail to
<devteam@nethack.org>
Always include version information for NetHack, the operating system,
and the C compiler used.
@@ -506,6 +518,7 @@ Notes:
20-OCT-2003
minimally updated 9-NOV-2015...
and again 5-MAY-2019...
and yet again 26-JAN-2020...
# NetHack 3.7 Install.vms $NHDT-Date: 1575245132 2019/12/02 00:05:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.16 $
# Copyright (c) 2003 by Robert Patrick Rankin

View File

@@ -1,4 +1,4 @@
*.ce NHSUBST
*.mak NHSUBST
*.bat NHSUBST
* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.4)
* NH_filestag=(file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.5)

View File

@@ -1 +1 @@
* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.4)
* NH_filestag=(header_file%s_for_Windows_CE_and_PocketPC_-_untested_for_3.6.5)

View File

@@ -284,8 +284,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,6,4,0
PRODUCTVERSION 3,6,4,0
FILEVERSION 3,6,5,0
PRODUCTVERSION 3,6,5,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x9L
@@ -300,17 +300,17 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "NetHack 3.6.4 for Windows CE\0"
VALUE "Comments", "NetHack 3.6.5 for Windows CE\0"
VALUE "CompanyName", " \0"
VALUE "FileDescription", "nethackm\0"
VALUE "FileVersion", "3, 6, 4, 0\0"
VALUE "FileVersion", "3, 6, 5, 0\0"
VALUE "InternalName", "nethackm\0"
VALUE "LegalCopyright", "Copyright © 1985-2019\0"
VALUE "LegalCopyright", "Copyright © 1985-2020\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "nethackm.exe\0"
VALUE "PrivateBuild", "090914\0"
VALUE "ProductName", "NetHack\0"
VALUE "ProductVersion", "3, 6, 4, 0\0"
VALUE "ProductVersion", "3, 6, 5, 0\0"
VALUE "SpecialBuild", "\0"
END
END

View File

@@ -260,8 +260,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,6,4,0
PRODUCTVERSION 3,6,4,0
FILEVERSION 3,6,5,0
PRODUCTVERSION 3,6,5,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x9L
@@ -276,17 +276,17 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "NetHack 3.6.4 for Smartphone 2002\0"
VALUE "Comments", "NetHack 3.6.5 for Smartphone 2002\0"
VALUE "CompanyName", " \0"
VALUE "FileDescription", "nethackm\0"
VALUE "FileVersion", "3, 6, 4, 0\0"
VALUE "FileVersion", "3, 6, 5, 0\0"
VALUE "InternalName", "nethackm\0"
VALUE "LegalCopyright", "Copyright © 1985-2019\0"
VALUE "LegalCopyright", "Copyright © 1985-2020\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "nethackm.exe\0"
VALUE "PrivateBuild", "090914\0"
VALUE "ProductName", "NetHack For Smartphone\0"
VALUE "ProductVersion", "3, 6, 4, 0\0"
VALUE "ProductVersion", "3, 6, 5, 0\0"
VALUE "SpecialBuild", "\0"
END
END

View File

@@ -16,7 +16,7 @@ contributed the port.
Alex Kompel, Dion Nicolaas, Yitzhak Sapir, Derek S. Ray, Michael Allison,
Pasi Kallinen, Bart House, and Janet Walz contributed to the maintainance
of the tty and graphical windows versions of NetHack 3.6.4.
of the tty and graphical windows versions of NetHack 3.6.5.
You can build a TTY version of NetHack and a Windows Graphical
version. You can use one of the following build environments:
@@ -151,7 +151,7 @@ a 32-bit x86 version, or a 64-bit x64 version. The default Makefile
is set up for a 32-bit x86 version, but that's only because it will
run on the most number of existing Windows environments.
NetHack's save files and bones files in the 3.6.4 release have not yet
NetHack's save files and bones files in the 3.6.5 release have not yet
evolved enough to allow them to interchange between the 32-bit version
and the 64-bit version (or between different platforms). Hopefully
that will change in an upcoming release.
@@ -164,7 +164,7 @@ I. Dispelling the Myths:
We have provided a Makefile for each of the following compilers:
o Microsoft Visual Studio 2015 or 2017 C++ Compiler
o Microsoft Visual Studio 2017 or 2019 C++ Compiler
The Community Editions are fine and available at no cost
o MinGW 2.0 (with GCC 3.2)

View File

@@ -1,5 +1,5 @@
NAME NETHACK
DESCRIPTION 'NetHack 3.6.4 for Windows'
DESCRIPTION 'NetHack 3.6.5 for Windows'
EXETYPE WINDOWS
STUB 'WINSTUB.EXE'
CODE PRELOAD MOVEABLE DISCARDABLE

View File

@@ -1162,7 +1162,7 @@ VA_DECL(const char *, s)
if (iflags.window_inited)
end_screen();
buf[0] = '\n';
(void) vsprintf(&buf[1], s, VA_ARGS);
(void) vsnprintf(&buf[1], sizeof buf - 1, s, VA_ARGS);
msmsg(buf);
really_move_cursor();
VA_END();
@@ -1980,7 +1980,7 @@ VA_DECL(const char *, fmt)
char buf[ROWNO * COLNO]; /* worst case scenario */
VA_START(fmt);
VA_INIT(fmt, const char *);
Vsprintf(buf, fmt, VA_ARGS);
(void) vsnprintf(buf, sizeof buf, fmt, VA_ARGS);
if (redirect_stdout)
fprintf(stdout, "%s", buf);
else {

View File

@@ -78,24 +78,34 @@ static struct stat hbuf;
extern char orgdir[];
void
int
get_known_folder_path(
const KNOWNFOLDERID * folder_id,
char * path
, size_t path_size)
{
PWSTR wide_path;
if (FAILED(SHGetKnownFolderPath(folder_id, 0, NULL, &wide_path)))
if (FAILED(SHGetKnownFolderPath(folder_id, 0, NULL, &wide_path))) {
error("Unable to get known folder path");
return FALSE;
}
size_t converted;
errno_t err;
err = wcstombs_s(&converted, path, path_size, wide_path, path_size - 1);
err = wcstombs_s(&converted, path, path_size, wide_path, _TRUNCATE);
CoTaskMemFree(wide_path);
if (err != 0) error("Failed folder path string conversion");
if (err == STRUNCATE || err == EILSEQ) {
// silently handle this problem
return FALSE;
} else if (err != 0) {
error("Failed folder (%u) path string conversion, unexpected err = %d", folder_id->Data1, err);
return FALSE;
}
return TRUE;
}
void
@@ -107,14 +117,16 @@ create_directory(const char * path)
error("Unable to create directory '%s'", path);
}
void
int
build_known_folder_path(
const KNOWNFOLDERID * folder_id,
char * path,
size_t path_size,
boolean versioned)
{
get_known_folder_path(folder_id, path, path_size);
if(!get_known_folder_path(folder_id, path, path_size))
return FALSE;
strcat(path, "\\NetHack\\");
create_directory(path);
if (versioned) {
@@ -122,6 +134,7 @@ build_known_folder_path(
VERSION_MAJOR, VERSION_MINOR);
create_directory(path);
}
return TRUE;
}
void
@@ -249,17 +262,22 @@ set_default_prefix_locations(const char *programPath)
g.fqn_prefix[TROUBLEPREFIX] = portable_device_path;
g.fqn_prefix[DATAPREFIX] = executable_path;
} else {
build_known_folder_path(&FOLDERID_Profile, profile_path,
sizeof(profile_path), FALSE);
if(!build_known_folder_path(&FOLDERID_Profile, profile_path,
sizeof(profile_path), FALSE))
strcpy(profile_path, executable_path);
build_known_folder_path(&FOLDERID_Profile, versioned_profile_path,
sizeof(profile_path), TRUE);
if(!build_known_folder_path(&FOLDERID_Profile, versioned_profile_path,
sizeof(profile_path), TRUE))
strcpy(versioned_profile_path, executable_path);
build_known_folder_path(&FOLDERID_LocalAppData,
versioned_user_data_path, sizeof(versioned_user_data_path), TRUE);
if(!build_known_folder_path(&FOLDERID_LocalAppData,
versioned_user_data_path, sizeof(versioned_user_data_path), TRUE))
strcpy(versioned_user_data_path, executable_path);
if(!build_known_folder_path(&FOLDERID_ProgramData,
versioned_global_data_path, sizeof(versioned_global_data_path), TRUE))
strcpy(versioned_global_data_path, executable_path);
build_known_folder_path(&FOLDERID_ProgramData,
versioned_global_data_path, sizeof(versioned_global_data_path), TRUE);
g.fqn_prefix[SYSCONFPREFIX] = versioned_global_data_path;
g.fqn_prefix[CONFIGPREFIX] = profile_path;
g.fqn_prefix[HACKPREFIX] = versioned_profile_path;

View File

@@ -241,11 +241,11 @@ VA_DECL(const char *, s)
end_screen();
if (WINDOWPORT("tty")) {
buf[0] = '\n';
(void) vsprintf(&buf[1], s, VA_ARGS);
(void) vsnprintf(&buf[1], sizeof buf - (1 + sizeof "\n"), s, VA_ARGS);
Strcat(buf, "\n");
msmsg(buf);
} else {
(void) vsprintf(buf, s, VA_ARGS);
(void) vsnprintf(buf, sizeof buf - sizeof "\n", s, VA_ARGS);
Strcat(buf, "\n");
raw_printf(buf);
}