CCR code: Change to sample structure

1) All the variables in the sample structures are strongly typed
2) Two additional types were declared in units.h:
     o2pressure_t
     bearing_t
3) The following variables were added:
     diluentpressure
     o2setpoint
     o2sensor[3]
4) Changes to a number of files were made to chanf
     sample->po2 to sample->po2.mbar
     bearing to bearring.degrees

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When calculating the maximum of unsigned values, use unsigned variable

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Ask before discarding edits

This is equivalent to what we do for the planner.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Dive edit: don't free the taglist of the master dive

We do all of our edits on a copy of the dive - but the tag_list points to
the tag_list of the master dive (based on how we create that copy of the
master dive). So only free the tag_list if it is already different from
the master dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Dive edit: avoid memory leaks

If we edit any of these fields, we create new strings via strdup (or a
fresh tag_list). So if the edits are rejected, free all that memory.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Dive edit: when asked ti quit while editing, offer to discard current edit

This is equivalent behavior to what we do when planning a dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Closing the window should behave like triggering Quit

It seems odd to have different behavior depending on whether the window
manager tells us that the user wants to close the window or whether the
user hits quit or ctrl-q.

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