summaryrefslogtreecommitdiffstats
path: root/src/cmd.h
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2022-02-21 17:17:08 +0100
committerLouis Burda <quent.burda@gmail.com>2022-02-21 17:17:42 +0100
commitbb0f1e2ea23bb278f02c2a4ff19e5c6fa6946b92 (patch)
tree80b504c8f853f9e8308b511ea2fca57177610a6c /src/cmd.h
parenta1e28b9eb1c89a37d24ad50feb203f99504274b2 (diff)
downloadtmus-bb0f1e2ea23bb278f02c2a4ff19e5c6fa6946b92.tar.gz
tmus-bb0f1e2ea23bb278f02c2a4ff19e5c6fa6946b92.zip
Bug fixes, added select track shortcut and reindex command
Diffstat (limited to 'src/cmd.h')
-rw-r--r--src/cmd.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cmd.h b/src/cmd.h
index 26f572b..4327545 100644
--- a/src/cmd.h
+++ b/src/cmd.h
@@ -4,6 +4,11 @@
#include <stdbool.h>
+#define CMD_SET_STATUS(...) do { \
+ free(cmd_status); \
+ cmd_status = aprintf(__VA_ARGS__); \
+ } while (0)
+
typedef bool (*cmd_func)(const wchar_t *args);
struct cmd {
@@ -12,7 +17,8 @@ struct cmd {
};
void cmd_init(void);
+void cmd_deinit(void);
extern const struct cmd commands[];
extern const size_t command_count;
-extern wchar_t *cmd_status;
+extern char *cmd_status;