unrarsrc  6.1.7
About: unrar extracts, views and tests the contents of archives created with the RAR archiver.
  Fossies Dox: unrarsrc-6.1.7.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

list.cpp
Go to the documentation of this file.
1#include "rar.hpp"
2
3static void ListFileHeader(Archive &Arc,FileHeader &hd,bool &TitleShown,bool Verbose,bool Technical,bool Bare,bool DisableNames);
4static void ListSymLink(Archive &Arc);
5static void ListFileAttr(uint A,HOST_SYSTEM_TYPE HostType,wchar *AttrStr,size_t AttrSize);
6static void ListOldSubHeader(Archive &Arc);
7static void ListNewSubHeader(CommandData *Cmd,Archive &Arc);
8
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 if (!Arc.WOpen(ArcName))
26 continue;
27 bool FileMatched=true;
28 while (true)
29 {
30 int64 TotalPackSize=0,TotalUnpSize=0;
31 uint FileCount=0;
32 if (Arc.IsArchive(true))
33 {
34 bool TitleShown=false;
35 if (!Bare)
36 {
37 Arc.ViewComment();
38 mprintf(L"\n%s: %s",St(MListArchive),Arc.FileName);
39 mprintf(L"\n%s: ",St(MListDetails));
40 uint SetCount=0;
41 const wchar *Fmt=Arc.Format==RARFMT14 ? L"RAR 1.4":(Arc.Format==RARFMT15 ? L"RAR 4":L"RAR 5");
42 mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", Fmt);
43 if (Arc.Solid)
44 mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListSolid));
45 if (Arc.SFXSize>0)
46 mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListSFX));
47 if (Arc.Volume)
48 if (Arc.Format==RARFMT50)
49 {
50 // RAR 5.0 archives store the volume number in main header,
51 // so it is already available now.
52 if (SetCount++ > 0)
53 mprintf(L", ");
55 }
56 else
57 mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListVolume));
58 if (Arc.Protected)
59 mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListRR));
60 if (Arc.Locked)
61 mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListLock));
62 if (Arc.Encrypted)
63 mprintf(L"%s%s", SetCount++ > 0 ? L", ":L"", St(MListEncHead));
64 mprintf(L"\n");
65 }
66
67 wchar VolNumText[50];
68 *VolNumText=0;
69 while (Arc.ReadHeader()>0)
70 {
71 Wait(); // Allow quit listing with Ctrl+C.
72 HEADER_TYPE HeaderType=Arc.GetHeaderType();
73 if (HeaderType==HEAD_ENDARC)
74 {
75#ifndef SFX_MODULE
76 // Only RAR 1.5 archives store the volume number in end record.
78 swprintf(VolNumText,ASIZE(VolNumText),L"%.10ls %u",St(MListVolume),Arc.VolNumber+1);
79#endif
80 if (Technical && ShowService)
81 {
82 mprintf(L"\n%12ls: %ls",St(MListService),L"EOF");
83 if (*VolNumText!=0)
84 mprintf(L"\n%12ls: %ls",St(MListFlags),VolNumText);
85 mprintf(L"\n");
86 }
87 break;
88 }
89 switch(HeaderType)
90 {
91 case HEAD_FILE:
92 FileMatched=Cmd->IsProcessFile(Arc.FileHead,NULL,MATCH_WILDSUBPATH,0,NULL,0)!=0;
93 if (FileMatched)
94 {
95 ListFileHeader(Arc,Arc.FileHead,TitleShown,Verbose,Technical,Bare,Cmd->DisableNames);
96 if (!Arc.FileHead.SplitBefore)
97 {
98 TotalUnpSize+=Arc.FileHead.UnpSize;
99 FileCount++;
100 }
101 TotalPackSize+=Arc.FileHead.PackSize;
102 }
103 break;
104 case HEAD_SERVICE:
105 if (FileMatched && !Bare)
106 {
107 if (Technical && ShowService)
108 ListFileHeader(Arc,Arc.SubHead,TitleShown,Verbose,true,false,Cmd->DisableNames);
109 }
110 break;
111 }
112 Arc.SeekToNext();
113 }
114 if (!Bare && !Technical)
115 if (TitleShown)
116 {
117 wchar UnpSizeText[20];
118 itoa(TotalUnpSize,UnpSizeText,ASIZE(UnpSizeText));
119
120 wchar PackSizeText[20];
121 itoa(TotalPackSize,PackSizeText,ASIZE(PackSizeText));
122
123 if (Verbose)
124 {
125 mprintf(L"\n----------- --------- -------- ----- ---------- ----- -------- ----");
126 mprintf(L"\n%21ls %9ls %3d%% %-27ls %u",UnpSizeText,
127 PackSizeText,ToPercentUnlim(TotalPackSize,TotalUnpSize),
128 VolNumText,FileCount);
129 }
130 else
131 {
132 mprintf(L"\n----------- --------- ---------- ----- ----");
133 mprintf(L"\n%21ls %-16ls %u",UnpSizeText,VolNumText,FileCount);
134 }
135
136 SumFileCount+=FileCount;
137 SumUnpSize+=TotalUnpSize;
138 SumPackSize+=TotalPackSize;
139 mprintf(L"\n");
140 }
141 else
143
144 ArcCount++;
145
146#ifndef NOVOLUME
147 if (Cmd->VolSize!=0 && (Arc.FileHead.SplitAfter ||
149 MergeArchive(Arc,NULL,false,Cmd->Command[0]))
150 Arc.Seek(0,SEEK_SET);
151 else
152#endif
153 break;
154 }
155 else
156 {
157 if (Cmd->ArcNames.ItemsCount()<2 && !Bare)
159 break;
160 }
161 }
162 }
163
164 // Clean user entered password. Not really required, just for extra safety.
165 if (Cmd->ManualPassword)
166 Cmd->Password.Clean();
167
168 if (ArcCount>1 && !Bare && !Technical)
169 {
170 wchar UnpSizeText[20],PackSizeText[20];
171 itoa(SumUnpSize,UnpSizeText,ASIZE(UnpSizeText));
172 itoa(SumPackSize,PackSizeText,ASIZE(PackSizeText));
173
174 if (Verbose)
175 mprintf(L"%21ls %9ls %3d%% %28ls %u",UnpSizeText,PackSizeText,
176 ToPercentUnlim(SumPackSize,SumUnpSize),L"",SumFileCount);
177 else
178 mprintf(L"%21ls %18s %lu",UnpSizeText,L"",SumFileCount);
179 }
180}
181
182
186
187
188void ListFileHeader(Archive &Arc,FileHeader &hd,bool &TitleShown,bool Verbose,bool Technical,bool Bare,bool DisableNames)
189{
190 if (!TitleShown && !Technical && !Bare)
191 {
192 if (Verbose)
193 {
194 mprintf(L"\n%ls",St(MListTitleV));
195 if (!DisableNames)
196 mprintf(L"\n----------- --------- -------- ----- ---------- ----- -------- ----");
197 }
198 else
199 {
200 mprintf(L"\n%ls",St(MListTitleL));
201 if (!DisableNames)
202 mprintf(L"\n----------- --------- ---------- ----- ----");
203 }
204 // Must be set even in DisableNames mode to suppress "0 files" output
205 // unless no files are matched.
206 TitleShown=true;
207 }
208 if (DisableNames)
209 return;
210
211 wchar *Name=hd.FileName;
212 RARFORMAT Format=Arc.Format;
213
214 if (Bare)
215 {
216 mprintf(L"%s\n",Name);
217 return;
218 }
219
220 wchar UnpSizeText[30],PackSizeText[30];
221 if (hd.UnpSize==INT64NDF)
222 wcsncpyz(UnpSizeText,L"?",ASIZE(UnpSizeText));
223 else
224 itoa(hd.UnpSize,UnpSizeText,ASIZE(UnpSizeText));
225 itoa(hd.PackSize,PackSizeText,ASIZE(PackSizeText));
226
227 wchar AttrStr[30];
228 if (hd.HeaderType==HEAD_SERVICE)
229 swprintf(AttrStr,ASIZE(AttrStr),L"%cB",hd.Inherited ? 'I' : '.');
230 else
231 ListFileAttr(hd.FileAttr,hd.HSType,AttrStr,ASIZE(AttrStr));
232
233 wchar RatioStr[10];
234
235 if (hd.SplitBefore && hd.SplitAfter)
236 wcsncpyz(RatioStr,L"<->",ASIZE(RatioStr));
237 else
238 if (hd.SplitBefore)
239 wcsncpyz(RatioStr,L"<--",ASIZE(RatioStr));
240 else
241 if (hd.SplitAfter)
242 wcsncpyz(RatioStr,L"-->",ASIZE(RatioStr));
243 else
244 swprintf(RatioStr,ASIZE(RatioStr),L"%d%%",ToPercentUnlim(hd.PackSize,hd.UnpSize));
245
246 wchar DateStr[50];
247 hd.mtime.GetText(DateStr,ASIZE(DateStr),Technical);
248
249 if (Technical)
250 {
251 mprintf(L"\n%12s: %s",St(MListName),Name);
252
253 bool FileBlock=hd.HeaderType==HEAD_FILE;
254
255 if (!FileBlock && Arc.SubHead.CmpName(SUBHEAD_TYPE_STREAM))
256 {
257 mprintf(L"\n%12ls: %ls",St(MListType),St(MListStream));
258 wchar StreamName[NM];
259 GetStreamNameNTFS(Arc,StreamName,ASIZE(StreamName));
260 mprintf(L"\n%12ls: %ls",St(MListTarget),StreamName);
261 }
262 else
263 {
264 const wchar *Type=St(FileBlock ? (hd.Dir ? MListDir:MListFile):MListService);
265
266 if (hd.RedirType!=FSREDIR_NONE)
267 switch(hd.RedirType)
268 {
270 Type=St(MListUSymlink); break;
272 Type=St(MListWSymlink); break;
273 case FSREDIR_JUNCTION:
274 Type=St(MListJunction); break;
275 case FSREDIR_HARDLINK:
276 Type=St(MListHardlink); break;
277 case FSREDIR_FILECOPY:
278 Type=St(MListCopy); break;
279 }
280 mprintf(L"\n%12ls: %ls",St(MListType),Type);
281 if (hd.RedirType!=FSREDIR_NONE)
282 if (Format==RARFMT15)
283 {
284 char LinkTargetA[NM];
285 if (Arc.FileHead.Encrypted)
286 {
287 // Link data are encrypted. We would need to ask for password
288 // and initialize decryption routine to display the link target.
289 strncpyz(LinkTargetA,"*<-?->",ASIZE(LinkTargetA));
290 }
291 else
292 {
293 int DataSize=(int)Min(hd.PackSize,ASIZE(LinkTargetA)-1);
294 Arc.Read(LinkTargetA,DataSize);
295 LinkTargetA[DataSize > 0 ? DataSize : 0] = 0;
296 }
297 wchar LinkTarget[NM];
298 CharToWide(LinkTargetA,LinkTarget,ASIZE(LinkTarget));
299 mprintf(L"\n%12ls: %ls",St(MListTarget),LinkTarget);
300 }
301 else
302 mprintf(L"\n%12ls: %ls",St(MListTarget),hd.RedirName);
303 }
304 if (!hd.Dir)
305 {
306 mprintf(L"\n%12ls: %ls",St(MListSize),UnpSizeText);
307 mprintf(L"\n%12ls: %ls",St(MListPacked),PackSizeText);
308 mprintf(L"\n%12ls: %ls",St(MListRatio),RatioStr);
309 }
310 bool WinTitles=false;
311#ifdef _WIN_ALL
312 WinTitles=true;
313#endif
314 if (hd.mtime.IsSet())
315 mprintf(L"\n%12ls: %ls",St(WinTitles ? MListModified:MListMtime),DateStr);
316 if (hd.ctime.IsSet())
317 {
318 hd.ctime.GetText(DateStr,ASIZE(DateStr),true);
319 mprintf(L"\n%12ls: %ls",St(WinTitles ? MListCreated:MListCtime),DateStr);
320 }
321 if (hd.atime.IsSet())
322 {
323 hd.atime.GetText(DateStr,ASIZE(DateStr),true);
324 mprintf(L"\n%12ls: %ls",St(WinTitles ? MListAccessed:MListAtime),DateStr);
325 }
326 mprintf(L"\n%12ls: %ls",St(MListAttr),AttrStr);
327 if (hd.FileHash.Type==HASH_CRC32)
328 mprintf(L"\n%12ls: %8.8X",
329 hd.UseHashKey ? L"CRC32 MAC":hd.SplitAfter ? L"Pack-CRC32":L"CRC32",
330 hd.FileHash.CRC32);
331 if (hd.FileHash.Type==HASH_BLAKE2)
332 {
333 wchar BlakeStr[BLAKE2_DIGEST_SIZE*2+1];
334 BinToHex(hd.FileHash.Digest,BLAKE2_DIGEST_SIZE,NULL,BlakeStr,ASIZE(BlakeStr));
335 mprintf(L"\n%12ls: %ls",
336 hd.UseHashKey ? L"BLAKE2 MAC":hd.SplitAfter ? L"Pack-BLAKE2":L"BLAKE2",
337 BlakeStr);
338 }
339
340 const wchar *HostOS=L"";
341 if (Format==RARFMT50 && hd.HSType!=HSYS_UNKNOWN)
342 HostOS=hd.HSType==HSYS_WINDOWS ? L"Windows":L"Unix";
343 if (Format==RARFMT15)
344 {
345 static const wchar *RarOS[]={
346 L"DOS",L"OS/2",L"Windows",L"Unix",L"Mac OS",L"BeOS",L"WinCE",L"",L"",L""
347 };
348 if (hd.HostOS<ASIZE(RarOS))
349 HostOS=RarOS[hd.HostOS];
350 }
351 if (*HostOS!=0)
352 mprintf(L"\n%12ls: %ls",St(MListHostOS),HostOS);
353
354 mprintf(L"\n%12ls: RAR %ls(v%d) -m%d -md=%d%s",St(MListCompInfo),
355 Format==RARFMT15 ? L"1.5":L"5.0",
356 hd.UnpVer==VER_UNKNOWN ? 0 : hd.UnpVer,hd.Method,
357 hd.WinSize>=0x100000 ? hd.WinSize/0x100000:hd.WinSize/0x400,
358 hd.WinSize>=0x100000 ? L"M":L"K");
359
360 if (hd.Solid || hd.Encrypted)
361 {
362 mprintf(L"\n%12ls: ",St(MListFlags));
363 if (hd.Solid)
364 mprintf(L"%ls ",St(MListSolid));
365 if (hd.Encrypted)
366 mprintf(L"%ls ",St(MListEnc));
367 }
368
369 if (hd.Version)
370 {
371 uint Version=ParseVersionFileName(Name,false);
372 if (Version!=0)
373 mprintf(L"\n%12ls: %u",St(MListFileVer),Version);
374 }
375
376 if (hd.UnixOwnerSet)
377 {
378 mprintf(L"\n%12ls: ",L"Unix owner");
379 if (*hd.UnixOwnerName!=0)
380 mprintf(L"%ls",GetWide(hd.UnixOwnerName));
381 else
382 if (hd.UnixOwnerNumeric)
383 mprintf(L"#%d",hd.UnixOwnerID);
384 mprintf(L":");
385 if (*hd.UnixGroupName!=0)
386 mprintf(L"%ls",GetWide(hd.UnixGroupName));
387 else
388 if (hd.UnixGroupNumeric)
389 mprintf(L"#%d",hd.UnixGroupID);
390 }
391
392 mprintf(L"\n");
393 return;
394 }
395
396 mprintf(L"\n%c%10ls %9ls ",hd.Encrypted ? '*' : ' ',AttrStr,UnpSizeText);
397
398 if (Verbose)
399 mprintf(L"%9ls %4ls ",PackSizeText,RatioStr);
400
401 mprintf(L" %ls ",DateStr);
402
403 if (Verbose)
404 {
405 if (hd.FileHash.Type==HASH_CRC32)
406 mprintf(L"%8.8X ",hd.FileHash.CRC32);
407 else
408 if (hd.FileHash.Type==HASH_BLAKE2)
409 {
410 byte *S=hd.FileHash.Digest;
411 mprintf(L"%02x%02x..%02x ",S[0],S[1],S[31]);
412 }
413 else
414 mprintf(L"???????? ");
415 }
416 mprintf(L"%ls",Name);
417}
418
419/*
420void ListSymLink(Archive &Arc)
421{
422 if (Arc.FileHead.HSType==HSYS_UNIX && (Arc.FileHead.FileAttr & 0xF000)==0xA000)
423 if (Arc.FileHead.Encrypted)
424 {
425 // Link data are encrypted. We would need to ask for password
426 // and initialize decryption routine to display the link target.
427 mprintf(L"\n%22ls %ls",L"-->",L"*<-?->");
428 }
429 else
430 {
431 char FileName[NM];
432 uint DataSize=(uint)Min(Arc.FileHead.PackSize,sizeof(FileName)-1);
433 Arc.Read(FileName,DataSize);
434 FileName[DataSize]=0;
435 mprintf(L"\n%22ls %ls",L"-->",GetWide(FileName));
436 }
437}
438*/
439
440void ListFileAttr(uint A,HOST_SYSTEM_TYPE HostType,wchar *AttrStr,size_t AttrSize)
441{
442 switch(HostType)
443 {
444 case HSYS_WINDOWS:
445 swprintf(AttrStr,AttrSize,L"%c%c%c%c%c%c%c",
446 (A & 0x2000)!=0 ? 'I' : '.', // Not content indexed.
447 (A & 0x0800)!=0 ? 'C' : '.', // Compressed.
448 (A & 0x0020)!=0 ? 'A' : '.', // Archive.
449 (A & 0x0010)!=0 ? 'D' : '.', // Directory.
450 (A & 0x0004)!=0 ? 'S' : '.', // System.
451 (A & 0x0002)!=0 ? 'H' : '.', // Hidden.
452 (A & 0x0001)!=0 ? 'R' : '.'); // Read-only.
453 break;
454 case HSYS_UNIX:
455 switch (A & 0xF000)
456 {
457 case 0x4000:
458 AttrStr[0]='d';
459 break;
460 case 0xA000:
461 AttrStr[0]='l';
462 break;
463 default:
464 AttrStr[0]='-';
465 break;
466 }
467 swprintf(AttrStr+1,AttrSize-1,L"%c%c%c%c%c%c%c%c%c",
468 (A & 0x0100) ? 'r' : '-',
469 (A & 0x0080) ? 'w' : '-',
470 (A & 0x0040) ? ((A & 0x0800)!=0 ? 's':'x'):((A & 0x0800)!=0 ? 'S':'-'),
471 (A & 0x0020) ? 'r' : '-',
472 (A & 0x0010) ? 'w' : '-',
473 (A & 0x0008) ? ((A & 0x0400)!=0 ? 's':'x'):((A & 0x0400)!=0 ? 'S':'-'),
474 (A & 0x0004) ? 'r' : '-',
475 (A & 0x0002) ? 'w' : '-',
476 (A & 0x0001) ? ((A & 0x200)!=0 ? 't' : 'x') : '-');
477 break;
478 case HSYS_UNKNOWN:
479 wcsncpyz(AttrStr,L"?",AttrSize);
480 break;
481 }
482}
RARFORMAT
Definition: archive.hpp:13
@ RARFMT50
Definition: archive.hpp:13
@ RARFMT15
Definition: archive.hpp:13
@ RARFMT14
Definition: archive.hpp:13
#define BLAKE2_DIGEST_SIZE
Definition: blake2s.hpp:5
size_t ReadHeader()
Definition: arcread.cpp:3
bool Encrypted
Definition: archive.hpp:126
HEADER_TYPE GetHeaderType()
Definition: archive.hpp:85
uint VolNumber
Definition: archive.hpp:137
bool Protected
Definition: archive.hpp:125
bool IsArchive(bool EnableBroken)
Definition: archive.cpp:126
EndArcHeader EndArcHead
Definition: archive.hpp:105
bool Locked
Definition: archive.hpp:121
void SeekToNext()
Definition: archive.cpp:276
bool Solid
Definition: archive.hpp:118
FileHeader FileHead
Definition: archive.hpp:104
void ViewComment()
Definition: arccmt.cpp:169
RARFORMAT Format
Definition: archive.hpp:117
size_t SFXSize
Definition: archive.hpp:127
FileHeader SubHead
Definition: archive.hpp:107
bool Volume
Definition: archive.hpp:119
StringList ArcNames
Definition: cmddata.hpp:66
wchar Command[NM+16]
Definition: cmddata.hpp:59
bool GetArcName(wchar *Name, int MaxSize)
Definition: cmddata.cpp:1012
int IsProcessFile(FileHeader &FileHead, bool *ExactMatch, int MatchType, bool Flags, wchar *MatchedArg, uint MatchedArgSize)
Definition: cmdfilter.cpp:279
virtual void Seek(int64 Offset, int Method)
Definition: file.cpp:514
virtual int Read(void *Data, size_t Size)
Definition: file.cpp:374
wchar FileName[NM]
Definition: file.hpp:88
bool WOpen(const wchar *Name)
Definition: file.cpp:167
bool DisableNames
Definition: options.hpp:138
bool ManualPassword
Definition: options.hpp:125
SecPassword Password
Definition: options.hpp:121
int64 VolSize
Definition: options.hpp:149
void GetText(wchar *DateStr, size_t MaxSize, bool FullMS)
Definition: timefn.cpp:225
bool IsSet()
Definition: timefn.hpp:58
void Clean()
Definition: secpassword.cpp:70
size_t ItemsCount()
Definition: strlist.hpp:24
void mprintf(const wchar *fmt,...)
Definition: consio.cpp:118
void GetStreamNameNTFS(Archive &Arc, wchar *StreamName, size_t MaxSize)
Definition: win32stm.cpp:134
@ HASH_CRC32
Definition: hash.hpp:4
@ HASH_BLAKE2
Definition: hash.hpp:4
#define SUBHEAD_TYPE_STREAM
Definition: headers.hpp:117
HOST_SYSTEM_TYPE
Definition: headers.hpp:102
@ HSYS_UNKNOWN
Definition: headers.hpp:103
@ HSYS_UNIX
Definition: headers.hpp:103
@ HSYS_WINDOWS
Definition: headers.hpp:103
@ FSREDIR_FILECOPY
Definition: headers.hpp:110
@ FSREDIR_HARDLINK
Definition: headers.hpp:110
@ FSREDIR_WINSYMLINK
Definition: headers.hpp:109
@ FSREDIR_NONE
Definition: headers.hpp:109
@ FSREDIR_UNIXSYMLINK
Definition: headers.hpp:109
@ FSREDIR_JUNCTION
Definition: headers.hpp:109
HEADER_TYPE
Definition: headers.hpp:74
@ HEAD_FILE
Definition: headers.hpp:76
@ HEAD_SERVICE
Definition: headers.hpp:76
@ HEAD_ENDARC
Definition: headers.hpp:77
#define VER_UNKNOWN
Definition: headers.hpp:21
static void ListSymLink(Archive &Arc)
static void ListOldSubHeader(Archive &Arc)
static void ListFileHeader(Archive &Arc, FileHeader &hd, bool &TitleShown, bool Verbose, bool Technical, bool Bare, bool DisableNames)
Definition: list.cpp:188
LISTCOL_TYPE
Definition: list.cpp:183
@ LCOL_SIZE
Definition: list.cpp:184
@ LCOL_PACKED
Definition: list.cpp:184
@ LCOL_ATTR
Definition: list.cpp:184
@ LCOL_CSUM
Definition: list.cpp:184
@ LCOL_ENCR
Definition: list.cpp:184
@ LCOL_RATIO
Definition: list.cpp:184
@ LCOL_NAME
Definition: list.cpp:184
static void ListNewSubHeader(CommandData *Cmd, Archive &Arc)
void ListArchive(CommandData *Cmd)
Definition: list.cpp:9
static void ListFileAttr(uint A, HOST_SYSTEM_TYPE HostType, wchar *AttrStr, size_t AttrSize)
Definition: list.cpp:440
#define MListTitleL
Definition: loclang.hpp:257
#define MListTitleV
Definition: loclang.hpp:258
#define MListRatio
Definition: loclang.hpp:272
#define MListService
Definition: loclang.hpp:284
#define MListNoFiles
Definition: loclang.hpp:292
#define MListAccessed
Definition: loclang.hpp:278
#define MListVolume
Definition: loclang.hpp:252
#define MListAttr
Definition: loclang.hpp:279
#define MListCompInfo
Definition: loclang.hpp:281
#define MListFlags
Definition: loclang.hpp:280
#define MListCreated
Definition: loclang.hpp:277
#define MListStream
Definition: loclang.hpp:268
#define MListJunction
Definition: loclang.hpp:265
#define MListSize
Definition: loclang.hpp:270
#define MListEnc
Definition: loclang.hpp:255
#define MListRR
Definition: loclang.hpp:253
#define MListWSymlink
Definition: loclang.hpp:264
#define MListFileVer
Definition: loclang.hpp:283
#define MListLock
Definition: loclang.hpp:254
#define MListDetails
Definition: loclang.hpp:249
#define MListHostOS
Definition: loclang.hpp:282
#define MVolumeNumber
Definition: loclang.hpp:357
#define MListSFX
Definition: loclang.hpp:251
#define MNotRAR
Definition: loclang.hpp:176
#define MListCopy
Definition: loclang.hpp:267
#define MListType
Definition: loclang.hpp:260
#define MListDir
Definition: loclang.hpp:262
#define MListHardlink
Definition: loclang.hpp:266
#define MListCtime
Definition: loclang.hpp:274
#define MListName
Definition: loclang.hpp:259
#define MListArchive
Definition: loclang.hpp:248
#define MListEncHead
Definition: loclang.hpp:256
#define MListMtime
Definition: loclang.hpp:273
#define MListPacked
Definition: loclang.hpp:271
#define MListUSymlink
Definition: loclang.hpp:263
#define MListAtime
Definition: loclang.hpp:275
#define MListSolid
Definition: loclang.hpp:250
#define MListFile
Definition: loclang.hpp:261
#define MListModified
Definition: loclang.hpp:276
#define MListTarget
Definition: loclang.hpp:269
@ MATCH_WILDSUBPATH
Definition: match.hpp:29
int ParseVersionFileName(wchar *Name, bool Truncate)
Definition: pathfn.cpp:616
#define Min(x, y)
Definition: rardefs.hpp:4
#define ASIZE(x)
Definition: rardefs.hpp:10
#define INT64NDF
Definition: rartypes.hpp:30
wchar_t wchar
Definition: rartypes.hpp:13
int64_t int64
Definition: rartypes.hpp:12
unsigned int uint
Definition: rartypes.hpp:8
const wchar * St(MSGID StringId)
Definition: resource.cpp:8
static byte S[256]
Definition: rijndael.cpp:10
int ToPercentUnlim(int64 N1, int64 N2)
Definition: smallfn.cpp:12
void BinToHex(const byte *Bin, size_t BinSize, char *HexA, wchar *HexW, size_t HexSize)
Definition: strfn.cpp:179
void itoa(int64 n, char *Str, size_t MaxSize)
Definition: strfn.cpp:308
void wcsncpyz(wchar *dest, const wchar *src, size_t maxlen)
Definition: strfn.cpp:275
void strncpyz(char *dest, const char *src, size_t maxlen)
Definition: strfn.cpp:263
const wchar * GetWide(const char *Src)
Definition: strfn.cpp:360
HEADER_TYPE HeaderType
Definition: headers.hpp:141
bool NextVolume
Definition: headers.hpp:273
bool StoreVolNumber
Definition: headers.hpp:276
RarTime atime
Definition: headers.hpp:190
HashValue FileHash
Definition: headers.hpp:196
char UnixOwnerName[256]
Definition: headers.hpp:243
char UnixGroupName[256]
Definition: headers.hpp:243
uint UnixOwnerID
Definition: headers.hpp:248
int64 UnpSize
Definition: headers.hpp:193
bool Solid
Definition: headers.hpp:222
bool UseHashKey
Definition: headers.hpp:214
wchar FileName[NM]
Definition: headers.hpp:184
size_t WinSize
Definition: headers.hpp:226
int64 PackSize
Definition: headers.hpp:192
RarTime ctime
Definition: headers.hpp:189
bool UnixGroupNumeric
Definition: headers.hpp:242
bool UnixOwnerSet
Definition: headers.hpp:242
byte Method
Definition: headers.hpp:179
bool Encrypted
Definition: headers.hpp:205
uint UnpVer
Definition: headers.hpp:178
uint UnixGroupID
Definition: headers.hpp:249
bool Inherited
Definition: headers.hpp:227
bool Dir
Definition: headers.hpp:223
bool CmpName(const wchar *Name)
Definition: headers.hpp:254
bool UnixOwnerNumeric
Definition: headers.hpp:242
wchar RedirName[NM]
Definition: headers.hpp:239
bool Version
Definition: headers.hpp:225
RarTime mtime
Definition: headers.hpp:188
HOST_SYSTEM_TYPE HSType
Definition: headers.hpp:236
byte HostOS
Definition: headers.hpp:177
FILE_SYSTEM_REDIRECT RedirType
Definition: headers.hpp:238
bool SplitBefore
Definition: headers.hpp:200
bool SplitAfter
Definition: headers.hpp:201
uint FileAttr
Definition: headers.hpp:181
byte Digest[SHA256_DIGEST_SIZE]
Definition: hash.hpp:16
HASH_TYPE Type
Definition: hash.hpp:12
uint CRC32
Definition: hash.hpp:15
void Wait()
Definition: system.cpp:80
bool CharToWide(const char *Src, wchar *Dest, size_t DestSize)
Definition: unicode.cpp:85
bool MergeArchive(Archive &Arc, ComprDataIO *DataIO, bool ShowFileName, wchar Command)
Definition: volume.cpp:10