Changed tabs to spaces, removed execute permissions from source.

This commit is contained in:
Michael Jumper 2012-02-27 10:36:14 -08:00
parent 13696d2c7c
commit 5016e56bf1
3 changed files with 49 additions and 49 deletions

78
protocols/rdp/src/client.c Executable file → Normal file
View File

@ -69,24 +69,24 @@
const char* GUAC_CLIENT_ARGS[] = { const char* GUAC_CLIENT_ARGS[] = {
"hostname", "hostname",
"port", "port",
"username", "username",
"password", "password",
"width", "width",
"height", "height",
"initial_program", "initial_program",
"color_depth", "color_depth",
NULL NULL
}; };
enum ARGS_IDX { enum ARGS_IDX {
IDX_HOSTNAME, IDX_HOSTNAME,
IDX_PORT, IDX_PORT,
IDX_USERNAME, IDX_USERNAME,
IDX_PASSWORD, IDX_PASSWORD,
IDX_WIDTH, IDX_WIDTH,
IDX_HEIGHT, IDX_HEIGHT,
IDX_INITIAL_PROGRAM, IDX_INITIAL_PROGRAM,
IDX_COLOR_DEPTH IDX_COLOR_DEPTH
}; };
boolean rdp_freerdp_pre_connect(freerdp* instance) { boolean rdp_freerdp_pre_connect(freerdp* instance) {
@ -208,7 +208,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
rdp_guac_client_data* guac_client_data; rdp_guac_client_data* guac_client_data;
freerdp* rdp_inst; freerdp* rdp_inst;
rdpSettings* settings; rdpSettings* settings;
char* hostname; char* hostname;
int port = RDP_DEFAULT_PORT; int port = RDP_DEFAULT_PORT;
@ -256,37 +256,37 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE; settings->encryption_level = ENCRYPTION_LEVEL_CLIENT_COMPATIBLE;
/* session width */ /* session width */
settings->width = 1024; settings->width = 1024;
if (argv[IDX_WIDTH][0] != '\0') if (argv[IDX_WIDTH][0] != '\0')
settings->width = atoi(argv[IDX_WIDTH]); settings->width = atoi(argv[IDX_WIDTH]);
if (settings->width == 0) if (settings->width == 0)
settings->width = 1024; settings->width = 1024;
/* session height */ /* session height */
settings->height = 768; settings->height = 768;
if (argv[IDX_HEIGHT][0] != '\0') if (argv[IDX_HEIGHT][0] != '\0')
settings->height = atoi(argv[IDX_HEIGHT]); settings->height = atoi(argv[IDX_HEIGHT]);
if (settings->height == 0) if (settings->height == 0)
settings->height = 768; settings->height = 768;
/* Set hostname */ /* Set hostname */
settings->hostname = strdup(hostname); settings->hostname = strdup(hostname);
settings->window_title = strdup(hostname); settings->window_title = strdup(hostname);
/* username */ /* username */
settings->username = "guest"; settings->username = "guest";
if (argv[IDX_USERNAME][0] != '\0') if (argv[IDX_USERNAME][0] != '\0')
settings->username = strdup (argv[IDX_USERNAME]); settings->username = strdup (argv[IDX_USERNAME]);
/* password */ /* password */
if (argv[IDX_PASSWORD][0] != '\0') { if (argv[IDX_PASSWORD][0] != '\0') {
settings->password = strdup (argv[IDX_PASSWORD]); settings->password = strdup (argv[IDX_PASSWORD]);
settings->autologon = 1; settings->autologon = 1;
} }
/* initial program */ /* initial program */
if (argv[IDX_INITIAL_PROGRAM][0] != '\0') if (argv[IDX_INITIAL_PROGRAM][0] != '\0')
settings->shell = strdup (argv[IDX_INITIAL_PROGRAM]); settings->shell = strdup (argv[IDX_INITIAL_PROGRAM]);
/* Order support */ /* Order support */
bitmap_cache = settings->bitmap_cache; bitmap_cache = settings->bitmap_cache;

20
protocols/rdp/src/rdp_gdi.c Executable file → Normal file
View File

@ -97,17 +97,17 @@ void guac_rdp_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt) {
guac_socket* socket = client->socket; guac_socket* socket = client->socket;
guac_rdp_bitmap* bitmap = (guac_rdp_bitmap*) memblt->bitmap; guac_rdp_bitmap* bitmap = (guac_rdp_bitmap*) memblt->bitmap;
guac_composite_mode cmode = GUAC_COMP_OVER; guac_composite_mode cmode = GUAC_COMP_OVER;
if (memblt->bRop == 204) cmode = GUAC_COMP_OVER; if (memblt->bRop == 204) cmode = GUAC_COMP_OVER;
else if (memblt->bRop == 238) cmode = GUAC_COMP_OR; else if (memblt->bRop == 238) cmode = GUAC_COMP_OR;
else if (memblt->bRop == 136) cmode = GUAC_COMP_AND; else if (memblt->bRop == 136) cmode = GUAC_COMP_AND;
else if (memblt->bRop == 102) cmode = GUAC_COMP_XOR2; else if (memblt->bRop == 102) cmode = GUAC_COMP_XOR2;
else if (memblt->bRop == 187) cmode = GUAC_COMP_NOR; else if (memblt->bRop == 187) cmode = GUAC_COMP_NOR;
else else
{ {
guac_client_log_info (client, "guac_rdp_gdi_memblt: UNSUPPORTED opcode = %d (0x%02X)", memblt->bRop, memblt->bRop); guac_client_log_info (client, "guac_rdp_gdi_memblt: UNSUPPORTED opcode = %d (0x%02X)", memblt->bRop, memblt->bRop);
} }
if (bitmap->layer != NULL) if (bitmap->layer != NULL)
guac_protocol_send_copy(socket, guac_protocol_send_copy(socket,

0
protocols/rdp/src/rdp_glyph.c Executable file → Normal file
View File