]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
ShellPkg: Clean up source files
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / HexEdit / MainHexEditor.c
index 1a89d3d72a95525ed30d5ba58ab5919ff5b6a39d..bf507d2822f29ad05a848e2ad6e217e70158720b 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
-    Defines the Main Editor data type - \r
-     - Global variables \r
+    Defines the Main Editor data type -\r
+     - Global variables\r
      - Instances of the other objects of the editor\r
      - Main Interfaces\r
-  \r
+\r
   Copyright (c) 2005 - 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
@@ -111,14 +111,14 @@ HMainCommandDisplayHelp (
   EFI_KEY_DATA    KeyData;\r
   EFI_STATUS      Status;\r
   UINTN           EventIndex;\r
-  \r
+\r
   //\r
-  // print helpInfo      \r
+  // print helpInfo\r
   //\r
   for (CurrentLine = 0; 0 != HexMainMenuHelpInfo[CurrentLine]; CurrentLine++) {\r
     InfoString = HiiGetString(gShellDebug1HiiHandle, HexMainMenuHelpInfo[CurrentLine]\r
 , NULL);\r
-    ShellPrintEx (0,CurrentLine+1,L"%E%s%N",InfoString);        \r
+    ShellPrintEx (0,CurrentLine+1,L"%E%s%N",InfoString);\r
   }\r
 \r
   //\r
@@ -245,7 +245,7 @@ HMainCommandGoToOffset (
 \r
 /**\r
   Save current opened buffer.\r
-  If is file buffer, you can save to current file name or \r
+  If is file buffer, you can save to current file name or\r
   save to another file name.\r
 \r
   @retval EFI_SUCCESS             The operation was successful.\r
@@ -375,7 +375,7 @@ HMainCommandSaveBuffer (
   // 7. Update File Name field in Title Bar to B\r
   //       and remove the Modified flag in Title Bar.\r
   //\r
-  Str = CatSPrint(NULL, \r
+  Str = CatSPrint(NULL,\r
           L"File to Save: [%s]",\r
           HMainEditor.BufferImage->FileImage->FileName\r
           );\r
@@ -422,7 +422,7 @@ HMainCommandSaveBuffer (
   // if just enter pressed, so think save to current file name\r
   //\r
   if (StrLen (InputBarGetString()) == 0) {\r
-    FileName = CatSPrint(NULL, \r
+    FileName = CatSPrint(NULL,\r
                 L"%s",\r
                 HMainEditor.BufferImage->FileImage->FileName\r
                 );\r
@@ -476,7 +476,7 @@ HMainCommandSaveBuffer (
         StatusBarSetStatusString (L"Access Denied");\r
         SHELL_FREE_NON_NULL (FileName);\r
         return EFI_SUCCESS;\r
-      } \r
+      }\r
 \r
       SHELL_FREE_NON_NULL(Info);\r
       //\r
@@ -520,7 +520,7 @@ HMainCommandSaveBuffer (
       } // while\r
     } // if opened existing file\r
   } // if OldFile\r
-  \r
+\r
   //\r
   // save file back to disk\r
   //\r
@@ -1803,9 +1803,9 @@ HMainEditorCleanup (
   MenuBarCleanup ();\r
 \r
   StatusBarCleanup ();\r
-  \r
+\r
   InputBarCleanup ();\r
-  \r
+\r
   Status = HBufferImageCleanup ();\r
   if (EFI_ERROR (Status)) {\r
     ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_BUFFERIMAGE_CLEAN), gShellDebug1HiiHandle);\r
@@ -1850,28 +1850,28 @@ HMainEditorRefresh (
   if (HMainEditor.BufferImage->BufferType == FileTypeDiskBuffer) {\r
     if (HMainEditor.BufferImage->DiskImage != NULL &&\r
         HBufferImageBackupVar.DiskImage != NULL &&\r
-        (HMainEditor.BufferImage->DiskImage->Offset != HBufferImageBackupVar.DiskImage->Offset || \r
+        (HMainEditor.BufferImage->DiskImage->Offset != HBufferImageBackupVar.DiskImage->Offset ||\r
            HMainEditor.BufferImage->DiskImage->Size != HBufferImageBackupVar.DiskImage->Size) ){\r
       NameChange = TRUE;\r
     }\r
   } else if (HMainEditor.BufferImage->BufferType == FileTypeMemBuffer) {\r
     if (HMainEditor.BufferImage->MemImage != NULL &&\r
         HBufferImageBackupVar.MemImage != NULL &&\r
-        (HMainEditor.BufferImage->MemImage->Offset != HBufferImageBackupVar.MemImage->Offset || \r
+        (HMainEditor.BufferImage->MemImage->Offset != HBufferImageBackupVar.MemImage->Offset ||\r
            HMainEditor.BufferImage->MemImage->Size != HBufferImageBackupVar.MemImage->Size) ){\r
       NameChange = TRUE;\r
     }\r
   } else if (HMainEditor.BufferImage->BufferType == FileTypeFileBuffer) {\r
-    if ( HMainEditor.BufferImage->FileImage != NULL && \r
-         HMainEditor.BufferImage->FileImage->FileName != NULL && \r
-         HBufferImageBackupVar.FileImage != NULL && \r
-         HBufferImageBackupVar.FileImage->FileName != NULL && \r
+    if ( HMainEditor.BufferImage->FileImage != NULL &&\r
+         HMainEditor.BufferImage->FileImage->FileName != NULL &&\r
+         HBufferImageBackupVar.FileImage != NULL &&\r
+         HBufferImageBackupVar.FileImage->FileName != NULL &&\r
          StrCmp (HMainEditor.BufferImage->FileImage->FileName, HBufferImageBackupVar.FileImage->FileName) != 0 ) {\r
       NameChange = TRUE;\r
     }\r
   }\r
-  if ( HMainEditor.BufferImage->FileImage != NULL && \r
-       HBufferImageBackupVar.FileImage != NULL && \r
+  if ( HMainEditor.BufferImage->FileImage != NULL &&\r
+       HBufferImageBackupVar.FileImage != NULL &&\r
        HMainEditor.BufferImage->FileImage->ReadOnly != HBufferImageBackupVar.FileImage->ReadOnly ) {\r
     ReadChange = TRUE;\r
   }\r
@@ -1885,10 +1885,10 @@ HMainEditorRefresh (
   //\r
   // call the components refresh function\r
   //\r
-  if (HEditorFirst \r
+  if (HEditorFirst\r
     || NameChange\r
-    || HMainEditor.BufferImage->BufferType != HBufferImageBackupVar.BufferType \r
-    || HBufferImageBackupVar.Modified != HMainEditor.BufferImage->Modified \r
+    || HMainEditor.BufferImage->BufferType != HBufferImageBackupVar.BufferType\r
+    || HBufferImageBackupVar.Modified != HMainEditor.BufferImage->Modified\r
     || ReadChange ) {\r
 \r
     MainTitleBarRefresh (\r
@@ -1904,8 +1904,8 @@ HMainEditorRefresh (
     HBufferImageRefresh ();\r
   }\r
   if (HEditorFirst\r
-    || HBufferImageBackupVar.DisplayPosition.Row != HMainEditor.BufferImage->DisplayPosition.Row \r
-    || HBufferImageBackupVar.DisplayPosition.Column != HMainEditor.BufferImage->DisplayPosition.Column \r
+    || HBufferImageBackupVar.DisplayPosition.Row != HMainEditor.BufferImage->DisplayPosition.Row\r
+    || HBufferImageBackupVar.DisplayPosition.Column != HMainEditor.BufferImage->DisplayPosition.Column\r
     || StatusBarGetRefresh()) {\r
 \r
     StatusBarRefresh (\r
@@ -2334,7 +2334,7 @@ HMainEditorKeyInput (
           case FileTypeMemBuffer:\r
             OldSize = HBufferImage.MemImage->Size;\r
             break;\r
-        \r
+\r
           default:\r
             OldSize = 0;\r
             break;\r