X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellDebug1CommandsLib%2FEditTitleBar.c;h=727605ccad08eef384fa210ea863866c2c5a249c;hb=ba30d5f0512196b1ee7b3d864f980e551da0ebf5;hp=1f71c8b18bfc4a1f9a1ad00e92830fca08c830d6;hpb=2442e62af75a0c5087fce3fb2040e26a485b0d31;p=mirror_edk2.git diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c index 1f71c8b18b..727605ccad 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/EditTitleBar.c @@ -1,7 +1,8 @@ /** @file Implements titlebar interface functions. - Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.
+ (C) Copyright 2013 Hewlett-Packard Development Company, L.P.
+ Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.
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 @@ -26,7 +27,6 @@ CHAR16 *Title = NULL; @retval EFI_OUT_OF_RESOURCES A memory allocation failed. **/ EFI_STATUS -EFIAPI MainTitleBarInit ( CONST CHAR16 *Prompt ) @@ -51,7 +51,6 @@ MainTitleBarInit ( Clean up the memory used. **/ VOID -EFIAPI MainTitleBarCleanup ( VOID ) @@ -79,18 +78,21 @@ typedef union { @param[in] Modified TRUE if the file was modified. FALSE otherwise. @param[in] LastCol The last printable column. @param[in] LastRow The last printable row. + @param[in] Offset The offset into the file. (only for mem/disk) + @param[in] Size The file's size. (only for mem/disk) @retval EFI_SUCCESS The operation was successful. **/ EFI_STATUS -EFIAPI MainTitleBarRefresh ( IN CONST CHAR16 *FileName OPTIONAL, IN CONST EDIT_FILE_TYPE FileType, - IN BOOLEAN ReadOnly, - IN BOOLEAN Modified, - IN UINTN LastCol, - IN UINTN LastRow + IN CONST BOOLEAN ReadOnly, + IN CONST BOOLEAN Modified, + IN CONST UINTN LastCol, + IN CONST UINTN LastRow, + IN CONST UINTN Offset, + IN CONST UINTN Size ) { TITLE_BAR_COLOR_UNION Orig; @@ -103,10 +105,11 @@ MainTitleBarRefresh ( // backup the old screen attributes // Orig.Data = gST->ConOut->Mode->Attribute; - New.Colors.Foreground = Orig.Colors.Background; - New.Colors.Background = Orig.Colors.Foreground; + New.Data = 0; + New.Colors.Foreground = Orig.Colors.Background & 0xF; + New.Colors.Background = Orig.Colors.Foreground & 0x7; - gST->ConOut->SetAttribute (gST->ConOut, New.Data); + gST->ConOut->SetAttribute (gST->ConOut, New.Data & 0x7F); // // clear the title line @@ -165,6 +168,8 @@ MainTitleBarRefresh ( case FileTypeAscii: case FileTypeUnicode: if (FileType == FileTypeAscii){ + ShellPrintEx (-1,-1, L" ASCII "); + } else { ShellPrintEx (-1,-1, L" UNICODE "); } // @@ -181,9 +186,11 @@ MainTitleBarRefresh ( // // Print the offset. // - ASSERT(FALSE); + ShellPrintEx (-1,-1, L"Offset %X | Size %X", Offset, Size); case FileTypeFileBuffer: break; + default: + break; } // // print modified field