From d6c2236b8a9e20d22d78de7432f7017a18235619 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 5 Oct 2011 08:31:31 -0700 Subject: Automatically renumber new dives when they are "obvious". When importing (or reading xml from files) new dives, we now renumber them based on preexisting dive data, *if* such re-numbering is obvious. NOTE! In order to be "obvious", there can be no overlap between old and new dives: all the new dives have to come at the end. That's what happens with a normal libdivecomputer import, since we cut the import short when we find a preexisting dive. But if any of the new dives overlap the old dives in any way, or already have been numbered separately, the automatic renumbering is not done, and you need to do a manual renumber. Signed-off-by: Linus Torvalds --- dive.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dive.h') diff --git a/dive.h b/dive.h index 40fc5ca2c..5b7f4658b 100644 --- a/dive.h +++ b/dive.h @@ -201,7 +201,7 @@ extern struct units input_units, output_units; extern int verbose; struct dive_table { - int nr, allocated; + int nr, allocated, preexisting; struct dive **dives; }; -- cgit v1.2.3-70-g09d2