Skip to content
22 changes: 13 additions & 9 deletions neo/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -180,37 +180,41 @@ SILENT = '0'

# site settings ----------------------------------

printed_config = False

def getKeyValue(k, v):
return k + '=\'' + v + '\''

if ( not ARGUMENTS.has_key( 'NOCONF' ) or ARGUMENTS['NOCONF'] != '1' ):
site_dict = {}
if (os.path.exists(conf_filename)):
site_file = open(conf_filename, 'r')
p = pickle.Unpickler(site_file)
site_dict = p.load()
print 'Loading build configuration from ' + conf_filename + ':'
printed_config = True
for k, v in site_dict.items():
exec_cmd = k + '=\'' + v + '\''
print ' ' + exec_cmd
exec(exec_cmd)
print ' ' + getKeyValue(k, v)
globals()[k] = v
else:
print 'Site settings ignored'
print 'Site settings ignored - using default'

# end site settings ------------------------------

# command line settings --------------------------

for k in ARGUMENTS.keys():
exec_cmd = k + '=\'' + ARGUMENTS[k] + '\''
print 'Command line: ' + exec_cmd
exec( exec_cmd )
value = ARGUMENTS[k]
print 'Command line: ' + getKeyValue(k, value);
globals()[k] = value

# end command line settings ----------------------

# save site configuration ----------------------

if ( not ARGUMENTS.has_key( 'NOCONF' ) or ARGUMENTS['NOCONF'] != '1' ):
for k in serialized:
exec_cmd = 'site_dict[\'' + k + '\'] = ' + k
exec(exec_cmd)
site_dict[k] = globals()[k]

site_file = open(conf_filename, 'w')
p = pickle.Pickler(site_file)
Expand Down
6 changes: 6 additions & 0 deletions neo/idlib/Str.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ If you have questions concerning this license or the applicable additional terms
#endif
#define StrCmpNI use_idStr_Icmpn

#ifdef stricmp
#undef stricmp
#endif
#define stricmp idStr::Icmp // use_idStr_Icmp
#define _stricmp use_idStr_Icmp
#define strcasecmp use_idStr_Icmp
#ifdef strnicmp
#undef strnicmp
#endif
#define strnicmp use_idStr_Icmpn
#define _strnicmp use_idStr_Icmpn
#define _memicmp use_idStr_Icmpn
Expand Down
4 changes: 4 additions & 0 deletions neo/idlib/containers/VectorSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ ID_INLINE int idVectorSet<type,dimension>::FindVector(const type &v, const float
}

hash.Add(hashKey, idList<type>::Num());
#ifdef __llvm__
idList<type>::
#endif
Append(v);

return idList<type>::Num()-1;
}

Expand Down
4 changes: 3 additions & 1 deletion neo/idlib/math/Curve.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ idCurve::SetConstantSpeed
template< class type >
ID_INLINE void idCurve<type>::SetConstantSpeed(const float totalTime)
{
int i, j;
int i;
float *length, totalLength, scale, t;

length = (float *) _alloca16(values.Num() * sizeof(float));
Expand Down Expand Up @@ -876,7 +876,9 @@ idCurve_QuadraticBezier::BasisSecondDerivative
template< class type >
ID_INLINE void idCurve_QuadraticBezier<type>::BasisSecondDerivative(const float t, float *bvals) const
{
#if 0
float s1 = (float)(t - this->times[0]) / (this->times[2] - this->times[0]);
#endif
bvals[0] = 2.0f;
bvals[1] = -4.0f;
bvals[2] = 2.0f;
Expand Down
9 changes: 7 additions & 2 deletions neo/sys/scons/scons_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def checkLDD( target, source, env ):
file = target[0]
if (not os.path.isfile(file.abspath)):
print('ERROR: CheckLDD: target %s not found\n' % target[0])
Exit(1)
sys.exit(1)
( status, output ) = commands.getstatusoutput( 'ldd -r %s' % file )
# if ( status != 0 ):
# print 'ERROR: ldd command returned with exit code %d' % status
Expand Down Expand Up @@ -178,7 +178,12 @@ def SetupUtils( env ):
env.SharedLibrarySafe = SharedLibrarySafe

def BuildList( s_prefix, s_string ):
s_list = string.split( s_string )
try:
s_list = string.split( s_string )
except:
# Assume already list
s_list = s_string

for i in range( len( s_list ) ):
s_list[ i ] = s_prefix + '/' + s_list[ i ]
return s_list
4 changes: 4 additions & 0 deletions neo/tools/compilers/roqvq/codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ If you have questions concerning this license or the applicable additional terms

#include "codec.h"

#ifndef HUGE
#define HUGE HUGE_VAL
#endif //!HUGE

float glimit(const float val)
{
if (val<0) return 0;
Expand Down