Commit 347c4a98 authored by runge's avatar runge

fix some build issues WRT ultravnc code.

parent 279f3549
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> 2006-05-06 Karl Runge <runge@karlrunge.com>
* configure.ac: add linux/videodev.h and linux/fb.h detection. * configure.ac: add linux/videodev.h and linux/fb.h detection.
......
...@@ -2,9 +2,11 @@ AM_CFLAGS=-g -I $(top_srcdir) -I. -Wall ...@@ -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 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 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 $(libvncclient_a_OBJECTS): ../rfb/rfbclient.h
......
...@@ -1703,11 +1703,12 @@ rfbSendFramebufferUpdate(rfbClientPtr cl, ...@@ -1703,11 +1703,12 @@ rfbSendFramebufferUpdate(rfbClientPtr cl,
int y = rect.y1; int y = rect.y1;
int w = rect.x2 - x; int w = rect.x2 - x;
int h = rect.y2 - y; int h = rect.y2 - y;
int rectsPerRow, rows;
/* We need to count the number of rects in the scaled screen */ /* We need to count the number of rects in the scaled screen */
if (cl->screen!=cl->scaledScreen) if (cl->screen!=cl->scaledScreen)
rfbScaledCorrection(cl->screen, cl->scaledScreen, &x, &y, &w, &h, "rfbSendFramebufferUpdate"); rfbScaledCorrection(cl->screen, cl->scaledScreen, &x, &y, &w, &h, "rfbSendFramebufferUpdate");
int rectsPerRow = (w-1)/cl->correMaxWidth+1; rectsPerRow = (w-1)/cl->correMaxWidth+1;
int rows = (h-1)/cl->correMaxHeight+1; rows = (h-1)/cl->correMaxHeight+1;
nUpdateRegionRects += rectsPerRow*rows; nUpdateRegionRects += rectsPerRow*rows;
} }
sraRgnReleaseIterator(i); sraRgnReleaseIterator(i);
...@@ -1749,10 +1750,11 @@ rfbSendFramebufferUpdate(rfbClientPtr cl, ...@@ -1749,10 +1750,11 @@ rfbSendFramebufferUpdate(rfbClientPtr cl,
int y = rect.y1; int y = rect.y1;
int w = rect.x2 - x; int w = rect.x2 - x;
int h = rect.y2 - y; int h = rect.y2 - y;
int n;
/* We need to count the number of rects in the scaled screen */ /* We need to count the number of rects in the scaled screen */
if (cl->screen!=cl->scaledScreen) if (cl->screen!=cl->scaledScreen)
rfbScaledCorrection(cl->screen, cl->scaledScreen, &x, &y, &w, &h, "rfbSendFramebufferUpdate"); 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) { if (n == 0) {
nUpdateRegionRects = 0xFFFF; nUpdateRegionRects = 0xFFFF;
break; break;
......
...@@ -66,7 +66,10 @@ ...@@ -66,7 +66,10 @@
#endif #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) int ScaleX(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int x)
{ {
...@@ -105,12 +108,12 @@ void rfbScaledCorrection(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int *x, int ...@@ -105,12 +108,12 @@ void rfbScaledCorrection(rfbScreenInfoPtr from, rfbScreenInfoPtr to, int *x, int
/*cast from double to int is same as "*x = floor(x1);" */ /*cast from double to int is same as "*x = floor(x1);" */
x2 = floor(x1); x2 = FLOOR(x1);
y2 = floor(y1); y2 = FLOOR(y1);
/* include into W and H the jitter of scaling X and Y */ /* include into W and H the jitter of scaling X and Y */
w2 = ceil(w1 + ( x1 - x2 )); w2 = CEIL(w1 + ( x1 - x2 ));
h2 = ceil(h1 + ( y1 - y2 )); h2 = CEIL(h1 + ( y1 - y2 ));
/* /*
* rfbLog("%s (%dXx%dY-%dWx%dH -> %fXx%fY-%fWx%fH) {%dWx%dH -> %dWx%dH}\n", * rfbLog("%s (%dXx%dY-%dWx%dH -> %fXx%fY-%fWx%fH) {%dWx%dH -> %dWx%dH}\n",
......
AM_CFLAGS=-I $(top_srcdir)
CONSOLE_SRCS=VNConsole.c CONSOLE_SRCS=VNConsole.c
noinst_HEADERS=VNConsole.h vga.h noinst_HEADERS=VNConsole.h vga.h
CFLAGS_ADD=-I..
LDADD=../libvncserver/libvncserver.a @WSOCKLIB@ LDADD=../libvncserver/libvncserver.a @WSOCKLIB@
INCLUDES=-I. INCLUDES=-I.
......
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