Frédéric Delanoy : cmd: Rename WCMD_strtrim_leading_spaces to WCMD_skip_leading_spaces to better reflect its purpose .
Alexandre Julliard
julliard at winehq.org
Tue Aug 23 12:44:58 CDT 2011
Module: wine
Branch: master
Commit: bb47576f59260a3f13894eec311c78d3fb046876
URL: http://source.winehq.org/git/wine.git/?a=commit;h=bb47576f59260a3f13894eec311c78d3fb046876
Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date: Sat Aug 20 01:58:58 2011 +0200
cmd: Rename WCMD_strtrim_leading_spaces to WCMD_skip_leading_spaces to better reflect its purpose.
---
programs/cmd/builtins.c | 14 +++++++-------
programs/cmd/wcmd.h | 2 +-
programs/cmd/wcmdmain.c | 12 ++++++------
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index e738626..0e95cc3 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -186,11 +186,11 @@ void WCMD_choice (WCHAR * command) {
have_console = GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), &oldmode);
errorlevel = 0;
- my_command = WCMD_strdupW(WCMD_strtrim_leading_spaces(command));
+ my_command = WCMD_strdupW(WCMD_skip_leading_spaces(command));
if (!my_command)
return;
- ptr = WCMD_strtrim_leading_spaces(my_command);
+ ptr = WCMD_skip_leading_spaces(my_command);
while (*ptr == '/') {
switch (toupperW(ptr[1])) {
case 'C':
@@ -213,19 +213,19 @@ void WCMD_choice (WCHAR * command) {
if (*ptr) {
/* terminate allowed chars */
*ptr = 0;
- ptr = WCMD_strtrim_leading_spaces(&ptr[1]);
+ ptr = WCMD_skip_leading_spaces(&ptr[1]);
}
WINE_TRACE("answer-list: %s\n", wine_dbgstr_w(opt_c));
break;
case 'N':
opt_n = TRUE;
- ptr = WCMD_strtrim_leading_spaces(&ptr[2]);
+ ptr = WCMD_skip_leading_spaces(&ptr[2]);
break;
case 'S':
opt_s = TRUE;
- ptr = WCMD_strtrim_leading_spaces(&ptr[2]);
+ ptr = WCMD_skip_leading_spaces(&ptr[2]);
break;
case 'T':
@@ -252,7 +252,7 @@ void WCMD_choice (WCHAR * command) {
answer[count] = 0;
opt_timeout = atoiW(answer);
- ptr = WCMD_strtrim_leading_spaces(ptr);
+ ptr = WCMD_skip_leading_spaces(ptr);
break;
default:
@@ -1315,7 +1315,7 @@ void WCMD_give_help (WCHAR *command) {
int i;
- command = WCMD_strtrim_leading_spaces(command);
+ command = WCMD_skip_leading_spaces(command);
if (strlenW(command) == 0) {
WCMD_output_asis (WCMD_LoadMessage(WCMD_ALLHELP));
}
diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h
index 0c7f622..1104d8e 100644
--- a/programs/cmd/wcmd.h
+++ b/programs/cmd/wcmd.h
@@ -96,7 +96,7 @@ int WCMD_volume (int mode, WCHAR *command);
WCHAR *WCMD_fgets (WCHAR *s, int n, HANDLE stream);
WCHAR *WCMD_parameter (WCHAR *s, int n, WCHAR **where);
-WCHAR *WCMD_strtrim_leading_spaces (WCHAR *string);
+WCHAR *WCMD_skip_leading_spaces (WCHAR *string);
void WCMD_HandleTildaModifiers(WCHAR **start, WCHAR *forVariable, WCHAR *forValue, BOOL justFors);
void WCMD_splitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext);
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 2018a12..c23fefd 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -441,12 +441,12 @@ void WCMD_strsubstW(WCHAR* start, WCHAR* next, WCHAR* insert, int len) {
}
/***************************************************************************
- * WCMD_strtrim_leading_spaces
+ * WCMD_skip_leading_spaces
*
- * Remove leading spaces from a string. Return a pointer to the first
- * non-space character. Does not modify the input string
+ * Return a pointer to the first non-space character of string.
+ * Does not modify the input string.
*/
-WCHAR *WCMD_strtrim_leading_spaces (WCHAR *string) {
+WCHAR *WCMD_skip_leading_spaces (WCHAR *string) {
WCHAR *ptr;
@@ -1392,7 +1392,7 @@ void WCMD_execute (WCHAR *command, WCHAR *redirects,
/*
* Strip leading whitespaces, and a '@' if supplied
*/
- whichcmd = WCMD_strtrim_leading_spaces(cmd);
+ whichcmd = WCMD_skip_leading_spaces(cmd);
WINE_TRACE("Command: '%s'\n", wine_dbgstr_w(cmd));
if (whichcmd[0] == '@') whichcmd++;
@@ -1409,7 +1409,7 @@ void WCMD_execute (WCHAR *command, WCHAR *redirects,
if (CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
whichcmd, count, inbuilt[i], -1) == CSTR_EQUAL) break;
}
- p = WCMD_strtrim_leading_spaces (&whichcmd[count]);
+ p = WCMD_skip_leading_spaces (&whichcmd[count]);
WCMD_parse (p, quals, param1, param2);
WINE_TRACE("param1: %s, param2: %s\n", wine_dbgstr_w(param1), wine_dbgstr_w(param2));
More information about the wine-cvs
mailing list