1 |
/* |
/* |
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-2001 |
Copyright (C) Matthew Chapman 1999-2002 |
5 |
|
|
6 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
7 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
50 |
static void |
static void |
51 |
usage(char *program) |
usage(char *program) |
52 |
{ |
{ |
53 |
|
fprintf(stderr, "rdesktop: A Remote Desktop Protocol client.\n"); |
54 |
|
fprintf(stderr, "Version " VERSION ". Copyright (C) 1999-2002 Matt Chapman.\n"); |
55 |
|
fprintf(stderr, "See http://www.rdesktop.org/ for more information.\n\n"); |
56 |
|
|
57 |
fprintf(stderr, "Usage: %s [options] server\n", program); |
fprintf(stderr, "Usage: %s [options] server\n", program); |
58 |
fprintf(stderr, " -u: user name\n"); |
fprintf(stderr, " -u: user name\n"); |
59 |
fprintf(stderr, " -d: domain\n"); |
fprintf(stderr, " -d: domain\n"); |
89 |
uint32 flags; |
uint32 flags; |
90 |
int c; |
int c; |
91 |
|
|
|
fprintf(stderr, "rdesktop: A Remote Desktop Protocol client.\n"); |
|
|
fprintf(stderr, "Version " VERSION ". Copyright (C) 1999-2001 Matt Chapman.\n"); |
|
|
fprintf(stderr, "See http://www.rdesktop.org/ for more information.\n\n"); |
|
|
|
|
92 |
flags = RDP_LOGON_NORMAL; |
flags = RDP_LOGON_NORMAL; |
93 |
domain[0] = password[0] = shell[0] = directory[0] = 0; |
domain[0] = password[0] = shell[0] = directory[0] = 0; |
94 |
strcpy(keymapname, "us"); |
strcpy(keymapname, "us"); |
257 |
if (!rdp_connect(server, flags, domain, password, shell, directory)) |
if (!rdp_connect(server, flags, domain, password, shell, directory)) |
258 |
return 1; |
return 1; |
259 |
|
|
260 |
fprintf(stderr, "Connection successful.\n"); |
DEBUG(("Connection successful.\n")); |
261 |
|
|
262 |
if (ui_create_window()) |
if (ui_create_window()) |
263 |
{ |
{ |
265 |
ui_destroy_window(); |
ui_destroy_window(); |
266 |
} |
} |
267 |
|
|
268 |
fprintf(stderr, "Disconnecting...\n"); |
DEBUG(("Disconnecting...\n")); |
269 |
rdp_disconnect(); |
rdp_disconnect(); |
270 |
return 0; |
return 0; |
271 |
} |
} |
388 |
} |
} |
389 |
} |
} |
390 |
|
|
391 |
|
#ifdef SAVE_LICENCE |
392 |
int |
int |
393 |
load_licence(unsigned char **data) |
load_licence(unsigned char **data) |
394 |
{ |
{ |
442 |
write(fd, data, length); |
write(fd, data, length); |
443 |
close(fd); |
close(fd); |
444 |
} |
} |
445 |
|
#endif |