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
d3446a44
Commit
d3446a44
authored
May 13, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
May 13, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed console output for non wrapped mode.
parent
f06a996a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
console.c
dlls/kernel/console.c
+16
-16
No files found.
dlls/kernel/console.c
View file @
d3446a44
...
@@ -1579,11 +1579,12 @@ BOOL WINAPI SetConsoleMode(HANDLE hcon, DWORD mode)
...
@@ -1579,11 +1579,12 @@ BOOL WINAPI SetConsoleMode(HANDLE hcon, DWORD mode)
/******************************************************************
/******************************************************************
*
write_char
*
CONSOLE_WriteChars
*
*
* WriteConsoleOutput helper: hides server call semantics
* WriteConsoleOutput helper: hides server call semantics
* writes a string at a given pos with standard attribute
*/
*/
static
int
write_char
(
HANDLE
hCon
,
LPCWSTR
lpBuffer
,
int
nc
,
COORD
*
pos
)
int
CONSOLE_WriteChars
(
HANDLE
hCon
,
LPCWSTR
lpBuffer
,
int
nc
,
COORD
*
pos
)
{
{
int
written
=
-
1
;
int
written
=
-
1
;
...
@@ -1651,18 +1652,17 @@ static int write_block(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi,
...
@@ -1651,18 +1652,17 @@ static int write_block(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi,
DWORD
mode
,
LPWSTR
ptr
,
int
len
)
DWORD
mode
,
LPWSTR
ptr
,
int
len
)
{
{
int
blk
;
/* number of chars to write on current line */
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
1
;
if
(
mode
&
ENABLE_WRAP_AT_EOL_OUTPUT
)
/* writes remaining on next line */
if
(
mode
&
ENABLE_WRAP_AT_EOL_OUTPUT
)
/* writes remaining on next line */
{
{
int
done
;
for
(
done
=
0
;
done
<
len
;
done
+=
blk
)
for
(
done
=
0
;
done
<
len
;
done
+=
blk
)
{
{
blk
=
min
(
len
-
done
,
csbi
->
dwSize
.
X
-
csbi
->
dwCursorPosition
.
X
);
blk
=
min
(
len
-
done
,
csbi
->
dwSize
.
X
-
csbi
->
dwCursorPosition
.
X
);
if
(
write_char
(
hCon
,
ptr
+
done
,
blk
,
&
csbi
->
dwCursorPosition
)
!=
blk
)
if
(
CONSOLE_WriteChars
(
hCon
,
ptr
+
done
,
blk
,
&
csbi
->
dwCursorPosition
)
!=
blk
)
return
0
;
return
0
;
if
(
csbi
->
dwCursorPosition
.
X
==
csbi
->
dwSize
.
X
&&
!
next_line
(
hCon
,
csbi
))
if
(
csbi
->
dwCursorPosition
.
X
==
csbi
->
dwSize
.
X
&&
!
next_line
(
hCon
,
csbi
))
return
0
;
return
0
;
...
@@ -1670,19 +1670,19 @@ static int write_block(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi,
...
@@ -1670,19 +1670,19 @@ static int write_block(HANDLE hCon, CONSOLE_SCREEN_BUFFER_INFO* csbi,
}
}
else
else
{
{
blk
=
min
(
len
,
csbi
->
dwSize
.
X
-
csbi
->
dwCursorPosition
.
X
);
int
pos
=
csbi
->
dwCursorPosition
.
X
;
/* FIXME: we could reduce the number of loops
if
(
write_char
(
hCon
,
ptr
,
blk
,
&
csbi
->
dwCursorPosition
)
!=
blk
)
* but, in most cases we wouldn't gain lots of time (it would only
return
0
;
* happen if we're asked to overwrite more than twice the part of the line,
if
(
blk
<
len
)
* which is unlikely
*/
for
(
blk
=
done
=
0
;
done
<
len
;
done
+=
blk
)
{
{
csbi
->
dwCursorPosition
.
X
=
csbi
->
dwSize
.
X
-
1
;
blk
=
min
(
len
-
done
,
csbi
->
dwSize
.
X
-
csbi
->
dwCursorPosition
.
X
);
/* all remaining chars should be written on last column,
* so only overwrite the last column with last char in block
csbi
->
dwCursorPosition
.
X
=
pos
;
*/
if
(
CONSOLE_WriteChars
(
hCon
,
ptr
+
done
,
blk
,
&
csbi
->
dwCursorPosition
)
!=
blk
)
if
(
write_char
(
hCon
,
ptr
+
len
-
1
,
1
,
&
csbi
->
dwCursorPosition
)
!=
1
)
return
0
;
return
0
;
csbi
->
dwCursorPosition
.
X
=
csbi
->
dwSize
.
X
-
1
;
}
}
}
}
...
...
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