diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-11-24 12:31:35 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-01-09 20:58:04 -0800 |
commit | 517fb7a462c207e32cc7c5ed50e1e9b1f359dbd8 (patch) | |
tree | 2ce9dd590f60743f5f565af320ea77c474c2e1c4 /core/save-html.c | |
parent | 54fcda4c32029c1afd9eb02fb0c4a5e1949da175 (diff) | |
download | subsurface-517fb7a462c207e32cc7c5ed50e1e9b1f359dbd8.tar.gz |
Core: keep trips in table(s)
Currently, all trips are kept in a linked list. Replace the list
by a table in analogy to dive_table. Use this to keep the trip_table
sorted as suggested by dump_trip_list(). When inserting a trip into
the table do that after adding the dives, to avoid warnings coming
out of dump_trip_list().
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/save-html.c')
-rw-r--r-- | core/save-html.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/save-html.c b/core/save-html.c index ec5751453..aeb74bf95 100644 --- a/core/save-html.c +++ b/core/save-html.c @@ -439,8 +439,8 @@ void write_trips(struct membuffer *b, const char *photos_dir, bool selected_only char sep_ = ' '; char *sep = &sep_; - for (trip = dive_trip_list; trip != NULL; trip = trip->next) - trip->saved = 0; + for (i = 0; i < trip_table.nr; ++i) + trip_table.trips[i]->saved = 0; for_each_dive (i, dive) { trip = dive->divetrip; |