Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
7c4cb515
Commit
7c4cb515
authored
Jul 03, 2002
by
Gregg Mattinson
Committed by
Alexandre Julliard
Jul 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cast void* to char* for pointer arithmetic.
parent
d0207594
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
27 additions
and
31 deletions
+27
-31
module.c
debugger/module.c
+2
-3
dplayx_global.c
dlls/dplayx/dplayx_global.c
+1
-2
file.c
dlls/msvcrt/file.c
+2
-2
misc.c
dlls/msvcrt/misc.c
+2
-2
ordinal.c
dlls/shlwapi/ordinal.c
+2
-2
http.c
dlls/wininet/http.c
+3
-3
lolvldrv.c
dlls/winmm/lolvldrv.c
+3
-3
smb.c
files/smb.c
+1
-1
dib.c
graphics/x11drv/dib.c
+0
-0
global.c
memory/global.c
+1
-1
selector.c
memory/selector.c
+1
-1
virtual.c
memory/virtual.c
+1
-1
pe.c
tools/winedump/pe.c
+2
-2
syscolor.c
windows/syscolor.c
+6
-8
No files found.
debugger/module.c
View file @
7c4cb515
...
...
@@ -519,8 +519,8 @@ static const char* DEBUG_GetDbgInfo(enum DbgInfoLoad dil)
*/
static
int
DEBUG_ModuleCompare
(
const
void
*
p1
,
const
void
*
p2
)
{
return
(
*
((
const
DBG_MODULE
**
)
p1
))
->
load_addr
-
(
*
((
const
DBG_MODULE
**
)
p2
))
->
load_addr
;
return
(
char
*
)(
*
((
const
DBG_MODULE
**
)
p1
))
->
load_addr
-
(
char
*
)(
*
((
const
DBG_MODULE
**
)
p2
))
->
load_addr
;
}
/***********************************************************************
...
...
@@ -641,4 +641,3 @@ void DEBUG_WalkModules(void)
}
DBG_free
(
amod
);
}
dlls/dplayx/dplayx_global.c
View file @
7c4cb515
...
...
@@ -90,7 +90,7 @@ void DPLAYX_PrivHeapFree( LPVOID addr )
return
;
}
lpAddrStart
=
addr
-
sizeof
(
DWORD
);
/* Find block header */
lpAddrStart
=
(
char
*
)
addr
-
sizeof
(
DWORD
);
/* Find block header */
dwBlockUsed
=
((
BYTE
*
)
lpAddrStart
-
(
BYTE
*
)
lpMemArea
)
/
dwBlockSize
;
lpMemArea
[
dwBlockUsed
].
used
=
0
;
...
...
@@ -1342,4 +1342,3 @@ LPCSTR DPLAYX_HresultToString(HRESULT hr)
return
szTempStr
;
}
}
dlls/msvcrt/file.c
View file @
7c4cb515
...
...
@@ -1771,7 +1771,7 @@ MSVCRT_size_t MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nmemb, M
file
->
_ptr
+=
pcnt
;
read
+=
pcnt
;
rcnt
-=
pcnt
;
ptr
+=
pcnt
;
ptr
=
(
char
*
)
ptr
+
pcnt
;
}
else
if
(
!
(
file
->
_flag
&
MSVCRT__IOREAD
))
{
if
(
file
->
_flag
&
MSVCRT__IORW
)
{
file
->
_flag
|=
MSVCRT__IOREAD
;
...
...
@@ -2164,7 +2164,7 @@ MSVCRT_size_t MSVCRT_fwrite(const void *ptr, MSVCRT_size_t size, MSVCRT_size_t n
file
->
_ptr
+=
pcnt
;
written
=
pcnt
;
wrcnt
-=
pcnt
;
ptr
+=
pcnt
;
ptr
=
(
char
*
)
ptr
+
pcnt
;
}
else
if
(
!
(
file
->
_flag
&
MSVCRT__IOWRT
))
{
if
(
file
->
_flag
&
MSVCRT__IORW
)
{
file
->
_flag
|=
MSVCRT__IOWRT
;
...
...
dlls/msvcrt/misc.c
View file @
7c4cb515
...
...
@@ -68,7 +68,7 @@ void* _lfind(const void* match, const void* start,
{
if
(
cf
(
match
,
start
)
==
0
)
return
(
void
*
)
start
;
/* found */
start
+=
elem_size
;
start
=
(
char
*
)
start
+
elem_size
;
}
while
(
--
size
);
return
NULL
;
}
...
...
@@ -86,7 +86,7 @@ void* _lsearch(const void* match, void* start,
{
if
(
cf
(
match
,
start
)
==
0
)
return
start
;
/* found */
start
+=
elem_size
;
start
=
(
char
*
)
start
+
elem_size
;
}
while
(
--
size
);
/* not found, add to end */
...
...
dlls/shlwapi/ordinal.c
View file @
7c4cb515
...
...
@@ -1973,7 +1973,7 @@ BOOL WINAPI SHLWAPI_351 (
LPVOID
z
)
/* [in/out] buffer (+0x208 sent to GetFileVersionInfoA) */
{
GET_FUNC
(
pGetFileVersionInfoW
,
version
,
"GetFileVersionInfoW"
,
0
);
return
pGetFileVersionInfoW
(
w
,
x
,
y
-
0x208
,
z
+
0x208
);
return
pGetFileVersionInfoW
(
w
,
x
,
y
-
0x208
,
(
char
*
)
z
+
0x208
);
}
/*************************************************************************
...
...
@@ -1989,7 +1989,7 @@ WORD WINAPI SHLWAPI_352 (
UINT
*
z
)
/* [in] ver length - passed to VerQueryValueA as #4 */
{
GET_FUNC
(
pVerQueryValueW
,
version
,
"VerQueryValueW"
,
0
);
return
pVerQueryValueW
(
w
+
0x208
,
x
,
y
,
z
);
return
pVerQueryValueW
(
(
char
*
)
w
+
0x208
,
x
,
y
,
z
);
}
/**************************************************************************
...
...
dlls/wininet/http.c
View file @
7c4cb515
...
...
@@ -427,7 +427,7 @@ BOOL WINAPI HttpQueryInfoA(HINTERNET hHttpRequest, DWORD dwInfoLevel,
lpwhr
->
StdHeaders
[
i
].
lpszField
&&
lpwhr
->
StdHeaders
[
i
].
lpszValue
)
{
cnt
+=
sprintf
(
lpBuffer
+
cnt
,
"%s: %s%s"
,
lpwhr
->
StdHeaders
[
i
].
lpszField
,
lpwhr
->
StdHeaders
[
i
].
lpszValue
,
cnt
+=
sprintf
(
(
char
*
)
lpBuffer
+
cnt
,
"%s: %s%s"
,
lpwhr
->
StdHeaders
[
i
].
lpszField
,
lpwhr
->
StdHeaders
[
i
].
lpszValue
,
index
==
HTTP_QUERY_RAW_HEADERS_CRLF
?
"
\r\n
"
:
"
\0
"
);
}
}
...
...
@@ -439,13 +439,13 @@ BOOL WINAPI HttpQueryInfoA(HINTERNET hHttpRequest, DWORD dwInfoLevel,
lpwhr
->
pCustHeaders
[
i
].
lpszField
&&
lpwhr
->
pCustHeaders
[
i
].
lpszValue
)
{
cnt
+=
sprintf
(
lpBuffer
+
cnt
,
"%s: %s%s"
,
cnt
+=
sprintf
(
(
char
*
)
lpBuffer
+
cnt
,
"%s: %s%s"
,
lpwhr
->
pCustHeaders
[
i
].
lpszField
,
lpwhr
->
pCustHeaders
[
i
].
lpszValue
,
index
==
HTTP_QUERY_RAW_HEADERS_CRLF
?
"
\r\n
"
:
"
\0
"
);
}
}
strcpy
(
lpBuffer
+
cnt
,
index
==
HTTP_QUERY_RAW_HEADERS_CRLF
?
"
\r\n
"
:
""
);
strcpy
(
(
char
*
)
lpBuffer
+
cnt
,
index
==
HTTP_QUERY_RAW_HEADERS_CRLF
?
"
\r\n
"
:
""
);
*
lpdwBufferLength
=
cnt
+
delim
;
bSuccess
=
TRUE
;
...
...
dlls/winmm/lolvldrv.c
View file @
7c4cb515
...
...
@@ -690,7 +690,7 @@ static MMDRV_MapType MMDRV_MidiOut_Map32ATo16 (UINT wMsg, LPDWORD lpdwUser, LPD
if
(
ptr
)
{
SEGPTR
segptr
=
MapLS
(
ptr
);
*
(
LPMIDIOPENDESC
*
)
ptr
=
mod32
;
*
(
LPDWORD
)(
ptr
+
sizeof
(
LPMIDIOPENDESC
))
=
*
lpdwUser
;
*
(
LPDWORD
)(
(
char
*
)
ptr
+
sizeof
(
LPMIDIOPENDESC
))
=
*
lpdwUser
;
mod16
=
(
LPMIDIOPENDESC16
)((
LPSTR
)
ptr
+
sizeof
(
LPMIDIOPENDESC
)
+
2
*
sizeof
(
DWORD
));
mod16
->
hMidi
=
mod32
->
hMidi
;
...
...
@@ -1067,7 +1067,7 @@ static MMDRV_MapType MMDRV_WaveIn_Map32ATo16 (UINT wMsg, LPDWORD lpdwUser, LPDW
if
(
ptr
)
{
SEGPTR
seg_ptr
=
MapLS
(
ptr
);
*
(
LPWAVEOPENDESC
*
)
ptr
=
wod32
;
*
(
LPDWORD
)(
ptr
+
sizeof
(
LPWAVEOPENDESC
))
=
*
lpdwUser
;
*
(
LPDWORD
)(
(
char
*
)
ptr
+
sizeof
(
LPWAVEOPENDESC
))
=
*
lpdwUser
;
wod16
=
(
LPWAVEOPENDESC16
)((
LPSTR
)
ptr
+
sizeof
(
LPWAVEOPENDESC
)
+
2
*
sizeof
(
DWORD
));
wod16
->
hWave
=
wod32
->
hWave
;
...
...
@@ -1626,7 +1626,7 @@ static MMDRV_MapType MMDRV_WaveOut_Map32ATo16 (UINT wMsg, LPDWORD lpdwUser, LPD
if
(
ptr
)
{
SEGPTR
seg_ptr
=
MapLS
(
ptr
);
*
(
LPWAVEOPENDESC
*
)
ptr
=
wod32
;
*
(
LPDWORD
)(
ptr
+
sizeof
(
LPWAVEOPENDESC
))
=
*
lpdwUser
;
*
(
LPDWORD
)(
(
char
*
)
ptr
+
sizeof
(
LPWAVEOPENDESC
))
=
*
lpdwUser
;
wod16
=
(
LPWAVEOPENDESC16
)((
LPSTR
)
ptr
+
sizeof
(
LPWAVEOPENDESC
)
+
2
*
sizeof
(
DWORD
));
wod16
->
hWave
=
wod32
->
hWave
;
...
...
files/smb.c
View file @
7c4cb515
...
...
@@ -1111,7 +1111,7 @@ BOOL WINAPI SMB_ReadFile(HANDLE hFile, LPVOID buffer, DWORD bytesToRead, LPDWORD
if
(
!
read
)
break
;
total
+=
read
;
buffer
+=
read
;
buffer
=
(
char
*
)
buffer
+
read
;
offset
+=
read
;
if
(
total
>=
bytesToRead
)
break
;
...
...
graphics/x11drv/dib.c
View file @
7c4cb515
This diff is collapsed.
Click to expand it.
memory/global.c
View file @
7c4cb515
...
...
@@ -1621,7 +1621,7 @@ VOID WINAPI GlobalMemoryStatus(
#endif
/* FIXME: should do something for other systems */
GetSystemInfo
(
&
si
);
lpmem
->
dwTotalVirtual
=
si
.
lpMaximumApplicationAddress
-
si
.
lpMinimumApplicationAddress
;
lpmem
->
dwTotalVirtual
=
(
char
*
)
si
.
lpMaximumApplicationAddress
-
(
char
*
)
si
.
lpMinimumApplicationAddress
;
/* FIXME: we should track down all the already allocated VM pages and substract them, for now arbitrarily remove 64KB so that it matches NT */
lpmem
->
dwAvailVirtual
=
lpmem
->
dwTotalVirtual
-
64
*
1024
;
memcpy
(
&
cached_memstatus
,
lpmem
,
sizeof
(
MEMORYSTATUS
));
...
...
memory/selector.c
View file @
7c4cb515
...
...
@@ -168,7 +168,7 @@ static void SELECTOR_SetEntries( WORD sel, const void *base, DWORD size, unsigne
for
(
i
=
0
;
i
<
count
;
i
++
)
{
wine_ldt_set_entry
(
sel
+
(
i
<<
__AHSHIFT
),
&
entry
);
wine_ldt_set_base
(
&
entry
,
wine_ldt_get_base
(
&
entry
)
+
0x10000
);
wine_ldt_set_base
(
&
entry
,
(
char
*
)
wine_ldt_get_base
(
&
entry
)
+
0x10000
);
/* yep, Windows sets limit like that, not 64K sel units */
wine_ldt_set_limit
(
&
entry
,
wine_ldt_get_limit
(
&
entry
)
-
0x10000
);
}
...
...
memory/virtual.c
View file @
7c4cb515
...
...
@@ -221,7 +221,7 @@ static FILE_VIEW *VIRTUAL_FindView( const void *addr ) /* [in] Address */
view
=
NULL
;
break
;
}
if
(
view
->
base
+
view
->
size
>
addr
)
break
;
if
(
(
char
*
)
view
->
base
+
view
->
size
>
(
char
*
)
addr
)
break
;
view
=
view
->
next
;
}
LeaveCriticalSection
(
&
csVirtual
);
...
...
tools/winedump/pe.c
View file @
7c4cb515
...
...
@@ -81,8 +81,8 @@ void* PRD(unsigned long prd, unsigned long len)
unsigned
long
Offset
(
void
*
ptr
)
{
if
(
ptr
<
base
)
{
printf
(
"<<<<<ptr below
\n
"
);
return
0
;}
if
(
ptr
>=
base
+
total_len
)
{
printf
(
"<<<<<ptr above
\n
"
);
return
0
;}
return
ptr
-
base
;
if
(
(
char
*
)
ptr
>=
(
char
*
)
base
+
total_len
)
{
printf
(
"<<<<<ptr above
\n
"
);
return
0
;}
return
(
char
*
)
ptr
-
(
char
*
)
base
;
}
void
*
RVA
(
unsigned
long
rva
,
unsigned
long
len
)
...
...
windows/syscolor.c
View file @
7c4cb515
...
...
@@ -328,9 +328,9 @@ DWORD WINAPI SetSysColorsTemp( const COLORREF *pPens, const HBRUSH *pBrushes, DW
/* allocate our structure to remember old colors */
LPVOID
pOldCol
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
DWORD
)
+
n
*
sizeof
(
HPEN
)
+
n
*
sizeof
(
HBRUSH
));
LPVOID
p
=
pOldCol
;
*
(
DWORD
*
)
p
=
n
;
p
+=
sizeof
(
DWORD
);
memcpy
(
p
,
SysColorPens
,
n
*
sizeof
(
HPEN
));
p
+=
n
*
sizeof
(
HPEN
);
memcpy
(
p
,
SysColorBrushes
,
n
*
sizeof
(
HBRUSH
));
p
+=
n
*
sizeof
(
HBRUSH
);
*
(
DWORD
*
)
p
=
n
;
p
=
(
char
*
)
p
+
sizeof
(
DWORD
);
memcpy
(
p
,
SysColorPens
,
n
*
sizeof
(
HPEN
));
p
=
(
char
*
)
p
+
n
*
sizeof
(
HPEN
);
memcpy
(
p
,
SysColorBrushes
,
n
*
sizeof
(
HBRUSH
));
p
=
(
char
*
)
p
+
n
*
sizeof
(
HBRUSH
);
for
(
i
=
0
;
i
<
n
;
i
++
)
{
...
...
@@ -345,16 +345,16 @@ DWORD WINAPI SetSysColorsTemp( const COLORREF *pPens, const HBRUSH *pBrushes, DW
LPVOID
pOldCol
=
(
LPVOID
)
n
;
LPVOID
p
=
pOldCol
;
DWORD
nCount
=
*
(
DWORD
*
)
p
;
p
+=
sizeof
(
DWORD
);
p
=
(
char
*
)
p
+
sizeof
(
DWORD
);
for
(
i
=
0
;
i
<
nCount
;
i
++
)
{
DeleteObject
(
SysColorPens
[
i
]);
SysColorPens
[
i
]
=
*
(
HPEN
*
)
p
;
p
+=
sizeof
(
HPEN
);
SysColorPens
[
i
]
=
*
(
HPEN
*
)
p
;
p
=
(
char
*
)
p
+
sizeof
(
HPEN
);
}
for
(
i
=
0
;
i
<
nCount
;
i
++
)
{
SysColorBrushes
[
i
]
=
*
(
HBRUSH
*
)
p
;
p
+=
sizeof
(
HBRUSH
);
SysColorBrushes
[
i
]
=
*
(
HBRUSH
*
)
p
;
p
=
(
char
*
)
p
+
sizeof
(
HBRUSH
);
}
/* get rid of storage structure */
HeapFree
(
GetProcessHeap
(),
0
,
pOldCol
);
...
...
@@ -395,5 +395,3 @@ HPEN SYSCOLOR_GetPen( INT index )
return
SysColorPens
[
index
];
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment