aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/opendeco.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/opendeco.c')
-rw-r--r--src/opendeco.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/opendeco.c b/src/opendeco.c
index b57004b..b2431d5 100644
--- a/src/opendeco.c
+++ b/src/opendeco.c
@@ -6,7 +6,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <wchar.h>
#include "deco.h"
#include "opendeco-cli.h"
@@ -55,15 +54,15 @@ void print_gas_use(void)
{
static char gasbuf[12];
- wprintf(L"\nRMV dive: %.2f%lc/min\n", RMV_DIVE, LTR);
- wprintf(L"RMV deco: %.2f%lc/min\n\n", RMV_DECO, LTR);
+ printf("\nRMV dive: %.2f%s/min\n", RMV_DIVE, LTR);
+ printf("RMV deco: %.2f%s/min\n\n", RMV_DECO, LTR);
- wprintf(L"Gas use:\n", RMV_DECO, LTR);
+ printf("Gas use:\n");
for (int i = 0; i < 10; i++) {
if (gas_usage[i].gas) {
format_gas(gasbuf, len(gasbuf), gas_usage[i].gas);
strcat(gasbuf, ":");
- wprintf(L"%-12s%5i%lc\n", gasbuf, (int) ceil(gas_usage[i].usage), LTR);
+ printf("%-12s%5i%sn", gasbuf, (int) ceil(gas_usage[i].usage), LTR);
}
}
}
@@ -73,7 +72,7 @@ void print_segment_callback_fn(const decostate_t *ds, segtype_t type, void *arg)
static double last_depth;
static double last_runtime;
- wchar_t sign;
+ char *sign;
double time_diff;
/* first time initialization */
@@ -126,12 +125,12 @@ int parse_gasses(gas_t **gasses, char *str)
*gasses = realloc(*gasses, nof_gasses * sizeof(gas_t));
if (*gasses == NULL) {
- wprintf(L"Cannot reserve space. Aborting!\n");
+ printf("Cannot reserve space. Aborting!\n");
exit(EXIT_FAILURE);
}
if (scan_gas(&(*gasses)[nof_gasses - 1], token)) {
- wprintf(L"Invalid gas (%s). Aborting!\n", token);
+ printf("Invalid gas (%s). Aborting!\n", token);
exit(EXIT_FAILURE);
}
}
@@ -198,7 +197,7 @@ int main(int argc, char *argv[])
init_decostate(&ds, arguments.gflow, arguments.gfhigh, xsw_to_bar(msw_or_fsw(3, 10)));
if (scan_gas(&bottom_gas, arguments.gas)) {
- wprintf(L"Invalid gas (%s). Aborting!\n", arguments.gas);
+ printf("Invalid gas (%s). Aborting!\n", arguments.gas);
exit(EXIT_FAILURE);
}
@@ -233,7 +232,7 @@ int main(int argc, char *argv[])
decoinfo_t di_p5 = calc_deco(&ds_p5, deco_gasses, nof_gasses, NULL);
/* output deco info and disclaimer */
- wprintf(L"\nNDL: %imin TTS: %imin TTS @+5: %imin\n", (int) floor(di.ndl), (int) ceil(di.tts),
+ printf("\nNDL: %imin TTS: %imin TTS @+5: %imin\n", (int) floor(di.ndl), (int) ceil(di.tts),
(int) ceil(di_p5.tts));
print_planfoot(&ds);
print_gas_use();