/* The following routines are partially supported. */ void SLsmg_write_color_chars (SLsmg_Char_Type *s, unsigned int len) { #if 1 SLsmg_write_raw (s, len); #else SLsmg_Char_Type *smax, sh; char buf[32], *b, *bmax; int color, save_color; if (Smg_Inited == 0) return; smax = s + len; b = buf; bmax = b + sizeof (buf); save_color = This_Color; while (s < smax) { sh = *s++; color = SLSMG_EXTRACT_COLOR(sh); #ifdef REQUIRES_NON_BCE_SUPPORT if (Bce_Color_Offset) { if (color & 0x80) color = ((color & 0x7F) + Bce_Color_Offset) | 0x80; else color = ((color & 0x7F) + Bce_Color_Offset) & 0x7F; } #endif if ((color != This_Color) || (b == bmax)) { if (b != buf) { SLsmg_write_nchars (buf, (int) (b - buf)); b = buf; } This_Color = color; } *b++ = (char) SLSMG_EXTRACT_CHAR(sh); } if (b != buf) SLsmg_write_nchars (buf, (unsigned int) (b - buf)); This_Color = save_color; #endif }
int SLcurses_overlay (SLcurses_Window_Type *swin, SLcurses_Window_Type *dwin) { SLcurses_Char_Type *s, *smax, *d, *dmax; if ((swin == NULL) || (dwin == NULL)) return -1; s = swin->buf; smax = swin->bufmax; d = dwin->buf; dmax = dwin->bufmax; while ((s < smax) && (d < dmax)) { SLcurses_Char_Type ch = *s++; if (SLSMG_EXTRACT_CHAR(ch) != ' ') *d = ch; d++; } return -1; /* not implemented */ }