diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2021-09-05 20:38:12 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2021-09-05 20:38:12 +0300 |
commit | d267d109c370a40b502e73f8664b154b15e4f253 (patch) | |
tree | 0159c362319f4c47d309b8ed09db97998ddbf02d /src/liblzma/common/microlzma_encoder.c | |
parent | xzdiff: Update the man page about the exit status. (diff) | |
download | xz-d267d109c370a40b502e73f8664b154b15e4f253.tar.xz |
liblzma: Rename EROFS LZMA to MicroLZMA.
It still exists primarily for EROFS but MicroLZMA is
a more generic name (that hopefully doesn't clash with
something that already exists).
Diffstat (limited to '')
-rw-r--r-- | src/liblzma/common/microlzma_encoder.c (renamed from src/liblzma/common/erofs_encoder.c) | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/liblzma/common/erofs_encoder.c b/src/liblzma/common/microlzma_encoder.c index 4cdd08f1..072b500f 100644 --- a/src/liblzma/common/erofs_encoder.c +++ b/src/liblzma/common/microlzma_encoder.c @@ -1,7 +1,7 @@ /////////////////////////////////////////////////////////////////////////////// // -/// \file erofs_encoder.c -/// \brief Encode into EROFS LZMA format +/// \file microlzma_encoder.c +/// \brief Encode into MicroLZMA format // // Author: Lasse Collin // @@ -19,16 +19,16 @@ typedef struct { /// LZMA properties byte (lc/lp/pb) uint8_t props; -} lzma_erofs_coder; +} lzma_microlzma_coder; static lzma_ret -erofs_encode(void *coder_ptr, const lzma_allocator *allocator, +microlzma_encode(void *coder_ptr, const lzma_allocator *allocator, const uint8_t *restrict in, size_t *restrict in_pos, size_t in_size, uint8_t *restrict out, size_t *restrict out_pos, size_t out_size, lzma_action action) { - lzma_erofs_coder *coder = coder_ptr; + lzma_microlzma_coder *coder = coder_ptr; // Remember *out_pos so that we can overwrite the first byte with // the LZMA properties byte. @@ -80,9 +80,9 @@ erofs_encode(void *coder_ptr, const lzma_allocator *allocator, static void -erofs_encoder_end(void *coder_ptr, const lzma_allocator *allocator) +microlzma_encoder_end(void *coder_ptr, const lzma_allocator *allocator) { - lzma_erofs_coder *coder = coder_ptr; + lzma_microlzma_coder *coder = coder_ptr; lzma_next_end(&coder->lzma, allocator); lzma_free(coder, allocator); return; @@ -90,21 +90,21 @@ erofs_encoder_end(void *coder_ptr, const lzma_allocator *allocator) static lzma_ret -erofs_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, +microlzma_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, const lzma_options_lzma *options) { - lzma_next_coder_init(&erofs_encoder_init, next, allocator); + lzma_next_coder_init(µlzma_encoder_init, next, allocator); - lzma_erofs_coder *coder = next->coder; + lzma_microlzma_coder *coder = next->coder; if (coder == NULL) { - coder = lzma_alloc(sizeof(lzma_erofs_coder), allocator); + coder = lzma_alloc(sizeof(lzma_microlzma_coder), allocator); if (coder == NULL) return LZMA_MEM_ERROR; next->coder = coder; - next->code = &erofs_encode; - next->end = &erofs_encoder_end; + next->code = µlzma_encode; + next->end = µlzma_encoder_end; coder->lzma = LZMA_NEXT_CODER_INIT; } @@ -128,9 +128,9 @@ erofs_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator, extern LZMA_API(lzma_ret) -lzma_erofs_encoder(lzma_stream *strm, const lzma_options_lzma *options) +lzma_microlzma_encoder(lzma_stream *strm, const lzma_options_lzma *options) { - lzma_next_strm_init(erofs_encoder_init, strm, options); + lzma_next_strm_init(microlzma_encoder_init, strm, options); strm->internal->supported_actions[LZMA_FINISH] = true; |