Fixed some issues found by winapi_check.
This commit is contained in:
parent
b2c89dce8c
commit
024d6c50d6
|
@ -269,7 +269,7 @@ static BOOL CFn_HookCallChk32(LPCHOOSEFONTA lpcf)
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* AddFontFamily [internal]
|
* AddFontFamily [internal]
|
||||||
*/
|
*/
|
||||||
static INT AddFontFamily(LPLOGFONTA lplf, UINT nFontType,
|
static INT AddFontFamily(const LOGFONTA *lplf, UINT nFontType,
|
||||||
LPCHOOSEFONTA lpcf, HWND hwnd)
|
LPCHOOSEFONTA lpcf, HWND hwnd)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -308,12 +308,12 @@ typedef struct
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* FontFamilyEnumProc32 [internal]
|
* FontFamilyEnumProc32 [internal]
|
||||||
*/
|
*/
|
||||||
static INT WINAPI FontFamilyEnumProc(LPENUMLOGFONTA lpEnumLogFont,
|
static INT WINAPI FontFamilyEnumProc(const LOGFONTA *lpLogFont,
|
||||||
LPNEWTEXTMETRICA metrics, UINT nFontType, LPARAM lParam)
|
const TEXTMETRICA *metrics, DWORD dwFontType, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LPCFn_ENUMSTRUCT e;
|
LPCFn_ENUMSTRUCT e;
|
||||||
e=(LPCFn_ENUMSTRUCT)lParam;
|
e=(LPCFn_ENUMSTRUCT)lParam;
|
||||||
return AddFontFamily(&lpEnumLogFont->elfLogFont, nFontType, e->lpcf32a, e->hWnd1);
|
return AddFontFamily(lpLogFont, dwFontType, e->lpcf32a, e->hWnd1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -337,7 +337,7 @@ INT16 WINAPI FontFamilyEnumProc16( SEGPTR logfont, SEGPTR metrics,
|
||||||
*
|
*
|
||||||
* Fill font style information into combobox (without using font.c directly)
|
* Fill font style information into combobox (without using font.c directly)
|
||||||
*/
|
*/
|
||||||
static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, LPLOGFONTA lplf)
|
static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTA *lplf)
|
||||||
{
|
{
|
||||||
#define FSTYLES 4
|
#define FSTYLES 4
|
||||||
struct FONTSTYLE
|
struct FONTSTYLE
|
||||||
|
@ -350,12 +350,15 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, LPLOGFONTA lplf)
|
||||||
HFONT hf;
|
HFONT hf;
|
||||||
TEXTMETRICA tm;
|
TEXTMETRICA tm;
|
||||||
int i,j;
|
int i,j;
|
||||||
|
LOGFONTA lf;
|
||||||
|
|
||||||
|
memcpy(&lf, lplf, sizeof(LOGFONTA));
|
||||||
|
|
||||||
for (i=0;i<FSTYLES;i++)
|
for (i=0;i<FSTYLES;i++)
|
||||||
{
|
{
|
||||||
lplf->lfItalic=fontstyles[i].italic;
|
lf.lfItalic=fontstyles[i].italic;
|
||||||
lplf->lfWeight=fontstyles[i].weight;
|
lf.lfWeight=fontstyles[i].weight;
|
||||||
hf=CreateFontIndirectA(lplf);
|
hf=CreateFontIndirectA(&lf);
|
||||||
hf=SelectObject(hdc,hf);
|
hf=SelectObject(hdc,hf);
|
||||||
GetTextMetricsA(hdc,&tm);
|
GetTextMetricsA(hdc,&tm);
|
||||||
hf=SelectObject(hdc,hf);
|
hf=SelectObject(hdc,hf);
|
||||||
|
@ -415,7 +418,7 @@ static int SetFontSizesToCombo3(HWND hwnd, LPCHOOSEFONTA lpcf)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* AddFontStyle [internal]
|
* AddFontStyle [internal]
|
||||||
*/
|
*/
|
||||||
static INT AddFontStyle(LPLOGFONTA lplf, UINT nFontType,
|
static INT AddFontStyle(const LOGFONTA *lplf, UINT nFontType,
|
||||||
LPCHOOSEFONTA lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg)
|
LPCHOOSEFONTA lpcf, HWND hcmb2, HWND hcmb3, HWND hDlg)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -466,14 +469,14 @@ INT16 WINAPI FontStyleEnumProc16( SEGPTR logfont, SEGPTR metrics,
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* FontStyleEnumProc32 [internal]
|
* FontStyleEnumProc32 [internal]
|
||||||
*/
|
*/
|
||||||
static INT WINAPI FontStyleEnumProc( LPENUMLOGFONTA lpFont,
|
static INT WINAPI FontStyleEnumProc( const LOGFONTA *lpFont,
|
||||||
LPNEWTEXTMETRICA metrics, UINT nFontType, LPARAM lParam )
|
const TEXTMETRICA *metrics, DWORD dwFontType, LPARAM lParam )
|
||||||
{
|
{
|
||||||
LPCFn_ENUMSTRUCT s=(LPCFn_ENUMSTRUCT)lParam;
|
LPCFn_ENUMSTRUCT s=(LPCFn_ENUMSTRUCT)lParam;
|
||||||
HWND hcmb2=s->hWnd1;
|
HWND hcmb2=s->hWnd1;
|
||||||
HWND hcmb3=s->hWnd2;
|
HWND hcmb3=s->hWnd2;
|
||||||
HWND hDlg=GetParent(hcmb3);
|
HWND hDlg=GetParent(hcmb3);
|
||||||
return AddFontStyle(&lpFont->elfLogFont, nFontType, s->lpcf32a, hcmb2,
|
return AddFontStyle(lpFont, dwFontType, s->lpcf32a, hcmb2,
|
||||||
hcmb3, hDlg);
|
hcmb3, hDlg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,9 @@
|
||||||
#ifdef HAVE_SYS_ERRNO_H
|
#ifdef HAVE_SYS_ERRNO_H
|
||||||
# include <sys/errno.h>
|
# include <sys/errno.h>
|
||||||
#endif
|
#endif
|
||||||
#include <linux/joystick.h>
|
#ifdef HAVE_LINUX_JOYSTICK_H
|
||||||
|
# include <linux/joystick.h>
|
||||||
|
#endif
|
||||||
#define JOYDEV "/dev/js0"
|
#define JOYDEV "/dev/js0"
|
||||||
|
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
|
|
|
@ -62,8 +62,9 @@ static inline void release( void *ptr )
|
||||||
info->str_pos = ptr;
|
info->str_pos = ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/***********************************************************************
|
||||||
|
* wine_dbgstr_an
|
||||||
|
*/
|
||||||
const char *wine_dbgstr_an( const char *src, int n )
|
const char *wine_dbgstr_an( const char *src, int n )
|
||||||
{
|
{
|
||||||
char *dst, *res;
|
char *dst, *res;
|
||||||
|
@ -112,8 +113,9 @@ const char *wine_dbgstr_an( const char *src, int n )
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/***********************************************************************
|
||||||
|
* wine_dbgstr_wn
|
||||||
|
*/
|
||||||
const char *wine_dbgstr_wn( const WCHAR *src, int n )
|
const char *wine_dbgstr_wn( const WCHAR *src, int n )
|
||||||
{
|
{
|
||||||
char *dst, *res;
|
char *dst, *res;
|
||||||
|
@ -162,8 +164,9 @@ const char *wine_dbgstr_wn( const WCHAR *src, int n )
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/***********************************************************************
|
||||||
|
* wine_dbgstr_guid
|
||||||
|
*/
|
||||||
const char *wine_dbgstr_guid( const GUID *id )
|
const char *wine_dbgstr_guid( const GUID *id )
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
|
@ -185,8 +188,9 @@ const char *wine_dbgstr_guid( const GUID *id )
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/***********************************************************************
|
||||||
|
* wine_dbg_vprintf
|
||||||
|
*/
|
||||||
int wine_dbg_vprintf( const char *format, va_list args )
|
int wine_dbg_vprintf( const char *format, va_list args )
|
||||||
{
|
{
|
||||||
struct debug_info *info = get_info();
|
struct debug_info *info = get_info();
|
||||||
|
@ -206,6 +210,9 @@ int wine_dbg_vprintf( const char *format, va_list args )
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* wine_dbg_printf
|
||||||
|
*/
|
||||||
int wine_dbg_printf(const char *format, ...)
|
int wine_dbg_printf(const char *format, ...)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -217,6 +224,9 @@ int wine_dbg_printf(const char *format, ...)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* wine_dbg_log
|
||||||
|
*/
|
||||||
int wine_dbg_log(enum __DEBUG_CLASS cls, const char *channel,
|
int wine_dbg_log(enum __DEBUG_CLASS cls, const char *channel,
|
||||||
const char *function, const char *format, ... )
|
const char *function, const char *format, ... )
|
||||||
{
|
{
|
||||||
|
|
|
@ -315,7 +315,10 @@ RPC_STATUS WINAPI UuidToStringA(UUID *Uuid, unsigned char** StringUuid)
|
||||||
return S_OK; /*FIXME: this should be RPC_S_OK */
|
return S_OK; /*FIXME: this should be RPC_S_OK */
|
||||||
}
|
}
|
||||||
|
|
||||||
WINAPI HRESULT NdrDllRegisterProxy(
|
/***********************************************************************
|
||||||
|
* NdrDllRegisterProxy (RPCRT4.@)
|
||||||
|
*/
|
||||||
|
WINAPI HRESULT WINAPI NdrDllRegisterProxy(
|
||||||
HMODULE hDll,
|
HMODULE hDll,
|
||||||
/*const ProxyFileInfo */ void **pProxyFileList,
|
/*const ProxyFileInfo */ void **pProxyFileList,
|
||||||
const CLSID * pclsid
|
const CLSID * pclsid
|
||||||
|
|
|
@ -123,7 +123,7 @@ debug_channels (setupapi setupx)
|
||||||
#156 stdcall SetupDuplicateDiskSpaceListW() SetupDuplicateDiskSpaceListW
|
#156 stdcall SetupDuplicateDiskSpaceListW() SetupDuplicateDiskSpaceListW
|
||||||
157 stdcall SetupFindFirstLineA(long str str ptr) SetupFindFirstLineA
|
157 stdcall SetupFindFirstLineA(long str str ptr) SetupFindFirstLineA
|
||||||
#158 stdcall SetupFindFirstLineW() SetupFindFirstLineW
|
#158 stdcall SetupFindFirstLineW() SetupFindFirstLineW
|
||||||
159 stdcall SetupFindNextLine(long) SetupFindNextLine
|
159 stdcall SetupFindNextLine(ptr ptr) SetupFindNextLine
|
||||||
#160 stdcall SetupFindNextMatchLineA() SetupFindNextMatchLineA
|
#160 stdcall SetupFindNextMatchLineA() SetupFindNextMatchLineA
|
||||||
#161 stdcall SetupFindNextMatchLineW() SetupFindNextMatchLineW
|
#161 stdcall SetupFindNextMatchLineW() SetupFindNextMatchLineW
|
||||||
#162 stdcall SetupFreeSourceListA() SetupFreeSourceListA
|
#162 stdcall SetupFreeSourceListA() SetupFreeSourceListA
|
||||||
|
|
|
@ -5,13 +5,16 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/wait.h>
|
#ifdef HAVE_SYS_WAIT_H
|
||||||
|
# include <sys/wait.h>
|
||||||
|
#endif
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
|
|
|
@ -1325,7 +1325,7 @@ HINTERNET FTP_Connect(HINTERNET hInternet, LPCSTR lpszServerName,
|
||||||
lpwfs->hdr.lpwhparent = (LPWININETHANDLEHEADER)hInternet;
|
lpwfs->hdr.lpwhparent = (LPWININETHANDLEHEADER)hInternet;
|
||||||
lpwfs->sndSocket = nsocket;
|
lpwfs->sndSocket = nsocket;
|
||||||
sock_namelen = sizeof(lpwfs->socketAddress);
|
sock_namelen = sizeof(lpwfs->socketAddress);
|
||||||
getsockname(nsocket, &lpwfs->socketAddress, &sock_namelen);
|
getsockname(nsocket, (struct sockaddr *) &lpwfs->socketAddress, &sock_namelen);
|
||||||
lpwfs->phostent = phe;
|
lpwfs->phostent = phe;
|
||||||
|
|
||||||
if (NULL == lpszUserName)
|
if (NULL == lpszUserName)
|
||||||
|
|
|
@ -75,10 +75,37 @@ void CALLBACK CallTo16RegisterShort( CONTEXT86 *context, INT nArgs )
|
||||||
void CALLBACK CallTo16RegisterLong ( CONTEXT86 *context, INT nArgs )
|
void CALLBACK CallTo16RegisterLong ( CONTEXT86 *context, INT nArgs )
|
||||||
{ assert( FALSE ); }
|
{ assert( FALSE ); }
|
||||||
|
|
||||||
WORD __wine_call_from_16_word() { assert( FALSE ); }
|
/***********************************************************************
|
||||||
LONG __wine_call_from_16_long() { assert( FALSE ); }
|
* __wine_call_from_16_word
|
||||||
void __wine_call_from_16_regs() { assert( FALSE ); }
|
*/
|
||||||
void __wine_call_from_16_thunk() { assert( FALSE ); }
|
WORD __cdecl __wine_call_from_16_word(...)
|
||||||
|
{
|
||||||
|
assert( FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* __wine_call_from_16_long
|
||||||
|
*/
|
||||||
|
LONG __cdecl __wine_call_from_16_long(...)
|
||||||
|
{
|
||||||
|
assert( FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* __wine_call_from_16_regs
|
||||||
|
*/
|
||||||
|
void __cdecl __wine_call_from_16_regs(...)
|
||||||
|
{
|
||||||
|
assert( FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* __wine_call_from_16_thunk
|
||||||
|
*/
|
||||||
|
void __cdecl __wine_call_from_16_thunk(...)
|
||||||
|
{
|
||||||
|
assert( FALSE );
|
||||||
|
}
|
||||||
|
|
||||||
DWORD WINAPI CALL32_CBClient( FARPROC proc, LPWORD args, DWORD *esi )
|
DWORD WINAPI CALL32_CBClient( FARPROC proc, LPWORD args, DWORD *esi )
|
||||||
{ assert( FALSE ); }
|
{ assert( FALSE ); }
|
||||||
|
|
|
@ -680,7 +680,7 @@ void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* RegisterDeviceNotification (USER32.477)
|
* RegisterDeviceNotificationA (USER32.477)
|
||||||
*/
|
*/
|
||||||
HDEVNOTIFY WINAPI RegisterDeviceNotificationA(
|
HDEVNOTIFY WINAPI RegisterDeviceNotificationA(
|
||||||
HANDLE hnd, LPVOID notifyfilter, DWORD flags
|
HANDLE hnd, LPVOID notifyfilter, DWORD flags
|
||||||
|
|
Loading…
Reference in New Issue