MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / stbi__hdr_gettoken

Function stbi__hdr_gettoken

Source/Utils/stb_image.h:7106–7126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7104
7105#define STBI__HDR_BUFLEN 1024
7106static 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
7128static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp)
7129{

Callers 2

stbi__hdr_loadFunction · 0.85
stbi__hdr_infoFunction · 0.85

Calls 2

stbi__get8Function · 0.85
stbi__at_eofFunction · 0.85

Tested by

no test coverage detected