| 221 | |
| 222 | #if !defined(SFX_MODULE) |
| 223 | void CommandData::ReadConfig() |
| 224 | { |
| 225 | StringList List; |
| 226 | if (ReadTextFile(DefConfigName,&List,true)) |
| 227 | { |
| 228 | wchar *Str; |
| 229 | while ((Str=List.GetString())!=NULL) |
| 230 | { |
| 231 | while (IsSpace(*Str)) |
| 232 | Str++; |
| 233 | if (wcsnicomp(Str,L"switches=",9)==0) |
| 234 | ProcessSwitchesString(Str+9); |
| 235 | if (*Command!=0) |
| 236 | { |
| 237 | wchar Cmd[16]; |
| 238 | wcsncpyz(Cmd,Command,ASIZE(Cmd)); |
| 239 | wchar C0=toupperw(Cmd[0]); |
| 240 | wchar C1=toupperw(Cmd[1]); |
| 241 | if (C0=='I' || C0=='L' || C0=='M' || C0=='S' || C0=='V') |
| 242 | Cmd[1]=0; |
| 243 | if (C0=='R' && (C1=='R' || C1=='V')) |
| 244 | Cmd[2]=0; |
| 245 | wchar SwName[16+ASIZE(Cmd)]; |
| 246 | swprintf(SwName,ASIZE(SwName),L"switches_%ls=",Cmd); |
| 247 | size_t Length=wcslen(SwName); |
| 248 | if (wcsnicomp(Str,SwName,Length)==0) |
| 249 | ProcessSwitchesString(Str+Length); |
| 250 | } |
| 251 | } |
| 252 | } |
| 253 | } |
| 254 | #endif |
| 255 | |
| 256 | |