fix some build issues WRT ultravnc code.

pull/1/head
runge 19 years ago
parent 279f35495a
commit 347c4a9847

@ -1,3 +1,12 @@
2006-05-13 Karl Runge <runge@karlrunge.com>
* minilzo.c,minilzo.h,lzoconf.h: switch to non-CRLF versions.
* libvncclient/Makefile.am: add minilzo.c, minilzo.h, lzoconf.h
and ultra.c to materials lists.
* libvncserver/scale.c: remove libm dependency with CEIL and
FLOOR macros.
* libvncserver/rfbserver.c: remove C99 declarations.
* vncterm/Makefile.am: fix VPATH build.
2006-05-06 Karl Runge <runge@karlrunge.com>
* configure.ac: add linux/videodev.h and linux/fb.h detection.

@ -2,9 +2,11 @@ AM_CFLAGS=-g -I $(top_srcdir) -I. -Wall
libvncclient_a_SOURCES=cursor.c listen.c rfbproto.c sockets.c vncviewer.c minilzo.c
noinst_HEADERS=lzoconf.h minilzo.h
rfbproto.o: rfbproto.c corre.c hextile.c rre.c tight.c zlib.c zrle.c ultra.c
EXTRA_DIST=corre.c hextile.c rre.c tight.c zlib.c zrle.c
EXTRA_DIST=corre.c hextile.c rre.c tight.c zlib.c zrle.c ultra.c
$(libvncclient_a_OBJECTS): ../rfb/rfbclient.h

@ -1703,11 +1703,12 @@ rfbSendFramebufferUpdate(rfbClientPtr cl,
int y = rect.y1;
int w = rect.x2 - x;
int h = rect.y2 - y;
int rectsPerRow, rows;
/* We need to count the number of rects in the scaled screen */
if (cl->screen!=cl->scaledScreen)
rfbScaledCorrection(cl->screen, cl->scaledScreen, &x, &y, &w, &h, "rfbSendFramebufferUpdate");
int rectsPerRow = (w-1)/cl->correMaxWidth+1;
int rows = (h-1)/cl->correMaxHeight+1;
rectsPerRow = (w-1)/cl->correMaxWidth+1;
rows = (h-1)/cl->correMaxHeight+1;
nUpdateRegionRects += rectsPerRow*rows;
}
sraRgnReleaseIterator(i);
@ -1749,10 +1750,11 @@ rfbSendFramebufferUpdate(rfbClientPtr cl,
int y = rect.y1;
int w = rect.x2 - x;
int h = rect.y2 - y;
int n;
/* We need to count the number of rects in the scaled screen */
if (cl->screen!=cl->scaledScreen)
rfbScaledCorrection(cl->screen, cl->scaledScreen, &x, &y, &w, &h, "rfbSendFramebufferUpdate");
int n = rfbNumCodedRectsTight(cl, x, y, w, h);
n = rfbNumCodedRectsTight(cl, x, y, w, h);
if (n == 0) {
nUpdateRegionRects = 0xFFFF;
break;

@ -66,7 +66,10 @@
#endif
/****************************/
#include <math.h>
#define CEIL(x) ( (double) ((int) (x)) == (x) ? \
(double) ((int) (x)) : (double) ((int) (x) + 1) )
#define FLOOR(x) ( (double) ((int) (x)) )
int ScaleX(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int x)
{
@ -105,12 +108,12 @@ void rfbScaledCorrection(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int *x, int
/*cast from double to int is same as "*x = floor(x1);" */
x2 = floor(x1);
y2 = floor(y1);
x2 = FLOOR(x1);
y2 = FLOOR(y1);
/* include into W and H the jitter of scaling X and Y */
w2 = ceil(w1 + ( x1 - x2 ));
h2 = ceil(h1 + ( y1 - y2 ));
w2 = CEIL(w1 + ( x1 - x2 ));
h2 = CEIL(h1 + ( y1 - y2 ));
/*
* rfbLog("%s (%dXx%dY-%dWx%dH -> %fXx%fY-%fWx%fH) {%dWx%dH -> %dWx%dH}\n",

@ -1,9 +1,9 @@
AM_CFLAGS=-I $(top_srcdir)
CONSOLE_SRCS=VNConsole.c
noinst_HEADERS=VNConsole.h vga.h
CFLAGS_ADD=-I..
LDADD=../libvncserver/libvncserver.a @WSOCKLIB@
INCLUDES=-I.

Loading…
Cancel
Save