Skip to content

Commit

Permalink
Removed trailing whitespace (sources)
Browse files Browse the repository at this point in the history
Signed-off-by: Haru <haru@dotalux.com>
  • Loading branch information
MishimaHaruna committed May 13, 2014
1 parent c030940 commit 5d67f33
Show file tree
Hide file tree
Showing 71 changed files with 1,147 additions and 1,143 deletions.
12 changes: 6 additions & 6 deletions src/char/char.c
Expand Up @@ -797,7 +797,7 @@ int memitemdata_to_sql(const struct item items[], int max, int id, int tableswit
StrBuf->Printf(&buf, "UPDATE `%s` SET `amount`='%d', `equip`='%d', `identify`='%d', `refine`='%d',`attribute`='%d', `expire_time`='%u', `bound`='%d'",
tablename, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].bound);
for( j = 0; j < MAX_SLOTS; ++j )for( j = 0; j < MAX_SLOTS; ++j )
StrBuf->Printf(&buf, ", `card%d`=%d", j, items[i].card[j]);
StrBuf->Printf(&buf, ", `card%d`=%d", j, items[i].card[j]);
StrBuf->Printf(&buf, " WHERE `id`='%d' LIMIT 1", item.id);

if( SQL_ERROR == SQL->QueryStr(sql_handle, StrBuf->Value(&buf)) )
Expand Down Expand Up @@ -1674,7 +1674,7 @@ int make_new_char_sql(struct char_session_data* sd, char* name_, int str, int ag
{
if( SQL_ERROR == SQL->Query(sql_handle,
"INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `identify`) VALUES ('%d', '%d', '%d', '%d')",
inventory_db, char_id, start_items[k], 1, 1)
inventory_db, char_id, start_items[k], 1, 1)
)
Sql_ShowDebug(sql_handle);
}
Expand Down Expand Up @@ -2048,7 +2048,7 @@ int mmo_char_send006b(int fd, struct char_session_data* sd)
int j, offset = 0;
#if PACKETVER >= 20100413
offset += 3;
#endif
#endif
if (save_log)
ShowInfo("Loading Char Data ("CL_BOLD"%d"CL_RESET")\n",sd->account_id);

Expand Down Expand Up @@ -3978,7 +3978,7 @@ static void char_delete2_req(int fd, struct char_session_data* sd)
// see issue: 7338
if( char_aegis_delete )
{
if( SQL_SUCCESS != SQL->Query(sql_handle, "SELECT `party_id`, `guild_id` FROM `%s` WHERE `char_id`='%d'", char_db, char_id)
if( SQL_SUCCESS != SQL->Query(sql_handle, "SELECT `party_id`, `guild_id` FROM `%s` WHERE `char_id`='%d'", char_db, char_id)
|| SQL_SUCCESS != SQL->NextRow(sql_handle)
)
{
Expand Down Expand Up @@ -4268,7 +4268,7 @@ int parse_char(int fd)

#if PACKETVER >= 20110309
if( *pincode->enabled ){ // hack check
struct online_char_data* character;
struct online_char_data* character;
character = (struct online_char_data*)idb_get(online_char_db, sd->account_id);
if( character && character->pincode_enable == -1){
WFIFOHEAD(fd,3);
Expand Down Expand Up @@ -4508,7 +4508,7 @@ int parse_char(int fd)
int i;
#if PACKETVER >= 20110309
if( *pincode->enabled ){ // hack check
struct online_char_data* character;
struct online_char_data* character;
character = (struct online_char_data*)idb_get(online_char_db, sd->account_id);
if( character && character->pincode_enable == -1 ){
WFIFOHEAD(fd,3);
Expand Down
2 changes: 1 addition & 1 deletion src/char/int_auction.c
Expand Up @@ -268,7 +268,7 @@ static void mapif_parse_Auction_requestlist(int fd)

for( auction = dbi_first(iter); dbi_exists(iter); auction = dbi_next(iter) )
{
if( (type == 0 && auction->type != IT_ARMOR && auction->type != IT_PETARMOR) ||
if( (type == 0 && auction->type != IT_ARMOR && auction->type != IT_PETARMOR) ||
(type == 1 && auction->type != IT_WEAPON) ||
(type == 2 && auction->type != IT_CARD) ||
(type == 3 && auction->type != IT_ETC) ||
Expand Down
6 changes: 3 additions & 3 deletions src/char/int_party.c
Expand Up @@ -652,7 +652,7 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id
if (p == NULL)
return 0;

for(i = 0; i < MAX_PARTY &&
for(i = 0; i < MAX_PARTY &&
(p->party.member[i].account_id != account_id ||
p->party.member[i].char_id != char_id); i++);

Expand All @@ -666,7 +666,7 @@ int mapif_parse_PartyChangeMap(int fd, int party_id, int account_id, int char_id
else
p->party.count--;
// Even share check situations: Family state (always breaks)
// character logging on/off is max/min level (update level range)
// character logging on/off is max/min level (update level range)
// or character logging on/off has a different level (update level range using new level)
if (p->family ||
(p->party.member[i].lv <= p->min_lv || p->party.member[i].lv >= p->max_lv) ||
Expand Down Expand Up @@ -731,7 +731,7 @@ int mapif_parse_PartyLeaderChange(int fd,int party_id,int account_id,int char_id

for (i = 0; i < MAX_PARTY; i++)
{
if(p->party.member[i].leader)
if(p->party.member[i].leader)
p->party.member[i].leader = 0;
if(p->party.member[i].account_id == account_id &&
p->party.member[i].char_id == char_id)
Expand Down
2 changes: 1 addition & 1 deletion src/char/int_party.h
Expand Up @@ -6,7 +6,7 @@

//Party Flags on what to save/delete.
enum {
PS_CREATE = 0x01, //Create a new party entry (index holds leader's info)
PS_CREATE = 0x01, //Create a new party entry (index holds leader's info)
PS_BASIC = 0x02, //Update basic party info.
PS_LEADER = 0x04, //Update party's leader
PS_ADDMEMBER = 0x08, //Specify new party member (index specifies which party member)
Expand Down
4 changes: 2 additions & 2 deletions src/common/HPM.c
Expand Up @@ -505,7 +505,7 @@ bool hplugins_addpacket(unsigned short cmd, short length,void (*receive) (int fd

return true;
}
/*
/*
0 = unknown
1 = OK
2 = incomplete
Expand Down Expand Up @@ -635,7 +635,7 @@ bool hpm_add_arg(unsigned int pluginID, char *name, bool has_param, void (*func)

CREATE(data, struct HPMArgData, 1);

data->pluginID = pluginID;
data->pluginID = pluginID;
data->name = aStrdup(name);
data->func = func;
data->help = help;
Expand Down
8 changes: 4 additions & 4 deletions src/common/atomic.h
Expand Up @@ -4,16 +4,16 @@
#ifndef _COMMON_ATOMIC_H_
#define _COMMON_ATOMIC_H_

// Atomic Operations
// Atomic Operations
// (Interlocked CompareExchange, Add .. and so on ..)
//
//
// Implementation varies / depends on:
// - Architecture
// - Compiler
// - Operating System
//
// our Abstraction is fully API-Compatible to Microsofts implementation @ NT5.0+
//
//
#include "../common/cbasetypes.h"

#if defined(_MSC_VER)
Expand All @@ -36,7 +36,7 @@ forceinline int64 InterlockedCompareExchange64(volatile int64 *dest, int64 exch,
mov ecx,4[edi];
mov esi,dest;

lock CMPXCHG8B [esi];
lock CMPXCHG8B [esi];
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/common/cbasetypes.h
Expand Up @@ -313,7 +313,7 @@ typedef char bool;
#undef swap
#endif
// hmm only ints?
//#define swap(a,b) { int temp=a; a=b; b=temp;}
//#define swap(a,b) { int temp=a; a=b; b=temp;}
// if using macros then something that is type independent
//#define swap(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b)))
// Avoid "value computed is not used" warning and generates the same assembly code
Expand Down
28 changes: 14 additions & 14 deletions src/common/db.c
Expand Up @@ -94,7 +94,7 @@
\*****************************************************************************/

/**
* If defined statistics about database nodes, database creating/destruction
* If defined statistics about database nodes, database creating/destruction
* and function usage are keept and displayed when finalizing the database
* system.
* WARNING: This adds overhead to every database operation (not shure how much).
Expand Down Expand Up @@ -522,7 +522,7 @@ static void db_rebalance_erase(DBNode node, DBNode *root)
x_parent = y->parent;
if (x) x->parent = y->parent;
y->parent->left = x;
// put the right of 'node' in 'y'
// put the right of 'node' in 'y'
y->right = node->right;
node->right->parent = y;
// 'y' is a direct child of 'node'
Expand Down Expand Up @@ -1409,7 +1409,7 @@ DBData* dbit_obj_prev(DBIterator* self, DBKey* out_key)

/**
* Returns true if the fetched entry exists.
* The databases entries might have NULL data, so use this to to test if
* The databases entries might have NULL data, so use this to to test if
* the iterator is done.
* @param self Iterator
* @return true if the entry exists
Expand All @@ -1426,7 +1426,7 @@ bool dbit_obj_exists(DBIterator* self)

/**
* Removes the current entry from the database.
* NOTE: {@link DBIterator#exists} will return false until another entry
* NOTE: {@link DBIterator#exists} will return false until another entry
* is fetched
* Puts data of the removed entry in out_data, if out_data is not NULL.
* @param self Iterator
Expand Down Expand Up @@ -1477,7 +1477,7 @@ void dbit_obj_destroy(DBIterator* self)
/**
* Returns a new iterator for this database.
* The iterator keeps the database locked until it is destroyed.
* The database will keep functioning normally but will only free internal
* The database will keep functioning normally but will only free internal
* memory when unlocked, so destroy the iterator as soon as possible.
* @param self Database
* @return New iterator
Expand Down Expand Up @@ -1615,7 +1615,7 @@ static DBData* db_obj_get(DBMap* self, DBKey key)
* It puts a maximum of <code>max</code> entries into <code>buf</code>.
* If <code>buf</code> is NULL, it only counts the matches.
* Returns the number of entries that matched.
* NOTE: if the value returned is greater than <code>max</code>, only the
* NOTE: if the value returned is greater than <code>max</code>, only the
* first <code>max</code> entries found are put into the buffer.
* @param self Interface of the database
* @param buf Buffer to put the data of the matched entries
Expand Down Expand Up @@ -1686,7 +1686,7 @@ static unsigned int db_obj_vgetall(DBMap* self, DBData **buf, unsigned int max,
* It puts a maximum of <code>max</code> entries into <code>buf</code>.
* If <code>buf</code> is NULL, it only counts the matches.
* Returns the number of entries that matched.
* NOTE: if the value returned is greater than <code>max</code>, only the
* NOTE: if the value returned is greater than <code>max</code>, only the
* first <code>max</code> entries found are put into the buffer.
* @param self Interface of the database
* @param buf Buffer to put the data of the matched entries
Expand Down Expand Up @@ -1714,7 +1714,7 @@ static unsigned int db_obj_getall(DBMap* self, DBData **buf, unsigned int max, D

/**
* Get the data of the entry identified by the key.
* If the entry does not exist, an entry is added with the data returned by
* If the entry does not exist, an entry is added with the data returned by
* <code>create</code>.
* @param self Interface of the database
* @param key Key that identifies the entry
Expand Down Expand Up @@ -1813,7 +1813,7 @@ static DBData* db_obj_vensure(DBMap* self, DBKey key, DBCreateData create, va_li
/**
* Just calls {@link DBMap#vensure}.
* Get the data of the entry identified by the key.
* If the entry does not exist, an entry is added with the data returned by
* If the entry does not exist, an entry is added with the data returned by
* <code>create</code>.
* @param self Interface of the database
* @param key Key that identifies the entry
Expand Down Expand Up @@ -2163,7 +2163,7 @@ static int db_obj_vclear(DBMap* self, DBApply func, va_list args)
* Before deleting an entry, func is applied to it.
* Releases the key and the data.
* Returns the sum of values returned by func, if it exists.
* NOTE: This locks the database globally. Any attempt to insert or remove
* NOTE: This locks the database globally. Any attempt to insert or remove
* a database entry will give an error and be aborted (except for clearing).
* @param self Interface of the database
* @param func Function to be applied to every entry before deleting
Expand Down Expand Up @@ -2191,7 +2191,7 @@ static int db_obj_clear(DBMap* self, DBApply func, ...)
* Finalize the database, feeing all the memory it uses.
* Before deleting an entry, func is applied to it.
* Returns the sum of values returned by func, if it exists.
* NOTE: This locks the database globally. Any attempt to insert or remove
* NOTE: This locks the database globally. Any attempt to insert or remove
* a database entry will give an error and be aborted (except for clearing).
* @param self Interface of the database
* @param func Function to be applied to every entry before deleting
Expand Down Expand Up @@ -2246,7 +2246,7 @@ static int db_obj_vdestroy(DBMap* self, DBApply func, va_list args)
* Before deleting an entry, func is applied to it.
* Releases the key and the data.
* Returns the sum of values returned by func, if it exists.
* NOTE: This locks the database globally. Any attempt to insert or remove
* NOTE: This locks the database globally. Any attempt to insert or remove
* a database entry will give an error and be aborted.
* @param self Database
* @param func Function to be applied to every entry before deleting
Expand Down Expand Up @@ -2448,7 +2448,7 @@ DBHasher db_default_hash(DBType type)
}

/**
* Returns the default releaser for the specified type of database with the
* Returns the default releaser for the specified type of database with the
* specified options.
* NOTE: the options are fixed with {@link #db_fix_options(DBType,DBOptions)}
* before choosing the releaser.
Expand Down Expand Up @@ -2509,7 +2509,7 @@ DBReleaser db_custom_release(DBRelease which)
* @param line Line of the file where the database is being allocated
* @param type Type of database
* @param options Options of the database
* @param maxlen Maximum length of the string to be used as key in string
* @param maxlen Maximum length of the string to be used as key in string
* databases. If 0, the maximum number of maxlen is used (64K).
* @return The interface of the database
* @public
Expand Down

0 comments on commit 5d67f33

Please sign in to comment.