[READ-ONLY] Mirror of https://github.com/bombshell-dev/tty. Platform independent 2D layout engine for terminal applications based on Clay bomb.sh/docs/tty
Something went wrong. Try again.
C
1234567891011121314151617/* cell.c — cell buffer operations */
#include "cell.h"
void cells_fill(Cell *buf, int w, int h, uint32_t ch, uint32_t fg, uint32_t bg) { for (int i = 0; i < w * h; i++) { buf[i].ch = ch; buf[i].fg = fg; buf[i].bg = bg; }}
int cell_cmp(Cell *a, Cell *b) { return a->ch != b->ch || a->fg != b->fg || a->bg != b->bg;}