]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
ShellPkg: Minor change to EDIT and HEXEDIT commands to make the title bars consistent...
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / Edit / MainTextEditor.c
index 460433e373c50869c35439d30111be190640c995..a1564d4f5a146530dde5b080e563976e71044c45 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implements editor interface functions.\r
 \r
-  Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2005 - 2012, 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
@@ -88,7 +88,7 @@ MainCommandSaveFile (
   );\r
 \r
 /**\r
-  show help menu.\r
+  Show help information for the editor.\r
 \r
   @retval EFI_SUCCESS             The operation was successful.\r
 **/\r
@@ -1350,7 +1350,7 @@ MainCommandSaveFile (
 }\r
 \r
 /**\r
-  show help menu.\r
+  Show help information for the editor.\r
 \r
   @retval EFI_SUCCESS             The operation was successful.\r
 **/\r
@@ -1359,22 +1359,28 @@ MainCommandDisplayHelp (
   VOID\r
   )\r
 {\r
-  INTN     CurrentLine=0;\r
-  CHAR16 InfoString;\r
-  EFI_INPUT_KEY  Key;\r
+  INT32           CurrentLine;\r
+  CHAR16          *InfoString;\r
+  EFI_INPUT_KEY   Key;\r
   \r
+  //\r
   // print helpInfo      \r
+  //\r
   for (CurrentLine = 0; 0 != MainMenuHelpInfo[CurrentLine]; CurrentLine++) {\r
     InfoString = HiiGetString(gShellDebug1HiiHandle, MainMenuHelpInfo[CurrentLine], 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
   // scan for ctrl+w\r
+  //\r
   do {\r
     gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);\r
   } while(SCAN_CONTROL_W != Key.UnicodeChar); \r
 \r
+  //\r
   // update screen with file buffer's info\r
+  //\r
   FileBufferRestorePosition ();\r
   FileBufferNeedRefresh = TRUE;\r
   FileBufferOnlyLineNeedRefresh = FALSE;\r
@@ -1393,8 +1399,7 @@ INTN                          OriginalMode;
 EFI_EDITOR_GLOBAL_EDITOR      MainEditorConst = {\r
   &FileBuffer,\r
   {\r
-    0,\r
-    0\r
+    {0, 0}\r
   },\r
   {\r
     0,\r
@@ -1497,7 +1502,7 @@ MainEditorInit (
   //\r
   // below will call the five components' init function\r
   //\r
-  Status = MainTitleBarInit (L"UEFI EDIT 2.0");\r
+  Status = MainTitleBarInit (L"UEFI EDIT");\r
   if (EFI_ERROR (Status)) {\r
     ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_EDIT_LIBEDITOR_TITLEBAR), gShellDebug1HiiHandle);\r
     return EFI_LOAD_ERROR;\r