From d628f43693f4e9cbea226ce08b54639c7c659fd4 Mon Sep 17 00:00:00 2001 From: Patrik Stridvall Date: Fri, 24 Mar 2000 20:42:08 +0000 Subject: [PATCH] Fixed some ANSI C violations. --- dlls/ntdll/signal_i386.c | 8 +++++--- dlls/ole32/storage32.c | 8 ++++---- dlls/shell32/shlview.c | 4 +++- include/winnt.h | 1 + ole/ole2nls.c | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 0974808d307..02a932b0a96 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -579,7 +579,7 @@ static HANDLER_DEF(trap_handler) context.EFlags &= ~0x100; /* clear single-step flag */ break; case T_BPTFLT: /* Breakpoint exception */ - rec.ExceptionAddress--; /* back up over the int3 instruction */ + rec.ExceptionAddress = (char *) rec.ExceptionAddress - 1; /* back up over the int3 instruction */ /* fall through */ default: rec.ExceptionCode = EXCEPTION_BREAKPOINT; @@ -732,11 +732,13 @@ BOOL SIGNAL_Init(void) /********************************************************************** * DbgBreakPoint (NTDLL) */ -__ASM_GLOBAL_FUNC( DbgBreakPoint, "int3; ret"); +void WINAPI DbgBreakPoint(void); +__ASM_GLOBAL_FUNC( DbgBreakPoint, "int $3; ret"); /********************************************************************** * DbgUserBreakPoint (NTDLL) */ -__ASM_GLOBAL_FUNC( DbgUserBreakPoint, "int3; ret"); +void WINAPI DbgUserBreakPoint(void); +__ASM_GLOBAL_FUNC( DbgUserBreakPoint, "int $3; ret"); #endif /* __i386__ */ diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index f5b701e9e11..c12d1a438e1 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -49,7 +49,7 @@ typedef struct DWORD dwOleObjFileNameLength; DWORD dwMetaFileWidth; DWORD dwMetaFileHeight; - CHAR strUnknown[8]; //don't know what is this 8 byts information in OLE stream. + CHAR strUnknown[8]; /* don't know what is this 8 byts information in OLE stream. */ DWORD dwDataLength; BYTE *pData; }OLECONVERT_OLESTREAM_DATA; @@ -6004,7 +6004,7 @@ HRESULT OLECONVERT_LoadOLE10(LPOLESTREAM pOleStream, OLECONVERT_OLESTREAM_DATA * } if(hRes == S_OK) { - if(pData->dwOleObjFileNameLength < 1) //there is no file name exist + if(pData->dwOleObjFileNameLength < 1) /* there is no file name exist */ pData->dwOleObjFileNameLength = sizeof(pData->dwOleObjFileNameLength); pData->pstrOleObjFileName = (CHAR *)malloc(pData->dwOleObjFileNameLength); if(pData->pstrOleObjFileName) @@ -6047,9 +6047,9 @@ HRESULT OLECONVERT_LoadOLE10(LPOLESTREAM pOleStream, OLECONVERT_OLESTREAM_DATA * } } - if(hRes == S_OK) // I don't know what is this 8 byts information is we have to figure out + if(hRes == S_OK) /* I don't know what is this 8 byts information is we have to figure out */ { - if(!bStrem1) //if it is a second OLE stream data + if(!bStrem1) /* if it is a second OLE stream data */ { pData->dwDataLength -= 8; dwSize = pOleStream->lpstbl->Get(pOleStream, (void *)(pData->strUnknown), sizeof(pData->strUnknown)); diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 731149aa98b..63dbdf89434 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -1284,7 +1284,9 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn msg.pt = 0;*/ LPNMLVKEYDOWN plvKeyDown = (LPNMLVKEYDOWN) lpnmh; -// TranslateAccelerator(This->hWnd, This->hAccel, &msg) +#if 0 + TranslateAccelerator(This->hWnd, This->hAccel, &msg) +#endif FIXME("LVN_KEYDOWN key=0x%08x\n",plvKeyDown->wVKey); } break; diff --git a/include/winnt.h b/include/winnt.h index 50cd63d995c..b26f40b18be 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -1070,6 +1070,7 @@ typedef struct _NT_TIB struct _TEB; #if defined(__i386__) && defined(__GNUC__) +extern inline struct _TEB * WINAPI NtCurrentTeb(void); extern inline struct _TEB * WINAPI NtCurrentTeb(void) { struct _TEB *teb; diff --git a/ole/ole2nls.c b/ole/ole2nls.c index aa2e28b1352..783431add7a 100644 --- a/ole/ole2nls.c +++ b/ole/ole2nls.c @@ -3616,7 +3616,7 @@ INT WINAPI GetNumberFormatA(LCID locale, DWORD dwflags, *(roundbuffer+1)='0'; } else *roundbuffer='0'; - dptr=roundbuffer+(sptr-lpValue); // +1-1 + dptr=roundbuffer+(sptr-lpValue); /* +1-1 */ while ( (++*dptr) > '9') { *(dptr--)='0';