shithub: choc

Download patch

ref: 4bf764a5b8952856b1ca04f1282121e8054938de
parent: cfbdd3d79d1e3cc48165536cb7b4166b94f77e9b
author: Simon Howard <fraggle@gmail.com>
date: Sat Oct 29 18:58:13 EDT 2011

Enable gcc warning to detect redundant declarations, and clean up
instances of this within the code (thanks Edward-san).

Subversion-branch: /branches/v2-branch
Subversion-revision: 2468

--- a/Makefile.am
+++ b/Makefile.am
@@ -54,8 +54,6 @@
 
 MAINTAINERCLEANFILES =  $(AUX_DIST_GEN)
 
-docdir=$(prefix)/share/doc/@PACKAGE@
-
 SUBDIRS=wince textscreen opl pcsound data src man
 
 DIST_SUBDIRS=pkg $(SUBDIRS)
--- a/configure.in
+++ b/configure.in
@@ -27,7 +27,7 @@
 
 if test "$GCC" = "yes"
 then
-        WARNINGS="-Wall -Wdeclaration-after-statement"
+        WARNINGS="-Wall -Wdeclaration-after-statement -Wredundant-decls"
         CFLAGS="-O$OPT_LEVEL -g $WARNINGS $orig_CFLAGS"
 fi
 
--- a/src/doom/am_map.c
+++ b/src/doom/am_map.c
@@ -274,15 +274,6 @@
 
 static boolean stopped = true;
 
-extern boolean viewactive;
-
-void
-V_MarkRect
-( int	x,
-  int	y,
-  int	width,
-  int	height );
-
 // Calculates the slope and slope according to the x-axis of a line
 // segment in map coordinates (with the upright y-axis n' all) so
 // that it can be used with the brain-dead drawing stuff.
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -134,7 +134,6 @@
 
 
 void D_CheckNetGame (void);
-void D_DoAdvanceDemo (void);
 
 
 //
@@ -411,8 +410,6 @@
 //
 //  D_DoomLoop
 //
-extern  boolean         demorecording;
-
 void D_DoomLoop (void)
 {
     if (demorecording)
--- a/src/doom/d_net.c
+++ b/src/doom/d_net.c
@@ -250,8 +250,6 @@
 // D_CheckNetGame
 // Works out player numbers among the net participants
 //
-extern	int			viewangleoffset;
-
 void D_CheckNetGame (void)
 {
     net_connect_data_t connect_data;
--- a/src/doom/doomstat.h
+++ b/src/doom/doomstat.h
@@ -155,11 +155,6 @@
 
 extern  boolean		nodrawers;
 
-extern	int		viewwindowx;
-extern	int		viewwindowy;
-extern	int		viewheight;
-extern	int		viewwidth;
-extern	int		scaledviewwidth;
 
 extern  boolean         testcontrols;
 extern  int             testcontrols_mousespeed;
@@ -247,9 +242,6 @@
 extern  wbstartstruct_t		wminfo;	
 
 
-// LUT of ammunition limits for each kind.
-// This doubles with BackPack powerup item.
-extern  int		maxammo[NUMAMMO];
 
 
 
--- a/src/doom/f_finale.c
+++ b/src/doom/f_finale.c
@@ -345,9 +345,6 @@
 //
 // F_StartCast
 //
-extern	gamestate_t     wipegamestate;
-
-
 void F_StartCast (void)
 {
     wipegamestate = -1;		// force a screen wipe
--- a/src/doom/f_wipe.c
+++ b/src/doom/f_wipe.c
@@ -276,8 +276,6 @@
 	wipe_initMelt, wipe_doMelt, wipe_exitMelt
     };
 
-    void V_MarkRect(int, int, int, int);
-
     // initial stuff
     if (!go)
     {
--- a/src/doom/g_game.c
+++ b/src/doom/g_game.c
@@ -83,17 +83,14 @@
 
 #define SAVEGAMESIZE	0x2c000
 
-boolean	G_CheckDemoStatus (void); 
 void	G_ReadDemoTiccmd (ticcmd_t* cmd); 
 void	G_WriteDemoTiccmd (ticcmd_t* cmd); 
 void	G_PlayerReborn (int player); 
-void	G_InitNew (skill_t skill, int episode, int map); 
  
 void	G_DoReborn (int playernum); 
  
 void	G_DoLoadLevel (void); 
 void	G_DoNewGame (void); 
-void	G_DoLoadGame (void); 
 void	G_DoPlayDemo (void); 
 void	G_DoCompleted (void); 
 void	G_DoVictory (void); 
@@ -599,8 +596,6 @@
 //
 // G_DoLoadLevel 
 //
-extern  gamestate_t     wipegamestate; 
- 
 void G_DoLoadLevel (void) 
 { 
     int             i; 
@@ -1617,9 +1612,6 @@
     G_InitNew (d_skill, d_episode, d_map); 
     gameaction = ga_nothing; 
 } 
-
-// The sky texture to be used instead of the F_SKY1 dummy.
-extern  int	skytexture; 
 
 
 void
--- a/src/doom/hu_stuff.c
+++ b/src/doom/hu_stuff.c
@@ -108,7 +108,6 @@
 static int		message_counter;
 
 extern int		showMessages;
-extern boolean		automapactive;
 
 static boolean		headsupactive = false;
 
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -66,8 +66,6 @@
 #include "m_menu.h"
 
 
-extern void M_QuitDOOM(int);
-
 extern patch_t*		hu_font[HU_FONTSIZE];
 extern boolean		message_dontfuckwithme;
 
@@ -226,7 +224,6 @@
 void M_WriteText(int x, int y, char *string);
 int  M_StringWidth(char *string);
 int  M_StringHeight(char *string);
-void M_StartControlPanel(void);
 void M_StartMessage(char *string,void *routine,boolean input);
 void M_StopMessage(void);
 void M_ClearMenus (void);
--- a/src/doom/r_draw.c
+++ b/src/doom/r_draw.c
@@ -946,13 +946,6 @@
 // Draws the border around the view
 //  for different size windows?
 //
-void
-V_MarkRect
-( int		x,
-  int		y,
-  int		width,
-  int		height ); 
- 
 void R_DrawViewBorder (void) 
 { 
     int		top;
--- a/src/doom/r_main.h
+++ b/src/doom/r_main.h
@@ -40,8 +40,6 @@
 extern fixed_t		viewcos;
 extern fixed_t		viewsin;
 
-extern int		viewwidth;
-extern int		viewheight;
 extern int		viewwindowx;
 extern int		viewwindowy;
 
--- a/src/doom/st_stuff.h
+++ b/src/doom/st_stuff.h
@@ -80,7 +80,6 @@
 } st_chatstateenum_t;
 
 
-boolean ST_Responder(event_t* ev);
 
 extern byte *st_backing_screen;
 extern cheatseq_t cheat_mus;
--- a/src/heretic/ct_chat.c
+++ b/src/heretic/ct_chat.c
@@ -51,11 +51,6 @@
 
 // Public data
 
-void CT_Init(void);
-void CT_Drawer(void);
-boolean CT_Responder(event_t * ev);
-void CT_Ticker(void);
-char CT_dequeueChatChar(void);
 
 boolean chatmodeon;
 
--- a/src/heretic/d_main.c
+++ b/src/heretic/d_main.c
@@ -91,7 +91,6 @@
 void D_CheckNetGame(void);
 void D_PageDrawer(void);
 void D_AdvanceDemo(void);
-void F_Drawer(void);
 boolean F_Responder(event_t * ev);
 
 //---------------------------------------------------------------------------
@@ -152,7 +151,6 @@
 
 void D_Display(void)
 {
-    extern boolean MenuActive;
     extern boolean askforquit;
 
     // Change the view size if needed
@@ -307,8 +305,6 @@
 =
 ================
 */
-
-extern boolean MenuActive;
 
 void D_PageDrawer(void)
 {
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -533,7 +533,6 @@
 
 extern boolean DebugSound;      // debug flag for displaying sound info
 
-extern int maxammo[NUMAMMO];
 extern int GetWeaponAmmo[NUMWEAPONS];
 
 extern boolean demorecording;
@@ -561,12 +560,6 @@
 extern mapthing_t deathmatchstarts[10];
 extern mapthing_t playerstarts[MAXPLAYERS];
 
-extern int viewwindowx;
-extern int viewwindowy;
-extern int viewwidth;
-extern int scaledviewwidth;
-extern int viewheight;
-
 extern int mouseSensitivity;
 
 extern boolean precache;        // if true, load all graphics at level load
@@ -611,27 +604,9 @@
 // calls all ?_Responder, ?_Ticker, and ?_Drawer functions
 // calls I_GetTime, I_StartFrame, and I_StartTic
 
-void NetUpdate(void);
-// create any new ticcmds and broadcast to other players
-
-void D_QuitNetGame(void);
-// broadcasts special packets to other players to notify of game exit
-
-void TryRunTics(void);
-
 //---------
 //SYSTEM IO
 //---------
-
-byte *I_ZoneBase(int *size);
-// called by startup code to get the ammount of memory to malloc
-// for the zone management
-
-// asyncronous interrupt functions should maintain private ques that are
-// read by the syncronous functions to be converted into events
-
-// Copy buffer to video
-
 byte *I_AllocLow(int length);
 // allocates from low memory under dos, just mallocs under unix
 
@@ -823,7 +798,6 @@
 // STATUS BAR (SB_bar.c)
 //----------------------
 
-extern int SB_state;
 void SB_Init(void);
 boolean SB_Responder(event_t * event);
 void SB_Ticker(void);
--- a/src/heretic/f_finale.c
+++ b/src/heretic/f_finale.c
@@ -305,7 +305,6 @@
 void F_DrawUnderwater(void)
 {
     static boolean underwawa;
-    extern boolean MenuActive;
     extern boolean askforquit;
 
     switch (finalestage)
--- a/src/heretic/g_game.c
+++ b/src/heretic/g_game.c
@@ -52,13 +52,11 @@
 void G_ReadDemoTiccmd(ticcmd_t * cmd);
 void G_WriteDemoTiccmd(ticcmd_t * cmd);
 void G_PlayerReborn(int player);
-void G_InitNew(skill_t skill, int episode, int map);
 
 void G_DoReborn(int playernum);
 
 void G_DoLoadLevel(void);
 void G_DoNewGame(void);
-void G_DoLoadGame(void);
 void G_DoPlayDemo(void);
 void G_DoCompleted(void);
 void G_DoVictory(void);
@@ -708,7 +706,6 @@
 boolean G_Responder(event_t * ev)
 {
     player_t *plr;
-    extern boolean MenuActive;
 
     plr = &players[consoleplayer];
     if (ev->type == ev_keyup && ev->data1 == key_useartifact)
@@ -1071,8 +1068,6 @@
 = Can when a player completes a level
 ====================
 */
-extern int curpos;
-extern int inv_ptr;
 extern int playerkeys;
 
 void G_PlayerFinishLevel(int player)
@@ -1507,8 +1502,6 @@
     G_InitNew(d_skill, d_episode, d_map);
     gameaction = ga_nothing;
 }
-
-extern int skytexture;
 
 void G_InitNew(skill_t skill, int episode, int map)
 {
--- a/src/heretic/in_lude.c
+++ b/src/heretic/in_lude.c
@@ -31,6 +31,7 @@
 
 #include "doomdef.h"
 #include "deh_str.h"
+#include "p_local.h"
 #include "s_sound.h"
 #include "i_system.h"
 #include "i_video.h"
@@ -45,9 +46,6 @@
 
 // Public functions
 
-void IN_Start(void);
-void IN_Ticker(void);
-void IN_Drawer(void);
 
 boolean intermission;
 
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -123,7 +123,6 @@
 
 // External Data
 
-extern int usegamma;
 extern int detailLevel;
 extern int screenblocks;
 
--- a/src/heretic/p_user.c
+++ b/src/heretic/p_user.c
@@ -313,12 +313,12 @@
 */
 
 #define         ANG5    (ANG90/18)
+extern int inv_ptr;
+extern int curpos;
 
 void P_DeathThink(player_t * player)
 {
     angle_t angle, delta;
-    extern int inv_ptr;
-    extern int curpos;
     int lookDelta;
 
     P_MovePsprites(player);
@@ -543,8 +543,6 @@
     ticcmd_t *cmd;
     weapontype_t newweapon;
 
-    extern boolean ultimatemsg;
-
     // No-clip cheat
     if (player->cheats & CF_NOCLIP)
     {
@@ -812,9 +810,6 @@
 
 void P_PlayerNextArtifact(player_t * player)
 {
-    extern int inv_ptr;
-    extern int curpos;
-
     if (player == &players[consoleplayer])
     {
         inv_ptr--;
@@ -851,9 +846,6 @@
 void P_PlayerRemoveArtifact(player_t * player, int slot)
 {
     int i;
-    extern int inv_ptr;
-    extern int curpos;
-
     player->artifactCount--;
     if (!(--player->inventory[slot].count))
     {                           // Used last of a type - compact the artifact list
--- a/src/heretic/r_local.h
+++ b/src/heretic/r_local.h
@@ -281,6 +281,7 @@
 // R_main.c
 //
 extern int viewwidth, viewheight, viewwindowx, viewwindowy;
+extern int scaledviewwidth;
 extern int centerx, centery;
 extern int flyheight;
 extern fixed_t centerxfrac;
@@ -391,7 +392,6 @@
 extern fixed_t *spriteoffset;
 extern fixed_t *spritetopoffset;
 extern lighttable_t *colormaps;
-extern int viewwidth, scaledviewwidth, viewheight;
 extern int firstflat;
 extern int numflats;
 
--- a/src/heretic/r_things.c
+++ b/src/heretic/r_things.c
@@ -30,9 +30,6 @@
 #include "i_system.h"
 #include "r_local.h"
 
-void R_DrawColumn(void);
-void R_DrawTLColumn(void);
-
 typedef struct
 {
     int x1, x2;
--- a/src/heretic/sb_bar.c
+++ b/src/heretic/sb_bar.c
@@ -1138,8 +1138,6 @@
 
 static void CheatKeysFunc(player_t * player, Cheat_t * cheat)
 {
-    extern int playerkeys;
-
     player->keys[key_yellow] = true;
     player->keys[key_green] = true;
     player->keys[key_blue] = true;
--- a/src/hexen/ct_chat.c
+++ b/src/hexen/ct_chat.c
@@ -56,11 +56,6 @@
 
 // Public data
 
-void CT_Init(void);
-void CT_Drawer(void);
-boolean CT_Responder(event_t * ev);
-void CT_Ticker(void);
-char CT_dequeueChatChar(void);
 
 boolean chatmodeon;
 
--- a/src/hexen/g_game.c
+++ b/src/hexen/g_game.c
@@ -48,7 +48,6 @@
 boolean G_CheckDemoStatus(void);
 void G_ReadDemoTiccmd(ticcmd_t * cmd);
 void G_WriteDemoTiccmd(ticcmd_t * cmd);
-void G_InitNew(skill_t skill, int episode, int map);
 
 void G_DoReborn(int playernum);
 
@@ -55,7 +54,6 @@
 void G_DoLoadLevel(void);
 void G_DoInitNew(void);
 void G_DoNewGame(void);
-void G_DoLoadGame(void);
 void G_DoPlayDemo(void);
 void G_DoTeleportNewMap(void);
 void G_DoCompleted(void);
@@ -194,9 +192,6 @@
 */
 
 extern boolean inventory;
-extern int curpos;
-extern int inv_ptr;
-
 boolean usearti = true;
 
 void G_BuildTiccmd(ticcmd_t *cmd, int maketic)
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -77,7 +77,6 @@
 
 void R_ExecuteSetViewSize(void);
 void D_CheckNetGame(void);
-void F_Drawer(void);
 boolean F_Responder(event_t * ev);
 void I_StartupKeyboard(void);
 void I_StartupJoystick(void);
@@ -111,7 +110,6 @@
 extern boolean automapactive;
 extern boolean MenuActive;
 extern boolean askforquit;
-extern char *SavePath;
 
 // PUBLIC DATA DEFINITIONS -------------------------------------------------
 
--- a/src/hexen/h2def.h
+++ b/src/hexen/h2def.h
@@ -655,8 +655,6 @@
 
 extern ticcmd_t *netcmds;
 
-extern int rndindex;
-
 #define MAXDEATHMATCHSTARTS 16
 extern mapthing_t *deathmatch_p;
 extern mapthing_t deathmatchstarts[MAXDEATHMATCHSTARTS];
@@ -667,12 +665,6 @@
 #define MAX_PLAYER_STARTS 8
 extern mapthing_t playerstarts[MAX_PLAYER_STARTS][MAXPLAYERS];
 
-extern int viewwindowx;
-extern int viewwindowy;
-extern int viewwidth;
-extern int scaledviewwidth;
-extern int viewheight;
-
 extern int mouseSensitivity;
 
 extern boolean precache;        // if true, load all graphics at level load
@@ -717,14 +709,6 @@
 // calls all ?_Responder, ?_Ticker, and ?_Drawer functions
 // calls I_GetTime, I_StartFrame, and I_StartTic
 
-void NetUpdate(void);
-// create any new ticcmds and broadcast to other players
-
-void D_QuitNetGame(void);
-// broadcasts special packets to other players to notify of game exit
-
-void TryRunTics(void);
-
 //---------
 //SYSTEM IO
 //---------
@@ -731,8 +715,6 @@
 byte *I_AllocLow(int length);
 // allocates from low memory under dos, just mallocs under unix
 
-void I_Tactile(int on, int off, int total);
-
 // haleyjd: was WATCOMC, again preserved for historical interest as in Heretic
 #if 0
 extern boolean useexterndriver;
@@ -1055,7 +1037,6 @@
 
 extern int inv_ptr;
 extern int curpos;
-extern int SB_state;
 void SB_Init(void);
 void SB_SetClassData(void);
 boolean SB_Responder(event_t * event);
--- a/src/hexen/in_lude.c
+++ b/src/hexen/in_lude.c
@@ -22,12 +22,13 @@
 //
 //-----------------------------------------------------------------------------
 
+#include <ctype.h>
 
 #include "h2def.h"
 #include "s_sound.h"
 #include "i_system.h"
 #include "i_video.h"
-#include <ctype.h>
+#include "p_local.h"
 #include "v_video.h"
 
 // MACROS ------------------------------------------------------------------
@@ -47,10 +48,6 @@
 // EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
 
 // PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
-
-void IN_Start(void);
-void IN_Ticker(void);
-void IN_Drawer(void);
 
 // PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
 
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -129,8 +129,6 @@
 // EXTERNAL DATA DECLARATIONS ----------------------------------------------
 
 extern int detailLevel;
-extern char *SavePath;
-extern int key_speed, key_strafe;
 extern boolean gamekeydown[256];        // The NUMKEYS macro is local to g_game
 
 // PUBLIC DATA DEFINITIONS -------------------------------------------------
@@ -1012,8 +1010,6 @@
 
 static void SCSkill(int option)
 {
-    extern int SB_state;
-
     PlayerClass[consoleplayer] = MenuPClass;
     G_DeferredNewGame(option);
     SB_SetClassData();
--- a/src/hexen/p_anim.c
+++ b/src/hexen/p_anim.c
@@ -78,7 +78,6 @@
 
 extern fixed_t Sky1ColumnOffset;
 extern fixed_t Sky2ColumnOffset;
-extern int Sky1Texture;
 extern boolean DoubleSky;
 
 // PUBLIC DATA DEFINITIONS -------------------------------------------------
--- a/src/hexen/p_user.c
+++ b/src/hexen/p_user.c
@@ -330,8 +330,6 @@
     int dir;
     angle_t delta;
     int lookDelta;
-    extern int inv_ptr;
-    extern int curpos;
 
     P_MovePsprites(player);
 
@@ -1336,9 +1334,6 @@
 
 void P_PlayerNextArtifact(player_t * player)
 {
-    extern int inv_ptr;
-    extern int curpos;
-
     if (player == &players[consoleplayer])
     {
         inv_ptr--;
@@ -1375,8 +1370,6 @@
 void P_PlayerRemoveArtifact(player_t * player, int slot)
 {
     int i;
-    extern int inv_ptr;
-    extern int curpos;
 
     player->artifactCount--;
     if (!(--player->inventory[slot].count))
--- a/src/hexen/po_man.c
+++ b/src/hexen/po_man.c
@@ -40,10 +40,6 @@
 
 // EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
 
-boolean PO_MovePolyobj(int num, int x, int y);
-boolean PO_RotatePolyobj(int num, angle_t angle);
-void PO_Init(int lump);
-
 // PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
 
 static polyobj_t *GetPolyobj(int polyNum);
@@ -61,8 +57,6 @@
 static void TranslateToStartSpot(int tag, int originX, int originY);
 
 // EXTERNAL DATA DECLARATIONS ----------------------------------------------
-
-extern seg_t *segs;
 
 // PUBLIC DATA DEFINITIONS -------------------------------------------------
 
--- a/src/hexen/r_local.h
+++ b/src/hexen/r_local.h
@@ -336,6 +336,7 @@
 //
 extern int screenblocks;
 extern int viewwidth, viewheight, viewwindowx, viewwindowy;
+extern int scaledviewwidth;
 extern int centerx, centery;
 extern int flyheight;
 extern fixed_t centerxfrac;
@@ -456,7 +457,6 @@
 extern fixed_t *spriteoffset;
 extern fixed_t *spritetopoffset;
 extern lighttable_t *colormaps;
-extern int viewwidth, scaledviewwidth, viewheight;
 extern int firstflat;
 extern int numflats;
 
--- a/src/hexen/r_things.c
+++ b/src/hexen/r_things.c
@@ -30,9 +30,6 @@
 #include "i_swap.h"
 #include "r_local.h"
 
-void R_DrawColumn(void);
-void R_DrawTLColumn(void);
-void R_DrawAltTLColumn(void);
 //void R_DrawTranslatedAltTLColumn(void);
 
 typedef struct
--- a/src/hexen/s_sound.c
+++ b/src/hexen/s_sound.c
@@ -77,9 +77,6 @@
 int snd_MusicVolume = 10;              // maximum volume for music
 int snd_Channels = 16;
 
-extern int startepisode;
-extern int startmap;
-
 // int AmbChan;
 
 //==========================================================================
--- a/src/hexen/sb_bar.c
+++ b/src/hexen/sb_bar.c
@@ -48,8 +48,6 @@
 
 // PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
 
-void SB_PaletteFlash(boolean forceChange);
-
 // PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
 
 static void DrawSoundInfo(void);
@@ -83,7 +81,6 @@
 static void CheatQuickenFunc3(player_t * player, Cheat_t * cheat);
 static void CheatClassFunc1(player_t * player, Cheat_t * cheat);
 static void CheatClassFunc2(player_t * player, Cheat_t * cheat);
-static void CheatInitFunc(player_t * player, Cheat_t * cheat);
 static void CheatInitFunc(player_t * player, Cheat_t * cheat);
 static void CheatVersionFunc(player_t * player, Cheat_t * cheat);
 static void CheatDebugFunc(player_t * player, Cheat_t * cheat);
--- a/src/hexen/st_start.h
+++ b/src/hexen/st_start.h
@@ -22,6 +22,8 @@
 //
 //-----------------------------------------------------------------------------
 
+#ifndef STSTART_H
+#define STSTART_H
 
 // HEADER FILES ------------------------------------------------------------
 
@@ -42,3 +44,4 @@
  
 extern int graphical_startup;
 
+#endif
--- a/src/hexen/sv_save.c
+++ b/src/hexen/sv_save.c
@@ -145,10 +145,6 @@
 
 // EXTERNAL DATA DECLARATIONS ----------------------------------------------
 
-extern int ACScriptCount;
-extern byte *ActionCodeBase;
-extern acsInfo_t *ACSInfo;
-
 // PUBLIC DATA DEFINITIONS -------------------------------------------------
 
 #define DEFAULT_SAVEPATH                "hexndata/"
--- a/src/i_system.h
+++ b/src/i_system.h
@@ -62,14 +62,7 @@
 
 void I_Error (char *error, ...);
 
-// Allocates from low memory under dos,
-// just mallocs under unix
-byte* I_AllocLow (int length);
-
 void I_Tactile (int on, int off, int total);
-
-
-void I_Error (char *error, ...);
 
 boolean I_GetMemoryValue(unsigned int offset, void *value, int size);
 
--- a/src/m_controls.h
+++ b/src/m_controls.h
@@ -93,19 +93,6 @@
 extern int key_map_mark;
 extern int key_map_clearmark;
 
-extern int key_map_north;
-extern int key_map_south;
-extern int key_map_east;
-extern int key_map_west;
-extern int key_map_zoomin;
-extern int key_map_zoomout;
-extern int key_map_toggle;
-extern int key_map_maxzoom;
-extern int key_map_follow;
-extern int key_map_grid;
-extern int key_map_mark;
-extern int key_map_clearmark;
-
 // menu keys:
 
 extern int key_menu_activate;
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -28,7 +28,6 @@
 #include "textscreen.h"
 #include "m_config.h"
 
-#include "i_sound.h"
 #include "mode.h"
 #include "sound.h"
 
--- a/src/setup/sound.h
+++ b/src/setup/sound.h
@@ -22,9 +22,9 @@
 #ifndef SETUP_SOUND_H
 #define SETUP_SOUND_H
 
+#include "i_sound.h"
+
 void ConfigSound(void);
 void BindSoundVariables(void);
-
-extern int snd_musicdevice;
 
 #endif /* #ifndef SETUP_SOUND_H */
--- a/src/strife/am_map.c
+++ b/src/strife/am_map.c
@@ -251,14 +251,6 @@
 
 static boolean stopped = true;
 
-extern boolean viewactive;
-
-void
-V_MarkRect
-( int	x,
-  int	y,
-  int	width,
-  int	height );
 
 // Calculates the slope and slope according to the x-axis of a line
 // segment in map coordinates (with the upright y-axis n' all) so
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -165,8 +165,6 @@
 static char *nickname = NULL;
 
 void D_CheckNetGame (void);
-void D_ProcessEvents (void);
-void D_DoAdvanceDemo (void);
 
 
 //
@@ -490,8 +488,6 @@
 //
 //  haleyjd 08/23/10: [STRIFE] Verified unmodified.
 //
-extern  boolean         demorecording;
-
 void D_DoomLoop (void)
 {
     if (demorecording)
--- a/src/strife/d_net.c
+++ b/src/strife/d_net.c
@@ -253,8 +253,6 @@
 // D_CheckNetGame
 // Works out player numbers among the net participants
 //
-extern	int			viewangleoffset;
-
 void D_CheckNetGame (void)
 {
     net_connect_data_t connect_data;
--- a/src/strife/doomstat.h
+++ b/src/strife/doomstat.h
@@ -151,12 +151,6 @@
 
 extern  boolean		nodrawers;
 
-extern	int		viewwindowx;
-extern	int		viewwindowy;
-extern	int		viewheight;
-extern	int		viewwidth;
-extern	int		scaledviewwidth;
-
 extern  boolean         testcontrols;
 extern  int             testcontrols_mousespeed;
 
@@ -246,10 +240,6 @@
 // Parameters for world map / intermission.
 extern  wbstartstruct_t		wminfo;	
 
-
-// LUT of ammunition limits for each kind.
-// This doubles with BackPack powerup item.
-extern  int		maxammo[NUMAMMO];
 
 
 
--- a/src/strife/f_finale.c
+++ b/src/strife/f_finale.c
@@ -608,8 +608,6 @@
 int		castonmelee;
 boolean		castattacking;
 
-extern	gamestate_t     wipegamestate;
-
 //
 // F_StartCast
 //
--- a/src/strife/f_wipe.c
+++ b/src/strife/f_wipe.c
@@ -271,8 +271,6 @@
 	wipe_initMelt, wipe_doMelt, wipe_exitMelt
     };
 
-    void V_MarkRect(int, int, int, int);
-
     // initial stuff
     if (!go)
     {
--- a/src/strife/g_game.c
+++ b/src/strife/g_game.c
@@ -77,17 +77,14 @@
 
 #define SAVEGAMESIZE	0x2c000
 
-boolean	G_CheckDemoStatus (void); 
 void	G_ReadDemoTiccmd (ticcmd_t* cmd); 
 void	G_WriteDemoTiccmd (ticcmd_t* cmd); 
 void	G_PlayerReborn (int player); 
-void	G_InitNew (skill_t skill, int map); 
  
 void	G_DoReborn (int playernum); 
  
 void	G_DoLoadLevel (void); 
 void	G_DoNewGame (void); 
-void	G_DoLoadGame (boolean userload); 
 void	G_DoPlayDemo (void); 
 void	G_DoCompleted (void); 
 void	G_DoVictory (void); 
@@ -669,8 +666,6 @@
 //
 // G_DoLoadLevel 
 //
-extern  gamestate_t     wipegamestate; 
- 
 void G_DoLoadLevel (void) 
 { 
     int             i; 
@@ -1920,9 +1915,6 @@
     G_InitNew (d_skill, d_map);
     gameaction = ga_nothing; 
 } 
-
-// The sky texture to be used instead of the F_SKY1 dummy.
-extern  int	skytexture; 
 
 //
 // G_InitNew
--- a/src/strife/hu_stuff.c
+++ b/src/strife/hu_stuff.c
@@ -118,7 +118,6 @@
 static int              message_counter;
 
 //extern int              showMessages; [STRIFE] no such variable
-extern boolean          automapactive;
 
 static boolean          headsupactive = false;
 
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -174,7 +174,6 @@
 void M_ReadThis(int choice);
 void M_ReadThis2(int choice);
 void M_ReadThis3(int choice); // [STRIFE]
-void M_QuitStrife(int choice);
 
 //void M_ChangeMessages(int choice); [STRIFE]
 void M_ChangeSensitivity(int choice);
@@ -186,7 +185,6 @@
 void M_Sound(int choice);
 
 //void M_FinishReadThis(int choice); - [STRIFE] unused
-void M_LoadSelect(int choice);
 void M_SaveSelect(int choice);
 void M_ReadSaveStrings(void);
 void M_QuickSave(void);
@@ -210,10 +208,8 @@
 void M_DrawSelCell(menu_t *menu,int item);
 int  M_StringWidth(char *string);
 int  M_StringHeight(char *string);
-void M_StartControlPanel(void);
 void M_StartMessage(char *string,void *routine,boolean input);
 void M_StopMessage(void);
-void M_ClearMenus (int choice);
 
 
 
--- a/src/strife/p_user.c
+++ b/src/strife/p_user.c
@@ -52,7 +52,6 @@
 #define LOOKDOWNMAX             -110                    // villsa [STRIFE]
 
 
-boolean P_UseInventoryItem(player_t* player, int item); // fraggle [STRIFE]
 void P_DropInventoryItem(player_t* player, int sprite); // villsa [STRIFE]
 boolean P_ItemBehavior(player_t* player, int item);     // villsa [STRIFE]
 static char useinventorymsg[44];    // villsa [STRIFE]
--- a/src/strife/r_draw.c
+++ b/src/strife/r_draw.c
@@ -433,10 +433,6 @@
 }
 
 
-// haleyjd 08/26/10: [STRIFE] - Rogue's translucency lookup table
-// This is functionally equivalent to Raven's TINTTAB and BOOM's TRANMAPs.
-extern byte *xlatab;
-
 //
 // R_InitTranslationTables
 // Creates the translation tables to map
@@ -943,13 +939,6 @@
 // Draws the border around the view
 //  for different size windows?
 //
-void
-V_MarkRect
-( int		x,
-  int		y,
-  int		width,
-  int		height ); 
- 
 void R_DrawViewBorder (void) 
 { 
     int		top;
--- a/src/strife/r_main.h
+++ b/src/strife/r_main.h
@@ -40,8 +40,6 @@
 extern fixed_t		viewcos;
 extern fixed_t		viewsin;
 
-extern int		viewwidth;
-extern int		viewheight;
 extern int		viewwindowx;
 extern int		viewwindowy;
 
--- a/src/strife/st_stuff.h
+++ b/src/strife/st_stuff.h
@@ -85,7 +85,6 @@
 } st_chatstateenum_t;
 
 
-boolean ST_Responder(event_t* ev);
 
 extern byte *st_backing_screen;