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

Method ProcessSwitch

Libraries/unrar/cmddata.cpp:272–891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270
271#if !defined(SFX_MODULE)
272void CommandData::ProcessSwitch(const wchar *Switch)
273{
274
275 switch(toupperw(Switch[0]))
276 {
277 case '@':
278 ListMode=Switch[1]=='+' ? RCLM_ACCEPT_LISTS:RCLM_REJECT_LISTS;
279 break;
280 case 'A':
281 switch(toupperw(Switch[1]))
282 {
283 case 'C':
284 ClearArc=true;
285 break;
286 case 'D':
287 if (Switch[2]==0)
288 AppendArcNameToPath=APPENDARCNAME_DESTPATH;
289 else
290 if (Switch[2]=='1')
291 AppendArcNameToPath=APPENDARCNAME_OWNDIR;
292 break;
293#ifndef SFX_MODULE
294 case 'G':
295 if (Switch[2]=='-' && Switch[3]==0)
296 GenerateArcName=0;
297 else
298 if (toupperw(Switch[2])=='F')
299 wcsncpyz(DefGenerateMask,Switch+3,ASIZE(DefGenerateMask));
300 else
301 {
302 GenerateArcName=true;
303 wcsncpyz(GenerateMask,Switch+2,ASIZE(GenerateMask));
304 }
305 break;
306#endif
307 case 'I':
308 IgnoreGeneralAttr=true;
309 break;
310 case 'N': // Reserved for archive name.
311 break;
312 case 'O':
313 AddArcOnly=true;
314 break;
315 case 'P':
316 wcsncpyz(ArcPath,Switch+2,ASIZE(ArcPath));
317 break;
318 case 'S':
319 SyncFiles=true;
320 break;
321 default:
322 BadSwitch(Switch);
323 break;
324 }
325 break;
326 case 'C':
327 if (Switch[2]==0)
328 switch(toupperw(Switch[1]))
329 {

Callers

nothing calls this directly

Calls 15

toupperwFunction · 0.85
wcsncpyzFunction · 0.85
cleandataFunction · 0.85
wcsnicompFunction · 0.85
wcsicompFunction · 0.85
SetConsoleMsgStreamFunction · 0.85
IsDigitFunction · 0.85
atoiwFunction · 0.85
IsWildcardFunction · 0.85
ReadTextFileFunction · 0.85
InitSystemOptionsFunction · 0.85
SetPriorityFunction · 0.85

Tested by

no test coverage detected