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
bb47576f
Commit
bb47576f
authored
Aug 20, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Aug 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Rename WCMD_strtrim_leading_spaces to WCMD_skip_leading_spaces to better reflect its purpose.
parent
303af43f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
builtins.c
programs/cmd/builtins.c
+7
-7
wcmd.h
programs/cmd/wcmd.h
+1
-1
wcmdmain.c
programs/cmd/wcmdmain.c
+6
-6
No files found.
programs/cmd/builtins.c
View file @
bb47576f
...
...
@@ -186,11 +186,11 @@ void WCMD_choice (WCHAR * command) {
have_console
=
GetConsoleMode
(
GetStdHandle
(
STD_INPUT_HANDLE
),
&
oldmode
);
errorlevel
=
0
;
my_command
=
WCMD_strdupW
(
WCMD_s
trtrim
_leading_spaces
(
command
));
my_command
=
WCMD_strdupW
(
WCMD_s
kip
_leading_spaces
(
command
));
if
(
!
my_command
)
return
;
ptr
=
WCMD_s
trtrim
_leading_spaces
(
my_command
);
ptr
=
WCMD_s
kip
_leading_spaces
(
my_command
);
while
(
*
ptr
==
'/'
)
{
switch
(
toupperW
(
ptr
[
1
]))
{
case
'C'
:
...
...
@@ -213,19 +213,19 @@ void WCMD_choice (WCHAR * command) {
if
(
*
ptr
)
{
/* terminate allowed chars */
*
ptr
=
0
;
ptr
=
WCMD_s
trtrim
_leading_spaces
(
&
ptr
[
1
]);
ptr
=
WCMD_s
kip
_leading_spaces
(
&
ptr
[
1
]);
}
WINE_TRACE
(
"answer-list: %s
\n
"
,
wine_dbgstr_w
(
opt_c
));
break
;
case
'N'
:
opt_n
=
TRUE
;
ptr
=
WCMD_s
trtrim
_leading_spaces
(
&
ptr
[
2
]);
ptr
=
WCMD_s
kip
_leading_spaces
(
&
ptr
[
2
]);
break
;
case
'S'
:
opt_s
=
TRUE
;
ptr
=
WCMD_s
trtrim
_leading_spaces
(
&
ptr
[
2
]);
ptr
=
WCMD_s
kip
_leading_spaces
(
&
ptr
[
2
]);
break
;
case
'T'
:
...
...
@@ -252,7 +252,7 @@ void WCMD_choice (WCHAR * command) {
answer
[
count
]
=
0
;
opt_timeout
=
atoiW
(
answer
);
ptr
=
WCMD_s
trtrim
_leading_spaces
(
ptr
);
ptr
=
WCMD_s
kip
_leading_spaces
(
ptr
);
break
;
default:
...
...
@@ -1315,7 +1315,7 @@ void WCMD_give_help (WCHAR *command) {
int
i
;
command
=
WCMD_s
trtrim
_leading_spaces
(
command
);
command
=
WCMD_s
kip
_leading_spaces
(
command
);
if
(
strlenW
(
command
)
==
0
)
{
WCMD_output_asis
(
WCMD_LoadMessage
(
WCMD_ALLHELP
));
}
...
...
programs/cmd/wcmd.h
View file @
bb47576f
...
...
@@ -96,7 +96,7 @@ int WCMD_volume (int mode, WCHAR *command);
WCHAR
*
WCMD_fgets
(
WCHAR
*
s
,
int
n
,
HANDLE
stream
);
WCHAR
*
WCMD_parameter
(
WCHAR
*
s
,
int
n
,
WCHAR
**
where
);
WCHAR
*
WCMD_s
trtrim
_leading_spaces
(
WCHAR
*
string
);
WCHAR
*
WCMD_s
kip
_leading_spaces
(
WCHAR
*
string
);
void
WCMD_HandleTildaModifiers
(
WCHAR
**
start
,
WCHAR
*
forVariable
,
WCHAR
*
forValue
,
BOOL
justFors
);
void
WCMD_splitpath
(
const
WCHAR
*
path
,
WCHAR
*
drv
,
WCHAR
*
dir
,
WCHAR
*
name
,
WCHAR
*
ext
);
...
...
programs/cmd/wcmdmain.c
View file @
bb47576f
...
...
@@ -441,12 +441,12 @@ void WCMD_strsubstW(WCHAR* start, WCHAR* next, WCHAR* insert, int len) {
}
/***************************************************************************
* WCMD_s
trtrim
_leading_spaces
* WCMD_s
kip
_leading_spaces
*
*
Remove leading spaces from a string. Return a pointer to the first
*
non-space character. Does not modify the input string
*
Return a pointer to the first non-space character of string.
*
Does not modify the input string.
*/
WCHAR
*
WCMD_s
trtrim
_leading_spaces
(
WCHAR
*
string
)
{
WCHAR
*
WCMD_s
kip
_leading_spaces
(
WCHAR
*
string
)
{
WCHAR
*
ptr
;
...
...
@@ -1392,7 +1392,7 @@ void WCMD_execute (WCHAR *command, WCHAR *redirects,
/*
* Strip leading whitespaces, and a '@' if supplied
*/
whichcmd
=
WCMD_s
trtrim
_leading_spaces
(
cmd
);
whichcmd
=
WCMD_s
kip
_leading_spaces
(
cmd
);
WINE_TRACE
(
"Command: '%s'
\n
"
,
wine_dbgstr_w
(
cmd
));
if
(
whichcmd
[
0
]
==
'@'
)
whichcmd
++
;
...
...
@@ -1409,7 +1409,7 @@ void WCMD_execute (WCHAR *command, WCHAR *redirects,
if
(
CompareStringW
(
LOCALE_USER_DEFAULT
,
NORM_IGNORECASE
|
SORT_STRINGSORT
,
whichcmd
,
count
,
inbuilt
[
i
],
-
1
)
==
CSTR_EQUAL
)
break
;
}
p
=
WCMD_s
trtrim
_leading_spaces
(
&
whichcmd
[
count
]);
p
=
WCMD_s
kip
_leading_spaces
(
&
whichcmd
[
count
]);
WCMD_parse
(
p
,
quals
,
param1
,
param2
);
WINE_TRACE
(
"param1: %s, param2: %s
\n
"
,
wine_dbgstr_w
(
param1
),
wine_dbgstr_w
(
param2
));
...
...
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