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