Commit d73dad66 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fixes for -Wmissing-declarations and -Wwrite-strings warnings.

parent 2ea56681
...@@ -101,13 +101,14 @@ static COLORREF txtColor = RGB(0, 0, 0); /* settable if one enables CF_EFFECTS * ...@@ -101,13 +101,14 @@ static COLORREF txtColor = RGB(0, 0, 0); /* settable if one enables CF_EFFECTS *
/* Utility routines. */ /* Utility routines. */
void nyi(HWND hWnd) static void nyi(HWND hWnd)
{ {
/* "Hi there! I'm not yet implemented!" */ /* "Hi there! I'm not yet implemented!" */
MessageBox(hWnd, "Not yet implemented!", "NYI", MB_ICONEXCLAMATION | MB_OK); MessageBox(hWnd, "Not yet implemented!", "NYI", MB_ICONEXCLAMATION | MB_OK);
} }
UINT CALLBACK dummyfnHook(HWND hWnd, UINT msg, UINT wParam, UINT lParam) #if 0
static UINT CALLBACK dummyfnHook(HWND hWnd, UINT msg, UINT wParam, UINT lParam)
{ {
/* /*
* If the user specifies something that needs an awfully stupid hook function, * If the user specifies something that needs an awfully stupid hook function,
...@@ -123,6 +124,7 @@ UINT CALLBACK dummyfnHook(HWND hWnd, UINT msg, UINT wParam, UINT lParam) ...@@ -123,6 +124,7 @@ UINT CALLBACK dummyfnHook(HWND hWnd, UINT msg, UINT wParam, UINT lParam)
return 0; return 0;
} }
#endif
/* /*
* Initialization code. This code simply shoves in predefined * Initialization code. This code simply shoves in predefined
...@@ -131,7 +133,7 @@ UINT CALLBACK dummyfnHook(HWND hWnd, UINT msg, UINT wParam, UINT lParam) ...@@ -131,7 +133,7 @@ UINT CALLBACK dummyfnHook(HWND hWnd, UINT msg, UINT wParam, UINT lParam)
* if Microsoft decides to change the field ordering, I'd be screwed. * if Microsoft decides to change the field ordering, I'd be screwed.
*/ */
void mwi_Print(HWND hWnd) static void mwi_Print(HWND hWnd)
{ {
pd.lStructSize = sizeof(PRINTDLG); pd.lStructSize = sizeof(PRINTDLG);
pd.hwndOwner = hWnd; pd.hwndOwner = hWnd;
...@@ -151,7 +153,7 @@ void mwi_Print(HWND hWnd) ...@@ -151,7 +153,7 @@ void mwi_Print(HWND hWnd)
pd.hSetupTemplate = 0; pd.hSetupTemplate = 0;
} }
void mwi_Color(HWND hWnd) static void mwi_Color(HWND hWnd)
{ {
int i; int i;
...@@ -171,7 +173,7 @@ void mwi_Color(HWND hWnd) ...@@ -171,7 +173,7 @@ void mwi_Color(HWND hWnd)
cc.lpTemplateName = 0; cc.lpTemplateName = 0;
} }
void mwi_Font(HWND hWnd) static void mwi_Font(HWND hWnd)
{ {
cf.lStructSize = sizeof(CHOOSEFONT); cf.lStructSize = sizeof(CHOOSEFONT);
cf.hwndOwner = hWnd; cf.hwndOwner = hWnd;
...@@ -191,7 +193,7 @@ void mwi_Font(HWND hWnd) ...@@ -191,7 +193,7 @@ void mwi_Font(HWND hWnd)
cf_lf.lfHeight = -18; /* this can be positive or negative, but negative is usually used. */ cf_lf.lfHeight = -18; /* this can be positive or negative, but negative is usually used. */
} }
void mwi_File(HWND hWnd) static void mwi_File(HWND hWnd)
{ {
ofn.lStructSize = sizeof(OPENFILENAME); ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hWnd; ofn.hwndOwner = hWnd;
...@@ -217,7 +219,7 @@ void mwi_File(HWND hWnd) ...@@ -217,7 +219,7 @@ void mwi_File(HWND hWnd)
ofn_result[0] = '\0'; ofn_result[0] = '\0';
} }
void mwi_FindReplace(HWND hWnd) static void mwi_FindReplace(HWND hWnd)
{ {
frS.lStructSize = sizeof(FINDREPLACE); frS.lStructSize = sizeof(FINDREPLACE);
frS.hwndOwner = hWnd; frS.hwndOwner = hWnd;
...@@ -236,7 +238,7 @@ void mwi_FindReplace(HWND hWnd) ...@@ -236,7 +238,7 @@ void mwi_FindReplace(HWND hWnd)
findMessageId = RegisterWindowMessage(FINDMSGSTRING); findMessageId = RegisterWindowMessage(FINDMSGSTRING);
} }
void mwi_InitAll(HWND hWnd) static void mwi_InitAll(HWND hWnd)
{ {
mwi_Print(hWnd); mwi_Print(hWnd);
mwi_Font(hWnd); mwi_Font(hWnd);
...@@ -254,7 +256,7 @@ void mwi_InitAll(HWND hWnd) ...@@ -254,7 +256,7 @@ void mwi_InitAll(HWND hWnd)
* there might be a problem. * there might be a problem.
*/ */
void paintMainWindow(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) static void paintMainWindow(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam)
{ {
PAINTSTRUCT ps; PAINTSTRUCT ps;
RECT rect; RECT rect;
...@@ -322,7 +324,7 @@ void paintMainWindow(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) ...@@ -322,7 +324,7 @@ void paintMainWindow(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam)
* consult cderr.h to see what was returned. * consult cderr.h to see what was returned.
*/ */
void mw_checkError(HWND hWnd, BOOL explicitcancel) static void mw_checkError(HWND hWnd, BOOL explicitcancel)
{ {
DWORD errval = CommDlgExtendedError(); DWORD errval = CommDlgExtendedError();
if(errval) { if(errval) {
...@@ -343,7 +345,7 @@ void mw_checkError(HWND hWnd, BOOL explicitcancel) ...@@ -343,7 +345,7 @@ void mw_checkError(HWND hWnd, BOOL explicitcancel)
* various values specified in the dialog. * various values specified in the dialog.
*/ */
void mw_ColorSetup(HWND hWnd) static void mw_ColorSetup(HWND hWnd)
{ {
if(ChooseColor(&cc)) { if(ChooseColor(&cc)) {
RECT rect; RECT rect;
...@@ -355,7 +357,7 @@ void mw_ColorSetup(HWND hWnd) ...@@ -355,7 +357,7 @@ void mw_ColorSetup(HWND hWnd)
else mw_checkError(hWnd, FALSE); else mw_checkError(hWnd, FALSE);
} }
void mw_FontSetup(HWND hWnd) static void mw_FontSetup(HWND hWnd)
{ {
if(ChooseFont(&cf)) { if(ChooseFont(&cf)) {
RECT rect; RECT rect;
...@@ -366,7 +368,7 @@ void mw_FontSetup(HWND hWnd) ...@@ -366,7 +368,7 @@ void mw_FontSetup(HWND hWnd)
else mw_checkError(hWnd, FALSE); else mw_checkError(hWnd, FALSE);
} }
void mw_FindSetup(HWND hWnd) static void mw_FindSetup(HWND hWnd)
{ {
if(findDialogBox == 0) { if(findDialogBox == 0) {
findDialogBox = FindText(&frS); findDialogBox = FindText(&frS);
...@@ -374,7 +376,7 @@ void mw_FindSetup(HWND hWnd) ...@@ -374,7 +376,7 @@ void mw_FindSetup(HWND hWnd)
} }
} }
void mw_ReplaceSetup(HWND hWnd) static void mw_ReplaceSetup(HWND hWnd)
{ {
if(findDialogBox == 0) { if(findDialogBox == 0) {
findDialogBox = ReplaceText(&frS); findDialogBox = ReplaceText(&frS);
...@@ -382,7 +384,7 @@ void mw_ReplaceSetup(HWND hWnd) ...@@ -382,7 +384,7 @@ void mw_ReplaceSetup(HWND hWnd)
} }
} }
void mw_OpenSetup(HWND hWnd) static void mw_OpenSetup(HWND hWnd)
{ {
if(GetOpenFileName(&ofn)) { if(GetOpenFileName(&ofn)) {
RECT rect; RECT rect;
...@@ -392,7 +394,7 @@ void mw_OpenSetup(HWND hWnd) ...@@ -392,7 +394,7 @@ void mw_OpenSetup(HWND hWnd)
else mw_checkError(hWnd,FALSE); else mw_checkError(hWnd,FALSE);
} }
void mw_SaveSetup(HWND hWnd) static void mw_SaveSetup(HWND hWnd)
{ {
if(GetSaveFileName(&ofn)) { if(GetSaveFileName(&ofn)) {
RECT rect; RECT rect;
...@@ -407,12 +409,12 @@ void mw_SaveSetup(HWND hWnd) ...@@ -407,12 +409,12 @@ void mw_SaveSetup(HWND hWnd)
* exist at all, or is it merely a subdialog of Print? * exist at all, or is it merely a subdialog of Print?
*/ */
void mw_PSetupSetup(HWND hWnd) static void mw_PSetupSetup(HWND hWnd)
{ {
nyi(hWnd); nyi(hWnd);
} }
void mw_PrintSetup(HWND hWnd) static void mw_PrintSetup(HWND hWnd)
{ {
if(PrintDlg(&pd)) { if(PrintDlg(&pd)) {
/* /*
...@@ -453,7 +455,7 @@ void mw_PrintSetup(HWND hWnd) ...@@ -453,7 +455,7 @@ void mw_PrintSetup(HWND hWnd)
* In particular, we have to set things properly, and get the flags back. * In particular, we have to set things properly, and get the flags back.
*/ */
void mwcd_SetFlags(HWND hWnd, struct FlagTableEntry *table, unsigned long flags) static void mwcd_SetFlags(HWND hWnd, struct FlagTableEntry *table, unsigned long flags)
{ {
int i; int i;
...@@ -463,7 +465,7 @@ void mwcd_SetFlags(HWND hWnd, struct FlagTableEntry *table, unsigned long flags) ...@@ -463,7 +465,7 @@ void mwcd_SetFlags(HWND hWnd, struct FlagTableEntry *table, unsigned long flags)
} }
} }
unsigned long mwcd_GetFlags(HWND hWnd, struct FlagTableEntry * table) static unsigned long mwcd_GetFlags(HWND hWnd, struct FlagTableEntry * table)
{ {
int i; int i;
unsigned long l = 0; unsigned long l = 0;
...@@ -484,7 +486,7 @@ unsigned long mwcd_GetFlags(HWND hWnd, struct FlagTableEntry * table) ...@@ -484,7 +486,7 @@ unsigned long mwcd_GetFlags(HWND hWnd, struct FlagTableEntry * table)
* not the handlers. I'll fix that later; this works as of right now. * not the handlers. I'll fix that later; this works as of right now.
*/ */
BOOL mwcd_Setup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, static BOOL mwcd_Setup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
struct FlagTableEntry * table, unsigned long * flags) struct FlagTableEntry * table, unsigned long * flags)
{ {
(void) lParam; (void) lParam;
...@@ -523,7 +525,7 @@ BOOL mwcd_Setup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, ...@@ -523,7 +525,7 @@ BOOL mwcd_Setup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
} }
} }
BOOL CALLBACK mwcd_ColorSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) static BOOL CALLBACK mwcd_ColorSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
static struct FlagTableEntry flagTable[] = { static struct FlagTableEntry flagTable[] = {
{I_CC_RGBINIT, CC_RGBINIT}, {I_CC_RGBINIT, CC_RGBINIT},
...@@ -539,7 +541,7 @@ BOOL CALLBACK mwcd_ColorSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ...@@ -539,7 +541,7 @@ BOOL CALLBACK mwcd_ColorSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
return mwcd_Setup(hWnd, uMsg, wParam, lParam, flagTable, &cc.Flags); return mwcd_Setup(hWnd, uMsg, wParam, lParam, flagTable, &cc.Flags);
} }
BOOL CALLBACK mwcd_FontSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) static BOOL CALLBACK mwcd_FontSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
static struct FlagTableEntry flagTable[] = { static struct FlagTableEntry flagTable[] = {
{I_CF_APPLY, CF_APPLY}, {I_CF_APPLY, CF_APPLY},
...@@ -570,7 +572,7 @@ BOOL CALLBACK mwcd_FontSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -570,7 +572,7 @@ BOOL CALLBACK mwcd_FontSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return mwcd_Setup(hWnd, uMsg, wParam, lParam, flagTable, &cf.Flags); return mwcd_Setup(hWnd, uMsg, wParam, lParam, flagTable, &cf.Flags);
} }
BOOL CALLBACK mwcd_FindSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) static BOOL CALLBACK mwcd_FindSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
static struct FlagTableEntry flagTable[] = { static struct FlagTableEntry flagTable[] = {
...@@ -597,7 +599,7 @@ BOOL CALLBACK mwcd_FindSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -597,7 +599,7 @@ BOOL CALLBACK mwcd_FindSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return mwcd_Setup(hWnd, uMsg, wParam, lParam, flagTable, &frS.Flags); return mwcd_Setup(hWnd, uMsg, wParam, lParam, flagTable, &frS.Flags);
} }
BOOL CALLBACK mwcd_PrintSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) static BOOL CALLBACK mwcd_PrintSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
static struct FlagTableEntry flagTable[] = { static struct FlagTableEntry flagTable[] = {
{I_PD_ALLPAGES, PD_ALLPAGES}, {I_PD_ALLPAGES, PD_ALLPAGES},
...@@ -628,7 +630,7 @@ BOOL CALLBACK mwcd_PrintSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam ...@@ -628,7 +630,7 @@ BOOL CALLBACK mwcd_PrintSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam
return mwcd_Setup(hWnd, uMsg, wParam, lParam, flagTable, &pd.Flags); return mwcd_Setup(hWnd, uMsg, wParam, lParam, flagTable, &pd.Flags);
} }
BOOL CALLBACK mwcd_FileSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) static BOOL CALLBACK mwcd_FileSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
static struct FlagTableEntry flagTable[] = { static struct FlagTableEntry flagTable[] = {
{I_OFN_ALLOWMULTISELECT, OFN_ALLOWMULTISELECT}, {I_OFN_ALLOWMULTISELECT, OFN_ALLOWMULTISELECT},
...@@ -654,7 +656,7 @@ BOOL CALLBACK mwcd_FileSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -654,7 +656,7 @@ BOOL CALLBACK mwcd_FileSetup(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return mwcd_Setup(hWnd, uMsg, wParam, lParam, flagTable, &ofn.Flags); return mwcd_Setup(hWnd, uMsg, wParam, lParam, flagTable, &ofn.Flags);
} }
BOOL CALLBACK mwcd_About(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) static BOOL CALLBACK mwcd_About(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
(void) wParam; (void) wParam;
(void) lParam; (void) lParam;
...@@ -673,31 +675,31 @@ BOOL CALLBACK mwcd_About(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -673,31 +675,31 @@ BOOL CALLBACK mwcd_About(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
* the CommDlg structures initialized by the mwi_xxx() routines. * the CommDlg structures initialized by the mwi_xxx() routines.
*/ */
void mwc_ColorSetup(HWND hWnd) static void mwc_ColorSetup(HWND hWnd)
{ {
int r = DialogBox(g_hInstance, "Color_Flags_Dialog", hWnd, (DLGPROC) mwcd_ColorSetup); int r = DialogBox(g_hInstance, "Color_Flags_Dialog", hWnd, (DLGPROC) mwcd_ColorSetup);
if(r < 0) { MessageBox(hWnd, "Failure opening Color_Flags_Dialog box", "Error", MB_ICONASTERISK|MB_OK); } if(r < 0) { MessageBox(hWnd, "Failure opening Color_Flags_Dialog box", "Error", MB_ICONASTERISK|MB_OK); }
} }
void mwc_FontSetup(HWND hWnd) static void mwc_FontSetup(HWND hWnd)
{ {
int r = DialogBox(g_hInstance, "Font_Flags_Dialog", hWnd, (DLGPROC) mwcd_FontSetup); int r = DialogBox(g_hInstance, "Font_Flags_Dialog", hWnd, (DLGPROC) mwcd_FontSetup);
if(r < 0) { MessageBox(hWnd, "Failure opening Font_Flags_Dialog box", "Error", MB_ICONASTERISK|MB_OK); } if(r < 0) { MessageBox(hWnd, "Failure opening Font_Flags_Dialog box", "Error", MB_ICONASTERISK|MB_OK); }
} }
void mwc_FindReplaceSetup(HWND hWnd) static void mwc_FindReplaceSetup(HWND hWnd)
{ {
int r = DialogBox(g_hInstance, "Find_Flags_Dialog", hWnd, (DLGPROC) mwcd_FindSetup); int r = DialogBox(g_hInstance, "Find_Flags_Dialog", hWnd, (DLGPROC) mwcd_FindSetup);
if(r < 0) { MessageBox(hWnd, "Failure opening Find_Flags_Dialog box", "Error", MB_ICONASTERISK|MB_OK); } if(r < 0) { MessageBox(hWnd, "Failure opening Find_Flags_Dialog box", "Error", MB_ICONASTERISK|MB_OK); }
} }
void mwc_PrintSetup(HWND hWnd) static void mwc_PrintSetup(HWND hWnd)
{ {
int r = DialogBox(g_hInstance, "Print_Flags_Dialog", hWnd, (DLGPROC) mwcd_PrintSetup); int r = DialogBox(g_hInstance, "Print_Flags_Dialog", hWnd, (DLGPROC) mwcd_PrintSetup);
if(r < 0) { MessageBox(hWnd, "Failure opening Print_Flags_Dialog box", "Error", MB_ICONASTERISK|MB_OK); } if(r < 0) { MessageBox(hWnd, "Failure opening Print_Flags_Dialog box", "Error", MB_ICONASTERISK|MB_OK); }
} }
void mwc_FileSetup(HWND hWnd) static void mwc_FileSetup(HWND hWnd)
{ {
int r = DialogBox(g_hInstance, "File_Flags_Dialog", hWnd, (DLGPROC) mwcd_FileSetup); int r = DialogBox(g_hInstance, "File_Flags_Dialog", hWnd, (DLGPROC) mwcd_FileSetup);
if(r < 0) { MessageBox(hWnd, "Failure opening File_Flags_Dialog box", "Error", MB_ICONASTERISK|MB_OK); } if(r < 0) { MessageBox(hWnd, "Failure opening File_Flags_Dialog box", "Error", MB_ICONASTERISK|MB_OK); }
...@@ -710,7 +712,7 @@ void mwc_FileSetup(HWND hWnd) ...@@ -710,7 +712,7 @@ void mwc_FileSetup(HWND hWnd)
* dangling from Windows like a loose muffler. Sigh. * dangling from Windows like a loose muffler. Sigh.
*/ */
LRESULT CALLBACK EXPORT mainWindowDispatcher( static LRESULT CALLBACK EXPORT mainWindowDispatcher(
HWND hWnd, HWND hWnd,
UINT uMsg, UINT uMsg,
WPARAM wParam, WPARAM wParam,
...@@ -834,7 +836,7 @@ LRESULT CALLBACK EXPORT mainWindowDispatcher( ...@@ -834,7 +836,7 @@ LRESULT CALLBACK EXPORT mainWindowDispatcher(
/* Class registration. One might call this a Windowsism. */ /* Class registration. One might call this a Windowsism. */
int registerMainWindowClass(HINSTANCE hInstance) static int registerMainWindowClass(HINSTANCE hInstance)
{ {
WNDCLASS wndClass; WNDCLASS wndClass;
...@@ -862,7 +864,7 @@ int registerMainWindowClass(HINSTANCE hInstance) ...@@ -862,7 +864,7 @@ int registerMainWindowClass(HINSTANCE hInstance)
* can get messy; at least here we don't have to worry about that). * can get messy; at least here we don't have to worry about that).
*/ */
HWND createMainWindow(HINSTANCE hInstance, int show) static HWND createMainWindow(HINSTANCE hInstance, int show)
{ {
HWND hWnd; HWND hWnd;
...@@ -888,7 +890,7 @@ HWND createMainWindow(HINSTANCE hInstance, int show) ...@@ -888,7 +890,7 @@ HWND createMainWindow(HINSTANCE hInstance, int show)
return hWnd; return hWnd;
} }
int messageLoop(HINSTANCE hInstance, HWND hWnd) static int messageLoop(HINSTANCE hInstance, HWND hWnd)
{ {
MSG msg; MSG msg;
......
...@@ -46,7 +46,7 @@ struct edit_params ...@@ -46,7 +46,7 @@ struct edit_params
LONG cbData; LONG cbData;
}; };
INT vmessagebox(HWND hwnd, INT buttons, INT titleId, INT resId, va_list ap) static INT vmessagebox(HWND hwnd, INT buttons, INT titleId, INT resId, va_list ap)
{ {
TCHAR title[256]; TCHAR title[256];
TCHAR errfmt[1024]; TCHAR errfmt[1024];
...@@ -63,7 +63,7 @@ INT vmessagebox(HWND hwnd, INT buttons, INT titleId, INT resId, va_list ap) ...@@ -63,7 +63,7 @@ INT vmessagebox(HWND hwnd, INT buttons, INT titleId, INT resId, va_list ap)
return MessageBox(hwnd, errstr, title, buttons); return MessageBox(hwnd, errstr, title, buttons);
} }
INT messagebox(HWND hwnd, INT buttons, INT titleId, INT resId, ...) static INT messagebox(HWND hwnd, INT buttons, INT titleId, INT resId, ...)
{ {
va_list ap; va_list ap;
INT result; INT result;
...@@ -75,7 +75,7 @@ INT messagebox(HWND hwnd, INT buttons, INT titleId, INT resId, ...) ...@@ -75,7 +75,7 @@ INT messagebox(HWND hwnd, INT buttons, INT titleId, INT resId, ...)
return result; return result;
} }
void error(HWND hwnd, INT resId, ...) static void error(HWND hwnd, INT resId, ...)
{ {
va_list ap; va_list ap;
...@@ -101,7 +101,7 @@ static void error_code_messagebox(HWND hwnd, DWORD error_code) ...@@ -101,7 +101,7 @@ static void error_code_messagebox(HWND hwnd, DWORD error_code)
LocalFree(lpMsgBuf); LocalFree(lpMsgBuf);
} }
BOOL change_dword_base(HWND hwndDlg, BOOL toHex) static BOOL change_dword_base(HWND hwndDlg, BOOL toHex)
{ {
TCHAR buf[128]; TCHAR buf[128];
DWORD val; DWORD val;
...@@ -112,7 +112,7 @@ BOOL change_dword_base(HWND hwndDlg, BOOL toHex) ...@@ -112,7 +112,7 @@ BOOL change_dword_base(HWND hwndDlg, BOOL toHex)
return SetDlgItemText(hwndDlg, IDC_VALUE_DATA, buf); return SetDlgItemText(hwndDlg, IDC_VALUE_DATA, buf);
} }
INT_PTR CALLBACK modify_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) static INT_PTR CALLBACK modify_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
TCHAR* valueData; TCHAR* valueData;
HWND hwndValue; HWND hwndValue;
......
...@@ -61,7 +61,7 @@ static void resize_frame_rect(HWND hWnd, PRECT prect) ...@@ -61,7 +61,7 @@ static void resize_frame_rect(HWND hWnd, PRECT prect)
MoveWindow(g_pChildWnd->hWnd, prect->left, prect->top, prect->right, prect->bottom, TRUE); MoveWindow(g_pChildWnd->hWnd, prect->left, prect->top, prect->right, prect->bottom, TRUE);
} }
void resize_frame_client(HWND hWnd) static void resize_frame_client(HWND hWnd)
{ {
RECT rect; RECT rect;
...@@ -183,7 +183,7 @@ static BOOL CheckCommDlgError(HWND hWnd) ...@@ -183,7 +183,7 @@ static BOOL CheckCommDlgError(HWND hWnd)
return TRUE; return TRUE;
} }
UINT_PTR CALLBACK ImportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) static UINT_PTR CALLBACK ImportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
{ {
OPENFILENAME* pOpenFileName; OPENFILENAME* pOpenFileName;
OFNOTIFY* pOfNotify; OFNOTIFY* pOfNotify;
...@@ -319,7 +319,7 @@ static BOOL ExportRegistryFile(HWND hWnd) ...@@ -319,7 +319,7 @@ static BOOL ExportRegistryFile(HWND hWnd)
return TRUE; return TRUE;
} }
BOOL PrintRegistryHive(HWND hWnd, LPTSTR path) static BOOL PrintRegistryHive(HWND hWnd, LPCTSTR path)
{ {
#if 1 #if 1
PRINTDLG pd; PRINTDLG pd;
...@@ -384,7 +384,7 @@ BOOL PrintRegistryHive(HWND hWnd, LPTSTR path) ...@@ -384,7 +384,7 @@ BOOL PrintRegistryHive(HWND hWnd, LPTSTR path)
return TRUE; return TRUE;
} }
BOOL CopyKeyName(HWND hWnd, LPTSTR keyName) static BOOL CopyKeyName(HWND hWnd, LPCTSTR keyName)
{ {
BOOL result; BOOL result;
......
...@@ -58,7 +58,7 @@ static HKEY g_currentRootKey; ...@@ -58,7 +58,7 @@ static HKEY g_currentRootKey;
static int default_column_widths[MAX_LIST_COLUMNS] = { 200, 175, 400 }; static int default_column_widths[MAX_LIST_COLUMNS] = { 200, 175, 400 };
static int column_alignment[MAX_LIST_COLUMNS] = { LVCFMT_LEFT, LVCFMT_LEFT, LVCFMT_LEFT }; static int column_alignment[MAX_LIST_COLUMNS] = { LVCFMT_LEFT, LVCFMT_LEFT, LVCFMT_LEFT };
LPTSTR get_item_text(HWND hwndLV, int item) static LPTSTR get_item_text(HWND hwndLV, int item)
{ {
LPTSTR newStr, curStr; LPTSTR newStr, curStr;
unsigned int maxLen = 128; unsigned int maxLen = 128;
......
...@@ -66,7 +66,7 @@ TCHAR szChildClass[MAX_LOADSTRING]; ...@@ -66,7 +66,7 @@ TCHAR szChildClass[MAX_LOADSTRING];
* create and display the main program window. * create and display the main program window.
*/ */
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) static BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
{ {
WNDCLASSEX wcFrame = { WNDCLASSEX wcFrame = {
sizeof(WNDCLASSEX), sizeof(WNDCLASSEX),
...@@ -142,12 +142,12 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) ...@@ -142,12 +142,12 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
/******************************************************************************/ /******************************************************************************/
void ExitInstance(void) static void ExitInstance(void)
{ {
DestroyMenu(hMenuFrame); DestroyMenu(hMenuFrame);
} }
BOOL TranslateChildTabMessage(MSG *msg) static BOOL TranslateChildTabMessage(MSG *msg)
{ {
if (msg->message != WM_KEYDOWN) return FALSE; if (msg->message != WM_KEYDOWN) return FALSE;
if (msg->wParam != VK_TAB) return FALSE; if (msg->wParam != VK_TAB) return FALSE;
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <windows.h> #include <windows.h>
#include "regproc.h" #include "regproc.h"
static char *usage = static const char *usage =
"Usage:\n" "Usage:\n"
" regedit filename\n" " regedit filename\n"
" regedit /E filename [regpath]\n" " regedit /E filename [regpath]\n"
...@@ -68,7 +68,7 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s); ...@@ -68,7 +68,7 @@ BOOL PerformRegAction(REGEDIT_ACTION action, LPSTR s);
* chu - the switch character in upper-case. * chu - the switch character in upper-case.
* s - the command line string where s points to the switch character. * s - the command line string where s points to the switch character.
*/ */
void error_unknown_switch(char chu, char *s) static void error_unknown_switch(char chu, char *s)
{ {
if (isalpha(chu)) { if (isalpha(chu)) {
fprintf(stderr,"%s: Undefined switch /%c!\n", getAppName(), chu); fprintf(stderr,"%s: Undefined switch /%c!\n", getAppName(), chu);
......
...@@ -43,9 +43,9 @@ static HKEY currentKeyClass = 0; ...@@ -43,9 +43,9 @@ static HKEY currentKeyClass = 0;
static HKEY currentKeyHandle = 0; static HKEY currentKeyHandle = 0;
static BOOL bTheKeyIsOpen = FALSE; static BOOL bTheKeyIsOpen = FALSE;
static CHAR *app_name = "UNKNOWN"; static const CHAR *app_name = "UNKNOWN";
static CHAR *reg_class_names[] = { static const CHAR *reg_class_names[] = {
"HKEY_LOCAL_MACHINE", "HKEY_USERS", "HKEY_CLASSES_ROOT", "HKEY_LOCAL_MACHINE", "HKEY_USERS", "HKEY_CLASSES_ROOT",
"HKEY_CURRENT_CONFIG", "HKEY_CURRENT_USER", "HKEY_DYN_DATA" "HKEY_CURRENT_CONFIG", "HKEY_CURRENT_USER", "HKEY_DYN_DATA"
}; };
...@@ -343,7 +343,7 @@ LPSTR getArg( LPSTR arg) ...@@ -343,7 +343,7 @@ LPSTR getArg( LPSTR arg)
/****************************************************************************** /******************************************************************************
* Replaces escape sequences with the characters. * Replaces escape sequences with the characters.
*/ */
void REGPROC_unescape_string(LPSTR str) static void REGPROC_unescape_string(LPSTR str)
{ {
int str_idx = 0; /* current character under analysis */ int str_idx = 0; /* current character under analysis */
int val_idx = 0; /* the last character of the unescaped string */ int val_idx = 0; /* the last character of the unescaped string */
...@@ -1044,7 +1044,7 @@ void doUnregisterDLL(LPSTR stdInput) ...@@ -1044,7 +1044,7 @@ void doUnregisterDLL(LPSTR stdInput)
* Print the message for GetLastError * Print the message for GetLastError
*/ */
void REGPROC_print_error() static void REGPROC_print_error(void)
{ {
LPVOID lpMsgBuf; LPVOID lpMsgBuf;
DWORD error_code; DWORD error_code;
...@@ -1073,7 +1073,7 @@ void REGPROC_print_error() ...@@ -1073,7 +1073,7 @@ void REGPROC_print_error()
* required_len - length of the string to place to the buffer in characters. * required_len - length of the string to place to the buffer in characters.
* The length does not include the terminating null character. * The length does not include the terminating null character.
*/ */
void REGPROC_resize_char_buffer(CHAR **buffer, DWORD *len, DWORD required_len) static void REGPROC_resize_char_buffer(CHAR **buffer, DWORD *len, DWORD required_len)
{ {
required_len++; required_len++;
if (required_len > *len) { if (required_len > *len) {
...@@ -1089,7 +1089,7 @@ void REGPROC_resize_char_buffer(CHAR **buffer, DWORD *len, DWORD required_len) ...@@ -1089,7 +1089,7 @@ void REGPROC_resize_char_buffer(CHAR **buffer, DWORD *len, DWORD required_len)
/****************************************************************************** /******************************************************************************
* Prints string str to file * Prints string str to file
*/ */
void REGPROC_export_string(FILE *file, CHAR *str) static void REGPROC_export_string(FILE *file, CHAR *str)
{ {
size_t len = strlen(str); size_t len = strlen(str);
size_t i; size_t i;
...@@ -1130,7 +1130,7 @@ void REGPROC_export_string(FILE *file, CHAR *str) ...@@ -1130,7 +1130,7 @@ void REGPROC_export_string(FILE *file, CHAR *str)
* Is resized if necessary. * Is resized if necessary.
* val_size - size of the buffer for storing values in bytes. * val_size - size of the buffer for storing values in bytes.
*/ */
void export_hkey(FILE *file, HKEY key, static void export_hkey(FILE *file, HKEY key,
CHAR **reg_key_name_buf, DWORD *reg_key_name_len, CHAR **reg_key_name_buf, DWORD *reg_key_name_len,
CHAR **val_name_buf, DWORD *val_name_len, CHAR **val_name_buf, DWORD *val_name_len,
BYTE **val_buf, DWORD *val_size) BYTE **val_buf, DWORD *val_size)
...@@ -1214,7 +1214,7 @@ void export_hkey(FILE *file, HKEY key, ...@@ -1214,7 +1214,7 @@ void export_hkey(FILE *file, HKEY key,
/* falls through */ /* falls through */
case REG_BINARY: { case REG_BINARY: {
DWORD i1; DWORD i1;
CHAR *hex_prefix; const CHAR *hex_prefix;
CHAR buf[20]; CHAR buf[20];
int cur_pos; int cur_pos;
...@@ -1284,7 +1284,7 @@ void export_hkey(FILE *file, HKEY key, ...@@ -1284,7 +1284,7 @@ void export_hkey(FILE *file, HKEY key,
/****************************************************************************** /******************************************************************************
* Open file for export. * Open file for export.
*/ */
FILE *REGPROC_open_export_file(CHAR *file_name) static FILE *REGPROC_open_export_file(CHAR *file_name)
{ {
FILE *file = fopen(file_name, "w"); FILE *file = fopen(file_name, "w");
if (!file) { if (!file) {
...@@ -1405,7 +1405,7 @@ BOOL import_registry_file(LPTSTR filename) ...@@ -1405,7 +1405,7 @@ BOOL import_registry_file(LPTSTR filename)
/****************************************************************************** /******************************************************************************
* Recursive function which removes the registry key with all subkeys. * Recursive function which removes the registry key with all subkeys.
*/ */
void delete_branch(HKEY key, static void delete_branch(HKEY key,
CHAR **reg_key_name_buf, DWORD *reg_key_name_len) CHAR **reg_key_name_buf, DWORD *reg_key_name_len)
{ {
HKEY branch_key; HKEY branch_key;
...@@ -1492,12 +1492,12 @@ void delete_registry_key(CHAR *reg_key_name) ...@@ -1492,12 +1492,12 @@ void delete_registry_key(CHAR *reg_key_name)
* Sets the application name. Then application name is used in the error * Sets the application name. Then application name is used in the error
* reporting. * reporting.
*/ */
void setAppName(CHAR *name) void setAppName(const CHAR *name)
{ {
app_name = name; app_name = name;
} }
CHAR *getAppName() const CHAR *getAppName(void)
{ {
return app_name; return app_name;
} }
...@@ -40,8 +40,8 @@ BOOL export_registry_key(CHAR *file_name, CHAR *reg_key_name); ...@@ -40,8 +40,8 @@ BOOL export_registry_key(CHAR *file_name, CHAR *reg_key_name);
BOOL import_registry_file(LPTSTR filename); BOOL import_registry_file(LPTSTR filename);
void delete_registry_key(CHAR *reg_key_name); void delete_registry_key(CHAR *reg_key_name);
void setAppName(CHAR *name); void setAppName(const CHAR *name);
CHAR *getAppName(); const CHAR *getAppName();
void processRegLines(FILE *in, CommandAPI command); void processRegLines(FILE *in, CommandAPI command);
...@@ -71,3 +71,5 @@ HRESULT setValue(LPSTR val_name, LPSTR val_data); ...@@ -71,3 +71,5 @@ HRESULT setValue(LPSTR val_name, LPSTR val_data);
* api queryValue prototypes * api queryValue prototypes
*/ */
void processQueryValue(LPSTR cmdline); void processQueryValue(LPSTR cmdline);
extern BOOL ProcessCmdLine(LPSTR lpCmdLine);
...@@ -136,7 +136,7 @@ static HTREEITEM AddEntryToTree(HWND hwndTV, HTREEITEM hParent, LPTSTR label, HK ...@@ -136,7 +136,7 @@ static HTREEITEM AddEntryToTree(HWND hwndTV, HTREEITEM hParent, LPTSTR label, HK
return TreeView_InsertItem(hwndTV, &tvins); return TreeView_InsertItem(hwndTV, &tvins);
} }
BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem) static BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem)
{ {
HKEY hRoot, hKey, hSubKey; HKEY hRoot, hKey, hSubKey;
HTREEITEM childItem; HTREEITEM childItem;
......
...@@ -58,7 +58,7 @@ typedef HRESULT (*DLLINSTALL) (BOOL,LPCWSTR); ...@@ -58,7 +58,7 @@ typedef HRESULT (*DLLINSTALL) (BOOL,LPCWSTR);
int Silent = 0; int Silent = 0;
int Usage() static int Usage(void)
{ {
printf("regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname ...\n"); printf("regsvr32 [/u] [/s] [/n] [/i[:cmdline]] dllname ...\n");
printf("\t[/u] unregister server\n"); printf("\t[/u] unregister server\n");
...@@ -78,7 +78,7 @@ int Usage() ...@@ -78,7 +78,7 @@ int Usage()
* procName - name of the procedure to load from dll * procName - name of the procedure to load from dll
* pDllHanlde - output variable receives handle of the loaded dll. * pDllHanlde - output variable receives handle of the loaded dll.
*/ */
VOID *LoadProc(char* strDll, char* procName, HMODULE* DllHandle) static VOID *LoadProc(const char* strDll, const char* procName, HMODULE* DllHandle)
{ {
VOID* (*proc)(void); VOID* (*proc)(void);
...@@ -101,7 +101,7 @@ VOID *LoadProc(char* strDll, char* procName, HMODULE* DllHandle) ...@@ -101,7 +101,7 @@ VOID *LoadProc(char* strDll, char* procName, HMODULE* DllHandle)
return proc; return proc;
} }
int RegisterDll(char* strDll) static int RegisterDll(const char* strDll)
{ {
HRESULT hr; HRESULT hr;
DLLREGISTER pfRegister; DLLREGISTER pfRegister;
...@@ -125,7 +125,7 @@ int RegisterDll(char* strDll) ...@@ -125,7 +125,7 @@ int RegisterDll(char* strDll)
return 0; return 0;
} }
int UnregisterDll(char* strDll) static int UnregisterDll(char* strDll)
{ {
HRESULT hr; HRESULT hr;
DLLUNREGISTER pfUnregister; DLLUNREGISTER pfUnregister;
...@@ -148,7 +148,7 @@ int UnregisterDll(char* strDll) ...@@ -148,7 +148,7 @@ int UnregisterDll(char* strDll)
return 0; return 0;
} }
int InstallDll(BOOL install, char *strDll, WCHAR *command_line) static int InstallDll(BOOL install, char *strDll, WCHAR *command_line)
{ {
HRESULT hr; HRESULT hr;
DLLINSTALL pfInstall; DLLINSTALL pfInstall;
......
...@@ -155,12 +155,12 @@ void RPCSS_SetLazyTimeRemaining(long seconds) ...@@ -155,12 +155,12 @@ void RPCSS_SetLazyTimeRemaining(long seconds)
#undef ULARGEINT_TO_FILETIME #undef ULARGEINT_TO_FILETIME
#undef TEN_MIL #undef TEN_MIL
BOOL RPCSS_work(void) static BOOL RPCSS_work(void)
{ {
return RPCSS_NPDoWork(); return RPCSS_NPDoWork();
} }
BOOL RPCSS_Empty(void) static BOOL RPCSS_Empty(void)
{ {
BOOL rslt = TRUE; BOOL rslt = TRUE;
...@@ -177,7 +177,7 @@ BOOL RPCSS_ReadyToDie(void) ...@@ -177,7 +177,7 @@ BOOL RPCSS_ReadyToDie(void)
return ( empty && (ltr <= 0) && (stc == 0) ); return ( empty && (ltr <= 0) && (stc == 0) );
} }
BOOL RPCSS_Initialize(void) static BOOL RPCSS_Initialize(void)
{ {
WINE_TRACE("\n"); WINE_TRACE("\n");
...@@ -201,7 +201,7 @@ BOOL RPCSS_Initialize(void) ...@@ -201,7 +201,7 @@ BOOL RPCSS_Initialize(void)
/* returns false if we discover at the last moment that we /* returns false if we discover at the last moment that we
aren't ready to terminate */ aren't ready to terminate */
BOOL RPCSS_Shutdown(void) static BOOL RPCSS_Shutdown(void)
{ {
if (!RPCSS_UnBecomePipeServer()) if (!RPCSS_UnBecomePipeServer())
return FALSE; return FALSE;
...@@ -214,7 +214,7 @@ BOOL RPCSS_Shutdown(void) ...@@ -214,7 +214,7 @@ BOOL RPCSS_Shutdown(void)
return TRUE; return TRUE;
} }
void RPCSS_MainLoop(void) static void RPCSS_MainLoop(void)
{ {
BOOL did_something_new; BOOL did_something_new;
...@@ -234,7 +234,7 @@ void RPCSS_MainLoop(void) ...@@ -234,7 +234,7 @@ void RPCSS_MainLoop(void)
} }
} }
BOOL RPCSS_ProcessArgs( int argc, char **argv ) static BOOL RPCSS_ProcessArgs( int argc, char **argv )
{ {
int i; int i;
char *c,*c1; char *c,*c1;
...@@ -280,7 +280,7 @@ BOOL RPCSS_ProcessArgs( int argc, char **argv ) ...@@ -280,7 +280,7 @@ BOOL RPCSS_ProcessArgs( int argc, char **argv )
return TRUE; return TRUE;
} }
void RPCSS_Usage(void) static void RPCSS_Usage(void)
{ {
printf("\nWine RPCSS\n"); printf("\nWine RPCSS\n");
printf("\nsyntax: rpcss [-t timeout]\n\n"); printf("\nsyntax: rpcss [-t timeout]\n\n");
......
...@@ -461,8 +461,11 @@ int input_fetch_entire_line(const char* pfx, char** line, size_t* alloc, BO ...@@ -461,8 +461,11 @@ int input_fetch_entire_line(const char* pfx, char** line, size_t* alloc, BO
size_t len; size_t len;
if (arg_command) { if (arg_command) {
/* we only run one command before exiting */
const char q[] = "quit\n";
*line = arg_command; *line = arg_command;
arg_command = "quit\n"; /* we only run one command before exiting */ arg_command = HeapAlloc(GetProcessHeap(), 0, sizeof q);
lstrcpyA(arg_command, q);
return 1; return 1;
} }
......
...@@ -60,7 +60,7 @@ static struct wine_test *wine_tests; ...@@ -60,7 +60,7 @@ static struct wine_test *wine_tests;
static struct rev_info *rev_infos = NULL; static struct rev_info *rev_infos = NULL;
static const char whitespace[] = " \t\r\n"; static const char whitespace[] = " \t\r\n";
static int running_under_wine () static int running_under_wine (void)
{ {
HMODULE module = GetModuleHandleA("ntdll.dll"); HMODULE module = GetModuleHandleA("ntdll.dll");
...@@ -68,7 +68,7 @@ static int running_under_wine () ...@@ -68,7 +68,7 @@ static int running_under_wine ()
return (GetProcAddress(module, "wine_server_call") != NULL); return (GetProcAddress(module, "wine_server_call") != NULL);
} }
static int running_on_visible_desktop () static int running_on_visible_desktop (void)
{ {
HWND desktop; HWND desktop;
HMODULE huser32 = GetModuleHandle("user32.dll"); HMODULE huser32 = GetModuleHandle("user32.dll");
...@@ -92,7 +92,7 @@ static int running_on_visible_desktop () ...@@ -92,7 +92,7 @@ static int running_on_visible_desktop ()
return IsWindowVisible(desktop); return IsWindowVisible(desktop);
} }
void print_version () static void print_version (void)
{ {
OSVERSIONINFOEX ver; OSVERSIONINFOEX ver;
BOOL ext; BOOL ext;
...@@ -125,7 +125,7 @@ static inline int is_dot_dir(const char* x) ...@@ -125,7 +125,7 @@ static inline int is_dot_dir(const char* x)
return ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0)))); return ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0))));
} }
void remove_dir (const char *dir) static void remove_dir (const char *dir)
{ {
HANDLE hFind; HANDLE hFind;
WIN32_FIND_DATA wfd; WIN32_FIND_DATA wfd;
...@@ -156,7 +156,7 @@ void remove_dir (const char *dir) ...@@ -156,7 +156,7 @@ void remove_dir (const char *dir)
dir, GetLastError ()); dir, GetLastError ());
} }
const char* get_test_source_file(const char* test, const char* subtest) static const char* get_test_source_file(const char* test, const char* subtest)
{ {
static const char* special_dirs[][2] = { static const char* special_dirs[][2] = {
{ "gdi32", "gdi"}, { "kernel32", "kernel" }, { "gdi32", "gdi"}, { "kernel32", "kernel" },
...@@ -178,7 +178,7 @@ const char* get_test_source_file(const char* test, const char* subtest) ...@@ -178,7 +178,7 @@ const char* get_test_source_file(const char* test, const char* subtest)
return buffer; return buffer;
} }
const char* get_file_rev(const char* file) static const char* get_file_rev(const char* file)
{ {
const struct rev_info* rev; const struct rev_info* rev;
...@@ -189,7 +189,7 @@ const char* get_file_rev(const char* file) ...@@ -189,7 +189,7 @@ const char* get_file_rev(const char* file)
return "-"; return "-";
} }
void extract_rev_infos () static void extract_rev_infos (void)
{ {
char revinfo[256], *p; char revinfo[256], *p;
int size = 0, i; int size = 0, i;
...@@ -215,7 +215,7 @@ void extract_rev_infos () ...@@ -215,7 +215,7 @@ void extract_rev_infos ()
} }
} }
void* extract_rcdata (int id, int type, DWORD* size) static void* extract_rcdata (int id, int type, DWORD* size)
{ {
HRSRC rsrc; HRSRC rsrc;
HGLOBAL hdl; HGLOBAL hdl;
...@@ -230,7 +230,7 @@ void* extract_rcdata (int id, int type, DWORD* size) ...@@ -230,7 +230,7 @@ void* extract_rcdata (int id, int type, DWORD* size)
} }
/* Fills in the name and exename fields */ /* Fills in the name and exename fields */
void static void
extract_test (struct wine_test *test, const char *dir, int id) extract_test (struct wine_test *test, const char *dir, int id)
{ {
BYTE* code; BYTE* code;
...@@ -268,7 +268,7 @@ extract_test (struct wine_test *test, const char *dir, int id) ...@@ -268,7 +268,7 @@ extract_test (struct wine_test *test, const char *dir, int id)
Return the exit status, -2 if can't create process or the return Return the exit status, -2 if can't create process or the return
value of WaitForSingleObject. value of WaitForSingleObject.
*/ */
int static int
run_ex (char *cmd, const char *out, DWORD ms) run_ex (char *cmd, const char *out, DWORD ms)
{ {
STARTUPINFO si; STARTUPINFO si;
...@@ -345,7 +345,7 @@ run_ex (char *cmd, const char *out, DWORD ms) ...@@ -345,7 +345,7 @@ run_ex (char *cmd, const char *out, DWORD ms)
return status; return status;
} }
void static void
get_subtests (const char *tempdir, struct wine_test *test, int id) get_subtests (const char *tempdir, struct wine_test *test, int id)
{ {
char *subname, *cmd; char *subname, *cmd;
...@@ -410,7 +410,7 @@ get_subtests (const char *tempdir, struct wine_test *test, int id) ...@@ -410,7 +410,7 @@ get_subtests (const char *tempdir, struct wine_test *test, int id)
free (subname); free (subname);
} }
void static void
run_test (struct wine_test* test, const char* subtest) run_test (struct wine_test* test, const char* subtest)
{ {
int status; int status;
...@@ -424,7 +424,7 @@ run_test (struct wine_test* test, const char* subtest) ...@@ -424,7 +424,7 @@ run_test (struct wine_test* test, const char* subtest)
xprintf ("%s:%s done (%d)\n", test->name, subtest, status); xprintf ("%s:%s done (%d)\n", test->name, subtest, status);
} }
BOOL CALLBACK static BOOL CALLBACK
EnumTestFileProc (HMODULE hModule, LPCTSTR lpszType, EnumTestFileProc (HMODULE hModule, LPCTSTR lpszType,
LPTSTR lpszName, LONG_PTR lParam) LPTSTR lpszName, LONG_PTR lParam)
{ {
...@@ -432,7 +432,7 @@ EnumTestFileProc (HMODULE hModule, LPCTSTR lpszType, ...@@ -432,7 +432,7 @@ EnumTestFileProc (HMODULE hModule, LPCTSTR lpszType,
return TRUE; return TRUE;
} }
char * static char *
run_tests (char *logname) run_tests (char *logname)
{ {
int nr_of_files = 0, nr_of_tests = 0, i; int nr_of_files = 0, nr_of_tests = 0, i;
...@@ -542,8 +542,8 @@ run_tests (char *logname) ...@@ -542,8 +542,8 @@ run_tests (char *logname)
return logname; return logname;
} }
void static void
usage () usage (void)
{ {
fprintf (stderr, "\ fprintf (stderr, "\
Usage: winetest [OPTION]...\n\n\ Usage: winetest [OPTION]...\n\n\
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "winetest.h" #include "winetest.h"
SOCKET static SOCKET
open_http (const char *server) open_http (const char *server)
{ {
WSADATA wsad; WSADATA wsad;
...@@ -61,7 +61,7 @@ open_http (const char *server) ...@@ -61,7 +61,7 @@ open_http (const char *server)
return INVALID_SOCKET; return INVALID_SOCKET;
} }
int static int
close_http (SOCKET s) close_http (SOCKET s)
{ {
int ret; int ret;
...@@ -70,7 +70,7 @@ close_http (SOCKET s) ...@@ -70,7 +70,7 @@ close_http (SOCKET s)
return (WSACleanup () || ret); return (WSACleanup () || ret);
} }
int static int
send_buf (SOCKET s, const char *buf, size_t length) send_buf (SOCKET s, const char *buf, size_t length)
{ {
int sent; int sent;
...@@ -84,7 +84,7 @@ send_buf (SOCKET s, const char *buf, size_t length) ...@@ -84,7 +84,7 @@ send_buf (SOCKET s, const char *buf, size_t length)
return 0; return 0;
} }
int static int
send_str (SOCKET s, ...) send_str (SOCKET s, ...)
{ {
va_list ap; va_list ap;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment