Fixed indentation

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@498 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Peter Åstrand 2003-10-15 14:01:32 +00:00
parent 049a1eff64
commit 3a323bbcc1
7 changed files with 148 additions and 132 deletions

37
proto.h
View File

@ -1,14 +1,17 @@
/* bitmap.c */ /* bitmap.c */
BOOL bitmap_decompress(unsigned char *output, int width, int height, unsigned char *input, int size, int Bpp); BOOL bitmap_decompress(unsigned char *output, int width, int height, unsigned char *input, int size,
int Bpp);
/* cache.c */ /* cache.c */
HBITMAP cache_get_bitmap(uint8 cache_id, uint16 cache_idx); HBITMAP cache_get_bitmap(uint8 cache_id, uint16 cache_idx);
void cache_put_bitmap(uint8 cache_id, uint16 cache_idx, HBITMAP bitmap); void cache_put_bitmap(uint8 cache_id, uint16 cache_idx, HBITMAP bitmap);
FONTGLYPH *cache_get_font(uint8 font, uint16 character); FONTGLYPH *cache_get_font(uint8 font, uint16 character);
void cache_put_font(uint8 font, uint16 character, uint16 offset, uint16 baseline, uint16 width, uint16 height, HGLYPH pixmap); void cache_put_font(uint8 font, uint16 character, uint16 offset, uint16 baseline, uint16 width,
uint16 height, HGLYPH pixmap);
DATABLOB *cache_get_text(uint8 cache_id); DATABLOB *cache_get_text(uint8 cache_id);
void cache_put_text(uint8 cache_id, void *data, int length); void cache_put_text(uint8 cache_id, void *data, int length);
uint8 *cache_get_desktop(uint32 offset, int cx, int cy, int bytes_per_pixel); uint8 *cache_get_desktop(uint32 offset, int cx, int cy, int bytes_per_pixel);
void cache_put_desktop(uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel, uint8 *data); void cache_put_desktop(uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel,
uint8 * data);
HCURSOR cache_get_cursor(uint16 cache_idx); HCURSOR cache_get_cursor(uint16 cache_idx);
void cache_put_cursor(uint16 cache_idx, HCURSOR cursor); void cache_put_cursor(uint16 cache_idx, HCURSOR cursor);
/* channels.c */ /* channels.c */
@ -58,14 +61,16 @@ int load_licence(unsigned char **data);
void save_licence(unsigned char *data, int length); void save_licence(unsigned char *data, int length);
/* rdp.c */ /* rdp.c */
void rdp_out_unistr(STREAM s, char *string, int len); void rdp_out_unistr(STREAM s, char *string, int len);
void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1, uint16 param2); void rdp_send_input(uint32 time, uint16 message_type, uint16 device_flags, uint16 param1,
uint16 param2);
void process_null_system_pointer_pdu(STREAM s); void process_null_system_pointer_pdu(STREAM s);
void process_colour_pointer_pdu(STREAM s); void process_colour_pointer_pdu(STREAM s);
void process_cached_pointer_pdu(STREAM s); void process_cached_pointer_pdu(STREAM s);
void process_bitmap_updates(STREAM s); void process_bitmap_updates(STREAM s);
void process_palette(STREAM s); void process_palette(STREAM s);
BOOL rdp_main_loop(void); BOOL rdp_main_loop(void);
BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command, char *directory); BOOL rdp_connect(char *server, uint32 flags, char *domain, char *password, char *command,
char *directory);
void rdp_disconnect(void); void rdp_disconnect(void);
/* rdp5.c */ /* rdp5.c */
void rdp5_process(STREAM s, BOOL encryption); void rdp5_process(STREAM s, BOOL encryption);
@ -73,7 +78,8 @@ void rdp5_process(STREAM s, BOOL encryption);
void rdpdr_send_connect(void); void rdpdr_send_connect(void);
void rdpdr_send_name(void); void rdpdr_send_name(void);
void rdpdr_send_available(void); void rdpdr_send_available(void);
void rdpdr_send_completion(uint32 device, uint32 id, uint32 status, uint32 result, uint8 *buffer, uint32 length); void rdpdr_send_completion(uint32 device, uint32 id, uint32 status, uint32 result, uint8 * buffer,
uint32 length);
BOOL rdpdr_init(void); BOOL rdpdr_init(void);
/* rdpsnd.c */ /* rdpsnd.c */
STREAM rdpsnd_init_packet(uint16 type, uint16 size); STREAM rdpsnd_init_packet(uint16 type, uint16 size);
@ -94,7 +100,8 @@ void wave_out_volume(uint16 left, uint16 right);
void sec_hash_48(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2, uint8 salt); void sec_hash_48(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2, uint8 salt);
void sec_hash_16(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2); void sec_hash_16(uint8 * out, uint8 * in, uint8 * salt1, uint8 * salt2);
void buf_out_uint32(uint8 * buffer, uint32 value); void buf_out_uint32(uint8 * buffer, uint32 value);
void sec_sign(uint8 *signature, int siglen, uint8 *session_key, int keylen, uint8 *data, int datalen); void sec_sign(uint8 * signature, int siglen, uint8 * session_key, int keylen, uint8 * data,
int datalen);
void sec_decrypt(uint8 * data, int length); void sec_decrypt(uint8 * data, int length);
STREAM sec_init(uint32 flags, int maxlen); STREAM sec_init(uint32 flags, int maxlen);
void sec_send_to_channel(STREAM s, uint32 flags, uint16 channel); void sec_send_to_channel(STREAM s, uint32 flags, uint16 channel);
@ -141,7 +148,8 @@ void ui_paint_bitmap(int x, int y, int cx, int cy, int width, int height, uint8
void ui_destroy_bitmap(HBITMAP bmp); void ui_destroy_bitmap(HBITMAP bmp);
HGLYPH ui_create_glyph(int width, int height, uint8 * data); HGLYPH ui_create_glyph(int width, int height, uint8 * data);
void ui_destroy_glyph(HGLYPH glyph); void ui_destroy_glyph(HGLYPH glyph);
HCURSOR ui_create_cursor(unsigned int x, unsigned int y, int width, int height, uint8 *andmask, uint8 *xormask); HCURSOR ui_create_cursor(unsigned int x, unsigned int y, int width, int height, uint8 * andmask,
uint8 * xormask);
void ui_set_cursor(HCURSOR cursor); void ui_set_cursor(HCURSOR cursor);
void ui_destroy_cursor(HCURSOR cursor); void ui_destroy_cursor(HCURSOR cursor);
HCOLOURMAP ui_create_colourmap(COLOURMAP * colours); HCOLOURMAP ui_create_colourmap(COLOURMAP * colours);
@ -151,13 +159,18 @@ void ui_set_clip(int x, int y, int cx, int cy);
void ui_reset_clip(void); void ui_reset_clip(void);
void ui_bell(void); void ui_bell(void);
void ui_destblt(uint8 opcode, int x, int y, int cx, int cy); void ui_destblt(uint8 opcode, int x, int y, int cx, int cy);
void ui_patblt(uint8 opcode, int x, int y, int cx, int cy, BRUSH *brush, int bgcolour, int fgcolour); void ui_patblt(uint8 opcode, int x, int y, int cx, int cy, BRUSH * brush, int bgcolour,
int fgcolour);
void ui_screenblt(uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy); void ui_screenblt(uint8 opcode, int x, int y, int cx, int cy, int srcx, int srcy);
void ui_memblt(uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy); void ui_memblt(uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy);
void ui_triblt(uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy, BRUSH *brush, int bgcolour, int fgcolour); void ui_triblt(uint8 opcode, int x, int y, int cx, int cy, HBITMAP src, int srcx, int srcy,
BRUSH * brush, int bgcolour, int fgcolour);
void ui_line(uint8 opcode, int startx, int starty, int endx, int endy, PEN * pen); void ui_line(uint8 opcode, int startx, int starty, int endx, int endy, PEN * pen);
void ui_rect(int x, int y, int cx, int cy, int colour); void ui_rect(int x, int y, int cx, int cy, int colour);
void ui_draw_glyph(int mixmode, int x, int y, int cx, int cy, HGLYPH glyph, int srcx, int srcy, int bgcolour, int fgcolour); void ui_draw_glyph(int mixmode, int x, int y, int cx, int cy, HGLYPH glyph, int srcx, int srcy,
void ui_draw_text(uint8 font, uint8 flags, int mixmode, int x, int y, int clipx, int clipy, int clipcx, int clipcy, int boxx, int boxy, int boxcx, int boxcy, int bgcolour, int fgcolour, uint8 *text, uint8 length); int bgcolour, int fgcolour);
void ui_draw_text(uint8 font, uint8 flags, int mixmode, int x, int y, int clipx, int clipy,
int clipcx, int clipcy, int boxx, int boxy, int boxcx, int boxcy, int bgcolour,
int fgcolour, uint8 * text, uint8 length);
void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy); void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy);
void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy); void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy);

View File

@ -60,7 +60,8 @@ rdpsnd_send(STREAM s)
channel_send(s, rdpsnd_channel); channel_send(s, rdpsnd_channel);
} }
void rdpsnd_send_completion(uint16 tick, uint8 packet_index) void
rdpsnd_send_completion(uint16 tick, uint8 packet_index)
{ {
STREAM s; STREAM s;
@ -111,7 +112,8 @@ rdpsnd_process_negotiate(STREAM in)
discardcnt = 0; discardcnt = 0;
if (format->cbSize > MAX_CBSIZE) if (format->cbSize > MAX_CBSIZE)
{ {
fprintf(stderr, "cbSize too large for buffer: %d\n", format->cbSize); fprintf(stderr, "cbSize too large for buffer: %d\n",
format->cbSize);
readcnt = MAX_CBSIZE; readcnt = MAX_CBSIZE;
discardcnt = format->cbSize - MAX_CBSIZE; discardcnt = format->cbSize - MAX_CBSIZE;
} }

View File

@ -31,7 +31,8 @@
int g_dsp_fd; int g_dsp_fd;
BOOL g_dsp_busy; BOOL g_dsp_busy;
static struct audio_packet { static struct audio_packet
{
struct stream s; struct stream s;
uint16 tick; uint16 tick;
uint8 index; uint8 index;

View File

@ -36,7 +36,8 @@ static BOOL reopened;
static BOOL swapaudio; static BOOL swapaudio;
static short samplewidth; static short samplewidth;
static struct audio_packet { static struct audio_packet
{
struct stream s; struct stream s;
uint16 tick; uint16 tick;
uint8 index; uint8 index;
@ -165,7 +166,9 @@ wave_out_volume(uint16 left, uint16 right)
if (volume / AUDIO_MID_BALANCE != 0) if (volume / AUDIO_MID_BALANCE != 0)
{ {
balance = AUDIO_MID_BALANCE - (left/(volume/AUDIO_MID_BALANCE)) + (right/(volume/AUDIO_MID_BALANCE)); balance =
AUDIO_MID_BALANCE - (left / (volume / AUDIO_MID_BALANCE)) +
(right / (volume / AUDIO_MID_BALANCE));
} }
else else
{ {

View File

@ -122,7 +122,8 @@ VCHANNEL;
#define MAX_CBSIZE 256 #define MAX_CBSIZE 256
/* RDPSND */ /* RDPSND */
typedef struct { typedef struct
{
uint16 wFormatTag; uint16 wFormatTag;
uint16 nChannels; uint16 nChannels;
uint32 nSamplesPerSec; uint32 nSamplesPerSec;

12
xwin.c
View File

@ -333,8 +333,7 @@ translate15to16(uint16 * data, uint8 * out, uint8 * end)
if (g_host_be) if (g_host_be)
{ {
BSWAP16(pixel) BSWAP16(pixel)}
}
value = make_colour16(split_colour15(pixel)); value = make_colour16(split_colour15(pixel));
@ -363,8 +362,7 @@ translate15to24(uint16 * data, uint8 * out, uint8 * end)
if (g_host_be) if (g_host_be)
{ {
BSWAP16(pixel) BSWAP16(pixel)}
}
value = make_colour24(split_colour15(pixel)); value = make_colour24(split_colour15(pixel));
if (g_xserver_be) if (g_xserver_be)
@ -457,8 +455,7 @@ translate16to24(uint16 * data, uint8 * out, uint8 * end)
if (g_host_be) if (g_host_be)
{ {
BSWAP16(pixel) BSWAP16(pixel)}
}
value = make_colour24(split_colour16(pixel)); value = make_colour24(split_colour16(pixel));
@ -489,8 +486,7 @@ translate16to32(uint16 * data, uint8 * out, uint8 * end)
if (g_host_be) if (g_host_be)
{ {
BSWAP16(pixel) BSWAP16(pixel)}
}
value = make_colour32(split_colour16(pixel)); value = make_colour32(split_colour16(pixel));