* Close an opened file. * * @param index The index given by File_Open() of the file. */
| 687 | * @param index The index given by File_Open() of the file. |
| 688 | */ |
| 689 | void File_Close(uint8 index) |
| 690 | { |
| 691 | if (index >= FILE_MAX) return; |
| 692 | if (s_file[index].fp == NULL) return; |
| 693 | |
| 694 | if (s_file[index].pakInfo != NULL) { |
| 695 | s_file[index].fp = NULL; /* do not close PAK file */ |
| 696 | return; |
| 697 | } |
| 698 | |
| 699 | fclose(s_file[index].fp); |
| 700 | s_file[index].fp = NULL; |
| 701 | } |
| 702 | |
| 703 | /** |
| 704 | * Read bytes from a file into a buffer. |
no outgoing calls
no test coverage detected