Path: uunet!news.tek.com!saab!billr From: billr@saab.CNA.TEK.COM (Bill Randle) Newsgroups: comp.sources.games Subject: v18i040: nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch3g/18 Date: 20 Jul 1993 22:32:46 GMT Organization: Tektronix, Inc, Redmond, OR, USA Lines: 1618 Approved: billr@saab.CNA.TEK.COM Message-ID: <22hrqe$9pu@ying.cna.tek.com> NNTP-Posting-Host: saab.cna.tek.com Xref: uunet comp.sources.games:1840 Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller) Posting-number: Volume 18, Issue 40 Archive-name: nethack31/patch3g Patch-To: nethack31: Volume 16, Issue 1-116 Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'patchit3.sh' <<'END_OF_FILE' X#!/bin/sh Xecho building file 'patches03f' Xcat patches03f.uu1 patches03f.uu2 | uudecode Xrm patches03f.uu1 patches03f.uu2 Xecho applying patches Xfor pfile in patches03[a-h] Xdo patch -p < $pfile Xdone Xecho building file 'dat/quest.txt' X(cd dat; cat quest.txt1 quest.txt2 > quest.txt; rm quest.txt1 quest.txt2) Xecho building file 'sys/mac/NHproj.hqx' X(cd sys/mac; cat NHproj.hqx1 NHproj.hqx2 > NHproj.hqx; rm NHproj.hqx1 NHproj.hqx2) Xecho building file 'sys/share/lev_yacc.c' X(cd sys/share; cat lev_yacc.c1 lev_yacc.c2 > lev_yacc.c; rm lev_yacc.c1 lev_yacc.c2) Xecho deleting unused file 'sys/mac/NHrez.hqx' Xrm -f sys/mac/NHrez.hqx Xexit 0 END_OF_FILE if test 632 -ne `wc -c <'patchit3.sh'`; then echo shar: \"'patchit3.sh'\" unpacked with wrong size! fi chmod +x 'patchit3.sh' # end of 'patchit3.sh' if test -f 'sys/msdos/MakeGCC.src' -a "${1}" != "-c" ; then echo shar: Renaming existing file \"'sys/msdos/MakeGCC.src'\" to \"'sys/msdos/MakeGCC.src.orig'\" mv -f 'sys/msdos/MakeGCC.src' 'sys/msdos/MakeGCC.src.orig' fi echo shar: Extracting \"'sys/msdos/MakeGCC.src'\" \(11479 characters\) sed "s/^X//" >'sys/msdos/MakeGCC.src' <<'END_OF_FILE' X# SCCS Id: @(#)MakeGCC.src 3.1 93/04/07 X# Copyright (c) NetHack PC Development Team 1992, 1993. X# PC NetHack 3.1 src Makefile for djgpp 1.10 and ndmake 4.5 X# X# For questions read the Install.dos file included with X# the distribution. X# X# Kevin D Smolkowski, Kevins@ori.org X XCC = gcc XSTUB = go32.exe # Can be either stub.exe or go32.exe XSTUBPATH = p:\djgpp\bin\ # Must be complete path with trailing '\' XLINK = gcc X X# Set the gamedir according to your preference. It must be present prior X# to compilation. X XGAME = nethack # Game Name XGAMEDIR = c:\games\nethack # Game directory X X# Compilation Flags. X X# Debugging X#CFLAGS = -pg -c -I../include X#LFLAGS = -pg X X# Normal XCFLAGS = -c -O -I../include XLFLAGS = X X# Special libraries XLIBS = -lpc X X# Source directories. Makedefs hardcodes these, don't change them. XINCL = ..\include # NetHack include files XDAT = ..\dat # NetHack data files XDOC = ..\doc # NetHack documentation files XUTIL = ..\util # Utility source XSRC = ..\src # Main source XSYS = ..\sys\share # Shared system files XMSYS = ..\sys\msdos # Msdos specific files XWIN = ..\win\tty # Character terminal files XGAMEFILE = $(GAMEDIR)\$(GAME).exe # whole thing X X# The default make target (so just typing 'make' is useful). Xdefault : $(GAMEFILE) X X# If TERMLIB is defined in pcconf.h, comment out the upper line and X# uncomment the lower. Note that you must build the termc library X# and place it in djgpp's lib directory. See termcap.zip for details X XTERMLIB = X#TERMLIB = -ltermc X XLIBRARIES = $(LIBS) $(TERMLIB) X X# Nothing below this line should have to be changed. X# X# Other things that have to be reconfigured are in X# config.h, pcconf.h and possibly system.h. X# X X# This line should not be deleted. X X# Make Rules. X X.SUFFIXES: .exe .o .c .y .l X X.c.o: X $(CC) $(CFLAGS) -o$*.o $*.c X X# Object files for the game itself. X XVOBJ01 = allmain.o alloc.o apply.o artifact.o attrib.o XVOBJ02 = ball.o bones.o botl.o cmd.o dbridge.o XVOBJ03 = decl.o detect.o display.o do.o do_name.o XVOBJ04 = do_wear.o dog.o dogmove.o dokick.o dothrow.o XVOBJ05 = drawing.o dungeon.o eat.o end.o engrave.o XVOBJ06 = exper.o explode.o extralev.o files.o fountain.o XVOBJ07 = getline.o hack.o hacklib.o invent.o lock.o XVOBJ08 = mail.o main.o makemon.o mcastu.o mhitm.o XVOBJ09 = mhitu.o minion.o mkmap.o mklev.o mkmaze.o XVOBJ10 = mkobj.o mkroom.o mon.o mondata.o monmove.o XVOBJ11 = monst.o monstr.o mplayer.o mthrowu.o muse.o XVOBJ12 = music.o o_init.o objects.o objnam.o options.o XVOBJ13 = pickup.o pline.o polyself.o potion.o quest.o XVOBJ14 = questpgr.o pager.o pray.o priest.o read.o XVOBJ15 = rect.o restore.o rip.o rnd.o rumors.o XVOBJ16 = save.o shk.o shknam.o sit.o sounds.o XVOBJ17 = sp_lev.o spell.o steal.o termcap.o timeout.o XVOBJ18 = topl.o topten.o track.o trap.o u_init.o XVOBJ19 = uhitm.o vault.o vision.o vis_tab.o weapon.o XVOBJ20 = were.o wield.o windows.o wintty.o wizard.o XVOBJ21 = worm.o worn.o write.o zap.o X XSOBJ = msdos.o sys.o tty.o unix.o video.o X XVVOBJ = version.o X XVOBJ = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ X $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \ X $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ X $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ X $(VOBJ21) X XALLOBJ = $(VOBJ) $(VVOBJ) $(SOBJ) X XRM_H = $(INCL)\rm.h $(INCL)\align.h XDISPLAY_H = $(INCL)\display.h $(INCL)\vision.h $(INCL)\mondata.h XDECL_H = $(INCL)\decl.h $(INCL)\quest.h $(INCL)\spell.h \ X $(INCL)\color.h $(INCL)\obj.h $(INCL)\you.h \ X $(INCL)\onames.h $(INCL)\pm.h XESHK_H = $(INCL)\eshk.h $(INCL)\dungeon.h XPCCONF_H = $(INCL)\pcconf.h $(INCL)\micro.h $(INCL)\system.h XDUNGEON_H = $(INCL)\dungeon.h $(INCL)\align.h XEPRI_H = $(DUNGEON_H) $(INCL)\epri.h XEMIN_H = $(DUNGEON_H) $(INCL)\emin.h XPERM_H = $(INCL)\permonst.h $(INCL)\monattk.h $(INCL)\monflag.h \ X $(INCL)\align.h XCONFIG_H = $(INCL)\config.h $(INCL)\tradstdc.h $(INCL)\global.h \ X $(PCCONF_H) XHACK_H = $(INCL)\hack.h $(CONFIG_H) $(DUNGEON_H) $(DECL_H) \ X $(DISPLAY_H) $(RM_H) $(INCL)\monsym.h \ X $(INCL)\mkroom.h $(INCL)\objclass.h $(INCL)\trap.h \ X $(INCL)\flag.h $(INCL)\vision.h $(INCL)\display.h \ X $(INCL)\wintype.h $(INCL)\engrave.h $(INCL)\rect.h \ X $(INCL)\winprocs.h $(INCL)\wintty.h X X X# The default target. X Xall : $(GAMEFILE) install.tag X @echo Done. X Xinstall: install.tag X Xinstall.tag: $(GAMEFILE) $(DAT)\sp_lev.tag X copy $(SYS)\termcap $(GAMEDIR) X copy $(DAT)\*.? $(GAMEDIR) X copy $(DAT)\*.dat $(GAMEDIR) X copy $(DAT)\*.lev $(GAMEDIR) X copy $(SYS)\NetHack.cnf $(GAMEDIR) X copy $(UTIL)\recover.exe $(GAMEDIR) X copy $(MSYS)\msdos.hlp $(GAMEDIR) X del $(GAMEDIR)\makefile X echo install done > install.tag X X# X# The main target. X# X$(GAMEFILE) : $(GAME).res $(UTIL)\utility.tag X $(CC) $(LFLAGS) @$(GAME).res $(LIBRARIES) X copy /b $(STUBPATH)$(STUB) + a.out $(GAMEFILE) X del a.out X X$(GAME).res : $(ALLOBJ) X @echo $(VOBJ01) > $@ X @echo $(VOBJ02) >> $@ X @echo $(VOBJ03) >> $@ X @echo $(VOBJ04) >> $@ X @echo $(VOBJ05) >> $@ X @echo $(VOBJ06) >> $@ X @echo $(VOBJ07) >> $@ X @echo $(VOBJ08) >> $@ X @echo $(VOBJ09) >> $@ X @echo $(VOBJ10) >> $@ X @echo $(VOBJ11) >> $@ X @echo $(VOBJ12) >> $@ X @echo $(VOBJ13) >> $@ X @echo $(VOBJ14) >> $@ X @echo $(VOBJ15) >> $@ X @echo $(VOBJ16) >> $@ X @echo $(VOBJ17) >> $@ X @echo $(VOBJ18) >> $@ X @echo $(VOBJ19) >> $@ X @echo $(VOBJ20) >> $@ X @echo $(VOBJ21) >> $@ X @echo $(SOBJ) >> $@ X @echo $(VVOBJ) >> $@ X X# The following include files depend on makedefs to be created. X# X# date.h should be remade every time any of the source or include X# files is modified. X X X$(INCL)\date.h : $(VOBJ) X $(UTIL)\makedefs -v X X$(INCL)\onames.h : X $(UTIL)\makedefs -o X X$(INCL)\pm.h : X $(UTIL)\makedefs -p X X$(INCL)\trap.h : X $(UTIL)\makedefs -t X X X X# X# Housekeeping. X# X Xclean : X -del *.o X Xspotless : clean X -del $(INCL)\date.h X -del $(INCL)\onames.h X -del $(INCL)\pm.h X -del $(INCL)\vis_tab.h X -del vis_tab.c X -del $(UTIL)\makedefs.exe X -del $(UTIL)\lev_comp.exe X -del $(UTIL)\dgn_comp.exe X -del $(UTIL)\*.res X -del $(UTIL)\*.def X -del $(UTIL)\*.map X -del $(DAT)\data X -del $(DAT)\rumors X X# dependencies X# some files require movement as Ndmake doesn't like unix style '/' X# directory specs and djgcc doesn't like dos style directory specs. X# So we get to copy stuff where we might need it. Fun eh? X X# sys\share Xmain.o: $(HACK_H) $(SYS)\pcmain.c X copy $(SYS)\pcmain.c . X $(CC) $(CFLAGS) -omain.o pcmain.c X Xtty.o: $(HACK_H) $(INCL)\wintty.h $(SYS)\pctty.c X copy $(SYS)\pctty.c . X $(CC) $(CFLAGS) -otty.o pctty.c X Xunix.o: $(HACK_H) $(SYS)\pcunix.c X copy $(SYS)\pcunix.c . X $(CC) $(CFLAGS) -ounix.o pcunix.c X Xsys.o : $(HACK_H) $(SYS)\pcsys.c X copy $(SYS)\pcsys.c . X $(CC) $(CFLAGS) -o$*.o pcsys.c X X# sys\msdos Xmsdos.o : $(HACK_H) $(MSYS)\msdos.c X copy $(MSYS)\msdos.c . X $(CC) $(CFLAGS) -o$*.o $*.c X Xvideo.o : $(HACK_H) $(MSYS)\video.c X copy $(MSYS)\video.c . X $(CC) $(CFLAGS) -o$*.o $*.c X X# win/tty Xgetline.o : $(HACK_H) $(INCL)\wintty.h $(WIN)\getline.c X copy $(WIN)\getline.c . X $(CC) $(CFLAGS) -o$*.o $*.c X Xtermcap.o : $(CONFIG_H) $(WIN)\termcap.c X copy $(WIN)\termcap.c . X $(CC) $(CFLAGS) -o$*.o $*.c X Xtopl.o : $(CONFIG_H) $(WIN)\topl.c X copy $(WIN)\topl.c . X $(CC) $(CFLAGS) -o$*.o $*.c X Xwintty.o : $(CONFIG_H) $(WIN)\wintty.c X copy $(WIN)\wintty.c . X $(CC) $(CFLAGS) -o$*.o $*.c X X# src dependencies Xallmain.o: $(HACK_H) Xalloc.o: $(CONFIG_H) Xapply.o: $(HACK_H) $(INCL)\edog.h Xartifact.o: $(HACK_H) $(INCL)\artifact.h $(INCL)\artilist.h Xattrib.o: $(HACK_H) $(INCL)\artifact.h Xball.o: $(HACK_H) Xbones.o: $(HACK_H) $(INCL)\lev.h Xbotl.o: $(HACK_H) Xcmd.o: $(HACK_H) $(INCL)\func_tab.h Xdbridge.o: $(HACK_H) Xdecl.o: $(HACK_H) $(INCL)\quest.h Xdetect.o: $(HACK_H) $(INCL)\artifact.h Xdisplay.o: $(HACK_H) Xdo.o: $(HACK_H) $(INCL)\lev.h Xdo_name.o: $(HACK_H) Xdo_wear.o: $(HACK_H) Xdog.o: $(HACK_H) $(INCL)\edog.h Xdogmove.o: $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h Xdokick.o: $(HACK_H) $(ESHK_H) Xdothrow.o: $(HACK_H) Xdrawing.o: $(HACK_H) $(INCL)\termcap.h Xdungeon.o: $(HACK_H) $(INCL)\dgn_file.h Xeat.o: $(HACK_H) Xend.o: $(HACK_H) $(ESHK_H) Xengrave.o: $(HACK_H) $(INCL)\lev.h Xexper.o: $(HACK_H) Xexplode.o: $(HACK_H) Xextralev.o: $(HACK_H) Xfiles.o: $(HACK_H) Xfountain.o: $(HACK_H) Xhack.o: $(HACK_H) Xhacklib.o: $(HACK_H) Xinvent.o: $(HACK_H) $(INCL)\artifact.h Xlock.o: $(HACK_H) Xmail.o: $(HACK_H) $(INCL)\mail.h Xmakemon.o: $(HACK_H) $(EPRI_H) $(EMIN_H) Xmcastu.o: $(HACK_H) Xmhitm.o: $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h Xmhitu.o: $(HACK_H) $(INCL)\artifact.h $(INCL)\edog.h Xminion.o: $(HACK_H) $(EMIN_H) $(EPRI_H) Xmklev.o: $(HACK_H) Xmkmap.o: $(HACK_H) $(INCL)\sp_lev.h Xmkmaze.o: $(HACK_H) $(INCL)\sp_lev.h Xmkobj.o: $(HACK_H) $(INCL)\artifact.h $(INCL)\prop.h Xmkroom.o: $(HACK_H) Xmon.o: $(HACK_H) $(INCL)\mfndpos.h $(INCL)\edog.h Xmondata.o: $(HACK_H) $(ESHK_H) $(EPRI_H) Xmonmove.o: $(HACK_H) $(INCL)\mfndpos.h $(INCL)\artifact.h Xmonst.o: $(CONFIG_H) $(PERM_H) $(ESHK_H) $(EPRI_H) \ X $(INCL)\color.h $(INCL)\monsym.h $(INCL)\vault.h Xmplayer.o: $(HACK_H) Xmthrowu.o: $(HACK_H) Xmuse.o: $(HACK_H) Xmusic.o: $(HACK_H) Xo_init.o: $(HACK_H) Xobjects.o: $(CONFIG_H) $(INCL)\obj.h $(INCL)\objclass.h \ X $(INCL)\prop.h $(INCL)\color.h Xobjnam.o: $(HACK_H) Xoptions.o: $(CONFIG_H) $(HACK_H) $(INCL)\objclass.h $(INCL)\flag.h \ X $(INCL)\termcap.h Xpager.o: $(HACK_H) Xpickup.o: $(HACK_H) Xpline.o: $(HACK_H) $(EPRI_H) Xpolyself.o: $(HACK_H) Xpotion.o: $(HACK_H) Xpray.o: $(HACK_H) $(EPRI_H) Xpriest.o: $(HACK_H) $(INCL)\mfndpos.h $(ESHK_H) $(EPRI_H) $(EMIN_H) Xquest.o: $(HACK_H) $(INCL)\quest.h $(INCL)\qtext.h Xquestpgr.o: $(HACK_H) $(INCL)\qtext.h Xread.o: $(HACK_H) Xrect.o: $(HACK_H) Xrestore.o: $(HACK_H) $(INCL)\lev.h $(INCL)\termcap.h $(INCL)\quest.h Xrip.o: $(HACK_H) Xrnd.o: $(HACK_H) Xrumors.o: $(HACK_H) Xsave.o: $(HACK_H) $(INCL)\lev.h $(INCL)\quest.h Xshk.o: $(HACK_H) $(ESHK_H) Xshknam.o: $(HACK_H) $(ESHK_H) Xsit.o: $(HACK_H) $(INCL)\artifact.h Xsounds.o: $(HACK_H) $(INCL)\edog.h Xsp_lev.o: $(HACK_H) $(INCL)\sp_lev.h $(INCL)\align.h $(INCL)\rect.h Xspell.o: $(HACK_H) Xsteal.o: $(HACK_H) Xtimeout.o: $(HACK_H) Xtopten.o: $(HACK_H) Xtrack.o: $(HACK_H) Xtrap.o: $(HACK_H) Xu_init.o: $(HACK_H) Xuhitm.o: $(HACK_H) Xvault.o: $(HACK_H) $(INCL)\vault.h Xversion.o: $(HACK_H) $(INCL)\date.h $(INCL)\patchlev.h Xvision.o: $(HACK_H) $(INCL)\vis_tab.h Xweapon.o: $(HACK_H) Xwere.o: $(HACK_H) Xwield.o: $(HACK_H) Xwindows.o: $(HACK_H) $(INCL)\wintty.h Xwizard.o: $(HACK_H) $(INCL)\qtext.h Xworm.o: $(HACK_H) $(INCL)\lev.h Xworn.o: $(HACK_H) Xwrite.o: $(HACK_H) Xzap.o: $(HACK_H) X X# end of file END_OF_FILE if test 11479 -ne `wc -c <'sys/msdos/MakeGCC.src'`; then echo shar: \"'sys/msdos/MakeGCC.src'\" unpacked with wrong size! fi # end of 'sys/msdos/MakeGCC.src' if test -f 'sys/share/dgn_comp.h' -a "${1}" != "-c" ; then echo shar: Renaming existing file \"'sys/share/dgn_comp.h'\" to \"'sys/share/dgn_comp.h.orig'\" mv -f 'sys/share/dgn_comp.h' 'sys/share/dgn_comp.h.orig' fi echo shar: Extracting \"'sys/share/dgn_comp.h'\" \(503 characters\) sed "s/^X//" >'sys/share/dgn_comp.h' <<'END_OF_FILE' X#define INTEGER 257 X#define A_DUNGEON 258 X#define BRANCH 259 X#define CHBRANCH 260 X#define LEVEL 261 X#define RNDLEVEL 262 X#define CHLEVEL 263 X#define RNDCHLEVEL 264 X#define UP_OR_DOWN 265 X#define PROTOFILE 266 X#define DESCRIPTION 267 X#define DESCRIPTOR 268 X#define LEVELDESC 269 X#define ALIGNMENT 270 X#define LEVALIGN 271 X#define ENTRY 272 X#define STAIR 273 X#define NO_UP 274 X#define NO_DOWN 275 X#define PORTAL 276 X#define STRING 277 Xtypedef union X{ X int i; X char* str; X} YYSTYPE; Xextern YYSTYPE yylval; END_OF_FILE if test 503 -ne `wc -c <'sys/share/dgn_comp.h'`; then echo shar: \"'sys/share/dgn_comp.h'\" unpacked with wrong size! fi # end of 'sys/share/dgn_comp.h' if test -f 'sys/share/lev_yacc.c1' -a "${1}" != "-c" ; then echo shar: Renaming existing file \"'sys/share/lev_yacc.c1'\" to \"'sys/share/lev_yacc.c1.orig'\" mv -f 'sys/share/lev_yacc.c1' 'sys/share/lev_yacc.c1.orig' fi echo shar: Extracting \"'sys/share/lev_yacc.c1'\" \(43569 characters\) sed "s/^X//" >'sys/share/lev_yacc.c1' <<'END_OF_FILE' X#ifndef lint Xstatic char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; X#endif X#define YYBYACC 1 X#define YYMAJOR 1 X#define YYMINOR 9 X#define yyclearin (yychar=(-1)) X#define yyerrok (yyerrflag=0) X#define YYRECOVERING (yyerrflag!=0) X#define YYPREFIX "yy" X/* SCCS Id: @(#)lev_comp.c 3.1 93/05/15 */ X/* Copyright (c) 1989 by Jean-Christophe Collet */ X/* NetHack may be freely redistributed. See license for details. */ X X/* X * This file contains the Level Compiler code X * It may handle special mazes & special room-levels X */ X X/* In case we're using bison in AIX. This definition must be X * placed before any other C-language construct in the file X * excluding comments and preprocessor directives (thanks IBM X * for this wonderful feature...). X * X * Note: some cpps barf on this 'undefined control' (#pragma). X * Addition of the leading space seems to prevent barfage for now, X * and AIX will still see the directive in its non-standard locale. X */ X X#ifdef _AIX X #pragma alloca /* keep leading space! */ X#endif X X#include "hack.h" X#include "sp_lev.h" X#ifndef O_WRONLY X# include X#endif X#ifndef O_CREAT /* some older BSD systems do not define O_CREAT in */ X# include X#endif X#ifndef O_BINARY /* used for micros, no-op for others */ X# define O_BINARY 0 X#endif X X#ifdef MICRO X# define OMASK FCMASK X#else X# define OMASK 0644 X#endif X X#define MAX_REGISTERS 10 X#define ERR (-1) X X#define New(type) (type *) alloc(sizeof(type)) X#define NewTab(type, size) (type **) alloc(sizeof(type *) * size) X X#ifdef MICRO X# undef exit Xextern void FDECL(exit, (int)); X#endif X Xextern void FDECL(yyerror, (const char *)); Xextern void FDECL(yywarning, (const char *)); Xextern int NDECL(yylex); Xint NDECL(yyparse); X Xextern char *FDECL(dup_string,(char *)); Xextern int FDECL(get_floor_type, (CHAR_P)); Xextern int FDECL(get_room_type, (char *)); Xextern int FDECL(get_trap_type, (char *)); Xextern int FDECL(get_monster_id, (char *, CHAR_P)); Xextern int FDECL(get_object_id, (char *)); Xextern boolean FDECL(check_monster_char, (CHAR_P)); Xextern boolean FDECL(check_object_char, (CHAR_P)); Xextern char FDECL(what_map_char, (CHAR_P)); Xextern void FDECL(scan_map, (char *)); Xextern void NDECL(wallify_map); Xextern boolean NDECL(check_subrooms); Xextern void FDECL(check_coord, (int, int, const char *)); Xextern void NDECL(store_part); Xextern void NDECL(store_room); Xextern void FDECL(write_maze, (int, specialmaze *)); Xextern void FDECL(write_lev, (int, splev *)); Xextern void FDECL(free_rooms, (room **, int)); X Xstatic struct reg { X int x1, y1; X int x2, y2; X} current_region; X Xstatic struct coord { X int x; X int y; X} current_coord, current_align; X Xstatic struct size { X int height; X int width; X} current_size; X Xchar tmpmessage[256]; Xaltar *tmpaltar[256]; Xlad *tmplad[256]; Xstair *tmpstair[256]; Xdigpos *tmpdig[256]; Xdigpos *tmppass[32]; Xchar *tmpmap[ROWNO]; Xregion *tmpreg[256]; Xlev_region *tmplreg[32]; Xdoor *tmpdoor[256]; Xroom_door *tmprdoor[256]; Xtrap *tmptrap[256]; Xmonster *tmpmonst[256]; Xobject *tmpobj[256]; Xdrawbridge *tmpdb[256]; Xwalk *tmpwalk[256]; Xgold *tmpgold[256]; Xfountain *tmpfountain[256]; Xsink *tmpsink[256]; Xpool *tmppool[256]; Xengraving *tmpengraving[256]; Xmazepart *tmppart[10]; Xroom *tmproom[MAXNROFROOMS*2]; Xcorridor *tmpcor[256]; X Xstatic specialmaze maze; Xstatic splev special_lev; Xstatic lev_init init_lev; X Xstatic char olist[MAX_REGISTERS], mlist[MAX_REGISTERS]; Xstatic struct coord plist[MAX_REGISTERS]; X Xint n_olist = 0, n_mlist = 0, n_plist = 0; X Xunsigned int nlreg = 0, nreg = 0, ndoor = 0, ntrap = 0, nmons = 0, nobj = 0; Xunsigned int ndb = 0, nwalk = 0, npart = 0, ndig = 0, nlad = 0, nstair = 0; Xunsigned int naltar = 0, ncorridor = 0, nrooms = 0, ngold = 0, nengraving = 0; Xunsigned int nfountain = 0, npool = 0, nsink = 0, npass = 0; X Xstatic unsigned long lev_flags = 0; X Xunsigned int max_x_map, max_y_map; X Xstatic xchar in_room; X Xextern int fatal_error; Xextern int want_warnings; Xextern const char *fname; X Xtypedef union X{ X int i; X char* map; X struct { X xchar room; X xchar wall; X xchar door; X } corpos; X} YYSTYPE; X#define CHAR 257 X#define INTEGER 258 X#define BOOLEAN 259 X#define MESSAGE_ID 260 X#define MAZE_ID 261 X#define LEVEL_ID 262 X#define LEV_INIT_ID 263 X#define GEOMETRY_ID 264 X#define NOMAP_ID 265 X#define OBJECT_ID 266 X#define MONSTER_ID 267 X#define TRAP_ID 268 X#define DOOR_ID 269 X#define DRAWBRIDGE_ID 270 X#define MAZEWALK_ID 271 X#define WALLIFY_ID 272 X#define REGION_ID 273 X#define FILLING 274 X#define RANDOM_OBJECTS_ID 275 X#define RANDOM_MONSTERS_ID 276 X#define RANDOM_PLACES_ID 277 X#define ALTAR_ID 278 X#define LADDER_ID 279 X#define STAIR_ID 280 X#define NON_DIGGABLE_ID 281 X#define NON_PASSWALL_ID 282 X#define ROOM_ID 283 X#define PORTAL_ID 284 X#define TELEPRT_ID 285 X#define BRANCH_ID 286 X#define LEV 287 X#define CHANCE_ID 288 X#define CORRIDOR_ID 289 X#define GOLD_ID 290 X#define ENGRAVING_ID 291 X#define FOUNTAIN_ID 292 X#define POOL_ID 293 X#define SINK_ID 294 X#define NONE 295 X#define RAND_CORRIDOR_ID 296 X#define DOOR_STATE 297 X#define LIGHT_STATE 298 X#define CURSE_TYPE 299 X#define ENGRAVING_TYPE 300 X#define DIRECTION 301 X#define RANDOM_TYPE 302 X#define O_REGISTER 303 X#define M_REGISTER 304 X#define P_REGISTER 305 X#define A_REGISTER 306 X#define ALIGNMENT 307 X#define LEFT_OR_RIGHT 308 X#define CENTER 309 X#define TOP_OR_BOT 310 X#define ALTAR_TYPE 311 X#define UP_OR_DOWN 312 X#define SUBROOM_ID 313 X#define NAME_ID 314 X#define FLAGS_ID 315 X#define FLAG_TYPE 316 X#define MON_ATTITUDE 317 X#define MON_ALERTNESS 318 X#define MON_APPEARANCE 319 X#define STRING 320 X#define MAP_ID 321 X#define YYERRCODE 256 Xshort yylhs[] = { -1, X 0, 0, 38, 38, 39, 39, 40, 41, 33, 24, X 24, 14, 14, 20, 20, 21, 21, 42, 42, 47, X 44, 44, 48, 48, 45, 45, 51, 51, 46, 46, X 53, 54, 54, 55, 55, 37, 52, 52, 58, 56, X 10, 10, 61, 61, 59, 59, 62, 62, 60, 60, X 57, 57, 63, 63, 63, 63, 63, 63, 63, 63, X 63, 63, 63, 63, 63, 64, 65, 66, 15, 15, X 13, 13, 12, 12, 32, 11, 11, 43, 43, 77, X 78, 78, 81, 1, 1, 2, 2, 79, 79, 82, X 82, 82, 49, 49, 50, 50, 83, 85, 83, 80, X 80, 86, 86, 86, 86, 86, 86, 86, 86, 86, X 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, X 86, 101, 67, 100, 100, 102, 102, 102, 102, 102, X 104, 68, 103, 103, 103, 16, 16, 17, 17, 87, X 69, 88, 94, 95, 96, 76, 105, 90, 106, 91, X 107, 109, 92, 110, 93, 108, 108, 23, 23, 71, X 72, 73, 97, 98, 89, 70, 74, 75, 26, 26, X 26, 29, 29, 29, 34, 34, 35, 35, 3, 3, X 4, 4, 22, 22, 22, 99, 99, 99, 5, 5, X 6, 6, 7, 7, 7, 8, 8, 113, 30, 27, X 9, 84, 25, 28, 31, 36, 36, 18, 18, 19, X 19, 112, 111, X}; Xshort yylen[] = { 2, X 0, 1, 1, 2, 1, 1, 5, 7, 3, 0, X 13, 1, 1, 0, 3, 3, 1, 0, 2, 3, X 0, 2, 3, 3, 0, 1, 1, 2, 1, 1, X 1, 0, 2, 5, 5, 7, 2, 2, 12, 12, X 0, 2, 5, 1, 5, 1, 5, 1, 5, 1, X 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, X 1, 1, 1, 1, 1, 3, 3, 9, 1, 1, X 1, 1, 1, 1, 5, 1, 1, 1, 2, 3, X 1, 2, 5, 1, 1, 1, 1, 0, 2, 3, X 3, 3, 1, 3, 1, 3, 1, 0, 4, 0, X 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, X 1, 0, 9, 0, 2, 2, 2, 2, 2, 3, X 0, 9, 0, 4, 6, 1, 1, 1, 1, 5, X 5, 7, 5, 1, 5, 5, 0, 8, 0, 8, X 0, 0, 8, 0, 6, 0, 2, 1, 10, 3, X 3, 3, 3, 3, 8, 7, 5, 7, 1, 1, X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, X 1, 1, 0, 2, 4, 1, 1, 1, 1, 1, X 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, X 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, X 1, 5, 9, X}; Xshort yydefred[] = { 0, X 0, 0, 0, 0, 0, 2, 0, 5, 6, 0, X 0, 0, 0, 0, 4, 205, 0, 9, 0, 0, X 0, 0, 0, 0, 15, 0, 0, 0, 0, 21, X 76, 77, 75, 0, 0, 0, 0, 81, 7, 0, X 88, 0, 19, 0, 16, 0, 20, 0, 79, 0, X 82, 0, 0, 0, 0, 0, 22, 26, 0, 51, X 51, 0, 84, 85, 0, 0, 0, 0, 0, 89, X 0, 0, 0, 0, 31, 8, 29, 0, 28, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 144, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 102, 103, 105, 112, 113, X 118, 119, 117, 101, 104, 106, 107, 108, 109, 110, X 111, 114, 115, 116, 120, 121, 204, 0, 23, 203, X 0, 24, 182, 0, 181, 0, 0, 33, 0, 0, X 0, 0, 0, 0, 52, 53, 54, 55, 56, 57, X 58, 59, 60, 61, 62, 63, 64, 65, 0, 87, X 86, 83, 90, 92, 0, 91, 0, 202, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 173, 0, 172, 0, 174, 170, 0, 169, 0, 171, X 180, 0, 179, 189, 190, 0, 188, 0, 0, 186, X 187, 0, 0, 0, 0, 0, 0, 0, 147, 0, X 158, 163, 164, 149, 151, 154, 208, 209, 0, 0, X 160, 94, 96, 191, 192, 0, 0, 0, 0, 69, X 70, 0, 67, 162, 161, 66, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, X 178, 177, 0, 0, 176, 175, 0, 141, 140, 0, X 0, 143, 0, 0, 195, 0, 193, 0, 194, 145, X 0, 0, 0, 146, 0, 0, 0, 167, 210, 211, X 0, 44, 0, 0, 46, 0, 0, 0, 35, 34, X 0, 0, 212, 199, 0, 200, 0, 198, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 152, 155, 0, X 0, 0, 0, 0, 0, 0, 0, 131, 122, 142, X 0, 0, 0, 197, 196, 166, 0, 0, 0, 0, X 168, 0, 48, 0, 0, 0, 50, 0, 0, 0, X 71, 72, 0, 12, 13, 11, 0, 124, 0, 0, X 165, 201, 0, 148, 150, 0, 153, 0, 0, 0, X 0, 0, 0, 73, 74, 0, 0, 0, 132, 0, X 0, 0, 0, 157, 43, 0, 0, 45, 0, 0, X 36, 68, 137, 136, 0, 0, 0, 125, 0, 0, X 0, 0, 0, 40, 0, 39, 0, 0, 127, 128, X 0, 129, 126, 213, 185, 0, 47, 42, 49, 138, X 139, 134, 0, 130, 159, 0, 207, 206, 135, X}; Xshort yydgoto[] = { 3, X 65, 162, 212, 134, 216, 246, 308, 366, 309, 434, X 33, 406, 383, 386, 252, 426, 452, 239, 321, 13, X 25, 391, 229, 21, 131, 209, 210, 128, 204, 205, X 135, 4, 5, 297, 293, 459, 249, 6, 7, 8, X 9, 28, 39, 44, 56, 76, 29, 57, 129, 132, X 58, 59, 77, 78, 138, 60, 80, 61, 327, 379, X 324, 375, 145, 146, 147, 148, 149, 150, 151, 152, X 153, 154, 155, 156, 157, 158, 40, 41, 50, 69, X 42, 70, 166, 167, 200, 114, 115, 116, 117, 118, X 119, 120, 121, 122, 123, 124, 125, 126, 230, 410, X 388, 428, 409, 387, 275, 277, 278, 397, 370, 279, X 231, 220, 221, X}; Xshort yysindex[] = { -122, X -26, 4, 0, -231, -231, 0, -122, 0, 0, -267, X -267, 37, -156, -156, 0, 0, 70, 0, -199, 72, X -103, -103, -226, 107, 0, -99, 101, -123, -103, 0, X 0, 0, 0, -199, 116, -158, 105, 0, 0, -123, X 0, -157, 0, -234, 0, -92, 0, -164, 0, -139, X 0, 108, 109, 110, 111, -126, 0, 0, -262, 0, X 0, 127, 0, 0, 128, 118, 119, 120, -78, 0, X -83, -74, -272, -272, 0, 0, 0, -108, 0, -223, X -223, -79, -161, -83, -74, 144, 138, 139, 140, 141, X 147, 151, 0, 152, 153, 157, 158, 159, 160, 161, X 162, 165, 166, 167, 168, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 142, 0, 0, X 183, 0, 0, 184, 0, 185, 173, 0, 174, 175, X 176, 177, 178, 179, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 194, 0, X 0, 0, 0, 0, -73, 0, 0, 0, -229, -241, X -242, -201, 79, 79, 199, 79, 79, 95, 199, 199, X -35, -35, -35, -222, 79, 79, -83, -74, -276, -276, X 201, -230, 79, -16, 79, 79, -267, -15, 202, 203, X 0, 154, 0, 204, 0, 0, 163, 0, 205, 0, X 0, 211, 0, 0, 0, 212, 0, 169, 213, 0, X 0, 214, 1, 217, 218, 258, 294, 84, 0, 303, X 0, 0, 0, 0, 0, 0, 0, 0, 305, 312, X 0, 0, 0, 0, 0, 314, 319, 125, 343, 0, X 0, 344, 0, 0, 0, 0, 348, 136, 144, 137, X -216, 145, -209, 79, 79, 148, -58, 98, 357, -276, X -248, 124, 180, 393, 396, 129, 398, 401, 426, 79, X -177, -37, -13, 431, -36, -201, -276, 435, 0, 384, X 0, 0, 436, 394, 0, 0, 444, 0, 0, 405, X 445, 0, 236, 455, 0, 388, 0, 463, 0, 0, X 464, 251, -35, 0, -35, -35, -35, 0, 0, 0, X 470, 0, 260, 476, 0, 263, 478, 223, 0, 0, X 481, 483, 0, 0, 79, 0, 79, 0, -201, 484, X -272, 272, -255, 273, 65, 488, 491, 0, 0, -267, X 498, -5, 500, 24, 501, -155, -219, 0, 0, 0, X 289, 504, 456, 0, 0, 0, 506, 242, -267, 511, X 0, 298, 0, -164, 513, 300, 0, 304, 520, -221, X 0, 0, 522, 0, 0, 0, 523, 0, 524, 295, X 0, 0, 313, 0, 0, 261, 0, 529, 532, 24, X 536, 534, -267, 0, 0, 538, -221, -212, 0, 537, X 322, 539, 540, 0, 0, -161, 541, 0, 328, 541, X 0, 0, 0, 0, 543, 546, -186, 0, 550, 333, X 335, 553, 337, 0, 556, 0, -220, -220, 0, 0, X -267, 0, 0, 0, 0, 557, 0, 0, 0, 0, X 0, 0, 555, 0, 0, -270, 0, 0, 0, X}; Xshort yyrindex[] = { 600, X 0, 0, 0, -166, 230, 0, 601, 0, 0, 0, X 0, 0, -138, 240, 0, 0, 0, 0, 0, 0, X -109, 299, 0, 221, 0, 0, 0, 0, 276, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, X 0, 0, 0, 52, 0, 0, 0, 0, 0, 386, X 0, 0, 0, 0, 0, 75, 0, 0, 100, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 115, 0, X 0, 0, 0, 0, 0, 0, 0, 113, 0, 89, X 250, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 143, 0, 0, X 182, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 354, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 430, 0, 0, 0, 0, 0, 0, 0, 469, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, X 0, 503, 0, 0, 0, 0, 77, 0, 0, 77, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, X}; Xshort yygindex[] = { 0, X 228, 187, 0, -64, -273, -182, 181, 0, 0, 186, X 0, 197, 0, 0, 0, 0, 171, 0, 0, 602, X 571, 0, -163, 596, 441, 0, 0, 448, 0, 0, X -10, 0, 0, 0, 0, 0, 329, 606, 0, 0, X 0, 63, 588, 0, 0, 0, 0, 0, -77, -76, X 578, 0, 0, 0, 0, 0, 580, 0, 0, 243, X 0, 0, 0, 0, 0, 0, 573, 591, 592, 593, X 594, 0, 0, 604, 605, 610, 0, 0, 0, 0, X 0, 0, 390, 0, 0, 0, 0, 0, 0, 0, X 0, 0, 0, 0, 0, 0, 0, 0, -162, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X -51, -80, 0, X}; X#define YYTABLESIZE 795 Xshort yytable[] = { 17, X 18, 133, 323, 248, 223, 168, 163, 247, 164, 136, X 219, 222, 331, 225, 226, 130, 78, 234, 235, 236, X 54, 244, 240, 241, 457, 245, 326, 127, 250, 133, X 31, 10, 254, 255, 374, 237, 404, 450, 123, 384, X 52, 53, 87, 88, 89, 139, 364, 16, 54, 458, X 55, 25, 16, 305, 95, 365, 140, 306, 307, 211, X 206, 11, 207, 378, 141, 360, 103, 104, 105, 142, X 143, 251, 201, 202, 32, 32, 41, 16, 55, 238, X 405, 451, 385, 12, 30, 291, 423, 304, 37, 424, X 144, 43, 295, 14, 19, 214, 14, 14, 14, 27, X 215, 298, 299, 16, 332, 333, 20, 425, 361, 242, X 16, 243, 30, 23, 80, 305, 24, 318, 165, 306, X 307, 10, 319, 224, 320, 10, 10, 232, 233, 26, X 439, 440, 441, 16, 228, 66, 67, 68, 1, 2, X 37, 38, 93, 63, 64, 381, 382, 160, 161, 346, X 34, 347, 348, 349, 18, 18, 27, 35, 36, 46, X 213, 47, 48, 51, 62, 71, 72, 73, 74, 75, X 82, 83, 358, 127, 359, 84, 85, 86, 168, 159, X 137, 95, 130, 165, 199, 187, 256, 87, 88, 89, X 90, 91, 92, 93, 94, 169, 170, 171, 172, 95, X 96, 97, 98, 99, 173, 100, 101, 102, 174, 175, X 176, 103, 104, 105, 177, 178, 179, 180, 181, 182, X 17, 329, 183, 184, 185, 186, 188, 189, 190, 14, X 191, 192, 193, 194, 195, 196, 197, 198, 223, 10, X 248, 253, 301, 257, 260, 258, 259, 261, 263, 38, X 292, 227, 296, 262, 264, 265, 267, 268, 269, 266, X 270, 271, 133, 133, 322, 133, 133, 133, 133, 133, X 133, 133, 133, 133, 133, 18, 362, 78, 78, 133, X 133, 133, 133, 133, 133, 133, 133, 133, 325, 133, X 133, 133, 133, 133, 133, 133, 373, 133, 18, 123, X 123, 272, 123, 123, 123, 123, 123, 123, 123, 123, X 123, 123, 25, 25, 133, 133, 123, 123, 123, 123, X 123, 123, 123, 123, 123, 377, 123, 123, 123, 123, X 123, 123, 123, 273, 123, 32, 32, 41, 41, 371, X 25, 274, 41, 41, 41, 41, 276, 25, 280, 37, X 37, 123, 123, 97, 41, 281, 41, 282, 395, 41, X 27, 27, 283, 32, 41, 41, 41, 41, 41, 41, X 41, 37, 41, 30, 30, 80, 80, 37, 80, 80, X 217, 227, 284, 218, 37, 100, 285, 286, 27, 41, X 41, 287, 420, 288, 290, 27, 217, 98, 302, 218, X 303, 37, 294, 93, 93, 300, 93, 93, 93, 93, X 93, 93, 93, 93, 93, 93, 443, 93, 93, 93, X 93, 93, 93, 93, 93, 93, 93, 93, 93, 183, X 454, 93, 93, 93, 93, 310, 312, 311, 93, 313, X 314, 315, 95, 95, 316, 95, 95, 95, 95, 95, X 95, 95, 95, 95, 95, 93, 95, 95, 95, 95, X 95, 95, 95, 95, 95, 95, 95, 95, 156, 317, X 95, 95, 95, 95, 328, 333, 334, 95, 342, 335, X 17, 17, 17, 17, 17, 17, 336, 337, 339, 14, X 14, 14, 14, 340, 95, 17, 17, 338, 341, 10, X 10, 10, 184, 17, 14, 14, 343, 344, 345, 17, X 38, 38, 14, 350, 10, 10, 17, 351, 14, 352, X 353, 354, 10, 355, 356, 14, 357, 361, 10, 363, X 367, 368, 38, 17, 369, 10, 18, 18, 38, 18, X 18, 372, 14, 376, 380, 38, 389, 390, 392, 393, X 18, 18, 10, 394, 396, 398, 400, 401, 18, 18, X 18, 402, 38, 403, 18, 407, 408, 411, 412, 415, X 413, 18, 414, 18, 18, 416, 418, 419, 421, 429, X 427, 18, 430, 431, 433, 435, 437, 18, 18, 438, X 444, 445, 446, 447, 18, 448, 449, 455, 456, 1, X 3, 399, 432, 422, 45, 436, 14, 442, 453, 22, X 208, 18, 15, 330, 97, 97, 203, 97, 97, 97, X 97, 97, 97, 97, 97, 97, 97, 49, 97, 97, X 97, 97, 97, 97, 97, 97, 79, 97, 97, 97, X 81, 106, 417, 97, 97, 97, 100, 100, 289, 100, X 100, 100, 100, 100, 100, 100, 100, 100, 100, 107, X 108, 109, 110, 100, 100, 100, 100, 100, 0, 100, X 100, 100, 111, 112, 0, 100, 100, 100, 113, 0, X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, X 183, 183, 0, 183, 183, 183, 183, 183, 183, 183, X 183, 183, 183, 0, 0, 0, 0, 183, 183, 183, X 183, 183, 0, 183, 183, 183, 0, 0, 0, 183, X 183, 183, 0, 0, 0, 0, 0, 0, 0, 156, X 156, 0, 156, 156, 156, 156, 156, 156, 156, 156, X 156, 156, 0, 0, 0, 0, 156, 156, 156, 156, X 156, 0, 156, 156, 156, 0, 0, 0, 156, 156, X 156, 0, 0, 184, 184, 0, 184, 184, 184, 184, X 184, 184, 184, 184, 184, 184, 0, 0, 0, 0, X 184, 184, 184, 184, 184, 0, 184, 184, 184, 0, X 0, 0, 184, 184, 184, X}; Xshort yycheck[] = { 10, X 11, 0, 40, 40, 40, 86, 84, 190, 85, 74, X 173, 174, 286, 176, 177, 257, 0, 181, 182, 183, X 283, 298, 185, 186, 295, 302, 40, 257, 259, 302, X 257, 58, 195, 196, 40, 258, 258, 258, 0, 259, X 275, 276, 266, 267, 268, 269, 302, 320, 283, 320, X 313, 0, 320, 302, 278, 311, 280, 306, 307, 302, X 302, 58, 304, 40, 288, 339, 290, 291, 292, 293, X 294, 302, 302, 303, 0, 302, 0, 320, 313, 302, X 302, 302, 302, 315, 22, 302, 299, 270, 0, 302, X 314, 29, 302, 260, 58, 297, 263, 264, 265, 0, X 302, 264, 265, 320, 287, 41, 263, 320, 44, 187, X 320, 188, 0, 44, 0, 302, 316, 280, 40, 306, X 307, 260, 300, 175, 302, 264, 265, 179, 180, 58, X 317, 318, 319, 320, 40, 275, 276, 277, 261, 262, X 264, 265, 0, 308, 309, 301, 302, 309, 310, 313, X 44, 315, 316, 317, 264, 265, 260, 257, 58, 44, X 171, 320, 58, 321, 257, 58, 58, 58, 58, 296, X 44, 44, 335, 257, 337, 58, 58, 58, 259, 259, X 289, 0, 257, 40, 258, 44, 197, 266, 267, 268, X 269, 270, 271, 272, 273, 58, 58, 58, 58, 278, X 279, 280, 281, 282, 58, 284, 285, 286, 58, 58, X 58, 290, 291, 292, 58, 58, 58, 58, 58, 58, X 0, 258, 58, 58, 58, 58, 44, 44, 44, 0, X 58, 58, 58, 58, 58, 58, 58, 44, 40, 0, X 40, 258, 301, 259, 91, 44, 44, 44, 44, 0, X 261, 287, 263, 91, 44, 44, 44, 44, 258, 91, X 44, 44, 261, 262, 302, 264, 265, 266, 267, 268, X 269, 270, 271, 272, 273, 0, 341, 261, 262, 278, X 279, 280, 281, 282, 283, 284, 285, 286, 302, 288, X 289, 290, 291, 292, 293, 294, 302, 296, 0, 261, X 262, 44, 264, 265, 266, 267, 268, 269, 270, 271, X 272, 273, 261, 262, 313, 314, 278, 279, 280, 281, X 282, 283, 284, 285, 286, 302, 288, 289, 290, 291, X 292, 293, 294, 40, 296, 261, 262, 261, 262, 350, X 289, 258, 266, 267, 268, 269, 44, 296, 44, 261, X 262, 313, 314, 0, 278, 44, 280, 44, 369, 283, X 261, 262, 44, 289, 288, 289, 290, 291, 292, 293, X 294, 283, 296, 261, 262, 261, 262, 289, 264, 265, X 302, 287, 258, 305, 296, 0, 44, 44, 289, 313, X 314, 44, 403, 258, 258, 296, 302, 44, 301, 305, X 44, 313, 258, 261, 262, 258, 264, 265, 266, 267, X 268, 269, 270, 271, 272, 273, 427, 275, 276, 277, X 278, 279, 280, 281, 282, 283, 284, 285, 286, 0, X 441, 289, 290, 291, 292, 312, 44, 258, 296, 44, X 312, 44, 261, 262, 44, 264, 265, 266, 267, 268, X 269, 270, 271, 272, 273, 313, 275, 276, 277, 278, X 279, 280, 281, 282, 283, 284, 285, 286, 0, 44, X 289, 290, 291, 292, 44, 41, 93, 296, 91, 44, X 260, 261, 262, 263, 264, 265, 93, 44, 44, 260, X 261, 262, 263, 258, 313, 275, 276, 93, 44, 260, X 261, 262, 0, 283, 275, 276, 44, 44, 258, 289, X 261, 262, 283, 44, 275, 276, 296, 258, 289, 44, X 258, 44, 283, 301, 44, 296, 44, 44, 289, 258, X 258, 44, 283, 313, 44, 296, 261, 262, 289, 264, X 265, 44, 313, 44, 44, 296, 258, 44, 93, 44, X 275, 276, 313, 312, 44, 258, 44, 258, 283, 261, X 262, 258, 313, 44, 289, 44, 44, 44, 274, 41, X 258, 296, 312, 275, 276, 44, 41, 44, 41, 258, X 44, 283, 44, 44, 44, 258, 44, 289, 313, 44, X 41, 259, 258, 41, 296, 259, 41, 41, 44, 0, X 0, 374, 416, 407, 34, 420, 5, 427, 438, 14, X 170, 313, 7, 285, 261, 262, 169, 264, 265, 266, X 267, 268, 269, 270, 271, 272, 273, 40, 275, 276, X 277, 278, 279, 280, 281, 282, 59, 284, 285, 286, X 61, 69, 400, 290, 291, 292, 261, 262, 259, 264, X 265, 266, 267, 268, 269, 270, 271, 272, 273, 69, X 69, 69, 69, 278, 279, 280, 281, 282, -1, 284, X 285, 286, 69, 69, -1, 290, 291, 292, 69, -1, X -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, X 261, 262, -1, 264, 265, 266, 267, 268, 269, 270, X 271, 272, 273, -1, -1, -1, -1, 278, 279, 280, X 281, 282, -1, 284, 285, 286, -1, -1, -1, 290, X 291, 292, -1, -1, -1, -1, -1, -1, -1, 261, X 262, -1, 264, 265, 266, 267, 268, 269, 270, 271, X 272, 273, -1, -1, -1, -1, 278, 279, 280, 281, X 282, -1, 284, 285, 286, -1, -1, -1, 290, 291, X 292, -1, -1, 261, 262, -1, 264, 265, 266, 267, X 268, 269, 270, 271, 272, 273, -1, -1, -1, -1, X 278, 279, 280, 281, 282, -1, 284, 285, 286, -1, X -1, -1, 290, 291, 292, X}; X#define YYFINAL 3 X#ifndef YYDEBUG X#define YYDEBUG 0 X#endif X#define YYMAXTOKEN 321 X#if YYDEBUG Xchar *yyname[] = { X"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, X0,0,0,0,0,0,"'('","')'",0,0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,"':'",0,0,0,0,0,0,0, X0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'['",0,"']'",0,0,0,0,0,0,0,0, X0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, X0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, X0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, X0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"CHAR", X"INTEGER","BOOLEAN","MESSAGE_ID","MAZE_ID","LEVEL_ID","LEV_INIT_ID", X"GEOMETRY_ID","NOMAP_ID","OBJECT_ID","MONSTER_ID","TRAP_ID","DOOR_ID", X"DRAWBRIDGE_ID","MAZEWALK_ID","WALLIFY_ID","REGION_ID","FILLING", X"RANDOM_OBJECTS_ID","RANDOM_MONSTERS_ID","RANDOM_PLACES_ID","ALTAR_ID", X"LADDER_ID","STAIR_ID","NON_DIGGABLE_ID","NON_PASSWALL_ID","ROOM_ID", X"PORTAL_ID","TELEPRT_ID","BRANCH_ID","LEV","CHANCE_ID","CORRIDOR_ID","GOLD_ID", X"ENGRAVING_ID","FOUNTAIN_ID","POOL_ID","SINK_ID","NONE","RAND_CORRIDOR_ID", X"DOOR_STATE","LIGHT_STATE","CURSE_TYPE","ENGRAVING_TYPE","DIRECTION", X"RANDOM_TYPE","O_REGISTER","M_REGISTER","P_REGISTER","A_REGISTER","ALIGNMENT", X"LEFT_OR_RIGHT","CENTER","TOP_OR_BOT","ALTAR_TYPE","UP_OR_DOWN","SUBROOM_ID", X"NAME_ID","FLAGS_ID","FLAG_TYPE","MON_ATTITUDE","MON_ALERTNESS", X"MON_APPEARANCE","STRING","MAP_ID", X}; Xchar *yyrule[] = { X"$accept : file", X"file :", X"file : levels", X"levels : level", X"levels : level levels", X"level : maze_level", X"level : room_level", X"maze_level : maze_def flags lev_init messages regions", X"room_level : level_def flags lev_init messages rreg_init rooms corridors_def", X"level_def : LEVEL_ID ':' string", X"lev_init :", X"lev_init : LEV_INIT_ID ':' CHAR ',' CHAR ',' BOOLEAN ',' BOOLEAN ',' light_state ',' walled", X"walled : BOOLEAN", X"walled : RANDOM_TYPE", X"flags :", X"flags : FLAGS_ID ':' flag_list", X"flag_list : FLAG_TYPE ',' flag_list", X"flag_list : FLAG_TYPE", X"messages :", X"messages : message messages", X"message : MESSAGE_ID ':' STRING", X"rreg_init :", X"rreg_init : rreg_init init_rreg", X"init_rreg : RANDOM_OBJECTS_ID ':' object_list", X"init_rreg : RANDOM_MONSTERS_ID ':' monster_list", X"rooms :", X"rooms : roomlist", X"roomlist : aroom", X"roomlist : aroom roomlist", X"corridors_def : random_corridors", X"corridors_def : corridors", X"random_corridors : RAND_CORRIDOR_ID", X"corridors :", X"corridors : corridors corridor", X"corridor : CORRIDOR_ID ':' corr_spec ',' corr_spec", X"corridor : CORRIDOR_ID ':' corr_spec ',' INTEGER", X"corr_spec : '(' INTEGER ',' DIRECTION ',' door_pos ')'", X"aroom : room_def room_details", X"aroom : subroom_def room_details", X"subroom_def : SUBROOM_ID ':' room_type ',' light_state ',' subroom_pos ',' room_size ',' string roomfill", X"room_def : ROOM_ID ':' room_type ',' light_state ',' room_pos ',' room_align ',' room_size roomfill", X"roomfill :", X"roomfill : ',' BOOLEAN", X"room_pos : '(' INTEGER ',' INTEGER ')'", X"room_pos : RANDOM_TYPE", X"subroom_pos : '(' INTEGER ',' INTEGER ')'", X"subroom_pos : RANDOM_TYPE", X"room_align : '(' h_justif ',' v_justif ')'", X"room_align : RANDOM_TYPE", X"room_size : '(' INTEGER ',' INTEGER ')'", X"room_size : RANDOM_TYPE", X"room_details :", X"room_details : room_details room_detail", X"room_detail : room_name", X"room_detail : room_chance", X"room_detail : room_door", X"room_detail : monster_detail", X"room_detail : object_detail", X"room_detail : trap_detail", X"room_detail : altar_detail", X"room_detail : fountain_detail", X"room_detail : sink_detail", X"room_detail : pool_detail", X"room_detail : gold_detail", X"room_detail : engraving_detail", X"room_detail : stair_detail", X"room_name : NAME_ID ':' string", X"room_chance : CHANCE_ID ':' INTEGER", X"room_door : DOOR_ID ':' secret ',' door_state ',' door_wall ',' door_pos", X"secret : BOOLEAN", X"secret : RANDOM_TYPE", X"door_wall : DIRECTION", X"door_wall : RANDOM_TYPE", X"door_pos : INTEGER", X"door_pos : RANDOM_TYPE", X"maze_def : MAZE_ID ':' string ',' filling", X"filling : CHAR", X"filling : RANDOM_TYPE", X"regions : aregion", X"regions : aregion regions", X"aregion : map_definition reg_init map_details", X"map_definition : NOMAP_ID", X"map_definition : map_geometry MAP_ID", X"map_geometry : GEOMETRY_ID ':' h_justif ',' v_justif", X"h_justif : LEFT_OR_RIGHT", X"h_justif : CENTER", X"v_justif : TOP_OR_BOT", X"v_justif : CENTER", X"reg_init :", X"reg_init : reg_init init_reg", X"init_reg : RANDOM_OBJECTS_ID ':' object_list", X"init_reg : RANDOM_PLACES_ID ':' place_list", X"init_reg : RANDOM_MONSTERS_ID ':' monster_list", X"object_list : object", X"object_list : object ',' object_list", X"monster_list : monster", X"monster_list : monster ',' monster_list", X"place_list : place", X"$$1 :", X"place_list : place $$1 ',' place_list", X"map_details :", X"map_details : map_details map_detail", X"map_detail : monster_detail", X"map_detail : object_detail", X"map_detail : door_detail", X"map_detail : trap_detail", X"map_detail : drawbridge_detail", X"map_detail : region_detail", X"map_detail : stair_region", X"map_detail : portal_region", X"map_detail : teleprt_region", X"map_detail : branch_region", X"map_detail : altar_detail", X"map_detail : fountain_detail", X"map_detail : mazewalk_detail", X"map_detail : wallify_detail", X"map_detail : ladder_detail", X"map_detail : stair_detail", X"map_detail : gold_detail", X"map_detail : engraving_detail", X"map_detail : diggable_detail", X"map_detail : passwall_detail", X"$$2 :", X"monster_detail : MONSTER_ID ':' monster_c ',' m_name ',' coordinate $$2 monster_infos", X"monster_infos :", X"monster_infos : monster_infos monster_info", X"monster_info : ',' string", X"monster_info : ',' MON_ATTITUDE", X"monster_info : ',' MON_ALERTNESS", X"monster_info : ',' alignment", X"monster_info : ',' MON_APPEARANCE string", X"$$3 :", X"object_detail : OBJECT_ID ':' object_c ',' o_name ',' coordinate $$3 object_infos", X"object_infos :", X"object_infos : ',' STRING ',' enchantment", X"object_infos : ',' curse_state ',' enchantment ',' art_name", X"curse_state : RANDOM_TYPE", X"curse_state : CURSE_TYPE", X"enchantment : INTEGER", X"enchantment : RANDOM_TYPE", X"door_detail : DOOR_ID ':' door_state ',' coordinate", X"trap_detail : TRAP_ID ':' trap_name ',' coordinate", X"drawbridge_detail : DRAWBRIDGE_ID ':' coordinate ',' DIRECTION ',' door_state", X"mazewalk_detail : MAZEWALK_ID ':' coordinate ',' DIRECTION", X"wallify_detail : WALLIFY_ID", X"ladder_detail : LADDER_ID ':' coordinate ',' UP_OR_DOWN", X"stair_detail : STAIR_ID ':' coordinate ',' UP_OR_DOWN", X"$$4 :", X"stair_region : STAIR_ID ':' lev_region $$4 ',' lev_region ',' UP_OR_DOWN", X"$$5 :", X"portal_region : PORTAL_ID ':' lev_region $$5 ',' lev_region ',' string", X"$$6 :", X"$$7 :", X"teleprt_region : TELEPRT_ID ':' lev_region $$6 ',' lev_region $$7 teleprt_detail", X"$$8 :", X"branch_region : BRANCH_ID ':' lev_region $$8 ',' lev_region", X"teleprt_detail :", X"teleprt_detail : ',' UP_OR_DOWN", X"lev_region : region", X"lev_region : LEV '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')'", X"fountain_detail : FOUNTAIN_ID ':' coordinate", X"sink_detail : SINK_ID ':' coordinate", X"pool_detail : POOL_ID ':' coordinate", X"diggable_detail : NON_DIGGABLE_ID ':' region", X"passwall_detail : NON_PASSWALL_ID ':' region", X"region_detail : REGION_ID ':' region ',' light_state ',' room_type prefilled", X"altar_detail : ALTAR_ID ':' coordinate ',' alignment ',' altar_type", X"gold_detail : GOLD_ID ':' amount ',' coordinate", X"engraving_detail : ENGRAVING_ID ':' coordinate ',' engraving_type ',' string", X"monster_c : monster", X"monster_c : RANDOM_TYPE", X"monster_c : m_register", X"object_c : object", X"object_c : RANDOM_TYPE", X"object_c : o_register", X"m_name : string", X"m_name : RANDOM_TYPE", X"o_name : string", X"o_name : RANDOM_TYPE", X"trap_name : string", X"trap_name : RANDOM_TYPE", X"room_type : string", X"room_type : RANDOM_TYPE", X"prefilled :", X"prefilled : ',' FILLING", X"prefilled : ',' FILLING ',' BOOLEAN", X"coordinate : coord", X"coordinate : p_register", X"coordinate : RANDOM_TYPE", X"door_state : DOOR_STATE", X"door_state : RANDOM_TYPE", X"light_state : LIGHT_STATE", X"light_state : RANDOM_TYPE", X"alignment : ALIGNMENT", X"alignment : a_register", X"alignment : RANDOM_TYPE", X"altar_type : ALTAR_TYPE", X"altar_type : RANDOM_TYPE", X"p_register : P_REGISTER '[' INTEGER ']'", X"o_register : O_REGISTER '[' INTEGER ']'", X"m_register : M_REGISTER '[' INTEGER ']'", X"a_register : A_REGISTER '[' INTEGER ']'", X"place : coord", X"monster : CHAR", X"object : CHAR", X"string : STRING", X"art_name : STRING", X"art_name : NONE", X"amount : INTEGER", X"amount : RANDOM_TYPE", X"engraving_type : ENGRAVING_TYPE", X"engraving_type : RANDOM_TYPE", X"coord : '(' INTEGER ',' INTEGER ')'", X"region : '(' INTEGER ',' INTEGER ',' INTEGER ',' INTEGER ')'", X}; X#endif X#ifdef YYSTACKSIZE X#undef YYMAXDEPTH X#define YYMAXDEPTH YYSTACKSIZE X#else X#ifdef YYMAXDEPTH X#define YYSTACKSIZE YYMAXDEPTH X#else X#define YYSTACKSIZE 500 X#define YYMAXDEPTH 500 X#endif X#endif Xint yydebug; Xint yynerrs; Xint yyerrflag; Xint yychar; Xshort *yyssp; XYYSTYPE *yyvsp; XYYSTYPE yyval; XYYSTYPE yylval; Xshort yyss[YYSTACKSIZE]; XYYSTYPE yyvs[YYSTACKSIZE]; X#define yystacksize YYSTACKSIZE X#define YYABORT goto yyabort X#define YYREJECT goto yyabort X#define YYACCEPT goto yyaccept X#define YYERROR goto yyerrlab Xint Xyyparse() X{ X register int yym, yyn, yystate; X#if YYDEBUG X register char *yys; X extern char *getenv(); X X if ((yys = getenv("YYDEBUG")) != 0) X { X yyn = *yys; X if (yyn >= '0' && yyn <= '9') X yydebug = yyn - '0'; X } X#endif X X yynerrs = 0; X yyerrflag = 0; X yychar = (-1); X X yyssp = yyss; X yyvsp = yyvs; X *yyssp = yystate = 0; X Xyyloop: X if ((yyn = yydefred[yystate]) != 0) goto yyreduce; X if (yychar < 0) X { X if ((yychar = yylex()) < 0) yychar = 0; X#if YYDEBUG X if (yydebug) X { X yys = 0; X if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; X if (!yys) yys = "illegal-symbol"; X printf("%sdebug: state %d, reading %d (%s)\n", X YYPREFIX, yystate, yychar, yys); X } X#endif X } X if ((yyn = yysindex[yystate]) != 0 && (yyn += yychar) >= 0 && X yyn <= YYTABLESIZE && yycheck[yyn] == yychar) X { X#if YYDEBUG X if (yydebug) X printf("%sdebug: state %d, shifting to state %d\n", X YYPREFIX, yystate, yytable[yyn]); X#endif X if (yyssp >= yyss + yystacksize - 1) X { X goto yyoverflow; X } X *++yyssp = yystate = yytable[yyn]; X *++yyvsp = yylval; X yychar = (-1); X if (yyerrflag > 0) --yyerrflag; X goto yyloop; X } X if ((yyn = yyrindex[yystate]) != 0 && (yyn += yychar) >= 0 && X yyn <= YYTABLESIZE && yycheck[yyn] == yychar) X { X yyn = yytable[yyn]; X goto yyreduce; X } X if (yyerrflag) goto yyinrecovery; X#ifdef lint X goto yynewerror; X#endif Xyynewerror: X yyerror("syntax error"); X#ifdef lint X goto yyerrlab; X#endif Xyyerrlab: X ++yynerrs; Xyyinrecovery: X if (yyerrflag < 3) X { X yyerrflag = 3; X for (;;) X { X if ((yyn = yysindex[*yyssp]) != 0 && (yyn += YYERRCODE) >= 0 && X yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) X { X#if YYDEBUG X if (yydebug) X printf("%sdebug: state %d, error recovery shifting\ X to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); X#endif X if (yyssp >= yyss + yystacksize - 1) X { X goto yyoverflow; X } X *++yyssp = yystate = yytable[yyn]; X *++yyvsp = yylval; X goto yyloop; X } X else X { X#if YYDEBUG X if (yydebug) X printf("%sdebug: error recovery discarding state %d\n", X YYPREFIX, *yyssp); X#endif X if (yyssp <= yyss) goto yyabort; X --yyssp; X --yyvsp; X } X } X } X else X { X if (yychar == 0) goto yyabort; X#if YYDEBUG X if (yydebug) X { X yys = 0; X if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; X if (!yys) yys = "illegal-symbol"; X printf("%sdebug: state %d, error recovery discards token %d (%s)\n", X YYPREFIX, yystate, yychar, yys); X } X#endif X yychar = (-1); X goto yyloop; X } Xyyreduce: X#if YYDEBUG X if (yydebug) X printf("%sdebug: state %d, reducing by rule %d (%s)\n", X YYPREFIX, yystate, yyn, yyrule[yyn]); X#endif X yym = yylen[yyn]; X yyval = yyvsp[1-yym]; X switch (yyn) X { Xcase 7: X{ X int fout, i; X X if (fatal_error > 0) { X fprintf(stderr, X "%s : %d errors detected. No output created!\n", X fname, fatal_error); X } else { X char lbuf[20]; X Strcpy(lbuf, yyvsp[-4].map); X Strcat(lbuf, LEV_EXT); X#ifdef THINK_C X fout = open(lbuf, O_WRONLY|O_CREAT|O_BINARY); X#else X fout = open(lbuf, O_WRONLY|O_CREAT|O_BINARY, OMASK); X#endif X if (fout < 0) { X yyerror("Can't open output file!!"); X exit(1); X } X maze.flags = yyvsp[-3].i; X memcpy(&(maze.init_lev), &(init_lev), X sizeof(lev_init)); X maze.numpart = npart; X maze.parts = NewTab(mazepart, npart); X for(i=0;i 0) { X fprintf(stderr, X "%s : %d errors detected. No output created!\n", X fname, fatal_error); X } else { X char lbuf[20]; X Strcpy(lbuf, yyvsp[-6].map); X Strcat(lbuf, LEV_EXT); X#ifdef THINK_C X fout = open(lbuf, O_WRONLY|O_CREAT|O_BINARY); X#else X fout = open(lbuf, O_WRONLY|O_CREAT|O_BINARY, OMASK); X#endif X if (fout < 0) { X yyerror("Can't open output file!!"); X exit(1); X } X special_lev.flags = yyvsp[-5].i; X memcpy(&(special_lev.init_lev), &(init_lev), X sizeof(lev_init)); X special_lev.nroom = nrooms; X special_lev.rooms = NewTab(room, nrooms); X for(i=0; i 8) X yyerror("Level names limited to 8 characters."); X yyval.map = yyvsp[0].map; X special_lev.nrobjects = 0; X special_lev.nrmonst = 0; X } Xbreak; Xcase 10: X{ X init_lev.init_present = FALSE; X yyval.i = 0; X } Xbreak; Xcase 11: X{ X init_lev.init_present = TRUE; X if((init_lev.fg = what_map_char(yyvsp[-10].i)) == INVALID_TYPE) X yyerror("Invalid foreground type."); X if((init_lev.bg = what_map_char(yyvsp[-8].i)) == INVALID_TYPE) X yyerror("Invalid background type."); X init_lev.smoothed = yyvsp[-6].i; X init_lev.joined = yyvsp[-4].i; END_OF_FILE if test 43569 -ne `wc -c <'sys/share/lev_yacc.c1'`; then echo shar: \"'sys/share/lev_yacc.c1'\" unpacked with wrong size! fi # end of 'sys/share/lev_yacc.c1' echo shar: End of archive 7 \(of 18\). cp /dev/null ark7isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 18 archives. echo "Now execute ./patchit3.sh" rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0