summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseUefiDecompressLib
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-06-27 21:11:33 +0800
committerLiming Gao <liming.gao@intel.com>2018-06-28 11:19:47 +0800
commit9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107 (patch)
tree15a2cb1a7907a9114ee79130699ce7d324c942ea /MdePkg/Library/BaseUefiDecompressLib
parentd1102dba7210b95e41d06c2338a22ba6af248645 (diff)
downloadedk2-9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107.tar.gz
edk2-9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107.tar.bz2
edk2-9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107.zip
MdePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdePkg/Library/BaseUefiDecompressLib')
-rw-r--r--MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c74
-rw-r--r--MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf4
2 files changed, 39 insertions, 39 deletions
diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
index e818543d92..dc89157c4e 100644
--- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
+++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.c
@@ -1,7 +1,7 @@
/** @file
UEFI Decompress Library implementation refer to UEFI specification.
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -71,7 +71,7 @@ FillBuf (
// Calculate additional bit count read to update mBitCount
//
Sd->mBitCount = (UINT16) (Sd->mBitCount - NumOfBits);
-
+
//
// Copy NumOfBits of bits from mSubBitBuf into mBitBuf
//
@@ -101,7 +101,7 @@ GetBits (
//
// Pop NumOfBits of Bits from Left
- //
+ //
OutBits = (UINT32) (Sd->mBitBuf >> (BITBUFSIZ - NumOfBits));
//
@@ -166,7 +166,7 @@ MakeTable (
for (Index = 0; Index < NumOfChar; Index++) {
Count[BitLen[Index]]++;
}
-
+
Start[0] = 0;
Start[1] = 0;
@@ -182,7 +182,7 @@ MakeTable (
}
JuBits = (UINT16) (16 - TableBits);
-
+
Weight[0] = 0;
for (Index = 1; Index <= TableBits; Index++) {
Start[Index] >>= JuBits;
@@ -191,7 +191,7 @@ MakeTable (
while (Index <= 16) {
Weight[Index] = (UINT16) (1U << (16 - Index));
- Index++;
+ Index++;
}
Index = (UINT16) (Start[TableBits + 1] >> JuBits);
@@ -232,7 +232,7 @@ MakeTable (
Sd->mRight[Avail] = Sd->mLeft[Avail] = 0;
*Pointer = Avail++;
}
-
+
if (*Pointer < (2 * NC - 1)) {
if ((Index3 & Mask) != 0) {
Pointer = &Sd->mRight[*Pointer];
@@ -335,7 +335,7 @@ ReadPTLen (
ASSERT (nn <= NPT);
//
- // Read Extra Set Code Length Array size
+ // Read Extra Set Code Length Array size
//
Number = (UINT16) GetBits (Sd, nbit);
@@ -360,7 +360,7 @@ ReadPTLen (
//
// If a code length is less than 7, then it is encoded as a 3-bit
- // value. Or it is encoded as a series of "1"s followed by a
+ // value. Or it is encoded as a series of "1"s followed by a
// terminating "0". The number of "1"s = Code length - 4.
//
if (CharC == 7) {
@@ -370,15 +370,15 @@ ReadPTLen (
CharC += 1;
}
}
-
+
FillBuf (Sd, (UINT16) ((CharC < 7) ? 3 : CharC - 3));
Sd->mPTLen[Index++] = (UINT8) CharC;
-
+
//
- // For Code&Len Set,
+ // For Code&Len Set,
// After the third length of the code length concatenation,
- // a 2-bit value is used to indicated the number of consecutive
+ // a 2-bit value is used to indicated the number of consecutive
// zero lengths after the third length.
//
if (Index == Special) {
@@ -392,7 +392,7 @@ ReadPTLen (
while (Index < nn && Index < NPT) {
Sd->mPTLen[Index++] = 0;
}
-
+
return MakeTable (Sd, nn, Sd->mPTLen, 8, Sd->mPTTable);
}
@@ -504,7 +504,7 @@ DecodeC (
//
// Starting a new block
// Read BlockSize from block header
- //
+ //
Sd->mBlockSize = (UINT16) GetBits (Sd, 16);
//
@@ -581,7 +581,7 @@ Decode (
for (;;) {
//
// Get one code from mBitBuf
- //
+ //
CharC = DecodeC (Sd);
if (Sd->mBadTableFlag != 0) {
goto Done;
@@ -605,7 +605,7 @@ Decode (
// Process a Pointer
//
CharC = (UINT16) (CharC - (BIT8 - THRESHOLD));
-
+
//
// Get string length
//
@@ -636,18 +636,18 @@ Done:
}
/**
- Given a compressed source buffer, this function retrieves the size of
- the uncompressed buffer and the size of the scratch buffer required
+ Given a compressed source buffer, this function retrieves the size of
+ the uncompressed buffer and the size of the scratch buffer required
to decompress the compressed source buffer.
- Retrieves the size of the uncompressed buffer and the temporary scratch buffer
+ Retrieves the size of the uncompressed buffer and the temporary scratch buffer
required to decompress the buffer specified by Source and SourceSize.
If the size of the uncompressed buffer or the size of the scratch buffer cannot
- be determined from the compressed data specified by Source and SourceData,
+ be determined from the compressed data specified by Source and SourceData,
then RETURN_INVALID_PARAMETER is returned. Otherwise, the size of the uncompressed
buffer is returned in DestinationSize, the size of the scratch buffer is returned
in ScratchSize, and RETURN_SUCCESS is returned.
- This function does not have scratch buffer available to perform a thorough
+ This function does not have scratch buffer available to perform a thorough
checking of the validity of the source data. It just retrieves the "Original Size"
field from the beginning bytes of the source data and output it as DestinationSize.
And ScratchSize is specific to the decompression implementation.
@@ -662,16 +662,16 @@ Done:
that will be generated when the compressed buffer specified
by Source and SourceSize is decompressed.
@param ScratchSize A pointer to the size, in bytes, of the scratch buffer that
- is required to decompress the compressed buffer specified
+ is required to decompress the compressed buffer specified
by Source and SourceSize.
- @retval RETURN_SUCCESS The size of the uncompressed data was returned
- in DestinationSize, and the size of the scratch
+ @retval RETURN_SUCCESS The size of the uncompressed data was returned
+ in DestinationSize, and the size of the scratch
buffer was returned in ScratchSize.
- @retval RETURN_INVALID_PARAMETER
- The size of the uncompressed data or the size of
- the scratch buffer cannot be determined from
- the compressed data specified by Source
+ @retval RETURN_INVALID_PARAMETER
+ The size of the uncompressed data or the size of
+ the scratch buffer cannot be determined from
+ the compressed data specified by Source
and SourceSize.
**/
RETURN_STATUS
@@ -710,10 +710,10 @@ UefiDecompressGetInfo (
Extracts decompressed data to its original form.
This function is designed so that the decompression algorithm can be implemented
without using any memory services. As a result, this function is not allowed to
- call any memory allocation services in its implementation. It is the caller's
+ call any memory allocation services in its implementation. It is the caller's
responsibility to allocate and free the Destination and Scratch buffers.
- If the compressed source data specified by Source is successfully decompressed
- into Destination, then RETURN_SUCCESS is returned. If the compressed source data
+ If the compressed source data specified by Source is successfully decompressed
+ into Destination, then RETURN_SUCCESS is returned. If the compressed source data
specified by Source is not in a valid compressed data format,
then RETURN_INVALID_PARAMETER is returned.
@@ -724,13 +724,13 @@ UefiDecompressGetInfo (
@param Source The source buffer containing the compressed data.
@param Destination The destination buffer to store the decompressed data.
@param Scratch A temporary scratch buffer that is used to perform the decompression.
- This is an optional parameter that may be NULL if the
+ This is an optional parameter that may be NULL if the
required scratch buffer size is 0.
-
- @retval RETURN_SUCCESS Decompression completed successfully, and
+
+ @retval RETURN_SUCCESS Decompression completed successfully, and
the uncompressed buffer is returned in Destination.
- @retval RETURN_INVALID_PARAMETER
- The source buffer specified by Source is corrupted
+ @retval RETURN_INVALID_PARAMETER
+ The source buffer specified by Source is corrupted
(not in a valid compressed format).
**/
RETURN_STATUS
diff --git a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
index 36d7a240c1..e6496ee570 100644
--- a/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
+++ b/MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
@@ -1,7 +1,7 @@
## @file
# UEFI Decompress Library implementation.
#
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -20,7 +20,7 @@
FILE_GUID = 9ae5147d-b240-467f-a484-b024fdc42ee0
MODULE_TYPE = BASE
VERSION_STRING = 1.0
- LIBRARY_CLASS = UefiDecompressLib
+ LIBRARY_CLASS = UefiDecompressLib
#