| 7 | static void ListNewSubHeader(CommandData *Cmd,Archive &Arc); |
| 8 | |
| 9 | void ListArchive(CommandData *Cmd) |
| 10 | { |
| 11 | int64 SumPackSize=0,SumUnpSize=0; |
| 12 | uint ArcCount=0,SumFileCount=0; |
| 13 | bool Technical=(Cmd->Command[1]=='T'); |
| 14 | bool ShowService=Technical && Cmd->Command[2]=='A'; |
| 15 | bool Bare=(Cmd->Command[1]=='B'); |
| 16 | bool Verbose=(Cmd->Command[0]=='V'); |
| 17 | |
| 18 | wchar ArcName[NM]; |
| 19 | while (Cmd->GetArcName(ArcName,ASIZE(ArcName))) |
| 20 | { |
| 21 | if (Cmd->ManualPassword) |
| 22 | Cmd->Password.Clean(); // Clean user entered password before processing next archive. |
| 23 | |
| 24 | Archive Arc(Cmd); |
| 25 | #ifdef _WIN_ALL |
| 26 | Arc.RemoveSequentialFlag(); |
| 27 | #endif |
| 28 | if (!Arc.WOpen(ArcName)) |
| 29 | continue; |
| 30 | bool FileMatched=true; |
| 31 | while (1) |
| 32 | { |
| 33 | int64 TotalPackSize=0,TotalUnpSize=0; |
| 34 | uint FileCount=0; |
| 35 | if (Arc.IsArchive(true)) |
| 36 | { |
| 37 | bool TitleShown=false; |
| 38 | if (!Bare) |
| 39 | { |
| 40 | Arc.ViewComment(); |
| 41 | mprintf(L"\n%s: %s",St(MListArchive),Arc.FileName); |
| 42 | mprintf(L"\n%s: ",St(MListDetails)); |
| 43 | uint SetCount=0; |
| 44 | const wchar *Fmt=Arc.Format==RARFMT14 ? L"RAR 1.4":(Arc.Format==RARFMT15 ? L"RAR 4":L"RAR 5"); |
| 45 | mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", Fmt); |
| 46 | if (Arc.Solid) |
| 47 | mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListSolid)); |
| 48 | if (Arc.SFXSize>0) |
| 49 | mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListSFX)); |
| 50 | if (Arc.Volume) |
| 51 | if (Arc.Format==RARFMT50) |
| 52 | { |
| 53 | // RAR 5.0 archives store the volume number in main header, |
| 54 | // so it is already available now. |
| 55 | if (SetCount++ > 0) |
| 56 | mprintf(L", "); |
| 57 | mprintf(St(MVolumeNumber),Arc.VolNumber+1); |
| 58 | } |
| 59 | else |
| 60 | mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListVolume)); |
| 61 | if (Arc.Protected) |
| 62 | mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListRR)); |
| 63 | if (Arc.Locked) |
| 64 | mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListLock)); |
| 65 | if (Arc.Encrypted) |
| 66 | mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListEncHead)); |
no test coverage detected