diff options
author | dscho <dscho> | 2002-05-02 12:53:29 +0000 |
---|---|---|
committer | dscho <dscho> | 2002-05-02 12:53:29 +0000 |
commit | ff9fbd971bdebf8eca22446139803a2647dbcf5a (patch) | |
tree | 72e85c15b93a562d22cf2e923a70d186f1d6ecb6 /cursor.c | |
parent | 22405c3dddfe5cb78b792f3d6b20ba1e5bd427a9 (diff) | |
download | libtdevnc-ff9fbd971bdebf8eca22446139803a2647dbcf5a.tar.gz libtdevnc-ff9fbd971bdebf8eca22446139803a2647dbcf5a.zip |
Tim's Changes
Diffstat (limited to 'cursor.c')
-rw-r--r-- | cursor.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -230,18 +230,18 @@ rfbCursorPtr rfbMakeXCursor(int width,int height,char* cursorString,char* maskSt /*cursor->backRed=cursor->backGreen=cursor->backBlue=0xffff;*/ cursor->foreRed=cursor->foreGreen=cursor->foreBlue=0xffff; - cursor->source = (char*)calloc(w,height); + cursor->source = (unsigned char*)calloc(w,height); for(j=0,cp=cursorString;j<height;j++) for(i=0,bit=0x80;i<width;i++,bit=(bit&1)?0x80:bit>>1,cp++) if(*cp!=' ') cursor->source[j*w+i/8]|=bit; if(maskString) { - cursor->mask = (char*)calloc(w,height); + cursor->mask = (unsigned char*)calloc(w,height); for(j=0,cp=maskString;j<height;j++) for(i=0,bit=0x80;i<width;i++,bit=(bit&1)?0x80:bit>>1,cp++) if(*cp!=' ') cursor->mask[j*w+i/8]|=bit; } else - cursor->mask = rfbMakeMaskForXCursor(width,height,cursor->source); + cursor->mask = (unsigned char*)rfbMakeMaskForXCursor(width,height,cursor->source); return(cursor); } @@ -291,7 +291,7 @@ void MakeXCursorFromRichCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor) char *back=(char*)&background; unsigned char bit; - cursor->source=(char*)calloc(w,cursor->height); + cursor->source=(unsigned char*)calloc(w,cursor->height); if(format->bigEndian) back+=4-bpp; @@ -310,10 +310,11 @@ void MakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor) rfbPixelFormat* format=&rfbScreen->rfbServerFormat; int i,j,w=(cursor->width+7)/8,bpp=format->bitsPerPixel/8; CARD32 background,foreground; - char *cp,*back=(char*)&background,*fore=(char*)&foreground; + char *back=(char*)&background,*fore=(char*)&foreground; + unsigned char *cp; unsigned char bit; - cp=cursor->richSource=(char*)calloc(cursor->width*bpp,cursor->height); + cp=cursor->richSource=(unsigned char*)calloc(cursor->width*bpp,cursor->height); if(format->bigEndian) { back+=4-bpp; |