/[rdesktop]/sourceforge.net/trunk/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/trunk/rdesktop/rdesktop.c

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

revision 474 by matthewc, Tue Sep 30 09:11:08 2003 UTC revision 501 by stargo, Fri Oct 17 08:23:47 2003 UTC
# Line 40  Line 40 
40  #include "crypto/md5.h"  #include "crypto/md5.h"
41  #endif  #endif
42    
43  char g_title[32] = "";  char g_title[64] = "";
44  char g_username[16];  char g_username[64];
45  char hostname[16];  char hostname[16];
46  char keymapname[16];  char keymapname[16];
47  int keylayout = 0x409;          /* Defaults to US keyboard layout */  int keylayout = 0x409;          /* Defaults to US keyboard layout */
48  int g_width = 800;              /* If width or height are reset to zero, the geometry will  
49                                     be fetched from _NET_WORKAREA */  int g_width = 800;              /* width is special: If 0, the
50                                       geometry will be fetched from
51                                       _NET_WORKAREA. If negative,
52                                       absolute value specifies the
53                                       percent of the whole screen. */
54  int g_height = 600;  int g_height = 600;
55  int tcp_port_rdp = TCP_PORT_RDP;  int tcp_port_rdp = TCP_PORT_RDP;
56  int g_server_bpp = 8;  int g_server_bpp = 8;
# Line 61  BOOL g_fullscreen = False; Line 65  BOOL g_fullscreen = False;
65  BOOL g_grab_keyboard = True;  BOOL g_grab_keyboard = True;
66  BOOL g_hide_decorations = False;  BOOL g_hide_decorations = False;
67  BOOL g_use_rdp5 = True;  BOOL g_use_rdp5 = True;
68    BOOL g_console_session = False;
69  extern BOOL g_owncolmap;  extern BOOL g_owncolmap;
70    
71    #ifdef WITH_RDPSND
72    BOOL g_rdpsnd = True;
73    #endif
74    
75  #ifdef RDP2VNC  #ifdef RDP2VNC
76  extern int rfb_port;  extern int rfb_port;
77  extern int defer_time;  extern int defer_time;
# Line 101  usage(char *program) Line 110  usage(char *program)
110          fprintf(stderr, "   -K: keep window manager key bindings\n");          fprintf(stderr, "   -K: keep window manager key bindings\n");
111          fprintf(stderr, "   -T: window title\n");          fprintf(stderr, "   -T: window title\n");
112          fprintf(stderr, "   -D: hide window manager decorations\n");          fprintf(stderr, "   -D: hide window manager decorations\n");
113    #ifdef WITH_RDPSND
114            fprintf(stderr, "   -A: disable audio-redirection\n");
115    #endif
116          fprintf(stderr, "   -a: server bpp\n");          fprintf(stderr, "   -a: server bpp\n");
117          fprintf(stderr, "   -4: Use RDP version 4\n");          fprintf(stderr, "   -0: attach to console\n");
118          fprintf(stderr, "   -5: Use RDP version 5 (default)\n");          fprintf(stderr, "   -4: use RDP version 4\n");
119            fprintf(stderr, "   -5: use RDP version 5 (default)\n");
120  }  }
121    
122  static BOOL  static BOOL
# Line 197  main(int argc, char *argv[]) Line 210  main(int argc, char *argv[])
210          char server[64];          char server[64];
211          char fullhostname[64];          char fullhostname[64];
212          char domain[16];          char domain[16];
213          char password[16];          char password[64];
214          char shell[128];          char shell[128];
215          char directory[32];          char directory[32];
216          BOOL prompt_password, rdp_retval = False;          BOOL prompt_password, rdp_retval = False;
# Line 218  main(int argc, char *argv[]) Line 231  main(int argc, char *argv[])
231  #define VNCOPT  #define VNCOPT
232  #endif  #endif
233    
234          while ((c = getopt(argc, argv, VNCOPT "u:d:s:S:c:p:n:k:g:a:fbeEmCKT:Dh?54")) != -1)          while ((c = getopt(argc, argv, VNCOPT "u:d:s:S:c:p:n:k:g:a:fbeEmCKT:AD045h?")) != -1)
235          {          {
236                  switch (c)                  switch (c)
237                  {                  {
# Line 302  main(int argc, char *argv[]) Line 315  main(int argc, char *argv[])
315                                  }                                  }
316    
317                                  g_width = strtol(optarg, &p, 10);                                  g_width = strtol(optarg, &p, 10);
318                                    if (g_width <= 0)
319                                    {
320                                            error("invalid geometry\n");
321                                            return 1;
322                                    }
323    
324                                  if (*p == 'x')                                  if (*p == 'x')
325                                          g_height = strtol(p + 1, NULL, 10);                                          g_height = strtol(p + 1, NULL, 10);
326    
327                                  if ((g_width == 0) || (g_height == 0))                                  if (g_height <= 0)
328                                  {                                  {
329                                          error("invalid geometry\n");                                          error("invalid geometry\n");
330                                          return 1;                                          return 1;
331                                  }                                  }
332    
333                                    if (*p == '%')
334                                            g_width = -g_width;
335    
336                                  break;                                  break;
337    
338                          case 'f':                          case 'f':
# Line 356  main(int argc, char *argv[]) Line 379  main(int argc, char *argv[])
379                                  }                                  }
380                                  break;                                  break;
381    
382    #ifdef WITH_RDPSND
383                            case 'A':
384                                    g_rdpsnd = False;
385                                    break;
386    #endif
387                            case '0':
388                                    g_console_session = True;
389                                    break;
390    
391                          case '4':                          case '4':
392                                  g_use_rdp5 = False;                                  g_use_rdp5 = False;
393                                  break;                                  break;
# Line 426  main(int argc, char *argv[]) Line 458  main(int argc, char *argv[])
458                  return 1;                  return 1;
459    
460  #ifdef WITH_RDPSND  #ifdef WITH_RDPSND
461          rdpsnd_init();          if (g_rdpsnd)
462            {
463                    rdpsnd_init();
464            }
465  #endif  #endif
466          /* rdpdr_init(); */          /* rdpdr_init(); */
467    

Legend:
Removed from v.474  
changed lines
  Added in v.501

  ViewVC Help
Powered by ViewVC 1.1.26