diff options
Diffstat (limited to 'src/list_events.c')
-rw-r--r-- | src/list_events.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/list_events.c b/src/list_events.c index fc3d3411..84465dc5 100644 --- a/src/list_events.c +++ b/src/list_events.c @@ -154,26 +154,28 @@ int main(int argc, char *argv[]) rval = fgets(filename, 1024, ifh); if ( rval != NULL ) { - struct event_list *evlist; + char **evlist; + int num_events; chomp(filename); - evlist = image_expand_frames(dtempl, filename); + evlist = image_expand_frames(dtempl, filename, + &num_events); if ( evlist == NULL ) { ERROR("Failed to read %s\n", filename); return 1; } - for ( i=0; i<evlist->num_events; i++ ) { - char *str = get_event_string(evlist->events[i]); - fprintf(ofh, "%s %s\n", filename, str); - free(str); + for ( i=0; i<num_events; i++ ) { + fprintf(ofh, "%s %s\n", + filename, evlist[i]); + free(evlist[i]); } - STATUS("%i events found in %s\n", evlist->num_events, - filename); + STATUS("%i events found in %s\n", + num_events, filename); - free_event_list(evlist); + free(evlist); } |