Indent fixes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@317 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
2dd0b246fb
commit
0f0bb5f281
35
bitmap.c
35
bitmap.c
@ -22,7 +22,8 @@
|
||||
|
||||
#define CVAL(p) (*(p++))
|
||||
|
||||
uint32 cvalx(unsigned char **input, int Bpp)
|
||||
uint32
|
||||
cvalx(unsigned char **input, int Bpp)
|
||||
{
|
||||
uint32 rv = 0;
|
||||
memcpy(&rv, *input, Bpp);
|
||||
@ -30,13 +31,15 @@ uint32 cvalx(unsigned char **input, int Bpp)
|
||||
return rv;
|
||||
}
|
||||
|
||||
void setli(unsigned char * input, int offset, uint32 value, int Bpp)
|
||||
void
|
||||
setli(unsigned char *input, int offset, uint32 value, int Bpp)
|
||||
{
|
||||
input += offset * Bpp;
|
||||
memcpy(input, &value, Bpp);
|
||||
}
|
||||
|
||||
uint32 getli(unsigned char * input, int offset, int Bpp)
|
||||
uint32
|
||||
getli(unsigned char *input, int offset, int Bpp)
|
||||
{
|
||||
uint32 rv = 0;
|
||||
input += offset * Bpp;
|
||||
@ -65,7 +68,8 @@ uint32 getli(unsigned char * input, int offset, int Bpp)
|
||||
}
|
||||
|
||||
BOOL
|
||||
bitmap_decompress(unsigned char *output, int width, int height, unsigned char *input, int size, int Bpp)
|
||||
bitmap_decompress(unsigned char *output, int width, int height, unsigned char *input, int size,
|
||||
int Bpp)
|
||||
{
|
||||
unsigned char *end = input + size;
|
||||
unsigned char *prevline = NULL, *line = NULL;
|
||||
@ -189,7 +193,8 @@ bitmap_decompress(unsigned char *output, int width, int height, unsigned char *i
|
||||
if (prevline == NULL)
|
||||
setli(line, x, mix, Bpp);
|
||||
else
|
||||
setli(line, x, getli(prevline, x, Bpp) ^ mix, Bpp);
|
||||
setli(line, x,
|
||||
getli(prevline, x, Bpp) ^ mix, Bpp);
|
||||
|
||||
insertmix = False;
|
||||
count--;
|
||||
@ -198,11 +203,11 @@ bitmap_decompress(unsigned char *output, int width, int height, unsigned char *i
|
||||
|
||||
if (prevline == NULL)
|
||||
{
|
||||
REPEAT(setli(line, x, 0, Bpp))
|
||||
}
|
||||
REPEAT(setli(line, x, 0, Bpp))}
|
||||
else
|
||||
{
|
||||
REPEAT(setli(line, x, getli(prevline, x, Bpp), Bpp));
|
||||
REPEAT(setli
|
||||
(line, x, getli(prevline, x, Bpp), Bpp));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -213,7 +218,9 @@ bitmap_decompress(unsigned char *output, int width, int height, unsigned char *i
|
||||
}
|
||||
else
|
||||
{
|
||||
REPEAT(setli(line, x, getli(prevline, x, Bpp) ^ mix, Bpp));
|
||||
REPEAT(setli
|
||||
(line, x, getli(prevline, x, Bpp) ^ mix,
|
||||
Bpp));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -229,9 +236,11 @@ bitmap_decompress(unsigned char *output, int width, int height, unsigned char *i
|
||||
{
|
||||
REPEAT(MASK_UPDATE();
|
||||
if (mask & mixmask)
|
||||
setli(line, x, getli(prevline, x, Bpp) ^ mix, Bpp);
|
||||
setli(line, x, getli(prevline, x, Bpp) ^ mix,
|
||||
Bpp);
|
||||
else
|
||||
setli(line, x, getli(prevline, x, Bpp), Bpp););
|
||||
setli(line, x, getli(prevline, x, Bpp),
|
||||
Bpp););
|
||||
}
|
||||
break;
|
||||
|
||||
@ -249,7 +258,8 @@ bitmap_decompress(unsigned char *output, int width, int height, unsigned char *i
|
||||
setli(line, x, colour2, Bpp); bicolour = False;}
|
||||
else
|
||||
{
|
||||
setli(line, x, colour1, Bpp); bicolour = True; count++;}
|
||||
setli(line, x, colour1, Bpp); bicolour = True;
|
||||
count++;}
|
||||
);
|
||||
break;
|
||||
|
||||
@ -270,4 +280,3 @@ bitmap_decompress(unsigned char *output, int width, int height, unsigned char *i
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
13
licence.c
13
licence.c
@ -97,9 +97,8 @@ save_licence(unsigned char *data, int length)
|
||||
if ((s_ptr->p) + 4 > data + length)
|
||||
{
|
||||
printf("Error in parsing licence key.\n");
|
||||
printf("Strings %d end value %x > supplied length (%x)\n", i,
|
||||
(unsigned int)s_ptr->p,
|
||||
(unsigned int)data + length);
|
||||
printf("Strings %d end value %x > supplied length (%x)\n", i,
|
||||
(unsigned int) s_ptr->p, (unsigned int) data + length);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -107,9 +106,8 @@ save_licence(unsigned char *data, int length)
|
||||
if (s_ptr->p + len > data + length)
|
||||
{
|
||||
printf("Error in parsing licence key.\n");
|
||||
printf("End of licence %x > supplied length (%x)\n",
|
||||
(unsigned int)s_ptr->p + len,
|
||||
(unsigned int)data + length);
|
||||
printf("End of licence %x > supplied length (%x)\n",
|
||||
(unsigned int) s_ptr->p + len, (unsigned int) data + length);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -145,7 +143,7 @@ save_licence(unsigned char *data, int length)
|
||||
fnamewrk = xmalloc(strlen(fname) + 12);
|
||||
for (y = 0;; y++)
|
||||
{
|
||||
sprintf(fnamewrk, "%s.%lu", fname, (long unsigned int)y);
|
||||
sprintf(fnamewrk, "%s.%lu", fname, (long unsigned int) y);
|
||||
fnwrkfd = open(fnamewrk, O_WRONLY | O_CREAT | O_EXCL, 0600);
|
||||
if (fnwrkfd == -1)
|
||||
{
|
||||
@ -477,4 +475,3 @@ licence_process(STREAM s)
|
||||
unimpl("licence tag 0x%x\n", tag);
|
||||
}
|
||||
}
|
||||
|
||||
|
3
orders.c
3
orders.c
@ -659,7 +659,8 @@ process_raw_bmpcache(STREAM s)
|
||||
inverted = xmalloc(width * height * Bpp);
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
memcpy(&inverted[(height - y - 1) * (width * Bpp)], &data[y * (width * Bpp)], width * Bpp);
|
||||
memcpy(&inverted[(height - y - 1) * (width * Bpp)], &data[y * (width * Bpp)],
|
||||
width * Bpp);
|
||||
}
|
||||
|
||||
bitmap = ui_create_bitmap(width, height, inverted);
|
||||
|
@ -242,7 +242,8 @@ main(int argc, char *argv[])
|
||||
|
||||
case 'a':
|
||||
server_bpp = strtol(optarg, NULL, 10);
|
||||
if (server_bpp != 8 && server_bpp != 16 && server_bpp != 15 && server_bpp != 24)
|
||||
if (server_bpp != 8 && server_bpp != 16 && server_bpp != 15
|
||||
&& server_bpp != 24)
|
||||
{
|
||||
error("invalid server bpp\n");
|
||||
return 1;
|
||||
@ -512,4 +513,3 @@ hexdump(unsigned char *p, unsigned int len)
|
||||
line += thisline;
|
||||
}
|
||||
}
|
||||
|
||||
|
3
rdp.c
3
rdp.c
@ -583,7 +583,8 @@ process_bitmap_updates(STREAM s)
|
||||
bmpdata = xmalloc(width * height * Bpp);
|
||||
for (y = 0; y < height; y++)
|
||||
{
|
||||
in_uint8a(s, &bmpdata[(height - y - 1) * (width * Bpp)], width * Bpp);
|
||||
in_uint8a(s, &bmpdata[(height - y - 1) * (width * Bpp)],
|
||||
width * Bpp);
|
||||
}
|
||||
ui_paint_bitmap(left, top, cx, cy, width, height, bmpdata);
|
||||
xfree(bmpdata);
|
||||
|
@ -198,7 +198,7 @@ xkeymap_read(char *mapname)
|
||||
/* Automatically add uppercase key, with same modifiers
|
||||
plus shift */
|
||||
for (p = keyname; *p; p++)
|
||||
*p = toupper((int)*p);
|
||||
*p = toupper((int) *p);
|
||||
MASK_ADD_BITS(modifiers, MapLeftShiftMask);
|
||||
add_to_keymap(keyname, scancode, modifiers, mapname);
|
||||
}
|
||||
@ -220,7 +220,7 @@ xkeymap_init(void)
|
||||
mapname_ptr = keymapname;
|
||||
while (*mapname_ptr)
|
||||
{
|
||||
*mapname_ptr = tolower((int)*mapname_ptr);
|
||||
*mapname_ptr = tolower((int) *mapname_ptr);
|
||||
mapname_ptr++;
|
||||
}
|
||||
|
||||
|
21
xwin.c
21
xwin.c
@ -180,7 +180,8 @@ split_colour24(uint32 colour)
|
||||
return rv;
|
||||
}
|
||||
|
||||
uint32 make_colour16(PixelColour pc)
|
||||
uint32
|
||||
make_colour16(PixelColour pc)
|
||||
{
|
||||
pc.red = (pc.red * 0x1f) / 0xff;
|
||||
pc.green = (pc.green * 0x3f) / 0xff;
|
||||
@ -188,12 +189,14 @@ uint32 make_colour16(PixelColour pc)
|
||||
return (pc.red << 11) | (pc.green << 5) | pc.blue;
|
||||
}
|
||||
|
||||
uint32 make_colour24(PixelColour pc)
|
||||
uint32
|
||||
make_colour24(PixelColour pc)
|
||||
{
|
||||
return (pc.red << 16) | (pc.green << 8) | pc.blue;
|
||||
}
|
||||
|
||||
uint32 make_colour32(PixelColour pc)
|
||||
uint32
|
||||
make_colour32(PixelColour pc)
|
||||
{
|
||||
return (pc.red << 16) | (pc.green << 8) | pc.blue;
|
||||
}
|
||||
@ -426,13 +429,15 @@ translate_image(int width, int height, uint8 * data)
|
||||
switch (bpp)
|
||||
{
|
||||
case 32:
|
||||
translate16to32((uint16 *) data, (uint32 *) out, (uint32 *) end);
|
||||
translate16to32((uint16 *) data, (uint32 *) out,
|
||||
(uint32 *) end);
|
||||
break;
|
||||
case 24:
|
||||
translate16to24((uint16 *) data, out, end);
|
||||
break;
|
||||
case 16:
|
||||
translate16to16((uint16 *) data, (uint16 *) out, (uint16 *) end);
|
||||
translate16to16((uint16 *) data, (uint16 *) out,
|
||||
(uint16 *) end);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -440,13 +445,15 @@ translate_image(int width, int height, uint8 * data)
|
||||
switch (bpp)
|
||||
{
|
||||
case 32:
|
||||
translate15to32((uint16 *) data, (uint32 *) out, (uint32 *) end);
|
||||
translate15to32((uint16 *) data, (uint32 *) out,
|
||||
(uint32 *) end);
|
||||
break;
|
||||
case 24:
|
||||
translate15to24((uint16 *) data, out, end);
|
||||
break;
|
||||
case 16:
|
||||
translate15to16((uint16 *) data, (uint16 *) out, (uint16 *) end);
|
||||
translate15to16((uint16 *) data, (uint16 *) out,
|
||||
(uint16 *) end);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user