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

Function ilIsValidPcx

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

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

Source from the content-addressed store, hash-verified

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

Callers 1

ILAPIENTRY ilIsValidFunction · 0.85

Calls 3

iCheckExtensionFunction · 0.85
ilSetErrorFunction · 0.85
ilIsValidPcxFFunction · 0.85

Tested by

no test coverage detected