Changeset 20936 for trunk/Ohana/src/opihi/dvo/dbCmdlineFields.c
- Timestamp:
- Dec 7, 2008, 3:31:01 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/dbCmdlineFields.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/dbCmdlineFields.c
r19579 r20936 77 77 status = ParseAverageField (&fields[Nfields], field); 78 78 } 79 if (table == DVO_TABLE_IMAGE) { 80 status = ParseImageField (&fields[Nfields], field); 81 } 79 82 if (!status) { 80 gprint (GP_ERR, "unknown database field %s\n", field);81 83 free (field); 82 84 dbFreeFields (fields, Nfields); … … 143 145 REALLOCATE (*stack, dbStack, N + 20); 144 146 147 Rname = Dname = NULL; 148 if (table == DVO_TABLE_MEASURE) { 149 Rname = strcreate ("RA:AVE"); 150 Dname = strcreate ("DEC:AVE"); 151 } 145 152 if (table == DVO_TABLE_AVERAGE) { 146 153 Rname = strcreate ("RA"); 147 154 Dname = strcreate ("DEC"); 148 } else { 149 Rname = strcreate ("RA:AVE"); 150 Dname = strcreate ("DEC:AVE"); 151 } 155 } 156 if (table == DVO_TABLE_IMAGE) { 157 Rname = strcreate ("RA"); 158 Dname = strcreate ("DEC"); 159 } 160 if (Rname == NULL) return (FALSE); 152 161 153 162 // add: ((ra > rmin) && (ra < rmax) && (dec > dmin) && (dec < dmax)) … … 155 164 156 165 stack[0][N + 0].name = strcreate (Rname); 157 stack[0][N + 0].type = 'X';166 stack[0][N + 0].type = DB_STACK_VALUE; 158 167 stack[0][N + 1].name = strfloat (Rmin); 159 stack[0][N + 1].type = 'X';168 stack[0][N + 1].type = DB_STACK_VALUE; 160 169 stack[0][N + 2].name = strcreate (">"); 161 stack[0][N + 2].type = 4; 162 // stack[0][N + 3].name = strcreate ("A"); 163 // stack[0][N + 3].type = 3; 170 stack[0][N + 2].type = DB_STACK_COMPARE; 164 171 165 172 stack[0][N + 3].name = strcreate (Rname); 166 stack[0][N + 3].type = 'X';173 stack[0][N + 3].type = DB_STACK_VALUE; 167 174 stack[0][N + 4].name = strfloat (Rmax); 168 stack[0][N + 4].type = 'X';175 stack[0][N + 4].type = DB_STACK_VALUE; 169 176 stack[0][N + 5].name = strcreate ("<"); 170 stack[0][N + 5].type = 4;177 stack[0][N + 5].type = DB_STACK_COMPARE; 171 178 stack[0][N + 6].name = strcreate ("A"); 172 stack[0][N + 6].type = 3;179 stack[0][N + 6].type = DB_STACK_LOGIC; 173 180 174 181 stack[0][N + 7].name = strcreate (Dname); 175 stack[0][N + 7].type = 'X';182 stack[0][N + 7].type = DB_STACK_VALUE; 176 183 stack[0][N + 8].name = strfloat (Dmin); 177 stack[0][N + 8].type = 'X';184 stack[0][N + 8].type = DB_STACK_VALUE; 178 185 stack[0][N + 9].name = strcreate (">"); 179 stack[0][N + 9].type = 4;186 stack[0][N + 9].type = DB_STACK_COMPARE; 180 187 stack[0][N + 10].name = strcreate ("A"); 181 stack[0][N + 10].type = 3;188 stack[0][N + 10].type = DB_STACK_LOGIC; 182 189 183 190 stack[0][N + 11].name = strcreate (Dname); 184 stack[0][N + 11].type = 'X';191 stack[0][N + 11].type = DB_STACK_VALUE; 185 192 stack[0][N + 12].name = strfloat (Dmax); 186 stack[0][N + 12].type = 'X';193 stack[0][N + 12].type = DB_STACK_VALUE; 187 194 stack[0][N + 13].name = strcreate ("<"); 188 stack[0][N + 13].type = 4;195 stack[0][N + 13].type = DB_STACK_COMPARE; 189 196 stack[0][N + 14].name = strcreate ("A"); 190 stack[0][N + 14].type = 3;197 stack[0][N + 14].type = DB_STACK_LOGIC; 191 198 192 199 if (N == 0) { … … 194 201 } else { 195 202 stack[0][N + 15].name = strcreate ("A"); 196 stack[0][N + 15].type = 3;203 stack[0][N + 15].type = DB_STACK_LOGIC; 197 204 N += 16; 198 205 }
Note:
See TracChangeset
for help on using the changeset viewer.
