Implementation for EFI_HII_FONT_PROTOCOL.\r
\r
\r
-Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2014, 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
break;\r
\r
case EFI_HII_GIBT_EXT1:\r
- BlockPtr += *(BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8));\r
+ BlockPtr += *(UINT8*)((UINTN)BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8));\r
break;\r
case EFI_HII_GIBT_EXT2:\r
CopyMem (\r
&Length16,\r
- BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8),\r
+ (UINT8*)((UINTN)BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8)),\r
sizeof (UINT16)\r
);\r
BlockPtr += Length16;\r
case EFI_HII_GIBT_EXT4:\r
CopyMem (\r
&Length32,\r
- BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8),\r
+ (UINT8*)((UINTN)BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK) + sizeof (UINT8)),\r
sizeof (UINT32)\r
);\r
BlockPtr += Length32;\r
BufferLen = BITMAP_LEN_1_BIT (LocalCell.Width, LocalCell.Height);\r
if (CharCurrent == CharValue) {\r
return WriteOutputParam (\r
- BlockPtr + sizeof (EFI_HII_GIBT_GLYPH_BLOCK) - sizeof (UINT8),\r
+ (UINT8*)((UINTN)BlockPtr + sizeof (EFI_HII_GIBT_GLYPH_BLOCK) - sizeof (UINT8)),\r
BufferLen,\r
&LocalCell,\r
GlyphBuffer,\r
return TRUE;\r
}\r
\r
+ SystemDefault = NULL;\r
+ DefaultLen = 0;\r
+\r
Status = GetSystemFont (Private, &SystemDefault, &DefaultLen);\r
ASSERT_EFI_ERROR (Status);\r
+ ASSERT ((SystemDefault != NULL) && (DefaultLen != 0));\r
\r
//\r
// Record the system default info.\r
//\r
// Mandatory line break characters, which force a line-break\r
//\r
+ case 0x000A:\r
case 0x000C:\r
case 0x000D:\r
case 0x2028:\r
SysFontFlag = IsSystemFontInfo (Private, (EFI_FONT_DISPLAY_INFO *) StringInfo, &SystemDefault, NULL);\r
\r
if (SysFontFlag) {\r
+ ASSERT (SystemDefault != NULL);\r
FontInfo = NULL;\r
Height = SystemDefault->FontInfo.FontSize;\r
BaseLine = SystemDefault->FontInfo.FontSize;\r
if (Language == NULL) {\r
Language = "";\r
}\r
- GetEfiGlobalVariable2 (L"PlatformLang", &CurrentLanguage, NULL);\r
+ GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&CurrentLanguage, NULL);\r
BestLanguage = GetBestLanguage (\r
SupportedLanguages,\r
FALSE,\r
Foreground = StringInfoOut->ForegroundColor;\r
Background = StringInfoOut->BackgroundColor;\r
} else {\r
+ ASSERT (SystemDefault != NULL);\r
Foreground = SystemDefault->ForegroundColor;\r
Background = SystemDefault->BackgroundColor;\r
}\r
with the first font. On return, points to the\r
returned font handle or points to NULL if there\r
are no more matching fonts.\r
- @param StringInfoIn Upon entry, points to the font to return\r
- information about. \r
- If NULL, then the information about the system default \r
- font will be returned.\r
- @param StringInfoOut Upon return, contains the matching font's\r
- information. If NULL, then no information is\r
- returned. It's caller's responsibility to free\r
- this buffer.\r
+ @param StringInfoIn Upon entry, points to the font to return information\r
+ about. If NULL, then the information about the system\r
+ default font will be returned.\r
+ @param StringInfoOut Upon return, contains the matching font's information.\r
+ If NULL, then no information is returned. This buffer\r
+ is allocated with a call to the Boot Service AllocatePool().\r
+ It is the caller's responsibility to call the Boot \r
+ Service FreePool() when the caller no longer requires\r
+ the contents of StringInfoOut.\r
@param String Points to the string which will be tested to\r
determine if all characters are available. If\r
NULL, then any font is acceptable.\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
+ StringInfoOutLen = 0;\r
FontInfo = NULL;\r
SystemDefault = NULL;\r
LocalFontHandle = NULL;\r