From 81e9b230ca40e4c713c209f81c3a35faeb62bb26 Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Sat, 20 Jan 2018 13:59:41 +0100 Subject: [PATCH] Planner notes ICD: Format HTML with DIV, do table title differently In the planner notes format the HTML for different sections with div tags. Put the table title for the ICD table outside the table because then the alignment looks a little bit nicer. Signed-off-by: Stefan Fuchs --- core/plannernotes.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/core/plannernotes.c b/core/plannernotes.c index 311fb2ab0..d324b7a01 100644 --- a/core/plannernotes.c +++ b/core/plannernotes.c @@ -168,10 +168,9 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d if ((dive->cylinder[icyl].cylinder_use == OC_GAS) && (get_he(&dive->cylinder[icyl].gasmix) > 0)) { istrimix = true; icdlen = 0; - icdlen += snprintf(icdbuffer + icdlen, sz_icdbuf - icdlen, - "", + icdlen += snprintf(icdbuffer + icdlen, sz_icdbuf - icdlen, "
%s:", translate("gettextFromC","Isobaric counterdiffusion information")); - icdlen += snprintf(icdbuffer + icdlen, sz_icdbuf - icdlen, "
", + icdlen += snprintf(icdbuffer + icdlen, sz_icdbuf - icdlen, "
%s:
%s
", translate("gettextFromC", "runtime")); icdlen += snprintf(icdbuffer + icdlen, sz_icdbuf - icdlen, "", translate("gettextFromC", "gaschange")); @@ -534,7 +533,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d } } /* Gas consumption: Now finally print all strings to output */ - len += snprintf(buffer + len, sz_buffer - len, "%s%s%s
", temp, warning, mingas); + len += snprintf(buffer + len, sz_buffer - len, "%s%s%s
", temp, warning, mingas); } /* For trimix OC dives, add the ICD table here */ @@ -546,7 +545,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d translate("gettextFromC", "Warning:"), translate("gettextFromC", "Isobaric counterdiffusion conditions exceeded")); } - len += snprintf(buffer + len, sz_buffer - len, "
"); // ... and add a line break + len += snprintf(buffer + len, sz_buffer - len, "
"); } /* Print warnings for pO2 */ @@ -564,7 +563,8 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d int decimals; double depth_value = get_depth_units(dp->depth.mm, &decimals, &depth_unit); len = strlen(buffer); - if (!o2warning_exist) len += snprintf(buffer + len, sz_buffer - len, "
"); + if (!o2warning_exist) + len += snprintf(buffer + len, sz_buffer - len, "
"); o2warning_exist = true; snprintf(temp, sz_temp, translate("gettextFromC", "high pO₂ value %.2f at %d:%02u with gas %s at depth %.*f %s"), @@ -576,7 +576,8 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d int decimals; double depth_value = get_depth_units(dp->depth.mm, &decimals, &depth_unit); len = strlen(buffer); - if (!o2warning_exist) len += snprintf(buffer + len, sz_buffer - len, "
"); + if (!o2warning_exist) + len += snprintf(buffer + len, sz_buffer - len, "
"); o2warning_exist = true; snprintf(temp, sz_temp, translate("gettextFromC", "low pO₂ value %.2f at %d:%02u with gas %s at depth %.*f %s"),
%s%s