diff --git a/lib/framework/block.c b/lib/framework/block.c index c497da4e4..1dc62f268 100644 --- a/lib/framework/block.c +++ b/lib/framework/block.c @@ -629,7 +629,7 @@ void blockUnsuspendUsage(void) -void blockCurrentBlockInfo(void) +static void blockCurrentBlockInfo(void) { #ifdef DEBUG BLOCK_HEAP *psCurHeap; diff --git a/lib/framework/configfile.c b/lib/framework/configfile.c index 23d927e1f..22e79ae5a 100644 --- a/lib/framework/configfile.c +++ b/lib/framework/configfile.c @@ -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; diff --git a/lib/framework/frame.c b/lib/framework/frame.c index ecd9c43bf..9918e6774 100644 --- a/lib/framework/frame.c +++ b/lib/framework/frame.c @@ -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; diff --git a/lib/framework/frameresource.c b/lib/framework/frameresource.c index 85643bb34..b61a654b5 100644 --- a/lib/framework/frameresource.c +++ b/lib/framework/frameresource.c @@ -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;itype) { @@ -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; diff --git a/lib/framework/heap.c b/lib/framework/heap.c index b7dde42ce..4268041d7 100644 --- a/lib/framework/heap.c +++ b/lib/framework/heap.c @@ -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; diff --git a/lib/framework/mem.c b/lib/framework/mem.c index 347bc191a..35d857eab 100644 --- a/lib/framework/mem.c +++ b/lib/framework/mem.c @@ -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); } diff --git a/lib/gamelib/hashtabl.c b/lib/gamelib/hashtabl.c index 5408daf51..c778ebac6 100644 --- a/lib/gamelib/hashtabl.c +++ b/lib/gamelib/hashtabl.c @@ -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)), diff --git a/lib/ivis_common/imdload.c b/lib/ivis_common/imdload.c index 12aebf14f..efa4fee9c 100644 --- a/lib/ivis_common/imdload.c +++ b/lib/ivis_common/imdload.c @@ -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; diff --git a/lib/ivis_opengl/pieblitfunc.c b/lib/ivis_opengl/pieblitfunc.c index 31897aa88..55619e981 100644 --- a/lib/ivis_opengl/pieblitfunc.c +++ b/lib/ivis_opengl/pieblitfunc.c @@ -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); } diff --git a/lib/ivis_opengl/piedraw.c b/lib/ivis_opengl/piedraw.c index c4d5907a1..57d03cc87 100644 --- a/lib/ivis_opengl/piedraw.c +++ b/lib/ivis_opengl/piedraw.c @@ -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; diff --git a/lib/script/codeprint.c b/lib/script/codeprint.c index 182a187ef..e56b9bdd1 100644 --- a/lib/script/codeprint.c +++ b/lib/script/codeprint.c @@ -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; diff --git a/lib/script/event.c b/lib/script/event.c index 9fccb9a0c..43d5750f4 100644 --- a/lib/script/event.c +++ b/lib/script/event.c @@ -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) { diff --git a/lib/script/evntsave.c b/lib/script/evntsave.c index dc0beb50d..f7a9a7a06 100644 --- a/lib/script/evntsave.c +++ b/lib/script/evntsave.c @@ -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; diff --git a/lib/script/interp.c b/lib/script/interp.c index 3b5c170eb..fad657ade 100644 --- a/lib/script/interp.c +++ b/lib/script/interp.c @@ -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] diff --git a/lib/sequence/rpl_reader.c b/lib/sequence/rpl_reader.c index 88567fe08..1ac103a28 100644 --- a/lib/sequence/rpl_reader.c +++ b/lib/sequence/rpl_reader.c @@ -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); diff --git a/lib/sequence/sequence_stub.c b/lib/sequence/sequence_stub.c index 321009d0b..dbcb3ad09 100644 --- a/lib/sequence/sequence_stub.c +++ b/lib/sequence/sequence_stub.c @@ -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) { diff --git a/lib/sound/audio.c b/lib/sound/audio.c index 27bdc0dda..c3d34dab6 100644 --- a/lib/sound/audio.c +++ b/lib/sound/audio.c @@ -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; diff --git a/lib/sound/openal_track.c b/lib/sound/openal_track.c index 463343788..eb84493a0 100644 --- a/lib/sound/openal_track.c +++ b/lib/sound/openal_track.c @@ -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) ); diff --git a/lib/sound/track.c b/lib/sound/track.c index 5faee11da..935d8c262 100644 --- a/lib/sound/track.c +++ b/lib/sound/track.c @@ -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 ) diff --git a/lib/widget/widget.c b/lib/widget/widget.c index 9c75911be..224627973 100644 --- a/lib/widget/widget.c +++ b/lib/widget/widget.c @@ -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;