diff options
author | Liming Gao <liming.gao@intel.com> | 2018-06-27 21:13:38 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-06-28 11:19:51 +0800 |
commit | ba0014b9f8ae1a593f03e744f26008214c2b06a8 (patch) | |
tree | d40c0369fe53be8bd4a8c5595b773ec1bf3cf884 /ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c | |
parent | 24bfed691d9b581830933623204b56a704d1abd2 (diff) | |
download | edk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.tar.gz edk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.tar.bz2 edk2-ba0014b9f8ae1a593f03e744f26008214c2b06a8.zip |
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>
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c')
-rw-r--r-- | ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c index 1a89d3d72a..bf507d2822 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c @@ -1,9 +1,9 @@ /** @file
- Defines the Main Editor data type -
- - Global variables
+ Defines the Main Editor data type -
+ - Global variables
- Instances of the other objects of the editor
- Main Interfaces
-
+
Copyright (c) 2005 - 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
@@ -111,14 +111,14 @@ HMainCommandDisplayHelp ( EFI_KEY_DATA KeyData;
EFI_STATUS Status;
UINTN EventIndex;
-
+
//
- // print helpInfo
+ // print helpInfo
//
for (CurrentLine = 0; 0 != HexMainMenuHelpInfo[CurrentLine]; CurrentLine++) {
InfoString = HiiGetString(gShellDebug1HiiHandle, HexMainMenuHelpInfo[CurrentLine]
, NULL);
- ShellPrintEx (0,CurrentLine+1,L"%E%s%N",InfoString);
+ ShellPrintEx (0,CurrentLine+1,L"%E%s%N",InfoString);
}
//
@@ -245,7 +245,7 @@ HMainCommandGoToOffset ( /**
Save current opened buffer.
- If is file buffer, you can save to current file name or
+ If is file buffer, you can save to current file name or
save to another file name.
@retval EFI_SUCCESS The operation was successful.
@@ -375,7 +375,7 @@ HMainCommandSaveBuffer ( // 7. Update File Name field in Title Bar to B
// and remove the Modified flag in Title Bar.
//
- Str = CatSPrint(NULL,
+ Str = CatSPrint(NULL,
L"File to Save: [%s]",
HMainEditor.BufferImage->FileImage->FileName
);
@@ -422,7 +422,7 @@ HMainCommandSaveBuffer ( // if just enter pressed, so think save to current file name
//
if (StrLen (InputBarGetString()) == 0) {
- FileName = CatSPrint(NULL,
+ FileName = CatSPrint(NULL,
L"%s",
HMainEditor.BufferImage->FileImage->FileName
);
@@ -476,7 +476,7 @@ HMainCommandSaveBuffer ( StatusBarSetStatusString (L"Access Denied");
SHELL_FREE_NON_NULL (FileName);
return EFI_SUCCESS;
- }
+ }
SHELL_FREE_NON_NULL(Info);
//
@@ -520,7 +520,7 @@ HMainCommandSaveBuffer ( } // while
} // if opened existing file
} // if OldFile
-
+
//
// save file back to disk
//
@@ -1803,9 +1803,9 @@ HMainEditorCleanup ( MenuBarCleanup ();
StatusBarCleanup ();
-
+
InputBarCleanup ();
-
+
Status = HBufferImageCleanup ();
if (EFI_ERROR (Status)) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_BUFFERIMAGE_CLEAN), gShellDebug1HiiHandle);
@@ -1850,28 +1850,28 @@ HMainEditorRefresh ( if (HMainEditor.BufferImage->BufferType == FileTypeDiskBuffer) {
if (HMainEditor.BufferImage->DiskImage != NULL &&
HBufferImageBackupVar.DiskImage != NULL &&
- (HMainEditor.BufferImage->DiskImage->Offset != HBufferImageBackupVar.DiskImage->Offset ||
+ (HMainEditor.BufferImage->DiskImage->Offset != HBufferImageBackupVar.DiskImage->Offset ||
HMainEditor.BufferImage->DiskImage->Size != HBufferImageBackupVar.DiskImage->Size) ){
NameChange = TRUE;
}
} else if (HMainEditor.BufferImage->BufferType == FileTypeMemBuffer) {
if (HMainEditor.BufferImage->MemImage != NULL &&
HBufferImageBackupVar.MemImage != NULL &&
- (HMainEditor.BufferImage->MemImage->Offset != HBufferImageBackupVar.MemImage->Offset ||
+ (HMainEditor.BufferImage->MemImage->Offset != HBufferImageBackupVar.MemImage->Offset ||
HMainEditor.BufferImage->MemImage->Size != HBufferImageBackupVar.MemImage->Size) ){
NameChange = TRUE;
}
} else if (HMainEditor.BufferImage->BufferType == FileTypeFileBuffer) {
- if ( HMainEditor.BufferImage->FileImage != NULL &&
- HMainEditor.BufferImage->FileImage->FileName != NULL &&
- HBufferImageBackupVar.FileImage != NULL &&
- HBufferImageBackupVar.FileImage->FileName != NULL &&
+ if ( HMainEditor.BufferImage->FileImage != NULL &&
+ HMainEditor.BufferImage->FileImage->FileName != NULL &&
+ HBufferImageBackupVar.FileImage != NULL &&
+ HBufferImageBackupVar.FileImage->FileName != NULL &&
StrCmp (HMainEditor.BufferImage->FileImage->FileName, HBufferImageBackupVar.FileImage->FileName) != 0 ) {
NameChange = TRUE;
}
}
- if ( HMainEditor.BufferImage->FileImage != NULL &&
- HBufferImageBackupVar.FileImage != NULL &&
+ if ( HMainEditor.BufferImage->FileImage != NULL &&
+ HBufferImageBackupVar.FileImage != NULL &&
HMainEditor.BufferImage->FileImage->ReadOnly != HBufferImageBackupVar.FileImage->ReadOnly ) {
ReadChange = TRUE;
}
@@ -1885,10 +1885,10 @@ HMainEditorRefresh ( //
// call the components refresh function
//
- if (HEditorFirst
+ if (HEditorFirst
|| NameChange
- || HMainEditor.BufferImage->BufferType != HBufferImageBackupVar.BufferType
- || HBufferImageBackupVar.Modified != HMainEditor.BufferImage->Modified
+ || HMainEditor.BufferImage->BufferType != HBufferImageBackupVar.BufferType
+ || HBufferImageBackupVar.Modified != HMainEditor.BufferImage->Modified
|| ReadChange ) {
MainTitleBarRefresh (
@@ -1904,8 +1904,8 @@ HMainEditorRefresh ( HBufferImageRefresh ();
}
if (HEditorFirst
- || HBufferImageBackupVar.DisplayPosition.Row != HMainEditor.BufferImage->DisplayPosition.Row
- || HBufferImageBackupVar.DisplayPosition.Column != HMainEditor.BufferImage->DisplayPosition.Column
+ || HBufferImageBackupVar.DisplayPosition.Row != HMainEditor.BufferImage->DisplayPosition.Row
+ || HBufferImageBackupVar.DisplayPosition.Column != HMainEditor.BufferImage->DisplayPosition.Column
|| StatusBarGetRefresh()) {
StatusBarRefresh (
@@ -2334,7 +2334,7 @@ HMainEditorKeyInput ( case FileTypeMemBuffer:
OldSize = HBufferImage.MemImage->Size;
break;
-
+
default:
OldSize = 0;
break;
|