cmd: Rename WCMD_strtrim_leading_spaces to WCMD_skip_leading_spaces to better reflect its purpose.
This commit is contained in:
parent
303af43ff5
commit
bb47576f59
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue