Changeset 25840
- Timestamp:
- Oct 14, 2009, 12:22:54 PM (17 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 11 edited
-
addtool.c (modified) (1 diff)
-
camtool.c (modified) (1 diff)
-
chiptool.c (modified) (1 diff)
-
difftool.c (modified) (1 diff)
-
difftoolConfig.c (modified) (1 diff)
-
faketool.c (modified) (1 diff)
-
faketoolConfig.c (modified) (1 diff)
-
pxtools.c (modified) (2 diffs)
-
pxtools.h (modified) (1 diff)
-
stacktool.c (modified) (1 diff)
-
warptool.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/addtool.c
r25835 r25840 266 266 267 267 // pxUpdateRun gets parameters from config->args and runs the update query 268 bool result = pxUpdateRun(config, where, &query, false);268 bool result = pxUpdateRun(config, where, &query, "addRun", false); 269 269 270 270 psFree(query); -
trunk/ippTools/src/camtool.c
r25835 r25840 265 265 266 266 // pxUpdateRun gets parameters from config->args and updates 267 bool result = pxUpdateRun(config, where, &query, true);267 bool result = pxUpdateRun(config, where, &query, "camRun", true); 268 268 if (!result) { 269 269 psError(PXTOOLS_ERR_DATA, false, "pxUpdateRun failed"); -
trunk/ippTools/src/chiptool.c
r25835 r25840 320 320 321 321 // pxUpdateRun gets parameters from config->args and updates 322 bool result = pxUpdateRun(config, where, &query, true);322 bool result = pxUpdateRun(config, where, &query, "chipRun", true); 323 323 if (!result) { 324 324 psError(PXTOOLS_ERR_DATA, false, "pxUpdateRun failed"); -
trunk/ippTools/src/difftool.c
r25835 r25840 198 198 199 199 // pxUpdateRun gets parameters from config->args and updates 200 bool result = pxUpdateRun(config, where, &query, true);200 bool result = pxUpdateRun(config, where, &query, "diffRun", true); 201 201 202 202 psFree(query); -
trunk/ippTools/src/difftoolConfig.c
r25835 r25840 61 61 // -updaterun 62 62 psMetadata *updaterunArgs = psMetadataAlloc(); 63 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-diff_id", 0, "define diff ID (required)", 0);64 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-state", 0, "set state (required)", NULL);63 psMetadataAddS64(updaterunArgs, PS_LIST_TAIL, "-diff_id", 0, "define diff ID", 0); 64 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-state", 0, "set state", NULL); 65 65 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-label", 0, "define by label instead of diff ID", 0); 66 66 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_label", 0, "define new value for label", 0); -
trunk/ippTools/src/faketool.c
r25835 r25840 346 346 347 347 // pxUpdateRun gets parameters from config->args and updates 348 bool result = pxUpdateRun(config, where, &query, true);348 bool result = pxUpdateRun(config, where, &query, "fakeRun", true); 349 349 if (!result) { 350 350 psError(PXTOOLS_ERR_DATA, false, "pxUpdateRun failed"); -
trunk/ippTools/src/faketoolConfig.c
r25835 r25840 142 142 psMetadataAddF32(updaterunArgs, PS_LIST_TAIL, "-sun_angle_min", 0, "define min solar angle", NAN); 143 143 psMetadataAddF32(updaterunArgs, PS_LIST_TAIL, "-sun_angle_max", 0, "define max solar angle", NAN); 144 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-state", 0, "search by state", NULL); 144 145 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-label", 0, "search by label", NULL); 146 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-data_group", 0, "search by data_group", NULL); 147 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-dist_group", 0, "search by data_group", NULL); 145 148 146 149 psMetadataAddStr(updaterunArgs, PS_LIST_TAIL, "-set_state", 0, "set state", NULL); -
trunk/ippTools/src/pxtools.c
r25835 r25840 110 110 111 111 // shared code for updating the various strings for a Run 112 bool pxUpdateRun(pxConfig *config, psMetadata *where, psString *pQuery, bool has_dist_group)112 bool pxUpdateRun(pxConfig *config, psMetadata *where, psString *pQuery, psString table, bool has_dist_group) 113 113 { 114 114 PS_ASSERT_PTR_NON_NULL(config, false); … … 150 150 char *comma = ","; 151 151 152 # define addColumn(_ val) \152 # define addColumn(_tab, _val) \ 153 153 do { \ 154 154 if (_val) { \ 155 psStringAppend(pQuery, "%s %s = '%s'", separator, #_val, _val); \155 psStringAppend(pQuery, "%s %s.%s = '%s'", separator, _tab, #_val, _val); \ 156 156 separator = comma; \ 157 157 } \ 158 158 } while (0) 159 159 160 addColumn( state);161 addColumn( data_group);160 addColumn(table, state); 161 addColumn(table, data_group); 162 162 if (has_dist_group) { 163 addColumn( dist_group);163 addColumn(table, dist_group); 164 164 } 165 addColumn( note);166 addColumn( label);165 addColumn(table, note); 166 addColumn(table, label); 167 167 168 168 psString whereClause = psDBGenerateWhereSQL(where, NULL); -
trunk/ippTools/src/pxtools.h
r25835 r25840 63 63 bool pxGetOptions(FILE *stream, int argc, char **argv, pxConfig *config, psMetadata *modes, psMetadata *argSets); 64 64 65 bool pxUpdateRun(pxConfig *config, psMetadata *where, psString *pQuery, bool has_dist_group);65 bool pxUpdateRun(pxConfig *config, psMetadata *where, psString *pQuery, psString table, bool has_dist_group); 66 66 67 67 #define PXOPT_ADD_MODE(option, comment, modeval, argset) \ -
trunk/ippTools/src/stacktool.c
r25835 r25840 600 600 601 601 // pxUpdateRun gets parameters from config->args and updates 602 bool result = pxUpdateRun(config, where, &query, true);602 bool result = pxUpdateRun(config, where, &query, "stackRun", true); 603 603 604 604 psFree(query); -
trunk/ippTools/src/warptool.c
r25835 r25840 397 397 398 398 // pxUpdateRun gets parameters from config->args and updates 399 bool result = pxUpdateRun(config, where, &query, true);399 bool result = pxUpdateRun(config, where, &query, "warpRun", true); 400 400 401 401 psFree(query);
Note:
See TracChangeset
for help on using the changeset viewer.
