Writes a Mng file
| 285 | |
| 286 | //! Writes a Mng file |
| 287 | ILboolean ilSaveMng(const ILstring FileName) |
| 288 | { |
| 289 | ILHANDLE MngFile; |
| 290 | ILuint MngSize; |
| 291 | |
| 292 | if (ilGetBoolean(IL_FILE_MODE) == IL_FALSE) { |
| 293 | if (iFileExists(FileName)) { |
| 294 | ilSetError(IL_FILE_ALREADY_EXISTS); |
| 295 | return IL_FALSE; |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | MngFile = iopenw(FileName); |
| 300 | if (MngFile == NULL) { |
| 301 | ilSetError(IL_COULD_NOT_OPEN_FILE); |
| 302 | return IL_FALSE; |
| 303 | } |
| 304 | |
| 305 | MngSize = ilSaveMngF(MngFile); |
| 306 | iclosew(MngFile); |
| 307 | |
| 308 | if (MngSize == 0) |
| 309 | return IL_FALSE; |
| 310 | return IL_TRUE; |
| 311 | } |
| 312 | |
| 313 | |
| 314 | //! Writes a Mng to an already-opened file |
no test coverage detected