Make some more functions static which aren't used outside their

declaring source files and which have no prototype.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@731 4a71c877-e1ca-e34f-864e-861f7616d084
master
Stefan Huehner 2006-09-19 18:45:48 +00:00
parent 1b520925ec
commit 1395a7c69c
20 changed files with 41 additions and 41 deletions

View File

@ -629,7 +629,7 @@ void blockUnsuspendUsage(void)
void blockCurrentBlockInfo(void)
static void blockCurrentBlockInfo(void)
{
#ifdef DEBUG
BLOCK_HEAP *psCurHeap;

View File

@ -49,7 +49,7 @@ void registry_clear( void )
// =======================================================================================================================
// =======================================================================================================================
//
unsigned int registry_hash( const char *s )
static unsigned int registry_hash( const char *s )
{
//~~~~~~~~~~~~~~~~~~
unsigned int i;
@ -71,7 +71,7 @@ unsigned int registry_hash( const char *s )
// =======================================================================================================================
// =======================================================================================================================
//
regkey_t *registry_find_key( const char *k )
static regkey_t *registry_find_key( const char *k )
{
//~~~~~~~~~~~
regkey_t *i;
@ -92,7 +92,7 @@ regkey_t *registry_find_key( const char *k )
// =======================================================================================================================
// =======================================================================================================================
//
char *registry_get_key( const char *k )
static char *registry_get_key( const char *k )
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regkey_t *key = registry_find_key( k );
@ -118,7 +118,7 @@ char *registry_get_key( const char *k )
// =======================================================================================================================
// =======================================================================================================================
//
void registry_set_key( const char *k, const char *v )
static void registry_set_key( const char *k, const char *v )
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regkey_t *key = registry_find_key( k );
@ -150,7 +150,7 @@ void registry_set_key( const char *k, const char *v )
// =======================================================================================================================
// =======================================================================================================================
//
BOOL registry_load( const char *filename )
static BOOL registry_load( const char *filename )
{
char buffer[MAXLINESIZE];
char *bptr = NULL, *bufstart = NULL;
@ -210,7 +210,7 @@ BOOL registry_load( const char *filename )
// =======================================================================================================================
// =======================================================================================================================
//
BOOL registry_save( const char *filename )
static BOOL registry_save( const char *filename )
{
char buffer[MAXLINESIZE * REGISTRY_HASH_SIZE];
unsigned int i;

View File

@ -704,7 +704,7 @@ UINT HashStringIgnoreCase( const char *String )
//
// PosOfDot and/of PosOfSlash can be NULL and then nothing will be stored
//
void ScanFilename(const char *Fullname, int *PosOfDot, int *PosOfSlash)
static void ScanFilename(const char *Fullname, int *PosOfDot, int *PosOfSlash)
{
int Namelength;

View File

@ -303,7 +303,7 @@ static void ResetResourceFile(void)
}
// Returns an empty resource entry or -1 if none exsist
SDWORD FindEmptyResourceFile(void)
static SDWORD FindEmptyResourceFile(void)
{
UWORD i;
for (i=0;i<MAXLOADEDRESOURCES ;i++ )
@ -317,7 +317,7 @@ SDWORD FindEmptyResourceFile(void)
// Get a resource data file ... either loads it or just returns a pointer
BOOL RetreiveResourceFile(char *ResourceName, RESOURCEFILE **NewResource)
static BOOL RetreiveResourceFile(char *ResourceName, RESOURCEFILE **NewResource)
{
SDWORD ResID;
RESOURCEFILE *ResData;
@ -355,7 +355,7 @@ BOOL RetreiveResourceFile(char *ResourceName, RESOURCEFILE **NewResource)
// Free up the file depending on what type it is
void FreeResourceFile(RESOURCEFILE *OldResource)
static void FreeResourceFile(RESOURCEFILE *OldResource)
{
switch (OldResource->type)
{
@ -370,7 +370,7 @@ void FreeResourceFile(RESOURCEFILE *OldResource)
}
void resDataInit(RES_DATA* psRes, STRING *DebugName, UDWORD DataIDHash, void *pData, UDWORD BlockID)
static void resDataInit(RES_DATA* psRes, STRING *DebugName, UDWORD DataIDHash, void *pData, UDWORD BlockID)
{
psRes->pData = pData;
psRes->blockID = resBlockID;

View File

@ -509,7 +509,7 @@ void heapDestroy(OBJ_HEAP *psHeap)
}
BOOL heapIntegrityCheck(OBJ_HEAP *psHeap)
static BOOL heapIntegrityCheck(OBJ_HEAP *psHeap)
{
#if DEBUG_HEAP
FREE_OBJECT *psCurr;

View File

@ -409,7 +409,7 @@ static UDWORD MemTotalAllocated;
#endif
/* Recursive function to total up the amount of mem allocated */
void memSummary(MEM_NODE *psRoot)
static void memSummary(MEM_NODE *psRoot)
{
#ifdef DEBUG_MALLOC
@ -453,7 +453,7 @@ void memSummary(MEM_NODE *psRoot)
#endif
}
void memMemorySummary(void)
static void memMemorySummary(void)
{
memMemoryDump(psMemRoot);
}

View File

@ -23,7 +23,7 @@ extern void * g_ElementToBeRemoved;
/***************************************************************************/
UINT
static UINT
HashTest( int iKey1, int iKey2 )
{
return (UINT) iKey1 + iKey2;
@ -40,7 +40,7 @@ HashTest( int iKey1, int iKey2 )
*/
/***************************************************************************/
UINT
static UINT
HashPJW( int iKey1, int iKey2 )
{
UINT iHashValue, i;
@ -232,7 +232,7 @@ hashTable_GetElement( HASHTABLE *psTable )
/***************************************************************************/
UDWORD
static UDWORD
hashTable_GetHashKey( HASHTABLE *psTable, int iKey1, int iKey2 )
{
ASSERT( PTRVALID(psTable, sizeof(HASHTABLE)),

View File

@ -60,7 +60,7 @@ void strlwr(STRING *String)
#endif
BOOL AtEndOfFile(STRING *CurPos, STRING *EndOfFile)
static BOOL AtEndOfFile(STRING *CurPos, STRING *EndOfFile)
{
while ((*CurPos==0x09)||(*CurPos==0x0a)||(*CurPos==0x0d)||(*CurPos==0x20)||(*CurPos==0x00))
{
@ -147,7 +147,7 @@ static UDWORD IMDPoints = 0;
static UDWORD IMDTexAnims = 0;
static UDWORD IMDConnectors = 0;
void DumpIMDInfo(void)
static void DumpIMDInfo(void)
{
debug( LOG_NEVER, "imds loaded =%d - using %d bytes\n", IMDcount, IMDcount*sizeof(iIMDShape) );
debug( LOG_NEVER, "polys loaded =%d - using %d bytes\n", IMDPolycount, IMDPolycount*sizeof(iIMDPoly) );
@ -158,7 +158,7 @@ void DumpIMDInfo(void)
static STRING texfile[64]; //Last loaded texture page filename
char *GetLastLoadedTexturePage(void)
static char *GetLastLoadedTexturePage(void)
{
return texfile;
}
@ -661,7 +661,7 @@ static iBool _imd_load_bsp(STRING **ppFileData, STRING *FileDataEnd, iIMDShape *
#endif
BOOL ReadPoints(STRING **ppFileData, STRING *FileDataEnd, iIMDShape *s)
static BOOL ReadPoints(STRING **ppFileData, STRING *FileDataEnd, iIMDShape *s)
{
STRING *pFileData = *ppFileData;
int cnt;

View File

@ -240,7 +240,7 @@ void pie_SetAdditiveSpriteLevel(UDWORD val) {
addSpriteLevel = val;
}
BOOL pie_GetAdditiveSprites( void ) {
static BOOL pie_GetAdditiveSprites( void ) {
return bAddSprites;
}
@ -417,7 +417,7 @@ void pie_ImageDef(IMAGEDEF *Image,iBitmap *Bmp,UDWORD Modulus,int x,int y,BOOL b
pie_SetBilinear(FALSE); //changed by alex 19 oct 98
}
void pie_ImageDefTrans(IMAGEDEF *Image,iBitmap *Bmp,UDWORD Modulus,int x,int y,int TransRate)
static void pie_ImageDefTrans(IMAGEDEF *Image,iBitmap *Bmp,UDWORD Modulus,int x,int y,int TransRate)
{
pie_ImageDef(Image,Bmp,Modulus,x,y,FALSE);
}

View File

@ -32,7 +32,7 @@ extern BOOL drawing_interface;
*/
/***************************************************************************/
BOOL check_extension(const char* extension_name) {
static BOOL check_extension(const char* extension_name) {
const char *extension_list = (const char *)glGetString(GL_EXTENSIONS);
unsigned int extension_name_length = strlen(extension_name);
const char *tmp = extension_list;

View File

@ -309,7 +309,7 @@ void cpPrintVarFunc(SCRIPT_VARFUNC pFunc, UDWORD index)
/* Print the array information */
void cpPrintArrayInfo(UDWORD **pip, SCRIPT_CODE *psProg)
static void cpPrintArrayInfo(UDWORD **pip, SCRIPT_CODE *psProg)
{
SDWORD i, dimensions;//, elements[VAR_MAX_DIMENSIONS];
// SDWORD elementDWords;

View File

@ -1216,7 +1216,7 @@ void eventProcessTriggers(UDWORD currTime)
// remove a trigger from a list
void eventRemoveTriggerFromList(ACTIVE_TRIGGER **ppsList,
static void eventRemoveTriggerFromList(ACTIVE_TRIGGER **ppsList,
SCRIPT_CONTEXT *psContext,
SDWORD event, SDWORD *pTrigger)
{

View File

@ -400,7 +400,7 @@ static BOOL eventLoadContextHashed(SDWORD version, char *pBuffer, UDWORD *pSize)
}
// return the index of a context
BOOL eventGetContextIndex(SCRIPT_CONTEXT *psContext, SDWORD *pIndex)
static BOOL eventGetContextIndex(SCRIPT_CONTEXT *psContext, SDWORD *pIndex)
{
SCRIPT_CONTEXT *psCurr;
SDWORD index;
@ -420,7 +420,7 @@ BOOL eventGetContextIndex(SCRIPT_CONTEXT *psContext, SDWORD *pIndex)
}
// find a context from it's id number
BOOL eventFindContext(SDWORD id, SCRIPT_CONTEXT **ppsContext)
static BOOL eventFindContext(SDWORD id, SCRIPT_CONTEXT **ppsContext)
{
SCRIPT_CONTEXT *psCurr;
@ -437,7 +437,7 @@ BOOL eventFindContext(SDWORD id, SCRIPT_CONTEXT **ppsContext)
}
// save a list of triggers
BOOL eventSaveTriggerList(ACTIVE_TRIGGER *psList, char *pBuffer, UDWORD *pSize)
static BOOL eventSaveTriggerList(ACTIVE_TRIGGER *psList, char *pBuffer, UDWORD *pSize)
{
ACTIVE_TRIGGER *psCurr;
UDWORD size;

View File

@ -156,7 +156,7 @@ BOOL interpProcessorActive(void)
}
/* Find the value store for a global variable */
__inline INTERP_VAL *interpGetVarData(VAL_CHUNK *psGlobals, UDWORD index)
static __inline INTERP_VAL *interpGetVarData(VAL_CHUNK *psGlobals, UDWORD index)
{
VAL_CHUNK *psChunk;
@ -172,7 +172,7 @@ __inline INTERP_VAL *interpGetVarData(VAL_CHUNK *psGlobals, UDWORD index)
// get the array data for an array operation
BOOL interpGetArrayVarData(UDWORD **pip, VAL_CHUNK *psGlobals, SCRIPT_CODE *psProg, INTERP_VAL **ppsVal)
static BOOL interpGetArrayVarData(UDWORD **pip, VAL_CHUNK *psGlobals, SCRIPT_CODE *psProg, INTERP_VAL **ppsVal)
{
SDWORD i, dimensions, vals[VAR_MAX_DIMENSIONS];
UBYTE *elements; //[VAR_MAX_DIMENSIONS]

View File

@ -20,7 +20,7 @@ unsigned int dec130_decode(RPL* rpl, char* in, unsigned int in_size, char* out);
char* data_buffer = NULL;
unsigned int data_buffer_size = 0;
void resize_data_buffer(unsigned int size) {
static void resize_data_buffer(unsigned int size) {
if (size > data_buffer_size) {
if (data_buffer != NULL) {
free(data_buffer);

View File

@ -39,7 +39,7 @@ BOOL seq_sound = FALSE;
ALuint seq_buffer;
ALuint seq_source;
void seq_start_sound(RPL* s) {
static void seq_start_sound(RPL* s) {
unsigned int buffer_size = rpl_decode_sound(s, sound_buffer, SOUND_BUFFER_SIZE);
if (buffer_size != 0) {

View File

@ -345,7 +345,7 @@ static BOOL audio_CheckSameQueueTracksPlaying( SDWORD iTrack )
// =======================================================================================================================
// =======================================================================================================================
//
AUDIO_SAMPLE *audio_QueueSample( SDWORD iTrack )
static AUDIO_SAMPLE *audio_QueueSample( SDWORD iTrack )
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AUDIO_SAMPLE *psSample = NULL;
@ -502,7 +502,7 @@ void audio_QueueTrackPos( SDWORD iTrack, SDWORD iX, SDWORD iY, SDWORD iZ )
// =======================================================================================================================
// =======================================================================================================================
//
void audio_UpdateQueue( void )
static void audio_UpdateQueue( void )
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AUDIO_SAMPLE *psSample = NULL;

View File

@ -61,7 +61,7 @@ BOOL openal_initialized = FALSE;
BOOL cdAudio_Update( void );
static void PrintOpenALVersion()
static void PrintOpenALVersion(void)
{
debug(LOG_ERROR, "OpenAL Vendor: %s\n"
"OpenAL Version: %s\n"
@ -429,7 +429,7 @@ int sound_GetMaxVolume( void )
// =======================================================================================================================
// =======================================================================================================================
//
void sound_AddActiveSample( AUDIO_SAMPLE *psSample )
static void sound_AddActiveSample( AUDIO_SAMPLE *psSample )
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SAMPLE_LIST *tmp = (SAMPLE_LIST *) malloc( sizeof(SAMPLE_LIST) );

View File

@ -36,7 +36,7 @@ static AUDIO_CALLBACK g_pStopTrackCallback = NULL;
// =======================================================================================================================
// =======================================================================================================================
//
BOOL sound_CheckDevice( void )
static BOOL sound_CheckDevice( void )
{
//
// * // Bah, not needed! --Qamly. #ifdef WIN32MM WAVEOUTCAPS waveCaps;
@ -210,7 +210,7 @@ BOOL sound_SetTrackVals
// =======================================================================================================================
// =======================================================================================================================
//
BOOL sound_AddTrack( TRACK *pTrack )
static BOOL sound_AddTrack( TRACK *pTrack )
{
// add to sound array
if ( g_iCurTracks < MAX_TRACKS )

View File

@ -655,7 +655,7 @@ BOOL widgAddSlider(W_SCREEN *psScreen, W_SLDINIT *psInit)
/* Delete a widget from a form */
BOOL widgDeleteFromForm(W_FORM *psForm, UDWORD id, W_CONTEXT *psContext)
static BOOL widgDeleteFromForm(W_FORM *psForm, UDWORD id, W_CONTEXT *psContext)
{
WIDGET *psPrev = NULL, *psCurr, *psNext;
W_TABFORM *psTabForm;