=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: cmd: Fix misleading WCMD_parameter documentation.

Alexandre Julliard julliard at winehq.org
Thu Sep 8 14:52:12 CDT 2011


Module: wine
Branch: master
Commit: 40c6ff8abe8e48d59516e83f306b581bbb5121cf
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=40c6ff8abe8e48d59516e83f306b581bbb5121cf

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Tue Sep  6 19:19:40 2011 +0200

cmd: Fix misleading WCMD_parameter documentation.

---

 programs/cmd/batch.c |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c
index f010f28..a978ef1 100644
--- a/programs/cmd/batch.c
+++ b/programs/cmd/batch.c
@@ -113,12 +113,28 @@ void WCMD_batch (WCHAR *file, WCHAR *command, int called, WCHAR *startLabel, HAN
 }
 
 /*******************************************************************
- * WCMD_parameter - extract a parameter from a command line.
+ * WCMD_parameter
  *
- *	Returns the 'n'th delimited parameter on the command line (zero-based).
- *	Parameter is in static storage overwritten on the next call.
- *	Parameters in quotes (and brackets) are handled.
- *	Also returns a pointer to the location of the parameter in the command line.
+ * Extracts a delimited parameter from an input string
+ *
+ * PARAMS
+ *  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,
+ *            potentially a " character
+ *
+ * RETURNS
+ *  Success: Returns the nth delimited parameter found in s.
+ *           *where 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
+ *
+ * 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) {




More information about the wine-cvs mailing list