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
c1c76d27
Commit
c1c76d27
authored
Aug 29, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Aug 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Add WCMD_output_asis_stderr function.
parent
49073440
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
9 deletions
+29
-9
wcmd.h
programs/cmd/wcmd.h
+1
-0
wcmdmain.c
programs/cmd/wcmdmain.c
+28
-9
No files found.
programs/cmd/wcmd.h
View file @
c1c76d27
...
...
@@ -72,6 +72,7 @@ void WCMD_more (WCHAR *);
void
WCMD_move
(
void
);
void
WCMD_output
(
const
WCHAR
*
format
,
...);
void
WCMD_output_asis
(
const
WCHAR
*
message
);
void
WCMD_output_asis_stderr
(
const
WCHAR
*
message
);
void
WCMD_pause
(
void
);
void
WCMD_popd
(
void
);
void
WCMD_print_error
(
void
);
...
...
programs/cmd/wcmdmain.c
View file @
c1c76d27
...
...
@@ -240,13 +240,15 @@ BOOL WCMD_ReadFile(const HANDLE hIn, WCHAR *intoBuf, const DWORD maxChars,
}
/*******************************************************************
* WCMD_output_asis - send output to current standard output device.
* without formatting eg. when message contains '%'
* WCMD_output_asis_handle
*
* Send output to specified handle without formatting e.g. when message contains '%'
*/
void
WCMD_output_asis
(
const
WCHAR
*
message
)
{
static
void
WCMD_output_asis_handle
(
DWORD
std_handle
,
const
WCHAR
*
message
)
{
DWORD
count
;
const
WCHAR
*
ptr
;
WCHAR
string
[
1024
];
HANDLE
handle
=
GetStdHandle
(
std_handle
);
if
(
paged_mode
)
{
do
{
...
...
@@ -256,25 +258,42 @@ void WCMD_output_asis (const WCHAR *message) {
ptr
++
;
};
if
(
*
ptr
==
'\n'
)
ptr
++
;
WCMD_output_asis_len
(
message
,
(
ptr
)
?
ptr
-
message
:
strlenW
(
message
),
GetStdHandle
(
STD_OUTPUT_HANDLE
));
WCMD_output_asis_len
(
message
,
(
ptr
)
?
ptr
-
message
:
strlenW
(
message
),
handle
);
if
(
ptr
)
{
numChars
=
0
;
if
(
++
line_count
>=
max_height
-
1
)
{
line_count
=
0
;
WCMD_output_asis_len
(
pagedMessage
,
strlenW
(
pagedMessage
),
GetStdHandle
(
STD_OUTPUT_HANDLE
));
WCMD_output_asis_len
(
pagedMessage
,
strlenW
(
pagedMessage
),
handle
);
WCMD_ReadFile
(
GetStdHandle
(
STD_INPUT_HANDLE
),
string
,
sizeof
(
string
)
/
sizeof
(
WCHAR
),
&
count
,
NULL
);
}
}
}
while
(((
message
=
ptr
)
!=
NULL
)
&&
(
*
ptr
));
}
else
{
WCMD_output_asis_len
(
message
,
lstrlenW
(
message
),
GetStdHandle
(
STD_OUTPUT_HANDLE
));
WCMD_output_asis_len
(
message
,
lstrlenW
(
message
),
handle
);
}
}
/*******************************************************************
* WCMD_output_asis
*
* Send output to current standard output device, without formatting
* e.g. when message contains '%'
*/
void
WCMD_output_asis
(
const
WCHAR
*
message
)
{
WCMD_output_asis_handle
(
STD_OUTPUT_HANDLE
,
message
);
}
/*******************************************************************
* WCMD_output_asis_stderr
*
* Send output to current standard error device, without formatting
* e.g. when message contains '%'
*/
void
WCMD_output_asis_stderr
(
const
WCHAR
*
message
)
{
WCMD_output_asis_handle
(
STD_ERROR_HANDLE
,
message
);
}
/****************************************************************************
* WCMD_print_error
*
...
...
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