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