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