1 |
/* |
/* -*- c-basic-offset: 8 -*- |
2 |
rdesktop: A Remote Desktop Protocol client. |
rdesktop: A Remote Desktop Protocol client. |
3 |
Entrypoint and utility functions |
Entrypoint and utility functions |
4 |
Copyright (C) Matthew Chapman 1999-2003 |
Copyright (C) Matthew Chapman 1999-2003 |
59 |
BOOL fullscreen = False; |
BOOL fullscreen = False; |
60 |
BOOL grab_keyboard = True; |
BOOL grab_keyboard = True; |
61 |
BOOL hide_decorations = False; |
BOOL hide_decorations = False; |
62 |
|
BOOL use_rdp5 = False; |
63 |
extern BOOL owncolmap; |
extern BOOL owncolmap; |
64 |
|
|
65 |
#ifdef RDP2VNC |
#ifdef RDP2VNC |
100 |
fprintf(stderr, " -T: window title\n"); |
fprintf(stderr, " -T: window title\n"); |
101 |
fprintf(stderr, " -D: hide window manager decorations\n"); |
fprintf(stderr, " -D: hide window manager decorations\n"); |
102 |
fprintf(stderr, " -a: server bpp\n"); |
fprintf(stderr, " -a: server bpp\n"); |
103 |
|
fprintf(stderr, " -5: Use RDP5 (EXPERIMENTAL!)\n"); |
104 |
} |
} |
105 |
|
|
106 |
static BOOL |
static BOOL |
167 |
#define VNCOPT |
#define VNCOPT |
168 |
#endif |
#endif |
169 |
|
|
170 |
while ((c = getopt(argc, argv, VNCOPT "u:d:s:S:c:p:n:k:g:a:fbemCKT:Dh?")) != -1) |
while ((c = getopt(argc, argv, VNCOPT "u:d:s:S:c:p:n:k:g:a:fbemCKT:Dh?54")) != -1) |
171 |
{ |
{ |
172 |
switch (c) |
switch (c) |
173 |
{ |
{ |
303 |
} |
} |
304 |
break; |
break; |
305 |
|
|
306 |
|
case '5': |
307 |
|
use_rdp5 = True; |
308 |
|
break; |
309 |
case 'h': |
case 'h': |
310 |
case '?': |
case '?': |
311 |
default: |
default: |
622 |
s_ptr = &s; |
s_ptr = &s; |
623 |
s_ptr->p = data; |
s_ptr->p = data; |
624 |
/* Skip first two bytes */ |
/* Skip first two bytes */ |
625 |
in_uint16(s_ptr, len); |
in_uint16_le(s_ptr, len); |
626 |
|
|
627 |
/* Skip three strings */ |
/* Skip three strings */ |
628 |
for (i = 0; i < 3; i++) |
for (i = 0; i < 3; i++) |
629 |
{ |
{ |
630 |
in_uint32(s_ptr, len); |
in_uint32_le(s_ptr, len); |
631 |
s_ptr->p += len; |
s_ptr->p += len; |
632 |
/* Make sure that we won't be past the end of data after |
/* Make sure that we won't be past the end of data after |
633 |
* reading the next length value |
* reading the next length value |
640 |
return; |
return; |
641 |
} |
} |
642 |
} |
} |
643 |
in_uint32(s_ptr, len); |
in_uint32_le(s_ptr, len); |
644 |
if (s_ptr->p + len > data + length) |
if (s_ptr->p + len > data + length) |
645 |
{ |
{ |
646 |
printf("Error in parsing licence key.\n"); |
printf("Error in parsing licence key.\n"); |