MCPcopy Create free account
hub / github.com/DentonW/DevIL / iCheckPnm

Function iCheckPnm

DevIL/src-IL/src/il_pnm.cpp:98–114  ·  view source on GitHub ↗

Internal function used to check if the HEADER is a valid .pnm header.

Source from the content-addressed store, hash-verified

96
97// Internal function used to check if the HEADER is a valid .pnm header.
98ILboolean iCheckPnm(char Header[2])
99{
100 if (Header[0] != 'P')
101 return IL_FALSE;
102 switch (Header[1])
103 {
104 case '1':
105 case '2':
106 case '3':
107 case '4':
108 case '5':
109 case '6':
110 return IL_TRUE;
111 }
112
113 return IL_FALSE;
114}
115
116
117// Reads a file

Callers 1

iIsValidPnmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected