Changeset 7061 for branches/stable_5.0
- Timestamp:
- 27/10/10 14:52:25 (19 months ago)
- Location:
- branches/stable_5.0
- Files:
-
- 2 modified
-
AWT/AWT_query_and_functions.cxx (modified) (2 diffs)
-
PROBE/PT_io.cxx (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/stable_5.0/AWT/AWT_query_and_functions.cxx
r6143 r7061 1155 1155 bool this_hit = (match_field == AQFT_ALL_FIELDS); 1156 1156 1157 char *data = gb_key ? GB_read_as_string(gb_key) : strdup(""); // assume "" for explicit fields that don't exist1158 awt_assert(data);1157 char *data = gb_key ? GB_read_as_string(gb_key) : strdup(""); // assume "" for explicit fields that don't exist 1158 if (!data) error = GB_await_error(); 1159 1159 1160 1160 while (data) { … … 1261 1261 else CLEAR_QUERIED(gb_item, cbs); 1262 1262 1263 if (aw_status(searched_count++/double(item_count))) error = "aborted"; 1263 if (error) { 1264 error = GB_failedTo_error("query", GBT_get_name(gb_item), error); 1265 } 1266 else { 1267 if (aw_status(searched_count++/double(item_count))) error = "aborted"; 1268 } 1264 1269 } 1265 1270 } -
branches/stable_5.0/PROBE/PT_io.cxx
r5941 r7061 176 176 177 177 static char *probe_read_string_append_point(GBDATA *gb_data, int *psize) { 178 long len= GB_read_string_count(gb_data);178 long len = GB_read_string_count(gb_data); 179 179 char *data = GB_read_string(gb_data); 180 180 181 if (data[len - 1] != '.') { 182 char *buffer = (char *) malloc(len + 2); 183 strcpy(buffer, data); 184 buffer[len++] = '.'; 185 buffer[len] = 0; 186 freeset(data, buffer); 187 } 188 *psize = len; 181 if (data) { 182 if (data[len - 1] != '.') { 183 char *buffer = (char *) malloc(len + 2); 184 strcpy(buffer, data); 185 buffer[len++] = '.'; 186 buffer[len] = 0; 187 freeset(data, buffer); 188 } 189 *psize = len; 190 } 191 else { 192 *psize = 0; 193 } 189 194 return data; 190 195 } … … 255 260 } 256 261 else { 257 { 258 int hsize; 259 char *data = probe_read_string_append_point(gb_data, &hsize); 262 int hsize; 263 char *data = probe_read_string_append_point(gb_data, &hsize); 264 265 if (!data) { 266 GB_ERROR error = GB_await_error(); 267 fprintf(stderr, "Could not read data in '%s' for species '%s'\n(Reason: %s)\n", 268 psg.alignment_name, pid.name, error); 269 data_missing++; 270 } 271 else { 260 272 pid.checksum = GB_checksum(data, hsize, 1, ".-"); 261 int size= probe_compress_sequence(data, hsize);273 int size = probe_compress_sequence(data, hsize); 262 274 263 275 pid.data = (char *)gbs_malloc_copy(data, size); 264 276 pid.size = size; 265 277 266 free(data); 278 count ++; 279 if (count%10 == 0) { 280 if (count%500) fputc('.', stdout); 281 else printf(".%6i (%5.1f%%)\n", count, ((double)count/species_count)*100); 282 fflush(stdout); 283 } 267 284 } 268 269 count ++; 270 if (count%10 == 0) { 271 if (count%500) fputc('.', stdout); 272 else printf(".%6i (%5.1f%%)\n", count, ((double)count/species_count)*100); 273 fflush(stdout); 274 } 285 free(data); 275 286 } 276 287 }
