diff options
author | dscho <dscho> | 2004-02-04 07:59:03 +0000 |
---|---|---|
committer | dscho <dscho> | 2004-02-04 07:59:03 +0000 |
commit | 50a80e7304cea25104cec215da7c061a4998e6bd (patch) | |
tree | 0932fe5b648cea1bf6b2b37140addf41ca618f16 | |
parent | 2fbf23c17ffbc03c5a4d4aa1bda55586e8f41a8e (diff) | |
download | libtdevnc-50a80e7304cea25104cec215da7c061a4998e6bd.tar.gz libtdevnc-50a80e7304cea25104cec215da7c061a4998e6bd.zip |
make examples g++ compileable, thanks to Juan Jose Costello
-rw-r--r-- | AUTHORS | 7 | ||||
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | examples/colourmaptest.c | 2 | ||||
-rw-r--r-- | examples/copyrecttest.c | 2 | ||||
-rw-r--r-- | examples/example.c | 2 | ||||
-rw-r--r-- | examples/simple.c | 2 | ||||
-rw-r--r-- | examples/simple15.c | 2 | ||||
-rw-r--r-- | examples/vncev.c | 2 |
8 files changed, 14 insertions, 9 deletions
@@ -14,16 +14,17 @@ The good folks from * KRFB (I think it was Tim Jansen) helped also a lot (some *big* bugs!). -Karl Runge provided an x11vnc, which is a much, much improved version of my +Karl Runge provides an x11vnc, which is a much, much improved version of my original proof-of-concept. It really deserves to replace the old version, -as it is a state-of-the-art, fast and usable program by now! +as it is a state-of-the-art, fast and usable program by now! However, he +maintains it and improves it still in amazing ways! Occasional important patches were sent by (in order I found the names in my archives and please don't beat me, if I forgot you, but just send me an email!): Akira Hatakeyama, Karl J. Runge, Justin "Zippy" Dearing, Oliver Mihatsch, Greg Sternberg, Werner Hofer, Giampiero Giancipoli, Glenn Mabutt, Paul Kreiner, Erik Kunze, Mike Frysinger, Martin Waitz, -Mark McLoughlin. +Mark McLoughlin, Paul Fox, Juan Jose Costello. Probably I forgot quite a few people sending a patch here and there, which really made a difference. Without those, some obscure bugs still would @@ -1,3 +1,7 @@ +2004-02-04 Johannes E. Schindelin <Johannes.Schindelin@gmx.de> + * Make examples (at least a few) compileable with g++, + as pointed out by Juan Jose Costello + 2004-01-30 Johannes E. Schindelin <Johannes.Schindelin@gmx.de> * Thanks to Paul Fox from Bright Star Engineering, a few more memory leaks were fixed. diff --git a/examples/colourmaptest.c b/examples/colourmaptest.c index 9a86197..156781c 100644 --- a/examples/colourmaptest.c +++ b/examples/colourmaptest.c @@ -21,7 +21,7 @@ int main(int argc,char** argv) bytes[128*3+2]=0; server->colourMap.data.bytes=bytes; - server->frameBuffer=malloc(256*256); + server->frameBuffer=(char*)malloc(256*256); for(i=0;i<256*256;i++) server->frameBuffer[i]=(i/256); diff --git a/examples/copyrecttest.c b/examples/copyrecttest.c index 8186e8e..ff278b4 100644 --- a/examples/copyrecttest.c +++ b/examples/copyrecttest.c @@ -19,7 +19,7 @@ int main(int argc,char** argv) double r,phi; rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,width,height,8,3,4); - server->frameBuffer=malloc(width*height*4); + server->frameBuffer=(char*)malloc(width*height*4); initBackground(server); server->rfbDeferUpdateTime=0; rfbInitServer(server); diff --git a/examples/example.c b/examples/example.c index 23522ab..9a12579 100644 --- a/examples/example.c +++ b/examples/example.c @@ -258,7 +258,7 @@ void MakeRichCursor(rfbScreenInfoPtr rfbScreen) c=rfbScreen->cursor = rfbMakeXCursor(w,h,bitmap,bitmap); c->xhot = 16; c->yhot = 24; - c->richSource = malloc(w*h*bpp); + c->richSource = (char*)malloc(w*h*bpp); for(j=0;j<h;j++) { for(i=0;i<w;i++) { c->richSource[j*w*bpp+i*bpp+0]=i*0xff/w; diff --git a/examples/simple.c b/examples/simple.c index 0d6345f..f6e94dc 100644 --- a/examples/simple.c +++ b/examples/simple.c @@ -3,7 +3,7 @@ int main(int argc,char** argv) { rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,400,300,8,3,4); - server->frameBuffer=malloc(400*300*4); + server->frameBuffer=(char*)malloc(400*300*4); rfbInitServer(server); rfbRunEventLoop(server,-1,FALSE); return(0); diff --git a/examples/simple15.c b/examples/simple15.c index 12583ba..faff4f7 100644 --- a/examples/simple15.c +++ b/examples/simple15.c @@ -10,7 +10,7 @@ int main(int argc,char** argv) rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,400,300,5,3,2); - server->frameBuffer=malloc(400*300*2); + server->frameBuffer=(char*)malloc(400*300*2); f=(uint16_t*)server->frameBuffer; for(j=0;j<300;j++) for(i=0;i<400;i++) diff --git a/examples/vncev.c b/examples/vncev.c index e1f6dcc..34128f7 100644 --- a/examples/vncev.c +++ b/examples/vncev.c @@ -44,7 +44,7 @@ void read_keys() for(j=0,i+=2;(k=hex2number(buffer[i]))>=0;i++) j=j*16+k; if(keys[j&0x3ff]) { - char* x=malloc(1+strlen(keys[j&0x3ff])+1+strlen(buffer+strlen("#define "))); + char* x=(char*)malloc(1+strlen(keys[j&0x3ff])+1+strlen(buffer+strlen("#define "))); strcpy(x,keys[j&0x3ff]); strcat(x,","); strcat(x,buffer+strlen("#define ")); |