cmd: Rename WCMD_opt_s_strip_quotes function

Frédéric Delanoy frederic.delanoy at gmail.com
Wed Oct 19 02:47:58 CDT 2011


Not used only with /s option, so name was a bit misleading
---
 programs/cmd/builtins.c |    4 ++--
 programs/cmd/wcmd.h     |    2 +-
 programs/cmd/wcmdmain.c |    8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 5a890c7..79e1ced 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -2229,7 +2229,7 @@ void WCMD_setshow_env (WCHAR *s) {
     s += 2;
     while (*s && (*s==' ' || *s=='\t')) s++;
     if (*s=='\"')
-        WCMD_opt_s_strip_quotes(s);
+        WCMD_strip_quotes(s);
 
     /* If no parameter, or no '=' sign, return an error */
     if (!(*s) || ((p = strchrW (s, '=')) == NULL )) {
@@ -2255,7 +2255,7 @@ void WCMD_setshow_env (WCHAR *s) {
     DWORD gle;
 
     if (*s=='\"')
-        WCMD_opt_s_strip_quotes(s);
+        WCMD_strip_quotes(s);
     p = strchrW (s, '=');
     if (p == NULL) {
       env = GetEnvironmentStringsW();
diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h
index 61cef8f..e025484 100644
--- a/programs/cmd/wcmd.h
+++ b/programs/cmd/wcmd.h
@@ -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_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_strdupW(const WCHAR *input);
 void WCMD_strsubstW(WCHAR *start, const WCHAR* next, const WCHAR* insert, int len);
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index a4726e8..56aa85f 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -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
  */
-void WCMD_opt_s_strip_quotes(WCHAR *cmd) {
+void WCMD_strip_quotes(WCHAR *cmd) {
   WCHAR *src = cmd + 1, *dest = cmd, *lastq = NULL;
   while((*dest=*src) != '\0') {
       if (*src=='\"')
@@ -1204,7 +1204,7 @@ void WCMD_run_program (WCHAR *command, int called) {
         if ((opt_c || opt_k) && !opt_s && !status
             && GetLastError()==ERROR_FILE_NOT_FOUND && command[0]=='\"') {
           /* strip first and last quote WCHARacters and try again */
-          WCMD_opt_s_strip_quotes(command);
+          WCMD_strip_quotes(command);
           opt_s=1;
           WCMD_run_program(command, called);
           return;
@@ -2478,7 +2478,7 @@ int wmain (int argc, WCHAR *argvW[])
       /* strip first and last quote characters if opt_s; check for invalid
        * executable is done later */
       if (opt_s && *cmd=='\"')
-          WCMD_opt_s_strip_quotes(cmd);
+          WCMD_strip_quotes(cmd);
   }
 
   if (opt_c) {
-- 
1.7.7




More information about the wine-patches mailing list