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

Function ilIsValidSgi

DevIL/src-IL/src/il_sgi.cpp:23–45  ·  view source on GitHub ↗

! Checks if the file specified in FileName is a valid .sgi file. */

Source from the content-addressed store, hash-verified

21
22/*! Checks if the file specified in FileName is a valid .sgi file. */
23ILboolean ilIsValidSgi(ILconst_string FileName)
24{
25 ILHANDLE SgiFile;
26 ILboolean bSgi = IL_FALSE;
27
28 if (!iCheckExtension(FileName, IL_TEXT("sgi"))) {
29 ilSetError(IL_INVALID_EXTENSION);
30 return bSgi;
31 }
32
33 FName = (char*)FileName;
34
35 SgiFile = iopenr(FileName);
36 if (SgiFile == NULL) {
37 ilSetError(IL_COULD_NOT_OPEN_FILE);
38 return bSgi;
39 }
40
41 bSgi = ilIsValidSgiF(SgiFile);
42 icloser(SgiFile);
43
44 return bSgi;
45}
46
47/*----------------------------------------------------------------------------*/
48

Callers 1

ILAPIENTRY ilIsValidFunction · 0.85

Calls 3

iCheckExtensionFunction · 0.85
ilSetErrorFunction · 0.85
ilIsValidSgiFFunction · 0.85

Tested by

no test coverage detected