]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellDebug1CommandsLib/Compress.c
ShellPkg/UefiShellDebug1CommandsLib: sync Compress() definition with decl.
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / Compress.c
index b1f8327f4ab01ae7276a0d4a8ed3eefc18f78a41..cde2c54f1b45edd5ebdfb2de952a544bd56f9c21 100644 (file)
@@ -7,7 +7,7 @@
   This sequence is further divided into Blocks and Huffman codings\r
   are applied to each Block.\r
 \r
-  Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2016, 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
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
-\r
+#include <Uefi.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/DebugLib.h>\r
-#include <ShellBase.h>\r
+#include <Library/ShellLib.h>\r
+\r
+#include "Compress.h"\r
 \r
 //\r
 // Macro Definitions\r
@@ -67,7 +69,6 @@ typedef INT16             NODE;
   @param[in] Data    The dword to put.\r
 **/\r
 VOID\r
-EFIAPI\r
 PutDword(\r
   IN UINT32 Data\r
   );\r
@@ -127,7 +128,6 @@ INT32         mHuffmanDepth = 0;
 \r
 **/\r
 VOID\r
-EFIAPI\r
 MakeCrcTable (\r
   VOID\r
   )\r
@@ -158,7 +158,6 @@ MakeCrcTable (
   @param[in] Data    The dword to put.\r
 **/\r
 VOID\r
-EFIAPI\r
 PutDword (\r
   IN UINT32 Data\r
   )\r
@@ -187,7 +186,6 @@ PutDword (
   @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 AllocateMemory (\r
   VOID\r
   )\r
@@ -221,7 +219,6 @@ AllocateMemory (
 \r
 **/\r
 VOID\r
-EFIAPI\r
 FreeMemory (\r
   VOID\r
   )\r
@@ -240,7 +237,6 @@ FreeMemory (
   Initialize String Info Log data structures.\r
 **/\r
 VOID\r
-EFIAPI\r
 InitSlide (\r
   VOID\r
   )\r
@@ -272,7 +268,6 @@ InitSlide (
 \r
 **/\r
 NODE\r
-EFIAPI\r
 Child (\r
   IN NODE   LoopVar6,\r
   IN UINT8  LoopVar5\r
@@ -297,7 +292,6 @@ Child (
   @param[in] LoopVar4       The child node.\r
 **/\r
 VOID\r
-EFIAPI\r
 MakeChild (\r
   IN NODE   LoopVar6,\r
   IN UINT8  LoopVar5,\r
@@ -324,7 +318,6 @@ MakeChild (
   @param[in] Old     The node to split.\r
 **/\r
 VOID\r
-EFIAPI\r
 Split (\r
   IN NODE Old\r
   )\r
@@ -354,7 +347,6 @@ Split (
 \r
 **/\r
 VOID\r
-EFIAPI\r
 InsertNode (\r
   VOID\r
   )\r
@@ -483,7 +475,6 @@ InsertNode (
 \r
 **/\r
 VOID\r
-EFIAPI\r
 DeleteNode (\r
   VOID\r
   )\r
@@ -578,7 +569,6 @@ DeleteNode (
   @return The number of bytes actually read.\r
 **/\r
 INT32\r
-EFIAPI\r
 FreadCrc (\r
   OUT UINT8 *LoopVar7,\r
   IN  INT32 LoopVar8\r
@@ -611,7 +601,6 @@ FreadCrc (
   @retval FALSE     The operation failed due to insufficient memory.\r
 **/\r
 BOOLEAN\r
-EFIAPI\r
 GetNextMatch (\r
   VOID\r
   )\r
@@ -646,7 +635,6 @@ GetNextMatch (
   @param[in] LoopVar1    The index of the item to move.\r
 **/\r
 VOID\r
-EFIAPI\r
 DownHeap (\r
   IN INT32 i\r
   )\r
@@ -683,7 +671,6 @@ DownHeap (
   @param[in] LoopVar1      The top node.\r
 **/\r
 VOID\r
-EFIAPI\r
 CountLen (\r
   IN INT32 LoopVar1\r
   )\r
@@ -704,7 +691,6 @@ CountLen (
   @param[in] Root   The root of the tree.\r
 **/\r
 VOID\r
-EFIAPI\r
 MakeLen (\r
   IN INT32 Root\r
   )\r
@@ -760,7 +746,6 @@ MakeLen (
   @param[out] Code  The stores codes for each symbol.\r
 **/\r
 VOID\r
-EFIAPI\r
 MakeCode (\r
   IN  INT32         LoopVar8,\r
   IN  UINT8 Len[    ],\r
@@ -791,7 +776,6 @@ MakeCode (
   @return The root of the Huffman tree.\r
 **/\r
 INT32\r
-EFIAPI\r
 MakeTree (\r
   IN  INT32             NParm,\r
   IN  UINT16  FreqParm[ ],\r
@@ -875,7 +859,6 @@ MakeTree (
   @param[in] x   The data.\r
 **/\r
 VOID\r
-EFIAPI\r
 PutBits (\r
   IN INT32    LoopVar8,\r
   IN UINT32   x\r
@@ -914,7 +897,6 @@ PutBits (
   @param[in] LoopVar5     The number to encode.\r
 **/\r
 VOID\r
-EFIAPI\r
 EncodeC (\r
   IN INT32 LoopVar5\r
   )\r
@@ -928,7 +910,6 @@ EncodeC (
   @param[in] LoopVar7     The number to encode.\r
 **/\r
 VOID\r
-EFIAPI\r
 EncodeP (\r
   IN UINT32 LoopVar7\r
   )\r
@@ -955,7 +936,6 @@ EncodeP (
 \r
 **/\r
 VOID\r
-EFIAPI\r
 CountTFreq (\r
   VOID\r
   )\r
@@ -1013,7 +993,6 @@ CountTFreq (
 \r
 **/\r
 VOID\r
-EFIAPI\r
 WritePTLen (\r
   IN INT32 LoopVar8,\r
   IN INT32 nbit,\r
@@ -1052,7 +1031,6 @@ WritePTLen (
   Outputs the code length array for Char&Length Set.\r
 **/\r
 VOID\r
-EFIAPI\r
 WriteCLen (\r
   VOID\r
   )\r
@@ -1108,7 +1086,6 @@ WriteCLen (
 \r
 **/\r
 VOID\r
-EFIAPI\r
 SendBlock (\r
   VOID\r
   )\r
@@ -1182,7 +1159,6 @@ SendBlock (
 \r
 **/\r
 VOID\r
-EFIAPI\r
 HufEncodeStart (\r
   VOID\r
   )\r
@@ -1204,7 +1180,6 @@ HufEncodeStart (
   @param[in] LoopVar7     The 'Position' field of a Pointer.\r
 **/\r
 VOID\r
-EFIAPI\r
 CompressOutput (\r
   IN UINT32 LoopVar5,\r
   IN UINT32 LoopVar7\r
@@ -1242,7 +1217,6 @@ CompressOutput (
 \r
 **/\r
 VOID\r
-EFIAPI\r
 HufEncodeEnd (\r
   VOID\r
   )\r
@@ -1262,7 +1236,6 @@ HufEncodeEnd (
   @retval EFI_OUT_0F_RESOURCES  Not enough memory for compression process.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 Encode (\r
   VOID\r
   )\r
@@ -1336,21 +1309,20 @@ Encode (
   The compression routine.\r
 \r
   @param[in]       SrcBuffer     The buffer containing the source data.\r
-  @param[in]       SrcSize       The number of bytes in SrcBuffer.\r
+  @param[in]       SrcSize       Number of bytes in SrcBuffer.\r
   @param[in]       DstBuffer     The buffer to put the compressed image in.\r
   @param[in, out]  DstSize       On input the size (in bytes) of DstBuffer, on\r
-                                return the number of bytes placed in DstBuffer.\r
+                                 return the number of bytes placed in DstBuffer.\r
 \r
   @retval EFI_SUCCESS           The compression was sucessful.\r
   @retval EFI_BUFFER_TOO_SMALL  The buffer was too small.  DstSize is required.\r
 **/\r
 EFI_STATUS\r
-EFIAPI\r
 Compress (\r
-  IN       VOID   *SrcBuffer,\r
-  IN       UINT64 SrcSize,\r
-  IN       VOID   *DstBuffer,\r
-  IN OUT   UINT64 *DstSize\r
+  IN      VOID    *SrcBuffer,\r
+  IN      UINT64  SrcSize,\r
+  IN      VOID    *DstBuffer,\r
+  IN OUT  UINT64  *DstSize\r
   )\r
 {\r
   EFI_STATUS  Status;\r