Checks if the file specified in FileName is a valid .pic file.
| 20 | |
| 21 | //! Checks if the file specified in FileName is a valid .pic file. |
| 22 | ILboolean ilIsValidPic(ILconst_string FileName) |
| 23 | { |
| 24 | ILHANDLE PicFile; |
| 25 | ILboolean bPic = IL_FALSE; |
| 26 | |
| 27 | if (!iCheckExtension(FileName, IL_TEXT("pic"))) { |
| 28 | ilSetError(IL_INVALID_EXTENSION); |
| 29 | return bPic; |
| 30 | } |
| 31 | |
| 32 | PicFile = iopenr(FileName); |
| 33 | if (PicFile == NULL) { |
| 34 | ilSetError(IL_COULD_NOT_OPEN_FILE); |
| 35 | return bPic; |
| 36 | } |
| 37 | |
| 38 | bPic = ilIsValidPicF(PicFile); |
| 39 | icloser(PicFile); |
| 40 | |
| 41 | return bPic; |
| 42 | } |
| 43 | |
| 44 | |
| 45 | //! Checks if the ILHANDLE contains a valid .pic file at the current position. |
no test coverage detected