adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-commits] CVS: adonthell/src nls.cc,1.7,1.8 prefs.cc,1.30,1.31


From: Kai Sterker <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/src nls.cc,1.7,1.8 prefs.cc,1.30,1.31
Date: Sun, 05 Jan 2003 18:00:17 -0500

Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv22252/src

Modified Files:
        nls.cc prefs.cc 
Log Message:
ADDED README.Solaris
FIXED compilation on Solaris (Thanks Markus)
REMOVED #include <getopt.h>, as that is part of <unistd.h>
REPLACED setenv with putenv, as setenv isn't available on all platforms (it's 
not in the POSIX standard, AFAIK)


Index: nls.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/nls.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** nls.cc      4 Dec 2002 17:09:48 -0000       1.7
--- nls.cc      5 Jan 2003 23:00:15 -0000       1.8
***************
*** 2,6 ****
     $Id$
  
!    Copyright (C) 2002 Kai Sterker <address@hidden>
     Part of the Adonthell Project http://adonthell.linuxgames.com
  
--- 2,6 ----
     $Id$
  
!    Copyright (C) 2002/2003 Kai Sterker <address@hidden>
     Part of the Adonthell Project http://adonthell.linuxgames.com
  
***************
*** 52,56 ****
  #if ENABLE_NLS
  #if !defined (WIN32) && !defined (__BEOS__)
!     setenv ("LANGUAGE", language.c_str (), 1);
  #endif
      {
--- 52,57 ----
  #if ENABLE_NLS
  #if !defined (WIN32) && !defined (__BEOS__)
!     string lang = "LANGUAGE=" + language;
!     putenv ((char *) lang.c_str ());
  #endif
      {
***************
*** 69,73 ****
      return gettext (text.c_str ());
  #else
!     return text.c_str();
  #endif
  }
--- 70,74 ----
      return gettext (text.c_str ());
  #else
!     return text.c_str ();
  #endif
  }

Index: prefs.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/prefs.cc,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** prefs.cc    16 Dec 2002 19:09:54 -0000      1.30
--- prefs.cc    5 Jan 2003 23:00:15 -0000       1.31
***************
*** 2,6 ****
     $Id$
  
!    Copyright (C) 2000/2001/2002 Kai Sterker <address@hidden>
     Part of the Adonthell Project http://adonthell.linuxgames.com
  
--- 2,6 ----
     $Id$
  
!    Copyright (C) 2000/2001/2002/2003 Kai Sterker <address@hidden>
     Part of the Adonthell Project http://adonthell.linuxgames.com
  
***************
*** 30,42 ****
  #include <dirent.h>
  #include <unistd.h>
- 
- #ifndef __APPLE__
- #ifdef HAVE__GETOPT_H
- #include <_getopt.h>
- #else
- #include <getopt.h>
- #endif
- #endif // __APPLE__
- 
  #include "prefs.h"
  #include "python_class.h"
--- 30,33 ----
***************
*** 225,229 ****
          // The game exists, so let the show continue...
          gamedir = game::global_data_dir() + "/games/"; 
!         gamedir += argv[1];
      }
  
--- 216,220 ----
          // The game exists, so let the show continue...
          gamedir = game::global_data_dir() + "/games/"; 
!         gamedir += argv[optind];
      }
  
***************
*** 304,308 ****
      u_int32 major = 0, minor = 0, micro = 0, MAJOR, MINOR, MICRO;
      char suffix[16] = "\0", SUFFIX[16] = "\0"; 
!     string s, fname, version;
  
  #ifndef WIN32
--- 295,299 ----
      u_int32 major = 0, minor = 0, micro = 0, MAJOR, MINOR, MICRO;
      char suffix[16] = "\0", SUFFIX[16] = "\0"; 
!     string s, fname;
  
  #ifndef WIN32
***************
*** 312,317 ****
  #endif
  
-     version = "0";
- 
      // try to create that directory in case it dosn't exist
  #ifdef WIN32
--- 303,306 ----
***************
*** 334,340 ****
  
      // adonthellrc opened -> read configuration
-     // if we've got something in section, then try to find this section,
-     // else use the section specified in 'Default' or use the first section
-     // we find.
      while (i)
      {
--- 323,326 ----
***************
*** 393,400 ****
                  // get config file version number
                  if (parse_adonthellrc (n, s) == PREFS_STR) 
!                 {
!                     version = s;
!                     sscanf (version.c_str (), "%d.%d.%d%15s", &major, &minor, 
&micro, suffix);
!                 }
                  break;
              }
--- 379,383 ----
                  // get config file version number
                  if (parse_adonthellrc (n, s) == PREFS_STR) 
!                     sscanf (s.c_str (), "%d.%d.%d%15s", &major, &minor, 
&micro, suffix);
                  break;
              }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]