/[rdesktop]/sourceforge.net/branches/seamlessrdp-branch/rdesktop/rdesktop.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/branches/seamlessrdp-branch/rdesktop/rdesktop.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 25 by matty, Sat Jan 6 03:47:04 2001 UTC revision 29 by matty, Fri Sep 14 03:38:39 2001 UTC
# Line 32  char hostname[16]; Line 32  char hostname[16];
32  int width = 800;  int width = 800;
33  int height = 600;  int height = 600;
34  int keylayout = 0x409;  int keylayout = 0x409;
35  BOOL motion = True;  BOOL bitmap_compression = True;
36    BOOL sendmotion = True;
37  BOOL orders = True;  BOOL orders = True;
38  BOOL licence = True;  BOOL licence = True;
39    BOOL use_encryption = True;
40    BOOL desktop_save = True;
41    BOOL fullscreen = False;
42    
43  /* Display usage information */  /* Display usage information */
44  static void  static void
# Line 77  main(int argc, char *argv[]) Line 81  main(int argc, char *argv[])
81          flags = RDP_LOGON_NORMAL;          flags = RDP_LOGON_NORMAL;
82          domain[0] = password[0] = shell[0] = directory[0] = 0;          domain[0] = password[0] = shell[0] = directory[0] = 0;
83    
84          while ((c = getopt(argc, argv, "u:d:s:c:p:n:w:h:k:bml?")) != -1)          while ((c = getopt(argc, argv, "u:d:s:c:p:n:g:k:mbleKFVh?")) != -1)
85          {          {
86                  switch (c)                  switch (c)
87                  {                  {
# Line 105  main(int argc, char *argv[]) Line 109  main(int argc, char *argv[])
109                          case 'n':                          case 'n':
110                                  strncpy(hostname, optarg, sizeof(hostname));                                  strncpy(hostname, optarg, sizeof(hostname));
111                                  break;                                  break;
112                            case 'g':
113                          case 'w':                                  {
114                                  width = strtol(optarg, NULL, 10);                                          char *tgem = 0;
115                                  break;                                          width = strtol(optarg, NULL, 10);
116                                            tgem = strchr(optarg, 'x');
117                          case 'h':                                          if ((tgem == 0) || (strlen(tgem) < 2))
118                                  height = strtol(optarg, NULL, 10);                                          {
119                                                    ERROR
120                                                            ("-g: invalid parameter. Syntax example: -g 1024x768\n");
121                                                    exit(1);
122                                            }
123                                            height = strtol(tgem + 1, NULL, 10);
124                                    }
125                                  break;                                  break;
126    
127                          case 'k':                          case 'k':
128                                  keylayout = strtol(optarg, NULL, 16);                                  keylayout = strtol(optarg, NULL, 16);
129                                    /* keylayout = find_keyb_code(optarg); */
130                                    if (keylayout == 0)
131                                            return 0;
132                                  break;                                  break;
133    
134                          case 'm':                          case 'm':
135                                  motion = False;                                  sendmotion = False;
136                                  break;                                  break;
137    
138                          case 'b':                          case 'b':
# Line 130  main(int argc, char *argv[]) Line 143  main(int argc, char *argv[])
143                                  licence = False;                                  licence = False;
144                                  break;                                  break;
145    
146                            case 'e':
147                                    use_encryption = False;
148                                    break;
149    
150                            case 'F':
151                                    fullscreen = True;
152                                    break;
153    
154                            case 'h':
155                          case '?':                          case '?':
156                          default:                          default:
157                                  usage(argv[0]);                                  usage(argv[0]);
# Line 166  main(int argc, char *argv[]) Line 188  main(int argc, char *argv[])
188                  }                  }
189          }          }
190    
         if (!rdp_connect(server, flags, domain, password, shell, directory))  
                 return 1;  
   
         STATUS("Connection successful.\n");  
   
191          strcpy(title, "rdesktop - ");          strcpy(title, "rdesktop - ");
192          strncat(title, server, sizeof(title));          strncat(title, server, sizeof(title));
193    
194          if (ui_create_window(title))          if (ui_create_window(title))
195          {          {
196                    if (!rdp_connect(server, flags, domain, password, shell,
197                                     directory))
198                            return 1;
199    
200                    STATUS("Connection successful.\n");
201                  rdp_main_loop();                  rdp_main_loop();
202                  ui_destroy_window();                  ui_destroy_window();
203          }          }

Legend:
Removed from v.25  
changed lines
  Added in v.29

  ViewVC Help
Powered by ViewVC 1.1.26