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

Function XpmGetInt

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

Source from the content-addressed store, hash-verified

310
311
312ILint XpmGetInt(ILubyte *Buffer, ILint Size, ILint *Position)
313{
314 char Buff[1024];
315 ILint i, j;
316 ILboolean IsInNum = IL_FALSE;
317
318 for (i = *Position, j = 0; i < Size; i++) {
319 if (isdigit(Buffer[i])) {
320 IsInNum = IL_TRUE;
321 Buff[j++] = Buffer[i];
322 }
323 else {
324 if (IsInNum) {
325 Buff[j] = 0;
326 *Position = i;
327 return atoi(Buff);
328 }
329 }
330 }
331
332 return -1;
333}
334
335
336ILboolean XpmPredefCol(char *Buff, XpmPixel *Colour)

Callers 1

il_xpm.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected