]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Library / CustomizedDisplayLib / CustomizedDisplayLibInternal.c
index bc14a9dd769c067bc0e05e52bc30032dac263d9b..d770a0f87370f2121da5f0a35c161aa734027bf3 100644 (file)
@@ -2,14 +2,8 @@
 \r
   This library class defines a set of interfaces to customize Display module\r
 \r
-Copyright (c) 2013-2015, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
-The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php.                                            \r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2013-2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 #include "CustomizedDisplayLibInternal.h"\r
@@ -47,10 +41,10 @@ CHAR16            *gInputErrorMessage;
   Print banner info for front page.\r
 \r
   @param[in]  FormData             Form Data to be shown in Page\r
-  \r
+\r
 **/\r
 VOID\r
-PrintBannerInfo ( \r
+PrintBannerInfo (\r
   IN FORM_DISPLAY_ENGINE_FORM       *FormData\r
   )\r
 {\r
@@ -84,15 +78,15 @@ PrintBannerInfo (
         ) {\r
       RowIdx    = (UINT8) (Line - (UINT8) gScreenDimensions.TopRow);\r
       ColumnIdx = (UINT8) (Alignment - (UINT8) gScreenDimensions.LeftColumn);\r
-  \r
+\r
       ASSERT (RowIdx < BANNER_HEIGHT && ColumnIdx < BANNER_COLUMNS);\r
-  \r
+\r
       if (gBannerData!= NULL && gBannerData->Banner[RowIdx][ColumnIdx] != 0x0000) {\r
         StrFrontPageBanner = LibGetToken (gBannerData->Banner[RowIdx][ColumnIdx], FormData->HiiHandle);\r
       } else {\r
         continue;\r
       }\r
-  \r
+\r
       switch (Alignment - gScreenDimensions.LeftColumn) {\r
       case 0:\r
         //\r
@@ -100,7 +94,7 @@ PrintBannerInfo (
         //\r
         PrintStringAt (gScreenDimensions.LeftColumn + BANNER_LEFT_COLUMN_INDENT, Line, StrFrontPageBanner);\r
         break;\r
-  \r
+\r
       case 1:\r
         //\r
         // Handle center column\r
@@ -111,7 +105,7 @@ PrintBannerInfo (
           StrFrontPageBanner\r
           );\r
         break;\r
-  \r
+\r
       case 2:\r
         //\r
         // Handle right column\r
@@ -123,7 +117,7 @@ PrintBannerInfo (
           );\r
         break;\r
       }\r
-  \r
+\r
       FreePool (StrFrontPageBanner);\r
     }\r
   }\r
@@ -159,7 +153,7 @@ PrintFramework (
       );\r
     return;\r
   }\r
-    \r
+\r
   Buffer = AllocateZeroPool (0x10000);\r
   ASSERT (Buffer != NULL);\r
   Character = BOXDRAW_HORIZONTAL;\r
@@ -187,7 +181,7 @@ PrintFramework (
     PrintCharAt (gScreenDimensions.LeftColumn, Row, Character);\r
     PrintCharAt (gScreenDimensions.RightColumn - 1, Row, Character);\r
   }\r
-  \r
+\r
   //\r
   // Print Form Title\r
   //\r
@@ -239,7 +233,7 @@ PrintFramework (
 \r
   Character = BOXDRAW_UP_LEFT;\r
   PrintCharAt ((UINTN) -1, (UINTN) -1, Character);\r
-  \r
+\r
   FreePool (Buffer);\r
 }\r
 \r
@@ -282,7 +276,7 @@ ProcessUserOpcode(
       }\r
       break;\r
 \r
-    case EFI_IFR_GUID_OP:     \r
+    case EFI_IFR_GUID_OP:\r
       if (CompareGuid (&gEfiIfrTianoGuid, (EFI_GUID *)((CHAR8*) OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) {\r
         //\r
         // Tiano specific GUIDed opcodes\r
@@ -306,7 +300,7 @@ ProcessUserOpcode(
               gBannerData = AllocateZeroPool (sizeof (BANNER_DATA));\r
               ASSERT (gBannerData != NULL);\r
             }\r
-            \r
+\r
             CopyMem (\r
               &gBannerData->Banner[((EFI_IFR_GUID_BANNER *) OpCodeData)->LineNumber][\r
               ((EFI_IFR_GUID_BANNER *) OpCodeData)->Alignment],\r
@@ -335,7 +329,7 @@ ProcessUserOpcode(
 \r
 /**\r
   Process some op codes which is out side of current form.\r
-  \r
+\r
   @param FormData                Pointer to the form data.\r
 \r
   @return EFI_SUCCESS            Pass the statement success.\r
@@ -386,7 +380,7 @@ ProcessExternedOpcode (
   @return EFI_INVALID_PARAMETER  The input screen info is not acceptable.\r
 \r
 **/\r
-EFI_STATUS \r
+EFI_STATUS\r
 ScreenDiemensionInfoValidate (\r
   IN FORM_DISPLAY_ENGINE_FORM       *FormData\r
   )\r
@@ -395,7 +389,7 @@ ScreenDiemensionInfoValidate (
   UINTN                Index;\r
 \r
   //\r
-  // Calculate total number of Register HotKeys. \r
+  // Calculate total number of Register HotKeys.\r
   //\r
   Index = 0;\r
   if (!IsListEmpty (&FormData->HotKeyListHead)){\r
@@ -584,7 +578,7 @@ PrintHotKeyHelpString (
   ColumnStr              = gLibEmptyString;\r
 \r
   //\r
-  // Calculate total number of Register HotKeys. \r
+  // Calculate total number of Register HotKeys.\r
   //\r
   Index = 0;\r
   Link  = GetFirstNode (&FormData->HotKeyListHead);\r
@@ -607,7 +601,7 @@ PrintHotKeyHelpString (
     CurrentRow = BottomRowOfHotKeyHelp - Index / 3;\r
 \r
     //\r
-    // Help string can't exceed ColumnWidth. One Row will show three Help information. \r
+    // Help string can't exceed ColumnWidth. One Row will show three Help information.\r
     //\r
     BakChar = L'\0';\r
     if (StrLen (HotKey->HelpString) > ColumnIndexWidth) {\r
@@ -632,7 +626,7 @@ PrintHotKeyHelpString (
     Link = GetNextNode (&FormData->HotKeyListHead, Link);\r
     Index ++;\r
   }\r
-  \r
+\r
   if (SetState) {\r
     //\r
     // Clear KeyHelp\r
@@ -651,13 +645,13 @@ PrintHotKeyHelpString (
       PrintStringAtWithWidth (CurrentCol, CurrentRow, gLibEmptyString, ColumnIndexWidth);\r
     }\r
   }\r
-  \r
+\r
   return;\r
 }\r
 \r
 /**\r
   Get step info from numeric opcode.\r
-  \r
+\r
   @param[in] OpCode     The input numeric op code.\r
 \r
   @return step info for this opcode.\r
@@ -671,24 +665,24 @@ LibGetFieldFromNum (
   UINT64                Step;\r
 \r
   NumericOp = (EFI_IFR_NUMERIC *) OpCode;\r
-  \r
+\r
   switch (NumericOp->Flags & EFI_IFR_NUMERIC_SIZE) {\r
   case EFI_IFR_NUMERIC_SIZE_1:\r
     Step    = NumericOp->data.u8.Step;\r
     break;\r
-  \r
+\r
   case EFI_IFR_NUMERIC_SIZE_2:\r
     Step    = NumericOp->data.u16.Step;\r
     break;\r
-  \r
+\r
   case EFI_IFR_NUMERIC_SIZE_4:\r
     Step    = NumericOp->data.u32.Step;\r
     break;\r
-  \r
+\r
   case EFI_IFR_NUMERIC_SIZE_8:\r
     Step    = NumericOp->data.u64.Step;\r
     break;\r
-  \r
+\r
   default:\r
     Step = 0;\r
     break;\r
@@ -729,7 +723,7 @@ InitializeLibStrings (
 \r
   gNvUpdateMessage      = LibGetToken (STRING_TOKEN (NV_UPDATE_MESSAGE), mCDLStringPackHandle);\r
   gInputErrorMessage    = LibGetToken (STRING_TOKEN (INPUT_ERROR_MESSAGE), mCDLStringPackHandle);\r
-  \r
+\r
   //\r
   // SpaceBuffer;\r
   //\r
@@ -770,7 +764,7 @@ FreeLibStrings (
 \r
   FreePool (gNvUpdateMessage);\r
   FreePool (gInputErrorMessage);\r
-  \r
+\r
   FreePool (mSpaceBuffer);\r
 }\r
 \r
@@ -799,7 +793,7 @@ WaitForKeyStroke (
     if (Status != EFI_NOT_READY) {\r
       continue;\r
     }\r
-    \r
+\r
     gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index);\r
   }\r
   return Status;\r
@@ -845,7 +839,7 @@ LibSetUnicodeMem (
 **/\r
 UINTN\r
 PrintInternal (\r
-  IN UINTN                            Width, \r
+  IN UINTN                            Width,\r
   IN UINTN                            Column,\r
   IN UINTN                            Row,\r
   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL  *Out,\r