]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Application/Shell/ShellParametersProtocol.c
ShellPkg: Clean up source files
[mirror_edk2.git] / ShellPkg / Application / Shell / ShellParametersProtocol.c
index 8d76fb4be7ff0910d333b1814ed471a9e23099f1..90889a372524bfbe3e1e7aefcbd12b3e4e5d8148 100644 (file)
@@ -5,7 +5,7 @@
   (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
   Copyright (C) 2014, Red Hat, Inc.\r
   (C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>\r
-  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -147,8 +147,8 @@ DEBUG_CODE_END();
   // Remove any non-escaped quotes in the string\r
   // Remove any remaining escape characters in the string\r
   //\r
-  for (NextDelim = FindFirstCharacter(*TempParameter, L"\"^", CHAR_NULL) \r
-    ; *NextDelim != CHAR_NULL \r
+  for (NextDelim = FindFirstCharacter(*TempParameter, L"\"^", CHAR_NULL)\r
+    ; *NextDelim != CHAR_NULL\r
     ; NextDelim = FindFirstCharacter(NextDelim, L"\"^", CHAR_NULL)\r
     ) {\r
     if (*NextDelim == L'^') {\r
@@ -165,9 +165,9 @@ DEBUG_CODE_END();
       //\r
       if (StripQuotation) {\r
         CopyMem ((CHAR16*)NextDelim, NextDelim + 1, StrSize (NextDelim + 1));\r
-         } else{\r
+    } else{\r
         NextDelim++;\r
-         }\r
+    }\r
     }\r
   }\r
 \r
@@ -181,7 +181,7 @@ DEBUG_CODE_END();
   parameters for inclusion in EFI_SHELL_PARAMETERS_PROTOCOL.  this supports space\r
   delimited and quote surrounded parameter definition.\r
 \r
-  All special character processing (alias, environment variable, redirection, \r
+  All special character processing (alias, environment variable, redirection,\r
   etc... must be complete before calling this API.\r
 \r
   @param[in] CommandLine          String of command line to parse\r
@@ -269,7 +269,7 @@ ParseCommandLineToArgs(
   }\r
   ASSERT(Count >= (*Argc));\r
   Status = EFI_SUCCESS;\r
-  \r
+\r
 Done:\r
   SHELL_FREE_NON_NULL(TempParameter);\r
   SHELL_FREE_NON_NULL(NewCommandLine);\r
@@ -503,7 +503,7 @@ IsUnicodeFile(
   }\r
   gEfiShellProtocol->SetFilePosition(Handle, OriginalFilePosition);\r
   gEfiShellProtocol->CloseFile(Handle);\r
-  return (Status);  \r
+  return (Status);\r
 }\r
 \r
 /**\r
@@ -580,7 +580,7 @@ FixFileName (
     Copy = FileName+1;\r
     if ((TempLocation = StrStr(Copy , L"\"")) != NULL) {\r
       TempLocation[0] = CHAR_NULL;\r
-    }    \r
+    }\r
   } else {\r
     Copy = FileName;\r
     while(Copy[0] == L' ') {\r
@@ -588,7 +588,7 @@ FixFileName (
     }\r
     if ((TempLocation = StrStr(Copy , L" ")) != NULL) {\r
       TempLocation[0] = CHAR_NULL;\r
-    }    \r
+    }\r
   }\r
 \r
   if (Copy[0] == CHAR_NULL) {\r
@@ -620,7 +620,7 @@ FixVarName (
     Copy = FileName+1;\r
     if ((TempLocation = StrStr(Copy , L"%")) != NULL) {\r
       TempLocation[0] = CHAR_NULL;\r
-    }    \r
+    }\r
   }\r
 \r
   return (FixFileName(Copy));\r
@@ -629,9 +629,9 @@ FixVarName (
 /**\r
   Remove the unicode file tag from the begining of the file buffer since that will not be\r
   used by StdIn.\r
-  \r
+\r
   @param[in]  Handle    Pointer to the handle of the file to be processed.\r
-  \r
+\r
   @retval EFI_SUCCESS   The unicode file tag has been moved successfully.\r
 **/\r
 EFI_STATUS\r
@@ -837,7 +837,7 @@ UpdateStdInStdOutStdErr(
     if (StrStr(CommandLineWalker, L" 1>> ") != NULL) {\r
       Status = EFI_NOT_FOUND;\r
     }\r
-  } \r
+  }\r
   if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" >> ")) != NULL) {\r
     FirstLocation = MIN(CommandLineWalker, FirstLocation);\r
     SetMem16(CommandLineWalker, 8, L' ');\r
@@ -864,7 +864,7 @@ UpdateStdInStdOutStdErr(
     if (StrStr(CommandLineWalker, L" >>a ") != NULL) {\r
       Status = EFI_NOT_FOUND;\r
     }\r
-  } \r
+  }\r
   if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" 1>a ")) != NULL) {\r
     FirstLocation = MIN(CommandLineWalker, FirstLocation);\r
     SetMem16(CommandLineWalker, 10, L' ');\r
@@ -878,7 +878,7 @@ UpdateStdInStdOutStdErr(
     if (StrStr(CommandLineWalker, L" 1>a ") != NULL) {\r
       Status = EFI_NOT_FOUND;\r
     }\r
-  } \r
+  }\r
   if (!EFI_ERROR(Status) && (CommandLineWalker = StrStr(CommandLineCopy, L" >a ")) != NULL) {\r
     FirstLocation = MIN(CommandLineWalker, FirstLocation);\r
     SetMem16(CommandLineWalker, 8, L' ');\r
@@ -1107,7 +1107,7 @@ UpdateStdInStdOutStdErr(
       //\r
       // Cant redirect during a reconnect operation.\r
       //\r
-      ||(StrStr(NewCommandLine, L"connect -r") != NULL \r
+      ||(StrStr(NewCommandLine, L"connect -r") != NULL\r
          && (StdOutVarName != NULL || StdOutFileName != NULL || StdErrFileName != NULL || StdErrVarName != NULL))\r
       //\r
       // Check that filetypes (Unicode/Ascii) do not change during an append\r
@@ -1307,7 +1307,7 @@ RestoreStdInStdOutStdErr (
 {\r
   SPLIT_LIST        *Split;\r
 \r
-  if (ShellParameters == NULL \r
+  if (ShellParameters == NULL\r
     ||OldStdIn        == NULL\r
     ||OldStdOut       == NULL\r
     ||OldStdErr       == NULL\r
@@ -1382,7 +1382,7 @@ UpdateArgcArgv(
   )\r
 {\r
   BOOLEAN                 StripParamQuotation;\r
-  \r
+\r
   ASSERT(ShellParameters != NULL);\r
   StripParamQuotation = TRUE;\r
 \r
@@ -1396,10 +1396,10 @@ UpdateArgcArgv(
   if (Type == Script_File_Name) {\r
     StripParamQuotation = FALSE;\r
   }\r
-  \r
-  return ParseCommandLineToArgs( NewCommandLine, \r
-                                 StripParamQuotation, \r
-                                 &(ShellParameters->Argv), \r
+\r
+  return ParseCommandLineToArgs( NewCommandLine,\r
+                                 StripParamQuotation,\r
+                                 &(ShellParameters->Argv),\r
                                  &(ShellParameters->Argc)\r
                                 );\r
 }\r