diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2013-10-02 12:55:11 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2013-10-02 12:55:11 +0300 |
commit | 97bb38712f414fabecca908af2e38a12570293fd (patch) | |
tree | cc16ca60363416ceacb18d955bae9105f3b0a8ee /src/liblzma/common/common.h | |
parent | liblzma: Add block_buffer_encoder.h into Makefile.inc. (diff) | |
download | xz-97bb38712f414fabecca908af2e38a12570293fd.tar.xz |
liblzma: Add LZMA_FULL_BARRIER support to single-threaded encoder.
In the single-threaded encoder LZMA_FULL_BARRIER is simply
an alias for LZMA_FULL_FLUSH.
Diffstat (limited to 'src/liblzma/common/common.h')
-rw-r--r-- | src/liblzma/common/common.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h index b71254d0..42d27d83 100644 --- a/src/liblzma/common/common.h +++ b/src/liblzma/common/common.h @@ -78,6 +78,10 @@ | LZMA_CONCATENATED ) +/// Largest valid lzma_action value as unsigned integer. +#define LZMA_ACTION_MAX ((unsigned int)(LZMA_FULL_BARRIER)) + + /// Special return value (lzma_ret) to indicate that a timeout was reached /// and lzma_code() must not return LZMA_BUF_ERROR. This is converted to /// LZMA_OK in lzma_code(). This is not in the lzma_ret enumeration because @@ -207,6 +211,7 @@ struct lzma_internal_s { ISEQ_SYNC_FLUSH, ISEQ_FULL_FLUSH, ISEQ_FINISH, + ISEQ_FULL_BARRIER, ISEQ_END, ISEQ_ERROR, } sequence; @@ -217,7 +222,7 @@ struct lzma_internal_s { size_t avail_in; /// Indicates which lzma_action values are allowed by next.code. - bool supported_actions[4]; + bool supported_actions[LZMA_ACTION_MAX + 1]; /// If true, lzma_code will return LZMA_BUF_ERROR if no progress was /// made (no input consumed and no output produced by next.code). |