# HG changeset patch # User voroshil # Date 1188409393 0 # Node ID e8b635a557813c20233837d1819b56003c338f65 # Parent a12f357e8bd023cef9dc58ff9a65215e332d27b6 Implement Hold/Release graphics (showing control chars as graphics instead of spaces). diff -r a12f357e8bd0 -r e8b635a55781 stream/tvi_vbi.c --- a/stream/tvi_vbi.c Wed Aug 29 17:28:41 2007 +0000 +++ b/stream/tvi_vbi.c Wed Aug 29 17:43:13 2007 +0000 @@ -573,6 +573,8 @@ int row,col; int separated=0; int conceal; + int hold; + tt_char tt_held; for(row=0;row>4; conceal=0; + if(!gfx) hold=0; }else if (c<=0x18){ conceal=1; }else if (c<=0x1a){ //Contiguous/Separated gfx @@ -619,8 +624,15 @@ }else if (c<=0x1d){ bg_color=(c&1)?fg_color:0; p[i].bg=bg_color; + }else{ //Hold/Release Graphics + hold=!(c&1); } p[i].ctl=1; + if(hold || c==0x1f){ + p[i]=tt_held; + p[i].fg=fg_color; + p[i].bg=bg_color; + }else p[i].unicode=p[i].gfx?0:' '; continue; } @@ -631,6 +643,7 @@ }else if(gfx){ p[i].unicode=c-0x20; if (p[i].unicode>0x3f) p[i].unicode-=0x20; + tt_held=p[i]; }else p[i].unicode=conv2uni(c,p[i].lng);