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
2b3bc201
Commit
2b3bc201
authored
Apr 02, 2024
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 02, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmic: Strip spaces once.
parent
c00da2e5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
main.c
programs/wmic/main.c
+13
-10
No files found.
programs/wmic/main.c
View file @
2b3bc201
...
@@ -405,22 +405,25 @@ int __cdecl wmain(int argc, WCHAR *argv[])
...
@@ -405,22 +405,25 @@ int __cdecl wmain(int argc, WCHAR *argv[])
while
(
fgetws
(
cmd
,
sizeof
(
cmd
),
stdin
)
!=
NULL
)
while
(
fgetws
(
cmd
,
sizeof
(
cmd
),
stdin
)
!=
NULL
)
{
{
c
md
[
wcslen
(
cmd
)
-
1
]
=
0
;
/* remove trailing '\n' */
c
onst
WCHAR
*
stripped
;
WINE_TRACE
(
"command: %s
\n
"
,
debugstr_w
(
cmd
));
cmd
[
wcslen
(
cmd
)
-
1
]
=
0
;
/* remove trailing '\n' */
if
(
!
wcsicmp
(
strip_spaces
(
cmd
),
L"exit"
)
||
!
wcsicmp
(
strip_spaces
(
cmd
),
L"quit"
))
stripped
=
strip_spaces
(
cmd
);
WINE_TRACE
(
"command: %s
\n
"
,
debugstr_w
(
stripped
));
if
(
!
wcsicmp
(
stripped
,
L"exit"
)
||
!
wcsicmp
(
stripped
,
L"quit"
))
return
0
;
return
0
;
if
(
!
cm
d
[
0
])
if
(
!
strippe
d
[
0
])
output_error
(
STRING_USAGE
);
output_error
(
STRING_USAGE
);
else
else
{
{
int
_argc
;
int
new
_argc
;
WCHAR
**
_argv
;
WCHAR
**
new
_argv
;
_argv
=
CommandLineToArgvW
(
strip_spaces
(
cmd
),
&
_argc
);
new_argv
=
CommandLineToArgvW
(
stripped
,
&
new
_argc
);
ret
=
process_args
(
_argc
,
_argv
);
ret
=
process_args
(
new_argc
,
new
_argv
);
LocalFree
(
_argv
);
LocalFree
(
new_argv
);
output_newline
();
output_newline
();
}
}
...
@@ -429,5 +432,5 @@ int __cdecl wmain(int argc, WCHAR *argv[])
...
@@ -429,5 +432,5 @@ int __cdecl wmain(int argc, WCHAR *argv[])
return
ret
;
return
ret
;
}
}
return
process_args
(
argc
-
1
,
&
argv
[
1
]
);
return
process_args
(
argc
-
1
,
argv
+
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