Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
0c631ebb
Commit
0c631ebb
authored
Sep 28, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e5c0e8e2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
60 additions
and
172 deletions
+60
-172
Makefile.in
dlls/kernel32/Makefile.in
+2
-2
atom.c
dlls/kernel32/atom.c
+3
-6
comm.c
dlls/kernel32/comm.c
+18
-21
computername.c
dlls/kernel32/computername.c
+0
-4
console.c
dlls/kernel32/console.c
+2
-3
debugger.c
dlls/kernel32/debugger.c
+2
-1
editline.c
dlls/kernel32/editline.c
+0
-4
file.c
dlls/kernel32/file.c
+1
-8
heap.c
dlls/kernel32/heap.c
+0
-3
kernel_main.c
dlls/kernel32/kernel_main.c
+0
-4
lcformat.c
dlls/kernel32/lcformat.c
+14
-17
locale.c
dlls/kernel32/locale.c
+0
-4
lzexpand.c
dlls/kernel32/lzexpand.c
+2
-7
module.c
dlls/kernel32/module.c
+4
-10
path.c
dlls/kernel32/path.c
+3
-6
process.c
dlls/kernel32/process.c
+1
-20
profile.c
dlls/kernel32/profile.c
+0
-0
resource.c
dlls/kernel32/resource.c
+1
-5
sync.c
dlls/kernel32/sync.c
+0
-7
loader.c
dlls/kernel32/tests/loader.c
+5
-17
thread.c
dlls/kernel32/thread.c
+0
-2
toolhelp.c
dlls/kernel32/toolhelp.c
+0
-5
version.c
dlls/kernel32/version.c
+0
-4
virtual.c
dlls/kernel32/virtual.c
+2
-9
volume.c
dlls/kernel32/volume.c
+0
-3
No files found.
dlls/kernel32/Makefile.in
View file @
0c631ebb
EXTRADEFS
=
-D_KERNEL32_
-D_NORMALIZE_
MODULE
=
kernel32.dll
IMPORTLIB
=
kernel32
IMPORTS
=
winecrt0 kernelbase ntdll
EXTRADLLFLAGS
=
-nodefaultlibs
-Wb
,-F,KERNEL32.dll
-Wl
,--image-base,0x7b600000
IMPORTS
=
kernelbase ntdll winecrt0
EXTRADLLFLAGS
=
-
mno-cygwin
-
nodefaultlibs
-Wb
,-F,KERNEL32.dll
-Wl
,--image-base,0x7b600000
C_SRCS
=
\
atom.c
\
...
...
dlls/kernel32/atom.c
View file @
0c631ebb
...
...
@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
...
...
@@ -30,10 +27,10 @@
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winnls.h"
#include "winternl.h"
#include "wine/exception.h"
#include "wine/unicode.h"
#include "kernel_private.h"
#define MAX_ATOM_LEN 255
...
...
@@ -170,7 +167,7 @@ ATOM WINAPI GlobalAddAtomW( LPCWSTR str )
if
(
!
check_integral_atom
(
str
,
&
atom
))
{
if
(
!
set_ntstatus
(
NtAddAtom
(
str
,
strlenW
(
str
)
*
sizeof
(
WCHAR
),
&
atom
)))
return
0
;
if
(
!
set_ntstatus
(
NtAddAtom
(
str
,
l
strlenW
(
str
)
*
sizeof
(
WCHAR
),
&
atom
)))
return
0
;
}
return
atom
;
}
...
...
@@ -302,7 +299,7 @@ ATOM WINAPI GlobalFindAtomW( LPCWSTR str )
if
(
!
check_integral_atom
(
str
,
&
atom
))
{
if
(
!
set_ntstatus
(
NtFindAtom
(
str
,
strlenW
(
str
)
*
sizeof
(
WCHAR
),
&
atom
)))
return
0
;
if
(
!
set_ntstatus
(
NtFindAtom
(
str
,
l
strlenW
(
str
)
*
sizeof
(
WCHAR
),
&
atom
)))
return
0
;
}
return
atom
;
}
...
...
dlls/kernel32/comm.c
View file @
0c631ebb
...
...
@@ -18,21 +18,18 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winerror.h"
#include "winioctl.h"
#include "ddk/ntddser.h"
#include "wine/server.h"
#include "wine/unicode.h"
#include "wine/debug.h"
...
...
@@ -50,7 +47,7 @@ static LPCWSTR COMM_ParseStart(LPCWSTR ptr)
/* The device control string may optionally start with "COMx" followed
by an optional ':' and spaces. */
if
(
!
strncmpiW
(
ptr
,
comW
,
3
))
if
(
!
wcsnicmp
(
ptr
,
comW
,
3
))
{
ptr
+=
3
;
...
...
@@ -84,7 +81,7 @@ static LPCWSTR COMM_ParseStart(LPCWSTR ptr)
static
LPCWSTR
COMM_ParseNumber
(
LPCWSTR
ptr
,
LPDWORD
lpnumber
)
{
if
(
*
ptr
<
'0'
||
*
ptr
>
'9'
)
return
NULL
;
*
lpnumber
=
strtoulW
(
ptr
,
NULL
,
10
);
*
lpnumber
=
wcstoul
(
ptr
,
NULL
,
10
);
while
(
*
ptr
>=
'0'
&&
*
ptr
<=
'9'
)
ptr
++
;
return
ptr
;
}
...
...
@@ -145,7 +142,7 @@ static LPCWSTR COMM_ParseStopBits(LPCWSTR ptr, LPBYTE lpstopbits)
DWORD
temp
;
static
const
WCHAR
stopbits15W
[]
=
{
'1'
,
'.'
,
'5'
,
0
};
if
(
!
strncmpW
(
stopbits15W
,
ptr
,
3
))
if
(
!
wcsncmp
(
stopbits15W
,
ptr
,
3
))
{
ptr
+=
3
;
*
lpstopbits
=
ONE5STOPBITS
;
...
...
@@ -171,12 +168,12 @@ static LPCWSTR COMM_ParseOnOff(LPCWSTR ptr, LPDWORD lponoff)
static
const
WCHAR
onW
[]
=
{
'o'
,
'n'
,
0
};
static
const
WCHAR
offW
[]
=
{
'o'
,
'f'
,
'f'
,
0
};
if
(
!
strncmpiW
(
onW
,
ptr
,
2
))
if
(
!
wcsnicmp
(
onW
,
ptr
,
2
))
{
ptr
+=
2
;
*
lponoff
=
1
;
}
else
if
(
!
strncmpiW
(
offW
,
ptr
,
3
))
else
if
(
!
wcsnicmp
(
offW
,
ptr
,
3
))
{
ptr
+=
3
;
*
lponoff
=
0
;
...
...
@@ -314,31 +311,31 @@ static BOOL COMM_BuildNewCommDCB(LPCWSTR device, LPDCB lpdcb, LPCOMMTIMEOUTS lpt
{
while
(
*
device
==
' '
)
device
++
;
if
(
!
strncmpiW
(
baudW
,
device
,
5
))
if
(
!
wcsnicmp
(
baudW
,
device
,
5
))
{
baud
=
TRUE
;
if
(
!
(
device
=
COMM_ParseNumber
(
device
+
5
,
&
lpdcb
->
BaudRate
)))
return
FALSE
;
}
else
if
(
!
strncmpiW
(
parityW
,
device
,
7
))
else
if
(
!
wcsnicmp
(
parityW
,
device
,
7
))
{
if
(
!
(
device
=
COMM_ParseParity
(
device
+
7
,
&
lpdcb
->
Parity
)))
return
FALSE
;
}
else
if
(
!
strncmpiW
(
dataW
,
device
,
5
))
else
if
(
!
wcsnicmp
(
dataW
,
device
,
5
))
{
if
(
!
(
device
=
COMM_ParseByteSize
(
device
+
5
,
&
lpdcb
->
ByteSize
)))
return
FALSE
;
}
else
if
(
!
strncmpiW
(
stopW
,
device
,
5
))
else
if
(
!
wcsnicmp
(
stopW
,
device
,
5
))
{
stop
=
TRUE
;
if
(
!
(
device
=
COMM_ParseStopBits
(
device
+
5
,
&
lpdcb
->
StopBits
)))
return
FALSE
;
}
else
if
(
!
strncmpiW
(
toW
,
device
,
3
))
else
if
(
!
wcsnicmp
(
toW
,
device
,
3
))
{
if
(
!
(
device
=
COMM_ParseOnOff
(
device
+
3
,
&
temp
)))
return
FALSE
;
...
...
@@ -349,7 +346,7 @@ static BOOL COMM_BuildNewCommDCB(LPCWSTR device, LPDCB lpdcb, LPCOMMTIMEOUTS lpt
lptimeouts
->
WriteTotalTimeoutMultiplier
=
0
;
lptimeouts
->
WriteTotalTimeoutConstant
=
temp
?
60000
:
0
;
}
else
if
(
!
strncmpiW
(
xonW
,
device
,
4
))
else
if
(
!
wcsnicmp
(
xonW
,
device
,
4
))
{
if
(
!
(
device
=
COMM_ParseOnOff
(
device
+
4
,
&
temp
)))
return
FALSE
;
...
...
@@ -357,35 +354,35 @@ static BOOL COMM_BuildNewCommDCB(LPCWSTR device, LPDCB lpdcb, LPCOMMTIMEOUTS lpt
lpdcb
->
fOutX
=
temp
;
lpdcb
->
fInX
=
temp
;
}
else
if
(
!
strncmpiW
(
odsrW
,
device
,
5
))
else
if
(
!
wcsnicmp
(
odsrW
,
device
,
5
))
{
if
(
!
(
device
=
COMM_ParseOnOff
(
device
+
5
,
&
temp
)))
return
FALSE
;
lpdcb
->
fOutxDsrFlow
=
temp
;
}
else
if
(
!
strncmpiW
(
octsW
,
device
,
5
))
else
if
(
!
wcsnicmp
(
octsW
,
device
,
5
))
{
if
(
!
(
device
=
COMM_ParseOnOff
(
device
+
5
,
&
temp
)))
return
FALSE
;
lpdcb
->
fOutxCtsFlow
=
temp
;
}
else
if
(
!
strncmpiW
(
dtrW
,
device
,
4
))
else
if
(
!
wcsnicmp
(
dtrW
,
device
,
4
))
{
if
(
!
(
device
=
COMM_ParseOnOff
(
device
+
4
,
&
temp
)))
return
FALSE
;
lpdcb
->
fDtrControl
=
temp
;
}
else
if
(
!
strncmpiW
(
rtsW
,
device
,
4
))
else
if
(
!
wcsnicmp
(
rtsW
,
device
,
4
))
{
if
(
!
(
device
=
COMM_ParseOnOff
(
device
+
4
,
&
temp
)))
return
FALSE
;
lpdcb
->
fRtsControl
=
temp
;
}
else
if
(
!
strncmpiW
(
idsrW
,
device
,
5
))
else
if
(
!
wcsnicmp
(
idsrW
,
device
,
5
))
{
if
(
!
(
device
=
COMM_ParseOnOff
(
device
+
5
,
&
temp
)))
return
FALSE
;
...
...
@@ -500,7 +497,7 @@ BOOL WINAPI BuildCommDCBAndTimeoutsW(
if
(
ptr
==
NULL
)
result
=
FALSE
;
else
if
(
strchrW
(
ptr
,
','
))
else
if
(
wcschr
(
ptr
,
','
))
result
=
COMM_BuildOldCommDCB
(
ptr
,
&
dcb
);
else
result
=
COMM_BuildNewCommDCB
(
ptr
,
&
dcb
,
&
timeouts
);
...
...
dlls/kernel32/computername.c
View file @
0c631ebb
...
...
@@ -20,9 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
...
...
@@ -34,7 +31,6 @@
#include "winerror.h"
#include "winnls.h"
#include "winternl.h"
#include "wine/unicode.h"
#include "wine/exception.h"
#include "kernel_private.h"
...
...
dlls/kernel32/console.c
View file @
0c631ebb
...
...
@@ -39,7 +39,6 @@
#include "wine/condrv.h"
#include "wine/server.h"
#include "wine/exception.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "excpt.h"
#include "console_private.h"
...
...
@@ -81,7 +80,7 @@ HANDLE WINAPI OpenConsoleW(LPCWSTR name, DWORD access, BOOL inherit, DWORD creat
TRACE
(
"(%s, 0x%08x, %d, %u)
\n
"
,
debugstr_w
(
name
),
access
,
inherit
,
creation
);
if
(
!
name
||
(
strcmpiW
(
coninW
,
name
)
&&
strcmpiW
(
conoutW
,
name
))
||
creation
!=
OPEN_EXISTING
)
if
(
!
name
||
(
wcsicmp
(
coninW
,
name
)
&&
wcsicmp
(
conoutW
,
name
))
||
creation
!=
OPEN_EXISTING
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
INVALID_HANDLE_VALUE
;
...
...
@@ -674,7 +673,7 @@ int CONSOLE_GetHistory(int idx, WCHAR* buf, int buf_len)
*/
BOOL
CONSOLE_AppendHistory
(
const
WCHAR
*
ptr
)
{
size_t
len
=
strlenW
(
ptr
);
size_t
len
=
l
strlenW
(
ptr
);
BOOL
ret
;
while
(
len
&&
(
ptr
[
len
-
1
]
==
'\n'
||
ptr
[
len
-
1
]
==
'\r'
))
len
--
;
...
...
dlls/kernel32/debugger.c
View file @
0c631ebb
...
...
@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdio.h>
#include <string.h>
...
...
@@ -33,6 +32,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
debugstr
);
void
*
dummy
=
RtlUnwind
;
/* force importing RtlUnwind from ntdll */
static
LONG
WINAPI
debug_exception_handler
(
EXCEPTION_POINTERS
*
eptr
)
{
EXCEPTION_RECORD
*
rec
=
eptr
->
ExceptionRecord
;
...
...
dlls/kernel32/editline.c
View file @
0c631ebb
...
...
@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
...
...
@@ -28,7 +25,6 @@
#include "winbase.h"
#include "wincon.h"
#include "winuser.h"
#include "wine/unicode.h"
#include "winnls.h"
#include "wine/debug.h"
#include "console_private.h"
...
...
dlls/kernel32/file.c
View file @
0c631ebb
...
...
@@ -20,15 +20,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include <errno.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
...
...
@@ -46,7 +40,6 @@
#include "shlwapi.h"
#include "wine/exception.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
file
);
...
...
@@ -132,7 +125,7 @@ DWORD FILE_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen )
{
DWORD
ret
;
if
(
srclen
<
0
)
srclen
=
strlenW
(
src
)
+
1
;
if
(
srclen
<
0
)
srclen
=
l
strlenW
(
src
)
+
1
;
if
(
!
destlen
)
{
if
(
!
AreFileApisANSI
())
...
...
dlls/kernel32/heap.c
View file @
0c631ebb
...
...
@@ -20,9 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <limits.h>
#include <stdlib.h>
...
...
dlls/kernel32/kernel_main.c
View file @
0c631ebb
...
...
@@ -18,10 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <string.h>
...
...
dlls/kernel32/lcformat.c
View file @
0c631ebb
...
...
@@ -22,9 +22,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
...
...
@@ -32,7 +29,7 @@
#include "windef.h"
#include "winbase.h"
#include "win
e/unicode
.h"
#include "win
nls
.h"
#include "wine/debug.h"
#include "winternl.h"
...
...
@@ -130,7 +127,7 @@ static WCHAR* NLS_GetLocaleString(LCID lcid, DWORD dwFlags)
szBuff
[
0
]
=
'\0'
;
GetLocaleInfoW
(
lcid
,
dwFlags
,
szBuff
,
ARRAY_SIZE
(
szBuff
));
dwLen
=
strlenW
(
szBuff
)
+
1
;
dwLen
=
l
strlenW
(
szBuff
)
+
1
;
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwLen
*
sizeof
(
WCHAR
));
if
(
str
)
memcpy
(
str
,
szBuff
,
dwLen
*
sizeof
(
WCHAR
));
...
...
@@ -265,7 +262,7 @@ static const NLS_FORMAT_NODE *NLS_GetFormats(LCID lcid, DWORD dwFlags)
/* Save some memory if month genitive name is the same or not present */
for
(
i
=
0
;
i
<
12
;
i
++
)
{
if
(
strcmpW
(
GetLongMonth
(
new_node
,
i
),
GetGenitiveMonth
(
new_node
,
i
))
==
0
)
if
(
wcscmp
(
GetLongMonth
(
new_node
,
i
),
GetGenitiveMonth
(
new_node
,
i
))
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
GetGenitiveMonth
(
new_node
,
i
));
GetGenitiveMonth
(
new_node
,
i
)
=
NULL
;
...
...
@@ -677,10 +674,10 @@ static INT NLS_GetDateTimeFormatW(LCID lcid, DWORD dwFlags,
{
static
const
WCHAR
fmtW
[]
=
{
'%'
,
'.'
,
'*'
,
'd'
,
0
};
/* We have a numeric value to add */
s
nprintfW
(
buff
,
ARRAY_SIZE
(
buff
),
fmtW
,
count
,
dwVal
);
s
wprintf
(
buff
,
ARRAY_SIZE
(
buff
),
fmtW
,
count
,
dwVal
);
}
dwLen
=
szAdd
?
strlenW
(
szAdd
)
:
0
;
dwLen
=
szAdd
?
l
strlenW
(
szAdd
)
:
0
;
if
(
cchOut
&&
dwLen
)
{
...
...
@@ -1143,7 +1140,7 @@ INT WINAPI GetNumberFormatW(LCID lcid, DWORD dwFlags,
szNegBuff
,
ARRAY_SIZE
(
szNegBuff
));
lpszNegStart
=
lpszNeg
=
szNegBuff
;
}
lpszNeg
=
lpszNeg
+
strlenW
(
lpszNeg
)
-
1
;
lpszNeg
=
lpszNeg
+
l
strlenW
(
lpszNeg
)
-
1
;
dwFlags
&=
(
LOCALE_NOUSEROVERRIDE
|
LOCALE_USE_CP_ACP
);
...
...
@@ -1218,7 +1215,7 @@ INT WINAPI GetNumberFormatW(LCID lcid, DWORD dwFlags,
}
else
{
LPWSTR
lpszDec
=
lpFormat
->
lpDecimalSep
+
strlenW
(
lpFormat
->
lpDecimalSep
)
-
1
;
LPWSTR
lpszDec
=
lpFormat
->
lpDecimalSep
+
l
strlenW
(
lpFormat
->
lpDecimalSep
)
-
1
;
if
(
dwDecimals
<=
lpFormat
->
NumDigits
)
{
...
...
@@ -1288,7 +1285,7 @@ INT WINAPI GetNumberFormatW(LCID lcid, DWORD dwFlags,
dwCurrentGroupCount
++
;
if
(
szSrc
>=
lpszValue
&&
dwCurrentGroupCount
==
dwGroupCount
&&
*
szSrc
!=
'-'
)
{
LPWSTR
lpszGrp
=
lpFormat
->
lpThousandSep
+
strlenW
(
lpFormat
->
lpThousandSep
)
-
1
;
LPWSTR
lpszGrp
=
lpFormat
->
lpThousandSep
+
l
strlenW
(
lpFormat
->
lpThousandSep
)
-
1
;
while
(
lpszGrp
>=
lpFormat
->
lpThousandSep
)
*
szOut
--
=
*
lpszGrp
--
;
/* Write grouping char */
...
...
@@ -1324,7 +1321,7 @@ INT WINAPI GetNumberFormatW(LCID lcid, DWORD dwFlags,
}
szOut
++
;
iRet
=
strlenW
(
szOut
)
+
1
;
iRet
=
l
strlenW
(
szOut
)
+
1
;
if
(
cchOut
)
{
if
(
iRet
<=
cchOut
)
...
...
@@ -1538,9 +1535,9 @@ INT WINAPI GetCurrencyFormatW(LCID lcid, DWORD dwFlags,
}
dwFlags
&=
(
LOCALE_NOUSEROVERRIDE
|
LOCALE_USE_CP_ACP
);
lpszNeg
=
lpszNeg
+
strlenW
(
lpszNeg
)
-
1
;
lpszNeg
=
lpszNeg
+
l
strlenW
(
lpszNeg
)
-
1
;
lpszCyStart
=
lpFormat
->
lpCurrencySymbol
;
lpszCy
=
lpszCyStart
+
strlenW
(
lpszCyStart
)
-
1
;
lpszCy
=
lpszCyStart
+
l
strlenW
(
lpszCyStart
)
-
1
;
/* Format the currency backwards into a temporary buffer */
...
...
@@ -1627,7 +1624,7 @@ INT WINAPI GetCurrencyFormatW(LCID lcid, DWORD dwFlags,
}
else
{
LPWSTR
lpszDec
=
lpFormat
->
lpDecimalSep
+
strlenW
(
lpFormat
->
lpDecimalSep
)
-
1
;
LPWSTR
lpszDec
=
lpFormat
->
lpDecimalSep
+
l
strlenW
(
lpFormat
->
lpDecimalSep
)
-
1
;
if
(
dwDecimals
<=
lpFormat
->
NumDigits
)
{
...
...
@@ -1696,7 +1693,7 @@ INT WINAPI GetCurrencyFormatW(LCID lcid, DWORD dwFlags,
dwCurrentGroupCount
++
;
if
(
szSrc
>=
lpszValue
&&
dwCurrentGroupCount
==
dwGroupCount
&&
*
szSrc
!=
'-'
)
{
LPWSTR
lpszGrp
=
lpFormat
->
lpThousandSep
+
strlenW
(
lpFormat
->
lpThousandSep
)
-
1
;
LPWSTR
lpszGrp
=
lpFormat
->
lpThousandSep
+
l
strlenW
(
lpFormat
->
lpThousandSep
)
-
1
;
while
(
lpszGrp
>=
lpFormat
->
lpThousandSep
)
*
szOut
--
=
*
lpszGrp
--
;
/* Write grouping char */
...
...
@@ -1736,7 +1733,7 @@ INT WINAPI GetCurrencyFormatW(LCID lcid, DWORD dwFlags,
*
szOut
--
=
'('
;
szOut
++
;
iRet
=
strlenW
(
szOut
)
+
1
;
iRet
=
l
strlenW
(
szOut
)
+
1
;
if
(
cchOut
)
{
if
(
iRet
<=
cchOut
)
...
...
dlls/kernel32/locale.c
View file @
0c631ebb
...
...
@@ -21,9 +21,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <locale.h>
#include <string.h>
...
...
@@ -37,7 +34,6 @@
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/unicode.h"
#include "winnls.h"
#include "winerror.h"
#include "winver.h"
...
...
dlls/kernel32/lzexpand.c
View file @
0c631ebb
...
...
@@ -33,23 +33,18 @@
*
*/
#include "config.h"
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <stdarg.h>
#include <stdio.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winternl.h"
#include "lzexpand.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
file
);
...
...
@@ -315,7 +310,7 @@ INT WINAPI GetExpandedNameW( LPWSTR in, LPWSTR out )
char
*
xout
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
+
3
);
WideCharToMultiByte
(
CP_ACP
,
0
,
in
,
-
1
,
xin
,
len
,
NULL
,
NULL
);
if
((
ret
=
GetExpandedNameA
(
xin
,
xout
))
>
0
)
MultiByteToWideChar
(
CP_ACP
,
0
,
xout
,
-
1
,
out
,
strlenW
(
in
)
+
4
);
MultiByteToWideChar
(
CP_ACP
,
0
,
xout
,
-
1
,
out
,
l
strlenW
(
in
)
+
4
);
HeapFree
(
GetProcessHeap
(),
0
,
xin
);
HeapFree
(
GetProcessHeap
(),
0
,
xout
);
return
ret
;
...
...
dlls/kernel32/module.c
View file @
0c631ebb
...
...
@@ -18,18 +18,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "winerror.h"
...
...
@@ -43,7 +38,6 @@
#include "wine/list.h"
#include "wine/asm.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
module
);
...
...
@@ -230,14 +224,14 @@ BOOL WINAPI GetBinaryTypeW( LPCWSTR name, LPDWORD type )
*
type
=
SCS_DOS_BINARY
;
return
TRUE
;
case
STATUS_INVALID_IMAGE_NOT_MZ
:
if
((
ptr
=
strrchrW
(
name
,
'.'
)))
if
((
ptr
=
wcsrchr
(
name
,
'.'
)))
{
if
(
!
strcmpiW
(
ptr
,
comW
))
if
(
!
wcsicmp
(
ptr
,
comW
))
{
*
type
=
SCS_DOS_BINARY
;
return
TRUE
;
}
if
(
!
strcmpiW
(
ptr
,
pifW
))
if
(
!
wcsicmp
(
ptr
,
pifW
))
{
*
type
=
SCS_PIF_BINARY
;
return
TRUE
;
...
...
dlls/kernel32/path.c
View file @
0c631ebb
...
...
@@ -21,9 +21,6 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include <errno.h>
#include <stdio.h>
#include <stdarg.h>
...
...
@@ -33,10 +30,10 @@
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winternl.h"
#include "kernel_private.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
file
);
...
...
@@ -235,10 +232,10 @@ BOOL WINAPI CreateDirectoryExA( LPCSTR template, LPCSTR path, LPSECURITY_ATTRIBU
*/
UINT
WINAPI
GetSystemDirectoryW
(
LPWSTR
path
,
UINT
count
)
{
UINT
len
=
strlenW
(
DIR_System
)
+
1
;
UINT
len
=
l
strlenW
(
DIR_System
)
+
1
;
if
(
path
&&
count
>=
len
)
{
strcpyW
(
path
,
DIR_System
);
l
strcpyW
(
path
,
DIR_System
);
len
--
;
}
return
len
;
...
...
dlls/kernel32/process.c
View file @
0c631ebb
...
...
@@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <assert.h>
#include <ctype.h>
#include <errno.h>
...
...
@@ -28,33 +25,17 @@
#include <stdarg.h>
#include <stdio.h>
#include <time.h>
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#include <sys/types.h>
#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "winternl.h"
#include "winbase.h"
#include "winnls.h"
#include "wincon.h"
#include "kernel_private.h"
#include "psapi.h"
#include "wine/exception.h"
#include "wine/server.h"
#include "wine/unicode.h"
#include "wine/asm.h"
#include "wine/debug.h"
...
...
dlls/kernel32/profile.c
View file @
0c631ebb
This diff is collapsed.
Click to expand it.
dlls/kernel32/resource.c
View file @
0c631ebb
...
...
@@ -20,9 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#define NONAMELESSUNION
...
...
@@ -34,7 +31,6 @@
#include "winternl.h"
#include "wine/debug.h"
#include "wine/exception.h"
#include "wine/unicode.h"
#include "wine/list.h"
#include "kernel_private.h"
...
...
@@ -213,7 +209,7 @@ static int resource_strcmp( LPCWSTR a, LPCWSTR b )
if
(
a
==
b
)
return
0
;
if
(
!
IS_INTRESOURCE
(
a
)
&&
!
IS_INTRESOURCE
(
b
)
)
return
lstrcmpW
(
a
,
b
);
return
wcscmp
(
a
,
b
);
/* strings come before ids */
if
(
!
IS_INTRESOURCE
(
a
)
&&
IS_INTRESOURCE
(
b
))
return
-
1
;
...
...
dlls/kernel32/sync.c
View file @
0c631ebb
...
...
@@ -18,13 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <string.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
...
...
@@ -42,7 +36,6 @@
#include "ddk/wdm.h"
#include "wine/asm.h"
#include "wine/unicode.h"
#include "kernel_private.h"
#include "wine/debug.h"
...
...
dlls/kernel32/tests/loader.c
View file @
0c631ebb
...
...
@@ -3901,7 +3901,7 @@ static void test_wow64_redirection(void)
ok
(
pWow64RevertWow64FsRedirection
(
OldValue
),
"Re-enabling FS redirection failed
\n
"
);
}
static
void
test_dll_file
(
const
char
*
name
,
BOOL
is_todo
)
static
void
test_dll_file
(
const
char
*
name
)
{
HMODULE
module
=
GetModuleHandleA
(
name
);
IMAGE_NT_HEADERS
*
nt
,
*
nt_file
;
...
...
@@ -3926,29 +3926,17 @@ static void test_dll_file( const char *name, BOOL is_todo )
nt_file
=
pRtlImageNtHeader
(
ptr
);
ok
(
nt_file
!=
NULL
,
"%s: invalid header
\n
"
,
path
);
#define OK_FIELD(x) ok( nt->x == nt_file->x, "%s:%u: wrong " #x " %x / %x\n", name, i, nt->x, nt_file->x )
todo_wine_if
(
is_todo
)
OK_FIELD
(
FileHeader
.
NumberOfSections
);
todo_wine_if
(
is_todo
)
OK_FIELD
(
OptionalHeader
.
AddressOfEntryPoint
);
OK_FIELD
(
OptionalHeader
.
NumberOfRvaAndSizes
);
for
(
i
=
0
;
i
<
nt
->
OptionalHeader
.
NumberOfRvaAndSizes
;
i
++
)
{
todo_wine_if
(
is_todo
&&
(
i
==
IMAGE_DIRECTORY_ENTRY_EXPORT
||
(
i
==
IMAGE_DIRECTORY_ENTRY_IMPORT
&&
nt
->
OptionalHeader
.
DataDirectory
[
i
].
Size
)
||
i
==
IMAGE_DIRECTORY_ENTRY_RESOURCE
||
i
==
IMAGE_DIRECTORY_ENTRY_BASERELOC
))
OK_FIELD
(
OptionalHeader
.
DataDirectory
[
i
].
VirtualAddress
);
todo_wine_if
(
is_todo
&&
(
i
==
IMAGE_DIRECTORY_ENTRY_EXPORT
||
(
i
==
IMAGE_DIRECTORY_ENTRY_IMPORT
&&
nt
->
OptionalHeader
.
DataDirectory
[
i
].
Size
)
||
i
==
IMAGE_DIRECTORY_ENTRY_BASERELOC
))
OK_FIELD
(
OptionalHeader
.
DataDirectory
[
i
].
Size
);
}
sec
=
(
IMAGE_SECTION_HEADER
*
)((
char
*
)
&
nt
->
OptionalHeader
+
nt
->
FileHeader
.
SizeOfOptionalHeader
);
sec_file
=
(
IMAGE_SECTION_HEADER
*
)((
char
*
)
&
nt_file
->
OptionalHeader
+
nt_file
->
FileHeader
.
SizeOfOptionalHeader
);
for
(
i
=
0
;
i
<
nt
->
FileHeader
.
NumberOfSections
;
i
++
)
todo_wine_if
(
is_todo
)
ok
(
!
memcmp
(
sec
+
i
,
sec_file
+
i
,
sizeof
(
*
sec
)
),
"%s: wrong section %d
\n
"
,
name
,
i
);
UnmapViewOfFile
(
ptr
);
#undef OK_FIELD
...
...
@@ -4042,10 +4030,10 @@ START_TEST(loader)
test_InMemoryOrderModuleList
();
test_LoadPackagedLibrary
();
test_wow64_redirection
();
test_dll_file
(
"ntdll.dll"
,
FALSE
);
test_dll_file
(
"kernel32.dll"
,
TRUE
);
test_dll_file
(
"advapi32.dll"
,
FALSE
);
test_dll_file
(
"user32.dll"
,
FALSE
);
test_dll_file
(
"ntdll.dll"
);
test_dll_file
(
"kernel32.dll"
);
test_dll_file
(
"advapi32.dll"
);
test_dll_file
(
"user32.dll"
);
/* loader test must be last, it can corrupt the internal loader state on Windows */
test_Loader
();
}
dlls/kernel32/thread.c
View file @
0c631ebb
...
...
@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <assert.h>
#include <stdarg.h>
#include <sys/types.h>
...
...
dlls/kernel32/toolhelp.c
View file @
0c631ebb
...
...
@@ -19,14 +19,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <ctype.h>
#include <assert.h>
#include "ntstatus.h"
...
...
dlls/kernel32/version.c
View file @
0c631ebb
...
...
@@ -21,9 +21,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
...
...
@@ -36,7 +33,6 @@
#include "winuser.h"
#include "winternl.h"
#include "winerror.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ver
);
...
...
dlls/kernel32/virtual.c
View file @
0c631ebb
...
...
@@ -18,17 +18,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <fcntl.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#define WINE_NO_INLINE_STRING
#include "ntstatus.h"
...
...
@@ -41,7 +35,6 @@
#include "winerror.h"
#include "psapi.h"
#include "wine/exception.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "kernel_private.h"
...
...
@@ -285,7 +278,7 @@ LPWSTR WINAPI lstrcatW( LPWSTR dst, LPCWSTR src )
{
__TRY
{
strcatW
(
dst
,
src
);
wcscat
(
dst
,
src
);
}
__EXCEPT
(
badptr_handler
)
{
...
...
@@ -325,7 +318,7 @@ LPWSTR WINAPI lstrcpyW( LPWSTR dst, LPCWSTR src )
{
__TRY
{
strcpyW
(
dst
,
src
);
wcscpy
(
dst
,
src
);
}
__EXCEPT
(
badptr_handler
)
{
...
...
dlls/kernel32/volume.c
View file @
0c631ebb
...
...
@@ -22,9 +22,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
...
...
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