]> git.proxmox.com Git - mirror_edk2.git/commitdiff
sync Print functions with MdePkg counterpart.
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 15 Apr 2009 14:32:10 +0000 (14:32 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 15 Apr 2009 14:32:10 +0000 (14:32 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8093 6f19259b-4bc3-4df7-8a09-765794883524

IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLibPrint.c

index 0e65016906a55bc72450497ce9de379e00dd99ec..c436df09187c1fb68224a2d4d6ca67bcd64edd6e 100644 (file)
@@ -48,7 +48,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_GRAPHICS_OUTPUT_BLT_PIXEL mEfiColors[16] = {
   @param Format   Null-terminated Unicode format string.\r
   @param Console  The output console.\r
   @param Marker   VA_LIST marker for the variable argument list.\r
-  \r
+\r
   @return The number of Unicode characters in the produced\r
           output buffer not including the Null-terminator.\r
 **/\r
@@ -241,7 +241,7 @@ AsciiPrint (
   VA_LIST Marker;\r
   UINTN   Return;\r
   ASSERT (Format != NULL);\r
-  \r
+\r
   VA_START (Marker, Format);\r
 \r
   Return = AsciiInternalPrint( Format, gST->ConOut, Marker);\r
@@ -280,7 +280,7 @@ AsciiErrorPrint (
   UINTN   Return;\r
 \r
   ASSERT (Format != NULL);\r
-  \r
+\r
   VA_START (Marker, Format);\r
 \r
   Return = AsciiInternalPrint( Format, gST->StdErr, Marker);\r
@@ -291,42 +291,42 @@ AsciiErrorPrint (
 }\r
 \r
 /**\r
-  Internal function to print a formatted Unicode string to a graphics console device specified by \r
+  Internal function to print a formatted Unicode string to a graphics console device specified by\r
   ConsoleOutputHandle defined in the EFI_SYSTEM_TABLE at the given (X,Y) coordinates.\r
 \r
-  This function prints a formatted Unicode string to the graphics console device \r
-  specified by ConsoleOutputHandle in EFI_SYSTEM_TABLE and returns the number of \r
-  Unicode characters printed. The EFI_HII_FONT_PROTOCOL is used to convert the \r
-  string to a bitmap using the glyphs registered with the \r
+  This function prints a formatted Unicode string to the graphics console device\r
+  specified by ConsoleOutputHandle in EFI_SYSTEM_TABLE and returns the number of\r
+  Unicode characters printed. The EFI_HII_FONT_PROTOCOL is used to convert the\r
+  string to a bitmap using the glyphs registered with the\r
   HII database.  No wrapping is performed, so any portions of the string the fall\r
   outside the active display region will not be displayed.\r
 \r
-  If a graphics console device is not associated with the ConsoleOutputHandle \r
+  If a graphics console device is not associated with the ConsoleOutputHandle\r
   defined in the EFI_SYSTEM_TABLE then no string is printed, and 0 is returned.\r
-  If the EFI_HII_FONT_PROTOCOL is not present in the handle database, then no \r
+  If the EFI_HII_FONT_PROTOCOL is not present in the handle database, then no\r
   string is printed, and 0 is returned.\r
 \r
-  @param  X            X coordinate to print the string.\r
-  @param  Y            Y coordinate to print the string.\r
-  @param  Foreground   The forground color of the string being printed.  This is\r
+  @param  PointX       X coordinate to print the string.\r
+  @param  PointY       Y coordinate to print the string.\r
+  @param  Foreground   The foreground color of the string being printed.  This is\r
                        an optional parameter that may be NULL.  If it is NULL,\r
                        then the foreground color of the current ConOut device\r
                        in the EFI_SYSTEM_TABLE is used.\r
   @param  Background   The background color of the string being printed.  This is\r
-                       an optional parameter that may be NULL.  If it is NULL, \r
+                       an optional parameter that may be NULL.  If it is NULL,\r
                        then the background color of the current ConOut device\r
                        in the EFI_SYSTEM_TABLE is used.\r
   @param  Buffer       Null-terminated Unicode formatted string.\r
   @param  PrintNum     The number of Unicode formatted string to be printed.\r
 \r
-  @return  Number of Unicode Characters printed. Zero means no any character \r
+  @return  Number of Unicode Characters printed. Zero means no any character\r
            displayed successfully.\r
 \r
 **/\r
 UINTN\r
 InternalPrintGraphic (\r
-  IN UINTN                            X,\r
-  IN UINTN                            Y,\r
+  IN UINTN                            PointX,\r
+  IN UINTN                            PointY,\r
   IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Foreground,\r
   IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Background,\r
   IN CHAR16                           *Buffer,\r
@@ -393,7 +393,7 @@ InternalPrintGraphic (
   if (GraphicsOutput != NULL) {\r
     HorizontalResolution = GraphicsOutput->Mode->Info->HorizontalResolution;\r
     VerticalResolution = GraphicsOutput->Mode->Info->VerticalResolution;\r
-  } else if (FeaturePcdGet (PcdUgaConsumeSupport) && UgaDraw != NULL) {\r
+  } else if (UgaDraw != NULL && FeaturePcdGet (PcdUgaConsumeSupport)) {\r
     UgaDraw->GetMode (UgaDraw, &HorizontalResolution, &VerticalResolution, &ColorDepth, &RefreshRate);\r
   } else {\r
     Status = EFI_UNSUPPORTED;\r
@@ -452,21 +452,22 @@ InternalPrintGraphic (
 \r
   if (GraphicsOutput != NULL) {\r
     Blt->Image.Screen = GraphicsOutput;\r
-    \r
+\r
     Status = HiiFont->StringToImage (\r
                          HiiFont,\r
                          EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_DIRECT_TO_SCREEN,\r
                          Buffer,\r
                          &FontInfo,\r
                          &Blt,\r
-                         X,\r
-                         Y,\r
+                         PointX,\r
+                         PointY,\r
                          NULL,\r
                          NULL,\r
                          NULL\r
                          );\r
 \r
-  } else if (FeaturePcdGet (PcdUgaConsumeSupport) && UgaDraw != NULL) {\r
+  } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {\r
+    ASSERT (UgaDraw!= NULL);\r
 \r
     Blt->Image.Bitmap = AllocateZeroPool (Blt->Width * Blt->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));\r
     ASSERT (Blt->Image.Bitmap != NULL);\r
@@ -482,8 +483,8 @@ InternalPrintGraphic (
                          Buffer,\r
                          &FontInfo,\r
                          &Blt,\r
-                         X,\r
-                         Y,\r
+                         PointX,\r
+                         PointY,\r
                          &RowInfoArray,\r
                          &RowInfoArraySize,\r
                          NULL\r
@@ -501,10 +502,10 @@ InternalPrintGraphic (
                           UgaDraw,\r
                           (EFI_UGA_PIXEL *) Blt->Image.Bitmap,\r
                           EfiUgaBltBufferToVideo,\r
-                          X,\r
-                          Y,\r
-                          X,\r
-                          Y,\r
+                          PointX,\r
+                          PointY,\r
+                          PointX,\r
+                          PointY,\r
                           RowInfoArray[0].LineWidth,\r
                           RowInfoArray[0].LineHeight,\r
                           Blt->Width * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
@@ -548,9 +549,9 @@ Error:
   If Format is NULL, then ASSERT().\r
   If Format is not aligned on a 16-bit boundary, then ASSERT().\r
 \r
-  @param  X            X coordinate to print the string.\r
-  @param  Y            Y coordinate to print the string.\r
-  @param  ForeGround   The forground color of the string being printed.  This is\r
+  @param  PointX       X coordinate to print the string.\r
+  @param  PointY       Y coordinate to print the string.\r
+  @param  ForeGround   The foreground color of the string being printed.  This is\r
                        an optional parameter that may be NULL.  If it is NULL,\r
                        then the foreground color of the current ConOut device\r
                        in the EFI_SYSTEM_TABLE is used.\r
@@ -569,8 +570,8 @@ Error:
 UINTN\r
 EFIAPI\r
 PrintXY (\r
-  IN UINTN                            X,\r
-  IN UINTN                            Y,\r
+  IN UINTN                            PointX,\r
+  IN UINTN                            PointY,\r
   IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *ForeGround, OPTIONAL\r
   IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *BackGround, OPTIONAL\r
   IN CONST CHAR16                     *Format,\r
@@ -592,10 +593,10 @@ PrintXY (
 \r
   Buffer = (CHAR16 *) AllocatePool (BufferSize);\r
   ASSERT (Buffer != NULL);\r
-    \r
+\r
   PrintNum = UnicodeVSPrint (Buffer, BufferSize, Format, Marker);\r
 \r
-  ReturnNum = InternalPrintGraphic (X, Y, ForeGround, BackGround, Buffer, PrintNum);\r
+  ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);\r
 \r
   FreePool (Buffer);\r
 \r
@@ -621,9 +622,9 @@ PrintXY (
   string is printed, and 0 is returned.\r
   If Format is NULL, then ASSERT().\r
 \r
-  @param  X            X coordinate to print the string.\r
-  @param  Y            Y coordinate to print the string.\r
-  @param  ForeGround   The forground color of the string being printed.  This is\r
+  @param  PointX       X coordinate to print the string.\r
+  @param  PointY       Y coordinate to print the string.\r
+  @param  ForeGround   The foreground color of the string being printed.  This is\r
                        an optional parameter that may be NULL.  If it is NULL,\r
                        then the foreground color of the current ConOut device\r
                        in the EFI_SYSTEM_TABLE is used.\r
@@ -642,8 +643,8 @@ PrintXY (
 UINTN\r
 EFIAPI\r
 AsciiPrintXY (\r
-  IN UINTN                            X,\r
-  IN UINTN                            Y,\r
+  IN UINTN                            PointX,\r
+  IN UINTN                            PointY,\r
   IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *ForeGround, OPTIONAL\r
   IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *BackGround, OPTIONAL\r
   IN CONST CHAR8                      *Format,\r
@@ -664,13 +665,13 @@ AsciiPrintXY (
 \r
   Buffer = (CHAR16 *) AllocatePool (BufferSize);\r
   ASSERT (Buffer != NULL);\r
-    \r
+\r
   PrintNum = UnicodeSPrintAsciiFormat (Buffer, BufferSize, Format, Marker);\r
 \r
-  ReturnNum = InternalPrintGraphic (X, Y, ForeGround, BackGround, Buffer, PrintNum);\r
+  ReturnNum = InternalPrintGraphic (PointX, PointY, ForeGround, BackGround, Buffer, PrintNum);\r
 \r
   FreePool (Buffer);\r
\r
+\r
   return ReturnNum;\r
 }\r
 \r