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

Function ilIsValidPsp

DevIL/src-IL/src/il_psp.cpp:40–60  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

38
39//! Checks if the file specified in FileName is a valid Psp file.
40ILboolean ilIsValidPsp(ILconst_string FileName)
41{
42 ILHANDLE PspFile;
43 ILboolean bPsp = IL_FALSE;
44
45 if (!iCheckExtension(FileName, IL_TEXT("psp"))) {
46 ilSetError(IL_INVALID_EXTENSION);
47 return bPsp;
48 }
49
50 PspFile = iopenr(FileName);
51 if (PspFile == NULL) {
52 ilSetError(IL_COULD_NOT_OPEN_FILE);
53 return bPsp;
54 }
55
56 bPsp = ilIsValidPspF(PspFile);
57 icloser(PspFile);
58
59 return bPsp;
60}
61
62
63//! Checks if the ILHANDLE contains a valid Psp file at the current position.

Callers 1

ILAPIENTRY ilIsValidFunction · 0.85

Calls 3

iCheckExtensionFunction · 0.85
ilSetErrorFunction · 0.85
ilIsValidPspFFunction · 0.85

Tested by

no test coverage detected