initialize a memory-decode context
| 823 | |
| 824 | // initialize a memory-decode context |
| 825 | static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len) |
| 826 | { |
| 827 | s->io.read = NULL; |
| 828 | s->read_from_callbacks = 0; |
| 829 | s->callback_already_read = 0; |
| 830 | s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer; |
| 831 | s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len; |
| 832 | } |
| 833 | |
| 834 | // initialize a callback-based context |
| 835 | static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user) |
no outgoing calls
no test coverage detected