summaryrefslogtreecommitdiffstats
path: root/font.c
diff options
context:
space:
mode:
authordscho <dscho>2002-01-17 09:33:17 +0000
committerdscho <dscho>2002-01-17 09:33:17 +0000
commit7b90c44708b6b3096419af747e4a4f3470d2d4db (patch)
tree4214a827c7505e97c6863d00d00b07f82b770d5a /font.c
parentba66518fa044cf164cc3d963a248002c45f29538 (diff)
downloadlibtdevnc-7b90c44708b6b3096419af747e4a4f3470d2d4db.tar.gz
libtdevnc-7b90c44708b6b3096419af747e4a4f3470d2d4db.zip
correct BackChannel handling, compile cleanups
Diffstat (limited to 'font.c')
-rw-r--r--font.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/font.c b/font.c
index f61f09e..4bebe44 100644
--- a/font.c
+++ b/font.c
@@ -4,8 +4,8 @@ int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
int x,int y,unsigned char c,Pixel col)
{
int i,j,width,height;
- unsigned char d;
unsigned char* data=font->data+font->metaData[c*5];
+ unsigned char d=*data;
int rowstride=rfbScreen->paddedWidthInBytes;
int bpp=rfbScreen->rfbServerFormat.bitsPerPixel/8;
char *colour=(char*)&col;
@@ -49,8 +49,8 @@ int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
Pixel col,Pixel bcol)
{
int i,j,width,height;
- unsigned char d;
unsigned char* data=font->data+font->metaData[c*5];
+ unsigned char d;
int rowstride=rfbScreen->paddedWidthInBytes;
int bpp=rfbScreen->rfbServerFormat.bitsPerPixel/8,extra_bytes=0;
char* colour=(char*)&col;
@@ -73,6 +73,7 @@ int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
if(y2<y+height) height-=y+height-y2;
if(x2<x+width) { extra_bytes+=(x1+width)/8-(x+width-x2+7)/8; width-=x+width-x2; }
+ d=*data;
for(j=y1;j<height;j++) {
if((x1&7)!=0)
d=data[-1]; /* TODO: check if in this case extra_bytes is correct! */