summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-07-10 16:59:55 +0200
committerHaru <haru@dotalux.com>2014-07-11 08:47:27 +0200
commit68e7f53f05dd80e8b4ab9d84c9931df22a6b060c (patch)
tree5b3d0f0b2f7aad19735b16c8a443a9534d0f5224
parent8b4f35532c8fd7c7f0939756923fdaf14ee39531 (diff)
downloadhercules-68e7f53f05dd80e8b4ab9d84c9931df22a6b060c.tar.gz
hercules-68e7f53f05dd80e8b4ab9d84c9931df22a6b060c.tar.bz2
hercules-68e7f53f05dd80e8b4ab9d84c9931df22a6b060c.tar.xz
hercules-68e7f53f05dd80e8b4ab9d84c9931df22a6b060c.zip
Fixed reserved __identifier violations
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r--src/char/char.h6
-rw-r--r--src/char/int_auction.h6
-rw-r--r--src/char/int_elemental.h6
-rw-r--r--src/char/int_guild.h6
-rw-r--r--src/char/int_homun.h6
-rw-r--r--src/char/int_mail.h6
-rw-r--r--src/char/int_mercenary.h6
-rw-r--r--src/char/int_party.h6
-rw-r--r--src/char/int_pet.h6
-rw-r--r--src/char/int_quest.h6
-rw-r--r--src/char/int_storage.h6
-rw-r--r--src/char/inter.h6
-rw-r--r--src/char/pincode.h6
-rw-r--r--src/common/HPM.h6
-rw-r--r--src/common/HPMDataCheck.h144
-rw-r--r--src/common/HPMi.h6
-rw-r--r--src/common/atomic.h6
-rw-r--r--src/common/cbasetypes.h10
-rw-r--r--src/common/conf.h6
-rw-r--r--src/common/console.h6
-rw-r--r--src/common/core.h6
-rw-r--r--src/common/db.h6
-rw-r--r--src/common/des.h6
-rw-r--r--src/common/ers.h6
-rw-r--r--src/common/grfio.c2
-rw-r--r--src/common/grfio.h6
-rw-r--r--src/common/malloc.c33
-rw-r--r--src/common/malloc.h6
-rw-r--r--src/common/mapindex.h6
-rw-r--r--src/common/md5calc.h6
-rw-r--r--src/common/mmo.h6
-rw-r--r--src/common/mutex.h6
-rw-r--r--src/common/nullpo.h6
-rw-r--r--src/common/random.h6
-rw-r--r--src/common/showmsg.c30
-rw-r--r--src/common/showmsg.h8
-rw-r--r--src/common/socket.c12
-rw-r--r--src/common/socket.h10
-rw-r--r--src/common/spinlock.h6
-rw-r--r--src/common/sql.h6
-rw-r--r--src/common/strlib.c6
-rw-r--r--src/common/strlib.h14
-rw-r--r--src/common/sysinfo.h6
-rw-r--r--src/common/thread.c10
-rw-r--r--src/common/thread.h6
-rw-r--r--src/common/timer.c10
-rw-r--r--src/common/timer.h6
-rw-r--r--src/common/utils.h6
-rw-r--r--src/config/classes/general.h6
-rw-r--r--src/config/const.h6
-rw-r--r--src/config/core.h6
-rw-r--r--src/config/renewal.h6
-rw-r--r--src/config/secure.h6
-rw-r--r--src/login/account.h6
-rw-r--r--src/login/ipban.h6
-rw-r--r--src/login/login.h6
-rw-r--r--src/login/loginlog.h6
-rw-r--r--src/map/HPMmap.h6
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/atcommand.h6
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h6
-rw-r--r--src/map/battleground.h6
-rw-r--r--src/map/buyingstore.h6
-rw-r--r--src/map/chat.h6
-rw-r--r--src/map/chrif.h6
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/clif.h6
-rw-r--r--src/map/date.h6
-rw-r--r--src/map/duel.h6
-rw-r--r--src/map/elemental.h6
-rw-r--r--src/map/guild.c6
-rw-r--r--src/map/guild.h6
-rw-r--r--src/map/homunculus.h6
-rw-r--r--src/map/instance.h6
-rw-r--r--src/map/intif.c2
-rw-r--r--src/map/intif.h6
-rw-r--r--src/map/irc-bot.h6
-rw-r--r--src/map/itemdb.h6
-rw-r--r--src/map/log.h6
-rw-r--r--src/map/mail.h6
-rw-r--r--src/map/map.h10
-rw-r--r--src/map/mapreg.h6
-rw-r--r--src/map/mercenary.h6
-rw-r--r--src/map/mob.h6
-rw-r--r--src/map/npc.c2
-rw-r--r--src/map/npc.h6
-rw-r--r--src/map/packets.h6
-rw-r--r--src/map/packets_struct.h6
-rw-r--r--src/map/party.h6
-rw-r--r--src/map/path.h6
-rw-r--r--src/map/pc.c4
-rw-r--r--src/map/pc.h6
-rw-r--r--src/map/pc_groups.h6
-rw-r--r--src/map/pet.h6
-rw-r--r--src/map/quest.h6
-rw-r--r--src/map/script.c48
-rw-r--r--src/map/script.h6
-rw-r--r--src/map/searchstore.h6
-rw-r--r--src/map/skill.h6
-rw-r--r--src/map/status.h6
-rw-r--r--src/map/storage.c6
-rw-r--r--src/map/storage.h8
-rw-r--r--src/map/trade.h6
-rw-r--r--src/map/unit.h6
-rw-r--r--src/map/vending.h6
-rw-r--r--tools/HPMHookGen/HPMDataCheckGen.pl8
107 files changed, 441 insertions, 446 deletions
diff --git a/src/char/char.h b/src/char/char.h
index 09a78f6b9..5a70d2ca7 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_CHAR_H_
-#define _COMMON_CHAR_H_
+#ifndef COMMON_CHAR_H
+#define COMMON_CHAR_H
#include "../common/core.h" // CORE_ST_LAST
#include "../common/db.h"
@@ -123,4 +123,4 @@ void global_accreg_to_login_start (int account_id, int char_id);
void global_accreg_to_login_send (void);
void global_accreg_to_login_add (const char *key, unsigned int index, intptr_t val, bool is_string);
-#endif /* _COMMON_CHAR_H_ */
+#endif /* COMMON_CHAR_H */
diff --git a/src/char/int_auction.h b/src/char/int_auction.h
index f10794f73..17fd75a58 100644
--- a/src/char/int_auction.h
+++ b/src/char/int_auction.h
@@ -1,12 +1,12 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_AUCTION_H_
-#define _CHAR_INT_AUCTION_H_
+#ifndef CHAR_INT_AUCTION_H
+#define CHAR_INT_AUCTION_H
int inter_auction_parse_frommap(int fd);
int inter_auction_sql_init(void);
void inter_auction_sql_final(void);
-#endif /* _CHAR_INT_AUCTION_H_ */
+#endif /* CHAR_INT_AUCTION_H */
diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h
index c869e6fc2..e28cfedea 100644
--- a/src/char/int_elemental.h
+++ b/src/char/int_elemental.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_ELEMENTAL_H_
-#define _CHAR_INT_ELEMENTAL_H_
+#ifndef CHAR_INT_ELEMENTAL_H
+#define CHAR_INT_ELEMENTAL_H
#include "../common/cbasetypes.h"
@@ -12,4 +12,4 @@ int inter_elemental_parse_frommap(int fd);
bool mapif_elemental_delete(int ele_id);
-#endif /* _CHAR_INT_ELEMENTAL_H_ */
+#endif /* CHAR_INT_ELEMENTAL_H */
diff --git a/src/char/int_guild.h b/src/char/int_guild.h
index 5e657ff06..bc457d86b 100644
--- a/src/char/int_guild.h
+++ b/src/char/int_guild.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_GUILD_H_
-#define _CHAR_INT_GUILD_H_
+#ifndef CHAR_INT_GUILD_H
+#define CHAR_INT_GUILD_H
enum {
GS_BASIC = 0x0001,
@@ -31,4 +31,4 @@ int inter_guild_charname_changed(int guild_id,int account_id, int char_id, char
int inter_guild_CharOnline(int char_id, int guild_id);
int inter_guild_CharOffline(int char_id, int guild_id);
-#endif /* _CHAR_INT_GUILD_H_ */
+#endif /* CHAR_INT_GUILD_H */
diff --git a/src/char/int_homun.h b/src/char/int_homun.h
index 9477f4f03..6fa4f9dc7 100644
--- a/src/char/int_homun.h
+++ b/src/char/int_homun.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_HOMUN_H_
-#define _CHAR_INT_HOMUN_H_
+#ifndef CHAR_INT_HOMUN_H
+#define CHAR_INT_HOMUN_H
#include "../common/cbasetypes.h"
@@ -17,4 +17,4 @@ bool mapif_homunculus_load(int homun_id, struct s_homunculus* hd);
bool mapif_homunculus_delete(int homun_id);
bool mapif_homunculus_rename(char *name);
-#endif /* _CHAR_INT_HOMUN_H_ */
+#endif /* CHAR_INT_HOMUN_H */
diff --git a/src/char/int_mail.h b/src/char/int_mail.h
index 824ba48a3..8800061d7 100644
--- a/src/char/int_mail.h
+++ b/src/char/int_mail.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_MAIL_H_
-#define _CHAR_INT_MAIL_H_
+#ifndef CHAR_INT_MAIL_H
+#define CHAR_INT_MAIL_H
struct item;
struct mail_message;
@@ -16,4 +16,4 @@ void inter_mail_sql_final(void);
int mail_savemessage(struct mail_message* msg);
void mapif_Mail_new(struct mail_message *msg);
-#endif /* _CHAR_INT_MAIL_H_ */
+#endif /* CHAR_INT_MAIL_H */
diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h
index 195a83b34..b03c20de3 100644
--- a/src/char/int_mercenary.h
+++ b/src/char/int_mercenary.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_MERCENARY_H_
-#define _CHAR_INT_MERCENARY_H_
+#ifndef CHAR_INT_MERCENARY_H
+#define CHAR_INT_MERCENARY_H
#include "../common/cbasetypes.h"
@@ -19,4 +19,4 @@ bool mercenary_owner_delete(int char_id);
bool mapif_mercenary_delete(int merc_id);
-#endif /* _CHAR_INT_MERCENARY_H_ */
+#endif /* CHAR_INT_MERCENARY_H */
diff --git a/src/char/int_party.h b/src/char/int_party.h
index 33325b46b..2b24b1d1a 100644
--- a/src/char/int_party.h
+++ b/src/char/int_party.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_PARTY_H_
-#define _CHAR_INT_PARTY_H_
+#ifndef CHAR_INT_PARTY_H
+#define CHAR_INT_PARTY_H
//Party Flags on what to save/delete.
enum {
@@ -21,4 +21,4 @@ int inter_party_leave(int party_id,int account_id, int char_id);
int inter_party_CharOnline(int char_id, int party_id);
int inter_party_CharOffline(int char_id, int party_id);
-#endif /* _CHAR_INT_PARTY_H_ */
+#endif /* CHAR_INT_PARTY_H */
diff --git a/src/char/int_pet.h b/src/char/int_pet.h
index a16cb7a37..52642fc54 100644
--- a/src/char/int_pet.h
+++ b/src/char/int_pet.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_PET_H_
-#define _CHAR_INT_PET_H_
+#ifndef CHAR_INT_PET_H
+#define CHAR_INT_PET_H
struct s_pet;
@@ -18,4 +18,4 @@ int inter_pet_sql_init(void);
//Exported for use in the TXT-SQL converter.
int inter_pet_tosql(int pet_id, struct s_pet *p);
-#endif /* _CHAR_INT_PET_H_ */
+#endif /* CHAR_INT_PET_H */
diff --git a/src/char/int_quest.h b/src/char/int_quest.h
index 6267c74ad..f0dd370ea 100644
--- a/src/char/int_quest.h
+++ b/src/char/int_quest.h
@@ -1,10 +1,10 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_QUEST_H_
-#define _CHAR_QUEST_H_
+#ifndef CHAR_QUEST_H
+#define CHAR_QUEST_H
int inter_quest_parse_frommap(int fd);
-#endif /* _CHAR_QUEST_H_ */
+#endif /* CHAR_QUEST_H */
diff --git a/src/char/int_storage.h b/src/char/int_storage.h
index 1693499a5..1cef94d98 100644
--- a/src/char/int_storage.h
+++ b/src/char/int_storage.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _CHAR_INT_STORAGE_H_
-#define _CHAR_INT_STORAGE_H_
+#ifndef CHAR_INT_STORAGE_H
+#define CHAR_INT_STORAGE_H
struct storage_data;
struct guild_storage;
@@ -19,4 +19,4 @@ int storage_fromsql(int account_id, struct storage_data* p);
int storage_tosql(int account_id,struct storage_data *p);
int guild_storage_tosql(int guild_id, struct guild_storage *p);
-#endif /* _CHAR_INT_STORAGE_H_ */
+#endif /* CHAR_INT_STORAGE_H */
diff --git a/src/char/inter.h b/src/char/inter.h
index 5e655237e..ab2478ae6 100644
--- a/src/char/inter.h
+++ b/src/char/inter.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CHAR_INTER_H_
-#define _CHAR_INTER_H_
+#ifndef CHAR_INTER_H
+#define CHAR_INTER_H
#include "char.h"
#include "../common/sql.h"
@@ -30,4 +30,4 @@ extern Sql* lsql_handle;
int inter_accreg_tosql(int account_id, int char_id, struct accreg *reg, int type);
-#endif /* _CHAR_INTER_H_ */
+#endif /* CHAR_INTER_H */
diff --git a/src/char/pincode.h b/src/char/pincode.h
index 3b71eec7c..1ed05095e 100644
--- a/src/char/pincode.h
+++ b/src/char/pincode.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CHAR_PINCODE_H_
-#define _CHAR_PINCODE_H_
+#ifndef CHAR_PINCODE_H
+#define CHAR_PINCODE_H
#include "char.h"
@@ -40,4 +40,4 @@ struct pincode_interface *pincode;
void pincode_defaults(void);
-#endif /* _CHAR_PINCODE_H_ */
+#endif /* CHAR_PINCODE_H */
diff --git a/src/common/HPM.h b/src/common/HPM.h
index 5667f605a..fe8d45066 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#ifndef _COMMON_HPM_H_
-#define _COMMON_HPM_H_
+#ifndef COMMON_HPM_H
+#define COMMON_HPM_H
#ifndef HERCULES_CORE
#error You should never include HPM.h from a plugin.
@@ -158,4 +158,4 @@ struct HPM_interface *HPM;
void hpm_defaults(void);
-#endif /* _COMMON_HPM_H_ */
+#endif /* COMMON_HPM_H */
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index c5ec3771d..79ec36472 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -3,140 +3,140 @@
//
// NOTE: This file was auto-generated and should never be manually edited,
// as it will get overwritten.
-#ifndef _HPM_DATA_CHECK_H_
-#define _HPM_DATA_CHECK_H_
+#ifndef HPM_DATA_CHECK_H
+#define HPM_DATA_CHECK_H
HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
- #ifdef _COMMON_CONF_H_
+ #ifdef COMMON_CONF_H
{ "libconfig_interface", sizeof(struct libconfig_interface) },
#else
- #define _COMMON_CONF_H_
- #endif // _COMMON_CONF_H_
- #ifdef _COMMON_DB_H_
+ #define COMMON_CONF_H
+ #endif // COMMON_CONF_H
+ #ifdef COMMON_DB_H
{ "DBData", sizeof(struct DBData) },
{ "DBIterator", sizeof(struct DBIterator) },
{ "DBMap", sizeof(struct DBMap) },
#else
- #define _COMMON_DB_H_
- #endif // _COMMON_DB_H_
- #ifdef _COMMON_DES_H_
+ #define COMMON_DB_H
+ #endif // COMMON_DB_H
+ #ifdef COMMON_DES_H
{ "BIT64", sizeof(struct BIT64) },
#else
- #define _COMMON_DES_H_
- #endif // _COMMON_DES_H_
- #ifdef _COMMON_ERS_H_
+ #define COMMON_DES_H
+ #endif // COMMON_DES_H
+ #ifdef COMMON_ERS_H
{ "eri", sizeof(struct eri) },
#else
- #define _COMMON_ERS_H_
- #endif // _COMMON_ERS_H_
- #ifdef _COMMON_MAPINDEX_H_
+ #define COMMON_ERS_H
+ #endif // COMMON_ERS_H
+ #ifdef COMMON_MAPINDEX_H
{ "mapindex_interface", sizeof(struct mapindex_interface) },
#else
- #define _COMMON_MAPINDEX_H_
- #endif // _COMMON_MAPINDEX_H_
- #ifdef _COMMON_MMO_H_
+ #define COMMON_MAPINDEX_H
+ #endif // COMMON_MAPINDEX_H
+ #ifdef COMMON_MMO_H
{ "quest", sizeof(struct quest) },
#else
- #define _COMMON_MMO_H_
- #endif // _COMMON_MMO_H_
- #ifdef _COMMON_SOCKET_H_
+ #define COMMON_MMO_H
+ #endif // COMMON_MMO_H
+ #ifdef COMMON_SOCKET_H
{ "socket_interface", sizeof(struct socket_interface) },
#else
- #define _COMMON_SOCKET_H_
- #endif // _COMMON_SOCKET_H_
- #ifdef _COMMON_STRLIB_H_
+ #define COMMON_SOCKET_H
+ #endif // COMMON_SOCKET_H
+ #ifdef COMMON_STRLIB_H
{ "StringBuf", sizeof(struct StringBuf) },
{ "s_svstate", sizeof(struct s_svstate) },
#else
- #define _COMMON_STRLIB_H_
- #endif // _COMMON_STRLIB_H_
- #ifdef _COMMON_SYSINFO_H_
+ #define COMMON_STRLIB_H
+ #endif // COMMON_STRLIB_H
+ #ifdef COMMON_SYSINFO_H
{ "sysinfo_interface", sizeof(struct sysinfo_interface) },
#else
- #define _COMMON_SYSINFO_H_
- #endif // _COMMON_SYSINFO_H_
- #ifdef _MAP_ATCOMMAND_H_
+ #define COMMON_SYSINFO_H
+ #endif // COMMON_SYSINFO_H
+ #ifdef MAP_ATCOMMAND_H
{ "AliasInfo", sizeof(struct AliasInfo) },
{ "atcommand_interface", sizeof(struct atcommand_interface) },
#else
- #define _MAP_ATCOMMAND_H_
- #endif // _MAP_ATCOMMAND_H_
- #ifdef _MAP_BATTLE_H_
+ #define MAP_ATCOMMAND_H
+ #endif // MAP_ATCOMMAND_H
+ #ifdef MAP_BATTLE_H
{ "Damage", sizeof(struct Damage) },
{ "battle_interface", sizeof(struct battle_interface) },
#else
- #define _MAP_BATTLE_H_
- #endif // _MAP_BATTLE_H_
- #ifdef _MAP_BUYINGSTORE_H_
+ #define MAP_BATTLE_H
+ #endif // MAP_BATTLE_H
+ #ifdef MAP_BUYINGSTORE_H
{ "buyingstore_interface", sizeof(struct buyingstore_interface) },
{ "s_buyingstore_item", sizeof(struct s_buyingstore_item) },
#else
- #define _MAP_BUYINGSTORE_H_
- #endif // _MAP_BUYINGSTORE_H_
- #ifdef _MAP_CHRIF_H_
+ #define MAP_BUYINGSTORE_H
+ #endif // MAP_BUYINGSTORE_H
+ #ifdef MAP_CHRIF_H
{ "auth_node", sizeof(struct auth_node) },
#else
- #define _MAP_CHRIF_H_
- #endif // _MAP_CHRIF_H_
- #ifdef _MAP_CLIF_H_
+ #define MAP_CHRIF_H
+ #endif // MAP_CHRIF_H
+ #ifdef MAP_CLIF_H
{ "clif_interface", sizeof(struct clif_interface) },
#else
- #define _MAP_CLIF_H_
- #endif // _MAP_CLIF_H_
- #ifdef _MAP_ELEMENTAL_H_
+ #define MAP_CLIF_H
+ #endif // MAP_CLIF_H
+ #ifdef MAP_ELEMENTAL_H
{ "elemental_skill", sizeof(struct elemental_skill) },
#else
- #define _MAP_ELEMENTAL_H_
- #endif // _MAP_ELEMENTAL_H_
- #ifdef _MAP_GUILD_H_
+ #define MAP_ELEMENTAL_H
+ #endif // MAP_ELEMENTAL_H
+ #ifdef MAP_GUILD_H
{ "eventlist", sizeof(struct eventlist) },
{ "guardian_data", sizeof(struct guardian_data) },
#else
- #define _MAP_GUILD_H_
- #endif // _MAP_GUILD_H_
- #ifdef _MAP_MAPREG_H_
+ #define MAP_GUILD_H
+ #endif // MAP_GUILD_H
+ #ifdef MAP_MAPREG_H
{ "mapreg_save", sizeof(struct mapreg_save) },
#else
- #define _MAP_MAPREG_H_
- #endif // _MAP_MAPREG_H_
- #ifdef _MAP_MAP_H_
+ #define MAP_MAPREG_H
+ #endif // MAP_MAPREG_H
+ #ifdef MAP_MAP_H
{ "map_data_other_server", sizeof(struct map_data_other_server) },
#else
- #define _MAP_MAP_H_
- #endif // _MAP_MAP_H_
- #ifdef _MAP_PACKETS_STRUCT_H_
+ #define MAP_MAP_H
+ #endif // MAP_MAP_H
+ #ifdef MAP_PACKETS_STRUCT_H
{ "EQUIPSLOTINFO", sizeof(struct EQUIPSLOTINFO) },
#else
- #define _MAP_PACKETS_STRUCT_H_
- #endif // _MAP_PACKETS_STRUCT_H_
- #ifdef _MAP_PC_H_
+ #define MAP_PACKETS_STRUCT_H
+ #endif // MAP_PACKETS_STRUCT_H
+ #ifdef MAP_PC_H
{ "autotrade_vending", sizeof(struct autotrade_vending) },
{ "item_cd", sizeof(struct item_cd) },
#else
- #define _MAP_PC_H_
- #endif // _MAP_PC_H_
- #ifdef _MAP_SCRIPT_H_
+ #define MAP_PC_H
+ #endif // MAP_PC_H
+ #ifdef MAP_SCRIPT_H
{ "Script_Config", sizeof(struct Script_Config) },
{ "reg_db", sizeof(struct reg_db) },
{ "script_interface", sizeof(struct script_interface) },
#else
- #define _MAP_SCRIPT_H_
- #endif // _MAP_SCRIPT_H_
- #ifdef _MAP_SEARCHSTORE_H_
+ #define MAP_SCRIPT_H
+ #endif // MAP_SCRIPT_H
+ #ifdef MAP_SEARCHSTORE_H
{ "searchstore_interface", sizeof(struct searchstore_interface) },
#else
- #define _MAP_SEARCHSTORE_H_
- #endif // _MAP_SEARCHSTORE_H_
- #ifdef _MAP_SKILL_H_
+ #define MAP_SEARCHSTORE_H
+ #endif // MAP_SEARCHSTORE_H
+ #ifdef MAP_SKILL_H
{ "skill_cd", sizeof(struct skill_cd) },
{ "skill_condition", sizeof(struct skill_condition) },
{ "skill_interface", sizeof(struct skill_interface) },
{ "skill_unit_save", sizeof(struct skill_unit_save) },
#else
- #define _MAP_SKILL_H_
- #endif // _MAP_SKILL_H_
+ #define MAP_SKILL_H
+ #endif // MAP_SKILL_H
};
HPExport unsigned int HPMDataCheckLen = ARRAYLENGTH(HPMDataCheck);
-#endif /* _HPM_DATA_CHECK_H_ */
+#endif /* HPM_DATA_CHECK_H */
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index b98e87d90..478cfbdd9 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#ifndef _COMMON_HPMI_H_
-#define _COMMON_HPMI_H_
+#ifndef COMMON_HPMI_H
+#define COMMON_HPMI_H
#include "../common/cbasetypes.h"
#include "../common/console.h"
@@ -184,4 +184,4 @@ HPExport struct HPMi_interface {
HPExport struct HPMi_interface *HPMi;
#endif
-#endif /* _COMMON_HPMI_H_ */
+#endif /* COMMON_HPMI_H */
diff --git a/src/common/atomic.h b/src/common/atomic.h
index 526811a09..e73b1c464 100644
--- a/src/common/atomic.h
+++ b/src/common/atomic.h
@@ -1,8 +1,8 @@
// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_ATOMIC_H_
-#define _COMMON_ATOMIC_H_
+#ifndef COMMON_ATOMIC_H
+#define COMMON_ATOMIC_H
// Atomic Operations
// (Interlocked CompareExchange, Add .. and so on ..)
@@ -146,4 +146,4 @@ static forceinline int32 InterlockedExchange(volatile int32 *target, int32 val){
#endif //endif compiler decision
-#endif /* _COMMON_ATOMIC_H_ */
+#endif /* COMMON_ATOMIC_H */
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index ac65b08a8..42075de8e 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -1,5 +1,5 @@
-#ifndef _COMMON_CBASETYPES_H_
-#define _COMMON_CBASETYPES_H_
+#ifndef COMMON_CBASETYPES_H
+#define COMMON_CBASETYPES_H
/* +--------+-----------+--------+---------+
* | ILP32 | LP64 | ILP64 | (LL)P64 |
@@ -444,9 +444,9 @@ void SET_FUNCPOINTER(T1& var, T2 p)
/* pointer size fix which fixes several gcc warnings */
#ifdef __64BIT__
- #define __64BPTRSIZE(y) ((intptr)(y))
+ #define h64BPTRSIZE(y) ((intptr)(y))
#else
- #define __64BPTRSIZE(y) (y)
+ #define h64BPTRSIZE(y) (y)
#endif
-#endif /* _COMMON_CBASETYPES_H_ */
+#endif /* COMMON_CBASETYPES_H */
diff --git a/src/common/conf.h b/src/common/conf.h
index 7c275bec2..c232a035c 100644
--- a/src/common/conf.h
+++ b/src/common/conf.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_CONF_H_
-#define _COMMON_CONF_H_
+#ifndef COMMON_CONF_H
+#define COMMON_CONF_H
#include "../common/cbasetypes.h"
@@ -95,4 +95,4 @@ struct libconfig_interface *libconfig;
void libconfig_defaults(void);
-#endif // _COMMON_CONF_H_
+#endif // COMMON_CONF_H
diff --git a/src/common/console.h b/src/common/console.h
index 55a9a767c..062d48bbe 100644
--- a/src/common/console.h
+++ b/src/common/console.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#ifndef _COMMON_CONSOLE_H_
-#define _COMMON_CONSOLE_H_
+#ifndef COMMON_CONSOLE_H
+#define COMMON_CONSOLE_H
#include "../config/core.h" // MAX_CONSOLE_INPUT
@@ -93,4 +93,4 @@ struct console_interface *console;
void console_defaults(void);
-#endif /* _COMMON_CONSOLE_H_ */
+#endif /* COMMON_CONSOLE_H */
diff --git a/src/common/core.h b/src/common/core.h
index ba75e6b01..a8337e1b9 100644
--- a/src/common/core.h
+++ b/src/common/core.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_CORE_H_
-#define _COMMON_CORE_H_
+#ifndef COMMON_CORE_H
+#define COMMON_CORE_H
#include "../common/db.h"
#include "../common/mmo.h"
@@ -47,4 +47,4 @@ enum E_CORE_ST {
/// If NULL, runflag is set to CORE_ST_STOP instead.
extern void (*shutdown_callback)(void);
-#endif /* _COMMON_CORE_H_ */
+#endif /* COMMON_CORE_H */
diff --git a/src/common/db.h b/src/common/db.h
index 4f8d6be79..ed87e474b 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -39,8 +39,8 @@
* @encoding US-ASCII *
* @see common#db.c *
\*****************************************************************************/
-#ifndef _COMMON_DB_H_
-#define _COMMON_DB_H_
+#ifndef COMMON_DB_H
+#define COMMON_DB_H
#include <stdarg.h>
@@ -1549,4 +1549,4 @@ void linkdb_foreach (struct linkdb_node** head, LinkDBFunc func, ...);
-#endif /* _COMMON_DB_H_ */
+#endif /* COMMON_DB_H */
diff --git a/src/common/des.h b/src/common/des.h
index 0f908a15b..2c7190f23 100644
--- a/src/common/des.h
+++ b/src/common/des.h
@@ -1,7 +1,7 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_DES_H_
-#define _COMMON_DES_H_
+#ifndef COMMON_DES_H
+#define COMMON_DES_H
#include "../common/cbasetypes.h"
@@ -13,4 +13,4 @@ void des_decrypt_block(BIT64* block);
void des_decrypt(unsigned char* data, size_t size);
-#endif // _COMMON_DES_H_
+#endif // COMMON_DES_H
diff --git a/src/common/ers.h b/src/common/ers.h
index e11f7f37e..904f7fb81 100644
--- a/src/common/ers.h
+++ b/src/common/ers.h
@@ -37,8 +37,8 @@
* @author Flavio @ Amazon Project *
* @encoding US-ASCII *
\*****************************************************************************/
-#ifndef _COMMON_ERS_H_
-#define _COMMON_ERS_H_
+#ifndef COMMON_ERS_H
+#define COMMON_ERS_H
#include "../common/cbasetypes.h"
@@ -175,4 +175,4 @@ void ers_report(void);
void ers_final(void);
#endif /* DISABLE_ERS / not DISABLE_ERS */
-#endif /* _COMMON_ERS_H_ */
+#endif /* COMMON_ERS_H */
diff --git a/src/common/grfio.c b/src/common/grfio.c
index f592812f6..6e628a512 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -23,7 +23,7 @@
//----------------------------
// file entry table struct
//----------------------------
-typedef struct _FILELIST {
+typedef struct FILELIST {
int srclen; ///< compressed size
int srclen_aligned;
int declen; ///< original size
diff --git a/src/common/grfio.h b/src/common/grfio.h
index 930ed7e36..15659c17c 100644
--- a/src/common/grfio.h
+++ b/src/common/grfio.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_GRFIO_H_
-#define _COMMON_GRFIO_H_
+#ifndef COMMON_GRFIO_H
+#define COMMON_GRFIO_H
void grfio_init(const char* fname);
void grfio_final(void);
@@ -14,4 +14,4 @@ unsigned long grfio_crc32(const unsigned char *buf, unsigned int len);
int decode_zip(void* dest, unsigned long* destLen, const void* source, unsigned long sourceLen);
int encode_zip(void* dest, unsigned long* destLen, const void* source, unsigned long sourceLen);
-#endif /* _COMMON_GRFIO_H_ */
+#endif /* COMMON_GRFIO_H */
diff --git a/src/common/malloc.c b/src/common/malloc.c
index fbe8e2d9d..3c9fa9c54 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -235,14 +235,13 @@ static size_t hash2size( unsigned short hash )
}
}
-void* _mmalloc(size_t size, const char *file, int line, const char *func )
-{
+void *mmalloc_(size_t size, const char *file, int line, const char *func) {
struct block *block;
short size_hash = size2hash( size );
struct unit_head *head;
if (((long) size) < 0) {
- ShowError("_mmalloc: %d\n", size);
+ ShowError("mmalloc_: %d\n", size);
return NULL;
}
@@ -341,15 +340,13 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func )
return (char *)head + sizeof(struct unit_head) - sizeof(long);
}
-void* _mcalloc(size_t num, size_t size, const char *file, int line, const char *func )
-{
+void *mcalloc_(size_t num, size_t size, const char *file, int line, const char *func) {
void *p = iMalloc->malloc(num * size,file,line,func);
memset(p,0,num * size);
return p;
}
-void* _mrealloc(void *memblock, size_t size, const char *file, int line, const char *func )
-{
+void *mrealloc_(void *memblock, size_t size, const char *file, int line, const char *func) {
size_t old_size;
if(memblock == NULL) {
return iMalloc->malloc(size,file,line,func);
@@ -373,8 +370,8 @@ void* _mrealloc(void *memblock, size_t size, const char *file, int line, const c
}
}
-/* a _mrealloc clone with the difference it 'z'eroes the newly created memory */
-void* _mreallocz(void *memblock, size_t size, const char *file, int line, const char *func ) {
+/* a mrealloc_ clone with the difference it 'z'eroes the newly created memory */
+void *mreallocz_(void *memblock, size_t size, const char *file, int line, const char *func) {
size_t old_size;
void *p = NULL;
@@ -404,8 +401,7 @@ void* _mreallocz(void *memblock, size_t size, const char *file, int line, const
}
-char* _mstrdup(const char *p, const char *file, int line, const char *func )
-{
+char *mstrdup_(const char *p, const char *file, int line, const char *func) {
if(p == NULL) {
return NULL;
} else {
@@ -416,8 +412,7 @@ char* _mstrdup(const char *p, const char *file, int line, const char *func )
}
}
-void _mfree(void *ptr, const char *file, int line, const char *func )
-{
+void mfree_(void *ptr, const char *file, int line, const char *func) {
struct unit_head *head;
if (ptr == NULL)
@@ -852,12 +847,12 @@ void malloc_defaults(void) {
// Athena's built-in Memory Manager
#ifdef USE_MEMMGR
- iMalloc->malloc = _mmalloc;
- iMalloc->calloc = _mcalloc;
- iMalloc->realloc = _mrealloc;
- iMalloc->reallocz= _mreallocz;
- iMalloc->astrdup = _mstrdup;
- iMalloc->free = _mfree;
+ iMalloc->malloc = mmalloc_;
+ iMalloc->calloc = mcalloc_;
+ iMalloc->realloc = mrealloc_;
+ iMalloc->reallocz= mreallocz_;
+ iMalloc->astrdup = mstrdup_;
+ iMalloc->free = mfree_;
#else
iMalloc->malloc = aMalloc_;
iMalloc->calloc = aCalloc_;
diff --git a/src/common/malloc.h b/src/common/malloc.h
index 7309bb0f7..8dace2d68 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_MALLOC_H_
-#define _COMMON_MALLOC_H_
+#ifndef COMMON_MALLOC_H
+#define COMMON_MALLOC_H
#include "../common/cbasetypes.h"
@@ -88,4 +88,4 @@ struct malloc_interface {
void memmgr_report (int extra);
struct malloc_interface *iMalloc;
-#endif /* _COMMON_MALLOC_H_ */
+#endif /* COMMON_MALLOC_H */
diff --git a/src/common/mapindex.h b/src/common/mapindex.h
index fa9b9e920..446a2422d 100644
--- a/src/common/mapindex.h
+++ b/src/common/mapindex.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_MAPINDEX_H_
-#define _COMMON_MAPINDEX_H_
+#ifndef COMMON_MAPINDEX_H
+#define COMMON_MAPINDEX_H
#include "../common/db.h"
#include "../common/mmo.h"
@@ -90,4 +90,4 @@ struct mapindex_interface *mapindex;
void mapindex_defaults(void);
-#endif /* _COMMON_MAPINDEX_H_ */
+#endif /* COMMON_MAPINDEX_H */
diff --git a/src/common/md5calc.h b/src/common/md5calc.h
index d0caf6787..740e2edcc 100644
--- a/src/common/md5calc.h
+++ b/src/common/md5calc.h
@@ -1,8 +1,8 @@
-#ifndef _COMMON_MD5CALC_H_
-#define _COMMON_MD5CALC_H_
+#ifndef COMMON_MD5CALC_H
+#define COMMON_MD5CALC_H
void MD5_String(const char * string, char * output);
void MD5_Binary(const char * string, unsigned char * output);
void MD5_Salt(unsigned int len, char * output);
-#endif /* _COMMON_MD5CALC_H_ */
+#endif /* COMMON_MD5CALC_H */
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 8e57eee85..feeb06524 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_MMO_H_
-#define _COMMON_MMO_H_
+#ifndef COMMON_MMO_H
+#define COMMON_MMO_H
#include <time.h>
@@ -932,4 +932,4 @@ enum e_pc_reg_loading {
#error MAX_ZENY is too big
#endif
-#endif /* _COMMON_MMO_H_ */
+#endif /* COMMON_MMO_H */
diff --git a/src/common/mutex.h b/src/common/mutex.h
index ced91ab8e..d298c05af 100644
--- a/src/common/mutex.h
+++ b/src/common/mutex.h
@@ -1,8 +1,8 @@
// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_MUTEX_H_
-#define _COMMON_MUTEX_H_
+#ifndef COMMON_MUTEX_H
+#define COMMON_MUTEX_H
#include "../common/cbasetypes.h"
@@ -90,4 +90,4 @@ void racond_signal(racond *c);
void racond_broadcast(racond *c);
-#endif /* _COMMON_MUTEX_H_ */
+#endif /* COMMON_MUTEX_H */
diff --git a/src/common/nullpo.h b/src/common/nullpo.h
index fb1cf0feb..581252cca 100644
--- a/src/common/nullpo.h
+++ b/src/common/nullpo.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_NULLPO_H_
-#define _COMMON_NULLPO_H_
+#ifndef COMMON_NULLPO_H
+#define COMMON_NULLPO_H
#include "../common/cbasetypes.h"
@@ -125,4 +125,4 @@
void assert_report(const char *file, int line, const char *func, const char *targetname, const char *title);
-#endif /* _COMMON_NULLPO_H_ */
+#endif /* COMMON_NULLPO_H */
diff --git a/src/common/random.h b/src/common/random.h
index ab83fb4d4..15d7f8ab1 100644
--- a/src/common/random.h
+++ b/src/common/random.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_RANDOM_H_
-#define _COMMON_RANDOM_H_
+#ifndef COMMON_RANDOM_H
+#define COMMON_RANDOM_H
#include "../common/cbasetypes.h"
@@ -15,4 +15,4 @@ int32 rnd_value(int32 min, int32 max);// [min, max]
double rnd_uniform(void);// [0.0, 1.0)
double rnd_uniform53(void);// [0.0, 1.0)
-#endif /* _COMMON_RANDOM_H_ */
+#endif /* COMMON_RANDOM_H */
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index ece10c1a8..b9bcef9b2 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -654,7 +654,7 @@ int FPRINTF(FILE *file, const char *fmt, ...)
char timestamp_format[20] = ""; //For displaying Timestamps
-int _vShowMessage(enum msg_type flag, const char *string, va_list ap)
+int vShowMessage_(enum msg_type flag, const char *string, va_list ap)
{
va_list apcopy;
char prefix[100];
@@ -663,7 +663,7 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap)
#endif
if (!string || *string == '\0') {
- ShowError("Empty string passed to _vShowMessage().\n");
+ ShowError("Empty string passed to vShowMessage_().\n");
return 1;
}
if(
@@ -734,7 +734,7 @@ int _vShowMessage(enum msg_type flag, const char *string, va_list ap)
strcat(prefix,CL_RED"[Fatal Error]"CL_RESET":");
break;
default:
- ShowError("In function _vShowMessage() -> Invalid flag passed.\n");
+ ShowError("In function vShowMessage_() -> Invalid flag passed.\n");
return 1;
}
@@ -782,12 +782,12 @@ void ClearScreen(void)
ShowMessage(CL_CLS); // to prevent empty string passed messages
#endif
}
-int _ShowMessage(enum msg_type flag, const char *string, ...)
+int ShowMessage_(enum msg_type flag, const char *string, ...)
{
int ret;
va_list ap;
va_start(ap, string);
- ret = _vShowMessage(flag, string, ap);
+ ret = vShowMessage_(flag, string, ap);
va_end(ap);
return ret;
}
@@ -796,37 +796,37 @@ int _ShowMessage(enum msg_type flag, const char *string, ...)
void ShowMessage(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_NONE, string, ap);
+ vShowMessage_(MSG_NONE, string, ap);
va_end(ap);
}
void ShowStatus(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_STATUS, string, ap);
+ vShowMessage_(MSG_STATUS, string, ap);
va_end(ap);
}
void ShowSQL(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_SQL, string, ap);
+ vShowMessage_(MSG_SQL, string, ap);
va_end(ap);
}
void ShowInfo(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_INFORMATION, string, ap);
+ vShowMessage_(MSG_INFORMATION, string, ap);
va_end(ap);
}
void ShowNotice(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_NOTICE, string, ap);
+ vShowMessage_(MSG_NOTICE, string, ap);
va_end(ap);
}
void ShowWarning(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_WARNING, string, ap);
+ vShowMessage_(MSG_WARNING, string, ap);
va_end(ap);
}
void ShowConfigWarning(config_setting_t *config, const char *string, ...)
@@ -837,25 +837,25 @@ void ShowConfigWarning(config_setting_t *config, const char *string, ...)
StrBuf->AppendStr(&buf, string);
StrBuf->Printf(&buf, " (%s:%d)\n", config_setting_source_file(config), config_setting_source_line(config));
va_start(ap, string);
- _vShowMessage(MSG_WARNING, StrBuf->Value(&buf), ap);
+ vShowMessage_(MSG_WARNING, StrBuf->Value(&buf), ap);
va_end(ap);
StrBuf->Destroy(&buf);
}
void ShowDebug(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_DEBUG, string, ap);
+ vShowMessage_(MSG_DEBUG, string, ap);
va_end(ap);
}
void ShowError(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_ERROR, string, ap);
+ vShowMessage_(MSG_ERROR, string, ap);
va_end(ap);
}
void ShowFatalError(const char *string, ...) {
va_list ap;
va_start(ap, string);
- _vShowMessage(MSG_FATALERROR, string, ap);
+ vShowMessage_(MSG_FATALERROR, string, ap);
va_end(ap);
}
diff --git a/src/common/showmsg.h b/src/common/showmsg.h
index 8008acf5a..83eb0ad89 100644
--- a/src/common/showmsg.h
+++ b/src/common/showmsg.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_SHOWMSG_H_
-#define _COMMON_SHOWMSG_H_
+#ifndef COMMON_SHOWMSG_H
+#define COMMON_SHOWMSG_H
#include <stdarg.h>
@@ -115,6 +115,6 @@ extern void ClearScreen(void);
HPExport void (*ShowFatalError) (const char *, ...);
#endif
-extern int _vShowMessage(enum msg_type flag, const char *string, va_list ap);
+extern int vShowMessage_(enum msg_type flag, const char *string, va_list ap);
-#endif /* _COMMON_SHOWMSG_H_ */
+#endif /* COMMON_SHOWMSG_H */
diff --git a/src/common/socket.c b/src/common/socket.c
index 58c2d5bf9..85f0aa0ce 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -5,9 +5,9 @@
#define HERCULES_CORE
#include "../config/core.h" // SHOW_SERVER_STATS
-#define _H_SOCKET_C_
+#define H_SOCKET_C
#include "socket.h"
-#undef _H_SOCKET_C_
+#undef H_SOCKET_C
#include <stdio.h>
#include <stdlib.h>
@@ -909,20 +909,20 @@ int do_sockets(int next)
//////////////////////////////
// IP rules and DDoS protection
-typedef struct _connect_history {
- struct _connect_history* next;
+typedef struct connect_history {
+ struct connect_history* next;
uint32 ip;
int64 tick;
int count;
unsigned ddos : 1;
} ConnectHistory;
-typedef struct _access_control {
+typedef struct access_control {
uint32 ip;
uint32 mask;
} AccessControl;
-enum _aco {
+enum aco {
ACO_DENY_ALLOW,
ACO_ALLOW_DENY,
ACO_MUTUAL_FAILURE
diff --git a/src/common/socket.h b/src/common/socket.h
index 804b9284f..42b0efe3b 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_SOCKET_H_
-#define _COMMON_SOCKET_H_
+#ifndef COMMON_SOCKET_H
+#define COMMON_SOCKET_H
#include <time.h>
@@ -174,7 +174,7 @@ struct socket_interface *sockt;
void socket_defaults(void);
/* the purpose of these macros is simply to not make calling them be an annoyance */
-#ifndef _H_SOCKET_C_
+#ifndef H_SOCKET_C
#define make_listen_bind(ip, port) ( sockt->make_listen_bind(ip, port) )
#define make_connection(ip, port, opt) ( sockt->make_connection(ip, port, opt) )
#define realloc_fifo(fd, rfifo_size, wfifo_size) ( sockt->realloc_fifo(fd, rfifo_size, wfifo_size) )
@@ -194,6 +194,6 @@ void socket_defaults(void);
#define ntows(netshort) ( sockt->ntows(netshort) )
#define getips(ips, max) ( sockt->getips(ips, max) )
#define set_eof(fd) ( sockt->set_eof(fd) )
-#endif /* _H_SOCKET_C_ */
+#endif /* H_SOCKET_C */
-#endif /* _COMMON_SOCKET_H_ */
+#endif /* COMMON_SOCKET_H */
diff --git a/src/common/spinlock.h b/src/common/spinlock.h
index 5d57c6462..bde36b8e5 100644
--- a/src/common/spinlock.h
+++ b/src/common/spinlock.h
@@ -1,5 +1,5 @@
-#ifndef _COMMON_SPINLOCK_H_
-#define _COMMON_SPINLOCK_H_
+#ifndef COMMON_SPINLOCK_H
+#define COMMON_SPINLOCK_H
//
// CAS based Spinlock Implementation
@@ -100,4 +100,4 @@ static forceinline void LeaveSpinLock(SPIN_LOCK *lck){
-#endif /* _COMMON_SPINLOCK_H_ */
+#endif /* COMMON_SPINLOCK_H */
diff --git a/src/common/sql.h b/src/common/sql.h
index 3bdb76c74..f9593978c 100644
--- a/src/common/sql.h
+++ b/src/common/sql.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_SQL_H_
-#define _COMMON_SQL_H_
+#ifndef COMMON_SQL_H
+#define COMMON_SQL_H
#include <stdarg.h>// va_list
@@ -291,4 +291,4 @@ void Sql_HerculesUpdateSkip(Sql* self,const char *filename);
void Sql_Init(void);
-#endif /* _COMMON_SQL_H_ */
+#endif /* COMMON_SQL_H */
diff --git a/src/common/strlib.c b/src/common/strlib.c
index 2ce8fd347..e2382e6fc 100644
--- a/src/common/strlib.c
+++ b/src/common/strlib.c
@@ -4,9 +4,9 @@
#define HERCULES_CORE
-#define _H_STRLIB_C_
+#define H_STRLIB_C
#include "strlib.h"
-#undef _H_STRLIB_C_
+#undef H_STRLIB_C
#include <errno.h>
#include <stdio.h>
@@ -224,7 +224,7 @@ const char* stristr(const char* haystack, const char* needle)
}
#ifdef __WIN32
-char* _strtok_r(char *s1, const char *s2, char **lasts) {
+char* strtok_r_(char *s1, const char *s2, char **lasts) {
char *ret;
if (s1 == NULL)
diff --git a/src/common/strlib.h b/src/common/strlib.h
index f39f27789..7f84d2893 100644
--- a/src/common/strlib.h
+++ b/src/common/strlib.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_STRLIB_H_
-#define _COMMON_STRLIB_H_
+#ifndef COMMON_STRLIB_H
+#define COMMON_STRLIB_H
#include <stdarg.h>
#include <string.h>
@@ -12,8 +12,8 @@
#ifdef WIN32
#define HAVE_STRTOK_R
- #define strtok_r(s,delim,save_ptr) _strtok_r((s),(delim),(save_ptr))
- char *_strtok_r(char* s1, const char* s2, char** lasts);
+ #define strtok_r(s,delim,save_ptr) strtok_r_((s),(delim),(save_ptr))
+ char *strtok_r_(char* s1, const char* s2, char** lasts);
#endif
/// Bitfield determining the behavior of sv_parse and sv_split.
@@ -159,7 +159,7 @@ struct sv_interface *sv;
void strlib_defaults(void);
/* the purpose of these macros is simply to not make calling them be an annoyance */
-#ifndef _H_STRLIB_C_
+#ifndef H_STRLIB_C
#define jstrescape(pt) (strlib->jstrescape(pt))
#define jstrescapecpy(pt,spt) (strlib->jstrescapecpy((pt),(spt)))
#define jmemescapecpy(pt,spt,size) (strlib->jmemescapecpy((pt),(spt),(size)))
@@ -183,6 +183,6 @@ void strlib_defaults(void);
#define safesnprintf(buf,sz,fmt,...) (strlib->safesnprintf((buf),(sz),(fmt),##__VA_ARGS__))
#define strline(str,pos) (strlib->strline((str),(pos)))
#define bin2hex(output,input,count) (strlib->bin2hex((output),(input),(count)))
-#endif /* _H_STRLIB_C_ */
+#endif /* H_STRLIB_C */
-#endif /* _COMMON_STRLIB_H_ */
+#endif /* COMMON_STRLIB_H */
diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h
index 24f794cb4..600206a21 100644
--- a/src/common/sysinfo.h
+++ b/src/common/sysinfo.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Base Author: Haru @ http://hercules.ws
-#ifndef _COMMON_SYSINFO_H_
-#define _COMMON_SYSINFO_H_
+#ifndef COMMON_SYSINFO_H
+#define COMMON_SYSINFO_H
/**
* Provides various bits of information about the system Hercules is running on
@@ -48,4 +48,4 @@ struct sysinfo_interface *sysinfo;
void sysinfo_defaults(void);
-#endif /* _COMMON_SYSINFO_H_ */
+#endif /* COMMON_SYSINFO_H */
diff --git a/src/common/thread.c b/src/common/thread.c
index d8e0dbf0a..d680d0347 100644
--- a/src/common/thread.c
+++ b/src/common/thread.c
@@ -106,9 +106,9 @@ static void rat_thread_terminated(rAthread *handle) {
}//end: rat_thread_terminated()
#ifdef WIN32
-DWORD WINAPI _raThreadMainRedirector(LPVOID p){
+DWORD WINAPI raThreadMainRedirector(LPVOID p){
#else
-static void *_raThreadMainRedirector( void *p ){
+static void *raThreadMainRedirector( void *p ){
sigset_t set; // on Posix Thread platforms
#endif
void *ret;
@@ -145,7 +145,7 @@ static void *_raThreadMainRedirector( void *p ){
#else
return ret;
#endif
-}//end: _raThreadMainRedirector()
+}//end: raThreadMainRedirector()
@@ -193,12 +193,12 @@ rAthread *rathread_createEx(rAthreadProc entryPoint, void *param, size_t szStack
handle->param = param;
#ifdef WIN32
- handle->hThread = CreateThread(NULL, szStack, _raThreadMainRedirector, (void*)handle, 0, NULL);
+ handle->hThread = CreateThread(NULL, szStack, raThreadMainRedirector, (void*)handle, 0, NULL);
#else
pthread_attr_init(&attr);
pthread_attr_setstacksize(&attr, szStack);
- if(pthread_create(&handle->hThread, &attr, _raThreadMainRedirector, (void*)handle) != 0){
+ if(pthread_create(&handle->hThread, &attr, raThreadMainRedirector, (void*)handle) != 0){
handle->proc = NULL;
handle->param = NULL;
return NULL;
diff --git a/src/common/thread.h b/src/common/thread.h
index 3b5ce7476..f781cfbd0 100644
--- a/src/common/thread.h
+++ b/src/common/thread.h
@@ -1,8 +1,8 @@
// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _COMMON_THREAD_H_
-#define _COMMON_THREAD_H_
+#ifndef COMMON_THREAD_H
+#define COMMON_THREAD_H
#include "../common/cbasetypes.h"
@@ -115,4 +115,4 @@ void rathread_init();
void rathread_final();
-#endif /* _COMMON_THREAD_H_ */
+#endif /* COMMON_THREAD_H */
diff --git a/src/common/timer.c b/src/common/timer.c
index ab0471d51..128fc4daf 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -107,7 +107,7 @@ char* search_timer_func_list(TimerFunc func)
#if defined(ENABLE_RDTSC)
static uint64 RDTSC_BEGINTICK = 0, RDTSC_CLOCK = 0;
-static __inline uint64 _rdtsc(){
+static __inline uint64 rdtsc_() {
register union{
uint64 qw;
uint32 dw[2];
@@ -127,14 +127,14 @@ static void rdtsc_calibrate(){
RDTSC_CLOCK = 0;
for(i = 0; i < 5; i++){
- t1 = _rdtsc();
+ t1 = rdtsc_();
usleep(1000000); //1000 MS
- t2 = _rdtsc();
+ t2 = rdtsc_();
RDTSC_CLOCK += (t2 - t1) / 1000;
}
RDTSC_CLOCK /= 5;
- RDTSC_BEGINTICK = _rdtsc();
+ RDTSC_BEGINTICK = rdtsc_();
ShowMessage(" done. (Frequency: %u Mhz)\n", (uint32)(RDTSC_CLOCK/1000) );
}
@@ -175,7 +175,7 @@ static int64 sys_tick(void) {
#elif defined(ENABLE_RDTSC)
// RDTSC: Returns the number of CPU cycles since reset. Unreliable if
// the CPU frequency is variable.
- return (int64)((_rdtsc() - RDTSC_BEGINTICK) / RDTSC_CLOCK);
+ return (int64)((rdtsc_() - RDTSC_BEGINTICK) / RDTSC_CLOCK);
#elif defined(HAVE_MONOTONIC_CLOCK)
// Monotonic clock: Implementation-defined.
// Clock that cannot be set and represents monotonic time since some
diff --git a/src/common/timer.h b/src/common/timer.h
index a07f81612..d0927adde 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_TIMER_H_
-#define _COMMON_TIMER_H_
+#ifndef COMMON_TIMER_H
+#define COMMON_TIMER_H
#include "../common/cbasetypes.h"
@@ -67,4 +67,4 @@ struct timer_interface *timer;
void timer_defaults(void);
-#endif /* _COMMON_TIMER_H_ */
+#endif /* COMMON_TIMER_H */
diff --git a/src/common/utils.h b/src/common/utils.h
index 823651163..421698d95 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_UTILS_H_
-#define _COMMON_UTILS_H_
+#ifndef COMMON_UTILS_H
+#define COMMON_UTILS_H
#include <stdio.h> // FILE*
#include <time.h>
@@ -65,4 +65,4 @@ struct HCache_interface *HCache;
void HCache_defaults(void);
-#endif /* _COMMON_UTILS_H_ */
+#endif /* COMMON_UTILS_H */
diff --git a/src/config/classes/general.h b/src/config/classes/general.h
index 147fddb55..b3da4a475 100644
--- a/src/config/classes/general.h
+++ b/src/config/classes/general.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_GENERAL_H_
-#define _CONFIG_GENERAL_H_
+#ifndef CONFIG_GENERAL_H
+#define CONFIG_GENERAL_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -31,4 +31,4 @@
* No settings past this point
**/
-#endif // _CONFIG_GENERAL_H_
+#endif // CONFIG_GENERAL_H
diff --git a/src/config/const.h b/src/config/const.h
index 23467bfa6..2b5b180c4 100644
--- a/src/config/const.h
+++ b/src/config/const.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_CONSTANTS_H_
-#define _CONFIG_CONSTANTS_H_
+#ifndef CONFIG_CONSTANTS_H
+#define CONFIG_CONSTANTS_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -103,4 +103,4 @@
/**
* End of File
**/
-#endif /* _CONFIG_CONSTANTS_H_ */
+#endif /* CONFIG_CONSTANTS_H */
diff --git a/src/config/core.h b/src/config/core.h
index 24e9de710..ac59563b5 100644
--- a/src/config/core.h
+++ b/src/config/core.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_CORE_H_
-#define _CONFIG_CORE_H_
+#ifndef CONFIG_CORE_H
+#define CONFIG_CORE_H
/// Max number of items on @autolootid list
#define AUTOLOOTITEM_SIZE 10
@@ -79,4 +79,4 @@
**/
#include "./const.h"
-#endif // _CONFIG_CORE_H_
+#endif // CONFIG_CORE_H
diff --git a/src/config/renewal.h b/src/config/renewal.h
index 1c48b9f8a..939ad9b73 100644
--- a/src/config/renewal.h
+++ b/src/config/renewal.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_RENEWAL_H_
-#define _CONFIG_RENEWAL_H_
+#ifndef CONFIG_RENEWAL_H
+#define CONFIG_RENEWAL_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -86,4 +86,4 @@
#endif // DISABLE_RENEWAL
#undef DISABLE_RENEWAL
-#endif // _CONFIG_RENEWAL_H_
+#endif // CONFIG_RENEWAL_H
diff --git a/src/config/secure.h b/src/config/secure.h
index 1a89e36cf..418d24751 100644
--- a/src/config/secure.h
+++ b/src/config/secure.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _CONFIG_SECURE_H_
-#define _CONFIG_SECURE_H_
+#ifndef CONFIG_SECURE_H
+#define CONFIG_SECURE_H
/**
* Hercules configuration file (http://hercules.ws)
@@ -58,4 +58,4 @@
**/
#define ANTI_MAYAP_CHEAT
-#endif // _CONFIG_SECURE_H_
+#endif // CONFIG_SECURE_H
diff --git a/src/login/account.h b/src/login/account.h
index a14595519..e15143ce9 100644
--- a/src/login/account.h
+++ b/src/login/account.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _LOGIN_ACCOUNT_H_
-#define _LOGIN_ACCOUNT_H_
+#ifndef LOGIN_ACCOUNT_H
+#define LOGIN_ACCOUNT_H
#include "../common/cbasetypes.h"
#include "../common/mmo.h" // ACCOUNT_REG2_NUM
@@ -140,4 +140,4 @@ Sql *account_db_sql_up(AccountDB* self);
void mmo_send_accreg2(AccountDB* self, int fd, int account_id, int char_id);
void mmo_save_accreg2(AccountDB* self, int fd, int account_id, int char_id);
-#endif /* _LOGIN_ACCOUNT_H_ */
+#endif /* LOGIN_ACCOUNT_H */
diff --git a/src/login/ipban.h b/src/login/ipban.h
index e6851d8dd..b4f3ac51b 100644
--- a/src/login/ipban.h
+++ b/src/login/ipban.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _LOGIN_IPBAN_H_
-#define _LOGIN_IPBAN_H_
+#ifndef LOGIN_IPBAN_H
+#define LOGIN_IPBAN_H
#include "../common/cbasetypes.h"
@@ -22,4 +22,4 @@ void ipban_log(uint32 ip);
bool ipban_config_read(const char* key, const char* value);
-#endif /* _LOGIN_IPBAN_H_ */
+#endif /* LOGIN_IPBAN_H */
diff --git a/src/login/login.h b/src/login/login.h
index 447301ea4..9b9d1e82c 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _LOGIN_LOGIN_H_
-#define _LOGIN_LOGIN_H_
+#ifndef LOGIN_LOGIN_H
+#define LOGIN_LOGIN_H
#include "../common/core.h" // CORE_ST_LAST
#include "../common/mmo.h" // NAME_LENGTH,SEX_*
@@ -100,4 +100,4 @@ extern struct mmo_char_server server[MAX_SERVERS];
extern struct Login_Config login_config;
-#endif /* _LOGIN_LOGIN_H_ */
+#endif /* LOGIN_LOGIN_H */
diff --git a/src/login/loginlog.h b/src/login/loginlog.h
index a86ad431c..52e18f3d1 100644
--- a/src/login/loginlog.h
+++ b/src/login/loginlog.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _LOGIN_LOGINLOG_H_
-#define _LOGIN_LOGINLOG_H_
+#ifndef LOGIN_LOGINLOG_H
+#define LOGIN_LOGINLOG_H
#include "../common/cbasetypes.h"
@@ -12,4 +12,4 @@ bool loginlog_init(void);
bool loginlog_final(void);
bool loginlog_config_read(const char* w1, const char* w2);
-#endif /* _LOGIN_LOGINLOG_H_ */
+#endif /* LOGIN_LOGINLOG_H */
diff --git a/src/map/HPMmap.h b/src/map/HPMmap.h
index f291575fb..99c4224ff 100644
--- a/src/map/HPMmap.h
+++ b/src/map/HPMmap.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-#ifndef _MAP_HPMMAP_H_
-#define _MAP_HPMMAP_H_
+#ifndef MAP_HPMMAP_H
+#define MAP_HPMMAP_H
#include "../common/cbasetypes.h"
#include "../map/atcommand.h"
@@ -26,4 +26,4 @@ bool HPM_map_DataCheck(struct s_HPMDataCheck *src, unsigned int size, char *name
void HPM_map_do_init(void);
-#endif /* _MAP_HPMMAP_H_ */
+#endif /* MAP_HPMMAP_H */
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index d36e98c41..e22e2101c 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -8434,7 +8434,7 @@ ACMD(set) {
if( is_str )
script->set_var(sd, reg, (void*) val);
else
- script->set_var(sd, reg, (void*)__64BPTRSIZE((atoi(val))));
+ script->set_var(sd, reg, (void*)h64BPTRSIZE((atoi(val))));
}
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index c8a1863af..356487bd1 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_ATCOMMAND_H_
-#define _MAP_ATCOMMAND_H_
+#ifndef MAP_ATCOMMAND_H
+#define MAP_ATCOMMAND_H
#include "pc_groups.h"
#include "../common/conf.h"
@@ -121,4 +121,4 @@ void atcommand_defaults(void);
/* stay here */
#define ACMD(x) static bool atcommand_ ## x (const int fd, struct map_session_data* sd, const char* command, const char* message, struct AtCommandInfo *info)
-#endif /* _MAP_ATCOMMAND_H_ */
+#endif /* MAP_ATCOMMAND_H */
diff --git a/src/map/battle.c b/src/map/battle.c
index e40d44549..7610d97b2 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6357,7 +6357,7 @@ bool battle_check_range(struct block_list *src, struct block_list *bl, int range
return path->search_long(NULL,src->m,src->x,src->y,bl->x,bl->y,CELL_CHKWALL);
}
-static const struct _battle_data {
+static const struct battle_data {
const char* str;
int* val;
int defval;
diff --git a/src/map/battle.h b/src/map/battle.h
index fc916597d..aab94420a 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_BATTLE_H_
-#define _MAP_BATTLE_H_
+#ifndef MAP_BATTLE_H
+#define MAP_BATTLE_H
#include "map.h" //ELE_MAX
#include "../common/cbasetypes.h"
@@ -603,4 +603,4 @@ struct battle_interface {
struct battle_interface *battle;
void battle_defaults(void);
-#endif /* _MAP_BATTLE_H_ */
+#endif /* MAP_BATTLE_H */
diff --git a/src/map/battleground.h b/src/map/battleground.h
index ec0a86f14..c1d3be054 100644
--- a/src/map/battleground.h
+++ b/src/map/battleground.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_BATTLEGROUND_H_
-#define _MAP_BATTLEGROUND_H_
+#ifndef MAP_BATTLEGROUND_H
+#define MAP_BATTLEGROUND_H
#include "clif.h"
#include "guild.h"
@@ -122,4 +122,4 @@ struct battleground_interface *bg;
void battleground_defaults(void);
-#endif /* _MAP_BATTLEGROUND_H_ */
+#endif /* MAP_BATTLEGROUND_H */
diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h
index 914631872..c981cc444 100644
--- a/src/map/buyingstore.h
+++ b/src/map/buyingstore.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_BUYINGSTORE_H_
-#define _MAP_BUYINGSTORE_H_
+#ifndef MAP_BUYINGSTORE_H
+#define MAP_BUYINGSTORE_H
#include "../common/cbasetypes.h"
#include "../common/mmo.h" // MAX_SLOTS
@@ -75,4 +75,4 @@ struct buyingstore_interface *buyingstore;
void buyingstore_defaults (void);
-#endif // _MAP_BUYINGSTORE_H_
+#endif // MAP_BUYINGSTORE_H
diff --git a/src/map/chat.h b/src/map/chat.h
index 6e4fae1c0..e055c04ed 100644
--- a/src/map/chat.h
+++ b/src/map/chat.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_CHAT_H_
-#define _MAP_CHAT_H_
+#ifndef MAP_CHAT_H
+#define MAP_CHAT_H
#include "map.h" // struct block_list, CHATROOM_TITLE_SIZE
#include "../common/cbasetypes.h"
@@ -60,4 +60,4 @@ struct chat_interface *chat;
void chat_defaults(void);
-#endif /* _MAP_CHAT_H_ */
+#endif /* MAP_CHAT_H */
diff --git a/src/map/chrif.h b/src/map/chrif.h
index 51ab0e9b9..11baaf5ff 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_CHRIF_H_
-#define _MAP_CHRIF_H_
+#ifndef MAP_CHRIF_H
+#define MAP_CHRIF_H
#include <time.h>
@@ -154,4 +154,4 @@ void chrif_defaults(void);
// There's no need for another function when a simple macro can do exactly the same effect
#define chrif_char_offline(x) chrif->char_offline_nsd((x)->status.account_id,(x)->status.char_id)
-#endif /* _MAP_CHRIF_H_ */
+#endif /* MAP_CHRIF_H */
diff --git a/src/map/clif.c b/src/map/clif.c
index 750689816..9e105e4a9 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5651,7 +5651,7 @@ void clif_displaymessage_sprintf(const int fd, const char* mes, ...) {
if( map->cpsd_active && fd == 0 ) {
ShowInfo("HCP: ");
va_start(ap,mes);
- _vShowMessage(MSG_NONE,mes,ap);
+ vShowMessage_(MSG_NONE,mes,ap);
va_end(ap);
ShowMessage("\n");
} else if ( fd > 0 ) {
diff --git a/src/map/clif.h b/src/map/clif.h
index e1af44881..48316427f 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_CLIF_H_
-#define _MAP_CLIF_H_
+#ifndef MAP_CLIF_H
+#define MAP_CLIF_H
#include <stdarg.h>
@@ -1290,4 +1290,4 @@ struct clif_interface *clif;
void clif_defaults(void);
-#endif /* _MAP_CLIF_H_ */
+#endif /* MAP_CLIF_H */
diff --git a/src/map/date.h b/src/map/date.h
index b3ed59b2f..c3f353f64 100644
--- a/src/map/date.h
+++ b/src/map/date.h
@@ -1,8 +1,8 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-#ifndef _MAP_DATE_H_
-#define _MAP_DATE_H_
+#ifndef MAP_DATE_H
+#define MAP_DATE_H
#include "../common/cbasetypes.h"
@@ -17,4 +17,4 @@ bool is_day_of_sun(void);
bool is_day_of_moon(void);
bool is_day_of_star(void);
-#endif /* _MAP_DATE_H_ */
+#endif /* MAP_DATE_H */
diff --git a/src/map/duel.h b/src/map/duel.h
index 91dfa8f83..de2bd1bf6 100644
--- a/src/map/duel.h
+++ b/src/map/duel.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_DUEL_H_
-#define _MAP_DUEL_H_
+#ifndef MAP_DUEL_H
+#define MAP_DUEL_H
#include "../common/cbasetypes.h"
@@ -46,4 +46,4 @@ struct duel_interface *duel;
void duel_defaults(void);
-#endif /* _MAP_DUEL_H_ */
+#endif /* MAP_DUEL_H */
diff --git a/src/map/elemental.h b/src/map/elemental.h
index beddd3ea1..0c8fff8b3 100644
--- a/src/map/elemental.h
+++ b/src/map/elemental.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_ELEMENTAL_H_
-#define _MAP_ELEMENTAL_H_
+#ifndef MAP_ELEMENTAL_H
+#define MAP_ELEMENTAL_H
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data
@@ -121,4 +121,4 @@ struct elemental_interface *elemental;
void elemental_defaults(void);
-#endif /* _MAP_ELEMENTAL_H_ */
+#endif /* MAP_ELEMENTAL_H */
diff --git a/src/map/guild.c b/src/map/guild.c
index 642c8993c..af29dc64e 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -2015,8 +2015,8 @@ int guild_castledatasave(int castle_id, int index, int value)
void guild_castle_reconnect_sub(void *key, void *data, va_list ap)
{
- int castle_id = GetWord((int)__64BPTRSIZE(key), 0);
- int index = GetWord((int)__64BPTRSIZE(key), 1);
+ int castle_id = GetWord((int)h64BPTRSIZE(key), 0);
+ int index = GetWord((int)h64BPTRSIZE(key), 1);
intif->guild_castle_datasave(castle_id, index, *(int *)data);
aFree(data);
}
@@ -2037,7 +2037,7 @@ void guild_castle_reconnect(int castle_id, int index, int value)
int *data;
CREATE(data, int, 1);
*data = value;
- linkdb_replace(&gc_save_pending, (void*)__64BPTRSIZE((MakeDWord(castle_id, index))), data);
+ linkdb_replace(&gc_save_pending, (void*)h64BPTRSIZE((MakeDWord(castle_id, index))), data);
}
}
diff --git a/src/map/guild.h b/src/map/guild.h
index f9d97241d..126325eef 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_GUILD_H_
-#define _MAP_GUILD_H_
+#ifndef MAP_GUILD_H
+#define MAP_GUILD_H
#include "map.h" // EVENT_NAME_LENGTH, TBL_PC
#include "../common/cbasetypes.h"
@@ -167,4 +167,4 @@ struct guild_interface *guild;
void guild_defaults(void);
-#endif /* _MAP_GUILD_H_ */
+#endif /* MAP_GUILD_H */
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index 9eef6af5b..25ccabf48 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_HOMUNCULUS_H_
-#define _MAP_HOMUNCULUS_H_
+#ifndef MAP_HOMUNCULUS_H
+#define MAP_HOMUNCULUS_H
#include "pc.h"
#include "status.h" // struct status_data, struct status_change
@@ -148,4 +148,4 @@ struct homunculus_interface *homun;
void homunculus_defaults(void);
-#endif /* _MAP_HOMUNCULUS_H_ */
+#endif /* MAP_HOMUNCULUS_H */
diff --git a/src/map/instance.h b/src/map/instance.h
index ae649eda7..2ee77d3e3 100644
--- a/src/map/instance.h
+++ b/src/map/instance.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_INSTANCE_H_
-#define _MAP_INSTANCE_H_
+#ifndef MAP_INSTANCE_H
+#define MAP_INSTANCE_H
#include "script.h" // struct reg_db
#include "../common/cbasetypes.h"
@@ -88,4 +88,4 @@ struct instance_interface *instance;
void instance_defaults(void);
-#endif /* _MAP_INSTANCE_H_ */
+#endif /* MAP_INSTANCE_H */
diff --git a/src/map/intif.c b/src/map/intif.c
index 4dd0fa448..432154f04 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -1067,7 +1067,7 @@ void intif_parse_Registers(int fd)
ival = RFIFOL(fd, cursor);
cursor += 4;
- script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, (void*)__64BPTRSIZE(ival), NULL);
+ script->set_reg(NULL,sd,reference_uid(script->add_str(key), index), key, (void*)h64BPTRSIZE(ival), NULL);
}
}
diff --git a/src/map/intif.h b/src/map/intif.h
index 42a38ad41..fe47d6537 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_INTIF_H_
-#define _MAP_INTIF_H_
+#ifndef MAP_INTIF_H
+#define MAP_INTIF_H
#include "../common/cbasetypes.h"
@@ -186,4 +186,4 @@ struct intif_interface *intif;
void intif_defaults(void);
-#endif /* _MAP_INTIF_H_ */
+#endif /* MAP_INTIF_H */
diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h
index 60f03fca5..0c26c3cd8 100644
--- a/src/map/irc-bot.h
+++ b/src/map/irc-bot.h
@@ -3,8 +3,8 @@
// Base Author: shennetsind @ http://hercules.ws
-#ifndef _MAP_IRC_BOT_H_
-#define _MAP_IRC_BOT_H_
+#ifndef MAP_IRC_BOT_H
+#define MAP_IRC_BOT_H
#include "../common/cbasetypes.h"
@@ -63,4 +63,4 @@ struct irc_bot_interface *ircbot;
void ircbot_defaults(void);
-#endif /* _MAP_IRC_BOT_H_ */
+#endif /* MAP_IRC_BOT_H */
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index 246ca1f54..2ad596ce1 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_ITEMDB_H_
-#define _MAP_ITEMDB_H_
+#ifndef MAP_ITEMDB_H
+#define MAP_ITEMDB_H
#include "map.h"
#include "../common/cbasetypes.h"
@@ -609,4 +609,4 @@ struct itemdb_interface *itemdb;
void itemdb_defaults(void);
-#endif /* _MAP_ITEMDB_H_ */
+#endif /* MAP_ITEMDB_H */
diff --git a/src/map/log.h b/src/map/log.h
index ecfedeac2..6ab142f87 100644
--- a/src/map/log.h
+++ b/src/map/log.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_LOG_H_
-#define _MAP_LOG_H_
+#ifndef MAP_LOG_H
+#define MAP_LOG_H
#include "../common/cbasetypes.h"
#include "../common/sql.h"
@@ -133,4 +133,4 @@ struct log_interface *logs;
void log_defaults(void);
-#endif /* _MAP_LOG_H_ */
+#endif /* MAP_LOG_H */
diff --git a/src/map/mail.h b/src/map/mail.h
index 30b032ef4..64b0f9779 100644
--- a/src/map/mail.h
+++ b/src/map/mail.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_MAIL_H_
-#define _MAP_MAIL_H_
+#ifndef MAP_MAIL_H
+#define MAP_MAIL_H
#include "../common/cbasetypes.h"
@@ -27,4 +27,4 @@ struct mail_interface *mail;
void mail_defaults(void);
-#endif /* _MAP_MAIL_H_ */
+#endif /* MAP_MAIL_H */
diff --git a/src/map/map.h b/src/map/map.h
index 38167597a..35fe0d7e1 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_MAP_H_
-#define _MAP_MAP_H_
+#ifndef MAP_MAP_H
+#define MAP_MAP_H
#include <stdarg.h>
@@ -342,7 +342,7 @@ struct flooritem_data {
struct item item_data;
};
-enum _sp {
+enum status_point_types {
SP_SPEED,SP_BASEEXP,SP_JOBEXP,SP_KARMA,SP_MANNER,SP_HP,SP_MAXHP,SP_SP, // 0-7
SP_MAXSP,SP_STATUSPOINT,SP_0a,SP_BASELEVEL,SP_SKILLPOINT,SP_STR,SP_AGI,SP_VIT, // 8-15
SP_INT,SP_DEX,SP_LUK,SP_CLASS,SP_ZENY,SP_SEX,SP_NEXTBASEEXP,SP_NEXTJOBEXP, // 16-23
@@ -415,7 +415,7 @@ enum _sp {
SP_LAST_KNOWN,
};
-enum _look {
+enum look {
LOOK_BASE,
LOOK_HAIR,
LOOK_WEAPON,
@@ -1071,4 +1071,4 @@ struct map_interface *map;
void map_defaults(void);
-#endif /* _MAP_MAP_H_ */
+#endif /* MAP_MAP_H */
diff --git a/src/map/mapreg.h b/src/map/mapreg.h
index 2aa2943a2..59d226cda 100644
--- a/src/map/mapreg.h
+++ b/src/map/mapreg.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_MAPREG_H_
-#define _MAP_MAPREG_H_
+#ifndef MAP_MAPREG_H
+#define MAP_MAPREG_H
#include "script.h" // struct reg_db
#include "../common/cbasetypes.h"
@@ -50,4 +50,4 @@ struct mapreg_interface *mapreg;
void mapreg_defaults(void);
-#endif /* _MAP_MAPREG_H_ */
+#endif /* MAP_MAPREG_H */
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index 22399e289..270245e96 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -1,8 +1,8 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_MERCENARY_H_
-#define _MAP_MERCENARY_H_
+#ifndef MAP_MERCENARY_H
+#define MAP_MERCENARY_H
#include "status.h" // struct status_data, struct status_change
#include "unit.h" // struct unit_data
@@ -99,4 +99,4 @@ struct mercenary_interface *mercenary;
void mercenary_defaults(void);
-#endif /* _MAP_MERCENARY_H_ */
+#endif /* MAP_MERCENARY_H */
diff --git a/src/map/mob.h b/src/map/mob.h
index 7e222fa74..c8d43dbb2 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_MOB_H_
-#define _MAP_MOB_H_
+#ifndef MAP_MOB_H
+#define MAP_MOB_H
#include "map.h" // struct status_data, struct view_data, struct mob_skill
#include "status.h" // struct status_data, struct status_change
@@ -363,4 +363,4 @@ struct mob_interface *mob;
void mob_defaults(void);
-#endif /* _MAP_MOB_H_ */
+#endif /* MAP_MOB_H */
diff --git a/src/map/npc.c b/src/map/npc.c
index bfac2b9d5..417aa6c61 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3368,7 +3368,7 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c
}
}
- script->setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)__64BPTRSIZE(j), NULL);
+ script->setd_sub(st, NULL, ".@atcmd_numparameters", 0, (void *)h64BPTRSIZE(j), NULL);
aFree(temp);
script->run_main(st);
diff --git a/src/map/npc.h b/src/map/npc.h
index 06a9312b5..4c904e1ac 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_NPC_H_
-#define _MAP_NPC_H_
+#ifndef MAP_NPC_H
+#define MAP_NPC_H
#include "map.h" // struct block_list
#include "status.h" // struct status_change
@@ -347,4 +347,4 @@ struct pcre_interface *libpcre;
void npc_chat_defaults(void);
#endif
-#endif /* _MAP_NPC_H_ */
+#endif /* MAP_NPC_H */
diff --git a/src/map/packets.h b/src/map/packets.h
index e995643d4..810f341d4 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -3,8 +3,8 @@
//Included directly by clif.h in packet_loaddb()
-#ifndef _MAP_PACKETS_H_
-#define _MAP_PACKETS_H_
+#ifndef MAP_PACKETS_H
+#define MAP_PACKETS_H
#ifndef packet
#define packet(a,b,...)
@@ -3002,4 +3002,4 @@ packet(0x020d,-1);
packetKeys(OBFUSCATIONKEY1,OBFUSCATIONKEY2,OBFUSCATIONKEY3);
#endif
-#endif /* _MAP_PACKETS_H_ */
+#endif /* MAP_PACKETS_H */
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 403ab6fa3..55ab0c66a 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -3,8 +3,8 @@
/* Hercules Renewal: Phase Two http://hercules.ws/board/topic/383-hercules-renewal-phase-two/ */
-#ifndef _MAP_PACKETS_STRUCT_H_
-#define _MAP_PACKETS_STRUCT_H_
+#ifndef MAP_PACKETS_STRUCT_H
+#define MAP_PACKETS_STRUCT_H
#include "../common/mmo.h"
@@ -962,4 +962,4 @@ struct packet_wis_end {
#pragma pack(pop)
#endif // not NetBSD < 6 / Solaris
-#endif /* _MAP_PACKETS_STRUCT_H_ */
+#endif /* MAP_PACKETS_STRUCT_H */
diff --git a/src/map/party.h b/src/map/party.h
index 1c58301d1..d62db23a7 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_PARTY_H_
-#define _MAP_PARTY_H_
+#ifndef MAP_PARTY_H
+#define MAP_PARTY_H
#include <stdarg.h>
@@ -143,4 +143,4 @@ struct party_interface *party;
void party_defaults(void);
-#endif /* _MAP_PARTY_H_ */
+#endif /* MAP_PARTY_H */
diff --git a/src/map/path.h b/src/map/path.h
index b48ff05fb..8d02e6558 100644
--- a/src/map/path.h
+++ b/src/map/path.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_PATH_H_
-#define _MAP_PATH_H_
+#ifndef MAP_PATH_H
+#define MAP_PATH_H
#include "map.h" // enum cell_chk
#include "../common/cbasetypes.h"
@@ -47,4 +47,4 @@ struct path_interface *path;
void path_defaults(void);
-#endif /* _MAP_PATH_H_ */
+#endif /* MAP_PATH_H */
diff --git a/src/map/pc.c b/src/map/pc.c
index b8b6cda46..104a3cde0 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6230,7 +6230,7 @@ int pc_maxparameterincrease(struct map_session_data* sd, int type) {
* Subtracts status points according to the cost of the increased stat points.
*
* @param sd The target character.
- * @param type The stat to change (see enum _sp)
+ * @param type The stat to change (see enum status_point_types)
* @param increase The stat increase (strictly positive) amount.
* @retval true if the stat was increased by any amount.
* @retval false if there were no changes.
@@ -6289,7 +6289,7 @@ bool pc_statusup(struct map_session_data* sd, int type, int increase) {
* Does not subtract status points for the cost of the modified stat points.
*
* @param sd The target character.
- * @param type The stat to change (see enum _sp)
+ * @param type The stat to change (see enum status_point_types)
* @param val The stat increase (or decrease) amount.
* @return the stat increase amount.
* @retval 0 if no changes were made.
diff --git a/src/map/pc.h b/src/map/pc.h
index 1789a8a7b..f33127036 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_PC_H_
-#define _MAP_PC_H_
+#ifndef MAP_PC_H
+#define MAP_PC_H
#include "../config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT
@@ -1026,4 +1026,4 @@ struct pc_interface *pc;
void pc_defaults(void);
-#endif /* _MAP_PC_H_ */
+#endif /* MAP_PC_H */
diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h
index 7c8cdd82a..f52e2ba22 100644
--- a/src/map/pc_groups.h
+++ b/src/map/pc_groups.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_PC_GROUPS_H_
-#define _MAP_PC_GROUPS_H_
+#ifndef MAP_PC_GROUPS_H
+#define MAP_PC_GROUPS_H
#include "../common/cbasetypes.h"
#include "../common/conf.h"
@@ -96,4 +96,4 @@ struct pc_groups_interface *pcg;
void pc_groups_defaults(void);
-#endif /* _MAP_PC_GROUPS_H_ */
+#endif /* MAP_PC_GROUPS_H */
diff --git a/src/map/pet.h b/src/map/pet.h
index 8dde0fac2..5c890ef85 100644
--- a/src/map/pet.h
+++ b/src/map/pet.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_PET_H_
-#define _MAP_PET_H_
+#ifndef MAP_PET_H
+#define MAP_PET_H
#include "map.h" // struct block_list
#include "status.h" // enum sc_type
@@ -158,4 +158,4 @@ struct pet_interface *pet;
void pet_defaults(void);
-#endif /* _MAP_PET_H_ */
+#endif /* MAP_PET_H */
diff --git a/src/map/quest.h b/src/map/quest.h
index 87894d639..9d617e369 100644
--- a/src/map/quest.h
+++ b/src/map/quest.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_QUEST_H_
-#define _MAP_QUEST_H_
+#ifndef MAP_QUEST_H
+#define MAP_QUEST_H
#include "map.h" // TBL_PC
#include "../common/cbasetypes.h"
@@ -52,4 +52,4 @@ struct quest_interface *quest;
void quest_defaults(void);
-#endif /* _MAP_QUEST_H_ */
+#endif /* MAP_QUEST_H */
diff --git a/src/map/script.c b/src/map/script.c
index c7e1dc1d2..8fb3975f8 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -1502,9 +1502,9 @@ const char* parse_syntax(const char* p)
script->set_label(l,script->pos,p);
}
// check duplication of case label [Rayce]
- if(linkdb_search(&script->syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v)) != NULL)
+ if(linkdb_search(&script->syntax.curly[pos].case_label, (void*)h64BPTRSIZE(v)) != NULL)
disp_error_message("parse_syntax: dup 'case'",p);
- linkdb_insert(&script->syntax.curly[pos].case_label, (void*)__64BPTRSIZE(v), (void*)1);
+ linkdb_insert(&script->syntax.curly[pos].case_label, (void*)h64BPTRSIZE(v), (void*)1);
sprintf(label,"set $@__SW%x_VAL,0;",script->syntax.curly[pos].index);
script->syntax.curly[script->syntax.curly_count++].type = TYPE_NULL;
@@ -2627,7 +2627,7 @@ void* get_val2(struct script_state* st, int64 uid, struct reg_db *ref) {
script->push_val(st->stack, C_NAME, uid, ref);
data = script_getdatatop(st, -1);
script->get_val(st, data);
- return (data->type == C_INT ? (void*)__64BPTRSIZE((int32)data->u.num) : (void*)__64BPTRSIZE(data->u.str)); // u.num is int32 because it comes from script->get_val
+ return (data->type == C_INT ? (void*)h64BPTRSIZE((int32)data->u.num) : (void*)h64BPTRSIZE(data->u.str)); // u.num is int32 because it comes from script->get_val
}
/**
* Because, currently, array members with key 0 are indifferenciable from normal variables, we should ensure its actually in
@@ -2648,7 +2648,7 @@ void script_array_ensure_zero(struct script_state *st, struct map_session_data *
insert = true;
script_removetop(st, -1, 0);
} else {
- int32 num = (int32)__64BPTRSIZE(script->get_val2(st, uid, ref));
+ int32 num = (int32)h64BPTRSIZE(script->get_val2(st, uid, ref));
if( num )
insert = true;
script_removetop(st, -1, 0);
@@ -2917,7 +2917,7 @@ int set_reg(struct script_state* st, TBL_PC* sd, int64 num, const char* name, co
} else {// integer variable
// FIXME: This isn't safe, in 32bits systems we're converting a 64bit pointer
// to a 32bit int, this will lead to overflows! [Panikon]
- int val = (int)__64BPTRSIZE(value);
+ int val = (int)h64BPTRSIZE(value);
if(script->str_data[script_getvarid(num)].type == C_PARAM) {
if( pc->setparam(sd, script->str_data[script_getvarid(num)].val, val) == 0 ) {
@@ -5665,7 +5665,7 @@ BUILDIN(input)
else
{
int amount = sd->npc_amount;
- script->set_reg(st, sd, uid, name, (void*)__64BPTRSIZE(cap_value(amount,min,max)), script_getref(st,2));
+ script->set_reg(st, sd, uid, name, (void*)h64BPTRSIZE(cap_value(amount,min,max)), script_getref(st,2));
script_pushint(st, (amount > max ? 1 : amount < min ? -1 : 0));
}
st->state = RUN;
@@ -5753,7 +5753,7 @@ BUILDIN(setr) {
if( is_string_variable(name) )
script->set_reg(st,sd,num,name,(void*)script_getstr(st,3),script_getref(st,2));
else
- script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(script_getnum(st,3)),script_getref(st,2));
+ script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(script_getnum(st,3)),script_getref(st,2));
return true;
}
@@ -5808,7 +5808,7 @@ BUILDIN(setarray)
else
{// int array
for( i = 3; start < end; ++start, ++i )
- script->set_reg(st, sd, reference_uid(id, start), name, (void*)__64BPTRSIZE(script_getnum(st,i)), reference_getref(data));
+ script->set_reg(st, sd, reference_uid(id, start), name, (void*)h64BPTRSIZE(script_getnum(st,i)), reference_getref(data));
}
return true;
}
@@ -5850,7 +5850,7 @@ BUILDIN(cleararray)
if( is_string_variable(name) )
v = (void*)script_getstr(st, 3);
else
- v = (void*)__64BPTRSIZE(script_getnum(st, 3));
+ v = (void*)h64BPTRSIZE(script_getnum(st, 3));
end = start + script_getnum(st, 4);
if( end > SCRIPT_MAX_ARRAYSIZE )
@@ -6425,9 +6425,9 @@ BUILDIN(checkweight2)
slots = pc->inventoryblank(sd);
for(i=0; i<nb_it; i++) {
- nameid = (int32)__64BPTRSIZE(script->get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it)));
+ nameid = (int32)h64BPTRSIZE(script->get_val2(st,reference_uid(id_it,idx_it+i),reference_getref(data_it)));
script_removetop(st, -1, 0);
- amount = (int32)__64BPTRSIZE(script->get_val2(st,reference_uid(id_nb,idx_nb+i),reference_getref(data_nb)));
+ amount = (int32)h64BPTRSIZE(script->get_val2(st,reference_uid(id_nb,idx_nb+i),reference_getref(data_nb)));
script_removetop(st, -1, 0);
if(fail) continue; //cpntonie to depop rest
@@ -12412,18 +12412,18 @@ BUILDIN(undisguise)
}
/*==========================================
- * Transform a bl to another _class,
+ * Transform a bl to another class,
* @type unused
*------------------------------------------*/
BUILDIN(classchange) {
- int _class,type;
+ int class_,type;
struct block_list *bl=map->id2bl(st->oid);
if(bl==NULL) return true;
- _class=script_getnum(st,2);
+ class_=script_getnum(st,2);
type=script_getnum(st,3);
- clif->class_change(bl,_class,type);
+ clif->class_change(bl,class_,type);
return true;
}
@@ -13439,7 +13439,7 @@ BUILDIN(getmapxy)
sd=script->rid2sd(st);
else
sd=NULL;
- script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(x),script_getref(st,3));
+ script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(x),script_getref(st,3));
//Set MapY
num=st->stack->stack_data[st->start+4].u.num;
@@ -13450,7 +13450,7 @@ BUILDIN(getmapxy)
sd=script->rid2sd(st);
else
sd=NULL;
- script->set_reg(st,sd,num,name,(void*)__64BPTRSIZE(y),script_getref(st,4));
+ script->set_reg(st,sd,num,name,(void*)h64BPTRSIZE(y),script_getref(st,4));
//Return Success value
script_pushint(st,0);
@@ -13476,7 +13476,7 @@ BUILDIN(logmes)
BUILDIN(summon)
{
- int _class, timeout=0;
+ int class_, timeout=0;
const char *str,*event="";
TBL_PC *sd;
struct mob_data *md;
@@ -13486,7 +13486,7 @@ BUILDIN(summon)
if (!sd) return true;
str = script_getstr(st,2);
- _class = script_getnum(st,3);
+ class_ = script_getnum(st,3);
if( script_hasdata(st,4) )
timeout=script_getnum(st,4);
if( script_hasdata(st,5) ) {
@@ -13496,7 +13496,7 @@ BUILDIN(summon)
clif->skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick);
- md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, _class, event, SZ_MEDIUM, AI_NONE);
+ md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, class_, event, SZ_MEDIUM, AI_NONE);
if (md) {
md->master_id=sd->bl.id;
md->special_state.ai = AI_ATTACK;
@@ -14400,7 +14400,7 @@ BUILDIN(sscanf) {
if(sscanf(str, buf, &ref_int)==0) {
break;
}
- script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)__64BPTRSIZE(ref_int), reference_getref(data));
+ script->set_reg(st, sd, reference_uid( reference_getid(data), reference_getindex(data) ), buf_p, (void *)h64BPTRSIZE(ref_int), reference_getref(data));
}
arg++;
@@ -14767,7 +14767,7 @@ BUILDIN(setd)
if( is_string_variable(varname) ) {
script->setd_sub(st, sd, varname, elem, (void *)script_getstr(st, 3), NULL);
} else {
- script->setd_sub(st, sd, varname, elem, (void *)__64BPTRSIZE(script_getnum(st, 3)), NULL);
+ script->setd_sub(st, sd, varname, elem, (void *)h64BPTRSIZE(script_getnum(st, 3)), NULL);
}
return true;
@@ -14841,7 +14841,7 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
if( is_string_variable(name) )
script->setd_sub(st, sd, name, i, (void *)(str?str:""), reference_getref(data));
else
- script->setd_sub(st, sd, name, i, (void *)__64BPTRSIZE((str?atoi(str):0)), reference_getref(data));
+ script->setd_sub(st, sd, name, i, (void *)h64BPTRSIZE((str?atoi(str):0)), reference_getref(data));
}
}
if( i == max_rows && max_rows < SQL->NumRows(handle) ) {
@@ -15395,7 +15395,7 @@ BUILDIN(searchitem)
for( i = 0; i < count; ++start, ++i )
{// Set array
- void* v = (void*)__64BPTRSIZE((int)items[i]->nameid);
+ void* v = (void*)h64BPTRSIZE((int)items[i]->nameid);
script->set_reg(st, sd, reference_uid(id, start), name, v, reference_getref(data));
}
diff --git a/src/map/script.h b/src/map/script.h
index bb6cd6e11..48abf1487 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_SCRIPT_H_
-#define _MAP_SCRIPT_H_
+#ifndef MAP_SCRIPT_H
+#define MAP_SCRIPT_H
#include <errno.h>
#include <setjmp.h>
@@ -715,4 +715,4 @@ struct script_interface *script;
void script_defaults(void);
-#endif /* _MAP_SCRIPT_H_ */
+#endif /* MAP_SCRIPT_H */
diff --git a/src/map/searchstore.h b/src/map/searchstore.h
index c9b93ba54..d8abde615 100644
--- a/src/map/searchstore.h
+++ b/src/map/searchstore.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_SEARCHSTORE_H_
-#define _MAP_SEARCHSTORE_H_
+#ifndef MAP_SEARCHSTORE_H
+#define MAP_SEARCHSTORE_H
#include <time.h>
@@ -99,4 +99,4 @@ struct searchstore_interface *searchstore;
void searchstore_defaults (void);
-#endif /* _MAP_SEARCHSTORE_H_ */
+#endif /* MAP_SEARCHSTORE_H */
diff --git a/src/map/skill.h b/src/map/skill.h
index 6666fbbf2..70e5f4911 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_SKILL_H_
-#define _MAP_SKILL_H_
+#ifndef MAP_SKILL_H
+#define MAP_SKILL_H
#include "../config/core.h" // RENEWAL_CAST
@@ -2021,4 +2021,4 @@ struct skill_interface *skill;
void skill_defaults(void);
-#endif /* _MAP_SKILL_H_ */
+#endif /* MAP_SKILL_H */
diff --git a/src/map/status.h b/src/map/status.h
index 13d0a7841..bed0d9fbf 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_STATUS_H_
-#define _MAP_STATUS_H_
+#ifndef MAP_STATUS_H
+#define MAP_STATUS_H
#include "../config/core.h" // defType, RENEWAL, RENEWAL_ASPD
@@ -2047,4 +2047,4 @@ struct status_interface *status;
void status_defaults(void);
-#endif /* _MAP_STATUS_H_ */
+#endif /* MAP_STATUS_H */
diff --git a/src/map/storage.c b/src/map/storage.c
index f2f0d8986..217f14a3a 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -31,10 +31,10 @@ struct guild_storage_interface gstorage_s;
/*==========================================
* Sort items in the warehouse
*------------------------------------------*/
-int storage_comp_item(const void *_i1, const void *_i2)
+int storage_comp_item(const void *i1_, const void *i2_)
{
- struct item *i1 = (struct item *)_i1;
- struct item *i2 = (struct item *)_i2;
+ struct item *i1 = (struct item *)i1_;
+ struct item *i2 = (struct item *)i2_;
if (i1->nameid == i2->nameid)
return 0;
diff --git a/src/map/storage.h b/src/map/storage.h
index 5edb68cfc..186f21263 100644
--- a/src/map/storage.h
+++ b/src/map/storage.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_STORAGE_H_
-#define _MAP_STORAGE_H_
+#ifndef MAP_STORAGE_H
+#define MAP_STORAGE_H
#include "../common/cbasetypes.h"
#include "../common/db.h"
@@ -25,7 +25,7 @@ struct storage_interface {
int (*gettocart) (struct map_session_data *sd,int index,int amount);
void (*close) (struct map_session_data *sd);
void (*pc_quit) (struct map_session_data *sd, int flag);
- int (*comp_item) (const void *_i1, const void *_i2);
+ int (*comp_item) (const void *i1_, const void *i2_);
void (*sortitem) (struct item* items, unsigned int size);
int (*reconnect_sub) (DBKey key, DBData *data, va_list ap);
};
@@ -60,4 +60,4 @@ struct guild_storage_interface *gstorage;
void storage_defaults(void);
void gstorage_defaults(void);
-#endif /* _MAP_STORAGE_H_ */
+#endif /* MAP_STORAGE_H */
diff --git a/src/map/trade.h b/src/map/trade.h
index 143f26d74..f91ccd4a2 100644
--- a/src/map/trade.h
+++ b/src/map/trade.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_TRADE_H_
-#define _MAP_TRADE_H_
+#ifndef MAP_TRADE_H
+#define MAP_TRADE_H
//Max distance from traders to enable a trade to take place.
//TODO: battle_config candidate?
@@ -27,4 +27,4 @@ struct trade_interface *trade;
void trade_defaults(void);
-#endif /* _MAP_TRADE_H_ */
+#endif /* MAP_TRADE_H */
diff --git a/src/map/unit.h b/src/map/unit.h
index f29a6903a..9b95bae41 100644
--- a/src/map/unit.h
+++ b/src/map/unit.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_UNIT_H_
-#define _MAP_UNIT_H_
+#ifndef MAP_UNIT_H
+#define MAP_UNIT_H
#include "clif.h" // clr_type
#include "path.h" // struct walkpath_data
@@ -124,4 +124,4 @@ struct unit_interface *unit;
void unit_defaults(void);
-#endif /* _MAP_UNIT_H_ */
+#endif /* MAP_UNIT_H */
diff --git a/src/map/vending.h b/src/map/vending.h
index b65e888e3..63cb632a9 100644
--- a/src/map/vending.h
+++ b/src/map/vending.h
@@ -2,8 +2,8 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _MAP_VENDING_H_
-#define _MAP_VENDING_H_
+#ifndef MAP_VENDING_H
+#define MAP_VENDING_H
#include "../common/cbasetypes.h"
#include "../common/db.h"
@@ -36,4 +36,4 @@ struct vending_interface *vending;
void vending_defaults(void);
-#endif /* _MAP_VENDING_H_ */
+#endif /* MAP_VENDING_H */
diff --git a/tools/HPMHookGen/HPMDataCheckGen.pl b/tools/HPMHookGen/HPMDataCheckGen.pl
index a79811c47..7ec1ba7e4 100644
--- a/tools/HPMHookGen/HPMDataCheckGen.pl
+++ b/tools/HPMHookGen/HPMDataCheckGen.pl
@@ -24,7 +24,7 @@ foreach my $file (@files) {
my @filepath = split(/[\/\\]/, $data->{compounddef}->{location}->{file});
my $foldername = uc($filepath[-2]);
my $filename = uc($filepath[-1]); $filename =~ s/-/_/g; $filename =~ s/\.[^.]*$//;
- my $name = "_${foldername}_${filename}_H_";
+ my $name = "${foldername}_${filename}_H";
push @{ $out{$name} }, $data->{compounddef}->{compoundname};
}
@@ -37,8 +37,8 @@ print FH <<"EOF";
//
// NOTE: This file was auto-generated and should never be manually edited,
// as it will get overwritten.
-#ifndef _HPM_DATA_CHECK_H_
-#define _HPM_DATA_CHECK_H_
+#ifndef HPM_DATA_CHECK_H
+#define HPM_DATA_CHECK_H
HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
@@ -63,6 +63,6 @@ print FH <<"EOF";
};
HPExport unsigned int HPMDataCheckLen = ARRAYLENGTH(HPMDataCheck);
-#endif /* _HPM_DATA_CHECK_H_ */
+#endif /* HPM_DATA_CHECK_H */
EOF
close(FH);