Skip to content

Commit

Permalink
Fix CI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Zirias committed Jul 10, 2024
1 parent df49778 commit 706994c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
16 changes: 5 additions & 11 deletions src/bin/xmoji/valuetypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,11 @@

typedef uint32_t Color;

#define priv_Color_xcbr(x) (x)->red
#define priv_Color_xcbg(x) (x)->green
#define priv_Color_xcbb(x) (x)->blue
#define priv_Color_xcba(x) (x)->alpha
#define priv_Color_comp(c,a,s) _Generic(c, \
Color *: ((*(c) >> s) & 0xffU), \
xcb_render_color_t *: ((a((xcb_render_color_t *)c) + 0x80U) >> 8))
#define Color_red(c) priv_Color_comp(&(c), priv_Color_xcbr, 24)
#define Color_green(c) priv_Color_comp(&(c), priv_Color_xcbg, 16)
#define Color_blue(c) priv_Color_comp(&(c), priv_Color_xcbb, 8)
#define Color_alpha(c) priv_Color_comp(&(c), priv_Color_xcba, 0)
#define priv_Color_comp(c,s) (((c) >> s) & 0xffU)
#define Color_red(c) priv_Color_comp(c, 24)
#define Color_green(c) priv_Color_comp(c, 16)
#define Color_blue(c) priv_Color_comp(c, 8)
#define Color_alpha(c) priv_Color_comp(c, 0)

#define priv_Color_16(c) ((c) << 8 | (c))
#define Color_red16(c) priv_Color_16(Color_red(c))
Expand Down
4 changes: 2 additions & 2 deletions tools/emojigen/src/emojigen.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ int main(void)
if (!groupsize || !emojisize) goto done;
group->len = emojisize - group->start;

puts("static const EmojiGroup groups[];\n"
"static const Emoji emojis[] = {");
printf("static const EmojiGroup groups[%zu];\n"
"static const Emoji emojis[] = {\n", groupsize);

for (size_t i = 0; i < emojisize; ++i)
{
Expand Down

0 comments on commit 706994c

Please sign in to comment.