summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.h
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:54:02 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commit1436aea4d5707e672672a11bda72be2c63c936c3 (patch)
tree370c9d5bd8823aa8ea7bce71a0f29bff71feff67 /MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.h
parent7c7184e201a90a1d2376e615e55e3f4074731468 (diff)
downloadedk2-1436aea4d5707e672672a11bda72be2c63c936c3.tar.gz
edk2-1436aea4d5707e672672a11bda72be2c63c936c3.tar.bz2
edk2-1436aea4d5707e672672a11bda72be2c63c936c3.zip
MdeModulePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdeModulePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.h')
-rw-r--r--MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.h260
1 files changed, 179 insertions, 81 deletions
diff --git a/MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.h b/MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.h
index 61bb9dd302..923d3e3d95 100644
--- a/MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.h
+++ b/MdeModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/LzFind.h
@@ -10,77 +10,126 @@ EXTERN_C_BEGIN
typedef UInt32 CLzRef;
-typedef struct _CMatchFinder
-{
- Byte *buffer;
- UInt32 pos;
- UInt32 posLimit;
- UInt32 streamPos;
- UInt32 lenLimit;
-
- UInt32 cyclicBufferPos;
- UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */
-
- Byte streamEndWasReached;
- Byte btMode;
- Byte bigHash;
- Byte directInput;
-
- UInt32 matchMaxLen;
- CLzRef *hash;
- CLzRef *son;
- UInt32 hashMask;
- UInt32 cutValue;
-
- Byte *bufferBase;
- ISeqInStream *stream;
-
- UInt32 blockSize;
- UInt32 keepSizeBefore;
- UInt32 keepSizeAfter;
-
- UInt32 numHashBytes;
- size_t directInputRem;
- UInt32 historySize;
- UInt32 fixedHashSize;
- UInt32 hashSizeSum;
- SRes result;
- UInt32 crc[256];
- size_t numRefs;
-
- UInt64 expectedDataSize;
+typedef struct _CMatchFinder {
+ Byte *buffer;
+ UInt32 pos;
+ UInt32 posLimit;
+ UInt32 streamPos;
+ UInt32 lenLimit;
+
+ UInt32 cyclicBufferPos;
+ UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */
+
+ Byte streamEndWasReached;
+ Byte btMode;
+ Byte bigHash;
+ Byte directInput;
+
+ UInt32 matchMaxLen;
+ CLzRef *hash;
+ CLzRef *son;
+ UInt32 hashMask;
+ UInt32 cutValue;
+
+ Byte *bufferBase;
+ ISeqInStream *stream;
+
+ UInt32 blockSize;
+ UInt32 keepSizeBefore;
+ UInt32 keepSizeAfter;
+
+ UInt32 numHashBytes;
+ size_t directInputRem;
+ UInt32 historySize;
+ UInt32 fixedHashSize;
+ UInt32 hashSizeSum;
+ SRes result;
+ UInt32 crc[256];
+ size_t numRefs;
+
+ UInt64 expectedDataSize;
} CMatchFinder;
-#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer)
+#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer)
-#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos)
+#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos)
#define Inline_MatchFinder_IsFinishedOK(p) \
((p)->streamEndWasReached \
&& (p)->streamPos == (p)->pos \
&& (!(p)->directInput || (p)->directInputRem == 0))
-int MatchFinder_NeedMove(CMatchFinder *p);
-Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p);
-void MatchFinder_MoveBlock(CMatchFinder *p);
-void MatchFinder_ReadIfRequired(CMatchFinder *p);
+int
+MatchFinder_NeedMove (
+ CMatchFinder *p
+ );
-void MatchFinder_Construct(CMatchFinder *p);
+Byte *
+MatchFinder_GetPointerToCurrentPos (
+ CMatchFinder *p
+ );
+
+void
+MatchFinder_MoveBlock (
+ CMatchFinder *p
+ );
+
+void
+MatchFinder_ReadIfRequired (
+ CMatchFinder *p
+ );
+
+void
+MatchFinder_Construct (
+ CMatchFinder *p
+ );
/* Conditions:
historySize <= 3 GB
keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB
*/
-int MatchFinder_Create(CMatchFinder *p, UInt32 historySize,
- UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter,
- ISzAllocPtr alloc);
-void MatchFinder_Free(CMatchFinder *p, ISzAllocPtr alloc);
-void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, size_t numItems);
-void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue);
-
-UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son,
- UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue,
- UInt32 *distances, UInt32 maxLen);
+int
+MatchFinder_Create (
+ CMatchFinder *p,
+ UInt32 historySize,
+ UInt32 keepAddBufferBefore,
+ UInt32 matchMaxLen,
+ UInt32 keepAddBufferAfter,
+ ISzAllocPtr alloc
+ );
+
+void
+MatchFinder_Free (
+ CMatchFinder *p,
+ ISzAllocPtr alloc
+ );
+
+void
+MatchFinder_Normalize3 (
+ UInt32 subValue,
+ CLzRef *items,
+ size_t numItems
+ );
+
+void
+MatchFinder_ReduceOffsets (
+ CMatchFinder *p,
+ UInt32 subValue
+ );
+
+UInt32 *
+GetMatchesSpec1 (
+ UInt32 lenLimit,
+ UInt32 curMatch,
+ UInt32 pos,
+ const Byte *buffer,
+ CLzRef *son,
+ UInt32 _cyclicBufferPos,
+ UInt32 _cyclicBufferSize,
+ UInt32 _cutValue,
+ UInt32 *distances,
+ UInt32 maxLen
+ );
/*
Conditions:
@@ -88,33 +137,82 @@ Conditions:
Mf_GetPointerToCurrentPos_Func's result must be used only before any other function
*/
-typedef void (*Mf_Init_Func)(void *object);
-typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object);
-typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object);
-typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances);
-typedef void (*Mf_Skip_Func)(void *object, UInt32);
-
-typedef struct _IMatchFinder
-{
- Mf_Init_Func Init;
- Mf_GetNumAvailableBytes_Func GetNumAvailableBytes;
- Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos;
- Mf_GetMatches_Func GetMatches;
- Mf_Skip_Func Skip;
+typedef void (*Mf_Init_Func)(
+ void *object
+ );
+typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(
+ void *object
+ );
+typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(
+ void *object
+ );
+typedef UInt32 (*Mf_GetMatches_Func)(
+ void *object,
+ UInt32 *distances
+ );
+typedef void (*Mf_Skip_Func)(
+ void *object,
+ UInt32
+ );
+
+typedef struct _IMatchFinder {
+ Mf_Init_Func Init;
+ Mf_GetNumAvailableBytes_Func GetNumAvailableBytes;
+ Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos;
+ Mf_GetMatches_Func GetMatches;
+ Mf_Skip_Func Skip;
} IMatchFinder;
-void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable);
-
-void MatchFinder_Init_LowHash(CMatchFinder *p);
-void MatchFinder_Init_HighHash(CMatchFinder *p);
-void MatchFinder_Init_3(CMatchFinder *p, int readData);
-void MatchFinder_Init(CMatchFinder *p);
-
-UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
-UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances);
-
-void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
-void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num);
+void
+MatchFinder_CreateVTable (
+ CMatchFinder *p,
+ IMatchFinder *vTable
+ );
+
+void
+MatchFinder_Init_LowHash (
+ CMatchFinder *p
+ );
+
+void
+MatchFinder_Init_HighHash (
+ CMatchFinder *p
+ );
+
+void
+MatchFinder_Init_3 (
+ CMatchFinder *p,
+ int readData
+ );
+
+void
+MatchFinder_Init (
+ CMatchFinder *p
+ );
+
+UInt32
+Bt3Zip_MatchFinder_GetMatches (
+ CMatchFinder *p,
+ UInt32 *distances
+ );
+
+UInt32
+Hc3Zip_MatchFinder_GetMatches (
+ CMatchFinder *p,
+ UInt32 *distances
+ );
+
+void
+Bt3Zip_MatchFinder_Skip (
+ CMatchFinder *p,
+ UInt32 num
+ );
+
+void
+Hc3Zip_MatchFinder_Skip (
+ CMatchFinder *p,
+ UInt32 num
+ );
EXTERN_C_END