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

Function stbi__pnm_test

Source/Utils/stb_image.h:7491–7501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7489#ifndef STBI_NO_PNM
7490
7491static int stbi__pnm_test(stbi__context *s)
7492{
7493 char p, t;
7494 p = (char) stbi__get8(s);
7495 t = (char) stbi__get8(s);
7496 if (p != 'P' || (t != '5' && t != '6')) {
7497 stbi__rewind( s );
7498 return 0;
7499 }
7500 return 1;
7501}
7502
7503static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri)
7504{

Callers 1

stbi__load_mainFunction · 0.85

Calls 2

stbi__get8Function · 0.85
stbi__rewindFunction · 0.85

Tested by

no test coverage detected