Update of /cvsroot/playerstage/code/player/libplayercore
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv803/libplayercore

Modified Files:
        configfile.cc 
Log Message:
adaptive rgb.txt search inspired by patch [1707142]


Index: configfile.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/libplayercore/configfile.cc,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** configfile.cc       10 Jul 2007 09:01:51 -0000      1.17
--- configfile.cc       31 Jul 2007 04:03:51 -0000      1.18
***************
*** 69,73 ****
  //extern int global_playerport;
  
! #define COLOR_DATABASE "/usr/X11R6/lib/X11/rgb.txt"
  
  ///////////////////////////////////////////////////////////////////////////
--- 69,73 ----
  //extern int global_playerport;
  
! const char * COLOR_DATABASE[5] = 
{"/usr/X11R6/lib/X11/rgb.txt","/usr/share/X11/rgb.txt","/etc/X11/rgb.txt","/usr/lib/X11/rgb.txt",
 NULL};
  
  ///////////////////////////////////////////////////////////////////////////
***************
*** 1872,1887 ****
  {
    FILE *file;
-   const char *filename;
  
!   filename = COLOR_DATABASE;
!   file = fopen(filename, "r");
    if (!file)
    {
!     PLAYER_ERROR2("unable to open color database %s : %s",
!                   filename, strerror(errno));
      fclose(file);
      return 0xFFFFFF;
    }
    
    while (true)
    {
--- 1872,1894 ----
  {
    FILE *file;
  
!   for (int i=0; COLOR_DATABASE[i] != NULL; ++i)
!   {
!     file = fopen(COLOR_DATABASE[i], "r");
!     if (file)
!       break;
!   }
    if (!file)
    {
!     PLAYER_ERROR("unable to open color database: tried the following files");
!     for (int i=0; COLOR_DATABASE[i] != NULL; ++i)
!     {
!       PLAYER_ERROR1("\t: %s", COLOR_DATABASE[i]);
!     }
      fclose(file);
      return 0xFFFFFF;
    }
    
+   
    while (true)
    {


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to