mirror of
https://github.com/tmux/tmux.git
synced 2026-09-05 21:20:45 +00:00
Move RB_GENERATE_STATIC to top of file.
This commit is contained in:
24
image.c
24
image.c
@@ -101,6 +101,18 @@ static const struct image_backend image_backend_sixel = {
|
||||
sixel_free_output, sixel_geometry_changed
|
||||
};
|
||||
|
||||
/* Compare images by server ID. */
|
||||
static int
|
||||
image_cmp(struct image *a, struct image *b)
|
||||
{
|
||||
if (a->id < b->id)
|
||||
return (-1);
|
||||
if (a->id > b->id)
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
RB_GENERATE_STATIC(images, image, entry, image_cmp);
|
||||
|
||||
/* Find the image backend supported by a terminal. */
|
||||
static const struct image_backend *
|
||||
image_tty_find_backend(struct tty *tty)
|
||||
@@ -164,18 +176,6 @@ image_tty_free(struct tty *tty, int send)
|
||||
tty->image_data = NULL;
|
||||
}
|
||||
|
||||
/* Compare images by server ID. */
|
||||
static int
|
||||
image_cmp(struct image *a, struct image *b)
|
||||
{
|
||||
if (a->id < b->id)
|
||||
return (-1);
|
||||
if (a->id > b->id)
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
RB_GENERATE_STATIC(images, image, entry, image_cmp);
|
||||
|
||||
/* Average a rectangle of image pixels into one fallback sample. */
|
||||
static void
|
||||
image_sample(struct image *im, uint64_t sample_x, uint64_t sample_y,
|
||||
|
||||
Reference in New Issue
Block a user