forked from KolibriOS/kolibrios
TextTeader: fix issue there was old data after converting text to UTF8
git-svn-id: svn://kolibrios.org@5995 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
662164c87f
commit
ef496ce0d8
@ -143,7 +143,6 @@
|
|||||||
byte rw=0;
|
byte rw=0;
|
||||||
IF(s==32)return width/4;
|
IF(s==32)return width/4;
|
||||||
IF(s==9)return width;
|
IF(s==9)return width;
|
||||||
debugch(s);
|
|
||||||
s = Cp866ToAnsi(s);
|
s = Cp866ToAnsi(s);
|
||||||
EBX = block*s << 2 + font;
|
EBX = block*s << 2 + font;
|
||||||
for(yi=0; yi<height; yi++)
|
for(yi=0; yi<height; yi++)
|
||||||
|
@ -3,4 +3,3 @@ C-- "textreader.c"
|
|||||||
@rename "textreader.com" "textreader"
|
@rename "textreader.com" "textreader"
|
||||||
@del warning.txt
|
@del warning.txt
|
||||||
@pause
|
@pause
|
||||||
kpack textreader
|
|
@ -4,7 +4,7 @@ void PreparePage()
|
|||||||
char char_width[255];
|
char char_width[255];
|
||||||
dword line_start;
|
dword line_start;
|
||||||
byte ch;
|
byte ch;
|
||||||
dword bufoff;
|
dword bufoff, buflen;
|
||||||
dword line_length=30;
|
dword line_length=30;
|
||||||
dword stroka_y = 5;
|
dword stroka_y = 5;
|
||||||
dword stroka=0;
|
dword stroka=0;
|
||||||
@ -15,7 +15,8 @@ void PreparePage()
|
|||||||
//get font chars width, need to increase performance
|
//get font chars width, need to increase performance
|
||||||
for (i=0; i<256; i++) char_width[i] = label.symbol_size(i);
|
for (i=0; i<256; i++) char_width[i] = label.symbol_size(i);
|
||||||
//get font buffer height
|
//get font buffer height
|
||||||
for (bufoff=io.buffer_data; ESBYTE[bufoff]; bufoff++)
|
buflen = strlen(io.buffer_data) + io.buffer_data;
|
||||||
|
for (bufoff=io.buffer_data; bufoff<buflen; bufoff++)
|
||||||
{
|
{
|
||||||
ch = ESBYTE[bufoff];
|
ch = ESBYTE[bufoff];
|
||||||
line_length += char_width[ch];
|
line_length += char_width[ch];
|
||||||
@ -42,7 +43,7 @@ void PreparePage()
|
|||||||
|
|
||||||
line_length = 30;
|
line_length = 30;
|
||||||
line_start = io.buffer_data;
|
line_start = io.buffer_data;
|
||||||
for (bufoff=io.buffer_data; ESBYTE[bufoff]; bufoff++)
|
for (bufoff=io.buffer_data; bufoff<buflen; bufoff++)
|
||||||
{
|
{
|
||||||
ch = ESBYTE[bufoff];
|
ch = ESBYTE[bufoff];
|
||||||
line_length += char_width[ch];
|
line_length += char_width[ch];
|
||||||
|
Loading…
Reference in New Issue
Block a user