summaryrefslogtreecommitdiffstats
path: root/src/player.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.h')
-rw-r--r--src/player.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/player.h b/src/player.h
index 5f02a1f..607c1c1 100644
--- a/src/player.h
+++ b/src/player.h
@@ -3,6 +3,12 @@
#include "list.h"
#include "util.h"
+#define PLAYER_STATUS(lvl, ...) do { \
+ player.status_lvl = PLAYER_STATUS_MSG_ ## lvl; \
+ if (player.status) free(player.status); \
+ player.status = aprintf(__VA_ARGS__); \
+ } while (0)
+
enum {
PLAYER_STATUS_OK,
PLAYER_STATUS_ERR