From 53cb5a2a0d1540a37e6e5d1c1673e8354d5208a5 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Sat, 26 Feb 2022 00:41:29 +0100 Subject: Migrate away from wchar_t, default to utf8 --- src/cmd.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/cmd.h') diff --git a/src/cmd.h b/src/cmd.h index 205f6a7..4cb56d5 100644 --- a/src/cmd.h +++ b/src/cmd.h @@ -1,7 +1,6 @@ #pragma once -#include - +#include #include #define CMD_SET_STATUS(...) do { \ @@ -9,21 +8,21 @@ cmd_status = aprintf(__VA_ARGS__); \ } while (0) -typedef bool (*cmd_func)(const wchar_t *args); +typedef bool (*cmd_func)(const char *args); struct cmd { - const wchar_t *name; + const char *name; cmd_func func; }; void cmd_init(void); void cmd_deinit(void); -bool cmd_run(const wchar_t *name); +bool cmd_run(const char *name, bool *found); bool cmd_rerun(void); -const struct cmd *cmd_get(const wchar_t *name); -const struct cmd *cmd_find(const wchar_t *name); +const struct cmd *cmd_get(const char *name); +const struct cmd *cmd_find(const char *name); extern const struct cmd commands[]; extern const size_t command_count; -- cgit v1.2.3-71-gd317