Merge branch 'master' into win32-x64-working

* master: (354 commits)
  Add missing protos
  a warning bout lc_error
  Add S_poisoncloud to Guidebooks
  ...

Conflicts:
	.gitattributes
	dat/.gitattributes
	doc/.gitattributes
	doc/Guidebook.mn
	include/config.h
	include/decl.h
	include/extern.h
	include/flag.h
	include/hack.h
	include/ntconf.h
	include/sys.h
	include/wceconf.h
	src/apply.c
	src/attrib.c
	src/bones.c
	src/botl.c
	src/dbridge.c
	src/dig.c
	src/do.c
	src/do_name.c
	src/dog.c
	src/dungeon.c
	src/eat.c
	src/end.c
	src/files.c
	src/fountain.c
	src/hack.c
	src/invent.c
	src/light.c
	src/makemon.c
	src/mhitu.c
	src/mklev.c
	src/mkmaze.c
	src/mkobj.c
	src/mkroom.c
	src/mon.c
	src/objnam.c
	src/options.c
	src/pager.c
	src/pickup.c
	src/potion.c
	src/pray.c
	src/questpgr.c
	src/read.c
	src/restore.c
	src/rnd.c
	src/role.c
	src/rumors.c
	src/save.c
	src/shk.c
	src/sit.c
	src/sp_lev.c
	src/sys.c
	src/teleport.c
	src/trap.c
	src/u_init.c
	src/uhitm.c
	src/wield.c
	src/worn.c
	src/zap.c
	sys/amiga/.gitattributes
	sys/mac/.gitattributes
	sys/msdos/.gitattributes
	sys/msdos/pctiles.c
	sys/msdos/vidvga.c
	sys/os2/.gitattributes
	sys/share/.gitattributes
	sys/share/pcmain.c
	sys/unix/.gitattributes
	sys/unix/hints/.gitattributes
	sys/unix/sysconf
	sys/unix/unixmain.c
	sys/vms/.gitattributes
	sys/wince/.gitattributes
	sys/wince/mhstatus.c
	sys/winnt/.gitattributes
	sys/winnt/Makefile.msc
	sys/winnt/nhsetup.bat
	util/lev_comp.l
	util/makedefs.c
	win/X11/winmenu.c
	win/X11/winstat.c
	win/gnome/gnstatus.c
	win/share/tilemap.c
	win/tty/termcap.c
	win/tty/topl.c
	win/tty/wintty.c
This commit is contained in:
Derek S. Ray
2015-04-05 23:42:15 -04:00
197 changed files with 29181 additions and 15618 deletions

View File

@@ -1 +1 @@
Makefile.* filter=NHtext merge=NHsubst
Makefile.* NHSUBST

View File

@@ -9,7 +9,7 @@ NHSROOT=..
# SHELL=E:/GEMINI2/MUPFEL.TTP
# UUDECODE=uudecode
VARDAT = data rumors quest.dat oracles options
VARDAT = bogusmon data engrave epitaph rumors quest.dat oracles options
all: $(VARDAT) spec_levs quest_levs dungeon
@@ -98,6 +98,15 @@ quest.dat: quest.txt ../util/makedefs
oracles: oracles.txt ../util/makedefs
../util/makedefs -h
engrave: engrave.txt ../util/makedefs
../util/makedefs -s
epitaph: epitaph.txt ../util/makedefs
../util/makedefs -s
bogusmon: bogusmon.txt ../util/makedefs
../util/makedefs -s
# note: 'options' should have already been made when include/date.h was created
options: ../util/makedefs
../util/makedefs -v

View File

@@ -56,7 +56,7 @@ VARDIR = $(HACKDIR)
# for Gnome
# VARDATND = x11tiles pet_mark.xbm rip.xpm mapbg.xpm
VARDATD = data oracles options quest.dat rumors
VARDATD = bogusmon data engrave epitaph oracles options quest.dat rumors
VARDAT = $(VARDATD) $(VARDATND)
# Some versions of make use the SHELL environment variable as the shell
@@ -109,6 +109,15 @@ manpages:
data: $(GAME)
( cd dat ; $(MAKE) data )
engrave: $(GAME)
( cd dat ; $(MAKE) engrave )
bogusmon: $(GAME)
( cd dat ; $(MAKE) bogusmon )
epitaph: $(GAME)
( cd dat ; $(MAKE) epitaph )
rumors: $(GAME)
( cd dat ; $(MAKE) rumors )
@@ -264,10 +273,10 @@ install: rootcheck $(GAME) recover $(VARDAT) dungeon spec_levs
# set up the game files
( $(MAKE) dofiles )
# set up some additional files
touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile
-( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile ; \
$(CHGRP) $(GAMEGRP) perm record logfile ; \
chmod $(VARFILEPERM) perm record logfile )
touch $(VARDIR)/perm $(VARDIR)/record $(VARDIR)/logfile $(VARDIR)/xlogfile
-( cd $(VARDIR) ; $(CHOWN) $(GAMEUID) perm record logfile xlogfile ; \
$(CHGRP) $(GAMEGRP) perm record logfile xlogfile ; \
chmod $(VARFILEPERM) perm record logfile xlogfile )
true; $(POSTINSTALL)
# and a reminder
@echo You may also want to reinstall the man pages via the doc Makefile.

View File

@@ -1 +1 @@
* filter=NHtext merge=NHsubst
* NHSUBST

View File

@@ -16,6 +16,7 @@ HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
SHELLDIR = $(PREFIX)/games
CFLAGS=-O -I../include -DNOTPARMDECL $(CFLAGS1) $(CFLAGS3)
CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\"
CFLAGS1=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\"
CFLAGS3=-DX11_GRAPHICS -DDEFAULT_WINDOW_SYS=\"X11\" -DNOTTYGRAPHICS

View File

@@ -19,6 +19,14 @@ WIZARDS=root games
# Only available if game has been compiled with DEBUG.
#DEBUGFILES=*
# Users allowed to use #exploremode. Same syntax as WIZARDS above.
EXPLORERS=*
# Show debugging information originating from these source files.
# Use '*' for all, or list source files separated by spaces.
# Only available if game has been compiled with DEBUG.
#DEBUGFILES=*
# Limit the number of simultaneous games (see also nethack.sh).
MAXPLAYERS=10
@@ -45,6 +53,9 @@ MAXPLAYERS=10
# numeric (1) user id.
#PERS_IS_UID=1
# Maximum number of score file entries to use for random statue names
#MAX_STATUENAME_RANK=10
# Try to get more info in case of a program bug or crash. Using GDB can
# get more information and works on more systems but requires gdb be available;
# using LIBC only works if NetHack is linked with a libc that supports the

View File

@@ -1,5 +1,4 @@
/* NetHack 3.5 unixmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
/* NetHack 3.5 unixmain.c $Date: 2012/01/27 20:15:31 $ $Revision: 1.42 $ */
/* NetHack 3.5 unixmain.c $NHDT-Date: 1427074144 2015/03/23 01:29:04 $ $NHDT-Branch: master $:$NHDT-Revision: 1.45 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -324,7 +323,7 @@ process_options(argc, argv)
int argc;
char *argv[];
{
int i;
int i, l;
/*
* Process options.
@@ -332,11 +331,25 @@ char *argv[];
while(argc > 1 && argv[1][0] == '-'){
argv++;
argc--;
l = (int)strlen(*argv);
/* must supply at least 4 chars to match "-XXXgraphics" */
if (l < 4) l = 4;
switch(argv[0][1]){
case 'D':
wizard = TRUE, discover = FALSE;
case 'd':
if ((argv[0][1] == 'D' && !argv[0][2])
|| !strcmpi(*argv, "-debug")) {
wizard = TRUE, discover = FALSE;
} else if (!strncmpi(*argv, "-DECgraphics", l)) {
load_symset("DECGraphics", PRIMARY);
switch_symbols(TRUE);
} else {
raw_printf("Unknown option: %s", *argv);
}
break;
case 'X':
discover = TRUE, wizard = FALSE;
break;
#ifdef NEWS
@@ -356,17 +369,12 @@ char *argv[];
break;
case 'I':
case 'i':
if (!strncmpi(argv[0]+1, "IBM", 3)) {
if (!strncmpi(*argv, "-IBMgraphics", l)) {
load_symset("IBMGraphics", PRIMARY);
load_symset("RogueIBM", ROGUESET);
switch_symbols(TRUE);
}
break;
/* case 'D': */
case 'd':
if (!strncmpi(argv[0]+1, "DEC", 3)) {
load_symset("DECGraphics", PRIMARY);
switch_symbols(TRUE);
} else {
raw_printf("Unknown option: %s", *argv);
}
break;
case 'p': /* profession (role) */
@@ -648,20 +656,4 @@ get_unix_pw()
return pw;
}
#ifdef SYSCF_FILE
void
assure_syscf_file(){
/* All we really care about is the end result - can we read the file?
* So just check that directly. */
int fd;
fd = open(SYSCF_FILE, O_RDONLY);
if(fd >= 0){
/* readable */
close(fd);
return;
}
raw_printf("Unable to open SYSCF_FILE.\n");
exit(EXIT_FAILURE);
}
#endif
/*unixmain.c*/