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

Function XpmGetsInternal

DevIL/src-IL/src/il_xpm.cpp:231–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229
230
231ILint XpmGetsInternal(ILubyte *Buffer, ILint MaxLen)
232{
233 ILint i = 0, Current;
234
235 if (ieof())
236 return IL_EOF;
237
238 while ((Current = igetc()) != IL_EOF && i < MaxLen - 1) {
239 if (Current == IL_EOF)
240 return 0;
241 if (Current == '\n') //unix line ending
242 break;
243
244 if (Current == '\r') { //dos/mac line ending
245 Current = igetc();
246 if (Current == '\n') //dos line ending
247 break;
248
249 if (Current == IL_EOF)
250 break;
251
252 Buffer[i++] = (ILubyte)Current;
253 continue;
254 }
255 Buffer[i++] = (ILubyte)Current;
256 }
257
258 Buffer[i++] = 0;
259
260 return i;
261}
262
263
264ILint XpmGets(ILubyte *Buffer, ILint MaxLen)

Callers 3

iIsValidXpmFunction · 0.85
XpmGetsFunction · 0.85
il_xpm.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected