mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
winedos: Remove superfluous pointer casts.
This commit is contained in:
parent
f75f4e431f
commit
c6be3fea10
@ -196,7 +196,7 @@ static void WINAPI ASPI_DOS_func(CONTEXT86 *context)
|
||||
*/
|
||||
void WINAPI DOSVM_ASPIHandler( CONTEXT86 *context )
|
||||
{
|
||||
FARPROC16 *p = (FARPROC16 *)CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx);
|
||||
FARPROC16 *p = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx);
|
||||
TRACE("DOS ASPI opening\n");
|
||||
if ((CX_reg(context) == 4) || (CX_reg(context) == 5))
|
||||
{
|
||||
|
@ -1249,7 +1249,7 @@ void WINAPI DOSVM_Int10Handler( CONTEXT86 *context )
|
||||
BYTE *pt;
|
||||
|
||||
TRACE("Set Block of DAC registers\n");
|
||||
pt = (BYTE*)CTX_SEG_OFF_TO_LIN(context,context->SegEs,context->Edx);
|
||||
pt = CTX_SEG_OFF_TO_LIN(context,context->SegEs,context->Edx);
|
||||
for (i=0;i<CX_reg(context);i++)
|
||||
{
|
||||
paldat.peRed = (*(pt+i*3+0)) << 2;
|
||||
|
@ -1213,8 +1213,8 @@ static BYTE *INT21_GetCurrentDTA( CONTEXT86 *context )
|
||||
TDB *pTask = GlobalLock16(GetCurrentTask());
|
||||
|
||||
/* FIXME: This assumes DTA was set correctly! */
|
||||
return (BYTE *)CTX_SEG_OFF_TO_LIN( context, SELECTOROF(pTask->dta),
|
||||
(DWORD)OFFSETOF(pTask->dta) );
|
||||
return CTX_SEG_OFF_TO_LIN( context, SELECTOROF(pTask->dta),
|
||||
OFFSETOF(pTask->dta) );
|
||||
}
|
||||
|
||||
|
||||
@ -1978,9 +1978,8 @@ static void INT21_ExtendedCountryInformation( CONTEXT86 *context )
|
||||
case 0xa1: /* CAPITALIZE COUNTED FILENAME STRING */
|
||||
TRACE("Convert string to uppercase with length\n");
|
||||
{
|
||||
char *ptr = (char *)CTX_SEG_OFF_TO_LIN( context,
|
||||
context->SegDs,
|
||||
context->Edx );
|
||||
char *ptr = CTX_SEG_OFF_TO_LIN( context, context->SegDs,
|
||||
context->Edx );
|
||||
WORD len = CX_reg(context);
|
||||
while (len--) { *ptr = toupper(*ptr); ptr++; }
|
||||
}
|
||||
@ -3117,9 +3116,8 @@ static void INT21_LongFilename( CONTEXT86 *context )
|
||||
|
||||
MultiByteToWideChar(CP_OEMCP, 0, pathA, -1, pathW, MAX_PATH);
|
||||
handle = FindFirstFileW(pathW, &dataW);
|
||||
|
||||
dataA = (WIN32_FIND_DATAA *)CTX_SEG_OFF_TO_LIN(context, context->SegEs,
|
||||
context->Edi);
|
||||
|
||||
dataA = CTX_SEG_OFF_TO_LIN(context, context->SegEs, context->Edi);
|
||||
if (handle != INVALID_HANDLE_VALUE &&
|
||||
(h16 = GlobalAlloc16(GMEM_MOVEABLE, sizeof(handle))))
|
||||
{
|
||||
@ -3148,8 +3146,7 @@ static void INT21_LongFilename( CONTEXT86 *context )
|
||||
TRACE("LONG FILENAME - FIND NEXT MATCHING FILE for handle %d\n",
|
||||
BX_reg(context));
|
||||
|
||||
dataA = (WIN32_FIND_DATAA *)CTX_SEG_OFF_TO_LIN(context, context->SegEs,
|
||||
context->Edi);
|
||||
dataA = CTX_SEG_OFF_TO_LIN(context, context->SegEs, context->Edi);
|
||||
|
||||
if (h16 != INVALID_HANDLE_VALUE16 && (ptr = GlobalLock16( h16 )))
|
||||
{
|
||||
@ -3817,7 +3814,7 @@ static int INT21_FindFirst( CONTEXT86 *context )
|
||||
WCHAR maskW[12], pathW[MAX_PATH];
|
||||
static const WCHAR wildcardW[] = {'*','.','*',0};
|
||||
|
||||
path = (const char *)CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx);
|
||||
path = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx);
|
||||
MultiByteToWideChar(CP_OEMCP, 0, path, -1, pathW, MAX_PATH);
|
||||
|
||||
p = strrchrW( pathW, '\\');
|
||||
@ -3987,7 +3984,7 @@ static int INT21_FindNext( CONTEXT86 *context )
|
||||
*/
|
||||
static int INT21_FindFirstFCB( CONTEXT86 *context )
|
||||
{
|
||||
BYTE *fcb = (BYTE *)CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx);
|
||||
BYTE *fcb = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx);
|
||||
FINDFILE_FCB *pFCB;
|
||||
int drive;
|
||||
WCHAR p[] = {' ',':',};
|
||||
@ -4011,7 +4008,7 @@ static int INT21_FindFirstFCB( CONTEXT86 *context )
|
||||
*/
|
||||
static int INT21_FindNextFCB( CONTEXT86 *context )
|
||||
{
|
||||
BYTE *fcb = (BYTE *)CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx);
|
||||
BYTE *fcb = CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx);
|
||||
FINDFILE_FCB *pFCB;
|
||||
LPBYTE pResult = INT21_GetCurrentDTA(context);
|
||||
DOS_DIRENTRY_LAYOUT *ddl;
|
||||
|
@ -1004,9 +1004,8 @@ void WINAPI DOSVM_Int31Handler( CONTEXT86 *context )
|
||||
case 0x000b: /* Get descriptor */
|
||||
TRACE( "get descriptor (0x%04x)\n", BX_reg(context) );
|
||||
{
|
||||
LDT_ENTRY *entry = (LDT_ENTRY*)CTX_SEG_OFF_TO_LIN( context,
|
||||
context->SegEs,
|
||||
context->Edi );
|
||||
LDT_ENTRY *entry = CTX_SEG_OFF_TO_LIN( context, context->SegEs,
|
||||
context->Edi );
|
||||
wine_ldt_get_entry( BX_reg(context), entry );
|
||||
}
|
||||
break;
|
||||
@ -1014,9 +1013,8 @@ void WINAPI DOSVM_Int31Handler( CONTEXT86 *context )
|
||||
case 0x000c: /* Set descriptor */
|
||||
TRACE( "set descriptor (0x%04x)\n", BX_reg(context) );
|
||||
{
|
||||
LDT_ENTRY *entry = (LDT_ENTRY*)CTX_SEG_OFF_TO_LIN( context,
|
||||
context->SegEs,
|
||||
context->Edi );
|
||||
LDT_ENTRY *entry = CTX_SEG_OFF_TO_LIN( context, context->SegEs,
|
||||
context->Edi );
|
||||
wine_ldt_set_entry( BX_reg(context), entry );
|
||||
}
|
||||
break;
|
||||
|
@ -201,7 +201,7 @@ typedef struct {
|
||||
|
||||
static void MouseRelay(CONTEXT86 *context,void *mdata)
|
||||
{
|
||||
MCALLDATA *data = (MCALLDATA *)mdata;
|
||||
MCALLDATA *data = mdata;
|
||||
CONTEXT86 ctx = *context;
|
||||
|
||||
if (!ISV86(&ctx))
|
||||
|
@ -460,7 +460,7 @@ BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID para
|
||||
WORD fullCmdLength;
|
||||
LPBYTE psp_start = (LPBYTE)((DWORD)DOSVM_psp << 4);
|
||||
PDB16 *psp = (PDB16 *)psp_start;
|
||||
ExecBlock *blk = (ExecBlock *)paramblk;
|
||||
ExecBlock *blk = paramblk;
|
||||
LPBYTE cmdline = PTR_REAL_TO_LIN(SELECTOROF(blk->cmdline),OFFSETOF(blk->cmdline));
|
||||
LPBYTE envblock = PTR_REAL_TO_LIN(psp->environment, 0);
|
||||
int cmdLength = cmdline[0];
|
||||
@ -530,7 +530,7 @@ BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID para
|
||||
/* MZ_LoadImage created a new PSP and loaded new values into it,
|
||||
* let's work on the new values now */
|
||||
LPBYTE psp_start = (LPBYTE)((DWORD)DOSVM_psp << 4);
|
||||
ExecBlock *blk = (ExecBlock *)paramblk;
|
||||
ExecBlock *blk = paramblk;
|
||||
LPBYTE cmdline = PTR_REAL_TO_LIN(SELECTOROF(blk->cmdline),OFFSETOF(blk->cmdline));
|
||||
|
||||
/* First character contains the length of the command line. */
|
||||
@ -547,7 +547,7 @@ BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID para
|
||||
*/
|
||||
LPBYTE stack;
|
||||
init_sp -= 2;
|
||||
stack = (LPBYTE) CTX_SEG_OFF_TO_LIN(context, init_ss, init_sp);
|
||||
stack = CTX_SEG_OFF_TO_LIN(context, init_ss, init_sp);
|
||||
/* FIXME: push AX correctly */
|
||||
stack[0] = 0x00; /* push AL */
|
||||
stack[1] = 0x00; /* push AH */
|
||||
@ -570,7 +570,7 @@ BOOL WINAPI MZ_Exec( CONTEXT86 *context, LPCSTR filename, BYTE func, LPVOID para
|
||||
break;
|
||||
case 3: /* load overlay */
|
||||
{
|
||||
OverlayBlock *blk = (OverlayBlock *)paramblk;
|
||||
OverlayBlock *blk = paramblk;
|
||||
ret = MZ_DoLoadImage( hFile, filename, blk, 0);
|
||||
}
|
||||
break;
|
||||
|
@ -108,7 +108,7 @@ static void __stdcall RELAY_RelayStub( DOSRELAY proc,
|
||||
{
|
||||
if (proc)
|
||||
{
|
||||
CONTEXT86 *context = (CONTEXT86*)ctx86;
|
||||
CONTEXT86 *context = ctx86;
|
||||
RELAY_Stack16 *stack = RELAY_GetPointer( context->Esp );
|
||||
|
||||
DWORD old_seg_cs = context->SegCs;
|
||||
|
@ -53,7 +53,7 @@ typedef struct {
|
||||
static BYTE * XMS_Offset( MOVEOFS *ofs )
|
||||
{
|
||||
if (ofs->Handle) return (BYTE*)GlobalLock16(ofs->Handle)+ofs->Offset;
|
||||
else return (BYTE*)PTR_REAL_TO_LIN(SELECTOROF(ofs->Offset),OFFSETOF(ofs->Offset));
|
||||
else return PTR_REAL_TO_LIN(SELECTOROF(ofs->Offset),OFFSETOF(ofs->Offset));
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user