aboutsummaryrefslogtreecommitdiff
path: root/src/lzma/process.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-10-02 22:51:46 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-10-02 22:51:46 +0300
commitbd137524f2f50e30ba054f42f1f6536cd3cee920 (patch)
treee28ca9e83380e9d7089d5dae4499df1967b5c064 /src/lzma/process.c
parentRenamed the test files from .lzma suffix to .xz suffix. (diff)
downloadxz-bd137524f2f50e30ba054f42f1f6536cd3cee920.tar.xz
Initial changes to change the suffix of the new format to .xz.
This also fixes a bug related to --suffix option. Some issues with suffixes with --format=raw were not fixed.
Diffstat (limited to 'src/lzma/process.c')
-rw-r--r--src/lzma/process.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/lzma/process.c b/src/lzma/process.c
index 46c27df6..fc4ef96a 100644
--- a/src/lzma/process.c
+++ b/src/lzma/process.c
@@ -155,19 +155,23 @@ single_init(thread_data *t)
lzma_ret ret = LZMA_PROG_ERROR;
if (opt_mode == MODE_COMPRESS) {
- switch (opt_header) {
- case HEADER_AUTO:
- case HEADER_NATIVE:
+ switch (opt_format) {
+ case FORMAT_AUTO:
+ // args.c ensures this.
+ assert(0);
+ break;
+
+ case FORMAT_XZ:
ret = lzma_stream_encoder(&t->strm,
opt_filters, opt_check);
break;
- case HEADER_ALONE:
+ case FORMAT_LZMA:
ret = lzma_alone_encoder(&t->strm,
opt_filters[0].options);
break;
- case HEADER_RAW:
+ case FORMAT_RAW:
ret = lzma_raw_encoder(&t->strm, opt_filters);
break;
}
@@ -175,20 +179,20 @@ single_init(thread_data *t)
const uint32_t flags = LZMA_TELL_UNSUPPORTED_CHECK
| LZMA_CONCATENATED;
- switch (opt_header) {
- case HEADER_AUTO:
+ switch (opt_format) {
+ case FORMAT_AUTO:
ret = lzma_auto_decoder(&t->strm, opt_memory, flags);
break;
- case HEADER_NATIVE:
+ case FORMAT_XZ:
ret = lzma_stream_decoder(&t->strm, opt_memory, flags);
break;
- case HEADER_ALONE:
+ case FORMAT_LZMA:
ret = lzma_alone_decoder(&t->strm, opt_memory);
break;
- case HEADER_RAW:
+ case FORMAT_RAW:
// Memory usage has already been checked in args.c.
ret = lzma_raw_decoder(&t->strm, opt_filters);
break;