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
9772d022
Commit
9772d022
authored
Mar 07, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make output line-buffered to avoid messing up log files.
parent
e9d334d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
winedbg.c
programs/winedbg/winedbg.c
+22
-2
No files found.
programs/winedbg/winedbg.c
View file @
9772d022
...
@@ -92,8 +92,28 @@ static HANDLE dbg_houtput;
...
@@ -92,8 +92,28 @@ static HANDLE dbg_houtput;
void
dbg_outputA
(
const
char
*
buffer
,
int
len
)
void
dbg_outputA
(
const
char
*
buffer
,
int
len
)
{
{
DWORD
w
;
static
char
line_buff
[
4096
];
WriteFile
(
dbg_houtput
,
buffer
,
len
,
&
w
,
NULL
);
static
unsigned
int
line_pos
;
DWORD
w
,
i
;
while
(
len
>
0
)
{
unsigned
int
count
=
min
(
len
,
sizeof
(
line_buff
)
-
line_pos
);
memcpy
(
line_buff
+
line_pos
,
buffer
,
count
);
buffer
+=
count
;
len
-=
count
;
line_pos
+=
count
;
for
(
i
=
line_pos
;
i
>
0
;
i
--
)
if
(
line_buff
[
i
-
1
]
==
'\n'
)
break
;
if
(
!
i
)
/* no newline found */
{
if
(
len
>
0
)
i
=
line_pos
;
/* buffer is full, flush anyway */
else
break
;
}
WriteFile
(
dbg_houtput
,
line_buff
,
i
,
&
w
,
NULL
);
memmove
(
line_buff
,
line_buff
+
i
,
line_pos
-
i
);
line_pos
-=
i
;
}
}
}
void
dbg_outputW
(
const
WCHAR
*
buffer
,
int
len
)
void
dbg_outputW
(
const
WCHAR
*
buffer
,
int
len
)
...
...
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