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
62a86098
Commit
62a86098
authored
Jun 14, 2004
by
Eric Pouech
Committed by
Alexandre Julliard
Jun 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Const correctness, pointer cast correctness, removed extraneous ';'.
parent
b0fd2ade
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
29 deletions
+33
-29
console.c
dlls/kernel/console.c
+2
-2
dosmem.c
dlls/kernel/dosmem.c
+2
-2
format_msg.c
dlls/kernel/format_msg.c
+5
-5
heap.c
dlls/kernel/heap.c
+1
-1
instr.c
dlls/kernel/instr.c
+1
-1
locale.c
dlls/kernel/locale.c
+3
-2
profile.c
dlls/kernel/profile.c
+9
-6
selector.c
dlls/kernel/selector.c
+4
-4
thread.c
dlls/kernel/thread.c
+4
-4
registry.c
misc/registry.c
+2
-2
No files found.
dlls/kernel/console.c
View file @
62a86098
...
...
@@ -1827,7 +1827,7 @@ static int next_line(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi)
*
*/
static
int
write_block
(
HANDLE
hCon
,
CONSOLE_SCREEN_BUFFER_INFO
*
csbi
,
DWORD
mode
,
LPWSTR
ptr
,
int
len
)
DWORD
mode
,
LP
C
WSTR
ptr
,
int
len
)
{
int
blk
;
/* number of chars to write on current line */
int
done
;
/* number of chars already written */
...
...
@@ -1875,7 +1875,7 @@ BOOL WINAPI WriteConsoleW(HANDLE hConsoleOutput, LPCVOID lpBuffer, DWORD nNumber
{
DWORD
mode
;
DWORD
nw
=
0
;
WCHAR
*
psz
=
(
WCHAR
*
)
lpBuffer
;
const
WCHAR
*
psz
=
lpBuffer
;
CONSOLE_SCREEN_BUFFER_INFO
csbi
;
int
k
,
first
=
0
;
...
...
dlls/kernel/dosmem.c
View file @
62a86098
...
...
@@ -215,7 +215,7 @@ static DWORD DOSMEM_GetTicksSinceMidnight(void)
*/
static
void
DOSMEM_FillBiosSegments
(
void
)
{
BYTE
*
pBiosSys
=
DOSMEM_dosmem
+
0xf0000
;
char
*
pBiosSys
=
DOSMEM_dosmem
+
0xf0000
;
BYTE
*
pBiosROMTable
=
pBiosSys
+
0xe6f5
;
BIOSDATA
*
pBiosData
=
DOSMEM_BiosData
();
...
...
@@ -261,7 +261,7 @@ static void DOSMEM_FillBiosSegments(void)
*
(
pBiosROMTable
+
0x9
)
=
0x00
;
/* feature byte 5 */
/* BIOS date string */
strcpy
(
(
char
*
)
pBiosSys
+
0xfff5
,
"13/01/99"
);
strcpy
(
pBiosSys
+
0xfff5
,
"13/01/99"
);
/* BIOS ID */
*
(
pBiosSys
+
0xfffe
)
=
0xfc
;
...
...
dlls/kernel/format_msg.c
View file @
62a86098
...
...
@@ -90,7 +90,7 @@ static INT load_messageW( HMODULE instance, UINT id, WORD lang,
if
(
i
>
0
)
{
if
(
mre
->
Flags
&
MESSAGE_RESOURCE_UNICODE
)
lstrcpynW
(
buffer
,
(
LPWSTR
)
mre
->
Text
,
i
);
lstrcpynW
(
buffer
,
(
LP
C
WSTR
)
mre
->
Text
,
i
);
else
MultiByteToWideChar
(
CP_ACP
,
0
,
mre
->
Text
,
-
1
,
buffer
,
i
);
buffer
[
i
]
=
0
;
...
...
@@ -170,8 +170,8 @@ DWORD WINAPI FormatMessageA(
from
=
NULL
;
if
(
dwFlags
&
FORMAT_MESSAGE_FROM_STRING
)
{
from
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
((
LPSTR
)
lpSource
)
+
1
);
strcpy
(
from
,
(
LPSTR
)
lpSource
);
from
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
((
LP
C
STR
)
lpSource
)
+
1
);
strcpy
(
from
,
(
LP
C
STR
)
lpSource
);
}
else
{
bufsize
=
0
;
...
...
@@ -398,9 +398,9 @@ DWORD WINAPI FormatMessageW(
FIXME
(
"line wrapping not supported.
\n
"
);
from
=
NULL
;
if
(
dwFlags
&
FORMAT_MESSAGE_FROM_STRING
)
{
from
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
((
LPWSTR
)
lpSource
)
+
1
)
*
from
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
((
LP
C
WSTR
)
lpSource
)
+
1
)
*
sizeof
(
WCHAR
)
);
strcpyW
(
from
,
(
LPWSTR
)
lpSource
);
strcpyW
(
from
,
(
LP
C
WSTR
)
lpSource
);
}
else
{
bufsize
=
0
;
...
...
dlls/kernel/heap.c
View file @
62a86098
...
...
@@ -516,7 +516,7 @@ HGLOBAL WINAPI GlobalHandle(
maybe_intern
=
HANDLE_TO_INTERN
(
handle
);
if
(
maybe_intern
->
Magic
==
MAGIC_GLOBAL_USED
)
{
test
=
maybe_intern
->
Pointer
;
if
(
HeapValidate
(
GetProcessHeap
(),
0
,
(
char
*
)
test
-
HGLOBAL_STORAGE
)
&&
/* obj(-handle) valid arena? */
if
(
HeapValidate
(
GetProcessHeap
(),
0
,
(
c
onst
c
har
*
)
test
-
HGLOBAL_STORAGE
)
&&
/* obj(-handle) valid arena? */
HeapValidate
(
GetProcessHeap
(),
0
,
maybe_intern
))
/* intern valid arena? */
break
;
/* valid moveable block */
}
...
...
dlls/kernel/instr.c
View file @
62a86098
...
...
@@ -275,7 +275,7 @@ static BYTE *INSTR_GetOperandAddr( CONTEXT86 *context, BYTE *instr,
wine_ldt_get_entry
(
seg
,
&
entry
);
if
(
wine_ldt_is_empty
(
&
entry
))
return
NULL
;
if
(
wine_ldt_get_limit
(
&
entry
)
<
(
base
+
(
index
<<
ss
)))
return
NULL
;
return
(
char
*
)
wine_ldt_get_base
(
&
entry
)
+
base
+
(
index
<<
ss
);
return
(
BYTE
*
)
wine_ldt_get_base
(
&
entry
)
+
base
+
(
index
<<
ss
);
#undef GET_VAL
}
...
...
dlls/kernel/locale.c
View file @
62a86098
...
...
@@ -40,6 +40,7 @@
#include "wine/unicode.h"
#include "winnls.h"
#include "winerror.h"
#include "winver.h"
#include "thread.h"
#include "kernel_private.h"
#include "wine/debug.h"
...
...
@@ -464,8 +465,8 @@ END:
*/
static
int
charset_cmp
(
const
void
*
name
,
const
void
*
entry
)
{
const
struct
charset_entry
*
charset
=
(
struct
charset_entry
*
)
entry
;
return
strcasecmp
(
(
char
*
)
name
,
charset
->
charset_name
);
const
struct
charset_entry
*
charset
=
(
const
struct
charset_entry
*
)
entry
;
return
strcasecmp
(
(
c
onst
c
har
*
)
name
,
charset
->
charset_name
);
}
/***********************************************************************
...
...
dlls/kernel/profile.c
View file @
62a86098
...
...
@@ -1048,7 +1048,7 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
BOOL
allow_section_name_copy
)
{
int
ret
;
LPWSTR
pDefVal
=
NULL
;
LP
C
WSTR
pDefVal
=
NULL
;
if
(
!
filename
)
filename
=
wininiW
;
...
...
@@ -1070,13 +1070,16 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
if
(
*
p
==
' '
)
/* ouch, contained trailing ' ' */
{
int
len
=
(
int
)(
p
-
def_val
);
pDefVal
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
strncpyW
(
pDefVal
,
def_val
,
len
);
pDefVal
[
len
]
=
'\0'
;
LPWSTR
p
;
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
strncpyW
(
p
,
def_val
,
len
);
p
[
len
]
=
'\0'
;
pDefVal
=
p
;
}
}
if
(
!
pDefVal
)
pDefVal
=
(
LPWSTR
)
def_val
;
pDefVal
=
(
LP
C
WSTR
)
def_val
;
RtlEnterCriticalSection
(
&
PROFILE_CritSect
);
...
...
@@ -1094,7 +1097,7 @@ static int PROFILE_GetPrivateProfileString( LPCWSTR section, LPCWSTR entry,
RtlLeaveCriticalSection
(
&
PROFILE_CritSect
);
if
(
pDefVal
!=
def_val
)
/* allocated */
HeapFree
(
GetProcessHeap
(),
0
,
pDefVal
);
HeapFree
(
GetProcessHeap
(),
0
,
(
void
*
)
pDefVal
);
TRACE
(
"returning %s, %d
\n
"
,
debugstr_w
(
buffer
),
ret
);
...
...
dlls/kernel/selector.c
View file @
62a86098
...
...
@@ -479,12 +479,12 @@ static struct mapls_entry *first_entry;
SEGPTR
WINAPI
MapLS
(
LPCVOID
ptr
)
{
struct
mapls_entry
*
entry
,
*
free
=
NULL
;
void
*
base
;
const
void
*
base
;
SEGPTR
ret
=
0
;
if
(
!
HIWORD
(
ptr
))
return
(
SEGPTR
)
ptr
;
base
=
(
char
*
)
ptr
-
((
unsigned
int
)
ptr
&
0x7fff
);
base
=
(
c
onst
c
har
*
)
ptr
-
((
unsigned
int
)
ptr
&
0x7fff
);
HeapLock
(
GetProcessHeap
()
);
for
(
entry
=
first_entry
;
entry
;
entry
=
entry
->
next
)
{
...
...
@@ -507,11 +507,11 @@ SEGPTR WINAPI MapLS( LPCVOID ptr )
first_entry
=
free
;
}
SetSelectorBase
(
free
->
sel
,
(
DWORD
)
base
);
free
->
addr
=
base
;
free
->
addr
=
(
void
*
)
base
;
entry
=
free
;
}
entry
->
count
++
;
ret
=
MAKESEGPTR
(
entry
->
sel
,
(
char
*
)
ptr
-
(
char
*
)
entry
->
addr
);
ret
=
MAKESEGPTR
(
entry
->
sel
,
(
c
onst
c
har
*
)
ptr
-
(
char
*
)
entry
->
addr
);
done:
HeapUnlock
(
GetProcessHeap
()
);
return
ret
;
...
...
dlls/kernel/thread.c
View file @
62a86098
...
...
@@ -625,28 +625,28 @@ __ASM_GLOBAL_FUNC( SetLastError,
"movl 4(%esp),%eax
\n\t
"
".byte 0x64
\n\t
"
"movl %eax,0x34
\n\t
"
"ret $4"
)
;
"ret $4"
)
/***********************************************************************
* GetLastError (KERNEL.148)
* GetLastError (KERNEL32.@)
*/
/* DWORD WINAPI GetLastError(void); */
__ASM_GLOBAL_FUNC
(
GetLastError
,
".byte 0x64
\n\t
movl 0x34,%eax
\n\t
ret"
)
;
__ASM_GLOBAL_FUNC
(
GetLastError
,
".byte 0x64
\n\t
movl 0x34,%eax
\n\t
ret"
)
/***********************************************************************
* GetCurrentProcessId (KERNEL.471)
* GetCurrentProcessId (KERNEL32.@)
*/
/* DWORD WINAPI GetCurrentProcessId(void) */
__ASM_GLOBAL_FUNC
(
GetCurrentProcessId
,
".byte 0x64
\n\t
movl 0x20,%eax
\n\t
ret"
)
;
__ASM_GLOBAL_FUNC
(
GetCurrentProcessId
,
".byte 0x64
\n\t
movl 0x20,%eax
\n\t
ret"
)
/***********************************************************************
* GetCurrentThreadId (KERNEL.462)
* GetCurrentThreadId (KERNEL32.@)
*/
/* DWORD WINAPI GetCurrentThreadId(void) */
__ASM_GLOBAL_FUNC
(
GetCurrentThreadId
,
".byte 0x64
\n\t
movl 0x24,%eax
\n\t
ret"
)
;
__ASM_GLOBAL_FUNC
(
GetCurrentThreadId
,
".byte 0x64
\n\t
movl 0x24,%eax
\n\t
ret"
)
#else
/* __i386__ */
...
...
misc/registry.c
View file @
62a86098
...
...
@@ -322,7 +322,7 @@ struct _w31_valent {
};
/* recursive helper function to display a directory tree [Internal] */
static
void
_w31_dumptree
(
unsigned
short
idx
,
unsigned
char
*
txt
,
static
void
_w31_dumptree
(
unsigned
short
idx
,
char
*
txt
,
struct
_w31_tabent
*
tab
,
struct
_w31_header
*
head
,
HKEY
hkey
,
ULONG
lastmodified
,
int
level
)
{
...
...
@@ -398,7 +398,7 @@ static void _w31_loadreg( const WCHAR *path )
UNICODE_STRING
nameW
;
struct
_w31_header
head
;
struct
_w31_tabent
*
tab
=
NULL
;
unsigned
char
*
txt
=
NULL
;
char
*
txt
=
NULL
;
unsigned
int
len
;
ULONG
lastmodified
;
NTSTATUS
status
;
...
...
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