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
3180972e
Commit
3180972e
authored
Oct 07, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Oct 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskkill: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8e9b9da0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
taskkill.c
programs/taskkill/taskkill.c
+6
-13
No files found.
programs/taskkill/taskkill.c
View file @
3180972e
...
@@ -102,12 +102,11 @@ static int WINAPIV taskkill_message_printfW(int msg, ...)
...
@@ -102,12 +102,11 @@ static int WINAPIV taskkill_message_printfW(int msg, ...)
static
int
taskkill_message
(
int
msg
)
static
int
taskkill_message
(
int
msg
)
{
{
static
const
WCHAR
formatW
[]
=
{
'%'
,
'1'
,
0
};
WCHAR
msg_buffer
[
8192
];
WCHAR
msg_buffer
[
8192
];
LoadStringW
(
GetModuleHandleW
(
NULL
),
msg
,
msg_buffer
,
ARRAY_SIZE
(
msg_buffer
));
LoadStringW
(
GetModuleHandleW
(
NULL
),
msg
,
msg_buffer
,
ARRAY_SIZE
(
msg_buffer
));
return
taskkill_printfW
(
formatW
,
msg_buffer
);
return
taskkill_printfW
(
L"%1"
,
msg_buffer
);
}
}
/* Post WM_CLOSE to all top-level windows belonging to the process with specified PID. */
/* Post WM_CLOSE to all top-level windows belonging to the process with specified PID. */
...
@@ -444,12 +443,6 @@ static BOOL add_to_task_list(WCHAR *name)
...
@@ -444,12 +443,6 @@ static BOOL add_to_task_list(WCHAR *name)
* options are detected as parameters when placed after options that accept one. */
* options are detected as parameters when placed after options that accept one. */
static
BOOL
process_arguments
(
int
argc
,
WCHAR
*
argv
[])
static
BOOL
process_arguments
(
int
argc
,
WCHAR
*
argv
[])
{
{
static
const
WCHAR
opForceTerminate
[]
=
{
'f'
,
0
};
static
const
WCHAR
opImage
[]
=
{
'i'
,
'm'
,
0
};
static
const
WCHAR
opPID
[]
=
{
'p'
,
'i'
,
'd'
,
0
};
static
const
WCHAR
opHelp
[]
=
{
'?'
,
0
};
static
const
WCHAR
opTerminateChildren
[]
=
{
't'
,
0
};
if
(
argc
>
1
)
if
(
argc
>
1
)
{
{
int
i
;
int
i
;
...
@@ -460,7 +453,7 @@ static BOOL process_arguments(int argc, WCHAR *argv[])
...
@@ -460,7 +453,7 @@ static BOOL process_arguments(int argc, WCHAR *argv[])
if
(
argc
==
2
)
if
(
argc
==
2
)
{
{
argdata
=
argv
[
1
];
argdata
=
argv
[
1
];
if
((
*
argdata
==
'/'
||
*
argdata
==
'-'
)
&&
!
lstrcmpW
(
opHelp
,
argdata
+
1
))
if
((
*
argdata
==
'/'
||
*
argdata
==
'-'
)
&&
!
lstrcmpW
(
L"?"
,
argdata
+
1
))
{
{
taskkill_message
(
STRING_USAGE
);
taskkill_message
(
STRING_USAGE
);
exit
(
0
);
exit
(
0
);
...
@@ -476,14 +469,14 @@ static BOOL process_arguments(int argc, WCHAR *argv[])
...
@@ -476,14 +469,14 @@ static BOOL process_arguments(int argc, WCHAR *argv[])
goto
invalid
;
goto
invalid
;
argdata
++
;
argdata
++
;
if
(
!
wcsicmp
(
opTerminateChildren
,
argdata
))
if
(
!
wcsicmp
(
L"t"
,
argdata
))
WINE_FIXME
(
"argument T not supported
\n
"
);
WINE_FIXME
(
"argument T not supported
\n
"
);
if
(
!
wcsicmp
(
opForceTerminate
,
argdata
))
if
(
!
wcsicmp
(
L"f"
,
argdata
))
force_termination
=
TRUE
;
force_termination
=
TRUE
;
/* Options /IM and /PID appear to behave identically, except for
/* Options /IM and /PID appear to behave identically, except for
* the fact that they cannot be specified at the same time. */
* the fact that they cannot be specified at the same time. */
else
if
((
got_im
=
!
wcsicmp
(
opImage
,
argdata
))
||
else
if
((
got_im
=
!
wcsicmp
(
L"im"
,
argdata
))
||
(
got_pid
=
!
wcsicmp
(
opPID
,
argdata
)))
(
got_pid
=
!
wcsicmp
(
L"pid"
,
argdata
)))
{
{
if
(
!
argv
[
i
+
1
])
if
(
!
argv
[
i
+
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