cmd: Rename WCMD_opt_s_strip_quotes function.

This commit is contained in:
Frédéric Delanoy 2011-10-19 09:47:58 +02:00 committed by Alexandre Julliard
parent 1b4b274f69
commit d19455e895
3 changed files with 7 additions and 7 deletions

View file

@ -2229,7 +2229,7 @@ void WCMD_setshow_env (WCHAR *s) {
s += 2; s += 2;
while (*s && (*s==' ' || *s=='\t')) s++; while (*s && (*s==' ' || *s=='\t')) s++;
if (*s=='\"') if (*s=='\"')
WCMD_opt_s_strip_quotes(s); WCMD_strip_quotes(s);
/* If no parameter, or no '=' sign, return an error */ /* If no parameter, or no '=' sign, return an error */
if (!(*s) || ((p = strchrW (s, '=')) == NULL )) { if (!(*s) || ((p = strchrW (s, '=')) == NULL )) {
@ -2255,7 +2255,7 @@ void WCMD_setshow_env (WCHAR *s) {
DWORD gle; DWORD gle;
if (*s=='\"') if (*s=='\"')
WCMD_opt_s_strip_quotes(s); WCMD_strip_quotes(s);
p = strchrW (s, '='); p = strchrW (s, '=');
if (p == NULL) { if (p == NULL) {
env = GetEnvironmentStringsW(); env = GetEnvironmentStringsW();

View file

@ -108,7 +108,7 @@ BOOL WCMD_keyword_ws_found(const WCHAR *keyword, int len, const WCHAR *ptr);
void WCMD_HandleTildaModifiers(WCHAR **start, const WCHAR *forVariable, const WCHAR *forValue, BOOL justFors); void WCMD_HandleTildaModifiers(WCHAR **start, const WCHAR *forVariable, const WCHAR *forValue, BOOL justFors);
void WCMD_splitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext); void WCMD_splitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext);
void WCMD_opt_s_strip_quotes(WCHAR *cmd); void WCMD_strip_quotes(WCHAR *cmd);
WCHAR *WCMD_LoadMessage(UINT id); WCHAR *WCMD_LoadMessage(UINT id);
WCHAR *WCMD_strdupW(const WCHAR *input); WCHAR *WCMD_strdupW(const WCHAR *input);
void WCMD_strsubstW(WCHAR *start, const WCHAR* next, const WCHAR* insert, int len); void WCMD_strsubstW(WCHAR *start, const WCHAR* next, const WCHAR* insert, int len);

View file

@ -506,11 +506,11 @@ BOOL WCMD_keyword_ws_found(const WCHAR *keyword, int len, const WCHAR *ptr) {
} }
/************************************************************************* /*************************************************************************
* WCMD_opt_s_strip_quotes * WCMD_strip_quotes
* *
* Remove first and last quote WCHARacters, preserving all other text * Remove first and last quote WCHARacters, preserving all other text
*/ */
void WCMD_opt_s_strip_quotes(WCHAR *cmd) { void WCMD_strip_quotes(WCHAR *cmd) {
WCHAR *src = cmd + 1, *dest = cmd, *lastq = NULL; WCHAR *src = cmd + 1, *dest = cmd, *lastq = NULL;
while((*dest=*src) != '\0') { while((*dest=*src) != '\0') {
if (*src=='\"') if (*src=='\"')
@ -1204,7 +1204,7 @@ void WCMD_run_program (WCHAR *command, int called) {
if ((opt_c || opt_k) && !opt_s && !status if ((opt_c || opt_k) && !opt_s && !status
&& GetLastError()==ERROR_FILE_NOT_FOUND && command[0]=='\"') { && GetLastError()==ERROR_FILE_NOT_FOUND && command[0]=='\"') {
/* strip first and last quote WCHARacters and try again */ /* strip first and last quote WCHARacters and try again */
WCMD_opt_s_strip_quotes(command); WCMD_strip_quotes(command);
opt_s=1; opt_s=1;
WCMD_run_program(command, called); WCMD_run_program(command, called);
return; return;
@ -2478,7 +2478,7 @@ int wmain (int argc, WCHAR *argvW[])
/* strip first and last quote characters if opt_s; check for invalid /* strip first and last quote characters if opt_s; check for invalid
* executable is done later */ * executable is done later */
if (opt_s && *cmd=='\"') if (opt_s && *cmd=='\"')
WCMD_opt_s_strip_quotes(cmd); WCMD_strip_quotes(cmd);
} }
if (opt_c) { if (opt_c) {