OLD | NEW |
1 /////////////////////////////////////////////////////////////////////////////// | 1 /////////////////////////////////////////////////////////////////////////////// |
2 // | 2 // |
3 /// \file simple_coder.c | 3 /// \file simple_coder.c |
4 /// \brief Wrapper for simple filters | 4 /// \brief Wrapper for simple filters |
5 /// | 5 /// |
6 /// Simple filters don't change the size of the data i.e. number of bytes | 6 /// Simple filters don't change the size of the data i.e. number of bytes |
7 /// in equals the number of bytes out. | 7 /// in equals the number of bytes out. |
8 // | 8 // |
9 // Author: Lasse Collin | 9 // Author: Lasse Collin |
10 // | 10 // |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 { | 205 { |
206 lzma_next_end(&coder->next, allocator); | 206 lzma_next_end(&coder->next, allocator); |
207 lzma_free(coder->simple, allocator); | 207 lzma_free(coder->simple, allocator); |
208 lzma_free(coder, allocator); | 208 lzma_free(coder, allocator); |
209 return; | 209 return; |
210 } | 210 } |
211 | 211 |
212 | 212 |
213 static lzma_ret | 213 static lzma_ret |
214 simple_coder_update(lzma_coder *coder, lzma_allocator *allocator, | 214 simple_coder_update(lzma_coder *coder, lzma_allocator *allocator, |
215 » » const lzma_filter *filters_null lzma_attribute((unused)), | 215 » » const lzma_filter *filters_null lzma_attribute((__unused__)), |
216 const lzma_filter *reversed_filters) | 216 const lzma_filter *reversed_filters) |
217 { | 217 { |
218 // No update support, just call the next filter in the chain. | 218 // No update support, just call the next filter in the chain. |
219 return lzma_next_filter_update( | 219 return lzma_next_filter_update( |
220 &coder->next, allocator, reversed_filters + 1); | 220 &coder->next, allocator, reversed_filters + 1); |
221 } | 221 } |
222 | 222 |
223 | 223 |
224 extern lzma_ret | 224 extern lzma_ret |
225 lzma_simple_coder_init(lzma_next_coder *next, lzma_allocator *allocator, | 225 lzma_simple_coder_init(lzma_next_coder *next, lzma_allocator *allocator, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 // Reset variables. | 271 // Reset variables. |
272 next->coder->is_encoder = is_encoder; | 272 next->coder->is_encoder = is_encoder; |
273 next->coder->end_was_reached = false; | 273 next->coder->end_was_reached = false; |
274 next->coder->pos = 0; | 274 next->coder->pos = 0; |
275 next->coder->filtered = 0; | 275 next->coder->filtered = 0; |
276 next->coder->size = 0; | 276 next->coder->size = 0; |
277 | 277 |
278 return lzma_next_filter_init( | 278 return lzma_next_filter_init( |
279 &next->coder->next, allocator, filters + 1); | 279 &next->coder->next, allocator, filters + 1); |
280 } | 280 } |
OLD | NEW |