| 197 | } |
| 198 | |
| 199 | int |
| 200 | hfOpenReWrite(HfInfo* hf, const char* filename) |
| 201 | { |
| 202 | hf->hash = 0; |
| 203 | if (hf->file != NULL){ |
| 204 | hfClose(hf); |
| 205 | } |
| 206 | |
| 207 | |
| 208 | #ifdef _DEBUG_TOOLS |
| 209 | { |
| 210 | char* logName = hfCreateFullPatch(filename, "", "log"); |
| 211 | hf->fileLog = fopen(logName, "a"); |
| 212 | fprintf(hf->fileLog, " ====================== \n"); |
| 213 | free(logName); |
| 214 | } |
| 215 | #endif // _DEBUG |
| 216 | hf->file = fopen(filename, "rb+"); |
| 217 | return FILE_OK; |
| 218 | } |
| 219 | |
| 220 | int |
| 221 | hfClose( HfInfo* hf ) |
no test coverage detected