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
294835a8
Commit
294835a8
authored
Dec 06, 2004
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 06, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Another round of const correctness fixes.
parent
01035f17
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
67 additions
and
66 deletions
+67
-66
vertexshader.c
dlls/d3d9/vertexshader.c
+1
-1
user.h
include/user.h
+2
-2
utf8.c
libs/unicode/utf8.c
+1
-1
directory.c
programs/wcmd/directory.c
+4
-4
object.c
server/object.c
+2
-2
trace.c
server/trace.c
+4
-4
parser.l
tools/widl/parser.l
+1
-1
typelib.c
tools/widl/typelib.c
+1
-1
main.c
tools/winedump/main.c
+1
-1
ne.c
tools/winedump/ne.c
+13
-13
pe.c
tools/winedump/pe.c
+12
-12
search.c
tools/winedump/search.c
+15
-14
lang.c
tools/wmc/lang.c
+1
-1
mcl.c
tools/wmc/mcl.c
+1
-1
cursoricon.c
windows/cursoricon.c
+5
-5
dialog.c
windows/dialog.c
+1
-1
mdi.c
windows/mdi.c
+1
-1
spy.c
windows/spy.c
+1
-1
No files found.
dlls/d3d9/vertexshader.c
View file @
294835a8
...
...
@@ -134,7 +134,7 @@ HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(LPDIRECT3DDEVICE9 i
f
+=
4
;
}
}
else
{
FLOAT
*
f
=
(
FLOAT
*
)
pConstantData
;
const
FLOAT
*
f
=
(
const
FLOAT
*
)
pConstantData
;
TRACE
(
"(%p) : SetVertexShaderConstant, C[%u]={%f, %f, %f, %f}
\n
"
,
This
,
Register
,
f
[
0
],
f
[
1
],
f
[
2
],
f
[
3
]);
}
This
->
UpdateStateBlock
->
Changed
.
vertexShaderConstant
=
TRUE
;
...
...
include/user.h
View file @
294835a8
...
...
@@ -40,8 +40,8 @@ extern WORD USER_HeapSel;
#define USER_HEAP_LIN_ADDR(handle) \
((handle) ? MapSL(MAKESEGPTR(USER_HeapSel, LOWORD(handle))) : NULL)
#define GET_WORD(ptr) (*(WORD *)(ptr))
#define GET_DWORD(ptr) (*(DWORD *)(ptr))
#define GET_WORD(ptr) (*(
const
WORD *)(ptr))
#define GET_DWORD(ptr) (*(
const
DWORD *)(ptr))
#define USUD_LOCALALLOC 0x0001
#define USUD_LOCALFREE 0x0002
...
...
libs/unicode/utf8.c
View file @
294835a8
...
...
@@ -145,7 +145,7 @@ int wine_utf8_mbstowcs( int flags, const char *src, int srclen, WCHAR *dst, int
unsigned
int
res
;
const
char
*
srcend
=
src
+
srclen
;
if
(
!
dstlen
)
return
get_length_mbs_utf8
(
src
,
srclen
);
if
(
!
dstlen
)
return
get_length_mbs_utf8
(
(
const
unsigned
char
*
)
src
,
srclen
);
for
(
count
=
dstlen
;
count
&&
(
src
<
srcend
);
count
--
,
dst
++
)
{
...
...
programs/wcmd/directory.c
View file @
294835a8
...
...
@@ -361,8 +361,8 @@ char b;
}
int
WCMD_dir_sort
(
const
void
*
a
,
const
void
*
b
)
{
return
(
lstrcmpi
(((
WIN32_FIND_DATA
*
)
a
)
->
cFileName
,
((
WIN32_FIND_DATA
*
)
b
)
->
cFileName
));
int
WCMD_dir_sort
(
const
void
*
a
,
const
void
*
b
)
{
return
(
lstrcmpi
(((
const
WIN32_FIND_DATA
*
)
a
)
->
cFileName
,
((
const
WIN32_FIND_DATA
*
)
b
)
->
cFileName
));
}
server/object.c
View file @
294835a8
...
...
@@ -229,7 +229,7 @@ struct object *find_object( const struct namespace *namespace, const WCHAR *name
{
LIST_FOR_EACH
(
p
,
list
)
{
struct
object_name
*
ptr
=
LIST_ENTRY
(
p
,
struct
object_name
,
entry
);
const
struct
object_name
*
ptr
=
LIST_ENTRY
(
p
,
const
struct
object_name
,
entry
);
if
(
ptr
->
len
!=
len
)
continue
;
if
(
!
memcmp
(
ptr
->
name
,
name
,
len
))
return
grab_object
(
ptr
->
obj
);
}
...
...
@@ -238,7 +238,7 @@ struct object *find_object( const struct namespace *namespace, const WCHAR *name
{
LIST_FOR_EACH
(
p
,
list
)
{
struct
object_name
*
ptr
=
LIST_ENTRY
(
p
,
struct
object_name
,
entry
);
const
struct
object_name
*
ptr
=
LIST_ENTRY
(
p
,
const
struct
object_name
,
entry
);
if
(
ptr
->
len
!=
len
)
continue
;
if
(
!
strncmpiW
(
ptr
->
name
,
name
,
len
/
sizeof
(
WCHAR
)
))
return
grab_object
(
ptr
->
obj
);
}
...
...
server/trace.c
View file @
294835a8
...
...
@@ -108,10 +108,10 @@ static void dump_context( const CONTEXT *context )
context
->
SegCs
,
context
->
SegDs
,
context
->
SegEs
,
context
->
SegFs
,
context
->
SegGs
,
context
->
Dr0
,
context
->
Dr1
,
context
->
Dr2
,
context
->
Dr3
,
context
->
Dr6
,
context
->
Dr7
);
fprintf
(
stderr
,
"float="
);
dump_uints
(
(
int
*
)
&
context
->
FloatSave
,
sizeof
(
context
->
FloatSave
)
/
sizeof
(
int
)
);
dump_uints
(
(
const
int
*
)
&
context
->
FloatSave
,
sizeof
(
context
->
FloatSave
)
/
sizeof
(
int
)
);
fprintf
(
stderr
,
"}"
);
#else
dump_uints
(
(
int
*
)
context
,
sizeof
(
*
context
)
/
sizeof
(
int
)
);
dump_uints
(
(
const
int
*
)
context
,
sizeof
(
*
context
)
/
sizeof
(
int
)
);
#endif
}
...
...
@@ -191,7 +191,7 @@ static void dump_varargs_bytes( size_t size )
static
void
dump_varargs_string
(
size_t
size
)
{
fprintf
(
stderr
,
"
\"
%.*s
\"
"
,
(
int
)
size
,
(
char
*
)
cur_data
);
fprintf
(
stderr
,
"
\"
%.*s
\"
"
,
(
int
)
size
,
(
c
onst
c
har
*
)
cur_data
);
remove_data
(
size
);
}
...
...
@@ -226,7 +226,7 @@ static void dump_varargs_exc_event( size_t size )
fprintf
(
stderr
,
"{context="
);
dump_context
(
ptr
);
fprintf
(
stderr
,
",rec="
);
dump_exc_record
(
(
EXCEPTION_RECORD
*
)(
ptr
+
1
)
);
dump_exc_record
(
(
const
EXCEPTION_RECORD
*
)(
ptr
+
1
)
);
fputc
(
'}'
,
stderr
);
remove_data
(
size
);
}
...
...
tools/widl/parser.l
View file @
294835a8
...
...
@@ -301,7 +301,7 @@ static struct keyword {
{"wire_marshal", tWIREMARSHAL}
};
#define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0]))
#define KWP(p) ((struct keyword *)(p))
#define KWP(p) ((
const
struct keyword *)(p))
static int kw_cmp_func(const void *s1, const void *s2)
{
...
...
tools/widl/typelib.c
View file @
294835a8
...
...
@@ -110,7 +110,7 @@ static struct oatype {
{
"VARIANT"
,
VT_VARIANT
}
};
#define NTYPES (sizeof(oatypes)/sizeof(oatypes[0]))
#define KWP(p) ((struct oatype *)(p))
#define KWP(p) ((
const
struct oatype *)(p))
static
int
kw_cmp_func
(
const
void
*
s1
,
const
void
*
s2
)
{
...
...
tools/winedump/main.c
View file @
294835a8
...
...
@@ -309,7 +309,7 @@ static void set_module_name(unsigned setUC)
if
(
len
>
4
&&
strcmp
(
ptr
+
len
-
4
,
".dll"
)
==
0
)
len
-=
4
;
buf
=
malloc
(
len
+
1
);
memcpy
(
buf
,
(
void
*
)
ptr
,
len
);
memcpy
(
buf
,
(
const
void
*
)
ptr
,
len
);
buf
[
len
]
=
0
;
globals
.
input_module
=
buf
;
OUTPUT_UC_DLL_NAME
=
(
setUC
)
?
str_toupper
(
strdup
(
OUTPUT_DLL_NAME
))
:
""
;
...
...
tools/winedump/ne.c
View file @
294835a8
...
...
@@ -67,7 +67,7 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne )
static
void
dump_ne_names
(
const
void
*
base
,
const
IMAGE_OS2_HEADER
*
ne
)
{
c
har
*
pstr
=
(
char
*
)
ne
+
ne
->
ne_restab
;
c
onst
char
*
pstr
=
(
const
char
*
)
ne
+
ne
->
ne_restab
;
printf
(
"
\n
Resident name table:
\n
"
);
while
(
*
pstr
)
...
...
@@ -112,28 +112,28 @@ static const char *get_resource_type( WORD id )
static
void
dump_ne_resources
(
const
void
*
base
,
const
IMAGE_OS2_HEADER
*
ne
)
{
NE_NAMEINFO
*
name
;
const
void
*
res_ptr
=
(
char
*
)
ne
+
ne
->
ne_rsrctab
;
const
NE_NAMEINFO
*
name
;
const
void
*
res_ptr
=
(
c
onst
c
har
*
)
ne
+
ne
->
ne_rsrctab
;
WORD
size_shift
=
get_word
(
res_ptr
);
NE_TYPEINFO
*
info
=
(
NE_TYPEINFO
*
)((
WORD
*
)
res_ptr
+
1
);
const
NE_TYPEINFO
*
info
=
(
const
NE_TYPEINFO
*
)((
const
WORD
*
)
res_ptr
+
1
);
int
count
;
printf
(
"
\n
Resources:
\n
"
);
while
(
info
->
type_id
!=
0
&&
(
c
har
*
)
info
<
(
char
*
)
ne
+
ne
->
ne_restab
)
while
(
info
->
type_id
!=
0
&&
(
c
onst
char
*
)
info
<
(
const
char
*
)
ne
+
ne
->
ne_restab
)
{
name
=
(
NE_NAMEINFO
*
)(
info
+
1
);
name
=
(
const
NE_NAMEINFO
*
)(
info
+
1
);
for
(
count
=
info
->
count
;
count
>
0
;
count
--
,
name
++
)
{
if
(
name
->
id
&
0x8000
)
printf
(
" %d"
,
(
name
->
id
&
~
0x8000
)
);
else
printf
(
" %.*s"
,
*
((
unsigned
char
*
)
res_ptr
+
name
->
id
),
(
char
*
)
res_ptr
+
name
->
id
+
1
);
else
printf
(
" %.*s"
,
*
((
const
unsigned
char
*
)
res_ptr
+
name
->
id
),
(
c
onst
c
har
*
)
res_ptr
+
name
->
id
+
1
);
if
(
info
->
type_id
&
0x8000
)
printf
(
" %s
\n
"
,
get_resource_type
(
info
->
type_id
)
);
else
printf
(
" %.*s
\n
"
,
*
((
unsigned
char
*
)
res_ptr
+
info
->
type_id
),
(
char
*
)
res_ptr
+
info
->
type_id
+
1
);
dump_data
(
(
unsigned
char
*
)
base
+
(
name
->
offset
<<
size_shift
),
else
printf
(
" %.*s
\n
"
,
*
((
const
unsigned
char
*
)
res_ptr
+
info
->
type_id
),
(
c
onst
c
har
*
)
res_ptr
+
info
->
type_id
+
1
);
dump_data
(
(
const
unsigned
char
*
)
base
+
(
name
->
offset
<<
size_shift
),
name
->
length
<<
size_shift
,
" "
);
}
info
=
(
NE_TYPEINFO
*
)
name
;
info
=
(
const
NE_TYPEINFO
*
)
name
;
}
}
...
...
@@ -230,7 +230,7 @@ static void dump_ne_exports( const void *base, const IMAGE_OS2_HEADER *ne )
void
ne_dump
(
const
void
*
exe
,
size_t
exe_size
)
{
const
IMAGE_DOS_HEADER
*
dos
=
exe
;
const
IMAGE_OS2_HEADER
*
ne
=
(
IMAGE_OS2_HEADER
*
)((
char
*
)
dos
+
dos
->
e_lfanew
);
const
IMAGE_OS2_HEADER
*
ne
=
(
const
IMAGE_OS2_HEADER
*
)((
const
char
*
)
dos
+
dos
->
e_lfanew
);
dump_ne_header
(
ne
);
dump_ne_names
(
exe
,
ne
);
...
...
tools/winedump/pe.c
View file @
294835a8
...
...
@@ -849,12 +849,12 @@ static void dump_msgtable_data( const void *ptr, unsigned int size, unsigned int
{
const
MESSAGE_RESOURCE_ENTRY
*
entry
;
entry
=
(
MESSAGE_RESOURCE_ENTRY
*
)((
char
*
)
data
+
block
->
OffsetToEntries
);
entry
=
(
const
MESSAGE_RESOURCE_ENTRY
*
)((
const
char
*
)
data
+
block
->
OffsetToEntries
);
for
(
j
=
block
->
LowId
;
j
<=
block
->
HighId
;
j
++
)
{
if
(
entry
->
Flags
&
MESSAGE_RESOURCE_UNICODE
)
{
const
WCHAR
*
str
=
(
WCHAR
*
)
entry
->
Text
;
const
WCHAR
*
str
=
(
const
WCHAR
*
)
entry
->
Text
;
printf
(
"%s%08x L
\"
"
,
prefix
,
j
);
dump_strW
(
str
,
strlenW
(
str
)
);
printf
(
"
\"\n
"
);
...
...
@@ -865,7 +865,7 @@ static void dump_msgtable_data( const void *ptr, unsigned int size, unsigned int
dump_strA
(
entry
->
Text
,
strlen
(
entry
->
Text
)
);
printf
(
"
\"\n
"
);
}
entry
=
(
MESSAGE_RESOURCE_ENTRY
*
)((
char
*
)
entry
+
entry
->
Length
);
entry
=
(
const
MESSAGE_RESOURCE_ENTRY
*
)((
const
char
*
)
entry
+
entry
->
Length
);
}
}
}
...
...
@@ -886,20 +886,20 @@ static void dump_dir_resource(void)
for
(
i
=
0
;
i
<
root
->
NumberOfNamedEntries
+
root
->
NumberOfIdEntries
;
i
++
)
{
e1
=
(
PIMAGE_RESOURCE_DIRECTORY_ENTRY
)(
root
+
1
)
+
i
;
namedir
=
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
e1
->
u2
.
s3
.
OffsetToDirectory
);
e1
=
(
const
IMAGE_RESOURCE_DIRECTORY_ENTRY
*
)(
root
+
1
)
+
i
;
namedir
=
(
const
IMAGE_RESOURCE_DIRECTORY
*
)((
const
char
*
)
root
+
e1
->
u2
.
s3
.
OffsetToDirectory
);
for
(
j
=
0
;
j
<
namedir
->
NumberOfNamedEntries
+
namedir
->
NumberOfIdEntries
;
j
++
)
{
e2
=
(
PIMAGE_RESOURCE_DIRECTORY_ENTRY
)(
namedir
+
1
)
+
j
;
langdir
=
(
IMAGE_RESOURCE_DIRECTORY
*
)((
char
*
)
root
+
e2
->
u2
.
s3
.
OffsetToDirectory
);
e2
=
(
const
IMAGE_RESOURCE_DIRECTORY_ENTRY
*
)(
namedir
+
1
)
+
j
;
langdir
=
(
const
IMAGE_RESOURCE_DIRECTORY
*
)((
const
char
*
)
root
+
e2
->
u2
.
s3
.
OffsetToDirectory
);
for
(
k
=
0
;
k
<
langdir
->
NumberOfNamedEntries
+
langdir
->
NumberOfIdEntries
;
k
++
)
{
e3
=
(
PIMAGE_RESOURCE_DIRECTORY_ENTRY
)(
langdir
+
1
)
+
k
;
e3
=
(
const
IMAGE_RESOURCE_DIRECTORY_ENTRY
*
)(
langdir
+
1
)
+
k
;
printf
(
"
\n
"
);
if
(
e1
->
u1
.
s1
.
NameIsString
)
{
string
=
(
PIMAGE_RESOURCE_DIR_STRING_U
)((
char
*
)
root
+
e1
->
u1
.
s1
.
NameOffset
);
string
=
(
const
IMAGE_RESOURCE_DIR_STRING_U
*
)((
const
char
*
)
root
+
e1
->
u1
.
s1
.
NameOffset
);
dump_unicode_str
(
string
->
NameString
,
string
->
Length
);
}
else
...
...
@@ -912,14 +912,14 @@ static void dump_dir_resource(void)
printf
(
" Name="
);
if
(
e2
->
u1
.
s1
.
NameIsString
)
{
string
=
(
PIMAGE_RESOURCE_DIR_STRING_U
)
((
char
*
)
root
+
e2
->
u1
.
s1
.
NameOffset
);
string
=
(
const
IMAGE_RESOURCE_DIR_STRING_U
*
)
((
const
char
*
)
root
+
e2
->
u1
.
s1
.
NameOffset
);
dump_unicode_str
(
string
->
NameString
,
string
->
Length
);
}
else
printf
(
"%04x"
,
e2
->
u1
.
s2
.
Id
);
printf
(
" Language=%04x:
\n
"
,
e3
->
u1
.
s2
.
Id
);
data
=
(
IMAGE_RESOURCE_DATA_ENTRY
*
)((
char
*
)
root
+
e3
->
u2
.
OffsetToData
);
data
=
(
const
IMAGE_RESOURCE_DATA_ENTRY
*
)((
const
char
*
)
root
+
e3
->
u2
.
OffsetToData
);
if
(
e1
->
u1
.
s1
.
NameIsString
)
{
dump_data
(
RVA
(
data
->
OffsetToData
,
data
->
Size
),
data
->
Size
,
" "
);
...
...
@@ -1130,7 +1130,7 @@ static dll_symbol *dll_current_symbol = NULL;
/* Compare symbols by ordinal for qsort */
static
int
symbol_cmp
(
const
void
*
left
,
const
void
*
right
)
{
return
((
dll_symbol
*
)
left
)
->
ordinal
>
((
dll_symbol
*
)
right
)
->
ordinal
;
return
((
const
dll_symbol
*
)
left
)
->
ordinal
>
((
const
dll_symbol
*
)
right
)
->
ordinal
;
}
/*******************************************************************
...
...
tools/winedump/search.c
View file @
294835a8
...
...
@@ -153,14 +153,14 @@ int symbol_search (parsed_symbol *sym)
*/
static
int
symbol_from_prototype
(
parsed_symbol
*
sym
,
const
char
*
proto
)
{
char
*
iter
;
c
onst
c
har
*
iter
;
int
found
;
proto
=
get_type
(
sym
,
proto
,
-
1
);
/* Get return type */
if
(
!
proto
)
return
-
1
;
iter
=
(
char
*
)
str_match
(
proto
,
sym
->
symbol
,
&
found
);
iter
=
str_match
(
proto
,
sym
->
symbol
,
&
found
);
if
(
!
found
)
{
...
...
@@ -177,7 +177,7 @@ static int symbol_from_prototype (parsed_symbol *sym, const char *proto)
else
sym
->
flags
|=
SYM_STDCALL
;
free
(
call
);
iter
=
(
char
*
)
str_match
(
iter
,
sym
->
symbol
,
&
found
);
iter
=
str_match
(
iter
,
sym
->
symbol
,
&
found
);
if
(
!
found
)
return
-
1
;
...
...
@@ -232,13 +232,14 @@ static int symbol_from_prototype (parsed_symbol *sym, const char *proto)
static
const
char
*
get_type
(
parsed_symbol
*
sym
,
const
char
*
proto
,
int
arg
)
{
int
is_const
,
is_volatile
,
is_struct
,
is_signed
,
is_unsigned
,
ptrs
=
0
;
char
*
iter
,
*
type_str
,
*
base_type
,
*
catch_unsigned
,
dest_type
;
const
char
*
iter
,
*
type_str
,
*
base_type
,
*
catch_unsigned
;
char
dest_type
;
assert
(
sym
&&
sym
->
symbol
);
assert
(
proto
&&
*
proto
);
assert
(
arg
<
0
||
(
unsigned
)
arg
==
sym
->
argc
);
type_str
=
(
char
*
)
proto
;
type_str
=
proto
;
proto
=
str_match
(
proto
,
"const"
,
&
is_const
);
proto
=
str_match
(
proto
,
"volatile"
,
&
is_volatile
);
...
...
@@ -246,7 +247,7 @@ static const char *get_type (parsed_symbol *sym, const char *proto, int arg)
if
(
!
is_struct
)
proto
=
str_match
(
proto
,
"union"
,
&
is_struct
);
catch_unsigned
=
(
char
*
)
proto
;
catch_unsigned
=
proto
;
proto
=
str_match
(
proto
,
"unsigned"
,
&
is_unsigned
);
proto
=
str_match
(
proto
,
"signed"
,
&
is_signed
);
...
...
@@ -257,8 +258,8 @@ static const char *get_type (parsed_symbol *sym, const char *proto, int arg)
if
(
!
is_volatile
)
proto
=
str_match
(
proto
,
"volatile"
,
&
is_volatile
);
base_type
=
(
char
*
)
proto
;
iter
=
(
char
*
)
str_find_set
(
proto
,
" ,*)"
);
base_type
=
proto
;
iter
=
str_find_set
(
proto
,
" ,*)"
);
if
(
!
iter
)
return
NULL
;
...
...
@@ -268,7 +269,7 @@ static const char *get_type (parsed_symbol *sym, const char *proto, int arg)
if
(
strncmp
(
base_type
,
"int"
,
3
)
&&
strncmp
(
base_type
,
"long"
,
4
)
&&
strncmp
(
base_type
,
"short"
,
5
)
&&
strncmp
(
base_type
,
"char"
,
4
))
{
iter
=
(
char
*
)
proto
;
iter
=
proto
;
base_type
=
catch_unsigned
;
}
}
...
...
@@ -290,7 +291,7 @@ static const char *get_type (parsed_symbol *sym, const char *proto, int arg)
{
/* 'unsigned' with no type */
char
*
tmp
=
str_create
(
2
,
type_str
,
" int"
);
free
(
type_str
);
free
(
(
char
*
)
type_str
);
type_str
=
tmp
;
}
symbol_clean_string
(
type_str
);
...
...
@@ -299,7 +300,7 @@ static const char *get_type (parsed_symbol *sym, const char *proto, int arg)
if
(
arg
<
0
)
{
sym
->
return_text
=
type_str
;
sym
->
return_text
=
(
char
*
)
type_str
;
sym
->
return_type
=
dest_type
;
}
else
...
...
@@ -311,16 +312,16 @@ static const char *get_type (parsed_symbol *sym, const char *proto, int arg)
sym
->
arg_name
[
arg
]
=
str_create_num
(
1
,
arg
,
"arg"
);
else
{
iter
=
(
char
*
)
str_find_set
(
proto
,
" ,)"
);
iter
=
str_find_set
(
proto
,
" ,)"
);
if
(
!
iter
)
{
free
(
type_str
);
free
(
(
char
*
)
type_str
);
return
NULL
;
}
sym
->
arg_name
[
arg
]
=
str_substring
(
proto
,
iter
);
proto
=
iter
;
}
sym
->
arg_text
[
arg
]
=
type_str
;
sym
->
arg_text
[
arg
]
=
(
char
*
)
type_str
;
}
return
proto
;
...
...
tools/wmc/lang.c
View file @
294835a8
...
...
@@ -140,7 +140,7 @@ void show_languages(void)
static
int
langcmp
(
const
void
*
p1
,
const
void
*
p2
)
{
return
*
(
unsigned
*
)
p1
-
((
language_t
*
)
p2
)
->
id
;
return
*
(
const
unsigned
*
)
p1
-
((
const
language_t
*
)
p2
)
->
id
;
}
const
language_t
*
find_language
(
unsigned
id
)
...
...
tools/wmc/mcl.c
View file @
294835a8
...
...
@@ -547,7 +547,7 @@ static void newline(void)
static
int
unisort
(
const
void
*
p1
,
const
void
*
p2
)
{
return
unistricmp
(((
token_t
*
)
p1
)
->
name
,
((
token_t
*
)
p2
)
->
name
);
return
unistricmp
(((
const
token_t
*
)
p1
)
->
name
,
((
const
token_t
*
)
p2
)
->
name
);
}
static
token_t
*
tokentable
=
NULL
;
...
...
windows/cursoricon.c
View file @
294835a8
...
...
@@ -208,7 +208,7 @@ static int bitmap_info_size( const BITMAPINFO * info, WORD coloruse )
if
(
info
->
bmiHeader
.
biSize
==
sizeof
(
BITMAPCOREHEADER
))
{
BITMAPCOREHEADER
*
core
=
(
BITMAPCOREHEADER
*
)
info
;
const
BITMAPCOREHEADER
*
core
=
(
const
BITMAPCOREHEADER
*
)
info
;
colors
=
(
core
->
bcBitCount
<=
8
)
?
1
<<
core
->
bcBitCount
:
0
;
return
sizeof
(
BITMAPCOREHEADER
)
+
colors
*
((
coloruse
==
DIB_RGB_COLORS
)
?
sizeof
(
RGBTRIPLE
)
:
sizeof
(
WORD
));
...
...
@@ -569,8 +569,8 @@ static CURSORICONDIRENTRY *CURSORICON_FindBestCursor( CURSORICONDIR *dir,
* directly from corresponding DIB sections
* Note: wResId is index to array of pointer returned in ptrs (origin is 1)
*/
static
BOOL
CURSORICON_SimulateLoadingFromResourceW
(
LPWSTR
filename
,
BOOL
fCursor
,
CURSORICONDIR
**
res
,
LPBYTE
**
ptr
)
static
BOOL
CURSORICON_SimulateLoadingFromResourceW
(
LP
C
WSTR
filename
,
BOOL
fCursor
,
CURSORICONDIR
**
res
,
LPBYTE
**
ptr
)
{
LPBYTE
_free
;
CURSORICONFILEDIR
*
bits
;
...
...
@@ -907,7 +907,7 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
if
(
loadflags
&
LR_LOADFROMFILE
)
/* Load from file */
{
LPBYTE
*
ptr
;
if
(
!
CURSORICON_SimulateLoadingFromResourceW
(
(
LPWSTR
)
name
,
fCursor
,
&
dir
,
&
ptr
))
if
(
!
CURSORICON_SimulateLoadingFromResourceW
(
name
,
fCursor
,
&
dir
,
&
ptr
))
return
0
;
if
(
fCursor
)
dirEntry
=
(
CURSORICONDIRENTRY
*
)
CURSORICON_FindBestCursor
(
dir
,
width
,
height
,
1
);
...
...
@@ -2198,7 +2198,7 @@ HANDLE WINAPI LoadImageA( HINSTANCE hinst, LPCSTR name, UINT type,
LPWSTR
u_name
;
if
(
!
HIWORD
(
name
))
return
LoadImageW
(
hinst
,
(
LPWSTR
)
name
,
type
,
desiredx
,
desiredy
,
loadflags
);
return
LoadImageW
(
hinst
,
(
LP
C
WSTR
)
name
,
type
,
desiredx
,
desiredy
,
loadflags
);
__TRY
{
DWORD
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
NULL
,
0
);
...
...
windows/dialog.c
View file @
294835a8
...
...
@@ -296,7 +296,7 @@ static BOOL DIALOG_CreateControls32( HWND hwnd, LPCSTR template, const DLG_TEMPL
TRACE
(
" BEGIN
\n
"
);
while
(
items
--
)
{
template
=
(
LPCSTR
)
DIALOG_GetControl32
(
(
WORD
*
)
template
,
&
info
,
template
=
(
LPCSTR
)
DIALOG_GetControl32
(
(
const
WORD
*
)
template
,
&
info
,
dlgTemplate
->
dialogEx
);
/* Is this it? */
if
(
info
.
style
&
WS_BORDER
)
...
...
windows/mdi.c
View file @
294835a8
...
...
@@ -1905,6 +1905,6 @@ static HWND MDI_MoreWindowsDialog(HWND hwnd)
return
0
;
return
(
HWND
)
DialogBoxIndirectParamA
(
user32_module
,
(
LPDLGTEMPLATEA
)
template
,
(
const
DLGTEMPLATE
*
)
template
,
hwnd
,
MDI_MoreWindowsDlgProc
,
(
LPARAM
)
hwnd
);
}
windows/spy.c
View file @
294835a8
...
...
@@ -1316,7 +1316,7 @@ typedef struct
{
const
WCHAR
*
classname
;
/* class name to match */
const
USER_MSG
*
classmsg
;
/* pointer to first USER_MSG for class */
USER_MSG
*
lastmsg
;
/* pointer to last USER_MSG for class */
const
USER_MSG
*
lastmsg
;
/* pointer to last USER_MSG for class */
}
CONTROL_CLASS
;
#define USM(a,b) { #a ,a,b}
...
...
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