Commit 3c0211f9 authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Cleanup code that is strange or difficult to parse.

parent b3eaa866
...@@ -1853,11 +1853,12 @@ static void TAB_DrawItem( ...@@ -1853,11 +1853,12 @@ static void TAB_DrawItem(
} }
/* This modifies r to be the text rectangle. */ /* This modifies r to be the text rectangle. */
{ {
HFONT hOldFont = SelectObject(hdc, infoPtr->hFont); HFONT hOldFont = SelectObject(hdc, infoPtr->hFont);
TAB_DrawItemInterior(hwnd, hdc, iItem, &r); TAB_DrawItemInterior(hwnd, hdc, iItem, &r);
SelectObject(hdc,hOldFont); SelectObject(hdc,hOldFont);
} }
/* Draw the focus rectangle */ /* Draw the focus rectangle */
if (((lStyle & TCS_FOCUSNEVER) == 0) && if (((lStyle & TCS_FOCUSNEVER) == 0) &&
(GetFocus() == hwnd) && (GetFocus() == hwnd) &&
......
...@@ -65,7 +65,7 @@ static D3DHAL_CALLBACKS d3d_hal_cbs1; ...@@ -65,7 +65,7 @@ static D3DHAL_CALLBACKS d3d_hal_cbs1;
static D3DHAL_CALLBACKS2 d3d_hal_cbs2; static D3DHAL_CALLBACKS2 d3d_hal_cbs2;
/* in real windoze, these entry points are 16-bit, but we can work in 32-bit */ /* in real windoze, these entry points are 16-bit, but we can work in 32-bit */
static BOOL DDAPI set_hal_info(LPDDHALINFO lpDDHalInfo, BOOL reset) static BOOL WINAPI set_hal_info(LPDDHALINFO lpDDHalInfo, BOOL reset)
{ {
dd_cbs.HALDD = *lpDDHalInfo->lpDDCallbacks; dd_cbs.HALDD = *lpDDHalInfo->lpDDCallbacks;
dd_cbs.HALDDSurface = *lpDDHalInfo->lpDDSurfaceCallbacks; dd_cbs.HALDDSurface = *lpDDHalInfo->lpDDSurfaceCallbacks;
......
...@@ -142,8 +142,8 @@ DWORD WINAPI MapFileAndCheckSumA( ...@@ -142,8 +142,8 @@ DWORD WINAPI MapFileAndCheckSumA(
0); 0);
if (hFile == INVALID_HANDLE_VALUE) if (hFile == INVALID_HANDLE_VALUE)
{ {
return CHECKSUM_OPEN_FAILURE; return CHECKSUM_OPEN_FAILURE;
} }
hMapping = CreateFileMappingW(hFile, hMapping = CreateFileMappingW(hFile,
NULL, NULL,
......
...@@ -344,6 +344,7 @@ char* MSVCRT_setlocale(int category, const char* locale) ...@@ -344,6 +344,7 @@ char* MSVCRT_setlocale(int category, const char* locale)
case MSVCRT_LC_NUMERIC: case MSVCRT_LC_NUMERIC:
if (!lc_all) break; if (!lc_all) break;
case MSVCRT_LC_TIME: case MSVCRT_LC_TIME:
break;
} }
UNLOCK_LOCALE; UNLOCK_LOCALE;
return MSVCRT_current_lc_all; return MSVCRT_current_lc_all;
...@@ -442,6 +443,7 @@ char* MSVCRT_setlocale(int category, const char* locale) ...@@ -442,6 +443,7 @@ char* MSVCRT_setlocale(int category, const char* locale)
case MSVCRT_LC_NUMERIC: case MSVCRT_LC_NUMERIC:
if (!lc_all) break; if (!lc_all) break;
case MSVCRT_LC_TIME: case MSVCRT_LC_TIME:
break;
} }
UNLOCK_LOCALE; UNLOCK_LOCALE;
return MSVCRT_current_lc_all; return MSVCRT_current_lc_all;
...@@ -517,4 +519,3 @@ int _getmbcp(void) ...@@ -517,4 +519,3 @@ int _getmbcp(void)
{ {
return MSVCRT_current_lc_all_cp; return MSVCRT_current_lc_all_cp;
} }
...@@ -165,7 +165,7 @@ static void EXC_DefaultHandling( EXCEPTION_RECORD *rec, CONTEXT *context ) ...@@ -165,7 +165,7 @@ static void EXC_DefaultHandling( EXCEPTION_RECORD *rec, CONTEXT *context )
/*********************************************************************** /***********************************************************************
* RtlRaiseException (NTDLL.@) * RtlRaiseException (NTDLL.@)
*/ */
DEFINE_REGS_ENTRYPOINT_1( RtlRaiseException, EXC_RtlRaiseException, EXCEPTION_RECORD * ) DEFINE_REGS_ENTRYPOINT_1( RtlRaiseException, EXC_RtlRaiseException, EXCEPTION_RECORD * );
void WINAPI EXC_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context ) void WINAPI EXC_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context )
{ {
PEXCEPTION_FRAME frame, dispatch, nested_frame; PEXCEPTION_FRAME frame, dispatch, nested_frame;
...@@ -234,7 +234,7 @@ void WINAPI EXC_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context ) ...@@ -234,7 +234,7 @@ void WINAPI EXC_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context )
* RtlUnwind (NTDLL.@) * RtlUnwind (NTDLL.@)
*/ */
DEFINE_REGS_ENTRYPOINT_4( RtlUnwind, EXC_RtlUnwind, DEFINE_REGS_ENTRYPOINT_4( RtlUnwind, EXC_RtlUnwind,
PEXCEPTION_FRAME, LPVOID, PEXCEPTION_RECORD, DWORD ) PEXCEPTION_FRAME, LPVOID, PEXCEPTION_RECORD, DWORD );
void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip, void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
PEXCEPTION_RECORD pRecord, DWORD returnEax, PEXCEPTION_RECORD pRecord, DWORD returnEax,
CONTEXT *context ) CONTEXT *context )
...@@ -311,7 +311,7 @@ void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip, ...@@ -311,7 +311,7 @@ void WINAPI EXC_RtlUnwind( PEXCEPTION_FRAME pEndFrame, LPVOID unusedEip,
* NtRaiseException (NTDLL.@) * NtRaiseException (NTDLL.@)
*/ */
DEFINE_REGS_ENTRYPOINT_3( NtRaiseException, EXC_NtRaiseException, DEFINE_REGS_ENTRYPOINT_3( NtRaiseException, EXC_NtRaiseException,
EXCEPTION_RECORD *, CONTEXT *, BOOL ) EXCEPTION_RECORD *, CONTEXT *, BOOL );
void WINAPI EXC_NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *ctx, void WINAPI EXC_NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *ctx,
BOOL first, CONTEXT *context ) BOOL first, CONTEXT *context )
{ {
......
...@@ -236,7 +236,7 @@ HRESULT WINAPI BindCtxImpl_RegisterObjectBound(IBindCtx* iface,IUnknown* punk) ...@@ -236,7 +236,7 @@ HRESULT WINAPI BindCtxImpl_RegisterObjectBound(IBindCtx* iface,IUnknown* punk)
if (This->bindCtxTableSize > (MAX_TAB_SIZE-BLOCK_TAB_SIZE)){ if (This->bindCtxTableSize > (MAX_TAB_SIZE-BLOCK_TAB_SIZE)){
FIXME("This->bindCtxTableSize: %ld is out of data limite \n",This->bindCtxTableSize); FIXME("This->bindCtxTableSize: %ld is out of data limite \n",This->bindCtxTableSize);
return E_FAIL; return E_FAIL;
} }
This->bindCtxTableSize+=BLOCK_TAB_SIZE; /* new table size */ This->bindCtxTableSize+=BLOCK_TAB_SIZE; /* new table size */
...@@ -384,7 +384,7 @@ HRESULT WINAPI BindCtxImpl_RegisterObjectParam(IBindCtx* iface,LPOLESTR pszkey, ...@@ -384,7 +384,7 @@ HRESULT WINAPI BindCtxImpl_RegisterObjectParam(IBindCtx* iface,LPOLESTR pszkey,
if (This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj==NULL) if (This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj==NULL)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
strcpyW(This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj,pszkey); strcpyW(This->bindCtxTable[This->bindCtxTableLastIndex].pkeyObj,pszkey);
} }
This->bindCtxTableLastIndex++; This->bindCtxTableLastIndex++;
......
...@@ -688,8 +688,8 @@ HRESULT WINAPI FileMonikerImpl_BindToStorage(IMoniker* iface, ...@@ -688,8 +688,8 @@ HRESULT WINAPI FileMonikerImpl_BindToStorage(IMoniker* iface,
FIXME("(%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,riid,ppvObject); FIXME("(%p,%p,%p,%p,%p)\n",iface,pbc,pmkToLeft,riid,ppvObject);
return E_NOTIMPL; return E_NOTIMPL;
} }
return res; return res;
} }
...@@ -892,7 +892,7 @@ HRESULT WINAPI FileMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash) ...@@ -892,7 +892,7 @@ HRESULT WINAPI FileMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash)
for (i = len ; i > 0; i -= skip, off += skip) { for (i = len ; i > 0; i -= skip, off += skip) {
h = (h * 39) + val[off]; h = (h * 39) + val[off];
} }
} }
*pdwHash=h; *pdwHash=h;
...@@ -964,7 +964,7 @@ HRESULT WINAPI FileMonikerImpl_GetTimeOfLastChange(IMoniker* iface, ...@@ -964,7 +964,7 @@ HRESULT WINAPI FileMonikerImpl_GetTimeOfLastChange(IMoniker* iface,
return MK_E_NOOBJECT; return MK_E_NOOBJECT;
*pFileTime=info.ftLastWriteTime; *pFileTime=info.ftLastWriteTime;
} }
return S_OK; return S_OK;
} }
...@@ -1035,7 +1035,7 @@ HRESULT WINAPI FileMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOth ...@@ -1035,7 +1035,7 @@ HRESULT WINAPI FileMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOth
if( (*stringTable1[i]=='\\') && (i+1 < sameIdx) && (*stringTable1[i+1]=='\\') ){ if( (*stringTable1[i]=='\\') && (i+1 < sameIdx) && (*stringTable1[i+1]=='\\') ){
machimeNameCase=FALSE; machimeNameCase=FALSE;
break; break;
} }
} }
if (machimeNameCase && *stringTable1[sameIdx-1]=='\\') if (machimeNameCase && *stringTable1[sameIdx-1]=='\\')
......
...@@ -556,7 +556,7 @@ HRESULT WINAPI ItemMonikerImpl_ComposeWith(IMoniker* iface, ...@@ -556,7 +556,7 @@ HRESULT WINAPI ItemMonikerImpl_ComposeWith(IMoniker* iface,
tempMkComposite=*ppmkComposite; tempMkComposite=*ppmkComposite;
IMoniker_AddRef(tempMkComposite); IMoniker_AddRef(tempMkComposite);
} }
return res; return res;
} }
else else
...@@ -645,7 +645,7 @@ HRESULT WINAPI ItemMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash) ...@@ -645,7 +645,7 @@ HRESULT WINAPI ItemMonikerImpl_Hash(IMoniker* iface,DWORD* pdwHash)
if (len < 16) { if (len < 16) {
for (i = len ; i > 0; i--) { for (i = len ; i > 0; i--) {
h = (h * 37) + val[off++]; h = (h * 37) + val[off++];
} }
} else { } else {
/* only sample some characters */ /* only sample some characters */
skip = len / 8; skip = len / 8;
...@@ -747,7 +747,7 @@ HRESULT WINAPI ItemMonikerImpl_GetTimeOfLastChange(IMoniker* iface, ...@@ -747,7 +747,7 @@ HRESULT WINAPI ItemMonikerImpl_GetTimeOfLastChange(IMoniker* iface,
res=IMoniker_GetTimeOfLastChange(pmkToLeft,pbc,NULL,pItemTime); res=IMoniker_GetTimeOfLastChange(pmkToLeft,pbc,NULL,pItemTime);
IMoniker_Release(compositeMk); IMoniker_Release(compositeMk);
} }
return res; return res;
} }
...@@ -857,7 +857,8 @@ HRESULT WINAPI ItemMonikerImpl_ParseDisplayName(IMoniker* iface, ...@@ -857,7 +857,8 @@ HRESULT WINAPI ItemMonikerImpl_ParseDisplayName(IMoniker* iface,
else{ else{
/* Otherwise, the method calls IMoniker::BindToObject on the pmkToLeft parameter, requesting an */ /* Otherwise, the method calls IMoniker::BindToObject on the pmkToLeft parameter, requesting an */
/* IParseDisplayName interface pointer to the object identified by the moniker, and passes the display */ /* name to IParseDisplayName::ParseDisplayName */ /* IParseDisplayName interface pointer to the object identified by the moniker, and passes the display */
/* name to IParseDisplayName::ParseDisplayName */
res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IOleItemContainer,(void**)&poic); res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IOleItemContainer,(void**)&poic);
if (SUCCEEDED(res)){ if (SUCCEEDED(res)){
...@@ -871,7 +872,7 @@ HRESULT WINAPI ItemMonikerImpl_ParseDisplayName(IMoniker* iface, ...@@ -871,7 +872,7 @@ HRESULT WINAPI ItemMonikerImpl_ParseDisplayName(IMoniker* iface,
IOleItemContainer_Release(poic); IOleItemContainer_Release(poic);
IParseDisplayName_Release(ppdn); IParseDisplayName_Release(ppdn);
} }
} }
return res; return res;
} }
......
...@@ -276,7 +276,7 @@ HRESULT WINAPI RunningObjectTableImpl_Register(IRunningObjectTable* iface, ...@@ -276,7 +276,7 @@ HRESULT WINAPI RunningObjectTableImpl_Register(IRunningObjectTable* iface,
FIXME("runObjTabRegister: %ld is out of data limite \n",This->runObjTabRegister); FIXME("runObjTabRegister: %ld is out of data limite \n",This->runObjTabRegister);
return E_FAIL; return E_FAIL;
} }
This->runObjTabRegister++; This->runObjTabRegister++;
This->runObjTabLastIndx++; This->runObjTabLastIndx++;
......
...@@ -189,7 +189,7 @@ HRESULT WINAPI OleInitialize(LPVOID reserved) ...@@ -189,7 +189,7 @@ HRESULT WINAPI OleInitialize(LPVOID reserved)
* In-place activation * In-place activation
*/ */
if (OLE_moduleLockCount==0) if (OLE_moduleLockCount==0)
{ {
/* /*
* Initialize the libraries. * Initialize the libraries.
*/ */
...@@ -209,7 +209,7 @@ HRESULT WINAPI OleInitialize(LPVOID reserved) ...@@ -209,7 +209,7 @@ HRESULT WINAPI OleInitialize(LPVOID reserved)
* OLE shared menu * OLE shared menu
*/ */
OLEMenu_Initialize(); OLEMenu_Initialize();
} }
/* /*
* Then, we increase the lock count on the OLE module. * Then, we increase the lock count on the OLE module.
......
...@@ -31,156 +31,156 @@ static LPCSTR hresult_to_string( HRESULT hr ) ...@@ -31,156 +31,156 @@ static LPCSTR hresult_to_string( HRESULT hr )
{ {
switch ( hr ) switch ( hr )
{ {
#define ENTRY(x) case x: return (const char*)#x; #define ENTRY(x) case x: return (const char*)#x
/* some known codes */ /* some known codes */
ENTRY(S_OK) ENTRY(S_OK);
ENTRY(S_FALSE) ENTRY(S_FALSE);
ENTRY(E_FAIL) ENTRY(E_FAIL);
ENTRY(E_POINTER) ENTRY(E_POINTER);
ENTRY(E_NOTIMPL) ENTRY(E_NOTIMPL);
ENTRY(E_NOINTERFACE) ENTRY(E_NOINTERFACE);
ENTRY(E_OUTOFMEMORY) ENTRY(E_OUTOFMEMORY);
ENTRY(CLASS_E_CLASSNOTAVAILABLE) ENTRY(CLASS_E_CLASSNOTAVAILABLE);
ENTRY(CLASS_E_NOAGGREGATION) ENTRY(CLASS_E_NOAGGREGATION);
/* vfwmsgs.h */ /* vfwmsgs.h */
ENTRY(VFW_S_NO_MORE_ITEMS) ENTRY(VFW_S_NO_MORE_ITEMS);
ENTRY(VFW_E_BAD_KEY) ENTRY(VFW_E_BAD_KEY);
ENTRY(VFW_E_INVALIDMEDIATYPE) ENTRY(VFW_E_INVALIDMEDIATYPE);
ENTRY(VFW_E_INVALIDSUBTYPE) ENTRY(VFW_E_INVALIDSUBTYPE);
ENTRY(VFW_E_NEED_OWNER) ENTRY(VFW_E_NEED_OWNER);
ENTRY(VFW_E_ENUM_OUT_OF_SYNC) ENTRY(VFW_E_ENUM_OUT_OF_SYNC);
ENTRY(VFW_E_ALREADY_CONNECTED) ENTRY(VFW_E_ALREADY_CONNECTED);
ENTRY(VFW_E_FILTER_ACTIVE) ENTRY(VFW_E_FILTER_ACTIVE);
ENTRY(VFW_E_NO_TYPES) ENTRY(VFW_E_NO_TYPES);
ENTRY(VFW_E_NO_ACCEPTABLE_TYPES) ENTRY(VFW_E_NO_ACCEPTABLE_TYPES);
ENTRY(VFW_E_INVALID_DIRECTION) ENTRY(VFW_E_INVALID_DIRECTION);
ENTRY(VFW_E_NOT_CONNECTED) ENTRY(VFW_E_NOT_CONNECTED);
ENTRY(VFW_E_NO_ALLOCATOR) ENTRY(VFW_E_NO_ALLOCATOR);
ENTRY(VFW_E_RUNTIME_ERROR) ENTRY(VFW_E_RUNTIME_ERROR);
ENTRY(VFW_E_BUFFER_NOTSET) ENTRY(VFW_E_BUFFER_NOTSET);
ENTRY(VFW_E_BUFFER_OVERFLOW) ENTRY(VFW_E_BUFFER_OVERFLOW);
ENTRY(VFW_E_BADALIGN) ENTRY(VFW_E_BADALIGN);
ENTRY(VFW_E_ALREADY_COMMITTED) ENTRY(VFW_E_ALREADY_COMMITTED);
ENTRY(VFW_E_BUFFERS_OUTSTANDING) ENTRY(VFW_E_BUFFERS_OUTSTANDING);
ENTRY(VFW_E_NOT_COMMITTED) ENTRY(VFW_E_NOT_COMMITTED);
ENTRY(VFW_E_SIZENOTSET) ENTRY(VFW_E_SIZENOTSET);
ENTRY(VFW_E_NO_CLOCK) ENTRY(VFW_E_NO_CLOCK);
ENTRY(VFW_E_NO_SINK) ENTRY(VFW_E_NO_SINK);
ENTRY(VFW_E_NO_INTERFACE) ENTRY(VFW_E_NO_INTERFACE);
ENTRY(VFW_E_NOT_FOUND) ENTRY(VFW_E_NOT_FOUND);
ENTRY(VFW_E_CANNOT_CONNECT) ENTRY(VFW_E_CANNOT_CONNECT);
ENTRY(VFW_E_CANNOT_RENDER) ENTRY(VFW_E_CANNOT_RENDER);
ENTRY(VFW_E_CHANGING_FORMAT) ENTRY(VFW_E_CHANGING_FORMAT);
ENTRY(VFW_E_NO_COLOR_KEY_SET) ENTRY(VFW_E_NO_COLOR_KEY_SET);
ENTRY(VFW_E_NOT_OVERLAY_CONNECTION) ENTRY(VFW_E_NOT_OVERLAY_CONNECTION);
ENTRY(VFW_E_NOT_SAMPLE_CONNECTION) ENTRY(VFW_E_NOT_SAMPLE_CONNECTION);
ENTRY(VFW_E_PALETTE_SET) ENTRY(VFW_E_PALETTE_SET);
ENTRY(VFW_E_COLOR_KEY_SET) ENTRY(VFW_E_COLOR_KEY_SET);
ENTRY(VFW_E_NO_COLOR_KEY_FOUND) ENTRY(VFW_E_NO_COLOR_KEY_FOUND);
ENTRY(VFW_E_NO_PALETTE_AVAILABLE) ENTRY(VFW_E_NO_PALETTE_AVAILABLE);
ENTRY(VFW_E_NO_DISPLAY_PALETTE) ENTRY(VFW_E_NO_DISPLAY_PALETTE);
ENTRY(VFW_E_TOO_MANY_COLORS) ENTRY(VFW_E_TOO_MANY_COLORS);
ENTRY(VFW_E_STATE_CHANGED) ENTRY(VFW_E_STATE_CHANGED);
ENTRY(VFW_E_NOT_STOPPED) ENTRY(VFW_E_NOT_STOPPED);
ENTRY(VFW_E_NOT_PAUSED) ENTRY(VFW_E_NOT_PAUSED);
ENTRY(VFW_E_NOT_RUNNING) ENTRY(VFW_E_NOT_RUNNING);
ENTRY(VFW_E_WRONG_STATE) ENTRY(VFW_E_WRONG_STATE);
ENTRY(VFW_E_START_TIME_AFTER_END) ENTRY(VFW_E_START_TIME_AFTER_END);
ENTRY(VFW_E_INVALID_RECT) ENTRY(VFW_E_INVALID_RECT);
ENTRY(VFW_E_TYPE_NOT_ACCEPTED) ENTRY(VFW_E_TYPE_NOT_ACCEPTED);
ENTRY(VFW_E_SAMPLE_REJECTED) ENTRY(VFW_E_SAMPLE_REJECTED);
ENTRY(VFW_E_SAMPLE_REJECTED_EOS) ENTRY(VFW_E_SAMPLE_REJECTED_EOS);
ENTRY(VFW_S_DUPLICATE_NAME) ENTRY(VFW_S_DUPLICATE_NAME);
ENTRY(VFW_E_DUPLICATE_NAME) ENTRY(VFW_E_DUPLICATE_NAME);
ENTRY(VFW_E_TIMEOUT) ENTRY(VFW_E_TIMEOUT);
ENTRY(VFW_E_INVALID_FILE_FORMAT) ENTRY(VFW_E_INVALID_FILE_FORMAT);
ENTRY(VFW_E_ENUM_OUT_OF_RANGE) ENTRY(VFW_E_ENUM_OUT_OF_RANGE);
ENTRY(VFW_E_CIRCULAR_GRAPH) ENTRY(VFW_E_CIRCULAR_GRAPH);
ENTRY(VFW_E_NOT_ALLOWED_TO_SAVE) ENTRY(VFW_E_NOT_ALLOWED_TO_SAVE);
ENTRY(VFW_E_TIME_ALREADY_PASSED) ENTRY(VFW_E_TIME_ALREADY_PASSED);
ENTRY(VFW_E_ALREADY_CANCELLED) ENTRY(VFW_E_ALREADY_CANCELLED);
ENTRY(VFW_E_CORRUPT_GRAPH_FILE) ENTRY(VFW_E_CORRUPT_GRAPH_FILE);
ENTRY(VFW_E_ADVISE_ALREADY_SET) ENTRY(VFW_E_ADVISE_ALREADY_SET);
ENTRY(VFW_S_STATE_INTERMEDIATE) ENTRY(VFW_S_STATE_INTERMEDIATE);
ENTRY(VFW_E_NO_MODEX_AVAILABLE) ENTRY(VFW_E_NO_MODEX_AVAILABLE);
ENTRY(VFW_E_NO_ADVISE_SET) ENTRY(VFW_E_NO_ADVISE_SET);
ENTRY(VFW_E_NO_FULLSCREEN) ENTRY(VFW_E_NO_FULLSCREEN);
ENTRY(VFW_E_IN_FULLSCREEN_MODE) ENTRY(VFW_E_IN_FULLSCREEN_MODE);
ENTRY(VFW_E_UNKNOWN_FILE_TYPE) ENTRY(VFW_E_UNKNOWN_FILE_TYPE);
ENTRY(VFW_E_CANNOT_LOAD_SOURCE_FILTER) ENTRY(VFW_E_CANNOT_LOAD_SOURCE_FILTER);
ENTRY(VFW_S_PARTIAL_RENDER) ENTRY(VFW_S_PARTIAL_RENDER);
ENTRY(VFW_E_FILE_TOO_SHORT) ENTRY(VFW_E_FILE_TOO_SHORT);
ENTRY(VFW_E_INVALID_FILE_VERSION) ENTRY(VFW_E_INVALID_FILE_VERSION);
ENTRY(VFW_S_SOME_DATA_IGNORED) ENTRY(VFW_S_SOME_DATA_IGNORED);
ENTRY(VFW_S_CONNECTIONS_DEFERRED) ENTRY(VFW_S_CONNECTIONS_DEFERRED);
ENTRY(VFW_E_INVALID_CLSID) ENTRY(VFW_E_INVALID_CLSID);
ENTRY(VFW_E_INVALID_MEDIA_TYPE) ENTRY(VFW_E_INVALID_MEDIA_TYPE);
ENTRY(VFW_E_SAMPLE_TIME_NOT_SET) ENTRY(VFW_E_SAMPLE_TIME_NOT_SET);
ENTRY(VFW_S_RESOURCE_NOT_NEEDED) ENTRY(VFW_S_RESOURCE_NOT_NEEDED);
ENTRY(VFW_E_MEDIA_TIME_NOT_SET) ENTRY(VFW_E_MEDIA_TIME_NOT_SET);
ENTRY(VFW_E_NO_TIME_FORMAT_SET) ENTRY(VFW_E_NO_TIME_FORMAT_SET);
ENTRY(VFW_E_MONO_AUDIO_HW) ENTRY(VFW_E_MONO_AUDIO_HW);
ENTRY(VFW_S_MEDIA_TYPE_IGNORED) ENTRY(VFW_S_MEDIA_TYPE_IGNORED);
ENTRY(VFW_E_NO_DECOMPRESSOR) ENTRY(VFW_E_NO_DECOMPRESSOR);
ENTRY(VFW_E_NO_AUDIO_HARDWARE) ENTRY(VFW_E_NO_AUDIO_HARDWARE);
ENTRY(VFW_S_VIDEO_NOT_RENDERED) ENTRY(VFW_S_VIDEO_NOT_RENDERED);
ENTRY(VFW_S_AUDIO_NOT_RENDERED) ENTRY(VFW_S_AUDIO_NOT_RENDERED);
ENTRY(VFW_E_RPZA) ENTRY(VFW_E_RPZA);
ENTRY(VFW_S_RPZA) ENTRY(VFW_S_RPZA);
ENTRY(VFW_E_PROCESSOR_NOT_SUITABLE) ENTRY(VFW_E_PROCESSOR_NOT_SUITABLE);
ENTRY(VFW_E_UNSUPPORTED_AUDIO) ENTRY(VFW_E_UNSUPPORTED_AUDIO);
ENTRY(VFW_E_UNSUPPORTED_VIDEO) ENTRY(VFW_E_UNSUPPORTED_VIDEO);
ENTRY(VFW_E_MPEG_NOT_CONSTRAINED) ENTRY(VFW_E_MPEG_NOT_CONSTRAINED);
ENTRY(VFW_E_NOT_IN_GRAPH) ENTRY(VFW_E_NOT_IN_GRAPH);
ENTRY(VFW_S_ESTIMATED) ENTRY(VFW_S_ESTIMATED);
ENTRY(VFW_E_NO_TIME_FORMAT) ENTRY(VFW_E_NO_TIME_FORMAT);
ENTRY(VFW_E_READ_ONLY) ENTRY(VFW_E_READ_ONLY);
ENTRY(VFW_S_RESERVED) ENTRY(VFW_S_RESERVED);
ENTRY(VFW_E_BUFFER_UNDERFLOW) ENTRY(VFW_E_BUFFER_UNDERFLOW);
ENTRY(VFW_E_UNSUPPORTED_STREAM) ENTRY(VFW_E_UNSUPPORTED_STREAM);
ENTRY(VFW_E_NO_TRANSPORT) ENTRY(VFW_E_NO_TRANSPORT);
ENTRY(VFW_S_STREAM_OFF) ENTRY(VFW_S_STREAM_OFF);
ENTRY(VFW_S_CANT_CUE) ENTRY(VFW_S_CANT_CUE);
ENTRY(VFW_E_BAD_VIDEOCD) ENTRY(VFW_E_BAD_VIDEOCD);
ENTRY(VFW_S_NO_STOP_TIME) ENTRY(VFW_S_NO_STOP_TIME);
ENTRY(VFW_E_OUT_OF_VIDEO_MEMORY) ENTRY(VFW_E_OUT_OF_VIDEO_MEMORY);
ENTRY(VFW_E_VP_NEGOTIATION_FAILED) ENTRY(VFW_E_VP_NEGOTIATION_FAILED);
ENTRY(VFW_E_DDRAW_CAPS_NOT_SUITABLE) ENTRY(VFW_E_DDRAW_CAPS_NOT_SUITABLE);
ENTRY(VFW_E_NO_VP_HARDWARE) ENTRY(VFW_E_NO_VP_HARDWARE);
ENTRY(VFW_E_NO_CAPTURE_HARDWARE) ENTRY(VFW_E_NO_CAPTURE_HARDWARE);
ENTRY(VFW_E_DVD_OPERATION_INHIBITED) ENTRY(VFW_E_DVD_OPERATION_INHIBITED);
ENTRY(VFW_E_DVD_INVALIDDOMAIN) ENTRY(VFW_E_DVD_INVALIDDOMAIN);
ENTRY(VFW_E_DVD_NO_BUTTON) ENTRY(VFW_E_DVD_NO_BUTTON);
ENTRY(VFW_E_DVD_GRAPHNOTREADY) ENTRY(VFW_E_DVD_GRAPHNOTREADY);
ENTRY(VFW_E_DVD_RENDERFAIL) ENTRY(VFW_E_DVD_RENDERFAIL);
ENTRY(VFW_E_DVD_DECNOTENOUGH) ENTRY(VFW_E_DVD_DECNOTENOUGH);
ENTRY(VFW_E_DDRAW_VERSION_NOT_SUITABLE) ENTRY(VFW_E_DDRAW_VERSION_NOT_SUITABLE);
ENTRY(VFW_E_COPYPROT_FAILED) ENTRY(VFW_E_COPYPROT_FAILED);
ENTRY(VFW_S_NOPREVIEWPIN) ENTRY(VFW_S_NOPREVIEWPIN);
ENTRY(VFW_E_TIME_EXPIRED) ENTRY(VFW_E_TIME_EXPIRED);
ENTRY(VFW_S_DVD_NON_ONE_SEQUENTIAL) ENTRY(VFW_S_DVD_NON_ONE_SEQUENTIAL);
ENTRY(VFW_E_DVD_WRONG_SPEED) ENTRY(VFW_E_DVD_WRONG_SPEED);
ENTRY(VFW_E_DVD_MENU_DOES_NOT_EXIST) ENTRY(VFW_E_DVD_MENU_DOES_NOT_EXIST);
ENTRY(VFW_E_DVD_CMD_CANCELLED) ENTRY(VFW_E_DVD_CMD_CANCELLED);
ENTRY(VFW_E_DVD_STATE_WRONG_VERSION) ENTRY(VFW_E_DVD_STATE_WRONG_VERSION);
ENTRY(VFW_E_DVD_STATE_CORRUPT) ENTRY(VFW_E_DVD_STATE_CORRUPT);
ENTRY(VFW_E_DVD_STATE_WRONG_DISC) ENTRY(VFW_E_DVD_STATE_WRONG_DISC);
ENTRY(VFW_E_DVD_INCOMPATIBLE_REGION) ENTRY(VFW_E_DVD_INCOMPATIBLE_REGION);
ENTRY(VFW_E_DVD_NO_ATTRIBUTES) ENTRY(VFW_E_DVD_NO_ATTRIBUTES);
ENTRY(VFW_E_DVD_NO_GOUP_PGC) ENTRY(VFW_E_DVD_NO_GOUP_PGC);
ENTRY(VFW_E_DVD_LOW_PARENTAL_LEVEL) ENTRY(VFW_E_DVD_LOW_PARENTAL_LEVEL);
ENTRY(VFW_E_DVD_NOT_IN_KARAOKE_MODE) ENTRY(VFW_E_DVD_NOT_IN_KARAOKE_MODE);
ENTRY(VFW_S_DVD_CHANNEL_CONTENTS_NOT_AVAILABLE) ENTRY(VFW_S_DVD_CHANNEL_CONTENTS_NOT_AVAILABLE);
ENTRY(VFW_S_DVD_NOT_ACCURATE) ENTRY(VFW_S_DVD_NOT_ACCURATE);
ENTRY(VFW_E_FRAME_STEP_UNSUPPORTED) ENTRY(VFW_E_FRAME_STEP_UNSUPPORTED);
ENTRY(VFW_E_DVD_STREAM_DISABLED) ENTRY(VFW_E_DVD_STREAM_DISABLED);
ENTRY(VFW_E_DVD_TITLE_UNKNOWN) ENTRY(VFW_E_DVD_TITLE_UNKNOWN);
ENTRY(VFW_E_DVD_INVALID_DISC) ENTRY(VFW_E_DVD_INVALID_DISC);
ENTRY(VFW_E_DVD_NO_RESUME_INFORMATION) ENTRY(VFW_E_DVD_NO_RESUME_INFORMATION);
ENTRY(VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD) ENTRY(VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD);
ENTRY(VFW_E_PIN_ALREADY_BLOCKED) ENTRY(VFW_E_PIN_ALREADY_BLOCKED);
ENTRY(VFW_E_CERTIFICATION_FAILURE) ENTRY(VFW_E_CERTIFICATION_FAILURE);
#undef ENTRY #undef ENTRY
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* Gen generic installer (geninst.c ?) * Gen generic installer (geninst.c ?)
* Ip .INF parsing (infparse.c) * Ip .INF parsing (infparse.c)
* LDD logical device descriptor (ldd.c ?) * LDD logical device descriptor (ldd.c ?)
* LDID logical device ID * LDID logical device ID
* SU setup (setup.c ?) * SU setup (setup.c ?)
* Tp text processing (textproc.c ?) * Tp text processing (textproc.c ?)
* Vcp virtual copy module (vcp.c ?) * Vcp virtual copy module (vcp.c ?)
...@@ -122,7 +122,7 @@ static LPSTR *SETUPX_GetSubStrings(LPSTR start, char delimiter) ...@@ -122,7 +122,7 @@ static LPSTR *SETUPX_GetSubStrings(LPSTR start, char delimiter)
break; break;
p = q+1; p = q+1;
} }
/* put number of entries at beginning of list */ /* put number of entries at beginning of list */
*(DWORD *)res = count; *(DWORD *)res = count;
return res; return res;
...@@ -162,7 +162,7 @@ static void SETUPX_IsolateSubString(LPSTR *begin, LPSTR *end) ...@@ -162,7 +162,7 @@ static void SETUPX_IsolateSubString(LPSTR *begin, LPSTR *end)
* FIXME: use SETUPX_GetSubStrings() instead. * FIXME: use SETUPX_GetSubStrings() instead.
* Hmm, but on the other hand SETUPX_GetSubStrings() will probably * Hmm, but on the other hand SETUPX_GetSubStrings() will probably
* soon be replaced by InitSubstrData() etc. anyway. * soon be replaced by InitSubstrData() etc. anyway.
* *
*/ */
static BOOL SETUPX_LookupRegistryString(LPSTR regstr, LPSTR buffer, DWORD buflen) static BOOL SETUPX_LookupRegistryString(LPSTR regstr, LPSTR buffer, DWORD buflen)
{ {
...@@ -200,7 +200,7 @@ static BOOL SETUPX_LookupRegistryString(LPSTR regstr, LPSTR buffer, DWORD buflen ...@@ -200,7 +200,7 @@ static BOOL SETUPX_LookupRegistryString(LPSTR regstr, LPSTR buffer, DWORD buflen
} }
TRACE("got '%s','%s','%s','%s','%s'\n", TRACE("got '%s','%s','%s','%s','%s'\n",
items[0], items[1], items[2], items[3], items[4]); items[0], items[1], items[2], items[3], items[4]);
/* check root key */ /* check root key */
if (!strcasecmp(items[0], "HKCR")) if (!strcasecmp(items[0], "HKCR"))
hkey = HKEY_CLASSES_ROOT; hkey = HKEY_CLASSES_ROOT;
...@@ -282,7 +282,7 @@ static LPSTR SETUPX_GetSectionEntries(LPCSTR filename, LPCSTR section) ...@@ -282,7 +282,7 @@ static LPSTR SETUPX_GetSectionEntries(LPCSTR filename, LPCSTR section)
* lpszCmdLine = e.g. "DefaultInstall 132 C:\MYINSTALL\MYDEV.INF" * lpszCmdLine = e.g. "DefaultInstall 132 C:\MYINSTALL\MYDEV.INF"
* Here "DefaultInstall" is the .inf file section to be installed (optional). * Here "DefaultInstall" is the .inf file section to be installed (optional).
* The 132 value is made of the HOW_xxx flags and sometimes 128 (-> setupx16.h). * The 132 value is made of the HOW_xxx flags and sometimes 128 (-> setupx16.h).
* *
* nCmdShow = nCmdShow of CreateProcess * nCmdShow = nCmdShow of CreateProcess
*/ */
typedef INT WINAPI (*MSGBOX_PROC)( HWND, LPCSTR, LPCSTR, UINT ); typedef INT WINAPI (*MSGBOX_PROC)( HWND, LPCSTR, LPCSTR, UINT );
...@@ -296,9 +296,9 @@ RETERR16 WINAPI InstallHinfSection16( HWND16 hwnd, HINSTANCE16 hinst, LPCSTR lps ...@@ -296,9 +296,9 @@ RETERR16 WINAPI InstallHinfSection16( HWND16 hwnd, HINSTANCE16 hinst, LPCSTR lps
BOOL reboot = FALSE; BOOL reboot = FALSE;
HMODULE hMod; HMODULE hMod;
MSGBOX_PROC pMessageBoxA; MSGBOX_PROC pMessageBoxA;
TRACE("(%04x, %04x, %s, %d);\n", hwnd, hinst, lpszCmdLine, nCmdShow); TRACE("(%04x, %04x, %s, %d);\n", hwnd, hinst, lpszCmdLine, nCmdShow);
pSub = SETUPX_GetSubStrings((LPSTR)lpszCmdLine, ' '); pSub = SETUPX_GetSubStrings((LPSTR)lpszCmdLine, ' ');
count = *(DWORD *)pSub; count = *(DWORD *)pSub;
...@@ -326,7 +326,7 @@ RETERR16 WINAPI InstallHinfSection16( HWND16 hwnd, HINSTANCE16 hinst, LPCSTR lps ...@@ -326,7 +326,7 @@ RETERR16 WINAPI InstallHinfSection16( HWND16 hwnd, HINSTANCE16 hinst, LPCSTR lps
{ {
if ((pMessageBoxA = (MSGBOX_PROC)GetProcAddress( hMod, "MessageBoxA" ))) if ((pMessageBoxA = (MSGBOX_PROC)GetProcAddress( hMod, "MessageBoxA" )))
{ {
if (pMessageBoxA(hwnd, "You must restart Wine before the new settings will take effect.\n\nDo you want to exit Wine now ?", "Systems Settings Change", MB_YESNO|MB_ICONQUESTION) == IDYES) if (pMessageBoxA(hwnd, "You must restart Wine before the new settings will take effect.\n\nDo you want to exit Wine now ?", "Systems Settings Change", MB_YESNO|MB_ICONQUESTION) == IDYES)
reboot = TRUE; reboot = TRUE;
} }
...@@ -336,7 +336,7 @@ RETERR16 WINAPI InstallHinfSection16( HWND16 hwnd, HINSTANCE16 hinst, LPCSTR lps ...@@ -336,7 +336,7 @@ RETERR16 WINAPI InstallHinfSection16( HWND16 hwnd, HINSTANCE16 hinst, LPCSTR lps
ERR("invalid flags %d !\n", wFlags); ERR("invalid flags %d !\n", wFlags);
goto end; goto end;
} }
res = OK; res = OK;
end: end:
tmp = VcpClose16(VCPFL_ALL, NULL); tmp = VcpClose16(VCPFL_ALL, NULL);
...@@ -503,7 +503,7 @@ static const LDID_DATA LDID_Data[34] = ...@@ -503,7 +503,7 @@ static const LDID_DATA LDID_Data[34] =
/* the rest (34-38) isn't too interesting, so I'll forget about it */ /* the rest (34-38) isn't too interesting, so I'll forget about it */
}; };
/* /*
* LDD == Logical Device Descriptor * LDD == Logical Device Descriptor
* LDID == Logical Device ID * LDID == Logical Device ID
* *
...@@ -581,7 +581,7 @@ void SETUPX_CreateStandardLDDs(void) ...@@ -581,7 +581,7 @@ void SETUPX_CreateStandardLDDs(void)
} }
if (hKey) RegCloseKey(hKey); if (hKey) RegCloseKey(hKey);
} }
/*********************************************************************** /***********************************************************************
* CtlDelLdd (SETUPX.37) * CtlDelLdd (SETUPX.37)
* *
...@@ -619,7 +619,7 @@ RETERR16 SETUPX_DelLdd(LOGDISKID16 ldid) ...@@ -619,7 +619,7 @@ RETERR16 SETUPX_DelLdd(LOGDISKID16 ldid)
if (pCurr == pFirstLDD) if (pCurr == pFirstLDD)
pFirstLDD = NULL; pFirstLDD = NULL;
HeapFree(GetProcessHeap(), 0, pCurr); HeapFree(GetProcessHeap(), 0, pCurr);
return OK; return OK;
} }
...@@ -640,14 +640,14 @@ RETERR16 WINAPI CtlDelLdd16(LOGDISKID16 ldid) ...@@ -640,14 +640,14 @@ RETERR16 WINAPI CtlDelLdd16(LOGDISKID16 ldid)
* RETURN * RETURN
* ERR_VCP_LDDINVALID if pldd->cbSize != structsize * ERR_VCP_LDDINVALID if pldd->cbSize != structsize
* 1 in all other cases ?? * 1 in all other cases ??
* *
*/ */
RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC pldd) RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC pldd)
{ {
LDD_LIST *pCurr, *pPrev = NULL; LDD_LIST *pCurr, *pPrev = NULL;
TRACE("(%p)\n", pldd); TRACE("(%p)\n", pldd);
if (!std_LDDs_done) if (!std_LDDs_done)
SETUPX_CreateStandardLDDs(); SETUPX_CreateStandardLDDs();
...@@ -667,7 +667,7 @@ RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC pldd) ...@@ -667,7 +667,7 @@ RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC pldd)
memcpy(pldd, pCurr->pldd, pldd->cbSize); memcpy(pldd, pCurr->pldd, pldd->cbSize);
/* hmm, we probably ought to strcpy() the string ptrs here */ /* hmm, we probably ought to strcpy() the string ptrs here */
return 1; /* what is this ?? */ return 1; /* what is this ?? */
} }
...@@ -747,7 +747,7 @@ RETERR16 WINAPI CtlSetLdd16(LPLOGDISKDESC pldd) ...@@ -747,7 +747,7 @@ RETERR16 WINAPI CtlSetLdd16(LPLOGDISKDESC pldd)
if (!pFirstLDD) if (!pFirstLDD)
pFirstLDD = pCurr; pFirstLDD = pCurr;
} }
return OK; return OK;
} }
...@@ -773,7 +773,7 @@ RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC pldd) ...@@ -773,7 +773,7 @@ RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC pldd)
* *
* RETURN * RETURN
* ERR_VCP_LDDINVALID if pldd->cbSize != structsize * ERR_VCP_LDDINVALID if pldd->cbSize != structsize
* *
*/ */
static RETERR16 SETUPX_GetLdd(LPLOGDISKDESC pldd) static RETERR16 SETUPX_GetLdd(LPLOGDISKDESC pldd)
{ {
...@@ -845,7 +845,7 @@ RETERR16 WINAPI CtlSetLddPath16(LOGDISKID16 ldid, LPSTR szPath) ...@@ -845,7 +845,7 @@ RETERR16 WINAPI CtlSetLddPath16(LOGDISKID16 ldid, LPSTR szPath)
{ {
LOGDISKDESC_S ldd; LOGDISKDESC_S ldd;
TRACE("(%d, '%s');\n", ldid, szPath); TRACE("(%d, '%s');\n", ldid, szPath);
INIT_LDD(ldd, ldid); INIT_LDD(ldd, ldid);
ldd.pszPath = szPath; ldd.pszPath = szPath;
return CtlSetLdd16(&ldd); return CtlSetLdd16(&ldd);
...@@ -862,13 +862,13 @@ RETERR16 WINAPI CtlSetLddPath16(LOGDISKID16 ldid, LPSTR szPath) ...@@ -862,13 +862,13 @@ RETERR16 WINAPI CtlSetLddPath16(LOGDISKID16 ldid, LPSTR szPath)
* HKLM,"Software\Microsoft\Windows\CurrentVersion","ProgramFilesDir",,"C:\" * HKLM,"Software\Microsoft\Windows\CurrentVersion","ProgramFilesDir",,"C:\"
* -- registry lookup --> * -- registry lookup -->
* C:\Program Files (or C:\ if not found in registry) * C:\Program Files (or C:\ if not found in registry)
* *
* FIXME: * FIXME:
* - maybe we ought to add a caching array for speed ? - I don't care :) * - maybe we ought to add a caching array for speed ? - I don't care :)
* - not sure whether the processing is correct - sometimes there are equal * - not sure whether the processing is correct - sometimes there are equal
* LDIDs for both install and removal sections. * LDIDs for both install and removal sections.
* - probably the whole function can be removed as installers add that on their * - probably the whole function can be removed as installers add that on their
* own * own
*/ */
static BOOL SETUPX_AddCustomLDID(int ldid, INT16 hInf) static BOOL SETUPX_AddCustomLDID(int ldid, INT16 hInf)
{ {
...@@ -907,14 +907,12 @@ static BOOL SETUPX_AddCustomLDID(int ldid, INT16 hInf) ...@@ -907,14 +907,12 @@ static BOOL SETUPX_AddCustomLDID(int ldid, INT16 hInf)
{ /* found */ { /* found */
/* but we don't want entries in the strings section */ /* but we don't want entries in the strings section */
if (!strcasecmp(pSec, "Strings")) if (!strcasecmp(pSec, "Strings")) continue;
goto next_section;
p = pEqual+1; p = pEqual+1;
goto found; goto found;
} }
} }
} }
next_section:
} }
goto end; goto end;
found: found:
...@@ -971,9 +969,9 @@ static BOOL SETUPX_IP_TranslateLDID(int ldid, LPSTR *p, HINF16 hInf) ...@@ -971,9 +969,9 @@ static BOOL SETUPX_IP_TranslateLDID(int ldid, LPSTR *p, HINF16 hInf)
} }
else else
handled = TRUE; handled = TRUE;
SETUPX_GetLdd(&ldd); SETUPX_GetLdd(&ldd);
if (!handled) if (!handled)
{ {
FIXME("What is LDID %d ??\n", ldid); FIXME("What is LDID %d ??\n", ldid);
...@@ -995,7 +993,7 @@ void WINAPI GenFormStrWithoutPlaceHolders16( LPSTR szDst, LPCSTR szSrc, HINF16 h ...@@ -995,7 +993,7 @@ void WINAPI GenFormStrWithoutPlaceHolders16( LPSTR szDst, LPCSTR szSrc, HINF16 h
LPCSTR pSrc = szSrc, pSrcEnd = szSrc + strlen(szSrc); LPCSTR pSrc = szSrc, pSrcEnd = szSrc + strlen(szSrc);
LPSTR pDst = szDst, p, pPHBegin; LPSTR pDst = szDst, p, pPHBegin;
int count; int count;
TRACE("(%p, '%s', %04x);\n", szDst, szSrc, hInf); TRACE("(%p, '%s', %04x);\n", szDst, szSrc, hInf);
while (pSrc < pSrcEnd) while (pSrc < pSrcEnd)
{ {
...@@ -1030,7 +1028,7 @@ void WINAPI GenFormStrWithoutPlaceHolders16( LPSTR szDst, LPCSTR szSrc, HINF16 h ...@@ -1030,7 +1028,7 @@ void WINAPI GenFormStrWithoutPlaceHolders16( LPSTR szDst, LPCSTR szSrc, HINF16 h
in the [strings] section of the hInf */ in the [strings] section of the hInf */
DWORD ret; DWORD ret;
char buf[256]; /* long enough ? */ char buf[256]; /* long enough ? */
ret = GetPrivateProfileStringA("strings", placeholder, "", ret = GetPrivateProfileStringA("strings", placeholder, "",
buf, 256, IP_GetFileName(hInf)); buf, 256, IP_GetFileName(hInf));
if (ret) if (ret)
...@@ -1049,7 +1047,7 @@ void WINAPI GenFormStrWithoutPlaceHolders16( LPSTR szDst, LPCSTR szSrc, HINF16 h ...@@ -1049,7 +1047,7 @@ void WINAPI GenFormStrWithoutPlaceHolders16( LPSTR szDst, LPCSTR szSrc, HINF16 h
count = (int)p - (int)pPHBegin + 2; count = (int)p - (int)pPHBegin + 2;
strncpy(pDst, pPHBegin-1, count); strncpy(pDst, pPHBegin-1, count);
pDst += count; pDst += count;
} }
pSrc = p+1; pSrc = p+1;
continue; continue;
...@@ -1098,7 +1096,7 @@ static BOOL SETUPX_CopyFiles(LPSTR *pSub, HINF16 hInf) ...@@ -1098,7 +1096,7 @@ static BOOL SETUPX_CopyFiles(LPSTR *pSub, HINF16 hInf)
INIT_LDD(ldd, LDID_SRCPATH); INIT_LDD(ldd, LDID_SRCPATH);
SETUPX_GetLdd(&ldd); SETUPX_GetLdd(&ldd);
pSrcDir = ldd.pszPath; pSrcDir = ldd.pszPath;
/* get destination directory for that entry */ /* get destination directory for that entry */
if (!(GetPrivateProfileStringA("DestinationDirs", pCopyEntry, "", if (!(GetPrivateProfileStringA("DestinationDirs", pCopyEntry, "",
pDstStr, sizeof(pDstStr), filename))) pDstStr, sizeof(pDstStr), filename)))
...@@ -1120,7 +1118,7 @@ static BOOL SETUPX_CopyFiles(LPSTR *pSub, HINF16 hInf) ...@@ -1120,7 +1118,7 @@ static BOOL SETUPX_CopyFiles(LPSTR *pSub, HINF16 hInf)
} }
else else
pDstDir = pDstStr; pDstDir = pDstStr;
/* now that we have the destination dir, register file copying */ /* now that we have the destination dir, register file copying */
if (bSingle) if (bSingle)
...@@ -1157,7 +1155,7 @@ static BOOL SETUPX_CopyFiles(LPSTR *pSub, HINF16 hInf) ...@@ -1157,7 +1155,7 @@ static BOOL SETUPX_CopyFiles(LPSTR *pSub, HINF16 hInf)
SETUPX_FreeSubStrings(pSubFile); SETUPX_FreeSubStrings(pSubFile);
} }
} }
return TRUE; return TRUE;
} }
...@@ -1167,7 +1165,7 @@ static BOOL SETUPX_CopyFiles(LPSTR *pSub, HINF16 hInf) ...@@ -1167,7 +1165,7 @@ static BOOL SETUPX_CopyFiles(LPSTR *pSub, HINF16 hInf)
* generic installer function for .INF file sections * generic installer function for .INF file sections
* *
* This is not perfect - patch whenever you can ! * This is not perfect - patch whenever you can !
* *
* wFlags == GENINSTALL_DO_xxx * wFlags == GENINSTALL_DO_xxx
* e.g. NetMeeting: * e.g. NetMeeting:
* first call GENINSTALL_DO_REGSRCPATH | GENINSTALL_DO_FILES, * first call GENINSTALL_DO_REGSRCPATH | GENINSTALL_DO_FILES,
...@@ -1238,7 +1236,7 @@ RETERR16 WINAPI GenInstall16(HINF16 hInfFile, LPCSTR szInstallSection, WORD wFla ...@@ -1238,7 +1236,7 @@ RETERR16 WINAPI GenInstall16(HINF16 hInfFile, LPCSTR szInstallSection, WORD wFla
} }
#endif #endif
} }
SETUPX_FreeSubStrings(pSub); SETUPX_FreeSubStrings(pSub);
} }
HeapFree(GetProcessHeap(), 0, pEntries); HeapFree(GetProcessHeap(), 0, pEntries);
......
...@@ -515,8 +515,8 @@ DWORD WINAPI SHRestricted (DWORD pol) { ...@@ -515,8 +515,8 @@ DWORD WINAPI SHRestricted (DWORD pol) {
sh32_policy_table[polidx].cache = retval; sh32_policy_table[polidx].cache = retval;
} }
RegCloseKey(xhkey); RegCloseKey(xhkey);
} }
return retval; return retval;
} }
......
...@@ -92,7 +92,7 @@ ASPI_OpenDevice(SRB_ExecSCSICmd *prb) ...@@ -92,7 +92,7 @@ ASPI_OpenDevice(SRB_ExecSCSICmd *prb)
/* device is now open */ /* device is now open */
/* FIXME: Let users specify SCSI timeout in registry */ /* FIXME: Let users specify SCSI timeout in registry */
SCSI_LinuxSetTimeout( fd, SCSI_DEFAULT_TIMEOUT ); SCSI_LinuxSetTimeout( fd, SCSI_DEFAULT_TIMEOUT );
curr = HeapAlloc( GetProcessHeap(), 0, sizeof(ASPI_DEVICE_INFO) ); curr = HeapAlloc( GetProcessHeap(), 0, sizeof(ASPI_DEVICE_INFO) );
curr->fd = fd; curr->fd = fd;
curr->hostId = prb->SRB_HaId; curr->hostId = prb->SRB_HaId;
...@@ -309,7 +309,7 @@ ASPI_ExecScsiCmd(SRB_ExecSCSICmd *lpPRB) ...@@ -309,7 +309,7 @@ ASPI_ExecScsiCmd(SRB_ExecSCSICmd *lpPRB)
((lpPRB->SRB_Flags & 0x18) == 0x18) ((lpPRB->SRB_Flags & 0x18) == 0x18)
) && lpPRB->SRB_BufLen ) && lpPRB->SRB_BufLen
) { ) {
FIXME("command 0x%02x, no data transfer specified, but buflen is %ld!!!\n",lpPRB->CDBByte[0],lpPRB->SRB_BufLen); FIXME("command 0x%02x, no data transfer specified, but buflen is %ld!!!\n",lpPRB->CDBByte[0],lpPRB->SRB_BufLen);
} }
break; break;
} }
...@@ -430,14 +430,14 @@ ASPI_ExecScsiCmd(SRB_ExecSCSICmd *lpPRB) ...@@ -430,14 +430,14 @@ ASPI_ExecScsiCmd(SRB_ExecSCSICmd *lpPRB)
return SS_COMP; /* some junk expects ss_comp here. */ return SS_COMP; /* some junk expects ss_comp here. */
/*FALLTHROUGH*/ /*FALLTHROUGH*/
default: default:
/*FALLTHROUGH*/ break;
} }
/* In real WNASPI32 stuff really is always pending because ASPI does things /* In real WNASPI32 stuff really is always pending because ASPI does things
in the background, but we are not doing that (yet) */ in the background, but we are not doing that (yet) */
return ret; return ret;
error_exit: error_exit:
SRB_Status = SS_ERR; SRB_Status = SS_ERR;
if (error_code == EBUSY) { if (error_code == EBUSY) {
...@@ -467,7 +467,7 @@ error_exit: ...@@ -467,7 +467,7 @@ error_exit:
* RETURNS * RETURNS
* HIWORD: 0. * HIWORD: 0.
* HIBYTE of LOWORD: status (SS_COMP or SS_FAILED_INIT) * HIBYTE of LOWORD: status (SS_COMP or SS_FAILED_INIT)
* LOBYTE of LOWORD: # of host adapters. * LOBYTE of LOWORD: # of host adapters.
*/ */
DWORD __cdecl GetASPI32SupportInfo(void) DWORD __cdecl GetASPI32SupportInfo(void)
{ {
...@@ -508,7 +508,7 @@ DWORD __cdecl SendASPI32Command(LPSRB lpSRB) ...@@ -508,7 +508,7 @@ DWORD __cdecl SendASPI32Command(LPSRB lpSRB)
/* Copy header */ /* Copy header */
memcpy(&tmpsrb.common,&(lpSRB->common),sizeof(tmpsrb.common)); memcpy(&tmpsrb.common,&(lpSRB->common),sizeof(tmpsrb.common));
tmpsrb.cmd.SRB_Flags |= 8; /* target to host */ tmpsrb.cmd.SRB_Flags |= 8; /* target to host */
tmpsrb.cmd.SRB_Cmd = SC_EXEC_SCSI_CMD; tmpsrb.cmd.SRB_Cmd = SC_EXEC_SCSI_CMD;
tmpsrb.cmd.SRB_Target = lpSRB->devtype.SRB_Target; tmpsrb.cmd.SRB_Target = lpSRB->devtype.SRB_Target;
...@@ -540,7 +540,7 @@ DWORD __cdecl SendASPI32Command(LPSRB lpSRB) ...@@ -540,7 +540,7 @@ DWORD __cdecl SendASPI32Command(LPSRB lpSRB)
FIXME("Not implemented SC_RESET_DEV\n"); FIXME("Not implemented SC_RESET_DEV\n");
break; break;
case SC_GET_DISK_INFO: case SC_GET_DISK_INFO:
/* here we have to find out the int13 / bios association. /* here we have to find out the int13 / bios association.
* We just say we do not have any. * We just say we do not have any.
*/ */
FIXME("SC_GET_DISK_INFO always return 'int13 unassociated disk'.\n"); FIXME("SC_GET_DISK_INFO always return 'int13 unassociated disk'.\n");
...@@ -573,10 +573,10 @@ DWORD __cdecl GetASPI32DLLVersion(void) ...@@ -573,10 +573,10 @@ DWORD __cdecl GetASPI32DLLVersion(void)
/*********************************************************************** /***********************************************************************
* GetASPI32Buffer (WNASPI32.8) * GetASPI32Buffer (WNASPI32.8)
* Supposed to return a DMA capable large SCSI buffer. * Supposed to return a DMA capable large SCSI buffer.
* Our implementation does not use those at all, all buffer stuff is * Our implementation does not use those at all, all buffer stuff is
* done in the kernel SG device layer. So we just heapalloc the buffer. * done in the kernel SG device layer. So we just heapalloc the buffer.
*/ */
BOOL __cdecl GetASPI32Buffer(PASPI32BUFF pab) BOOL __cdecl GetASPI32Buffer(PASPI32BUFF pab)
{ {
pab->AB_BufPointer = HeapAlloc(GetProcessHeap(), pab->AB_BufPointer = HeapAlloc(GetProcessHeap(),
pab->AB_ZeroFill?HEAP_ZERO_MEMORY:0, pab->AB_ZeroFill?HEAP_ZERO_MEMORY:0,
......
...@@ -447,7 +447,7 @@ lend: ...@@ -447,7 +447,7 @@ lend:
* NULL on failure * NULL on failure
* *
*/ */
INTERNETAPI HINTERNET WINAPI FtpFindFirstFileA(HINTERNET hConnect, HINTERNET WINAPI FtpFindFirstFileA(HINTERNET hConnect,
LPCSTR lpszSearchFile, LPWIN32_FIND_DATAA lpFindFileData, DWORD dwFlags, DWORD dwContext) LPCSTR lpszSearchFile, LPWIN32_FIND_DATAA lpFindFileData, DWORD dwFlags, DWORD dwContext)
{ {
LPWININETFTPSESSIONA lpwfs = (LPWININETFTPSESSIONA) hConnect; LPWININETFTPSESSIONA lpwfs = (LPWININETFTPSESSIONA) hConnect;
...@@ -492,7 +492,7 @@ INTERNETAPI HINTERNET WINAPI FtpFindFirstFileA(HINTERNET hConnect, ...@@ -492,7 +492,7 @@ INTERNETAPI HINTERNET WINAPI FtpFindFirstFileA(HINTERNET hConnect,
* NULL on failure * NULL on failure
* *
*/ */
INTERNETAPI HINTERNET WINAPI FTP_FtpFindFirstFileA(HINTERNET hConnect, HINTERNET WINAPI FTP_FtpFindFirstFileA(HINTERNET hConnect,
LPCSTR lpszSearchFile, LPWIN32_FIND_DATAA lpFindFileData, DWORD dwFlags, DWORD dwContext) LPCSTR lpszSearchFile, LPWIN32_FIND_DATAA lpFindFileData, DWORD dwFlags, DWORD dwContext)
{ {
INT nResCode; INT nResCode;
...@@ -710,7 +710,7 @@ lend: ...@@ -710,7 +710,7 @@ lend:
* NULL on failure * NULL on failure
* *
*/ */
INTERNETAPI HINTERNET WINAPI FtpOpenFileA(HINTERNET hFtpSession, HINTERNET WINAPI FtpOpenFileA(HINTERNET hFtpSession,
LPCSTR lpszFileName, DWORD fdwAccess, DWORD dwFlags, LPCSTR lpszFileName, DWORD fdwAccess, DWORD dwFlags,
DWORD dwContext) DWORD dwContext)
{ {
......
...@@ -80,7 +80,7 @@ inline static LPSTR HTTP_strdup( LPCSTR str ) ...@@ -80,7 +80,7 @@ inline static LPSTR HTTP_strdup( LPCSTR str )
* FALSE on failure * FALSE on failure
* *
*/ */
INTERNETAPI BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest, BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest,
LPCSTR lpszHeader, DWORD dwHeaderLength, DWORD dwModifier) LPCSTR lpszHeader, DWORD dwHeaderLength, DWORD dwModifier)
{ {
LPSTR lpszStart; LPSTR lpszStart;
...@@ -137,7 +137,7 @@ INTERNETAPI BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest, ...@@ -137,7 +137,7 @@ INTERNETAPI BOOL WINAPI HttpAddRequestHeadersA(HINTERNET hHttpRequest,
* NULL on failure * NULL on failure
* *
*/ */
INTERNETAPI HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession, HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession,
LPCSTR lpszVerb, LPCSTR lpszObjectName, LPCSTR lpszVersion, LPCSTR lpszVerb, LPCSTR lpszObjectName, LPCSTR lpszVersion,
LPCSTR lpszReferrer , LPCSTR *lpszAcceptTypes, LPCSTR lpszReferrer , LPCSTR *lpszAcceptTypes,
DWORD dwFlags, DWORD dwContext) DWORD dwFlags, DWORD dwContext)
...@@ -189,7 +189,7 @@ INTERNETAPI HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession, ...@@ -189,7 +189,7 @@ INTERNETAPI HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession,
* NULL on failure * NULL on failure
* *
*/ */
INTERNETAPI HINTERNET WINAPI HTTP_HttpOpenRequestA(HINTERNET hHttpSession, HINTERNET WINAPI HTTP_HttpOpenRequestA(HINTERNET hHttpSession,
LPCSTR lpszVerb, LPCSTR lpszObjectName, LPCSTR lpszVersion, LPCSTR lpszVerb, LPCSTR lpszObjectName, LPCSTR lpszVersion,
LPCSTR lpszReferrer , LPCSTR *lpszAcceptTypes, LPCSTR lpszReferrer , LPCSTR *lpszAcceptTypes,
DWORD dwFlags, DWORD dwContext) DWORD dwFlags, DWORD dwContext)
......
...@@ -139,7 +139,7 @@ WININET_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -139,7 +139,7 @@ WININET_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
* NULL on failure * NULL on failure
* *
*/ */
INTERNETAPI HINTERNET WINAPI InternetOpenA(LPCSTR lpszAgent, HINTERNET WINAPI InternetOpenA(LPCSTR lpszAgent,
DWORD dwAccessType, LPCSTR lpszProxy, DWORD dwAccessType, LPCSTR lpszProxy,
LPCSTR lpszProxyBypass, DWORD dwFlags) LPCSTR lpszProxyBypass, DWORD dwFlags)
{ {
...@@ -242,7 +242,7 @@ BOOL WINAPI InternetGetConnectedState(LPDWORD lpdwStatus, DWORD dwReserved) ...@@ -242,7 +242,7 @@ BOOL WINAPI InternetGetConnectedState(LPDWORD lpdwStatus, DWORD dwReserved)
* NULL on failure * NULL on failure
* *
*/ */
INTERNETAPI HINTERNET WINAPI InternetConnectA(HINTERNET hInternet, HINTERNET WINAPI InternetConnectA(HINTERNET hInternet,
LPCSTR lpszServerName, INTERNET_PORT nServerPort, LPCSTR lpszServerName, INTERNET_PORT nServerPort,
LPCSTR lpszUserName, LPCSTR lpszPassword, LPCSTR lpszUserName, LPCSTR lpszPassword,
DWORD dwService, DWORD dwFlags, DWORD dwContext) DWORD dwService, DWORD dwFlags, DWORD dwContext)
...@@ -707,7 +707,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags, ...@@ -707,7 +707,7 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
* Error value on failure * Error value on failure
* *
*/ */
INTERNETAPI DWORD WINAPI InternetAttemptConnect(DWORD dwReserved) DWORD WINAPI InternetAttemptConnect(DWORD dwReserved)
{ {
FIXME("Stub\n"); FIXME("Stub\n");
return ERROR_SUCCESS; return ERROR_SUCCESS;
...@@ -752,7 +752,7 @@ BOOL WINAPI InternetCanonicalizeUrlA(LPCSTR lpszUrl, LPSTR lpszBuffer, ...@@ -752,7 +752,7 @@ BOOL WINAPI InternetCanonicalizeUrlA(LPCSTR lpszUrl, LPSTR lpszBuffer,
* INTERNET_INVALID_STATUS_CALLBACK on failure * INTERNET_INVALID_STATUS_CALLBACK on failure
* *
*/ */
INTERNETAPI INTERNET_STATUS_CALLBACK WINAPI InternetSetStatusCallback( INTERNET_STATUS_CALLBACK WINAPI InternetSetStatusCallback(
HINTERNET hInternet ,INTERNET_STATUS_CALLBACK lpfnIntCB) HINTERNET hInternet ,INTERNET_STATUS_CALLBACK lpfnIntCB)
{ {
INTERNET_STATUS_CALLBACK retVal; INTERNET_STATUS_CALLBACK retVal;
...@@ -1470,7 +1470,7 @@ LPSTR INTERNET_GetNextLine(INT nSocket, LPSTR lpszBuffer, LPDWORD dwBuffer) ...@@ -1470,7 +1470,7 @@ LPSTR INTERNET_GetNextLine(INT nSocket, LPSTR lpszBuffer, LPDWORD dwBuffer)
{ {
INTERNET_SetLastError(ERROR_INTERNET_TIMEOUT); INTERNET_SetLastError(ERROR_INTERNET_TIMEOUT);
goto lend; goto lend;
} }
} }
lend: lend:
......
...@@ -40,8 +40,8 @@ static void convert_mode(XDGAMode *mode, LPDDHALMODEINFO info) ...@@ -40,8 +40,8 @@ static void convert_mode(XDGAMode *mode, LPDDHALMODEINFO info)
info->dwGBitMask = mode->greenMask; info->dwGBitMask = mode->greenMask;
info->dwBBitMask = mode->blueMask; info->dwBBitMask = mode->blueMask;
info->dwAlphaBitMask = 0; info->dwAlphaBitMask = 0;
TRACE(" width=%ld, height=%ld, bpp=%ld, refresh=%d\n", \ TRACE(" width=%ld, height=%ld, bpp=%ld, refresh=%d\n",
info->dwWidth, info->dwHeight, info->dwBPP, info->wRefreshRate); \ info->dwWidth, info->dwHeight, info->dwBPP, info->wRefreshRate);
} }
void X11DRV_XF86DGA2_Init(void) void X11DRV_XF86DGA2_Init(void)
......
...@@ -32,30 +32,40 @@ LPDDHALMODEINFO xf86vm_modes; ...@@ -32,30 +32,40 @@ LPDDHALMODEINFO xf86vm_modes;
unsigned xf86vm_mode_count; unsigned xf86vm_mode_count;
XF86VidModeModeInfo** modes; XF86VidModeModeInfo** modes;
#define CONVERT_MODE(dotclock) \ static void convert_modeinfo( const XF86VidModeModeInfo *mode, LPDDHALMODEINFO info )
info->dwWidth = mode->hdisplay; \
info->dwHeight = mode->vdisplay; \
info->wRefreshRate = dotclock * 1000 / (mode->htotal * mode->vtotal); \
TRACE(" width=%ld, height=%ld, refresh=%d\n", \
info->dwWidth, info->dwHeight, info->wRefreshRate); \
/* XVidMode cannot change display depths... */ \
/* let's not bother with filling out these then... */ \
info->lPitch = 0; \
info->dwBPP = 0; \
info->wFlags = 0; \
info->dwRBitMask = 0; \
info->dwGBitMask = 0; \
info->dwBBitMask = 0; \
info->dwAlphaBitMask = 0;
static void convert_modeinfo(XF86VidModeModeInfo *mode, LPDDHALMODEINFO info)
{ {
CONVERT_MODE(mode->dotclock) info->dwWidth = mode->hdisplay;
info->dwHeight = mode->vdisplay;
info->wRefreshRate = mode->dotclock * 1000 / (mode->htotal * mode->vtotal);
TRACE(" width=%ld, height=%ld, refresh=%d\n",
info->dwWidth, info->dwHeight, info->wRefreshRate);
/* XVidMode cannot change display depths... */
/* let's not bother with filling out these then... */
info->lPitch = 0;
info->dwBPP = 0;
info->wFlags = 0;
info->dwRBitMask = 0;
info->dwGBitMask = 0;
info->dwBBitMask = 0;
info->dwAlphaBitMask = 0;
} }
static void convert_modeline(int dotclock, XF86VidModeModeLine *mode, LPDDHALMODEINFO info) static void convert_modeline(int dotclock, const XF86VidModeModeLine *mode, LPDDHALMODEINFO info)
{ {
CONVERT_MODE(dotclock) info->dwWidth = mode->hdisplay;
info->dwHeight = mode->vdisplay;
info->wRefreshRate = dotclock * 1000 / (mode->htotal * mode->vtotal);
TRACE(" width=%ld, height=%ld, refresh=%d\n",
info->dwWidth, info->dwHeight, info->wRefreshRate);
/* XVidMode cannot change display depths... */
/* let's not bother with filling out these then... */
info->lPitch = 0;
info->dwBPP = 0;
info->wFlags = 0;
info->dwRBitMask = 0;
info->dwGBitMask = 0;
info->dwBBitMask = 0;
info->dwAlphaBitMask = 0;
} }
void X11DRV_XF86VM_Init(void) void X11DRV_XF86VM_Init(void)
...@@ -206,7 +216,7 @@ static BOOL ComputeGammaFromRamp(WORD ramp[256], float *gamma) ...@@ -206,7 +216,7 @@ static BOOL ComputeGammaFromRamp(WORD ramp[256], float *gamma)
/* compute min & max while compensating for estimated error */ /* compute min & max while compensating for estimated error */
if (!g_n || g_min > (r_v + r_e)) g_min = r_v + r_e; if (!g_n || g_min > (r_v + r_e)) g_min = r_v + r_e;
if (!g_n || g_max < (r_v - r_e)) g_max = r_v - r_e; if (!g_n || g_max < (r_v - r_e)) g_max = r_v - r_e;
/* add to average */ /* add to average */
g_avg += r_v; g_avg += r_v;
g_n++; g_n++;
...@@ -287,7 +297,7 @@ BOOL X11DRV_XF86VM_SetGammaRamp(LPDDGAMMARAMP ramp) ...@@ -287,7 +297,7 @@ BOOL X11DRV_XF86VM_SetGammaRamp(LPDDGAMMARAMP ramp)
* *
* FIXME: should move to somewhere appropriate, but probably not before * FIXME: should move to somewhere appropriate, but probably not before
* the stuff in graphics/x11drv/ has been moved to dlls/x11drv, so that * the stuff in graphics/x11drv/ has been moved to dlls/x11drv, so that
* they can include xvidmode.h directly * they can include xvidmode.h directly
*/ */
BOOL X11DRV_GetDeviceGammaRamp(DC *dc, LPVOID ramp) BOOL X11DRV_GetDeviceGammaRamp(DC *dc, LPVOID ramp)
{ {
...@@ -303,7 +313,7 @@ BOOL X11DRV_GetDeviceGammaRamp(DC *dc, LPVOID ramp) ...@@ -303,7 +313,7 @@ BOOL X11DRV_GetDeviceGammaRamp(DC *dc, LPVOID ramp)
* *
* FIXME: should move to somewhere appropriate, but probably not before * FIXME: should move to somewhere appropriate, but probably not before
* the stuff in graphics/x11drv/ has been moved to dlls/x11drv, so that * the stuff in graphics/x11drv/ has been moved to dlls/x11drv, so that
* they can include xvidmode.h directly * they can include xvidmode.h directly
*/ */
BOOL X11DRV_SetDeviceGammaRamp(DC *dc, LPVOID ramp) BOOL X11DRV_SetDeviceGammaRamp(DC *dc, LPVOID ramp)
{ {
......
...@@ -131,7 +131,7 @@ BOOL WINAPI Arc( HDC hdc, INT left, INT top, INT right, ...@@ -131,7 +131,7 @@ BOOL WINAPI Arc( HDC hdc, INT left, INT top, INT right,
else if (dc->funcs->pArc) else if (dc->funcs->pArc)
ret = dc->funcs->pArc(dc,left,top,right,bottom,xstart,ystart,xend,yend); ret = dc->funcs->pArc(dc,left,top,right,bottom,xstart,ystart,xend,yend);
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );
} }
return ret; return ret;
} }
...@@ -295,7 +295,7 @@ BOOL WINAPI Rectangle( HDC hdc, INT left, INT top, ...@@ -295,7 +295,7 @@ BOOL WINAPI Rectangle( HDC hdc, INT left, INT top,
else if (dc->funcs->pRectangle) else if (dc->funcs->pRectangle)
ret = dc->funcs->pRectangle(dc,left,top,right,bottom); ret = dc->funcs->pRectangle(dc,left,top,right,bottom);
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );
} }
return ret; return ret;
} }
...@@ -365,9 +365,9 @@ BOOL WINAPI SetPixelV( HDC hdc, INT x, INT y, COLORREF color ) ...@@ -365,9 +365,9 @@ BOOL WINAPI SetPixelV( HDC hdc, INT x, INT y, COLORREF color )
{ {
if (dc->funcs->pSetPixel) if (dc->funcs->pSetPixel)
{ {
dc->funcs->pSetPixel(dc,x,y,color); dc->funcs->pSetPixel(dc,x,y,color);
ret = TRUE; ret = TRUE;
} }
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );
} }
return ret; return ret;
...@@ -642,11 +642,11 @@ BOOL WINAPI FrameRgn( HDC hdc, HRGN hrgn, HBRUSH hbrush, ...@@ -642,11 +642,11 @@ BOOL WINAPI FrameRgn( HDC hdc, HRGN hrgn, HBRUSH hbrush,
{ {
if (REGION_FrameRgn( tmp, hrgn, nWidth, nHeight )) if (REGION_FrameRgn( tmp, hrgn, nWidth, nHeight ))
{ {
FillRgn( hdc, tmp, hbrush ); FillRgn( hdc, tmp, hbrush );
ret = TRUE; ret = TRUE;
} }
DeleteObject( tmp ); DeleteObject( tmp );
} }
} }
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );
return ret; return ret;
...@@ -787,7 +787,7 @@ BOOL WINAPI Polygon( HDC hdc, const POINT* pt, INT count ) ...@@ -787,7 +787,7 @@ BOOL WINAPI Polygon( HDC hdc, const POINT* pt, INT count )
if (PATH_IsPathOpen(dc->path)) ret = PATH_Polygon(dc, pt, count); if (PATH_IsPathOpen(dc->path)) ret = PATH_Polygon(dc, pt, count);
else if (dc->funcs->pPolygon) ret = dc->funcs->pPolygon(dc,pt,count); else if (dc->funcs->pPolygon) ret = dc->funcs->pPolygon(dc,pt,count);
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );
} }
return ret; return ret;
} }
...@@ -853,7 +853,7 @@ BOOL WINAPI PolyPolyline( HDC hdc, const POINT* pt, const DWORD* counts, ...@@ -853,7 +853,7 @@ BOOL WINAPI PolyPolyline( HDC hdc, const POINT* pt, const DWORD* counts,
if (PATH_IsPathOpen(dc->path)) ret = PATH_PolyPolyline(dc, pt, counts, polylines); if (PATH_IsPathOpen(dc->path)) ret = PATH_PolyPolyline(dc, pt, counts, polylines);
else if (dc->funcs->pPolyPolyline) ret = dc->funcs->pPolyPolyline(dc,pt,counts,polylines); else if (dc->funcs->pPolyPolyline) ret = dc->funcs->pPolyPolyline(dc,pt,counts,polylines);
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );
} }
return ret; return ret;
} }
...@@ -879,7 +879,7 @@ BOOL WINAPI ExtFloodFill( HDC hdc, INT x, INT y, COLORREF color, ...@@ -879,7 +879,7 @@ BOOL WINAPI ExtFloodFill( HDC hdc, INT x, INT y, COLORREF color,
{ {
if (dc->funcs->pExtFloodFill) ret = dc->funcs->pExtFloodFill(dc,x,y,color,fillType); if (dc->funcs->pExtFloodFill) ret = dc->funcs->pExtFloodFill(dc,x,y,color,fillType);
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );
} }
return ret; return ret;
} }
...@@ -963,12 +963,12 @@ BOOL WINAPI PolyBezier( HDC hdc, const POINT* lppt, DWORD cPoints ) ...@@ -963,12 +963,12 @@ BOOL WINAPI PolyBezier( HDC hdc, const POINT* lppt, DWORD cPoints )
if ((Pts = GDI_Bezier( lppt, cPoints, &nOut ))) if ((Pts = GDI_Bezier( lppt, cPoints, &nOut )))
{ {
TRACE("Pts = %p, no = %d\n", Pts, nOut); TRACE("Pts = %p, no = %d\n", Pts, nOut);
ret = Polyline( dc->hSelf, Pts, nOut ); ret = Polyline( dc->hSelf, Pts, nOut );
HeapFree( GetProcessHeap(), 0, Pts ); HeapFree( GetProcessHeap(), 0, Pts );
}
} }
}
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );
return ret; return ret;
} }
......
...@@ -460,7 +460,7 @@ static int do_bitop( int s, int d, int rop ) ...@@ -460,7 +460,7 @@ static int do_bitop( int s, int d, int rop )
return res & 1; return res & 1;
} }
main() int main()
{ {
int rop, i, res, src, dst, pat, tmp, dstUsed; int rop, i, res, src, dst, pat, tmp, dstUsed;
const BYTE *opcode; const BYTE *opcode;
...@@ -516,6 +516,8 @@ main() ...@@ -516,6 +516,8 @@ main()
} }
if (res != rop) printf( "%02x: ERROR, res=%02x\n", rop, res ); if (res != rop) printf( "%02x: ERROR, res=%02x\n", rop, res );
} }
return 0;
} }
#endif /* BITBLT_TEST */ #endif /* BITBLT_TEST */
......
...@@ -136,17 +136,15 @@ static struct ...@@ -136,17 +136,15 @@ static struct
/* palette indexes, but system colors that will be converted to */ /* palette indexes, but system colors that will be converted to */
/* indexes later on. */ /* indexes later on. */
#ifdef HAVE_LIBXXPM #ifndef HAVE_LIBXXPM
static XpmColorSymbol typedef struct {
#else /* defined(HAVE_LIBXXPM) */
static struct
{
char *name; char *name;
char *value; char *value;
Pixel pixel; Pixel pixel;
} } XpmColorSymbol;
#endif /* defined(HAVE_LIBXXPM) */ #endif /* !defined(HAVE_LIBXXPM) */
OBM_Colors[] =
static XpmColorSymbol OBM_Colors[] =
{ {
{ "black", NULL, (Pixel)RGB(0,0,0) }, { "black", NULL, (Pixel)RGB(0,0,0) },
{ "white", NULL, (Pixel)RGB(255,255,255) }, { "white", NULL, (Pixel)RGB(255,255,255) },
......
...@@ -313,8 +313,8 @@ void WINAPI INT_Int10Handler( CONTEXT86 *context ) ...@@ -313,8 +313,8 @@ void WINAPI INT_Int10Handler( CONTEXT86 *context )
FIXME("VESA Function (0x%x) - Not Supported\n", AH_reg(context)); FIXME("VESA Function (0x%x) - Not Supported\n", AH_reg(context));
break; break;
} }
} }
else { else {
switch(AH_reg(context)) { switch(AH_reg(context)) {
...@@ -757,7 +757,7 @@ else { ...@@ -757,7 +757,7 @@ else {
FIXME("Unknown - 0x%x\n", AH_reg(context)); FIXME("Unknown - 0x%x\n", AH_reg(context));
INT_BARF( context, 0x10 ); INT_BARF( context, 0x10 );
} }
} }
} }
static void conv_text_mode_attributes(char attribute, int *fg, int *bg, static void conv_text_mode_attributes(char attribute, int *fg, int *bg,
......
...@@ -424,7 +424,7 @@ BOOL WINAPI PtVisible( HDC hdc, INT x, INT y ) ...@@ -424,7 +424,7 @@ BOOL WINAPI PtVisible( HDC hdc, INT x, INT y )
{ {
ret = PtInRegion( dc->hGCClipRgn, XLPTODP(dc,x) + dc->DCOrgX, ret = PtInRegion( dc->hGCClipRgn, XLPTODP(dc,x) + dc->DCOrgX,
YLPTODP(dc,y) + dc->DCOrgY ); YLPTODP(dc,y) + dc->DCOrgY );
} }
GDI_ReleaseObj( hdc ); GDI_ReleaseObj( hdc );
return ret; return ret;
} }
......
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