Changeset 7036 for trunk/ippTools/src/guidetool.c
- Timestamp:
- May 1, 2006, 4:14:28 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/guidetool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/guidetool.c
r6991 r7036 10 10 static bool pendingMode(pxConfig *config); 11 11 static bool defineMode(pxConfig *config); 12 static p1PendingExpRow *rawScienceTop1PendingExp( rawScienceExpRow *raw);12 static p1PendingExpRow *rawScienceTop1PendingExp(pxConfig *config, rawScienceExpRow *raw); 13 13 14 14 int main(int argc, char **argv) … … 42 42 PS_ASSERT_PTR_NON_NULL(config, false); 43 43 44 psArray *p1PendingExp = p1PendingExpSelectRowObjects(config->dbh, NULL, 0); 44 // return all p1PendingExp rows unless there CLI search options 45 psArray *p1PendingExp = p1PendingExpSelectRowObjects( 46 config->dbh, 47 config->where ? config->where : NULL, 48 0 49 ); 45 50 if (!p1PendingExp) { 46 51 psError(PS_ERR_UNKNOWN, false, "no p1PendingExp found"); … … 69 74 { 70 75 PS_ASSERT_PTR_NON_NULL(config, false); 76 77 // return all rawScienceExp rows unless there CLI search options 78 psArray *rawScienceExps = rawScienceExpSelectRowObjects( 79 config->dbh, 80 config->where ? config->where : NULL, 81 0 82 ); 83 84 // insert the rawScienceExps into p1PendingExp 85 // XXX for the being we're going to skip checking for duplicate entries 86 // XXX this will have to implimented unless duplicate key insertion 87 // XXX support is implimented in psDB 88 for (long i = 0; i < psArrayLength(rawScienceExps); i++) { 89 p1PendingExpRow * new = rawScienceTop1PendingExp( 90 config, rawScienceExps->data[i]); 91 if (!p1PendingExpInsertObject(config->dbh, new)) { 92 psError(PS_ERR_UNKNOWN, false, "dbh access failed"); 93 return false; 94 } 95 psFree(new); 96 } 71 97 72 98 return true; 73 99 } 74 100 75 static p1PendingExpRow *rawScienceTop1PendingExp( rawScienceExpRow *raw)101 static p1PendingExpRow *rawScienceTop1PendingExp(pxConfig *config, rawScienceExpRow *raw) 76 102 { 77 103 return p1PendingExpRowAlloc( … … 82 108 // newExp->class, 83 109 raw->imfiles, 84 "my filter",85 "my stats",86 "my recipe", 87 0xff // XXX calc version number110 raw->filter, 111 raw->stats, 112 "my recipe", //recipe 113 0xff // XXX calc version number 88 114 ); 89 115 }
Note:
See TracChangeset
for help on using the changeset viewer.
