diff options
author | Thomas White <taw@physics.org> | 2020-06-12 10:47:55 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:44 +0200 |
commit | d3b90e0194172285b31491fcd7082c2b4d82d788 (patch) | |
tree | 61a66dfafee5f604d58cb52eaac8a576192855f0 /src/list_events.c | |
parent | 7617a4adccf8f6cb3845c1ac018abae949dafef1 (diff) |
Remove events.c, part 1
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); } |