aboutsummaryrefslogtreecommitdiff
path: root/util/cbfstool/lzma/C/LzmaEnc.h
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-01-27 20:57:54 -0600
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-01-29 20:06:26 +0100
commit9ad52fe56e8fbb1cd2e37795741773708b72eef3 (patch)
treee0a598de3af23d97add5eca164c2f60f6f55c47a /util/cbfstool/lzma/C/LzmaEnc.h
parent4a7b1152115e866cd3164bdd90d8b0ffa26a863b (diff)
cbfstool/lzma: Avoid use of typedef with structs and enums
When typedef is used with structs, enums, and to create new typenames, readability suffers. As such, restrict use of typedefs only to creating new data types. The 80 character limit is intentionally ignored in this patch in order to make reviewing easier. Change-Id: I62660b19bccf234128930a047c754bce3ebb6cf8 Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/5070 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'util/cbfstool/lzma/C/LzmaEnc.h')
-rw-r--r--util/cbfstool/lzma/C/LzmaEnc.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/util/cbfstool/lzma/C/LzmaEnc.h b/util/cbfstool/lzma/C/LzmaEnc.h
index 376baf2b38..e62bdb33f4 100644
--- a/util/cbfstool/lzma/C/LzmaEnc.h
+++ b/util/cbfstool/lzma/C/LzmaEnc.h
@@ -8,7 +8,7 @@
#define LZMA_PROPS_SIZE 5
-typedef struct _CLzmaEncProps
+struct CLzmaEncProps
{
int level; /* 0 <= level <= 9 */
uint32_t dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version
@@ -24,11 +24,11 @@ typedef struct _CLzmaEncProps
uint32_t mc; /* 1 <= mc <= (1 << 30), default = 32 */
unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */
int numThreads; /* 1 or 2, default = 2 */
-} CLzmaEncProps;
+};
-void LzmaEncProps_Init(CLzmaEncProps *p);
-void LzmaEncProps_Normalize(CLzmaEncProps *p);
-uint32_t LzmaEncProps_GetDictSize(const CLzmaEncProps *props2);
+void LzmaEncProps_Init(struct CLzmaEncProps *p);
+void LzmaEncProps_Normalize(struct CLzmaEncProps *p);
+uint32_t LzmaEncProps_GetDictSize(const struct CLzmaEncProps *props2);
/* ---------- CLzmaEncHandle Interface ---------- */
@@ -45,14 +45,14 @@ Returns:
typedef void * CLzmaEncHandle;
-CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc);
-void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig);
-SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props);
+CLzmaEncHandle LzmaEnc_Create(struct ISzAlloc *alloc);
+void LzmaEnc_Destroy(CLzmaEncHandle p, struct ISzAlloc *alloc, struct ISzAlloc *allocBig);
+SRes LzmaEnc_SetProps(CLzmaEncHandle p, const struct CLzmaEncProps *props);
SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, uint8_t *properties, size_t *size);
-SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream,
- ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
+SRes LzmaEnc_Encode(CLzmaEncHandle p, struct ISeqOutStream *outStream, struct ISeqInStream *inStream,
+ struct ICompressProgress *progress, struct ISzAlloc *alloc, struct ISzAlloc *allocBig);
SRes LzmaEnc_MemEncode(CLzmaEncHandle p, uint8_t *dest, size_t *destLen, const uint8_t *src, size_t srcLen,
- int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
+ int writeEndMark, struct ICompressProgress *progress, struct ISzAlloc *alloc, struct ISzAlloc *allocBig);
/* ---------- One Call Interface ---------- */
@@ -66,7 +66,7 @@ Return code:
*/
SRes LzmaEncode(uint8_t *dest, size_t *destLen, const uint8_t *src, size_t srcLen,
- const CLzmaEncProps *props, uint8_t *propsEncoded, size_t *propsSize, int writeEndMark,
- ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
+ const struct CLzmaEncProps *props, uint8_t *propsEncoded, size_t *propsSize, int writeEndMark,
+ struct ICompressProgress *progress, struct ISzAlloc *alloc, struct ISzAlloc *allocBig);
#endif