Checks if the file specified in FileName is a valid .pcx file.
| 18 | |
| 19 | //! Checks if the file specified in FileName is a valid .pcx file. |
| 20 | ILboolean 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. |
no test coverage detected