MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / stbi__pnm_getinteger

Function stbi__pnm_getinteger

include/stb/stb_image.h:7567–7579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7565}
7566
7567static int stbi__pnm_getinteger(stbi__context *s, char *c)
7568{
7569 int value = 0;
7570
7571 while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) {
7572 value = value*10 + (*c - '0');
7573 *c = (char) stbi__get8(s);
7574 if((value > 214748364) || (value == 214748364 && *c > '7'))
7575 return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int");
7576 }
7577
7578 return value;
7579}
7580
7581static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp)
7582{

Callers 1

stbi__pnm_infoFunction · 0.85

Calls 4

stbi__at_eofFunction · 0.85
stbi__pnm_isdigitFunction · 0.85
stbi__get8Function · 0.85
stbi__errFunction · 0.85

Tested by

no test coverage detected