Indent fixes

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@737 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Peter Åstrand 2004-07-12 21:07:39 +00:00
parent 6adcee4855
commit dc156f8fcd
7 changed files with 33 additions and 34 deletions

View File

@ -40,7 +40,7 @@ cache_remove_lru_bitmap(uint8 cache_id)
{
int i;
uint16 cache_idx = 0;
uint32 m = (uint32)-1;
uint32 m = (uint32) - 1;
BMPCACHEENTRY *pbce;
for (i = 0; i < NUM_ELEMENTS(g_bmpcache[cache_id]); i++)

View File

@ -772,7 +772,7 @@ process_bmpcache2(STREAM s, uint16 flags, BOOL compressed)
in_uint8p(s, data, bufsize);
DEBUG(("BMPCACHE2(compr=%d,flags=%x,cx=%d,cy=%d,id=%d,idx=%d,Bpp=%d,bs=%d)\n",
compressed, flags, width, height, cache_id, cache_idx, Bpp, bufsize));
compressed, flags, width, height, cache_id, cache_idx, Bpp, bufsize));
bmpdata = (uint8 *) xmalloc(width * height * Bpp);
@ -789,7 +789,7 @@ process_bmpcache2(STREAM s, uint16 flags, BOOL compressed)
{
for (y = 0; y < height; y++)
memcpy(&bmpdata[(height - y - 1) * (width * Bpp)],
&data[y * (width * Bpp)], width * Bpp);
&data[y * (width * Bpp)], width * Bpp);
}
bitmap = ui_create_bitmap(width, height, bmpdata);
@ -799,7 +799,7 @@ process_bmpcache2(STREAM s, uint16 flags, BOOL compressed)
cache_put_bitmap(cache_id, cache_idx, bitmap, 0);
if (flags & PERSIST)
pstcache_put_bitmap(cache_id, cache_idx, bitmap_id, width, height,
width * height * Bpp, bmpdata);
width * height * Bpp, bmpdata);
}
else
{
@ -885,10 +885,10 @@ process_secondary_order(STREAM s)
uint8 *next_order;
in_uint16_le(s, length);
in_uint16_le(s, flags); /* used by bmpcache2 */
in_uint16_le(s, flags); /* used by bmpcache2 */
in_uint8(s, type);
next_order = s->p + (sint16)length + 7;
next_order = s->p + (sint16) length + 7;
switch (type)
{

View File

@ -264,7 +264,7 @@ RDP_BMPCACHE_ORDER;
#define MODE_SHIFT 3
#define LONG_FORMAT 0x80
#define BUFSIZE_MASK 0x3FFF /* or 0x1FFF? */
#define BUFSIZE_MASK 0x3FFF /* or 0x1FFF? */
#define MAX_GLYPH 32

View File

@ -64,9 +64,9 @@ void printercache_process(STREAM s);
/* pstcache.c */
void pstcache_touch_bitmap(uint8 id, uint16 idx, uint32 stamp);
BOOL pstcache_load_bitmap(uint8 id, uint16 idx);
BOOL pstcache_put_bitmap(uint8 id, uint16 idx, uint8 *bmp_id, uint16 wd,
uint16 ht, uint16 len, uint8 *data);
int pstcache_enumerate(uint8 id, uint8 *list);
BOOL pstcache_put_bitmap(uint8 id, uint16 idx, uint8 * bmp_id, uint16 wd,
uint16 ht, uint16 len, uint8 * data);
int pstcache_enumerate(uint8 id, uint8 * list);
BOOL pstcache_init(uint8 id);
/* rdesktop.c */
int main(int argc, char *argv[]);
@ -87,7 +87,7 @@ BOOL rd_pstcache_mkdir(void);
int rd_open_file(char *filename);
void rd_close_file(int fd);
int rd_read_file(int fd, void *ptr, int len);
int rd_write_file(int fd, void* ptr, int len);
int rd_write_file(int fd, void *ptr, int len);
int rd_lseek_file(int fd, int offset);
BOOL rd_lock_file(int fd, int start, int len);
/* rdp5.c */

View File

@ -20,7 +20,7 @@
#include "rdesktop.h"
#define MAX_CELL_SIZE 0x1000 /* pixels */
#define MAX_CELL_SIZE 0x1000 /* pixels */
#define IS_PERSISTENT(id) (g_pstcache_fd[id] > 0)
@ -33,7 +33,7 @@ extern BOOL g_bitmap_cache_precache;
int g_pstcache_fd[8];
int g_pstcache_Bpp;
BOOL g_pstcache_enumerated = False;
uint8 zero_id[] = {0, 0, 0, 0, 0, 0, 0, 0};
uint8 zero_id[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
/* Update usage info for a bitmap */
@ -65,7 +65,7 @@ pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx)
fd = g_pstcache_fd[cache_id];
rd_lseek_file(fd, cache_idx * (g_pstcache_Bpp * MAX_CELL_SIZE + sizeof(CELLHEADER)));
rd_read_file(fd, &cellhdr, sizeof(CELLHEADER));
celldata = (uint8 *)xmalloc(cellhdr.length);
celldata = (uint8 *) xmalloc(cellhdr.length);
rd_read_file(fd, celldata, cellhdr.length);
DEBUG(("Loading bitmap from disk (%d:%d)\n", cache_id, cache_idx));
@ -79,8 +79,8 @@ pstcache_load_bitmap(uint8 cache_id, uint16 cache_idx)
/* Store a bitmap in the persistent cache */
BOOL
pstcache_put_bitmap(uint8 cache_id, uint16 cache_idx, uint8 *bitmap_id,
uint16 width, uint16 height, uint16 length, uint8 *data)
pstcache_put_bitmap(uint8 cache_id, uint16 cache_idx, uint8 * bitmap_id,
uint16 width, uint16 height, uint16 length, uint8 * data)
{
int fd;
CELLHEADER cellhdr;
@ -104,7 +104,7 @@ pstcache_put_bitmap(uint8 cache_id, uint16 cache_idx, uint8 *bitmap_id,
/* list the bitmaps from the persistent cache file */
int
pstcache_enumerate(uint8 cache_id, uint8 *idlist)
pstcache_enumerate(uint8 cache_id, uint8 * idlist)
{
int fd, n, c = 0;
CELLHEADER cellhdr;
@ -127,7 +127,7 @@ pstcache_enumerate(uint8 cache_id, uint8 *idlist)
if (memcmp(cellhdr.bitmap_id, zero_id, sizeof(BITMAP_ID)) != 0)
{
memcpy(idlist + n * sizeof(BITMAP_ID), cellhdr.bitmap_id,
sizeof(BITMAP_ID));
sizeof(BITMAP_ID));
if (cellhdr.stamp)
{

View File

@ -367,7 +367,7 @@ main(int argc, char *argv[])
#endif
while ((c = getopt(argc, argv,
VNCOPT "u:d:s:c:p:n:k:g:fbBeEmCDKS:T:NX:a:x:Pr:045h?")) != -1)
VNCOPT "u:d:s:c:p:n:k:g:fbBeEmCDKS:T:NX:a:x:Pr:045h?")) != -1)
{
switch (c)
{
@ -1167,7 +1167,7 @@ rd_open_file(char *filename)
{
char *home;
char fn[256];
int fd;
int fd;
home = getenv("HOME");
if (home == NULL)
@ -1183,28 +1183,28 @@ rd_open_file(char *filename)
void
rd_close_file(int fd)
{
close(fd);
close(fd);
}
/* read from file*/
int
rd_read_file(int fd, void *ptr, int len)
{
return read(fd, ptr, len);
return read(fd, ptr, len);
}
/* write to file */
int
rd_write_file(int fd, void* ptr, int len)
rd_write_file(int fd, void *ptr, int len)
{
return write(fd, ptr, len);
return write(fd, ptr, len);
}
/* move file pointer */
int
rd_lseek_file(int fd, int offset)
{
return lseek(fd, offset, SEEK_SET);
return lseek(fd, offset, SEEK_SET);
}
/* do a write lock on a file */

17
rdp.c
View File

@ -410,8 +410,7 @@ rdp_enum_bmpcache2(void)
out_uint32_le(s, flags);
/* list */
out_uint8a(s, idlist + offset * sizeof(BITMAP_ID),
count * sizeof(BITMAP_ID));
out_uint8a(s, idlist + offset * sizeof(BITMAP_ID), count * sizeof(BITMAP_ID));
s_mark_end(s);
rdp_send_data(s, 0x2b);
@ -561,7 +560,7 @@ rdp_out_bmpcache2_caps(STREAM s)
{
out_uint32_le(s, BMPCACHE2_C2_CELLS);
}
out_uint8s(s, 20); /* other bitmap caches not used */
out_uint8s(s, 20); /* other bitmap caches not used */
}
/* Output control capability set */
@ -652,7 +651,7 @@ static uint8 caps_0x10[] = {
/* Output unknown capability sets */
static void
rdp_out_unknown_caps(STREAM s, uint16 id, uint16 length, uint8 *caps)
rdp_out_unknown_caps(STREAM s, uint16 id, uint16 length, uint8 * caps)
{
out_uint16_le(s, id);
out_uint16_le(s, length);
@ -672,7 +671,7 @@ rdp_send_confirm_active(void)
RDP_CAPLEN_BMPCACHE + RDP_CAPLEN_COLCACHE +
RDP_CAPLEN_ACTIVATE + RDP_CAPLEN_CONTROL +
RDP_CAPLEN_POINTER + RDP_CAPLEN_SHARE +
0x58 + 0x08 + 0x08 + 0x34 /* unknown caps */ +
0x58 + 0x08 + 0x08 + 0x34 /* unknown caps */ +
4 /* w2k fix, why? */ ;
s = sec_init(sec_flags, 6 + 14 + caplen + sizeof(RDP_SOURCE));
@ -700,11 +699,11 @@ rdp_send_confirm_active(void)
rdp_out_pointer_caps(s);
rdp_out_share_caps(s);
rdp_out_unknown_caps(s, 0x0d, 0x58, caps_0x0d); /* international? */
rdp_out_unknown_caps(s, 0x0d, 0x58, caps_0x0d); /* international? */
rdp_out_unknown_caps(s, 0x0c, 0x08, caps_0x0c);
rdp_out_unknown_caps(s, 0x0e, 0x08, caps_0x0e);
rdp_out_unknown_caps(s, 0x10, 0x34, caps_0x10); /* glyph cache? */
rdp_out_unknown_caps(s, 0x10, 0x34, caps_0x10); /* glyph cache? */
s_mark_end(s);
sec_send(s, sec_flags);
}
@ -748,7 +747,7 @@ rdp_process_bitmap_caps(STREAM s)
if (g_width != width || g_height != height)
{
warning("screen size changed from %dx%d to %dx%d\n", g_width, g_height,
width, height);
width, height);
g_width = width;
g_height = height;
ui_resize_window();