MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / IsNewStyleRev

Function IsNewStyleRev

Libraries/unrar/recvol3.cpp:86–99  ·  view source on GitHub ↗

Check for names like arc5_3_1.rev created by RAR 3.0.

Source from the content-addressed store, hash-verified

84
85// Check for names like arc5_3_1.rev created by RAR 3.0.
86static bool IsNewStyleRev(const wchar *Name)
87{
88 wchar *Ext=GetExt(Name);
89 if (Ext==NULL)
90 return true;
91 int DigitGroup=0;
92 for (Ext--;Ext>Name;Ext--)
93 if (!IsDigit(*Ext))
94 if (*Ext=='_' && IsDigit(*(Ext-1)))
95 DigitGroup++;
96 else
97 break;
98 return DigitGroup<2;
99}
100
101
102bool RecVolumes3::Restore(RAROptions *Cmd,const wchar *Name,bool Silent)

Callers 2

RestoreMethod · 0.85
TestMethod · 0.85

Calls 2

GetExtFunction · 0.85
IsDigitFunction · 0.85

Tested by 1

TestMethod · 0.68