From b1037f5d632c445536b8ff684b317ded8dccd2ec Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Thu, 24 Oct 2024 11:10:55 +0200 Subject: [PATCH] loadfile: reuse circle definitions in command.h --- player/command.c | 8 ++------ player/command.h | 4 ++++ player/loadfile.c | 2 -- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/player/command.c b/player/command.c index 3f0870798b..e4f7341496 100644 --- a/player/command.c +++ b/player/command.c @@ -157,15 +157,11 @@ struct load_action { bool play; }; -// U+25CB WHITE CIRCLE -// U+25CF BLACK CIRCLE // U+00A0 NO-BREAK SPACE -#define WHITECIRCLE "\xe2\x97\x8b" -#define BLACKCIRCLE "\xe2\x97\x8f" #define NBSP "\xc2\xa0" -const char list_current[] = BLACKCIRCLE NBSP; -const char list_normal[] = WHITECIRCLE NBSP; +const char list_current[] = BLACK_CIRCLE NBSP; +const char list_normal[] = WHITE_CIRCLE NBSP; static int edit_filters(struct MPContext *mpctx, struct mp_log *log, enum stream_type mediatype, diff --git a/player/command.h b/player/command.h index 6022e0dcd0..24e3e8f98a 100644 --- a/player/command.h +++ b/player/command.h @@ -122,6 +122,10 @@ void mark_seek(struct MPContext *mpctx); void mp_abort_cache_dumping(struct MPContext *mpctx); +// U+25CB WHITE CIRCLE +// U+25CF BLACK CIRCLE +#define WHITE_CIRCLE "\xe2\x97\x8b" +#define BLACK_CIRCLE "\xe2\x97\x8f" char *mp_format_track_metadata(void *ctx, struct track *t); #endif /* MPLAYER_COMMAND_H */ diff --git a/player/loadfile.c b/player/loadfile.c index d1fac68231..d8e29716c2 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -234,8 +234,6 @@ static void uninit_demuxer(struct MPContext *mpctx) talloc_free(demuxers); } -#define BLACK_CIRCLE "\xe2\x97\x8f" -#define WHITE_CIRCLE "\xe2\x97\x8b" #define APPEND(s, ...) mp_snprintf_cat(s, sizeof(s), __VA_ARGS__) #define FILL(s, n) mp_snprintf_cat(s, sizeof(s), "%*s", n, "")