Use AL80 as default if no default cylinder is set

Otherwise the user could get uninitialized values for newly created
cylinders.

Fixes #345

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove pointless code

When removing the selected dives from their trips, it makes no sense to
check if the pointer was actually pointing at a valid dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When the user cancels a download, reject already downloaded dives

This seems like the more logical behavior, anyway. Cancel means you didn't
want the result...

Fixes #341

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Actually process the dives downloaded from divelogs.de

Silly mistake in commit 93b5c0cd14fe ("Finish download from divelogs.de"):
parse_file() doesn't call process_dives() - the caller needs to do that.

Fixes #344

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add compact style to the Documentation

The Makefile changes were authored by Dirk, the CSS is based on a public
domain CSS file and authored by Willem

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add some assert guard around gas finding code

The code would have leaved gasidx undefined if it doesn't find a correct
gas, so this asserts instead of using uninitialized variables as array
index.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the air point at 0,0

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Silence signed vs. unsigned compare warning

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make local helpers static

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Calculate gas consumption for planned dives

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we have defined a gas, default to that one.

If we start to define a gas, we should use that one by default instead
of air.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>