diff options
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/divelist.c b/divelist.c index 953dd7839..18ff99135 100644 --- a/divelist.c +++ b/divelist.c @@ -1098,3 +1098,16 @@ void report_datafile_version(int version) if (min_datafile_version == 0 || min_datafile_version > version) min_datafile_version = version; } + +void clear_dive_file_data() +{ + while (dive_table.nr) + delete_single_dive(0); + while (dive_site_table.nr) + delete_dive_site(get_dive_site(0)->uuid); + + free((void *)existing_filename); + existing_filename = NULL; + + reset_min_datafile_version(); +} |