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
6d01f15a
Commit
6d01f15a
authored
Oct 29, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Oct 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Rename a parameter in WCMD_parameter.
parent
41a94504
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
batch.c
programs/cmd/batch.c
+6
-6
wcmd.h
programs/cmd/wcmd.h
+1
-1
No files found.
programs/cmd/batch.c
View file @
6d01f15a
...
...
@@ -120,30 +120,30 @@ void WCMD_batch (WCHAR *file, WCHAR *command, int called, WCHAR *startLabel, HAN
* s [I] input string, non NULL
* n [I] # of the (possibly double quotes-delimited) parameter to return
* Starts at 0
*
where
[O] if non NULL, pointer to the start of the nth parameter in s,
*
start
[O] if non NULL, pointer to the start of the nth parameter in s,
* potentially a " character
* end [O] if non NULL, pointer to the last char of
* the nth parameter in s, potentially a " character
*
* RETURNS
* Success: Returns the nth delimited parameter found in s.
* *
where
points to the start of the param, possibly a starting
* *
start
points to the start of the param, possibly a starting
* double quotes character
* Failure: Returns an empty string if the param is not found.
* *
where
is set to NULL
* *
start
is set to NULL
*
* NOTES
* Return value is stored in static storage, hence is overwritten
* after each call.
* Doesn't include any potentially delimiting double quotes
*/
WCHAR
*
WCMD_parameter
(
WCHAR
*
s
,
int
n
,
WCHAR
**
where
,
WCHAR
**
end
)
{
WCHAR
*
WCMD_parameter
(
WCHAR
*
s
,
int
n
,
WCHAR
**
start
,
WCHAR
**
end
)
{
int
curParamNb
=
0
;
static
WCHAR
param
[
MAX_PATH
];
WCHAR
*
p
=
s
,
*
q
;
BOOL
quotesDelimited
;
if
(
where
!=
NULL
)
*
where
=
NULL
;
if
(
start
!=
NULL
)
*
start
=
NULL
;
if
(
end
!=
NULL
)
*
end
=
NULL
;
param
[
0
]
=
'\0'
;
while
(
TRUE
)
{
...
...
@@ -152,7 +152,7 @@ WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **where, WCHAR **end) {
if
(
*
p
==
'\0'
)
return
param
;
quotesDelimited
=
(
*
p
==
'"'
);
if
(
where
!=
NULL
&&
curParamNb
==
n
)
*
where
=
p
;
if
(
start
!=
NULL
&&
curParamNb
==
n
)
*
start
=
p
;
if
(
quotesDelimited
)
{
q
=
++
p
;
...
...
programs/cmd/wcmd.h
View file @
6d01f15a
...
...
@@ -102,7 +102,7 @@ static inline BOOL WCMD_is_console_handle(HANDLE h)
return
(((
DWORD_PTR
)
h
)
&
3
)
==
3
;
}
WCHAR
*
WCMD_fgets
(
WCHAR
*
buf
,
int
n
,
HANDLE
stream
);
WCHAR
*
WCMD_parameter
(
WCHAR
*
s
,
int
n
,
WCHAR
**
where
,
WCHAR
**
end
);
WCHAR
*
WCMD_parameter
(
WCHAR
*
s
,
int
n
,
WCHAR
**
start
,
WCHAR
**
end
);
WCHAR
*
WCMD_skip_leading_spaces
(
WCHAR
*
string
);
BOOL
WCMD_keyword_ws_found
(
const
WCHAR
*
keyword
,
int
len
,
const
WCHAR
*
ptr
);
void
WCMD_HandleTildaModifiers
(
WCHAR
**
start
,
const
WCHAR
*
forVariable
,
const
WCHAR
*
forValue
,
BOOL
justFors
);
...
...
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