Changeset 23873 for trunk/ippTools/src/pxtools.c
- Timestamp:
- Apr 15, 2009, 9:33:58 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pxtools.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pxtools.c
r23123 r23873 50 50 // 'scrubbed' is a virtual state equivalent to cleaned, but allows files to be removed 51 51 // even if the config files is missing 52 53 54 // change the value for tableName.columName from 'full' to 'cleaned' if necessary 55 bool pxSetStateCleaned(const psString tableName, const psString columnName, psArray *rows) 56 { 57 for (long i = 0; i < psArrayLength(rows); i++) { 58 psMetadata *row = rows->data[i]; 59 psString state = psMetadataLookupStr(NULL, row, columnName); 60 if (!state) { 61 psError(PS_ERR_PROGRAMMING, false, "%s not found in row %" PRId64 " of table %s", 62 columnName, i, tableName); 63 return false; 64 } 65 if (!strcmp("full", state)) { 66 // change full to cleaned 67 psMetadataAddStr(row, PS_LIST_TAIL, columnName, PS_META_REPLACE, "", "cleaned"); 68 } else if (strcmp("cleaned", state)) { 69 // if state isn't cleaned or full we can't set it to cleaned 70 psError(PS_ERR_PROGRAMMING, true, "%s with state %s may not be exported cleaned", 71 tableName, state); 72 return false; 73 } 74 } 75 return true; 76 }
Note:
See TracChangeset
for help on using the changeset viewer.
