From be98bca06d90d81777cc52e939dd40febe792f37 Mon Sep 17 00:00:00 2001 From: "Derek S. Ray" Date: Tue, 5 May 2015 18:30:58 -0400 Subject: [PATCH] cherry-pick the YACC/LEX upgrades from elsewhere --- src/engrave.c | 4 +++- win/win32/dgnstuff.mak | 42 +++++++++++++++++++++++++----------------- win/win32/levstuff.mak | 30 +++++++++++------------------- 3 files changed, 39 insertions(+), 37 deletions(-) diff --git a/src/engrave.c b/src/engrave.c index a29221549..4288f305a 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 engrave.c $NHDT-Date: 1429953062 2015/04/25 09:11:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.47 $ */ +/* NetHack 3.5 engrave.c $NHDT-Date: 1430866579 2015/05/05 22:56:19 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.49 $ */ /* NetHack 3.5 engrave.c $Date: 2012/12/20 01:48:36 $ $Revision: 1.39 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -708,6 +708,8 @@ doengrave() "Chips fly out from the headstone." : is_ice(u.ux,u.uy) ? "Ice chips fly up from the ice surface!" : + (level.locations[u.ux][u.uy].typ == DRAWBRIDGE_DOWN) ? + "Splinters fly up from the bridge." : "Gravel flies up from the floor."); else Strcpy(post_engr_text, "You hear drilling!"); diff --git a/win/win32/dgnstuff.mak b/win/win32/dgnstuff.mak index a23aadfd8..004a0621b 100644 --- a/win/win32/dgnstuff.mak +++ b/win/win32/dgnstuff.mak @@ -1,27 +1,22 @@ # $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ # $Date: 2002/01/22 22:54:54 $ $Revision: 1.3 $ -#Set all of these or none of them -#YACC = byacc.exe -#LEX = flex.exe -#YTABC = y_tab.c -#YTABH = y_tab.h -#LEXYYC = lexyy.c +# Set all of these or none of them. +# +# bison and flex are the ones found in GnuWin32, which +# is probably the easiest set of these tools to find +# on Windows. +# +#YACC = bison.exe -y +#LEX = flex.exe +#YTABC = y.tab.c +#YTABH = y.tab.h +#LEXYYC = lex.yy.c -!IF "$(YACC)"!="" -@echo Yacc-alike set to $(YACC) -@echo YTABC set to $(YTABC) -@echo YTABH set to $(YTABH) -!ENDIF - -!IF "$(LEX)"!="" -@echo Lex-alike set to $(LEX) -@echo LEXYYC set to $(LEXYYC) -!ENDIF default: all -all: ..\util\dgn_yacc.c ..\util\dgn_lex.c +all: tools ..\util\dgn_yacc.c ..\util\dgn_lex.c rebuild: clean all @@ -30,6 +25,19 @@ clean: -del ..\util\dgn_yacc.c -del ..\include\dgn_comp.h +tools: +!IFDEF YACC + @echo Yacc-alike set to $(YACC) + @echo YTABC set to $(YTABC) + @echo YTABH set to $(YTABH) +!ENDIF + +!IFDEF LEX + @echo Lex-alike set to $(LEX) + @echo LEXYYC set to $(LEXYYC) +!ENDIF + + #========================================== # Dungeon Compiler Stuff #========================================== diff --git a/win/win32/levstuff.mak b/win/win32/levstuff.mak index 2597e5eb7..7f549abcd 100644 --- a/win/win32/levstuff.mak +++ b/win/win32/levstuff.mak @@ -1,26 +1,18 @@ # $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ # $Date:2002/01/22 22:54:54 $ $Revision: 1.2 $ -#YACC = byacc.exe -#LEX = flex.exe -#YTABC = y_tab.c -#YTABH = y_tab.h -#LEXYYC = lexyy.c -!IF "$(YACC)"!="" -@echo Yacc-alike set to $(YACC) -@echo YTABC set to $(YTABC) -@echo YTABH set to $(YTABH) -!ENDIF +# Set all of these or none of them. +# +# bison and flex are the ones found in GnuWin32, which +# is probably the easiest set of these tools to find +# on Windows. +# +#YACC = bison.exe -y +#LEX = flex.exe +#YTABC = y.tab.c +#YTABH = y.tab.h +#LEXYYC = lex.yy.c -!IF "$(LEX)"!="" -@echo Lex-alike set to $(LEX) -@echo LEXYYC set to $(LEXYYC) -!ENDIF - -# these won't have an impact unless YACC/LEX are defined -YTABC = y.tab.c -YTABH = y.tab.h -LEXYYC = lex.yy.c default: all