shithub: choc

Download patch

ref: 396de0009d3a045f10e101efc2d3f1b8eb07ab16
parent: 5db5fe7d42dbcc3912762c6327e34919dc131ca7
author: Simon Howard <fraggle@gmail.com>
date: Wed Oct 11 18:55:06 EDT 2006

Shut up compiler warnings.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 694

--- a/src/deh_cheat.c
+++ b/src/deh_cheat.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: deh_cheat.c 687 2006-10-05 22:12:22Z fraggle $
+// $Id: deh_cheat.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -101,7 +101,7 @@
     char *variable_name;
     char *value;
     unsigned char *unsvalue;
-    int i;
+    unsigned int i;
 
     if (!DEH_ParseAssignment(line, &variable_name, &value))
     {
@@ -123,10 +123,13 @@
 
     // write the value into the cheat sequence
 
-    for (i=0; 
-         i<cheat->seq->sequence_len && unsvalue[i] != 0 && unsvalue[i] != 0xff; 
-         ++i)
+    i = 0;
+
+    while (i<cheat->seq->sequence_len && unsvalue[i] != 0 && unsvalue[i] != 0xff)
+    {
         cheat->seq->sequence[i] = unsvalue[i];
+        ++i;
+    }
 
     cheat->seq->sequence[i] = '\0';
 }
--- a/src/deh_mapping.h
+++ b/src/deh_mapping.h
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: deh_mapping.h 687 2006-10-05 22:12:22Z fraggle $
+// $Id: deh_mapping.h 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -62,7 +62,7 @@
              {deh_name, NULL, -1},
             
 #define DEH_END_MAPPING                                       \
-             {NULL}                                           \
+             {NULL, NULL, -1}                                 \
         }                                                     \
     };
 
--- a/src/deh_misc.c
+++ b/src/deh_misc.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: deh_misc.c 687 2006-10-05 22:12:22Z fraggle $
+// $Id: deh_misc.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -255,7 +255,7 @@
 
 static void DEH_MiscMD5Sum(md5_context_t *context)
 {
-    int i;
+    unsigned int i;
 
     for (i=0; i<sizeof(misc_settings) / sizeof(*misc_settings); ++i)
     {
--- a/src/f_finale.c
+++ b/src/f_finale.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: f_finale.c 641 2006-09-21 11:13:28Z rtc_marine $
+// $Id: f_finale.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -48,7 +48,7 @@
 
 
 static const char
-rcsid[] = "$Id: f_finale.c 641 2006-09-21 11:13:28Z rtc_marine $";
+rcsid[] = "$Id: f_finale.c 694 2006-10-11 22:55:06Z fraggle $";
 
 #include <ctype.h>
 
@@ -68,6 +68,13 @@
 #include "doomstat.h"
 #include "r_state.h"
 
+typedef enum
+{
+    F_STAGE_TEXT,
+    F_STAGE_ARTSCREEN,
+    F_STAGE_CAST,
+} finalestage_t;
+
 // ?
 //#include "doomstat.h"
 //#include "r_local.h"
@@ -74,10 +81,9 @@
 //#include "f_finale.h"
 
 // Stage of animation:
-//  0 = text, 1 = art screen, 2 = character cast
-int		finalestage;
+finalestage_t finalestage;
 
-int		finalecount;
+unsigned int finalecount;
 
 #define	TEXTSPEED	3
 #define	TEXTWAIT	250
@@ -168,7 +174,7 @@
     finaletext = DEH_String(finaletext);
     finaleflat = DEH_String(finaleflat);
     
-    finalestage = 0;
+    finalestage = F_STAGE_TEXT;
     finalecount = 0;
 	
 }
@@ -177,7 +183,7 @@
 
 boolean F_Responder (event_t *event)
 {
-    if (finalestage == 2)
+    if (finalestage == F_STAGE_CAST)
 	return F_CastResponder (event);
 	
     return false;
@@ -212,7 +218,7 @@
     // advance animation
     finalecount++;
 	
-    if (finalestage == 2)
+    if (finalestage == F_STAGE_CAST)
     {
 	F_CastTicker ();
 	return;
@@ -221,10 +227,11 @@
     if ( gamemode == commercial)
 	return;
 		
-    if (!finalestage && finalecount>strlen (finaletext)*TEXTSPEED + TEXTWAIT)
+    if (finalestage == F_STAGE_TEXT
+     && finalecount>strlen (finaletext)*TEXTSPEED + TEXTWAIT)
     {
 	finalecount = 0;
-	finalestage = 1;
+	finalestage = F_STAGE_ARTSCREEN;
 	wipegamestate = -1;		// force a wipe
 	if (gameepisode == 3)
 	    S_StartMusic (mus_bunny);
@@ -247,7 +254,7 @@
     byte*	dest;
     
     int		x,y,w;
-    int		count;
+    signed int	count;
     char*	ch;
     int		c;
     int		cx;
@@ -278,7 +285,7 @@
     cy = 10;
     ch = finaletext;
 	
-    count = (finalecount - 10)/TEXTSPEED;
+    count = ((signed int) finalecount - 10) / TEXTSPEED;
     if (count < 0)
 	count = 0;
     for ( ; count ; count-- )
@@ -364,7 +371,7 @@
     caststate = &states[mobjinfo[castorder[castnum].type].seestate];
     casttics = caststate->tics;
     castdeath = false;
-    finalestage = 2;	
+    finalestage = F_STAGE_CAST;
     castframes = 0;
     castonmelee = 0;
     castattacking = false;
@@ -626,7 +633,7 @@
 //
 void F_BunnyScroll (void)
 {
-    int		scrolled;
+    signed int  scrolled;
     int		x;
     patch_t*	p1;
     patch_t*	p2;
@@ -639,7 +646,7 @@
 
     V_MarkRect (0, 0, SCREENWIDTH, SCREENHEIGHT);
 	
-    scrolled = 320 - (finalecount-230)/2;
+    scrolled = (signed int) (320 - (finalecount-230)/2);
     if (scrolled > 320)
 	scrolled = 320;
     if (scrolled < 0)
@@ -678,46 +685,61 @@
 	         W_CacheLumpName (name,PU_CACHE));
 }
 
+static void F_ArtScreenDrawer(void)
+{
+    char *lumpname;
+    
+    if (gameepisode == 3)
+    {
+        F_BunnyScroll();
+    }
+    else
+    {
+        switch (gameepisode)
+        {
+            case 1:
+                if (gamemode == retail)
+                {
+                    lumpname = "CREDIT";
+                }
+                else
+                {
+                    lumpname = "HELP2";
+                }
+                break;
+            case 2:
+                lumpname = "VICTORY2";
+                break;
+            case 4:
+                lumpname = "ENDPIC";
+                break;
+            default:
+                return;
+        }
 
+        lumpname = DEH_String(lumpname);
+
+        V_DrawPatch (0, 0, 0, W_CacheLumpName(lumpname, PU_CACHE));
+    }
+}
+
 //
 // F_Drawer
 //
 void F_Drawer (void)
 {
-    if (finalestage == 2)
+    switch (finalestage)
     {
-	F_CastDrawer ();
-	return;
+        case F_STAGE_CAST:
+            F_CastDrawer();
+            break;
+        case F_STAGE_TEXT:
+            F_TextWrite();
+            break;
+        case F_STAGE_ARTSCREEN:
+            F_ArtScreenDrawer();
+            break;
     }
-
-    if (!finalestage)
-	F_TextWrite ();
-    else
-    {
-	switch (gameepisode)
-	{
-	  case 1:
-	    if ( gamemode == retail )
-	      V_DrawPatch (0,0,0,
-			 W_CacheLumpName(DEH_String("CREDIT"),PU_CACHE));
-	    else
-	      V_DrawPatch (0,0,0,
-			 W_CacheLumpName(DEH_String("HELP2"),PU_CACHE));
-	    break;
-	  case 2:
-	    V_DrawPatch(0,0,0,
-			W_CacheLumpName(DEH_String("VICTORY2"),PU_CACHE));
-	    break;
-	  case 3:
-	    F_BunnyScroll ();
-	    break;
-	  case 4:
-	    V_DrawPatch (0,0,0,
-			 W_CacheLumpName(DEH_String("ENDPIC"),PU_CACHE));
-	    break;
-	}
-    }
-			
 }
 
 
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: g_game.c 667 2006-09-25 21:45:30Z fraggle $
+// $Id: g_game.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -134,7 +134,7 @@
 
 
 static const char
-rcsid[] = "$Id: g_game.c 667 2006-09-25 21:45:30Z fraggle $";
+rcsid[] = "$Id: g_game.c 694 2006-10-11 22:55:06Z fraggle $";
 
 #include <string.h>
 #include <stdlib.h>
@@ -325,10 +325,10 @@
 int		mousey;         
 
 int             dclicktime;
-int		dclickstate;
+boolean	        dclickstate;
 int		dclicks; 
 int             dclicktime2;
-int		dclickstate2;
+boolean		dclickstate2;
 int		dclicks2;
 
 // joystick values are repeated 
--- a/src/m_cheat.h
+++ b/src/m_cheat.h
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: m_cheat.h 650 2006-09-22 12:16:00Z fraggle $
+// $Id: m_cheat.h 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -47,12 +47,12 @@
     // settings for this cheat
 
     char sequence[MAX_CHEAT_LEN];
-    int sequence_len;
+    size_t sequence_len;
     int parameter_chars;
 
     // state used during the game
 
-    int chars_read;
+    size_t chars_read;
     int param_chars_read;
     char parameter_buf[MAX_CHEAT_PARAMS];
 } cheatseq_t;
--- a/src/m_menu.c
+++ b/src/m_menu.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: m_menu.c 665 2006-09-25 20:42:37Z fraggle $
+// $Id: m_menu.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -78,7 +78,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: m_menu.c 665 2006-09-25 20:42:37Z fraggle $";
+rcsid[] = "$Id: m_menu.c 694 2006-10-11 22:55:06Z fraggle $";
 
 #include <stdlib.h>
 #include <ctype.h>
@@ -1856,8 +1856,8 @@
 {
     static short	x;
     static short	y;
-    short		i;
-    short		max;
+    unsigned int	i;
+    unsigned int	max;
     char		string[40];
     char               *name;
     int			start;
--- a/src/memio.c
+++ b/src/memio.c
@@ -42,7 +42,7 @@
 	unsigned char *buf;
 	size_t buflen;
 	size_t alloced;
-	int position;
+	unsigned int position;
 	memfile_mode_t mode;
 };
 
@@ -172,7 +172,7 @@
 
 int mem_fseek(MEMFILE *stream, signed long position, mem_rel_t whence)
 {
-	int newpos;
+	unsigned int newpos;
 
 	switch (whence)
 	{
@@ -191,7 +191,7 @@
 			return -1;
 	}
 
-	if (newpos >= 0 && newpos < stream->buflen)
+	if (newpos < stream->buflen)
 	{
 		stream->position = newpos;
 		return 0;
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: net_client.c 689 2006-10-06 17:06:05Z fraggle $
+// $Id: net_client.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -347,7 +347,7 @@
 // the d_net.c structures (netcmds/nettics) and save the new ticcmd
 // back into recvwindow_cmd_base.
 
-static void NET_CL_ExpandFullTiccmd(net_full_ticcmd_t *cmd, int seq)
+static void NET_CL_ExpandFullTiccmd(net_full_ticcmd_t *cmd, unsigned int seq)
 {
     int latency;
     fixed_t adjustment;
@@ -711,7 +711,7 @@
     net_gamesettings_t settings;
     unsigned int num_players;
     signed int player_number;
-    int i;
+    unsigned int i;
 
     if (!NET_ReadInt8(packet, &num_players)
      || !NET_ReadSInt8(packet, &player_number)
--- a/src/net_defs.h
+++ b/src/net_defs.h
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: net_defs.h 680 2006-09-29 21:25:13Z fraggle $
+// $Id: net_defs.h 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -93,9 +93,9 @@
 struct _net_packet_s
 {
     byte *data;
-    int len;
-    int alloced;
-    int pos;
+    size_t len;
+    size_t alloced;
+    unsigned int pos;
 };
 
 struct _net_module_s
--- a/src/net_server.c
+++ b/src/net_server.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: net_server.c 689 2006-10-06 17:06:05Z fraggle $
+// $Id: net_server.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -215,7 +215,7 @@
 
     // Latest acknowledged by the client
 
-    int acknowledged;
+    unsigned int acknowledged;
 
     // Observer: receives data but does not participate in the game.
 
@@ -254,8 +254,8 @@
 static net_client_t clients[MAXNETNODES];
 static net_client_t *sv_players[MAXPLAYERS];
 static net_context_t *server_context;
-static int sv_gamemode;
-static int sv_gamemission;
+static unsigned int sv_gamemode;
+static unsigned int sv_gamemission;
 static net_gamesettings_t sv_settings;
 
 // receive window
@@ -399,9 +399,9 @@
 // Find the latest tic which has been acknowledged as received by
 // all clients.
 
-static int NET_SV_LatestAcknowledged(void)
+static unsigned int NET_SV_LatestAcknowledged(void)
 {
-    int lowtic = -1;
+    unsigned int lowtic = UINT_MAX;
     int i;
 
     for (i=0; i<MAXNETNODES; ++i) 
@@ -408,7 +408,7 @@
     {
         if (ClientConnected(&clients[i]))
         {
-            if (lowtic < 0 || clients[i].acknowledged < lowtic)
+            if (clients[i].acknowledged < lowtic)
             {
                 lowtic = clients[i].acknowledged;
             }
@@ -424,16 +424,16 @@
 
 static void NET_SV_AdvanceWindow(void)
 {
-    int lowtic;
+    unsigned int lowtic;
     int i;
 
-    lowtic = NET_SV_LatestAcknowledged();
-
-    if (lowtic < 0)
+    if (NET_SV_NumPlayers() <= 0)
     {
         return;
     }
 
+    lowtic = NET_SV_LatestAcknowledged();
+
     // Advance the recv window until it catches up with lowtic
 
     while (recvwindow_start < lowtic)
@@ -1077,10 +1077,11 @@
     }
 }
 
-static void NET_SV_SendTics(net_client_t *client, int start, int end)
+static void NET_SV_SendTics(net_client_t *client, 
+                            unsigned int start, unsigned int end)
 {
     net_packet_t *packet;
-    int i;
+    unsigned int i;
 
     packet = NET_NewPacket(500);
 
--- a/src/p_enemy.c
+++ b/src/p_enemy.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: p_enemy.c 223 2005-10-24 18:50:39Z fraggle $
+// $Id: p_enemy.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -44,7 +44,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: p_enemy.c 223 2005-10-24 18:50:39Z fraggle $";
+rcsid[] = "$Id: p_enemy.c 694 2006-10-11 22:55:06Z fraggle $";
 
 #include <stdlib.h>
 
@@ -420,7 +420,7 @@
 	&& d[2] != DI_NODIR)
     {
 	actor->movedir = diags[((deltay<0)<<1)+(deltax>0)];
-	if (actor->movedir != turnaround && P_TryWalk(actor))
+	if (actor->movedir != (int) turnaround && P_TryWalk(actor))
 	    return;
     }
 
@@ -473,7 +473,7 @@
 	      tdir<=DI_SOUTHEAST;
 	      tdir++ )
 	{
-	    if (tdir!=turnaround)
+	    if (tdir != (int) turnaround)
 	    {
 		actor->movedir =tdir;
 		
@@ -488,9 +488,9 @@
 	      tdir != (DI_EAST-1);
 	      tdir-- )
 	{
-	    if (tdir!=turnaround)
+	    if (tdir != (int) turnaround)
 	    {
-		actor->movedir =tdir;
+		actor->movedir = tdir;
 		
 		if ( P_TryWalk(actor) )
 		    return;
--- a/src/p_pspr.c
+++ b/src/p_pspr.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: p_pspr.c 206 2005-10-17 20:27:05Z fraggle $
+// $Id: p_pspr.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -40,7 +40,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: p_pspr.c 206 2005-10-17 20:27:05Z fraggle $";
+rcsid[] = "$Id: p_pspr.c 694 2006-10-11 22:55:06Z fraggle $";
 
 #include "doomdef.h"
 #include "d_event.h"
@@ -542,7 +542,7 @@
 			     linetarget->x, linetarget->y);
     if (angle - player->mo->angle > ANG180)
     {
-	if (angle - player->mo->angle < -ANG90/20)
+	if ((signed int) (angle - player->mo->angle) < -ANG90/20)
 	    player->mo->angle = angle + ANG90/21;
 	else
 	    player->mo->angle -= ANG90/20;
--- a/src/p_spec.c
+++ b/src/p_spec.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: p_spec.c 653 2006-09-22 20:32:00Z fraggle $
+// $Id: p_spec.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -45,7 +45,7 @@
 //-----------------------------------------------------------------------------
 
 static const char
-rcsid[] = "$Id: p_spec.c 653 2006-09-22 20:32:00Z fraggle $";
+rcsid[] = "$Id: p_spec.c 694 2006-10-11 22:55:06Z fraggle $";
 
 #include <stdlib.h>
 
@@ -92,7 +92,7 @@
 //
 typedef struct
 {
-    boolean	istexture;	// if false, it is a flat
+    int 	istexture;	// if false, it is a flat
     char	endname[9];
     char	startname[9];
     int		speed;
--- a/src/r_plane.c
+++ b/src/r_plane.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: r_plane.c 8 2005-07-23 16:44:57Z fraggle $
+// $Id: r_plane.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -38,7 +38,7 @@
 
 
 static const char
-rcsid[] = "$Id: r_plane.c 8 2005-07-23 16:44:57Z fraggle $";
+rcsid[] = "$Id: r_plane.c 694 2006-10-11 22:55:06Z fraggle $";
 
 #include <stdlib.h>
 
@@ -143,9 +143,9 @@
 	
 #ifdef RANGECHECK
     if (x2 < x1
-	|| x1<0
-	|| x2>=viewwidth
-	|| (unsigned)y>viewheight)
+     || x1 < 0
+     || x2 >= viewwidth
+     || y > viewheight)
     {
 	I_Error ("R_MapPlane: %i, %i at %i",x1,x2,y);
     }
--- a/src/r_things.c
+++ b/src/r_things.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: r_things.c 177 2005-10-08 21:02:55Z fraggle $
+// $Id: r_things.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -48,7 +48,7 @@
 
 
 static const char
-rcsid[] = "$Id: r_things.c 177 2005-10-08 21:02:55Z fraggle $";
+rcsid[] = "$Id: r_things.c 694 2006-10-11 22:55:06Z fraggle $";
 
 
 #include <stdio.h>
@@ -528,7 +528,7 @@
     
     // decide which patch to use for sprite relative to player
 #ifdef RANGECHECK
-    if ((unsigned)thing->sprite >= numsprites)
+    if (thing->sprite >= (unsigned int) numsprites)
 	I_Error ("R_ProjectSprite: invalid sprite number %i ",
 		 thing->sprite);
 #endif
@@ -681,7 +681,7 @@
     
     // decide which patch to use
 #ifdef RANGECHECK
-    if ( (unsigned)psp->state->sprite >= numsprites)
+    if ( (unsigned)psp->state->sprite >= (unsigned int) numsprites)
 	I_Error ("R_ProjectSprite: invalid sprite number %i ",
 		 psp->state->sprite);
 #endif
--- a/src/st_lib.c
+++ b/src/st_lib.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: st_lib.c 653 2006-09-22 20:32:00Z fraggle $
+// $Id: st_lib.c 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -36,7 +36,7 @@
 
 
 static const char
-rcsid[] = "$Id: st_lib.c 653 2006-09-22 20:32:00Z fraggle $";
+rcsid[] = "$Id: st_lib.c 694 2006-10-11 22:55:06Z fraggle $";
 
 #include <ctype.h>
 
@@ -266,7 +266,7 @@
 {
     b->x	= x;
     b->y	= y;
-    b->oldval	= 0;
+    b->oldval	= false;
     b->val	= val;
     b->on	= on;
     b->p	= i;
@@ -285,7 +285,7 @@
     int			h;
 
     if (*bi->on
-	&& (bi->oldval != *bi->val || refresh))
+     && (bi->oldval != *bi->val || refresh))
     {
 	x = bi->x - SHORT(bi->p->leftoffset);
 	y = bi->y - SHORT(bi->p->topoffset);
--- a/src/st_lib.h
+++ b/src/st_lib.h
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: st_lib.h 8 2005-07-23 16:44:57Z fraggle $
+// $Id: st_lib.h 694 2006-10-11 22:55:06Z fraggle $
 //
 // Copyright(C) 1993-1996 Id Software, Inc.
 // Copyright(C) 2005 Simon Howard
@@ -129,7 +129,7 @@
     int			y;
 
     // last icon value
-    int			oldval;
+    boolean		oldval;
 
     // pointer to current icon status
     boolean*		val;