aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/planner.h1
-rw-r--r--core/plannernotes.c13
2 files changed, 10 insertions, 4 deletions
diff --git a/core/planner.h b/core/planner.h
index 404fbe3fc..156d39983 100644
--- a/core/planner.h
+++ b/core/planner.h
@@ -50,6 +50,7 @@ extern int get_cylinderid_at_time(struct dive *dive, struct divecomputer *dc, du
extern int get_gasidx(struct dive *dive, struct gasmix mix);
extern bool diveplan_empty(struct diveplan *diveplan);
extern void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_disclaimer, int error);
+extern const char *get_planner_disclaimer();
extern void free_dps(struct diveplan *diveplan);
extern struct dive *planned_dive;
diff --git a/core/plannernotes.c b/core/plannernotes.c
index 96c79f9ba..6714d360a 100644
--- a/core/plannernotes.c
+++ b/core/plannernotes.c
@@ -74,6 +74,14 @@ static void add_icd_entry(struct membuffer *b, struct icd_data *icdvalues, bool
ambientpressure_mbar * -icdvalues->dHe / 5e6f, translate("gettextFromC", "bar"));
}
+const char *get_planner_disclaimer()
+{
+ return translate("gettextFromC", "DISCLAIMER / WARNING: THIS IMPLEMENTATION OF THE %s "
+ "ALGORITHM AND A DIVE PLANNER IMPLEMENTATION BASED ON THAT HAS "
+ "RECEIVED ONLY A LIMITED AMOUNT OF TESTING. WE STRONGLY RECOMMEND NOT TO "
+ "PLAN DIVES SIMPLY BASED ON THE RESULTS GIVEN HERE.");
+}
+
void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_disclaimer, int error)
{
struct membuffer buf = { 0 };
@@ -116,10 +124,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
if (show_disclaimer) {
put_string(&buf, "<div><b>");
- put_format(&buf, translate("gettextFromC", "DISCLAIMER / WARNING: THIS IMPLEMENTATION OF THE %s "
- "ALGORITHM AND A DIVE PLANNER IMPLEMENTATION BASED ON THAT HAS "
- "RECEIVED ONLY A LIMITED AMOUNT OF TESTING. WE STRONGLY RECOMMEND NOT TO "
- "PLAN DIVES SIMPLY BASED ON THE RESULTS GIVEN HERE."), deco);
+ put_format(&buf, get_planner_disclaimer(), deco);
put_string(&buf, "</b><br></div>");
}