Make Windows cross compile again

But this is broken as the utf8/utf16 conversions in windows.c are gone
without glib.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Maximum depth of a dive/a series of dives is not show correctly

After selecting a dive or a series of dives, the "Stats" tab shows the
minimum, average and maximum stats for the selected dives. The "Depth"
section does not display the correct value for the maximum depth.

Signed-off-by: Benjamin Fogel <nystire@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
dive.c: fix compile error for missing INT_MAX

file requires <limits.h> to solve:
error: INT_MAX undeclared

gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
ascii_strtod that actually does what we need

Dirk's ascii_strtod was blindly copied from other GPL code and didn't do
what was the main purpose (i.e. ignore the locale and still accept the
numbers we have in our data files).

This implementation does *not* care about INF/NaN, and it does *not* try
to handle some strange conditions (overflow/underflow), and I do *not*
guarantee that it doesn't have rounding issues.

That said, for our native format, we never print odd FP numbers anyway
(since we use fixed-point integer arithmetic), and while we *do* care
about exponents for some of the odder import formats (I remember
seeing them in jdivelog output), we don't care about the crazy cases.
So rather than worry about getting the edge cases right for the max
double exponents (around +-308), it just says "screw you" and gives
you something close enough.

So what it *does* try to do is handle the actual parsing right, and
get the right answer for all the reasonable cases.

Works-For-Me(tm).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Print: allow optional table on top of profile

Patch enables the 'Profile on top' / 'Notes on top'
functionality in the print options dialog.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove feature checking

We needed this in Gtk version as we were using a system font to show the
stars and that was missing on some ancient Windows versions. With the Qt
version we actually draw the stars so this has become obsolete.

Suggested-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Allow passing NULL as second argument to ascii_strtod

We do this in our own sources...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove info.c/info.h

The one remaining helper function in there was moved to maintab.cpp (which
was the one remaining user).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove unused prefs.c

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Minor include file unwinding

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove even more code and declarations

There's lots more stuff that can go.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Implement a qmake-based build for Subsurface

This is working for me, but requires a bit more testing. To build,
run:
  qmake [options]

Where options might be:
  V=1               disable "silent" build
  LIBDCDEVEL=1      use side-by-side libdivecomputer
  INCLUDEPATH+=xxx  add -Ixxx (e.g., INCLUDEPATH+=/usr/local/marble/include)
  LIBS+=xxx         add xxx to the linker flags (e.g. LIBS+=-L/usr/local/marble/lib)
  or any other qmake option, including debug and release options

This new buildsystem does not look for libdivecomputer in
/usr/local. You must either pass LIBDCDEVEL=1 or libdivecomputer will
need to be found via pkg-config.

If your distribution is already using qtchooser in place of qmake, you
may need to pass an extra option to qmake to select the a
cross-build. For example:

  qmake -qt=i686-w64-mingw32-qt4

If your distribution is not yet using qtchooser, then you need to file
a bug report requesting it and you need to run the full path to qmake.

Note:
 - there are some ### left in the buildsystem
 - and version.h is generated at qmake time. It's not updated during make.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Bring back the detection of divecomputer in /usr/local
Implement updating version.h after every commit

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Remove the old buildsystem

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Compile the documentation too
WIP installation rules

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Compile the macos.c, linux.c, windows.c only in their OS

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Add information that goes into the Windows .exe file

And drop the unnecessary .rc file.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
And let qmake create the Mac bundle on its own

It will even parse the Info.plist.in file for us and run sed on it.

Signed-off-by: Thiago Macieira <thiago@macieira.org>