| 7107 | |
| 7108 | #define STBI__HDR_BUFLEN 1024 |
| 7109 | static char *stbi__hdr_gettoken(stbi__context *z, char *buffer) |
| 7110 | { |
| 7111 | int len=0; |
| 7112 | char c = '\0'; |
| 7113 | |
| 7114 | c = (char) stbi__get8(z); |
| 7115 | |
| 7116 | while (!stbi__at_eof(z) && c != '\n') { |
| 7117 | buffer[len++] = c; |
| 7118 | if (len == STBI__HDR_BUFLEN-1) { |
| 7119 | // flush to end of line |
| 7120 | while (!stbi__at_eof(z) && stbi__get8(z) != '\n') |
| 7121 | ; |
| 7122 | break; |
| 7123 | } |
| 7124 | c = (char) stbi__get8(z); |
| 7125 | } |
| 7126 | |
| 7127 | buffer[len] = 0; |
| 7128 | return buffer; |
| 7129 | } |
| 7130 | |
| 7131 | static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp) |
| 7132 | { |
no test coverage detected