Frédéric Delanoy : cmd: Skip tabs as well as spaces in WCMD_skip_leading_spaces.
Alexandre Julliard
julliard at winehq.org
Thu Aug 25 13:00:16 CDT 2011
Module: wine
Branch: master
Commit: f37ab586d869e5d8811b3e7e6e8accd985a14150
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f37ab586d869e5d8811b3e7e6e8accd985a14150
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Thu Aug 25 00:48:19 2011 +0200
cmd: Skip tabs as well as spaces in WCMD_skip_leading_spaces.
---
programs/cmd/tests/test_builtins.cmd.exp | 4 ++--
programs/cmd/wcmdmain.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 1138485..4846cf3 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -158,8 +158,8 @@ BAZ=bazbaz
bazbaz
set "FOO=bar" should not include the quotes in the variable value
bar
- at todo_wine@foo
- at todo_wine@''
+foo
+''
'foo at space@'
'foo at tab@'
------------ Testing variable expansion --------------
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 0edc005..47af612 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -443,7 +443,7 @@ void WCMD_strsubstW(WCHAR *start, const WCHAR *next, const WCHAR *insert, int le
/***************************************************************************
* WCMD_skip_leading_spaces
*
- * Return a pointer to the first non-space character of string.
+ * Return a pointer to the first non-whitespace character of string.
* Does not modify the input string.
*/
WCHAR *WCMD_skip_leading_spaces (WCHAR *string) {
@@ -451,7 +451,7 @@ WCHAR *WCMD_skip_leading_spaces (WCHAR *string) {
WCHAR *ptr;
ptr = string;
- while (*ptr == ' ') ptr++;
+ while (*ptr == ' ' || *ptr == '\t') ptr++;
return ptr;
}
More information about the wine-cvs
mailing list