]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/TianoTools/String/PrintLib.c
Removed one useless makefile, and corrected some BSD licenses
[mirror_edk2.git] / Tools / Source / TianoTools / String / PrintLib.c
index 1e09e24d0bbb18b993e4f6b50cc6c5d4f8911fc0..d27db98ddd032089f6583987cd44326d343a99e9 100644 (file)
@@ -1,22 +1,24 @@
-/** @file\r
-  Print Library.\r
-\r
+/*++\r
 \r
 Copyright (c)  2004-2006 Intel Corporation. All rights reserved\r
-This software and associated documentation (if any) is furnished\r
-under a license and may only be used or copied in accordance\r
-with the terms of the license. Except as permitted by such\r
-license, no part of this software or documentation may be\r
-reproduced, stored in a retrieval system, or transmitted in any\r
-form or by any means without the express written consent of\r
-Intel Corporation.\r
+This program and the accompanying materials are licensed and made available\r
+under the terms and conditions of the BSD License which accompanies this\r
+distribution.  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
+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
 \r
-  Module Name:  PrintLib.c\r
 \r
-**/\r
+Module Name:\r
+\r
+  PrintLib.c\r
+\r
+Abstract:\r
+\r
+  Print Library.\r
+\r
+--*/\r
 \r
 #include <Common/UefiBaseTypes.h>\r
 #include <Library/PrintLib.h>\r
@@ -64,19 +66,19 @@ static CONST STATUS_LOOKUP_TABLE_ENTRY  StatusString[] = {
 \r
 \r
 /**\r
-  VSPrint function to process format and place the results in Buffer. Since a \r
-  VA_LIST is used this rountine allows the nesting of Vararg routines. Thus \r
+  VSPrint function to process format and place the results in Buffer. Since a\r
+  VA_LIST is used this rountine allows the nesting of Vararg routines. Thus\r
   this is the main print working routine\r
 \r
   @param  StartOfBuffer Unicode buffer to print the results of the parsing of Format into.\r
-  \r
+\r
   @param  BufferSize Maximum number of characters to put into buffer. Zero means\r
   no limit.\r
-  \r
+\r
   @param  Flags Intial flags value.  Can only have FORMAT_UNICODE and OUTPUT_UNICODE set\r
-  \r
+\r
   @param  FormatString Unicode format string see file header for more details.\r
-  \r
+\r
   @param  Marker Vararg list consumed by processing Format.\r
 \r
   @return Number of characters printed.\r
@@ -172,24 +174,24 @@ BasePrintLibVSPrint (
         Format += BytesPerFormatCharacter;\r
         FormatCharacter = (*Format | (*(Format + 1) << 8)) & FormatMask;\r
         switch (FormatCharacter) {\r
-        case '.': \r
-          Flags |= PRECISION; \r
+        case '.':\r
+          Flags |= PRECISION;\r
           break;\r
-        case '-': \r
-          Flags |= LEFT_JUSTIFY; \r
+        case '-':\r
+          Flags |= LEFT_JUSTIFY;\r
           break;\r
-        case '+': \r
-          Flags |= PREFIX_SIGN;  \r
+        case '+':\r
+          Flags |= PREFIX_SIGN;\r
           break;\r
-        case ' ': \r
-          Flags |= PREFIX_BLANK; \r
+        case ' ':\r
+          Flags |= PREFIX_BLANK;\r
           break;\r
-        case ',': \r
-          Flags |= COMMA_TYPE; \r
+        case ',':\r
+          Flags |= COMMA_TYPE;\r
           break;\r
         case 'L':\r
-        case 'l': \r
-          Flags |= LONG_TYPE;    \r
+        case 'l':\r
+          Flags |= LONG_TYPE;\r
           break;\r
         case '*':\r
           if ((Flags & PRECISION) == 0) {\r
@@ -229,7 +231,7 @@ BasePrintLibVSPrint (
           Done = TRUE;\r
           break;\r
         }\r
-      } \r
+      }\r
 \r
       //\r
       // Limit the maximum field width to the remaining characters in the output buffer\r
@@ -338,7 +340,7 @@ BasePrintLibVSPrint (
         } else {\r
           BasePrintLibSPrint (\r
             ValueBuffer,\r
-            0, \r
+            0,\r
             0,\r
             "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",\r
             TmpGuid->Data1,\r
@@ -358,7 +360,7 @@ BasePrintLibVSPrint (
         break;\r
 \r
       case 't':\r
-        TmpTime = VA_ARG (Marker, TIME *); \r
+        TmpTime = VA_ARG (Marker, TIME *);\r
         if (TmpTime == NULL) {\r
           ArgumentString = "<null time>";\r
         } else {\r
@@ -519,7 +521,7 @@ BasePrintLibVSPrint (
   // Null terminate the Unicode or ASCII string\r
   //\r
   Buffer = BasePrintLibFillBuffer (Buffer, 1, 0, BytesPerOutputCharacter);\r
-   \r
+\r
   return ((Buffer - OriginalBuffer) / BytesPerOutputCharacter);\r
 }\r
 \r