Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 167742 Details for
Bug 240702
media-plugins/vdr-osdteletext kills vdr-1.6.0, when TTXT is non-ASCII and channel is not FTA
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for correction of non-ASCII characters in teletext
vdr-osdteletext-0.5.1-nonASCII.patch (text/plain), 71.31 KB, created by
J.Taimr
on 2008-10-09 15:31:40 UTC
(
hide
)
Description:
patch for correction of non-ASCII characters in teletext
Filename:
MIME Type:
Creator:
J.Taimr
Created:
2008-10-09 15:31:40 UTC
Size:
71.31 KB
patch
obsolete
>diff -uNr osdteletext-0.5.1.orig/displaybase.c osdteletext-0.5.1/displaybase.c >--- osdteletext-0.5.1.orig/displaybase.c 2005-04-21 19:28:41.000000000 +0200 >+++ osdteletext-0.5.1/displaybase.c 2005-11-10 22:33:39.000000000 +0100 >@@ -17,6 +17,9 @@ > #include <time.h> > #include "displaybase.h" > #include "txtfont.h" >+#include <vdr/tools.h> >+#include <exception> >+#include "txtrecv.h" > > > cDisplay::cDisplay(int width, int height) { >@@ -227,7 +230,7 @@ > } > > cRenderPage::RenderTeletextCode(PageCode+12); >- >+ > #ifdef timingdebug > t.Stop("Render Teletext"); > #endif >@@ -298,7 +301,7 @@ > unsigned int buffer[10]; > unsigned int *charmap; > cBitmap *bm; >- >+ > // Get character face: > charmap=GetFontChar(c,buffer); > if (!charmap) { >@@ -319,6 +322,7 @@ > // Virtual box area of the character > cBox box; > box.SetToCharacter(x,y); >+ > > // OSD top left pixel of char > cVirtualCoordinate TopLeft; >@@ -349,7 +353,7 @@ > // Now draw the character. Start at the top left corner, and walk > // through all pixels on OSD. To speed up, keep one pointer to OSD pixel > // and one to virtual box coordinates, and move them together. >- >+ > cVirtualCoordinate p=BMTopLeft; > while (p.VirtY<=box.YMax) { > // run through OSD lines >@@ -411,6 +415,7 @@ > } > // .. and display > Flush(); >+ > } > > void cDisplay::DrawClock() { >@@ -430,6 +435,7 @@ > > if (!osd) return; > >+ > HoldFlush(); > // Hold flush until done > >@@ -474,6 +480,8 @@ > > // And flush all changes > ReleaseFlush(); >+ >+ > } > > void cDisplay::ClearMessage() { >diff -uNr osdteletext-0.5.1.orig/display.h osdteletext-0.5.1/display.h >--- osdteletext-0.5.1.orig/display.h 2005-04-21 19:28:41.000000000 +0200 >+++ osdteletext-0.5.1/display.h 2005-11-09 20:24:54.000000000 +0100 >@@ -46,11 +46,11 @@ > inline bool GetBlink() > { if (display) return display->GetBlink(); else return false; } > inline bool SetBlink(bool blink) >- { if (display) display->SetBlink(blink); else return false; } >+ { if (display) return display->SetBlink(blink); else return false; } > inline bool GetConceal() > { if (display) return display->GetConceal(); else return false; } > inline bool SetConceal(bool conceal) >- { if (display) display->SetConceal(conceal); else return false; } >+ { if (display) return display->SetConceal(conceal); else return false; } > inline cDisplay::enumZoom GetZoom() > { if (display) return display->GetZoom(); else return cDisplay::Zoom_Off; } > inline void SetZoom(cDisplay::enumZoom zoom) >diff -uNr osdteletext-0.5.1.orig/hamm.c osdteletext-0.5.1/hamm.c >--- osdteletext-0.5.1.orig/hamm.c 1970-01-01 01:00:00.000000000 +0100 >+++ osdteletext-0.5.1/hamm.c 2005-11-09 20:34:01.000000000 +0100 >@@ -0,0 +1,256 @@ >+#include "hamm.h" >+ >+ >+ >+ >+unsigned char invtab[256] = { >+ 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, >+ 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, >+ 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, >+ 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, >+ 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, >+ 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, >+ 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, >+ 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, >+ 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, >+ 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, >+ 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, >+ 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, >+ 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, >+ 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, >+ 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, >+ 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, >+ 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, >+ 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, >+ 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, >+ 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, >+ 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, >+ 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, >+ 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, >+ 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, >+ 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, >+ 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, >+ 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, >+ 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, >+ 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, >+ 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, >+ 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, >+ 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff, >+}; >+ >+ >+// table to decode hamm8/4 encoded bytes. >+// the low 4 bits are the (corrected) data bits >+// bit 8 is set if there was a single bit error >+// bit 12 is set if there was an uncorrectable error >+ >+// the idea: you may add up to 15 words and get the >+// number of single bit errors in b8-b11 and the number >+// of double errors in b12-b15 >+ >+unsigned short hammtab[256] = >+{ >+ 0x0101, 0x100f, 0x0001, 0x0101, 0x100f, 0x0100, 0x0101, 0x100f, >+ 0x100f, 0x0102, 0x0101, 0x100f, 0x010a, 0x100f, 0x100f, 0x0107, >+ 0x100f, 0x0100, 0x0101, 0x100f, 0x0100, 0x0000, 0x100f, 0x0100, >+ 0x0106, 0x100f, 0x100f, 0x010b, 0x100f, 0x0100, 0x0103, 0x100f, >+ 0x100f, 0x010c, 0x0101, 0x100f, 0x0104, 0x100f, 0x100f, 0x0107, >+ 0x0106, 0x100f, 0x100f, 0x0107, 0x100f, 0x0107, 0x0107, 0x0007, >+ 0x0106, 0x100f, 0x100f, 0x0105, 0x100f, 0x0100, 0x010d, 0x100f, >+ 0x0006, 0x0106, 0x0106, 0x100f, 0x0106, 0x100f, 0x100f, 0x0107, >+ 0x100f, 0x0102, 0x0101, 0x100f, 0x0104, 0x100f, 0x100f, 0x0109, >+ 0x0102, 0x0002, 0x100f, 0x0102, 0x100f, 0x0102, 0x0103, 0x100f, >+ 0x0108, 0x100f, 0x100f, 0x0105, 0x100f, 0x0100, 0x0103, 0x100f, >+ 0x100f, 0x0102, 0x0103, 0x100f, 0x0103, 0x100f, 0x0003, 0x0103, >+ 0x0104, 0x100f, 0x100f, 0x0105, 0x0004, 0x0104, 0x0104, 0x100f, >+ 0x100f, 0x0102, 0x010f, 0x100f, 0x0104, 0x100f, 0x100f, 0x0107, >+ 0x100f, 0x0105, 0x0105, 0x0005, 0x0104, 0x100f, 0x100f, 0x0105, >+ 0x0106, 0x100f, 0x100f, 0x0105, 0x100f, 0x010e, 0x0103, 0x100f, >+ 0x100f, 0x010c, 0x0101, 0x100f, 0x010a, 0x100f, 0x100f, 0x0109, >+ 0x010a, 0x100f, 0x100f, 0x010b, 0x000a, 0x010a, 0x010a, 0x100f, >+ 0x0108, 0x100f, 0x100f, 0x010b, 0x100f, 0x0100, 0x010d, 0x100f, >+ 0x100f, 0x010b, 0x010b, 0x000b, 0x010a, 0x100f, 0x100f, 0x010b, >+ 0x010c, 0x000c, 0x100f, 0x010c, 0x100f, 0x010c, 0x010d, 0x100f, >+ 0x100f, 0x010c, 0x010f, 0x100f, 0x010a, 0x100f, 0x100f, 0x0107, >+ 0x100f, 0x010c, 0x010d, 0x100f, 0x010d, 0x100f, 0x000d, 0x010d, >+ 0x0106, 0x100f, 0x100f, 0x010b, 0x100f, 0x010e, 0x010d, 0x100f, >+ 0x0108, 0x100f, 0x100f, 0x0109, 0x100f, 0x0109, 0x0109, 0x0009, >+ 0x100f, 0x0102, 0x010f, 0x100f, 0x010a, 0x100f, 0x100f, 0x0109, >+ 0x0008, 0x0108, 0x0108, 0x100f, 0x0108, 0x100f, 0x100f, 0x0109, >+ 0x0108, 0x100f, 0x100f, 0x010b, 0x100f, 0x010e, 0x0103, 0x100f, >+ 0x100f, 0x010c, 0x010f, 0x100f, 0x0104, 0x100f, 0x100f, 0x0109, >+ 0x010f, 0x100f, 0x000f, 0x010f, 0x100f, 0x010e, 0x010f, 0x100f, >+ 0x0108, 0x100f, 0x100f, 0x0105, 0x100f, 0x010e, 0x010d, 0x100f, >+ 0x100f, 0x010e, 0x010f, 0x100f, 0x010e, 0x000e, 0x100f, 0x010e, >+}; >+ >+ >+ >+ >+// this table generates the parity checks for hamm24/18 decoding. >+// bit 0 is for test A, 1 for B, ... >+// thanks to R. Gancarz for this fine table *g* >+ >+char hamm24par[3][256] = >+{ >+ { // parities of first byte >+ 0, 33, 34, 3, 35, 2, 1, 32, 36, 5, 6, 39, 7, 38, 37, 4, >+ 37, 4, 7, 38, 6, 39, 36, 5, 1, 32, 35, 2, 34, 3, 0, 33, >+ 38, 7, 4, 37, 5, 36, 39, 6, 2, 35, 32, 1, 33, 0, 3, 34, >+ 3, 34, 33, 0, 32, 1, 2, 35, 39, 6, 5, 36, 4, 37, 38, 7, >+ 39, 6, 5, 36, 4, 37, 38, 7, 3, 34, 33, 0, 32, 1, 2, 35, >+ 2, 35, 32, 1, 33, 0, 3, 34, 38, 7, 4, 37, 5, 36, 39, 6, >+ 1, 32, 35, 2, 34, 3, 0, 33, 37, 4, 7, 38, 6, 39, 36, 5, >+ 36, 5, 6, 39, 7, 38, 37, 4, 0, 33, 34, 3, 35, 2, 1, 32, >+ 40, 9, 10, 43, 11, 42, 41, 8, 12, 45, 46, 15, 47, 14, 13, 44, >+ 13, 44, 47, 14, 46, 15, 12, 45, 41, 8, 11, 42, 10, 43, 40, 9, >+ 14, 47, 44, 13, 45, 12, 15, 46, 42, 11, 8, 41, 9, 40, 43, 10, >+ 43, 10, 9, 40, 8, 41, 42, 11, 15, 46, 45, 12, 44, 13, 14, 47, >+ 15, 46, 45, 12, 44, 13, 14, 47, 43, 10, 9, 40, 8, 41, 42, 11, >+ 42, 11, 8, 41, 9, 40, 43, 10, 14, 47, 44, 13, 45, 12, 15, 46, >+ 41, 8, 11, 42, 10, 43, 40, 9, 13, 44, 47, 14, 46, 15, 12, 45, >+ 12, 45, 46, 15, 47, 14, 13, 44, 40, 9, 10, 43, 11, 42, 41, 8 >+ }, { // parities of second byte >+ 0, 41, 42, 3, 43, 2, 1, 40, 44, 5, 6, 47, 7, 46, 45, 4, >+ 45, 4, 7, 46, 6, 47, 44, 5, 1, 40, 43, 2, 42, 3, 0, 41, >+ 46, 7, 4, 45, 5, 44, 47, 6, 2, 43, 40, 1, 41, 0, 3, 42, >+ 3, 42, 41, 0, 40, 1, 2, 43, 47, 6, 5, 44, 4, 45, 46, 7, >+ 47, 6, 5, 44, 4, 45, 46, 7, 3, 42, 41, 0, 40, 1, 2, 43, >+ 2, 43, 40, 1, 41, 0, 3, 42, 46, 7, 4, 45, 5, 44, 47, 6, >+ 1, 40, 43, 2, 42, 3, 0, 41, 45, 4, 7, 46, 6, 47, 44, 5, >+ 44, 5, 6, 47, 7, 46, 45, 4, 0, 41, 42, 3, 43, 2, 1, 40, >+ 48, 25, 26, 51, 27, 50, 49, 24, 28, 53, 54, 31, 55, 30, 29, 52, >+ 29, 52, 55, 30, 54, 31, 28, 53, 49, 24, 27, 50, 26, 51, 48, 25, >+ 30, 55, 52, 29, 53, 28, 31, 54, 50, 27, 24, 49, 25, 48, 51, 26, >+ 51, 26, 25, 48, 24, 49, 50, 27, 31, 54, 53, 28, 52, 29, 30, 55, >+ 31, 54, 53, 28, 52, 29, 30, 55, 51, 26, 25, 48, 24, 49, 50, 27, >+ 50, 27, 24, 49, 25, 48, 51, 26, 30, 55, 52, 29, 53, 28, 31, 54, >+ 49, 24, 27, 50, 26, 51, 48, 25, 29, 52, 55, 30, 54, 31, 28, 53, >+ 28, 53, 54, 31, 55, 30, 29, 52, 48, 25, 26, 51, 27, 50, 49, 24 >+ }, { // parities of third byte >+ 63, 14, 13, 60, 12, 61, 62, 15, 11, 58, 57, 8, 56, 9, 10, 59, >+ 10, 59, 56, 9, 57, 8, 11, 58, 62, 15, 12, 61, 13, 60, 63, 14, >+ 9, 56, 59, 10, 58, 11, 8, 57, 61, 12, 15, 62, 14, 63, 60, 13, >+ 60, 13, 14, 63, 15, 62, 61, 12, 8, 57, 58, 11, 59, 10, 9, 56, >+ 8, 57, 58, 11, 59, 10, 9, 56, 60, 13, 14, 63, 15, 62, 61, 12, >+ 61, 12, 15, 62, 14, 63, 60, 13, 9, 56, 59, 10, 58, 11, 8, 57, >+ 62, 15, 12, 61, 13, 60, 63, 14, 10, 59, 56, 9, 57, 8, 11, 58, >+ 11, 58, 57, 8, 56, 9, 10, 59, 63, 14, 13, 60, 12, 61, 62, 15, >+ 31, 46, 45, 28, 44, 29, 30, 47, 43, 26, 25, 40, 24, 41, 42, 27, >+ 42, 27, 24, 41, 25, 40, 43, 26, 30, 47, 44, 29, 45, 28, 31, 46, >+ 41, 24, 27, 42, 26, 43, 40, 25, 29, 44, 47, 30, 46, 31, 28, 45, >+ 28, 45, 46, 31, 47, 30, 29, 44, 40, 25, 26, 43, 27, 42, 41, 24, >+ 40, 25, 26, 43, 27, 42, 41, 24, 28, 45, 46, 31, 47, 30, 29, 44, >+ 29, 44, 47, 30, 46, 31, 28, 45, 41, 24, 27, 42, 26, 43, 40, 25, >+ 30, 47, 44, 29, 45, 28, 31, 46, 42, 27, 24, 41, 25, 40, 43, 26, >+ 43, 26, 25, 40, 24, 41, 42, 27, 31, 46, 45, 28, 44, 29, 30, 47 >+ } >+}; >+ >+ >+ >+// table to extract the lower 4 bit from hamm24/18 encoded bytes >+ >+char hamm24val[256] = >+{ >+ 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, >+ 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, >+ 4, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 4, 5, 5, 5, 5, >+ 6, 6, 6, 6, 7, 7, 7, 7, 6, 6, 6, 6, 7, 7, 7, 7, >+ 8, 8, 8, 8, 9, 9, 9, 9, 8, 8, 8, 8, 9, 9, 9, 9, >+ 10, 10, 10, 10, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11, 11, 11, >+ 12, 12, 12, 12, 13, 13, 13, 13, 12, 12, 12, 12, 13, 13, 13, 13, >+ 14, 14, 14, 14, 15, 15, 15, 15, 14, 14, 14, 14, 15, 15, 15, 15, >+ 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, >+ 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, >+ 4, 4, 4, 4, 5, 5, 5, 5, 4, 4, 4, 4, 5, 5, 5, 5, >+ 6, 6, 6, 6, 7, 7, 7, 7, 6, 6, 6, 6, 7, 7, 7, 7, >+ 8, 8, 8, 8, 9, 9, 9, 9, 8, 8, 8, 8, 9, 9, 9, 9, >+ 10, 10, 10, 10, 11, 11, 11, 11, 10, 10, 10, 10, 11, 11, 11, 11, >+ 12, 12, 12, 12, 13, 13, 13, 13, 12, 12, 12, 12, 13, 13, 13, 13, >+ 14, 14, 14, 14, 15, 15, 15, 15, 14, 14, 14, 14, 15, 15, 15, 15 >+}; >+ >+ >+ >+// mapping from parity checks made by table hamm24par to error >+// results return by hamm24. >+// (0 = no error, 0x0100 = single bit error, 0x1000 = double error) >+ >+short hamm24err[64] = >+{ >+ 0x0000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, >+ 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, >+ 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, >+ 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, >+ 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, >+ 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, >+ 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, >+ 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, >+}; >+ >+ >+ >+// mapping from parity checks made by table hamm24par to faulty bit >+// in the decoded 18 bit word. >+ >+int hamm24cor[64] = >+{ >+ 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, >+ 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, >+ 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, >+ 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, >+ 0x00000, 0x00000, 0x00000, 0x00001, 0x00000, 0x00002, 0x00004, 0x00008, >+ 0x00000, 0x00010, 0x00020, 0x00040, 0x00080, 0x00100, 0x00200, 0x00400, >+ 0x00000, 0x00800, 0x01000, 0x02000, 0x04000, 0x08000, 0x10000, 0x20000, >+ 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, 0x00000, >+}; >+ >+int >+hamm8(unsigned char *p, int *err) >+{ >+ int a = hammtab[p[0]]; >+ *err += a; >+ return a & 15; >+} >+ >+int >+hamm16(unsigned char *p, int *err) >+{ >+ int a = hammtab[p[0]]; >+ int b = hammtab[p[1]]; >+ *err += a; >+ *err += b; >+ return (a & 15) | (b & 15) * 16; >+} >+ >+int >+hamm24(unsigned char *p, int *err) >+{ >+ int e = hamm24par[0][p[0]] ^ hamm24par[1][p[1]] ^ hamm24par[2][p[2]]; >+ int x = hamm24val[p[0]] + p[1] % 128 * 16 + p[2] % 128 * 2048; >+ >+ *err += hamm24err[e]; >+ return x ^ hamm24cor[e]; >+} >+ >+int >+chk_parity(unsigned char *p, int n) >+{ >+ int err; >+ >+ for (err = 0; n--; p++) >+ if (hamm24par[0][*p] & 32) >+ *p &= 0x7f; >+ else >+ *p = 0xb8, err++; >+ return err; >+} >+ >+unsigned char >+doinvert(unsigned char p) >+{ >+ return invtab[p]; >+} >+ >+ >diff -uNr osdteletext-0.5.1.orig/hamm.h osdteletext-0.5.1/hamm.h >--- osdteletext-0.5.1.orig/hamm.h 1970-01-01 01:00:00.000000000 +0100 >+++ osdteletext-0.5.1/hamm.h 2005-11-09 20:33:53.000000000 +0100 >@@ -0,0 +1,12 @@ >+#ifndef HAMM_H >+#define HAMM_H >+ >+ >+int hamm8(unsigned char *p, int *err); >+int hamm16(unsigned char *p, int *err); >+int hamm24(unsigned char *p, int *err); >+int chk_parity(unsigned char *p, int n); >+unsigned char doinvert(unsigned char p); >+ >+ >+#endif >diff -uNr osdteletext-0.5.1.orig/i18n.c osdteletext-0.5.1/i18n.c >--- osdteletext-0.5.1.orig/i18n.c 2008-10-08 20:09:47.000000000 +0200 >+++ osdteletext-0.5.1/i18n.c 2006-02-21 21:57:30.000000000 +0100 >@@ -26,6 +26,10 @@ > "", //Hugarian > "Pàgina", //Catalan > "ÁâàÐÝØæÐ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Strana", > }, > { "not found", //English > "nicht gefunden", //German >@@ -44,6 +48,10 @@ > "", //Hugarian > "no trobada", //Catalan > "ÝÕ ÝÐÙÔÕÝÐ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "nebyla nalezena", > }, > { "Teletext (OSD)", //English > "Videotext (OSD)", //German >@@ -62,6 +70,10 @@ > "", //Hugarian > "Teletext (OSD)", //Catalan > "ÂÕÛÕâÕÚáâ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Teletext (OSD)", > }, > { "Zoom", //English > "Vergrößern", //German >@@ -80,6 +92,10 @@ > "", //Hugarian > "Zoom", //Catalan > "ãÒÕÛØçØâì", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Zvìt¹it", > }, > { "Half page", //English > "Halbe Seite", //German >@@ -98,6 +114,10 @@ > "", //Hugarian > "Mitja pàgina", //Catalan > "ßÞÛ-áâàÐÝØæë", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Pùl stránky", > }, > { "Change channel", //English > "Kanal wechseln", //German >@@ -116,6 +136,10 @@ > "", //Hugarian > "Canvi cadena", //Catalan > "ßÕàÕÚÛîçØâì ÚÐÝÐÛ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Zmìnit kanál", > }, > { "Jump to...", //English > "Springe zu...", //German >@@ -134,6 +158,10 @@ > "", //Hugarian > "Salta a...", //Catalan > "ßÕàÕÙâØ Ú...", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Skoèit na...", > }, > { "Background transparency", //English > "Hintergrund-Transparenz", //German >@@ -152,6 +180,10 @@ > "", //Hugarian > "Transparència del fons", //Catalan > "ÁâÕßÕÝì ßàÞ×àÐçÝÞáâØ äÞÝÐ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Prùhlednost pozadí", > }, > { "Red key", //English > "Rote Taste", //German >@@ -170,6 +202,10 @@ > "", //Hugarian > "Tecla vermella", //Catalan > "ºàÐáÝÐï ÚÝÞßÚÐ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Èervená klávesa", > }, > { " Page number", //English > " Seitenzahl", //German >@@ -188,6 +224,10 @@ > "", //Hugarian > " Nombre de pàgina", //Catalan > " ½ÞÜÕà áâàÐÝØæë", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ " Èíslo stránky", > }, > { "Green key", //English > "Grüne Taste", //German >@@ -206,6 +246,10 @@ > "", //Hugarian > "Tecla verda", //Catalan > "·ÕÛñÝÐï ÚÝÞßÚÐ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Zelená klávesa", > }, > { "Yellow key", //English > "Gelbe Taste", //German >@@ -224,6 +268,10 @@ > "", //Hugarian > "Tecla groga", //Catalan > "¶ñÛâÐï ÚÝÞßÚÐ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "®lutá klávesa", > }, > { "Blue key", //English > "Blaue Taste", //German >@@ -242,6 +290,10 @@ > "", //Hugarian > "Tecla blava", //Catalan > "ÁØÝïï ÚÝÞßÚÐ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Modrá klávesa", > }, > { "Channel (press OK): ", //English > "Sender (OK drücken): ", //German >@@ -260,6 +312,10 @@ > "", //Hugarian > "Canal (premi OK):", //Catalan > "ºÐÝÐÛ (½ÐÖÜØâÕ ¾º)", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Kanál (stisknout OK)", > }, > { "Show clock", //English > "Uhr anzeigen", //German >@@ -278,6 +334,10 @@ > "", //Hugarian > "Visualitza l'hora", //Catalan > "¿ÞÚÐ×ëÒÐâì çÐáë", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Zobrazit èas", > }, > { "Setup$Suspend receiving", //English > "Empfang unterbrechen", //German >@@ -296,6 +356,10 @@ > "", //Hugarian > "Suspèn la recepció", //Catalan > "¿àØÞáâÐÝÞÒØâì ßàØñÜ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Pøeru¹it pøíjem", > }, > { "Suspend receiving", //English > "Empfang unterbrechen", //German >@@ -314,6 +378,10 @@ > "", //Hugarian > "Suspèn la recepció", //Catalan > "ßàØÞáâÐÝÞÒØâì ßàØñÜ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Pøeru¹it pøíjem", > }, > { "Switch background", //English > "Hintergrund ändern", //German >@@ -332,6 +400,10 @@ > "", //Hugarian > "Canvia el fons", //Catalan > "ÝÕßàÞ×àÐçÝëÙ äÞÝ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Pøepnout pozadí", > }, > { "Auto-update pages", //English > "Seiten aktualisieren", //German >@@ -350,6 +422,10 @@ > "", //Hugarian > "Actualització pàgines automàtica", //Catalan > "°ÒâÞÞÑÝÞÒÛÕÝØÕ áâàÐÝØæ", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Auto-aktualizace stránek", > }, > { "OSD height", //English > "OSD-Höhe", //German >@@ -368,6 +444,10 @@ > "", //Hugarian > "Altura OSD", //Catalan > "²ëáÞâÐ ÜÕÝî", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Vý¹ka", > }, > { "OSD width", //English > "OSD-Breite", //German >@@ -386,6 +466,10 @@ > "", //Hugarian > "Amplària OSD", //Catalan > "ÈØàØÝÐ ÜÕÝî", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "©íøka", > }, > { "OSD horizontal align", //English > "OSD horizontale Anordnung", //German >@@ -404,6 +488,10 @@ > "", //Hugarian > "", //Catalan > "", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Horizontální zarovnání", > }, > { "OSD vertical align", //English > "OSD vertikale Anordnung", //German >@@ -422,6 +510,10 @@ > "", //Hugarian > "", //Catalan > "", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Vertikální zarovnání", > }, > { "Displays teletext on the OSD", //English > "Zeigt den Videotext auf dem OSD an", //German >@@ -440,60 +532,10 @@ > "", //Hugarian > "Visualitza el teletext en l'OSD", //Catalan > "¿ÞÚÐ× âÕÛÕâÕÚáâÐ Ò ÜÕÝî", //Russian >- }, >- { "Play", //English >- "Abspielen", //German >- "", //Slovenian >- "", //Italian >- "", //Dutch >- "", //Portuguese >- "", //French >- "", //Norwegian >- "", //Finnish >- "", //Polish >- "", //Spanish >- "", //Greek >- "", //Swedish >- "", //Romanian >- "", //Hugarian >- "", //Catalan >- "", //Russian >- }, >- { "FastFwd", //English >- "Schneller Vorlauf", //German >- "", //Slovenian >- "", //Italian >- "", //Dutch >- "", //Portuguese >- "", //French >- "", //Norwegian >- "", //Finnish >- "", //Polish >- "", //Spanish >- "", //Greek >- "", //Swedish >- "", //Romanian >- "", //Hugarian >- "", //Catalan >- "", //Russian >- }, >- { "FastRew", //English >- "Schneller Rücklauf", //German >- "", //Slovenian >- "", //Italian >- "", //Dutch >- "", //Portuguese >- "", //French >- "", //Norwegian >- "", //Finnish >- "", //Polish >- "", //Spanish >- "", //Greek >- "", //Swedish >- "", //Romanian >- "", //Hugarian >- "", //Catalan >- "", //Russian >+ "", //Croatian >+ "", //Estonian >+ "", //Danish >+ "Zobrazí teletext v OSD", > }, > { NULL } > }; >diff -uNr osdteletext-0.5.1.orig/Makefile osdteletext-0.5.1/Makefile >--- osdteletext-0.5.1.orig/Makefile 2008-10-08 20:09:47.000000000 +0200 >+++ osdteletext-0.5.1/Makefile 2008-10-08 20:24:36.000000000 +0200 >@@ -50,7 +50,7 @@ > > ### The object files (add further files here): > >-OBJS = $(PLUGIN).o menu.o txtfont.o i18n.o txtrecv.o txtrender.o displaybase.o display.o >+OBJS = $(PLUGIN).o menu.o txtfont.o i18n.o txtrecv.o txtrender.o displaybase.o display.o hamm.o > > ### Implicit rules: > >diff -uNr osdteletext-0.5.1.orig/menu.c osdteletext-0.5.1/menu.c >--- osdteletext-0.5.1.orig/menu.c 2005-08-12 13:24:18.000000000 +0200 >+++ osdteletext-0.5.1/menu.c 2005-11-09 22:11:06.000000000 +0100 >@@ -568,7 +568,7 @@ > t.Start(); > #endif > >- unsigned char cache[40*24+12]; >+ unsigned char cache[TELEPAGE_SIZE+12+4+TRIPPLETS_SIZE*sizeof(int)]; > StorageHandle fd; > // Take a look if there is a xxx-00 page > Storage *s=Storage::instance(); >diff -uNr osdteletext-0.5.1.orig/osdteletext.c osdteletext-0.5.1/osdteletext.c >--- osdteletext-0.5.1.orig/osdteletext.c 2008-10-08 20:09:47.000000000 +0200 >+++ osdteletext-0.5.1/osdteletext.c 2005-08-16 16:19:25.000000000 +0200 >@@ -113,6 +113,7 @@ > delete txtStatus; > if (channelStatus) > delete channelStatus; >+ Storage::instance()->cleanUp(); > } > > const char *cPluginTeletextosd::CommandLineHelp(void) >diff -uNr osdteletext-0.5.1.orig/txtfont.c osdteletext-0.5.1/txtfont.c >--- osdteletext-0.5.1.orig/txtfont.c 2005-04-21 19:28:41.000000000 +0200 >+++ osdteletext-0.5.1/txtfont.c 2007-06-24 21:09:56.000000000 +0200 >@@ -1,4 +1,5 @@ > #include "txtfont.h" >+#include <vdr/tools.h> > > unsigned int TXT_Mask[11]= { > 0x0000, // ************ **** >@@ -86,7 +87,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x26 = & >+ { // 0x26 = & > 0x0000, // ************ **** > 0x1E00, // ***####***** **** > 0x3300, // **##**##**** **** >@@ -1196,7 +1197,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x82 = >+ { // 0x82 = > 0x0000, // ************ **** > 0x3000, // **##******** **** > 0x7000, // *###******** **** >@@ -1208,7 +1209,7 @@ > 0x07E0, // *****######* **** > 0x0060 // *********##* **** > }, >- { // 0x83 = >+ { // 0x83 = > 0x0000, // ************ **** > 0x0FC0, // ****######** **** > 0x1860, // ***##****##* **** >@@ -1220,55 +1221,55 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x84 = >- 0x0600, // *****##***** **** >- 0x3FC0, // **########** **** >- 0x6660, // *##**##**##* **** >- 0x6600, // *##**##***** **** >- 0x3FC0, // **########** **** >- 0x0660, // *****##**##* **** >- 0x6660, // *##**##**##* **** >- 0x3FC0, // **########** **** >- 0x0600, // *****##***** **** >+ { // 0x84 = >+ 0x0700, // *****###**** **** >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x3060, // **##*****##* **** >+ 0x3060, // **##*****##* **** >+ 0x3060, // **##*****##* **** >+ 0x30E0, // **##****###* **** >+ 0x1F60, // ***#####*##* **** >+ 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x85 = >- 0x07F0, // *****####### **** >- 0x0C00, // ****##****** **** >- 0x19F0, // ***##**##### **** >+ { // 0x85 = >+ 0x06C0, // *****##*##** **** >+ 0x0380, // ******###*** **** >+ 0x0000, // ************ **** >+ 0x0FE0, // ****#######* **** > 0x1800, // ***##******* **** >- 0x19F0, // ***##**##### **** >+ 0x3000, // **##******** **** > 0x1800, // ***##******* **** >- 0x19F0, // ***##**##### **** >- 0x0C00, // ****##****** **** >- 0x07F0, // *****####### **** >+ 0x0FE0, // ****#######* **** >+ 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x86 = >- 0xFFC0, // ##########** **** >- 0x1C60, // ***###***##* **** >- 0x0830, // ****#*****## **** >- 0x7F30, // *#######**## **** >- 0x4130, // *#*****#**## **** >- 0x7F30, // *#######**## **** >- 0x0830, // ****#*****## **** >- 0x1C60, // ***###***##* **** >- 0xFFC0, // ##########** **** >+ { // 0x86 = >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x0000, // ************ **** >+ 0x1FC0, // ***#######** **** >+ 0x3000, // **##******** **** >+ 0x1FC0, // ***#######** **** >+ 0x0060, // *********##* **** >+ 0x1FC0, // ***#######** **** >+ 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x87 = >- 0xFFC0, // ##########** **** >- 0x0060, // *********##* **** >- 0x3E30, // **#####***## **** >- 0x6330, // *##***##**## **** >- 0x0E30, // ****###***## **** >- 0x1830, // ***##*****## **** >- 0x1830, // ***##*****## **** >- 0x0060, // *********##* **** >- 0xFFC0, // ##########** **** >+ { // 0x87 = >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x0000, // ************ **** >+ 0x33E0, // **##**#####* **** >+ 0x3C00, // **####****** **** >+ 0x3000, // **##******** **** >+ 0x3000, // **##******** **** >+ 0x3000, // **##******** **** >+ 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x88 = >+ { // 0x88 = > 0x0000, // ************ **** > 0x3980, // ***##**##*** **** > 0x3980, // ***##**##*** **** >@@ -1340,7 +1341,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x8E = >+ { // 0x8E = > 0x0000, // ************ **** > 0x0600, // *****##***** **** > 0x0F00, // ****####**** **** >@@ -1352,20 +1353,19 @@ > 0x0600, // *****##***** **** > 0x0600 // *****##***** **** > }, >- { // 0x8F = >+ { // 0x8F = >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x0000, // ************ **** >+ 0x1FC0, // ***#######** **** >+ 0x3060, // **##*****##* **** >+ 0x3FE0, // **#########* **** >+ 0x3000, // **##******** **** >+ 0x1FC0, // ***#######** **** > 0x0000, // ************ **** >- 0x1980, // ***##**##*** **** >- 0x1980, // ***##**##*** **** >- 0x7FE0, // *##########* **** >- 0x1980, // ***##**##*** **** >- 0x1980, // ***##**##*** **** >- 0x7FE0, // *##########* **** >- 0x1980, // ***##**##*** **** >- 0x1980, // ***##**##*** **** > 0x0000 // ************ **** > }, >- >- { // 0x90 = >+ { // 0x90 = > 0x0300, // ******##**** **** > 0x0600, // *****##***** **** > 0x3FC0, // **########** **** >@@ -1377,7 +1377,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x91 = >+ { // 0x91 = > 0x0300, // ******##**** **** > 0x0600, // *****##***** **** > 0x0000, // ************ **** >@@ -1389,31 +1389,31 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x92 = >+ { // 0x92 = >+ 0x0300, // ******##**** **** >+ 0x0600, // *****##***** **** > 0x0000, // ************ **** >- 0x3180, // **##***##*** **** >+ 0x3060, // **##*****##* **** >+ 0x18C0, // ***##***##** **** >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x0600, // *****##***** **** >+ 0x0C00, // ****##****** **** >+ 0x3800 // **###******* **** >+ }, >+ { // 0x93 = >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** > 0x0000, // ************ **** >- 0x7F80, // *########*** **** >- 0x00C0, // ********##** **** >- 0x3FC0, // **########** **** >- 0x60C0, // *##*****##** **** >+ 0x3FE0, // **#########* **** >+ 0x0180, // *******##*** **** >+ 0x0700, // *****###**** **** >+ 0x0C00, // ****##****** **** > 0x3FE0, // **#########* **** > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x93 = >- 0x0000, // ************ **** >- 0x1980, // ***##**##*** **** >- 0x1980, // ***##**##*** **** >- 0x7FE0, // *##########* **** >- 0x1980, // ***##**##*** **** >- 0x1980, // ***##**##*** **** >- 0x7FE0, // *##########* **** >- 0x1980, // ***##**##*** **** >- 0x1980, // ***##**##*** **** >- 0x0000 // ************ **** >- }, >- { // 0x94 = >+ { // 0x94 = > 0x0000, // ************ **** > 0x6060, // *##******##* **** > 0x30C0, // **##****##** **** >@@ -1425,55 +1425,55 @@ > 0x6060, // *##******##* **** > 0x0000 // ************ **** > }, >- { // 0x95 = >- 0xFFC0, // ##########** **** >- 0x0060, // *********##* **** >- 0xFF30, // ########**## **** >- 0x0030, // **********## **** >- 0xFF30, // ########**## **** >- 0x0030, // **********## **** >- 0xFF30, // ########**## **** >- 0x0060, // *********##* **** >- 0xFFC0, // ##########** **** >+ { // 0x95 = >+ 0x001B, // *******##*## **** >+ 0x0C0E, // ****##**###* **** >+ 0x0C00, // ****##****** **** >+ 0x3F80, // **#######*** **** >+ 0x0C00, // ****##****** **** >+ 0x0C00, // ****##****** **** >+ 0x0C00, // ****##****** **** >+ 0x07E0, // *****######* **** >+ 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x96 = >- 0xFFC0, // ##########** **** >+ { // 0x96 = >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x1FC0, // ***#######** **** >+ 0x3000, // **##******** **** >+ 0x1FC0, // ***#######** **** > 0x0060, // *********##* **** >- 0x3E30, // **#####***## **** >- 0x4730, // *#***###**## **** >- 0x4730, // *#***###**## **** >- 0x7F30, // *#######**## **** >- 0x3E30, // **#####***## **** > 0x0060, // *********##* **** >- 0xFFC0, // ##########** **** >+ 0x1FC0, // ***#######** **** >+ 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x97 = >- 0xFFC0, // ##########** **** >- 0x0860, // ****#****##* **** >- 0x1C30, // ***###****## **** >- 0x0030, // **********## **** >- 0x7F30, // *#######**## **** >- 0x0030, // **********## **** >- 0x1C30, // ***###****## **** >- 0x0860, // ****#****##* **** >- 0xFFC0, // ##########** **** >+ { // 0x97 = >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x3FC0, // **########** **** >+ 0x0300, // ******##**** **** >+ 0x0600, // *****##***** **** >+ 0x0C00, // ****##****** **** >+ 0x1800, // ***##******* **** >+ 0x3FC0, // **########** **** >+ 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x98 = >- 0x0000, // ************ **** >- 0x18C0, // ***##***##** **** >- 0x0000, // ************ **** >- 0x1FC0, // ***#######** **** >- 0x3060, // **##*****##* **** >- 0x3060, // **##*****##* **** >- 0x3060, // **##*****##* **** >- 0x1FC0, // ***#######** **** >+ { // 0x98 = >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x3FC0, // **########** **** >+ 0x3000, // **##******** **** >+ 0x3F80, // **#######*** **** >+ 0x3000, // **##******** **** >+ 0x3000, // **##******** **** >+ 0x3FC0, // **########** **** > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x99 = >+ { // 0x99 = > 0x0E00, // ****###***** **** > 0x1B00, // ***##*##**** **** > 0x0E00, // ****###***** **** >@@ -1486,42 +1486,42 @@ > 0x0000 // ************ **** > }, > { // 0x9A = >- 0x0000, // ************ **** >- 0x18C0, // ***##***##** **** >- 0x0000, // ************ **** >+ 0x0700, // *****###**** **** >+ 0x0D80, // ****##*##*** **** >+ 0x3760, // **##*###*##* **** > 0x3060, // **##*****##* **** > 0x3060, // **##*****##* **** > 0x3060, // **##*****##* **** >- 0x30E0, // **##****###* **** >- 0x1F60, // ***#####*##* **** >+ 0x3060, // **##*****##* **** >+ 0x1FC0, // ***#######** **** > 0x0000, // ************ **** > 0x0000 // ************ **** > }, > { // 0x9B = >- 0x18C0, // ***##***##** **** >- 0x0000, // ************ **** >- 0x1FC0, // ***#######** **** >- 0x3060, // **##*****##* **** >- 0x3060, // **##*****##* **** >- 0x3FE0, // **#########* **** >- 0x3060, // **##*****##* **** >- 0x3060, // **##*****##* **** >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x1860, // ****######** **** >+ 0x3000, // ***##****##* **** >+ 0x3000, // **##******** **** >+ 0x3000, // **##******** **** >+ 0x1860, // ***##****##* **** >+ 0x0FC0, // ****######** **** > 0x0000, // ************ **** > 0x0000 // ************ **** > }, > { // 0x9C = >- 0x18C0, // ***##***##** **** >- 0x0000, // ************ **** >- 0x1FC0, // ***#######** **** >- 0x3060, // **##*****##* **** >- 0x3060, // **##*****##* **** >+ 0x1B00, // ***##*##**** **** >+ 0x0E00, // ****###***** **** >+ 0x30C0, // **#######*** **** >+ 0x3060, // **##****##** **** > 0x3060, // **##*****##* **** > 0x3060, // **##*****##* **** >- 0x1FC0, // ***#######** **** >+ 0x30C0, // **##****##** **** >+ 0x3F80, // **#######*** **** > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x9D = >+ { // 0x9D = > 0x0700, // *****###**** **** > 0x0700, // *****###**** **** > 0x1FC0, // ***#######** **** >@@ -1533,29 +1533,29 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x9E = >- 0x18C0, // ***##***##** **** >- 0x0000, // ************ **** >- 0x3060, // **##*****##* **** >- 0x3060, // **##*****##* **** >- 0x3060, // **##*****##* **** >+ { // 0x9E = >+ 0x0D80, // ****##*##*** **** >+ 0x0760, // *****###*##* **** >+ 0x0060, // *********##* **** >+ 0x1F60, // ***#####*##* **** >+ 0x30E0, // **##****###* **** > 0x3060, // **##*****##* **** > 0x3060, // **##*****##* **** >- 0x1FC0, // ***#######** **** >+ 0x1FE0, // ***########* **** > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0x9F = _ >- 0x0000, // ************ **** >- 0x0000, // ************ **** >- 0x0000, // ************ **** >- 0x0000, // ************ **** >- 0x0000, // ************ **** >- 0x0000, // ************ **** >- 0x0000, // ************ **** >- 0x0000, // ************ **** >+ { // 0x9F = >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x7860, // *####****##* **** >+ 0x6C60, // *##*##***##* **** >+ 0x6660, // *##**##**##* **** >+ 0x6360, // *##***##*##* **** >+ 0x61E0, // *##****####* **** >+ 0x60E0, // *##*****###* **** > 0x0000, // ************ **** >- 0x7FE0 // *##########* **** >+ 0x0000 // ************ **** > }, > > >@@ -1571,7 +1571,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xA1 = 0x21a >+ { // 0xA1 = 0x21a > 0xFC00, // ######****** **** > 0xFC00, // ######****** **** > 0xFC00, // ######****** **** >@@ -1946,18 +1946,18 @@ > }, > > { // 0xC0 = >- 0x0600, // *****##***** **** >- 0x0C00, // ****##****** **** >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** > 0x0000, // ************ **** >- 0x3FC0, // **########** **** >- 0x6060, // *##******##* **** >- 0x7FE0, // *##########* **** >- 0x6000, // *##********* **** >- 0x3FC0, // **########** **** >+ 0x37C0, // **##*#####** **** >+ 0x3860, // **###****##* **** >+ 0x3060, // **##*****##* **** >+ 0x3060, // **##*****##* **** >+ 0x3060, // **##*****##* **** > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xC1 = >+ { // 0xC1 = > 0x0600, // *****##***** **** > 0x0300, // ******##**** **** > 0x0000, // ************ **** >@@ -1969,7 +1969,7 @@ > 0x1F60, // ***#####*##* **** > 0x0000 // ************ **** > }, >- { // 0xC2 = >+ { // 0xC2 = > 0x0C00, // ****##****** **** > 0x0600, // *****##***** **** > 0x0000, // ************ **** >@@ -1982,38 +1982,38 @@ > 0x0000 // ************ **** > }, > { // 0xC3 = >- 0x0000, // ************ **** >- 0x0FC0, // ****######** **** >- 0x1860, // ***##****##* **** >- 0x0C00, // ****##****** **** >- 0x3F00, // **######**** **** >- 0x0C00, // ****##****** **** >- 0x3E60, // **#####**##* **** >- 0x33C0, // **##**####** **** >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x3FC0, // **########** **** >+ 0x3060, // **##*****##* **** >+ 0x3FC0, // **########** **** >+ 0x3300, // **##**##**** **** >+ 0x31C0, // **##***###** **** >+ 0x30E0, // **##****###* **** > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xC4 = >+ { // 0xC4 = >+ 0x0D80, // ****##*##*** **** >+ 0x0700, // *****###**** **** >+ 0x7FE0, // *##########* **** > 0x0600, // *****##***** **** >- 0x3FC0, // **########** **** >- 0x6660, // *##**##**##* **** >- 0x6600, // *##**##***** **** >- 0x3FC0, // **########** **** >- 0x0660, // *****##**##* **** >- 0x6660, // *##**##**##* **** >- 0x3F60, // **########** **** >- 0x06C0, // *****##***** **** >+ 0x0600, // *****##***** **** >+ 0x0600, // *****##***** **** >+ 0x0600, // *****##***** **** >+ 0x0600, // *****##***** **** >+ 0x0000, // ************ **** > 0x0000 // ************ **** > }, > { // 0xC5 = >- 0x3CC0, // **####**##** **** >- 0x6780, // *##**####*** **** >- 0x0000, // ************ **** >- 0x7F80, // *########*** **** >- 0x00C0, // ********##** **** >- 0x3FC0, // **########** **** >- 0x60C0, // *##*****##** **** >- 0x3FE0, // **#########* **** >+ 0x0300, // ******##**** **** >+ 0x6660, // *##**##**##* **** >+ 0x30C0, // **##****##** **** >+ 0x1980, // ***##**##*** **** >+ 0x0F00, // ****####**** **** >+ 0x0600, // *****##***** **** >+ 0x0600, // *****##***** **** >+ 0x0600, // *****##***** **** > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >@@ -2029,7 +2029,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xC7 = >+ { // 0xC7 = > 0x0000, // ************ **** > 0x0000, // ************ **** > 0x0000, // ************ **** >@@ -2053,7 +2053,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xC9 = >+ { // 0xC9 = > 0x0600, // *****##***** **** > 0x0300, // ******##**** **** > 0x0000, // ************ **** >@@ -2065,7 +2065,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xCA = >+ { // 0xCA = > 0x0C00, // ****##****** **** > 0x0600, // *****##***** **** > 0x0000, // ************ **** >@@ -2101,7 +2101,7 @@ > 0x0300, // ******##**** **** > 0x0E00 // ****###***** **** > }, >- { // 0xCD = >+ { // 0xCD = > 0x0000, // ************ **** > 0x0000, // ************ **** > 0x0600, // *****##***** **** >@@ -2125,7 +2125,7 @@ > 0x0600, // *****##***** **** > 0x0600 // *****##***** **** > }, >- { // 0xCF = >+ { // 0xCF = > 0x0000, // ************ **** > 0x1980, // ***##**##*** **** > 0x1980, // ***##**##*** **** >@@ -2162,7 +2162,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xD2 = >+ { // 0xD2 = > 0x0E00, // ****###***** **** > 0x1B00, // ***##*##**** **** > 0x0000, // ************ **** >@@ -2174,19 +2174,19 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xD3 = >- 0x0300, // ******##**** **** >- 0x0600, // *****##***** **** >- 0x0000, // ************ **** >- 0x1FC0, // ***#######** **** >- 0x3060, // **##*****##* **** >- 0x3FE0, // **#########* **** >- 0x3000, // **##******** **** >- 0x1FC0, // ***#######** **** >- 0x0000, // ************ **** >- 0x0000 // ************ **** >- }, >- { // 0xD4 = >+ { // 0xD3 = >+ 0x0300, // ******##**** **** >+ 0x0600, // *****##***** **** >+ 0x0000, // ************ **** >+ 0x1FC0, // ***#######** **** >+ 0x3060, // **##*****##* **** >+ 0x3FE0, // **#########* **** >+ 0x3000, // **##******** **** >+ 0x1FC0, // ***#######** **** >+ 0x0000, // ************ **** >+ 0x0000 // ************ **** >+ }, >+ { // 0xD4 = > 0x0000, // ************ **** > 0x1980, // ***##**##*** **** > 0x0000, // ************ **** >@@ -2198,7 +2198,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xD5 = >+ { // 0xD5 = > 0x1E60, // ***####**##* **** > 0x33C0, // **##**####** **** > 0x1F80, // ***######*** **** >@@ -2294,7 +2294,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xDD = >+ { // 0xDD = > 0x0600, // *****##***** **** > 0x0300, // ******##**** **** > 0x0000, // ************ **** >@@ -2306,7 +2306,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xDE = >+ { // 0xDE = > 0x0F00, // ****####**** **** > 0x1980, // ***##**##*** **** > 0x0000, // ************ **** >@@ -2318,7 +2318,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xDF = >+ { // 0xDF = > 0x0000, // ************ **** > 0x1980, // ***##**##*** **** > 0x1980, // ***##**##*** **** >@@ -2355,7 +2355,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xE2 = >+ { // 0xE2 = > 0x0000, // ************ **** > 0x18C0, // ***##***##** **** > 0x0000, // ************ **** >@@ -2367,7 +2367,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xE3 = >+ { // 0xE3 = > 0x0000, // ************ **** > 0x0000, // ************ **** > 0x0000, // ************ **** >@@ -2379,7 +2379,7 @@ > 0x0300, // ******##**** **** > 0x0E00 // ****###***** **** > }, >- { // 0xE4 = >+ { // 0xE4 = > 0x0600, // *****##***** **** > 0x3FC0, // **########** **** > 0x6660, // *##**##**##* **** >@@ -2427,7 +2427,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xE8 = >+ { // 0xE8 = > 0x1E60, // ***####**##* **** > 0x33C0, // **##**####** **** > 0x0000, // ************ **** >@@ -2451,7 +2451,7 @@ > 0x0000, // ************ **** > 0x0000 // ************ **** > }, >- { // 0xEA = >+ { // 0xEA = > 0x0C00, // ****##****** **** > 0x0600, // *****##***** **** > 0x0000, // ************ **** >@@ -2717,7 +2717,7 @@ > 0x0000 // ************ **** > }, > >- { // 0x60a = >+ { // 0x60a = > 0x0000, // ************ **** > 0x0000, // ************ **** > 0x0000, // ************ **** >@@ -2801,7 +2801,7 @@ > 0x03F0, // ******###### **** > 0x03F0 // ******###### **** > }, >- { // 0x67a = >+ { // 0x67a = > 0xFFF0, // ############ **** > 0xFFF0, // ############ **** > 0xFFF0, // ############ **** >@@ -2813,7 +2813,7 @@ > 0x03F0, // ******###### **** > 0x03F0 // ******###### **** > }, >- { // 0x68a = >+ { // 0x68a = > 0x0000, // ************ **** > 0x0000, // ************ **** > 0x0000, // ************ **** >@@ -2849,7 +2849,7 @@ > 0x03F0, // ******###### **** > 0x03F0 // ******###### **** > }, >- { // 0x6Ba = >+ { // 0x6Ba = > 0xFFF0, // ############ **** > 0xFFF0, // ############ **** > 0xFFF0, // ############ **** >@@ -3104,40 +3104,40 @@ > } > }; > >- >- >-int NationalOptionSubsetG0Default[13]= >- {0x23,0x94,0x80,0 ,0 ,0 ,0x5e,0x5f,0 ,0 ,0 ,0 ,0 }; >- >-int NationalOptionSubsetCZ_SK[13]= >- {0x23,0 ,0 ,0 ,0 ,0 ,0xed,0 ,0xec,0xeb,0 ,0xef,0 }; > int NationalOptionSubsetEN[13]= > {0x83,0x24,0x80,0x8b,0x8c,0x8d,0x8e,0x23,0x81,0x82,0x88,0x89,0x8a}; >-int NationalOptionSubsetEE[13]= >- {0x23,0xc6,0 ,0x5b,0x5c,0 ,0x5d,0xd6,0 ,0x7b,0x7c,0 ,0x7d}; >-int NationalOptionSubsetFR[13]= >- {0xd3,0xd4,0xd0,0xdb,0xdc,0xc1,0xde,0x23,0xd1,0xd2,0xd8,0xd9,0xcc}; > int NationalOptionSubsetDE[13]= > {0x23,0x24,0x40,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x7b,0x7c,0x7d,0x7e}; >+int NationalOptionSubsetSV_FI[13]= >+ {0x23,0x94,0x90,0x5b,0x5c,0x9d,0x5d,0x5f,0x91,0x7b,0x7c,0x99,0x7d}; > int NationalOptionSubsetIT[13]= >- {0x83,0x24,0xd3,0x60,0xcc,0x8d,0x8e,0x23,0xdd,0xc1,0xc8,0xc9,0xca}; >+ {0x83,0x24,0x91,0x60,0xcc,0x8d,0x8e,0x23,0xdd,0xc2,0xc8,0xc9,0xca}; >+int NationalOptionSubsetPT_ES[13]= >+ {0xcc,0x24,0xe0,0xeb,0x91,0xed,0xee,0xef,0xe1,0x7d,0xe8,0xc9,0xc2}; >+int NationalOptionSubsetFR[13]= >+ {0x91,0xd4,0xc2,0xdb,0xdc,0xc1,0xde,0x23,0xc9,0xd2,0xd8,0xd9,0xcc}; >+int NationalOptionSubsetCZ_SK[13]= >+ {0x23,0x84,0x85,0x95,0x93,0x92,0xed,0x87,0x91,0xeb,0x8f,0xef,0x86}; >+int NationalOptionSubsetEE[13]= >+ {0x23,0xc6,0x96,0x5b,0x5c,0x97,0x5d,0xd6,0x86,0x7b,0x7c,0x93,0x7d}; >+ >+ >+ >+int NationalOptionSubsetG0Default[13]= >+ {0x23,0x94,0x80,0 ,0 ,0 ,0x5e,0x5f,0 ,0 ,0 ,0 ,0 }; >+int NationalOptionSubsetSR_HR_SL[13]= >+ {0x23,0 ,0 ,0 ,0x97,0xfb,0x96,0xdb,0x85,0 ,0x93,0 ,0x86}; > int NationalOptionSubsetLV_LT[13]= >- {0x23,0x24,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 }; >+ {0x23,0x24,0x96,0 ,0 ,0x97,0x85,0 ,0x86,0 ,0 ,0x93,0 }; >+ > int NationalOptionSubsetPL[13]= > {0x23,0 ,0 ,0 ,0 ,0 ,0 ,0xee,0 ,0 ,0 ,0 ,0 }; >-int NationalOptionSubsetPT_ES[13]= >- {0xcc,0x24,0xe0,0xeb,0xec,0xed,0xee,0xef,0xe1,0x7d,0xe8,0xc9,0xc2}; > int NationalOptionSubsetRO[13]= > {0x23,0x94,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0xd2,0 ,0 ,0xde}; >-int NationalOptionSubsetSR_HR_SL[13]= >- {0x23,0 ,0 ,0 ,0 ,0xfb,0 ,0xdb,0 ,0 ,0 ,0 ,0 }; >-int NationalOptionSubsetSV_FI[13]= >- {0x23,0x94,0x90,0x5b,0x5c,0x9d,0x5d,0x5f,0x91,0x7b,0x7c,0x99,0x7d}; > int NationalOptionSubsetTR[13]= > {0 ,0 ,0 ,0 ,0x5c,0xd7,0x5d,0 ,0 ,0 ,0x7c,0xcc,0x7d}; > > >- > inline int NationalOptionSubset(int chr) { > switch (chr) { > case 0x23: return 0; >@@ -3157,6 +3157,7 @@ > return -1; > } > >+ > inline unsigned int LeftBits(unsigned int bits) { > // Scale bit positions 0xfc00 to 0xfff0 positions > unsigned int res=0; >@@ -3187,6 +3188,7 @@ > > enumCharsets font=c.GetCharset(); > int chr=c.GetChar(); >+ unsigned char enh=c.GetEnhance(); > unsigned int *bitmap=NULL; > int i; > int NationalOption=NationalOptionSubset(chr); >@@ -3258,19 +3260,140 @@ > } > break; > case CHARSET_LATIN_G0_CZ_SK: >+ if (NationalOption>=0) { >+ if (NationalOptionSubsetCZ_SK[NationalOption]>0) >+ bitmap=TXT_Font[NationalOptionSubsetCZ_SK[NationalOption]-0x20]; >+ } else { >+ if (chr>=0x20 && chr<0x80) { >+ bitmap=TXT_Font[chr-0x20]; >+ } >+ } >+ break; > case CHARSET_LATIN_G0_EE: >+ if (NationalOption>=0) { >+ if (NationalOptionSubsetEE[NationalOption]>0) >+ bitmap=TXT_Font[NationalOptionSubsetEE[NationalOption]-0x20]; >+ } else { >+ if (chr>=0x20 && chr<0x80) { >+ bitmap=TXT_Font[chr-0x20]; >+ } >+ } >+ break; > case CHARSET_LATIN_G0_LV_LT: >+ if (NationalOption>=0) { >+ if (NationalOptionSubsetLV_LT[NationalOption]>0) >+ bitmap=TXT_Font[NationalOptionSubsetLV_LT[NationalOption]-0x20]; >+ } else { >+ if (chr>=0x20 && chr<0x80) { >+ bitmap=TXT_Font[chr-0x20]; >+ } >+ } >+ break; > case CHARSET_LATIN_G0_PL: >+ if (NationalOption>=0) { >+ if (NationalOptionSubsetPL[NationalOption]>0) >+ bitmap=TXT_Font[NationalOptionSubsetPL[NationalOption]-0x20]; >+ } else { >+ if (chr>=0x20 && chr<0x80) { >+ bitmap=TXT_Font[chr-0x20]; >+ } >+ } >+ break; > case CHARSET_LATIN_G0_RO: >+ if (NationalOption>=0) { >+ if (NationalOptionSubsetRO[NationalOption]>0) >+ bitmap=TXT_Font[NationalOptionSubsetRO[NationalOption]-0x20]; >+ } else { >+ if (chr>=0x20 && chr<0x80) { >+ bitmap=TXT_Font[chr-0x20]; >+ } >+ } >+ break; > case CHARSET_LATIN_G0_SR_HR_SL: >+ if (NationalOption>=0) { >+ if (NationalOptionSubsetSR_HR_SL[NationalOption]>0) >+ bitmap=TXT_Font[NationalOptionSubsetSR_HR_SL[NationalOption]-0x20]; >+ } else { >+ if (chr>=0x20 && chr<0x80) { >+ bitmap=TXT_Font[chr-0x20]; >+ } >+ } >+ break; > case CHARSET_LATIN_G0_TR: >- // Partially supported latin charsets >- if (chr>=0x20 && chr<0x80 && NationalOption<0) { >- bitmap=TXT_Font[chr-0x20]; >+ if (NationalOption>=0) { >+ if (NationalOptionSubsetTR[NationalOption]>0) >+ bitmap=TXT_Font[NationalOptionSubsetTR[NationalOption]-0x20]; >+ } else { >+ if (chr>=0x20 && chr<0x80) { >+ bitmap=TXT_Font[chr-0x20]; >+ } > } > break; >- >+ >+ > case CHARSET_LATIN_G2: >+ if (enh == 0x42) { >+ if (chr==0x41){ //A >+ bitmap=TXT_Font[0xf0-0x20]; >+ } else if (chr==0x45){//E >+ bitmap=TXT_Font[0x90-0x20]; >+ } else if (chr==0x49){//I >+ bitmap=TXT_Font[0xf3-0x20]; >+ } else if (chr==0x4f){//O >+ bitmap=TXT_Font[0xf5-0x20]; >+ } else if (chr==0x55){//U >+ bitmap=TXT_Font[0xf7-0x20]; >+ } else if (chr==0x59){//Y >+ bitmap=TXT_Font[0xc5-0x20]; >+ } else if (chr==0x6f){//o >+ bitmap=TXT_Font[0xee -0x20]; >+ } >+ } >+ else if (enh == 0x48) { >+ if (chr==0x41){//A >+ bitmap=TXT_Font[0x5b-0x20]; >+ } else if (chr==0x4f){//O >+ bitmap=TXT_Font[0x5c-0x20]; >+ } else if (chr==0x55){//U >+ bitmap=TXT_Font[0x5d-0x20]; >+ } else if (chr==0x61){//a >+ bitmap=TXT_Font[0x7b-0x20]; >+ } else if (chr==0x6f){//o >+ bitmap=TXT_Font[0x7c-0x20]; >+ } else if (chr==0x75){//u >+ bitmap=TXT_Font[0x7d-0x20]; >+ } >+ } >+ else if (enh == 0x4a) { >+ if (chr==0x55){//U >+ bitmap=TXT_Font[0x9a-0x20]; >+ } >+ } >+ else if (enh == 0x4f) { >+ if (chr==0x43){//C >+ bitmap=TXT_Font[0x9b-0x20]; >+ } else if (chr==0x44){//D >+ bitmap=TXT_Font[0x9c-0x20]; >+ } else if (chr==0x45){//E >+ bitmap=TXT_Font[0x98-0x20]; >+ } else if (chr==0x4e){//N >+ bitmap=TXT_Font[0x9f-0x20]; >+ } else if (chr==0x52){//R >+ bitmap=TXT_Font[0xc3-0x20]; >+ } else if (chr==0x53){//S >+ bitmap=TXT_Font[0x96-0x20]; >+ } else if (chr==0x54){//T >+ bitmap=TXT_Font[0xc4-0x20]; >+ } else if (chr==0x5a){//Z >+ bitmap=TXT_Font[0x97-0x20]; >+ } else if (chr==0x64){//d >+ bitmap=TXT_Font[0x9e -0x20]; >+ } else if (chr==0x6e){//n >+ bitmap=TXT_Font[0xc0-0x20]; >+ } >+ } >+ dsyslog("Warning: CHARSET_LATIN_G2: %x %x %x \n",font,chr,enh); >+ break; > case CHARSET_CYRILLIC_G0_SR_HR: > case CHARSET_CYRILLIC_G0_RU_BG: > case CHARSET_CYRILLIC_G0_UK: >@@ -3280,6 +3403,7 @@ > case CHARSET_ARABIC_G0: > case CHARSET_ARABIC_G2: > case CHARSET_HEBREW_G0: >+ dsyslog("Warning: totally unsupported: %x %x %x \n",font,chr,enh); > // totally unsupported > break; > >@@ -3303,15 +3427,17 @@ > break; > > case CHARSET_GRAPHICS_G3: >+ dsyslog("Warning: CHARSET_LATIN_G3: %x %x\n",font,chr); >+ break; > case CHARSET_INVALID: >+ dsyslog("Warning: CHARSET_INVALID: %x %x\n",font,chr); > // Totally unsupported > break; > } > > > >- if (!buffer) { >- printf("Warning: Undefined char: %x %x\n",font,chr); >+ if (!buffer || !bitmap) { > return NULL; > } > >diff -uNr osdteletext-0.5.1.orig/txtrecv.c osdteletext-0.5.1/txtrecv.c >--- osdteletext-0.5.1.orig/txtrecv.c 2008-10-08 20:09:47.000000000 +0200 >+++ osdteletext-0.5.1/txtrecv.c 2007-06-24 21:04:05.000000000 +0200 >@@ -11,7 +11,7 @@ > #include <dirent.h> > > #include "txtrecv.h" >-#include "tables.h" >+#include "hamm.h" > #include "setup.h" > > #include <vdr/channels.h> >@@ -208,7 +208,7 @@ > failedFreeSpace=false; > } > >-#define TELETEXT_PAGESIZE 972 >+#define TELETEXT_PAGESIZE (TELEPAGE_SIZE + TRIPPLETS_SIZE*sizeof(int) + 4 + 12) > > LegacyStorage::LegacyStorage() { > maxBytes=0; >@@ -474,7 +474,9 @@ > cTelePage::cTelePage(PageID t_page, uchar t_flags, uchar t_lang,int t_mag) > : mag(t_mag), flags(t_flags), lang(t_lang), page(t_page) > { >- memset(pagebuf,' ',26*40); >+ memset(pagebuf,' ',TELEPAGE_SIZE); >+ memset(tripplets,0,TRIPPLETS_SIZE*sizeof(int)); >+ next_des = 0; > } > > cTelePage::~cTelePage() { >@@ -485,8 +487,20 @@ > memcpy(pagebuf+40*line,myptr,40); > } > >+void cTelePage::SetTripplets(int dcode, int *t) >+{ >+ if (dcode == next_des) >+ { >+ memcpy(tripplets + dcode * 13, t, 13 * sizeof(*t)); >+ next_des++; >+ } >+ else >+ next_des = -1; >+} >+ > void cTelePage::save() > { >+ > Storage *s=Storage::instance(); > unsigned char buf; > StorageHandle fd; >@@ -499,7 +513,9 @@ > buf=lang; s->write(&buf,1,fd); > buf=0x00; s->write(&buf,1,fd); > buf=0x00; s->write(&buf,1,fd); >- s->write(pagebuf,24*40,fd); >+ s->write(pagebuf,TELEPAGE_SIZE,fd); >+ s->write(&next_des,4,fd); >+ s->write(tripplets,TRIPPLETS_SIZE*sizeof(int),fd); > s->close(fd); > } > } >@@ -526,7 +542,7 @@ > > void cTxtStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber) > { >- if (Device->IsPrimaryDevice() || Device == cDevice::ActualDevice()) { >+ if (Device->IsPrimaryDevice()) { > > /*#ifdef OSDTELETEXT_REINSERTION_PATCH > if (ttSetup.suspendReceiving) { >@@ -563,9 +579,9 @@ > if (!channel) > return; > //primary device a full-featured card >- if (cDevice::ActualDevice()->ProvidesChannel(channel, Setup.PrimaryLimit)) { >+ if (cDevice::PrimaryDevice()->ProvidesChannel(channel, Setup.PrimaryLimit)) { > receiver = new cTxtReceiver(TPid, chan); >- cDevice::ActualDevice()->AttachReceiver(receiver); >+ cDevice::PrimaryDevice()->AttachReceiver(receiver); > //dsyslog("OSDTeletext: Created teletext receiver for channel %d, PID %d on primary device", ChNum, TPid); > //primary device a DXR3 or similar > } else { >@@ -699,7 +715,6 @@ > #else > : cReceiver(0, -1, 1, TPid), > #endif >-cThread("osdteletext-receiver"), > chan(chan), TxtPage(0), buffer((188+60)*75), running(false) > { > Storage::instance()->prepareDirectory(chan); >@@ -710,7 +725,7 @@ > > cTxtReceiver::~cTxtReceiver() > { >- cReceiver::Detach(); >+ Detach(); > if (running) { > running=false; > buffer.Signal(); >@@ -720,12 +735,6 @@ > delete TxtPage; > } > >-void cTxtReceiver::Stop() >-{ >- Activate(false); >-} >- >- > void cTxtReceiver::Activate(bool On) > { > if (On) { >@@ -760,15 +769,19 @@ > > void cTxtReceiver::Action() { > >+// int fh; >+// fh=open("/tmp/vbi.vbi", O_WRONLY | O_CREAT); > while (running) { > cFrame *frame=buffer.Get(); > if (frame) { > uchar *Datai=frame->Data(); > >+// write(fh,Datai,50+3*46); >+ > for (int i=0; i < 4; i++) { > if (Datai[4+i*46]==2 || Datai[4+i*46]==3) { > for (int j=(8+i*46);j<(50+i*46);j++) >- Datai[j]=invtab[Datai[j]]; >+ Datai[j]=doinvert(Datai[j]); > DecodeTXT(&Datai[i*46]); > } > } >@@ -778,16 +791,10 @@ > buffer.Wait(); > } > >+// close(fh); > buffer.Clear(); > running=false; >-} > >-uchar cTxtReceiver::unham16 (uchar *p) >-{ >- unsigned short c1,c2; >- c1=unhamtab[p[0]]; >- c2=unhamtab[p[1]]; >- return (c1 & 0x0F) | (c2 & 0x0F) *16; > } > > void cTxtReceiver::DecodeTXT(uchar* TXT_buf) >@@ -822,23 +829,29 @@ > > > int hdr,mag,mag8,line; >+ int err = 0; > uchar *ptr; > uchar flags,lang; >- >- hdr = unham16 (&TXT_buf[0x8]); >+ >+ hdr = hamm16(&TXT_buf[0x8], &err); >+// if (err & 0xf000) { >+// esyslog("OSDTeletext: hdr=hamm16"); >+// return; >+// } >+ > mag = hdr & 0x07; > mag8 = mag ?: 8; > line = (hdr>>3) & 0x1f; > ptr = &TXT_buf[10]; >- >+ > switch (line) { >- case 0: >+ case 0: > { > unsigned char b1, b2, b3, b4; > int pgno, subno; >- b1 = unham16 (ptr); >+ b1 = hamm16(ptr, &err); > // Page no, 10- and 1-digit >- >+ > if (b1 == 0xff) break; > if (TxtPage) { > TxtPage->save(); >@@ -846,9 +859,13 @@ > TxtPage=NULL; > } > >- b2 = unham16 (ptr+2); // Sub-code 0..6 + C4 >- b3 = unham16 (ptr+4); // Sub-code 8..13 + C5,C6 >- b4 = unham16 (ptr+6); // C7..C14 >+ b2 = hamm16(ptr+2, &err); // Sub-code 0..6 + C4 >+ b3 = hamm16(ptr+4, &err); // Sub-code 8..13 + C5,C6 >+ b4 = hamm16(ptr+6, &err); // C7..C14 >+// if (err & 0xf000){ >+// esyslog("OSDTeletext: b1,b2,b3,b4=hamm16"); >+// return; >+// } > > // flags: > // 0x80 C4 - Erase page >@@ -871,20 +888,78 @@ > TxtPage->SetLine((int)line,(uchar *)ptr); > break; > } >- case 1 ... 25: >+ case 1 ... 24: > { > if (TxtPage) TxtPage->SetLine((int)line,(uchar *)ptr); > break; > } >- /*case 23: >+ case 26: > { >- if (TxtPage) { >- TxtPage->save(); >- delete TxtPage; >- TxtPage=NULL; >- } >+ int d, t[13]; >+ d = hamm8(ptr, &err); >+// if (err & 0xf000){ >+// esyslog("OSDTeletext: d=hamm8"); >+// return; >+// } >+ >+ for (int i = 0; i < 13; ++i) >+ t[i] = hamm24(ptr + 1 + 3*i, &err); >+// if (err & 0xf000){ >+// esyslog("OSDTeletext: hamm24"); >+// return; >+// } >+ >+ if (TxtPage) TxtPage->SetTripplets(d, t); > break; >- }*/ >+ } >+/* case 27: >+ { >+ // FLOF data (FastText) >+ int b1,b2,b3,x; >+ >+ if (~cvtp->flags & PG_ACTIVE) >+ return 0; // -1 flushes all pages. we may never resync again :( >+ >+ b1 = hamm8(p, &err); >+ b2 = hamm8(p + 37, &err); >+ if (err & 0xf000) >+ return 4; >+ if (b1 != 0 || not(b2 & 8)) >+ return 0; >+ >+ for (i = 0; i < 6; ++i) >+ { >+ err = 0; >+ b1 = hamm16(p+1+6*i, &err); >+ b2 = hamm16(p+3+6*i, &err); >+ b3 = hamm16(p+5+6*i, &err); >+ if (err & 0xf000) >+ return 1; >+ x = (b2 >> 7) | ((b3 >> 5) & 0x06); >+ cvtp->link[i].pgno = ((mag ^ x) ?: 8) * 256 + b1; >+ cvtp->link[i].subno = (b2 + b3 * 256) & 0x3f7f; >+ } >+ cvtp->flof = 1; >+ return 0; >+ } >+ case 30: >+ { >+ if (mag8 != 8) >+ return 0; >+ >+ p[0] = hamm8(p, &err); // designation code >+ p[1] = hamm16(p+1, &err); // initial page >+ p[3] = hamm16(p+3, &err); // initial subpage + mag >+ p[5] = hamm16(p+5, &err); // initial subpage + mag >+ if (err & 0xf000) >+ return 4; >+ >+ err += chk_parity(p+20, 20); >+ conv2latin(p+20, 20, 0); >+ >+ vbi_send(vbi, EV_XPACKET, mag8, pkt, err, p); >+ return 0; >+ }*/ > default: > break; > } >diff -uNr osdteletext-0.5.1.orig/txtrecv.h osdteletext-0.5.1/txtrecv.h >--- osdteletext-0.5.1.orig/txtrecv.h 2008-10-08 20:09:47.000000000 +0200 >+++ osdteletext-0.5.1/txtrecv.h 2005-11-09 20:52:18.000000000 +0100 >@@ -136,18 +136,24 @@ > void registerFile(PageID page); > }; > >+#define TRIPPLETS_SIZE 13*16 >+#define TELEPAGE_SIZE 24*40 >+ > class cTelePage { > private: > int mag; > unsigned char flags; > unsigned char lang; > PageID page; >- unsigned char pagebuf[27*40]; >+ unsigned char pagebuf[TELEPAGE_SIZE]; >+ int tripplets[TRIPPLETS_SIZE]; // tripplets >+ int next_des; // next expected designation code > char Directory [255]; > public: > cTelePage(PageID page, uchar flags, uchar lang, int mag); > ~cTelePage(); > void SetLine(int, uchar*); >+ void SetTripplets(int dcode, int *t); > void save(); > }; > >@@ -163,7 +169,6 @@ > class cTxtReceiver : public cReceiver, public cThread { > private: > void DecodeTXT(uchar*); >- uchar unham16 (uchar*); > tChannelID chan; > cTelePage *TxtPage; > protected: >@@ -175,7 +180,6 @@ > public: > cTxtReceiver(int TPid, tChannelID chan); > virtual ~cTxtReceiver(); >- virtual void Stop(); > }; > > class cTxtStatus : public cStatus/*, public cThread*/ { >diff -uNr osdteletext-0.5.1.orig/txtrender.c osdteletext-0.5.1/txtrender.c >--- osdteletext-0.5.1.orig/txtrender.c 2005-04-21 19:28:41.000000000 +0200 >+++ osdteletext-0.5.1/txtrender.c 2005-11-11 00:05:56.000000000 +0100 >@@ -15,7 +15,8 @@ > > #include <strings.h> > #include "txtrender.h" >- >+#include <vdr/tools.h> >+#include "txtrecv.h" > > // Font tables > >@@ -274,20 +275,22 @@ > void cRenderPage::RenderTeletextCode(unsigned char *PageCode) { > int x,y; > bool EmptyNextLine=false; >+ cTeletextChar c; > // Skip one line, in case double height chars were/will be used > > // Get code pages: >- int LocalG0CodePage=(FirstG0CodePage & 0x78) >+ int LocalG0CodePage=(FirstG0CodePage & 0x78) > | ((Lang & 0x04)>>2) | (Lang & 0x02) | ((Lang & 0x01)<<2); >- >+ >+ > enumCharsets FirstG0=GetG0Charset(LocalG0CodePage); > enumCharsets SecondG0=GetG0Charset(SecondG0CodePage); > // Reserved for later use: > // enumCharsets FirstG2=GetG2Charset(LocalG0CodePage); >- >+ > for (y=0;y<24;(EmptyNextLine?y+=2:y++)) { > // Start of line: Set start of line defaults >- >+ > // Hold Mosaics mode: Remember last mosaic char/charset > // for next spacing code > bool HoldMosaics=false; >@@ -307,7 +310,6 @@ > EmptyNextLine=false; > // Skip next line, for double-height > >- cTeletextChar c; > // auto.initialized to everything off > c.SetFGColor(ttcWhite); > c.SetBGColor(ttcBlack); >@@ -355,7 +357,7 @@ > Size=sizeNormal; > HoldMosaicChar=' '; > HoldMosaicCharset=FirstG0; >- } >+ } > break; > case 0x18: // Conceal > c.SetConceal(true); >@@ -395,7 +397,7 @@ > c2.SetChar(' '); > } > } else { >- // Character code >+ // Character code > c2.SetChar(ttc); > if (GraphicCharset) { > if (ttc&0x20) { >@@ -495,7 +497,7 @@ > Size=sizeDoubleWidth; > HoldMosaicChar=' '; > HoldMosaicCharset=FirstG0; >- } >+ } > break; > case 0x0F: // Double Size > if (Size!=sizeDoubleSize) { >@@ -538,6 +540,64 @@ > } > SetChar(x,24,c); > } >+//enhanced code >+ int next_des = *(int *)(PageCode+TELEPAGE_SIZE); >+ int *eh = (int *)(PageCode+TELEPAGE_SIZE+4); >+ int row = 0; >+ int *p, *e; >+ >+ if (next_des < 1) >+ return; >+ >+ for (p = eh, e = p + next_des * 13; p < e; p++) >+ if (*p % 2048 != 2047) >+ { >+ int adr = *p % 64; >+ int mode = *p / 64 % 32; >+ int data = *p / 2048 % 128; >+ >+ if (adr < 40) >+ { >+ // col functions >+ switch (mode) >+ { >+ case 15: // char from G2 set >+ c = GetChar(adr, row); >+ c.SetCharset(CHARSET_LATIN_G2); >+ c.SetEnhance(data); >+ c.SetChar(0x20); >+ SetChar(adr, row, c); >+// esyslog("char from G2 set adr=%d,row=%d,data=%d", adr, row, data); >+ break; >+ case 16 ... 31: // char from G0 set with diacritical mark >+ c = GetChar(adr, row); >+ c.SetCharset(CHARSET_LATIN_G2); >+ c.SetEnhance(0x40|(mode&0x0f)); >+ c.SetChar(data); >+ SetChar(adr, row, c); >+// esyslog("char from G0 set with diacritical mark adr=%d,row=%d,data=%d", adr, row, data); >+ break; >+ } >+ } >+ else >+ { >+ // row functions >+ if ((adr -= 40) == 0) >+ adr = 24; >+ >+ switch (mode) >+ { >+ case 1: // full row color >+ row = adr; >+ break; >+ case 4: // set active position >+ row = adr; >+ break; >+ case 7: // address row 0 (+ full row color) >+ if (adr == 23) >+ row = 0; >+ break; >+ } >+ } >+ } > } >- >- >diff -uNr osdteletext-0.5.1.orig/txtrender.h osdteletext-0.5.1/txtrender.h >--- osdteletext-0.5.1.orig/txtrender.h 2005-04-21 19:28:41.000000000 +0200 >+++ osdteletext-0.5.1/txtrender.h 2005-11-11 00:03:49.000000000 +0100 >@@ -111,6 +111,7 @@ > > protected: > unsigned int c; >+ unsigned char eh; > > static const unsigned int CHAR = 0x000000FF; > // character code >@@ -133,10 +134,10 @@ > static const unsigned int BLINK = 0x80000000; > // blinking character > >- cTeletextChar(unsigned int cc) { c=cc; } >+ cTeletextChar(unsigned int cc, unsigned char ee) { c=cc; eh=ee; } > > public: >- cTeletextChar() { c=0; } >+ cTeletextChar() { c=0; eh=0;} > > // inline helper functions: > // For each parameter encoded into the 32-bit int, there is >@@ -148,73 +149,78 @@ > inline void SetChar(unsigned char chr) > { c=(c&~CHAR)|chr; } > inline cTeletextChar ToChar(unsigned char chr) >- { return cTeletextChar((c&~CHAR)|chr); } >+ { return cTeletextChar((c&~CHAR)|chr, eh); } >+ >+ inline unsigned char GetEnhance() >+ { return eh; } >+ inline void SetEnhance(unsigned char chr) >+ { eh=chr; } > > inline enumCharsets GetCharset() > { return (enumCharsets)(c&CHARSET); } > inline void SetCharset(enumCharsets charset) > { c=(c&~CHARSET)|charset; } > inline cTeletextChar ToCharset(enumCharsets charset) >- { return cTeletextChar((c&~CHARSET)|charset); } >+ { return cTeletextChar((c&~CHARSET)|charset, eh); } > > inline enumTeletextColor GetFGColor() > { return (enumTeletextColor)((c&FGCOLOR) >> LowestSet32Bit(FGCOLOR)); } > inline void SetFGColor(enumTeletextColor fgc) > { c=(c&~FGCOLOR) | (fgc << LowestSet32Bit(FGCOLOR)); } > inline cTeletextChar ToFGColor(enumTeletextColor fgc) >- { return cTeletextChar((c&~FGCOLOR) | (fgc << LowestSet32Bit(FGCOLOR))); } >+ { return cTeletextChar((c&~FGCOLOR) | (fgc << LowestSet32Bit(FGCOLOR)), eh); } > > inline enumTeletextColor GetBGColor() > { return (enumTeletextColor)((c&BGCOLOR) >> LowestSet32Bit(BGCOLOR)); } > inline void SetBGColor(enumTeletextColor bgc) > { c=(c&~BGCOLOR) | (bgc << LowestSet32Bit(BGCOLOR)); } > inline cTeletextChar ToBGColor(enumTeletextColor bgc) >- { return cTeletextChar((c&~BGCOLOR) | (bgc << LowestSet32Bit(BGCOLOR))); } >+ { return cTeletextChar((c&~BGCOLOR) | (bgc << LowestSet32Bit(BGCOLOR)), eh); } > > inline bool GetBoxedOut() > { return c&BOXOUT; } > inline void SetBoxedOut(bool BoxedOut) > { c=(BoxedOut)?(c|BOXOUT):(c&~BOXOUT); } > inline cTeletextChar ToBoxedOut(bool BoxedOut) >- { return cTeletextChar((BoxedOut)?(c|BOXOUT):(c&~BOXOUT)); } >+ { return cTeletextChar((BoxedOut)?(c|BOXOUT):(c&~BOXOUT), eh); } > > inline bool GetDirty() > { return c&DIRTY; } > inline void SetDirty(bool Dirty) > { c=(Dirty)?(c|DIRTY):(c&~DIRTY); } > inline cTeletextChar ToDirty(bool Dirty) >- { return cTeletextChar((Dirty)?(c|DIRTY):(c&~DIRTY)); } >+ { return cTeletextChar((Dirty)?(c|DIRTY):(c&~DIRTY), eh); } > > inline enumDblHeight GetDblHeight() > { return (enumDblHeight)(c&DBLHEIGHT); } > inline void SetDblHeight(enumDblHeight dh) > { c=(c&~(DBLHEIGHT)) | dh; } > inline cTeletextChar ToDblHeight(enumDblHeight dh) >- { return cTeletextChar((c&~(DBLHEIGHT)) | dh); } >+ { return cTeletextChar((c&~(DBLHEIGHT)) | dh, eh); } > > inline enumDblWidth GetDblWidth() > { return (enumDblWidth)(c&DBLWIDTH); } > inline void SetDblWidth(enumDblWidth dw) > { c=(c&~(DBLWIDTH)) | dw; } > inline cTeletextChar ToDblWidth(enumDblWidth dw) >- { return cTeletextChar((c&~(DBLWIDTH)) | dw); } >+ { return cTeletextChar((c&~(DBLWIDTH)) | dw, eh); } > > inline bool GetConceal() > { return c&CONCEAL; } > inline void SetConceal(bool Conceal) > { c=(Conceal)?(c|CONCEAL):(c&~CONCEAL); } > inline cTeletextChar ToConceal(bool Conceal) >- { return cTeletextChar((Conceal)?(c|CONCEAL):(c&~CONCEAL)); } >+ { return cTeletextChar((Conceal)?(c|CONCEAL):(c&~CONCEAL), eh); } > > inline bool GetBlink() > { return c&BLINK; } > inline void SetBlink(bool Blink) > { c=(Blink)?(c|BLINK):(c&~BLINK); } > inline cTeletextChar ToBlink(bool Blink) >- { return cTeletextChar((Blink)?(c|BLINK):(c&~BLINK)); } >+ { return cTeletextChar((Blink)?(c|BLINK):(c&~BLINK), eh); } > >- bool operator==(cTeletextChar &chr) { return c==chr.c; } >- bool operator!=(cTeletextChar &chr) { return c!=chr.c; } >+ bool operator==(cTeletextChar &chr) { return c==chr.c && eh==chr.eh; } >+ bool operator!=(cTeletextChar &chr) { return c!=chr.c || eh!=chr.eh; } > }; > > >@@ -304,6 +310,7 @@ > // Interprete teletext code referenced by PageCode > // and draw the whole page content into this object > // PageCode must be a 40*24 bytes buffer >+ > }; > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 240702
: 167742 |
167744