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:
Liming Gao
2018-06-27 21:13:38 +08:00
parent 24bfed691d
commit ba0014b9f8
133 changed files with 1886 additions and 1886 deletions

View File

@ -1,8 +1,8 @@
/** @file
Defines HBufferImage - the view of the file that is visible at any point,
as well as the event handlers for editing the file
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at
@ -138,7 +138,7 @@ HBufferImageInit (
}
/**
Backup function for HBufferImage. Only a few fields need to be backup.
Backup function for HBufferImage. Only a few fields need to be backup.
This is for making the file buffer refresh as few as possible.
@retval EFI_SUCCESS The operation was successful.
@ -190,7 +190,7 @@ HBufferImageBackup (
Lines
CurrentLine
NumLines
ListHead
ListHead
@retval EFI_SUCCESS The operation was successful.
**/
@ -946,7 +946,7 @@ HBufferImageRead (
case FileTypeMemBuffer:
Status = HMemImageRead (MemOffset, MemSize, Recover);
break;
default:
Status = EFI_NOT_FOUND;
break;
@ -1013,7 +1013,7 @@ HBufferImageSave (
case FileTypeMemBuffer:
Status = HMemImageSave (MemOffset, MemSize);
break;
default:
Status = EFI_NOT_FOUND;
break;
@ -1030,7 +1030,7 @@ HBufferImageSave (
Create a new line and append it to the line list.
Fields affected:
NumLines
Lines
Lines
@retval NULL create line failed.
@return the line created.
@ -1368,7 +1368,7 @@ HBufferImageDoCharInput (
Check user specified FileRow is above current screen.
@param[in] FileRow Row of file position ( start from 1 ).
@retval TRUE It is above the current screen.
@retval FALSE It is not above the current screen.
@ -1880,12 +1880,12 @@ HBufferImageGetTotalSize (
/**
Delete character from buffer.
@param[in] Pos Position, Pos starting from 0.
@param[in] Count The Count of characters to delete.
@param[out] DeleteBuffer The DeleteBuffer.
@retval EFI_SUCCESS Success
@retval EFI_SUCCESS Success
**/
EFI_STATUS
HBufferImageDeleteCharacterFromBuffer (
@ -2014,7 +2014,7 @@ HBufferImageDeleteCharacterFromBuffer (
@param[in] Count Count of characters to add.
@param[in] AddBuffer Add buffer.
@retval EFI_SUCCESS Success.
@retval EFI_SUCCESS Success.
**/
EFI_STATUS
HBufferImageAddCharacterToBuffer (
@ -2166,7 +2166,7 @@ HBufferImageDoDelete (
/**
Change the raw buffer to a list of lines for the UI.
@param[in] Buffer The pointer to the buffer to fill.
@param[in] Bytes The size of the buffer in bytes.
@ -2231,7 +2231,7 @@ HBufferImageBufferToList (
/**
Change the list of lines from the UI to a raw buffer.
@param[in] Buffer The pointer to the buffer to fill.
@param[in] Bytes The size of the buffer in bytes.

View File

@ -1,8 +1,8 @@
/** @file
Defines BufferImage - the view of the file that is visible at any point,
Defines BufferImage - the view of the file that is visible at any point,
as well as the event handlers for editing the file
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at
@ -72,7 +72,7 @@ HBufferImageHandleInput (
);
/**
Backup function for HBufferImage. Only a few fields need to be backup.
Backup function for HBufferImage. Only a few fields need to be backup.
This is for making the file buffer refresh as few as possible.
@retval EFI_SUCCESS The operation was successful.
@ -151,7 +151,7 @@ HBufferImageMovePosition (
Create a new line and append it to the line list.
Fields affected:
NumLines
Lines
Lines
@retval NULL create line failed.
@return the line created.
@ -174,12 +174,12 @@ HBufferImageFree (
/**
Delete character from buffer.
@param[in] Pos Position, Pos starting from 0.
@param[in] Count The Count of characters to delete.
@param[out] DeleteBuffer The DeleteBuffer.
@retval EFI_SUCCESS Success
@retval EFI_SUCCESS Success
**/
EFI_STATUS
HBufferImageDeleteCharacterFromBuffer (
@ -195,7 +195,7 @@ HBufferImageDeleteCharacterFromBuffer (
@param[in] Count Count of characters to add.
@param[in] AddBuffer Add buffer.
@retval EFI_SUCCESS Success.
@retval EFI_SUCCESS Success.
**/
EFI_STATUS
HBufferImageAddCharacterToBuffer (
@ -206,7 +206,7 @@ HBufferImageAddCharacterToBuffer (
/**
Change the raw buffer to a list of lines for the UI.
@param[in] Buffer The pointer to the buffer to fill.
@param[in] Bytes The size of the buffer in bytes.
@ -221,7 +221,7 @@ HBufferImageBufferToList (
/**
Change the list of lines from the UI to a raw buffer.
@param[in] Buffer The pointer to the buffer to fill.
@param[in] Bytes The size of the buffer in bytes.

View File

@ -1,7 +1,7 @@
/** @file
Functions to deal with Clip Board
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at

View File

@ -1,8 +1,8 @@
/** @file
Defines DiskImage - the view of the file that is visible at any point,
Defines DiskImage - the view of the file that is visible at any point,
as well as the event handlers for editing the file
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at

View File

@ -39,7 +39,7 @@ HEFI_EDITOR_DISK_IMAGE HDiskImageConst = {
/**
Initialization function for HDiskImage.
@retval EFI_SUCCESS The operation was successful.
@retval EFI_LOAD_ERROR A load error occured.
**/
@ -59,7 +59,7 @@ HDiskImageInit (
}
/**
Backup function for HDiskImage. Only a few fields need to be backup.
Backup function for HDiskImage. Only a few fields need to be backup.
This is for making the Disk buffer refresh as few as possible.
@retval EFI_SUCCESS The operation was successful.
@ -154,7 +154,7 @@ HDiskImageSetDiskNameOffsetSize (
@retval EFI_SUCCESS The operation was successful.
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
@retval EFI_LOAD_ERROR A load error occured.
@retval EFI_INVALID_PARAMETER A parameter was invalid.
@retval EFI_INVALID_PARAMETER A parameter was invalid.
**/
EFI_STATUS
HDiskImageRead (
@ -326,7 +326,7 @@ HDiskImageRead (
@retval EFI_SUCCESS The operation was successful.
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
@retval EFI_LOAD_ERROR A load error occured.
@retval EFI_INVALID_PARAMETER A parameter was invalid.
@retval EFI_INVALID_PARAMETER A parameter was invalid.
**/
EFI_STATUS
HDiskImageSave (

View File

@ -1,8 +1,8 @@
/** @file
Defines DiskImage - the view of the file that is visible at any point,
Defines DiskImage - the view of the file that is visible at any point,
as well as the event handlers for editing the file
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at
@ -20,7 +20,7 @@
/**
Initialization function for HDiskImage.
@retval EFI_SUCCESS The operation was successful.
@retval EFI_LOAD_ERROR A load error occured.
**/
@ -40,7 +40,7 @@ HDiskImageCleanup (
);
/**
Backup function for HDiskImage. Only a few fields need to be backup.
Backup function for HDiskImage. Only a few fields need to be backup.
This is for making the Disk buffer refresh as few as possible.
@retval EFI_SUCCESS The operation was successful.
@ -62,7 +62,7 @@ HDiskImageBackup (
@retval EFI_SUCCESS The operation was successful.
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
@retval EFI_LOAD_ERROR A load error occured.
@retval EFI_INVALID_PARAMETER A parameter was invalid.
@retval EFI_INVALID_PARAMETER A parameter was invalid.
**/
EFI_STATUS
HDiskImageRead (
@ -83,7 +83,7 @@ HDiskImageRead (
@retval EFI_SUCCESS The operation was successful.
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
@retval EFI_LOAD_ERROR A load error occured.
@retval EFI_INVALID_PARAMETER A parameter was invalid.
@retval EFI_INVALID_PARAMETER A parameter was invalid.
**/
EFI_STATUS
HDiskImageSave (

View File

@ -37,7 +37,7 @@ HEFI_EDITOR_BUFFER_IMAGE HFileImageConst = {
/**
Initialization function for HFileImage
@retval EFI_SUCCESS The operation was successful.
**/
EFI_STATUS
@ -60,7 +60,7 @@ HFileImageInit (
}
/**
Backup function for HFileImage. Only a few fields need to be backup.
Backup function for HFileImage. Only a few fields need to be backup.
This is for making the file buffer refresh as few as possible.
@retval EFI_SUCCESS The operation was successful.

View File

@ -1,8 +1,8 @@
/** @file
Defines FileImage - the view of the file that is visible at any point,
Defines FileImage - the view of the file that is visible at any point,
as well as the event handlers for editing the file
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at
@ -20,7 +20,7 @@
/**
Initialization function for HFileImage
@retval EFI_SUCCESS The operation was successful.
**/
EFI_STATUS
@ -39,7 +39,7 @@ HFileImageCleanup (
);
/**
Backup function for HFileImage. Only a few fields need to be backup.
Backup function for HFileImage. Only a few fields need to be backup.
This is for making the file buffer refresh as few as possible.
@retval EFI_SUCCESS The operation was successful.

View File

@ -1,8 +1,8 @@
/** @file
Main entry point of editor
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at
@ -74,7 +74,7 @@ ShellCommandRunHexEdit (
Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
if (EFI_ERROR(Status)) {
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"hexedit", ProblemParam);
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"hexedit", ProblemParam);
FreePool(ProblemParam);
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
@ -86,10 +86,10 @@ ShellCommandRunHexEdit (
//
if (ShellCommandLineGetFlag(Package, L"-d")){
if (ShellCommandLineGetCount(Package) < 4) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (ShellCommandLineGetCount(Package) > 4) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
WhatToDo = FileTypeDiskBuffer;
@ -98,7 +98,7 @@ ShellCommandRunHexEdit (
Size = ShellStrToUintn(ShellCommandLineGetRawValue(Package, 3));
}
if (Offset == (UINTN)-1 || Size == (UINTN)-1) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"hexedit", L"-d");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"hexedit", L"-d");
ShellStatus = SHELL_INVALID_PARAMETER;
}
}
@ -108,15 +108,15 @@ ShellCommandRunHexEdit (
//
if (ShellCommandLineGetFlag(Package, L"-f") && (WhatToDo == FileTypeNone)){
if (ShellCommandLineGetCount(Package) < 2) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (ShellCommandLineGetCount(Package) > 2) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
Name = ShellCommandLineGetRawValue(Package, 1);
if (Name == NULL || !IsValidFileName(Name)) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
WhatToDo = FileTypeFileBuffer;
@ -129,10 +129,10 @@ ShellCommandRunHexEdit (
//
if (ShellCommandLineGetFlag(Package, L"-m") && (WhatToDo == FileTypeNone)){
if (ShellCommandLineGetCount(Package) < 3) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (ShellCommandLineGetCount(Package) > 3) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
WhatToDo = FileTypeMemBuffer;
@ -143,10 +143,10 @@ ShellCommandRunHexEdit (
Name = ShellCommandLineGetRawValue(Package, 1);
if (WhatToDo == FileTypeNone && Name != NULL) {
if (ShellCommandLineGetCount(Package) > 2) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (!IsValidFileName(Name)) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
WhatToDo = FileTypeFileBuffer;
@ -154,7 +154,7 @@ ShellCommandRunHexEdit (
} else if (WhatToDo == FileTypeNone) {
if (gEfiShellProtocol->GetCurDir(NULL) == NULL) {
ShellStatus = SHELL_NOT_FOUND;
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
} else {
NewName = EditGetDefaultFileName(L"bin");
Name = NewName;
@ -163,10 +163,10 @@ ShellCommandRunHexEdit (
}
if (ShellStatus == SHELL_SUCCESS && WhatToDo == FileTypeNone) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (WhatToDo == FileTypeFileBuffer && ShellGetCurrentDir(NULL) == NULL) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
ShellStatus = SHELL_INVALID_PARAMETER;
}
@ -252,7 +252,7 @@ ShellCommandRunHexEdit (
// print editor exit code on screen
//
if (Status == EFI_OUT_OF_RESOURCES) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"hexedit");
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"hexedit");
} else if (EFI_ERROR(Status)){
if (Buffer != NULL) {
if (StrCmp (Buffer, L"") != 0) {

View File

@ -1,7 +1,7 @@
/** @file
Main include file for hex editor
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at

View File

@ -1,6 +1,6 @@
/** @file
data types that are used by editor
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

View File

@ -1,6 +1,6 @@
// /**
//
// Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
// Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
// (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
@ -27,7 +27,7 @@
#string STR_HEXEDIT_DISKNAME #language en-US " %H-d DiskName FirstBlockNo. BlockNumber%N Open Disk Block For Editing\n"
#string STR_HEXEDIT_OFFSET_SIZE #language en-US " %H-m Offset Size%N Open Memory Region For Editing\n"
#string STR_HEXEDIT_FILE_NAME #language en-US "%Hhexedit%N: Invalid File Name\n"
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_TITLE #language en-US "%EMainEditor init failed on TitleBar init\n%N"
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_TITLE #language en-US "%EMainEditor init failed on TitleBar init\n%N"
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_MAINMENU #language en-US "%EMainEditor init failed on MainMenu init\n%N"
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_STATUS #language en-US "%EMainEditor init failed on StatusBar init\n%N"
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_INPUTBAR #language en-US "%EMainEditor init failed on InputBar init\n%N"

View File

@ -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;

View File

@ -1,10 +1,10 @@
/** @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 - 2011, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at

View File

@ -1,7 +1,7 @@
/** @file
Functions to deal with Mem buffer
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at
@ -67,7 +67,7 @@ HMemImageInit (
}
/**
Backup function for HDiskImage. Only a few fields need to be backup.
Backup function for HDiskImage. Only a few fields need to be backup.
This is for making the Disk buffer refresh as few as possible.
@retval EFI_SUCCESS The operation was successful.

View File

@ -1,8 +1,8 @@
/** @file
Defines MemImage - the view of the file that is visible at any point,
Defines MemImage - the view of the file that is visible at any point,
as well as the event handlers for editing the file
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at
@ -30,7 +30,7 @@ HMemImageInit (
);
/**
Backup function for HDiskImage. Only a few fields need to be backup.
Backup function for HDiskImage. Only a few fields need to be backup.
This is for making the Disk buffer refresh as few as possible.
@retval EFI_SUCCESS The operation was successful.

View File

@ -1,7 +1,7 @@
/** @file
Implementation of various string and line routines
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at
@ -18,7 +18,7 @@ extern BOOLEAN HEditorMouseAction;
/**
Free a line and it's internal buffer.
@param[in] Src The line to be freed.
**/
VOID
@ -109,7 +109,7 @@ HLineRetreat (
@param[in] Count The line number to advance/retreat.
>0 : advance
<0: retreat
<0: retreat
@retval NULL An error occured.
@return A pointer to the line after move.
@ -182,7 +182,7 @@ HMoveCurrentLine (
Lines
CurrentLine
NumLines
ListHead
ListHead
@param[in] ListHead The list head.
@param[in] Lines The lines.

View File

@ -1,7 +1,7 @@
/** @file
Definitions for various line and string routines
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
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
which accompanies this distribution. The full text of the license may be found at
@ -22,7 +22,7 @@
@param[in] Count The line number to advance/retreat.
>0 : advance
<0: retreat
<0: retreat
@retval NULL An error occured.
@return A pointer to the line after move.
@ -53,7 +53,7 @@ HMoveCurrentLine (
Lines
CurrentLine
NumLines
ListHead
ListHead
@param[in] ListHead The list head.
@param[in] Lines The lines.