initialize a memory-decode context
| 845 | |
| 846 | // initialize a memory-decode context |
| 847 | static void stbi__start_mem(stbi__context* s, stbi_uc const* buffer, int len) { |
| 848 | s->io.read = NULL; |
| 849 | s->read_from_callbacks = 0; |
| 850 | s->callback_already_read = 0; |
| 851 | s->img_buffer = s->img_buffer_original = (stbi_uc*)buffer; |
| 852 | s->img_buffer_end = s->img_buffer_original_end = (stbi_uc*)buffer + len; |
| 853 | } |
| 854 | |
| 855 | // initialize a callback-based context |
| 856 | static void stbi__start_callbacks(stbi__context* s, stbi_io_callbacks* c, void* user) { |
no outgoing calls
no test coverage detected