31 |
#include "rdesktop.h" |
#include "rdesktop.h" |
32 |
|
|
33 |
#ifdef HAVE_ICONV |
#ifdef HAVE_ICONV |
34 |
|
#ifdef HAVE_LOCALE_H |
35 |
#include <locale.h> |
#include <locale.h> |
36 |
|
#endif |
37 |
|
#ifdef HAVE_LANGINFO_H |
38 |
#include <langinfo.h> |
#include <langinfo.h> |
39 |
#endif |
#endif |
40 |
|
#endif |
41 |
|
|
42 |
#ifdef EGD_SOCKET |
#ifdef EGD_SOCKET |
43 |
|
#include <sys/types.h> |
44 |
#include <sys/socket.h> /* socket connect */ |
#include <sys/socket.h> /* socket connect */ |
45 |
#include <sys/un.h> /* sockaddr_un */ |
#include <sys/un.h> /* sockaddr_un */ |
46 |
#endif |
#endif |
61 |
int g_height = 600; |
int g_height = 600; |
62 |
int g_xpos = 0; |
int g_xpos = 0; |
63 |
int g_ypos = 0; |
int g_ypos = 0; |
64 |
|
int g_pos = 0; /* 0 position unspecified, |
65 |
|
1 specified, |
66 |
|
2 xpos neg, |
67 |
|
4 ypos neg */ |
68 |
extern int g_tcp_port_rdp; |
extern int g_tcp_port_rdp; |
69 |
int g_server_bpp = 8; |
int g_server_bpp = 8; |
70 |
int g_win_button_size = 0; /* If zero, disable single app mode */ |
int g_win_button_size = 0; /* If zero, disable single app mode */ |
486 |
} |
} |
487 |
|
|
488 |
if (*p == '+' || *p == '-') |
if (*p == '+' || *p == '-') |
489 |
|
{ |
490 |
|
g_pos |= (*p == '-') ? 2 : 1; |
491 |
g_xpos = strtol(p, &p, 10); |
g_xpos = strtol(p, &p, 10); |
492 |
|
|
493 |
|
} |
494 |
if (*p == '+' || *p == '-') |
if (*p == '+' || *p == '-') |
495 |
|
{ |
496 |
|
g_pos |= (*p == '-') ? 4 : 1; |
497 |
g_ypos = strtol(p, NULL, 10); |
g_ypos = strtol(p, NULL, 10); |
498 |
|
} |
499 |
|
|
500 |
break; |
break; |
501 |
|
|
559 |
break; |
break; |
560 |
|
|
561 |
case 'X': |
case 'X': |
562 |
g_embed_wnd = strtol(optarg, NULL, 10); |
g_embed_wnd = strtol(optarg, NULL, 0); |
563 |
break; |
break; |
564 |
|
|
565 |
case 'a': |
case 'a': |
574 |
|
|
575 |
case 'z': |
case 'z': |
576 |
DEBUG(("rdp compression enabled\n")); |
DEBUG(("rdp compression enabled\n")); |
577 |
flags |= RDP_COMPRESSION; |
flags |= (RDP_LOGON_COMPRESSION | RDP_LOGON_COMPRESSION2); |
578 |
break; |
break; |
579 |
|
|
580 |
case 'x': |
case 'x': |
724 |
} |
} |
725 |
} |
} |
726 |
#endif |
#endif |
727 |
|
|
728 |
if (g_hostname[0] == 0) |
if (g_hostname[0] == 0) |
729 |
{ |
{ |
730 |
if (gethostname(fullhostname, sizeof(fullhostname)) == -1) |
if (gethostname(fullhostname, sizeof(fullhostname)) == -1) |
740 |
STRNCPY(g_hostname, fullhostname, sizeof(g_hostname)); |
STRNCPY(g_hostname, fullhostname, sizeof(g_hostname)); |
741 |
} |
} |
742 |
|
|
|
if ((flags & RDP_COMPRESSION) && (g_server_bpp > 8)) |
|
|
{ |
|
|
warning("rdp compression not supported for bpp > 8, compression disabled\n"); |
|
|
flags ^= RDP_COMPRESSION; |
|
|
} |
|
|
|
|
743 |
if (prompt_password && read_password(password, sizeof(password))) |
if (prompt_password && read_password(password, sizeof(password))) |
744 |
flags |= RDP_LOGON_AUTO; |
flags |= RDP_LOGON_AUTO; |
745 |
|
|