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

Method PreprocessArg

Libraries/unrar/cmddata.cpp:191–218  ·  view source on GitHub ↗

Preprocess those parameters, which must be processed before the rest of command line. Return 'false' to stop further processing.

Source from the content-addressed store, hash-verified

189// Preprocess those parameters, which must be processed before the rest of
190// command line. Return 'false' to stop further processing.
191void CommandData::PreprocessArg(const wchar *Arg)
192{
193 if (IsSwitch(Arg[0]) && !NoMoreSwitches)
194 {
195 Arg++;
196 if (Arg[0]=='-' && Arg[1]==0) // Switch "--".
197 NoMoreSwitches=true;
198 if (wcsicomp(Arg,L"cfg-")==0)
199 ConfigDisabled=true;
200 if (wcsnicomp(Arg,L"ilog",4)==0)
201 {
202 // Ensure that correct log file name is already set
203 // if we need to report an error when processing the command line.
204 ProcessSwitch(Arg);
205 InitLogOptions(LogName,ErrlogCharset);
206 }
207 if (wcsnicomp(Arg,L"sc",2)==0)
208 {
209 // Process -sc before reading any file lists.
210 ProcessSwitch(Arg);
211 if (*LogName!=0)
212 InitLogOptions(LogName,ErrlogCharset);
213 }
214 }
215 else
216 if (*Command==0)
217 wcsncpy(Command,Arg,ASIZE(Command)); // Need for rar.ini.
218}
219#endif
220
221

Callers

nothing calls this directly

Calls 3

wcsicompFunction · 0.85
wcsnicompFunction · 0.85
InitLogOptionsFunction · 0.85

Tested by

no test coverage detected