| 249 | } |
| 250 | |
| 251 | int __stdcall ReadHeaderEx(WCX_HANDLE hArcData, tHeaderDataEx* HeaderData) |
| 252 | { |
| 253 | auto* arc = reinterpret_cast<PboArchive*>(hArcData); |
| 254 | if (!arc || arc->currentIndex >= static_cast<int>(arc->entries.size())) |
| 255 | return E_END_ARCHIVE; |
| 256 | |
| 257 | const auto& e = arc->entries[arc->currentIndex]; |
| 258 | memset(HeaderData, 0, sizeof(tHeaderDataEx)); |
| 259 | strncpy(HeaderData->ArcName, arc->archiveName.c_str(), sizeof(HeaderData->ArcName) - 1); |
| 260 | |
| 261 | std::string name = e.name; |
| 262 | NormalizePathSeparators(name); |
| 263 | strncpy(HeaderData->FileName, name.c_str(), sizeof(HeaderData->FileName) - 1); |
| 264 | |
| 265 | bool compressed = (e.compressedMagic == CompMagic); |
| 266 | HeaderData->PackSize = static_cast<unsigned int>(e.length); |
| 267 | HeaderData->PackSizeHigh = 0; |
| 268 | HeaderData->UnpSize = |
| 269 | compressed ? static_cast<unsigned int>(e.uncompressedSize) : static_cast<unsigned int>(e.length); |
| 270 | HeaderData->UnpSizeHigh = 0; |
| 271 | HeaderData->FileTime = UnixTimeToDos(e.time); |
| 272 | HeaderData->FileAttr = FILE_ATTRIBUTE_NORMAL; |
| 273 | |
| 274 | return 0; |
| 275 | } |
| 276 | |
| 277 | int __stdcall ProcessFile(WCX_HANDLE hArcData, int Operation, char* DestPath, char* DestName) |
| 278 | { |
nothing calls this directly
no test coverage detected