Pārlūkot izejas kodu

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

it breaks on too many IRC clients.
tags/v0.99.beta14
Sam Hocevar sam pirms 18 gadiem
vecāks
revīzija
e68c0f92b8
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. +9
    -0
      cucul/export.c

+ 9
- 0
cucul/export.c Parādīt failu

@@ -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;


Notiek ielāde…
Atcelt
Saglabāt