The R Project SVN R

Rev

Rev 49813 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 49813 Rev 53508
Line 180... Line 180...
180
		if (coder->pos < coder->block_options.header_size)
180
		if (coder->pos < coder->block_options.header_size)
181
			return LZMA_OK;
181
			return LZMA_OK;
182
 
182
 
183
		coder->pos = 0;
183
		coder->pos = 0;
184
 
184
 
-
 
185
		// Version 0 is currently the only possible version.
-
 
186
		coder->block_options.version = 0;
-
 
187
 
185
		// Set up a buffer to hold the filter chain. Block Header
188
		// Set up a buffer to hold the filter chain. Block Header
186
		// decoder will initialize all members of this array so
189
		// decoder will initialize all members of this array so
187
		// we don't need to do it here.
190
		// we don't need to do it here.
188
		lzma_filter filters[LZMA_FILTERS_MAX + 1];
191
		lzma_filter filters[LZMA_FILTERS_MAX + 1];
189
		coder->block_options.filters = filters;
192
		coder->block_options.filters = filters;
Line 356... Line 359...
356
	default:
359
	default:
357
		assert(0);
360
		assert(0);
358
		return LZMA_PROG_ERROR;
361
		return LZMA_PROG_ERROR;
359
	}
362
	}
360
 
363
 
361
	return LZMA_OK;
364
	// Never reached
362
}
365
}
363
 
366
 
364
 
367
 
365
static void
368
static void
366
stream_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
369
stream_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
Line 381... Line 384...
381
 
384
 
382
static lzma_ret
385
static lzma_ret
383
stream_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
386
stream_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
384
		uint64_t *old_memlimit, uint64_t new_memlimit)
387
		uint64_t *old_memlimit, uint64_t new_memlimit)
385
{
388
{
386
	if (new_memlimit != 0 && new_memlimit < coder->memusage)
-
 
387
		return LZMA_MEMLIMIT_ERROR;
-
 
388
 
-
 
389
	*memusage = coder->memusage;
389
	*memusage = coder->memusage;
390
	*old_memlimit = coder->memlimit;
390
	*old_memlimit = coder->memlimit;
-
 
391
 
-
 
392
	if (new_memlimit != 0) {
-
 
393
		if (new_memlimit < coder->memusage)
-
 
394
			return LZMA_MEMLIMIT_ERROR;
-
 
395
 
391
	coder->memlimit = new_memlimit;
396
		coder->memlimit = new_memlimit;
-
 
397
	}
392
 
398
 
393
	return LZMA_OK;
399
	return LZMA_OK;
394
}
400
}
395
 
401
 
396
 
402