Commit 4d871894 authored by dscho's avatar dscho

compiler warnings, contrib directory, new x11vnc from Karl Runge

parent d60fda11
Better x11vnc from Karl J. Runge!
fixed severe bug (Const Kaplinsky) fixed severe bug (Const Kaplinsky)
got patch from Const Kaplisnky with CursorPosUpdate encoding and some Docs got patch from Const Kaplisnky with CursorPosUpdate encoding and some Docs
sync'ed with newest RealVNC (ZRLE encoding) sync'ed with newest RealVNC (ZRLE encoding)
......
...@@ -3,6 +3,7 @@ VNCSERVERLIB=-L. -lvncserver -L/usr/local/lib -lz -ljpeg ...@@ -3,6 +3,7 @@ VNCSERVERLIB=-L. -lvncserver -L/usr/local/lib -lz -ljpeg
CXX=g++ CXX=g++
CC=gcc CC=gcc
LINK=gcc
# for Solaris # for Solaris
#EXTRALIBS=-lsocket -lnsl -L/usr/X/lib #EXTRALIBS=-lsocket -lnsl -L/usr/X/lib
...@@ -36,6 +37,7 @@ ZRLE_SRCS=zrle.cc rdr/FdInStream.cxx rdr/FdOutStream.cxx rdr/InStream.cxx \ ...@@ -36,6 +37,7 @@ ZRLE_SRCS=zrle.cc rdr/FdInStream.cxx rdr/FdOutStream.cxx rdr/InStream.cxx \
ZRLE_OBJS=zrle.o rdr/FdInStream.o rdr/FdOutStream.o rdr/InStream.o \ ZRLE_OBJS=zrle.o rdr/FdInStream.o rdr/FdOutStream.o rdr/InStream.o \
rdr/NullOutStream.o rdr/ZlibInStream.o rdr/ZlibOutStream.o rdr/NullOutStream.o rdr/ZlibInStream.o rdr/ZlibOutStream.o
ZRLE_DEF=-DHAVE_ZRLE ZRLE_DEF=-DHAVE_ZRLE
LINK=$(CXX)
%.o: %.cxx %.o: %.cxx
$(CXX) $(CXXFLAGS) -c -o $@ $< $(CXX) $(CXXFLAGS) -c -o $@ $<
...@@ -75,52 +77,53 @@ libvncserver.a: $(OBJS) ...@@ -75,52 +77,53 @@ libvncserver.a: $(OBJS)
translate.o: translate.c tableinit24.c tableinitcmtemplate.c tableinittctemplate.c tabletrans24template.c tabletranstemplate.c translate.o: translate.c tableinit24.c tableinitcmtemplate.c tableinittctemplate.c tabletrans24template.c tabletranstemplate.c
example: example.o libvncserver.a example: example.o libvncserver.a
$(CC) -o example example.o $(LIBS) $(LINK) -o example example.o $(LIBS)
pnmshow: pnmshow.o libvncserver.a pnmshow: pnmshow.o libvncserver.a
$(CC) -o pnmshow pnmshow.o $(LIBS) $(LINK) -o pnmshow pnmshow.o $(LIBS)
mac.o: mac.c 1instance.c mac.o: mac.c 1instance.c
OSXvnc-server: mac.o libvncserver.a OSXvnc-server: mac.o libvncserver.a
$(CC) -o OSXvnc-server mac.o $(LIBS) $(OSX_LIBS) $(LINK) -o OSXvnc-server mac.o $(LIBS) $(OSX_LIBS)
x11vnc.o: x11vnc.c 1instance.c x11vnc.o: contrib/x11vnc.c rfb.h 1instance.c Makefile
$(CC) $(CFLAGS) -I. -c -o x11vnc.o contrib/x11vnc.c
x11vnc: x11vnc.o libvncserver.a x11vnc: x11vnc.o libvncserver.a
$(CC) -g -o x11vnc x11vnc.o $(LIBS) $(XLIBS) $(LINK) -g -o x11vnc x11vnc.o $(LIBS) $(XLIBS)
x11vnc_static: x11vnc.o libvncserver.a x11vnc_static: x11vnc.o libvncserver.a
$(CC) -o x11vnc_static x11vnc.o libvncserver.a /usr/lib/libz.a /usr/lib/libjpeg.a $(XLIBS) $(LINK) -o x11vnc_static x11vnc.o libvncserver.a /usr/lib/libz.a /usr/lib/libjpeg.a $(XLIBS)
#$(LIBS) $(XLIBS) #$(LIBS) $(XLIBS)
storepasswd: storepasswd.o d3des.o vncauth.o storepasswd: storepasswd.o d3des.o vncauth.o
$(CC) -o storepasswd storepasswd.o d3des.o vncauth.o $(LINK) -o storepasswd storepasswd.o d3des.o vncauth.o
sratest: sratest.o sratest: sratest.o
$(CC) -o sratest sratest.o $(LINK) -o sratest sratest.o
sratest.o: sraRegion.c sratest.o: sraRegion.c
$(CC) $(CFLAGS) -DSRA_TEST -c -o sratest.o sraRegion.c $(CC) $(CFLAGS) -DSRA_TEST -c -o sratest.o sraRegion.c
blooptest: blooptest.o libvncserver.a blooptest: blooptest.o libvncserver.a
$(CC) -o blooptest blooptest.o $(LIBS) $(LINK) -o blooptest blooptest.o $(LIBS)
blooptest.o: example.c rfb.h blooptest.o: example.c rfb.h
$(CC) $(CFLAGS) -DBACKGROUND_LOOP_TEST -c -o blooptest.o example.c $(CC) $(CFLAGS) -DBACKGROUND_LOOP_TEST -c -o blooptest.o example.c
pnmshow24: pnmshow24.o libvncserver.a pnmshow24: pnmshow24.o libvncserver.a
$(CC) -o pnmshow24 pnmshow24.o $(LIBS) $(LINK) -o pnmshow24 pnmshow24.o $(LIBS)
fontsel: fontsel.o libvncserver.a fontsel: fontsel.o libvncserver.a
$(CC) -o fontsel fontsel.o -L. -lvncserver -lz -ljpeg $(LINK) -o fontsel fontsel.o -L. -lvncserver -lz -ljpeg
vncev: vncev.o libvncserver.a vncev: vncev.o libvncserver.a
$(CC) -o vncev vncev.o -L. -lvncserver -lz -ljpeg $(LINK) -o vncev vncev.o -L. -lvncserver -lz -ljpeg
# Example from Justin # Example from Justin
zippy: zippy.o libvncserver.a zippy: contrib/zippy.o libvncserver.a
$(CC) -o zippy zippy.o -L. -lvncserver -lz -ljpeg $(LINK) -o zippy contrib/zippy.o -L. -lvncserver -lz -ljpeg
clean: clean:
rm -f $(OBJS) *~ core "#"* *.bak *.orig storepasswd.o \ rm -f $(OBJS) *~ core "#"* *.bak *.orig storepasswd.o \
......
This diff is collapsed.
...@@ -266,7 +266,7 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen) ...@@ -266,7 +266,7 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen)
httpCloseSock(rfbScreen); httpCloseSock(rfbScreen);
return; return;
} }
// proxy connection /* proxy connection */
rfbLog("httpd: client asked for CONNECT\n"); rfbLog("httpd: client asked for CONNECT\n");
WriteExact(&cl,PROXY_OK_STR,strlen(PROXY_OK_STR)); WriteExact(&cl,PROXY_OK_STR,strlen(PROXY_OK_STR));
rfbNewClientConnection(rfbScreen,rfbScreen->httpSock); rfbNewClientConnection(rfbScreen,rfbScreen->httpSock);
...@@ -274,7 +274,7 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen) ...@@ -274,7 +274,7 @@ httpProcessInput(rfbScreenInfoPtr rfbScreen)
return; return;
} }
if (!strncmp(buf, "GET ",4) && !strncmp(strchr(buf,'/'),"/proxied.connection HTTP/1.", 27)) { if (!strncmp(buf, "GET ",4) && !strncmp(strchr(buf,'/'),"/proxied.connection HTTP/1.", 27)) {
// proxy connection /* proxy connection */
rfbLog("httpd: client asked for /proxied.connection\n"); rfbLog("httpd: client asked for /proxied.connection\n");
WriteExact(&cl,PROXY_OK_STR,strlen(PROXY_OK_STR)); WriteExact(&cl,PROXY_OK_STR,strlen(PROXY_OK_STR));
rfbNewClientConnection(rfbScreen,rfbScreen->httpSock); rfbNewClientConnection(rfbScreen,rfbScreen->httpSock);
......
...@@ -128,7 +128,7 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in ...@@ -128,7 +128,7 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in
sraRgnDestroy(modifiedRegionBackup); sraRgnDestroy(modifiedRegionBackup);
#if 0 #if 0
//TODO: is this needed? Or does it mess up deferring? /* TODO: is this needed? Or does it mess up deferring? */
/* while(!sraRgnEmpty(cl->copyRegion)) */ { /* while(!sraRgnEmpty(cl->copyRegion)) */ {
#ifdef HAVE_PTHREADS #ifdef HAVE_PTHREADS
if(!cl->screen->backgroundLoop) if(!cl->screen->backgroundLoop)
......
...@@ -164,9 +164,17 @@ typedef int socklen_t; ...@@ -164,9 +164,17 @@ typedef int socklen_t;
the library and your application (at least the parts including rfb.h) the library and your application (at least the parts including rfb.h)
with the same support for pthreads. */ with the same support for pthreads. */
#ifdef HAVE_PTHREADS #ifdef HAVE_PTHREADS
#define rfbInitServer rfbInitServerWithPthreads #ifdef HAVE_ZRLE
#define rfbInitServer rfbInitServerWithPthreadsAndZRLE
#else
#define rfbInitServer rfbInitServerWithPthreadsButWithoutZRLE
#endif
#else
#ifdef HAVE_ZRLE
#define rfbInitServer rfbInitServerWithoutPthreadsButWithZRLE
#else #else
#define rfbInitServer rfbInitServerWithoutPthreads #define rfbInitServer rfbInitServerWithoutPthreadsAndZRLE
#endif
#endif #endif
#define MAX_ENCODINGS 10 #define MAX_ENCODINGS 10
...@@ -409,9 +417,6 @@ typedef struct _rfbClientRec { ...@@ -409,9 +417,6 @@ typedef struct _rfbClientRec {
Bool useCopyRect; Bool useCopyRect;
int preferredEncoding; int preferredEncoding;
int correMaxWidth, correMaxHeight; int correMaxWidth, correMaxHeight;
#ifdef HAVE_ZRLE
void* zrleData;
#endif
/* The following member is only used during VNC authentication */ /* The following member is only used during VNC authentication */
CARD8 authChallenge[CHALLENGESIZE]; CARD8 authChallenge[CHALLENGESIZE];
...@@ -538,6 +543,10 @@ typedef struct _rfbClientRec { ...@@ -538,6 +543,10 @@ typedef struct _rfbClientRec {
COND(updateCond); COND(updateCond);
#endif #endif
#ifdef HAVE_ZRLE
void* zrleData;
#endif
} rfbClientRec, *rfbClientPtr; } rfbClientRec, *rfbClientPtr;
/* /*
...@@ -725,9 +734,10 @@ extern void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c,Bool freeOld) ...@@ -725,9 +734,10 @@ extern void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c,Bool freeOld)
extern void defaultPtrAddEvent(int buttonMask,int x,int y,rfbClientPtr cl); extern void defaultPtrAddEvent(int buttonMask,int x,int y,rfbClientPtr cl);
/* zrle.c */ /* zrle.c */
#ifdef HAVE_ZRLE
extern Bool rfbSendRectEncodingZRLE(rfbClientPtr cl, int x, int y, int w,int h); extern Bool rfbSendRectEncodingZRLE(rfbClientPtr cl, int x, int y, int w,int h);
extern void FreeZrleData(rfbClientPtr cl); extern void FreeZrleData(rfbClientPtr cl);
#endif
/* stats.c */ /* stats.c */
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment