From 5c2a891c43ef713beede5c9c6a861f2ed0efed6a Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Mon, 29 Nov 2004 18:00:10 +0000 Subject: [PATCH] Made some functions and variables static. --- dlls/avifil32/api.c | 4 ++-- dlls/avifil32/icmstream.c | 2 +- dlls/commdlg/printdlg.c | 8 +++---- dlls/wininet/internet.c | 44 +++++++++++++++++------------------ dlls/winmm/playsound.c | 4 ++-- dlls/winmm/winealsa/audio.c | 6 ++--- dlls/winmm/winealsa/midi.c | 2 +- dlls/winmm/winearts/audio.c | 12 +++++----- dlls/winmm/winenas/audio.c | 13 ++++++----- programs/clock/main.c | 2 +- programs/control/control.c | 2 +- programs/taskmgr/dbgchnl.c | 2 +- programs/view/view.c | 2 +- programs/wcmd/builtins.c | 8 +++---- programs/wineconsole/curses.c | 4 ++-- programs/wineconsole/user.c | 4 ++-- programs/winepath/winepath.c | 4 ++-- 17 files changed, 61 insertions(+), 62 deletions(-) diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c index c08ed5fc43b..7200e131e9e 100644 --- a/dlls/avifil32/api.c +++ b/dlls/avifil32/api.c @@ -1379,8 +1379,8 @@ static void AVISaveOptionsUpdate(HWND hWnd) } -INT_PTR CALLBACK AVISaveOptionsDlgProc(HWND hWnd, UINT uMsg, - WPARAM wParam, LPARAM lParam) +static INT_PTR CALLBACK AVISaveOptionsDlgProc(HWND hWnd, UINT uMsg, + WPARAM wParam, LPARAM lParam) { DWORD dwInterleave; BOOL bIsInterleaved; diff --git a/dlls/avifil32/icmstream.c b/dlls/avifil32/icmstream.c index 37cd62f55ee..7091f13e23e 100644 --- a/dlls/avifil32/icmstream.c +++ b/dlls/avifil32/icmstream.c @@ -111,7 +111,7 @@ static HRESULT AVIFILE_EncodeFrame(IAVIStreamImpl *This, LPBITMAPINFOHEADER lpbi, LPVOID lpBits); static HRESULT AVIFILE_OpenGetFrame(IAVIStreamImpl *This); -inline void AVIFILE_Reset(IAVIStreamImpl *This) +static inline void AVIFILE_Reset(IAVIStreamImpl *This) { This->lCurrent = -1; This->lLastKey = 0; diff --git a/dlls/commdlg/printdlg.c b/dlls/commdlg/printdlg.c index 5a5955b2faa..2554d887b05 100644 --- a/dlls/commdlg/printdlg.c +++ b/dlls/commdlg/printdlg.c @@ -1746,8 +1746,8 @@ static LRESULT PRINTDLG_WMCommandW(HWND hDlg, WPARAM wParam, /*********************************************************************** * PrintDlgProcA [internal] */ -INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, - LPARAM lParam) +static INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, + LPARAM lParam) { PRINT_PTRA* PrintStructures; INT_PTR res = FALSE; @@ -1790,8 +1790,8 @@ INT_PTR CALLBACK PrintDlgProcA(HWND hDlg, UINT uMsg, WPARAM wParam, return res; } -INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, - LPARAM lParam) +static INT_PTR CALLBACK PrintDlgProcW(HWND hDlg, UINT uMsg, WPARAM wParam, + LPARAM lParam) { static const WCHAR propW[] = {'_','_','W','I','N','E','_','P','R','I','N','T','D','L','G','D','A','T','A',0}; PRINT_PTRW* PrintStructures; diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 1a7120afc8e..40a759f75c0 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -90,17 +90,17 @@ HINTERNET WINAPI INTERNET_InternetOpenUrlW(LPWININETAPPINFOW hIC, LPCWSTR lpszUr LPCWSTR lpszHeaders, DWORD dwHeadersLength, DWORD dwFlags, DWORD dwContext); static VOID INTERNET_ExecuteWork(); -DWORD g_dwTlsErrIndex = TLS_OUT_OF_INDEXES; -DWORD dwNumThreads; -DWORD dwNumIdleThreads; -DWORD dwNumJobs; -HANDLE hEventArray[2]; +static DWORD g_dwTlsErrIndex = TLS_OUT_OF_INDEXES; +static DWORD dwNumThreads; +static DWORD dwNumIdleThreads; +static DWORD dwNumJobs; +static HANDLE hEventArray[2]; #define hQuitEvent hEventArray[0] #define hWorkEvent hEventArray[1] -CRITICAL_SECTION csQueue; -LPWORKREQUEST lpHeadWorkQueue; -LPWORKREQUEST lpWorkQueueTail; -HMODULE WININET_hModule; +static CRITICAL_SECTION csQueue; +static LPWORKREQUEST lpHeadWorkQueue; +static LPWORKREQUEST lpWorkQueueTail; +static HMODULE WININET_hModule; extern void URLCacheContainers_CreateDefaults(); extern void URLCacheContainers_DeleteAll(); @@ -1036,10 +1036,9 @@ BOOL WINAPI InternetCloseHandle(HINTERNET hInternet) * Helper function for InternetCrackUrlW * */ -void ConvertUrlComponentValue(LPSTR* lppszComponent, LPDWORD dwComponentLen, - LPWSTR lpwszComponent, DWORD dwwComponentLen, - LPCSTR lpszStart, - LPCWSTR lpwszStart) +static void ConvertUrlComponentValue(LPSTR* lppszComponent, LPDWORD dwComponentLen, + LPWSTR lpwszComponent, DWORD dwwComponentLen, + LPCSTR lpszStart, LPCWSTR lpwszStart) { if (*dwComponentLen != 0) { @@ -1104,6 +1103,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, HeapFree(GetProcessHeap(), 0, lpwszUrl); return FALSE; } + ConvertUrlComponentValue(&lpUrlComponents->lpszHostName, &lpUrlComponents->dwHostNameLength, UCW.lpszHostName, UCW.dwHostNameLength, lpszUrl, lpwszUrl); @@ -1241,7 +1241,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, if(dwUrlLength==0) dwUrlLength=strlenW(lpszUrl); - TRACE("\n"); + TRACE("(%s %lu %lx %p)\n", debugstr_w(lpszUrl), dwUrlLength, dwFlags, lpUC); /* Determine if the URI is absolute. */ while (*lpszap != '\0') @@ -1771,7 +1771,7 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d else { memcpy(lpBuffer, &type, sizeof(ULONG)); - *lpdwBufferLength = sizeof(ULONG); + *lpdwBufferLength = sizeof(ULONG); bSuccess = TRUE; } break; @@ -1786,7 +1786,7 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d else { memcpy(lpBuffer, &flags, sizeof(ULONG)); - *lpdwBufferLength = sizeof(ULONG); + *lpdwBufferLength = sizeof(ULONG); bSuccess = TRUE; } break; @@ -2391,7 +2391,7 @@ void INTERNET_SetLastError(DWORD dwError) * RETURNS * */ -DWORD INTERNET_GetLastError() +DWORD INTERNET_GetLastError(void) { LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); return lpwite->dwError; @@ -2406,7 +2406,7 @@ DWORD INTERNET_GetLastError() * RETURNS * */ -DWORD INTERNET_WorkerThreadFunc(LPVOID *lpvParam) +static DWORD INTERNET_WorkerThreadFunc(LPVOID *lpvParam) { DWORD dwWaitRes; @@ -2441,7 +2441,7 @@ DWORD INTERNET_WorkerThreadFunc(LPVOID *lpvParam) * RETURNS * */ -BOOL INTERNET_InsertWorkRequest(LPWORKREQUEST lpWorkRequest) +static BOOL INTERNET_InsertWorkRequest(LPWORKREQUEST lpWorkRequest) { BOOL bSuccess = FALSE; LPWORKREQUEST lpNewRequest; @@ -2481,7 +2481,7 @@ BOOL INTERNET_InsertWorkRequest(LPWORKREQUEST lpWorkRequest) * RETURNS * */ -BOOL INTERNET_GetWorkRequest(LPWORKREQUEST lpWorkRequest) +static BOOL INTERNET_GetWorkRequest(LPWORKREQUEST lpWorkRequest) { BOOL bSuccess = FALSE; LPWORKREQUEST lpRequest = NULL; @@ -2560,7 +2560,7 @@ lerror: * RETURNS * */ -static VOID INTERNET_ExecuteWork() +static VOID INTERNET_ExecuteWork(void) { WORKREQUEST workRequest; @@ -2786,7 +2786,7 @@ static VOID INTERNET_ExecuteWork() * RETURNS * */ -LPSTR INTERNET_GetResponseBuffer() +LPSTR INTERNET_GetResponseBuffer(void) { LPWITHREADERROR lpwite = (LPWITHREADERROR)TlsGetValue(g_dwTlsErrIndex); TRACE("\n"); diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index 09e332aa7a4..2b973661967 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c @@ -72,7 +72,7 @@ static HMMIO get_mmioFromProfile(UINT uFlags, LPCWSTR lpszName) static const WCHAR wszNull[] = {0}; TRACE("searching in SystemSound list for %s\n", debugstr_w(lpszName)); - GetProfileStringW(wszSounds, (LPWSTR)lpszName, wszNull, str, sizeof(str)/sizeof(str[0])); + GetProfileStringW(wszSounds, lpszName, wszNull, str, sizeof(str)/sizeof(str[0])); if (lstrlenW(str) == 0) { if (uFlags & SND_NODEFAULT) goto next; @@ -420,7 +420,7 @@ errCleanUp: return bRet; } -BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSound, BOOL bUnicode) +static BOOL MULTIMEDIA_PlaySound(const void* pszSound, HMODULE hmod, DWORD fdwSound, BOOL bUnicode) { WINE_PLAYSOUND* wps = NULL; diff --git a/dlls/winmm/winealsa/audio.c b/dlls/winmm/winealsa/audio.c index 5e409232cde..bdb2be1a975 100644 --- a/dlls/winmm/winealsa/audio.c +++ b/dlls/winmm/winealsa/audio.c @@ -627,8 +627,6 @@ if (err<0) { \ if (!sw) return; - - } /* return a string duplicated on the win32 process heap, free with HeapFree */ @@ -644,7 +642,7 @@ static char* ALSA_strdup(char *s) { * Returns either "default" or reads the registry so the user can * override the playback/record device used. */ -char *ALSA_GetDeviceFromReg(char *value) +static char *ALSA_GetDeviceFromReg(char *value) { DWORD res; DWORD type; @@ -1323,7 +1321,7 @@ static DWORD wodPlayer_NotifyCompletions(WINE_WAVEOUT* wwo, BOOL force) } -void wait_for_poll(snd_pcm_t *handle, struct pollfd *ufds, unsigned int count) +static void wait_for_poll(snd_pcm_t *handle, struct pollfd *ufds, unsigned int count) { unsigned short revents; diff --git a/dlls/winmm/winealsa/midi.c b/dlls/winmm/winealsa/midi.c index e7f00638176..addb3cf8a11 100644 --- a/dlls/winmm/winealsa/midi.c +++ b/dlls/winmm/winealsa/midi.c @@ -1084,7 +1084,7 @@ static DWORD modReset(WORD wDevID) * * Helper for ALSA_MidiInit */ -void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t* pinfo, int cap, int type) +static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t* pinfo, int cap, int type) { if (cap & SND_SEQ_PORT_CAP_WRITE) { TRACE("OUT (%d:%s:%s:%d:%s:%x)\n",snd_seq_client_info_get_client(cinfo), diff --git a/dlls/winmm/winearts/audio.c b/dlls/winmm/winearts/audio.c index 7bbb7bbdef8..eece0bf555c 100644 --- a/dlls/winmm/winearts/audio.c +++ b/dlls/winmm/winearts/audio.c @@ -276,8 +276,8 @@ static DWORD bytes_to_mmtime(LPMMTIME lpTime, DWORD position, /* Volume functions derived from Alsaplayer source */ /* length is the number of 16 bit samples */ -void volume_effect16(void *bufin, void* bufout, int length, int left, - int right, int nChannels) +static void volume_effect16(void *bufin, void* bufout, int length, int left, + int right, int nChannels) { short *d_out = (short *)bufout; short *d_in = (short *)bufin; @@ -302,8 +302,8 @@ void volume_effect16(void *bufin, void* bufout, int length, int left, } /* length is the number of 8 bit samples */ -void volume_effect8(void *bufin, void* bufout, int length, int left, - int right, int nChannels) +static void volume_effect8(void *bufin, void* bufout, int length, int left, + int right, int nChannels) { BYTE *d_out = (BYTE *)bufout; BYTE *d_in = (BYTE *)bufin; @@ -331,7 +331,7 @@ void volume_effect8(void *bufin, void* bufout, int length, int left, * ARTS_CloseWaveOutDevice * */ -void ARTS_CloseWaveOutDevice(WINE_WAVEOUT* wwo) +static void ARTS_CloseWaveOutDevice(WINE_WAVEOUT* wwo) { arts_close_stream(wwo->play_stream); /* close the arts stream */ wwo->play_stream = (arts_stream_t*)-1; @@ -350,7 +350,7 @@ void ARTS_CloseWaveOutDevice(WINE_WAVEOUT* wwo) * ARTS_CloseWaveInDevice * */ -void ARTS_CloseWaveInDevice(WINE_WAVEIN* wwi) +static void ARTS_CloseWaveInDevice(WINE_WAVEIN* wwi) { arts_close_stream(wwi->record_stream); /* close the arts stream */ wwi->record_stream = (arts_stream_t*)-1; diff --git a/dlls/winmm/winenas/audio.c b/dlls/winmm/winenas/audio.c index 3204a0a3aec..52264113f95 100644 --- a/dlls/winmm/winenas/audio.c +++ b/dlls/winmm/winenas/audio.c @@ -330,11 +330,11 @@ static DWORD bytes_to_mmtime(LPMMTIME lpTime, DWORD position, /*======================================================================* * Low level WAVE implementation * *======================================================================*/ - +#if 0 /* Volume functions derived from Alsaplayer source */ /* length is the number of 16 bit samples */ -void volume_effect16(void *bufin, void* bufout, int length, int left, - int right, int nChannels) +static void volume_effect16(void *bufin, void* bufout, int length, int left, + int right, int nChannels) { short *d_out = (short *)bufout; short *d_in = (short *)bufin; @@ -359,8 +359,8 @@ void volume_effect16(void *bufin, void* bufout, int length, int left, } /* length is the number of 8 bit samples */ -void volume_effect8(void *bufin, void* bufout, int length, int left, - int right, int nChannels) +static void volume_effect8(void *bufin, void* bufout, int length, int left, + int right, int nChannels) { char *d_out = (char *)bufout; char *d_in = (char *)bufin; @@ -383,12 +383,13 @@ void volume_effect8(void *bufin, void* bufout, int length, int left, } } } +#endif /****************************************************************** * NAS_CloseDevice * */ -void NAS_CloseDevice(WINE_WAVEOUT* wwo) +static void NAS_CloseDevice(WINE_WAVEOUT* wwo) { TRACE("NAS_CloseDevice\n"); nas_close(wwo); diff --git a/programs/clock/main.c b/programs/clock/main.c index cafe03c2771..754c1e9e062 100644 --- a/programs/clock/main.c +++ b/programs/clock/main.c @@ -320,7 +320,7 @@ static VOID CLOCK_Paint(HWND hWnd) * CLOCK_WndProc */ -LRESULT WINAPI CLOCK_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) +static LRESULT WINAPI CLOCK_WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { /* L button drag moves the window */ diff --git a/programs/control/control.c b/programs/control/control.c index e877db461d9..15a7bc43dfc 100644 --- a/programs/control/control.c +++ b/programs/control/control.c @@ -24,7 +24,7 @@ #include "params.h" extern void WINAPI Control_RunDLL(HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow); -void launch(const char *what) +static void launch(const char *what) { Control_RunDLL(GetDesktopWindow(), 0, what, SW_SHOW); exit(0); diff --git a/programs/taskmgr/dbgchnl.c b/programs/taskmgr/dbgchnl.c index fa168087b3f..aa44859043d 100644 --- a/programs/taskmgr/dbgchnl.c +++ b/programs/taskmgr/dbgchnl.c @@ -157,7 +157,7 @@ static int change_channel_CB(HANDLE hProcess, void* addr, char* buffer, void* pm return 1; } -void* get_symbol(HANDLE hProcess, char* name, char* lib) +static void* get_symbol(HANDLE hProcess, char* name, char* lib) { char buffer[sizeof(IMAGEHLP_SYMBOL) + 256]; SYMBOL_INFO* si = (SYMBOL_INFO*)buffer; diff --git a/programs/view/view.c b/programs/view/view.c index 5d35036dedd..138acec4135 100644 --- a/programs/view/view.c +++ b/programs/view/view.c @@ -31,7 +31,7 @@ int deltax = 0, deltay = 0; int width = 0, height = 0; BOOL isAldus; -BOOL FileOpen(HWND hWnd, char *fn, int fnsz) +static BOOL FileOpen(HWND hWnd, char *fn, int fnsz) { OPENFILENAME ofn = { sizeof(OPENFILENAME), 0, 0, NULL, NULL, 0, 0, NULL, diff --git a/programs/wcmd/builtins.c b/programs/wcmd/builtins.c index a5f34e9765b..11570e974f8 100644 --- a/programs/wcmd/builtins.c +++ b/programs/wcmd/builtins.c @@ -515,7 +515,7 @@ int status; * * Make a copy of the environment. */ -WCHAR *WCMD_dupenv( const WCHAR *env ) +static WCHAR *WCMD_dupenv( const WCHAR *env ) { WCHAR *env_copy; int len; @@ -575,7 +575,7 @@ void WCMD_setlocal (const char *s) { /***************************************************************************** * WCMD_strchrW */ -inline WCHAR *WCMD_strchrW(WCHAR *str, WCHAR ch) +static inline WCHAR *WCMD_strchrW(WCHAR *str, WCHAR ch) { while(*str) { @@ -757,7 +757,7 @@ DWORD count; /**************************************************************************** * WCMD_compare */ -int WCMD_compare( const void *a, const void *b ) +static int WCMD_compare( const void *a, const void *b ) { int r; const char * const *str_a = a, * const *str_b = b; @@ -773,7 +773,7 @@ int WCMD_compare( const void *a, const void *b ) * * sort variables into order for display */ -void WCMD_setshow_sortenv(const char *s) +static void WCMD_setshow_sortenv(const char *s) { UINT count=0, len=0, i; const char **str; diff --git a/programs/wineconsole/curses.c b/programs/wineconsole/curses.c index 6c44cf45b9a..49dd97bf650 100644 --- a/programs/wineconsole/curses.c +++ b/programs/wineconsole/curses.c @@ -267,7 +267,7 @@ static void WCCURSES_PosCursor(const struct inner_data* data) * * Sets a new shape for the cursor */ -void WCCURSES_ShapeCursor(struct inner_data* data, int size, int vis, BOOL force) +static void WCCURSES_ShapeCursor(struct inner_data* data, int size, int vis, BOOL force) { /* we can't do much about the size... */ data->curcfg.cursor_size = size; @@ -280,7 +280,7 @@ void WCCURSES_ShapeCursor(struct inner_data* data, int size, int vis, BOOL force * * Recomputes all the components (mainly scroll bars) positions */ -void WCCURSES_ComputePositions(struct inner_data* data) +static void WCCURSES_ComputePositions(struct inner_data* data) { int x, y; diff --git a/programs/wineconsole/user.c b/programs/wineconsole/user.c index 0c6a71a1ab4..4b39685e3b6 100644 --- a/programs/wineconsole/user.c +++ b/programs/wineconsole/user.c @@ -202,7 +202,7 @@ static void WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL * * Recomputes all the components (mainly scroll bars) positions */ -void WCUSER_ComputePositions(struct inner_data* data) +static void WCUSER_ComputePositions(struct inner_data* data) { RECT r; int dx, dy; @@ -1299,7 +1299,7 @@ static LRESULT CALLBACK WCUSER_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM * * */ -void WCUSER_DeleteBackend(struct inner_data* data) +static void WCUSER_DeleteBackend(struct inner_data* data) { if (!PRIVATE(data)) return; if (PRIVATE(data)->hMemDC) DeleteDC(PRIVATE(data)->hMemDC); diff --git a/programs/winepath/winepath.c b/programs/winepath/winepath.c index a49f38c012b..4a6a8d407bf 100644 --- a/programs/winepath/winepath.c +++ b/programs/winepath/winepath.c @@ -40,7 +40,7 @@ typedef LPSTR (*wine_get_unix_file_name_t) ( LPCWSTR dos ); /* * handle an option */ -int option(int shortopt, char *longopt) +static int option(int shortopt, char *longopt) { const char *helpmsg = "Convert PATH(s) to Unix or Windows long or short paths.\n" @@ -83,7 +83,7 @@ int option(int shortopt, char *longopt) /* * Parse command line options */ -int parse_options(char *argv[]) +static int parse_options(char *argv[]) { int outputformats = 0; int done = 0;