ANSI C fixes.
Removed warnings.
Made the include files self-sufficient.
Some Solaris fixes.
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c
index 32a3a2e..906bdc9 100644
--- a/dlls/comctl32/animate.c
+++ b/dlls/comctl32/animate.c
@@ -93,7 +93,7 @@
static VOID
-ANIMATE_GetAviInfo (infoPtr)
+ANIMATE_GetAviInfo (ANIMATE_INFO *infoPtr)
{
@@ -305,7 +305,7 @@
VOID
-ANIMATE_Register (VOID)
+ANIMATE_Register (void)
{
WNDCLASSA wndClass;
@@ -325,7 +325,7 @@
VOID
-ANIMATE_Unregister (VOID)
+ANIMATE_Unregister (void)
{
if (GlobalFindAtomA (ANIMATE_CLASSA))
UnregisterClassA (ANIMATE_CLASSA, (HINSTANCE)NULL);
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 3303a9f..bb04095 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -2040,7 +2040,7 @@
* RETURN:
* Number of columns.
*/
-static INT LISTVIEW_GetColumnCount(hwnd)
+static INT LISTVIEW_GetColumnCount(HWND hwnd)
{
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongA(hwnd, 0);
LONG lStyle = GetWindowLongA(hwnd, GWL_STYLE);
@@ -6767,7 +6767,7 @@
* RETURN:
* None
*/
-VOID LISTVIEW_Register(VOID)
+VOID LISTVIEW_Register(void)
{
WNDCLASSA wndClass;
@@ -6795,7 +6795,7 @@
* RETURN:
* None
*/
-VOID LISTVIEW_Unregister(VOID)
+VOID LISTVIEW_Unregister(void)
{
if (GlobalFindAtomA(WC_LISTVIEWA))
{
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index af60878..ebb7ced 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -3227,7 +3227,7 @@
VOID
-TOOLBAR_Register (VOID)
+TOOLBAR_Register (void)
{
WNDCLASSA wndClass;
@@ -3247,7 +3247,7 @@
VOID
-TOOLBAR_Unregister (VOID)
+TOOLBAR_Unregister (void)
{
if (GlobalFindAtomA (TOOLBARCLASSNAMEA))
UnregisterClassA (TOOLBARCLASSNAMEA, (HINSTANCE)NULL);
diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c
index cb4eb36..9e98165 100644
--- a/dlls/comctl32/trackbar.c
+++ b/dlls/comctl32/trackbar.c
@@ -85,7 +85,7 @@
/* converts from physical (mouse) position to logical position
(in range of trackbar) */
-static __inline__ DOUBLE
+static inline DOUBLE
TRACKBAR_ConvertPlaceToPosition (TRACKBAR_INFO *infoPtr, int place,
int vertical)
{
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 7068eae..daad007 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -3570,7 +3570,7 @@
VOID
-TREEVIEW_Register (VOID)
+TREEVIEW_Register (void)
{
WNDCLASSA wndClass;
@@ -3592,7 +3592,7 @@
VOID
-TREEVIEW_Unregister (VOID)
+TREEVIEW_Unregister (void)
{
if (GlobalFindAtomA (WC_TREEVIEWA))
UnregisterClassA (WC_TREEVIEWA, (HINSTANCE)NULL);
diff --git a/dlls/commdlg/finddlg32.c b/dlls/commdlg/finddlg32.c
index d29ee1a..1c0b783 100644
--- a/dlls/commdlg/finddlg32.c
+++ b/dlls/commdlg/finddlg32.c
@@ -49,7 +49,7 @@
* RETURNS
* Current state of check and radio buttons
*/
-DWORD COMDLG32_FR_GetFlags(HWND hDlgWnd)
+static DWORD COMDLG32_FR_GetFlags(HWND hDlgWnd)
{
DWORD flags = 0;
if(IsDlgButtonChecked(hDlgWnd, rad2) == BST_CHECKED)
@@ -65,7 +65,7 @@
* COMDLG32_FR_HandleWMCommand [internal]
* Handle WM_COMMAND messages...
*/
-void COMDLG32_FR_HandleWMCommand(HWND hDlgWnd, COMDLG32_FR_Data *pData, int Id, int NotifyCode)
+static void COMDLG32_FR_HandleWMCommand(HWND hDlgWnd, COMDLG32_FR_Data *pData, int Id, int NotifyCode)
{
DWORD flag;
@@ -148,7 +148,7 @@
* COMDLG32_FindReplaceDlgProc [internal]
* [Find/Replace]Text32[A/W] window procedure.
*/
-BOOL CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
+static BOOL CALLBACK COMDLG32_FindReplaceDlgProc(HWND hDlgWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
COMDLG32_FR_Data *pdata = (COMDLG32_FR_Data *)GetPropA(hDlgWnd, (LPSTR)COMDLG32_Atom);
BOOL retval = TRUE;;
@@ -272,7 +272,7 @@
* TRUE: Succes
* FALSE: Failure
*/
-BOOL COMDLG32_FR_CheckPartial(
+static BOOL COMDLG32_FR_CheckPartial(
LPFINDREPLACEA pfr, /* [in] Find structure */
BOOL Replace /* [in] True if called as replace */
) {
@@ -340,7 +340,7 @@
* Window handle to created dialog:Succes
* NULL:Failure
*/
-HWND COMDLG32_FR_DoFindReplace(
+static HWND COMDLG32_FR_DoFindReplace(
COMDLG32_FR_Data *pdata /* [in] Internal data structure */
) {
HWND hdlgwnd = 0;
diff --git a/dlls/commdlg/fontdlg.c b/dlls/commdlg/fontdlg.c
index 75937cf..77b5184 100644
--- a/dlls/commdlg/fontdlg.c
+++ b/dlls/commdlg/fontdlg.c
@@ -286,7 +286,7 @@
/*************************************************************************
* FontFamilyEnumProc32 [internal]
*/
-INT WINAPI FontFamilyEnumProc(LPENUMLOGFONTA lpEnumLogFont,
+static INT WINAPI FontFamilyEnumProc(LPENUMLOGFONTA lpEnumLogFont,
LPNEWTEXTMETRICA metrics, UINT nFontType, LPARAM lParam)
{
LPCFn_ENUMSTRUCT e;
@@ -393,7 +393,7 @@
/***********************************************************************
* AddFontStyle [internal]
*/
-INT AddFontStyle(LPLOGFONTA lplf, UINT nFontType,
+static INT AddFontStyle(LPLOGFONTA lplf, UINT nFontType,
LPCHOOSEFONTA lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg)
{
int i;
@@ -444,7 +444,7 @@
/***********************************************************************
* FontStyleEnumProc32 [internal]
*/
-INT WINAPI FontStyleEnumProc( LPENUMLOGFONTA lpFont,
+static INT WINAPI FontStyleEnumProc( LPENUMLOGFONTA lpFont,
LPNEWTEXTMETRICA metrics, UINT nFontType, LPARAM lParam )
{
LPCFn_ENUMSTRUCT s=(LPCFn_ENUMSTRUCT)lParam;
@@ -458,7 +458,7 @@
/***********************************************************************
* CFn_WMInitDialog [internal]
*/
-LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
+static LRESULT CFn_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
LPCHOOSEFONTA lpcf)
{
HDC hdc;
@@ -579,7 +579,7 @@
/***********************************************************************
* CFn_WMMeasureItem [internal]
*/
-LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
+static LRESULT CFn_WMMeasureItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
{
BITMAP bm;
LPMEASUREITEMSTRUCT lpmi=(LPMEASUREITEMSTRUCT)lParam;
@@ -595,7 +595,7 @@
/***********************************************************************
* CFn_WMDrawItem [internal]
*/
-LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
+static LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
{
HBRUSH hBrush;
char buffer[40];
@@ -697,7 +697,7 @@
/***********************************************************************
* CFn_WMCtlColor [internal]
*/
-LRESULT CFn_WMCtlColorStatic(HWND hDlg, WPARAM wParam, LPARAM lParam,
+static LRESULT CFn_WMCtlColorStatic(HWND hDlg, WPARAM wParam, LPARAM lParam,
LPCHOOSEFONTA lpcf)
{
if (lpcf->Flags & CF_EFFECTS)
@@ -712,7 +712,7 @@
/***********************************************************************
* CFn_WMCommand [internal]
*/
-LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
+static LRESULT CFn_WMCommand(HWND hDlg, WPARAM wParam, LPARAM lParam,
LPCHOOSEFONTA lpcf)
{
HFONT hFont;
diff --git a/dlls/commdlg/printdlg.c b/dlls/commdlg/printdlg.c
index cabc002..bdb5cc2 100644
--- a/dlls/commdlg/printdlg.c
+++ b/dlls/commdlg/printdlg.c
@@ -242,7 +242,7 @@
/***********************************************************************
* PRINTDLG_UpdatePrinterInfoTexts [internal]
*/
-void PRINTDLG_UpdatePrinterInfoTexts(HWND hDlg, PRINT_PTRA* PrintStructures)
+static void PRINTDLG_UpdatePrinterInfoTexts(HWND hDlg, PRINT_PTRA* PrintStructures)
{
char PrinterName[256];
char StatusMsg[256];
@@ -272,8 +272,8 @@
/***********************************************************************
* PRINTDLG_WMInitDialog [internal]
*/
-LRESULT PRINTDLG_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
- PRINT_PTRA* PrintStructures)
+static LRESULT PRINTDLG_WMInitDialog(HWND hDlg, WPARAM wParam, LPARAM lParam,
+ PRINT_PTRA* PrintStructures)
{
int i;
LPPRINTDLGA lppd = PrintStructures->lpPrintDlg;
@@ -377,8 +377,8 @@
* FALSE if user is not allowed to close (i.e. wrong nTo or nFrom values)
* TRUE if succesful.
*/
-BOOL PRINTDLG_ValidateAndDuplicateSettings(HWND hDlg,
- PRINT_PTRA* PrintStructures)
+static BOOL PRINTDLG_ValidateAndDuplicateSettings(HWND hDlg,
+ PRINT_PTRA* PrintStructures)
{
LPPRINTDLGA lppd = PrintStructures->lpPrintDlg;
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index 1e18e63..8e9ec99 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -398,7 +398,7 @@
*rest = x1 % divisor;
return x1/divisor;
#else
- FIXME("((%d<<32)+%d,%d,%p), implement this using normal integer arithmetic!\n",dividend.HighPart,dividend.LowPart,divisor,rest);
+ FIXME("((%ld<<32)+%ld,%ld,%p), implement this using normal integer arithmetic!\n",dividend.HighPart,dividend.LowPart,divisor,rest);
return 0;
#endif
}
@@ -415,7 +415,7 @@
#if SIZEOF_LONG_LONG==8
return (*(long long*)&factor1) * factor2;
#else
- FIXME("((%d<<32)+%d,%ld), implement this using normal integer arithmetic!\n",factor1.HighPart,factor1.LowPart,factor2);
+ FIXME("((%ld<<32)+%ld,%d), implement this using normal integer arithmetic!\n",factor1.HighPart,factor1.LowPart,factor2);
return 0;
#endif
}
diff --git a/dlls/winaspi/winaspi16.c b/dlls/winaspi/winaspi16.c
index d1983c1..09fa06b 100644
--- a/dlls/winaspi/winaspi16.c
+++ b/dlls/winaspi/winaspi16.c
@@ -28,6 +28,8 @@
#ifdef linux
+static ASPI_DEVICE_INFO *ASPI_open_devices = NULL;
+
static FARPROC16 ASPIChainFunc = NULL;
static WORD HA_Count = 1; /* host adapter count; FIXME: detect it */
diff --git a/dlls/wnaspi32/winaspi32.c b/dlls/wnaspi32/winaspi32.c
index 30d11f0..a62c443 100644
--- a/dlls/wnaspi32/winaspi32.c
+++ b/dlls/wnaspi32/winaspi32.c
@@ -25,6 +25,9 @@
*/
#ifdef linux
+
+static ASPI_DEVICE_INFO *ASPI_open_devices = NULL;
+
static int
ASPI_OpenDevice(SRB_ExecSCSICmd *prb)
{