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
fe1ec788
Commit
fe1ec788
authored
Sep 08, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gcc 4.0 warnings.
parent
b4c69e0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
38 deletions
+44
-38
api.c
dlls/avifil32/api.c
+19
-17
cards.c
dlls/cards/cards.c
+11
-8
ne_module.c
dlls/kernel/ne_module.c
+14
-13
No files found.
dlls/avifil32/api.c
View file @
fe1ec788
...
...
@@ -72,31 +72,33 @@ static struct {
*/
static
HRESULT
AVIFILE_CLSIDFromString
(
LPCSTR
idstr
,
LPCLSID
id
)
{
BYTE
const
*
s
=
(
BYTE
const
*
)
idstr
;
BYTE
const
*
s
;
BYTE
*
p
;
INT
i
;
BYTE
table
[
256
];
if
(
!
s
)
{
if
(
!
idstr
)
{
memset
(
id
,
0
,
sizeof
(
CLSID
));
return
S_OK
;
}
else
{
/* validate the CLSID string */
if
(
lstrlenA
(
s
)
!=
38
)
return
CO_E_CLASSSTRING
;
}
if
((
s
[
0
]
!=
'{'
)
||
(
s
[
9
]
!=
'-'
)
||
(
s
[
14
]
!=
'-'
)
||
(
s
[
19
]
!=
'-'
)
||
(
s
[
24
]
!=
'-'
)
||
(
s
[
37
]
!=
'}'
))
/* validate the CLSID string */
if
(
lstrlenA
(
idstr
)
!=
38
)
return
CO_E_CLASSSTRING
;
s
=
(
BYTE
const
*
)
idstr
;
if
((
s
[
0
]
!=
'{'
)
||
(
s
[
9
]
!=
'-'
)
||
(
s
[
14
]
!=
'-'
)
||
(
s
[
19
]
!=
'-'
)
||
(
s
[
24
]
!=
'-'
)
||
(
s
[
37
]
!=
'}'
))
return
CO_E_CLASSSTRING
;
for
(
i
=
1
;
i
<
37
;
i
++
)
{
if
((
i
==
9
)
||
(
i
==
14
)
||
(
i
==
19
)
||
(
i
==
24
))
continue
;
if
(
!
(((
s
[
i
]
>=
'0'
)
&&
(
s
[
i
]
<=
'9'
))
||
((
s
[
i
]
>=
'a'
)
&&
(
s
[
i
]
<=
'f'
))
||
((
s
[
i
]
>=
'A'
)
&&
(
s
[
i
]
<=
'F'
)))
)
return
CO_E_CLASSSTRING
;
for
(
i
=
1
;
i
<
37
;
i
++
)
{
if
((
i
==
9
)
||
(
i
==
14
)
||
(
i
==
19
)
||
(
i
==
24
))
continue
;
if
(
!
(((
s
[
i
]
>=
'0'
)
&&
(
s
[
i
]
<=
'9'
))
||
((
s
[
i
]
>=
'a'
)
&&
(
s
[
i
]
<=
'f'
))
||
((
s
[
i
]
>=
'A'
)
&&
(
s
[
i
]
<=
'F'
)))
)
return
CO_E_CLASSSTRING
;
}
}
TRACE
(
"%s -> %p
\n
"
,
s
,
id
);
...
...
dlls/cards/cards.c
View file @
fe1ec788
...
...
@@ -72,6 +72,12 @@ BOOL WINAPI cdtInit(int *width, int *height)
return
TRUE
;
}
static
DWORD
do_blt
(
HDC
hdc
,
int
x
,
int
y
,
int
dx
,
int
dy
,
HDC
hMemoryDC
,
DWORD
rasterOp
)
{
if
((
cardWidth
==
dx
)
&&
(
cardHeight
==
dy
))
return
BitBlt
(
hdc
,
x
,
y
,
cardWidth
,
cardHeight
,
hMemoryDC
,
0
,
0
,
rasterOp
);
return
StretchBlt
(
hdc
,
x
,
y
,
dx
,
dy
,
hMemoryDC
,
0
,
0
,
cardWidth
,
cardHeight
,
rasterOp
);
}
/***********************************************************************
* Draw a card. Unlike cdtDrawCard, this version allows you to stretch
...
...
@@ -85,7 +91,6 @@ BOOL WINAPI cdtDrawExt(HDC hdc, int x, int y, int dx, int dy, int card, int mode
HGDIOBJ
result
;
DWORD
rasterOp
=
SRCCOPY
;
BOOL
roundCornersFlag
;
COLORREF
savedPixels
[
12
];
BOOL
eraseFlag
=
FALSE
;
BOOL
drawFlag
=
TRUE
;
...
...
@@ -170,6 +175,8 @@ BOOL WINAPI cdtDrawExt(HDC hdc, int x, int y, int dx, int dy, int card, int mode
if
(
roundCornersFlag
)
{
COLORREF
savedPixels
[
12
];
savedPixels
[
0
]
=
GetPixel
(
hdc
,
x
,
y
);
savedPixels
[
1
]
=
GetPixel
(
hdc
,
x
+
1
,
y
);
savedPixels
[
2
]
=
GetPixel
(
hdc
,
x
,
y
+
1
);
...
...
@@ -182,15 +189,9 @@ BOOL WINAPI cdtDrawExt(HDC hdc, int x, int y, int dx, int dy, int card, int mode
savedPixels
[
9
]
=
GetPixel
(
hdc
,
x
+
dx
-
1
,
y
+
dy
-
1
);
savedPixels
[
10
]
=
GetPixel
(
hdc
,
x
+
dx
-
2
,
y
+
dy
-
1
);
savedPixels
[
11
]
=
GetPixel
(
hdc
,
x
+
dx
-
1
,
y
+
dy
-
2
);
}
if
((
cardWidth
==
dx
)
&&
(
cardHeight
==
dy
))
BitBlt
(
hdc
,
x
,
y
,
cardWidth
,
cardHeight
,
hMemoryDC
,
0
,
0
,
rasterOp
);
else
StretchBlt
(
hdc
,
x
,
y
,
dx
,
dy
,
hMemoryDC
,
0
,
0
,
cardWidth
,
cardHeight
,
rasterOp
);
do_blt
(
hdc
,
x
,
y
,
dx
,
dy
,
hMemoryDC
,
rasterOp
);
if
(
roundCornersFlag
)
{
SetPixel
(
hdc
,
x
,
y
,
savedPixels
[
0
]);
SetPixel
(
hdc
,
x
+
1
,
y
,
savedPixels
[
1
]);
SetPixel
(
hdc
,
x
,
y
+
1
,
savedPixels
[
2
]);
...
...
@@ -204,6 +205,8 @@ BOOL WINAPI cdtDrawExt(HDC hdc, int x, int y, int dx, int dy, int card, int mode
SetPixel
(
hdc
,
x
+
dx
-
2
,
y
+
dy
-
1
,
savedPixels
[
10
]);
SetPixel
(
hdc
,
x
+
dx
-
1
,
y
+
dy
-
2
,
savedPixels
[
11
]);
}
else
do_blt
(
hdc
,
x
,
y
,
dx
,
dy
,
hMemoryDC
,
rasterOp
);
}
DeleteDC
(
hMemoryDC
);
...
...
dlls/kernel/ne_module.c
View file @
fe1ec788
...
...
@@ -172,7 +172,7 @@ static const IMAGE_DOS_HEADER *find_dll_descr( const char *dllname, const char *
/* check the dll file name */
if
(
!
NE_strcasecmp
(
builtin_dlls
[
i
].
file_name
,
dllname
)
||
/* check the dll module name (without extension) */
(
!
NE_strncasecmp
(
dllname
,
name_table
+
1
,
*
name_table
)
&&
(
!
NE_strncasecmp
(
dllname
,
(
const
char
*
)
name_table
+
1
,
*
name_table
)
&&
!
strcmp
(
dllname
+
*
name_table
,
".dll"
)))
{
*
file_name
=
builtin_dlls
[
i
].
file_name
;
...
...
@@ -311,7 +311,7 @@ void NE_DumpModule( HMODULE16 hModule )
/* Dump the resident name table */
DPRINTF
(
"---
\n
"
);
DPRINTF
(
"Resident-name table:
\n
"
);
pstr
=
(
char
*
)
pModule
+
pModule
->
ne_restab
;
pstr
=
(
BYTE
*
)
pModule
+
pModule
->
ne_restab
;
while
(
*
pstr
)
{
DPRINTF
(
"%*.*s: %d
\n
"
,
*
pstr
,
*
pstr
,
pstr
+
1
,
...
...
@@ -357,7 +357,7 @@ void NE_DumpModule( HMODULE16 hModule )
DPRINTF
(
"Non-resident names table:
\n
"
);
if
(
pModule
->
nrname_handle
)
{
pstr
=
(
char
*
)
GlobalLock16
(
pModule
->
nrname_handle
);
pstr
=
GlobalLock16
(
pModule
->
nrname_handle
);
while
(
*
pstr
)
{
DPRINTF
(
"%*.*s: %d
\n
"
,
*
pstr
,
*
pstr
,
pstr
+
1
,
...
...
@@ -428,7 +428,8 @@ static void NE_InitResourceHandler( HMODULE16 hModule )
*/
WORD
NE_GetOrdinal
(
HMODULE16
hModule
,
const
char
*
name
)
{
unsigned
char
buffer
[
256
],
*
cpnt
;
char
buffer
[
256
],
*
p
;
BYTE
*
cpnt
;
BYTE
len
;
NE_MODULE
*
pModule
;
...
...
@@ -444,18 +445,18 @@ WORD NE_GetOrdinal( HMODULE16 hModule, const char *name )
/* Now copy and uppercase the string */
strcpy
(
buffer
,
name
);
for
(
cpnt
=
buffer
;
*
cpnt
;
cpnt
++
)
*
cpnt
=
RtlUpperChar
(
*
cpnt
);
len
=
cpnt
-
buffer
;
for
(
p
=
buffer
;
*
p
;
p
++
)
*
p
=
RtlUpperChar
(
*
p
);
len
=
p
-
buffer
;
/* First search the resident names */
cpnt
=
(
char
*
)
pModule
+
pModule
->
ne_restab
;
cpnt
=
(
BYTE
*
)
pModule
+
pModule
->
ne_restab
;
/* Skip the first entry (module name) */
cpnt
+=
*
cpnt
+
1
+
sizeof
(
WORD
);
while
(
*
cpnt
)
{
if
((
(
BYTE
)
*
cpnt
==
len
)
&&
!
memcmp
(
cpnt
+
1
,
buffer
,
len
))
if
((
*
cpnt
==
len
)
&&
!
memcmp
(
cpnt
+
1
,
buffer
,
len
))
{
WORD
ordinal
;
memcpy
(
&
ordinal
,
cpnt
+
*
cpnt
+
1
,
sizeof
(
ordinal
)
);
...
...
@@ -468,13 +469,13 @@ WORD NE_GetOrdinal( HMODULE16 hModule, const char *name )
/* Now search the non-resident names table */
if
(
!
pModule
->
nrname_handle
)
return
0
;
/* No non-resident table */
cpnt
=
(
char
*
)
GlobalLock16
(
pModule
->
nrname_handle
);
cpnt
=
GlobalLock16
(
pModule
->
nrname_handle
);
/* Skip the first entry (module description string) */
cpnt
+=
*
cpnt
+
1
+
sizeof
(
WORD
);
while
(
*
cpnt
)
{
if
((
(
BYTE
)
*
cpnt
==
len
)
&&
!
memcmp
(
cpnt
+
1
,
buffer
,
len
))
if
((
*
cpnt
==
len
)
&&
!
memcmp
(
cpnt
+
1
,
buffer
,
len
))
{
WORD
ordinal
;
memcpy
(
&
ordinal
,
cpnt
+
*
cpnt
+
1
,
sizeof
(
ordinal
)
);
...
...
@@ -1491,7 +1492,7 @@ HMODULE16 WINAPI GetModuleHandle16( LPCSTR name )
if
(
pModule
->
ne_flags
&
NE_FFLAGS_WIN32
)
continue
;
name_table
=
(
BYTE
*
)
pModule
+
pModule
->
ne_restab
;
if
((
*
name_table
==
len
)
&&
!
strncmp
(
name
,
name_table
+
1
,
len
))
if
((
*
name_table
==
len
)
&&
!
strncmp
(
name
,
(
char
*
)
name_table
+
1
,
len
))
return
hModule
;
}
...
...
@@ -1513,7 +1514,7 @@ HMODULE16 WINAPI GetModuleHandle16( LPCSTR name )
* 'i' compare is just a quickfix until the loader handles that
* correctly. -MM 990705
*/
if
((
*
name_table
==
len
)
&&
!
NE_strncasecmp
(
tmpstr
,
name_table
+
1
,
len
))
if
((
*
name_table
==
len
)
&&
!
NE_strncasecmp
(
tmpstr
,
(
const
char
*
)
name_table
+
1
,
len
))
return
hModule
;
}
...
...
@@ -1865,7 +1866,7 @@ static HMODULE16 NE_GetModuleByFilename( LPCSTR name )
if
(
pModule
->
ne_flags
&
NE_FFLAGS_WIN32
)
continue
;
name_table
=
(
BYTE
*
)
pModule
+
pModule
->
ne_restab
;
if
((
*
name_table
==
len
)
&&
!
NE_strncasecmp
(
s
,
name_table
+
1
,
len
))
if
((
*
name_table
==
len
)
&&
!
NE_strncasecmp
(
s
,
(
const
char
*
)
name_table
+
1
,
len
))
return
hModule
;
}
...
...
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