summaryrefslogtreecommitdiffstats
path: root/libvncserver/corre.c
diff options
context:
space:
mode:
authordscho <dscho>2005-05-15 13:57:51 +0000
committerdscho <dscho>2005-05-15 13:57:51 +0000
commit8bee4eb990273c3654431467ba6618eb916f030a (patch)
treef3077e1cb12a4cb778047814583fc0b2f26bb7b2 /libvncserver/corre.c
parentbe5b1296e4aa4d8a51cd709853408ec0cd7b768b (diff)
downloadlibtdevnc-8bee4eb990273c3654431467ba6618eb916f030a.tar.gz
libtdevnc-8bee4eb990273c3654431467ba6618eb916f030a.zip
ANSIfy, fix some warnings from Linus' sparse
Diffstat (limited to 'libvncserver/corre.c')
-rwxr-xr-xlibvncserver/corre.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/libvncserver/corre.c b/libvncserver/corre.c
index 511a34b..058a77c 100755
--- a/libvncserver/corre.c
+++ b/libvncserver/corre.c
@@ -57,9 +57,11 @@ static rfbBool rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl, int x, int y,
*/
rfbBool
-rfbSendRectEncodingCoRRE(cl, x, y, w, h)
- rfbClientPtr cl;
- int x, y, w, h;
+rfbSendRectEncodingCoRRE(rfbClientPtr cl,
+ int x,
+ int y,
+ int w,
+ int h)
{
if (h > cl->correMaxHeight) {
return (rfbSendRectEncodingCoRRE(cl, x, y, w, cl->correMaxHeight) &&
@@ -85,9 +87,11 @@ rfbSendRectEncodingCoRRE(cl, x, y, w, h)
*/
static rfbBool
-rfbSendSmallRectEncodingCoRRE(cl, x, y, w, h)
- rfbClientPtr cl;
- int x, y, w, h;
+rfbSendSmallRectEncodingCoRRE(rfbClientPtr cl,
+ int x,
+ int y,
+ int w,
+ int h)
{
rfbFramebufferUpdateRectHeader rect;
rfbRREHeader hdr;
@@ -206,11 +210,7 @@ rfbSendSmallRectEncodingCoRRE(cl, x, y, w, h)
#define DEFINE_SUBRECT_ENCODE(bpp) \
static int \
-subrectEncode##bpp(data,w,h) \
- uint##bpp##_t *data; \
- int w; \
- int h; \
-{ \
+subrectEncode##bpp(uint##bpp##_t *data, int w, int h) { \
uint##bpp##_t cl; \
rfbCoRRERectangle subrect; \
int x,y; \
@@ -277,7 +277,7 @@ subrectEncode##bpp(data,w,h) \
return -1; \
\
numsubs += 1; \
- *((uint##bpp##_t*)(rreAfterBuf + rreAfterBufLen)) = cl; \
+ *((uint##bpp##_t*)(rreAfterBuf + rreAfterBufLen)) = cl; \
rreAfterBufLen += (bpp/8); \
memcpy(&rreAfterBuf[rreAfterBufLen],&subrect,sz_rfbCoRRERectangle); \
rreAfterBufLen += sz_rfbCoRRERectangle; \
@@ -306,12 +306,9 @@ DEFINE_SUBRECT_ENCODE(32)
* getBgColour() gets the most prevalent colour in a byte array.
*/
static uint32_t
-getBgColour(data,size,bpp)
- char *data;
- int size;
- int bpp;
+getBgColour(char *data, int size, int bpp)
{
-
+
#define NUMCLRS 256
static int counts[NUMCLRS];