From 1b4675cebf7471f7cc9b7072c950e3de97147063 Mon Sep 17 00:00:00 2001
From: Lasse Collin <lasse.collin@tukaani.org>
Date: Mon, 24 Jun 2019 23:25:41 +0300
Subject: Add LZMA_RET_INTERNAL1..8 to lzma_ret and use one for LZMA_TIMED_OUT.

LZMA_TIMED_OUT is *internally* used as a value for lzma_ret
enumeration. Previously it was #defined to 32 and cast to lzma_ret.
That way it wasn't visible in the public API, but this was hackish.

Now the public API has eight LZMA_RET_INTERNALx members and
LZMA_TIMED_OUT is #defined to LZMA_RET_INTERNAL1. This way
the code is cleaner overall although the public API has a few
extra mysterious enum members.
---
 src/liblzma/api/lzma/base.h | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

(limited to 'src/liblzma/api')

diff --git a/src/liblzma/api/lzma/base.h b/src/liblzma/api/lzma/base.h
index 566247a1..228e8ec4 100644
--- a/src/liblzma/api/lzma/base.h
+++ b/src/liblzma/api/lzma/base.h
@@ -235,7 +235,7 @@ typedef enum {
 		 * how to report bugs.
 		 */
 
-	LZMA_SEEK_NEEDED        = 12
+	LZMA_SEEK_NEEDED        = 12,
 		/**<
 		 * \brief       Request to change the input file position
 		 *
@@ -251,6 +251,19 @@ typedef enum {
 		 * After seeking the application should read new input and
 		 * pass it normally via lzma_stream.next_in and .avail_in.
 		 */
+
+	/*
+	 * These eumerations may be used internally by liblzma
+	 * but they will never be returned to applications.
+	 */
+	LZMA_RET_INTERNAL1      = 101,
+	LZMA_RET_INTERNAL2      = 102,
+	LZMA_RET_INTERNAL3      = 103,
+	LZMA_RET_INTERNAL4      = 104,
+	LZMA_RET_INTERNAL5      = 105,
+	LZMA_RET_INTERNAL6      = 106,
+	LZMA_RET_INTERNAL7      = 107,
+	LZMA_RET_INTERNAL8      = 108
 } lzma_ret;
 
 
-- 
cgit v1.2.3