some, but not all, vms issues fixed
This commit is contained in:
+7
-1
@@ -172,7 +172,13 @@ PANICTRACE_GDB=2 #at conclusion of panic, show a call traceback and then
|
|||||||
* The remainder of the file should not need to be changed.
|
* The remainder of the file should not need to be changed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* data librarian defs */
|
/* This used to be force-defined for VMS in topten.c, but with
|
||||||
|
* the global variable consolidation into g in 3.7, it has to be
|
||||||
|
* defined here so that decl.h includes the field in g.
|
||||||
|
*/
|
||||||
|
#define UPDATE_RECORD_IN_PLACE
|
||||||
|
|
||||||
|
/* data librarian defs */
|
||||||
#ifdef DLB
|
#ifdef DLB
|
||||||
#define DLBFILE "nh-data.dlb"
|
#define DLBFILE "nh-data.dlb"
|
||||||
/*
|
/*
|
||||||
|
|||||||
+1
-1
@@ -1036,7 +1036,7 @@ boolean regularize_it;
|
|||||||
Sprintf(g.SAVEF, "[.save]%d%s", getuid(), g.plname);
|
Sprintf(g.SAVEF, "[.save]%d%s", getuid(), g.plname);
|
||||||
regoffset = 7;
|
regoffset = 7;
|
||||||
indicator_spot = 1;
|
indicator_spot = 1;
|
||||||
postappend = ";1");
|
postappend = ";1";
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
if (regularize_it) {
|
if (regularize_it) {
|
||||||
|
|||||||
+7
-5
@@ -11,11 +11,13 @@
|
|||||||
#include "patchlevel.h"
|
#include "patchlevel.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef VMS
|
/* If UPDATE_RECORD_IN_PLACE is defined, we don't want to rewrite the
|
||||||
/* We don't want to rewrite the whole file, because that entails
|
* whole file, because that entails creating a new version which
|
||||||
creating a new version which requires that the old one be deletable. */
|
* requires that the old one be deletable. UPDATE_RECORD_IN_PLACE
|
||||||
#define UPDATE_RECORD_IN_PLACE
|
* had to be defined more centrally in 3.7 to ensure that the
|
||||||
#endif
|
* final_fpos field gets included in struct instance_globals aka 'g'.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Updating in place can leave junk at the end of the file in some
|
* Updating in place can leave junk at the end of the file in some
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ $ gnuc_ = "GCC"
|
|||||||
$ if f$type(gcc).eqs."STRING" then gnuc_ = gcc
|
$ if f$type(gcc).eqs."STRING" then gnuc_ = gcc
|
||||||
$ gnulib = "gnu_cc:[000000]gcclib/Library" !(not used w/ vaxc)
|
$ gnulib = "gnu_cc:[000000]gcclib/Library" !(not used w/ vaxc)
|
||||||
$ ! common CC options (/obj=file doesn't work for GCC 1.36, use rename instead)
|
$ ! common CC options (/obj=file doesn't work for GCC 1.36, use rename instead)
|
||||||
$ c_c_ = "/INCLUDE=[-.INCLUDE]"
|
$ c_c_ = "/INCLUDE=([-.INCLUDE],[-.-.LUA535.SRC])/DEFINE=(""LUA_USE_C89"", ""LUA_32BITS"")"
|
||||||
$ veryold_vms = f$extract(1,1,f$getsyi("VERSION")).eqs."4" -
|
$ veryold_vms = f$extract(1,1,f$getsyi("VERSION")).eqs."4" -
|
||||||
.and. f$extract(3,3,f$getsyi("VERSION")).lts."6"
|
.and. f$extract(3,3,f$getsyi("VERSION")).lts."6"
|
||||||
$ if veryold_vms then c_c_ = c_c_ + "/DEFINE=(""VERYOLD_VMS"")"
|
$ if veryold_vms then c_c_ = c_c_ + "/DEFINE=(""VERYOLD_VMS"")"
|
||||||
|
|||||||
+22
-5
@@ -32,7 +32,7 @@ main(argc, argv)
|
|||||||
int argc;
|
int argc;
|
||||||
char *argv[];
|
char *argv[];
|
||||||
{
|
{
|
||||||
register int fd;
|
NHFILE *nhfp;
|
||||||
#ifdef CHDIR
|
#ifdef CHDIR
|
||||||
register char *dir;
|
register char *dir;
|
||||||
#endif
|
#endif
|
||||||
@@ -49,7 +49,7 @@ char *argv[];
|
|||||||
atexit(byebye);
|
atexit(byebye);
|
||||||
g.hname = argv[0];
|
g.hname = argv[0];
|
||||||
g.hname = vms_basename(g.hname); /* name used in 'usage' type messages */
|
g.hname = vms_basename(g.hname); /* name used in 'usage' type messages */
|
||||||
hackpid = getpid();
|
g.hackpid = getpid();
|
||||||
(void) umask(0);
|
(void) umask(0);
|
||||||
|
|
||||||
choose_windows(DEFAULT_WINDOW_SYS);
|
choose_windows(DEFAULT_WINDOW_SYS);
|
||||||
@@ -67,8 +67,25 @@ char *argv[];
|
|||||||
dir = nh_getenv("HACKDIR");
|
dir = nh_getenv("HACKDIR");
|
||||||
#endif
|
#endif
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
|
if (argcheck(argc, argv, ARG_VERSION) == 2)
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
|
if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) {
|
||||||
#ifdef CHDIR
|
#ifdef CHDIR
|
||||||
if (!strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
|
chdirx((char *) 0, 0);
|
||||||
|
#endif
|
||||||
|
iflags.initoptions_noterminate = TRUE;
|
||||||
|
initoptions();
|
||||||
|
iflags.initoptions_noterminate = FALSE;
|
||||||
|
reveal_paths();
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
if (argcheck(argc, argv, ARG_DEBUG) == 1) {
|
||||||
|
argc--;
|
||||||
|
argv++;
|
||||||
|
}
|
||||||
|
#ifdef CHDIR
|
||||||
|
if (argc > 1 && !strncmp(argv[1], "-d", 2) && argv[1][2] != 'e') {
|
||||||
/* avoid matching "-dec" for DECgraphics; since the man page
|
/* avoid matching "-dec" for DECgraphics; since the man page
|
||||||
* says -d directory, hope nobody's using -desomething_else
|
* says -d directory, hope nobody's using -desomething_else
|
||||||
*/
|
*/
|
||||||
@@ -175,7 +192,7 @@ char *argv[];
|
|||||||
* We'll return here if new game player_selection() renames the hero.
|
* We'll return here if new game player_selection() renames the hero.
|
||||||
*/
|
*/
|
||||||
attempt_restore:
|
attempt_restore:
|
||||||
if ((fd = restore_saved_game()) >= 0) {
|
if ((nhfp = restore_saved_game()) != 0) {
|
||||||
const char *fq_save = fqname(g.SAVEF, SAVEPREFIX, 1);
|
const char *fq_save = fqname(g.SAVEF, SAVEPREFIX, 1);
|
||||||
|
|
||||||
(void) chmod(fq_save, 0); /* disallow parallel restores */
|
(void) chmod(fq_save, 0); /* disallow parallel restores */
|
||||||
@@ -188,7 +205,7 @@ attempt_restore:
|
|||||||
#endif
|
#endif
|
||||||
pline("Restoring save file...");
|
pline("Restoring save file...");
|
||||||
mark_synch(); /* flush output */
|
mark_synch(); /* flush output */
|
||||||
if (dorecover(fd)) {
|
if (dorecover(nhfp)) {
|
||||||
resuming = TRUE; /* not starting new game */
|
resuming = TRUE; /* not starting new game */
|
||||||
wd_message();
|
wd_message();
|
||||||
if (discover || wizard) {
|
if (discover || wizard) {
|
||||||
|
|||||||
+1
-1
@@ -110,7 +110,7 @@ getlock()
|
|||||||
'a','b',&c below; override the default and use <uid><charname>
|
'a','b',&c below; override the default and use <uid><charname>
|
||||||
if we aren't restricting the number of simultaneous games */
|
if we aren't restricting the number of simultaneous games */
|
||||||
if (!g.locknum)
|
if (!g.locknum)
|
||||||
Sprintf(g.lock, "_%u%s", (unsigned) getuid(), plname);
|
Sprintf(g.lock, "_%u%s", (unsigned) getuid(), g.plname);
|
||||||
|
|
||||||
regularize(g.lock);
|
regularize(g.lock);
|
||||||
set_levelfile_name(g.lock, 0);
|
set_levelfile_name(g.lock, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user