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
3b729284
Commit
3b729284
authored
Nov 24, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Nov 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Use WCMD_output_asis*() for strings that are not supposed to contain formating directives.
parent
d255efbd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
builtins.c
programs/cmd/builtins.c
+6
-6
directory.c
programs/cmd/directory.c
+5
-5
wcmdmain.c
programs/cmd/wcmdmain.c
+1
-1
No files found.
programs/cmd/builtins.c
View file @
3b729284
...
@@ -361,7 +361,7 @@ void WCMD_choice (const WCHAR * command) {
...
@@ -361,7 +361,7 @@ void WCMD_choice (const WCHAR * command) {
ptr
=
strchrW
(
opt_c
,
answer
[
0
]);
ptr
=
strchrW
(
opt_c
,
answer
[
0
]);
if
(
ptr
)
{
if
(
ptr
)
{
WCMD_output_asis
(
answer
);
WCMD_output_asis
(
answer
);
WCMD_output
(
newline
);
WCMD_output
_asis
(
newline
);
if
(
have_console
)
if
(
have_console
)
SetConsoleMode
(
GetStdHandle
(
STD_INPUT_HANDLE
),
oldmode
);
SetConsoleMode
(
GetStdHandle
(
STD_INPUT_HANDLE
),
oldmode
);
...
@@ -964,7 +964,7 @@ void WCMD_echo (const WCHAR *command)
...
@@ -964,7 +964,7 @@ void WCMD_echo (const WCHAR *command)
echo_mode
=
FALSE
;
echo_mode
=
FALSE
;
else
{
else
{
WCMD_output_asis
(
command
);
WCMD_output_asis
(
command
);
WCMD_output
(
newline
);
WCMD_output
_asis
(
newline
);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
trimmed
);
HeapFree
(
GetProcessHeap
(),
0
,
trimmed
);
}
}
...
@@ -1777,7 +1777,7 @@ void WCMD_pause (void)
...
@@ -1777,7 +1777,7 @@ void WCMD_pause (void)
if
(
have_console
)
if
(
have_console
)
SetConsoleMode
(
hIn
,
0
);
SetConsoleMode
(
hIn
,
0
);
WCMD_output
(
anykey
);
WCMD_output
_asis
(
anykey
);
WCMD_ReadFile
(
hIn
,
&
key
,
1
,
&
count
);
WCMD_ReadFile
(
hIn
,
&
key
,
1
,
&
count
);
if
(
have_console
)
if
(
have_console
)
SetConsoleMode
(
hIn
,
oldmode
);
SetConsoleMode
(
hIn
,
oldmode
);
...
@@ -2114,7 +2114,7 @@ void WCMD_setshow_default (const WCHAR *command) {
...
@@ -2114,7 +2114,7 @@ void WCMD_setshow_default (const WCHAR *command) {
GetCurrentDirectoryW
(
sizeof
(
cwd
)
/
sizeof
(
WCHAR
),
cwd
);
GetCurrentDirectoryW
(
sizeof
(
cwd
)
/
sizeof
(
WCHAR
),
cwd
);
if
(
strlenW
(
command
)
==
0
)
{
if
(
strlenW
(
command
)
==
0
)
{
strcatW
(
cwd
,
newline
);
strcatW
(
cwd
,
newline
);
WCMD_output
(
cwd
);
WCMD_output
_asis
(
cwd
);
}
}
else
{
else
{
/* Remove any double quotes, which may be in the
/* Remove any double quotes, which may be in the
...
@@ -2325,7 +2325,7 @@ void WCMD_setshow_env (WCHAR *s) {
...
@@ -2325,7 +2325,7 @@ void WCMD_setshow_env (WCHAR *s) {
/* Output the prompt */
/* Output the prompt */
*
p
++
=
'\0'
;
*
p
++
=
'\0'
;
if
(
strlenW
(
p
)
!=
0
)
WCMD_output
(
p
);
if
(
strlenW
(
p
)
!=
0
)
WCMD_output
_asis
(
p
);
/* Read the reply */
/* Read the reply */
WCMD_ReadFile
(
GetStdHandle
(
STD_INPUT_HANDLE
),
string
,
sizeof
(
string
)
/
sizeof
(
WCHAR
),
&
count
);
WCMD_ReadFile
(
GetStdHandle
(
STD_INPUT_HANDLE
),
string
,
sizeof
(
string
)
/
sizeof
(
WCHAR
),
&
count
);
...
@@ -2697,7 +2697,7 @@ void WCMD_verify (const WCHAR *command) {
...
@@ -2697,7 +2697,7 @@ void WCMD_verify (const WCHAR *command) {
void
WCMD_version
(
void
)
{
void
WCMD_version
(
void
)
{
WCMD_output
(
version_string
);
WCMD_output
_asis
(
version_string
);
}
}
...
...
programs/cmd/directory.c
View file @
3b729284
...
@@ -326,7 +326,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
...
@@ -326,7 +326,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
/* Output the results */
/* Output the results */
if
(
!
bare
)
{
if
(
!
bare
)
{
if
(
level
!=
0
&&
(
entry_count
>
0
))
WCMD_output
(
newline
);
if
(
level
!=
0
&&
(
entry_count
>
0
))
WCMD_output
_asis
(
newline
);
if
(
!
recurse
||
((
entry_count
>
0
)
&&
done_header
==
FALSE
))
{
if
(
!
recurse
||
((
entry_count
>
0
)
&&
done_header
==
FALSE
))
{
static
const
WCHAR
headerW
[]
=
{
'D'
,
'i'
,
'r'
,
'e'
,
'c'
,
't'
,
'o'
,
'r'
,
'y'
,
' '
,
'o'
,
'f'
,
static
const
WCHAR
headerW
[]
=
{
'D'
,
'i'
,
'r'
,
'e'
,
'c'
,
't'
,
'o'
,
'r'
,
'y'
,
' '
,
'o'
,
'f'
,
' '
,
'%'
,
's'
,
'\n'
,
'\n'
,
'\0'
};
' '
,
'%'
,
's'
,
'\n'
,
'\n'
,
'\0'
};
...
@@ -430,13 +430,13 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
...
@@ -430,13 +430,13 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
strcatW
(
&
temp
[
toWrite
],
space
);
strcatW
(
&
temp
[
toWrite
],
space
);
toWrite
++
;
toWrite
++
;
if
(
toWrite
>
99
)
{
if
(
toWrite
>
99
)
{
WCMD_output
(
temp
);
WCMD_output
_asis
(
temp
);
toWrite
=
0
;
toWrite
=
0
;
strcpyW
(
temp
,
nullW
);
strcpyW
(
temp
,
nullW
);
}
}
padding
--
;
padding
--
;
}
}
WCMD_output
(
temp
);
WCMD_output
_asis
(
temp
);
}
}
}
else
if
((
fd
+
i
)
->
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
{
}
else
if
((
fd
+
i
)
->
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
{
...
@@ -472,7 +472,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
...
@@ -472,7 +472,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le
}
}
}
}
}
}
if
(
addNewLine
)
WCMD_output
(
newline
);
if
(
addNewLine
)
WCMD_output
_asis
(
newline
);
cur_width
=
0
;
cur_width
=
0
;
}
}
...
@@ -949,7 +949,7 @@ void WCMD_directory (WCHAR *cmd)
...
@@ -949,7 +949,7 @@ void WCMD_directory (WCHAR *cmd)
}
}
}
else
{
}
else
{
static
const
WCHAR
newLine2
[]
=
{
'\n'
,
'\n'
,
'\0'
};
static
const
WCHAR
newLine2
[]
=
{
'\n'
,
'\n'
,
'\0'
};
if
(
!
bare
)
WCMD_output
(
newLine2
);
if
(
!
bare
)
WCMD_output
_asis
(
newLine2
);
}
}
/* Clear any errors from previous invocations, and process it */
/* Clear any errors from previous invocations, and process it */
...
...
programs/cmd/wcmdmain.c
View file @
3b729284
...
@@ -1512,7 +1512,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
...
@@ -1512,7 +1512,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
WCMD_type
(
p
);
WCMD_type
(
p
);
break
;
break
;
case
WCMD_VER
:
case
WCMD_VER
:
WCMD_output
(
newline
);
WCMD_output
_asis
(
newline
);
WCMD_version
();
WCMD_version
();
break
;
break
;
case
WCMD_VERIFY
:
case
WCMD_VERIFY
:
...
...
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