DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: I T

⟦03dd2947e⟧ TextFile

    Length: 25029 (0x61c5)
    Types: TextFile
    Names: »Int16bit.patch«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/General/Umoria/Int16bit.patch« 

TextFile


This is a first attempt to eliminate all 32 bit integer dependencies in umoria.
It is not guaranteed to work, but should provide a good starting point for
16 bit OSes such as Xenix.

Jim Wilson
wilson@ji.Berkeley.EDU

From kneller@cgl.ucsf.EDU Sun Jun 26 18:46:23 1988
Received: from socrates.ucsf.EDU by ji.Berkeley.EDU (5.59/1.28)
	id AA03277; Sun, 26 Jun 88 18:46:09 PDT
Received: by socrates.ucsf.EDU (5.59/GSC4.6)
	id AA00847; Sun, 26 Jun 88 18:44:13 PDT
Date: Sun, 26 Jun 88 18:44:13 PDT
From: kneller@cgl.ucsf.EDU
Message-Id: <8806270144.AA00847@socrates.ucsf.EDU>
To: wilson@ji.Berkeley.EDU
Subject: Oops, wrong diffs
Status: RO


Jim,

The diffs were the wrong sense.  They can be used with "patch -R", but
here is a new set anyway.

- don

*** orig/config.h	Thu Jun  9 14:51:01 1988
--- config.h	Sun Jun 26 18:16:58 1988
***************
*** 69,71 ****
--- 69,82 ----
  #define USG 
  #endif
  #endif
+ 
+ /* Detect 16-bit integers by wrapping of most positive int. */
+ #if (32767 + 1) < 0
+ /* # include "16.bit.integers" */
+ #define INT16
+ #define MAXINT	0x7FFF
+ #else
+ /* # include "32.bit.integers" */
+ #define INT32
+ #define MAXINT	10000000 /*0x7FFFFFFF*/
+ #endif
*** orig/externs.h	Thu May 26 18:51:44 1988
--- externs.h	Wed Jun 22 10:28:38 1988
***************
*** 1,7 ****
  extern int character_generated;  /* don't save score until char gen finished */
  extern int character_saved;      /* prevents save on kill after save_char() */
  extern int highscore_fd;	/* High score file descriptor */
! extern int player_max_exp;	/* Max exp possible    */
  extern char norm_state[STATE_SIZE];	/* Contains seed #     */
  extern char randes_state[STATE_SIZE];
  extern int randes_seed;	    /* For encoding colors */
--- 1,7 ----
  extern int character_generated;  /* don't save score until char gen finished */
  extern int character_saved;      /* prevents save on kill after save_char() */
  extern int highscore_fd;	/* High score file descriptor */
! extern bigint_t player_max_exp;	/* Max exp possible    */
  extern char norm_state[STATE_SIZE];	/* Contains seed #     */
  extern char randes_state[STATE_SIZE];
  extern int randes_seed;	    /* For encoding colors */
***************
*** 34,40 ****
  extern int closing_flag;	/* Used for closing   */
  
  /* Bit testing array						*/
! extern unsigned int bit_array[32];
  
  /*  Following are calculated from max dungeon sizes		*/
  extern int max_panel_rows, max_panel_cols;
--- 34,40 ----
  extern int closing_flag;	/* Used for closing   */
  
  /* Bit testing array						*/
! extern bitset_t bit_array[32];
  
  /*  Following are calculated from max dungeon sizes		*/
  extern int max_panel_rows, max_panel_cols;
***************
*** 60,66 ****
  /* Following are player variables				*/
  extern player_type py;
  extern btype player_title[MAX_CLASS][MAX_PLAYER_LEVEL];
! extern int player_exp[MAX_PLAYER_LEVEL];
  extern double acc_exp;	                  /* Accumulator for fractional exp*/
  extern dtype bare_hands;
  extern int char_row;
--- 60,66 ----
  /* Following are player variables				*/
  extern player_type py;
  extern btype player_title[MAX_CLASS][MAX_PLAYER_LEVEL];
! extern bigint_t player_exp[MAX_PLAYER_LEVEL];
  extern double acc_exp;	                  /* Accumulator for fractional exp*/
  extern dtype bare_hands;
  extern int char_row;
*** orig/types.h	Wed Jun  1 19:50:19 1988
--- types.h	Wed Jun 22 11:28:34 1988
***************
*** 1,3 ****
--- 1,5 ----
+ typedef unsigned long bitset_t;
+ typedef long bigint_t;
  typedef unsigned char byteint;
  #ifdef NO_SIGNED_CHARS
  typedef short bytlint;
***************
*** 19,26 ****
  typedef struct creature_type
  {
    ctype name;           /* Descrip of creature	*/
!   unsigned int cmove;	/* Bit field		*/
!   unsigned int spells;  /* Creature spells	*/
    wordint cdefense;	/* Bit field		*/
    worlint sleep;	/* Inactive counter	*/
    wordint mexp; 	/* Exp value for kill	*/
--- 21,28 ----
  typedef struct creature_type
  {
    ctype name;           /* Descrip of creature	*/
!   bitset_t cmove;	/* Bit field		*/
!   bitset_t spells;  /* Creature spells	*/
    wordint cdefense;	/* Bit field		*/
    worlint sleep;	/* Inactive counter	*/
    wordint mexp; 	/* Exp value for kill	*/
***************
*** 54,60 ****
    ttype name;	        /* Object name		*/
    byteint tval;	        /* Category number	*/
    char tchar;		/* Character representation*/
!   unsigned int flags;	/* Special flags		*/
    int p1;	        /* Misc. use variable	*/
    int cost;	        /* Cost of item		*/
    int subval;	        /* Sub-category number	*/
--- 56,62 ----
    ttype name;	        /* Object name		*/
    byteint tval;	        /* Category number	*/
    char tchar;		/* Character representation*/
!   bitset_t flags;	/* Special flags		*/
    int p1;	        /* Misc. use variable	*/
    int cost;	        /* Cost of item		*/
    int subval;	        /* Sub-category number	*/
***************
*** 77,84 ****
        vtype sex;	/* Sex of character	*/
        vtype title;	/* Character's title	*/
        vtype tclass;	/* Character's class	*/
!       int max_exp;	/* Max experience*/
!       int exp;	        /* Cur experience	*/
        int au;	        /* Gold		*/
        wordint age;	/* Characters age*/
        wordint ht;	/* Height	*/
--- 79,86 ----
        vtype sex;	/* Sex of character	*/
        vtype title;	/* Character's title	*/
        vtype tclass;	/* Character's class	*/
!       bigint_t max_exp;	/* Max experience*/
!       bigint_t exp;	        /* Cur experience	*/
        int au;	        /* Gold		*/
        wordint age;	/* Characters age*/
        wordint ht;	/* Height	*/
***************
*** 128,134 ****
      } stats;
    struct flags
      {
!       unsigned int status;	/* Status of player    */
        int rest;	                /* Rest counter	      */
        int blind;	        /* Blindness counter   */
        int paralysis;	        /* Paralysis counter   */
--- 130,136 ----
      } stats;
    struct flags
      {
!       bitset_t status;	/* Status of player    */
        int rest;	                /* Rest counter	      */
        int blind;	        /* Blindness counter   */
        int paralysis;	        /* Paralysis counter   */
***************
*** 221,227 ****
    bytlint bsav;         /* Race base for saving throw	*/
    bytlint bhitdie;      /* Base hit points for race	*/
    bytlint infra;        /* See infra-red		*/
!   unsigned int tclass;  /* Bit field for class types	*/
  } race_type;
  
  typedef struct class_type
--- 223,229 ----
    bytlint bsav;         /* Race base for saving throw	*/
    bytlint bhitdie;      /* Base hit points for race	*/
    bytlint infra;        /* See infra-red		*/
!   bitset_t tclass;  /* Bit field for class types	*/
  } race_type;
  
  typedef struct class_type
*** orig/creature.c	Sat May 28 22:09:02 1988
--- creature.c	Sun Jun 26 17:37:30 1988
***************
*** 275,280 ****
--- 275,283 ----
    register struct flags *f_ptr;
    register treasure_type *i_ptr;
    char *string;
+ #ifdef INT16
+   bigint_t m;
+ #endif
  
    m_ptr = &m_list[monptr];
    c_ptr = &c_list[m_ptr->mptr];
***************
*** 676,683 ****
--- 679,691 ----
  	      break;
  	    case 19:    /*Lose experience  */
  	      msg_print("You feel your life draining away!");
+ #ifdef INT16
+ 	      m = damroll(damstr) + (py.misc.exp / 100)*MON_DRAIN_LIFE;
+ 	      lose_exp(m);
+ #else
  	      i = damroll(damstr) + (py.misc.exp / 100)*MON_DRAIN_LIFE;
  	      lose_exp(i);
+ #endif
  	      break;
  	    case 20:    /*Aggravate monster*/
  	      (void) aggravate_monster(5);
***************
*** 765,771 ****
  int *mm;
  {
    int i, j, newy, newx;
!   unsigned int movebits;
    int flag, tflag;
    int res;
    register cave_type *c_ptr;
--- 773,779 ----
  int *mm;
  {
    int i, j, newy, newx;
!   bitset_t movebits;
    int flag, tflag;
    int res;
    register cave_type *c_ptr;
***************
*** 980,986 ****
  int monptr;
  int *took_turn;
  {
!   unsigned int i;
    int y, x;
    register int k;
    int chance, thrown_spell;
--- 988,994 ----
  int monptr;
  int *took_turn;
  {
!   bitset_t i;
    int y, x;
    register int k;
    int chance, thrown_spell;
*** orig/death.c	Sat May 28 21:13:14 1988
--- death.c	Fri Jun 24 11:27:49 1988
***************
*** 174,180 ****
--- 174,184 ----
    (void) strcpy(str3, fill_str(py.misc.tclass));
    (void) sprintf(str4, "Level : %d", (int)py.misc.lev);
    (void) strcpy(str4, fill_str(str4));
+ #ifdef INT16
+   (void) sprintf(str5, "%ld Exp", (long)py.misc.exp);
+ #else
    (void) sprintf(str5, "%d Exp", py.misc.exp);
+ #endif
    (void) strcpy(str5, fill_str(str5));
    (void) sprintf(str6, "%d Au", py.misc.au);
    (void) strcpy(str6, fill_str(str6));
***************
*** 248,254 ****
  
  
  /* Calculates the total number of points earned		-JWT-	 */
! int total_points()
  {
    return (py.misc.max_exp + (100 * py.misc.max_lev));
  }
--- 252,258 ----
  
  
  /* Calculates the total number of points earned		-JWT-	 */
! long total_points()
  {
    return (py.misc.max_exp + (100 * py.misc.max_lev));
  }
***************
*** 275,281 ****
        exit_game();
      }
  
!   myscore.points = (long)total_points();
    myscore.dun_level = dun_level;
    myscore.lev = py.misc.lev;
    myscore.max_lev = py.misc.max_lev;
--- 279,285 ----
        exit_game();
      }
  
!   myscore.points = total_points();
    myscore.dun_level = dun_level;
    myscore.lev = py.misc.lev;
    myscore.max_lev = py.misc.max_lev;
*** orig/eat.c	Sat May 28 21:10:44 1988
--- eat.c	Tue Jun 21 16:54:53 1988
***************
*** 7,13 ****
  /* Eat some food...					-RAK-	*/
  eat()
  {
!   unsigned int i;
    int j, k, item_val;
    int redraw, ident;
    register struct flags *f_ptr;
--- 7,13 ----
  /* Eat some food...					-RAK-	*/
  eat()
  {
!   bitset_t i;
    int j, k, item_val;
    int redraw, ident;
    register struct flags *f_ptr;
*** orig/files.c	Sat May 28 21:13:53 1988
--- files.c	Sun Jun 26 17:22:19 1988
***************
*** 313,320 ****
--- 313,325 ----
  	      (void) strcpy(out_val, c_ptr->name);
  	      (void) strcat(out_val, "                              ");
  	      (void) fprintf(file1, "%d  %s     (%c)\n", i, out_val, c_ptr->cchar);
+ #ifdef INT16
+ 	      (void) fprintf(file1,"     Speed ==%d  Level     ==%d  Exp ==%ld\n",
+ 		      c_ptr->speed, c_ptr->level, (long) c_ptr->mexp);
+ #else
  	      (void) fprintf(file1, "     Speed ==%d  Level     ==%d  Exp ==%d\n",
  		      c_ptr->speed, c_ptr->level, (int)c_ptr->mexp);
+ #endif
  	      (void) fprintf(file1, "     AC    ==%d  Eye-sight ==%d  HD  ==%s\n",
  		      c_ptr->ac, c_ptr->aaf, c_ptr->hd);
  	      if (0x80000000 & c_ptr->cmove)
***************
*** 674,680 ****
--- 679,689 ----
  	  (void) fprintf(file1, "     Level      :%6d", (int)py.misc.lev);
  	  (void) fprintf(file1, "     Max Hit Points :%6d\n", py.misc.mhp);
  	  (void) fprintf(file1, "  + To Damage :%6d", py.misc.dis_td);
+ #ifdef INT16
+ 	  (void) fprintf(file1, "     Experience :%6ld", py.misc.exp);
+ #else
  	  (void) fprintf(file1, "     Experience :%6d", py.misc.exp);
+ #endif
  	  (void) fprintf(file1, "     Cur Hit Points :%6d\n", (int) (py.misc.chp));
  	  (void) fprintf(file1, "  + To AC     :%6d", py.misc.dis_tac);
  	  (void) fprintf(file1, "     Gold       :%6d", py.misc.au);
*** orig/misc1.c	Tue Jun 14 18:14:27 1988
--- misc1.c	Sun Jun 26 17:05:38 1988
***************
*** 207,214 ****
  int mean;
  int stand;
  {
!   return ((int)((sqrt(-2.0*log(randint((int)9999999)/10000000.0))*
! 		 cos(6.283*(randint((int)9999999)/10000000.0))*stand) + mean));
  }
  
  
--- 207,215 ----
  int mean;
  int stand;
  {
!   return (int) ((sqrt(-2.0 * log(randint(MAXINT - 1) / (double) MAXINT))
! 		* cos(6.283 * (randint(MAXINT - 1) / (double) MAXINT)) * stand)
! 		+ mean);
  }
  
  
***************
*** 215,226 ****
  /* Returns position of first set bit			-RAK-	*/
  /*     and clears that bit */
  int bit_pos(test)
! unsigned int *test;
  {
    register int i;
!    register int mask = 0x1;
  
!   for (i = 0; i < sizeof(int)*8; i++) {
      if (*test & mask) {
        *test &= ~mask;
        return(i);
--- 216,227 ----
  /* Returns position of first set bit			-RAK-	*/
  /*     and clears that bit */
  int bit_pos(test)
! bitset_t *test;
  {
    register int i;
!   bitset_t mask = 0x1;
  
!   for (i = 0; i < sizeof(*test)*8; i++) {
      if (*test & mask) {
        *test &= ~mask;
        return(i);
*** orig/misc2.c	Mon Jun  6 16:28:36 1988
--- misc2.c	Sun Jun 26 18:18:43 1988
***************
*** 461,466 ****
--- 461,479 ----
    put_buffer(pad(info, " ", 13), row, column);
  }
  
+ #ifdef INT16
+ /* Print long number with header at given row, column 	-RAK-	*/
+ static void
+ prt_lnum(header, num, row, column)
+ vtype header;
+ long num;
+ int row, column;
+ {
+   vtype out_val;
+   (void) sprintf(out_val, "%s%6ld ", header, num);
+   put_buffer(out_val, row, column);
+ }
+ #endif
  
  /* Print number with header at given row, column 	-RAK-	*/
  prt_num(header, num, row, column)
***************
*** 954,960 ****
--- 967,977 ----
    prt_stat("CON : ", s_ptr->ccon,        10, stat_column);
    prt_stat("CHR : ", s_ptr->cchr,        11, stat_column);
    prt_num( "LEV : ", (int)m_ptr->lev,    13, stat_column);
+ #ifdef INT16
+   prt_lnum( "EXP : ", m_ptr->exp,         14, stat_column);
+ #else
    prt_num( "EXP : ", m_ptr->exp,         14, stat_column);
+ #endif
    prt_num( "MANA: ", (int)(m_ptr->cmana), 15, stat_column);
    prt_num( "MHP : ", m_ptr->mhp,         16, stat_column);
    prt_num( "CHP : ", (int)(m_ptr->chp),  17, stat_column);
***************
*** 1063,1069 ****
--- 1080,1090 ----
  
    m_ptr = &py.misc;
    prt_num("Level      : ", (int)m_ptr->lev, 9, 30);
+ #ifdef INT16
+   prt_lnum("Experience : ", m_ptr->exp, 10, 30);
+ #else
    prt_num("Experience : ", m_ptr->exp, 10, 30);
+ #endif
    prt_num("Gold       : ", m_ptr->au, 11, 30);
    prt_num("Max Hit Points : ", m_ptr->mhp, 9, 53);
    prt_num("Cur Hit Points : ", (int)m_ptr->chp, 10, 53);
***************
*** 1440,1449 ****
  int learn_spell(redraw)
  int *redraw;
  {
!   unsigned int j;
    register int i, k, new_spells;
    int sn, sc;
!   unsigned int spell_flag;
    spl_type spell;
    int learn;
    register spell_type *s_ptr;
--- 1461,1470 ----
  int learn_spell(redraw)
  int *redraw;
  {
!   bitset_t j;
    register int i, k, new_spells;
    int sn, sc;
!   bitset_t spell_flag;
    spl_type spell;
    int learn;
    register spell_type *s_ptr;
***************
*** 1515,1521 ****
    register int i, j, k, l;
    int new_spell;
    int test_array[32];
!   unsigned int spell_flag;
    int learn;
    register spell_type *s_ptr;
  
--- 1536,1542 ----
    register int i, j, k, l;
    int new_spell;
    int test_array[32];
!   bitset_t spell_flag;
    int learn;
    register spell_type *s_ptr;
  
***************
*** 1631,1637 ****
  /* Increases hit points and level			-RAK-	*/
  gain_level()
  {
!   int nhp, dif_exp, need_exp;
    int redraw;
    vtype out_val;
    register struct misc *p_ptr;
--- 1652,1659 ----
  /* Increases hit points and level			-RAK-	*/
  gain_level()
  {
!   int nhp;
!   bigint_t dif_exp, need_exp;
    int redraw;
    vtype out_val;
    register struct misc *p_ptr;
***************
*** 1691,1697 ****
--- 1713,1723 ----
        if (p_ptr->exp > p_ptr->max_exp)
  	p_ptr->max_exp = p_ptr->exp;
      }
+ #ifdef INT16
+   prt_lnum("", py.misc.exp, 14, stat_column+6);
+ #else
    prt_num("", py.misc.exp, 14, stat_column+6);
+ #endif
  }
  
  
*** orig/moria1.c	Tue Jun 14 17:49:33 1988
--- moria1.c	Wed Jun 22 10:42:52 1988
***************
*** 73,79 ****
  treasure_type tobj;
  int factor;
  {
!   register unsigned int item_flags;
    int old_dis_ac;
    register struct flags *p_ptr;
    register struct misc *m_ptr;
--- 73,79 ----
  treasure_type tobj;
  int factor;
  {
!   register bitset_t item_flags;
    int old_dis_ac;
    register struct flags *p_ptr;
    register struct misc *m_ptr;
*** orig/moria2.c	Tue Jun 14 17:49:31 1988
--- moria2.c	Wed Jun 22 10:46:25 1988
***************
*** 266,272 ****
  int *sn, *sc;
  int *redraw;
  {
!   unsigned int j;
    register int i, k;
    spl_type spell;
    int cast;
--- 266,272 ----
  int *sn, *sc;
  int *redraw;
  {
!   bitset_t j;
    register int i, k;
    spl_type spell;
    int cast;
***************
*** 336,342 ****
  /* Examine a Book					-RAK-	*/
  examine_book()
  {
!   unsigned int j;
    int i, k, item_val;
    int redraw, flag;
    char dummy;
--- 336,342 ----
  /* Examine a Book					-RAK-	*/
  examine_book()
  {
!   bitset_t j;
    int i, k, item_val;
    int redraw, flag;
    char dummy;
***************
*** 678,684 ****
  /* based on flags set in the main creature record                */
  monster_death(y, x, flags)
  int y, x;
! register unsigned int flags;
  {
    register int i;
  
--- 678,684 ----
  /* based on flags set in the main creature record                */
  monster_death(y, x, flags)
  int y, x;
! register bitset_t flags;
  {
    register int i;
  
*** orig/potions.c	Sat May 28 21:10:33 1988
--- potions.c	Sun Jun 26 17:38:44 1988
***************
*** 7,14 ****
  /* Potions for the quaffing				-RAK-	*/
  quaff()
  {
!   unsigned int i;
!   int j, k, l, item_val;
    int redraw, ident;
    register treasure_type *i_ptr;
    register struct misc *m_ptr;
--- 7,16 ----
  /* Potions for the quaffing				-RAK-	*/
  quaff()
  {
!   bitset_t i;
!   int j, k;
!   bigint_t l;
!   int item_val;
    int redraw, ident;
    register treasure_type *i_ptr;
    register struct misc *m_ptr;
***************
*** 254,262 ****
  		      /* avoid randint(0) call */
  		      l = (py.misc.exp/5.0);
  		      if (l == 0)
! 			lose_exp(1);
  		      else
! 			lose_exp(randint(l)+l);
  		      ident = TRUE;
  		      break;
  		    case 34:
--- 256,264 ----
  		      /* avoid randint(0) call */
  		      l = (py.misc.exp/5.0);
  		      if (l == 0)
! 			lose_exp((bigint_t) 1);
  		      else
! 			lose_exp((bigint_t) randint((int) l)+l);
  		      ident = TRUE;
  		      break;
  		    case 34:
***************
*** 359,365 ****
  	      if (i_ptr->flags != 0)
  		{
  		  m_ptr = &py.misc;
! 		  m_ptr->exp += (int)(i_ptr->level/m_ptr->lev + 0.5);
  		  prt_experience();
  		}
  	      add_food(i_ptr->p1);
--- 361,367 ----
  	      if (i_ptr->flags != 0)
  		{
  		  m_ptr = &py.misc;
! 		  m_ptr->exp += (bigint_t)(i_ptr->level/m_ptr->lev + 0.5);
  		  prt_experience();
  		}
  	      add_food(i_ptr->p1);
*** orig/scrolls.c	Sat May 28 21:10:31 1988
--- scrolls.c	Tue Jun 21 16:55:03 1988
***************
*** 15,21 ****
  /* Scrolls for the reading				-RAK-	*/
  read_scroll()
  {
!   unsigned int i;
    int j, k, l, item_val;
    int y, x;
    int tmp[6];
--- 15,21 ----
  /* Scrolls for the reading				-RAK-	*/
  read_scroll()
  {
!   bitset_t i;
    int j, k, l, item_val;
    int y, x;
    int tmp[6];
*** orig/spells.c	Tue Jun 14 17:49:28 1988
--- spells.c	Tue Jun 21 16:55:06 1988
***************
*** 687,693 ****
  /* Return flags for given type area affect		-RAK-	*/
  get_flags(typ, weapon_type, harm_type, destroy)
  int typ;
! int *weapon_type, *harm_type;
  int (**destroy)();
  {
    int set_null(), set_fire_destroy(), set_frost_destroy();
--- 687,694 ----
  /* Return flags for given type area affect		-RAK-	*/
  get_flags(typ, weapon_type, harm_type, destroy)
  int typ;
! bitset_t *weapon_type;
! int *harm_type;
  int (**destroy)();
  {
    int set_null(), set_fire_destroy(), set_frost_destroy();
***************
*** 739,745 ****
  ctype bolt_typ;
  {
    int i, oldy, oldx, dist;
!   int weapon_type, harm_type;
    int flag;
    int (*dummy)();
    register cave_type *c_ptr;
--- 740,747 ----
  ctype bolt_typ;
  {
    int i, oldy, oldx, dist;
!   bitset_t weapon_type;
!   int harm_type;
    int flag;
    int (*dummy)();
    register cave_type *c_ptr;
***************
*** 834,840 ****
    register int i, j;
    int dam, max_dis, thit, tkill, k;
    int oldy, oldx, dist;
!   int weapon_type, harm_type;
    int flag;
    int (*destroy)();
    register cave_type *c_ptr;
--- 836,843 ----
    register int i, j;
    int dam, max_dis, thit, tkill, k;
    int oldy, oldx, dist;
!   bitset_t weapon_type;
!   int harm_type;
    int flag;
    int (*destroy)();
    register cave_type *c_ptr;
***************
*** 979,985 ****
  {
    register int i, j;
    int dam, max_dis;
!   int weapon_type, harm_type;
    int (*destroy)();
    register cave_type *c_ptr;
    register monster_type *m_ptr;
--- 982,989 ----
  {
    register int i, j;
    int dam, max_dis;
!   bitset_t weapon_type;
!   int harm_type;
    int (*destroy)();
    register cave_type *c_ptr;
    register monster_type *m_ptr;
***************
*** 2338,2344 ****
  
  /* Lose experience					-RAK-	*/
  lose_exp(amount)
! int amount;
  {
    register int i, j;
    int av_hp, lose_hp;
--- 2342,2348 ----
  
  /* Lose experience					-RAK-	*/
  lose_exp(amount)
! bigint_t amount;
  {
    register int i, j;
    int av_hp, lose_hp;
*** orig/staffs.c	Tue Jun 14 17:49:26 1988
--- staffs.c	Tue Jun 21 16:55:06 1988
***************
*** 7,13 ****
  /* Use a staff...					-RAK-	*/
  use()
  {
!   unsigned int i;
    int j, k, item_val, chance;
    int y, x;
    int redraw, ident;
--- 7,13 ----
  /* Use a staff...					-RAK-	*/
  use()
  {
!   bitset_t i;
    int j, k, item_val, chance;
    int y, x;
    int redraw, ident;
*** orig/store2.c	Tue Jun 14 17:49:38 1988
--- store2.c	Tue Jun 21 16:55:07 1988
***************
*** 959,965 ****
        msg_print(out_val);
        /* make sure player sees the message */
        msg_print(" ");
!       if ((store_buy[store_num])(inventory[INVEN_MAX].tval))
  	if (store_check_num(store_num))
  	  switch(sell_haggle(store_num, &price, inventory[INVEN_MAX]))
  	    {
--- 959,965 ----
        msg_print(out_val);
        /* make sure player sees the message */
        msg_print(" ");
!       if ((*store_buy[store_num])(inventory[INVEN_MAX].tval))
  	if (store_check_num(store_num))
  	  switch(sell_haggle(store_num, &price, inventory[INVEN_MAX]))
  	    {
*** orig/variables.c	Sat May 28 21:10:24 1988
--- variables.c	Wed Jun 22 11:02:36 1988
***************
*** 5,11 ****
  int character_generated = 0;    /* don't save score until char gen finished */
  int character_saved = 0;        /* prevents save on kill after save_char() */
  int highscore_fd;	        /* File descriptor to high score file */
! int player_max_exp;	        /* Max exp possible    */
  char norm_state[STATE_SIZE];	/* normal seed */
  char randes_state[STATE_SIZE];	/* For encoding colors */
  int randes_seed;                /* for restarting randes_state */
--- 5,11 ----
  int character_generated = 0;    /* don't save score until char gen finished */
  int character_saved = 0;        /* prevents save on kill after save_char() */
  int highscore_fd;	        /* File descriptor to high score file */
! bigint_t player_max_exp;	        /* Max exp possible    */
  char norm_state[STATE_SIZE];	/* normal seed */
  char randes_state[STATE_SIZE];	/* For encoding colors */
  int randes_seed;                /* for restarting randes_state */
***************
*** 51,57 ****
  int closing_flag = 0;	         /* Used for closing   */
  
  /* Bit testing array						*/
! unsigned int bit_array[32] = {0x00000001, 0x00000002, 0x00000004, 0x00000008,
  				0x00000010, 0x00000020, 0x00000040, 0x00000080,
  				0x00000100, 0x00000200, 0x00000400, 0x00000800,
  				0x00001000, 0x00002000, 0x00004000, 0x00008000,
--- 51,57 ----
  int closing_flag = 0;	         /* Used for closing   */
  
  /* Bit testing array						*/
! bitset_t bit_array[32] = {0x00000001, 0x00000002, 0x00000004, 0x00000008,
  				0x00000010, 0x00000020, 0x00000040, 0x00000080,
  				0x00000100, 0x00000200, 0x00000400, 0x00000800,
  				0x00001000, 0x00002000, 0x00004000, 0x00008000,
***************
*** 157,163 ****
  };
  
  /* Base experience levels, may be adjusted up for race and/or class*/
! int player_exp[MAX_PLAYER_LEVEL] = {
       10,     25,     45,     70,    100,    140,    200,    280,    380,   500,
      650,    850,   1100,   1400,   1800,   2300,   2900,   3600,   4400,  5400,
     6800,   8400,  10200,  12500,  17500,  25000,  35000,  50000,  75000,100000,
--- 157,163 ----
  };
  
  /* Base experience levels, may be adjusted up for race and/or class*/
! bigint_t player_exp[MAX_PLAYER_LEVEL] = {
       10,     25,     45,     70,    100,    140,    200,    280,    380,   500,
      650,    850,   1100,   1400,   1800,   2300,   2900,   3600,   4400,  5400,
     6800,   8400,  10200,  12500,  17500,  25000,  35000,  50000,  75000,100000,
*** orig/wands.c	Tue Jun 14 17:49:25 1988
--- wands.c	Tue Jun 21 16:55:10 1988
***************
*** 7,13 ****
  /* Wands for the aiming...				*/
  aim()
  {
!   unsigned int i;
    int j, k, l, chance;
    int dir, item_val;
    int dumy, y_dumy, x_dumy;
--- 7,13 ----
  /* Wands for the aiming...				*/
  aim()
  {
!   bitset_t i;
    int j, k, l, chance;
    int dir, item_val;
    int dumy, y_dumy, x_dumy;