Permalink
Browse files

Remove trailing spaces in src/

  • Loading branch information...
1 parent 0c2a2a5 commit 9a27e7ab6ace31abc40ad5f04740953a94c7b7bb @Deiz Deiz committed May 5, 2011
View
@@ -1210,7 +1210,7 @@ static Task* ai_createTask( lua_State *L, int subtask )
lv = lua_tovector(L,2);
vectcpy( &t->dat.vec, &lv->vec );
}
- else
+ else
NLUA_INVALID_PARAMETER(L);
}
@@ -1463,7 +1463,7 @@ static int aiL_getnearestpilot( lua_State *L )
{
dist = vect_dist(&pilot_stack[i]->solid->pos, &cur_pilot->solid->pos);
candidate_id = i;
- }
+ }
}
@@ -1476,7 +1476,7 @@ static int aiL_getnearestpilot( lua_State *L )
/* Actually found a pilot. */
lua_pushnumber(L, pilot_stack[candidate_id]->id );
return 1;
-}
+}
/*
@@ -1644,12 +1644,12 @@ static int aiL_getflybydistance( lua_State *L )
/* pilot id as parameter */
else if (lua_isnumber(L,1)) {
pilot = pilot_get( (unsigned int) lua_tonumber(L,1) );
- if (pilot==NULL) {
+ if (pilot==NULL) {
NLUA_ERROR(L, "Pilot ID does not belong to a pilot.");
return 0;
}
v = &pilot->solid->pos;
-
+
/*vect_cset(&v, VX(pilot->solid->pos) - VX(cur_pilot->solid->pos), VY(pilot->solid->pos) - VY(cur_pilot->solid->pos) );*/
}
else {
@@ -2087,7 +2087,7 @@ static int aiL_face( lua_State *L )
lv = lua_tovector(L,1);
tv = &lv->vec;
}
- else
+ else
NLUA_INVALID_PARAMETER(L);
/* Default gain. */
@@ -2245,7 +2245,7 @@ static int aiL_iface( lua_State *L )
if (d >= 0.) {
id = (unsigned int)d;
p = pilot_get(id);
- if (p==NULL) {
+ if (p==NULL) {
NLUA_ERROR(L, "Pilot ID does not belong to a pilot.");
return 0;
}
@@ -2283,7 +2283,7 @@ static int aiL_iface( lua_State *L )
number will give a more dramatic 'lead' */
speedmap = -1*copysign(1 - 1 / (fabs(drift_azimuthal/200) + 1), drift_azimuthal) * M_PI_2;
diff = angle_diff(heading_offset_azimuth, speedmap);
- azimuthal_sign = -1;
+ azimuthal_sign = -1;
/* This indicates we're drifting to the right of the target
* And we need to turn CCW */
@@ -2302,7 +2302,7 @@ static int aiL_iface( lua_State *L )
else {
/* signal that we're not in a productive direction for thrusting */
diff = M_PI;
- azimuthal_sign = 1;
+ azimuthal_sign = 1;
if(heading_offset_azimuth >0)
@@ -2322,7 +2322,7 @@ static int aiL_iface( lua_State *L )
* @luaparam p Position or id of pilot to compare facing to
* @luareturn The facing offset to the target (in degrees).
* @luafunc dir( p )
- *
+ *
*/
static int aiL_dir( lua_State *L )
{
@@ -2344,7 +2344,7 @@ static int aiL_dir( lua_State *L )
else {
id = (unsigned int)d;
p = pilot_get(id);
- if (p==NULL) {
+ if (p==NULL) {
NLUA_ERROR(L, "Pilot ID does not belong to a pilot.");
return 0;
}
@@ -2370,7 +2370,7 @@ static int aiL_dir( lua_State *L )
(n==-1) ? VANGLE(sv) :
vect_angle(&sv, &tv));
else /* target is static */
- diff = angle_diff( cur_pilot->solid->dir,
+ diff = angle_diff( cur_pilot->solid->dir,
(n==-1) ? VANGLE(cur_pilot->solid->pos) :
vect_angle(&cur_pilot->solid->pos, &lv->vec));
@@ -2406,7 +2406,7 @@ static int aiL_idir( lua_State *L )
if (d >= 0.) {
id = (unsigned int)d;
p = pilot_get(id);
- if (p==NULL) {
+ if (p==NULL) {
NLUA_ERROR(L, "Pilot ID does not belong to a pilot.");
return 0;
}
@@ -3091,7 +3091,7 @@ static int aiL_getweaprange( lua_State *L )
int id;
int level;
- id = cur_pilot->active_set;
+ id = cur_pilot->active_set;
level = -1;
if (lua_isnumber(L,1))
id = luaL_checkint(L,1);
@@ -3137,7 +3137,7 @@ static int aiL_canboard( lua_State *L )
/**
* @brief lua wrapper: Gets the relative size(shipmass) between the current pilot and the specified target
*
- * @param pilot_ID the ID of the pilot whose mass we will compare
+ * @param pilot_ID the ID of the pilot whose mass we will compare
* @luareturn A number from 0 to 1 mapping the relative masses
* luafunc relsize()
*/
@@ -3155,15 +3155,15 @@ static int aiL_relsize( lua_State *L )
}
lua_pushnumber(L, pilot_relsize(cur_pilot, p));
-
+
return 1;
}
/**
* @brief Gets the relative damage output(total DPS) between the current pilot and the specified target
*
- * @param pilot_ID the ID of the pilot whose DPS we will compare
+ * @param pilot_ID the ID of the pilot whose DPS we will compare
* @luareturn A number from 0 to 1 mapping the relative DPS's
* luafunc reldps()
*/
@@ -3181,15 +3181,15 @@ static int aiL_reldps( lua_State *L )
}
lua_pushnumber(L, pilot_reldps(cur_pilot, p));
-
+
return 1;
}
/**
* @brief Gets the relative HP(total shields and armor) between the current pilot and the specified target
*
- * @param pilot_ID the ID of the pilot whose HP we will compare
+ * @param pilot_ID the ID of the pilot whose HP we will compare
* @luareturn A number from 0 to 1 mapping the relative HPs
* relhp()
*/
@@ -3206,7 +3206,7 @@ static int aiL_relhp( lua_State *L )
}
lua_pushnumber(L, pilot_relhp(cur_pilot, p));
-
+
return 1;
}
View
@@ -105,9 +105,9 @@ int comm_openPilot( unsigned int pilot )
/* Make sure pilot exists. */
if (comm_pilot == NULL)
return -1;
-
+
/* Make sure pilot in range. */
- if (!pilot_isFlag(p, PILOT_HAILING) &&
+ if (!pilot_isFlag(p, PILOT_HAILING) &&
pilot_inRangePilot( player.p, comm_pilot ) <= 0) {
player_message("\erTarget is out of communications range.");
comm_pilot = NULL;
View
@@ -303,7 +303,7 @@ int dialogue_YesNoRaw( const char* caption, const char *msg )
static void dialogue_YesNoClose( unsigned int wid, char* str )
{
int *loop_done, result;
-
+
/* store the result */
if (strcmp(str,"btnYes")==0)
result = 1;
View
@@ -147,7 +147,7 @@ int hook_load( xmlNodePtr parent );
static Mission *hook_getMission( Hook *hook );
-/**
+/**
* Adds a hook to the queue.
*/
static int hq_add( HookQueue_t *hq )
View
@@ -291,7 +291,7 @@ static void intro_event_handler( int *stop, double *offset, double *vel )
/* Speed up the text. */
else if (event.key.keysym.sym == SDLK_DOWN) {
*vel += 8.0;
- if (*vel > 100.0)
+ if (*vel > 100.0)
*vel = 100.0;
}
View
@@ -300,7 +300,7 @@ void ovr_render( double dt )
gl_renderCross( x, y, 5., &cRadar_hilight );
gl_printRaw( &gl_smallFont, x+10., y-gl_smallFont.h/2., &cRadar_hilight, "GOTO" );
}
-
+
/* Render the player. */
gui_renderPlayer( res, 1 );
View
@@ -192,7 +192,7 @@ int nfile_fileExists( const char* path, ... )
return 1;
}
*/
-
+
return 0;
}
View
@@ -119,7 +119,7 @@ static int bkgL_image( lua_State *L )
lc = NULL;
foreground = lua_toboolean(L,6);
}
-
+
/* Create image. */
id = background_addImage( lt->tex, x, y, move, scale, (lc!=NULL) ? &lc->col : &cWhite, foreground );
lua_pushnumber(L,id);
View
@@ -95,7 +95,7 @@ static int camL_set( lua_State *L )
speed = luaL_checkinteger(L,3);
else
speed = 2500;
-
+
/* Set the camera. */
if (lp != NULL) {
p = pilot_get( lp->pilot );
View
@@ -276,7 +276,7 @@ static int commodityL_priceAt( lua_State *L )
Planet *p;
StarSystem *sys;
char *sysname;
-
+
c = luaL_validcommodity(L,1);
p = luaL_validplanet(L,2);
sysname = planet_getSystem( p->name );
View
@@ -304,7 +304,7 @@ static int planetL_get( lua_State *L )
planets = space_getFactionPlanet( &nplanets, factions, nfactions );
free(factions);
}
- else
+ else
NLUA_INVALID_PARAMETER(L); /* Bad Parameter */
/* No suitable planet found */
@@ -329,7 +329,7 @@ static int planetL_get( lua_State *L )
}
sys = system_get( sysname );
if (sys == NULL) {
- NLUA_ERROR(L, "Planet '%s' can't find system '%s'", rndplanet, sysname);
+ NLUA_ERROR(L, "Planet '%s' can't find system '%s'", rndplanet, sysname);
return 0;
}
planet.id = planet_index( pnt );
View
@@ -609,7 +609,7 @@ static int playerL_cinematics( lua_State *L )
if (f_gui)
player_setFlag( PLAYER_CINEMATICS_GUI );
-
+
if (f_2x)
player_setFlag( PLAYER_CINEMATICS_2X );
}
@@ -678,7 +678,7 @@ static int playerL_allowLand( lua_State *L )
{
int b;
const char *str;
-
+
str = NULL;
if (lua_gettop(L) > 0) {
b = lua_toboolean(L,1);
View
@@ -704,7 +704,7 @@ static int systemL_setknown( lua_State *L )
{
int b;
StarSystem *sys;
-
+
sys = luaL_validsystem(L, 1);
b = lua_toboolean(L, 2);
@@ -772,7 +772,7 @@ static int systemL_mrkRm( lua_State *L )
{
unsigned int id;
id = luaL_checklong( L, 1 );
- ovr_mrkRm( id );
+ ovr_mrkRm( id );
return 0;
}
View
@@ -241,7 +241,7 @@ static int texL_sprites( lua_State *L )
/**
* @brief Gets the sprite that corresponds to a direction.
*
- * @usage sx, sy = t:spriteFromdir( math.pi )
+ * @usage sx, sy = t:spriteFromdir( math.pi )
*
* @luaparam t Texture to get sprite of.
* @luaparam a Direction to have sprite facing (in radians).
View
@@ -71,14 +71,14 @@ const char *nstrcasestr( const char *haystack, const char *needle )
return strcasestr( haystack, needle );
#else /* HAS_POSIX */
size_t hay_len, needle_len;
-
+
/* Get lengths. */
hay_len = strlen(haystack);
needle_len = strlen(needle);
/* Slow search. */
while (hay_len >= needle_len) {
- if (strncasecmp(haystack, needle, needle_len) == 0)
+ if (strncasecmp(haystack, needle, needle_len) == 0)
return haystack;
haystack++;
View
@@ -25,7 +25,7 @@
*
* Acronyms:
* - UST : Universal Synchronized Time
- * - STU : Smallest named time unit. Equal to the Earth second.
+ * - STU : Smallest named time unit. Equal to the Earth second.
* - STP : Most commonly used time unit. STPs are the new hours. 1 STP = 10,000 STU (about 2.8 Earth hours).
* - SCU : Used for long-term time periods. 1 SCU = 5000 STP (about 579 Earth days).
*/
View
@@ -41,7 +41,7 @@
/* get data different ways */
#define xml_raw(n) ((char*)(n)->children->content)
#define xml_get(n) (((n)->children == NULL) ? NULL : (char*)(n)->children->content)
-#define xml_getInt(n) ((xml_get(n) == NULL) ? 0 : strtol( xml_raw(n), (char**)NULL, 10))
+#define xml_getInt(n) ((xml_get(n) == NULL) ? 0 : strtol( xml_raw(n), (char**)NULL, 10))
#define xml_getUInt(n) ((xml_get(n) == NULL) ? 0 : strtoul( xml_raw(n), (char**)NULL, 10))
#define xml_getLong(n) ((xml_get(n) == NULL) ? 0 : strtoll( xml_raw(n), (char**)NULL, 10))
#define xml_getULong(n) ((xml_get(n) == NULL) ? 0 : strtoull(xml_raw(n), (char**)NULL, 10))
View
@@ -79,7 +79,7 @@ static int nxml_persistDataNode( lua_State *L, xmlTextWriterPtr writer, int inta
/* Default values. */
ret = 0;
-
+
/* We recieve data in the format of: key, value */
/* key, value */
View
@@ -717,7 +717,7 @@ void gl_viewport( int x, int y, int w, int h )
gl_screen.nh, /* Top edge. */
-1., /* near */
1. ); /* far */
-
+
/* Take into accunt possible translation. */
gl_screen.x = x;
gl_screen.y = y;
View
@@ -1100,7 +1100,7 @@ static glTexture *gl_genCircle( int radius )
/* Return texture. */
snprintf( name, sizeof(name), "gencircle%d", radius );
- return gl_loadImagePad( name, sur, OPENGL_TEX_MIPMAPS, sur->w, sur->h, 1, 1, 1 );
+ return gl_loadImagePad( name, sur, OPENGL_TEX_MIPMAPS, sur->w, sur->h, 1, 1, 1 );
}
View
@@ -600,7 +600,7 @@ static int noise_genNebulaMap_thread( void *data )
/* Generate the layer. */
max = 0;
f[2] = args->zoom * (float)args->z / (float)args->n;
-
+
for (y=0; y<args->h; y++) {
f[1] = args->zoom * (float)y / (float)args->h;
Oops, something went wrong.

0 comments on commit 9a27e7a

Please sign in to comment.