From 6d01f15a27fde6a9f9d34b22e227d0e01ea078b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Delanoy?= Date: Sat, 29 Oct 2011 13:42:05 +0200 Subject: [PATCH] cmd: Rename a parameter in WCMD_parameter. --- programs/cmd/batch.c | 12 ++++++------ programs/cmd/wcmd.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c index a276d3edd68..acab8937c28 100644 --- a/programs/cmd/batch.c +++ b/programs/cmd/batch.c @@ -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; diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h index 33ae12fbbbb..962fd52be94 100644 --- a/programs/cmd/wcmd.h +++ b/programs/cmd/wcmd.h @@ -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);