/[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 17 by matty, Thu Sep 28 15:54:11 2000 UTC revision 21 by matty, Mon Oct 16 08:44:48 2000 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 = False;  BOOL motion = True;
36  BOOL orders = True;  BOOL orders = True;
37  BOOL licence = True;  BOOL licence = True;
38    
# Line 41  static void usage(char *program) Line 41  static void usage(char *program)
41  {  {
42          STATUS("Usage: %s [options] server\n", program);          STATUS("Usage: %s [options] server\n", program);
43          STATUS("   -u: user name\n");          STATUS("   -u: user name\n");
44            STATUS("   -d: domain\n");
45            STATUS("   -s: shell\n");
46            STATUS("   -c: working directory\n");
47            STATUS("   -p: password (autologon)\n");
48          STATUS("   -n: client hostname\n");          STATUS("   -n: client hostname\n");
49          STATUS("   -w: desktop width\n");          STATUS("   -w: desktop width\n");
50          STATUS("   -h: desktop height\n");          STATUS("   -h: desktop height\n");
51          STATUS("   -k: keyboard layout (hex)\n");          STATUS("   -k: keyboard layout (hex)\n");
         STATUS("   -m: send motion events\n");  
52          STATUS("   -b: force bitmap updates\n");          STATUS("   -b: force bitmap updates\n");
53            STATUS("   -m: do not send motion events\n");
54          STATUS("   -l: do not request licence\n\n");          STATUS("   -l: do not request licence\n\n");
55  }  }
56    
# Line 55  int main(int argc, char *argv[]) Line 59  int main(int argc, char *argv[])
59  {  {
60          struct passwd *pw;          struct passwd *pw;
61          char *server;          char *server;
62            uint32 flags;
63            char domain[16];
64            char password[16];
65            char shell[32];
66            char directory[32];
67          char title[32];          char title[32];
68          int c;          int c;
69    
# Line 62  int main(int argc, char *argv[]) Line 71  int main(int argc, char *argv[])
71          STATUS("Version "VERSION". Copyright (C) 1999-2000 Matt Chapman.\n");          STATUS("Version "VERSION". Copyright (C) 1999-2000 Matt Chapman.\n");
72          STATUS("See http://www.rdesktop.org/ for more information.\n\n");          STATUS("See http://www.rdesktop.org/ for more information.\n\n");
73    
74          while ((c = getopt(argc, argv, "u:n:w:h:k:mbl?")) != -1)          flags = RDP_LOGON_NORMAL;
75            domain[0] = password[0] = shell[0] = directory[0] = 0;
76    
77            while ((c = getopt(argc, argv, "u:d:s:c:p:n:w:h:k:bml?")) != -1)
78          {          {
79                  switch (c)                  switch (c)
80                  {                  {
# Line 70  int main(int argc, char *argv[]) Line 82  int main(int argc, char *argv[])
82                                  strncpy(username, optarg, sizeof(username));                                  strncpy(username, optarg, sizeof(username));
83                                  break;                                  break;
84    
85                            case 'd':
86                                    strncpy(domain, optarg, sizeof(domain));
87                                    break;
88    
89                            case 'p':
90                                    flags |= RDP_LOGON_AUTO;
91                                    strncpy(password, optarg, sizeof(password));
92                                    break;
93    
94                            case 's':
95                                    strncpy(shell, optarg, sizeof(shell));
96                                    break;
97    
98                            case 'c':
99                                    strncpy(directory, optarg, sizeof(directory));
100                                    break;
101    
102                          case 'n':                          case 'n':
103                                  strncpy(hostname, optarg, sizeof(hostname));                                  strncpy(hostname, optarg, sizeof(hostname));
104                                  break;                                  break;
# Line 87  int main(int argc, char *argv[]) Line 116  int main(int argc, char *argv[])
116                                  break;                                  break;
117    
118                          case 'm':                          case 'm':
119                                  motion = True;                                  motion = False;
120                                  break;                                  break;
121    
122                          case 'b':                          case 'b':
# Line 134  int main(int argc, char *argv[]) Line 163  int main(int argc, char *argv[])
163                  }                  }
164          }          }
165    
166          if (!rdp_connect(server))          if (!rdp_connect(server, flags, domain, password, shell, directory))
167                  return 1;                  return 1;
168    
169          STATUS("Connection successful.\n");          STATUS("Connection successful.\n");

Legend:
Removed from v.17  
changed lines
  Added in v.21

  ViewVC Help
Powered by ViewVC 1.1.26