aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/api/lzma/index.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-02-02 20:14:03 +0200
committerLasse Collin <lasse.collin@tukaani.org>2009-02-02 20:14:03 +0200
commit22a0c6dd940b78cdac2f4a4b4b0e7cc0ac15021f (patch)
tree0e99fcc4cf336731fb52e3b028a0ecccbbbe1673 /src/liblzma/api/lzma/index.h
parentFix a bug in lzma_block_buffer_decode(), although this (diff)
downloadxz-22a0c6dd940b78cdac2f4a4b4b0e7cc0ac15021f.tar.xz
Modify LZMA_API macro so that it works on Windows with
other compilers than MinGW. This may hurt readability of the API headers slightly, but I don't know any better way to do this.
Diffstat (limited to '')
-rw-r--r--src/liblzma/api/lzma/index.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/liblzma/api/lzma/index.h b/src/liblzma/api/lzma/index.h
index 66255400..eb9aa87d 100644
--- a/src/liblzma/api/lzma/index.h
+++ b/src/liblzma/api/lzma/index.h
@@ -84,7 +84,7 @@ typedef struct {
* If you want to know how much memory an existing lzma_index structure is
* using, use lzma_index_memusage(lzma_index_count(i)).
*/
-extern LZMA_API uint64_t lzma_index_memusage(lzma_vli record_count);
+extern LZMA_API(uint64_t) lzma_index_memusage(lzma_vli record_count);
/**
@@ -97,7 +97,7 @@ extern LZMA_API uint64_t lzma_index_memusage(lzma_vli record_count);
* In this case, return value cannot be NULL or a different pointer than
* the i that was given as an argument.
*/
-extern LZMA_API lzma_index *lzma_index_init(
+extern LZMA_API(lzma_index *) lzma_index_init(
lzma_index *i, lzma_allocator *allocator)
lzma_attr_warn_unused_result;
@@ -107,7 +107,7 @@ extern LZMA_API lzma_index *lzma_index_init(
*
* If i is NULL, this does nothing.
*/
-extern LZMA_API void lzma_index_end(lzma_index *i, lzma_allocator *allocator);
+extern LZMA_API(void) lzma_index_end(lzma_index *i, lzma_allocator *allocator);
/**
@@ -131,7 +131,7 @@ extern LZMA_API void lzma_index_end(lzma_index *i, lzma_allocator *allocator);
* Stream or size of the Index field would grow too big.
* - LZMA_PROG_ERROR
*/
-extern LZMA_API lzma_ret lzma_index_append(
+extern LZMA_API(lzma_ret) lzma_index_append(
lzma_index *i, lzma_allocator *allocator,
lzma_vli unpadded_size, lzma_vli uncompressed_size)
lzma_attr_warn_unused_result;
@@ -140,7 +140,7 @@ extern LZMA_API lzma_ret lzma_index_append(
/**
* \brief Get the number of Records
*/
-extern LZMA_API lzma_vli lzma_index_count(const lzma_index *i) lzma_attr_pure;
+extern LZMA_API(lzma_vli) lzma_index_count(const lzma_index *i) lzma_attr_pure;
/**
@@ -148,7 +148,7 @@ extern LZMA_API lzma_vli lzma_index_count(const lzma_index *i) lzma_attr_pure;
*
* This is needed to verify the Backward Size field in the Stream Footer.
*/
-extern LZMA_API lzma_vli lzma_index_size(const lzma_index *i) lzma_attr_pure;
+extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i) lzma_attr_pure;
/**
@@ -157,7 +157,7 @@ extern LZMA_API lzma_vli lzma_index_size(const lzma_index *i) lzma_attr_pure;
* This doesn't include the Stream Header, Stream Footer, Stream Padding,
* or Index fields.
*/
-extern LZMA_API lzma_vli lzma_index_total_size(const lzma_index *i)
+extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
lzma_attr_pure;
@@ -167,7 +167,7 @@ extern LZMA_API lzma_vli lzma_index_total_size(const lzma_index *i)
* If multiple Indexes have been combined, this works as if the Blocks
* were in a single Stream.
*/
-extern LZMA_API lzma_vli lzma_index_stream_size(const lzma_index *i)
+extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
lzma_attr_pure;
@@ -179,21 +179,21 @@ extern LZMA_API lzma_vli lzma_index_stream_size(const lzma_index *i)
* combined, this includes also the headers of each separate Stream and the
* possible Stream Padding fields.
*/
-extern LZMA_API lzma_vli lzma_index_file_size(const lzma_index *i)
+extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i)
lzma_attr_pure;
/**
* \brief Get the uncompressed size of the Stream
*/
-extern LZMA_API lzma_vli lzma_index_uncompressed_size(const lzma_index *i)
+extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
lzma_attr_pure;
/**
* \brief Get the next Record from the Index
*/
-extern LZMA_API lzma_bool lzma_index_read(
+extern LZMA_API(lzma_bool) lzma_index_read(
lzma_index *i, lzma_index_record *record)
lzma_attr_warn_unused_result;
@@ -204,7 +204,7 @@ extern LZMA_API lzma_bool lzma_index_read(
* Rewind the Index so that next call to lzma_index_read() will return the
* first Record.
*/
-extern LZMA_API void lzma_index_rewind(lzma_index *i);
+extern LZMA_API(void) lzma_index_rewind(lzma_index *i);
/**
@@ -229,7 +229,7 @@ extern LZMA_API void lzma_index_rewind(lzma_index *i);
* If target is greater than the uncompressed size of the Stream, *record
* and the read position are not modified, and this function returns true.
*/
-extern LZMA_API lzma_bool lzma_index_locate(
+extern LZMA_API(lzma_bool) lzma_index_locate(
lzma_index *i, lzma_index_record *record, lzma_vli target)
lzma_attr_warn_unused_result;
@@ -254,7 +254,7 @@ extern LZMA_API lzma_bool lzma_index_locate(
* - LZMA_MEM_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API lzma_ret lzma_index_cat(lzma_index *lzma_restrict dest,
+extern LZMA_API(lzma_ret) lzma_index_cat(lzma_index *lzma_restrict dest,
lzma_index *lzma_restrict src,
lzma_allocator *allocator, lzma_vli padding)
lzma_attr_warn_unused_result;
@@ -267,7 +267,7 @@ extern LZMA_API lzma_ret lzma_index_cat(lzma_index *lzma_restrict dest,
*
* \return A copy of the Index, or NULL if memory allocation failed.
*/
-extern LZMA_API lzma_index *lzma_index_dup(
+extern LZMA_API(lzma_index *) lzma_index_dup(
const lzma_index *i, lzma_allocator *allocator)
lzma_attr_warn_unused_result;
@@ -277,7 +277,7 @@ extern LZMA_API lzma_index *lzma_index_dup(
*
* \return True if *a and *b are equal, false otherwise.
*/
-extern LZMA_API lzma_bool lzma_index_equal(
+extern LZMA_API(lzma_bool) lzma_index_equal(
const lzma_index *a, const lzma_index *b)
lzma_attr_pure;
@@ -296,7 +296,7 @@ extern LZMA_API lzma_bool lzma_index_equal(
* - LZMA_MEM_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API lzma_ret lzma_index_encoder(lzma_stream *strm, lzma_index *i)
+extern LZMA_API(lzma_ret) lzma_index_encoder(lzma_stream *strm, lzma_index *i)
lzma_attr_warn_unused_result;
@@ -326,7 +326,7 @@ extern LZMA_API lzma_ret lzma_index_encoder(lzma_stream *strm, lzma_index *i)
* limit is modified after decoding a part of the Index already,
* the new limit may be ignored.
*/
-extern LZMA_API lzma_ret lzma_index_decoder(
+extern LZMA_API(lzma_ret) lzma_index_decoder(
lzma_stream *strm, lzma_index **i, uint64_t memlimit)
lzma_attr_warn_unused_result;
@@ -352,7 +352,7 @@ extern LZMA_API lzma_ret lzma_index_decoder(
* \note This function doesn't take allocator argument since all
* the internal data is allocated on stack.
*/
-extern LZMA_API lzma_ret lzma_index_buffer_encode(lzma_index *i,
+extern LZMA_API(lzma_ret) lzma_index_buffer_encode(lzma_index *i,
uint8_t *out, size_t *out_pos, size_t out_size);
@@ -383,6 +383,6 @@ extern LZMA_API lzma_ret lzma_index_buffer_encode(lzma_index *i,
* - LZMA_DATA_ERROR
* - LZMA_PROG_ERROR
*/
-extern LZMA_API lzma_ret lzma_index_buffer_decode(
+extern LZMA_API(lzma_ret) lzma_index_buffer_decode(
lzma_index **i, uint64_t *memlimit, lzma_allocator *allocator,
const uint8_t *in, size_t *in_pos, size_t in_size);