]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/TerminalDxe/Ansi.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / Console / TerminalDxe / Ansi.c
index 3d2982f87ed110203dd3fe2cf179f1391985de42..63a5dff3f59b067406e9039f2d09ae699ba43d4a 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Implementation of translation upon PC ANSI.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 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
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -16,13 +16,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include "Terminal.h"\r
 \r
 /**\r
-  Translate all raw data in the Raw FIFI into unicode, and insert\r
+  Translate all raw data in the Raw FIFO into unicode, and insert\r
   them into Unicode FIFO.\r
 \r
   @param TerminalDevice          The terminal device.\r
 \r
-  @return None.\r
-\r
 **/\r
 VOID\r
 AnsiRawDataToUnicode (\r
@@ -36,7 +34,7 @@ AnsiRawDataToUnicode (
   // and translate it into unicode, then push\r
   // the unicode into unicode fifo, until the raw fifo is empty.\r
   //\r
-  while (!IsRawFiFoEmpty (TerminalDevice)) {\r
+  while (!IsRawFiFoEmpty (TerminalDevice) && !IsUnicodeFiFoFull (TerminalDevice)) {\r
 \r
     RawFiFoRemoveOneKey (TerminalDevice, &RawData);\r
 \r
@@ -49,8 +47,8 @@ AnsiRawDataToUnicode (
   or valid text graphics.\r
 \r
   @param  TerminalDevice          The terminal device.\r
-  @param  WString                 The input string.          \r
\r
+  @param  WString                 The input string.\r
+\r
   @retval EFI_UNSUPPORTED         If not all input characters are valid.\r
   @retval EFI_SUCCESS             If all input characters are valid.\r
 \r