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

Function ilIsValidPic

DevIL/src-IL/src/il_pic.cpp:22–42  ·  view source on GitHub ↗

Checks if the file specified in FileName is a valid .pic file.

Source from the content-addressed store, hash-verified

20
21//! Checks if the file specified in FileName is a valid .pic file.
22ILboolean ilIsValidPic(ILconst_string FileName)
23{
24 ILHANDLE PicFile;
25 ILboolean bPic = IL_FALSE;
26
27 if (!iCheckExtension(FileName, IL_TEXT("pic"))) {
28 ilSetError(IL_INVALID_EXTENSION);
29 return bPic;
30 }
31
32 PicFile = iopenr(FileName);
33 if (PicFile == NULL) {
34 ilSetError(IL_COULD_NOT_OPEN_FILE);
35 return bPic;
36 }
37
38 bPic = ilIsValidPicF(PicFile);
39 icloser(PicFile);
40
41 return bPic;
42}
43
44
45//! Checks if the ILHANDLE contains a valid .pic file at the current position.

Callers 1

ILAPIENTRY ilIsValidFunction · 0.85

Calls 3

iCheckExtensionFunction · 0.85
ilSetErrorFunction · 0.85
ilIsValidPicFFunction · 0.85

Tested by

no test coverage detected