[comp.sources.games.bugs] Rogue-clone fixes

rk9005@cca.ucsf.edu (Roland McGrath) (02/29/88)

Following are diffs to fix a few bugs in the rogue 5.3 clone
in comp.sources.games volume 1.  Oddly, I think most of the bugs
were mentioned in the "Bugs2" file but not included in the patches
that file came with.  These require the two "official" patches,
and bump the patchlevel from 1 to 2 (seems to me it should have been
3 already, 1 for the original plus two bumps for the official patches,
but who knows).  The only non-bug change is to make the version string
contain "5.3" so Rog-O-Matic will grok it and play.
I should fix it to be smart enough to be able to find it's own
directory, and run setuid under an option, but I haven't bothered.

(In case you care, the bugs I fixed were nested-comment problem
in machdep.c and a name conflict between rogue.h and 4.3 BSD <curses.h>.)

Just pipe this through patch and re-make.

Index: patchlevel.h
Prereq: 1
*** patchlevel.h.orig	Sun Feb 28 20:12:13 1988
--- patchlevel.h	Sun Feb 28 20:12:19 1988
***************
*** 1 ****
! #define PATCHLEVEL 1
--- 1 ----
! #define PATCHLEVEL 2
*** rogue.h.orig	Sun Feb 28 20:09:24 1988
--- rogue.h	Sun Feb 28 20:10:11 1988
***************
*** 10,15 ****
--- 10,32 ----
   *
   */
  
+ #ifdef CURSES
+ struct _win_st {
+ 	short _cury, _curx;
+ 	short _maxy, _maxx;
+ };
+ 
+ typedef struct _win_st WINDOW;
+ 
+ extern int LINES, COLS;
+ extern WINDOW *curscr;
+ extern char *CL;
+ 
+ char *md_gdtcf();
+ #else
+ #include <curses.h>
+ #endif /* CURSES */
+ 
  #define boolean char
  
  #define NOTHING		((unsigned short)     0)
***************
*** 421,440 ****
  	short minute;	/* 0 - 59 */
  	short second;	/* 0 - 59 */
  };
- 
- #ifdef CURSES
- struct _win_st {
- 	short _cury, _curx;
- 	short _maxy, _maxx;
- };
- 
- typedef struct _win_st WINDOW;
- 
- extern int LINES, COLS;
- extern WINDOW *curscr;
- extern char *CL;
- 
- char *md_gdtcf();
- #else
- #include <curses.h>
- #endif /* CURSES */
--- 438,440 ----
*** play.c.orig	Sun Feb 28 20:00:11 1988
--- play.c	Sun Feb 28 20:01:06 1988
***************
*** 154,160 ****
  			throw();
  			break;
  		case 'v':
! 			message("rogue-clone: Version II. (Tim Stoehr was here), tektronix!zeus!tims", 0);
  			break;
  		case 'Q':
  			quit(0);
--- 154,164 ----
  			throw();
  			break;
  		case 'v':
! 			/*
! 			 * Changed 2/28/88 by Roland McGrath:
! 			 * Must contain "5.3" so Rog-O-Matic will grok it.
! 			 */
! 			message("rogue 5.3 clone: Version II. (Tim Stoehr was here), tektronix!zeus!tims", 0);
  			break;
  		case 'Q':
  			quit(0);
*** machdep.c.orig	Sun Feb 28 20:14:05 1988
--- machdep.c	Sun Feb 28 20:15:55 1988
***************
*** 38,44 ****
   *         sysVcode;
   *      #else
   *         code;
!  *      #endif /* UNIX_SYSV */
   *      }
   *
   * Appropriate variations of this are of course acceptible.
--- 38,44 ----
   *         sysVcode;
   *      #else
   *         code;
!  *      #endif \* UNIX_SYSV *\
   *      }
   *
   * Appropriate variations of this are of course acceptible.
*** zap.c.orig	Sun Feb 28 20:27:38 1988
--- zap.c	Sun Feb 28 20:28:13 1988
***************
*** 164,169 ****
--- 164,170 ----
  tele_away(monster)
  object *monster;
  {
+ 	extern boolean detect_monster;
  	short row, col;
  
  	if (monster->m_flags & HOLDS) {
-- 
	Roland McGrath
ARPA: roland@rtsg.lbl.gov roland@lbl-rtsg.arpa
UUCP: ...!ucbvax!lbl-rtsg.arpa!roland