* @brief Parse native WinMerge command line. * @param [in] p Points into the command line. */
| 211 | * @param [in] p Points into the command line. |
| 212 | */ |
| 213 | void MergeCmdLineInfo::ParseWinMergeCmdLine(const tchar_t *q) |
| 214 | { |
| 215 | String param; |
| 216 | bool flag; |
| 217 | |
| 218 | while ((q = EatParam(q, param, &flag)) != 0) |
| 219 | { |
| 220 | if (!flag) |
| 221 | { |
| 222 | // Its not a flag so it is a path |
| 223 | AddPath(param); |
| 224 | } |
| 225 | else if (param == _T("?")) |
| 226 | { |
| 227 | // -? to show common command line arguments. |
| 228 | m_bShowUsage = true; |
| 229 | } |
| 230 | else if (param == _T("o")) |
| 231 | { |
| 232 | // -o "outputfilename" |
| 233 | q = EatParam(q, m_sOutputpath); |
| 234 | } |
| 235 | else if (param == _T("or")) |
| 236 | { |
| 237 | // -or "reportfilename" |
| 238 | q = EatParam(q, m_sReportFile); |
| 239 | } |
| 240 | else if (param == _T("dl")) |
| 241 | { |
| 242 | // -dl "desc" - description for left file |
| 243 | q = EatParam(q, m_sLeftDesc); |
| 244 | } |
| 245 | else if (param == _T("dm")) |
| 246 | { |
| 247 | // -dr "desc" - description for middle file |
| 248 | q = EatParam(q, m_sMiddleDesc); |
| 249 | } |
| 250 | else if (param == _T("dr")) |
| 251 | { |
| 252 | // -dr "desc" - description for right file |
| 253 | q = EatParam(q, m_sRightDesc); |
| 254 | } |
| 255 | else if (param == _T("e")) |
| 256 | { |
| 257 | // -e to allow closing with single esc press |
| 258 | m_bEscShutdown = true; |
| 259 | } |
| 260 | else if (param == _T("f")) |
| 261 | { |
| 262 | // -f "mask" - file filter mask ("*.h *.cpp") |
| 263 | q = EatParam(q, m_sFileFilter); |
| 264 | } |
| 265 | else if (param == _T("t")) |
| 266 | { |
| 267 | // -t "type" - window type |
| 268 | q = EatParam(q, param); |
| 269 | param = strutils::makelower(param); |
| 270 | if (param == _T("automatic")) |
nothing calls this directly
no test coverage detected