aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/output.c')
-rw-r--r--src/output.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/output.c b/src/output.c
index 07eacbe..cb3b281 100644
--- a/src/output.c
+++ b/src/output.c
@@ -76,12 +76,12 @@ match:
void print_planhead(void)
{
- wprintf(L"DIVE PLAN\n\n");
- wprintf(L" %-1s %6s %8s %-7s %1s %-9s %4s %5s\n", "", "Depth", "Duration", "Runtime", "", "Gas", "pO2",
+ printf("DIVE PLAN\n\n");
+ printf(" %-1s %6s %8s %-7s %1s %-9s %4s %5s\n", "", "Depth", "Duration", "Runtime", "", "Gas", "pO2",
"EAD");
}
-void print_planline(wchar_t sign, double depth, double time, double runtime, const gas_t *gas)
+void print_planline(char *sign, double depth, double time, double runtime, const gas_t *gas)
{
static char gasbuf[11];
static char runbuf[8];
@@ -94,7 +94,7 @@ void print_planline(wchar_t sign, double depth, double time, double runtime, con
const int depth_x = round(bar_to_xsw(gauge_depth(depth)));
const int ead_x = round(bar_to_xsw(max(0, gauge_depth(ead(depth, gas)))));
- wchar_t swi = L' ';
+ char *swi = " ";
snprintf(runbuf, len(runbuf), "(%i)", (int) ceil(runtime));
format_gas(gasbuf, len(gasbuf), gas);
@@ -107,7 +107,7 @@ void print_planline(wchar_t sign, double depth, double time, double runtime, con
}
/* only print ead and pO2 on stops */
- if (sign == LVL) {
+ if (!strcmp(sign, LVL)) {
snprintf(eadbuf, 6, "%3i%s", ead_x, DEPTHUNIT);
snprintf(pO2buf, 5, "%4.2f", ppO2(depth, gas));
} else {
@@ -115,7 +115,7 @@ void print_planline(wchar_t sign, double depth, double time, double runtime, con
snprintf(pO2buf, 5, "%4s", "-");
}
- wprintf(L" %lc %4i%2s %8s %-7s %lc %-9s %s %s\n", sign, depth_x, DEPTHUNIT, timbuf, runbuf, swi, gasbuf,
+ printf(" %s %4i%2s %8s %-7s %s %-9s %s %s\n", sign, depth_x, DEPTHUNIT, timbuf, runbuf, swi, gasbuf,
pO2buf, eadbuf);
}
@@ -142,12 +142,12 @@ void print_planfoot(const decostate_t *ds)
else
rq = "???";
- wprintf(L"\nDeco model: Buhlmann %s\n", model);
- wprintf(L"Conservatism: GF %i/%i, Rq = %s\n", ds->gflo, ds->gfhi, rq);
- wprintf(L"Surface pressure: %4.3fbar\n", SURFACE_PRESSURE);
+ printf("\nDeco model: Buhlmann %s\n", model);
+ printf("Conservatism: GF %i/%i, Rq = %s\n", ds->gflo, ds->gfhi, rq);
+ printf("Surface pressure: %4.3fbar\n", SURFACE_PRESSURE);
}
void print_disclaimer(void)
{
- wprintf(L"\nWARNING: DIVE PLAN MAY BE INACCURATE AND MAY CONTAIN\nERRORS THAT COULD LEAD TO INJURY OR DEATH.\n");
+ printf("\nWARNING: DIVE PLAN MAY BE INACCURATE AND MAY CONTAIN\nERRORS THAT COULD LEAD TO INJURY OR DEATH.\n");
}