summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-10-05 08:31:31 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-10-05 08:31:31 -0700
commitd6c2236b8a9e20d22d78de7432f7017a18235619 (patch)
treeaa2c73f2afd72c0d49ffa585dc53d0e4748f4635 /dive.h
parentf4820455e2019c1a9deba7e90ed7f06111a4cb39 (diff)
downloadsubsurface-d6c2236b8a9e20d22d78de7432f7017a18235619.tar.gz
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 <torvalds@linux-foundation.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h2
1 files changed, 1 insertions, 1 deletions
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;
};