Fix an issue with trips that have dives from multiple input files

The existing code didn't handle the case of different trips for the same
date coming from different sources. It also got confused if the first dive
processed (which is, chronologically, the last dive) happened to be a
"NOTRIP" dive.

This commit adds a bit of debugging infrastructure for the trip handling,
too.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2012-08-27 15:29:40 -07:00
parent 6500e943c1
commit 9cf961249e
3 changed files with 38 additions and 6 deletions

View file

@ -41,7 +41,7 @@ void record_dive(struct dive *dive)
void record_trip(struct dive *trip)
{
dive_trip_list = INSERT_TRIP(trip, dive_trip_list);
dive_trip_list = insert_trip(trip, dive_trip_list);
}
static void delete_dive_renumber(struct dive **dives, int i, int nr)