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

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

revision 1255 by stargo, Sun Sep 17 11:04:50 2006 UTC revision 1306 by astrand, Fri Oct 27 12:59:38 2006 UTC
# Line 408  main(int argc, char *argv[]) Line 408  main(int argc, char *argv[])
408          BOOL geometry_option = False;          BOOL geometry_option = False;
409          int run_count = 0;      /* Session Directory support */          int run_count = 0;      /* Session Directory support */
410          BOOL continue_connect = True;   /* Session Directory support */          BOOL continue_connect = True;   /* Session Directory support */
411            char *rdpsnd_optarg = NULL;
412    
413  #ifdef HAVE_LOCALE_H  #ifdef HAVE_LOCALE_H
414          /* Set locale according to environment */          /* Set locale according to environment */
# Line 669  main(int argc, char *argv[]) Line 670  main(int argc, char *argv[])
670                                                          if (str_startswith(optarg, "local"))                                                          if (str_startswith(optarg, "local"))
671  #ifdef WITH_RDPSND  #ifdef WITH_RDPSND
672                                                          {                                                          {
673                                                                  char *driver = NULL, *options =                                                                  rdpsnd_optarg =
674                                                                          NULL;                                                                          next_arg(optarg, ':');
   
                                                                 if ((driver =  
                                                                      next_arg(optarg, ':')))  
                                                                 {  
                                                                         if (!strlen(driver))  
                                                                         {  
                                                                                 driver = NULL;  
                                                                         }  
                                                                         else if ((options =  
                                                                                   next_arg(driver,  
                                                                                            ':')))  
                                                                         {  
                                                                                 if (!strlen  
                                                                                     (options))  
                                                                                         options =  
                                                                                                 NULL;  
                                                                         }  
                                                                 }  
   
675                                                                  g_rdpsnd = True;                                                                  g_rdpsnd = True;
                                                                 if (!rdpsnd_select_driver  
                                                                     (driver, options))  
                                                                 {  
                                                                         warning("Driver not available\n");  
                                                                 }  
676                                                          }                                                          }
677    
678  #else  #else
# Line 716  main(int argc, char *argv[]) Line 693  main(int argc, char *argv[])
693                                          {                                          {
694  #ifdef WITH_RDPSND  #ifdef WITH_RDPSND
695                                                  g_rdpsnd = True;                                                  g_rdpsnd = True;
                                                 if (!rdpsnd_select_driver(NULL, NULL))  
                                                 {  
                                                         warning("No sound-driver available\n");  
                                                 }  
696  #else  #else
697                                                  warning("Not compiled with sound support\n");                                                  warning("Not compiled with sound support\n");
698  #endif  #endif
# Line 914  main(int argc, char *argv[]) Line 887  main(int argc, char *argv[])
887    
888  #ifdef WITH_RDPSND  #ifdef WITH_RDPSND
889          if (g_rdpsnd)          if (g_rdpsnd)
890                  rdpsnd_init();          {
891                    if (!rdpsnd_init(rdpsnd_optarg))
892                    {
893                            warning("Initializing sound-support failed!\n");
894                    }
895            }
896  #endif  #endif
897    
898          if (lspci_enabled)          if (lspci_enabled)
# Line 1101  xmalloc(int size) Line 1079  xmalloc(int size)
1079          return mem;          return mem;
1080  }  }
1081    
1082    /* Exit on NULL pointer. Use to verify result from XGetImage etc */
1083    void
1084    exit_if_null(void *ptr)
1085    {
1086            if (ptr == NULL)
1087            {
1088                    error("unexpected null pointer. Out of memory?\n");
1089                    exit(1);
1090            }
1091    }
1092    
1093  /* strdup */  /* strdup */
1094  char *  char *
1095  xstrdup(const char *s)  xstrdup(const char *s)

Legend:
Removed from v.1255  
changed lines
  Added in v.1306

  ViewVC Help
Powered by ViewVC 1.1.26