| 189 | |
| 190 | |
| 191 | void ListFileHeader(Archive &Arc,FileHeader &hd,bool &TitleShown,bool Verbose,bool Technical,bool Bare) |
| 192 | { |
| 193 | wchar *Name=hd.FileName; |
| 194 | RARFORMAT Format=Arc.Format; |
| 195 | |
| 196 | if (Bare) |
| 197 | { |
| 198 | mprintf(L"%s\n",Name); |
| 199 | return; |
| 200 | } |
| 201 | |
| 202 | if (!TitleShown && !Technical) |
| 203 | { |
| 204 | if (Verbose) |
| 205 | { |
| 206 | mprintf(L"\n%ls",St(MListTitleV)); |
| 207 | mprintf(L"\n----------- --------- -------- ----- ---------- ----- -------- ----"); |
| 208 | } |
| 209 | else |
| 210 | { |
| 211 | mprintf(L"\n%ls",St(MListTitleL)); |
| 212 | mprintf(L"\n----------- --------- ---------- ----- ----"); |
| 213 | } |
| 214 | TitleShown=true; |
| 215 | } |
| 216 | |
| 217 | wchar UnpSizeText[30],PackSizeText[30]; |
| 218 | if (hd.UnpSize==INT64NDF) |
| 219 | wcsncpyz(UnpSizeText,L"?",ASIZE(UnpSizeText)); |
| 220 | else |
| 221 | itoa(hd.UnpSize,UnpSizeText,ASIZE(UnpSizeText)); |
| 222 | itoa(hd.PackSize,PackSizeText,ASIZE(PackSizeText)); |
| 223 | |
| 224 | wchar AttrStr[30]; |
| 225 | if (hd.HeaderType==HEAD_SERVICE) |
| 226 | swprintf(AttrStr,ASIZE(AttrStr),L"%cB",hd.Inherited ? 'I' : '.'); |
| 227 | else |
| 228 | ListFileAttr(hd.FileAttr,hd.HSType,AttrStr,ASIZE(AttrStr)); |
| 229 | |
| 230 | wchar RatioStr[10]; |
| 231 | |
| 232 | if (hd.SplitBefore && hd.SplitAfter) |
| 233 | wcsncpyz(RatioStr,L"<->",ASIZE(RatioStr)); |
| 234 | else |
| 235 | if (hd.SplitBefore) |
| 236 | wcsncpyz(RatioStr,L"<--",ASIZE(RatioStr)); |
| 237 | else |
| 238 | if (hd.SplitAfter) |
| 239 | wcsncpyz(RatioStr,L"-->",ASIZE(RatioStr)); |
| 240 | else |
| 241 | swprintf(RatioStr,ASIZE(RatioStr),L"%d%%",ToPercentUnlim(hd.PackSize,hd.UnpSize)); |
| 242 | |
| 243 | wchar DateStr[50]; |
| 244 | hd.mtime.GetText(DateStr,ASIZE(DateStr),Technical); |
| 245 | |
| 246 | if (Technical) |
| 247 | { |
| 248 | mprintf(L"\n%12s: %s",St(MListName),Name); |
no test coverage detected