Rewriting the error handling in planner.c

Printf is not a way to issue warnings and errors. This is a very late
addition but seems necessary for a viable release of the planner.

This also adds one artificial limit and two warnings:

a) no dives deeper than 400m
b) warning of potentially very long calculation times for dives longer
   than 3h (180min) before the ascent and dives deeper than 150m

It also creates quite a number of new strings that need to be translated
(and marks a few existing ones for translation as well).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-02-13 15:03:25 -08:00
parent 81603510b2
commit 0cde0eff10
2 changed files with 64 additions and 12 deletions

1
dive.h
View file

@ -599,6 +599,7 @@ extern void set_autogroup(gboolean value);
extern int total_weight(struct dive *);
#define DIVE_ERROR_PARSE 1
#define DIVE_ERROR_PLAN 2
const char *weekday(int wday);
const char *monthname(int mon);