--- sourceforge.net/trunk/rdesktop/rdesktop.c 2003/02/09 01:38:07 315 +++ sourceforge.net/trunk/rdesktop/rdesktop.c 2003/02/18 13:03:51 328 @@ -21,12 +21,12 @@ #include /* va_list va_start va_end */ #include /* read close getuid getgid getpid getppid gethostname */ #include /* open */ -#include /* save licence uses it. */ #include /* getpwuid */ #include /* tcgetattr tcsetattr */ #include /* stat */ #include /* gettimeofday */ #include /* times */ +#include #include "rdesktop.h" #ifdef EGD_SOCKET @@ -50,6 +50,7 @@ int height = 600; int tcp_port_rdp = TCP_PORT_RDP; int server_bpp = 8; +int win_button_size = 0; /* If zero, disable single app mode */ BOOL bitmap_compression = True; BOOL sendmotion = True; BOOL orders = True; @@ -146,7 +147,7 @@ domain[0] = password[0] = shell[0] = directory[0] = 0; strcpy(keymapname, "en-us"); - while ((c = getopt(argc, argv, "u:d:s:c:p:n:k:g:a:fbemCKT:Dh?")) != -1) + while ((c = getopt(argc, argv, "u:d:s:S:c:p:n:k:g:a:fbemCKT:Dh?")) != -1) { switch (c) { @@ -163,6 +164,23 @@ STRNCPY(shell, optarg, sizeof(shell)); break; + case 'S': + if (!strcmp(optarg, "standard")) + { + win_button_size = 18; + break; + } + + win_button_size = strtol(optarg, &p, 10); + + if (*p) + { + error("invalid button size\n"); + return 1; + } + + break; + case 'c': STRNCPY(directory, optarg, sizeof(directory)); break; @@ -243,7 +261,8 @@ 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; @@ -514,7 +533,7 @@ } } -#ifdef SAVE_LICENCE + int load_licence(unsigned char **data) { @@ -572,8 +591,8 @@ 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, s_ptr->p, data + length); + printf("Strings %d end value %x > supplied length (%x)\n", i, + (unsigned int) s_ptr->p, (unsigned int) data + length); return; } } @@ -581,7 +600,8 @@ if (s_ptr->p + len > data + length) { printf("Error in parsing licence key.\n"); - printf("End of licence %x > supplied length (%x)\n", s_ptr->p + len, data + length); + printf("End of licence %x > supplied length (%x)\n", + (unsigned int) s_ptr->p + len, (unsigned int) data + length); return; } @@ -617,7 +637,7 @@ fnamewrk = xmalloc(strlen(fname) + 12); for (y = 0;; y++) { - sprintf(fnamewrk, "%s.%lu", fname, y); + sprintf(fnamewrk, "%s.%lu", fname, (long unsigned int) y); fnwrkfd = open(fnamewrk, O_WRONLY | O_CREAT | O_EXCL, 0600); if (fnwrkfd == -1) { @@ -670,4 +690,3 @@ } } -#endif