diff options
| author | Louis Burda <quent.burda@gmail.com> | 2022-02-26 00:41:29 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2022-02-26 00:41:47 +0100 |
| commit | 53cb5a2a0d1540a37e6e5d1c1673e8354d5208a5 (patch) | |
| tree | 60664a2db1d96c3269578d2a3e0f9b6fff439845 /src/cmd.h | |
| parent | 3dad446ab7a6e207229b56af552dd3304a9ab11b (diff) | |
| download | tmus-53cb5a2a0d1540a37e6e5d1c1673e8354d5208a5.tar.gz tmus-53cb5a2a0d1540a37e6e5d1c1673e8354d5208a5.zip | |
Migrate away from wchar_t, default to utf8
Diffstat (limited to 'src/cmd.h')
| -rw-r--r-- | src/cmd.h | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -1,7 +1,6 @@ #pragma once -#include <wchar.h> - +#include <stdlib.h> #include <stdbool.h> #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; |
