Changeset 18618 for trunk/ippTools/src/difftool.c
- Timestamp:
- Jul 18, 2008, 12:20:51 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/difftool.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/difftool.c
r18615 r18618 293 293 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 294 294 PXOPT_LOOKUP_BOOL(template, config->args, "-template", false); 295 PXOPT_LOOKUP_BOOL(input, config->args, "-input", false); 296 297 if (template && input) { 298 // User apparently wants both, which is the default behaviour 299 template = false; 300 input = false; 301 } 295 302 296 303 // find all rawImfiles matching the default query … … 301 308 } 302 309 303 if (template) {304 // list only faulted rows305 psStringAppend(&query, " %s", "WHERE template != 0");306 } else {307 // don't list faulted rows308 psStringAppend(&query, " %s", "WHERE template = 0");309 }310 311 310 if (psListLength(where->list)) { 312 311 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 313 psStringAppend(&query, " AND%s", whereClause);312 psStringAppend(&query, " WHERE %s", whereClause); 314 313 psFree(whereClause); 315 314 } 315 316 // Add condition to get only templates or only inputs 317 { 318 psString whereClause = NULL; 319 if (template) { 320 psStringAppend(&whereClause, " %s", " template != 0"); 321 } else if (input) { 322 psStringAppend(&whereClause, " %s", " template = 0"); 323 } 324 if (whereClause) { 325 psStringAppend(&query, " %s %s", psListLength(where->list) ? "AND" : "WHERE", whereClause); 326 } 327 psFree(whereClause); 328 } 329 316 330 psFree(where); 317 331
Note:
See TracChangeset
for help on using the changeset viewer.
