]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
ShellPkg: Fix ARM build errors.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / Edit / FileBuffer.c
index ba622983e1a19ccc066da1b7ca961a98d6e44bef..179559833eec5d17bc52ee0926f3409cc7e51854 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implements filebuffer 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
@@ -300,6 +300,7 @@ FileBufferRestoreMousePosition (
       // backup the old screen attributes\r
       //\r
       Orig                  = MainEditor.ColorAttributes;\r
+      New.Data              = 0;\r
       New.Colors.Foreground = Orig.Colors.Background;\r
       New.Colors.Background = Orig.Colors.Foreground;\r
 \r
@@ -489,6 +490,7 @@ FileBufferPrintLine (
   CHAR16  *Buffer;\r
   UINTN   Limit;\r
   CHAR16  PrintLine[200];\r
+  CHAR16  PrintLine2[250];\r
 \r
   //\r
   // print start from correct character\r
@@ -506,12 +508,13 @@ FileBufferPrintLine (
   }\r
 \r
   PrintLine[MainEditor.ScreenSize.Column] = CHAR_NULL;\r
+  ShellCopySearchAndReplace(PrintLine, PrintLine2,  250, L"%", L"^%", FALSE, FALSE);\r
 \r
   ShellPrintEx (\r
     0,\r
     (INT32)Row - 1,\r
     L"%s",\r
-    PrintLine\r
+    PrintLine2\r
     );\r
 \r
   return EFI_SUCCESS;\r
@@ -1685,8 +1688,8 @@ FileBufferScrollLeft (
 /**\r
   Delete a char in line\r
 \r
-  @param[in,out] Line   The line to delete in.\r
-  @param[in] Pos        Position to delete the char at ( start from 0 ).\r
+  @param[in, out] Line   The line to delete in.\r
+  @param[in] Pos         Position to delete the char at ( start from 0 ).\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -1710,8 +1713,8 @@ LineDeleteAt (
 /**\r
   Concatenate Src into Dest.\r
 \r
-  @param[in,out] Dest   Destination string\r
-  @param[in] Src        Src String.\r
+  @param[in, out] Dest   Destination string\r
+  @param[in] Src         Src String.\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -2981,7 +2984,7 @@ FileBufferSearch (
   //\r
   // found\r
   //\r
-  if (Found == TRUE) {\r
+  if (Found) {\r
     Column  = (Position - 1) + FileBuffer.FilePosition.Column + Offset;\r
     Row     = FileBuffer.FilePosition.Row;\r
   } else {\r
@@ -3000,7 +3003,7 @@ FileBufferSearch (
         Found   = TRUE;\r
       } \r
       \r
-      if (Found == TRUE) {\r
+      if (Found) {\r
         //\r
         // found\r
         //\r