/ * FileBackpatch: Write "data" to the 4 bytes starting at position "pos" in the file. * This function leaves the file pointer at the same place as when the function was called. */
| 1026 | * This function leaves the file pointer at the same place as when the function was called. |
| 1027 | */ |
| 1028 | void FileBackpatch(FILE *file, int pos, int data) |
| 1029 | { |
| 1030 | int cur_pos; |
| 1031 | |
| 1032 | cur_pos = FileCurPos(file); |
| 1033 | FileGoto(file, pos); |
| 1034 | WriteBytes(file, &data, 4); |
| 1035 | FileGoto(file, cur_pos); |
| 1036 | } |
| 1037 | /***************************************************************************/ |
| 1038 | /* |
| 1039 | * BackupFile: Copy fname to a backup name if it already exists. |
no test coverage detected