[PATCH 1/2] cmd: Improve WCMD_fgets documentation

Frédéric Delanoy frederic.delanoy at gmail.com
Fri Sep 30 21:19:04 CDT 2011


---
 programs/cmd/batch.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c
index 447eccd..97db1b9 100644
--- a/programs/cmd/batch.c
+++ b/programs/cmd/batch.c
@@ -176,9 +176,16 @@ WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **where, WCHAR **end) {
 /****************************************************************************
  * WCMD_fgets
  *
- * Get one line from a batch file/console. We can't use the native f* functions because
- * of the filename syntax differences between DOS and Unix. Also need to lose
- * the LF (or CRLF) from the line.
+ * Gets one line from a file/console and puts it into buffer s
+ * We can't use the native f* functions because of the filename syntax differences
+ * between DOS and Unix. Also need to lose the LF (or CRLF) from the line.
+ * Pre:  s has size noChars
+ *       1 <= noChars <= MAXSTRING
+ * Post: s is filled with at most noChars-1 characters, and gets nul-terminated
+         s does not include EOL terminator
+ * Returns:
+ *       s on success
+ *       NULL on error or EOF
  */
 
 WCHAR *WCMD_fgets(WCHAR *s, int noChars, HANDLE h, BOOL is_console_handle)
-- 
1.7.6.3




More information about the wine-patches mailing list