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
7ab78b4e
Commit
7ab78b4e
authored
Oct 24, 2013
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Oct 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use BOOL type where appropriate.
parent
c39eac63
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
console.c
dlls/kernel32/console.c
+13
-13
environ.c
dlls/kernel32/environ.c
+2
-2
except.c
dlls/kernel32/except.c
+1
-1
sync.c
dlls/kernel32/sync.c
+2
-2
time.c
dlls/kernel32/time.c
+2
-2
No files found.
dlls/kernel32/console.c
View file @
7ab78b4e
...
...
@@ -2272,7 +2272,7 @@ static int CONSOLE_WriteChars(HANDLE hCon, LPCWSTR lpBuffer, int nc, COORD* pos)
* WriteConsoleOutput helper: handles passing to next line (+scrolling if necessary)
*
*/
static
int
next_line
(
HANDLE
hCon
,
CONSOLE_SCREEN_BUFFER_INFO
*
csbi
)
static
BOOL
next_line
(
HANDLE
hCon
,
CONSOLE_SCREEN_BUFFER_INFO
*
csbi
)
{
SMALL_RECT
src
;
CHAR_INFO
ci
;
...
...
@@ -2281,7 +2281,7 @@ static int next_line(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi)
csbi
->
dwCursorPosition
.
X
=
0
;
csbi
->
dwCursorPosition
.
Y
++
;
if
(
csbi
->
dwCursorPosition
.
Y
<
csbi
->
dwSize
.
Y
)
return
1
;
if
(
csbi
->
dwCursorPosition
.
Y
<
csbi
->
dwSize
.
Y
)
return
TRUE
;
src
.
Top
=
1
;
src
.
Bottom
=
csbi
->
dwSize
.
Y
-
1
;
...
...
@@ -2296,8 +2296,8 @@ static int next_line(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi)
csbi
->
dwCursorPosition
.
Y
--
;
if
(
!
ScrollConsoleScreenBufferW
(
hCon
,
&
src
,
NULL
,
dst
,
&
ci
))
return
0
;
return
1
;
return
FALSE
;
return
TRUE
;
}
/******************************************************************
...
...
@@ -2308,13 +2308,13 @@ static int next_line(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi)
* handled
*
*/
static
int
write_block
(
HANDLE
hCon
,
CONSOLE_SCREEN_BUFFER_INFO
*
csbi
,
DWORD
mode
,
LPCWSTR
ptr
,
int
len
)
static
BOOL
write_block
(
HANDLE
hCon
,
CONSOLE_SCREEN_BUFFER_INFO
*
csbi
,
DWORD
mode
,
LPCWSTR
ptr
,
int
len
)
{
int
blk
;
/* number of chars to write on current line */
int
done
;
/* number of chars already written */
if
(
len
<=
0
)
return
1
;
if
(
len
<=
0
)
return
TRUE
;
if
(
mode
&
ENABLE_WRAP_AT_EOL_OUTPUT
)
/* writes remaining on next line */
{
...
...
@@ -2323,9 +2323,9 @@ static int write_block(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi,
blk
=
min
(
len
-
done
,
csbi
->
dwSize
.
X
-
csbi
->
dwCursorPosition
.
X
);
if
(
CONSOLE_WriteChars
(
hCon
,
ptr
+
done
,
blk
,
&
csbi
->
dwCursorPosition
)
!=
blk
)
return
0
;
return
FALSE
;
if
(
csbi
->
dwCursorPosition
.
X
==
csbi
->
dwSize
.
X
&&
!
next_line
(
hCon
,
csbi
))
return
0
;
return
FALSE
;
}
}
else
...
...
@@ -2342,11 +2342,11 @@ static int write_block(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi,
csbi
->
dwCursorPosition
.
X
=
pos
;
if
(
CONSOLE_WriteChars
(
hCon
,
ptr
+
done
,
blk
,
&
csbi
->
dwCursorPosition
)
!=
blk
)
return
0
;
return
FALSE
;
}
}
return
1
;
return
TRUE
;
}
/***********************************************************************
...
...
@@ -2491,7 +2491,7 @@ BOOL WINAPI WriteConsoleA(HANDLE hConsoleOutput, LPCVOID lpBuffer, DWORD nNumber
if
(
lpNumberOfCharsWritten
)
*
lpNumberOfCharsWritten
=
0
;
xstring
=
HeapAlloc
(
GetProcessHeap
(),
0
,
n
*
sizeof
(
WCHAR
));
if
(
!
xstring
)
return
0
;
if
(
!
xstring
)
return
FALSE
;
MultiByteToWideChar
(
GetConsoleOutputCP
(),
0
,
lpBuffer
,
nNumberOfCharsToWrite
,
xstring
,
n
);
...
...
@@ -3009,7 +3009,7 @@ unsigned CONSOLE_GetNumHistoryEntries(void)
*/
BOOL
CONSOLE_GetEditionMode
(
HANDLE
hConIn
,
int
*
mode
)
{
unsigned
ret
=
FALSE
;
unsigned
ret
=
0
;
SERVER_START_REQ
(
get_console_input_info
)
{
req
->
handle
=
console_handle_unmap
(
hConIn
);
...
...
dlls/kernel32/environ.c
View file @
7ab78b4e
...
...
@@ -247,7 +247,7 @@ BOOL WINAPI SetEnvironmentVariableA( LPCSTR name, LPCSTR value )
if
(
!
name
)
{
SetLastError
(
ERROR_ENVVAR_NOT_FOUND
);
return
0
;
return
FALSE
;
}
RtlCreateUnicodeStringFromAsciiz
(
&
us_name
,
name
);
...
...
@@ -280,7 +280,7 @@ BOOL WINAPI SetEnvironmentVariableW( LPCWSTR name, LPCWSTR value )
if
(
!
name
)
{
SetLastError
(
ERROR_ENVVAR_NOT_FOUND
);
return
0
;
return
FALSE
;
}
RtlInitUnicodeString
(
&
us_name
,
name
);
...
...
dlls/kernel32/except.c
View file @
7ab78b4e
...
...
@@ -346,7 +346,7 @@ EXIT:
*
* returns TRUE for the two first conditions, FALSE for the last
*/
static
int
start_debugger_atomic
(
PEXCEPTION_POINTERS
epointers
)
static
BOOL
start_debugger_atomic
(
PEXCEPTION_POINTERS
epointers
)
{
static
HANDLE
hRunOnce
/* = 0 */
;
...
...
dlls/kernel32/sync.c
View file @
7ab78b4e
...
...
@@ -50,7 +50,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
sync
);
/* check if current version is NT or Win95 */
static
inline
int
is_version_nt
(
void
)
static
inline
BOOL
is_version_nt
(
void
)
{
return
!
(
GetVersion
()
&
0x80000000
);
}
...
...
@@ -1467,7 +1467,7 @@ BOOL WINAPI WaitNamedPipeA (LPCSTR name, DWORD nTimeOut)
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
name
,
-
1
,
buffer
,
MAX_PATH
))
{
SetLastError
(
ERROR_FILENAME_EXCED_RANGE
);
return
0
;
return
FALSE
;
}
return
WaitNamedPipeW
(
buffer
,
nTimeOut
);
}
...
...
dlls/kernel32/time.c
View file @
7ab78b4e
...
...
@@ -67,9 +67,9 @@ static const int MonthLengths[2][12] =
{
31
,
29
,
31
,
30
,
31
,
30
,
31
,
31
,
30
,
31
,
30
,
31
}
};
static
inline
int
IsLeapYear
(
int
Year
)
static
inline
BOOL
IsLeapYear
(
int
Year
)
{
return
Year
%
4
==
0
&&
(
Year
%
100
!=
0
||
Year
%
400
==
0
)
?
1
:
0
;
return
Year
%
4
==
0
&&
(
Year
%
100
!=
0
||
Year
%
400
==
0
)
;
}
/***********************************************************************
...
...
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