more SYSCF and related bits - cleanup and features
infrastructure for "system options" - things currently specified at build time that should be changeable at install time or run time but not really under user control generalize contact info so it can be localized and it doesn't have to be an email address move recently introduced WIZARDS into sysopt drop bogus OPTIONS=wizards possibility new function build_english_list() to comma-ize and add 'or' from a whitespace separated list: A. A or B. A, B, or C. syscf file now handles: WIZARDS SUPPORT RECOVER SUPPORT specifies local support information RECOVER will eventually supply port-specific and/or localized info on how to run recover (or get it run for you). Note: in sys/msdos I changed sys.o (generated from pcsys.c) to pcsys.o Note: sys/msdos/Makefile.GCC has 2 rules for sys.o (now pcsys.o)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)decl.h 3.5 2007/01/12 */
|
||||
/* SCCS Id: @(#)decl.h 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -199,9 +199,6 @@ E const char *occtxt; /* defined when occupation != NULL */
|
||||
E const char *nomovemsg;
|
||||
E const char nul[];
|
||||
E char lock[];
|
||||
#ifdef SYSCF
|
||||
E char wizards[];
|
||||
#endif
|
||||
|
||||
E const schar xdir[], ydir[], zdir[];
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)extern.h 3.5 2008/01/19 */
|
||||
/* SCCS Id: @(#)extern.h 3.5 2008/01/30 */
|
||||
/* Copyright (c) Steve Creps, 1988. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -640,6 +640,7 @@ E struct kinfo *FDECL(find_delayed_killer, (int));
|
||||
E void FDECL(dealloc_killer, (struct kinfo*));
|
||||
E void FDECL(save_killers, (int,int));
|
||||
E void FDECL(restore_killers, (int));
|
||||
E char *FDECL(build_english_list, (char *));
|
||||
|
||||
/* ### engrave.c ### */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)hack.h 3.5 2008/01/19 */
|
||||
/* SCCS Id: @(#)hack.h 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -168,6 +168,7 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
|
||||
|
||||
#include "extern.h"
|
||||
#include "winprocs.h"
|
||||
#include "sys.h"
|
||||
|
||||
#ifdef USE_TRAMPOLI
|
||||
#include "wintty.h"
|
||||
@@ -419,5 +420,8 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
|
||||
#else
|
||||
# define CFDECLSPEC
|
||||
#endif
|
||||
|
||||
#define DEVTEAM_EMAIL "devteam@nethack.org"
|
||||
#define DEVTEAM_URL "http://www.nethack.org"
|
||||
|
||||
#endif /* HACK_H */
|
||||
|
||||
20
include/sys.h
Normal file
20
include/sys.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/* SCCS Id: @(#)sys.h 3.5 2008/01/30 */
|
||||
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#ifndef SYS_H
|
||||
#define SYS_H
|
||||
|
||||
#define E extern
|
||||
|
||||
E void NDECL(sys_early_init);
|
||||
|
||||
struct sysopt {
|
||||
char *support; /* local support contact */
|
||||
char *recover; /* how to run recover - may be overridden by win port */
|
||||
char *wizards;
|
||||
};
|
||||
E struct sysopt sysopt;
|
||||
|
||||
#endif /* SYS_H */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)decl.c 3.5 2006/07/10 */
|
||||
/* SCCS Id: @(#)decl.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -70,9 +70,6 @@ const char ynNaqchars[] = "yn#aq";
|
||||
NEARDATA long yn_number = 0L;
|
||||
|
||||
const char disclosure_options[] = "iavgc";
|
||||
#ifdef SYSCF
|
||||
char wizards[PL_PSIZ] = DUMMY;
|
||||
#endif
|
||||
|
||||
#if defined(MICRO) || defined(WIN32)
|
||||
char hackdir[PATHLEN]; /* where rumors, help, record are */
|
||||
|
||||
87
src/end.c
87
src/end.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)end.c 3.5 2008/01/19 */
|
||||
/* SCCS Id: @(#)end.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#ifndef NO_SIGNAL
|
||||
#include <signal.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
#include "dlb.h"
|
||||
|
||||
@@ -255,7 +256,7 @@ int how;
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(WIN32)
|
||||
#if defined(WIN32) && !defined(SYSCF)
|
||||
#define NOTIFY_NETHACK_BUGS
|
||||
#endif
|
||||
|
||||
@@ -283,13 +284,24 @@ panic VA_DECL(const char *, str)
|
||||
#if defined(WIZARD) && !defined(MICRO)
|
||||
# if defined(NOTIFY_NETHACK_BUGS)
|
||||
if (!wizard)
|
||||
raw_printf("Report the following error to \"%s\".",
|
||||
"nethack-bugs@nethack.org");
|
||||
raw_printf("Report the following error to \"%s\" or at \"%s\".",
|
||||
DEVTEAM_EMAIL, DEVTEAM_URL);
|
||||
else if (program_state.something_worth_saving)
|
||||
raw_print("\nError save file being written.\n");
|
||||
# else
|
||||
if (!wizard)
|
||||
raw_printf("Report error to \"%s\"%s.",
|
||||
if (!wizard){
|
||||
if(sysopt.support)
|
||||
raw_printf("To report this error, %s%s.", sysopt.support,
|
||||
!program_state.something_worth_saving ? "" :
|
||||
" and it may be possible to rebuild.");
|
||||
else if(sysopt.wizards){
|
||||
char *tmp = build_english_list(sysopt.wizards);
|
||||
raw_printf("To report this error, contact %s%s", tmp,
|
||||
!program_state.something_worth_saving ? "" :
|
||||
" and it may be possible to rebuild.");
|
||||
free(tmp);
|
||||
} else
|
||||
raw_printf("Report error to \"%s\"%s.",
|
||||
# ifdef WIZARD_NAME /*(KR1ED)*/
|
||||
WIZARD_NAME,
|
||||
# else
|
||||
@@ -297,10 +309,17 @@ panic VA_DECL(const char *, str)
|
||||
# endif
|
||||
!program_state.something_worth_saving ? "" :
|
||||
" and it may be possible to rebuild.");
|
||||
}
|
||||
# endif
|
||||
/* XXX can we move this above the prints? Then we'd be able to
|
||||
* suppress "it may be possible to rebuild" based on dosave0()
|
||||
* or say it's NOT possible to rebuild. */
|
||||
if (program_state.something_worth_saving) {
|
||||
set_error_savefile();
|
||||
(void) dosave0();
|
||||
if(dosave0()){
|
||||
/* os/win port specific recover instructions */
|
||||
if(sysopt.recover) raw_printf("%s", sysopt.recover);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
{
|
||||
@@ -1293,4 +1312,58 @@ restore_killers(fd)
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
wordcount(p)
|
||||
char *p;
|
||||
{
|
||||
int words = 0;
|
||||
while(*p){
|
||||
while(*p && isspace(*p))p++;
|
||||
if(*p) words++;
|
||||
while(*p && !isspace(*p))p++;
|
||||
}
|
||||
return words;
|
||||
}
|
||||
|
||||
static void
|
||||
bel_copy1(inp, out)
|
||||
char **inp, *out;
|
||||
{
|
||||
char *in = *inp;
|
||||
while(*in && isspace(*in)) in++;
|
||||
while(*in && !isspace(*in)){
|
||||
*out = *in; out++; in++;
|
||||
}
|
||||
*inp = in;
|
||||
}
|
||||
|
||||
char *
|
||||
build_english_list(in)
|
||||
char *in;
|
||||
{
|
||||
char *out;
|
||||
int len = strlen(in);
|
||||
char *p = in;
|
||||
int words = wordcount(in);
|
||||
switch(words){
|
||||
case 0:
|
||||
impossible("no words in list");
|
||||
break;
|
||||
case 1:
|
||||
out = (char *)alloc(len+1);
|
||||
strcpy(out, in);
|
||||
break;
|
||||
default:
|
||||
len += 3 + (words-1);
|
||||
bel_copy1(&p, out); words--;
|
||||
while(words>1){
|
||||
strcat(out, ", ");
|
||||
bel_copy1(&p, out); words--;
|
||||
}
|
||||
strcat(out, " or ");
|
||||
bel_copy1(&p, out);
|
||||
break;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
/*end.c*/
|
||||
|
||||
15
src/files.c
15
src/files.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)files.c 3.5 2007/10/27 */
|
||||
/* SCCS Id: @(#)files.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2067,9 +2067,18 @@ int src;
|
||||
(void) strncpy(catname, bufp, PL_PSIZ-1);
|
||||
#ifdef SYSCF
|
||||
} else if ( (src==SET_IN_SYS) && match_varname(buf, "WIZARDS", 6)) {
|
||||
(void) strncpy(wizards, bufp, PL_PSIZ-1);
|
||||
if(sysopt.wizards) free(sysopt.wizards);
|
||||
sysopt.wizards = alloc(strlen(bufp));
|
||||
(void) strcpy(sysopt.wizards, bufp);
|
||||
} else if ( (src==SET_IN_SYS) && match_varname(buf, "SUPPORT", 7)) {
|
||||
if(sysopt.support) free(sysopt.support);
|
||||
sysopt.support = alloc(strlen(bufp));
|
||||
(void) strcpy(sysopt.support, bufp);
|
||||
} else if ( (src==SET_IN_SYS) && match_varname(buf, "RECOVER", 7)) {
|
||||
if(sysopt.recover) free(sysopt.recover);
|
||||
sysopt.recover = alloc(strlen(bufp));
|
||||
(void) strcpy(sysopt.recover, bufp);
|
||||
#endif
|
||||
|
||||
} else if (match_varname(buf, "BOULDER", 3)) {
|
||||
(void) get_uchars(fp, buf, bufp, &iflags.bouldersym, TRUE,
|
||||
1, "BOULDER");
|
||||
|
||||
13
src/mail.c
13
src/mail.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)mail.c 3.5 2006/12/13 */
|
||||
/* SCCS Id: @(#)mail.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -428,21 +428,28 @@ readmail(otmp)
|
||||
struct obj *otmp;
|
||||
{
|
||||
static char *junk[] = {
|
||||
NULL, /* placeholder for "Report bugs to <devteam@nethack.org>.", */
|
||||
"Please disregard previous letter.",
|
||||
"Welcome to NetHack.",
|
||||
#ifdef AMIGA
|
||||
"Only Amiga makes it possible.",
|
||||
"CATS have all the answers.",
|
||||
#endif
|
||||
"Report bugs to <devteam@nethack.org>.",
|
||||
"Invitation: Visit the NetHack web site at http://www.nethack.org!"
|
||||
};
|
||||
|
||||
/* XXX replace with more general substitution code and add local
|
||||
* contact message. Also use DEVTEAM_URL */
|
||||
if(junk[0]) == NULL){
|
||||
#define BUGS_FORMAT "Report bugs to %s."
|
||||
junk[0] = (char *)alloc(strlen(BUGS_FORMAT) + strlen(DEVTEAM_EMAIL));
|
||||
sprintf(junk[0], DEVTEAM_EMAIL);
|
||||
#undef BUGS_FORMAT
|
||||
}
|
||||
if (Blind) {
|
||||
pline("Unfortunately you cannot see what it says.");
|
||||
} else
|
||||
pline("It reads: \"%s\"", junk[rn2(SIZE(junk))]);
|
||||
|
||||
}
|
||||
|
||||
# endif /* !UNIX && !VMS */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)options.c 3.5 2007/04/26 */
|
||||
/* SCCS Id: @(#)options.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -386,9 +386,6 @@ static struct Comp_Opt
|
||||
{ "windowcolors", "the foreground/background colors of windows", /*WC*/
|
||||
80, DISP_IN_GAME },
|
||||
{ "windowtype", "windowing system to use", WINTYPELEN, DISP_IN_GAME },
|
||||
#ifdef SYSCF
|
||||
{ "wizards", "users with access to wizard mode (etc)", PL_PSIZ, SET_IN_SYS},
|
||||
#endif
|
||||
#ifdef BACKWARD_COMPAT
|
||||
{"DECgraphics", "load DECGraphics display symbols", 70, SET_IN_FILE},
|
||||
{"IBMgraphics", "load IBMGraphics display symbols", 70, SET_IN_FILE},
|
||||
@@ -2263,23 +2260,6 @@ goodfruit:
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef SYSCF
|
||||
fullname = "wizards";
|
||||
if (wizard && match_optname(opts, fullname, 6, TRUE)) {
|
||||
if (duplicate) {
|
||||
complain_about_duplicate(opts,1);
|
||||
return;
|
||||
}
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return;
|
||||
} else if ((op = string_for_env_opt(fullname, opts, FALSE)) != 0) {
|
||||
nmcpy(wizards, op, PL_PSIZ);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* menustyle:traditional or combo or full or partial */
|
||||
if (match_optname(opts, "menustyle", 4, TRUE)) {
|
||||
int tmp;
|
||||
@@ -3489,14 +3469,6 @@ char *buf;
|
||||
#endif
|
||||
else if (!strcmp(optname, "catname"))
|
||||
Sprintf(buf, "%s", catname[0] ? catname : none );
|
||||
#ifdef SYSCF
|
||||
else if (!strcmp(optname, "wizards"))
|
||||
# ifdef KR1ED
|
||||
Sprintf(buf, "%s", wizards[0] ? wizards : WIZARD_NAME);
|
||||
# else
|
||||
Sprintf(buf, "%s", wizards[0] ? wizards : WIZARD);
|
||||
# endif
|
||||
#endif
|
||||
else if (!strcmp(optname, "disclose")) {
|
||||
for (i = 0; i < NUM_DISCLOSURE_OPTIONS; i++) {
|
||||
char topt[2];
|
||||
|
||||
48
src/pager.c
48
src/pager.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)pager.c 3.5 2007/05/11 */
|
||||
/* SCCS Id: @(#)pager.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -873,6 +873,36 @@ dowhatdoes()
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
docontact()
|
||||
{
|
||||
winid cwin = create_nhwindow(NHW_TEXT);
|
||||
char buf[BUFSZ];
|
||||
if(sysopt.support){
|
||||
/*XXX overflow possibilities*/
|
||||
Sprintf(buf, "To contact local support, %s", sysopt.support);
|
||||
putstr(cwin, 0, buf);
|
||||
putstr(cwin, 0, "");
|
||||
} else if(sysopt.wizards){
|
||||
char *tmp = build_english_list(sysopt.wizards);
|
||||
Sprintf(buf, "To contact local support, %s", tmp);
|
||||
free(tmp);
|
||||
putstr(cwin, 0, buf);
|
||||
putstr(cwin, 0, "");
|
||||
}
|
||||
putstr(cwin, 0, "To contact the NetHack development team directly,");
|
||||
/*XXX overflow possibilities*/
|
||||
Sprintf(buf, " see the Contact form on our website or email %s",
|
||||
DEVTEAM_EMAIL);
|
||||
putstr(cwin, 0, buf);
|
||||
putstr(cwin, 0, "");
|
||||
putstr(cwin, 0, "For more information on NetHack, or to report a bug,");
|
||||
Sprintf(buf, "visit our website %s", DEVTEAM_URL);
|
||||
putstr(cwin, 0, buf);
|
||||
display_nhwindow(cwin, FALSE);
|
||||
destroy_nhwindow(cwin);
|
||||
}
|
||||
|
||||
/* data for help_menu() */
|
||||
static const char *help_menu_items[] = {
|
||||
/* 0*/ "Long description of the game and commands.",
|
||||
@@ -884,12 +914,13 @@ static const char *help_menu_items[] = {
|
||||
/* 6*/ "Longer explanation of game options.",
|
||||
/* 7*/ "List of extended commands.",
|
||||
/* 8*/ "The NetHack license.",
|
||||
/* 9*/ "Support information.",
|
||||
#ifdef PORT_HELP
|
||||
"%s-specific help and commands.",
|
||||
#define PORT_HELP_ID 100
|
||||
#define WIZHLP_SLOT 10
|
||||
#define WIZHLP_SLOT 11
|
||||
#else
|
||||
#define WIZHLP_SLOT 9
|
||||
#define WIZHLP_SLOT 10
|
||||
#endif
|
||||
#ifdef WIZARD
|
||||
"List of wizard-mode commands.",
|
||||
@@ -958,13 +989,16 @@ dohelp()
|
||||
case 6: display_file(OPTIONFILE, TRUE); break;
|
||||
case 7: (void) doextlist(); break;
|
||||
case 8: display_file(LICENSE, TRUE); break;
|
||||
#ifdef WIZARD
|
||||
/* handle slot 9 or 10 */
|
||||
default: display_file(DEBUGHELP, TRUE); break;
|
||||
#endif
|
||||
case 9: (void) docontact(); break;
|
||||
#ifdef PORT_HELP
|
||||
case PORT_HELP_ID: port_help(); break;
|
||||
#endif
|
||||
default:
|
||||
#ifdef WIZARD
|
||||
/* handle slot 10 or 11 */
|
||||
display_file(DEBUGHELP, TRUE);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
18
src/sys.c
Normal file
18
src/sys.c
Normal file
@@ -0,0 +1,18 @@
|
||||
/* SCCS Id: @(#)sys.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
struct sysopt sysopt;
|
||||
|
||||
void
|
||||
sys_early_init(){
|
||||
sysopt.support = NULL;
|
||||
sysopt.recover = NULL;
|
||||
#ifdef notyet
|
||||
/* replace use of WIZARD vs WIZARD_NAME vs KR1ED, by filling this in */
|
||||
#endif
|
||||
sysopt.wizards = NULL;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# NetHack Makefile.
|
||||
# SCCS Id: @(#)Makefile.agc 3.5 2006/01/07
|
||||
# SCCS Id: @(#)Makefile.agc 3.5 2008/10/30
|
||||
# Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991,1992,1993,1996.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
@@ -172,12 +172,12 @@ COMMOBJ = \
|
||||
$(O)region.o $(O)restore.o $(O)rnd.o $(O)role.o \
|
||||
$(O)rumors.o $(O)save.o $(O)shk.o $(O)shknam.o \
|
||||
$(O)sit.o $(O)sounds.o $(O)sp_lev.o $(O)spell.o \
|
||||
$(O)steal.o $(O)steed.o $(O)teleport.o $(O)timeout.o \
|
||||
$(O)topten.o $(O)track.o $(O)trap.o $(O)u_init.o \
|
||||
$(O)uhitm.o $(O)vault.o $(O)version.o $(O)vision.o \
|
||||
$(O)weapon.o $(O)were.o $(O)wield.o $(O)windows.o \
|
||||
$(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o \
|
||||
$(O)zap.o
|
||||
$(O)steal.o $(O)steed.o $(O)sys.o $(O)teleport.o \
|
||||
$(O)timeout.o $(O)topten.o $(O)track.o $(O)trap.o \
|
||||
$(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)version.o \
|
||||
$(O)vision.o $(O)weapon.o $(O)were.o $(O)wield.o \
|
||||
$(O)windows.o $(O)wizard.o $(O)worm.o $(O)worn.o \
|
||||
$(O)write.o $(O)zap.o
|
||||
|
||||
MAKEDEFOBJ = \
|
||||
$(O)monstr.o
|
||||
@@ -1194,6 +1194,8 @@ $(O)steal.o: $(NHS)steal.c $(HDEP)
|
||||
|
||||
$(O)steed.o: $(NHS)steed.c $(HDEP)
|
||||
|
||||
$(O)sys.o: $(NHS)sys.c $(HDEP)
|
||||
|
||||
$(O)teleport.o: $(NHS)teleport.c $(HDEP)
|
||||
|
||||
$(O)timeout.o: $(NHS)timeout.c $(HDEP) $(I)lev.h
|
||||
@@ -1269,7 +1271,7 @@ $(I)global.h: $(I)coord.h $(I)pcconf.h $(I)amiconf.h
|
||||
$(I)hack.h: $(I)config.h $(I)context.h $(I)trap.h $(I)decl.h $(I)dungeon.h
|
||||
$(I)monsym.h $(I)mkroom.h $(I)objclass.h $(I)flag.h $(I)rm.h
|
||||
$(I)vision.h $(I)display.h $(I)wintype.h $(I)engrave.h
|
||||
$(I)rect.h $(I)region.h $(I)trampoli.h
|
||||
$(I)rect.h $(I)region.h $(I)trampoli.h $(I)sys.h
|
||||
-setdate $(I)hack.h
|
||||
-c:wait 2
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# NetHack Makefile.
|
||||
# SCCS Id: @(#)Makefile.ami 3.5 2006/01/07
|
||||
# SCCS Id: @(#)Makefile.ami 3.5 2008/01/30
|
||||
# Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991,1992,1993,1996.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
@@ -379,12 +379,12 @@ COMMOBJ = \
|
||||
$(O)region.o $(O)restore.o $(O)rnd.o $(O)role.o \
|
||||
$(O)rumors.o $(O)save.o $(O)shk.o $(O)shknam.o \
|
||||
$(O)sit.o $(O)sounds.o $(O)sp_lev.o $(O)spell.o \
|
||||
$(O)steal.o $(O)steed.o $(O)teleport.o $(O)timeout.o \
|
||||
$(O)topten.o $(O)track.o $(O)trap.o $(O)u_init.o \
|
||||
$(O)uhitm.o $(O)vault.o $(O)version.o $(O)vision.o \
|
||||
$(O)weapon.o $(O)were.o $(O)wield.o $(O)windows.o \
|
||||
$(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o \
|
||||
$(O)zap.o
|
||||
$(O)steal.o $(O)steed.o $(O)sys.o $(O)teleport.o \
|
||||
$(O)timeout.o $(O)topten.o $(O)track.o $(O)trap.o \
|
||||
$(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)version.o \
|
||||
(O)vision.o $(O)weapon.o $(O)were.o $(O)wield.o \
|
||||
$(O)windows.o $(O)wizard.o $(O)worm.o $(O)worn.o \
|
||||
$(O)write.o $(O)zap.o
|
||||
|
||||
MAKEDEFOBJ = \
|
||||
$(O)monstr.o
|
||||
@@ -1530,6 +1530,8 @@ $(O)steal.o: $(NHS)steal.c $(HDEP)
|
||||
|
||||
$(O)steed.o: $(NHS)steed.c $(HDEP)
|
||||
|
||||
$(O)sys.o: $(NHS)sys.c $(HDEP)
|
||||
|
||||
$(O)teleport.o: $(NHS)teleport.c $(HDEP)
|
||||
|
||||
$(O)timeout.o: $(NHS)timeout.c $(HDEP) $(I)lev.h
|
||||
@@ -1608,7 +1610,7 @@ $(I)global.h: $(I)coord.h $(I)pcconf.h $(I)amiconf.h
|
||||
$(I)hack.h: $(I)config.h $(I)context.h $(I)trap.h $(I)decl.h $(I)dungeon.h
|
||||
$(I)monsym.h $(I)mkroom.h $(I)objclass.h $(I)flag.h $(I)rm.h
|
||||
$(I)vision.h $(I)display.h $(I)wintype.h $(I)engrave.h
|
||||
$(I)rect.h $(I)region.h $(I)trampoli.h
|
||||
$(I)rect.h $(I)region.h $(I)trampoli.h $(I)sys.h
|
||||
-setdate $(I)hack.h
|
||||
-wait 2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)bemain.c 3.5 2007/02/15 */
|
||||
/* SCCS Id: @(#)bemain.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Dean Luick, 1996. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -25,6 +25,8 @@ int MAIN(int argc, char **argv)
|
||||
char *dir;
|
||||
boolean resuming = FALSE; /* assume new game */
|
||||
|
||||
sys_early_init();
|
||||
|
||||
dir = nh_getenv("NETHACKDIR");
|
||||
if (!dir) dir = nh_getenv("HACKDIR");
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)macmain.c 3.5 2007/02/15 */
|
||||
/* SCCS Id: @(#)macmain.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -39,6 +39,7 @@ main (void)
|
||||
int argc = 1;
|
||||
boolean resuming = FALSE; /* assume new game */
|
||||
|
||||
sys_early_init();
|
||||
windowprocs = mac_procs;
|
||||
InitMac ();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SCCS Id: @(#)Makefile.BC 3.5 2006/01/07
|
||||
# SCCS Id: @(#)Makefile.BC 3.5 2008/01/30
|
||||
# Copyright (c) Yitzhak Sapir, 1999-2006.
|
||||
# NetHack may be freely distributed. See license for details.
|
||||
#
|
||||
@@ -867,7 +867,7 @@ HACK_H = $(CONFIG_H) $(INCL)\context.h $(INCL)\dungeon.h $(INCL)\align.h \
|
||||
$(INCL)\monsym.h $(INCL)\mkroom.h $(INCL)\objclass.h $(DECL_H) \
|
||||
$(INCL)\timeout.h $(INCL)\trap.h $(INCL)\flag.h $(INCL)\rm.h \
|
||||
$(INCL)\vision.h $(INCL)\mondata.h $(INCL)\wintype.h \
|
||||
$(INCL)\engrave.h $(INCL)\rect.h $(EXTERN_H) \
|
||||
$(INCL)\engrave.h $(INCL)\rect.h $(EXTERN_H) $(INCL)\sys.h \
|
||||
$(INCL)\winprocs.h $(INCL)\trampoli.h $(INCL)\display.h
|
||||
TILE_H = $(INCL)\tile.h $(INCL)\pctiles.h
|
||||
PCVIDEO_H = $(INCL)\portio.h $(INCL)\pcvideo.h
|
||||
@@ -1668,7 +1668,7 @@ $(O)tty.o: $(HACK_H) $(WINTTY_H) $(SYS)\pctty.c
|
||||
@echo $(BCOPTS2) >> $(VROOMMCFG)
|
||||
$(CC) $(CFLAGSN) $(COBJNAM)$@ $(SYS)\pctty.c
|
||||
|
||||
$(O)sys.o: $(HACK_H) $(SYS)\pcsys.c
|
||||
$(O)pcsys.o: $(HACK_H) $(SYS)\pcsys.c
|
||||
@type schema$(SCHEMA).bc | find "$(@B)_o" > $(VROOMMCFG)
|
||||
@echo $(BCOPTS1) >> $(VROOMMCFG)
|
||||
@echo $(BCOPTS2) >> $(VROOMMCFG)
|
||||
@@ -1872,6 +1872,7 @@ $(O)rumors.o: $(PCHO) $(SRC)\rumors.c $(HACK_H) $(DLB_H)
|
||||
$(O)save.o: $(PCHO) $(SRC)\save.c $(HACK_H) $(LEV_H) $(QUEST_H)
|
||||
$(O)sit.o: $(PCHO) $(SRC)\sit.c $(HACK_H) $(ARTIFACT_H)
|
||||
$(O)steed.o: $(PCHO) $(SRC)\steed.c $(HACK_H)
|
||||
$(O)sys.o: $(PCHO) $(SRC)\sys.c $(HACK_H)
|
||||
$(O)sp_lev.o: $(PCHO) $(SRC)\sp_lev.c $(HACK_H) $(SP_LEV_H) $(DLB_H)
|
||||
$(O)spell.o: $(PCHO) $(SRC)\spell.c $(HACK_H)
|
||||
$(O)teleport.o: $(PCHO) $(SRC)\teleport.c $(HACK_H) # check dep
|
||||
|
||||
@@ -336,9 +336,9 @@ VOBJ19 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o $(O)vision.o
|
||||
VOBJ20 = $(O)vis_tab.o $(O)weapon.o $(O)were.o $(O)wield.o $(O)windows.o
|
||||
VOBJ21 = $(O)wintty.o $(O)wizard.o $(O)worm.o $(O)worn.o $(O)write.o
|
||||
VOBJ22 = $(O)zap.o $(O)light.o $(O)dlb.o $(O)dig.o $(O)teleport.o
|
||||
VOBJ23 = $(O)region.o
|
||||
VOBJ23 = $(O)region.o $(O)sys.o
|
||||
|
||||
SOBJ = $(O)msdos.o $(O)sound.o $(O)sys.o $(O)tty.o $(O)unix.o \
|
||||
SOBJ = $(O)msdos.o $(O)sound.o $(O)pcsys.o $(O)tty.o $(O)unix.o \
|
||||
$(O)video.o $(O)vidtxt.o $(O)pckeys.o
|
||||
|
||||
VVOBJ = $(O)version.o
|
||||
@@ -384,7 +384,8 @@ HACK_H = $(CONFIG_H) $(INCL)/context.h $(DUNGEON_H) \
|
||||
$(INCL)/mkroom.h $(INCL)/objclass.h $(INCL)/trap.h \
|
||||
$(INCL)/flag.h $(RM_H) $(INCL)/vision.h \
|
||||
$(INCL)/wintype.h $(INCL)/engrave.h $(INCL)/rect.h \
|
||||
$(INCL)/trampoli.h $(INCL)/hack.h $(REGION_H)
|
||||
$(INCL)/trampoli.h $(INCL)/hack.h $(REGION_H) \
|
||||
$(INCL)/sys.h
|
||||
DLB_H = $(INCL)/dlb.h
|
||||
|
||||
ifeq ($(SUPPRESS_GRAPHICS),Y)
|
||||
@@ -990,7 +991,7 @@ $(O)tty.o: $(HACK_H) $(INCL)/wintty.h $(SSHR)/pctty.c
|
||||
$(O)unix.o: $(HACK_H) $(SSHR)/pcunix.c
|
||||
$(CC) $(cflags) -o$@ $(SSHR)/pcunix.c
|
||||
|
||||
$(O)sys.o : $(HACK_H) $(SSHR)/pcsys.c
|
||||
$(O)pcsys.o : $(HACK_H) $(SSHR)/pcsys.c
|
||||
$(CC) $(cflags) -o$@ $(SSHR)/pcsys.c
|
||||
|
||||
# sys/msdos
|
||||
@@ -1249,6 +1250,7 @@ $(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)/dlb.h $(INCL)/sp_lev.h
|
||||
$(O)spell.o: spell.c $(HACK_H)
|
||||
$(O)steal.o: steal.c $(HACK_H)
|
||||
$(O)steed.o: steed.c $(HACK_H)
|
||||
$(O)sys.o: sys.c $(HACK_H)
|
||||
$(O)teleport.o: teleport.c $(HACK_H)
|
||||
$(O)timeout.o: timeout.c $(HACK_H) $(INCL)/lev.h
|
||||
$(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.h $(PATCHLEV_H)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SCCS Id: @(#)Makefile.MSC 3.5 2006/01/05
|
||||
# SCCS Id: @(#)Makefile.MSC 3.5 2008/01/30
|
||||
# Copyright (c) NetHack PC Development Team 1997 - 2006.
|
||||
# PC NetHack 3.4x Makefile for MSC V1.52c (16 bit compiler)
|
||||
#
|
||||
@@ -220,9 +220,9 @@ VOBJ19 = trap.o u_init.o uhitm.o vault.o vision.o
|
||||
VOBJ20 = vis_tab.o weapon.o were.o wield.o windows.o
|
||||
VOBJ21 = wintty.o wizard.o worm.o worn.o write.o
|
||||
VOBJ22 = zap.o light.o dlb.o dig.o teleport.o
|
||||
VOBJ23 = random.o region.o
|
||||
VOBJ23 = random.o region.o sys.o
|
||||
|
||||
SOBJ = msdos.o sound.o sys.o tty.o unix.o video.o \
|
||||
SOBJ = msdos.o sound.o pcsys.o tty.o unix.o video.o \
|
||||
vidtxt.o pckeys.o
|
||||
|
||||
VVOBJ = version.o
|
||||
@@ -264,7 +264,7 @@ HACK_H = $(CONFIG_H) $(INCL)\context.h $(DUNGEON_H) $(DECL_H) \
|
||||
$(DISPLAY_H) $(INCL)\monsym.h $(INCL)\mkroom.h \
|
||||
$(INCL)\objclass.h $(INCL)\trap.h $(INCL)\flag.h \
|
||||
$(RM_H) $(INCL)\vision.h $(INCL)\wintype.h \
|
||||
$(INCL)\engrave.h $(INCL)\rect.h \
|
||||
$(INCL)\engrave.h $(INCL)\rect.h $(INCL)\sys.h \
|
||||
$(INCL)\trampoli.h $(INCL)\hack.h
|
||||
DLB_H = $(INCL)\dlb.h
|
||||
TILE_H = $(WSHR)\tile.h $(MSYS)\pctiles.h
|
||||
@@ -950,7 +950,7 @@ dlb_main.o: $(U)dlb_main.c $(INCL)\config.h $(DLB_H)
|
||||
main.o: $(SSHR)\pcmain.c $(HACK_H) $(INCL)\dlb.h \
|
||||
#$(INCL)\win32api.h
|
||||
@$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(SSHR)\pcmain.c
|
||||
sys.o: $(SSHR)\pcsys.c $(HACK_H)
|
||||
pcsys.o: $(SSHR)\pcsys.c $(HACK_H)
|
||||
@$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(SSHR)\pcsys.c
|
||||
tty.o: $(SSHR)\pctty.c $(HACK_H)
|
||||
@$(CC) $(CFLAGS) $(SPECOPTS) /Fo$@ $(SSHR)\pctty.c
|
||||
@@ -1083,6 +1083,7 @@ sp_lev.o: sp_lev.c $(HACK_H) $(INCL)\dlb.h $(INCL)\sp_lev.h
|
||||
spell.o: spell.c $(HACK_H)
|
||||
steal.o: steal.c $(HACK_H)
|
||||
steed.o: steed.c $(HACK_H)
|
||||
sys.o: sys.c $(HACK_H)
|
||||
teleport.o: teleport.c $(HACK_H)
|
||||
timeout.o: timeout.c $(HACK_H) $(INCL)\lev.h
|
||||
topten.o: topten.c $(HACK_H) $(INCL)\dlb.h $(INCL)\patchlev.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)schema1.BC 3.5 1999/10/28 */
|
||||
/* SCCS Id: @(#)schema1.BC 3.5 2008/01/30 */
|
||||
/* Copyright (c) Yitzhak Sapir, 1999 */
|
||||
/* */
|
||||
/* NetHack Overlay Schema */
|
||||
@@ -194,7 +194,7 @@
|
||||
-zCsteal_1 -zAOVLY -zCOVL149
|
||||
-zCsteal_b -zAOVLY -zCOVL150
|
||||
-zCsteed_o -zAOVLY -zCOVL188
|
||||
-zCsys_o -zAOVLY -zCOVL151
|
||||
-zCpcsys_o -zAOVLY -zCOVL151
|
||||
-zCteleport_o -zAOVLY -zCOVL152
|
||||
-zCtermcap_0 -zAOVLY -zCOVL153
|
||||
-zCtermcap_1 -zAOVLY -zCOVL154
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)schema2.BC 3.5 1999/10/28 */
|
||||
/* SCCS Id: @(#)schema2.BC 3.5 2008/01/30 */
|
||||
/* Copyright (c) Yitzhak Sapir, 1999 */
|
||||
/* */
|
||||
/* NetHack Overlay Schema */
|
||||
@@ -190,7 +190,7 @@
|
||||
-zCsteal_1 -zAOVLY -zCOVL171
|
||||
-zCsteal_b -zAOVLY -zCOVL172
|
||||
-zCsteed_o -zAOVLY -zCOVL173
|
||||
-zCsys_o -zAOVLY -zCOVL174
|
||||
-zCpcsys_o -zAOVLY -zCOVL174
|
||||
-zCteleport_o -zAOVLY -zCOVL175
|
||||
-zCtermcap_0 -zAOVLY -zCOVL176
|
||||
-zCtermcap_1 -zAOVLY -zCOVL177
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SCCS Id: @(#)Makefile.os2 3.5 2007/05/25
|
||||
# SCCS Id: @(#)Makefile.os2 3.5 2008/01/30
|
||||
# OS/2 NetHack 3.5 Makefile for OS/2 versions 1.x and 2.x
|
||||
# Copyright (C) 1990, 1991, 1992, 1993, 1996 Timo Hakulinen
|
||||
#
|
||||
@@ -665,6 +665,7 @@ VOBJ273 = $(OBJ)\write.o
|
||||
VOBJ274 = $(OBJ)\zap.o
|
||||
VOBJ281 = $(OBJ)\role.o
|
||||
VOBJ282 = $(OBJ)\steed.o
|
||||
VOBJ283 = $(OBJ)\sys.o
|
||||
|
||||
VOBJ01 = $(VOBJ011) $(VOBJ012) $(VOBJ013) $(VOBJ014)
|
||||
VOBJ02 = $(VOBJ021) $(VOBJ022) $(VOBJ023) $(VOBJ024)
|
||||
@@ -693,7 +694,7 @@ VOBJ24 = $(VOBJ241) $(VOBJ242) $(VOBJ243) $(VOBJ244)
|
||||
VOBJ25 = $(VOBJ251) $(VOBJ252) $(VOBJ253) $(VOBJ254)
|
||||
VOBJ26 = $(VOBJ261) $(VOBJ262) $(VOBJ263) $(VOBJ264)
|
||||
VOBJ27 = $(VOBJ271) $(VOBJ272) $(VOBJ273) $(VOBJ274)
|
||||
VOBJ28 = $(VOBJ281) $(VOBJ282)
|
||||
VOBJ28 = $(VOBJ281) $(VOBJ282) $(VOBJ283)
|
||||
VOBJ29 = $(WINOBJ) $(RANDOM)
|
||||
HHOBJ = $(OBJ)\version.o
|
||||
|
||||
@@ -719,7 +720,7 @@ HACK_H = $(CONFIG_H) $(INCL)\context.h $(DECL_H) $(INCL)\monsym.h $(INCL)\mkr
|
||||
$(INCL)\objclass.h $(TRAP_H) $(INCL)\engrave.h $(INCL)\flag.h \
|
||||
$(INCL)\rm.h $(INCL)\dungeon.h $(INCL)\hack.h $(INCL)\display.h \
|
||||
$(INCL)\vision.h $(INCL)\wintty.h $(INCL)\wintype.h $(INCL)\align.h \
|
||||
$(INCL)\winprocs.h
|
||||
$(INCL)\winprocs.h $(INCL)\sys.h
|
||||
|
||||
#
|
||||
# The default target.
|
||||
@@ -873,6 +874,7 @@ $(TEMP)\$(GAME).r : $(HOBJ) $(TEMP)\$(GAMEDEF)
|
||||
$(ECHO) $(VOBJ274) >> $@
|
||||
$(ECHO) $(VOBJ281) >> $@
|
||||
$(ECHO) $(VOBJ282) >> $@
|
||||
$(ECHO) $(VOBJ283) >> $@
|
||||
$(ECHO) $(WINOBJ1) >> $@
|
||||
$(ECHO) $(WINOBJ2) >> $@
|
||||
$(ECHO) $(WINOBJ3) >> $@
|
||||
@@ -1679,6 +1681,8 @@ $(OBJ)\steal.o : $(SRC)\$(CB) $(HACK_H)
|
||||
$(SRCCC)
|
||||
$(OBJ)\steed.o : $(SRC)\$(CB) $(HACK_H)
|
||||
$(SRCCC)
|
||||
$(OBJ)\sys.o : $(SRC)\$(CB) $(HACK_H)
|
||||
$(SRCCC)
|
||||
$(OBJ)\teleport.o : $(SRC)\$(CB) $(HACK_H)
|
||||
$(SRCCC)
|
||||
$(OBJ)\timeout.o : $(SRC)\$(CB) $(HACK_H)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)pcmain.c 3.5 2007/02/14 */
|
||||
/* SCCS Id: @(#)pcmain.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -92,6 +92,7 @@ char *argv[];
|
||||
{
|
||||
boolean resuming;
|
||||
|
||||
sys_early_init();
|
||||
resuming = pcmain(argc,argv);
|
||||
#ifdef LAN_FEATURES
|
||||
init_lan_features();
|
||||
|
||||
@@ -87,7 +87,19 @@
|
||||
wish to override the compiled-in defaults:
|
||||
WIZARDS= a space-separated list of usernames who can use -D
|
||||
If the first character is '*' then any user can use -D.
|
||||
This is a standards config file, so blank lines and lines starting with
|
||||
SUPPORT= one line, probably starting with a verb, telling how to
|
||||
contact your local support person/group for NetHack. If there
|
||||
is no local support, do not use this line. Some sample values:
|
||||
call Joan at +1 312 555-1234.
|
||||
email support@example.com
|
||||
visit http://www.example.com/game-support
|
||||
RECOVER= instructions for running recover. If RECOVER is not available,
|
||||
do not use this line. Some sample values:
|
||||
To get your game recovered, contact support.
|
||||
Run /usr/local/bin/nh-recover to recover your game.
|
||||
|
||||
|
||||
This is a standard config file, so blank lines and lines starting with
|
||||
pound signs are ignored; while other, standard options (such as catname)
|
||||
can be specified in this file, this is considered a bug and may be changed
|
||||
in the future.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# NetHack Makefile.
|
||||
# SCCS Id: @(#)Makefile.src 3.5 2007/12/12
|
||||
# SCCS Id: @(#)Makefile.src 3.5 2008/01/30
|
||||
|
||||
# newer makes predefine $(MAKE) to 'make' and do smarter processing of
|
||||
# recursive make calls if $(MAKE) is used
|
||||
@@ -327,7 +327,8 @@ HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \
|
||||
options.c pager.c pickup.c pline.c polyself.c potion.c pray.c \
|
||||
priest.c quest.c questpgr.c read.c rect.c region.c restore.c rip.c \
|
||||
rnd.c role.c rumors.c save.c shk.c shknam.c sit.c sounds.c sp_lev.c \
|
||||
spell.c steal.c steed.c teleport.c timeout.c topten.c track.c trap.c \
|
||||
spell.c steal.c steed.c sys.c teleport.c timeout.c topten.c track.c \
|
||||
trap.c \
|
||||
u_init.c uhitm.c vault.c version.c vision.c weapon.c were.c wield.c \
|
||||
windows.c wizard.c worm.c worn.c write.c zap.c
|
||||
|
||||
@@ -362,7 +363,7 @@ HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h color.h \
|
||||
macconf.h mextra.h mfndpos.h micro.h mkroom.h \
|
||||
monattk.h mondata.h monflag.h monst.h monsym.h obj.h objclass.h \
|
||||
os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h region.h rm.h \
|
||||
sp_lev.h spell.h system.h tcap.h timeout.h tosconf.h tradstdc.h \
|
||||
sp_lev.h spell.h sys.h system.h tcap.h timeout.h tosconf.h tradstdc.h \
|
||||
trampoli.h trap.h unixconf.h vision.h vmsconf.h wintty.h \
|
||||
winX.h winprocs.h wintype.h you.h youprop.h
|
||||
|
||||
@@ -384,6 +385,7 @@ HOBJ = $(FIRSTOBJ) allmain.o alloc.o apply.o artifact.o attrib.o ball.o \
|
||||
pager.o pickup.o pline.o polyself.o potion.o pray.o priest.o \
|
||||
quest.o questpgr.o read.o rect.o region.o restore.o rip.o rnd.o \
|
||||
role.o rumors.o save.o shk.o shknam.o sit.o sounds.o sp_lev.o spell.o \
|
||||
sys.o \
|
||||
steal.o steed.o teleport.o timeout.o topten.o track.o trap.o u_init.o \
|
||||
uhitm.o vault.o vision.o vis_tab.o weapon.o were.o wield.o windows.o \
|
||||
wizard.o worm.o worn.o write.o zap.o \
|
||||
@@ -572,7 +574,7 @@ $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/align.h \
|
||||
../include/flag.h ../include/rm.h ../include/vision.h \
|
||||
../include/display.h ../include/engrave.h ../include/rect.h \
|
||||
../include/region.h ../include/winprocs.h ../include/wintty.h \
|
||||
../include/trampoli.h
|
||||
../include/trampoli.h ../include/sys.h
|
||||
touch $(HACK_H)
|
||||
#
|
||||
tos.o: ../sys/atari/tos.c $(HACK_H) ../include/tcap.h
|
||||
@@ -790,6 +792,7 @@ sp_lev.o: sp_lev.c $(HACK_H) ../include/dlb.h ../include/sp_lev.h
|
||||
spell.o: spell.c $(HACK_H)
|
||||
steal.o: steal.c $(HACK_H)
|
||||
steed.o: steed.c $(HACK_H)
|
||||
sys.o: sys.c $(HACK_H)
|
||||
teleport.o: teleport.c $(HACK_H)
|
||||
timeout.o: timeout.c $(HACK_H) ../include/lev.h
|
||||
topten.o: topten.c $(HACK_H) ../include/dlb.h ../include/patchlevel.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)unixmain.c 3.5 2007/02/14 */
|
||||
/* SCCS Id: @(#)unixmain.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -54,6 +54,8 @@ char *argv[];
|
||||
boolean exact_username;
|
||||
boolean resuming = FALSE; /* assume new game */
|
||||
|
||||
sys_early_init();
|
||||
|
||||
#if defined(__APPLE__)
|
||||
/* special hack to change working directory to a resource fork when
|
||||
running from finder --sam */
|
||||
@@ -540,11 +542,11 @@ authorize_wizard_mode()
|
||||
}
|
||||
}
|
||||
#ifdef SYSCF
|
||||
if (pw && wizards[0]) {
|
||||
if(wizards[0] == '*') return TRUE; /*allow any user to be wizard*/
|
||||
if (pw && sysopt.wizards[0]) {
|
||||
if(sysopt.wizards[0] == '*') return TRUE; /*allow any user to be wizard*/
|
||||
int pwlen = strlen(pw->pw_name);
|
||||
char *eop = eos(wizards);
|
||||
char *w = wizards;
|
||||
char *eop = eos(sysopt.wizards);
|
||||
char *w = sysopt.wizards;
|
||||
while( w+pwlen <= eop ){
|
||||
if( ! *w ) break;
|
||||
if( isspace(*w) ){ w++; continue;}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# NetHack Makefile (VMS) - for building nethack itself.
|
||||
# SCCS Id: @(#)Makefile.src 3.5 2007/10/27
|
||||
# SCCS Id: @(#)Makefile.src 3.5 2008/01/30
|
||||
|
||||
# Copy this file to [.src]Makefile. and then edit it as needed.
|
||||
# The default configuration is for building with DEC C (aka Compaq C).
|
||||
@@ -111,8 +111,8 @@ HACKCSRC = allmain.c alloc.c apply.c artifact.c attrib.c ball.c bones.c \
|
||||
options.c pager.c pickup.c pline.c polyself.c potion.c pray.c \
|
||||
priest.c quest.c questpgr.c read.c rect.c region.c restore.c rip.c rnd.c \
|
||||
role.c rumors.c save.c shk.c shknam.c sit.c sounds.c sp_lev.c spell.c \
|
||||
steal.c steed.c teleport.c timeout.c topten.c track.c trap.c u_init.c \
|
||||
uhitm.c vault.c version.c vision.c weapon.c were.c wield.c \
|
||||
steal.c steed.c sys.c teleport.c timeout.c topten.c track.c trap.c \
|
||||
u_init.c uhitm.c vault.c version.c vision.c weapon.c were.c wield.c \
|
||||
windows.c wizard.c worm.c worn.c write.c zap.c
|
||||
|
||||
# generated source files (tile.c is handled separately via WINxxxSRC)
|
||||
@@ -131,9 +131,9 @@ HACKINCL = align.h amiconf.h artifact.h artilist.h attrib.h beconf.h color.h \
|
||||
hack.h lev.h macconf.h mextra.h mfndpos.h micro.h \
|
||||
mkroom.h monattk.h mondata.h monflag.h monst.h monsym.h obj.h \
|
||||
objclass.h os2conf.h patchlevel.h pcconf.h permonst.h prop.h rect.h \
|
||||
region.h rm.h sp_lev.h spell.h system.h tcap.h timeout.h tosconf.h \
|
||||
tradstdc.h trampoli.h trap.h unixconf.h vision.h vmsconf.h \
|
||||
wintty.h winX.h winprocs.h wintype.h you.h youprop.h
|
||||
region.h rm.h sp_lev.h spell.h sys.h system.h tcap.h timeout.h \
|
||||
tosconf.h tradstdc.h trampoli.h trap.h unixconf.h vision.h \
|
||||
vmsconf.h wintty.h winX.h winprocs.h wintype.h you.h youprop.h
|
||||
|
||||
#HSOURCES = $(HACKINCL) date.h onames.h pm.h vis_tab.h\
|
||||
# lev_comp.h dgn_comp.h dgn_file.h
|
||||
@@ -156,8 +156,8 @@ HOBJ4 = mplayer.obj,mthrowu.obj,muse.obj,music.obj,o_init.obj,objnam.obj, \
|
||||
potion.obj,pray.obj,priest.obj,quest.obj,questpgr.obj,read.obj
|
||||
HOBJ5 = rect.obj,region.obj,restore.obj,rip.obj,rnd.obj,role.obj, \
|
||||
rumors.obj,save.obj,shk.obj,shknam.obj,sit.obj,sounds.obj,sp_lev.obj, \
|
||||
spell.obj,steal.obj,steed.obj,teleport.obj,timeout.obj,topten.obj, \
|
||||
track.obj,trap.obj
|
||||
spell.obj,steal.obj,steed.obj,sys.obj,teleport.obj,timeout.obj, \
|
||||
topten.obj, track.obj,trap.obj
|
||||
HOBJ6 = u_init.obj,uhitm.obj,vault.obj,vision.obj,vis_tab.obj,weapon.obj, \
|
||||
were.obj,wield.obj,windows.obj,wizard.obj,worm.obj,worn.obj, \
|
||||
write.obj,zap.obj,version.obj
|
||||
@@ -309,7 +309,7 @@ $(HACK_H) : $(INC)hack.h $(CONFIG_H) $(INC)align.h \
|
||||
$(INC)onames.h $(INC)timeout.h $(INC)trap.h \
|
||||
$(INC)flag.h $(INC)rm.h $(INC)vision.h \
|
||||
$(INC)display.h $(INC)engrave.h $(INC)rect.h $(INC)region.h \
|
||||
$(INC)winprocs.h $(INC)wintty.h $(INC)trampoli.h
|
||||
$(INC)winprocs.h $(INC)wintty.h $(INC)trampoli.h $(INC)sys.h
|
||||
$(TOUCH) $(HACK_H)
|
||||
# VMS-specific code
|
||||
vmsmain.obj : $(VMS)vmsmain.c $(HACK_H) $(INC)dlb.h
|
||||
@@ -439,6 +439,7 @@ sp_lev.obj : sp_lev.c $(HACK_H) $(INC)dlb.h $(INC)sp_lev.h
|
||||
spell.obj : spell.c $(HACK_H)
|
||||
steal.obj : steal.c $(HACK_H)
|
||||
steed.obj : steed.c $(HACK_H)
|
||||
sys.obj : sys.c $(HACK_H)
|
||||
teleport.obj : teleport.c $(HACK_H)
|
||||
timeout.obj : timeout.c $(HACK_H) $(INC)lev.h
|
||||
topten.obj : topten.c $(HACK_H) $(INC)dlb.h $(INC)patchlevel.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)vmsmain.c 3.5 2007/02/14 */
|
||||
/* SCCS Id: @(#)vmsmain.c 3.5 2008/01/30 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
/* main.c - VMS NetHack */
|
||||
@@ -42,6 +42,8 @@ char *argv[];
|
||||
privon();
|
||||
#endif
|
||||
|
||||
sys_early_init();
|
||||
|
||||
atexit(byebye);
|
||||
hname = argv[0];
|
||||
hname = vms_basename(hname); /* name used in 'usage' type messages */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)winhack.c 3.5 2005/01/23 */
|
||||
/* SCCS Id: @(#)winhack.c 3.5 2008/01/30 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
// winhack.cpp : Defines the entry point for the application.
|
||||
//
|
||||
@@ -42,6 +42,8 @@ int APIENTRY WinMain(HINSTANCE hInstance,
|
||||
TCHAR wbuf[NHSTR_BUFSIZE];
|
||||
char buf[NHSTR_BUFSIZE];
|
||||
|
||||
sys_early_init();
|
||||
|
||||
/* ensure that we don't access violate on a panic() */
|
||||
windowprocs.win_raw_print = mswin_raw_print;
|
||||
windowprocs.win_raw_print_bold = mswin_raw_print_bold;
|
||||
|
||||
@@ -429,11 +429,11 @@ VOBJ19 = $(O)rect.o $(O)region.o $(O)restore.o $(O)rip.o
|
||||
VOBJ20 = $(O)rnd.o $(O)role.o $(O)rumors.o $(O)save.o
|
||||
VOBJ21 = $(O)shk.o $(O)shknam.o $(O)sit.o $(O)sounds.o
|
||||
VOBJ22 = $(O)sp_lev.o $(O)spell.o $(O)steal.o $(O)steed.o
|
||||
VOBJ23 = $(O)teleport.o $(O)timeout.o $(O)topten.o $(O)track.o
|
||||
VOBJ24 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o
|
||||
VOBJ25 = $(O)vis_tab.o $(O)vision.o $(O)weapon.o $(O)were.o
|
||||
VOBJ26 = $(O)wield.o $(O)windows.o $(O)wizard.o $(O)worm.o
|
||||
VOBJ27 = $(O)worn.o $(O)write.o $(O)zap.o
|
||||
VOBJ23 = $(O)sys.o $(O)teleport.o $(O)timeout.o $(O)topten.o
|
||||
VOBJ24 = $(O)track.o $(O)trap.o $(O)u_init.o $(O)uhitm.o
|
||||
VOBJ25 = $(O)vault.o $(O)vis_tab.o $(O)vision.o $(O)weapon.o
|
||||
VOBJ26 = $(O)were.o $(O)wield.o $(O)windows.o $(O)wizard.o
|
||||
VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o
|
||||
|
||||
DLBOBJ = $(O)dlb.o
|
||||
|
||||
@@ -478,7 +478,7 @@ HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\context.h $(INCL)\align.h \
|
||||
$(INCL)\permonst.h $(INCL)\monattk.h \
|
||||
$(INCL)\monflag.h $(INCL)\mondata.h $(INCL)\pm.h \
|
||||
$(INCL)\wintype.h $(INCL)\decl.h $(INCL)\quest.h \
|
||||
$(INCL)\spell.h $(INCL)\color.h $(INCL)\obj.h \
|
||||
$(INCL)\spell.h $(INCL)\sys.h $(INCL)\color.h $(INCL)\obj.h \
|
||||
$(INCL)\you.h $(INCL)\attrib.h $(INCL)\monst.h \
|
||||
$(INCL)\mextra.h $(INCL)\skills.h $(INCL)\onames.h \
|
||||
$(INCL)\timeout.h $(INCL)\trap.h $(INCL)\flag.h $(INCL)\rm.h \
|
||||
@@ -1351,6 +1351,7 @@ $(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)\dlb.h $(INCL)\sp_lev.h
|
||||
$(O)spell.o: spell.c $(HACK_H)
|
||||
$(O)steal.o: steal.c $(HACK_H)
|
||||
$(O)steed.o: steed.c $(HACK_H)
|
||||
$(O)sys.o: sys.c $(HACK_H)
|
||||
$(O)teleport.o: teleport.c $(HACK_H)
|
||||
$(O)timeout.o: timeout.c $(HACK_H) $(INCL)\lev.h
|
||||
$(O)topten.o: topten.c $(HACK_H) $(INCL)\dlb.h $(INCL)\patchlevel.h
|
||||
|
||||
@@ -385,11 +385,11 @@ VOBJ19 = $(O)rect.o $(O)region.o $(O)restore.o $(O)rip.o
|
||||
VOBJ20 = $(O)rnd.o $(O)role.o $(O)rumors.o $(O)save.o
|
||||
VOBJ21 = $(O)shk.o $(O)shknam.o $(O)sit.o $(O)sounds.o
|
||||
VOBJ22 = $(O)sp_lev.o $(O)spell.o $(O)steal.o $(O)steed.o
|
||||
VOBJ23 = $(O)teleport.o $(O)timeout.o $(O)topten.o $(O)track.o
|
||||
VOBJ24 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o
|
||||
VOBJ25 = $(O)vis_tab.o $(O)vision.o $(O)weapon.o $(O)were.o
|
||||
VOBJ26 = $(O)wield.o $(O)windows.o $(O)wizard.o $(O)worm.o
|
||||
VOBJ27 = $(O)worn.o $(O)write.o $(O)zap.o
|
||||
VOBJ23 = $(O)sys.o $(O)teleport.o $(O)timeout.o $(O)topten.o
|
||||
VOBJ24 = $(O)track.o $(O)trap.o $(O)u_init.o $(O)uhitm.o
|
||||
VOBJ25 = $(O)vault.o $(O)vis_tab.o $(O)vision.o $(O)weapon.o
|
||||
VOBJ26 = $(O)were.o $(O)wield.o $(O)windows.o $(O)wizard.o
|
||||
VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o
|
||||
|
||||
DLBOBJ = $(O)dlb.o
|
||||
|
||||
@@ -440,7 +440,7 @@ HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/align.h $(INCL)/context.h \
|
||||
$(INCL)/timeout.h $(INCL)/trap.h $(INCL)/flag.h $(INCL)/rm.h \
|
||||
$(INCL)/vision.h $(INCL)/display.h $(INCL)/engrave.h \
|
||||
$(INCL)/rect.h $(INCL)/region.h $(INCL)/winprocs.h \
|
||||
$(INCL)/wintty.h $(INCL)/trampoli.h
|
||||
$(INCL)/wintty.h $(INCL)/sys.h $(INCL)/trampoli.h
|
||||
|
||||
LEV_H = $(INCL)/lev.h
|
||||
DGN_FILE_H = $(INCL)/dgn_file.h
|
||||
@@ -1324,6 +1324,7 @@ $(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)/dlb.h $(INCL)/sp_lev.h
|
||||
$(O)spell.o: spell.c $(HACK_H)
|
||||
$(O)steal.o: steal.c $(HACK_H)
|
||||
$(O)steed.o: steed.c $(HACK_H)
|
||||
$(O)sys.o: sys.c $(HACK_H)
|
||||
$(O)teleport.o: teleport.c $(HACK_H)
|
||||
$(O)timeout.o: timeout.c $(HACK_H) $(INCL)/lev.h
|
||||
$(O)topten.o: topten.c $(HACK_H) $(INCL)/dlb.h $(INCL)/patchlevel.h
|
||||
|
||||
@@ -400,11 +400,11 @@ VOBJ19 = $(O)rect.o $(O)region.o $(O)restore.o $(O)rip.o
|
||||
VOBJ20 = $(O)rnd.o $(O)role.o $(O)rumors.o $(O)save.o
|
||||
VOBJ21 = $(O)shk.o $(O)shknam.o $(O)sit.o $(O)sounds.o
|
||||
VOBJ22 = $(O)sp_lev.o $(O)spell.o $(O)steal.o $(O)steed.o
|
||||
VOBJ23 = $(O)teleport.o $(O)timeout.o $(O)topten.o $(O)track.o
|
||||
VOBJ24 = $(O)trap.o $(O)u_init.o $(O)uhitm.o $(O)vault.o
|
||||
VOBJ25 = $(O)vis_tab.o $(O)vision.o $(O)weapon.o $(O)were.o
|
||||
VOBJ26 = $(O)wield.o $(O)windows.o $(O)wizard.o $(O)worm.o
|
||||
VOBJ27 = $(O)worn.o $(O)write.o $(O)zap.o
|
||||
VOBJ23 = $(O)sys.o $(O)teleport.o $(O)timeout.o $(O)topten.o
|
||||
VOBJ24 = $(O)track.o $(O)trap.o $(O)u_init.o $(O)uhitm.o
|
||||
VOBJ25 = $(O)vault.o $(O)vis_tab.o $(O)vision.o $(O)weapon.o
|
||||
VOBJ26 = $(O)were.o $(O)wield.o $(O)windows.o $(O)wizard.o
|
||||
VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o
|
||||
|
||||
DLBOBJ = $(O)dlb.o
|
||||
|
||||
@@ -454,7 +454,7 @@ HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\align.h $(INCL)\context.h \
|
||||
$(INCL)\timeout.h $(INCL)\trap.h $(INCL)\flag.h $(INCL)\rm.h \
|
||||
$(INCL)\vision.h $(INCL)\display.h $(INCL)\engrave.h \
|
||||
$(INCL)\rect.h $(INCL)\region.h $(INCL)\winprocs.h $(INCL)\botl.h \
|
||||
$(INCL)\wintty.h $(INCL)\trampoli.h
|
||||
$(INCL)\wintty.h $(INCL)\sys.h $(INCL)\trampoli.h
|
||||
|
||||
LEV_H = $(INCL)\lev.h
|
||||
DGN_FILE_H = $(INCL)\dgn_file.h
|
||||
@@ -1432,6 +1432,7 @@ $(O)sp_lev.o: sp_lev.c $(HACK_H) $(INCL)\dlb.h $(INCL)\sp_lev.h
|
||||
$(O)spell.o: spell.c $(HACK_H)
|
||||
$(O)steal.o: steal.c $(HACK_H)
|
||||
$(O)steed.o: steed.c $(HACK_H)
|
||||
$(O)sys.o: sys.c $(HACK_H)
|
||||
$(O)teleport.o: teleport.c $(HACK_H)
|
||||
$(O)timeout.o: timeout.c $(HACK_H) $(INCL)\lev.h
|
||||
$(O)topten.o: topten.c $(HACK_H) $(INCL)\dlb.h $(INCL)\patchlevel.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)gnmain.c 3.5 2000/07/16 */
|
||||
/* SCCS Id: @(#)gnmain.c 3.5 2008/01/30 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -137,10 +137,29 @@ ghack_about_cb(GtkWidget *widget, gpointer data)
|
||||
}
|
||||
|
||||
getversionstring(buf);
|
||||
#if 0
|
||||
/* XXX this needs further re-write to use DEVTEAM_EMAIL, DEVTEAM_URL,
|
||||
* sysopt.support, etc. I'm not doing it now because I can't test
|
||||
* it yet. (keni)
|
||||
*/
|
||||
/* out of date first cut: */
|
||||
! len = strlen(buf);
|
||||
! char *str1 = _("\nSend comments and bug reports to:\n");
|
||||
! len += strlen(str1);
|
||||
! len += sysopt.email;
|
||||
! char *str2 = _("\nThis game is free software. See License for details.");
|
||||
! len += strlen(str2);
|
||||
! str = (char*)alloc(len+1);
|
||||
! strcat(buf, str1);
|
||||
! strcat(buf, sysopt.email);
|
||||
! strcat(buf, str2);
|
||||
free(str) below
|
||||
#else
|
||||
strcat( buf1, VERSION_STRING);
|
||||
strcat( buf,
|
||||
_("\nSend comments and bug reports to: nethack-bugs@nethack.org\n"
|
||||
"This game is free software. See License for details."));
|
||||
#endif
|
||||
about = gnome_about_new(_("Nethack"),
|
||||
buf1, "Copyright (C) 1985-2002 Mike Stephenson",
|
||||
(const char **)authors, buf,
|
||||
|
||||
Reference in New Issue
Block a user