Browse Source

* Disabled the foreground/background optimisation in the IRC export because

it breaks on too many IRC clients.
tags/v0.99.beta14
Sam Hocevar sam 18 years ago
parent
commit
e68c0f92b8
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      cucul/export.c

+ 9
- 0
cucul/export.c View File

@@ -407,6 +407,7 @@ static void export_irc(cucul_canvas_t *cv, cucul_buffer_t *ex)
uint8_t bg = palette[_cucul_argb32_to_ansi4bg(lineattr[x])];
uint32_t ch = linechar[x];

#if 0
if(bg == prevbg)
{
if(fg == prevfg)
@@ -430,6 +431,14 @@ static void export_irc(cucul_canvas_t *cv, cucul_buffer_t *ex)
if(ch >= (uint32_t)'0' && ch <= (uint32_t)'9')
cur += sprintf(cur, "\x02\x02");
}
#else
if(bg != prevbg || fg != prevfg)
{
cur += sprintf(cur, "\x03%d,%d", fg, bg);
if(ch >= (uint32_t)'0' && ch <= (uint32_t)'9')
cur += sprintf(cur, "\x02\x02");
}
#endif
*cur++ = ch & 0x7f;
prevfg = fg;
prevbg = bg;


Loading…
Cancel
Save