CCR Patch: Adapt pressure interpolation for CCR

This patch adapts pressure interpolation (function pr_interpolate_data)
in order to process CCR diluent gas as well. A flag diluent_flag is
added to the variables for calling this function indicating whether the
gas being worked with is diluent gas or not. This is necessitated by
the fact that the diluent gas storage is separate from that of the other
gases. The data used for interpolation are selected from the appropriate
array, depending on nthe value of diluent_flag.

In function fill_missing_tank_pressures, diluent_flag is set to 0
in order for the code to work with the current CCR adaptations.

The above constitutes no. 1 of a four-part set of patches that allows
pressure calculations for CCR gases. There will be CCR functionality
only after the whole set of patches is complete.

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add uncompressed Poseidon CCR XML dive log to the directory subsurface/dives.

This file is not in the original unformatted style of Posedon
but in an intermediate XML for developing the Qt interface.
At the end of development this file will be replaced by the
original unformatted dive log.

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
HTML: Save divecomputer data to the HTML exports

Save divecomputers data to the JSON files. and show them in the HTML
dive detailed view.

Fixes #711

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add gaspressures to cmake

Ignoring the fact that cmake is a disgusting pile of crap, let's at least
track the files in our project for the people who want to use it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Default font: more fine tuning

In order to get rid of the old default font on Windows (Calibri) we are
going to near ridiculous length. The reason for this is that we in the
past always saved the default font in the settings (how stupid was that!)
and so now even with a new default font in place, since there is an
explicit font in the settings we take that instead of the default.

Instead of requiring our existing users to use a registry cleaner to get
the correct default font on Windows 7 and later (the VAST majority of our
Windows users at this stage), we simply explicitly ignore that old default
font.

There is one very nasty side effect. A user cannot set Calibri as their
font of choice on Windows 7 or later (because we always force them back
onto Segoe). Given how much nicer Segoe looks I think this is an
acceptable flaw - let's hope this doesn't come back to bite me in the
future.

At the same time this changes the default font size handling. We try to
get the default font size of the OS so the app looks "right". This seems
to not give me the expected result on Linux with KDE, but maybe I'm doing
it wrong? Looks good when testing on Windows.

See #712

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't set up fonts twice

Turns out that the mainwindow reads the settings and sets up things -
except that this has already happened in the constructor of the static
PreferencesDialog. So only keep those parts that aren't handled there.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use one consistent font size throughout the app

Let's see how much people notice it / hate it.

Fixes #712

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Preferences: only save settings that are changed

This continues the effort started earlier to only save things that aren't
the default.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Define PATH_MAX if it's not defined

Fixes FTBFS on Hurd.

[Dirk Hohndel: changed PATH_MAX to 4096 for consistency with Linux]

Signed-off-by: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use compilation flags.

This makes qmake aware of CFLAGS, CXXFLAGS, LDFLAGS, CPPFLAGS.

This is helpful to easily add flags to the compilation (such as
hardening flags).

Signed-off-by: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Updated translations

The change in the French translations fixes the bug where Subsurface
couldn't find images when run in the French locale - the problem was an
incomplete translation string.

Fixes #708

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Zip: add part of the minizip source tree in subsurface

This only adds 4 .c/.h pairs that are needed in ./minizip.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Zip: include the minizip configuration in the .pro and .pri files

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Zip: add the subsurfacezip.c/.h pair

subsurface.c/.h will provide the interface needed for portable
zip operations via zlib.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Zip: include subsurfacezip.c/.h in subsurface.pro

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Zip: initial implementation of the zip interface

Add some method declaration and definitions. Due to how
minizip works there has to be a separate logic for reading
and writing, thus the _read and _write methods.

Note: The _subsurface_zip_close has the '_' prefix for now
due to naming clashes with the OS files (windows.c etc..).
In general this method should be used only for closing files
open by _read and _write while another method _exit should
be used to cleanup the subsurface_zip struct that was open
with _init. To be done on a later stage.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Zip: add body of subsurface_zip_read()

What the function does for now is to open a file and read it's
contents into the minizip mem. I/O interface buffer.
Then it tells minizip to use the memory interface and
loads the contents of the buffer via unzOpen2().

To be further tested.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Zip: add the SUBSURFACE_ZIP_ERROR_NULL case

SUBSURFACE_ZIP_ERROR_NULL would mean that the passed
subsurface_zip struct pointer is NULL.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Zip: fix a NULL check for unzOpen2()

We need to return an error if the result of unzOpen2() is NULL.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Zip: define MAX_PATH if not defined already

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>