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
7874ce53
Commit
7874ce53
authored
May 03, 2004
by
Jakob Eriksson
Committed by
Alexandre Julliard
May 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent from crashing/hanging in Windows 95 OSR2.
parent
3d5205ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
32 deletions
+9
-32
console.c
dlls/kernel/tests/console.c
+9
-32
No files found.
dlls/kernel/tests/console.c
View file @
7874ce53
...
...
@@ -137,8 +137,9 @@ static void testWriteNotWrappedNotProcessed(HANDLE hCon, COORD sbSize)
{
COORD
c
;
DWORD
len
,
mode
;
const
char
*
mytest
=
"abcd
\n
f
\t
g"
;
const
int
mylen
=
strlen
(
mytest
);
char
*
mytest
;
int
mylen
;
int
ret
;
int
p
;
ok
(
GetConsoleMode
(
hCon
,
&
mode
)
&&
SetConsoleMode
(
hCon
,
mode
&
~
(
ENABLE_PROCESSED_OUTPUT
|
ENABLE_WRAP_AT_EOL_OUTPUT
)),
...
...
@@ -148,7 +149,12 @@ static void testWriteNotWrappedNotProcessed(HANDLE hCon, COORD sbSize)
c
.
X
=
sbSize
.
X
-
3
;
c
.
Y
=
0
;
ok
(
SetConsoleCursorPosition
(
hCon
,
c
)
!=
0
,
"Cursor in upper-left-3
\n
"
);
ok
(
WriteConsole
(
hCon
,
mytest
,
mylen
,
&
len
,
NULL
)
!=
0
&&
len
==
mylen
,
"WriteConsole
\n
"
);
mytest
=
"123"
;
mylen
=
strlen
(
mytest
);
ret
=
WriteConsole
(
hCon
,
mytest
,
mylen
,
&
len
,
NULL
);
ok
(
ret
!=
0
&&
len
==
mylen
,
"Couldn't write, ret = %d, len = %ld
\n
"
,
ret
,
len
);
c
.
Y
=
0
;
for
(
p
=
mylen
-
3
;
p
<
mylen
;
p
++
)
{
...
...
@@ -161,26 +167,12 @@ static void testWriteNotWrappedNotProcessed(HANDLE hCon, COORD sbSize)
p
=
sbSize
.
X
-
3
+
mylen
%
3
;
c
.
X
=
p
;
c
.
Y
=
0
;
okCURSOR
(
hCon
,
c
);
/* write line, wrapping disabled, strings end on end of line */
c
.
X
=
sbSize
.
X
-
mylen
;
c
.
Y
=
0
;
ok
(
SetConsoleCursorPosition
(
hCon
,
c
)
!=
0
,
"Cursor in upper-left-3
\n
"
);
ok
(
WriteConsole
(
hCon
,
mytest
,
mylen
,
&
len
,
NULL
)
!=
0
&&
len
==
mylen
,
"WriteConsole
\n
"
);
c
.
Y
=
0
;
for
(
p
=
0
;
p
<
mylen
;
p
++
)
{
c
.
X
=
sbSize
.
X
-
mylen
+
p
;
okCHAR
(
hCon
,
c
,
mytest
[
p
],
TEST_ATTRIB
);
}
c
.
X
=
0
;
c
.
Y
=
1
;
okCHAR
(
hCon
,
c
,
' '
,
DEFAULT_ATTRIB
);
p
=
sbSize
.
X
-
mylen
;
c
.
X
=
p
;
c
.
Y
=
0
;
okCURSOR
(
hCon
,
c
);
}
static
void
testWriteNotWrappedProcessed
(
HANDLE
hCon
,
COORD
sbSize
)
...
...
@@ -290,24 +282,9 @@ static void testWriteWrappedNotProcessed(HANDLE hCon, COORD sbSize)
c
.
X
=
sbSize
.
X
-
3
;
c
.
Y
=
0
;
ok
(
SetConsoleCursorPosition
(
hCon
,
c
)
!=
0
,
"Cursor in upper-left-3
\n
"
);
ok
(
WriteConsole
(
hCon
,
mytest
,
mylen
,
&
len
,
NULL
)
!=
0
&&
len
==
mylen
,
"WriteConsole
\n
"
);
c
.
Y
=
0
;
for
(
p
=
0
;
p
<
3
;
p
++
)
{
c
.
X
=
sbSize
.
X
-
3
+
p
;
okCHAR
(
hCon
,
c
,
mytest
[
p
],
TEST_ATTRIB
);
}
c
.
Y
=
1
;
for
(
p
=
0
;
p
<
mylen
-
3
;
p
++
)
{
c
.
X
=
p
;
okCHAR
(
hCon
,
c
,
mytest
[
p
+
3
],
TEST_ATTRIB
);
}
c
.
X
=
mylen
-
3
;
okCHAR
(
hCon
,
c
,
' '
,
DEFAULT_ATTRIB
);
okCURSOR
(
hCon
,
c
);
}
static
void
testWriteWrappedProcessed
(
HANDLE
hCon
,
COORD
sbSize
)
...
...
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