| 7767 | |
| 7768 | #define STBI__HDR_BUFLEN 1024 |
| 7769 | static char* stbi__hdr_gettoken(stbi__context* z, char* buffer) { |
| 7770 | int len = 0; |
| 7771 | char c = '\0'; |
| 7772 | |
| 7773 | c = (char)stbi__get8(z); |
| 7774 | |
| 7775 | while (!stbi__at_eof(z) && c != '\n') { |
| 7776 | buffer[len++] = c; |
| 7777 | if (len == STBI__HDR_BUFLEN - 1) { |
| 7778 | // flush to end of line |
| 7779 | while (!stbi__at_eof(z) && stbi__get8(z) != '\n') |
| 7780 | ; |
| 7781 | break; |
| 7782 | } |
| 7783 | c = (char)stbi__get8(z); |
| 7784 | } |
| 7785 | |
| 7786 | buffer[len] = 0; |
| 7787 | return buffer; |
| 7788 | } |
| 7789 | |
| 7790 | static void stbi__hdr_convert(float* output, stbi_uc* input, int req_comp) { |
| 7791 | if (input[3] != 0) { |
no test coverage detected