From 744b05db5d0b665a7767e92cec432bd494bcff31 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Thu, 11 Jul 2019 17:11:39 -0400 Subject: Output , , in shotty --- bin/shotty.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/bin/shotty.c b/bin/shotty.c index 304be444..d4a7b160 100644 --- a/bin/shotty.c +++ b/bin/shotty.c @@ -231,15 +231,18 @@ static void update(wchar_t ch) { static void html(const struct Style *prev, const struct Cell *cell) { if (!prev || memcmp(&cell->style, prev, sizeof(cell->style))) { - if (prev) printf(""); - printf("style.bold) printf("bold "); - if (cell->style.italic) printf("italic "); - if (cell->style.underline) printf("underline "); + if (prev) { + if (prev->bold) printf(""); + if (prev->italic) printf(""); + if (prev->underline) printf(""); + printf(""); + } uint bg = (cell->style.reverse ? cell->style.fg : cell->style.bg); uint fg = (cell->style.reverse ? cell->style.bg : cell->style.fg); - if (cell->style.bold && fg < 8) fg += 8; - printf("bg%u fg%u\">", bg, fg); + printf("", bg, fg); + if (cell->style.bold) printf(""); + if (cell->style.italic) printf(""); + if (cell->style.underline) printf(""); } switch (cell->ch) { break; case '&': printf("&"); -- cgit 1.4.1 38bee46afe37d867f25268914f896'>refs log tree commit diff homepage
Commit message (Collapse)Author
2017-07-30Support background colorsJune McEnroe
2017-07-30Track color only client-sideJune McEnroe
2017-07-30Add ostensible support for background colorsJune McEnroe
2017-07-30Add tile create and access timestampsJune McEnroe
2017-07-30Assert stable struct Tile field offsetsJune McEnroe
2017-07-30Add chroot.shJune McEnroe
2017-07-30Add ` commandJune McEnroe
2017-07-30Add sshd_configJune McEnroe
2017-07-30Add termcap patchJune McEnroe