summaryrefslogtreecommitdiff
path: root/util/cbfstool/lzma/lzma.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/lzma/lzma.c')
-rw-r--r--util/cbfstool/lzma/lzma.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/cbfstool/lzma/lzma.c b/util/cbfstool/lzma/lzma.c
index f889946690..5eebc7e60c 100644
--- a/util/cbfstool/lzma/lzma.c
+++ b/util/cbfstool/lzma/lzma.c
@@ -57,17 +57,17 @@ static void SzFree(void *unused, void *address)
free(address);
}
-static ISzAlloc LZMAalloc = { SzAlloc, SzFree };
+static struct ISzAlloc LZMAalloc = { SzAlloc, SzFree };
/* Streaming API */
-typedef struct {
+struct vector_t {
char *p;
size_t pos;
size_t size;
-} vector_t;
+};
-static vector_t instream, outstream;
+static struct vector_t instream, outstream;
static SRes Read(void *unused, void *buf, size_t *size)
{
@@ -87,8 +87,8 @@ static size_t Write(void *unused, const void *buf, size_t size)
return size;
}
-static ISeqInStream is = { Read };
-static ISeqOutStream os = { Write };
+static struct ISeqInStream is = { Read };
+static struct ISeqOutStream os = { Write };
/**
* Compress a buffer with lzma
@@ -106,7 +106,7 @@ void do_lzma_compress(char *in, int in_len, char *out, int *out_len)
return;
}
- CLzmaEncProps props;
+ struct CLzmaEncProps props;
LzmaEncProps_Init(&props);
props.dictSize = in_len;
props.pb = 0; /* PosStateBits, default: 2, range: 0..4 */
@@ -181,7 +181,7 @@ void do_lzma_uncompress(char *dst, int dst_len, char *src, int src_len)
return;
}
- ELzmaStatus status;
+ enum ELzmaStatus status;
size_t destlen = out_sizemax;
size_t srclen = src_len - (LZMA_PROPS_SIZE + 8);