Checks if the file specified in FileName is a valid Psp file.
| 38 | |
| 39 | //! Checks if the file specified in FileName is a valid Psp file. |
| 40 | ILboolean 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. |
no test coverage detected