From a5d54b04a7ff02f40537193181d00c3dadf59317 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Wed, 29 Mar 2017 21:25:30 +0200 Subject: Handle notes from planner New strategy to identify old planner output in notes when replanning a dive: Text anchors ("*!*" and "***") added for planner output For backwards compatibility: If there is no anchor but an old table delete everything. Signed-off-by: Stefan Fuchs --- core/planner.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/planner.c') diff --git a/core/planner.c b/core/planner.c index aa58552d2..e57bd10ed 100644 --- a/core/planner.c +++ b/core/planner.c @@ -588,10 +588,10 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool return; } - len = show_disclaimer ? snprintf(buffer, sz_buffer, "
%s
", disclaimer) : 0; + len = show_disclaimer ? snprintf(buffer, sz_buffer, "
*!* %s
", disclaimer) : 0; if (diveplan->surface_interval > 60) { - len += snprintf(buffer + len, sz_buffer - len, "
%s (%s) %s %d:%02d) %s %s
", + len += snprintf(buffer + len, sz_buffer - len, "
*** %s (%s) %s %d:%02d) %s %s
", translate("gettextFromC", "Subsurface"), subsurface_canonical_version(), translate("gettextFromC", "dive plan
(surface interval "), @@ -599,7 +599,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool translate("gettextFromC", "created on"), get_current_date()); } else { - len += snprintf(buffer + len, sz_buffer - len, "
%s (%s) %s %s
", + len += snprintf(buffer + len, sz_buffer - len, "
*** %s (%s) %s %s
", translate("gettextFromC", "Subsurface"), subsurface_canonical_version(), translate("gettextFromC", "dive plan
created on"), -- cgit v1.2.3-70-g09d2