summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
Diffstat (limited to 'stream')
-rw-r--r--stream/tvi_vbi.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/stream/tvi_vbi.c b/stream/tvi_vbi.c
index 6088acfd14..6d877d6899 100644
--- a/stream/tvi_vbi.c
+++ b/stream/tvi_vbi.c
@@ -645,21 +645,14 @@ static void render2text(tt_page* pt,FILE* f,int colored){
for(j=0;j<VBI_COLUMNS;j++)
{
u=dp[i*VBI_COLUMNS+j].unicode;
- switch(dp[i*VBI_COLUMNS+j].fg){
- case 0 ... 7:
+ if(dp[i*VBI_COLUMNS+j].fg <= 7)
c1=30+dp[i*VBI_COLUMNS+j].fg;
- break;
- default:
+ else
c1=38;
- break;
- }
- switch(dp[i*VBI_COLUMNS+j].bg){
- case 0 ... 7:
+ if(dp[i*VBI_COLUMNS+j].bg <= 7)
b1=40+dp[i*VBI_COLUMNS+j].bg;
- break;
- default:
+ else
b1=40;
- }
if (b1!=bkg && colored){
fprintf(f,"\033[%dm",b1);
bkg=b1;