]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Merge remote-tracking branch 'github/master'
authorRudolf Polzer <divverent@alientrap.org>
Tue, 27 Mar 2012 10:11:37 +0000 (12:11 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 27 Mar 2012 10:11:37 +0000 (12:11 +0200)
Conflicts:
.gitignore
config.py
libs/synapse/synapse.cpp
plugins/imagehl/lbmlib.cpp
plugins/surface_heretic2/surfacedialog.cpp
plugins/surface_ufoai/surfacedialog.cpp
radiant/brushscript.cpp
radiant/main.cpp
radiant/preferences.cpp
tools/quake3/common/cmdlib.c
tools/quake3/common/cmdlib.h
tools/quake3/q3map2/path_init.c
windows_compile_guide/index.html

1  2 
contrib/bobtoolz/DBrush.cpp
libs/splines/splines.cpp
libs/splines/util_str.cpp
tools/quake3/common/cmdlib.c
tools/quake3/common/cmdlib.h
tools/quake3/common/inout.c
tools/quake3/q3map2/main.c
tools/quake3/q3map2/path_init.c
tools/quake3/q3map2/q3map2.h

index 7c24cd0fa4ff3f25be30322c26f2257612ba3468,3e54e79717b554c6857a43bf87c721fb48dedc85..4a2b9c097969c4fa9766ab0ffd3cda41d5b211b5
@@@ -703,12 -689,12 +703,12 @@@ void DBrush::SaveToFile( FILE *pFile )
                                 ( *pp )->points[0][0], ( *pp )->points[0][1], ( *pp )->points[0][2],
                                 ( *pp )->points[1][0], ( *pp )->points[1][1], ( *pp )->points[1][2],
                                 ( *pp )->points[2][0], ( *pp )->points[2][1], ( *pp )->points[2][2],
 -                               ( *pp )->texInfo.m_TextureName,
 -                               ( *pp )->texInfo.m_fShift[0], ( *pp )->texInfo.m_fShift[1],
 -                               ( *pp )->texInfo.m_fScale[0], ( *pp )->texInfo.m_fScale[0],
 -                               ( *pp )->texInfo.m_fRotate );
 +                               ( *pp )->m_shader.c_str(),
 +                               ( *pp )->texInfo.m_texdef.shift[0], ( *pp )->texInfo.m_texdef.shift[1],
 +                               ( *pp )->texInfo.m_texdef.scale[0], ( *pp )->texInfo.m_texdef.scale[0],
 +                               ( *pp )->texInfo.m_texdef.rotate );
  
-               fprintf( pFile, buffer );
+               fprintf( pFile, "%s", buffer );
        }
  
        fprintf( pFile, "}\n" );
Simple merge
Simple merge
index 5164001c04fae612b26de2758328c07e01fbfb03,35f4d75bd68dcb0767c820e73963420a8607c1c8..41fd1ca140c7b15389c706e447d76e200379b14c
@@@ -244,7 -244,10 +244,10 @@@ char *ExpandArg( const char *path )
  
  char *ExpandPath( const char *path ){
        static char full[1024];
-       if ( !*qdir || path[0] == '/' || path[0] == '\\' || path[1] == ':' ) {
 -      if ( !qdir[0] ) {
++      if ( !qdir ) {
+               Error( "ExpandPath called without qdir set" );
+       }
+       if ( path[0] == '/' || path[0] == '\\' || path[1] == ':' ) {
                strcpy( full, path );
                return full;
        }
  
  char *ExpandGamePath( const char *path ){
        static char full[1024];
-       if ( !*gamedir ) {
 -      if ( !qdir[0] ) {
 -              Error( "ExpandGamePath called without qdir set" );
++      if ( !gamedir[0] ) {
 +              Error( "ExpandGamePath called without gamedir set" );
        }
        if ( path[0] == '/' || path[0] == '\\' || path[1] == ':' ) {
                strcpy( full, path );
index 3c9b5a543d07c72373103f50d076855fb61b19d6,3fb98febc98457d9438a089882a41f937dfa0f6d..f6f5e4d17106108c173a13e8e15cd53e32fb3e9d
  #endif
  
  
- #define MAX_OS_PATH     1024
 +#ifdef PATH_MAX
 +#define MAX_OS_PATH     PATH_MAX
 +#else
+ #define MAX_OS_PATH     4096
 +#endif
  #define MEM_BLOCKSIZE 4096
  
  // the dec offsetof macro doesnt work very well...
Simple merge
Simple merge
index 2591c5bf45b54ba9e7467bd43a42e9f9f139ae28,901f07fc3f64db841221fd26e82558564fab6d29..07ebc31b1e154dc2ade01a871560ad49a3b1635a
@@@ -66,32 -66,23 +66,27 @@@ char *LokiGetHomeDir( void )
        #ifndef Q_UNIX
        return NULL;
        #else
+       static char     buf[ 4096 ];
+       struct passwd   pw, *pwp;
        char            *home;
-       uid_t id;
-       struct passwd   *pwd;
 +      static char homeBuf[MAX_OS_PATH];
  
  
        /* get the home environment variable */
        home = getenv( "HOME" );
-       if ( home == NULL ) {
-               /* do some more digging */
-               id = getuid();
-               setpwent();
-               while ( ( pwd = getpwent() ) != NULL )
-               {
-                       if ( pwd->pw_uid == id ) {
-                               home = pwd->pw_dir;
-                               break;
-                       }
 -      if ( home ) {
 -              return Q_strncpyz( buf, home, sizeof( buf ) );
 -      }
+       /* look up home dir in password database */
 -      if ( getpwuid_r( getuid(), &pw, buf, sizeof( buf ), &pwp ) == 0 ) {
 -              return pw.pw_dir;
++      if(!home)
++      {
++              if ( getpwuid_r( getuid(), &pw, buf, sizeof( buf ), &pwp ) == 0 ) {
++                      return pw.pw_dir;
 +              }
-               endpwent();
        }
  
 -      return NULL;
 +      snprintf( homeBuf, sizeof( homeBuf ), "%s/.", home );
 +
 +      /* return it */
 +      return homeBuf;
        #endif
  }
  
@@@ -130,21 -105,22 +125,16 @@@ void LokiInitPaths( char *argv0 )
        qboolean found;
  
  
 -      /* get home dir */
 -      home = LokiGetHomeDir();
 -      if ( home == NULL ) {
 -              home = ".";
 -      }
 -
+       path = getenv( "PATH" );
        /* do some path divining */
-       strcpy( temp, argv0 );
-       if ( strrchr( argv0, '/' ) ) {
+       Q_strncpyz( temp, argv0, sizeof( temp ) );
+       if ( strrchr( temp, '/' ) ) {
                argv0 = strrchr( argv0, '/' ) + 1;
        }
-       else
-       {
-               /* get path environment variable */
-               path = getenv( "PATH" );
-               /* minor setup */
-               last = last0;
-               last[ 0 ] = path[ 0 ];
-               last[ 1 ] = '\0';
+       else if ( path ) {
                found = qfalse;
+               last = path;
  
                /* go through each : segment of path */
                while ( last[ 0 ] != '\0' && found == qfalse )
index 935d1c7f078baa9ff936670d85510cea5fe584b2,245e34c6cb34298ff989684bcf3db4adbc129f32..bbb3e76e73518d27b8bc12ef7a42ca46f51b2188
  #include "inout.h"
  #include "vfs.h"
  #include "png.h"
 -
 +#include "md4.h"
  #include <stdlib.h>
  
+ #define MIN(a, b) ((a) < (b) ? (a) : (b))
+ #define MAX(a, b) ((a) > (b) ? (a) : (b))
  
  
  /* -------------------------------------------------------------------------------