cmd: Improve WCMD_parameter documentation.

This commit is contained in:
Frédéric Delanoy 2012-05-15 15:03:35 +02:00 committed by Alexandre Julliard
parent 20bf183726
commit 0f032203f5

View file

@ -114,26 +114,23 @@ void WCMD_batch (WCHAR *file, WCHAR *command, BOOL called, WCHAR *startLabel, HA
* *
* PARAMS * PARAMS
* s [I] input string, non NULL * s [I] input string, non NULL
* n [I] # of the (possibly double quotes-delimited) parameter to return * n [I] # of the parameter to return, counted from 0
* Starts at 0 * start [O] Optional. Pointer to the first char of param n in s
* start [O] if non NULL, pointer to the start of the nth parameter in s, * end [O] Optional. Pointer to the last char of param n 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 * RETURNS
* Success: Returns the nth delimited parameter found in s. * Success: The nth delimited parameter found in s, with any surrounding quotes removed
* *start points to the start of the param, possibly a starting * if start != NULL, *start points to the start of the param
* double quotes character * if end != NULL, *end points to the end of the param
* Failure: Returns an empty string if the param is not found. * Failure: An empty string if the param is not found.
* *start is set to NULL * *start == *end == NULL
* *
* NOTES * NOTES
* Return value is stored in static storage, hence is overwritten * Return value is stored in static storage (i.e. overwritten after each call).
* after each call. * Specify 'start' and/or 'end' to include delimiting double quotes as well, if any.
* Doesn't include any potentially delimiting double quotes
*/ */
WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **start, WCHAR **end) { WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **start, WCHAR **end)
{
int curParamNb = 0; int curParamNb = 0;
static WCHAR param[MAX_PATH]; static WCHAR param[MAX_PATH];
WCHAR *p = s, *q; WCHAR *p = s, *q;