/[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 1009 by stargo, Mon Aug 15 12:06:59 2005 UTC revision 1010 by astrand, Wed Aug 31 13:00:57 2005 UTC
# Line 605  main(int argc, char *argv[]) Line 605  main(int argc, char *argv[])
605                                  break;                                  break;
606    
607                          case 'x':                          case 'x':
608                                  if (strncmp("modem", optarg, 1) == 0)                                  if (str_startswith(optarg, "m"))        /* modem */
609                                  {                                  {
610                                          g_rdp5_performanceflags =                                          g_rdp5_performanceflags =
611                                                  RDP5_NO_WALLPAPER | RDP5_NO_FULLWINDOWDRAG |                                                  RDP5_NO_WALLPAPER | RDP5_NO_FULLWINDOWDRAG |
612                                                  RDP5_NO_MENUANIMATIONS | RDP5_NO_THEMING;                                                  RDP5_NO_MENUANIMATIONS | RDP5_NO_THEMING;
613                                  }                                  }
614                                  else if (strncmp("broadband", optarg, 1) == 0)                                  else if (str_startswith(optarg, "b"))   /* broadband */
615                                  {                                  {
616                                          g_rdp5_performanceflags = RDP5_NO_WALLPAPER;                                          g_rdp5_performanceflags = RDP5_NO_WALLPAPER;
617                                  }                                  }
618                                  else if (strncmp("lan", optarg, 1) == 0)                                  else if (str_startswith(optarg, "l"))   /* lan */
619                                  {                                  {
620                                          g_rdp5_performanceflags = RDP5_DISABLE_NOTHING;                                          g_rdp5_performanceflags = RDP5_DISABLE_NOTHING;
621                                  }                                  }
# Line 631  main(int argc, char *argv[]) Line 631  main(int argc, char *argv[])
631    
632                          case 'r':                          case 'r':
633    
634                                  if (strncmp("sound", optarg, 5) == 0)                                  if (str_startswith(optarg, "sound"))
635                                  {                                  {
636                                          optarg += 5;                                          optarg += 5;
637    
# Line 640  main(int argc, char *argv[]) Line 640  main(int argc, char *argv[])
640                                                  *optarg++;                                                  *optarg++;
641                                                  while ((p = next_arg(optarg, ',')))                                                  while ((p = next_arg(optarg, ',')))
642                                                  {                                                  {
643                                                          if (strncmp("remote", optarg, 6) == 0)                                                          if (str_startswith(optarg, "remote"))
644                                                                  flags |= RDP_LOGON_LEAVE_AUDIO;                                                                  flags |= RDP_LOGON_LEAVE_AUDIO;
645    
646                                                          if (strncmp("local", optarg, 5) == 0)                                                          if (str_startswith(optarg, "local"))
647  #ifdef WITH_RDPSND  #ifdef WITH_RDPSND
648                                                                  g_rdpsnd = True;                                                                  g_rdpsnd = True;
649  #else  #else
650                                                                  warning("Not compiled with sound support\n");                                                                  warning("Not compiled with sound support\n");
651  #endif  #endif
652    
653                                                          if (strncmp("off", optarg, 3) == 0)                                                          if (str_startswith(optarg, "off"))
654  #ifdef WITH_RDPSND  #ifdef WITH_RDPSND
655                                                                  g_rdpsnd = False;                                                                  g_rdpsnd = False;
656  #else  #else
# Line 669  main(int argc, char *argv[]) Line 669  main(int argc, char *argv[])
669  #endif  #endif
670                                          }                                          }
671                                  }                                  }
672                                  else if (strncmp("disk", optarg, 4) == 0)                                  else if (str_startswith(optarg, "disk"))
673                                  {                                  {
674                                          /* -r disk:h:=/mnt/floppy */                                          /* -r disk:h:=/mnt/floppy */
675                                          disk_enum_devices(&g_num_devices, optarg + 4);                                          disk_enum_devices(&g_num_devices, optarg + 4);
676                                  }                                  }
677                                  else if (strncmp("comport", optarg, 7) == 0)                                  else if (str_startswith(optarg, "comport"))
678                                  {                                  {
679                                          serial_enum_devices(&g_num_devices, optarg + 7);                                          serial_enum_devices(&g_num_devices, optarg + 7);
680                                  }                                  }
681                                  else if (strncmp("lptport", optarg, 7) == 0)                                  else if (str_startswith(optarg, "lptport"))
682                                  {                                  {
683                                          parallel_enum_devices(&g_num_devices, optarg + 7);                                          parallel_enum_devices(&g_num_devices, optarg + 7);
684                                  }                                  }
685                                  else if (strncmp("printer", optarg, 7) == 0)                                  else if (str_startswith(optarg, "printer"))
686                                  {                                  {
687                                          printer_enum_devices(&g_num_devices, optarg + 7);                                          printer_enum_devices(&g_num_devices, optarg + 7);
688                                  }                                  }
689                                  else if (strncmp("clientname", optarg, 7) == 0)                                  else if (str_startswith(optarg, "clientname"))
690                                  {                                  {
691                                          g_rdpdr_clientname = xmalloc(strlen(optarg + 11) + 1);                                          g_rdpdr_clientname = xmalloc(strlen(optarg + 11) + 1);
692                                          strcpy(g_rdpdr_clientname, optarg + 11);                                          strcpy(g_rdpdr_clientname, optarg + 11);
# Line 1170  toupper_str(char *p) Line 1170  toupper_str(char *p)
1170  }  }
1171    
1172    
1173    BOOL
1174    str_startswith(const char *s, const char *prefix)
1175    {
1176            return (strncmp(s, prefix, strlen(prefix)) == 0);
1177    }
1178    
1179    
1180  /* not all clibs got ltoa */  /* not all clibs got ltoa */
1181  #define LTOA_BUFSIZE (sizeof(long) * 8 + 1)  #define LTOA_BUFSIZE (sizeof(long) * 8 + 1)
1182    

Legend:
Removed from v.1009  
changed lines
  Added in v.1010

  ViewVC Help
Powered by ViewVC 1.1.26