make examples g++ compileable, thanks to Juan Jose Costello

pull/1/head
dscho 21 years ago
parent 2fbf23c17f
commit 50a80e7304

@ -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.

@ -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);

@ -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);

@ -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;

@ -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);

@ -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++)

@ -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 "));

Loading…
Cancel
Save