mirror of
https://github.com/google/brotli.git
synced 2024-11-22 11:40:06 +00:00
Merge pull request #241 from rockdaboot/master
Fix a few prototypes/declarations in decoder
This commit is contained in:
commit
7a14e58d73
13
dec/decode.c
13
dec/decode.c
@ -762,8 +762,8 @@ static void DecodeBlockTypeWithContext(BrotliState* s,
|
||||
s->context_lookup2 = &kContextLookup[kContextLookupOffsets[context_mode + 1]];
|
||||
}
|
||||
|
||||
BrotliResult WriteRingBuffer(BrotliOutput output,
|
||||
BrotliState* s) {
|
||||
static BrotliResult WriteRingBuffer(BrotliOutput output,
|
||||
BrotliState* s) {
|
||||
int num_written;
|
||||
if (s->meta_block_remaining_len < 0) {
|
||||
return BROTLI_FAILURE();
|
||||
@ -784,9 +784,8 @@ BrotliResult WriteRingBuffer(BrotliOutput output,
|
||||
return BROTLI_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
BrotliResult BROTLI_NOINLINE CopyUncompressedBlockToOutput(BrotliOutput output,
|
||||
int pos,
|
||||
BrotliState* s) {
|
||||
static BrotliResult BROTLI_NOINLINE CopyUncompressedBlockToOutput(
|
||||
BrotliOutput output, int pos, BrotliState* s) {
|
||||
BrotliResult result;
|
||||
int num_read;
|
||||
int nbytes;
|
||||
@ -918,8 +917,8 @@ int BrotliDecompressedSize(size_t encoded_size,
|
||||
processed. When this method is called, metablock size and flags MUST be
|
||||
decoded.
|
||||
*/
|
||||
int BROTLI_NOINLINE BrotliAllocateRingBuffer(BrotliState* s,
|
||||
BrotliBitReader* br) {
|
||||
static int BROTLI_NOINLINE BrotliAllocateRingBuffer(BrotliState* s,
|
||||
BrotliBitReader* br) {
|
||||
static const int kRingBufferWriteAheadSlack = BROTLI_READ_SIZE;
|
||||
int is_last = s->is_last_metablock;
|
||||
s->ringbuffer_size = 1 << s->window_bits;
|
||||
|
@ -99,7 +99,7 @@ int BrotliNullOutputFunction(void* data , const uint8_t* buf, size_t count) {
|
||||
return (int)count;
|
||||
}
|
||||
|
||||
BrotliOutput BrotliNullOutput() {
|
||||
BrotliOutput BrotliNullOutput(void) {
|
||||
BrotliOutput out;
|
||||
out.cb_ = BrotliNullOutputFunction;
|
||||
out.data_ = NULL;
|
||||
|
@ -95,7 +95,7 @@ BrotliOutput BrotliFileOutput(FILE* f);
|
||||
|
||||
/* Output callback that does nothing, always consumes the whole input. */
|
||||
int BrotliNullOutputFunction(void* data, const uint8_t* buf, size_t count);
|
||||
BrotliOutput BrotliNullOutput();
|
||||
BrotliOutput BrotliNullOutput(void);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
} /* extern "C" */
|
||||
|
Loading…
Reference in New Issue
Block a user