Changeset 55123 in vbox for trunk/src/VBox/RDP/client-1.8.3/rdesktop.c
- Timestamp:
- Apr 8, 2015 9:40:02 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/RDP/client-1.8.3/rdesktop.c
r55121 r55123 19 19 along with this program. If not, see <http://www.gnu.org/licenses/>. 20 20 */ 21 22 /* 23 * Oracle GPL Disclaimer: For the avoidance of doubt, except that if any license choice 24 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only 25 * the General Public License version 2 (GPLv2) at this time for any software where 26 * a choice of GPL license versions is made available with the language indicating 27 * that GPLv2 or any later version may be used, or where a choice of which version 28 * of the GPL is applied is otherwise unspecified. 29 */ 21 30 22 31 #include <stdarg.h> /* va_list va_start va_end */ … … 33 42 #include <signal.h> 34 43 #include "rdesktop.h" 44 45 #ifdef VBOX 46 # include <VBox/version.h> 47 # include <iprt/log.h> 48 #endif 35 49 36 50 #ifdef HAVE_LOCALE_H … … 102 116 RD_BOOL g_rdpclip = True; 103 117 RD_BOOL g_console_session = False; 118 #ifndef VBOX 104 119 RD_BOOL g_numlock_sync = False; 120 #else /* VBOX */ 121 /* Always use numlock synchronization with VRDP. */ 122 RD_BOOL g_numlock_sync = True; 123 #endif /* VBOX */ 105 124 RD_BOOL g_lspci_enabled = False; 106 125 RD_BOOL g_owncolmap = False; … … 142 161 #endif 143 162 163 #ifdef WITH_RDPUSB 164 RD_BOOL g_rdpusb = False; 165 #endif 166 167 #ifdef WITH_BIRD_VD_HACKS 168 RD_BOOL g_keep_virtual_desktop_shortcuts = False; 169 #endif 170 144 171 #ifdef HAVE_ICONV 145 172 char g_codepage[16] = ""; … … 169 196 fprintf(stderr, 170 197 "Version " PACKAGE_VERSION ". Copyright (C) 1999-2011 Matthew Chapman et al.\n"); 198 #ifdef VBOX 199 fprintf(stderr, "Modified for VirtualBox by " VBOX_VENDOR "\n"); 200 #endif 171 201 fprintf(stderr, "See http://www.rdesktop.org/ for more information.\n\n"); 172 202 … … 231 261 rdpsnd_show_help(); 232 262 #endif 263 #ifdef WITH_RDPUSB 264 fprintf(stderr, 265 " '-r usb': enable USB redirection\n"); 266 #endif 233 267 fprintf(stderr, 234 268 " '-r clipboard:[off|PRIMARYCLIPBOARD|CLIPBOARD]': enable clipboard\n"); … … 256 290 fprintf(stderr, " -4: use RDP version 4\n"); 257 291 fprintf(stderr, " -5: use RDP version 5 (default)\n"); 292 #ifdef WITH_BIRD_VD_HACKS 293 fprintf(stderr, " -H keep-virtual-desktop-shortcuts: Keep keyboard shortcuts typical\n" 294 " for switching virtual desktops (C-A-Left/Right). \n"); 295 #endif 258 296 #ifdef WITH_SCARD 259 297 fprintf(stderr, " -o: name=value: Adds an additional option to rdesktop.\n"); … … 516 554 517 555 } 556 557 #ifdef VBOX 558 /* This disables iprt logging */ 559 DECLEXPORT(PRTLOGGER) RTLogDefaultInit(void) 560 { 561 return NULL; 562 } 563 #endif 518 564 519 565 /* Client program */ … … 571 617 #define VNCOPT 572 618 #endif 619 #ifdef WITH_BIRD_VD_HACKS 620 #define VDHOPT "H:" 621 #else 622 #define VDHOPT 623 #endif 624 573 625 while ((c = getopt(argc, argv, 574 VNCOPT "A:u:L:d:s:c:p:n:k:g:o:fbBeEitmzCDKS:T:NX:a:x:Pr:045h?")) != -1)626 VNCOPT VDHOPT "A:u:L:d:s:c:p:n:k:g:o:fbBeEitmzCDKS:T:NX:a:x:Pr:045h?")) != -1) 575 627 { 576 628 switch (c) … … 853 905 #endif 854 906 } 907 } 908 else if (str_startswith(optarg, "usb")) 909 { 910 #ifdef WITH_RDPUSB 911 g_rdpusb = True; 912 #else 913 warning("Not compiled with USB support\n"); 914 #endif 855 915 } 856 916 else if (str_startswith(optarg, "disk")) … … 950 1010 break; 951 1011 #endif 1012 1013 #ifdef WITH_BIRD_VD_HACKS 1014 case 'H': /* hacks */ 1015 if (!strcmp(optarg, "keep-virtual-desktop-shortcuts")) 1016 g_keep_virtual_desktop_shortcuts = True; 1017 else 1018 error("Unknown -H argument\n\n\tPossible argument is: keep-virtual-desktop-shortcuts\n"); 1019 break; 1020 #endif 1021 952 1022 case 'h': 953 1023 case '?': … … 1111 1181 #endif 1112 1182 1113 if (g_lspci_enabled) 1183 #ifdef WITH_RDPUSB 1184 if (g_rdpusb) 1185 rdpusb_init(); 1186 #endif 1187 1188 if (g_lspci_enabled) 1114 1189 lspci_init(); 1115 1190 … … 1215 1290 cache_save_state(); 1216 1291 ui_deinit(); 1292 1293 #ifdef WITH_RDPUSB 1294 if (g_rdpusb) 1295 rdpusb_close(); 1296 #endif 1217 1297 1218 1298 if (g_user_quit) … … 1794 1874 return False; 1795 1875 1876 #ifdef VBOX 1877 snprintf(bmpcache_dir, sizeof(bmpcache_dir), "%s/%s", home, ".rdesktop"); 1878 #else 1796 1879 sprintf(bmpcache_dir, "%s/%s", home, ".rdesktop"); 1880 #endif 1797 1881 1798 1882 if ((mkdir(bmpcache_dir, S_IRWXU) == -1) && errno != EEXIST) … … 1802 1886 } 1803 1887 1888 #ifdef VBOX 1889 snprintf(bmpcache_dir, sizeof(bmpcache_dir), "%s/%s", home, ".rdesktop/cache"); 1890 #else 1804 1891 sprintf(bmpcache_dir, "%s/%s", home, ".rdesktop/cache"); 1892 #endif 1805 1893 1806 1894 if ((mkdir(bmpcache_dir, S_IRWXU) == -1) && errno != EEXIST) … … 1824 1912 if (home == NULL) 1825 1913 return -1; 1914 #ifdef VBOX 1915 snprintf(fn, sizeof(fn), "%s/.rdesktop/%s", home, filename); 1916 #else 1826 1917 sprintf(fn, "%s/.rdesktop/%s", home, filename); 1918 #endif 1827 1919 fd = open(fn, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); 1828 1920 if (fd == -1)
Note:
See TracChangeset
for help on using the changeset viewer.