30 |
|
|
31 |
char username[16]; |
char username[16]; |
32 |
char hostname[16]; |
char hostname[16]; |
33 |
|
char keymapname[16]; |
34 |
|
int keylayout; |
35 |
int width; |
int width; |
36 |
int height; |
int height; |
|
int keylayout = 0x409; |
|
37 |
BOOL bitmap_compression = True; |
BOOL bitmap_compression = True; |
38 |
BOOL sendmotion = True; |
BOOL sendmotion = True; |
39 |
BOOL orders = True; |
BOOL orders = True; |
53 |
printf(" -c: working directory\n"); |
printf(" -c: working directory\n"); |
54 |
printf(" -p: password (autologon)\n"); |
printf(" -p: password (autologon)\n"); |
55 |
printf(" -n: client hostname\n"); |
printf(" -n: client hostname\n"); |
56 |
printf(" -k: keyboard layout (hex)\n"); |
printf(" -k: keyboard layout\n"); |
57 |
printf(" -g: desktop geometry (WxH)\n"); |
printf(" -g: desktop geometry (WxH)\n"); |
58 |
printf(" -f: full-screen mode\n"); |
printf(" -f: full-screen mode\n"); |
59 |
printf(" -b: force bitmap updates\n"); |
printf(" -b: force bitmap updates\n"); |
83 |
|
|
84 |
flags = RDP_LOGON_NORMAL; |
flags = RDP_LOGON_NORMAL; |
85 |
domain[0] = password[0] = shell[0] = directory[0] = 0; |
domain[0] = password[0] = shell[0] = directory[0] = 0; |
86 |
|
strcpy(keymapname, "us"); |
87 |
|
|
88 |
while ((c = getopt(argc, argv, "u:d:s:c:p:n:k:g:fbemlh?")) != -1) |
while ((c = getopt(argc, argv, "u:d:s:c:p:n:k:g:fbemlh?")) != -1) |
89 |
{ |
{ |
115 |
break; |
break; |
116 |
|
|
117 |
case 'k': |
case 'k': |
118 |
keylayout = strtol(optarg, NULL, 16); |
STRNCPY(keymapname, optarg, sizeof(keymapname)); |
|
if (keylayout == 0) |
|
|
{ |
|
|
error("invalid keyboard layout\n"); |
|
|
return 1; |
|
|
} |
|
119 |
break; |
break; |
120 |
|
|
121 |
case 'g': |
case 'g': |
223 |
rdp_main_loop(); |
rdp_main_loop(); |
224 |
printf("Disconnecting...\n"); |
printf("Disconnecting...\n"); |
225 |
ui_destroy_window(); |
ui_destroy_window(); |
226 |
|
rdp_disconnect(); |
227 |
} |
} |
228 |
|
|
|
rdp_disconnect(); |
|
229 |
return 0; |
return 0; |
230 |
} |
} |
231 |
|
|