Changeset 25771 for trunk/ippTools/src/pxmagic.c
- Timestamp:
- Oct 5, 2009, 2:14:21 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pxmagic.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pxmagic.c
r25511 r25771 29 29 #include "pxmagic.h" 30 30 31 bool magicRestoreStage(pxConfig *config, psString stage, psString whereClause, psString newState)31 bool pxmagicRestoreStage(pxConfig *config, psString stage, psString whereClause, psString newState) 32 32 { 33 33 psString queryFile = NULL; … … 66 66 return true; 67 67 } 68 69 bool pxmagicAddWhere(pxConfig *config, psString *out, psString table) 70 { 71 PXOPT_LOOKUP_U64(magicked, config->args, "-magicked", false, false); 72 PXOPT_LOOKUP_BOOL(destreaked, config->args, "-destreaked", false); 73 PXOPT_LOOKUP_BOOL(not_destreaked, config->args, "-not_destreaked", false); 74 75 if (not_destreaked) { 76 if (destreaked) { 77 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -destreaked makes no sense"); 78 return false; 79 } 80 if (magicked) { 81 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -magicked makes no sense"); 82 return false; 83 } 84 psStringAppend(out, " AND %s.magicked = 0", table); 85 } 86 if (destreaked) { 87 psStringAppend(out, " AND %s.magicked != 0", table); 88 } 89 return true; 90 } 91 92 void pxmagicAddArguments(psMetadata *md) 93 { 94 psMetadataAddBool(md, PS_LIST_TAIL, "-destreaked", 0, "search for destreaked images", false); 95 psMetadataAddBool(md, PS_LIST_TAIL, "-not_destreaked", 0, "search for images that have not been destreaked", false); 96 psMetadataAddS64(md, PS_LIST_TAIL, "-magicked", 0, "search by magicked value", 0); 97 }
Note:
See TracChangeset
for help on using the changeset viewer.
