]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Console/TerminalDxe/Ansi.c
2 Provides misc functions upon ansi.
4 Copyright (c) 2006, Intel Corporation. <BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 AnsiRawDataToUnicode (
20 IN TERMINAL_DEV
*TerminalDevice
26 // pop the raw data out from the raw fifo,
27 // and translate it into unicode, then push
28 // the unicode into unicode fifo, until the raw fifo is empty.
30 while (!IsRawFiFoEmpty (TerminalDevice
)) {
32 RawFiFoRemoveOneKey (TerminalDevice
, &RawData
);
34 UnicodeFiFoInsertOneKey (TerminalDevice
, (UINT16
) RawData
);
40 IN TERMINAL_DEV
*TerminalDevice
,
47 // support three kind of character:
48 // valid ascii, valid efi control char, valid text graphics.
50 for (; *WString
!= CHAR_NULL
; WString
++) {
52 if ( !(TerminalIsValidAscii (*WString
) ||
53 TerminalIsValidEfiCntlChar (*WString
) ||
54 TerminalIsValidTextGraphics (*WString
, &GraphicChar
, NULL
) )) {
56 return EFI_UNSUPPORTED
;