Changed astyle-code.sh script to use the system astyle which is 2.03 on Kubuntu 13.10

This commit is contained in:
Robert Beckebans 2014-02-23 15:19:11 +01:00
parent 4a124390a4
commit a315630d7d
22 changed files with 6037 additions and 6034 deletions

View file

@ -1,5 +1,8 @@
#!/bin/sh
./astyle.exe -v --formatted --options=astyle-options.ini --exclude="libs" --recursive *.h
./astyle.exe -v --formatted --options=astyle-options.ini --exclude="libs" --exclude="d3xp/gamesys/SysCvar.cpp" --exclude="d3xp/gamesys/Callbacks.cpp" --exclude="sys/win32/win_cpu.cpp" --exclude="sys/win32/win_main.cpp" --recursive *.cpp
# TODO make sure that the astyle version is >= 2.03 or quit
astyle -v --formatted --options=astyle-options.ini --exclude="libs" --recursive *.h
astyle -v --formatted --options=astyle-options.ini --exclude="libs" --exclude="d3xp/gamesys/SysCvar.cpp" --exclude="d3xp/gamesys/Callbacks.cpp" --exclude="sys/win32/win_cpu.cpp" --exclude="sys/win32/win_main.cpp" --recursive *.cpp
#pause

View file

@ -247,7 +247,7 @@ static idEvent EventPool[ MAX_EVENTS ];
bool idEvent::initialized = false;
idDynamicBlockAlloc<byte, 16* 1024, 256> idEvent::eventDataAllocator;
idDynamicBlockAlloc<byte, 16 * 1024, 256> idEvent::eventDataAllocator;
/*
================

View file

@ -103,7 +103,7 @@ private:
idLinkList<idEvent> eventNode;
static idDynamicBlockAlloc<byte, 16* 1024, 256> eventDataAllocator;
static idDynamicBlockAlloc<byte, 16 * 1024, 256> eventDataAllocator;
public:

View file

@ -1452,12 +1452,12 @@ void idMenuHandler_Shell::ShowDoomIntro()
int numTextFields = NUM_DOOM_INTRO_LINES;
idStr textEntries[NUM_DOOM_INTRO_LINES] = { va( "%s %s", idLocalization::GetString( "#str_04052" ), idLocalization::GetString( "#str_04053" ) ),
va( "%s %s", idLocalization::GetString( "#str_04054" ), idLocalization::GetString( "#str_04055" ) ),
idLocalization::GetString( "#str_03012" ),
idLocalization::GetString( "#str_04056" ),
idLocalization::GetString( "#str_04057" ),
va( "%s %s", idLocalization::GetString( "#str_04058" ), idLocalization::GetString( "#str_04059" ) ),
va( "%s %s", idLocalization::GetString( "#str_04060" ), idLocalization::GetString( "#str_04061" ) )
va( "%s %s", idLocalization::GetString( "#str_04054" ), idLocalization::GetString( "#str_04055" ) ),
idLocalization::GetString( "#str_03012" ),
idLocalization::GetString( "#str_04056" ),
idLocalization::GetString( "#str_04057" ),
va( "%s %s", idLocalization::GetString( "#str_04058" ), idLocalization::GetString( "#str_04059" ) ),
va( "%s %s", idLocalization::GetString( "#str_04060" ), idLocalization::GetString( "#str_04061" ) )
};
for( int i = 0; i < numTextFields; ++i )

View file

@ -566,19 +566,19 @@ idVarDef* idCompiler::OptimizeOpcode( const opcode_t* op, idVarDef* var_a, idVar
type = &type_vector;
break;
case OP_MUL_F:
c._float = *var_a->value.floatPtr * *var_b->value.floatPtr;
c._float = *var_a->value.floatPtr** var_b->value.floatPtr;
type = &type_float;
break;
case OP_MUL_V:
c._float = *var_a->value.vectorPtr * *var_b->value.vectorPtr;
c._float = *var_a->value.vectorPtr** var_b->value.vectorPtr;
type = &type_float;
break;
case OP_MUL_FV:
vec_c = *var_b->value.vectorPtr * *var_a->value.floatPtr;
vec_c = *var_b->value.vectorPtr** var_a->value.floatPtr;
type = &type_vector;
break;
case OP_MUL_VF:
vec_c = *var_a->value.vectorPtr * *var_b->value.floatPtr;
vec_c = *var_a->value.vectorPtr** var_b->value.floatPtr;
type = &type_vector;
break;
case OP_DIV_F:
@ -678,7 +678,7 @@ idVarDef* idCompiler::OptimizeOpcode( const opcode_t* op, idVarDef* var_a, idVar
type = &type_float;
break;
case OP_UMUL_F:
c._float = *var_b->value.floatPtr * *var_a->value.floatPtr;
c._float = *var_b->value.floatPtr** var_a->value.floatPtr;
type = &type_float;
break;
case OP_UDIV_F:

View file

@ -1274,28 +1274,28 @@ bool idInterpreter::Execute()
var_a = GetVariable( st->a );
var_b = GetVariable( st->b );
var_c = GetVariable( st->c );
*var_c.floatPtr = *var_a.floatPtr * *var_b.floatPtr;
*var_c.floatPtr = *var_a.floatPtr** var_b.floatPtr;
break;
case OP_MUL_V:
var_a = GetVariable( st->a );
var_b = GetVariable( st->b );
var_c = GetVariable( st->c );
*var_c.floatPtr = *var_a.vectorPtr * *var_b.vectorPtr;
*var_c.floatPtr = *var_a.vectorPtr** var_b.vectorPtr;
break;
case OP_MUL_FV:
var_a = GetVariable( st->a );
var_b = GetVariable( st->b );
var_c = GetVariable( st->c );
*var_c.vectorPtr = *var_a.floatPtr * *var_b.vectorPtr;
*var_c.vectorPtr = *var_a.floatPtr** var_b.vectorPtr;
break;
case OP_MUL_VF:
var_a = GetVariable( st->a );
var_b = GetVariable( st->b );
var_c = GetVariable( st->c );
*var_c.vectorPtr = *var_a.vectorPtr * *var_b.floatPtr;
*var_c.vectorPtr = *var_a.vectorPtr** var_b.floatPtr;
break;
case OP_DIV_F:

View file

@ -209,7 +209,7 @@ public:
//BSM Added for the material editors rename capabilities
virtual bool RenameDecl( declType_t type, const char* oldName, const char* newName );
virtual void MediaPrint( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF(1, 2);
virtual void MediaPrint( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF( 1, 2 );
virtual void WritePrecacheCommands( idFile* f );
virtual const idMaterial* FindMaterial( const char* name, bool makeDefault = true );

View file

@ -156,8 +156,8 @@ public:
int ExpectAnyToken( idToken* token );
void SetMarker() {}
void UnreadToken( const idToken* token );
void Error( VERIFY_FORMAT_STRING const char* str, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF(1, 2);
void Warning( VERIFY_FORMAT_STRING const char* str, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF(1, 2);
void Error( VERIFY_FORMAT_STRING const char* str, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF( 1, 2 );
void Warning( VERIFY_FORMAT_STRING const char* str, ... ) ID_INSTANCE_ATTRIBUTE_PRINTF( 1, 2 );
int ParseInt();
bool ParseBool();
float ParseFloat( bool* errorFlag = NULL );

View file

@ -79,7 +79,7 @@ public:
static bool IsStringId( const char* str );
private:
idDynamicBlockAlloc< char, 100* 1024, 16 > blockAlloc;
idDynamicBlockAlloc< char, 100 * 1024, 16 > blockAlloc;
idList< idLangKeyValue > keyVals;
idHashIndex keyIndex;

View file

@ -62,12 +62,12 @@ public:
static void ShutDown();
// wrapper to idCommon functions
static void Printf ( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 1, 2 );
static void PrintfIf ( const bool test, VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 2, 3 );
NO_RETURN static void Error ( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 1, 2 );
NO_RETURN static void FatalError( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 1, 2 );
static void Warning ( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 1, 2 );
static void WarningIf ( const bool test, VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 2, 3 );
static void Printf( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 1, 2 );
static void PrintfIf( const bool test, VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 2, 3 );
NO_RETURN static void Error( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 1, 2 );
NO_RETURN static void FatalError( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 1, 2 );
static void Warning( VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 1, 2 );
static void WarningIf( const bool test, VERIFY_FORMAT_STRING const char* fmt, ... ) ID_STATIC_ATTRIBUTE_PRINTF( 2, 3 );
// the extra check for mainThreadInitialized is necessary for this to be accurate
// when called by startup code that happens before idLib::Init

View file

@ -637,7 +637,7 @@ static bool R_ParseImageProgram_r( idLexer& src, byte** pic, int* width, int* he
if( pic )
{
int c;
c = *width * *height * 4;
c = *width** height * 4;
for( i = 0 ; i < c ; i += 4 )
{
( *pic )[i + 1] =
@ -662,7 +662,7 @@ static bool R_ParseImageProgram_r( idLexer& src, byte** pic, int* width, int* he
if( pic )
{
int c;
c = *width * *height * 4;
c = *width** height * 4;
for( i = 0 ; i < c ; i += 4 )
{
( *pic )[i + 3] = ( ( *pic )[i + 0] + ( *pic )[i + 1] + ( *pic )[i + 2] ) / 3;

File diff suppressed because it is too large Load diff

View file

@ -57,8 +57,8 @@ typedef void ( *GLExtension_t )( void );
extern "C" {
#endif
GLExtension_t GLimp_ExtensionPointer( const char* name );
GLExtension_t GLimp_ExtensionPointer( const char* name );
#ifdef __cplusplus
}
#endif
@ -290,7 +290,7 @@ extern void ( APIENTRY* qglGetMaterialiv )( GLenum face, GLenum pname, GLint* p
extern void ( APIENTRY* qglGetPixelMapfv )( GLenum map, GLfloat* values );
extern void ( APIENTRY* qglGetPixelMapuiv )( GLenum map, GLuint* values );
extern void ( APIENTRY* qglGetPixelMapusv )( GLenum map, GLushort* values );
extern void ( APIENTRY* qglGetPointerv )( GLenum pname, GLvoid* *params );
extern void ( APIENTRY* qglGetPointerv )( GLenum pname, GLvoid** params );
extern void ( APIENTRY* qglGetPolygonStipple )( GLubyte* mask );
extern const GLubyte* ( APIENTRY* qglGetString )( GLenum name );
extern void ( APIENTRY* qglGetTexEnvfv )( GLenum target, GLenum pname, GLfloat* params );

File diff suppressed because it is too large Load diff

View file

@ -251,7 +251,7 @@ static int CalculateTriangleFacingCulledStatic( byte* __restrict facing, byte* _
#if defined(USE_INTRINSICS)
idODSStreamedIndexedArray< idDrawVert, triIndex_t, 32, SBT_QUAD, 4* 3 > indexedVertsODS( verts, numVerts, indexes, numIndexes );
idODSStreamedIndexedArray< idDrawVert, triIndex_t, 32, SBT_QUAD, 4 * 3 > indexedVertsODS( verts, numVerts, indexes, numIndexes );
const __m128 lightOriginX = _mm_splat_ps( _mm_load_ss( &lightOrigin.x ), 0 );
const __m128 lightOriginY = _mm_splat_ps( _mm_load_ss( &lightOrigin.y ), 0 );
@ -465,7 +465,7 @@ static int CalculateTriangleFacingCulledSkinned( byte* __restrict facing, byte*
}
}
idODSStreamedArray< triIndex_t, 256, SBT_QUAD, 4* 3 > indexesODS( indexes, numIndexes );
idODSStreamedArray< triIndex_t, 256, SBT_QUAD, 4 * 3 > indexesODS( indexes, numIndexes );
const __m128 lightOriginX = _mm_splat_ps( _mm_load_ss( &lightOrigin.x ), 0 );
const __m128 lightOriginY = _mm_splat_ps( _mm_load_ss( &lightOrigin.y ), 0 );
@ -973,10 +973,10 @@ static void R_CreateShadowVolumeTriangles( triIndex_t* __restrict shadowIndices,
WriteIndexPair( shadowIndexPtr + 4, v1 ^ f1, v2 ^ 1 );
#else
shadowIndexPtr[0] == v1;
shadowIndexPtr[1] == v2 ^ f1;
shadowIndexPtr[2] == v2 ^ f2;
shadowIndexPtr[3] == v1 ^ f2;
shadowIndexPtr[4] == v1 ^ f1;
shadowIndexPtr[1] == v2^ f1;
shadowIndexPtr[2] == v2^ f2;
shadowIndexPtr[3] == v1^ f2;
shadowIndexPtr[4] == v1^ f1;
shadowIndexPtr[5] == v2 ^ 1;
#endif
shadowIndexPtr += 6;

View file

@ -328,7 +328,7 @@ void RB_ShowOverdraw()
{
const idMaterial* material;
int i;
drawSurf_t * * drawSurfs;
drawSurf_t** drawSurfs;
const drawSurf_t* surf;
int numDrawSurfs;
viewLight_t* vLight;

View file

@ -268,7 +268,7 @@ static void R_AddSingleLight( viewLight_t* vLight )
vLight->entityInteractionState = ( byte* )R_ClearedFrameAlloc( light->world->entityDefs.Num() * sizeof( vLight->entityInteractionState[0] ), FRAME_ALLOC_INTERACTION_STATE );
const bool lightCastsShadows = light->LightCastsShadows();
idInteraction * * const interactionTableRow = light->world->interactionTable + light->index * light->world->interactionTableWidth;
idInteraction** const interactionTableRow = light->world->interactionTable + light->index * light->world->interactionTableWidth;
for( areaReference_t* lref = light->references; lref != NULL; lref = lref->ownerNext )
{

View file

@ -100,9 +100,9 @@ private:
//int vuMeterPeakTimes[ 8 ];
// Can't stop and start a voice on the same frame, so we have to double this to handle the worst case scenario of stopping all voices and starting a full new set
idStaticList<idSoundVoice_OpenAL, MAX_HARDWARE_VOICES* 2 > voices;
idStaticList<idSoundVoice_OpenAL*, MAX_HARDWARE_VOICES* 2 > zombieVoices;
idStaticList<idSoundVoice_OpenAL*, MAX_HARDWARE_VOICES* 2 > freeVoices;
idStaticList<idSoundVoice_OpenAL, MAX_HARDWARE_VOICES * 2 > voices;
idStaticList<idSoundVoice_OpenAL*, MAX_HARDWARE_VOICES * 2 > zombieVoices;
idStaticList<idSoundVoice_OpenAL*, MAX_HARDWARE_VOICES * 2 > freeVoices;
};
/*

View file

@ -110,9 +110,9 @@ private:
int vuMeterPeakTimes[ 8 ];
// Can't stop and start a voice on the same frame, so we have to double this to handle the worst case scenario of stopping all voices and starting a full new set
idStaticList<idSoundVoice_XAudio2, MAX_HARDWARE_VOICES* 2 > voices;
idStaticList<idSoundVoice_XAudio2*, MAX_HARDWARE_VOICES* 2 > zombieVoices;
idStaticList<idSoundVoice_XAudio2*, MAX_HARDWARE_VOICES* 2 > freeVoices;
idStaticList<idSoundVoice_XAudio2, MAX_HARDWARE_VOICES * 2 > voices;
idStaticList<idSoundVoice_XAudio2*, MAX_HARDWARE_VOICES * 2 > zombieVoices;
idStaticList<idSoundVoice_XAudio2*, MAX_HARDWARE_VOICES * 2 > freeVoices;
};
/*

View file

@ -188,7 +188,7 @@ void ( APIENTRY* qglGetMaterialiv )( GLenum face, GLenum pname, GLint* params );
void ( APIENTRY* qglGetPixelMapfv )( GLenum map, GLfloat* values );
void ( APIENTRY* qglGetPixelMapuiv )( GLenum map, GLuint* values );
void ( APIENTRY* qglGetPixelMapusv )( GLenum map, GLushort* values );
void ( APIENTRY* qglGetPointerv )( GLenum pname, GLvoid* *params );
void ( APIENTRY* qglGetPointerv )( GLenum pname, GLvoid** params );
void ( APIENTRY* qglGetPolygonStipple )( GLubyte* mask );
const GLubyte* ( APIENTRY* qglGetString )( GLenum name );
void ( APIENTRY* qglGetTexEnvfv )( GLenum target, GLenum pname, GLfloat* params );
@ -527,7 +527,7 @@ static void ( APIENTRY* dllGetMaterialiv )( GLenum face, GLenum pname, GLint* pa
static void ( APIENTRY* dllGetPixelMapfv )( GLenum map, GLfloat* values );
static void ( APIENTRY* dllGetPixelMapuiv )( GLenum map, GLuint* values );
static void ( APIENTRY* dllGetPixelMapusv )( GLenum map, GLushort* values );
static void ( APIENTRY* dllGetPointerv )( GLenum pname, GLvoid* *params );
static void ( APIENTRY* dllGetPointerv )( GLenum pname, GLvoid** params );
static void ( APIENTRY* dllGetPolygonStipple )( GLubyte* mask );
const GLubyte* ( APIENTRY* dllGetString )( GLenum name );
static void ( APIENTRY* dllGetTexEnvfv )( GLenum target, GLenum pname, GLfloat* params );

View file

@ -139,8 +139,8 @@ protected:
void RemoveMachine( int machineIndex, int lobbyType );
void UpdateRegisteredTalkers();
idStaticList< talker_t, MAX_PLAYERS* 2 > talkers; // * 2 to account for handling both session types
idStaticList< remoteMachine_t, MAX_PLAYERS* 2 > remoteMachines; // * 2 to account for handling both session types
idStaticList< talker_t, MAX_PLAYERS * 2 > talkers; // * 2 to account for handling both session types
idStaticList< remoteMachine_t, MAX_PLAYERS * 2 > remoteMachines; // * 2 to account for handling both session types
int activeLobbyType;
int activeGroupIndex;

View file

@ -187,7 +187,7 @@ void ( APIENTRY* qglGetMaterialiv )( GLenum face, GLenum pname, GLint* params );
void ( APIENTRY* qglGetPixelMapfv )( GLenum map, GLfloat* values );
void ( APIENTRY* qglGetPixelMapuiv )( GLenum map, GLuint* values );
void ( APIENTRY* qglGetPixelMapusv )( GLenum map, GLushort* values );
void ( APIENTRY* qglGetPointerv )( GLenum pname, GLvoid* *params );
void ( APIENTRY* qglGetPointerv )( GLenum pname, GLvoid** params );
void ( APIENTRY* qglGetPolygonStipple )( GLubyte* mask );
const GLubyte* ( APIENTRY* qglGetString )( GLenum name );
void ( APIENTRY* qglGetTexEnvfv )( GLenum target, GLenum pname, GLfloat* params );
@ -528,7 +528,7 @@ static void ( APIENTRY* dllGetMaterialiv )( GLenum face, GLenum pname, GLint* pa
static void ( APIENTRY* dllGetPixelMapfv )( GLenum map, GLfloat* values );
static void ( APIENTRY* dllGetPixelMapuiv )( GLenum map, GLuint* values );
static void ( APIENTRY* dllGetPixelMapusv )( GLenum map, GLushort* values );
static void ( APIENTRY* dllGetPointerv )( GLenum pname, GLvoid* *params );
static void ( APIENTRY* dllGetPointerv )( GLenum pname, GLvoid** params );
static void ( APIENTRY* dllGetPolygonStipple )( GLubyte* mask );
const GLubyte* ( APIENTRY* dllGetString )( GLenum name );
static void ( APIENTRY* dllGetTexEnvfv )( GLenum target, GLenum pname, GLfloat* params );