summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Hercules-14.sln64
-rw-r--r--Makefile.in6
-rw-r--r--conf/inter-server.conf12
-rw-r--r--conf/network.conf37
-rw-r--r--conf/subnet.conf6
-rwxr-xr-xconfigure165
-rw-r--r--configure.in84
-rw-r--r--doc/script_commands.txt61
-rw-r--r--npc/cities/veins.txt2
-rw-r--r--npc/dev/ci_test.txt22
-rw-r--r--npc/kafras/kafras.txt2
-rw-r--r--npc/mobs/jail.txt2
-rw-r--r--npc/other/arena/arena_party.txt2
-rw-r--r--npc/other/books.txt2
-rw-r--r--npc/quests/gunslinger_quests.txt2
-rw-r--r--npc/quests/lvl4_weapon_quest.txt4
-rw-r--r--npc/quests/newgears/2006_headgears.txt2
-rw-r--r--npc/quests/quests_13_1.txt4
-rw-r--r--npc/quests/quests_lighthalzen.txt2
-rw-r--r--npc/quests/quests_veins.txt2
-rw-r--r--npc/re/cities/dewata.txt12
-rw-r--r--npc/re/jobs/2e/kagerou_oboro.txt4
-rw-r--r--npc/re/merchants/enchan_ko.txt2
-rw-r--r--npc/re/quests/eden/eden_quests.txt2
-rw-r--r--npc/re/quests/newgears/2012_headgears.txt2
-rw-r--r--npc/re/quests/quests_dicastes.txt2
-rw-r--r--npc/re/quests/quests_eclage.txt62
-rw-r--r--npc/re/quests/quests_malaya.txt2
-rw-r--r--npc/re/quests/quests_mora.txt2
-rw-r--r--npc/warps/dungeons/lhz_dun.txt2
-rw-r--r--npc/warps/fields/jawaii.txt2
-rw-r--r--npc/woe-fe/agit_main.txt2
-rw-r--r--npc/woe-fe/aldeg_cas01.txt4
-rw-r--r--npc/woe-fe/aldeg_cas03.txt4
-rw-r--r--npc/woe-fe/gefg_cas03.txt2
-rw-r--r--npc/woe-fe/prtg_cas02.txt16
-rw-r--r--sql-files/main.sql21
-rw-r--r--sql-files/upgrades/2015-07-08--13-08.sql6
-rw-r--r--sql-files/upgrades/index.txt3
-rw-r--r--src/char/HPMchar.c10
-rw-r--r--src/char/char.c325
-rw-r--r--src/char/char.h120
-rw-r--r--src/char/geoip.c1
-rw-r--r--src/char/geoip.h6
-rw-r--r--src/char/int_auction.c1
-rw-r--r--src/char/int_auction.h11
-rw-r--r--src/char/int_elemental.c1
-rw-r--r--src/char/int_elemental.h12
-rw-r--r--src/char/int_guild.c1
-rw-r--r--src/char/int_guild.h10
-rw-r--r--src/char/int_homun.c1
-rw-r--r--src/char/int_homun.h14
-rw-r--r--src/char/int_mail.c1
-rw-r--r--src/char/int_mail.h12
-rw-r--r--src/char/int_mercenary.c1
-rw-r--r--src/char/int_mercenary.h12
-rw-r--r--src/char/int_party.c1
-rw-r--r--src/char/int_party.h11
-rw-r--r--src/char/int_pet.c1
-rw-r--r--src/char/int_pet.h12
-rw-r--r--src/char/int_quest.c1
-rw-r--r--src/char/int_quest.h16
-rw-r--r--src/char/int_storage.c1
-rw-r--r--src/char/int_storage.h12
-rw-r--r--src/char/inter.c9
-rw-r--r--src/char/inter.h18
-rw-r--r--src/char/loginif.c12
-rw-r--r--src/char/loginif.h6
-rw-r--r--src/char/mapif.c1
-rw-r--r--src/char/mapif.h6
-rw-r--r--src/char/pincode.c1
-rw-r--r--src/char/pincode.h6
-rw-r--r--src/common/HPM.c584
-rw-r--r--src/common/HPM.h7
-rw-r--r--src/common/HPMDataCheck.h18
-rw-r--r--src/common/HPMSymbols.inc.h451
-rw-r--r--src/common/HPMi.h66
-rw-r--r--src/common/Makefile.in6
-rw-r--r--src/common/cbasetypes.h2
-rw-r--r--src/common/conf.c2
-rw-r--r--src/common/conf.h20
-rw-r--r--src/common/console.c75
-rw-r--r--src/common/console.h8
-rw-r--r--src/common/core.c26
-rw-r--r--src/common/core.h48
-rw-r--r--src/common/db.c1
-rw-r--r--src/common/db.h8
-rw-r--r--src/common/hercules.h23
-rw-r--r--src/common/malloc.c1
-rw-r--r--src/common/malloc.h17
-rw-r--r--src/common/mapindex.c3
-rw-r--r--src/common/mapindex.h8
-rw-r--r--src/common/nullpo.c13
-rw-r--r--src/common/nullpo.h6
-rw-r--r--src/common/showmsg.c150
-rw-r--r--src/common/showmsg.h79
-rw-r--r--src/common/socket.c476
-rw-r--r--src/common/socket.h101
-rw-r--r--src/common/sql.c1
-rw-r--r--src/common/sql.h6
-rw-r--r--src/common/strlib.c120
-rw-r--r--src/common/strlib.h87
-rw-r--r--src/common/sysinfo.c6
-rw-r--r--src/common/sysinfo.h6
-rw-r--r--src/common/timer.c1
-rw-r--r--src/common/timer.h6
-rw-r--r--src/common/utils.c1
-rw-r--r--src/common/utils.h12
-rw-r--r--src/login/HPMlogin.c10
-rw-r--r--src/login/login.c219
-rw-r--r--src/login/login.h28
-rw-r--r--src/login/loginlog_sql.c4
-rw-r--r--src/map/HPMmap.c8
-rw-r--r--src/map/atcommand.c23
-rw-r--r--src/map/atcommand.h6
-rw-r--r--src/map/battle.c3
-rw-r--r--src/map/battle.h12
-rw-r--r--src/map/battleground.c1
-rw-r--r--src/map/battleground.h6
-rw-r--r--src/map/buyingstore.c1
-rw-r--r--src/map/buyingstore.h6
-rw-r--r--src/map/channel.c3
-rw-r--r--src/map/channel.h6
-rw-r--r--src/map/chat.c1
-rw-r--r--src/map/chat.h6
-rw-r--r--src/map/chrif.c79
-rw-r--r--src/map/chrif.h6
-rw-r--r--src/map/clif.c122
-rw-r--r--src/map/clif.h16
-rw-r--r--src/map/duel.c1
-rw-r--r--src/map/duel.h6
-rw-r--r--src/map/elemental.c7
-rw-r--r--src/map/elemental.h6
-rw-r--r--src/map/guild.c1
-rw-r--r--src/map/guild.h6
-rw-r--r--src/map/homunculus.c84
-rw-r--r--src/map/homunculus.h13
-rw-r--r--src/map/instance.c3
-rw-r--r--src/map/instance.h6
-rw-r--r--src/map/intif.c9
-rw-r--r--src/map/intif.h6
-rw-r--r--src/map/irc-bot.c17
-rw-r--r--src/map/irc-bot.h6
-rw-r--r--src/map/itemdb.c11
-rw-r--r--src/map/itemdb.h6
-rw-r--r--src/map/log.c1
-rw-r--r--src/map/log.h6
-rw-r--r--src/map/mail.c1
-rw-r--r--src/map/mail.h6
-rw-r--r--src/map/map.c117
-rw-r--r--src/map/map.h20
-rw-r--r--src/map/mapreg.h6
-rw-r--r--src/map/mapreg_sql.c1
-rw-r--r--src/map/mercenary.c8
-rw-r--r--src/map/mercenary.h8
-rw-r--r--src/map/mob.c9
-rw-r--r--src/map/mob.h10
-rw-r--r--src/map/npc.c49
-rw-r--r--src/map/npc.h13
-rw-r--r--src/map/npc_chat.c4
-rw-r--r--src/map/party.c1
-rw-r--r--src/map/party.h6
-rw-r--r--src/map/path.c1
-rw-r--r--src/map/path.h6
-rw-r--r--src/map/pc.c164
-rw-r--r--src/map/pc.h11
-rw-r--r--src/map/pc_groups.c1
-rw-r--r--src/map/pc_groups.h6
-rw-r--r--src/map/pet.c3
-rw-r--r--src/map/pet.h6
-rw-r--r--src/map/quest.c4
-rw-r--r--src/map/quest.h8
-rw-r--r--src/map/script.c77
-rw-r--r--src/map/script.h14
-rw-r--r--src/map/searchstore.c1
-rw-r--r--src/map/searchstore.h6
-rw-r--r--src/map/skill.c694
-rw-r--r--src/map/skill.h36
-rw-r--r--src/map/status.c804
-rw-r--r--src/map/status.h35
-rw-r--r--src/map/storage.c3
-rw-r--r--src/map/storage.h8
-rw-r--r--src/map/trade.c5
-rw-r--r--src/map/trade.h6
-rw-r--r--src/map/unit.c1
-rw-r--r--src/map/unit.h12
-rw-r--r--src/map/vending.c1
-rw-r--r--src/map/vending.h6
-rw-r--r--src/plugins/HPMHooking.c27
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc22
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc985
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc259
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc6507
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.sources.inc17
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc7
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc948
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc249
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc6265
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.sources.inc16
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc45
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc997
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc262
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc6614
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.sources.inc17
-rw-r--r--src/plugins/db2sql.c17
-rw-r--r--src/plugins/dbghelpplug.c6
-rw-r--r--src/plugins/sample.c49
-rw-r--r--src/plugins/script_mapquit.c45
-rw-r--r--tools/HPMHookGen/HPMDataCheckGen.pl17
-rwxr-xr-xtools/HPMHookGen/HPMHookGen.pl130
-rw-r--r--tools/HPMHookGen/doxygen.conf2
-rwxr-xr-xtravis.sh28
-rw-r--r--vcproj-14/char-server.vcxproj230
-rw-r--r--vcproj-14/char-server.vcxproj.filters294
-rw-r--r--vcproj-14/login-server.vcxproj209
-rw-r--r--vcproj-14/login-server.vcxproj.filters222
-rw-r--r--vcproj-14/map-server.vcxproj297
-rw-r--r--vcproj-14/map-server.vcxproj.filters454
-rw-r--r--vcproj-14/mapcache.vcxproj160
-rw-r--r--vcproj-14/mapcache.vcxproj.filters88
-rw-r--r--vcproj-14/plugin-HPMHooking_char.vcxproj120
-rw-r--r--vcproj-14/plugin-HPMHooking_login.vcxproj120
-rw-r--r--vcproj-14/plugin-HPMHooking_map.vcxproj120
-rw-r--r--vcproj-14/plugin-sample.vcxproj120
224 files changed, 29359 insertions, 3278 deletions
diff --git a/Hercules-14.sln b/Hercules-14.sln
new file mode 100644
index 000000000..0abbb1102
--- /dev/null
+++ b/Hercules-14.sln
@@ -0,0 +1,64 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "char-server", "vcproj-14\char-server.vcxproj", "{D356871D-58E1-450B-967A-E4E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "login-server", "vcproj-14\login-server.vcxproj", "{D356871D-58E1-450B-967A-E5E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapcache", "vcproj-14\mapcache.vcxproj", "{D356871D-58E1-450B-967A-E7E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "map-server", "vcproj-14\map-server.vcxproj", "{D356871D-58E1-450B-967A-E6E9646175AF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-sample", "vcproj-14\plugin-sample.vcxproj", "{E64C56D3-CDFB-483B-900B-A62D216B6D2F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_map", "vcproj-14\plugin-HPMHooking_map.vcxproj", "{745D4A8C-6A68-4721-A43A-D81BF59860A1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_char", "vcproj-14\plugin-HPMHooking_char.vcxproj", "{D495824D-24D3-4623-A28C-4CA506084A09}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "plugin-HPMHooking_login", "vcproj-14\plugin-HPMHooking_login.vcxproj", "{544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E4E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E5E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E7E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Debug|Win32.Build.0 = Debug|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.ActiveCfg = Release|Win32
+ {D356871D-58E1-450B-967A-E6E9646175AF}.Release|Win32.Build.0 = Release|Win32
+ {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Debug|Win32.Build.0 = Debug|Win32
+ {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.ActiveCfg = Release|Win32
+ {E64C56D3-CDFB-483B-900B-A62D216B6D2F}.Release|Win32.Build.0 = Release|Win32
+ {745D4A8C-6A68-4721-A43A-D81BF59860A1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {745D4A8C-6A68-4721-A43A-D81BF59860A1}.Debug|Win32.Build.0 = Debug|Win32
+ {745D4A8C-6A68-4721-A43A-D81BF59860A1}.Release|Win32.ActiveCfg = Release|Win32
+ {745D4A8C-6A68-4721-A43A-D81BF59860A1}.Release|Win32.Build.0 = Release|Win32
+ {D495824D-24D3-4623-A28C-4CA506084A09}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D495824D-24D3-4623-A28C-4CA506084A09}.Debug|Win32.Build.0 = Debug|Win32
+ {D495824D-24D3-4623-A28C-4CA506084A09}.Release|Win32.ActiveCfg = Release|Win32
+ {D495824D-24D3-4623-A28C-4CA506084A09}.Release|Win32.Build.0 = Release|Win32
+ {544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}.Debug|Win32.Build.0 = Debug|Win32
+ {544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}.Release|Win32.ActiveCfg = Release|Win32
+ {544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Makefile.in b/Makefile.in
index c91a77c6f..d2877c6b0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -146,7 +146,7 @@ clean buildclean: $(MF_TARGETS)
distclean: clean
@-rm -f $(MF_TARGETS) config.status config.log
-sysinfo:
+sysinfo: config.status
@./sysinfogen.sh src/common/sysinfo_new.inc @CFLAGS@ @CPPFLAGS@
@if cmp -s src/common/sysinfo.inc src/common/sysinfo_new.inc; then \
rm src/common/sysinfo_new.inc ; \
@@ -154,6 +154,10 @@ sysinfo:
mv src/common/sysinfo_new.inc src/common/sysinfo.inc ; \
fi
+config.status: configure
+ @echo " RECONFIGURE"
+ @./config.status --recheck
+
help: Makefile
@echo "most common targets are 'all' 'sql' 'clean' 'plugins' 'help'"
@echo "possible targets are:"
diff --git a/conf/inter-server.conf b/conf/inter-server.conf
index 2bffeb1af..85acdc4df 100644
--- a/conf/inter-server.conf
+++ b/conf/inter-server.conf
@@ -139,13 +139,13 @@ npc_market_data_db: npc_market_data
// Hercules, while still loading the SQL tables we provide to be used
// exclusively by your Control Panel or Website.
-// Use SQL for item_db? (not recommended)
-use_sql_item_db: no
+// Use SQL for item_db? (deprecated)
+//use_sql_item_db: no
-// Use SQL for mob_db? (not recommended)
-use_sql_mob_db: no
+// Use SQL for mob_db? (deprecated)
+//use_sql_mob_db: no
-// Use SQL for mob_skill_db? (not recommended)
-use_sql_mob_skill_db: no
+// Use SQL for mob_skill_db? (deprecated)
+//use_sql_mob_skill_db: no
import: conf/import/inter_conf.txt
diff --git a/conf/network.conf b/conf/network.conf
new file mode 100644
index 000000000..b355acb25
--- /dev/null
+++ b/conf/network.conf
@@ -0,0 +1,37 @@
+// Network configuration file
+
+/*
+ * List here any LAN subnets this server is in.
+ * Example:
+ * - char- (or map-) server's IP in LAN is 192.168.0.10
+ * - Public IP is 198.51.100.37
+ * If the list contains "192.168.0.10:255.255.255.0", any clients connecting
+ * from the same 192.168.0.0/24 network will be presented with the LAN IP
+ * (192.168.0.10) in the server list, rather than the public IP (198.51.100.37).
+ */
+lan_subnets: (
+ "127.0.0.1:255.0.0.0",
+ // "192.168.1.1:255.255.255.0",
+)
+
+/*
+ * List here any IP ranges a char- or map-server can connect from.
+ * A wildcard of "0.0.0.0:0.0.0.0" means that server connections are allowed
+ * from ANY IP. (not recommended).
+ */
+allowed: (
+ "0.0.0.0:0.0.0.0",
+ // "127.0.0.1:255.0.0.0",
+)
+
+/*
+ * List here any IP ranges a char- or map-server can connect from. These ranges
+ * will also be excluded from the automatic ipban in casee of password failure.
+ * Any entry present in this list is also automatically included in the
+ * allowed IP list.
+ * Note: This may be a security threat. Only edit this list if you know what
+ * you are doing.
+ */
+trusted: (
+ "127.0.0.1:255.0.0.0",
+)
diff --git a/conf/subnet.conf b/conf/subnet.conf
deleted file mode 100644
index e91fb7376..000000000
--- a/conf/subnet.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-// Subnet support file
-// Format is:
-// subnet: net-submask:char_ip:map_ip
-// you can add more than one subnet
-
-subnet: 255.0.0.0:127.0.0.1:127.0.0.1
diff --git a/configure b/configure
index b022ca2d5..7587cf5cd 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in 3bd5d73.
+# From configure.in e27c744.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -636,8 +636,8 @@ MYSQL_VERSION
HAVE_MYSQL
MYSQL_CONFIG_HOME
DLLEXT
-WITH_PLUGINS
SOFLAGS
+WITH_PLUGINS
AR
SET_MAKE
EGREP
@@ -1354,7 +1354,7 @@ Optional Features:
--enable-profiler=ARG Profilers: no, gprof (disabled by default)
--disable-64bit Enforce 32bit output on x86_64 systems.
--enable-lto Enables or Disables Linktime Code Optimization (LTO
- is enabled by default)
+ is disabled by default)
--enable-static Enables or Disables Statick Linking (STATIC is
disabled by default)
--enable-sanitize[=ARG] Enables sanitizer. (disabled by default) (available
@@ -3658,7 +3658,7 @@ if test "${enable_lto+set}" = set; then :
esac
else
- enable_lto="yes"
+ enable_lto="no"
fi
@@ -4614,7 +4614,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare"
+CFLAGS="$CFLAGS -pipe -ffast-math -fvisibility=hidden -Wall -Wextra -Wno-sign-compare"
CPPFLAGS="$CPPFLAGS -I../common"
LDFLAGS="$LDFLAGS -rdynamic"
@@ -6820,13 +6820,12 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- compiler_supports_pic="yes"
+ SOFLAGS="$SOFLAGS -fPIC"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- compiler_supports_pic="no"
fi
@@ -6841,9 +6840,7 @@ $as_echo_n "checking how to make shared objects... " >&6; }
OLD_CFLAGS="$CFLAGS"
compiler_shared_objects=""
compiler_supports_shared_objects="no"
-if test "$compiler_supports_pic" = "yes" ; then
- my_shared_test_flags="$CFLAGS -fPIC"
-fi
+my_shared_test_flags="$CFLAGS $SOFLAGS"
# default
CFLAGS="$my_shared_test_flags -shared"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -6899,7 +6896,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $compiler_shared_objects $compiler_supports_shared_objects" >&5
$as_echo "$compiler_shared_objects $compiler_supports_shared_objects" >&6; }
SOFLAGS="$SOFLAGS $compiler_shared_objects"
-
+ WITH_PLUGINS="yes"
#
# On certain platforms, undefined references on shared libraries won't be checked
@@ -6956,84 +6953,12 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS="$OLD_CFLAGS"
-
- #
- # shared objects need position independent code; some platforms emit
- # it always, others need -fPIC
- #
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -fPIC for shared objects" >&5
-$as_echo_n "checking whether $CC needs -fPIC for shared objects... " >&6; }
- OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $SOFLAGS"
- WITH_PLUGINS="yes"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- int bar = 0;
-
- int foo(void)
- {
- return bar;
- }
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- CFLAGS="$OLD_CFLAGS"
-
-else
-
- if test "$compiler_supports_pic" = "yes" ; then
- # Verify if -shared really fails due to lack of -fPIC or something else
- CFLAGS="$CFLAGS -fPIC"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- int bar = 0;
-
- int foo(void)
- {
- return bar;
- }
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -fPIC"
-
-else
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, but fails for another reason" >&5
-$as_echo "no, but fails for another reason" >&6; }
- as_fn_error $? "compiler is unable to compile shared objects for an unhandled reason, please report this with attached config.log... stopping" "$LINENO" 5
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- else
- # Disable compilation of plugins (optional), so 'make all' does not fail
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but unsupported" >&5
-$as_echo "yes, but unsupported" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: compiler is unable to generate position independent code, disabled plugins (optional)" >&5
-$as_echo "$as_me: compiler is unable to generate position independent code, disabled plugins (optional)" >&6;}
- WITH_PLUGINS="no"
- fi
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
fi
my_shared_test_flags=""
+
#
# -O2 implies -fstrict-aliasing, but the code is not safe for that
#
@@ -7988,6 +7913,78 @@ else
fi
+# execinfo (backtrace)
+for ac_header in execinfo.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
+if test "x$ac_cv_header_execinfo_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_EXECINFO_H 1
+_ACEOF
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5
+$as_echo_n "checking for library containing backtrace... " >&6; }
+if ${ac_cv_search_backtrace+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char backtrace ();
+int
+main ()
+{
+return backtrace ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' execinfo; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_backtrace=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_backtrace+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_backtrace+:} false; then :
+
+else
+ ac_cv_search_backtrace=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5
+$as_echo "$ac_cv_search_backtrace" >&6; }
+ac_res=$ac_cv_search_backtrace
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+ CFLAGS="$CFLAGS -DHAVE_EXECINFO"
+
+fi
+
+
+fi
+
+done
+
#
# MySQL library
diff --git a/configure.in b/configure.in
index d17f5b4a7..de709bede 100644
--- a/configure.in
+++ b/configure.in
@@ -256,7 +256,7 @@ AC_ARG_ENABLE(
AC_HELP_STRING(
[--enable-lto],
[
- Enables or Disables Linktime Code Optimization (LTO is enabled by default)
+ Enables or Disables Linktime Code Optimization (LTO is disabled by default)
]
),
[
@@ -267,7 +267,7 @@ AC_ARG_ENABLE(
*) AC_MSG_ERROR([[invalid argument --enable-lto=$disableval... stopping]]);;
esac
],
- [enable_lto="yes"]
+ [enable_lto="no"]
)
@@ -485,7 +485,7 @@ AC_PATH_PROG(AR, ar)
AC_LANG([C])
-CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare"
+CFLAGS="$CFLAGS -pipe -ffast-math -fvisibility=hidden -Wall -Wextra -Wno-sign-compare"
CPPFLAGS="$CPPFLAGS -I../common"
LDFLAGS="$LDFLAGS -rdynamic"
@@ -832,11 +832,10 @@ AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([int foo;])],
[
AC_MSG_RESULT([yes])
- compiler_supports_pic="yes"
+ SOFLAGS="$SOFLAGS -fPIC"
],
[
AC_MSG_RESULT([no])
- compiler_supports_pic="no"
]
)
CFLAGS="$OLD_CFLAGS"
@@ -848,9 +847,7 @@ AC_MSG_CHECKING([how to make shared objects])
OLD_CFLAGS="$CFLAGS"
compiler_shared_objects=""
compiler_supports_shared_objects="no"
-if test "$compiler_supports_pic" = "yes" ; then
- my_shared_test_flags="$CFLAGS -fPIC"
-fi
+my_shared_test_flags="$CFLAGS $SOFLAGS"
# default
CFLAGS="$my_shared_test_flags -shared"
AC_LINK_IFELSE(
@@ -891,7 +888,7 @@ if test "$compiler_supports_shared_objects" = "no" ; then
else
AC_MSG_RESULT([$compiler_shared_objects $compiler_supports_shared_objects])
SOFLAGS="$SOFLAGS $compiler_shared_objects"
- AC_SUBST([SOFLAGS])
+ WITH_PLUGINS="yes"
#
# On certain platforms, undefined references on shared libraries won't be checked
@@ -930,62 +927,10 @@ else
]
)
CFLAGS="$OLD_CFLAGS"
-
- #
- # shared objects need position independent code; some platforms emit
- # it always, others need -fPIC
- #
- AC_MSG_CHECKING([whether $CC needs -fPIC for shared objects])
- OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $SOFLAGS"
- WITH_PLUGINS="yes"
- AC_LINK_IFELSE(
- [AC_LANG_SOURCE([
- int bar = 0;
-
- int foo(void)
- {
- return bar;
- }
- ])],
- [
- AC_MSG_RESULT([no])
- CFLAGS="$OLD_CFLAGS"
- ],
- [
- if test "$compiler_supports_pic" = "yes" ; then
- # Verify if -shared really fails due to lack of -fPIC or something else
- CFLAGS="$CFLAGS -fPIC"
- AC_LINK_IFELSE(
- [AC_LANG_SOURCE([
- int bar = 0;
-
- int foo(void)
- {
- return bar;
- }
- ])],
- [
- AC_MSG_RESULT([yes])
- CFLAGS="$OLD_CFLAGS -fPIC"
- ],
- [
- AC_MSG_RESULT([no, but fails for another reason])
- AC_MSG_ERROR([compiler is unable to compile shared objects for an unhandled reason, please report this with attached config.log... stopping])
- ]
- )
- else
- # Disable compilation of plugins (optional), so 'make all' does not fail
- AC_MSG_RESULT([yes, but unsupported])
- AC_MSG_NOTICE([compiler is unable to generate position independent code, disabled plugins (optional)])
- WITH_PLUGINS="no"
- fi
- ]
- )
-
fi
my_shared_test_flags=""
AC_SUBST([WITH_PLUGINS])
+AC_SUBST([SOFLAGS])
#
@@ -1268,6 +1213,21 @@ AC_SEARCH_LIBS([pthread_attr_destroy], [pthread], [], [AC_MSG_ERROR([pthread lib
AC_SEARCH_LIBS([pthread_cancel], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
AC_SEARCH_LIBS([pthread_join], [pthread], [], [AC_MSG_ERROR([pthread library not found or incompatible])])
+# execinfo (backtrace)
+AC_CHECK_HEADERS([execinfo.h],
+ [
+ AC_SEARCH_LIBS([backtrace],
+ [execinfo],
+ [
+ CFLAGS="$CFLAGS -DHAVE_EXECINFO"
+ ],
+ [
+ ]
+ )
+ ],
+ [
+ ]
+)
#
# MySQL library
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index af8dffef0..0726630df 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -225,8 +225,8 @@ current scripts have a zero in there.
** Define an NPC object.
-<map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite id>,{<code>}
-<map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite id>,<triggerX>,<triggerY>,{<code>}
+<map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite>,{<code>}
+<map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite>,<triggerX>,<triggerY>,{<code>}
This will place an NPC object on a specified map at the specified
location, and is a top-level command you will use the most in your custom
@@ -240,16 +240,17 @@ increments of 45 degrees, where 0 means facing towards the top of the map.
(So to turn the sprite towards the bottom of the map, you use facing 4,
and to make it look southeast it's facing 5.)
-Sprite id is the sprite number used to display this particular NPC. For a
-full list of sprite id numbers see http://kalen.s79.xrea.com/npc/npce.shtml
-You may also use a monster's ID number instead to display a monster sprite
+Sprite is the sprite identifier used to display this particular NPC. For a
+full list of sprite numbers see http://kalen.s79.xrea.com/npc/npce.shtml as
+well as db/const.txt.
+You may also use a monster's ID constant instead to display a monster sprite
for this NPC, in npcs that have view ids of mobs it's encouraged to use
OnTouch events with a 2,2 range and with an 'end' after the header to avoid
bugs (for more info on why see npc_click@map/npc.c). It is possible to use a job
sprite as well, but you must first define it as a monster sprite in 'mob_avail.txt',
a full description on how to do this is not in the scope of this manual.
-A '-1' sprite id will make the NPC invisible (and unclickable).
-A '111' sprite id will make an NPC which does not have a sprite, but is
+A '-1' sprite will make the NPC invisible (and unclickable).
+A 'HIDDEN_NPC' sprite will make an NPC which does not have a sprite, but is
still clickable, which is useful if you want to make a clickable object of
the 3D terrain.
@@ -279,8 +280,8 @@ what these floating NPC objects are for. More on that below.
** Define a shop/cashshop NPC.
--%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}
-<map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}
+-%TAB%shop%TAB%<NPC Name>%TAB%<sprite>,<itemid>:<price>{,<itemid>:<price>...}
+<map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite>,<itemid>:<price>{,<itemid>:<price>...}
This will define a shop NPC, which, when triggered (which can only be done
by clicking) will cause a shop window to come up. No code whatsoever runs
@@ -301,7 +302,7 @@ items here. The layout used to define sale items still count, and
"<price>" refers to how many points will be spent purchasing the them.
** Define a trader NPC
-<map name>,<x>,<y>,<facing>%TAB%trader%TAB%<NPC Name>%TAB%<sprite id>,{<code>}
+<map name>,<x>,<y>,<facing>%TAB%trader%TAB%<NPC Name>%TAB%<sprite>,{<code>}
-%TAB%trader%TAB%<NPC Name>%TAB%-1,{<code>}
All the standards that are valid to script objects are also valid for trader objects
@@ -326,16 +327,16 @@ more information regarding how to use this NPC type.
** Define an warp/shop/cashshop/NPC duplicate.
warp: <map name>,<x>,<y>{,<facing>}%TAB%duplicate(<label>)%TAB%<NPC Name>%TAB%<spanx>,<spany>
-shop/cashshop/npc: -%TAB%duplicate(<label>)%TAB%<NPC Name>%TAB%<sprite id>
-shop/cashshop/npc: <map name>,<x>,<y>,<facing>%TAB%duplicate(<label>)%TAB%<NPC Name>%TAB%<sprite id>
-npc: -%TAB%duplicate(<label>)%TAB%<NPC Name>%TAB%<sprite id>,<triggerX>,<triggerY>
-npc: <map name>,<x>,<y>,<facing>%TAB%duplicate(<label>)%TAB%<NPC Name>%TAB%<sprite id>,<triggerX>,<triggerY>
+shop/cashshop/npc: -%TAB%duplicate(<label>)%TAB%<NPC Name>%TAB%<sprite>
+shop/cashshop/npc: <map name>,<x>,<y>,<facing>%TAB%duplicate(<label>)%TAB%<NPC Name>%TAB%<sprite>
+npc: -%TAB%duplicate(<label>)%TAB%<NPC Name>%TAB%<sprite>,<triggerX>,<triggerY>
+npc: <map name>,<x>,<y>,<facing>%TAB%duplicate(<label>)%TAB%<NPC Name>%TAB%<sprite>,<triggerX>,<triggerY>
This will duplicate an warp/shop/cashshop/NPC referred to by 'label'.
Warp duplicates inherit the target location.
Shop/cashshop duplicates inherit the item list.
NPC duplicates inherit the script code.
-The rest (name, location, facing, sprite ID, span/trigger area) is
+The rest (name, location, facing, sprite, span/trigger area) is
obtained from the definition of the duplicate (not inherited).
** Define a function object
@@ -3982,30 +3983,6 @@ night mode or day mode:
if (!isnight()) mes "I only prowl in the night.";
---------------------------------------
-
-*checkre(<type>)
-
-Checks if a renewal feature is enabled or not in renewal.h, and returns 1
-if enabled and 0 for disabled. The renewal feature to check is determined
-by the type parameter.
-
- 0 - RENEWAL (game renewal server mode)
- 1 - RENEWAL_CAST (renewal cast time)
- 2 - RENEWAL_DROP (renewal drop rate algorithms)
- 3 - RENEWAL_EXP (renewal exp rate algorithms)
- 4 - RENEWAL_LVDMG (renewal level modifier on damage)
- 5 - RENEWAL_EDP (renewal enchant deadly poison algorithm)
- 6 - RENEWAL_ASPD (renewal ASPD)
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- @ /!\ This command is deprecated @
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-This command is deprecated and it should not be used in new scripts, as it
-is likely to be removed at a later time. Please consider using the respective
-constants RENEWAL, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, RENEWAL_LVDMG,
-RENEWAL_EDP, RENEWAL_ASPD instead.
-
----------------------------------------
//=====================================
3.1 - Checking Item-Related Commands
//=====================================
@@ -4116,7 +4093,7 @@ will be seen to everyone around but not in chat window.
---------------------------------------
-*warp "<map name>",<x>,<y>;
+*warp "<map name>",<x>,<y>{,<flag>};
This command will take the invoking character to the specified map, and if
wanted, specified coordinates too, but these can be random.
@@ -4139,6 +4116,10 @@ There are also three special 'map names' you can use:
"Random" will warp the player randomly on the current map.
"Save" and "SavePoint" will warp the player back to their save point.
+If flag parameter is set to 0, after player warped will be not stopped
+currend running npc script. Running script after warp can be issue for
+Gravity client if warp to other maps.
+
---------------------------------------
*areawarp "<from map name>",<x1>,<y1>,<x2>,<y2>,"<to map name>",<x3>,<y3>{,<x4>,<y4>};
diff --git a/npc/cities/veins.txt b/npc/cities/veins.txt
index d0b40a07d..c1815c828 100644
--- a/npc/cities/veins.txt
+++ b/npc/cities/veins.txt
@@ -551,7 +551,7 @@ ve_in,119,386,3 script Prisoner#ve1 4_M_DST_MASTER,{
close;
}
-ve_in,111,379,8 script Ward#ve1 4_M_DST_MASTER,{
+ve_in,111,379,0 script Ward#ve1 4_M_DST_MASTER,{
mes "[Ward]";
mes "This place ensures that";
mes "dangerous criminals aren't";
diff --git a/npc/dev/ci_test.txt b/npc/dev/ci_test.txt
new file mode 100644
index 000000000..058d25ad5
--- /dev/null
+++ b/npc/dev/ci_test.txt
@@ -0,0 +1,22 @@
+//===== Hercules Script ======================================
+//= Script engine self-tests, CI integration
+//===== By: ==================================================
+//= Haru
+//===== Current Version: =====================================
+//= 1.0
+//===== Description: =========================================
+//= This script depends on npc/dev/test.txt, and extends it so
+// that it can be called in a CI environment and returns an
+// appropriate value upon termination.
+//= This script is part of the script_mapquit plugin
+// distribution, and requires said plugin to be loaded.
+//= Usage: ./map-server --load-plugin script_mapquit --load-script npc/dev/test.txt --load-script npc/dev/ci_test.txt
+
+- script HerculesSelfTestCI -1,{
+ end;
+
+OnInit:
+ .@val = callfunc("HerculesSelfTestHelper");
+ mapquit(.@val);
+ end;
+}
diff --git a/npc/kafras/kafras.txt b/npc/kafras/kafras.txt
index 0df94899d..cfdaf183b 100644
--- a/npc/kafras/kafras.txt
+++ b/npc/kafras/kafras.txt
@@ -596,7 +596,7 @@ niflheim,202,180,3 script Kafra Employee::kaf_niflheim 4_F_NFDEADKAFRA,{
// Dungeons and Fields
//============================================================
// - Byalan Island
-izlu2dun,106,58,8 script Kafra Employee::kaf_izlu2dun 4_F_KAFRA3,{
+izlu2dun,106,58,0 script Kafra Employee::kaf_izlu2dun 4_F_KAFRA3,{
cutin "kafra_03",2;
if (!RENEWAL && BaseJob == Job_Novice && job_merchant_q2 > 0) {
// Merchant Job Change Quest
diff --git a/npc/mobs/jail.txt b/npc/mobs/jail.txt
index bf18438db..048136dcf 100644
--- a/npc/mobs/jail.txt
+++ b/npc/mobs/jail.txt
@@ -8,7 +8,7 @@
//= Spawns monsters in Jail.
//============================================================
-sec_in02,139,80,20 monster Poring 1002,10,0,0,0
+sec_in02,139,80,20,20 monster Poring 1002,10,0,0,0
sec_in02,138,54,20,20 monster Marin 1242,5,0,0,0
sec_in02,161,46,15,15 monster Poporing 1031,5,0,0,0
sec_in02,114,47,10,10 monster Drops 1113,5,0,0,0
diff --git a/npc/other/arena/arena_party.txt b/npc/other/arena/arena_party.txt
index ca4b74388..717e69fd3 100644
--- a/npc/other/arena/arena_party.txt
+++ b/npc/other/arena/arena_party.txt
@@ -38,7 +38,7 @@ OnStart:
end;
}
-prt_are_in,76,87,3 script Helper#party 67,4,4,{
+prt_are_in,76,87,3 script Helper#party 1_F_02,4,4,{
if($arn_partywait == 0) {
$arn_partywait = 1;
emotion e_gasp,0;
diff --git a/npc/other/books.txt b/npc/other/books.txt
index fed26bfeb..6ad8968b2 100644
--- a/npc/other/books.txt
+++ b/npc/other/books.txt
@@ -871,7 +871,7 @@ prt_in,159,56,4 script Monster Encyclopedia#2pr HIDDEN_NPC,{
}
}
-prt_in,161,50,4 script Monster Encyclopedia#3pr 111,{
+prt_in,161,50,4 script Monster Encyclopedia#3pr HIDDEN_NPC,{
mes "^FF0000[Monster Encyclopedia]^000000";
mes "This is a Monster Encyclopedia";
mes "containing information on Dark,";
diff --git a/npc/quests/gunslinger_quests.txt b/npc/quests/gunslinger_quests.txt
index 34ac3dbd6..c88e0b741 100644
--- a/npc/quests/gunslinger_quests.txt
+++ b/npc/quests/gunslinger_quests.txt
@@ -380,7 +380,7 @@ SubGarrison_:
}
}
-lighthalzen,322,247,6 script Ravey 86,{
+lighthalzen,322,247,6 script Ravey 4_M_04,{
if(gun_gs == 2)
{
diff --git a/npc/quests/lvl4_weapon_quest.txt b/npc/quests/lvl4_weapon_quest.txt
index a2839d0cc..e55a57afc 100644
--- a/npc/quests/lvl4_weapon_quest.txt
+++ b/npc/quests/lvl4_weapon_quest.txt
@@ -2870,7 +2870,7 @@ niflheim,187,280,3 script Hein#lv4 4_M_NFDEADMAN,{
if (.@shobu > 1) {
mes "[Hein]";
mes "Let's see...";
- mes "You won " + shobu + " times.";
+ mes "You won " + .@shobu + " times.";
mes "You're really good at game!";
mes "Yes, your luck is at its highest!";
next;
@@ -3333,7 +3333,7 @@ niflheim,331,72,3 script Waltboughst#lv4 4_M_NFDEADMAN,{
next;
if (.@shobu > 1) {
mes "[Waltboughst]";
- mes "Excellent. You won " + shobu + " times,";
+ mes "Excellent. You won " + .@shobu + " times,";
mes "so your luck must be really high.";
mes "That means we can begin~!";
next;
diff --git a/npc/quests/newgears/2006_headgears.txt b/npc/quests/newgears/2006_headgears.txt
index cc5c87752..4c41c657e 100644
--- a/npc/quests/newgears/2006_headgears.txt
+++ b/npc/quests/newgears/2006_headgears.txt
@@ -24,7 +24,7 @@
// Censor Bar
//============================================================
-rachel,91,273,8 script ? 4_M_RACHMAN2,{
+rachel,91,273,0 script ? 4_M_RACHMAN2,{
if (countitem(983) > 0 && countitem(7111) > 99 && countitem(938) > 98 && Zeny > 99999) {
mes "[?]";
mes "Giggle giggle...isn't it my partner, eh?";
diff --git a/npc/quests/quests_13_1.txt b/npc/quests/quests_13_1.txt
index ce389970a..9eb179c30 100644
--- a/npc/quests/quests_13_1.txt
+++ b/npc/quests/quests_13_1.txt
@@ -8317,7 +8317,7 @@ spl_fild02,321,169,0 duplicate(Fishinghole) School of Fish#2 CLEAR_NPC
spl_fild02,326,171,0 duplicate(Fishinghole) School of Fish#3 CLEAR_NPC
mid_camp,75,135,0 duplicate(Fishinghole) School of Fish#4 CLEAR_NPC
-mid_camp,66,122,55 script Henry Clifford 4_M_05,{
+mid_camp,66,122,7 script Henry Clifford 4_M_05,{
if (countitem(6049) > 0) {
mes "[Henry Clifford]";
mes "Congratulations, you've caught a precious Marlin.";
@@ -8367,7 +8367,7 @@ mid_camp,66,122,55 script Henry Clifford 4_M_05,{
}
}
-mid_camp,88,100,55 script Cat Hand Mining Agent 4_CAT,{
+mid_camp,88,100,7 script Cat Hand Mining Agent 4_CAT,{
if (!questprogress(12062,PLAYTIME)) {
if ((countitem(6048) > 2) && (ep13_yong1 > 9)) {
mes "[Cat Hand Mining Agent]";
diff --git a/npc/quests/quests_lighthalzen.txt b/npc/quests/quests_lighthalzen.txt
index 78419758b..7e34a9729 100644
--- a/npc/quests/quests_lighthalzen.txt
+++ b/npc/quests/quests_lighthalzen.txt
@@ -11115,7 +11115,7 @@ lighthalzen,141,162,3 script Old Man#reken 4_M_03,{
close;
}
-einbroch,55,52,3 script Laboratory Guard#reken 852,{
+einbroch,55,52,3 script Laboratory Guard#reken 4_M_EIN_SOLDIER,{
if(lhz_rekenber == 3)
{
diff --git a/npc/quests/quests_veins.txt b/npc/quests/quests_veins.txt
index 381b39671..d6a5ee15c 100644
--- a/npc/quests/quests_veins.txt
+++ b/npc/quests/quests_veins.txt
@@ -4773,7 +4773,7 @@ veins,78,226,5 script Camel#camelcc1::VeinsCamel 4_DST_CAMEL,{
veins,72,227,3 duplicate(VeinsCamel) Camel#camelcc3 4_DST_CAMEL
veins,81,222,1 duplicate(VeinsCamel) Camel#camelcc4 4_DST_CAMEL
veins,77,219,5 duplicate(VeinsCamel) Camel#camelcc5 4_DST_CAMEL
-veins,73,215,8 duplicate(VeinsCamel) Camel#camelcc6 4_DST_CAMEL
+veins,73,215,0 duplicate(VeinsCamel) Camel#camelcc6 4_DST_CAMEL
veins,68,215,5 duplicate(VeinsCamel) Camel#camelcc7 4_DST_CAMEL
ve_fild07,235,42,3 script Silk Sand Camel 4_DST_CAMEL,{
diff --git a/npc/re/cities/dewata.txt b/npc/re/cities/dewata.txt
index 022d3d715..fe6b661a3 100644
--- a/npc/re/cities/dewata.txt
+++ b/npc/re/cities/dewata.txt
@@ -418,7 +418,7 @@ dewata,99,203,4 script Tourist#dew4 4_M_SAGE_C,{
close;
}
-dewata,67,186,8 script Monk#dew1 4_M_BUDDHIST,{
+dewata,67,186,0 script Monk#dew1 4_M_BUDDHIST,{
mes "[Monk]";
mes "I am a monk, content to spend my days in religious study.";
next;
@@ -430,7 +430,7 @@ dewata,67,186,8 script Monk#dew1 4_M_BUDDHIST,{
close;
}
-dewata,65,188,8 script Monk#dew2 4_M_BUDDHIST,{
+dewata,65,188,0 script Monk#dew2 4_M_BUDDHIST,{
mes "[Monk]";
mes "Borobudur temple is one of few temples left for worshiping the Great Buddha.";
next;
@@ -439,7 +439,7 @@ dewata,65,188,8 script Monk#dew2 4_M_BUDDHIST,{
close;
}
-dewata,63,190,8 script Monk#dew3 4_M_BUDDHIST,{
+dewata,63,190,0 script Monk#dew3 4_M_BUDDHIST,{
mes "[Monk]";
mes "Are you a Tourist? You can make an offering and a wish to one of the shrines.";
next;
@@ -448,7 +448,7 @@ dewata,63,190,8 script Monk#dew3 4_M_BUDDHIST,{
close;
}
-dewata,62,192,8 script Monk#dew4 4_M_BUDDHIST,{
+dewata,62,192,0 script Monk#dew4 4_M_BUDDHIST,{
mes "[Monk]";
mes "Our great Buddha is the king of souls and the leader of all good Gods.";
next;
@@ -657,7 +657,7 @@ OnTouch:
close;
}
-dewata,233,263,8 script Sweet Married Couple#1 4_M_ROGUE,2,3,{
+dewata,233,263,0 script Sweet Married Couple#1 4_M_ROGUE,2,3,{
OnTouch:
mes "[Sweet Husband]";
mes "You are the most beautiful thing in the world baby~";
@@ -677,7 +677,7 @@ OnTouch:
close;
}
-dewata,234,263,8 script Sweet Married Couple#2 4_F_JOB_HUNTER,2,3,{
+dewata,234,263,0 script Sweet Married Couple#2 4_F_JOB_HUNTER,2,3,{
OnTouch:
mes "[Sweet Wife]";
mes "Baby~ You know what flower that is~?";
diff --git a/npc/re/jobs/2e/kagerou_oboro.txt b/npc/re/jobs/2e/kagerou_oboro.txt
index 8c8e0bf3e..c9f639d67 100644
--- a/npc/re/jobs/2e/kagerou_oboro.txt
+++ b/npc/re/jobs/2e/kagerou_oboro.txt
@@ -1348,7 +1348,7 @@ OnTouch:
job_ko,41,16,4 duplicate(Sight#ko_trap) Sight#ko_02 4_BULLETIN_BOARD2,1,1
-job_ko,33,16,4 script Sight#ko_03 858,1,1,{
+job_ko,33,16,4 script Sight#ko_03 4_BULLETIN_BOARD2,1,1,{
callfunc "F_KO_Survival_mes",3;
end;
OnTouch:
@@ -2859,4 +2859,4 @@ job_ko,4,1,4 script Guide#ko_helper 4_M_KAGE_OLD,{
close;
}
end;
-} \ No newline at end of file
+}
diff --git a/npc/re/merchants/enchan_ko.txt b/npc/re/merchants/enchan_ko.txt
index c162b4be6..98e309abb 100644
--- a/npc/re/merchants/enchan_ko.txt
+++ b/npc/re/merchants/enchan_ko.txt
@@ -13,7 +13,7 @@
// Main NPC :: job_ko
//============================================================
-que_ng,75,20,3 script Artisan Tene#ko 762,{
+que_ng,75,20,3 script Artisan Tene#ko 4_M_JPN2,{
disable_items;
mes "[Artisan Tene]";
mes "Hello? I'm Artisan Tene, the most respectful blacksmith of them all.";
diff --git a/npc/re/quests/eden/eden_quests.txt b/npc/re/quests/eden/eden_quests.txt
index f9030964c..1d25e17d3 100644
--- a/npc/re/quests/eden/eden_quests.txt
+++ b/npc/re/quests/eden/eden_quests.txt
@@ -2150,7 +2150,7 @@ S_Select:
close;
}
-moc_para01,179,44,3 script Chef 820,{
+moc_para01,179,44,3 script Chef 4_M_CHNCOOK,{
mes "[Chef]";
mes "What's up?";
mes "Do you want a Meal? Or do you have other business?";
diff --git a/npc/re/quests/newgears/2012_headgears.txt b/npc/re/quests/newgears/2012_headgears.txt
index c96c47ede..167817a10 100644
--- a/npc/re/quests/newgears/2012_headgears.txt
+++ b/npc/re/quests/newgears/2012_headgears.txt
@@ -14,7 +14,7 @@
// Main NPC :: 2012_hat_quest
//============================================================
-moc_para01,41,169,3 script Reno#2012hat 64,{
+moc_para01,41,169,3 script Reno#2012hat 1_M_WIZARD,{
// iRO has (very) minor differences in dialogue from the original script.
// To use iRO's version, uncomment the line below.
//.@features_iRO = 1;
diff --git a/npc/re/quests/quests_dicastes.txt b/npc/re/quests/quests_dicastes.txt
index 48e116884..10bb003e5 100644
--- a/npc/re/quests/quests_dicastes.txt
+++ b/npc/re/quests/quests_dicastes.txt
@@ -693,7 +693,7 @@ dic_in01,51,270,7 script Supply Dept. 1 Manager 4_MAN_BENKUNI,{
close;
}
-dic_in01,48,273,8 script Supply Dept. 2 Manager 4_MAN_BENKUNI,{
+dic_in01,48,273,1 script Supply Dept. 2 Manager 4_MAN_BENKUNI,{
if (!checkweight(1201,1)) {
mes "You have too many kinds of items. Let's try again after you reduce the number of items.";
close;
diff --git a/npc/re/quests/quests_eclage.txt b/npc/re/quests/quests_eclage.txt
index 4f85b42c8..918a8edd3 100644
--- a/npc/re/quests/quests_eclage.txt
+++ b/npc/re/quests/quests_eclage.txt
@@ -87,7 +87,7 @@ dic_fild01,161,266,4 duplicate(Teleport Cat No.1#1) Teleport Cat No.6#6 4_M_BOSS
// Eclage's Entrance
//============================================================
-ecl_fild01,97,322,0 script #ep14_2Entrance 45,3,3,{
+ecl_fild01,97,322,0 script #ep14_2Entrance WARPNPC,3,3,{
end;
OnTouch:
@@ -464,7 +464,7 @@ ecl_fild01,88,315,5 script Tourist#ep14_2f12 4_WHITE_COW,{
// Oliver Wolf Hood(Dreaming Time)
//============================================================
-eclage,101,29,0 script #ep14_2Bridge 139,3,3,{
+eclage,101,29,0 script #ep14_2Bridge HIDDEN_WARP_NPC,3,3,{
end;
OnTouch:
if (BaseLevel >= 120) {
@@ -2310,7 +2310,7 @@ ecl_in01,70,88,4 script Sack Merchant#ep14_2 4_M_MERCAT1,{
close;
}
-eclage,292,265,0 script #ep14_2Yube Entrance 45,2,2,{
+eclage,292,265,0 script #ep14_2Yube Entrance WARPNPC,2,2,{
end;
OnTouch:
@@ -4136,7 +4136,7 @@ end;
}
-eclage,200,272,4 script Masione#eclbig 437,{
+eclage,200,272,4 script Masione#eclbig 4_F_FAIRYKID2,{
if (checkweight(Knife,1) == 0 || (MaxWeight - Weight)<2000) {
mes "- Stop Here!! -";
mes "- You have too many items. -";
@@ -8829,7 +8829,7 @@ OnTouch:
}
}
-ecl_in01,79,84,0 script #kusa 139,3,3,{
+ecl_in01,79,84,0 script #kusa HIDDEN_WARP_NPC,3,3,{
end;
OnTouch:
if (questprogress(4262) == 1) {
@@ -8862,7 +8862,7 @@ OnTouch:
}
}
-ecl_in01,1,1,0 script #call_ne 139,{
+ecl_in01,1,1,0 script #call_ne HIDDEN_WARP_NPC,{
end;
OnInit:
initnpctimer;
@@ -8876,7 +8876,7 @@ OnCall:
end;
}
-ecl_in01,2,2,0 script #call_kusa 139,{
+ecl_in01,2,2,0 script #call_kusa HIDDEN_WARP_NPC,{
end;
OnInit:
initnpctimer;
@@ -9467,7 +9467,7 @@ ecl_in02,98,32,3 script Eclage Guard#tl1b 4_M_FAIRYSOLDIER2,{
close;
}
-ecl_in02,133,115,0 script #pa0829Prison Guard 139,3,3,{
+ecl_in02,133,115,0 script #pa0829Prison Guard HIDDEN_WARP_NPC,3,3,{
end;
OnTouch:
@@ -11311,7 +11311,7 @@ ecl_tdun01,60,56,4 script #pa0829EtranInterio HIDDEN_NPC,{
close;
}
-ecl_tdun01,60,56,0 script #pa0829EtranInterioTouch 139,4,4,{
+ecl_tdun01,60,56,0 script #pa0829EtranInterioTouch HIDDEN_WARP_NPC,4,4,{
end;
OnTouch:
disable_items;
@@ -11338,7 +11338,7 @@ OnTouch:
end;
}
-ecl_fild01,183,94,0 script #pa0829EtranExterioTouch 139,3,3,{
+ecl_fild01,183,94,0 script #pa0829EtranExterioTouch HIDDEN_WARP_NPC,3,3,{
end;
OnTouch:
disable_items;
@@ -11465,7 +11465,7 @@ OnTouch:
end;
}
-eclage,291,301,0 script #pa0829RobertExteriTouch 139,3,3,{
+eclage,291,301,0 script #pa0829RobertExteriTouch HIDDEN_WARP_NPC,3,3,{
end;
OnTouch:
disable_items;
@@ -11507,7 +11507,7 @@ OnTouch:
end;
}
-ecl_fild01,110,240,0 script #pa0829Reactor1 139,3,3,{
+ecl_fild01,110,240,0 script #pa0829Reactor1 HIDDEN_WARP_NPC,3,3,{
end;
OnTouch:
disable_items;
@@ -11543,9 +11543,9 @@ OnTouch:
}
end;
}
-ecl_fild01,234,266,0 duplicate(#pa0829Reactor1) #pa0829Reactor6 139,3,3
+ecl_fild01,234,266,0 duplicate(#pa0829Reactor1) #pa0829Reactor6 HIDDEN_WARP_NPC,3,3
-ecl_fild01,110,198,0 script #pa0829Reactor2 139,3,3,{
+ecl_fild01,110,198,0 script #pa0829Reactor2 HIDDEN_WARP_NPC,3,3,{
end;
OnTouch:
disable_items;
@@ -11594,9 +11594,9 @@ OnTouch:
}
end;
}
-ecl_fild01,179,125,0 duplicate(#pa0829Reactor2) #pa0829Reactor7 139,3,3
+ecl_fild01,179,125,0 duplicate(#pa0829Reactor2) #pa0829Reactor7 HIDDEN_WARP_NPC,3,3
-ecl_fild01,165,158,0 script #pa0829Reactor3 139,3,3,{
+ecl_fild01,165,158,0 script #pa0829Reactor3 HIDDEN_WARP_NPC,3,3,{
end;
OnTouch:
disable_items;
@@ -11643,9 +11643,9 @@ OnTouch:
}
end;
}
-ecl_fild01,179,179,0 duplicate(#pa0829Reactor3) #pa0829Reactor8 139,3,3
+ecl_fild01,179,179,0 duplicate(#pa0829Reactor3) #pa0829Reactor8 HIDDEN_WARP_NPC,3,3
-ecl_fild01,237,166,0 script #pa0829Reactor4 139,3,3,{
+ecl_fild01,237,166,0 script #pa0829Reactor4 HIDDEN_WARP_NPC,3,3,{
end;
OnTouch:
disable_items;
@@ -11687,9 +11687,9 @@ OnTouch:
}
end;
}
-ecl_fild01,187,243,0 duplicate(#pa0829Reactor4) #pa0829Reactor9 139,3,3
+ecl_fild01,187,243,0 duplicate(#pa0829Reactor4) #pa0829Reactor9 HIDDEN_WARP_NPC,3,3
-ecl_fild01,230,206,0 script #pa0829Reactor5 139,3,3,{
+ecl_fild01,230,206,0 script #pa0829Reactor5 HIDDEN_WARP_NPC,3,3,{
end;
OnTouch:
disable_items;
@@ -11734,7 +11734,7 @@ OnTouch:
}
end;
}
-ecl_fild01,159,278,0 duplicate(#pa0829Reactor5) #pa0829Reactor10 139,3,3
+ecl_fild01,159,278,0 duplicate(#pa0829Reactor5) #pa0829Reactor10 HIDDEN_WARP_NPC,3,3
eclage,155,91,4 script #pa0829Hiel's Door10 2_BOARD2,3,3,{
mes "[Notice]";
@@ -14124,7 +14124,7 @@ ecl_tdun04,26,39,1 script Professor Worm#worm 4_M_PROFESSORWORM,{
}
}
-ecl_tdun04,21,41,0 script #pf 139,2,2,{
+ecl_tdun04,21,41,0 script #pf HIDDEN_WARP_NPC,2,2,{
end;
OnTouch:
@@ -14173,9 +14173,9 @@ if (ep14_2_profe == 1) {
}
}
-ecl_tdun04,37,21,0 duplicate(#pf) #pf3 139,2,2
+ecl_tdun04,37,21,0 duplicate(#pf) #pf3 HIDDEN_WARP_NPC,2,2
-ecl_tdun04,39,27,0 script #prf1 139,2,2,{
+ecl_tdun04,39,27,0 script #prf1 HIDDEN_WARP_NPC,2,2,{
end;
OnTouch:
if (questprogress(1218) == 0 && ep14_2_profe==4) {
@@ -14212,7 +14212,7 @@ OnTouch:
}
-ecl_tdun04,35,31,0 script #prf2 139,2,2,{
+ecl_tdun04,35,31,0 script #prf2 HIDDEN_WARP_NPC,2,2,{
end;
OnTouch:
if (questprogress(1219) == 0 && ep14_2_profe==4) {
@@ -14254,7 +14254,7 @@ OnTouch:
}
-ecl_tdun04,28,43,0 script #prf3 139,2,2,{
+ecl_tdun04,28,43,0 script #prf3 HIDDEN_WARP_NPC,2,2,{
end;
OnTouch:
if (questprogress(1220) == 0 && ep14_2_profe==4) {
@@ -14306,7 +14306,7 @@ OnTouch:
}
}
-ecl_tdun04,39,31,0 script #prf4 139,2,2,{
+ecl_tdun04,39,31,0 script #prf4 HIDDEN_WARP_NPC,2,2,{
end;
OnTouch:
if (questprogress(1221) == 0 && ep14_2_profe==4) {
@@ -14340,7 +14340,7 @@ OnTouch:
}
}
-ecl_tdun04,24,31,0 script #prf5 139,2,2,{
+ecl_tdun04,24,31,0 script #prf5 HIDDEN_WARP_NPC,2,2,{
end;
OnTouch:
if (questprogress(1222) == 0 && ep14_2_profe == 4 ) {
@@ -18225,7 +18225,7 @@ ecl_fild01,205,86,3 script Eclage Messenger Roy#tl 4_M_FAIRYSOLDIER2,{
mes "This is a little something for you.";
mes "I'll be looking forward to seeing you!";
delitem Mail_Package,1; //Mail_Package
- changequest 7430,4731;
+ changequest 7430,7431;
getexp 200000,200000;
getitem Splendide_Coin,1; //Splendide_Coin
close;
@@ -18931,7 +18931,7 @@ ecl_tdun04,32,35,3 script Hisie#tlord 4_M_FARIY_HISIE,{
end;
}
-eclage,280,290,0 script #Hisie01 139,0,3,{
+eclage,280,290,0 script #Hisie01 HIDDEN_WARP_NPC,0,3,{
end;
OnTouch:
if (ep14_2_mylord == 19) {
@@ -19103,7 +19103,7 @@ OnTimer400000:
end;
}
-que_avan01,26,26,0 script #tltimer 139,0,1,{
+que_avan01,26,26,0 script #tltimer HIDDEN_WARP_NPC,0,1,{
end;
OnTouch:
mes "It was definitely a small Yai when first entered, but upon regaining consciousness after being very dizzy, a huge space appeared.";
diff --git a/npc/re/quests/quests_malaya.txt b/npc/re/quests/quests_malaya.txt
index 76e9a9536..e67a827e9 100644
--- a/npc/re/quests/quests_malaya.txt
+++ b/npc/re/quests/quests_malaya.txt
@@ -8932,7 +8932,7 @@ ma_fild01,173,223,0 duplicate(Ancient Grudge#01) Ancient Grudge#03 HIDDEN_WARP_N
ma_fild01,172,222,0 duplicate(Ancient Grudge#01) Ancient Grudge#04 HIDDEN_WARP_NPC
ma_fild01,171,223,0 duplicate(Ancient Grudge#01) Ancient Grudge#05 HIDDEN_WARP_NPC
-ma_fild01,192,200,8 script Tourist#pin01 1_M_MERCHANT,{
+ma_fild01,192,200,0 script Tourist#pin01 1_M_MERCHANT,{
mes "[Tourist]";
mes "I came from afar and dropped everything to come and enjoy the 'Pintados Festival'.";
next;
diff --git a/npc/re/quests/quests_mora.txt b/npc/re/quests/quests_mora.txt
index fc076a6b3..55a60de98 100644
--- a/npc/re/quests/quests_mora.txt
+++ b/npc/re/quests/quests_mora.txt
@@ -4466,7 +4466,7 @@ mora,133,80,6 script Elephantine#pa0829 4_ELEPHANT,{
close;
}
-mora,115,98,8 script Hotcha#pa0829 4_ELEPHANT,{
+mora,115,98,0 script Hotcha#pa0829 4_ELEPHANT,{
if (checkweight(1201,1) == 0) {
mes "You have too many kinds of things with you to do that. Throw out some of them and try again.";
close;
diff --git a/npc/warps/dungeons/lhz_dun.txt b/npc/warps/dungeons/lhz_dun.txt
index 59277921d..b77b0d2ef 100644
--- a/npc/warps/dungeons/lhz_dun.txt
+++ b/npc/warps/dungeons/lhz_dun.txt
@@ -207,6 +207,6 @@ function script randomw {
switch(rand(3)) {
case 1: warp "lhz_cube",66,136; end;
case 2: warp "lhz_cube",66,74; end;
- default: warp "lhz_cube",67,193; end;
+ default: warp "lhz_cube",67,193; end;
}
}
diff --git a/npc/warps/fields/jawaii.txt b/npc/warps/fields/jawaii.txt
index d59563853..4d3b0879c 100644
--- a/npc/warps/fields/jawaii.txt
+++ b/npc/warps/fields/jawaii.txt
@@ -20,5 +20,5 @@ jawaii_in,133,107,0 warp jawaiiwarp003 1,1,jawaii,111,199
jawaii_in,88,117,0 warp jawaiiwarp004 1,1,jawaii,109,186
jawaii,192,215,0 warp jawaiiwarp005 1,1,jawaii_in,28,94
jawaii_in,27,91,4 script jawaiiwarp006 WARPNPC,1,1,{
-if (getpartnerid() > 0) warp "jawaii",192,218; else warp "jawaii_in",27,94;
+ if (getpartnerid() > 0) warp "jawaii",192,218; else warp "jawaii_in",27,94;
}
diff --git a/npc/woe-fe/agit_main.txt b/npc/woe-fe/agit_main.txt
index 527bebce4..6f4130962 100644
--- a/npc/woe-fe/agit_main.txt
+++ b/npc/woe-fe/agit_main.txt
@@ -102,7 +102,7 @@ OnAgitBreak:
// Show and log error if an unguilded player breaks the Emperium. (Should NEVER happen)
if (.@GID <= 0) {
.@notice$ = "Character "+strcharinfo(0)+" ("+getcharid(0)+") broke the Emperium in Castle: "+strnpcinfo(2)+" while guildless. No data will be saved and Emperium respawned.";
- logmes .@notice$; debugmes .@notice$;
+ logmes .@notice$; debugmes .@notice$;
donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena";
end;
}
diff --git a/npc/woe-fe/aldeg_cas01.txt b/npc/woe-fe/aldeg_cas01.txt
index e72b121c5..401a0040a 100644
--- a/npc/woe-fe/aldeg_cas01.txt
+++ b/npc/woe-fe/aldeg_cas01.txt
@@ -66,8 +66,8 @@ OnRecvCastleA01:
alde_gld,61,87,6 duplicate(OutsideFlagsA1) Neuschwanstein#1-2 GUILD_FLAG
alde_gld,61,79,6 duplicate(OutsideFlagsA1) Neuschwanstein#2 GUILD_FLAG
-alde_gld,45,87,8 duplicate(OutsideFlagsA1) Neuschwanstein#3 GUILD_FLAG
-alde_gld,51,87,8 duplicate(OutsideFlagsA1) Neuschwanstein#4 GUILD_FLAG
+alde_gld,45,87,0 duplicate(OutsideFlagsA1) Neuschwanstein#3 GUILD_FLAG
+alde_gld,51,87,0 duplicate(OutsideFlagsA1) Neuschwanstein#4 GUILD_FLAG
// Guild Flags (Inside Castle)
//============================================================
diff --git a/npc/woe-fe/aldeg_cas03.txt b/npc/woe-fe/aldeg_cas03.txt
index c595a8681..8d05d0a12 100644
--- a/npc/woe-fe/aldeg_cas03.txt
+++ b/npc/woe-fe/aldeg_cas03.txt
@@ -64,8 +64,8 @@ OnRecvCastleA03:
end;
}
-alde_gld,146,82,8 duplicate(OutsideFlagsA3) Nuernberg#1-2 GUILD_FLAG
-alde_gld,138,82,8 duplicate(OutsideFlagsA3) Nuernberg#2 GUILD_FLAG
+alde_gld,146,82,0 duplicate(OutsideFlagsA3) Nuernberg#1-2 GUILD_FLAG
+alde_gld,138,82,0 duplicate(OutsideFlagsA3) Nuernberg#2 GUILD_FLAG
// Guild Flag (Inside Castle)
//============================================================
diff --git a/npc/woe-fe/gefg_cas03.txt b/npc/woe-fe/gefg_cas03.txt
index a206c8bac..69f629a71 100644
--- a/npc/woe-fe/gefg_cas03.txt
+++ b/npc/woe-fe/gefg_cas03.txt
@@ -92,7 +92,7 @@ gefg_cas03,34,208,1 duplicate(InsideFlagsG3) Yesnelph#14 GUILD_FLAG
// Guild Flag (Town)
//============================================================
-geffen,120,132,8 duplicate(InsideFlagsG3) Yesnelph#15 GUILD_FLAG
+geffen,120,132,0 duplicate(InsideFlagsG3) Yesnelph#15 GUILD_FLAG
// Kafra Employee
//============================================================
diff --git a/npc/woe-fe/prtg_cas02.txt b/npc/woe-fe/prtg_cas02.txt
index 315478ba1..3500cfbff 100644
--- a/npc/woe-fe/prtg_cas02.txt
+++ b/npc/woe-fe/prtg_cas02.txt
@@ -66,10 +66,10 @@ OnRecvCastlePt02:
end;
}
-prt_gld,244,126,8 duplicate(OutsideFlagsPR2) Swanhild#1-2 GUILD_FLAG
-prt_gld,244,128,8 duplicate(OutsideFlagsPR2) Swanhild#2 GUILD_FLAG
-prt_gld,236,126,8 duplicate(OutsideFlagsPR2) Swanhild#3 GUILD_FLAG
-prt_gld,236,128,8 duplicate(OutsideFlagsPR2) Swanhild#4 GUILD_FLAG
+prt_gld,244,126,0 duplicate(OutsideFlagsPR2) Swanhild#1-2 GUILD_FLAG
+prt_gld,244,128,0 duplicate(OutsideFlagsPR2) Swanhild#2 GUILD_FLAG
+prt_gld,236,126,0 duplicate(OutsideFlagsPR2) Swanhild#3 GUILD_FLAG
+prt_gld,236,128,0 duplicate(OutsideFlagsPR2) Swanhild#4 GUILD_FLAG
// Guild Flags (Inside Castle)
//============================================================
@@ -87,10 +87,10 @@ prtg_cas02,11,219,4 duplicate(InsideFlagsPR2) Swanhild#7 GUILD_FLAG
prtg_cas02,11,214,4 duplicate(InsideFlagsPR2) Swanhild#8 GUILD_FLAG
prtg_cas02,20,219,4 duplicate(InsideFlagsPR2) Swanhild#9 GUILD_FLAG
prtg_cas02,20,214,4 duplicate(InsideFlagsPR2) Swanhild#10 GUILD_FLAG
-prtg_cas02,79,227,8 duplicate(InsideFlagsPR2) Swanhild#11 GUILD_FLAG
-prtg_cas02,70,227,8 duplicate(InsideFlagsPR2) Swanhild#12 GUILD_FLAG
-prtg_cas02,38,189,8 duplicate(InsideFlagsPR2) Swanhild#13 GUILD_FLAG
-prtg_cas02,34,189,8 duplicate(InsideFlagsPR2) Swanhild#14 GUILD_FLAG
+prtg_cas02,79,227,0 duplicate(InsideFlagsPR2) Swanhild#11 GUILD_FLAG
+prtg_cas02,70,227,0 duplicate(InsideFlagsPR2) Swanhild#12 GUILD_FLAG
+prtg_cas02,38,189,0 duplicate(InsideFlagsPR2) Swanhild#13 GUILD_FLAG
+prtg_cas02,34,189,0 duplicate(InsideFlagsPR2) Swanhild#14 GUILD_FLAG
prtg_cas02,153,161,4 duplicate(InsideFlagsPR2) Swanhild#15 GUILD_FLAG
prtg_cas02,162,161,4 duplicate(InsideFlagsPR2) Swanhild#16 GUILD_FLAG
diff --git a/sql-files/main.sql b/sql-files/main.sql
index 646805d1b..a980cfd80 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -495,16 +495,6 @@ CREATE TABLE IF NOT EXISTS `interlog` (
) ENGINE=MyISAM;
--
--- Table structure for table `interreg`
---
-
-CREATE TABLE IF NOT EXISTS `interreg` (
- `varname` VARCHAR(11) NOT NULL,
- `value` VARCHAR(20) NOT NULL,
- PRIMARY KEY (`varname`)
-) ENGINE=InnoDB;
-
---
-- Table structure for table `inventory`
--
@@ -809,16 +799,7 @@ INSERT INTO `sql_updates` (`timestamp`) VALUES (1400256139); -- 2014-05-17--00-0
INSERT INTO `sql_updates` (`timestamp`) VALUES (1409590380); -- 2014-09-01--16-53.sql
INSERT INTO `sql_updates` (`timestamp`) VALUES (1414975503); -- 2014-11-03--00-45.sql
INSERT INTO `sql_updates` (`timestamp`) VALUES (1435860840); -- 2015-07-02--18-14.sql
-
---
--- Table structure for table `sstatus`
---
-
-CREATE TABLE IF NOT EXISTS `sstatus` (
- `index` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0',
- `name` VARCHAR(255) NOT NULL DEFAULT '',
- `user` INT(11) UNSIGNED NOT NULL DEFAULT '0'
-) ENGINE=MyISAM;
+INSERT INTO `sql_updates` (`timestamp`) VALUES (1436360978); -- 2015-07-08--13-08.sql
--
-- Table structure for table `storage`
diff --git a/sql-files/upgrades/2015-07-08--13-08.sql b/sql-files/upgrades/2015-07-08--13-08.sql
new file mode 100644
index 000000000..4d7208582
--- /dev/null
+++ b/sql-files/upgrades/2015-07-08--13-08.sql
@@ -0,0 +1,6 @@
+#1436360978
+
+DROP TABLE IF EXISTS interreg;
+DROP TABLE IF EXISTS sstatus;
+
+INSERT INTO `sql_updates` (`timestamp`) VALUES (1436360978);
diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt
index 0e6917f16..94d87d191 100644
--- a/sql-files/upgrades/index.txt
+++ b/sql-files/upgrades/index.txt
@@ -25,4 +25,5 @@
2014-05-17--00-06.sql
2014-09-01--16-53.sql
2014-11-03--00-45.sql
-2015-07-02--18-14.sql \ No newline at end of file
+2015-07-02--18-14.sql
+2015-07-08--13-08.sql
diff --git a/src/char/HPMchar.c b/src/char/HPMchar.c
index 2d4c570d7..a67f017c1 100644
--- a/src/char/HPMchar.c
+++ b/src/char/HPMchar.c
@@ -8,7 +8,6 @@
#include "common/HPM.h"
#include "common/cbasetypes.h"
-#if 0 // TODO (HPMDataCheck is disabled for the time being)
#include "char/char.h"
#include "char/geoip.h"
#include "char/inter.h"
@@ -47,7 +46,6 @@
// HPMDataCheck comes after all the other includes
#include "common/HPMDataCheck.h"
-#endif
bool HPM_char_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) {
/* record address */
@@ -59,18 +57,14 @@ bool HPM_char_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTyp
}
void HPM_char_plugin_load_sub(struct hplugin *plugin) {
+ plugin->hpi->sql_handle = inter->sql_handle;
}
void HPM_char_do_init(void) {
-#if 0 // TODO (HPMDataCheck is disabled for the time being)
HPM->datacheck_init(HPMDataCheck, HPMDataCheckLen, HPMDataCheckVer);
-#else
- HPM->DataCheck = NULL;
-#endif
+ HPM_shared_symbols(SERVER_TYPE_CHAR);
}
void HPM_char_do_final(void) {
-#if 0 // TODO (HPMDataCheck is disabled for the time being)
HPM->datacheck_final();
-#endif
}
diff --git a/src/char/char.c b/src/char/char.c
index 5f5dad539..576eb9630 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -80,7 +80,6 @@ char mercenary_db[256] = "mercenary";
char mercenary_owner_db[256] = "mercenary_owner";
char ragsrvinfo_db[256] = "ragsrvinfo";
char elemental_db[256] = "elemental";
-char interreg_db[32] = "interreg";
char account_data_db[256] = "account_data";
char acc_reg_num_db[32] = "acc_reg_num_db";
char acc_reg_str_db[32] = "acc_reg_str_db";
@@ -88,6 +87,7 @@ char char_reg_str_db[32] = "char_reg_str_db";
char char_reg_num_db[32] = "char_reg_num_db";
struct char_interface char_s;
+struct char_interface *chr;
// show loading/saving messages
int save_log = 1;
@@ -122,14 +122,6 @@ int log_inter = 1; // logging inter or not [devil]
int char_aegis_delete = 0; // Verify if char is in guild/party or char and reacts as Aegis does (doesn't allow deletion), see chr->delete2_req for more information
-// Advanced subnet check [LuzZza]
-struct s_subnet {
- uint32 mask;
- uint32 char_ip;
- uint32 map_ip;
-} subnet[16];
-int subnet_count = 0;
-
int max_connect_user = -1;
int gm_allow_group = -1;
int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
@@ -215,7 +207,7 @@ void char_set_char_charselect(int account_id)
character->waiting_disconnect = INVALID_TIMER;
}
- if (chr->login_fd > 0 && !session[chr->login_fd]->flag.eof)
+ if (chr->login_fd > 0 && !sockt->session[chr->login_fd]->flag.eof)
chr->set_account_online(account_id);
}
@@ -255,7 +247,7 @@ void char_set_char_online(int map_id, int char_id, int account_id)
inter_guild->CharOnline(char_id, cp?cp->guild_id:-1);
//Notify login server
- if (chr->login_fd > 0 && !session[chr->login_fd]->flag.eof)
+ if (chr->login_fd > 0 && !sockt->session[chr->login_fd]->flag.eof)
chr->set_account_online(account_id);
}
@@ -301,7 +293,7 @@ void char_set_char_offline(int char_id, int account_id)
}
//Remove char if 1- Set all offline, or 2- character is no longer connected to char-server.
- if (chr->login_fd > 0 && !session[chr->login_fd]->flag.eof && (char_id == -1 || character == NULL || character->fd == -1))
+ if (chr->login_fd > 0 && !sockt->session[chr->login_fd]->flag.eof && (char_id == -1 || character == NULL || character->fd == -1))
chr->set_account_offline(account_id);
}
@@ -364,7 +356,7 @@ void char_set_all_offline(int id)
ShowNotice("Sending users of map-server %d offline.\n",id);
chr->online_char_db->foreach(chr->online_char_db,chr->db_kickoffline,id);
- if (id >= 0 || chr->login_fd <= 0 || session[chr->login_fd]->flag.eof)
+ if (id >= 0 || chr->login_fd <= 0 || sockt->session[chr->login_fd]->flag.eof)
return;
chr->set_login_all_offline();
}
@@ -1997,7 +1989,7 @@ int char_mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) {
//When the weapon is sent and your option is riding, the client crashes on login!?
// FIXME[Haru]: is OPTION_HANBOK intended to be part of this list? And if it is, should the list also include other OPTION_ costumes?
- WBUFL(buf,56) = p->option&(OPTION_RIDING|OPTION_DRAGON|OPTION_WUG|OPTION_WUGRIDER|OPTION_MADOGEAR|OPTION_HANBOK) ? 0 : p->weapon;
+ WBUFW(buf,56) = p->option&(OPTION_RIDING|OPTION_DRAGON|OPTION_WUG|OPTION_WUGRIDER|OPTION_MADOGEAR|OPTION_HANBOK) ? 0 : p->weapon;
WBUFW(buf,58) = p->base_level;
WBUFW(buf,60) = min(p->skill_point, INT16_MAX);
@@ -2215,9 +2207,9 @@ void char_disconnect_player(int account_id)
struct char_session_data* sd;
// disconnect player if online on char-server
- ARR_FIND( 0, sockt->fd_max, i, session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->account_id == account_id );
+ ARR_FIND( 0, sockt->fd_max, i, sockt->session[i] && (sd = (struct char_session_data*)sockt->session[i]->session_data) && sd->account_id == account_id );
if( i < sockt->fd_max )
- set_eof(i);
+ sockt->eof(i);
}
void char_authfail_fd(int fd, int type)
@@ -2289,7 +2281,7 @@ int char_parse_fromlogin_connection_state(int fd)
ShowError("The server communication passwords (default s1/p1) are probably invalid.\n");
ShowError("Also, please make sure your login db has the correct communication username/passwords and the gender of the account is S.\n");
ShowError("The communication passwords are set in /conf/map-server.conf and /conf/char-server.conf\n");
- set_eof(fd);
+ sockt->eof(fd);
return 1;
} else {
ShowStatus("Connected to login-server (connection #%d).\n", fd);
@@ -2324,7 +2316,7 @@ void char_parse_fromlogin_auth_state(int fd)
unsigned int expiration_time = RFIFOL(fd, 29);
RFIFOSKIP(fd,33);
- if( session_isActive(request_id) && (sd=(struct char_session_data*)session[request_id]->session_data) &&
+ if (sockt->session_is_active(request_id) && (sd=(struct char_session_data*)sockt->session[request_id]->session_data) &&
!sd->auth && sd->account_id == account_id && sd->login_id1 == login_id1 && sd->login_id2 == login_id2 && sd->sex == sex )
{
int client_fd = request_id;
@@ -2353,10 +2345,10 @@ void char_parse_fromlogin_auth_state(int fd)
void char_parse_fromlogin_account_data(int fd)
{
- struct char_session_data* sd = (struct char_session_data*)session[fd]->session_data;
+ struct char_session_data* sd = (struct char_session_data*)sockt->session[fd]->session_data;
int i;
// find the authenticated session with this account id
- ARR_FIND( 0, sockt->fd_max, i, session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->auth && sd->account_id == RFIFOL(fd,2) );
+ ARR_FIND( 0, sockt->fd_max, i, sockt->session[i] && (sd = (struct char_session_data*)sockt->session[i]->session_data) && sd->auth && sd->account_id == RFIFOL(fd,2) );
if( i < sockt->fd_max ) {
memcpy(sd->email, RFIFOP(fd,6), 40);
sd->expiration_time = (time_t)RFIFOL(fd,46);
@@ -2397,8 +2389,8 @@ void char_parse_fromlogin_account_data(int fd)
void char_parse_fromlogin_login_pong(int fd)
{
RFIFOSKIP(fd,2);
- if (session[fd])
- session[fd]->flag.ping = 0;
+ if (sockt->session[fd])
+ sockt->session[fd]->flag.ping = 0;
}
void char_changesex(int account_id, int sex)
@@ -2541,11 +2533,11 @@ void char_parse_fromlogin_kick(int fd)
{// Manual kick from char server.
struct char_session_data *tsd;
int i;
- ARR_FIND( 0, sockt->fd_max, i, session[i] && (tsd = (struct char_session_data*)session[i]->session_data) && tsd->account_id == aid );
+ ARR_FIND( 0, sockt->fd_max, i, sockt->session[i] && (tsd = (struct char_session_data*)sockt->session[i]->session_data) && tsd->account_id == aid );
if( i < sockt->fd_max )
{
chr->authfail_fd(i, 2);
- set_eof(i);
+ sockt->eof(i);
}
else // still moving to the map-server
chr->set_char_offline(-1, aid);
@@ -2570,11 +2562,11 @@ void char_parse_fromlogin_update_ip(int fd)
WBUFW(buf,0) = 0x2b1e;
mapif->sendall(buf, 2);
- new_ip = host2ip(login_ip_str);
+ new_ip = sockt->host2ip(login_ip_str);
if (new_ip && new_ip != login_ip)
login_ip = new_ip; //Update login ip, too.
- new_ip = host2ip(char_ip_str);
+ new_ip = sockt->host2ip(char_ip_str);
if (new_ip && new_ip != chr->ip) {
//Update ip.
chr->ip = new_ip;
@@ -2605,22 +2597,22 @@ int char_parse_fromlogin(int fd) {
// only process data from the login-server
if( fd != chr->login_fd ) {
ShowDebug("chr->parse_fromlogin: Disconnecting invalid session #%d (is not the login-server)\n", fd);
- do_close(fd);
+ sockt->close(fd);
return 0;
}
- if( session[fd]->flag.eof ) {
- do_close(fd);
+ if( sockt->session[fd]->flag.eof ) {
+ sockt->close(fd);
chr->login_fd = -1;
loginif->on_disconnect();
return 0;
- } else if ( session[fd]->flag.ping ) {/* we've reached stall time */
- if( DIFF_TICK(sockt->last_tick, session[fd]->rdata_tick) > (sockt->stall_time * 2) ) {/* we can't wait any longer */
- set_eof(fd);
+ } else if ( sockt->session[fd]->flag.ping ) {/* we've reached stall time */
+ if( DIFF_TICK(sockt->last_tick, sockt->session[fd]->rdata_tick) > (sockt->stall_time * 2) ) {/* we can't wait any longer */
+ sockt->eof(fd);
return 0;
- } else if( session[fd]->flag.ping != 2 ) { /* we haven't sent ping out yet */
+ } else if( sockt->session[fd]->flag.ping != 2 ) { /* we haven't sent ping out yet */
chr->ping_login_server(fd);
- session[fd]->flag.ping = 2;
+ sockt->session[fd]->flag.ping = 2;
}
}
@@ -2722,7 +2714,7 @@ int char_parse_fromlogin(int fd) {
default:
ShowError("Unknown packet 0x%04x received from login-server, disconnecting.\n", command);
- set_eof(fd);
+ sockt->eof(fd);
return 0;
}
}
@@ -2949,7 +2941,7 @@ void mapif_server_destroy(int id)
{
if( chr->server[id].fd == -1 )
{
- do_close(chr->server[id].fd);
+ sockt->close(chr->server[id].fd);
chr->server[id].fd = -1;
}
}
@@ -3250,7 +3242,7 @@ void char_parse_frommap_char_select_req(int fd)
int32 group_id = RFIFOL(fd, 18);
RFIFOSKIP(fd,22);
- if( runflag != CHARSERVER_ST_RUNNING )
+ if( core->runflag != CHARSERVER_ST_RUNNING )
{
chr->select_ack(fd, account_id, 0);
}
@@ -3305,7 +3297,7 @@ void char_parse_frommap_change_map_server(int fd)
char_data = (struct mmo_charstatus*)uidb_get(chr->char_db_,RFIFOL(fd,14));
}
- if (runflag == CHARSERVER_ST_RUNNING && session_isActive(map_fd) && char_data) {
+ if (core->runflag == CHARSERVER_ST_RUNNING && sockt->session_is_active(map_fd) && char_data) {
//Send the map server the auth of this player.
struct online_char_data* data;
struct char_auth_node* node;
@@ -3786,7 +3778,7 @@ void char_parse_frommap_auth_request(int fd, int id)
cd = (struct mmo_charstatus*)uidb_get(chr->char_db_,char_id);
}
- if( runflag == CHARSERVER_ST_RUNNING && cd && standalone ) {
+ if( core->runflag == CHARSERVER_ST_RUNNING && cd && standalone ) {
cd->sex = sex;
chr->map_auth_ok(fd, account_id, NULL, cd);
@@ -3794,7 +3786,7 @@ void char_parse_frommap_auth_request(int fd, int id)
return;
}
- if( runflag == CHARSERVER_ST_RUNNING &&
+ if( core->runflag == CHARSERVER_ST_RUNNING &&
cd != NULL &&
node != NULL &&
node->account_id == account_id &&
@@ -3833,14 +3825,14 @@ void char_parse_frommap_request_stats_report(int fd)
opt.silent = 1;
opt.setTimeo = 1;
- if( (sfd = make_connection(host2ip("stats.herc.ws"),(uint16)25427,&opt) ) == -1 ) {
+ if ((sfd = sockt->make_connection(sockt->host2ip("stats.herc.ws"),(uint16)25427,&opt) ) == -1) {
RFIFOSKIP(fd, RFIFOW(fd,2) );/* skip this packet */
RFIFOFLUSH(fd);
return;/* connection not possible, we drop the report */
}
- session[sfd]->flag.server = 1;/* to ensure we won't drop our own packet */
- realloc_fifo(sfd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
+ sockt->session[sfd]->flag.server = 1;/* to ensure we won't drop our own packet */
+ sockt->realloc_fifo(sfd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
WFIFOHEAD(sfd, RFIFOW(fd,2) );
@@ -3849,15 +3841,15 @@ void char_parse_frommap_request_stats_report(int fd)
WFIFOSET(sfd, RFIFOW(fd,2) );
do {
- flush_fifo(sfd);
+ sockt->flush(sfd);
#ifdef WIN32
Sleep(1);
#else
sleep(1);
#endif
- } while( !session[sfd]->flag.eof && session[sfd]->wdata_size );
+ } while( !sockt->session[sfd]->flag.eof && sockt->session[sfd]->wdata_size );
- do_close(sfd);
+ sockt->close(sfd);
RFIFOSKIP(fd, RFIFOW(fd,2) );/* skip this packet */
RFIFOFLUSH(fd);
@@ -3903,11 +3895,11 @@ int char_parse_frommap(int fd)
ARR_FIND( 0, ARRAYLENGTH(chr->server), id, chr->server[id].fd == fd );
if( id == ARRAYLENGTH(chr->server) ) {// not a map server
ShowDebug("chr->parse_frommap: Disconnecting invalid session #%d (is not a map-server)\n", fd);
- do_close(fd);
+ sockt->close(fd);
return 0;
}
- if( session[fd]->flag.eof ) {
- do_close(fd);
+ if( sockt->session[fd]->flag.eof ) {
+ sockt->close(fd);
chr->server[id].fd = -1;
mapif->on_disconnect(id);
return 0;
@@ -4122,7 +4114,7 @@ int char_parse_frommap(int fd)
// no inter server packet. no char server packet -> disconnect
ShowError("Unknown packet 0x%04x from map server, disconnecting.\n", RFIFOW(fd,0));
- set_eof(fd);
+ sockt->eof(fd);
return 0;
}
} // switch
@@ -4172,20 +4164,22 @@ static int char_mapif_init(int fd)
return inter->mapif_init(fd);
}
-//--------------------------------------------
-// Test to know if an IP come from LAN or WAN.
-//--------------------------------------------
-int char_lan_subnetcheck(uint32 ip)
+/**
+ * Checks whether the given IP comes from LAN or WAN.
+ *
+ * @param ip IP address to check.
+ * @retval 0 if it is a WAN IP.
+ * @return the appropriate LAN server address to send, if it is a LAN IP.
+ */
+uint32 char_lan_subnet_check(uint32 ip)
{
- int i;
- ARR_FIND( 0, subnet_count, i, (subnet[i].char_ip & subnet[i].mask) == (ip & subnet[i].mask) );
- if( i < subnet_count ) {
- ShowInfo("Subnet check [%u.%u.%u.%u]: Matches "CL_CYAN"%u.%u.%u.%u/%u.%u.%u.%u"CL_RESET"\n", CONVIP(ip), CONVIP(subnet[i].char_ip & subnet[i].mask), CONVIP(subnet[i].mask));
- return subnet[i].map_ip;
- } else {
- ShowInfo("Subnet check [%u.%u.%u.%u]: "CL_CYAN"WAN"CL_RESET"\n", CONVIP(ip));
- return 0;
+ struct s_subnet lan = {0};
+ if (sockt->lan_subnet_check(ip, &lan)) {
+ ShowInfo("Subnet check [%u.%u.%u.%u]: Matches "CL_CYAN"%u.%u.%u.%u/%u.%u.%u.%u"CL_RESET"\n", CONVIP(ip), CONVIP(lan.ip & lan.mask), CONVIP(lan.mask));
+ return lan.ip;
}
+ ShowInfo("Subnet check [%u.%u.%u.%u]: "CL_CYAN"WAN"CL_RESET"\n", CONVIP(ip));
+ return 0;
}
@@ -4233,7 +4227,7 @@ void char_delete2_accept_ack(int fd, int char_id, uint32 result)
{// HC: <082a>.W <char id>.L <Msg:0-5>.L
#if PACKETVER >= 20130000 /* not sure the exact date -- must refresh or client gets stuck */
if( result == 1 ) {
- struct char_session_data* sd = (struct char_session_data*)session[fd]->session_data;
+ struct char_session_data* sd = (struct char_session_data*)sockt->session[fd]->session_data;
chr->mmo_char_send099d(fd, sd);
}
#endif
@@ -4449,8 +4443,8 @@ void char_parse_char_connect(int fd, struct char_session_data* sd, uint32 ipl)
return;
}
- CREATE(session[fd]->session_data, struct char_session_data, 1);
- sd = (struct char_session_data*)session[fd]->session_data;
+ CREATE(sockt->session[fd]->session_data, struct char_session_data, 1);
+ sd = (struct char_session_data*)sockt->session[fd]->session_data;
sd->account_id = account_id;
sd->login_id1 = login_id1;
sd->login_id2 = login_id2;
@@ -4460,7 +4454,7 @@ void char_parse_char_connect(int fd, struct char_session_data* sd, uint32 ipl)
// send back account_id
chr->send_account_id(fd, account_id);
- if( runflag != CHARSERVER_ST_RUNNING ) {
+ if( core->runflag != CHARSERVER_ST_RUNNING ) {
chr->auth_error(fd, 0);
return;
}
@@ -4504,7 +4498,7 @@ void char_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstat
WFIFOL(fd,2) = cd->char_id;
mapindex->getmapname_ext(mapindex_id2name(cd->last_point.map), (char*)WFIFOP(fd,6));
WFIFOL(fd,22) = htonl((subnet_map_ip) ? subnet_map_ip : chr->server[i].ip);
- WFIFOW(fd,26) = ntows(htons(chr->server[i].port)); // [!] LE byte order here [!]
+ WFIFOW(fd,26) = sockt->ntows(htons(chr->server[i].port)); // [!] LE byte order here [!]
WFIFOSET(fd,28);
}
@@ -4654,7 +4648,7 @@ void char_parse_char_select(int fd, struct char_session_data* sd, uint32 ipl)
//Send NEW auth packet [Kevin]
//FIXME: is this case even possible? [ultramage]
- if ((map_fd = chr->server[i].fd) < 1 || session[map_fd] == NULL)
+ if ((map_fd = chr->server[i].fd) < 1 || sockt->session[map_fd] == NULL)
{
ShowError("chr->parse_char: Attempting to write to invalid session %d! Map Server #%d disconnected.\n", map_fd, i);
chr->server[i].fd = -1;
@@ -4663,7 +4657,7 @@ void char_parse_char_select(int fd, struct char_session_data* sd, uint32 ipl)
return;
}
- subnet_map_ip = chr->lan_subnetcheck(ipl); // Advanced subnet check [LuzZza]
+ subnet_map_ip = chr->lan_subnet_check(ipl);
//Send player to map
chr->send_map_info(fd, i, subnet_map_ip, cd);
@@ -4959,18 +4953,20 @@ void char_login_map_server_ack(int fd, uint8 flag)
WFIFOSET(fd,3);
}
-void char_parse_char_login_map_server(int fd)
+void char_parse_char_login_map_server(int fd, uint32 ipl)
{
char* l_user = (char*)RFIFOP(fd,2);
char* l_pass = (char*)RFIFOP(fd,26);
int i;
l_user[23] = '\0';
l_pass[23] = '\0';
+
ARR_FIND( 0, ARRAYLENGTH(chr->server), i, chr->server[i].fd <= 0 );
- if( runflag != CHARSERVER_ST_RUNNING ||
+ if (core->runflag != CHARSERVER_ST_RUNNING ||
i == ARRAYLENGTH(chr->server) ||
strcmp(l_user, chr->userid) != 0 ||
- strcmp(l_pass, chr->passwd) != 0 )
+ strcmp(l_pass, chr->passwd) != 0 ||
+ !sockt->allowed_ip_check(ipl))
{
chr->login_map_server_ack(fd, 3); // Failure
} else {
@@ -4980,9 +4976,9 @@ void char_parse_char_login_map_server(int fd)
chr->server[i].ip = ntohl(RFIFOL(fd,54));
chr->server[i].port = ntohs(RFIFOW(fd,58));
chr->server[i].users = 0;
- session[fd]->func_parse = chr->parse_frommap;
- session[fd]->flag.server = 1;
- realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
+ sockt->session[fd]->func_parse = chr->parse_frommap;
+ sockt->session[fd]->flag.server = 1;
+ sockt->realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
chr->mapif_init(fd);
}
sockt->datasync(fd, true);
@@ -5057,8 +5053,8 @@ void char_parse_char_move_character(int fd, struct char_session_data* sd)
int char_parse_char_unknown_packet(int fd, uint32 ipl)
{
- ShowError("chr->parse_char: Received unknown packet "CL_WHITE"0x%x"CL_RESET" from ip '"CL_WHITE"%s"CL_RESET"'! Disconnecting!\n", RFIFOW(fd,0), ip2str(ipl, NULL));
- set_eof(fd);
+ ShowError("chr->parse_char: Received unknown packet "CL_WHITE"0x%x"CL_RESET" from ip '"CL_WHITE"%s"CL_RESET"'! Disconnecting!\n", RFIFOW(fd,0), sockt->ip2str(ipl, NULL));
+ sockt->eof(fd);
return 1;
}
@@ -5066,15 +5062,15 @@ int char_parse_char(int fd)
{
unsigned short cmd;
struct char_session_data* sd;
- uint32 ipl = session[fd]->client_addr;
+ uint32 ipl = sockt->session[fd]->client_addr;
- sd = (struct char_session_data*)session[fd]->session_data;
+ sd = (struct char_session_data*)sockt->session[fd]->session_data;
// disconnect any player if no login-server.
if(chr->login_fd < 0)
- set_eof(fd);
+ sockt->eof(fd);
- if(session[fd]->flag.eof)
+ if(sockt->session[fd]->flag.eof)
{
if( sd != NULL && sd->auth ) {
// already authed client
@@ -5084,7 +5080,7 @@ int char_parse_char(int fd)
if( data == NULL || data->server == -1) //If it is not in any server, send it offline. [Skotlex]
chr->set_char_offline(-1,sd->account_id);
}
- do_close(fd);
+ sockt->close(fd);
return 0;
}
@@ -5220,7 +5216,7 @@ int char_parse_char(int fd)
if (RFIFOREST(fd) < 60)
return 0;
{
- chr->parse_char_login_map_server(fd);
+ chr->parse_char_login_map_server(fd, ipl);
}
return 0; // avoid processing of follow-up packets here
@@ -5345,7 +5341,7 @@ int char_broadcast_user_count(int tid, int64 tick, int id, intptr_t data) {
return 0;
prev_users = users;
- if( chr->login_fd > 0 && session[chr->login_fd] )
+ if( chr->login_fd > 0 && sockt->session[chr->login_fd] )
{
// send number of user to login server
loginif->send_users_count(users);
@@ -5376,7 +5372,7 @@ static int char_send_accounts_tologin_sub(DBKey key, DBData *data, va_list ap)
}
int char_send_accounts_tologin(int tid, int64 tick, int id, intptr_t data) {
- if (chr->login_fd > 0 && session[chr->login_fd])
+ if (chr->login_fd > 0 && sockt->session[chr->login_fd])
{
// send account list to login server
int users = chr->online_char_db->size(chr->online_char_db);
@@ -5393,19 +5389,19 @@ int char_send_accounts_tologin(int tid, int64 tick, int id, intptr_t data) {
}
int char_check_connect_login_server(int tid, int64 tick, int id, intptr_t data) {
- if (chr->login_fd > 0 && session[chr->login_fd] != NULL)
+ if (chr->login_fd > 0 && sockt->session[chr->login_fd] != NULL)
return 0;
ShowInfo("Attempt to connect to login-server...\n");
- if ( (chr->login_fd = make_connection(login_ip, login_port, NULL)) == -1) { //Try again later. [Skotlex]
+ if ((chr->login_fd = sockt->make_connection(login_ip, login_port, NULL)) == -1) { //Try again later. [Skotlex]
chr->login_fd = 0;
return 0;
}
- session[chr->login_fd]->func_parse = chr->parse_fromlogin;
- session[chr->login_fd]->flag.server = 1;
- realloc_fifo(chr->login_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
+ sockt->session[chr->login_fd]->func_parse = chr->parse_fromlogin;
+ sockt->session[chr->login_fd]->flag.server = 1;
+ sockt->realloc_fifo(chr->login_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
loginif->connect_to_server();
@@ -5448,60 +5444,6 @@ static int char_online_data_cleanup(int tid, int64 tick, int id, intptr_t data)
return 0;
}
-//----------------------------------
-// Reading LAN Support configuration
-// Rewrote: Advanced subnet check [LuzZza]
-//----------------------------------
-int char_lan_config_read(const char *lancfgName)
-{
- FILE *fp;
- int line_num = 0;
- char line[1024], w1[64], w2[64], w3[64], w4[64];
-
- if((fp = fopen(lancfgName, "r")) == NULL) {
- ShowWarning("LAN Support configuration file is not found: %s\n", lancfgName);
- return 1;
- }
-
- while(fgets(line, sizeof(line), fp)) {
- line_num++;
- if ((line[0] == '/' && line[1] == '/') || line[0] == '\n' || line[1] == '\n')
- continue;
-
- if (sscanf(line,"%63[^:]: %63[^:]:%63[^:]:%63[^\r\n]", w1, w2, w3, w4) != 4) {
-
- ShowWarning("Error syntax of configuration file %s in line %d.\n", lancfgName, line_num);
- continue;
- }
-
- remove_control_chars(w1);
- remove_control_chars(w2);
- remove_control_chars(w3);
- remove_control_chars(w4);
-
- if( strcmpi(w1, "subnet") == 0 )
- {
- subnet[subnet_count].mask = str2ip(w2);
- subnet[subnet_count].char_ip = str2ip(w3);
- subnet[subnet_count].map_ip = str2ip(w4);
-
- if( (subnet[subnet_count].char_ip & subnet[subnet_count].mask) != (subnet[subnet_count].map_ip & subnet[subnet_count].mask) )
- {
- ShowError("%s: Configuration Error: The char server (%s) and map server (%s) belong to different subnetworks!\n", lancfgName, w3, w4);
- continue;
- }
-
- subnet_count++;
- }
- }
-
- if( subnet_count > 1 ) /* only useful if there is more than 1 */
- ShowStatus("Read information about %d subnetworks.\n", subnet_count);
-
- fclose(fp);
- return 0;
-}
-
void char_sql_config_read(const char* cfgName)
{
char line[1024], w1[1024], w2[1024];
@@ -5580,8 +5522,6 @@ void char_sql_config_read(const char* cfgName)
safestrncpy(ragsrvinfo_db,w2,sizeof(ragsrvinfo_db));
else if(!strcmpi(w1,"elemental_db"))
safestrncpy(elemental_db,w2,sizeof(elemental_db));
- else if(!strcmpi(w1,"interreg_db"))
- safestrncpy(interreg_db,w2,sizeof(interreg_db));
else if(!strcmpi(w1,"account_data_db"))
safestrncpy(account_data_db,w2,sizeof(account_data_db));
else if(!strcmpi(w1,"char_reg_num_db"))
@@ -5636,13 +5576,13 @@ int char_config_read(const char* cfgName)
remove_control_chars(w1);
remove_control_chars(w2);
if(strcmpi(w1,"timestamp_format") == 0) {
- safestrncpy(timestamp_format, w2, sizeof(timestamp_format));
+ safestrncpy(showmsg->timestamp_format, w2, sizeof(showmsg->timestamp_format));
} else if(strcmpi(w1,"console_silent")==0){
- msg_silent = atoi(w2);
- if( msg_silent ) /* only bother if its actually enabled */
+ showmsg->silent = atoi(w2);
+ if (showmsg->silent) /* only bother if its actually enabled */
ShowInfo("Console Silent Setting: %d\n", atoi(w2));
} else if(strcmpi(w1,"stdout_with_ansisequence")==0){
- stdout_with_ansisequence = config_switch(w2);
+ showmsg->stdout_with_ansisequence = config_switch(w2) ? true : false;
} else if (strcmpi(w1, "userid") == 0) {
safestrncpy(chr->userid, w2, sizeof(chr->userid));
} else if (strcmpi(w1, "passwd") == 0) {
@@ -5654,27 +5594,27 @@ int char_config_read(const char* cfgName)
safestrncpy(wisp_server_name, w2, sizeof(wisp_server_name));
}
} else if (strcmpi(w1, "login_ip") == 0) {
- login_ip = host2ip(w2);
+ login_ip = sockt->host2ip(w2);
if (login_ip) {
char ip_str[16];
safestrncpy(login_ip_str, w2, sizeof(login_ip_str));
- ShowStatus("Login server IP address : %s -> %s\n", w2, ip2str(login_ip, ip_str));
+ ShowStatus("Login server IP address : %s -> %s\n", w2, sockt->ip2str(login_ip, ip_str));
}
} else if (strcmpi(w1, "login_port") == 0) {
login_port = atoi(w2);
} else if (strcmpi(w1, "char_ip") == 0) {
- chr->ip = host2ip(w2);
+ chr->ip = sockt->host2ip(w2);
if (chr->ip) {
char ip_str[16];
safestrncpy(char_ip_str, w2, sizeof(char_ip_str));
- ShowStatus("Character server IP address : %s -> %s\n", w2, ip2str(chr->ip, ip_str));
+ ShowStatus("Character server IP address : %s -> %s\n", w2, sockt->ip2str(chr->ip, ip_str));
}
} else if (strcmpi(w1, "bind_ip") == 0) {
- bind_ip = host2ip(w2);
+ bind_ip = sockt->host2ip(w2);
if (bind_ip) {
char ip_str[16];
safestrncpy(bind_ip_str, w2, sizeof(bind_ip_str));
- ShowStatus("Character server binding IP address : %s -> %s\n", w2, ip2str(bind_ip, ip_str));
+ ShowStatus("Character server binding IP address : %s -> %s\n", w2, sockt->ip2str(bind_ip, ip_str));
}
} else if (strcmpi(w1, "char_port") == 0) {
chr->port = atoi(w2);
@@ -5800,7 +5740,7 @@ int do_final(void) {
inter->final();
- flush_fifos();
+ sockt->flush_fifos();
do_final_mapif();
loginif->final();
@@ -5813,7 +5753,7 @@ int do_final(void) {
auth_db->destroy(auth_db, NULL);
if( chr->char_fd != -1 ) {
- do_close(chr->char_fd);
+ sockt->close(chr->char_fd);
chr->char_fd = -1;
}
@@ -5827,7 +5767,7 @@ int do_final(void) {
aFree(chr->server[i].map);
aFree(chr->CHAR_CONF_NAME);
- aFree(chr->LAN_CONF_NAME);
+ aFree(chr->NET_CONF_NAME);
aFree(chr->SQL_CONF_NAME);
aFree(chr->INTER_CONF_NAME);
@@ -5852,39 +5792,18 @@ void set_server_type(void) {
/// Called when a terminate signal is received.
void do_shutdown(void)
{
- if( runflag != CHARSERVER_ST_SHUTDOWN )
+ if( core->runflag != CHARSERVER_ST_SHUTDOWN )
{
int id;
- runflag = CHARSERVER_ST_SHUTDOWN;
+ core->runflag = CHARSERVER_ST_SHUTDOWN;
ShowStatus("Shutting down...\n");
// TODO proper shutdown procedure; wait for acks?, kick all characters, ... [FlavoJS]
for( id = 0; id < ARRAYLENGTH(chr->server); ++id )
mapif->server_reset(id);
loginif->check_shutdown();
- flush_fifos();
- runflag = CORE_ST_STOP;
- }
-}
-
-void char_hp_symbols(void) {
- HPM->share(mapindex,"mapindex");
- HPM->share(chr, "chr");
- HPM->share(geoip, "geoip");
- HPM->share(inter_auction, "inter_auction");
- HPM->share(inter_elemental, "inter_elemental");
- HPM->share(inter_guild, "inter_guild");
- HPM->share(inter_homunculus, "inter_homunculus");
- HPM->share(inter_mail, "inter_mail");
- HPM->share(inter_mercenary, "inter_mercenary");
- HPM->share(inter_party, "inter_party");
- HPM->share(inter_pet, "inter_pet");
- HPM->share(inter_quest, "inter_quest");
- HPM->share(inter_storage, "inter_storage");
- HPM->share(inter, "inter");
- HPM->share(loginif, "loginif");
- HPM->share(mapif, "mapif");
- HPM->share(pincode, "pincode");
- HPM->share(inter->sql_handle, "sql_handle");
+ sockt->flush_fifos();
+ core->runflag = CORE_ST_STOP;
+ }
}
/**
@@ -5912,15 +5831,15 @@ static CMDLINEARG(interconfig)
return true;
}
/**
- * --lan-config handler
+ * --net-config handler
*
- * Overrides the default subnet configuration file.
+ * Overrides the default network configuration file.
* @see cmdline->exec
*/
-static CMDLINEARG(lanconfig)
+static CMDLINEARG(netconfig)
{
- aFree(chr->LAN_CONF_NAME);
- chr->LAN_CONF_NAME = aStrdup(params);
+ aFree(chr->NET_CONF_NAME);
+ chr->NET_CONF_NAME = aStrdup(params);
return true;
}
/**
@@ -5930,7 +5849,7 @@ void cmdline_args_init_local(void)
{
CMDLINEARG_DEF2(char-config, charconfig, "Alternative char-server configuration.", CMDLINE_OPT_PARAM);
CMDLINEARG_DEF2(inter-config, interconfig, "Alternative inter-server configuration.", CMDLINE_OPT_PARAM);
- CMDLINEARG_DEF2(lan-config, lanconfig, "Alternative subnet configuration.", CMDLINE_OPT_PARAM);
+ CMDLINEARG_DEF2(net-config, netconfig, "Alternative network configuration.", CMDLINE_OPT_PARAM);
}
int do_init(int argc, char **argv) {
@@ -5940,7 +5859,7 @@ int do_init(int argc, char **argv) {
char_load_defaults();
chr->CHAR_CONF_NAME = aStrdup("conf/char-server.conf");
- chr->LAN_CONF_NAME = aStrdup("conf/subnet.conf");
+ chr->NET_CONF_NAME = aStrdup("conf/network.conf");
chr->SQL_CONF_NAME = aStrdup("conf/inter-server.conf");
chr->INTER_CONF_NAME = aStrdup("conf/inter-server.conf");
@@ -5948,7 +5867,6 @@ int do_init(int argc, char **argv) {
chr->server[i].map = NULL;
HPM_char_do_init();
- HPM->symbol_defaults_sub = char_hp_symbols;
cmdline->exec(argc, argv, CMDLINE_OPT_PREINIT);
HPM->config_read();
HPM->event(HPET_PRE_INIT);
@@ -5959,7 +5877,7 @@ int do_init(int argc, char **argv) {
cmdline->exec(argc, argv, CMDLINE_OPT_NORMAL);
chr->config_read(chr->CHAR_CONF_NAME);
- chr->lan_config_read(chr->LAN_CONF_NAME);
+ sockt->net_config_read(chr->NET_CONF_NAME);
chr->sql_config_read(chr->SQL_CONF_NAME);
if (strcmp(chr->userid, "s1")==0 && strcmp(chr->passwd, "p1")==0) {
@@ -5980,7 +5898,7 @@ int do_init(int argc, char **argv) {
if ((sockt->naddr_ != 0) && (!login_ip || !chr->ip)) {
char ip_str[16];
- ip2str(sockt->addr_[0], ip_str);
+ sockt->ip2str(sockt->addr_[0], ip_str);
if (sockt->naddr_ > 1)
ShowStatus("Multiple interfaces detected.. using %s as our IP address\n", ip_str);
@@ -5988,11 +5906,11 @@ int do_init(int argc, char **argv) {
ShowStatus("Defaulting to %s as our IP address\n", ip_str);
if (!login_ip) {
safestrncpy(login_ip_str, ip_str, sizeof(login_ip_str));
- login_ip = str2ip(login_ip_str);
+ login_ip = sockt->str2ip(login_ip_str);
}
if (!chr->ip) {
safestrncpy(char_ip_str, ip_str, sizeof(char_ip_str));
- chr->ip = str2ip(char_ip_str);
+ chr->ip = sockt->str2ip(char_ip_str);
}
}
@@ -6023,9 +5941,9 @@ int do_init(int argc, char **argv) {
if( SQL_ERROR == SQL->Query(inter->sql_handle, "DELETE FROM `%s` WHERE `guild_id` = '0' AND `account_id` = '0' AND `char_id` = '0'", guild_member_db) )
Sql_ShowDebug(inter->sql_handle);
- set_defaultparse(chr->parse_char);
+ sockt->set_defaultparse(chr->parse_char);
- if( (chr->char_fd = make_listen_bind(bind_ip,chr->port)) == -1 ) {
+ if ((chr->char_fd = sockt->make_listen_bind(bind_ip,chr->port)) == -1) {
ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",chr->port);
exit(EXIT_FAILURE);
}
@@ -6036,10 +5954,10 @@ int do_init(int argc, char **argv) {
#endif
ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", chr->port);
- if( runflag != CORE_ST_STOP )
+ if( core->runflag != CORE_ST_STOP )
{
- shutdown_callback = do_shutdown;
- runflag = CHARSERVER_ST_RUNNING;
+ core->shutdown_callback = do_shutdown;
+ core->runflag = CHARSERVER_ST_RUNNING;
}
HPM->event(HPET_READY);
@@ -6195,7 +6113,7 @@ void char_defaults(void)
chr->parse_frommap = char_parse_frommap;
chr->search_mapserver = char_search_mapserver;
chr->mapif_init = char_mapif_init;
- chr->lan_subnetcheck = char_lan_subnetcheck;
+ chr->lan_subnet_check = char_lan_subnet_check;
chr->delete2_ack = char_delete2_ack;
chr->delete2_accept_actual_ack = char_delete2_accept_actual_ack;
chr->delete2_accept_ack = char_delete2_accept_ack;
@@ -6244,7 +6162,6 @@ void char_defaults(void)
chr->check_connect_login_server = char_check_connect_login_server;
chr->online_data_cleanup_sub = char_online_data_cleanup_sub;
chr->online_data_cleanup = char_online_data_cleanup;
- chr->lan_config_read = char_lan_config_read;
chr->sql_config_read = char_sql_config_read;
chr->config_dispatch = char_config_dispatch;
chr->config_read = char_config_read;
diff --git a/src/char/char.h b/src/char/char.h
index 0f351ca8c..e79cc1898 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -2,10 +2,10 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef COMMON_CHAR_H
-#define COMMON_CHAR_H
+#ifndef CHAR_CHAR_H
+#define CHAR_CHAR_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/core.h" // CORE_ST_LAST
#include "common/db.h"
#include "common/mmo.h"
@@ -64,58 +64,6 @@ enum {
TABLE_GUILD_STORAGE,
};
-#ifdef HERCULES_CORE
-extern int char_name_option;
-extern char char_name_letters[];
-extern bool char_gm_read;
-extern int autosave_interval;
-extern int save_log;
-extern char db_path[];
-extern char char_db[256];
-extern char scdata_db[256];
-extern char cart_db[256];
-extern char inventory_db[256];
-extern char charlog_db[256];
-extern char storage_db[256];
-extern char interlog_db[256];
-extern char skill_db[256];
-extern char memo_db[256];
-extern char guild_db[256];
-extern char guild_alliance_db[256];
-extern char guild_castle_db[256];
-extern char guild_expulsion_db[256];
-extern char guild_member_db[256];
-extern char guild_position_db[256];
-extern char guild_skill_db[256];
-extern char guild_storage_db[256];
-extern char party_db[256];
-extern char pet_db[256];
-extern char mail_db[256];
-extern char auction_db[256];
-extern char quest_db[256];
-extern char homunculus_db[256];
-extern char skill_homunculus_db[256];
-extern char mercenary_db[256];
-extern char mercenary_owner_db[256];
-extern char ragsrvinfo_db[256];
-extern char elemental_db[256];
-extern char interreg_db[32];
-extern char acc_reg_num_db[32];
-extern char acc_reg_str_db[32];
-extern char char_reg_str_db[32];
-extern char char_reg_num_db[32];
-
-extern int db_use_sql_item_db;
-extern int db_use_sql_mob_db;
-extern int db_use_sql_mob_skill_db;
-
-extern int guild_exp_rate;
-extern int log_inter;
-
-void char_load_defaults();
-void char_defaults();
-#endif // HERCULES_CORE
-
struct char_auth_node {
int account_id;
int char_id;
@@ -146,7 +94,7 @@ struct char_interface {
int new_display;
char *CHAR_CONF_NAME;
- char *LAN_CONF_NAME;
+ char *NET_CONF_NAME; ///< Network config filename
char *SQL_CONF_NAME;
char *INTER_CONF_NAME;
@@ -257,7 +205,7 @@ struct char_interface {
int (*parse_frommap) (int fd);
int (*search_mapserver) (unsigned short map, uint32 ip, uint16 port);
int (*mapif_init) (int fd);
- int (*lan_subnetcheck) (uint32 ip);
+ uint32 (*lan_subnet_check) (uint32 ip);
void (*delete2_ack) (int fd, int char_id, uint32 result, time_t delete_date);
void (*delete2_accept_actual_ack) (int fd, int char_id, uint32 result);
void (*delete2_accept_ack) (int fd, int char_id, uint32 result);
@@ -290,7 +238,7 @@ struct char_interface {
void (*parse_char_delete2_accept) (int fd, struct char_session_data* sd);
void (*parse_char_delete2_cancel) (int fd, struct char_session_data* sd);
void (*login_map_server_ack) (int fd, uint8 flag);
- void (*parse_char_login_map_server) (int fd);
+ void (*parse_char_login_map_server) (int fd, uint32 ipl);
void (*parse_char_pincode_check) (int fd, struct char_session_data* sd);
void (*parse_char_pincode_window) (int fd, struct char_session_data* sd);
void (*parse_char_pincode_change) (int fd, struct char_session_data* sd);
@@ -306,12 +254,62 @@ struct char_interface {
int (*check_connect_login_server) (int tid, int64 tick, int id, intptr_t data);
int (*online_data_cleanup_sub) (DBKey key, DBData *data, va_list ap);
int (*online_data_cleanup) (int tid, int64 tick, int id, intptr_t data);
- int (*lan_config_read) (const char *lancfgName);
void (*sql_config_read) (const char* cfgName);
void (*config_dispatch) (char *w1, char *w2);
int (*config_read) (const char* cfgName);
};
-struct char_interface *chr;
+#ifdef HERCULES_CORE
+extern int char_name_option;
+extern char char_name_letters[];
+extern bool char_gm_read;
+extern int autosave_interval;
+extern int save_log;
+extern char db_path[];
+extern char char_db[256];
+extern char scdata_db[256];
+extern char cart_db[256];
+extern char inventory_db[256];
+extern char charlog_db[256];
+extern char storage_db[256];
+extern char interlog_db[256];
+extern char skill_db[256];
+extern char memo_db[256];
+extern char guild_db[256];
+extern char guild_alliance_db[256];
+extern char guild_castle_db[256];
+extern char guild_expulsion_db[256];
+extern char guild_member_db[256];
+extern char guild_position_db[256];
+extern char guild_skill_db[256];
+extern char guild_storage_db[256];
+extern char party_db[256];
+extern char pet_db[256];
+extern char mail_db[256];
+extern char auction_db[256];
+extern char quest_db[256];
+extern char homunculus_db[256];
+extern char skill_homunculus_db[256];
+extern char mercenary_db[256];
+extern char mercenary_owner_db[256];
+extern char ragsrvinfo_db[256];
+extern char elemental_db[256];
+extern char acc_reg_num_db[32];
+extern char acc_reg_str_db[32];
+extern char char_reg_str_db[32];
+extern char char_reg_num_db[32];
+
+extern int db_use_sql_item_db;
+extern int db_use_sql_mob_db;
+extern int db_use_sql_mob_skill_db;
+
+extern int guild_exp_rate;
+extern int log_inter;
+
+void char_load_defaults();
+void char_defaults();
+#endif // HERCULES_CORE
+
+HPShared struct char_interface *chr;
-#endif /* COMMON_CHAR_H */
+#endif /* CHAR_CHAR_H */
diff --git a/src/char/geoip.c b/src/char/geoip.c
index 8c415b6bf..65bb2bdd4 100644
--- a/src/char/geoip.c
+++ b/src/char/geoip.c
@@ -17,6 +17,7 @@
struct s_geoip geoip_data;
struct geoip_interface geoip_s;
+struct geoip_interface *geoip;
/* [Dekamaster/Nightroad] */
#define GEOIP_MAX_COUNTRIES 255
diff --git a/src/char/geoip.h b/src/char/geoip.h
index 4d39011aa..5a6abf68a 100644
--- a/src/char/geoip.h
+++ b/src/char/geoip.h
@@ -5,7 +5,7 @@
#ifndef CHAR_GEOIP_H
#define CHAR_GEOIP_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
/**
* GeoIP information
@@ -26,10 +26,10 @@ struct geoip_interface {
void (*init) (void);
};
-struct geoip_interface *geoip;
-
#ifdef HERCULES_CORE
void geoip_defaults(void);
#endif // HERCULES_CORE
+HPShared struct geoip_interface *geoip;
+
#endif /* CHAR_GEOIP_H */
diff --git a/src/char/int_auction.c b/src/char/int_auction.c
index 8d51777fb..67c83ca22 100644
--- a/src/char/int_auction.c
+++ b/src/char/int_auction.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
struct inter_auction_interface inter_auction_s;
+struct inter_auction_interface *inter_auction;
static int inter_auction_count(int char_id, bool buy)
{
diff --git a/src/char/int_auction.h b/src/char/int_auction.h
index 610042b9a..37fd48264 100644
--- a/src/char/int_auction.h
+++ b/src/char/int_auction.h
@@ -4,13 +4,10 @@
#ifndef CHAR_INT_AUCTION_H
#define CHAR_INT_AUCTION_H
+#include "common/hercules.h"
#include "common/db.h"
#include "common/mmo.h"
-#ifdef HERCULES_CORE
-void inter_auction_defaults(void);
-#endif // HERCULES_CORE
-
/**
* inter_auction_interface interface
**/
@@ -27,6 +24,10 @@ struct inter_auction_interface {
void (*sql_final) (void);
};
-struct inter_auction_interface *inter_auction;
+#ifdef HERCULES_CORE
+void inter_auction_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct inter_auction_interface *inter_auction;
#endif /* CHAR_INT_AUCTION_H */
diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c
index eff84c57d..e7708179a 100644
--- a/src/char/int_elemental.c
+++ b/src/char/int_elemental.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
struct inter_elemental_interface inter_elemental_s;
+struct inter_elemental_interface *inter_elemental;
bool mapif_elemental_save(struct s_elemental* ele) {
bool flag = true;
diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h
index 7385fc496..0fae74cd0 100644
--- a/src/char/int_elemental.h
+++ b/src/char/int_elemental.h
@@ -4,11 +4,7 @@
#ifndef CHAR_INT_ELEMENTAL_H
#define CHAR_INT_ELEMENTAL_H
-#include "common/cbasetypes.h"
-
-#ifdef HERCULES_CORE
-void inter_elemental_defaults(void);
-#endif // HERCULES_CORE
+#include "common/hercules.h"
/**
* inter_elemental_interface interface
@@ -19,6 +15,10 @@ struct inter_elemental_interface {
int (*parse_frommap) (int fd);
};
-struct inter_elemental_interface *inter_elemental;
+#ifdef HERCULES_CORE
+void inter_elemental_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct inter_elemental_interface *inter_elemental;
#endif /* CHAR_INT_ELEMENTAL_H */
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 24561fe21..54355161d 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -35,6 +35,7 @@
#define GUILD_ALLIANCE_REMOVE 0x08
struct inter_guild_interface inter_guild_s;
+struct inter_guild_interface *inter_guild;
static const char dataToHex[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
diff --git a/src/char/int_guild.h b/src/char/int_guild.h
index eb4c930fc..7a5ed3aae 100644
--- a/src/char/int_guild.h
+++ b/src/char/int_guild.h
@@ -23,10 +23,6 @@ enum {
GS_REMOVE = 0x8000,
};
-#ifdef HERCULES_CORE
-void inter_guild_defaults(void);
-#endif // HERCULES_CORE
-
/**
* inter_guild interface
**/
@@ -59,6 +55,10 @@ struct inter_guild_interface {
int (*broken) (int guild_id);
};
-struct inter_guild_interface *inter_guild;
+#ifdef HERCULES_CORE
+void inter_guild_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct inter_guild_interface *inter_guild;
#endif /* CHAR_INT_GUILD_H */
diff --git a/src/char/int_homun.c b/src/char/int_homun.c
index eda2afe69..be72ecd58 100644
--- a/src/char/int_homun.c
+++ b/src/char/int_homun.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
struct inter_homunculus_interface inter_homunculus_s;
+struct inter_homunculus_interface *inter_homunculus;
int inter_homunculus_sql_init(void)
{
diff --git a/src/char/int_homun.h b/src/char/int_homun.h
index 113c6d340..d5a35283f 100644
--- a/src/char/int_homun.h
+++ b/src/char/int_homun.h
@@ -4,13 +4,7 @@
#ifndef CHAR_INT_HOMUN_H
#define CHAR_INT_HOMUN_H
-#include "common/cbasetypes.h"
-
-struct s_homunculus;
-
-#ifdef HERCULES_CORE
-void inter_homunculus_defaults(void);
-#endif // HERCULES_CORE
+#include "common/hercules.h"
/**
* inter_homunculus interface
@@ -21,6 +15,10 @@ struct inter_homunculus_interface {
int (*parse_frommap) (int fd);
};
-struct inter_homunculus_interface *inter_homunculus;
+#ifdef HERCULES_CORE
+void inter_homunculus_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct inter_homunculus_interface *inter_homunculus;
#endif /* CHAR_INT_HOMUN_H */
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index d4bfe14e4..854fe31b1 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
struct inter_mail_interface inter_mail_s;
+struct inter_mail_interface *inter_mail;
static int inter_mail_fromsql(int char_id, struct mail_data* md)
{
diff --git a/src/char/int_mail.h b/src/char/int_mail.h
index 8e6acf846..d15b264b5 100644
--- a/src/char/int_mail.h
+++ b/src/char/int_mail.h
@@ -4,16 +4,12 @@
#ifndef CHAR_INT_MAIL_H
#define CHAR_INT_MAIL_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
struct item;
struct mail_data;
struct mail_message;
-#ifdef HERCULES_CORE
-void inter_mail_defaults(void);
-#endif // HERCULES_CORE
-
/**
* inter_mail interface
**/
@@ -28,6 +24,10 @@ struct inter_mail_interface {
void (*sendmail) (int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item);
};
-struct inter_mail_interface *inter_mail;
+#ifdef HERCULES_CORE
+void inter_mail_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct inter_mail_interface *inter_mail;
#endif /* CHAR_INT_MAIL_H */
diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c
index 02082aa13..dd40a0224 100644
--- a/src/char/int_mercenary.c
+++ b/src/char/int_mercenary.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
struct inter_mercenary_interface inter_mercenary_s;
+struct inter_mercenary_interface *inter_mercenary;
bool inter_mercenary_owner_fromsql(int char_id, struct mmo_charstatus *status)
{
diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h
index 632a9ab37..0d52b02e1 100644
--- a/src/char/int_mercenary.h
+++ b/src/char/int_mercenary.h
@@ -4,14 +4,10 @@
#ifndef CHAR_INT_MERCENARY_H
#define CHAR_INT_MERCENARY_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
struct mmo_charstatus;
-#ifdef HERCULES_CORE
-void inter_mercenary_defaults(void);
-#endif // HERCULES_CORE
-
/**
* inter_mercenary interface
**/
@@ -24,6 +20,10 @@ struct inter_mercenary_interface {
int (*parse_frommap) (int fd);
};
-struct inter_mercenary_interface *inter_mercenary;
+#ifdef HERCULES_CORE
+void inter_mercenary_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct inter_mercenary_interface *inter_mercenary;
#endif /* CHAR_INT_MERCENARY_H */
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 3b857318c..aedcb8535 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
struct inter_party_interface inter_party_s;
+struct inter_party_interface *inter_party;
//Updates party's level range and unsets even share if broken.
static int inter_party_check_lv(struct party_data *p) {
diff --git a/src/char/int_party.h b/src/char/int_party.h
index 99ee5b13e..af3877549 100644
--- a/src/char/int_party.h
+++ b/src/char/int_party.h
@@ -4,6 +4,7 @@
#ifndef CHAR_INT_PARTY_H
#define CHAR_INT_PARTY_H
+#include "common/hercules.h"
#include "common/db.h"
#include "common/mmo.h"
@@ -24,10 +25,6 @@ struct party_data {
unsigned char size; //Total size of party.
};
-#ifdef HERCULES_CORE
-void inter_party_defaults(void);
-#endif // HERCULES_CORE
-
/**
* inter_party interface
**/
@@ -49,6 +46,10 @@ struct inter_party_interface {
int (*CharOffline) (int char_id, int party_id);
};
-struct inter_party_interface *inter_party;
+#ifdef HERCULES_CORE
+void inter_party_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct inter_party_interface *inter_party;
#endif /* CHAR_INT_PARTY_H */
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index 22fe2dcc2..97b2fb6a4 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
struct inter_pet_interface inter_pet_s;
+struct inter_pet_interface *inter_pet;
//---------------------------------------------------------
int inter_pet_tosql(int pet_id, struct s_pet* p)
diff --git a/src/char/int_pet.h b/src/char/int_pet.h
index 69e440781..213c377ee 100644
--- a/src/char/int_pet.h
+++ b/src/char/int_pet.h
@@ -4,11 +4,9 @@
#ifndef CHAR_INT_PET_H
#define CHAR_INT_PET_H
-struct s_pet;
+#include "common/hercules.h"
-#ifdef HERCULES_CORE
-void inter_pet_defaults(void);
-#endif // HERCULES_CORE
+struct s_pet;
/**
* inter_pet interface
@@ -23,6 +21,10 @@ struct inter_pet_interface {
int (*parse_frommap) (int fd);
};
-struct inter_pet_interface *inter_pet;
+#ifdef HERCULES_CORE
+void inter_pet_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct inter_pet_interface *inter_pet;
#endif /* CHAR_INT_PET_H */
diff --git a/src/char/int_quest.c b/src/char/int_quest.c
index cf9b9c172..fcd56230b 100644
--- a/src/char/int_quest.c
+++ b/src/char/int_quest.c
@@ -22,6 +22,7 @@
#include <stdlib.h>
struct inter_quest_interface inter_quest_s;
+struct inter_quest_interface *inter_quest;
/**
* Loads the entire questlog for a character.
diff --git a/src/char/int_quest.h b/src/char/int_quest.h
index 2cb359d40..c2393d103 100644
--- a/src/char/int_quest.h
+++ b/src/char/int_quest.h
@@ -1,12 +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_INT_QUEST_H
+#define CHAR_INT_QUEST_H
-#ifdef HERCULES_CORE
-void inter_quest_defaults(void);
-#endif // HERCULES_CORE
+#include "common/hercules.h"
/**
* inter_quest interface
@@ -15,7 +13,11 @@ struct inter_quest_interface {
int (*parse_frommap) (int fd);
};
-struct inter_quest_interface *inter_quest;
+#ifdef HERCULES_CORE
+void inter_quest_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct inter_quest_interface *inter_quest;
-#endif /* CHAR_QUEST_H */
+#endif /* CHAR_INT_QUEST_H */
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index a12d9fe17..3a8a6a169 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -24,6 +24,7 @@
#define STORAGE_MEMINC 16
struct inter_storage_interface inter_storage_s;
+struct inter_storage_interface *inter_storage;
/// Save storage data to sql
int inter_storage_tosql(int account_id, struct storage_data* p)
diff --git a/src/char/int_storage.h b/src/char/int_storage.h
index 11a16de83..f02decf49 100644
--- a/src/char/int_storage.h
+++ b/src/char/int_storage.h
@@ -4,13 +4,11 @@
#ifndef CHAR_INT_STORAGE_H
#define CHAR_INT_STORAGE_H
+#include "common/hercules.h"
+
struct storage_data;
struct guild_storage;
-#ifdef HERCULES_CORE
-void inter_storage_defaults(void);
-#endif // HERCULES_CORE
-
/**
* inter_storage interface
**/
@@ -26,6 +24,10 @@ struct inter_storage_interface {
int (*parse_frommap) (int fd);
};
-struct inter_storage_interface *inter_storage;
+#ifdef HERCULES_CORE
+void inter_storage_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct inter_storage_interface *inter_storage;
#endif /* CHAR_INT_STORAGE_H */
diff --git a/src/char/inter.c b/src/char/inter.c
index dbb782093..548b24ee8 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -36,6 +36,7 @@
#define WISDELLIST_MAX 256 // Number of elements in the list Delete data Wis
struct inter_interface inter_s;
+struct inter_interface *inter;
int char_server_port = 3306;
char char_server_ip[32] = "127.0.0.1";
@@ -492,7 +493,7 @@ void mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int acc
nullpo_retv(last_ip);
nullpo_retv(lastlogin);
nullpo_retv(birthdate);
- if (map_fd <= 0 || !session_isActive(map_fd))
+ if (map_fd <= 0 || !sockt->session_is_active(map_fd))
return; // check if we have a valid fd
if (!success) {
@@ -511,7 +512,7 @@ void mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int acc
}
inter->msg_to_fd(map_fd, u_fd, u_aid, "Account e-mail: %s | Birthdate: %s", email, birthdate);
- inter->msg_to_fd(map_fd, u_fd, u_aid, "Last IP: %s (%s)", last_ip, geoip->getcountry(str2ip(last_ip)));
+ inter->msg_to_fd(map_fd, u_fd, u_aid, "Last IP: %s (%s)", last_ip, geoip->getcountry(sockt->str2ip(last_ip)));
inter->msg_to_fd(map_fd, u_fd, u_aid, "This user has logged %d times, the last time were at %s", logincount, lastlogin);
inter->msg_to_fd(map_fd, u_fd, u_aid, "-- Character Details --");
@@ -557,7 +558,7 @@ void inter_savereg(int account_id, int char_id, const char *key, unsigned int in
nullpo_retv(key);
/* to login server we go! */
if( key[0] == '#' && key[1] == '#' ) {/* global account reg */
- if( session_isValid(chr->login_fd) )
+ if (sockt->session_is_valid(chr->login_fd))
chr->global_accreg_to_login_add(key,index,val,is_string);
else {
ShowError("Login server unavailable, cant perform update on '%s' variable for AID:%d CID:%d\n",key,account_id,char_id);
@@ -1170,7 +1171,7 @@ int mapif_parse_Registry(int fd)
if( count ) {
int cursor = 14, i;
char key[32], sval[254];
- bool isLoginActive = session_isActive(chr->login_fd);
+ bool isLoginActive = sockt->session_is_active(chr->login_fd);
if( isLoginActive )
chr->global_accreg_to_login_start(account_id,char_id);
diff --git a/src/char/inter.h b/src/char/inter.h
index 2e89a685b..743f7e2f1 100644
--- a/src/char/inter.h
+++ b/src/char/inter.h
@@ -5,20 +5,12 @@
#ifndef CHAR_INTER_H
#define CHAR_INTER_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
#include "common/sql.h"
#include <stdarg.h>
-struct accreg;
-
-#ifdef HERCULES_CORE
-extern unsigned int party_share_level;
-
-void inter_defaults(void);
-#endif // HERCULES_CORE
-
/**
* inter interface
**/
@@ -44,6 +36,12 @@ struct inter_interface {
void (*final) (void);
};
-struct inter_interface *inter;
+#ifdef HERCULES_CORE
+extern unsigned int party_share_level;
+
+void inter_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct inter_interface *inter;
#endif /* CHAR_INTER_H */
diff --git a/src/char/loginif.c b/src/char/loginif.c
index 881c8f2ac..422c7c589 100644
--- a/src/char/loginif.c
+++ b/src/char/loginif.c
@@ -20,6 +20,7 @@
#include <string.h>
struct loginif_interface loginif_s;
+struct loginif_interface *loginif;
/// Resets all the data.
void loginif_reset(void)
@@ -28,7 +29,7 @@ void loginif_reset(void)
// TODO kick everyone out and reset everything or wait for connect and try to reacquire locks [FlavioJS]
for( id = 0; id < ARRAYLENGTH(chr->server); ++id )
mapif->server_reset(id);
- flush_fifos();
+ sockt->flush_fifos();
exit(EXIT_FAILURE);
}
@@ -38,9 +39,9 @@ void loginif_reset(void)
/// If all the conditions are met, it stops the core loop.
void loginif_check_shutdown(void)
{
- if( runflag != CHARSERVER_ST_SHUTDOWN )
+ if( core->runflag != CHARSERVER_ST_SHUTDOWN )
return;
- runflag = CORE_ST_STOP;
+ core->runflag = CORE_ST_STOP;
}
@@ -80,9 +81,8 @@ void do_init_loginif(void)
void do_final_loginif(void)
{
- if( chr->login_fd != -1 )
- {
- do_close(chr->login_fd);
+ if (chr->login_fd != -1) {
+ sockt->close(chr->login_fd);
chr->login_fd = -1;
}
}
diff --git a/src/char/loginif.h b/src/char/loginif.h
index 548eaff02..44cf1ebf6 100644
--- a/src/char/loginif.h
+++ b/src/char/loginif.h
@@ -5,7 +5,7 @@
#ifndef CHAR_LOGINIF_H
#define CHAR_LOGINIF_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
struct char_session_data;
@@ -28,10 +28,10 @@ struct loginif_interface {
void (*connect_to_server) (void);
};
-struct loginif_interface *loginif;
-
#ifdef HERCULES_CORE
void loginif_defaults(void);
#endif // HERCULES_CORE
+HPShared struct loginif_interface *loginif;
+
#endif /* CHAR_LOGINIF_H */
diff --git a/src/char/mapif.c b/src/char/mapif.c
index 92506cd49..eb5a6690a 100644
--- a/src/char/mapif.c
+++ b/src/char/mapif.c
@@ -189,6 +189,7 @@ void mapif_namechange_ack(int fd, int account_id, int char_id, int type, int fla
int mapif_parse_NameChangeRequest(int fd);
struct mapif_interface mapif_s;
+struct mapif_interface *mapif;
void mapif_defaults(void) {
mapif = &mapif_s;
diff --git a/src/char/mapif.h b/src/char/mapif.h
index 6b015d155..a986cd46f 100644
--- a/src/char/mapif.h
+++ b/src/char/mapif.h
@@ -5,7 +5,7 @@
#ifndef CHAR_MAPIF_H
#define CHAR_MAPIF_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/mmo.h"
struct WisData;
@@ -184,10 +184,10 @@ struct mapif_interface {
int (*parse_NameChangeRequest) (int fd);
};
-struct mapif_interface *mapif;
-
#ifdef HERCULES_CORE
void mapif_defaults(void);
#endif // HERCULES_CORE
+HPShared struct mapif_interface *mapif;
+
#endif /* CHAR_MAPIF_H */
diff --git a/src/char/pincode.c b/src/char/pincode.c
index 5085349cc..f5992de83 100644
--- a/src/char/pincode.c
+++ b/src/char/pincode.c
@@ -19,6 +19,7 @@
#include <stdlib.h>
struct pincode_interface pincode_s;
+struct pincode_interface *pincode;
void pincode_handle (int fd, struct char_session_data* sd) {
struct online_char_data* character;
diff --git a/src/char/pincode.h b/src/char/pincode.h
index 01f6c7bf9..3cda11768 100644
--- a/src/char/pincode.h
+++ b/src/char/pincode.h
@@ -5,7 +5,7 @@
#ifndef CHAR_PINCODE_H
#define CHAR_PINCODE_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
struct char_session_data;
@@ -42,10 +42,10 @@ struct pincode_interface {
bool (*config_read) (char *w1, char *w2);
};
-struct pincode_interface *pincode;
-
#ifdef HERCULES_CORE
void pincode_defaults(void);
#endif // HERCULES_CORE
+HPShared struct pincode_interface *pincode;
+
#endif /* CHAR_PINCODE_H */
diff --git a/src/common/HPM.c b/src/common/HPM.c
index cdd9bb769..a78f03daa 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -12,6 +12,7 @@
#include "common/core.h"
#include "common/db.h"
#include "common/malloc.h"
+#include "common/mapindex.h"
#include "common/mmo.h"
#include "common/showmsg.h"
#include "common/socket.h"
@@ -33,6 +34,7 @@
struct malloc_interface iMalloc_HPM;
struct malloc_interface *HPMiMalloc;
struct HPM_interface HPM_s;
+struct HPM_interface *HPM;
/**
* (char*) data name -> (unsigned int) HPMDataCheck[] index
@@ -94,46 +96,260 @@ struct hplugin *hplugin_create(void) {
HPM->plugins[HPM->plugin_count - 1]->filename = NULL;
return HPM->plugins[HPM->plugin_count - 1];
}
-#define HPM_POP(x) { #x , x }
-bool hplugin_populate(struct hplugin *plugin, const char *filename) {
- struct {
- const char* name;
- void *Ref;
- } ToLink[] = {
- HPM_POP(ShowMessage),
- HPM_POP(ShowStatus),
- HPM_POP(ShowSQL),
- HPM_POP(ShowInfo),
- HPM_POP(ShowNotice),
- HPM_POP(ShowWarning),
- HPM_POP(ShowDebug),
- HPM_POP(ShowError),
- HPM_POP(ShowFatalError),
- };
- int i, length = ARRAYLENGTH(ToLink);
- for(i = 0; i < length; i++) {
- void **Link;
- if (!( Link = plugin_import(plugin->dll, ToLink[i].name,void **))) {
- ShowFatalError("HPM:plugin_load: failed to retrieve '%s' for '"CL_WHITE"%s"CL_RESET"'!\n", ToLink[i].name, filename);
- exit(EXIT_FAILURE);
+bool hplugins_addpacket(unsigned short cmd, unsigned short length, void (*receive) (int fd), unsigned int point,unsigned int pluginID) {
+ struct HPluginPacket *packet;
+ unsigned int i;
+
+ if( point >= hpPHP_MAX ) {
+ ShowError("HPM->addPacket:%s: unknown point '%u' specified for packet 0x%04x (len %d)\n",HPM->pid2name(pluginID),point,cmd,length);
+ return false;
+ }
+
+ for(i = 0; i < HPM->packetsc[point]; i++) {
+ if( HPM->packets[point][i].cmd == cmd ) {
+ ShowError("HPM->addPacket:%s: can't add packet 0x%04x, already in use by '%s'!",HPM->pid2name(pluginID),cmd,HPM->pid2name(HPM->packets[point][i].pluginID));
+ return false;
}
- *Link = ToLink[i].Ref;
}
+ RECREATE(HPM->packets[point], struct HPluginPacket, ++HPM->packetsc[point]);
+ packet = &HPM->packets[point][HPM->packetsc[point] - 1];
+
+ packet->pluginID = pluginID;
+ packet->cmd = cmd;
+ packet->len = length;
+ packet->receive = receive;
+
return true;
}
-#undef HPM_POP
+
+void hplugins_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr)
+{
+ /* record address */
+ switch (type) {
+ /* core-handled */
+ case HPDT_SESSION:
+ ret->HPDataSRCPtr = (void**)(&((struct socket_data *)ptr)->hdata);
+ ret->hdatac = &((struct socket_data *)ptr)->hdatac;
+ break;
+ /* goes to sub */
+ default:
+ if (HPM->grabHPDataSub) {
+ if (HPM->grabHPDataSub(ret,type,ptr))
+ return;
+ ShowError("HPM:HPM:grabHPData failed, unknown type %d!\n",type);
+ } else {
+ ShowError("HPM:grabHPData failed, type %d needs sub-handler!\n",type);
+ }
+ ret->HPDataSRCPtr = NULL;
+ ret->hdatac = NULL;
+ return;
+ }
+}
+
+void hplugins_addToHPData(enum HPluginDataTypes type, unsigned int pluginID, void *ptr, void *data, unsigned int index, bool autofree)
+{
+ struct HPluginData *HPData, **HPDataSRC;
+ struct HPDataOperationStorage action;
+ unsigned int i, max;
+
+ HPM->grabHPData(&action,type,ptr);
+
+ if (action.hdatac == NULL) { /* woo it failed! */
+ ShowError("HPM:addToHPData:%s: failed, type %d (%u|%u)\n",HPM->pid2name(pluginID),type,pluginID,index);
+ return;
+ }
+
+ /* flag */
+ HPDataSRC = *(action.HPDataSRCPtr);
+ max = *(action.hdatac);
+
+ /* duplicate check */
+ for (i = 0; i < max; i++) {
+ if (HPDataSRC[i]->pluginID == pluginID && HPDataSRC[i]->type == index) {
+ ShowError("HPM:addToHPData:%s: error! attempting to insert duplicate struct of id %u and index %u\n",HPM->pid2name(pluginID),pluginID,index);
+ return;
+ }
+ }
+
+ /* HPluginData is always same size, probably better to use the ERS (with reasonable chunk size e.g. 10/25/50) */
+ CREATE(HPData, struct HPluginData, 1);
+
+ /* input */
+ HPData->pluginID = pluginID;
+ HPData->type = index;
+ HPData->flag.free = autofree ? 1 : 0;
+ HPData->data = data;
+
+ /* resize */
+ *(action.hdatac) += 1;
+ RECREATE(*(action.HPDataSRCPtr),struct HPluginData *,*(action.hdatac));
+
+ /* RECREATE modified the address */
+ HPDataSRC = *(action.HPDataSRCPtr);
+ HPDataSRC[*(action.hdatac) - 1] = HPData;
+}
+
+void *hplugins_getFromHPData(enum HPluginDataTypes type, unsigned int pluginID, void *ptr, unsigned int index)
+{
+ struct HPDataOperationStorage action;
+ struct HPluginData **HPDataSRC;
+ unsigned int i, max;
+
+ HPM->grabHPData(&action,type,ptr);
+
+ if (action.hdatac == NULL) { /* woo it failed! */
+ ShowError("HPM:getFromHPData:%s: failed, type %d (%u|%u)\n",HPM->pid2name(pluginID),type,pluginID,index);
+ return NULL;
+ }
+
+ /* flag */
+ HPDataSRC = *(action.HPDataSRCPtr);
+ max = *(action.hdatac);
+
+ for (i = 0; i < max; i++) {
+ if (HPDataSRC[i]->pluginID == pluginID && HPDataSRC[i]->type == index)
+ return HPDataSRC[i]->data;
+ }
+
+ return NULL;
+}
+
+void hplugins_removeFromHPData(enum HPluginDataTypes type, unsigned int pluginID, void *ptr, unsigned int index)
+{
+ struct HPDataOperationStorage action;
+ struct HPluginData **HPDataSRC;
+ unsigned int i, max;
+
+ HPM->grabHPData(&action,type,ptr);
+
+ if (action.hdatac == NULL) { /* woo it failed! */
+ ShowError("HPM:removeFromHPData:%s: failed, type %d (%u|%u)\n",HPM->pid2name(pluginID),type,pluginID,index);
+ return;
+ }
+
+ /* flag */
+ HPDataSRC = *(action.HPDataSRCPtr);
+ max = *(action.hdatac);
+
+ for (i = 0; i < max; i++) {
+ if (HPDataSRC[i]->pluginID == pluginID && HPDataSRC[i]->type == index)
+ break;
+ }
+
+ if (i != max) {
+ unsigned int cursor;
+
+ aFree(HPDataSRC[i]->data);/* when its removed we delete it regardless of autofree */
+ aFree(HPDataSRC[i]);
+ HPDataSRC[i] = NULL;
+
+ for (i = 0, cursor = 0; i < max; i++) {
+ if (HPDataSRC[i] == NULL)
+ continue;
+ if (i != cursor)
+ HPDataSRC[cursor] = HPDataSRC[i];
+ cursor++;
+ }
+ *(action.hdatac) = cursor;
+ }
+}
+
+/* TODO: add ability for tracking using pID for the upcoming runtime load/unload support. */
+bool HPM_AddHook(enum HPluginHookType type, const char *target, void *hook, unsigned int pID)
+{
+ if (!HPM->hooking) {
+ ShowError("HPM:AddHook Fail! '%s' tried to hook to '%s' but HPMHooking is disabled!\n",HPM->pid2name(pID),target);
+ return false;
+ }
+ /* search if target is a known hook point within 'common' */
+ /* if not check if a sub-hooking list is available (from the server) and run it by */
+ if (HPM->addhook_sub && HPM->addhook_sub(type,target,hook,pID))
+ return true;
+
+ ShowError("HPM:AddHook: unknown Hooking Point '%s'!\n",target);
+
+ return false;
+}
+
+void HPM_HookStop(const char *func, unsigned int pID)
+{
+ /* track? */
+ HPM->force_return = true;
+}
+
+bool HPM_HookStopped (void)
+{
+ return HPM->force_return;
+}
+
+/**
+ * Adds a plugin-defined command-line argument.
+ *
+ * @param pluginID the current plugin's ID.
+ * @param name the command line argument's name, including the leading '--'.
+ * @param has_param whether the command line argument expects to be followed by a value.
+ * @param func the triggered function.
+ * @param help the help string to be displayed by '--help', if any.
+ * @return the success status.
+ */
+bool hpm_add_arg(unsigned int pluginID, char *name, bool has_param, CmdlineExecFunc func, const char *help)
+{
+ int i;
+
+ if (!name || strlen(name) < 3 || name[0] != '-' || name[1] != '-') {
+ ShowError("HPM:add_arg:%s invalid argument name: arguments must begin with '--' (from %s)\n", name, HPM->pid2name(pluginID));
+ return false;
+ }
+
+ ARR_FIND(0, cmdline->args_data_count, i, strcmp(cmdline->args_data[i].name, name) == 0);
+
+ if (i < cmdline->args_data_count) {
+ ShowError("HPM:add_arg:%s duplicate! (from %s)\n",name,HPM->pid2name(pluginID));
+ return false;
+ }
+
+ return cmdline->arg_add(pluginID, name, '\0', func, help, has_param ? CMDLINE_OPT_PARAM : CMDLINE_OPT_NORMAL);
+}
+
+bool hplugins_addconf(unsigned int pluginID, enum HPluginConfType type, char *name, void (*func) (const char *val))
+{
+ struct HPConfListenStorage *conf;
+ unsigned int i;
+
+ if (type >= HPCT_MAX) {
+ ShowError("HPM->addConf:%s: unknown point '%u' specified for config '%s'\n",HPM->pid2name(pluginID),type,name);
+ return false;
+ }
+
+ for (i = 0; i < HPM->confsc[type]; i++) {
+ if (!strcmpi(name,HPM->confs[type][i].key)) {
+ ShowError("HPM->addConf:%s: duplicate '%s', already in use by '%s'!",HPM->pid2name(pluginID),name,HPM->pid2name(HPM->confs[type][i].pluginID));
+ return false;
+ }
+ }
+
+ RECREATE(HPM->confs[type], struct HPConfListenStorage, ++HPM->confsc[type]);
+ conf = &HPM->confs[type][HPM->confsc[type] - 1];
+
+ conf->pluginID = pluginID;
+ safestrncpy(conf->key, name, HPM_ADDCONF_LENGTH);
+ conf->func = func;
+
+ return true;
+}
+
struct hplugin *hplugin_load(const char* filename) {
struct hplugin *plugin;
struct hplugin_info *info;
struct HPMi_interface **HPMi;
bool anyEvent = false;
void **import_symbol_ref;
- Sql **sql_handle;
int *HPMDataCheckVer;
unsigned int *HPMDataCheckLen;
struct s_HPMDataCheck *HPMDataCheck;
+ const char *(*HPMLoadEvent)(int server_type);
if( HPM->exists(filename) ) {
ShowWarning("HPM:plugin_load: attempting to load duplicate '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
@@ -173,13 +389,6 @@ struct hplugin *hplugin_load(const char* filename) {
*import_symbol_ref = HPM->import_symbol;
- if( !( sql_handle = plugin_import(plugin->dll, "mysql_handle",Sql **) ) ) {
- ShowFatalError("HPM:plugin_load: failed to retrieve 'mysql_handle' for '"CL_WHITE"%s"CL_RESET"'!\n", filename);
- exit(EXIT_FAILURE);
- }
-
- *sql_handle = HPM->import_symbol("sql_handle",plugin->idx);
-
if( !( HPMi = plugin_import(plugin->dll, "HPMi",struct HPMi_interface **) ) ) {
ShowFatalError("HPM:plugin_load: failed to retrieve 'HPMi' for '"CL_WHITE"%s"CL_RESET"'!\n", filename);
exit(EXIT_FAILURE);
@@ -211,8 +420,17 @@ struct hplugin *hplugin_load(const char* filename) {
exit(EXIT_FAILURE);
}
- if( !HPM->populate(plugin,filename) )
- return NULL;
+ if (!(HPMLoadEvent = plugin_import(plugin->dll, "HPM_shared_symbols", const char *(*)(int)))) {
+ ShowFatalError("HPM:plugin_load: failed to retrieve 'HPM_shared_symbols' for '"CL_WHITE"%s"CL_RESET"', most likely not including HPMDataCheck.h!\n", filename);
+ exit(EXIT_FAILURE);
+ }
+ {
+ const char *failure = HPMLoadEvent(SERVER_TYPE);
+ if (failure) {
+ ShowFatalError("HPM:plugin_load: failed to import symbol '%s' into '"CL_WHITE"%s"CL_RESET"'.\n", failure, filename);
+ exit(EXIT_FAILURE);
+ }
+ }
if( !( HPMDataCheckLen = plugin_import(plugin->dll, "HPMDataCheckLen", unsigned int *) ) ) {
ShowFatalError("HPM:plugin_load: failed to retrieve 'HPMDataCheckLen' for '"CL_WHITE"%s"CL_RESET"', most likely not including HPMDataCheck.h!\n", filename);
@@ -238,16 +456,18 @@ struct hplugin *hplugin_load(const char* filename) {
/* id */
plugin->hpi->pid = plugin->idx;
/* core */
- plugin->hpi->addCPCommand = HPM->import_symbol("addCPCommand",plugin->idx);
- plugin->hpi->addPacket = HPM->import_symbol("addPacket",plugin->idx);
- plugin->hpi->addToHPData = HPM->import_symbol("addToHPData",plugin->idx);
- plugin->hpi->getFromHPData = HPM->import_symbol("getFromHPData",plugin->idx);
- plugin->hpi->removeFromHPData = HPM->import_symbol("removeFromHPData",plugin->idx);
- plugin->hpi->AddHook = HPM->import_symbol("AddHook",plugin->idx);
- plugin->hpi->HookStop = HPM->import_symbol("HookStop",plugin->idx);
- plugin->hpi->HookStopped = HPM->import_symbol("HookStopped",plugin->idx);
- plugin->hpi->addArg = HPM->import_symbol("addArg",plugin->idx);
- plugin->hpi->addConf = HPM->import_symbol("addConf",plugin->idx);
+#ifdef CONSOLE_INPUT
+ plugin->hpi->addCPCommand = console->input->addCommand;
+#endif // CONSOLE_INPUT
+ plugin->hpi->addPacket = hplugins_addpacket;
+ plugin->hpi->addToHPData = hplugins_addToHPData;
+ plugin->hpi->getFromHPData = hplugins_getFromHPData;
+ plugin->hpi->removeFromHPData = hplugins_removeFromHPData;
+ plugin->hpi->AddHook = HPM_AddHook;
+ plugin->hpi->HookStop = HPM_HookStop;
+ plugin->hpi->HookStopped = HPM_HookStopped;
+ plugin->hpi->addArg = hpm_add_arg;
+ plugin->hpi->addConf = hplugins_addconf;
/* server specific */
if( HPM->load_sub )
HPM->load_sub(plugin);
@@ -313,9 +533,6 @@ void hplugins_config_read(void) {
if (libconfig->read_file(&plugins_conf, config_filename))
return;
- if( HPM->symbol_defaults_sub )
- HPM->symbol_defaults_sub();
-
plist = libconfig->lookup(&plugins_conf, "plugins_list");
for (i = 0; i < HPM->cmdline_plugins_count; i++) {
config_setting_t *entry = libconfig->setting_add(plist, NULL, CONFIG_TYPE_STRING);
@@ -382,160 +599,7 @@ CPCMD(plugins) {
}
}
}
-void hplugins_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) {
- /* record address */
- switch( type ) {
- /* core-handled */
- case HPDT_SESSION:
- ret->HPDataSRCPtr = (void**)(&((struct socket_data *)ptr)->hdata);
- ret->hdatac = &((struct socket_data *)ptr)->hdatac;
- break;
- /* goes to sub */
- default:
- if( HPM->grabHPDataSub ) {
- if( HPM->grabHPDataSub(ret,type,ptr) )
- return;
- else {
- ShowError("HPM:HPM:grabHPData failed, unknown type %d!\n",type);
- }
- } else
- ShowError("HPM:grabHPData failed, type %d needs sub-handler!\n",type);
- ret->HPDataSRCPtr = NULL;
- ret->hdatac = NULL;
- return;
- }
-}
-void hplugins_addToHPData(enum HPluginDataTypes type, unsigned int pluginID, void *ptr, void *data, unsigned int index, bool autofree) {
- struct HPluginData *HPData, **HPDataSRC;
- struct HPDataOperationStorage action;
- unsigned int i, max;
-
- HPM->grabHPData(&action,type,ptr);
-
- if( action.hdatac == NULL ) { /* woo it failed! */
- ShowError("HPM:addToHPData:%s: failed, type %d (%u|%u)\n",HPM->pid2name(pluginID),type,pluginID,index);
- return;
- }
-
- /* flag */
- HPDataSRC = *(action.HPDataSRCPtr);
- max = *(action.hdatac);
- /* duplicate check */
- for(i = 0; i < max; i++) {
- if( HPDataSRC[i]->pluginID == pluginID && HPDataSRC[i]->type == index ) {
- ShowError("HPM:addToHPData:%s: error! attempting to insert duplicate struct of id %u and index %u\n",HPM->pid2name(pluginID),pluginID,index);
- return;
- }
- }
-
- /* HPluginData is always same size, probably better to use the ERS (with reasonable chunk size e.g. 10/25/50) */
- CREATE(HPData, struct HPluginData, 1);
-
- /* input */
- HPData->pluginID = pluginID;
- HPData->type = index;
- HPData->flag.free = autofree ? 1 : 0;
- HPData->data = data;
-
- /* resize */
- *(action.hdatac) += 1;
- RECREATE(*(action.HPDataSRCPtr),struct HPluginData *,*(action.hdatac));
-
- /* RECREATE modified the address */
- HPDataSRC = *(action.HPDataSRCPtr);
- HPDataSRC[*(action.hdatac) - 1] = HPData;
-}
-
-void *hplugins_getFromHPData(enum HPluginDataTypes type, unsigned int pluginID, void *ptr, unsigned int index) {
- struct HPDataOperationStorage action;
- struct HPluginData **HPDataSRC;
- unsigned int i, max;
-
- HPM->grabHPData(&action,type,ptr);
-
- if( action.hdatac == NULL ) { /* woo it failed! */
- ShowError("HPM:getFromHPData:%s: failed, type %d (%u|%u)\n",HPM->pid2name(pluginID),type,pluginID,index);
- return NULL;
- }
-
- /* flag */
- HPDataSRC = *(action.HPDataSRCPtr);
- max = *(action.hdatac);
-
- for(i = 0; i < max; i++) {
- if( HPDataSRC[i]->pluginID == pluginID && HPDataSRC[i]->type == index )
- return HPDataSRC[i]->data;
- }
-
- return NULL;
-}
-
-void hplugins_removeFromHPData(enum HPluginDataTypes type, unsigned int pluginID, void *ptr, unsigned int index) {
- struct HPDataOperationStorage action;
- struct HPluginData **HPDataSRC;
- unsigned int i, max;
-
- HPM->grabHPData(&action,type,ptr);
-
- if( action.hdatac == NULL ) { /* woo it failed! */
- ShowError("HPM:removeFromHPData:%s: failed, type %d (%u|%u)\n",HPM->pid2name(pluginID),type,pluginID,index);
- return;
- }
-
- /* flag */
- HPDataSRC = *(action.HPDataSRCPtr);
- max = *(action.hdatac);
-
- for(i = 0; i < max; i++) {
- if( HPDataSRC[i]->pluginID == pluginID && HPDataSRC[i]->type == index )
- break;
- }
-
- if( i != max ) {
- unsigned int cursor;
-
- aFree(HPDataSRC[i]->data);/* when its removed we delete it regardless of autofree */
- aFree(HPDataSRC[i]);
- HPDataSRC[i] = NULL;
-
- for(i = 0, cursor = 0; i < max; i++) {
- if( HPDataSRC[i] == NULL )
- continue;
- if( i != cursor )
- HPDataSRC[cursor] = HPDataSRC[i];
- cursor++;
- }
- *(action.hdatac) = cursor;
- }
-}
-
-bool hplugins_addpacket(unsigned short cmd, short length,void (*receive) (int fd),unsigned int point,unsigned int pluginID) {
- struct HPluginPacket *packet;
- unsigned int i;
-
- if( point >= hpPHP_MAX ) {
- ShowError("HPM->addPacket:%s: unknown point '%u' specified for packet 0x%04x (len %d)\n",HPM->pid2name(pluginID),point,cmd,length);
- return false;
- }
-
- for(i = 0; i < HPM->packetsc[point]; i++) {
- if( HPM->packets[point][i].cmd == cmd ) {
- ShowError("HPM->addPacket:%s: can't add packet 0x%04x, already in use by '%s'!",HPM->pid2name(pluginID),cmd,HPM->pid2name(HPM->packets[point][i].pluginID));
- return false;
- }
- }
-
- RECREATE(HPM->packets[point], struct HPluginPacket, ++HPM->packetsc[point]);
- packet = &HPM->packets[point][HPM->packetsc[point] - 1];
-
- packet->pluginID = pluginID;
- packet->cmd = cmd;
- packet->len = length;
- packet->receive = receive;
-
- return true;
-}
/*
0 = unknown
1 = OK
@@ -612,80 +676,7 @@ void* HPM_reallocz(void *p, size_t size, const char *file, int line, const char
char* HPM_astrdup(const char *p, const char *file, int line, const char *func) {
return iMalloc->astrdup(p,HPM_file2ptr(file),line,func);
}
-/* TODO: add ability for tracking using pID for the upcoming runtime load/unload support. */
-bool HPM_AddHook(enum HPluginHookType type, const char *target, void *hook, unsigned int pID) {
- if( !HPM->hooking ) {
- ShowError("HPM:AddHook Fail! '%s' tried to hook to '%s' but HPMHooking is disabled!\n",HPM->pid2name(pID),target);
- return false;
- }
- /* search if target is a known hook point within 'common' */
- /* if not check if a sub-hooking list is available (from the server) and run it by */
- if( HPM->addhook_sub && HPM->addhook_sub(type,target,hook,pID) )
- return true;
-
- ShowError("HPM:AddHook: unknown Hooking Point '%s'!\n",target);
-
- return false;
-}
-void HPM_HookStop (const char *func, unsigned int pID) {
- /* track? */
- HPM->force_return = true;
-}
-bool HPM_HookStopped (void) {
- return HPM->force_return;
-}
-/**
- * Adds a plugin-defined command-line argument.
- *
- * @param pluginID the current plugin's ID.
- * @param name the command line argument's name, including the leading '--'.
- * @param has_param whether the command line argument expects to be followed by a value.
- * @param func the triggered function.
- * @param help the help string to be displayed by '--help', if any.
- * @return the success status.
- */
-bool hpm_add_arg(unsigned int pluginID, char *name, bool has_param, CmdlineExecFunc func, const char *help) {
- int i;
-
- if (!name || strlen(name) < 3 || name[0] != '-' || name[1] != '-') {
- ShowError("HPM:add_arg:%s invalid argument name: arguments must begin with '--' (from %s)\n", name, HPM->pid2name(pluginID));
- return false;
- }
-
- ARR_FIND(0, cmdline->args_data_count, i, strcmp(cmdline->args_data[i].name, name) == 0);
-
- if (i < cmdline->args_data_count) {
- ShowError("HPM:add_arg:%s duplicate! (from %s)\n",name,HPM->pid2name(pluginID));
- return false;
- }
-
- return cmdline->arg_add(pluginID, name, '\0', func, help, has_param ? CMDLINE_OPT_PARAM : CMDLINE_OPT_NORMAL);
-}
-bool hplugins_addconf(unsigned int pluginID, enum HPluginConfType type, char *name, void (*func) (const char *val)) {
- struct HPConfListenStorage *conf;
- unsigned int i;
-
- if( type >= HPCT_MAX ) {
- ShowError("HPM->addConf:%s: unknown point '%u' specified for config '%s'\n",HPM->pid2name(pluginID),type,name);
- return false;
- }
-
- for(i = 0; i < HPM->confsc[type]; i++) {
- if( !strcmpi(name,HPM->confs[type][i].key) ) {
- ShowError("HPM->addConf:%s: duplicate '%s', already in use by '%s'!",HPM->pid2name(pluginID),name,HPM->pid2name(HPM->confs[type][i].pluginID));
- return false;
- }
- }
-
- RECREATE(HPM->confs[type], struct HPConfListenStorage, ++HPM->confsc[type]);
- conf = &HPM->confs[type][HPM->confsc[type] - 1];
- conf->pluginID = pluginID;
- safestrncpy(conf->key, name, HPM_ADDCONF_LENGTH);
- conf->func = func;
-
- return true;
-}
bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType point) {
unsigned int i;
@@ -716,7 +707,7 @@ bool HPM_DataCheck(struct s_HPMDataCheck *src, unsigned int size, int version, c
}
for (i = 0; i < size; i++) {
- if (!(src[i].type|SERVER_TYPE))
+ if (!(src[i].type&SERVER_TYPE))
continue;
if (!strdb_exists(datacheck_db, src[i].name)) {
@@ -754,46 +745,6 @@ void HPM_datacheck_final(void) {
db_destroy(datacheck_db);
}
-void hplugins_share_defaults(void) {
- /* console */
-#ifdef CONSOLE_INPUT
- HPM->share(console->input->addCommand,"addCPCommand");
-#endif
- /* our own */
- HPM->share(hplugins_addpacket,"addPacket");
- HPM->share(hplugins_addToHPData,"addToHPData");
- HPM->share(hplugins_getFromHPData,"getFromHPData");
- HPM->share(hplugins_removeFromHPData,"removeFromHPData");
- HPM->share(HPM_AddHook,"AddHook");
- HPM->share(HPM_HookStop,"HookStop");
- HPM->share(HPM_HookStopped,"HookStopped");
- HPM->share(hpm_add_arg,"addArg");
- HPM->share(hplugins_addconf,"addConf");
- /* core */
- HPM->share(&runflag,"runflag");
- HPM->share(arg_v,"arg_v");
- HPM->share(&arg_c,"arg_c");
- HPM->share(SERVER_NAME,"SERVER_NAME");
- HPM->share(&SERVER_TYPE,"SERVER_TYPE");
- HPM->share(DB, "DB");
- HPM->share(HPMiMalloc, "iMalloc");
- HPM->share(nullpo,"nullpo");
- /* socket */
- HPM->share(sockt,"sockt");
- /* strlib */
- HPM->share(strlib,"strlib");
- HPM->share(sv,"sv");
- HPM->share(StrBuf,"StrBuf");
- /* sql */
- HPM->share(SQL,"SQL");
- /* timer */
- HPM->share(timer,"timer");
- /* libconfig */
- HPM->share(libconfig,"libconfig");
- /* sysinfo */
- HPM->share(sysinfo,"sysinfo");
-}
-
void hpm_init(void) {
unsigned int i;
datacheck_db = NULL;
@@ -825,8 +776,6 @@ void hpm_init(void) {
HPM->packetsc[i] = 0;
}
- HPM->symbol_defaults();
-
#ifdef CONSOLE_INPUT
console->input->addCommand("plugins",CPCMD_A(plugins));
#endif
@@ -921,10 +870,7 @@ void hpm_defaults(void) {
HPM->iscompatible = hplugin_iscompatible;
HPM->import_symbol = hplugin_import_symbol;
HPM->share = hplugin_export_symbol;
- HPM->symbol_defaults = hplugins_share_defaults;
HPM->config_read = hplugins_config_read;
- HPM->populate = hplugin_populate;
- HPM->symbol_defaults_sub = NULL;
HPM->pid2name = hplugins_id2name;
HPM->parse_packets = hplugins_parse_packets;
HPM->load_sub = NULL;
diff --git a/src/common/HPM.h b/src/common/HPM.h
index 1358f19dc..c13132cfc 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -8,8 +8,8 @@
#error You should never include HPM.h from a plugin.
#endif
+#include "common/hercules.h"
#include "common/HPMi.h"
-#include "common/cbasetypes.h"
#ifdef WIN32
#ifndef WIN32_LEAN_AND_MEAN
@@ -129,10 +129,7 @@ struct HPM_interface {
void (*event) (enum hp_event_types type);
void *(*import_symbol) (char *name, unsigned int pID);
void (*share) (void *, char *);
- void (*symbol_defaults) (void);
void (*config_read) (void);
- bool (*populate) (struct hplugin *plugin,const char *filename);
- void (*symbol_defaults_sub) (void);//TODO drop
char *(*pid2name) (unsigned int pid);
unsigned char (*parse_packets) (int fd, enum HPluginPacketHookingPoints point);
void (*load_sub) (struct hplugin *plugin);
@@ -150,7 +147,7 @@ struct HPM_interface {
CMDLINEARG(loadplugin);
-struct HPM_interface *HPM;
+extern struct HPM_interface *HPM;
void hpm_defaults(void);
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index be798ceb5..7e737103c 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -6,6 +6,12 @@
#ifndef HPM_DATA_CHECK_H
#define HPM_DATA_CHECK_H
+#if !defined(HPMHOOKGEN)
+#include "common/HPMSymbols.inc.h"
+#endif // ! HPMHOOKGEN
+#ifdef HPM_SYMBOL
+#undef HPM_SYMBOL
+#endif // HPM_SYMBOL
HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#ifdef CHAR_CHAR_H
@@ -107,6 +113,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#ifdef COMMON_CORE_H
{ "CmdlineArgData", sizeof(struct CmdlineArgData), SERVER_TYPE_ALL },
{ "cmdline_interface", sizeof(struct cmdline_interface), SERVER_TYPE_ALL },
+ { "core_interface", sizeof(struct core_interface), SERVER_TYPE_ALL },
#else
#define COMMON_CORE_H
#endif // COMMON_CORE_H
@@ -142,7 +149,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#define COMMON_MALLOC_H
#endif // COMMON_MALLOC_H
#ifdef COMMON_MAPINDEX_H
- { "mapindex_interface", sizeof(struct mapindex_interface), SERVER_TYPE_ALL },
+ { "mapindex_interface", sizeof(struct mapindex_interface), SERVER_TYPE_CHAR|SERVER_TYPE_MAP },
#else
#define COMMON_MAPINDEX_H
#endif // COMMON_MAPINDEX_H
@@ -185,8 +192,14 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define COMMON_NULLPO_H
#endif // COMMON_NULLPO_H
+ #ifdef COMMON_SHOWMSG_H
+ { "showmsg_interface", sizeof(struct showmsg_interface), SERVER_TYPE_ALL },
+ #else
+ #define COMMON_SHOWMSG_H
+ #endif // COMMON_SHOWMSG_H
#ifdef COMMON_SOCKET_H
{ "hSockOpt", sizeof(struct hSockOpt), SERVER_TYPE_ALL },
+ { "s_subnet", sizeof(struct s_subnet), SERVER_TYPE_ALL },
{ "socket_data", sizeof(struct socket_data), SERVER_TYPE_ALL },
{ "socket_interface", sizeof(struct socket_interface), SERVER_TYPE_ALL },
#else
@@ -332,6 +345,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#ifdef MAP_HOMUNCULUS_H
{ "h_stats", sizeof(struct h_stats), SERVER_TYPE_MAP },
{ "homun_data", sizeof(struct homun_data), SERVER_TYPE_MAP },
+ { "homun_dbs", sizeof(struct homun_dbs), SERVER_TYPE_MAP },
{ "homun_skill_tree_entry", sizeof(struct homun_skill_tree_entry), SERVER_TYPE_MAP },
{ "homunculus_interface", sizeof(struct homunculus_interface), SERVER_TYPE_MAP },
{ "s_homunculus_db", sizeof(struct s_homunculus_db), SERVER_TYPE_MAP },
@@ -599,6 +613,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "s_skill_arrow_db", sizeof(struct s_skill_arrow_db), SERVER_TYPE_MAP },
{ "s_skill_changematerial_db", sizeof(struct s_skill_changematerial_db), SERVER_TYPE_MAP },
{ "s_skill_db", sizeof(struct s_skill_db), SERVER_TYPE_MAP },
+ { "s_skill_dbs", sizeof(struct s_skill_dbs), SERVER_TYPE_MAP },
{ "s_skill_improvise_db", sizeof(struct s_skill_improvise_db), SERVER_TYPE_MAP },
{ "s_skill_magicmushroom_db", sizeof(struct s_skill_magicmushroom_db), SERVER_TYPE_MAP },
{ "s_skill_produce_db", sizeof(struct s_skill_produce_db), SERVER_TYPE_MAP },
@@ -620,6 +635,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "regen_data", sizeof(struct regen_data), SERVER_TYPE_MAP },
{ "regen_data_sub", sizeof(struct regen_data_sub), SERVER_TYPE_MAP },
{ "s_refine_info", sizeof(struct s_refine_info), SERVER_TYPE_MAP },
+ { "s_status_dbs", sizeof(struct s_status_dbs), SERVER_TYPE_MAP },
{ "sc_display_entry", sizeof(struct sc_display_entry), SERVER_TYPE_MAP },
{ "status_change", sizeof(struct status_change), SERVER_TYPE_MAP },
{ "status_change_entry", sizeof(struct status_change_entry), SERVER_TYPE_MAP },
diff --git a/src/common/HPMSymbols.inc.h b/src/common/HPMSymbols.inc.h
new file mode 100644
index 000000000..3a4c5852c
--- /dev/null
+++ b/src/common/HPMSymbols.inc.h
@@ -0,0 +1,451 @@
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+//
+// NOTE: This file was auto-generated and should never be manually edited,
+// as it will get overwritten.
+
+#if !defined(HERCULES_CORE)
+#ifdef COMMON_UTILS_H /* HCache */
+struct HCache_interface *HCache;
+#endif // COMMON_UTILS_H
+#ifdef MAP_ATCOMMAND_H /* atcommand */
+struct atcommand_interface *atcommand;
+#endif // MAP_ATCOMMAND_H
+#ifdef MAP_BATTLE_H /* battle */
+struct battle_interface *battle;
+#endif // MAP_BATTLE_H
+#ifdef MAP_BATTLEGROUND_H /* bg */
+struct battleground_interface *bg;
+#endif // MAP_BATTLEGROUND_H
+#ifdef MAP_BUYINGSTORE_H /* buyingstore */
+struct buyingstore_interface *buyingstore;
+#endif // MAP_BUYINGSTORE_H
+#ifdef MAP_CHANNEL_H /* channel */
+struct channel_interface *channel;
+#endif // MAP_CHANNEL_H
+#ifdef CHAR_CHAR_H /* chr */
+struct char_interface *chr;
+#endif // CHAR_CHAR_H
+#ifdef MAP_CHAT_H /* chat */
+struct chat_interface *chat;
+#endif // MAP_CHAT_H
+#ifdef MAP_CHRIF_H /* chrif */
+struct chrif_interface *chrif;
+#endif // MAP_CHRIF_H
+#ifdef MAP_CLIF_H /* clif */
+struct clif_interface *clif;
+#endif // MAP_CLIF_H
+#ifdef COMMON_CORE_H /* cmdline */
+struct cmdline_interface *cmdline;
+#endif // COMMON_CORE_H
+#ifdef COMMON_CONSOLE_H /* console */
+struct console_interface *console;
+#endif // COMMON_CONSOLE_H
+#ifdef COMMON_CORE_H /* core */
+struct core_interface *core;
+#endif // COMMON_CORE_H
+#ifdef COMMON_DB_H /* DB */
+struct db_interface *DB;
+#endif // COMMON_DB_H
+#ifdef MAP_DUEL_H /* duel */
+struct duel_interface *duel;
+#endif // MAP_DUEL_H
+#ifdef MAP_ELEMENTAL_H /* elemental */
+struct elemental_interface *elemental;
+#endif // MAP_ELEMENTAL_H
+#ifdef CHAR_GEOIP_H /* geoip */
+struct geoip_interface *geoip;
+#endif // CHAR_GEOIP_H
+#ifdef MAP_GUILD_H /* guild */
+struct guild_interface *guild;
+#endif // MAP_GUILD_H
+#ifdef MAP_STORAGE_H /* gstorage */
+struct guild_storage_interface *gstorage;
+#endif // MAP_STORAGE_H
+#ifdef MAP_HOMUNCULUS_H /* homun */
+struct homunculus_interface *homun;
+#endif // MAP_HOMUNCULUS_H
+#ifdef MAP_INSTANCE_H /* instance */
+struct instance_interface *instance;
+#endif // MAP_INSTANCE_H
+#ifdef CHAR_INT_AUCTION_H /* inter_auction */
+struct inter_auction_interface *inter_auction;
+#endif // CHAR_INT_AUCTION_H
+#ifdef CHAR_INT_ELEMENTAL_H /* inter_elemental */
+struct inter_elemental_interface *inter_elemental;
+#endif // CHAR_INT_ELEMENTAL_H
+#ifdef CHAR_INT_GUILD_H /* inter_guild */
+struct inter_guild_interface *inter_guild;
+#endif // CHAR_INT_GUILD_H
+#ifdef CHAR_INT_HOMUN_H /* inter_homunculus */
+struct inter_homunculus_interface *inter_homunculus;
+#endif // CHAR_INT_HOMUN_H
+#ifdef CHAR_INTER_H /* inter */
+struct inter_interface *inter;
+#endif // CHAR_INTER_H
+#ifdef CHAR_INT_MAIL_H /* inter_mail */
+struct inter_mail_interface *inter_mail;
+#endif // CHAR_INT_MAIL_H
+#ifdef CHAR_INT_MERCENARY_H /* inter_mercenary */
+struct inter_mercenary_interface *inter_mercenary;
+#endif // CHAR_INT_MERCENARY_H
+#ifdef CHAR_INT_PARTY_H /* inter_party */
+struct inter_party_interface *inter_party;
+#endif // CHAR_INT_PARTY_H
+#ifdef CHAR_INT_PET_H /* inter_pet */
+struct inter_pet_interface *inter_pet;
+#endif // CHAR_INT_PET_H
+#ifdef CHAR_INT_QUEST_H /* inter_quest */
+struct inter_quest_interface *inter_quest;
+#endif // CHAR_INT_QUEST_H
+#ifdef CHAR_INT_STORAGE_H /* inter_storage */
+struct inter_storage_interface *inter_storage;
+#endif // CHAR_INT_STORAGE_H
+#ifdef MAP_INTIF_H /* intif */
+struct intif_interface *intif;
+#endif // MAP_INTIF_H
+#ifdef MAP_IRC_BOT_H /* ircbot */
+struct irc_bot_interface *ircbot;
+#endif // MAP_IRC_BOT_H
+#ifdef MAP_ITEMDB_H /* itemdb */
+struct itemdb_interface *itemdb;
+#endif // MAP_ITEMDB_H
+#ifdef COMMON_CONF_H /* libconfig */
+struct libconfig_interface *libconfig;
+#endif // COMMON_CONF_H
+#ifdef MAP_LOG_H /* logs */
+struct log_interface *logs;
+#endif // MAP_LOG_H
+#ifdef LOGIN_LOGIN_H /* login */
+struct login_interface *login;
+#endif // LOGIN_LOGIN_H
+#ifdef CHAR_LOGINIF_H /* loginif */
+struct loginif_interface *loginif;
+#endif // CHAR_LOGINIF_H
+#ifdef MAP_MAIL_H /* mail */
+struct mail_interface *mail;
+#endif // MAP_MAIL_H
+#ifdef COMMON_MALLOC_H /* iMalloc */
+struct malloc_interface *iMalloc;
+#endif // COMMON_MALLOC_H
+#ifdef MAP_MAP_H /* map */
+struct map_interface *map;
+#endif // MAP_MAP_H
+#ifdef CHAR_MAPIF_H /* mapif */
+struct mapif_interface *mapif;
+#endif // CHAR_MAPIF_H
+#ifdef COMMON_MAPINDEX_H /* mapindex */
+struct mapindex_interface *mapindex;
+#endif // COMMON_MAPINDEX_H
+#ifdef MAP_MAP_H /* mapit */
+struct mapit_interface *mapit;
+#endif // MAP_MAP_H
+#ifdef MAP_MAPREG_H /* mapreg */
+struct mapreg_interface *mapreg;
+#endif // MAP_MAPREG_H
+#ifdef MAP_MERCENARY_H /* mercenary */
+struct mercenary_interface *mercenary;
+#endif // MAP_MERCENARY_H
+#ifdef MAP_MOB_H /* mob */
+struct mob_interface *mob;
+#endif // MAP_MOB_H
+#ifdef MAP_NPC_H /* npc */
+struct npc_interface *npc;
+#endif // MAP_NPC_H
+#ifdef COMMON_NULLPO_H /* nullpo */
+struct nullpo_interface *nullpo;
+#endif // COMMON_NULLPO_H
+#ifdef MAP_PARTY_H /* party */
+struct party_interface *party;
+#endif // MAP_PARTY_H
+#ifdef MAP_PATH_H /* path */
+struct path_interface *path;
+#endif // MAP_PATH_H
+#ifdef MAP_PC_GROUPS_H /* pcg */
+struct pc_groups_interface *pcg;
+#endif // MAP_PC_GROUPS_H
+#ifdef MAP_PC_H /* pc */
+struct pc_interface *pc;
+#endif // MAP_PC_H
+#ifdef MAP_PET_H /* pet */
+struct pet_interface *pet;
+#endif // MAP_PET_H
+#ifdef CHAR_PINCODE_H /* pincode */
+struct pincode_interface *pincode;
+#endif // CHAR_PINCODE_H
+#ifdef MAP_QUEST_H /* quest */
+struct quest_interface *quest;
+#endif // MAP_QUEST_H
+#ifdef MAP_SCRIPT_H /* script */
+struct script_interface *script;
+#endif // MAP_SCRIPT_H
+#ifdef MAP_SEARCHSTORE_H /* searchstore */
+struct searchstore_interface *searchstore;
+#endif // MAP_SEARCHSTORE_H
+#ifdef COMMON_SHOWMSG_H /* showmsg */
+struct showmsg_interface *showmsg;
+#endif // COMMON_SHOWMSG_H
+#ifdef MAP_SKILL_H /* skill */
+struct skill_interface *skill;
+#endif // MAP_SKILL_H
+#ifdef COMMON_SOCKET_H /* sockt */
+struct socket_interface *sockt;
+#endif // COMMON_SOCKET_H
+#ifdef COMMON_SQL_H /* SQL */
+struct sql_interface *SQL;
+#endif // COMMON_SQL_H
+#ifdef MAP_STATUS_H /* status */
+struct status_interface *status;
+#endif // MAP_STATUS_H
+#ifdef MAP_STORAGE_H /* storage */
+struct storage_interface *storage;
+#endif // MAP_STORAGE_H
+#ifdef COMMON_STRLIB_H /* StrBuf */
+struct stringbuf_interface *StrBuf;
+#endif // COMMON_STRLIB_H
+#ifdef COMMON_STRLIB_H /* strlib */
+struct strlib_interface *strlib;
+#endif // COMMON_STRLIB_H
+#ifdef COMMON_STRLIB_H /* sv */
+struct sv_interface *sv;
+#endif // COMMON_STRLIB_H
+#ifdef COMMON_SYSINFO_H /* sysinfo */
+struct sysinfo_interface *sysinfo;
+#endif // COMMON_SYSINFO_H
+#ifdef COMMON_TIMER_H /* timer */
+struct timer_interface *timer;
+#endif // COMMON_TIMER_H
+#ifdef MAP_TRADE_H /* trade */
+struct trade_interface *trade;
+#endif // MAP_TRADE_H
+#ifdef MAP_UNIT_H /* unit */
+struct unit_interface *unit;
+#endif // MAP_UNIT_H
+#ifdef MAP_VENDING_H /* vending */
+struct vending_interface *vending;
+#endif // MAP_VENDING_H
+#endif // ! HERCULES_CORE
+
+HPExport const char *HPM_shared_symbols(int server_type)
+{
+#ifdef COMMON_UTILS_H /* HCache */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("HCache", HCache)) return "HCache";
+#endif // COMMON_UTILS_H
+#ifdef MAP_ATCOMMAND_H /* atcommand */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("atcommand", atcommand)) return "atcommand";
+#endif // MAP_ATCOMMAND_H
+#ifdef MAP_BATTLE_H /* battle */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("battle", battle)) return "battle";
+#endif // MAP_BATTLE_H
+#ifdef MAP_BATTLEGROUND_H /* bg */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("battlegrounds", bg)) return "battlegrounds";
+#endif // MAP_BATTLEGROUND_H
+#ifdef MAP_BUYINGSTORE_H /* buyingstore */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("buyingstore", buyingstore)) return "buyingstore";
+#endif // MAP_BUYINGSTORE_H
+#ifdef MAP_CHANNEL_H /* channel */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("channel", channel)) return "channel";
+#endif // MAP_CHANNEL_H
+#ifdef CHAR_CHAR_H /* chr */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("chr", chr)) return "chr";
+#endif // CHAR_CHAR_H
+#ifdef MAP_CHAT_H /* chat */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("chat", chat)) return "chat";
+#endif // MAP_CHAT_H
+#ifdef MAP_CHRIF_H /* chrif */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("chrif", chrif)) return "chrif";
+#endif // MAP_CHRIF_H
+#ifdef MAP_CLIF_H /* clif */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("clif", clif)) return "clif";
+#endif // MAP_CLIF_H
+#ifdef COMMON_CORE_H /* cmdline */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("cmdline", cmdline)) return "cmdline";
+#endif // COMMON_CORE_H
+#ifdef COMMON_CONSOLE_H /* console */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("console", console)) return "console";
+#endif // COMMON_CONSOLE_H
+#ifdef COMMON_CORE_H /* core */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("core", core)) return "core";
+#endif // COMMON_CORE_H
+#ifdef COMMON_DB_H /* DB */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("DB", DB)) return "DB";
+#endif // COMMON_DB_H
+#ifdef MAP_DUEL_H /* duel */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("duel", duel)) return "duel";
+#endif // MAP_DUEL_H
+#ifdef MAP_ELEMENTAL_H /* elemental */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("elemental", elemental)) return "elemental";
+#endif // MAP_ELEMENTAL_H
+#ifdef CHAR_GEOIP_H /* geoip */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("geoip", geoip)) return "geoip";
+#endif // CHAR_GEOIP_H
+#ifdef MAP_GUILD_H /* guild */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("guild", guild)) return "guild";
+#endif // MAP_GUILD_H
+#ifdef MAP_STORAGE_H /* gstorage */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("gstorage", gstorage)) return "gstorage";
+#endif // MAP_STORAGE_H
+#ifdef MAP_HOMUNCULUS_H /* homun */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("homun", homun)) return "homun";
+#endif // MAP_HOMUNCULUS_H
+#ifdef MAP_INSTANCE_H /* instance */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("instance", instance)) return "instance";
+#endif // MAP_INSTANCE_H
+#ifdef CHAR_INT_AUCTION_H /* inter_auction */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_auction", inter_auction)) return "inter_auction";
+#endif // CHAR_INT_AUCTION_H
+#ifdef CHAR_INT_ELEMENTAL_H /* inter_elemental */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_elemental", inter_elemental)) return "inter_elemental";
+#endif // CHAR_INT_ELEMENTAL_H
+#ifdef CHAR_INT_GUILD_H /* inter_guild */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_guild", inter_guild)) return "inter_guild";
+#endif // CHAR_INT_GUILD_H
+#ifdef CHAR_INT_HOMUN_H /* inter_homunculus */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_homunculus", inter_homunculus)) return "inter_homunculus";
+#endif // CHAR_INT_HOMUN_H
+#ifdef CHAR_INTER_H /* inter */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter", inter)) return "inter";
+#endif // CHAR_INTER_H
+#ifdef CHAR_INT_MAIL_H /* inter_mail */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_mail", inter_mail)) return "inter_mail";
+#endif // CHAR_INT_MAIL_H
+#ifdef CHAR_INT_MERCENARY_H /* inter_mercenary */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_mercenary", inter_mercenary)) return "inter_mercenary";
+#endif // CHAR_INT_MERCENARY_H
+#ifdef CHAR_INT_PARTY_H /* inter_party */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_party", inter_party)) return "inter_party";
+#endif // CHAR_INT_PARTY_H
+#ifdef CHAR_INT_PET_H /* inter_pet */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_pet", inter_pet)) return "inter_pet";
+#endif // CHAR_INT_PET_H
+#ifdef CHAR_INT_QUEST_H /* inter_quest */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_quest", inter_quest)) return "inter_quest";
+#endif // CHAR_INT_QUEST_H
+#ifdef CHAR_INT_STORAGE_H /* inter_storage */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("inter_storage", inter_storage)) return "inter_storage";
+#endif // CHAR_INT_STORAGE_H
+#ifdef MAP_INTIF_H /* intif */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("intif", intif)) return "intif";
+#endif // MAP_INTIF_H
+#ifdef MAP_IRC_BOT_H /* ircbot */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("ircbot", ircbot)) return "ircbot";
+#endif // MAP_IRC_BOT_H
+#ifdef MAP_ITEMDB_H /* itemdb */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("itemdb", itemdb)) return "itemdb";
+#endif // MAP_ITEMDB_H
+#ifdef COMMON_CONF_H /* libconfig */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("libconfig", libconfig)) return "libconfig";
+#endif // COMMON_CONF_H
+#ifdef MAP_LOG_H /* logs */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("logs", logs)) return "logs";
+#endif // MAP_LOG_H
+#ifdef LOGIN_LOGIN_H /* login */
+if ((server_type&(SERVER_TYPE_LOGIN)) && !HPM_SYMBOL("login", login)) return "login";
+#endif // LOGIN_LOGIN_H
+#ifdef CHAR_LOGINIF_H /* loginif */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("loginif", loginif)) return "loginif";
+#endif // CHAR_LOGINIF_H
+#ifdef MAP_MAIL_H /* mail */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mail", mail)) return "mail";
+#endif // MAP_MAIL_H
+#ifdef COMMON_MALLOC_H /* iMalloc */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("iMalloc", iMalloc)) return "iMalloc";
+#endif // COMMON_MALLOC_H
+#ifdef MAP_MAP_H /* map */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("map", map)) return "map";
+#endif // MAP_MAP_H
+#ifdef CHAR_MAPIF_H /* mapif */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("mapif", mapif)) return "mapif";
+#endif // CHAR_MAPIF_H
+#ifdef COMMON_MAPINDEX_H /* mapindex */
+if ((server_type&(SERVER_TYPE_MAP|SERVER_TYPE_CHAR)) && !HPM_SYMBOL("mapindex", mapindex)) return "mapindex";
+#endif // COMMON_MAPINDEX_H
+#ifdef MAP_MAP_H /* mapit */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mapit", mapit)) return "mapit";
+#endif // MAP_MAP_H
+#ifdef MAP_MAPREG_H /* mapreg */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mapreg", mapreg)) return "mapreg";
+#endif // MAP_MAPREG_H
+#ifdef MAP_MERCENARY_H /* mercenary */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mercenary", mercenary)) return "mercenary";
+#endif // MAP_MERCENARY_H
+#ifdef MAP_MOB_H /* mob */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mob", mob)) return "mob";
+#endif // MAP_MOB_H
+#ifdef MAP_NPC_H /* npc */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("npc", npc)) return "npc";
+#endif // MAP_NPC_H
+#ifdef COMMON_NULLPO_H /* nullpo */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("nullpo", nullpo)) return "nullpo";
+#endif // COMMON_NULLPO_H
+#ifdef MAP_PARTY_H /* party */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("party", party)) return "party";
+#endif // MAP_PARTY_H
+#ifdef MAP_PATH_H /* path */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("path", path)) return "path";
+#endif // MAP_PATH_H
+#ifdef MAP_PC_GROUPS_H /* pcg */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("pc_groups", pcg)) return "pc_groups";
+#endif // MAP_PC_GROUPS_H
+#ifdef MAP_PC_H /* pc */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("pc", pc)) return "pc";
+#endif // MAP_PC_H
+#ifdef MAP_PET_H /* pet */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("pet", pet)) return "pet";
+#endif // MAP_PET_H
+#ifdef CHAR_PINCODE_H /* pincode */
+if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("pincode", pincode)) return "pincode";
+#endif // CHAR_PINCODE_H
+#ifdef MAP_QUEST_H /* quest */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("quest", quest)) return "quest";
+#endif // MAP_QUEST_H
+#ifdef MAP_SCRIPT_H /* script */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("script", script)) return "script";
+#endif // MAP_SCRIPT_H
+#ifdef MAP_SEARCHSTORE_H /* searchstore */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("searchstore", searchstore)) return "searchstore";
+#endif // MAP_SEARCHSTORE_H
+#ifdef COMMON_SHOWMSG_H /* showmsg */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("showmsg", showmsg)) return "showmsg";
+#endif // COMMON_SHOWMSG_H
+#ifdef MAP_SKILL_H /* skill */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("skill", skill)) return "skill";
+#endif // MAP_SKILL_H
+#ifdef COMMON_SOCKET_H /* sockt */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("sockt", sockt)) return "sockt";
+#endif // COMMON_SOCKET_H
+#ifdef COMMON_SQL_H /* SQL */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("SQL", SQL)) return "SQL";
+#endif // COMMON_SQL_H
+#ifdef MAP_STATUS_H /* status */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("status", status)) return "status";
+#endif // MAP_STATUS_H
+#ifdef MAP_STORAGE_H /* storage */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("storage", storage)) return "storage";
+#endif // MAP_STORAGE_H
+#ifdef COMMON_STRLIB_H /* StrBuf */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("StrBuf", StrBuf)) return "StrBuf";
+#endif // COMMON_STRLIB_H
+#ifdef COMMON_STRLIB_H /* strlib */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("strlib", strlib)) return "strlib";
+#endif // COMMON_STRLIB_H
+#ifdef COMMON_STRLIB_H /* sv */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("sv", sv)) return "sv";
+#endif // COMMON_STRLIB_H
+#ifdef COMMON_SYSINFO_H /* sysinfo */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("sysinfo", sysinfo)) return "sysinfo";
+#endif // COMMON_SYSINFO_H
+#ifdef COMMON_TIMER_H /* timer */
+if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("timer", timer)) return "timer";
+#endif // COMMON_TIMER_H
+#ifdef MAP_TRADE_H /* trade */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("trade", trade)) return "trade";
+#endif // MAP_TRADE_H
+#ifdef MAP_UNIT_H /* unit */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("unit", unit)) return "unit";
+#endif // MAP_UNIT_H
+#ifdef MAP_VENDING_H /* vending */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("vending", vending)) return "vending";
+#endif // MAP_VENDING_H
+ return NULL;
+}
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index b700c1b73..bd8d8fe64 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -4,9 +4,10 @@
#ifndef COMMON_HPMI_H
#define COMMON_HPMI_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/console.h"
#include "common/core.h"
+#include "common/showmsg.h"
#include "common/sql.h"
struct script_state;
@@ -14,16 +15,7 @@ struct AtCommandInfo;
struct socket_data;
struct map_session_data;
-#ifdef WIN32
- #define HPExport __declspec(dllexport)
-#else
- #define HPExport
-#endif
-
-/* after */
-#include "common/showmsg.h"
-
-#define HPM_VERSION "1.0"
+#define HPM_VERSION "1.1"
#define HPM_ADDCONF_LENGTH 40
struct hplugin_info {
@@ -39,11 +31,6 @@ struct s_HPMDataCheck {
int type;
};
-HPExport void *(*import_symbol) (char *name, unsigned int pID);
-HPExport Sql *mysql_handle;
-
-#define GET_SYMBOL(n) import_symbol((n),HPMi->pid)
-
#define SERVER_TYPE_ALL (SERVER_TYPE_LOGIN|SERVER_TYPE_CHAR|SERVER_TYPE_MAP)
enum hp_event_types {
@@ -152,33 +139,37 @@ enum HPluginConfType {
#define getFromBGDATA(ptr,index) (HPMi->getFromHPData(HPDT_BGDATA,HPMi->pid,(ptr),(index)))
#define removeFromBGDATA(ptr,index) (HPMi->removeFromHPData(HPDT_BGDATA,HPMi->pid,(ptr),(index)))
-/* HPMi->addCommand */
-#define addAtcommand(cname,funcname) \
- if ( HPMi->addCommand != NULL ) { \
+/// HPMi->addCommand
+#define addAtcommand(cname,funcname) do { \
+ if (HPMi->addCommand != NULL) { \
HPMi->addCommand(cname,atcommand_ ## funcname); \
} else { \
ShowWarning("HPM (%s):addAtcommand(\"%s\",%s) failed, addCommand sub is NULL!\n",pinfo.name,cname,# funcname);\
- }
-/* HPMi->addScript */
-#define addScriptCommand(cname,scinfo,funcname) \
- if ( HPMi->addScript != NULL ) { \
+ } \
+} while(0)
+/// HPMi->addScript
+#define addScriptCommand(cname,scinfo,funcname) do { \
+ if (HPMi->addScript != NULL) { \
HPMi->addScript(cname,scinfo,buildin_ ## funcname, false); \
} else { \
ShowWarning("HPM (%s):addScriptCommand(\"%s\",\"%s\",%s) failed, addScript sub is NULL!\n",pinfo.name,cname,scinfo,# funcname);\
- }
-#define addScriptCommandDeprecated(cname,scinfo,funcname) \
- if ( HPMi->addScript != NULL ) { \
+ } \
+} while(0)
+#define addScriptCommandDeprecated(cname,scinfo,funcname) do { \
+ if (HPMi->addScript != NULL) { \
HPMi->addScript(cname,scinfo,buildin_ ## funcname, true); \
} else { \
ShowWarning("HPM (%s):addScriptCommandDeprecated(\"%s\",\"%s\",%s) failed, addScript sub is NULL!\n",pinfo.name,cname,scinfo,# funcname);\
- }
-/* HPMi->addCPCommand */
-#define addCPCommand(cname,funcname) \
- if ( HPMi->addCPCommand != NULL ) { \
+ } \
+} while(0)
+/// HPMi->addCPCommand
+#define addCPCommand(cname,funcname) do { \
+ if (HPMi->addCPCommand != NULL) { \
HPMi->addCPCommand(cname,console_parse_ ## funcname); \
} else { \
ShowWarning("HPM (%s):addCPCommand(\"%s\",%s) failed, addCPCommand sub is NULL!\n",pinfo.name,cname,# funcname);\
- }
+ } \
+} while(0)
/* HPMi->addPacket */
#define addPacket(cmd,len,receive,point) HPMi->addPacket(cmd,len,receive,point,HPMi->pid)
/* HPMi->addBattleConf */
@@ -200,7 +191,7 @@ enum HPluginConfType {
#define addGroupPermission(pcgname,maskptr) HPMi->addPCGPermission(HPMi->pid,pcgname,&maskptr)
/* Hercules Plugin Mananger Include Interface */
-HPExport struct HPMi_interface {
+struct HPMi_interface {
/* */
unsigned int pid;
/* */
@@ -224,10 +215,17 @@ HPExport struct HPMi_interface {
bool (*addConf) (unsigned int pluginID, enum HPluginConfType type, char *name, void (*func) (const char *val));
/* pc group permission */
void (*addPCGPermission) (unsigned int pluginID, char *name, unsigned int *mask);
+
+ Sql *sql_handle;
};
-#ifndef HERCULES_CORE
+#ifdef HERCULES_CORE
+#define HPM_SYMBOL(n, s) (HPM->share((s), (n)), true)
+#else // ! HERCULES_CORE
HPExport struct HPMi_interface HPMi_s;
HPExport struct HPMi_interface *HPMi;
-#endif
+HPExport void *(*import_symbol) (char *name, unsigned int pID);
+#define HPM_SYMBOL(n, s) ((s) = import_symbol((n),HPMi->pid))
+#endif // !HERCULES_CORE
+
#endif /* COMMON_HPMI_H */
diff --git a/src/common/Makefile.in b/src/common/Makefile.in
index f6f993165..208d3b111 100644
--- a/src/common/Makefile.in
+++ b/src/common/Makefile.in
@@ -32,9 +32,9 @@ COMMON_MINI_OBJ = $(addprefix obj_all/, $(COMMON_SHARED_OBJ) \
miniconsole.o minicore.o minimalloc.o minisocket.o)
COMMON_C += console.c core.c malloc.c socket.c
COMMON_H = atomic.h cbasetypes.h conf.h console.h core.h db.h des.h ers.h \
- grfio.h HPM.h HPMi.h malloc.h mapindex.h md5calc.h mmo.h mutex.h \
- nullpo.h random.h showmsg.h socket.h spinlock.h sql.h strlib.h \
- sysinfo.h thread.h timer.h utils.h winapi.h
+ grfio.h hercules.h HPM.h HPMi.h malloc.h mapindex.h md5calc.h \
+ mmo.h mutex.h nullpo.h random.h showmsg.h socket.h spinlock.h \
+ sql.h strlib.h sysinfo.h thread.h timer.h utils.h winapi.h
COMMON_SQL_OBJ = obj_sql/sql.o
COMMON_SQL_H = sql.h
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index ce8fc6bcf..575428f96 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -240,7 +240,9 @@ typedef uintptr_t uintptr;
#define strcasecmp stricmp
#define strncasecmp strnicmp
#define strncmpi strnicmp
+#if defined(__BORLANDC__) || _MSC_VER < 1900
#define snprintf _snprintf
+#endif
#if defined(_MSC_VER) && _MSC_VER < 1400
#define vsnprintf _vsnprintf
#endif
diff --git a/src/common/conf.c b/src/common/conf.c
index cb0194c3a..d9367dc9e 100644
--- a/src/common/conf.c
+++ b/src/common/conf.c
@@ -12,7 +12,7 @@
/* interface source */
struct libconfig_interface libconfig_s;
-
+struct libconfig_interface *libconfig;
int conf_read_file(config_t *config, const char *config_filename) {
libconfig->init(config);
diff --git a/src/common/conf.h b/src/common/conf.h
index 1889aeb3a..ac97a5427 100644
--- a/src/common/conf.h
+++ b/src/common/conf.h
@@ -5,7 +5,7 @@
#ifndef COMMON_CONF_H
#define COMMON_CONF_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include <libconfig/libconfig.h>
@@ -74,13 +74,13 @@ struct libconfig_interface {
int (*setting_remove_elem) (config_setting_t *parent, unsigned int idx);
void (*setting_set_hook) (config_setting_t *setting, void *hook);
- config_setting_t * (*lookup) (const config_t *config, const char *path);
- config_setting_t * (*lookup_from) (config_setting_t *setting, const char *path);
- int (*lookup_int) (const config_t *config, const char *path, int *value);
- int (*lookup_int64) (const config_t *config, const char *path, long long *value);
- int (*lookup_float) (const config_t *config, const char *path, double *value);
- int (*lookup_bool) (const config_t *config, const char *path, int *value);
- int (*lookup_string) (const config_t *config, const char *path, const char **value);
+ config_setting_t * (*lookup) (const config_t *config, const char *filepath);
+ config_setting_t * (*lookup_from) (config_setting_t *setting, const char *filepath);
+ int (*lookup_int) (const config_t *config, const char *filepath, int *value);
+ int (*lookup_int64) (const config_t *config, const char *filepath, long long *value);
+ int (*lookup_float) (const config_t *config, const char *filepath, double *value);
+ int (*lookup_bool) (const config_t *config, const char *filepath, int *value);
+ int (*lookup_string) (const config_t *config, const char *filepath, const char **value);
/* those are custom and are from src/common/conf.c */
/* Functions to copy settings from libconfig/contrib */
@@ -91,10 +91,10 @@ struct libconfig_interface {
int (*setting_copy) (config_setting_t *parent, const config_setting_t *src);
};
-struct libconfig_interface *libconfig;
-
#ifdef HERCULES_CORE
void libconfig_defaults(void);
#endif // HERCULES_CORE
+HPShared struct libconfig_interface *libconfig;
+
#endif // COMMON_CONF_H
diff --git a/src/common/console.c b/src/common/console.c
index 95d1e69fe..0dd225d4d 100644
--- a/src/common/console.c
+++ b/src/common/console.c
@@ -37,6 +37,7 @@
#endif
struct console_interface console_s;
+struct console_interface *console;
#ifdef CONSOLE_INPUT
struct console_input_interface console_input_s;
@@ -74,12 +75,11 @@ void display_title(void) {
ShowInfo("Compile Flags: %s\n", sysinfo->cflags());
}
#ifdef CONSOLE_INPUT
-#if defined(WIN32)
-int console_parse_key_pressed(void) {
+int console_parse_key_pressed(void)
+{
+#ifdef WIN32
return _kbhit();
-}
-#else /* WIN32 */
-int console_parse_key_pressed(void) {
+#else // ! WIN32
struct timeval tv;
fd_set fds;
tv.tv_sec = 0;
@@ -91,8 +91,8 @@ int console_parse_key_pressed(void) {
select(STDIN_FILENO+1, &fds, NULL, NULL, &tv);
return FD_ISSET(STDIN_FILENO, &fds);
+#endif // WIN32
}
-#endif /* _WIN32 */
/*======================================
* CORE: Console commands
@@ -102,7 +102,7 @@ int console_parse_key_pressed(void) {
* Stops server
**/
CPCMD_C(exit,server) {
- runflag = 0;
+ core->runflag = 0;
}
/**
@@ -158,41 +158,41 @@ CPCMD_C(skip,update) {
}
/**
- * Defines a main category.
- *
- * Categories can't be used as commands!
- * E.G.
- * - sql update skip
- * 'sql' is the main category
- * CP_DEF_C(category)
+ * Loads console commands list
**/
+void console_load_defaults(void)
+{
+ /**
+ * Defines a main category.
+ *
+ * Categories can't be used as commands!
+ * E.G.
+ * - sql update skip
+ * 'sql' is the main category
+ * CP_DEF_C(category)
+ **/
#define CP_DEF_C(x) { #x , NULL , NULL, NULL }
-/**
- * Defines a sub-category.
- *
- * Sub-categories can't be used as commands!
- * E.G.
- * - sql update skip
- * 'update' is a sub-category
- * CP_DEF_C2(command, category)
- **/
+ /**
+ * Defines a sub-category.
+ *
+ * Sub-categories can't be used as commands!
+ * E.G.
+ * - sql update skip
+ * 'update' is a sub-category
+ * CP_DEF_C2(command, category)
+ **/
#define CP_DEF_C2(x,y) { #x , NULL , #y, NULL }
-/**
- * Defines a command that is inside a category or sub-category
- * CP_DEF_S(command, category/sub-category)
- **/
+ /**
+ * Defines a command that is inside a category or sub-category
+ * CP_DEF_S(command, category/sub-category)
+ **/
#define CP_DEF_S(x,y) { #x, CPCMD_C_A(x,y), #y, NULL }
-/**
- * Defines a command that is _not_ inside any category
- * CP_DEF_S(command)
- **/
+ /**
+ * Defines a command that is _not_ inside any category
+ * CP_DEF_S(command)
+ **/
#define CP_DEF(x) { #x , CPCMD_A(x), NULL, NULL }
-/**
- * Loads console commands list
- * See CP_DEF_C, CP_DEF_C2, CP_DEF_S, CP_DEF
- **/
-void console_load_defaults(void) {
struct {
char *name;
CParseFunc func;
@@ -254,11 +254,12 @@ void console_load_defaults(void) {
}
}
}
-}
#undef CP_DEF_C
#undef CP_DEF_C2
#undef CP_DEF_S
#undef CP_DEF
+}
+
void console_parse_create(char *name, CParseFunc func) {
unsigned int i;
char *tok;
diff --git a/src/common/console.h b/src/common/console.h
index 643edc3d9..ffb4a165b 100644
--- a/src/common/console.h
+++ b/src/common/console.h
@@ -4,9 +4,7 @@
#ifndef COMMON_CONSOLE_H
#define COMMON_CONSOLE_H
-#include "config/core.h" // MAX_CONSOLE_INPUT
-
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/mutex.h"
#include "common/spinlock.h"
#include "common/sql.h"
@@ -84,10 +82,10 @@ struct console_interface {
struct console_input_interface *input;
};
-struct console_interface *console;
-
#ifdef HERCULES_CORE
void console_defaults(void);
#endif // HERCULES_CORE
+HPShared struct console_interface *console;
+
#endif /* COMMON_CONSOLE_H */
diff --git a/src/common/core.c b/src/common/core.c
index e663c4e4c..7f5a1da53 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -41,11 +41,8 @@
/// Called when a terminate signal is received.
void (*shutdown_callback)(void) = NULL;
-int runflag = CORE_ST_RUN;
-int arg_c = 0;
-char **arg_v = NULL;
-
-char *SERVER_NAME = NULL;
+struct core_interface core_s;
+struct core_interface *core = &core_s;
#ifndef MINICORE // minimalist Core
// Added by Gabuzomeu
@@ -90,7 +87,7 @@ static BOOL WINAPI console_handler(DWORD c_event) {
if( shutdown_callback != NULL )
shutdown_callback();
else
- runflag = CORE_ST_STOP;// auto-shutdown
+ core->runflag = CORE_ST_STOP;// auto-shutdown
break;
default:
return FALSE;
@@ -118,7 +115,7 @@ static void sig_proc(int sn) {
if( shutdown_callback != NULL )
shutdown_callback();
else
- runflag = CORE_ST_STOP;// auto-shutdown
+ core->runflag = CORE_ST_STOP;// auto-shutdown
break;
case SIGSEGV:
case SIGFPE:
@@ -176,6 +173,7 @@ void core_defaults(void) {
console_defaults();
strlib_defaults();
malloc_defaults();
+ showmsg_defaults();
cmdline_defaults();
#ifndef MINICORE
libconfig_defaults();
@@ -317,7 +315,7 @@ int cmdline_exec(int argc, char **argv, unsigned int options)
}
if (options&CMDLINE_OPT_SILENT) {
if (data->options&CMDLINE_OPT_SILENT) {
- msg_silent = 0x7; // silence information and status messages
+ showmsg->silent = 0x7; // silence information and status messages
break;
}
} else if ((data->options&CMDLINE_OPT_PREINIT) == (options&CMDLINE_OPT_PREINIT)) {
@@ -360,6 +358,7 @@ void cmdline_final(void)
}
struct cmdline_interface cmdline_s;
+struct cmdline_interface *cmdline;
void cmdline_defaults(void)
{
@@ -387,12 +386,14 @@ int main (int argc, char **argv) {
SERVER_NAME = ++p1;
p2 = p1;
}
- arg_c = argc;
- arg_v = argv;
+ core->arg_c = argc;
+ core->arg_v = argv;
+ core->runflag = CORE_ST_RUN;
}
core_defaults();
iMalloc->init();// needed for Show* in display_title() [FlavioJS]
+ showmsg->init();
cmdline->init();
@@ -402,7 +403,7 @@ int main (int argc, char **argv) {
sysinfo->init();
- if (!(msg_silent&0x1))
+ if (!(showmsg->silent&0x1))
console->display_title();
usercheck();
@@ -439,7 +440,7 @@ int main (int argc, char **argv) {
do_init(argc,argv);
// Main runtime cycle
- while (runflag != CORE_ST_STOP) {
+ while (core->runflag != CORE_ST_STOP) {
int next = timer->perform(timer->gettick_nocache());
sockt->perform(next);
}
@@ -458,6 +459,7 @@ int main (int argc, char **argv) {
//sysinfo->final(); Called by iMalloc->final()
iMalloc->final();
+ showmsg->final(); // Should be after iMalloc->final()
return retval;
}
diff --git a/src/common/core.h b/src/common/core.h
index c2a8d9e58..c92bf4fa6 100644
--- a/src/common/core.h
+++ b/src/common/core.h
@@ -5,7 +5,7 @@
#ifndef COMMON_CORE_H
#define COMMON_CORE_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
/* so that developers with --enable-debug can raise signals from any section of the code they'd like */
#ifdef DEBUG
@@ -28,27 +28,6 @@ enum E_CORE_ST {
CORE_ST_LAST
};
-#ifdef HERCULES_CORE
-extern int arg_c;
-extern char **arg_v;
-
-/// @see E_CORE_ST
-extern int runflag;
-extern char *SERVER_NAME;
-
-enum server_types SERVER_TYPE;
-
-extern void cmdline_args_init_local(void);
-extern int do_init(int,char**);
-extern void set_server_type(void);
-extern void do_abort(void);
-extern int do_final(void);
-
-/// Called when a terminate signal is received. (Ctrl+C pressed)
-/// If NULL, runflag is set to CORE_ST_STOP instead.
-extern void (*shutdown_callback)(void);
-#endif // HERCULES_CORE
-
/// Options for command line argument handlers.
enum cmdline_options {
CMDLINE_OPT_NORMAL = 0x0, ///< No special options.
@@ -78,10 +57,30 @@ struct cmdline_interface {
const char *(*arg_source) (struct CmdlineArgData *arg);
};
-struct cmdline_interface *cmdline;
+struct core_interface {
+ int arg_c;
+ char **arg_v;
+ /// @see E_CORE_ST
+ int runflag;
+ char *server_name;
+ enum server_types server_type;
+
+ /// Called when a terminate signal is received. (Ctrl+C pressed)
+ /// If NULL, runflag is set to CORE_ST_STOP instead.
+ void (*shutdown_callback)(void);
+};
#define CMDLINEARG(x) bool cmdline_arg_ ## x (const char *name, const char *params)
+#define SERVER_NAME (core->server_name)
+#define SERVER_TYPE (core->server_type)
+
#ifdef HERCULES_CORE
+extern void cmdline_args_init_local(void);
+extern int do_init(int,char**);
+extern void set_server_type(void);
+extern void do_abort(void);
+extern int do_final(void);
+
/// Special plugin ID assigned to the Hercules core
#define HPM_PID_CORE ((unsigned int)-1)
@@ -91,4 +90,7 @@ struct cmdline_interface *cmdline;
void cmdline_defaults(void);
#endif // HERCULES_CORE
+HPShared struct core_interface *core;
+HPShared struct cmdline_interface *cmdline;
+
#endif /* COMMON_CORE_H */
diff --git a/src/common/db.c b/src/common/db.c
index 5063425e6..4df5c08db 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -82,6 +82,7 @@
#include <stdlib.h>
struct db_interface DB_s;
+struct db_interface *DB;
/*****************************************************************************\
* (1) Private typedefs, enums, structures, defines and global variables of *
diff --git a/src/common/db.h b/src/common/db.h
index f75cbd8dc..9b9cba8f8 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -42,7 +42,7 @@
#ifndef COMMON_DB_H
#define COMMON_DB_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include <stdarg.h>
@@ -916,9 +916,6 @@ void (*init) (void);
void (*final) (void);
};
-struct db_interface *DB;
-
-void db_defaults(void);
// Link DB System - From jAthena
struct linkdb_node {
struct linkdb_node *next;
@@ -937,8 +934,11 @@ void* linkdb_erase (struct linkdb_node** head, void *key);
void linkdb_final (struct linkdb_node** head);
void linkdb_vforeach(struct linkdb_node** head, LinkDBFunc func, va_list ap);
void linkdb_foreach (struct linkdb_node** head, LinkDBFunc func, ...);
+
+void db_defaults(void);
#endif // HERCULES_CORE
+HPShared struct db_interface *DB;
/// Finds an entry in an array.
diff --git a/src/common/hercules.h b/src/common/hercules.h
new file mode 100644
index 000000000..678577690
--- /dev/null
+++ b/src/common/hercules.h
@@ -0,0 +1,23 @@
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Base author: Haru <haru@dotalux.com>
+
+#ifndef COMMON_HERCULES_H
+#define COMMON_HERCULES_H
+
+#include "config/core.h"
+#include "common/cbasetypes.h"
+
+#ifdef WIN32
+ #define HPExport __declspec(dllexport)
+#else
+ #define HPExport __attribute__((visibility("default")))
+#endif
+
+#define HPShared extern
+
+#ifndef HERCULES_CORE
+#include "common/HPMi.h"
+#endif // HERCULES_CORE
+
+#endif // COMMON_HERCULES_H
diff --git a/src/common/malloc.c b/src/common/malloc.c
index ec0467495..d5a979e77 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -16,6 +16,7 @@
#include <string.h>
struct malloc_interface iMalloc_s;
+struct malloc_interface *iMalloc;
////////////// Memory Libraries //////////////////
diff --git a/src/common/malloc.h b/src/common/malloc.h
index 20260de84..b194c7cf3 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -4,7 +4,7 @@
#ifndef COMMON_MALLOC_H
#define COMMON_MALLOC_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#define ALC_MARK __FILE__, __LINE__, __func__
@@ -59,12 +59,6 @@
////////////////////////////////////////////////
-#ifdef HERCULES_CORE
-void malloc_defaults(void);
-
-void memmgr_report(int extra);
-#endif // HERCULES_CORE
-
struct malloc_interface {
void (*init) (void);
void (*final) (void);
@@ -84,5 +78,12 @@ struct malloc_interface {
void (*init_messages) (void);
};
-struct malloc_interface *iMalloc;
+#ifdef HERCULES_CORE
+void malloc_defaults(void);
+
+void memmgr_report(int extra);
+#endif // HERCULES_CORE
+
+HPShared struct malloc_interface *iMalloc;
+
#endif /* COMMON_MALLOC_H */
diff --git a/src/common/mapindex.c b/src/common/mapindex.c
index 18aa413cc..aa31d8090 100644
--- a/src/common/mapindex.c
+++ b/src/common/mapindex.c
@@ -17,6 +17,7 @@
/* mapindex.c interface source */
struct mapindex_interface mapindex_s;
+struct mapindex_interface *mapindex;
/// Retrieves the map name from 'string' (removing .gat extension if present).
/// Result gets placed either into 'buf' or in a static local buffer.
@@ -124,7 +125,7 @@ unsigned short mapindex_name2id(const char* name) {
return 0;
}
-const char* mapindex_id2name_sub(unsigned short id,const char *file, int line, const char *func) {
+const char *mapindex_id2name_sub(uint16 id, const char *file, int line, const char *func) {
if (id >= MAX_MAPINDEX || !mapindex_exists(id)) {
ShowDebug("mapindex_id2name: Requested name for non-existant map index [%d] in cache. %s:%s:%d\n", id,file,func,line);
return mapindex->list[0].name; // dummy empty string so that the callee doesn't crash
diff --git a/src/common/mapindex.h b/src/common/mapindex.h
index c334e7cca..ff19630a1 100644
--- a/src/common/mapindex.h
+++ b/src/common/mapindex.h
@@ -5,7 +5,7 @@
#ifndef COMMON_MAPINDEX_H
#define COMMON_MAPINDEX_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
#include "common/mmo.h"
@@ -91,14 +91,14 @@ struct mapindex_interface {
const char* (*getmapname_ext) (const char* string, char* output);
/* TODO: Hello World! make up your mind, this thing is int on some places and unsigned short on others */
unsigned short (*name2id) (const char*);
- const char* (*id2name) (unsigned short,const char *file, int line, const char *func);
+ const char * (*id2name) (uint16 id, const char *file, int line, const char *func);
bool (*check_default) (void);
};
-struct mapindex_interface *mapindex;
-
#ifdef HERCULES_CORE
void mapindex_defaults(void);
#endif // HERCULES_CORE
+HPShared struct mapindex_interface *mapindex;
+
#endif /* COMMON_MAPINDEX_H */
diff --git a/src/common/nullpo.c b/src/common/nullpo.c
index a8980885f..829ba4aab 100644
--- a/src/common/nullpo.c
+++ b/src/common/nullpo.c
@@ -12,11 +12,12 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
-#ifdef __GNUC__
+#ifdef HAVE_EXECINFO
#include <execinfo.h>
-#endif
+#endif // HAVE_EXECINFO
struct nullpo_interface nullpo_s;
+struct nullpo_interface *nullpo;
/**
* Reports failed assertions or NULL pointers
@@ -28,12 +29,12 @@ struct nullpo_interface nullpo_s;
* @param title Message title to display (i.e. failed assertion or nullpo info)
*/
void assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) {
-#ifdef __GNUC__
+#ifdef HAVE_EXECINFO
void *array[10];
int size;
char **strings;
int i;
-#endif
+#endif // HAVE_EXECINFO
if (file == NULL)
file = "??";
@@ -42,13 +43,13 @@ void assert_report(const char *file, int line, const char *func, const char *tar
ShowError("--- %s --------------------------------------------\n", title);
ShowError("%s:%d: '%s' in function `%s'\n", file, line, targetname, func);
-#ifdef __GNUC__
+#ifdef HAVE_EXECINFO
size = (int)backtrace(array, 10);
strings = backtrace_symbols(array, size);
for (i = 0; i < size; i++)
ShowError("%s\n", strings[i]);
free(strings);
-#endif
+#endif // HAVE_EXECINFO
ShowError("--- end %s ----------------------------------------\n", title);
}
diff --git a/src/common/nullpo.h b/src/common/nullpo.h
index a59c2ac2b..52e9fba39 100644
--- a/src/common/nullpo.h
+++ b/src/common/nullpo.h
@@ -5,7 +5,7 @@
#ifndef COMMON_NULLPO_H
#define COMMON_NULLPO_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
// enabled by default on debug builds
#if defined(DEBUG) && !defined(NULLPO_CHECK)
@@ -127,10 +127,10 @@ struct nullpo_interface {
void (*assert_report) (const char *file, int line, const char *func, const char *targetname, const char *title);
};
-struct nullpo_interface *nullpo;
-
#ifdef HERCULES_CORE
void nullpo_defaults(void);
#endif // HERCULES_CORE
+HPShared struct nullpo_interface *nullpo;
+
#endif /* COMMON_NULLPO_H */
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index 01dc0b01a..27fb0b635 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -30,16 +30,8 @@
#define DEBUGLOGPATH "log"PATHSEP_STR"login-server.log"
#endif
-///////////////////////////////////////////////////////////////////////////////
-/// behavioral parameter.
-/// when redirecting output:
-/// if true prints escape sequences
-/// if false removes the escape sequences
-int stdout_with_ansisequence = 0;
-
-int msg_silent = 0; //Specifies how silent the console is.
-
-int console_msg_log = 0;//[Ind] msg error logging
+struct showmsg_interface showmsg_s;
+struct showmsg_interface *showmsg;
///////////////////////////////////////////////////////////////////////////////
/// static/dynamic buffer for the messages
@@ -197,8 +189,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr)
// Print everything to the buffer
BUFVPRINTF(tempbuf,fmt,argptr);
- if( !is_console(handle) && stdout_with_ansisequence )
- {
+ if (!is_console(handle) && showmsg->stdout_with_ansisequence) {
WriteFile(handle, BUFVAL(tempbuf), BUFLEN(tempbuf), &written, 0);
return 0;
}
@@ -490,8 +481,7 @@ int VFPRINTF(FILE *file, const char *fmt, va_list argptr)
if(!fmt || !*fmt)
return 0;
- if( is_console(file) || stdout_with_ansisequence )
- {
+ if (is_console(file) || showmsg->stdout_with_ansisequence) {
vfprintf(file, fmt, argptr);
return 0;
}
@@ -596,9 +586,6 @@ int FPRINTF(FILE *file, const char *fmt, ...) {
#endif// not _WIN32
-
-char timestamp_format[20] = ""; //For displaying Timestamps
-
int vShowMessage_(enum msg_type flag, const char *string, va_list ap)
{
va_list apcopy;
@@ -612,9 +599,9 @@ int vShowMessage_(enum msg_type flag, const char *string, va_list ap)
return 1;
}
if(
- ( flag == MSG_WARNING && console_msg_log&1 ) ||
- ( ( flag == MSG_ERROR || flag == MSG_SQL ) && console_msg_log&2 ) ||
- ( flag == MSG_DEBUG && console_msg_log&4 ) ) {//[Ind]
+ ( flag == MSG_WARNING && showmsg->console_log&1 ) ||
+ ( ( flag == MSG_ERROR || flag == MSG_SQL ) && showmsg->console_log&2 ) ||
+ ( flag == MSG_DEBUG && showmsg->console_log&4 ) ) {//[Ind]
FILE *log = NULL;
if( (log = fopen(SERVER_TYPE == SERVER_TYPE_MAP ? "./log/map-msg_log.log" : "./log/unknown.log","a+")) ) {
char timestring[255];
@@ -635,20 +622,20 @@ int vShowMessage_(enum msg_type flag, const char *string, va_list ap)
}
}
if(
- (flag == MSG_INFORMATION && msg_silent&1) ||
- (flag == MSG_STATUS && msg_silent&2) ||
- (flag == MSG_NOTICE && msg_silent&4) ||
- (flag == MSG_WARNING && msg_silent&8) ||
- (flag == MSG_ERROR && msg_silent&16) ||
- (flag == MSG_SQL && msg_silent&16) ||
- (flag == MSG_DEBUG && msg_silent&32)
+ (flag == MSG_INFORMATION && showmsg->silent&1) ||
+ (flag == MSG_STATUS && showmsg->silent&2) ||
+ (flag == MSG_NOTICE && showmsg->silent&4) ||
+ (flag == MSG_WARNING && showmsg->silent&8) ||
+ (flag == MSG_ERROR && showmsg->silent&16) ||
+ (flag == MSG_SQL && showmsg->silent&16) ||
+ (flag == MSG_DEBUG && showmsg->silent&32)
)
return 0; //Do not print it.
- if (timestamp_format[0] && flag != MSG_NONE) {
+ if (showmsg->timestamp_format[0] && flag != MSG_NONE) {
//Display time format. [Skotlex]
time_t t = time(NULL);
- strftime(prefix, 80, timestamp_format, localtime(&t));
+ strftime(prefix, 80, showmsg->timestamp_format, localtime(&t));
} else prefix[0]='\0';
switch (flag) {
@@ -721,7 +708,17 @@ int vShowMessage_(enum msg_type flag, const char *string, va_list ap)
return 0;
}
-void ClearScreen(void)
+int showmsg_vShowMessage(const char *string, va_list ap)
+{
+ int ret;
+ va_list apcopy;
+ va_copy(apcopy, ap);
+ ret = vShowMessage_(MSG_NONE, string, apcopy);
+ va_end(apcopy);
+ return ret;
+}
+
+void showmsg_clearScreen(void)
{
#ifndef _WIN32
ShowMessage(CL_CLS); // to prevent empty string passed messages
@@ -738,50 +735,57 @@ int ShowMessage_(enum msg_type flag, const char *string, ...) {
}
// direct printf replacement
-void ShowMessage(const char *string, ...) __attribute__((format(printf, 1, 2)));
-void ShowMessage(const char *string, ...) {
+void showmsg_showMessage(const char *string, ...) __attribute__((format(printf, 1, 2)));
+void showmsg_showMessage(const char *string, ...)
+{
va_list ap;
va_start(ap, string);
vShowMessage_(MSG_NONE, string, ap);
va_end(ap);
}
-void ShowStatus(const char *string, ...) __attribute__((format(printf, 1, 2)));
-void ShowStatus(const char *string, ...) {
+void showmsg_showStatus(const char *string, ...) __attribute__((format(printf, 1, 2)));
+void showmsg_showStatus(const char *string, ...)
+{
va_list ap;
va_start(ap, string);
vShowMessage_(MSG_STATUS, string, ap);
va_end(ap);
}
-void ShowSQL(const char *string, ...) __attribute__((format(printf, 1, 2)));
-void ShowSQL(const char *string, ...) {
+void showmsg_showSQL(const char *string, ...) __attribute__((format(printf, 1, 2)));
+void showmsg_showSQL(const char *string, ...)
+{
va_list ap;
va_start(ap, string);
vShowMessage_(MSG_SQL, string, ap);
va_end(ap);
}
-void ShowInfo(const char *string, ...) __attribute__((format(printf, 1, 2)));
-void ShowInfo(const char *string, ...) {
+void showmsg_showInfo(const char *string, ...) __attribute__((format(printf, 1, 2)));
+void showmsg_showInfo(const char *string, ...)
+{
va_list ap;
va_start(ap, string);
vShowMessage_(MSG_INFORMATION, string, ap);
va_end(ap);
}
-void ShowNotice(const char *string, ...) __attribute__((format(printf, 1, 2)));
-void ShowNotice(const char *string, ...) {
+void showmsg_showNotice(const char *string, ...) __attribute__((format(printf, 1, 2)));
+void showmsg_showNotice(const char *string, ...)
+{
va_list ap;
va_start(ap, string);
vShowMessage_(MSG_NOTICE, string, ap);
va_end(ap);
}
-void ShowWarning(const char *string, ...) __attribute__((format(printf, 1, 2)));
-void ShowWarning(const char *string, ...) {
+void showmsg_showWarning(const char *string, ...) __attribute__((format(printf, 1, 2)));
+void showmsg_showWarning(const char *string, ...)
+{
va_list ap;
va_start(ap, string);
vShowMessage_(MSG_WARNING, string, ap);
va_end(ap);
}
-void ShowConfigWarning(config_setting_t *config, const char *string, ...) __attribute__((format(printf, 2, 3)));
-void ShowConfigWarning(config_setting_t *config, const char *string, ...) {
+void showmsg_showConfigWarning(config_setting_t *config, const char *string, ...) __attribute__((format(printf, 2, 3)));
+void showmsg_showConfigWarning(config_setting_t *config, const char *string, ...)
+{
StringBuf buf;
va_list ap;
StrBuf->Init(&buf);
@@ -792,24 +796,70 @@ void ShowConfigWarning(config_setting_t *config, const char *string, ...) {
va_end(ap);
StrBuf->Destroy(&buf);
}
-void ShowDebug(const char *string, ...) __attribute__((format(printf, 1, 2)));
-void ShowDebug(const char *string, ...) {
+void showmsg_showDebug(const char *string, ...) __attribute__((format(printf, 1, 2)));
+void showmsg_showDebug(const char *string, ...)
+{
va_list ap;
va_start(ap, string);
vShowMessage_(MSG_DEBUG, string, ap);
va_end(ap);
}
-void ShowError(const char *string, ...) __attribute__((format(printf, 1, 2)));
-void ShowError(const char *string, ...) {
+void showmsg_showError(const char *string, ...) __attribute__((format(printf, 1, 2)));
+void showmsg_showError(const char *string, ...)
+{
va_list ap;
va_start(ap, string);
vShowMessage_(MSG_ERROR, string, ap);
va_end(ap);
}
-void ShowFatalError(const char *string, ...) __attribute__((format(printf, 1, 2)));
-void ShowFatalError(const char *string, ...) {
+void showmsg_showFatalError(const char *string, ...) __attribute__((format(printf, 1, 2)));
+void showmsg_showFatalError(const char *string, ...)
+{
va_list ap;
va_start(ap, string);
vShowMessage_(MSG_FATALERROR, string, ap);
va_end(ap);
}
+
+void showmsg_init(void)
+{
+}
+
+void showmsg_final(void)
+{
+}
+
+void showmsg_defaults(void)
+{
+ showmsg = &showmsg_s;
+
+ ///////////////////////////////////////////////////////////////////////////////
+ /// behavioral parameter.
+ /// when redirecting output:
+ /// if true prints escape sequences
+ /// if false removes the escape sequences
+ showmsg->stdout_with_ansisequence = false;
+
+ showmsg->silent = 0; //Specifies how silent the console is.
+
+ showmsg->console_log = 0;//[Ind] msg error logging
+
+ memset(showmsg->timestamp_format, '\0', sizeof(showmsg->timestamp_format));
+
+ showmsg->init = showmsg_init;
+ showmsg->final = showmsg_final;
+
+ showmsg->clearScreen = showmsg_clearScreen;
+ showmsg->showMessageV = showmsg_vShowMessage;
+
+ showmsg->showMessage = showmsg_showMessage;
+ showmsg->showStatus = showmsg_showStatus;
+ showmsg->showSQL = showmsg_showSQL;
+ showmsg->showInfo = showmsg_showInfo;
+ showmsg->showNotice = showmsg_showNotice;
+ showmsg->showWarning = showmsg_showWarning;
+ showmsg->showDebug = showmsg_showDebug;
+ showmsg->showError = showmsg_showError;
+ showmsg->showFatalError = showmsg_showFatalError;
+ showmsg->showConfigWarning = showmsg_showConfigWarning;
+}
diff --git a/src/common/showmsg.h b/src/common/showmsg.h
index 63e42ab57..728691ba3 100644
--- a/src/common/showmsg.h
+++ b/src/common/showmsg.h
@@ -5,13 +5,9 @@
#ifndef COMMON_SHOWMSG_H
#define COMMON_SHOWMSG_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
-#ifdef HERCULES_CORE
-# include <libconfig/libconfig.h>
-#else
-# include "common/HPMi.h"
-#endif
+#include <libconfig/libconfig.h>
#include <stdarg.h>
@@ -85,35 +81,48 @@ enum msg_type {
MSG_FATALERROR
};
+struct showmsg_interface {
+ bool stdout_with_ansisequence; //If the color ANSI sequences are to be used. [flaviojs]
+ int silent; //Specifies how silent the console is. [Skotlex]
+ int console_log; //Specifies what error messages to log. [Ind]
+ char timestamp_format[20]; //For displaying Timestamps [Skotlex]
+
+ void (*init) (void);
+ void (*final) (void);
+
+ void (*clearScreen) (void);
+ int (*showMessageV) (const char *string, va_list ap);
+
+ void (*showMessage) (const char *, ...) __attribute__((format(printf, 1, 2)));
+ void (*showStatus) (const char *, ...) __attribute__((format(printf, 1, 2)));
+ void (*showSQL) (const char *, ...) __attribute__((format(printf, 1, 2)));
+ void (*showInfo) (const char *, ...) __attribute__((format(printf, 1, 2)));
+ void (*showNotice) (const char *, ...) __attribute__((format(printf, 1, 2)));
+ void (*showWarning) (const char *, ...) __attribute__((format(printf, 1, 2)));
+ void (*showDebug) (const char *, ...) __attribute__((format(printf, 1, 2)));
+ void (*showError) (const char *, ...) __attribute__((format(printf, 1, 2)));
+ void (*showFatalError) (const char *, ...) __attribute__((format(printf, 1, 2)));
+ void (*showConfigWarning) (config_setting_t *config, const char *string, ...) __attribute__((format(printf, 2, 3)));
+};
+
+/* the purpose of these macros is simply to not make calling them be an annoyance */
+#define ClearScreen() (showmsg->clearScreen())
+#define vShowMessage(fmt, list) (showmsg->showMessageV((fmt), (list)))
+#define ShowMessage(fmt, ...) (showmsg->showMessage((fmt), ##__VA_ARGS__))
+#define ShowStatus(fmt, ...) (showmsg->showStatus((fmt), ##__VA_ARGS__))
+#define ShowSQL(fmt, ...) (showmsg->showSQL((fmt), ##__VA_ARGS__))
+#define ShowInfo(fmt, ...) (showmsg->showInfo((fmt), ##__VA_ARGS__))
+#define ShowNotice(fmt, ...) (showmsg->showNotice((fmt), ##__VA_ARGS__))
+#define ShowWarning(fmt, ...) (showmsg->showWarning((fmt), ##__VA_ARGS__))
+#define ShowDebug(fmt, ...) (showmsg->showDebug((fmt), ##__VA_ARGS__))
+#define ShowError(fmt, ...) (showmsg->showError((fmt), ##__VA_ARGS__))
+#define ShowFatalError(fmt, ...) (showmsg->showFatalError((fmt), ##__VA_ARGS__))
+#define ShowConfigWarning(config, fmt, ...) (showmsg->showConfigWarning((config), (fmt), ##__VA_ARGS__))
+
#ifdef HERCULES_CORE
-extern int stdout_with_ansisequence; //If the color ANSI sequences are to be used. [flaviojs]
-extern int msg_silent; //Specifies how silent the console is. [Skotlex]
-extern int console_msg_log; //Specifies what error messages to log. [Ind]
-extern char timestamp_format[20]; //For displaying Timestamps [Skotlex]
-
-extern void ClearScreen(void);
-extern int vShowMessage_(enum msg_type flag, const char *string, va_list ap);
-
- extern void ShowMessage(const char *, ...) __attribute__((format(printf, 1, 2)));
- extern void ShowStatus(const char *, ...) __attribute__((format(printf, 1, 2)));
- extern void ShowSQL(const char *, ...) __attribute__((format(printf, 1, 2)));
- extern void ShowInfo(const char *, ...) __attribute__((format(printf, 1, 2)));
- extern void ShowNotice(const char *, ...) __attribute__((format(printf, 1, 2)));
- extern void ShowWarning(const char *, ...) __attribute__((format(printf, 1, 2)));
- extern void ShowDebug(const char *, ...) __attribute__((format(printf, 1, 2)));
- extern void ShowError(const char *, ...) __attribute__((format(printf, 1, 2)));
- extern void ShowFatalError(const char *, ...) __attribute__((format(printf, 1, 2)));
- extern void ShowConfigWarning(config_setting_t *config, const char *string, ...) __attribute__((format(printf, 2, 3)));
-#else
- HPExport void (*ShowMessage) (const char *, ...) __attribute__((format(printf, 1, 2)));
- HPExport void (*ShowStatus) (const char *, ...) __attribute__((format(printf, 1, 2)));
- HPExport void (*ShowSQL) (const char *, ...) __attribute__((format(printf, 1, 2)));
- HPExport void (*ShowInfo) (const char *, ...) __attribute__((format(printf, 1, 2)));
- HPExport void (*ShowNotice) (const char *, ...) __attribute__((format(printf, 1, 2)));
- HPExport void (*ShowWarning) (const char *, ...) __attribute__((format(printf, 1, 2)));
- HPExport void (*ShowDebug) (const char *, ...) __attribute__((format(printf, 1, 2)));
- HPExport void (*ShowError) (const char *, ...) __attribute__((format(printf, 1, 2)));
- HPExport void (*ShowFatalError) (const char *, ...) __attribute__((format(printf, 1, 2)));
-#endif
+void showmsg_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct showmsg_interface *showmsg;
#endif /* COMMON_SHOWMSG_H */
diff --git a/src/common/socket.c b/src/common/socket.c
index 17c31db50..c4cc4a329 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -5,15 +5,14 @@
#define HERCULES_CORE
#include "config/core.h" // SHOW_SERVER_STATS
-#define H_SOCKET_C
#include "socket.h"
-#undef H_SOCKET_C
#include "common/HPM.h"
#include "common/cbasetypes.h"
#include "common/db.h"
#include "common/malloc.h"
#include "common/mmo.h"
+#include "common/nullpo.h"
#include "common/showmsg.h"
#include "common/strlib.h"
#include "common/timer.h"
@@ -56,6 +55,9 @@
* Socket Interface Source
**/
struct socket_interface sockt_s;
+struct socket_interface *sockt;
+
+struct socket_data **session;
#ifdef SEND_SHORTLIST
// Add a fd to the shortlist so that it'll be recognized as a fd that needs
@@ -358,13 +360,12 @@ void setsocketopts(int fd, struct hSockOpt *opt) {
*--------------------------------------*/
void set_eof(int fd)
{
- if( sockt->session_isActive(fd) )
- {
+ if (sockt->session_is_active(fd)) {
#ifdef SEND_SHORTLIST
// Add this socket to the shortlist for eof handling.
send_shortlist_add_fd(fd);
#endif
- session[fd]->flag.eof = 1;
+ sockt->session[fd]->flag.eof = 1;
}
}
@@ -372,32 +373,32 @@ int recv_to_fifo(int fd)
{
ssize_t len;
- if( !sockt->session_isActive(fd) )
+ if (!sockt->session_is_active(fd))
return -1;
- len = sRecv(fd, (char *) session[fd]->rdata + session[fd]->rdata_size, (int)RFIFOSPACE(fd), 0);
+ len = sRecv(fd, (char *) sockt->session[fd]->rdata + sockt->session[fd]->rdata_size, (int)RFIFOSPACE(fd), 0);
if( len == SOCKET_ERROR )
{//An exception has occurred
if( sErrno != S_EWOULDBLOCK ) {
//ShowDebug("recv_to_fifo: %s, closing connection #%d\n", error_msg(), fd);
- set_eof(fd);
+ sockt->eof(fd);
}
return 0;
}
if( len == 0 )
{//Normal connection end.
- set_eof(fd);
+ sockt->eof(fd);
return 0;
}
- session[fd]->rdata_size += len;
- session[fd]->rdata_tick = sockt->last_tick;
+ sockt->session[fd]->rdata_size += len;
+ sockt->session[fd]->rdata_tick = sockt->last_tick;
#ifdef SHOW_SERVER_STATS
socket_data_i += len;
socket_data_qi += len;
- if (!session[fd]->flag.server)
+ if (!sockt->session[fd]->flag.server)
{
socket_data_ci += len;
}
@@ -409,23 +410,23 @@ int send_from_fifo(int fd)
{
ssize_t len;
- if( !sockt->session_isValid(fd) )
+ if (!sockt->session_is_valid(fd))
return -1;
- if( session[fd]->wdata_size == 0 )
+ if( sockt->session[fd]->wdata_size == 0 )
return 0; // nothing to send
- len = sSend(fd, (const char *) session[fd]->wdata, (int)session[fd]->wdata_size, MSG_NOSIGNAL);
+ len = sSend(fd, (const char *) sockt->session[fd]->wdata, (int)sockt->session[fd]->wdata_size, MSG_NOSIGNAL);
if( len == SOCKET_ERROR )
{//An exception has occurred
if( sErrno != S_EWOULDBLOCK ) {
//ShowDebug("send_from_fifo: %s, ending connection #%d\n", error_msg(), fd);
#ifdef SHOW_SERVER_STATS
- socket_data_qo -= session[fd]->wdata_size;
+ socket_data_qo -= sockt->session[fd]->wdata_size;
#endif
- session[fd]->wdata_size = 0; //Clear the send queue as we can't send anymore. [Skotlex]
- set_eof(fd);
+ sockt->session[fd]->wdata_size = 0; //Clear the send queue as we can't send anymore. [Skotlex]
+ sockt->eof(fd);
}
return 0;
}
@@ -434,14 +435,14 @@ int send_from_fifo(int fd)
{
// some data could not be transferred?
// shift unsent data to the beginning of the queue
- if( (size_t)len < session[fd]->wdata_size )
- memmove(session[fd]->wdata, session[fd]->wdata + len, session[fd]->wdata_size - len);
+ if( (size_t)len < sockt->session[fd]->wdata_size )
+ memmove(sockt->session[fd]->wdata, sockt->session[fd]->wdata + len, sockt->session[fd]->wdata_size - len);
- session[fd]->wdata_size -= len;
+ sockt->session[fd]->wdata_size -= len;
#ifdef SHOW_SERVER_STATS
socket_data_o += len;
socket_data_qo -= len;
- if (!session[fd]->flag.server)
+ if (!sockt->session[fd]->flag.server)
{
socket_data_co += len;
}
@@ -454,15 +455,15 @@ int send_from_fifo(int fd)
/// Best effort - there's no warranty that the data will be sent.
void flush_fifo(int fd)
{
- if(session[fd] != NULL)
- session[fd]->func_send(fd);
+ if(sockt->session[fd] != NULL)
+ sockt->session[fd]->func_send(fd);
}
void flush_fifos(void)
{
int i;
for(i = 1; i < sockt->fd_max; i++)
- sockt->flush_fifo(i);
+ sockt->flush(i);
}
/*======================================
@@ -492,7 +493,7 @@ int connect_client(int listen_fd) {
}
setsocketopts(fd,NULL);
- set_nonblocking(fd, 1);
+ sockt->set_nonblocking(fd, 1);
#ifndef MINICORE
if( ip_rules && !connect_check(ntohl(client_address.sin_addr.s_addr)) ) {
@@ -505,7 +506,7 @@ int connect_client(int listen_fd) {
sFD_SET(fd,&readfds);
create_session(fd, recv_to_fifo, send_from_fifo, default_func_parse);
- session[fd]->client_addr = ntohl(client_address.sin_addr.s_addr);
+ sockt->session[fd]->client_addr = ntohl(client_address.sin_addr.s_addr);
return fd;
}
@@ -534,7 +535,7 @@ int make_listen_bind(uint32 ip, uint16 port)
}
setsocketopts(fd,NULL);
- set_nonblocking(fd, 1);
+ sockt->set_nonblocking(fd, 1);
server_address.sin_family = AF_INET;
server_address.sin_addr.s_addr = htonl(ip);
@@ -555,8 +556,8 @@ int make_listen_bind(uint32 ip, uint16 port)
sFD_SET(fd, &readfds);
create_session(fd, connect_client, null_send, null_parse);
- session[fd]->client_addr = 0; // just listens
- session[fd]->rdata_tick = 0; // disable timeouts on this socket
+ sockt->session[fd]->client_addr = 0; // just listens
+ sockt->session[fd]->rdata_tick = 0; // disable timeouts on this socket
return fd;
}
@@ -600,73 +601,73 @@ int make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) {
return -1;
}
//Now the socket can be made non-blocking. [Skotlex]
- set_nonblocking(fd, 1);
+ sockt->set_nonblocking(fd, 1);
if (sockt->fd_max <= fd) sockt->fd_max = fd + 1;
sFD_SET(fd,&readfds);
create_session(fd, recv_to_fifo, send_from_fifo, default_func_parse);
- session[fd]->client_addr = ntohl(remote_address.sin_addr.s_addr);
+ sockt->session[fd]->client_addr = ntohl(remote_address.sin_addr.s_addr);
return fd;
}
static int create_session(int fd, RecvFunc func_recv, SendFunc func_send, ParseFunc func_parse)
{
- CREATE(session[fd], struct socket_data, 1);
- CREATE(session[fd]->rdata, unsigned char, RFIFO_SIZE);
- CREATE(session[fd]->wdata, unsigned char, WFIFO_SIZE);
- session[fd]->max_rdata = RFIFO_SIZE;
- session[fd]->max_wdata = WFIFO_SIZE;
- session[fd]->func_recv = func_recv;
- session[fd]->func_send = func_send;
- session[fd]->func_parse = func_parse;
- session[fd]->rdata_tick = sockt->last_tick;
- session[fd]->session_data = NULL;
- session[fd]->hdata = NULL;
- session[fd]->hdatac = 0;
+ CREATE(sockt->session[fd], struct socket_data, 1);
+ CREATE(sockt->session[fd]->rdata, unsigned char, RFIFO_SIZE);
+ CREATE(sockt->session[fd]->wdata, unsigned char, WFIFO_SIZE);
+ sockt->session[fd]->max_rdata = RFIFO_SIZE;
+ sockt->session[fd]->max_wdata = WFIFO_SIZE;
+ sockt->session[fd]->func_recv = func_recv;
+ sockt->session[fd]->func_send = func_send;
+ sockt->session[fd]->func_parse = func_parse;
+ sockt->session[fd]->rdata_tick = sockt->last_tick;
+ sockt->session[fd]->session_data = NULL;
+ sockt->session[fd]->hdata = NULL;
+ sockt->session[fd]->hdatac = 0;
return 0;
}
static void delete_session(int fd)
{
- if( sockt->session_isValid(fd) ) {
+ if (sockt->session_is_valid(fd)) {
#ifdef SHOW_SERVER_STATS
- socket_data_qi -= session[fd]->rdata_size - session[fd]->rdata_pos;
- socket_data_qo -= session[fd]->wdata_size;
+ socket_data_qi -= sockt->session[fd]->rdata_size - sockt->session[fd]->rdata_pos;
+ socket_data_qo -= sockt->session[fd]->wdata_size;
#endif
- aFree(session[fd]->rdata);
- aFree(session[fd]->wdata);
- if( session[fd]->session_data )
- aFree(session[fd]->session_data);
- if (session[fd]->hdata) {
+ aFree(sockt->session[fd]->rdata);
+ aFree(sockt->session[fd]->wdata);
+ if( sockt->session[fd]->session_data )
+ aFree(sockt->session[fd]->session_data);
+ if (sockt->session[fd]->hdata) {
unsigned int i;
- for(i = 0; i < session[fd]->hdatac; i++) {
- if( session[fd]->hdata[i]->flag.free ) {
- aFree(session[fd]->hdata[i]->data);
+ for(i = 0; i < sockt->session[fd]->hdatac; i++) {
+ if( sockt->session[fd]->hdata[i]->flag.free ) {
+ aFree(sockt->session[fd]->hdata[i]->data);
}
- aFree(session[fd]->hdata[i]);
+ aFree(sockt->session[fd]->hdata[i]);
}
- aFree(session[fd]->hdata);
+ aFree(sockt->session[fd]->hdata);
}
- aFree(session[fd]);
- session[fd] = NULL;
+ aFree(sockt->session[fd]);
+ sockt->session[fd] = NULL;
}
}
int realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size)
{
- if( !sockt->session_isValid(fd) )
+ if (!sockt->session_is_valid(fd))
return 0;
- if( session[fd]->max_rdata != rfifo_size && session[fd]->rdata_size < rfifo_size) {
- RECREATE(session[fd]->rdata, unsigned char, rfifo_size);
- session[fd]->max_rdata = rfifo_size;
+ if( sockt->session[fd]->max_rdata != rfifo_size && sockt->session[fd]->rdata_size < rfifo_size) {
+ RECREATE(sockt->session[fd]->rdata, unsigned char, rfifo_size);
+ sockt->session[fd]->max_rdata = rfifo_size;
}
- if( session[fd]->max_wdata != wfifo_size && session[fd]->wdata_size < wfifo_size) {
- RECREATE(session[fd]->wdata, unsigned char, wfifo_size);
- session[fd]->max_wdata = wfifo_size;
+ if( sockt->session[fd]->max_wdata != wfifo_size && sockt->session[fd]->wdata_size < wfifo_size) {
+ RECREATE(sockt->session[fd]->wdata, unsigned char, wfifo_size);
+ sockt->session[fd]->max_wdata = wfifo_size;
}
return 0;
}
@@ -675,38 +676,38 @@ int realloc_writefifo(int fd, size_t addition)
{
size_t newsize;
- if( !sockt->session_isValid(fd) ) // might not happen
+ if (!sockt->session_is_valid(fd)) // might not happen
return 0;
- if (session[fd]->wdata_size + addition > session[fd]->max_wdata) {
+ if (sockt->session[fd]->wdata_size + addition > sockt->session[fd]->max_wdata) {
// grow rule; grow in multiples of WFIFO_SIZE
newsize = WFIFO_SIZE;
- while( session[fd]->wdata_size + addition > newsize ) newsize += WFIFO_SIZE;
- } else if (session[fd]->max_wdata >= (size_t)2*(session[fd]->flag.server?FIFOSIZE_SERVERLINK:WFIFO_SIZE)
- && (session[fd]->wdata_size+addition)*4 < session[fd]->max_wdata
+ while( sockt->session[fd]->wdata_size + addition > newsize ) newsize += WFIFO_SIZE;
+ } else if (sockt->session[fd]->max_wdata >= (size_t)2*(sockt->session[fd]->flag.server?FIFOSIZE_SERVERLINK:WFIFO_SIZE)
+ && (sockt->session[fd]->wdata_size+addition)*4 < sockt->session[fd]->max_wdata
) {
// shrink rule, shrink by 2 when only a quarter of the fifo is used, don't shrink below nominal size.
- newsize = session[fd]->max_wdata / 2;
+ newsize = sockt->session[fd]->max_wdata / 2;
} else {
// no change
return 0;
}
- RECREATE(session[fd]->wdata, unsigned char, newsize);
- session[fd]->max_wdata = newsize;
+ RECREATE(sockt->session[fd]->wdata, unsigned char, newsize);
+ sockt->session[fd]->max_wdata = newsize;
return 0;
}
/// advance the RFIFO cursor (marking 'len' bytes as processed)
-int RFIFOSKIP(int fd, size_t len)
+int rfifoskip(int fd, size_t len)
{
struct socket_data *s;
- if ( !sockt->session_isActive(fd) )
+ if (!sockt->session_is_active(fd))
return 0;
- s = session[fd];
+ s = sockt->session[fd];
if (s->rdata_size < s->rdata_pos + len) {
ShowError("RFIFOSKIP: skipped past end of read buffer! Adjusting from %"PRIuS" to %"PRIuS" (session #%d)\n", len, RFIFOREST(fd), fd);
@@ -721,12 +722,12 @@ int RFIFOSKIP(int fd, size_t len)
}
/// advance the WFIFO cursor (marking 'len' bytes for sending)
-int WFIFOSET(int fd, size_t len)
+int wfifoset(int fd, size_t len)
{
size_t newreserve;
- struct socket_data* s = session[fd];
+ struct socket_data* s = sockt->session[fd];
- if( !sockt->session_isValid(fd) || s->wdata == NULL )
+ if (!sockt->session_is_valid(fd) || s->wdata == NULL)
return 0;
// we have written len bytes to the buffer already before calling WFIFOSET
@@ -770,14 +771,14 @@ int WFIFOSET(int fd, size_t len)
#endif
//If the interserver has 200% of its normal size full, flush the data.
if( s->flag.server && s->wdata_size >= 2*FIFOSIZE_SERVERLINK )
- flush_fifo(fd);
+ sockt->flush(fd);
// always keep a WFIFO_SIZE reserve in the buffer
// For inter-server connections, let the reserve be 1/4th of the link size.
newreserve = s->flag.server ? FIFOSIZE_SERVERLINK / 4 : WFIFO_SIZE;
// readjust the buffer to include the chosen reserve
- realloc_writefifo(fd, newreserve);
+ sockt->realloc_writefifo(fd, newreserve);
#ifdef SEND_SHORTLIST
send_shortlist_add_fd(fd);
@@ -799,11 +800,11 @@ int do_sockets(int next)
#else
for (i = 1; i < sockt->fd_max; i++)
{
- if(!session[i])
+ if(!sockt->session[fd]
continue;
- if(session[i]->wdata_size)
- session[i]->func_send(i);
+ if(sockt->session[fd]>wdata_size)
+ sockt->session[fd]>func_send(i);
}
#endif
@@ -831,16 +832,16 @@ int do_sockets(int next)
for( i = 0; i < (int)rfd.fd_count; ++i )
{
int fd = sock2fd(rfd.fd_array[i]);
- if( session[fd] )
- session[fd]->func_recv(fd);
+ if( sockt->session[fd] )
+ sockt->session[fd]->func_recv(fd);
}
#else
// otherwise assume that the fd_set is a bit-array and enumerate it in a standard way
for( i = 1; ret && i < sockt->fd_max; ++i )
{
- if(sFD_ISSET(i,&rfd) && session[i])
+ if(sFD_ISSET(i,&rfd) && sockt->session[i])
{
- session[i]->func_recv(i);
+ sockt->session[i]->func_recv(i);
--ret;
}
}
@@ -852,15 +853,15 @@ int do_sockets(int next)
#else
for (i = 1; i < sockt->fd_max; i++)
{
- if(!session[i])
+ if(!sockt->session[i])
continue;
- if(session[i]->wdata_size)
- session[i]->func_send(i);
+ if(sockt->session[i]->wdata_size)
+ sockt->session[i]->func_send(i);
- if (session[i]->flag.eof) { //func_send can't free a session, this is safe.
+ if (sockt->session[i]->flag.eof) { //func_send can't free a session, this is safe.
//Finally, even if there is no data to parse, connections signaled eof should be closed, so we call parse_func [Skotlex]
- session[i]->func_parse(i); //This should close the session immediately.
+ sockt->session[i]->func_parse(i); //This should close the session immediately.
}
}
#endif
@@ -868,32 +869,32 @@ int do_sockets(int next)
// parse input data on each socket
for(i = 1; i < sockt->fd_max; i++)
{
- if(!session[i])
+ if(!sockt->session[i])
continue;
- if (session[i]->rdata_tick && DIFF_TICK(sockt->last_tick, session[i]->rdata_tick) > sockt->stall_time) {
- if( session[i]->flag.server ) {/* server is special */
- if( session[i]->flag.ping != 2 )/* only update if necessary otherwise it'd resend the ping unnecessarily */
- session[i]->flag.ping = 1;
+ if (sockt->session[i]->rdata_tick && DIFF_TICK(sockt->last_tick, sockt->session[i]->rdata_tick) > sockt->stall_time) {
+ if( sockt->session[i]->flag.server ) {/* server is special */
+ if( sockt->session[i]->flag.ping != 2 )/* only update if necessary otherwise it'd resend the ping unnecessarily */
+ sockt->session[i]->flag.ping = 1;
} else {
ShowInfo("Session #%d timed out\n", i);
- set_eof(i);
+ sockt->eof(i);
}
}
#ifdef __clang_analyzer__
- // Let Clang's static analyzer know this never happens (it thinks it might because of a NULL check in session_isValid)
- if (!session[i]) continue;
+ // Let Clang's static analyzer know this never happens (it thinks it might because of a NULL check in session_is_valid)
+ if (!sockt->session[i]) continue;
#endif // __clang_analyzer__
- session[i]->func_parse(i);
+ sockt->session[i]->func_parse(i);
- if(!session[i])
+ if(!sockt->session[i])
continue;
RFIFOFLUSH(i);
// after parse, check client's RFIFO size to know if there is an invalid packet (too big and not parsed)
- if (session[i]->rdata_size == session[i]->max_rdata) {
- set_eof(i);
+ if (sockt->session[i]->rdata_size == sockt->session[i]->max_rdata) {
+ sockt->eof(i);
continue;
}
}
@@ -1219,28 +1220,43 @@ void socket_final(void)
#endif
for( i = 1; i < sockt->fd_max; i++ )
- if(session[i])
+ if(sockt->session[i])
sockt->close(i);
- // session[0]
- aFree(session[0]->rdata);
- aFree(session[0]->wdata);
- aFree(session[0]);
+ // sockt->session[0]
+ aFree(sockt->session[0]->rdata);
+ aFree(sockt->session[0]->wdata);
+ aFree(sockt->session[0]);
+
+ aFree(sockt->session);
+
+ if (sockt->lan_subnet)
+ aFree(sockt->lan_subnet);
+ sockt->lan_subnet = NULL;
+ sockt->lan_subnet_count = 0;
- aFree(session);
+ if (sockt->allowed_ip)
+ aFree(sockt->allowed_ip);
+ sockt->allowed_ip = NULL;
+ sockt->allowed_ip_count = 0;
+
+ if (sockt->trusted_ip)
+ aFree(sockt->trusted_ip);
+ sockt->trusted_ip = NULL;
+ sockt->trusted_ip_count = 0;
}
/// Closes a socket.
-void do_close(int fd)
+void socket_close(int fd)
{
if( fd <= 0 ||fd >= FD_SETSIZE )
return;// invalid
- flush_fifo(fd); // Try to send what's left (although it might not succeed since it's a nonblocking socket)
+ sockt->flush(fd); // Try to send what's left (although it might not succeed since it's a nonblocking socket)
sFD_CLR(fd, &readfds);// this needs to be done before closing the socket
sShutdown(fd, SHUT_RDWR); // Disallow further reads/writes
sClose(fd); // We don't really care if these closing functions return an error, we are just shutting down and not reusing this socket.
- if (session[fd]) delete_session(fd);
+ if (sockt->session[fd]) delete_session(fd);
}
/// Retrieve local ips in host byte order.
@@ -1377,21 +1393,21 @@ void socket_init(void)
#endif
// Get initial local ips
- sockt->naddr_ = socket_getips(sockt->addr_,16);
+ sockt->naddr_ = sockt->getips(sockt->addr_,16);
sFD_ZERO(&readfds);
#if defined(SEND_SHORTLIST)
memset(send_shortlist_set, 0, sizeof(send_shortlist_set));
#endif
- CREATE(session, struct socket_data *, FD_SETSIZE);
+ CREATE(sockt->session, struct socket_data *, FD_SETSIZE);
socket_config_read(SOCKET_CONF_FILENAME);
// initialize last send-receive tick
sockt->last_tick = time(NULL);
- // session[0] is now currently used for disconnected sessions of the map server, and as such,
+ // sockt->session[0] is now currently used for disconnected sessions of the map server, and as such,
// should hold enough buffer (it is a vacuum so to speak) as it is never flushed. [Skotlex]
create_session(0, null_recv, null_send, null_parse);
@@ -1403,19 +1419,16 @@ void socket_init(void)
#endif
ShowInfo("Server supports up to '"CL_WHITE"%"PRId64""CL_RESET"' concurrent connections.\n", rlim_cur);
-
- /* Hercules Plugin Manager */
- HPM->share(session,"session");
}
-bool session_isValid(int fd)
+bool session_is_valid(int fd)
{
- return ( fd > 0 && fd < FD_SETSIZE && session[fd] != NULL );
+ return ( fd > 0 && fd < FD_SETSIZE && sockt->session[fd] != NULL );
}
-bool session_isActive(int fd)
+bool session_is_active(int fd)
{
- return ( sockt->session_isValid(fd) && !session[fd]->flag.eof );
+ return ( sockt->session_is_valid(fd) && !sockt->session[fd]->flag.eof );
}
// Resolves hostname into a numeric ip.
@@ -1425,9 +1438,15 @@ uint32 host2ip(const char* hostname)
return (h != NULL) ? ntohl(*(uint32*)h->h_addr) : 0;
}
-// Converts a numeric ip into a dot-formatted string.
-// Result is placed either into a user-provided buffer or a static system buffer.
-const char* ip2str(uint32 ip, char ip_str[16])
+/**
+ * Converts a numeric ip into a dot-formatted string.
+ *
+ * @param ip Numeric IP to convert.
+ * @param ip_str Output buffer, optional (if provided, must have size greater or equal to 16).
+ *
+ * @return A pointer to the output string.
+ */
+const char *ip2str(uint32 ip, char *ip_str)
{
struct in_addr addr;
addr.s_addr = htonl(ip);
@@ -1502,7 +1521,7 @@ void socket_datasync(int fd, bool send) {
WFIFOW(fd, 2) = 8;
WFIFOL(fd, 4) = 0;
WFIFOSET(fd, 8);
- flush_fifo(fd);
+ sockt->flush(fd);
/* shut down */
ShowFatalError("Servers are out of sync! recompile from scratch (%d)\n",i);
exit(EXIT_FAILURE);
@@ -1519,7 +1538,7 @@ void send_shortlist_add_fd(int fd)
int i;
int bit;
- if( !sockt->session_isValid(fd) )
+ if (!sockt->session_is_valid(fd))
return;// out of range
i = fd/32;
@@ -1569,26 +1588,184 @@ void send_shortlist_do_sends()
send_shortlist_set[idx]&=~(1<<bit);// unset fd
// If this session still exists, perform send operations on it and
// check for the eof state.
- if( session[fd] )
+ if( sockt->session[fd] )
{
// Send data
- if( session[fd]->wdata_size )
- session[fd]->func_send(fd);
+ if( sockt->session[fd]->wdata_size )
+ sockt->session[fd]->func_send(fd);
// If it's been marked as eof, call the parse func on it so that
// the socket will be immediately closed.
- if( session[fd]->flag.eof )
- session[fd]->func_parse(fd);
+ if( sockt->session[fd]->flag.eof )
+ sockt->session[fd]->func_parse(fd);
// If the session still exists, is not eof and has things left to
// be sent from it we'll re-add it to the shortlist.
- if( session[fd] && !session[fd]->flag.eof && session[fd]->wdata_size )
+ if( sockt->session[fd] && !sockt->session[fd]->flag.eof && sockt->session[fd]->wdata_size )
send_shortlist_add_fd(fd);
}
}
}
#endif
+/**
+ * Checks whether the given IP comes from LAN or WAN.
+ *
+ * @param[in] ip IP address to check.
+ * @param[out] info Verbose output, if requested. Filled with the matching entry. Ignored if NULL.
+ * @retval 0 if it is a WAN IP.
+ * @return the appropriate LAN server address to send, if it is a LAN IP.
+ */
+uint32 socket_lan_subnet_check(uint32 ip, struct s_subnet *info)
+{
+ int i;
+ ARR_FIND(0, sockt->lan_subnet_count, i, (sockt->lan_subnet[i].ip & sockt->lan_subnet[i].mask) == (ip & sockt->lan_subnet[i].mask));
+ if (i < sockt->lan_subnet_count) {
+ if (info) {
+ info->ip = sockt->lan_subnet[i].ip;
+ info->mask = sockt->lan_subnet[i].mask;
+ }
+ return sockt->lan_subnet[i].ip;
+ }
+ if (info) {
+ info->ip = info->mask = 0;
+ }
+ return 0;
+}
+
+/**
+ * Checks whether the given IP is allowed to connect as a server.
+ *
+ * @param ip IP address to check.
+ * @retval true if we allow server connections from the given IP.
+ * @retval false otherwise.
+ */
+bool socket_allowed_ip_check(uint32 ip)
+{
+ int i;
+ ARR_FIND(0, sockt->allowed_ip_count, i, (sockt->allowed_ip[i].ip & sockt->allowed_ip[i].mask) == (ip & sockt->allowed_ip[i].mask) );
+ if (i < sockt->allowed_ip_count)
+ return true;
+ return sockt->trusted_ip_check(ip); // If an address is trusted, it's automatically also allowed.
+}
+
+/**
+ * Checks whether the given IP is trusted and can skip ipban checks.
+ *
+ * @param ip IP address to check.
+ * @retval true if we trust the given IP.
+ * @retval false otherwise.
+ */
+bool socket_trusted_ip_check(uint32 ip)
+{
+ int i;
+ ARR_FIND(0, sockt->trusted_ip_count, i, (sockt->trusted_ip[i].ip & sockt->trusted_ip[i].mask) == (ip & sockt->trusted_ip[i].mask));
+ if (i < sockt->trusted_ip_count)
+ return true;
+ return false;
+}
+
+/**
+ * Helper function to read a list of network.conf values.
+ *
+ * Entries will be appended to the variable-size array pointed to by list/count.
+ *
+ * @param[in] t The list to parse.
+ * @param[in,out] list Pointer to the head of the output array to append to. Must not be NULL (but the array may be empty).
+ * @param[in,out] count Pointer to the counter of the output array to append to. Must not be NULL (but it may contain zero).
+ * @param[in] filename Current filename, for output/logging reasons.
+ * @param[in] groupname Current group name, for output/logging reasons.
+ * @return The amount of entries read, zero in case of errors.
+ */
+int socket_net_config_read_sub(config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname)
+{
+ int i, len;
+ char ipbuf[64], maskbuf[64];
+
+ nullpo_retr(0, list);
+ nullpo_retr(0, count);
+
+ if (t == NULL)
+ return 0;
+
+ len = libconfig->setting_length(t);
+
+ for (i = 0; i < len; ++i) {
+ const char *subnet = libconfig->setting_get_string_elem(t, i);
+ struct s_subnet *l = NULL;
+
+ if (sscanf(subnet, "%63[^:]:%63[^:]", ipbuf, maskbuf) != 2) {
+ ShowWarning("Invalid IP:Subnet entry in configuration file %s: '%s' (%s)\n", filename, subnet, groupname);
+ }
+ RECREATE(*list, struct s_subnet, *count + 1);
+ l = *list;
+ l[*count].ip = sockt->str2ip(ipbuf);
+ l[*count].mask = sockt->str2ip(maskbuf);
+ ++*count;
+ }
+ return *count;
+}
+
+/**
+ * Reads the network configuration file.
+ *
+ * @param filename The filename to read from.
+ */
+void socket_net_config_read(const char *filename)
+{
+ config_t network_config;
+ int i;
+ nullpo_retv(filename);
+
+ if (libconfig->read_file(&network_config, filename)) {
+ ShowError("LAN Support configuration file is not found: '%s'. This server won't be able to accept connections from any servers.\n", filename);
+ return;
+ }
+
+ if (sockt->lan_subnet) {
+ aFree(sockt->lan_subnet);
+ sockt->lan_subnet = NULL;
+ }
+ sockt->lan_subnet_count = 0;
+ if (sockt->net_config_read_sub(libconfig->lookup(&network_config, "lan_subnets"), &sockt->lan_subnet, &sockt->lan_subnet_count, filename, "lan_subnets") > 0)
+ ShowStatus("Read information about %d LAN subnets.\n", sockt->lan_subnet_count);
+
+ if (sockt->trusted_ip) {
+ aFree(sockt->trusted_ip);
+ sockt->trusted_ip = NULL;
+ }
+ sockt->trusted_ip_count = 0;
+ if (sockt->net_config_read_sub(libconfig->lookup(&network_config, "trusted"), &sockt->trusted_ip, &sockt->trusted_ip_count, filename, "trusted") > 0)
+ ShowStatus("Read information about %d trusted IP ranges.\n", sockt->trusted_ip_count);
+ for (i = 0; i < sockt->allowed_ip_count; ++i) {
+ if ((sockt->allowed_ip[i].ip & sockt->allowed_ip[i].mask) == 0) {
+ ShowError("Using a wildcard IP range in the trusted server IPs is NOT RECOMMENDED.\n");
+ ShowNotice("Please edit your '%s' trusted list to fit your network configuration.\n", filename);
+ break;
+ }
+ }
+
+ if (sockt->allowed_ip) {
+ aFree(sockt->allowed_ip);
+ sockt->allowed_ip = NULL;
+ }
+ sockt->allowed_ip_count = 0;
+ if (sockt->net_config_read_sub(libconfig->lookup(&network_config, "allowed"), &sockt->allowed_ip, &sockt->allowed_ip_count, filename, "allowed") > 0)
+ ShowStatus("Read information about %d allowed server IP ranges.\n", sockt->allowed_ip_count);
+ if (sockt->allowed_ip_count == 0) {
+ ShowError("No allowed server IP ranges configured. This server won't be able to accept connections from any char servers.\n");
+ }
+ for (i = 0; i < sockt->allowed_ip_count; ++i) {
+ if ((sockt->allowed_ip[i].ip & sockt->allowed_ip[i].mask) == 0) {
+ ShowWarning("Using a wildcard IP range in the allowed server IPs is NOT RECOMMENDED.\n");
+ ShowNotice("Please edit your '%s' allowed list to fit your network configuration.\n", filename);
+ break;
+ }
+ }
+ libconfig->destroy(&network_config);
+ return;
+}
+
void socket_defaults(void) {
sockt = &sockt_s;
@@ -1600,6 +1777,13 @@ void socket_defaults(void) {
memset(&sockt->addr_, 0, sizeof(sockt->addr_));
sockt->naddr_ = 0;
/* */
+ sockt->lan_subnet_count = 0;
+ sockt->lan_subnet = NULL;
+ sockt->allowed_ip_count = 0;
+ sockt->allowed_ip = NULL;
+ sockt->trusted_ip_count = 0;
+ sockt->trusted_ip = NULL;
+
sockt->init = socket_init;
sockt->final = socket_final;
/* */
@@ -1611,14 +1795,14 @@ void socket_defaults(void) {
sockt->make_connection = make_connection;
sockt->realloc_fifo = realloc_fifo;
sockt->realloc_writefifo = realloc_writefifo;
- sockt->WFIFOSET = WFIFOSET;
- sockt->RFIFOSKIP = RFIFOSKIP;
- sockt->close = do_close;
+ sockt->wfifoset = wfifoset;
+ sockt->rfifoskip = rfifoskip;
+ sockt->close = socket_close;
/* */
- sockt->session_isValid = session_isValid;
- sockt->session_isActive = session_isActive;
+ sockt->session_is_valid = session_is_valid;
+ sockt->session_is_active = session_is_active;
/* */
- sockt->flush_fifo = flush_fifo;
+ sockt->flush = flush_fifo;
sockt->flush_fifos = flush_fifos;
sockt->set_nonblocking = set_nonblocking;
sockt->set_defaultparse = set_defaultparse;
@@ -1627,5 +1811,11 @@ void socket_defaults(void) {
sockt->str2ip = str2ip;
sockt->ntows = ntows;
sockt->getips = socket_getips;
- sockt->set_eof = set_eof;
+ sockt->eof = set_eof;
+
+ sockt->lan_subnet_check = socket_lan_subnet_check;
+ sockt->allowed_ip_check = socket_allowed_ip_check;
+ sockt->trusted_ip_check = socket_trusted_ip_check;
+ sockt->net_config_read_sub = socket_net_config_read_sub;
+ sockt->net_config_read = socket_net_config_read;
}
diff --git a/src/common/socket.h b/src/common/socket.h
index bd5d9baa2..a995bffc8 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -5,7 +5,8 @@
#ifndef COMMON_SOCKET_H
#define COMMON_SOCKET_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
+#include "common/conf.h"
#ifdef WIN32
# include "common/winapi.h"
@@ -22,9 +23,14 @@ struct HPluginData;
// socket I/O macros
#define RFIFOHEAD(fd)
-#define WFIFOHEAD(fd, size) do{ if((fd) && session[fd]->wdata_size + (size) > session[fd]->max_wdata ) realloc_writefifo((fd), (size)); }while(0)
-#define RFIFOP(fd,pos) (session[fd]->rdata + session[fd]->rdata_pos + (pos))
-#define WFIFOP(fd,pos) (session[fd]->wdata + session[fd]->wdata_size + (pos))
+#define WFIFOHEAD(fd, size) \
+ do{ \
+ if ((fd) && sockt->session[fd]->wdata_size + (size) > sockt->session[fd]->max_wdata) \
+ sockt->realloc_writefifo((fd), (size)); \
+ } while(0)
+
+#define RFIFOP(fd,pos) (sockt->session[fd]->rdata + sockt->session[fd]->rdata_pos + (pos))
+#define WFIFOP(fd,pos) (sockt->session[fd]->wdata + sockt->session[fd]->wdata_size + (pos))
#define RFIFOB(fd,pos) (*(uint8*)RFIFOP((fd),(pos)))
#define WFIFOB(fd,pos) (*(uint8*)WFIFOP((fd),(pos)))
@@ -34,23 +40,26 @@ struct HPluginData;
#define WFIFOL(fd,pos) (*(uint32*)WFIFOP((fd),(pos)))
#define RFIFOQ(fd,pos) (*(uint64*)RFIFOP((fd),(pos)))
#define WFIFOQ(fd,pos) (*(uint64*)WFIFOP((fd),(pos)))
-#define RFIFOSPACE(fd) (session[fd]->max_rdata - session[fd]->rdata_size)
-#define WFIFOSPACE(fd) (session[fd]->max_wdata - session[fd]->wdata_size)
+#define RFIFOSPACE(fd) (sockt->session[fd]->max_rdata - sockt->session[fd]->rdata_size)
+#define WFIFOSPACE(fd) (sockt->session[fd]->max_wdata - sockt->session[fd]->wdata_size)
-#define RFIFOREST(fd) (session[fd]->flag.eof ? 0 : session[fd]->rdata_size - session[fd]->rdata_pos)
+#define RFIFOREST(fd) (sockt->session[fd]->flag.eof ? 0 : sockt->session[fd]->rdata_size - sockt->session[fd]->rdata_pos)
#define RFIFOFLUSH(fd) \
do { \
- if(session[fd]->rdata_size == session[fd]->rdata_pos){ \
- session[fd]->rdata_size = session[fd]->rdata_pos = 0; \
+ if(sockt->session[fd]->rdata_size == sockt->session[fd]->rdata_pos){ \
+ sockt->session[fd]->rdata_size = sockt->session[fd]->rdata_pos = 0; \
} else { \
- session[fd]->rdata_size -= session[fd]->rdata_pos; \
- memmove(session[fd]->rdata, session[fd]->rdata+session[fd]->rdata_pos, session[fd]->rdata_size); \
- session[fd]->rdata_pos = 0; \
+ sockt->session[fd]->rdata_size -= sockt->session[fd]->rdata_pos; \
+ memmove(sockt->session[fd]->rdata, sockt->session[fd]->rdata+sockt->session[fd]->rdata_pos, sockt->session[fd]->rdata_size); \
+ sockt->session[fd]->rdata_pos = 0; \
} \
} while(0)
+#define WFIFOSET(fd, len) (sockt->wfifoset(fd, len))
+#define RFIFOSKIP(fd, len) (sockt->rfifoskip(fd, len))
+
/* [Ind/Hercules] */
-#define RFIFO2PTR(fd) (void*)(session[fd]->rdata + session[fd]->rdata_pos)
+#define RFIFO2PTR(fd) (void*)(sockt->session[fd]->rdata + sockt->session[fd]->rdata_pos)
// buffer I/O macros
#define RBUFP(p,pos) (((uint8*)(p)) + (pos))
@@ -105,6 +114,12 @@ struct hSockOpt {
unsigned int setTimeo : 1;
};
+/// Subnet/IP range in the IP/Mask format.
+struct s_subnet {
+ uint32 ip;
+ uint32 mask;
+};
+
/// Use a shortlist of sockets instead of iterating all sessions for sockets
/// that have data to send or need eof handling.
/// Adapted to use a static array instead of a linked list.
@@ -117,11 +132,6 @@ struct hSockOpt {
#define MAKEIP(a,b,c,d) ((uint32)( ( ( (a)&0xFF ) << 24 ) | ( ( (b)&0xFF ) << 16 ) | ( ( (c)&0xFF ) << 8 ) | ( ( (d)&0xFF ) << 0 ) ))
/**
- * This stays out of the interface.
- **/
-struct socket_data **session;
-
-/**
* Socket.c interface, mostly for reading however.
**/
struct socket_interface {
@@ -132,6 +142,16 @@ struct socket_interface {
/* */
uint32 addr_[16]; // ip addresses of local host (host byte order)
int naddr_; // # of ip addresses
+
+ struct socket_data **session;
+
+ struct s_subnet *lan_subnet; ///< LAN subnets array
+ int lan_subnet_count; ///< LAN subnets count
+ struct s_subnet *trusted_ip; ///< Trusted IP ranges array
+ int trusted_ip_count; ///< Trusted IP ranges count
+ struct s_subnet *allowed_ip; ///< Allowed server IP ranges array
+ int allowed_ip_count; ///< Allowed server IP ranges count
+
/* */
void (*init) (void);
void (*final) (void);
@@ -144,56 +164,39 @@ struct socket_interface {
int (*make_connection) (uint32 ip, uint16 port, struct hSockOpt *opt);
int (*realloc_fifo) (int fd, unsigned int rfifo_size, unsigned int wfifo_size);
int (*realloc_writefifo) (int fd, size_t addition);
- int (*WFIFOSET) (int fd, size_t len);
- int (*RFIFOSKIP) (int fd, size_t len);
+ int (*wfifoset) (int fd, size_t len);
+ int (*rfifoskip) (int fd, size_t len);
void (*close) (int fd);
/* */
- bool (*session_isValid) (int fd);
- bool (*session_isActive) (int fd);
+ bool (*session_is_valid) (int fd);
+ bool (*session_is_active) (int fd);
/* */
- void (*flush_fifo) (int fd);
+ void (*flush) (int fd);
void (*flush_fifos) (void);
void (*set_nonblocking) (int fd, unsigned long yes);
void (*set_defaultparse) (ParseFunc defaultparse);
/* hostname/ip conversion functions */
uint32 (*host2ip) (const char* hostname);
- const char * (*ip2str) (uint32 ip, char ip_str[16]);
+ const char * (*ip2str) (uint32 ip, char *ip_str);
uint32 (*str2ip) (const char* ip_str);
/* */
uint16 (*ntows) (uint16 netshort);
/* */
int (*getips) (uint32* ips, int max);
/* */
- void (*set_eof) (int fd);
-};
+ void (*eof) (int fd);
-struct socket_interface *sockt;
+ uint32 (*lan_subnet_check) (uint32 ip, struct s_subnet *info);
+ bool (*allowed_ip_check) (uint32 ip);
+ bool (*trusted_ip_check) (uint32 ip);
+ int (*net_config_read_sub) (config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname);
+ void (*net_config_read) (const char *filename);
+};
#ifdef HERCULES_CORE
void socket_defaults(void);
#endif // HERCULES_CORE
-/* the purpose of these macros is simply to not make calling them be an annoyance */
-#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) )
- #define realloc_writefifo(fd, addition) ( sockt->realloc_writefifo(fd, addition) )
- #define WFIFOSET(fd, len) ( sockt->WFIFOSET(fd, len) )
- #define RFIFOSKIP(fd, len) ( sockt->RFIFOSKIP(fd, len) )
- #define do_close(fd) ( sockt->close(fd) )
- #define session_isValid(fd) ( sockt->session_isValid(fd) )
- #define session_isActive(fd) ( sockt->session_isActive(fd) )
- #define flush_fifo(fd) ( sockt->flush_fifo(fd) )
- #define flush_fifos() ( sockt->flush_fifos() )
- #define set_nonblocking(fd, yes) ( sockt->set_nonblocking(fd, yes) )
- #define set_defaultparse(defaultparse) ( sockt->set_defaultparse(defaultparse) )
- #define host2ip(hostname) ( sockt->host2ip(hostname) )
- #define ip2str(ip, ip_str) ( sockt->ip2str(ip, ip_str) )
- #define str2ip(ip_str) ( sockt->str2ip(ip_str) )
- #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 */
+HPShared struct socket_interface *sockt;
#endif /* COMMON_SOCKET_H */
diff --git a/src/common/sql.c b/src/common/sql.c
index a93092533..0ca51e272 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -24,6 +24,7 @@ int mysql_reconnect_type;
unsigned int mysql_reconnect_count;
struct sql_interface sql_s;
+struct sql_interface *SQL;
/// Sql handle
struct Sql {
diff --git a/src/common/sql.h b/src/common/sql.h
index d76b4f9d4..7fb4aabe8 100644
--- a/src/common/sql.h
+++ b/src/common/sql.h
@@ -5,7 +5,7 @@
#ifndef COMMON_SQL_H
#define COMMON_SQL_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include <stdarg.h>// va_list
@@ -269,8 +269,6 @@ struct sql_interface {
};
-struct sql_interface *SQL;
-
#ifdef HERCULES_CORE
void sql_defaults(void);
@@ -280,6 +278,8 @@ void Sql_HerculesUpdateCheck(Sql* self);
void Sql_HerculesUpdateSkip(Sql* self,const char *filename);
#endif // HERCULES_CORE
+HPShared struct sql_interface *SQL;
+
#if defined(SQL_REMOVE_SHOWDEBUG)
#define Sql_ShowDebug(self) (void)0
#else
diff --git a/src/common/strlib.c b/src/common/strlib.c
index 555f591e6..024b73e59 100644
--- a/src/common/strlib.c
+++ b/src/common/strlib.c
@@ -4,9 +4,7 @@
#define HERCULES_CORE
-#define H_STRLIB_C
#include "strlib.h"
-#undef H_STRLIB_C
#include "common/cbasetypes.h"
#include "common/malloc.h"
@@ -22,6 +20,10 @@ struct strlib_interface strlib_s;
struct stringbuf_interface stringbuf_s;
struct sv_interface sv_s;
+struct strlib_interface *strlib;
+struct stringbuf_interface *StrBuf;
+struct sv_interface *sv;
+
// escapes a string in-place (' -> \' , \ -> \\ , % -> _)
char* jstrescape (char* pt) {
//copy from here
@@ -117,7 +119,7 @@ int jmemescapecpy (char* pt, const char* spt, int size)
}
// Function to suppress control characters in a string.
-int remove_control_chars(char* str)
+int strlib_remove_control_chars(char *str)
{
int i;
int change = 0;
@@ -134,7 +136,7 @@ int remove_control_chars(char* str)
// Removes characters identified by ISSPACE from the start and end of the string
// NOTE: make sure the string is not const!!
-char* trim(char* str)
+char *strlib_trim(char *str)
{
size_t start;
size_t end;
@@ -162,7 +164,7 @@ char* trim(char* str)
// Converts one or more consecutive occurrences of the delimiters into a single space
// and removes such occurrences from the beginning and end of string
// NOTE: make sure the string is not const!!
-char* normalize_name(char* str,const char* delims)
+char *strlib_normalize_name(char *str, const char *delims)
{
char* in = str;
char* out = str;
@@ -200,7 +202,7 @@ char* normalize_name(char* str,const char* delims)
//stristr: Case insensitive version of strstr, code taken from
//http://www.daniweb.com/code/snippet313.html, Dave Sinkula
//
-const char* stristr(const char* haystack, const char* needle)
+const char *strlib_stristr(const char *haystack, const char *needle)
{
if ( !*needle )
{
@@ -228,8 +230,9 @@ const char* stristr(const char* haystack, const char* needle)
return 0;
}
+char* strlib_strtok_r(char *s1, const char *s2, char **lasts)
+{
#ifdef __WIN32
-char* strtok_r_(char *s1, const char *s2, char **lasts) {
char *ret;
if (s1 == NULL)
@@ -245,9 +248,13 @@ char* strtok_r_(char *s1, const char *s2, char **lasts) {
*s1++ = '\0';
*lasts = s1;
return ret;
-}
+#else
+ return strtok_r(s1, s2, lasts);
#endif
+}
+size_t strlib_strnlen(const char *string, size_t maxlen)
+{
// TODO: The _MSC_VER check can probably be removed (we no longer support VS
// versions <= 2003, do we?), but this implementation might be still necessary
// for NetBSD 5.x and possibly some Solaris versions.
@@ -255,60 +262,17 @@ char* strtok_r_(char *s1, const char *s2, char **lasts) {
/* Find the length of STRING, but scan at most MAXLEN characters.
* If no '\0' terminator is found in that many characters, return MAXLEN.
*/
-size_t strnlen(const char* string, size_t maxlen) {
const char* end = (const char*)memchr(string, '\0', maxlen);
return end ? (size_t) (end - string) : maxlen;
-}
+#else
+ return strnlen(string, maxlen);
#endif
-
-// TODO: This should probably be removed, I don't think we support MSVC++ 6.0 anymore.
-#if defined(WIN32) && defined(_MSC_VER) && _MSC_VER <= 1200
-uint64 strtoull(const char* str, char** endptr, int base)
-{
- uint64 result;
- int count;
- int n;
-
- if( base == 0 )
- {
- if( str[0] == '0' && (str[1] == 'x' || str[1] == 'X') )
- base = 16;
- else
- if( str[0] == '0' )
- base = 8;
- else
- base = 10;
- }
-
- if( base == 8 )
- count = sscanf(str, "%I64o%n", &result, &n);
- else
- if( base == 10 )
- count = sscanf(str, "%I64u%n", &result, &n);
- else
- if( base == 16 )
- count = sscanf(str, "%I64x%n", &result, &n);
- else
- count = 0; // fail
-
- if( count < 1 )
- {
- errno = EINVAL;
- result = 0;
- n = 0;
- }
-
- if( endptr )
- *endptr = (char*)str + n;
-
- return result;
}
-#endif
//----------------------------------------------------
// E-mail check: return 0 (not correct) or 1 (valid).
//----------------------------------------------------
-int e_mail_check(char* email)
+int strlib_e_mail_check(char *email)
{
char ch;
char* last_arobas;
@@ -345,7 +309,7 @@ int e_mail_check(char* email)
// Return numerical value of a switch configuration
// on/off, yes/no, true/false, number
//--------------------------------------------------
-int config_switch(const char* str) {
+int strlib_config_switch(const char *str) {
size_t len = strlen(str);
if ((len == 2 && strcmpi(str, "on") == 0)
|| (len == 3 && strcmpi(str, "yes") == 0)
@@ -365,7 +329,7 @@ int config_switch(const char* str) {
}
/// strncpy that always null-terminates the string
-char* safestrncpy(char* dst, const char* src, size_t n)
+char *strlib_safestrncpy(char *dst, const char *src, size_t n)
{
if( n > 0 )
{
@@ -386,7 +350,7 @@ char* safestrncpy(char* dst, const char* src, size_t n)
}
/// doesn't crash on null pointer
-size_t safestrnlen(const char* string, size_t maxlen)
+size_t strlib_safestrnlen(const char *string, size_t maxlen)
{
return ( string != NULL ) ? strnlen(string, maxlen) : 0;
}
@@ -400,8 +364,9 @@ size_t safestrnlen(const char* string, size_t maxlen)
/// @param fmt Format string
/// @param ... Format arguments
/// @return The size of the string or -1 if the buffer is too small
-int safesnprintf(char *buf, size_t sz, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
-int safesnprintf(char *buf, size_t sz, const char *fmt, ...) {
+int strlib_safesnprintf(char *buf, size_t sz, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
+int strlib_safesnprintf(char *buf, size_t sz, const char *fmt, ...)
+{
va_list ap;
int ret;
@@ -417,7 +382,7 @@ int safesnprintf(char *buf, size_t sz, const char *fmt, ...) {
/// Returns the line of the target position in the string.
/// Lines start at 1.
-int strline(const char* str, size_t pos)
+int strlib_strline(const char *str, size_t pos)
{
const char* target;
int line;
@@ -443,7 +408,7 @@ int strline(const char* str, size_t pos)
/// @param output Output string
/// @param input Binary input buffer
/// @param count Number of bytes to convert
-bool bin2hex(char* output, unsigned char* input, size_t count)
+bool strlib_bin2hex(char *output, unsigned char *input, size_t count)
{
char toHex[] = "0123456789abcdef";
size_t i;
@@ -1133,29 +1098,30 @@ void strlib_defaults(void) {
strlib->jstrescape = jstrescape;
strlib->jstrescapecpy = jstrescapecpy;
strlib->jmemescapecpy = jmemescapecpy;
- strlib->remove_control_chars = remove_control_chars;
- strlib->trim = trim;
- strlib->normalize_name = normalize_name;
- strlib->stristr = stristr;
+ strlib->remove_control_chars_ = strlib_remove_control_chars;
+ strlib->trim_ = strlib_trim;
+ strlib->normalize_name_ = strlib_normalize_name;
+ strlib->stristr_ = strlib_stristr;
#if !(defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) && !defined(HAVE_STRNLEN)
- strlib->strnlen = strnlen;
+ strlib->strnlen_ = strlib_strnlen;
#else
- strlib->strnlen = NULL;
+ strlib->strnlen_ = NULL;
#endif
-#if defined(WIN32) && defined(_MSC_VER) && _MSC_VER <= 1200
- strlib->strtoull = strtoull;
+#ifdef WIN32
+ strlib->strtok_r_ = strlib_strtok_r;
#else
- strlib->strtoull = NULL;
+ strlib->strtok_r_ = NULL;
#endif
- strlib->e_mail_check = e_mail_check;
- strlib->config_switch = config_switch;
- strlib->safestrncpy = safestrncpy;
- strlib->safestrnlen = safestrnlen;
- strlib->safesnprintf = safesnprintf;
- strlib->strline = strline;
- strlib->bin2hex = bin2hex;
+
+ strlib->e_mail_check_ = strlib_e_mail_check;
+ strlib->config_switch_ = strlib_config_switch;
+ strlib->safestrncpy_ = strlib_safestrncpy;
+ strlib->safestrnlen_ = strlib_safestrnlen;
+ strlib->safesnprintf_ = strlib_safesnprintf;
+ strlib->strline_ = strlib_strline;
+ strlib->bin2hex_ = strlib_bin2hex;
StrBuf->Malloc = StringBuf_Malloc;
StrBuf->Init = StringBuf_Init;
diff --git a/src/common/strlib.h b/src/common/strlib.h
index a768ebff5..cd9e105fb 100644
--- a/src/common/strlib.h
+++ b/src/common/strlib.h
@@ -5,17 +5,35 @@
#ifndef COMMON_STRLIB_H
#define COMMON_STRLIB_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include <stdarg.h>
#include <string.h>
+/// Convenience macros
+
+#define remove_control_chars(str) (strlib->remove_control_chars_(str))
+#define trim(str) (strlib->trim_(str))
+#define normalize_name(str,delims) (strlib->normalize_name_((str),(delims)))
+#define stristr(haystack,needle) (strlib->stristr_((haystack),(needle)))
+
+#if !(defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) && !defined(HAVE_STRNLEN)
+ #define strnlen(string,maxlen) (strlib->strnlen_((string),(maxlen)))
+#endif
+
#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) strlib->strtok_r_((s),(delim),(save_ptr))
#endif
+#define e_mail_check(email) (strlib->e_mail_check_(email))
+#define config_switch(str) (strlib->config_switch_(str))
+#define safestrncpy(dst,src,n) (strlib->safestrncpy_((dst),(src),(n)))
+#define safestrnlen(string,maxlen) (strlib->safestrnlen_((string),(maxlen)))
+#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)))
+
/// Bitfield determining the behavior of sv_parse and sv_split.
typedef enum e_svopt {
// default: no escapes and no line terminator
@@ -59,43 +77,41 @@ struct strlib_interface {
char *(*jstrescape) (char* pt);
char *(*jstrescapecpy) (char* pt, const char* spt);
int (*jmemescapecpy) (char* pt, const char* spt, int size);
- int (*remove_control_chars) (char* str);
- char *(*trim) (char* str);
- char *(*normalize_name) (char* str,const char* delims);
- const char *(*stristr) (const char *haystack, const char *needle);
+ int (*remove_control_chars_) (char* str);
+ char *(*trim_) (char* str);
+ char *(*normalize_name_) (char* str,const char* delims);
+ const char *(*stristr_) (const char *haystack, const char *needle);
/* only used when '!(defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) && !defined(HAVE_STRNLEN)', needs to be defined at all times however */
- size_t (*strnlen) (const char* string, size_t maxlen);
+ size_t (*strnlen_) (const char* string, size_t maxlen);
- /* only used when 'defined(WIN32) && defined(_MSC_VER) && _MSC_VER <= 1200', needs to be defined at all times however */
- uint64 (*strtoull) (const char* str, char** endptr, int base);
+ /* only used when 'WIN32' */
+ char * (*strtok_r_) (char *s1, const char *s2, char **lasts);
- int (*e_mail_check) (char* email);
- int (*config_switch) (const char* str);
+ int (*e_mail_check_) (char* email);
+ int (*config_switch_) (const char* str);
/// strncpy that always null-terminates the string
- char *(*safestrncpy) (char* dst, const char* src, size_t n);
+ char *(*safestrncpy_) (char* dst, const char* src, size_t n);
/// doesn't crash on null pointer
- size_t (*safestrnlen) (const char* string, size_t maxlen);
+ size_t (*safestrnlen_) (const char* string, size_t maxlen);
/// Works like snprintf, but always null-terminates the buffer.
/// Returns the size of the string (without null-terminator)
/// or -1 if the buffer is too small.
- int (*safesnprintf) (char *buf, size_t sz, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
+ int (*safesnprintf_) (char *buf, size_t sz, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
/// Returns the line of the target position in the string.
/// Lines start at 1.
- int (*strline) (const char* str, size_t pos);
+ int (*strline_) (const char* str, size_t pos);
/// Produces the hexadecimal representation of the given input.
/// The output buffer must be at least count*2+1 in size.
/// Returns true on success, false on failure.
- bool (*bin2hex) (char* output, unsigned char* input, size_t count);
+ bool (*bin2hex_) (char* output, unsigned char* input, size_t count);
};
-struct strlib_interface *strlib;
-
struct stringbuf_interface {
StringBuf* (*Malloc) (void);
void (*Init) (StringBuf* self);
@@ -110,8 +126,6 @@ struct stringbuf_interface {
void (*Free) (StringBuf* self);
};
-struct stringbuf_interface *StrBuf;
-
struct sv_interface {
/// Parses a single field in a delim-separated string.
/// The delimiter after the field is skipped.
@@ -154,37 +168,12 @@ struct sv_interface {
bool (*readdb) (const char* directory, const char* filename, char delim, int mincols, int maxcols, int maxrows, bool (*parseproc)(char* fields[], int columns, int current));
};
-struct sv_interface *sv;
-
#ifdef HERCULES_CORE
void strlib_defaults(void);
#endif // HERCULES_CORE
-/* the purpose of these macros is simply to not make calling them be an annoyance */
-#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)))
- #define remove_control_chars(str) (strlib->remove_control_chars(str))
- #define trim(str) (strlib->trim(str))
- #define normalize_name(str,delims) (strlib->normalize_name((str),(delims)))
- #define stristr(haystack,needle) (strlib->stristr((haystack),(needle)))
-
- #if !(defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) && !defined(HAVE_STRNLEN)
- #define strnlen(string,maxlen) (strlib->strnlen((string),(maxlen)))
- #endif
-
- #if defined(WIN32) && defined(_MSC_VER) && _MSC_VER <= 1200
- #define strtoull(str,endptr,base) (strlib->strtoull((str),(endptr),(base)))
- #endif
-
- #define e_mail_check(email) (strlib->e_mail_check(email))
- #define config_switch(str) (strlib->config_switch(str))
- #define safestrncpy(dst,src,n) (strlib->safestrncpy((dst),(src),(n)))
- #define safestrnlen(string,maxlen) (strlib->safestrnlen((string),(maxlen)))
- #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 */
+HPShared struct strlib_interface *strlib;
+HPShared struct stringbuf_interface *StrBuf;
+HPShared struct sv_interface *sv;
#endif /* COMMON_STRLIB_H */
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
index a27357e7e..d218e6e99 100644
--- a/src/common/sysinfo.c
+++ b/src/common/sysinfo.c
@@ -40,6 +40,8 @@ struct sysinfo_private {
struct sysinfo_interface sysinfo_s;
struct sysinfo_private sysinfo_p;
+struct sysinfo_interface *sysinfo;
+
#define VCSTYPE_UNKNOWN 0
#define VCSTYPE_GIT 1
#define VCSTYPE_SVN 2
@@ -197,7 +199,9 @@ enum windows_ver_suite {
#define SYSINFO_COMPILER "Microsoft Visual C++ 2012 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
#elif _MSC_VER >= 1800 && _MSC_VER < 1900
#define SYSINFO_COMPILER "Microsoft Visual C++ 2013 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
-#else // < 1300 || >= 1900
+#elif _MSC_VER >= 1900 && _MSC_VER < 2000
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2015 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#else // < 1300 || >= 2000
#define SYSINFO_COMPILER "Microsoft Visual C++ v" EXPAND_AND_QUOTE(_MSC_VER)
#endif
#else
diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h
index 3c0d01ca1..7d47398a3 100644
--- a/src/common/sysinfo.h
+++ b/src/common/sysinfo.h
@@ -11,7 +11,7 @@
* cached at compile time)
*/
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
struct sysinfo_private;
@@ -44,10 +44,10 @@ struct sysinfo_interface {
void (*final) (void);
};
-struct sysinfo_interface *sysinfo;
-
#ifdef HERCULES_CORE
void sysinfo_defaults(void);
#endif // HERCULES_CORE
+HPShared struct sysinfo_interface *sysinfo;
+
#endif /* COMMON_SYSINFO_H */
diff --git a/src/common/timer.c b/src/common/timer.c
index 06309642e..793706511 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -24,6 +24,7 @@
#include <string.h>
struct timer_interface timer_s;
+struct timer_interface *timer;
// If the server can't handle processing thousands of monsters
// or many connected clients, please increase TIMER_MIN_INTERVAL.
diff --git a/src/common/timer.h b/src/common/timer.h
index 46a036ec7..c00a4362b 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -5,7 +5,7 @@
#ifndef COMMON_TIMER_H
#define COMMON_TIMER_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#define DIFF_TICK(a,b) ((a)-(b))
#define DIFF_TICK32(a,b) ((int32)((a)-(b)))
@@ -63,10 +63,10 @@ struct timer_interface {
void (*final) (void);
};
-struct timer_interface *timer;
-
#ifdef HERCULES_CORE
void timer_defaults(void);
#endif // HERCULES_CORE
+HPShared struct timer_interface *timer;
+
#endif /* COMMON_TIMER_H */
diff --git a/src/common/utils.c b/src/common/utils.c
index 07e2e9fdf..3606c6755 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -29,6 +29,7 @@
#include <sys/stat.h> // cache purposes [Ind/Hercules]
struct HCache_interface HCache_s;
+struct HCache_interface *HCache;
/// Dumps given buffer into file pointed to by a handle.
void WriteDump(FILE* fp, const void* buffer, size_t length)
diff --git a/src/common/utils.h b/src/common/utils.h
index 0ac818468..6296f6235 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -5,7 +5,7 @@
#ifndef COMMON_UTILS_H
#define COMMON_UTILS_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include <stdio.h> // FILE*
@@ -51,6 +51,12 @@ size_t hread(void * ptr, size_t size, size_t count, FILE * stream);
size_t hwrite(const void * ptr, size_t size, size_t count, FILE * stream);
#endif // HERCULES_CORE
+#ifdef WIN32
+#define HSleep(x) Sleep(1000 * (x))
+#else // ! WIN32
+#define HSleep(x) sleep(x)
+#endif
+
/* [Ind/Hercules] Caching */
struct HCache_interface {
void (*init) (void);
@@ -62,10 +68,10 @@ struct HCache_interface {
bool enabled;
};
-struct HCache_interface *HCache;
-
#ifdef HERCULES_CORE
void HCache_defaults(void);
#endif // HERCULES_CORE
+HPShared struct HCache_interface *HCache;
+
#endif /* COMMON_UTILS_H */
diff --git a/src/login/HPMlogin.c b/src/login/HPMlogin.c
index 129f88c38..895cbad16 100644
--- a/src/login/HPMlogin.c
+++ b/src/login/HPMlogin.c
@@ -8,7 +8,6 @@
#include "common/HPM.h"
#include "common/cbasetypes.h"
-#if 0 // TODO (HPMDataCheck is disabled for the time being)
#include "login/account.h"
#include "login/login.h"
#include "common/HPMi.h"
@@ -32,7 +31,6 @@
// HPMDataCheck comes after all the other includes
#include "common/HPMDataCheck.h"
-#endif
bool HPM_login_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) {
/* record address */
@@ -44,18 +42,14 @@ bool HPM_login_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTy
}
void HPM_login_plugin_load_sub(struct hplugin *plugin) {
+ plugin->hpi->sql_handle = account_db_sql_up(login->accounts);
}
void HPM_login_do_init(void) {
-#if 0 // TODO (HPMDataCheck is disabled for the time being)
HPM->datacheck_init(HPMDataCheck, HPMDataCheckLen, HPMDataCheckVer);
-#else
- HPM->DataCheck = NULL;
-#endif
+ HPM_shared_symbols(SERVER_TYPE_LOGIN);
}
void HPM_login_do_final(void) {
-#if 0 // TODO (HPMDataCheck is disabled for the time being)
HPM->datacheck_final();
-#endif
}
diff --git a/src/login/login.c b/src/login/login.c
index bb8ba51b3..572bd594f 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -12,6 +12,7 @@
#include "login/loginlog.h"
#include "common/HPM.h"
#include "common/cbasetypes.h"
+#include "common/conf.h"
#include "common/core.h"
#include "common/db.h"
#include "common/malloc.h"
@@ -28,6 +29,7 @@
#include <stdlib.h>
struct login_interface login_s;
+struct login_interface *login;
struct Login_Config login_config;
struct mmo_char_server server[MAX_SERVERS]; // char server data
@@ -143,8 +145,7 @@ int charif_sendallwos(int sfd, uint8* buf, size_t len)
for( i = 0, c = 0; i < ARRAYLENGTH(server); ++i )
{
int fd = server[i].fd;
- if( session_isValid(fd) && fd != sfd )
- {
+ if (sockt->session_is_valid(fd) && fd != sfd) {
WFIFOHEAD(fd,len);
memcpy(WFIFOP(fd,0), buf, len);
WFIFOSET(fd,len);
@@ -171,7 +172,7 @@ void chrif_server_destroy(int id)
Assert_retv(id >= 0 && id < MAX_SERVERS);
if (server[id].fd != -1)
{
- do_close(server[id].fd);
+ sockt->close(server[id].fd);
server[id].fd = -1;
}
}
@@ -238,65 +239,17 @@ bool login_check_password(const char* md5key, int passwdenc, const char* passwd,
}
}
-//--------------------------------------------
-// Test to know if an IP come from LAN or WAN.
-//--------------------------------------------
-int login_lan_subnetcheck(uint32 ip)
-{
- int i;
- ARR_FIND( 0, login_config.subnet_count, i, (login_config.subnet[i].char_ip & login_config.subnet[i].mask) == (ip & login_config.subnet[i].mask) );
- return ( i < login_config.subnet_count ) ? login_config.subnet[i].char_ip : 0;
-}
-//----------------------------------
-// Reading LAN Support configuration
-//----------------------------------
-int login_lan_config_read(const char *lancfgName)
+/**
+ * Checks whether the given IP comes from LAN or WAN.
+ *
+ * @param ip IP address to check.
+ * @retval 0 if it is a WAN IP.
+ * @return the appropriate LAN server address to send, if it is a LAN IP.
+ */
+uint32 login_lan_subnet_check(uint32 ip)
{
- FILE *fp;
- int line_num = 0;
- char line[1024], w1[64], w2[64], w3[64], w4[64];
-
- nullpo_ret(lancfgName);
- if((fp = fopen(lancfgName, "r")) == NULL) {
- ShowWarning("LAN Support configuration file is not found: %s\n", lancfgName);
- return 1;
- }
-
- while(fgets(line, sizeof(line), fp))
- {
- line_num++;
- if ((line[0] == '/' && line[1] == '/') || line[0] == '\n' || line[1] == '\n')
- continue;
-
- if (sscanf(line, "%63[^:]: %63[^:]:%63[^:]:%63[^\r\n]", w1, w2, w3, w4) != 4) {
- ShowWarning("Error syntax of configuration file %s in line %d.\n", lancfgName, line_num);
- continue;
- }
-
- if( strcmpi(w1, "subnet") == 0 )
- {
- login_config.subnet[login_config.subnet_count].mask = str2ip(w2);
- login_config.subnet[login_config.subnet_count].char_ip = str2ip(w3);
- login_config.subnet[login_config.subnet_count].map_ip = str2ip(w4);
-
- if( (login_config.subnet[login_config.subnet_count].char_ip
- & login_config.subnet[login_config.subnet_count].mask) != (login_config.subnet[login_config.subnet_count].map_ip
- & login_config.subnet[login_config.subnet_count].mask) )
- {
- ShowError("%s: Configuration Error: The char server (%s) and map server (%s) belong to different subnetworks!\n", lancfgName, w3, w4);
- continue;
- }
-
- login_config.subnet_count++;
- }
- }
-
- if( login_config.subnet_count > 1 ) /* only useful if there is more than 1 available */
- ShowStatus("Read information about %d subnetworks.\n", login_config.subnet_count);
-
- fclose(fp);
- return 0;
+ return sockt->lan_subnet_check(ip, NULL);
}
void login_fromchar_auth_ack(int fd, int account_id, uint32 login_id1, uint32 login_id2, uint8 sex, int request_id, struct login_auth_node* node)
@@ -341,7 +294,7 @@ void login_fromchar_parse_auth(int fd, int id, const char *const ip)
RFIFOSKIP(fd,23);
node = (struct login_auth_node*)idb_get(login->auth_db, account_id);
- if( runflag == LOGINSERVER_ST_RUNNING &&
+ if( core->runflag == LOGINSERVER_ST_RUNNING &&
node != NULL &&
node->account_id == account_id &&
node->login_id1 == login_id1 &&
@@ -750,7 +703,7 @@ bool login_fromchar_parse_wrong_pincode(int fd)
return true;
}
- login_log(host2ip(acc.last_ip), acc.userid, 100, "PIN Code check failed"); // FIXME: Do we really want to log this with the same code as successful logins?
+ login_log(sockt->host2ip(acc.last_ip), acc.userid, 100, "PIN Code check failed"); // FIXME: Do we really want to log this with the same code as successful logins?
}
login->remove_online_user(acc.account_id);
@@ -823,21 +776,21 @@ int login_parse_fromchar(int fd)
if( id == ARRAYLENGTH(server) )
{// not a char server
ShowDebug("login_parse_fromchar: Disconnecting invalid session #%d (is not a char-server)\n", fd);
- set_eof(fd);
- do_close(fd);
+ sockt->eof(fd);
+ sockt->close(fd);
return 0;
}
- if( session[fd]->flag.eof )
+ if( sockt->session[fd]->flag.eof )
{
- do_close(fd);
+ sockt->close(fd);
server[id].fd = -1;
chrif_on_disconnect(id);
return 0;
}
ipl = server[id].ip;
- ip2str(ipl, ip);
+ sockt->ip2str(ipl, ip);
while( RFIFOREST(fd) >= 2 ) {
uint16 command = RFIFOW(fd,0);
@@ -1001,7 +954,7 @@ int login_parse_fromchar(int fd)
break;
default:
ShowError("login_parse_fromchar: Unknown packet 0x%x from a char-server! Disconnecting!\n", command);
- set_eof(fd);
+ sockt->eof(fd);
return 0;
} // switch
} // while
@@ -1081,20 +1034,20 @@ int login_mmo_auth(struct login_session_data* sd, bool isServer) {
char ip[16];
nullpo_ret(sd);
- ip2str(session[sd->fd]->client_addr, ip);
+ sockt->ip2str(sockt->session[sd->fd]->client_addr, ip);
// DNS Blacklist check
if( login_config.use_dnsbl ) {
char r_ip[16];
char ip_dnsbl[256];
char* dnsbl_serv;
- uint8* sin_addr = (uint8*)&session[sd->fd]->client_addr;
+ uint8* sin_addr = (uint8*)&sockt->session[sd->fd]->client_addr;
sprintf(r_ip, "%u.%u.%u.%u", sin_addr[0], sin_addr[1], sin_addr[2], sin_addr[3]);
for( dnsbl_serv = strtok(login_config.dnsbl_servs,","); dnsbl_serv != NULL; dnsbl_serv = strtok(NULL,",") ) {
sprintf(ip_dnsbl, "%s.%s", r_ip, trim(dnsbl_serv));
- if( host2ip(ip_dnsbl) ) {
+ if (sockt->host2ip(ip_dnsbl)) {
ShowInfo("DNSBL: (%s) Blacklisted. User Kicked.\n", r_ip);
return 3;
}
@@ -1233,14 +1186,13 @@ void login_auth_ok(struct login_session_data* sd)
int fd = 0;
uint32 ip;
uint8 server_num, n;
- uint32 subnet_char_ip;
struct login_auth_node* node;
int i;
nullpo_retv(sd);
fd = sd->fd;
- ip = session[fd]->client_addr;
- if( runflag != LOGINSERVER_ST_RUNNING )
+ ip = sockt->session[fd]->client_addr;
+ if( core->runflag != LOGINSERVER_ST_RUNNING )
{
// players can only login while running
login->connection_problem(fd, 1); // 01 = server closed
@@ -1259,7 +1211,7 @@ void login_auth_ok(struct login_session_data* sd)
server_num = 0;
for( i = 0; i < ARRAYLENGTH(server); ++i )
- if( session_isActive(server[i].fd) )
+ if (sockt->session_is_active(server[i].fd))
server_num++;
if( server_num == 0 )
@@ -1308,14 +1260,15 @@ void login_auth_ok(struct login_session_data* sd)
memset(WFIFOP(fd,20), 0, 24);
WFIFOW(fd,44) = 0; // unknown
WFIFOB(fd,46) = sex_str2num(sd->sex);
- for( i = 0, n = 0; i < ARRAYLENGTH(server); ++i )
- {
- if( !session_isValid(server[i].fd) )
+ for (i = 0, n = 0; i < ARRAYLENGTH(server); ++i) {
+ uint32 subnet_char_ip;
+
+ if (!sockt->session_is_valid(server[i].fd))
continue;
- subnet_char_ip = login->lan_subnetcheck(ip); // Advanced subnet check [LuzZza]
+ subnet_char_ip = login->lan_subnet_check(ip);
WFIFOL(fd,47+n*32) = htonl((subnet_char_ip) ? subnet_char_ip : server[i].ip);
- WFIFOW(fd,47+n*32+4) = ntows(htons(server[i].port)); // [!] LE byte order here [!]
+ WFIFOW(fd,47+n*32+4) = sockt->ntows(htons(server[i].port)); // [!] LE byte order here [!]
memcpy(WFIFOP(fd,47+n*32+6), server[i].name, 20);
WFIFOW(fd,47+n*32+26) = server[i].users;
@@ -1360,7 +1313,7 @@ void login_auth_failed(struct login_session_data* sd, int result)
nullpo_retv(sd);
fd = sd->fd;
- ip = session[fd]->client_addr;
+ ip = sockt->session[fd]->client_addr;
if (login_config.log_login)
{
const char* error;
@@ -1393,7 +1346,7 @@ void login_auth_failed(struct login_session_data* sd, int result)
login_log(ip, sd->userid, result, error); // FIXME: result can be 100, conflicting with the value 100 we use for successful login...
}
- if( result == 1 && login_config.dynamic_pass_failure_ban )
+ if (result == 1 && login_config.dynamic_pass_failure_ban && !sockt->trusted_ip_check(ip))
ipban_log(ip); // log failed password attempt
#if PACKETVER >= 20120000 /* not sure when this started */
@@ -1555,8 +1508,8 @@ void login_char_server_connection_status(int fd, struct login_session_data* sd,
WFIFOSET(fd,3);
}
-void login_parse_request_connection(int fd, struct login_session_data* sd, const char *const ip) __attribute__((nonnull (2, 3)));
-void login_parse_request_connection(int fd, struct login_session_data* sd, const char *const ip)
+void login_parse_request_connection(int fd, struct login_session_data* sd, const char *const ip, uint32 ipl) __attribute__((nonnull (2, 3)));
+void login_parse_request_connection(int fd, struct login_session_data* sd, const char *const ip, uint32 ipl)
{
char server_name[20];
char message[256];
@@ -1581,14 +1534,16 @@ void login_parse_request_connection(int fd, struct login_session_data* sd, const
ShowInfo("Connection request of the char-server '%s' @ %u.%u.%u.%u:%u (account: '%s', pass: '%s', ip: '%s')\n", server_name, CONVIP(server_ip), server_port, sd->userid, sd->passwd, ip);
sprintf(message, "charserver - %s@%u.%u.%u.%u:%u", server_name, CONVIP(server_ip), server_port);
- login_log(session[fd]->client_addr, sd->userid, 100, message);
+ login_log(sockt->session[fd]->client_addr, sd->userid, 100, message);
result = login->mmo_auth(sd, true);
- if( runflag == LOGINSERVER_ST_RUNNING &&
+ if (core->runflag == LOGINSERVER_ST_RUNNING &&
result == -1 &&
sd->sex == 'S' &&
- sd->account_id >= 0 && sd->account_id < ARRAYLENGTH(server) &&
- !session_isValid(server[sd->account_id].fd) )
+ sd->account_id >= 0 &&
+ sd->account_id < ARRAYLENGTH(server) &&
+ !sockt->session_is_valid(server[sd->account_id].fd) &&
+ sockt->allowed_ip_check(ipl))
{
ShowStatus("Connection of the char-server '%s' accepted.\n", server_name);
safestrncpy(server[sd->account_id].name, server_name, sizeof(server[sd->account_id].name));
@@ -1599,9 +1554,9 @@ void login_parse_request_connection(int fd, struct login_session_data* sd, const
server[sd->account_id].type = type;
server[sd->account_id].new_ = new_;
- session[fd]->func_parse = login->parse_fromchar;
- session[fd]->flag.server = 1;
- realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
+ sockt->session[fd]->func_parse = login->parse_fromchar;
+ sockt->session[fd]->flag.server = 1;
+ sockt->realloc_fifo(fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
// send connection success
login->char_server_connection_status(fd, sd, 0);
@@ -1618,35 +1573,35 @@ void login_parse_request_connection(int fd, struct login_session_data* sd, const
//----------------------------------------------------------------------------------------
int login_parse_login(int fd)
{
- struct login_session_data* sd = (struct login_session_data*)session[fd]->session_data;
+ struct login_session_data* sd = (struct login_session_data*)sockt->session[fd]->session_data;
int result;
char ip[16];
- uint32 ipl = session[fd]->client_addr;
- ip2str(ipl, ip);
+ uint32 ipl = sockt->session[fd]->client_addr;
+ sockt->ip2str(ipl, ip);
- if( session[fd]->flag.eof )
+ if( sockt->session[fd]->flag.eof )
{
ShowInfo("Closed connection from '"CL_WHITE"%s"CL_RESET"'.\n", ip);
- do_close(fd);
+ sockt->close(fd);
return 0;
}
if( sd == NULL )
{
// Perform ip-ban check
- if( login_config.ipban && ipban_check(ipl) )
+ if (login_config.ipban && !sockt->trusted_ip_check(ipl) && ipban_check(ipl))
{
ShowStatus("Connection refused: IP isn't authorized (deny/allow, ip: %s).\n", ip);
login_log(ipl, "unknown", -3, "ip banned");
login->login_error(fd, 3); // 3 = Rejected from Server
- set_eof(fd);
+ sockt->eof(fd);
return 0;
}
// create a session for this new connection
- CREATE(session[fd]->session_data, struct login_session_data, 1);
- sd = (struct login_session_data*)session[fd]->session_data;
+ CREATE(sockt->session[fd]->session_data, struct login_session_data, 1);
+ sd = (struct login_session_data*)sockt->session[fd]->session_data;
sd->fd = fd;
}
@@ -1714,13 +1669,13 @@ int login_parse_login(int fd)
if (RFIFOREST(fd) < 86)
return 0;
{
- login->parse_request_connection(fd, sd, ip);
+ login->parse_request_connection(fd, sd, ip, ipl);
}
return 0; // processing will continue elsewhere
default:
ShowNotice("Abnormal end of connection (ip: %s): Unknown packet 0x%x\n", ip, command);
- set_eof(fd);
+ sockt->eof(fd);
return 0;
}
}
@@ -1757,7 +1712,6 @@ void login_set_defaults()
login_config.client_hash_check = 0;
login_config.client_hash_nodes = NULL;
- login_config.subnet_count = 0;
}
//-----------------------------------
@@ -1781,19 +1735,19 @@ int login_config_read(const char* cfgName)
continue;
if(!strcmpi(w1,"timestamp_format"))
- safestrncpy(timestamp_format, w2, 20);
+ safestrncpy(showmsg->timestamp_format, w2, 20);
else if(!strcmpi(w1,"stdout_with_ansisequence"))
- stdout_with_ansisequence = config_switch(w2);
+ showmsg->stdout_with_ansisequence = config_switch(w2) ? true : false;
else if(!strcmpi(w1,"console_silent")) {
- msg_silent = atoi(w2);
- if( msg_silent ) /* only bother if we actually have this enabled */
+ showmsg->silent = atoi(w2);
+ if (showmsg->silent) /* only bother if we actually have this enabled */
ShowInfo("Console Silent Setting: %d\n", atoi(w2));
}
else if( !strcmpi(w1, "bind_ip") ) {
- login_config.login_ip = host2ip(w2);
+ login_config.login_ip = sockt->host2ip(w2);
if( login_config.login_ip ) {
char ip_str[16];
- ShowStatus("Login server binding IP address : %s -> %s\n", w2, ip2str(login_config.login_ip, ip_str));
+ ShowStatus("Login server binding IP address : %s -> %s\n", w2, sockt->ip2str(login_config.login_ip, ip_str));
}
}
else if( !strcmpi(w1, "login_port") ) {
@@ -1920,14 +1874,14 @@ int do_final(void) {
if( login->fd != -1 )
{
- do_close(login->fd);
+ sockt->close(login->fd);
login->fd = -1;
}
HPM_login_do_final();
aFree(login->LOGIN_CONF_NAME);
- aFree(login->LAN_CONF_NAME);
+ aFree(login->NET_CONF_NAME);
HPM->event(HPET_POST_FINAL);
@@ -1951,24 +1905,19 @@ void set_server_type(void) {
/// Called when a terminate signal is received.
void do_shutdown_login(void)
{
- if( runflag != LOGINSERVER_ST_SHUTDOWN )
+ if( core->runflag != LOGINSERVER_ST_SHUTDOWN )
{
int id;
- runflag = LOGINSERVER_ST_SHUTDOWN;
+ core->runflag = LOGINSERVER_ST_SHUTDOWN;
ShowStatus("Shutting down...\n");
// TODO proper shutdown procedure; kick all characters, wait for acks, ... [FlavioJS]
for( id = 0; id < ARRAYLENGTH(server); ++id )
chrif_server_reset(id);
- flush_fifos();
- runflag = CORE_ST_STOP;
+ sockt->flush_fifos();
+ core->runflag = CORE_ST_STOP;
}
}
-void login_hp_symbols(void) {
- HPM->share(account_db_sql_up(accounts),"sql_handle");
- HPM->share(login,"login");
-}
-
/**
* --login-config handler
*
@@ -1982,15 +1931,15 @@ static CMDLINEARG(loginconfig)
return true;
}
/**
- * --lan-config handler
+ * --net-config handler
*
* Overrides the default subnet configuration file.
* @see cmdline->exec
*/
-static CMDLINEARG(lanconfig)
+static CMDLINEARG(netconfig)
{
- aFree(login->LAN_CONF_NAME);
- login->LAN_CONF_NAME = aStrdup(params);
+ aFree(login->NET_CONF_NAME);
+ login->NET_CONF_NAME = aStrdup(params);
return true;
}
/**
@@ -1999,7 +1948,7 @@ static CMDLINEARG(lanconfig)
void cmdline_args_init_local(void)
{
CMDLINEARG_DEF2(login-config, loginconfig, "Alternative login-server configuration.", CMDLINE_OPT_PARAM);
- CMDLINEARG_DEF2(lan-config, lanconfig, "Alternative subnet configuration.", CMDLINE_OPT_PARAM);
+ CMDLINEARG_DEF2(net-config, netconfig, "Alternative subnet configuration.", CMDLINE_OPT_PARAM);
}
//------------------------------
@@ -2023,17 +1972,16 @@ int do_init(int argc, char** argv)
login_set_defaults();
login->LOGIN_CONF_NAME = aStrdup("conf/login-server.conf");
- login->LAN_CONF_NAME = aStrdup("conf/subnet.conf");
+ login->NET_CONF_NAME = aStrdup("conf/network.conf");
HPM_login_do_init();
- HPM->symbol_defaults_sub = login_hp_symbols;
cmdline->exec(argc, argv, CMDLINE_OPT_PREINIT);
HPM->config_read();
HPM->event(HPET_PRE_INIT);
cmdline->exec(argc, argv, CMDLINE_OPT_NORMAL);
login_config_read(login->LOGIN_CONF_NAME);
- login->lan_config_read(login->LAN_CONF_NAME);
+ sockt->net_config_read(login->NET_CONF_NAME);
for( i = 0; i < ARRAYLENGTH(server); ++i )
chrif_server_init(i);
@@ -2053,7 +2001,7 @@ int do_init(int argc, char** argv)
login->auth_db = idb_alloc(DB_OPT_RELEASE_DATA);
// set default parser as login_parse_login function
- set_defaultparse(login->parse_login);
+ sockt->set_defaultparse(login->parse_login);
// every 10 minutes cleanup online account db.
timer->add_func_list(login->online_data_cleanup, "login->online_data_cleanup");
@@ -2074,14 +2022,14 @@ int do_init(int argc, char** argv)
HPM->event(HPET_INIT);
// server port open & binding
- if( (login->fd = make_listen_bind(login_config.login_ip,login_config.login_port)) == -1 ) {
+ if ((login->fd = sockt->make_listen_bind(login_config.login_ip,login_config.login_port)) == -1) {
ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",login_config.login_port);
exit(EXIT_FAILURE);
}
- if( runflag != CORE_ST_STOP ) {
- shutdown_callback = do_shutdown_login;
- runflag = LOGINSERVER_ST_RUNNING;
+ if( core->runflag != CORE_ST_STOP ) {
+ core->shutdown_callback = do_shutdown_login;
+ core->runflag = LOGINSERVER_ST_RUNNING;
}
ShowStatus("The login-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %u).\n\n", login_config.login_port);
@@ -2110,8 +2058,7 @@ void login_defaults(void) {
login->sync_ip_addresses = login_sync_ip_addresses;
login->check_encrypted = login_check_encrypted;
login->check_password = login_check_password;
- login->lan_subnetcheck = login_lan_subnetcheck;
- login->lan_config_read = login_lan_config_read;
+ login->lan_subnet_check = login_lan_subnet_check;
login->fromchar_auth_ack = login_fromchar_auth_ack;
login->fromchar_accinfo = login_fromchar_accinfo;
@@ -2157,5 +2104,5 @@ void login_defaults(void) {
login->send_coding_key = login_send_coding_key;
login->LOGIN_CONF_NAME = NULL;
- login->LAN_CONF_NAME = NULL;
+ login->NET_CONF_NAME = NULL;
}
diff --git a/src/login/login.h b/src/login/login.h
index f05ff6d0f..40a8237d8 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -5,7 +5,7 @@
#ifndef LOGIN_LOGIN_H
#define LOGIN_LOGIN_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/core.h" // CORE_ST_LAST
#include "common/db.h"
#include "common/mmo.h" // NAME_LENGTH,SEX_*
@@ -101,14 +101,6 @@ struct Login_Config {
int client_hash_check; ///< flags for checking client md5
struct client_hash_node *client_hash_nodes; ///< linked list containg md5 hash for each gm group
-
- /// Advanced subnet check [LuzZza]
- struct s_subnet {
- uint32 mask;
- uint32 char_ip;
- uint32 map_ip;
- } subnet[16];
- int subnet_count;
};
struct login_auth_node {
@@ -136,10 +128,6 @@ struct online_login_data {
#define sex_str2num(str) ( ((str) == 'F') ? SEX_FEMALE : ((str) == 'M') ? SEX_MALE : SEX_SERVER )
#define MAX_SERVERS 30
-#ifdef HERCULES_CORE
-extern struct mmo_char_server server[MAX_SERVERS];
-extern struct Login_Config login_config;
-#endif // HERCULES_CORE
/**
* Login.c Interface
@@ -163,8 +151,7 @@ struct login_interface {
int (*sync_ip_addresses) (int tid, int64 tick, int id, intptr_t data);
bool (*check_encrypted) (const char* str1, const char* str2, const char* passwd);
bool (*check_password) (const char* md5key, int passwdenc, const char* passwd, const char* refpass);
- int (*lan_subnetcheck) (uint32 ip);
- int (*lan_config_read) (const char *lancfgName);
+ uint32 (*lan_subnet_check) (uint32 ip);
void (*fromchar_accinfo) (int fd, int account_id, int u_fd, int u_aid, int u_group, int map_fd, struct mmo_account *acc);
void (*fromchar_account) (int fd, int account_id, struct mmo_account *acc);
void (*fromchar_account_update_other) (int account_id, unsigned int state);
@@ -204,16 +191,19 @@ struct login_interface {
void (*send_coding_key) (int fd, struct login_session_data* sd);
void (*parse_request_coding_key) (int fd, struct login_session_data* sd);
void (*char_server_connection_status) (int fd, struct login_session_data* sd, uint8 status);
- void (*parse_request_connection) (int fd, struct login_session_data* sd, const char *ip);
+ void (*parse_request_connection) (int fd, struct login_session_data* sd, const char *ip, uint32 ipl);
int (*parse_login) (int fd);
char *LOGIN_CONF_NAME;
- char *LAN_CONF_NAME;
+ char *NET_CONF_NAME; ///< Network configuration filename
};
-struct login_interface *login;
-
#ifdef HERCULES_CORE
+extern struct mmo_char_server server[MAX_SERVERS];
+extern struct Login_Config login_config;
+
void login_defaults(void);
#endif // HERCULES_CORE
+HPShared struct login_interface *login;
+
#endif /* LOGIN_LOGIN_H */
diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c
index da698e187..d26d910de 100644
--- a/src/login/loginlog_sql.c
+++ b/src/login/loginlog_sql.c
@@ -44,7 +44,7 @@ unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes)
return 0;
if( SQL_ERROR == SQL->Query(sql_handle, "SELECT count(*) FROM `%s` WHERE `ip` = '%s' AND `rcode` = '1' AND `time` > NOW() - INTERVAL %d MINUTE",
- log_login_db, ip2str(ip,NULL), minutes) )// how many times failed account? in one ip.
+ log_login_db, sockt->ip2str(ip,NULL), minutes) )// how many times failed account? in one ip.
Sql_ShowDebug(sql_handle);
if( SQL_SUCCESS == SQL->NextRow(sql_handle) )
@@ -78,7 +78,7 @@ void login_log(uint32 ip, const char* username, int rcode, const char* message)
retcode = SQL->Query(sql_handle,
"INSERT INTO `%s`(`time`,`ip`,`user`,`rcode`,`log`) VALUES (NOW(), '%s', '%s', '%d', '%s')",
- log_login_db, ip2str(ip,NULL), esc_username, rcode, esc_message);
+ log_login_db, sockt->ip2str(ip,NULL), esc_username, rcode, esc_message);
if( retcode != SQL_SUCCESS )
Sql_ShowDebug(sql_handle);
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c
index 7600d3d0c..a59fbb6ef 100644
--- a/src/map/HPMmap.c
+++ b/src/map/HPMmap.c
@@ -135,9 +135,10 @@ bool HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataType
}
void HPM_map_plugin_load_sub(struct hplugin *plugin) {
- plugin->hpi->addCommand = HPM->import_symbol("addCommand",plugin->idx);
- plugin->hpi->addScript = HPM->import_symbol("addScript",plugin->idx);
- plugin->hpi->addPCGPermission = HPM->import_symbol("addGroupPermission",plugin->idx);
+ plugin->hpi->sql_handle = map->mysql_handle;
+ plugin->hpi->addCommand = atcommand->create;
+ plugin->hpi->addScript = script->addScript;
+ plugin->hpi->addPCGPermission = HPM_map_add_group_permission;
}
bool HPM_map_add_atcommand(char *name, AtCommandFunc func) {
@@ -185,6 +186,7 @@ void HPM_map_do_init(void) {
HPM->load_sub = HPM_map_plugin_load_sub;
HPM->grabHPDataSub = HPM_map_grabHPData;
HPM->datacheck_init(HPMDataCheck, HPMDataCheckLen, HPMDataCheckVer);
+ HPM_shared_symbols(SERVER_TYPE_MAP);
}
void HPM_map_do_final(void) {
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 2be990025..95db0c2e6 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -58,6 +58,7 @@
#include <string.h>
struct atcommand_interface atcommand_s;
+struct atcommand_interface *atcommand;
static char atcmd_output[CHAT_SIZE_MAX];
static char atcmd_player_name[NAME_LENGTH];
@@ -83,7 +84,7 @@ const char* atcommand_msgsd(struct map_session_data *sd, int msg_number) {
}
const char* atcommand_msgfd(int fd, int msg_number) {
- struct map_session_data *sd = session_isValid(fd) ? session[fd]->session_data : NULL;
+ struct map_session_data *sd = sockt->session_is_valid(fd) ? sockt->session[fd]->session_data : NULL;
if( !(msg_number >= 0 && msg_number < MAX_MSG) )
return "??";
if( !sd || sd->lang_id >= atcommand->max_message_table || !atcommand->msg_table[sd->lang_id][msg_number] )
@@ -3676,7 +3677,7 @@ ACMD(reloadscript) {
}
mapit->free(iter);
- flush_fifos();
+ sockt->flush_fifos();
map->reloadnpc(true); // reload config files seeking for npcs
script->reload();
npc->reload();
@@ -5244,11 +5245,11 @@ ACMD(skillid) {
for (data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key)) {
int idx = skill->get_index(DB->data2i(data));
- if (strnicmp(key.str, message, skillen) == 0 || strnicmp(skill->db[idx].desc, message, skillen) == 0) {
- sprintf(atcmd_output, msg_fd(fd,1164), DB->data2i(data), skill->db[idx].desc, key.str); // skill %d: %s (%s)
+ if (strnicmp(key.str, message, skillen) == 0 || strnicmp(skill->dbs->db[idx].desc, message, skillen) == 0) {
+ sprintf(atcmd_output, msg_fd(fd,1164), DB->data2i(data), skill->dbs->db[idx].desc, key.str); // skill %d: %s (%s)
clif->message(fd, atcmd_output);
- } else if ( found < MAX_SKILLID_PARTIAL_RESULTS && ( stristr(key.str,message) || stristr(skill->db[idx].desc,message) ) ) {
- snprintf(partials[found], MAX_SKILLID_PARTIAL_RESULTS_LEN, msg_fd(fd,1164), DB->data2i(data), skill->db[idx].desc, key.str);
+ } else if ( found < MAX_SKILLID_PARTIAL_RESULTS && ( stristr(key.str,message) || stristr(skill->dbs->db[idx].desc,message) ) ) {
+ snprintf(partials[found], MAX_SKILLID_PARTIAL_RESULTS_LEN, msg_fd(fd,1164), DB->data2i(data), skill->dbs->db[idx].desc, key.str);
found++;
}
}
@@ -5376,7 +5377,7 @@ ACMD(skilltree) {
{
if( ent->need[j].id && pc->checkskill(sd,ent->need[j].id) < ent->need[j].lv)
{
- sprintf(atcmd_output, msg_fd(fd,1170), ent->need[j].lv, skill->db[ent->need[j].id].desc); // Player requires level %d of skill %s.
+ sprintf(atcmd_output, msg_fd(fd,1170), ent->need[j].lv, skill->dbs->db[ent->need[j].id].desc); // Player requires level %d of skill %s.
clif->message(fd, atcmd_output);
meets = 0;
}
@@ -9306,7 +9307,7 @@ ACMD(cddebug) {
const struct TimerData *td = timer->get(cd->entry[i]->timer);
if( !td || td->func != skill->blockpc_end ) {
- clif->messages(fd,"Found invalid entry in slot %d for skill %s",i,skill->db[cd->entry[i]->skidx].name);
+ clif->messages(fd,"Found invalid entry in slot %d for skill %s",i,skill->dbs->db[cd->entry[i]->skidx].name);
sd->blockskill[cd->entry[i]->skidx] = false;
}
}
@@ -9316,7 +9317,7 @@ ACMD(cddebug) {
if( !cd || (message && *message && !strcmpi(message,"reset")) ) {
for(i = 0; i < MAX_SKILL; i++) {
if( sd->blockskill[i] ) {
- clif->messages(fd,"Found skill '%s', unblocking...",skill->db[i].name);
+ clif->messages(fd,"Found skill '%s', unblocking...",skill->dbs->db[i].name);
sd->blockskill[i] = false;
}
}
@@ -10199,7 +10200,7 @@ bool atcommand_can_use2(struct map_session_data *sd, const char *command, AtComm
bool atcommand_hp_add(char *name, AtCommandFunc func) {
/* if commands are added after group permissions are thrown in, they end up with no permissions */
/* so we restrict commands to be linked in during boot */
- if( runflag == MAPSERVER_ST_RUNNING ) {
+ if( core->runflag == MAPSERVER_ST_RUNNING ) {
ShowDebug("atcommand_hp_add: Commands can't be added after server is ready, skipping '%s'...\n",name);
return false;
}
@@ -10231,7 +10232,7 @@ void atcommand_db_clear(void) {
}
void atcommand_doload(void) {
- if( runflag >= MAPSERVER_ST_RUNNING )
+ if( core->runflag >= MAPSERVER_ST_RUNNING )
atcommand->cmd_db_clear();
if( atcommand->db == NULL )
atcommand->db = stridb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, ATCOMMAND_LENGTH);
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 88ddde8c2..ccc7d3725 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -6,7 +6,7 @@
#define MAP_ATCOMMAND_H
#include "map/pc_groups.h"
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/conf.h"
#include "common/db.h"
@@ -127,12 +127,12 @@ struct atcommand_interface {
const char* (*msgsd) (struct map_session_data *sd, int msg_number);
};
-struct atcommand_interface *atcommand;
-
#ifdef HERCULES_CORE
void atcommand_defaults(void);
#endif // HERCULES_CORE
+HPShared struct atcommand_interface *atcommand;
+
/* 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)
diff --git a/src/map/battle.c b/src/map/battle.c
index 3575dea6f..671d63200 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -43,6 +43,7 @@
struct Battle_Config battle_config;
struct battle_interface battle_s;
+struct battle_interface *battle;
int battle_getcurrentskill(struct block_list *bl) { //Returns the current/last skill in use by this bl.
struct unit_data *ud;
@@ -6532,7 +6533,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
) {
if( t_bl->type == BL_PC && (sd->duel_group == ((TBL_PC*)t_bl)->duel_group) )
return (BCT_ENEMY&flag)?1:-1; // Duel targets can ONLY be your enemy, nothing else.
- else if ( src->type != BL_SKILL || (flag&BCT_ENEMY) )
+ else if (src->type != BL_SKILL || (flag&BCT_ALL) != BCT_ALL)
return 0;
}
}
diff --git a/src/map/battle.h b/src/map/battle.h
index 6bc2659b9..b211afff5 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -6,7 +6,7 @@
#define MAP_BATTLE_H
#include "map/map.h" //ELE_MAX
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
/**
* Declarations
@@ -509,10 +509,6 @@ struct Battle_Config {
int feature_roulette;
};
-#ifdef HERCULES_CORE
-extern struct Battle_Config battle_config;
-#endif // HERCULES_CORE
-
/* criteria for battle_config.idletime_critera */
enum e_battle_config_idletime {
BCIDLE_WALK = 0x001,
@@ -643,10 +639,12 @@ struct battle_interface {
void (*calc_misc_attack_unknown) (struct block_list *src, struct block_list *target, uint16 *skill_id, uint16 *skill_lv, int *mflag, struct Damage *md);
};
-struct battle_interface *battle;
-
#ifdef HERCULES_CORE
+extern struct Battle_Config battle_config;
+
void battle_defaults(void);
#endif // HERCULES_CORE
+HPShared struct battle_interface *battle;
+
#endif /* MAP_BATTLE_H */
diff --git a/src/map/battleground.c b/src/map/battleground.c
index 0fe42110f..915ccc851 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -32,6 +32,7 @@
#include <string.h>
struct battleground_interface bg_s;
+struct battleground_interface *bg;
/// Search a BG Team using bg_id
struct battleground_data* bg_team_search(int bg_id) {
diff --git a/src/map/battleground.h b/src/map/battleground.h
index a67deb722..094037f43 100644
--- a/src/map/battleground.h
+++ b/src/map/battleground.h
@@ -6,7 +6,7 @@
#define MAP_BATTLEGROUND_H
#include "map/map.h" // EVENT_NAME_LENGTH
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
#include "common/mmo.h" // struct party
@@ -127,10 +127,10 @@ struct battleground_interface {
void (*config_read) (void);
};
-struct battleground_interface *bg;
-
#ifdef HERCULES_CORE
void battleground_defaults(void);
#endif // HERCULES_CORE
+HPShared struct battleground_interface *bg;
+
#endif /* MAP_BATTLEGROUND_H */
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c
index d1ce4ba0d..a1b6e9e65 100644
--- a/src/map/buyingstore.c
+++ b/src/map/buyingstore.c
@@ -19,6 +19,7 @@
#include "common/strlib.h" // safestrncpy
struct buyingstore_interface buyingstore_s;
+struct buyingstore_interface *buyingstore;
/// Returns unique buying store id
unsigned int buyingstore_getuid(void) {
diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h
index f23790459..74f61239f 100644
--- a/src/map/buyingstore.h
+++ b/src/map/buyingstore.h
@@ -5,7 +5,7 @@
#ifndef MAP_BUYINGSTORE_H
#define MAP_BUYINGSTORE_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/mmo.h" // MAX_SLOTS
struct map_session_data;
@@ -71,10 +71,10 @@ struct buyingstore_interface {
unsigned int (*getuid) (void);
};
-struct buyingstore_interface *buyingstore;
-
#ifdef HERCULES_CORE
void buyingstore_defaults (void);
#endif // HERCULES_CORE
+HPShared struct buyingstore_interface *buyingstore;
+
#endif // MAP_BUYINGSTORE_H
diff --git a/src/map/channel.c b/src/map/channel.c
index 69f7ab872..337d05504 100644
--- a/src/map/channel.c
+++ b/src/map/channel.c
@@ -28,6 +28,7 @@
#include <string.h>
struct channel_interface channel_s;
+struct channel_interface *channel;
static struct Channel_Config channel_config;
@@ -301,7 +302,7 @@ void channel_join_sub(struct channel_data *chan, struct map_session_data *sd, bo
/* someone is cheating, we kindly disconnect the bastard */
if (sd->channel_count > 200) {
- set_eof(sd->fd);
+ sockt->eof(sd->fd);
}
}
diff --git a/src/map/channel.h b/src/map/channel.h
index de1779d96..391045c59 100644
--- a/src/map/channel.h
+++ b/src/map/channel.h
@@ -4,7 +4,7 @@
#ifndef MAP_CHANNEL_H
#define MAP_CHANNEL_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
#include "common/mmo.h"
@@ -109,10 +109,10 @@ struct channel_interface {
void (*config_read) (void);
};
-struct channel_interface *channel;
-
#ifdef HERCULES_CORE
void channel_defaults(void);
#endif // HERCULES_CORE
+HPShared struct channel_interface *channel;
+
#endif /* MAP_CHANNEL_H */
diff --git a/src/map/chat.c b/src/map/chat.c
index 08c904290..ed9d9c598 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -24,6 +24,7 @@
#include <string.h>
struct chat_interface chat_s;
+struct chat_interface *chat;
/// Initializes a chatroom object (common functionality for both pc and npc chatrooms).
/// Returns a chatroom object on success, or NULL on failure.
diff --git a/src/map/chat.h b/src/map/chat.h
index 31048d5dd..68f9107f3 100644
--- a/src/map/chat.h
+++ b/src/map/chat.h
@@ -6,7 +6,7 @@
#define MAP_CHAT_H
#include "map/map.h" // struct block_list, CHATROOM_TITLE_SIZE
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
struct chat_data;
@@ -55,10 +55,10 @@ struct chat_interface {
struct chat_data* (*create) (struct block_list* bl, const char* title, const char* pass, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl);
};
-struct chat_interface *chat;
-
#ifdef HERCULES_CORE
void chat_defaults(void);
#endif // HERCULES_CORE
+HPShared struct chat_interface *chat;
+
#endif /* MAP_CHAT_H */
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 41485d222..65c042533 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -38,6 +38,7 @@
#include <sys/types.h>
struct chrif_interface chrif_s;
+struct chrif_interface *chrif;
//Used Packets:
//2af8: Outgoing, chrif_connect -> 'connect to charserver / auth @ charserver'
@@ -102,11 +103,11 @@ void chrif_reset(void) {
/// Releases the cookie when all characters are saved.
/// If all the conditions are met, it stops the core loop.
void chrif_check_shutdown(void) {
- if( runflag != MAPSERVER_ST_SHUTDOWN )
+ if( core->runflag != MAPSERVER_ST_SHUTDOWN )
return;
if( db_size(chrif->auth_db) > 0 )
return;
- runflag = CORE_ST_STOP;
+ core->runflag = CORE_ST_STOP;
}
struct auth_node* chrif_search(int account_id) {
@@ -124,8 +125,8 @@ bool chrif_auth_delete(int account_id, int char_id, enum sd_state state) {
if ( (node = chrif->auth_check(account_id, char_id, state) ) ) {
int fd = node->sd ? node->sd->fd : node->fd;
- if ( session[fd] && session[fd]->session_data == node->sd )
- session[fd]->session_data = NULL;
+ if ( sockt->session[fd] && sockt->session[fd]->session_data == node->sd )
+ sockt->session[fd]->session_data = NULL;
if ( node->sd ) {
if( node->sd->regs.vars )
@@ -177,8 +178,8 @@ bool chrif_auth_logout(TBL_PC* sd, enum sd_state state)
{
if(sd->fd && state == ST_LOGOUT) { //Disassociate player, and free it after saving ack returns. [Skotlex]
//fd info must not be lost for ST_MAPCHANGE as a final packet needs to be sent to the player.
- if ( session[sd->fd] )
- session[sd->fd]->session_data = NULL;
+ if ( sockt->session[sd->fd] )
+ sockt->session[sd->fd]->session_data = NULL;
sd->fd = 0;
}
@@ -219,14 +220,14 @@ void chrif_checkdefaultlogin(void) {
bool chrif_setip(const char* ip) {
char ip_str[16];
- if ( !( chrif->ip = host2ip(ip) ) ) {
+ if (!(chrif->ip = sockt->host2ip(ip))) {
ShowWarning("Failed to Resolve Char Server Address! (%s)\n", ip);
return false;
}
safestrncpy(chrif->ip_str, ip, sizeof(chrif->ip_str));
- ShowInfo("Char Server IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%s"CL_RESET"'.\n", ip, ip2str(chrif->ip, ip_str));
+ ShowInfo("Char Server IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%s"CL_RESET"'.\n", ip, sockt->ip2str(chrif->ip, ip_str));
return true;
}
@@ -238,7 +239,7 @@ void chrif_setport(uint16 port) {
// says whether the char-server is connected or not
int chrif_isconnected(void) {
- return (chrif->fd > 0 && session[chrif->fd] != NULL && chrif->state == 2);
+ return (chrif->fd > 0 && sockt->session[chrif->fd] != NULL && chrif->state == 2);
}
/*==========================================
@@ -384,7 +385,7 @@ bool chrif_changemapserver(struct map_session_data* sd, uint32 ip, uint16 port)
WFIFOL(chrif->fd,24) = htonl(ip);
WFIFOW(chrif->fd,28) = htons(port);
WFIFOB(chrif->fd,30) = sd->status.sex;
- WFIFOL(chrif->fd,31) = htonl(session[sd->fd]->client_addr);
+ WFIFOL(chrif->fd,31) = htonl(sockt->session[sd->fd]->client_addr);
WFIFOL(chrif->fd,35) = sd->group_id;
WFIFOSET(chrif->fd,39);
@@ -542,7 +543,7 @@ void chrif_authreq(struct map_session_data *sd, bool hstandalone) {
struct auth_node *node= chrif->search(sd->bl.id);
if( node != NULL || !chrif->isconnected() ) {
- set_eof(sd->fd);
+ sockt->eof(sd->fd);
return;
}
@@ -552,7 +553,7 @@ void chrif_authreq(struct map_session_data *sd, bool hstandalone) {
WFIFOL(chrif->fd,6) = sd->status.char_id;
WFIFOL(chrif->fd,10) = sd->login_id1;
WFIFOB(chrif->fd,14) = sd->status.sex;
- WFIFOL(chrif->fd,15) = htonl(session[sd->fd]->client_addr);
+ WFIFOL(chrif->fd,15) = htonl(sockt->session[sd->fd]->client_addr);
WFIFOB(chrif->fd,19) = hstandalone ? 1 : 0;
WFIFOSET(chrif->fd,20);
chrif->sd_to_auth(sd, ST_LOGIN);
@@ -607,7 +608,7 @@ void chrif_authok(int fd) {
sd = node->sd;
- if( runflag == MAPSERVER_ST_RUNNING &&
+ if( core->runflag == MAPSERVER_ST_RUNNING &&
node->account_id == account_id &&
node->char_id == char_id &&
node->login_id1 == login_id1 )
@@ -980,7 +981,7 @@ void chrif_idbanned(int fd) {
clif->message(sd->fd, tmpstr);
}
- set_eof(sd->fd); // forced to disconnect for the change
+ sockt->eof(sd->fd); // forced to disconnect for the change
map->quit(sd); // Remove leftovers (e.g. autotrading) [Paradox924X]
}
@@ -1232,9 +1233,9 @@ bool chrif_char_offline_nsd(int account_id, int char_id) {
bool chrif_flush(void) {
chrif_check(false);
- set_nonblocking(chrif->fd, 0);
- flush_fifos();
- set_nonblocking(chrif->fd, 1);
+ sockt->set_nonblocking(chrif->fd, 0);
+ sockt->flush_fifos();
+ sockt->set_nonblocking(chrif->fd, 1);
return true;
}
@@ -1286,7 +1287,7 @@ void chrif_update_ip(int fd) {
WFIFOHEAD(fd,6);
- new_ip = host2ip(chrif->ip_str);
+ new_ip = sockt->host2ip(chrif->ip_str);
if (new_ip && new_ip != chrif->ip)
chrif->ip = new_ip; //Update chrif->ip
@@ -1308,21 +1309,21 @@ void chrif_keepalive(int fd) {
WFIFOSET(fd,2);
}
void chrif_keepalive_ack(int fd) {
- session[fd]->flag.ping = 0;/* reset ping state, we received a packet */
+ sockt->session[fd]->flag.ping = 0;/* reset ping state, we received a packet */
}
void chrif_skillid2idx(int fd) {
int i, count = 0;
if( fd == 0 ) fd = chrif->fd;
- if( !session_isValid(fd) )
+ if (!sockt->session_is_valid(fd))
return;
WFIFOHEAD(fd,4 + (MAX_SKILL * 4));
WFIFOW(fd,0) = 0x2b0b;
for(i = 0; i < MAX_SKILL; i++) {
- if( skill->db[i].nameid ) {
- WFIFOW(fd, 4 + (count*4)) = skill->db[i].nameid;
+ if( skill->dbs->db[i].nameid ) {
+ WFIFOW(fd, 4 + (count*4)) = skill->dbs->db[i].nameid;
WFIFOW(fd, 6 + (count*4)) = i;
count++;
}
@@ -1340,22 +1341,22 @@ int chrif_parse(int fd) {
// only process data from the char-server
if ( fd != chrif->fd ) {
ShowDebug("chrif_parse: Disconnecting invalid session #%d (is not the char-server)\n", fd);
- do_close(fd);
+ sockt->close(fd);
return 0;
}
- if ( session[fd]->flag.eof ) {
- do_close(fd);
+ if ( sockt->session[fd]->flag.eof ) {
+ sockt->close(fd);
chrif->fd = -1;
chrif->on_disconnect();
return 0;
- } else if ( session[fd]->flag.ping ) {/* we've reached stall time */
- if( DIFF_TICK(sockt->last_tick, session[fd]->rdata_tick) > (sockt->stall_time * 2) ) {/* we can't wait any longer */
- set_eof(fd);
+ } else if ( sockt->session[fd]->flag.ping ) {/* we've reached stall time */
+ if( DIFF_TICK(sockt->last_tick, sockt->session[fd]->rdata_tick) > (sockt->stall_time * 2) ) {/* we can't wait any longer */
+ sockt->eof(fd);
return 0;
- } else if( session[fd]->flag.ping != 2 ) { /* we haven't sent ping out yet */
+ } else if( sockt->session[fd]->flag.ping != 2 ) { /* we haven't sent ping out yet */
chrif->keepalive(fd);
- session[fd]->flag.ping = 2;
+ sockt->session[fd]->flag.ping = 2;
}
}
@@ -1377,7 +1378,7 @@ int chrif_parse(int fd) {
if (r == 2) return 0; // Didn't have enough data (len==-1)
ShowWarning("chrif_parse: session #%d, intif->parse failed (unrecognized command 0x%.4x).\n", fd, cmd);
- set_eof(fd);
+ sockt->eof(fd);
return 0;
}
@@ -1418,7 +1419,7 @@ int chrif_parse(int fd) {
case 0x2b27: chrif->authfail(fd); break;
default:
ShowError("chrif_parse : unknown packet (session #%d): 0x%x. Disconnecting.\n", fd, cmd);
- set_eof(fd);
+ sockt->eof(fd);
return 0;
}
if ( fd == chrif->fd ) //There's the slight chance we lost the connection during parse, in which case this would segfault if not checked [Skotlex]
@@ -1475,7 +1476,7 @@ bool send_users_tochar(void) {
*------------------------------------------*/
int check_connect_char_server(int tid, int64 tick, int id, intptr_t data) {
static int displayed = 0;
- if ( chrif->fd <= 0 || session[chrif->fd] == NULL ) {
+ if ( chrif->fd <= 0 || sockt->session[chrif->fd] == NULL ) {
if ( !displayed ) {
ShowStatus("Attempting to connect to Char Server. Please wait.\n");
displayed = 1;
@@ -1483,12 +1484,12 @@ int check_connect_char_server(int tid, int64 tick, int id, intptr_t data) {
chrif->state = 0;
- if ( ( chrif->fd = make_connection(chrif->ip, chrif->port,NULL) ) == -1) //Attempt to connect later. [Skotlex]
+ if ((chrif->fd = sockt->make_connection(chrif->ip, chrif->port,NULL)) == -1) //Attempt to connect later. [Skotlex]
return 0;
- session[chrif->fd]->func_parse = chrif->parse;
- session[chrif->fd]->flag.server = 1;
- realloc_fifo(chrif->fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
+ sockt->session[chrif->fd]->func_parse = chrif->parse;
+ sockt->session[chrif->fd]->flag.server = 1;
+ sockt->realloc_fifo(chrif->fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
chrif->connect(chrif->fd);
chrif->connected = (chrif->state == 2);
@@ -1529,7 +1530,7 @@ void chrif_send_report(char* buf, int len) {
WFIFOSET(chrif->fd,len + 2);
- flush_fifo(chrif->fd); /* ensure it's sent now. */
+ sockt->flush(chrif->fd); /* ensure it's sent now. */
}
#endif
}
@@ -1601,7 +1602,7 @@ int auth_db_final(DBKey key, DBData *data, va_list ap) {
void do_final_chrif(void)
{
if( chrif->fd != -1 ) {
- do_close(chrif->fd);
+ sockt->close(chrif->fd);
chrif->fd = -1;
}
diff --git a/src/map/chrif.h b/src/map/chrif.h
index cac965f74..25f69a309 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -6,7 +6,7 @@
#define MAP_CHRIF_H
#include "map/map.h" //TBL_PC
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
struct eri;
@@ -150,10 +150,10 @@ struct chrif_interface {
void (*del_scdata_single) (int account_id, int char_id, short type);
};
-struct chrif_interface *chrif;
-
#ifdef HERCULES_CORE
void chrif_defaults(void);
#endif // HERCULES_CORE
+HPShared struct chrif_interface *chrif;
+
#endif /* MAP_CHRIF_H */
diff --git a/src/map/clif.c b/src/map/clif.c
index 53cee6c72..c7bbd30af 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -59,6 +59,9 @@
#include <time.h>
struct clif_interface clif_s;
+struct clif_interface *clif;
+
+struct s_packet_db packet_db[MAX_PACKET_DB + 1];
/* re-usable */
static struct packet_itemlist_normal itemlist_normal;
@@ -193,22 +196,22 @@ static inline unsigned int mes_len_check(char* mes, unsigned int len, unsigned i
*------------------------------------------*/
bool clif_setip(const char* ip) {
char ip_str[16];
- clif->map_ip = host2ip(ip);
+ clif->map_ip = sockt->host2ip(ip);
if ( !clif->map_ip ) {
ShowWarning("Failed to Resolve Map Server Address! (%s)\n", ip);
return false;
}
safestrncpy(clif->map_ip_str, ip, sizeof(clif->map_ip_str));
- ShowInfo("Map Server IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%s"CL_RESET"'.\n", ip, ip2str(clif->map_ip, ip_str));
+ ShowInfo("Map Server IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%s"CL_RESET"'.\n", ip, sockt->ip2str(clif->map_ip, ip_str));
return true;
}
bool clif_setbindip(const char* ip) {
- clif->bind_ip = host2ip(ip);
+ clif->bind_ip = sockt->host2ip(ip);
if ( clif->bind_ip ) {
char ip_str[16];
- ShowInfo("Map Server Bind IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%s"CL_RESET"'.\n", ip, ip2str(clif->bind_ip, ip_str));
+ ShowInfo("Map Server Bind IP Address : '"CL_WHITE"%s"CL_RESET"' -> '"CL_WHITE"%s"CL_RESET"'.\n", ip, sockt->ip2str(clif->bind_ip, ip_str));
return true;
}
ShowWarning("Failed to Resolve Map Server Address! (%s)\n", ip);
@@ -242,10 +245,9 @@ uint16 clif_getport(void)
/*==========================================
* Updates server ip resolution and returns it
*------------------------------------------*/
-uint32 clif_refresh_ip(void) {
- uint32 new_ip;
-
- new_ip = host2ip(clif->map_ip_str);
+uint32 clif_refresh_ip(void)
+{
+ uint32 new_ip = sockt->host2ip(clif->map_ip_str);
if ( new_ip && new_ip != clif->map_ip ) {
clif->map_ip = new_ip;
ShowInfo("Updating IP resolution of [%s].\n", clif->map_ip_str);
@@ -292,7 +294,7 @@ int clif_send_sub(struct block_list *bl, va_list ap) {
nullpo_ret(sd = (struct map_session_data *)bl);
fd = sd->fd;
- if (!fd || session[fd] == NULL) //Don't send to disconnected clients.
+ if (!fd || sockt->session[fd] == NULL) //Don't send to disconnected clients.
return 0;
buf = va_arg(ap,void*);
@@ -428,7 +430,7 @@ bool clif_send(const void* buf, int len, struct block_list* bl, enum send_target
for(i = 0; i < cd->users; i++) {
if (type == CHAT_WOS && cd->usersd[i] == sd)
continue;
- if ((fd=cd->usersd[i]->fd) >0 && session[fd]) { // Added check to see if session exists [PoW]
+ if ((fd=cd->usersd[i]->fd) >0 && sockt->session[fd]) { // Added check to see if session exists [PoW]
WFIFOHEAD(fd,len);
memcpy(WFIFOP(fd,0), buf, len);
WFIFOSET(fd,len);
@@ -691,14 +693,14 @@ void clif_authrefuse(int fd, uint8 error_code)
// TODO: type enum
void clif_authfail_fd(int fd, int type)
{
- if (!fd || !session[fd] || session[fd]->func_parse != clif->parse) //clif_authfail should only be invoked on players!
+ if (!fd || !sockt->session[fd] || sockt->session[fd]->func_parse != clif->parse) //clif_authfail should only be invoked on players!
return;
WFIFOHEAD(fd, packet_len(0x81));
WFIFOW(fd,0) = 0x81;
WFIFOB(fd,2) = type;
WFIFOSET(fd,packet_len(0x81));
- set_eof(fd);
+ sockt->eof(fd);
}
@@ -1370,7 +1372,7 @@ bool clif_spawn(struct block_list *bl)
if( sd->bg_id && map->list[sd->bl.m].flag.battleground )
clif->sendbgemblem_area(sd);
for( i = 0; i < sd->sc_display_count; i++ ) {
- clif->sc_load(&sd->bl, sd->bl.id,AREA,status->IconChangeTable[sd->sc_display[i]->type],sd->sc_display[i]->val1,sd->sc_display[i]->val2,sd->sc_display[i]->val3);
+ clif->sc_load(&sd->bl, sd->bl.id,AREA,status->dbs->IconChangeTable[sd->sc_display[i]->type],sd->sc_display[i]->val1,sd->sc_display[i]->val2,sd->sc_display[i]->val3);
}
if (sd->charm_type != CHARM_TYPE_NONE && sd->charm_count > 0)
clif->spiritcharm(sd);
@@ -1711,7 +1713,7 @@ void clif_quitsave(int fd,struct map_session_data *sd) {
else if (sd->fd) {
//Disassociate session from player (session is deleted after this function was called)
//And set a timer to make him quit later.
- session[sd->fd]->session_data = NULL;
+ sockt->session[sd->fd]->session_data = NULL;
sd->fd = 0;
timer->add(timer->gettick() + 10000, clif->delayquit, sd->bl.id, 0);
}
@@ -1746,7 +1748,7 @@ void clif_changemapserver(struct map_session_data* sd, unsigned short map_index,
WFIFOW(fd,18) = x;
WFIFOW(fd,20) = y;
WFIFOL(fd,22) = htonl(ip);
- WFIFOW(fd,26) = ntows(htons(port)); // [!] LE byte order here [!]
+ WFIFOW(fd,26) = sockt->ntows(htons(port)); // [!] LE byte order here [!]
WFIFOSET(fd,packet_len(0x92));
}
@@ -2259,7 +2261,7 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail) {
struct packet_additem p;
nullpo_retv(sd);
- if( !session_isActive(sd->fd) ) //Sasuke-
+ if (!sockt->session_is_active(sd->fd)) //Sasuke-
return;
if( fail )
@@ -2739,7 +2741,7 @@ void clif_updatestatus(struct map_session_data *sd,int type)
fd=sd->fd;
- if ( !session_isActive(fd) ) // Invalid pointer fix, by sasuke [Kevin]
+ if (!sockt->session_is_active(fd)) // Invalid pointer fix, by sasuke [Kevin]
return;
WFIFOHEAD(fd, 14);
@@ -3269,14 +3271,14 @@ void clif_arrow_create_list(struct map_session_data *sd)
for (i = 0, c = 0; i < MAX_SKILL_ARROW_DB; i++) {
int j;
- if (skill->arrow_db[i].nameid > 0
- && (j = pc->search_inventory(sd, skill->arrow_db[i].nameid)) != INDEX_NOT_FOUND
+ if (skill->dbs->arrow_db[i].nameid > 0
+ && (j = pc->search_inventory(sd, skill->dbs->arrow_db[i].nameid)) != INDEX_NOT_FOUND
&& !sd->status.inventory[j].equip && sd->status.inventory[j].identify
) {
- if ((j = itemdb_viewid(skill->arrow_db[i].nameid)) > 0)
+ if ((j = itemdb_viewid(skill->dbs->arrow_db[i].nameid)) > 0)
WFIFOW(fd,c*2+4) = j;
else
- WFIFOW(fd,c*2+4) = skill->arrow_db[i].nameid;
+ WFIFOW(fd,c*2+4) = skill->dbs->arrow_db[i].nameid;
c++;
}
}
@@ -3647,7 +3649,7 @@ void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
nullpo_retv(cd);
fd = sd->fd;
- if (!session_isActive(fd))
+ if (!sockt->session_is_active(fd))
return;
t = (int)(cd->owner->type == BL_NPC);
WFIFOHEAD(fd, 8 + (28*(cd->users+t)));
@@ -4043,7 +4045,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds
clif->charm_single(sd->fd, dstsd);
for( i = 0; i < dstsd->sc_display_count; i++ ) {
- clif->sc_load(&sd->bl,dstsd->bl.id,SELF,status->IconChangeTable[dstsd->sc_display[i]->type],dstsd->sc_display[i]->val1,dstsd->sc_display[i]->val2,dstsd->sc_display[i]->val3);
+ clif->sc_load(&sd->bl,dstsd->bl.id,SELF,status->dbs->IconChangeTable[dstsd->sc_display[i]->type],dstsd->sc_display[i]->val1,dstsd->sc_display[i]->val2,dstsd->sc_display[i]->val3);
}
if( (sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting.
(sd->bg_id && sd->bg_id == dstsd->bg_id) || //BattleGround
@@ -5228,13 +5230,13 @@ void clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id , int
WFIFOW(fd, 0)=0x18d;
for(i=0,c=0;i<MAX_SKILL_PRODUCE_DB;i++){
- if( skill->can_produce_mix(sd,skill->produce_db[i].nameid, trigger, 1) &&
- ( ( skill_id > 0 && skill->produce_db[i].req_skill == skill_id ) || skill_id < 0 )
+ if( skill->can_produce_mix(sd,skill->dbs->produce_db[i].nameid, trigger, 1) &&
+ ( ( skill_id > 0 && skill->dbs->produce_db[i].req_skill == skill_id ) || skill_id < 0 )
){
- if((view = itemdb_viewid(skill->produce_db[i].nameid)) > 0)
+ if((view = itemdb_viewid(skill->dbs->produce_db[i].nameid)) > 0)
WFIFOW(fd,c*8+ 4)= view;
else
- WFIFOW(fd,c*8+ 4)= skill->produce_db[i].nameid;
+ WFIFOW(fd,c*8+ 4)= skill->dbs->produce_db[i].nameid;
WFIFOW(fd,c*8+ 6)= 0;
WFIFOW(fd,c*8+ 8)= 0;
WFIFOW(fd,c*8+10)= 0;
@@ -5275,13 +5277,13 @@ void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id
c = 0;
for( i = 0; i < MAX_SKILL_PRODUCE_DB; i++ ) {
- if( !skill->can_produce_mix(sd,skill->produce_db[i].nameid,trigger, qty) )
+ if( !skill->can_produce_mix(sd,skill->dbs->produce_db[i].nameid,trigger, qty) )
continue;
- if( (view = itemdb_viewid(skill->produce_db[i].nameid)) > 0 )
+ if( (view = itemdb_viewid(skill->dbs->produce_db[i].nameid)) > 0 )
WFIFOW(fd, 6 + 2 * c) = view;
else
- WFIFOW(fd, 6 + 2 * c) = skill->produce_db[i].nameid;
+ WFIFOW(fd, 6 + 2 * c) = skill->dbs->produce_db[i].nameid;
c++;
}
@@ -5442,7 +5444,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(mes,ap);
va_end(ap);
ShowMessage("\n");
} else if (fd > 0) {
@@ -5721,7 +5723,7 @@ void clif_wis_message(int fd, const char* nick, const char* mes, size_t mes_len)
/// 2 = ignored by target
/// 3 = everyone ignored by target
void clif_wis_end(int fd, int flag) {
- struct map_session_data *sd = session_isValid(fd) ? session[fd]->session_data : NULL;
+ struct map_session_data *sd = sockt->session_is_valid(fd) ? sockt->session[fd]->session_data : NULL;
struct packet_wis_end p;
if( !sd )
@@ -7496,7 +7498,7 @@ void clif_guild_notice(struct map_session_data* sd, struct guild* g)
fd = sd->fd;
- if ( !session_isActive(fd) )
+ if (!sockt->session_is_active(fd))
return;
if(g->mes1[0] == '\0' && g->mes2[0] == '\0')
@@ -8852,7 +8854,7 @@ bool clif_process_message(struct map_session_data *sd, int format, char **name_,
{
//Hacked message, or infamous "client desynchronize" issue where they pick one char while loading another.
ShowWarning("clif_process_message: Player '%s' sent a message using an incorrect name! Forcing a relog...\n", sd->status.name);
- set_eof(fd); // Just kick them out to correct it.
+ sockt->eof(fd); // Just kick them out to correct it.
return false;
}
@@ -8989,7 +8991,7 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) {
client_tick = RFIFOL(fd, packet_db[cmd].pos[3]);
sex = RFIFOB(fd, packet_db[cmd].pos[4]);
- if( runflag != MAPSERVER_ST_RUNNING ) { // not allowed
+ if( core->runflag != MAPSERVER_ST_RUNNING ) { // not allowed
clif->authfail_fd(fd,1);// server closed
return;
}
@@ -9002,7 +9004,7 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) {
WFIFOW(fd,0) = 0x6a;
WFIFOB(fd,2) = 3; // Rejected by server
WFIFOSET(fd,packet_len(0x6a));
- set_eof(fd);
+ sockt->eof(fd);
return;
}
@@ -9022,7 +9024,7 @@ void clif_parse_WantToConnection(int fd, struct map_session_data* sd) {
* clif->cryptKey[1] ) + clif->cryptKey[2]) & 0xFFFFFFFF;
sd->parse_cmd_func = clif->parse_cmd;
- session[fd]->session_data = sd;
+ sockt->session[fd]->session_data = sd;
pc->setnewpc(sd, account_id, char_id, login_id1, client_tick, sex, fd);
@@ -9261,14 +9263,16 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) {
clif->updatestatus(sd,SP_DEX);
clif->updatestatus(sd,SP_LUK);
- // abort currently running script
- sd->state.using_fake_npc = 0;
- sd->state.menu_or_input = 0;
- sd->npc_menu = 0;
-
- if(sd->npc_id)
- npc->event_dequeue(sd);
-
+ if (sd->state.warp_clean) {
+ // abort currently running script
+ sd->state.using_fake_npc = 0;
+ sd->state.menu_or_input = 0;
+ sd->npc_menu = 0;
+ if(sd->npc_id)
+ npc->event_dequeue(sd);
+ } else {
+ sd->state.warp_clean = 1;
+ }
if( sd->guild && ( battle_config.guild_notice_changemap == 2 || ( battle_config.guild_notice_changemap == 1 && sd->state.changemap ) ) )
clif->guild_notice(sd,sd->guild);
}
@@ -9572,7 +9576,7 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd)
if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC__INVISIBILITY] &&
(!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout) )
{
- set_eof(fd);
+ sockt->eof(fd);
clif->disconnect_ack(sd, 0);
} else {
@@ -10025,7 +10029,7 @@ void clif_parse_Restart(int fd, struct map_session_data *sd) {
&& (!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout)
) {
//Send to char-server for character selection.
- chrif->charselectreq(sd, session[fd]->client_addr);
+ chrif->charselectreq(sd, sockt->session[fd]->client_addr);
} else {
clif->disconnect_ack(sd, 1);
}
@@ -16769,11 +16773,11 @@ int clif_elementalconverter_list(struct map_session_data *sd) {
WFIFOW(fd, 0)=0x1ad;
for(i=0,c=0;i<MAX_SKILL_PRODUCE_DB;i++){
- if( skill->can_produce_mix(sd,skill->produce_db[i].nameid,23, 1) ){
- if((view = itemdb_viewid(skill->produce_db[i].nameid)) > 0)
+ if( skill->can_produce_mix(sd,skill->dbs->produce_db[i].nameid,23, 1) ){
+ if((view = itemdb_viewid(skill->dbs->produce_db[i].nameid)) > 0)
WFIFOW(fd,c*2+ 4)= view;
else
- WFIFOW(fd,c*2+ 4)= skill->produce_db[i].nameid;
+ WFIFOW(fd,c*2+ 4)= skill->dbs->produce_db[i].nameid;
c++;
}
}
@@ -18341,13 +18345,13 @@ int clif_parse(int fd) {
unsigned short (*parse_cmd_func)(int fd, struct map_session_data *sd);
// begin main client packet processing loop
- sd = (TBL_PC *)session[fd]->session_data;
+ sd = (TBL_PC *)sockt->session[fd]->session_data;
- if (session[fd]->flag.eof) {
+ if (sockt->session[fd]->flag.eof) {
if (sd) {
if (sd->state.autotrade) {
//Disassociate character from the socket connection.
- session[fd]->session_data = NULL;
+ sockt->session[fd]->session_data = NULL;
sd->fd = 0;
ShowInfo("Character '"CL_WHITE"%s"CL_RESET"' logged off (using @autotrade).\n", sd->status.name);
} else
@@ -18361,9 +18365,9 @@ int clif_parse(int fd) {
map->quit(sd);
}
} else {
- ShowInfo("Closed connection from '"CL_WHITE"%s"CL_RESET"'.\n", ip2str(session[fd]->client_addr, NULL));
+ ShowInfo("Closed connection from '"CL_WHITE"%s"CL_RESET"'.\n", sockt->ip2str(sockt->session[fd]->client_addr, NULL));
}
- do_close(fd);
+ sockt->close(fd);
return 0;
}
@@ -18392,7 +18396,7 @@ int clif_parse(int fd) {
#ifdef DUMP_INVALID_PACKET
ShowDump(RFIFOP(fd,0), RFIFOREST(fd));
#endif
- set_eof(fd);
+ sockt->eof(fd);
return 0;
}
@@ -18408,7 +18412,7 @@ int clif_parse(int fd) {
#ifdef DUMP_INVALID_PACKET
ShowDump(RFIFOP(fd,0), RFIFOREST(fd));
#endif
- set_eof(fd);
+ sockt->eof(fd);
return 0;
}
@@ -18550,8 +18554,8 @@ int do_init_clif(bool minimal)
packetdb_loaddb();
- set_defaultparse(clif->parse);
- if( make_listen_bind(clif->bind_ip,clif->map_port) == -1 ) {
+ sockt->set_defaultparse(clif->parse);
+ if (sockt->make_listen_bind(clif->bind_ip,clif->map_port) == -1) {
ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",clif->map_port);
exit(EXIT_FAILURE);
}
diff --git a/src/map/clif.h b/src/map/clif.h
index 47249e07e..3f0d043f7 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -7,7 +7,7 @@
#include "map/map.h"
#include "map/packets_struct.h"
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/mmo.h"
#include <stdarg.h>
@@ -558,11 +558,6 @@ struct merge_item {
};
/**
- * Vars
- **/
-struct s_packet_db packet_db[MAX_PACKET_DB + 1];
-
-/**
* Clif.c Interface
**/
struct clif_interface {
@@ -1324,10 +1319,15 @@ struct clif_interface {
void (*add_random_options) (unsigned char* buf, struct item* item);
};
-struct clif_interface *clif;
-
#ifdef HERCULES_CORE
+/**
+ * Vars
+ **/
+extern struct s_packet_db packet_db[MAX_PACKET_DB + 1];
+
void clif_defaults(void);
#endif // HERCULES_CORE
+HPShared struct clif_interface *clif;
+
#endif /* MAP_CLIF_H */
diff --git a/src/map/duel.c b/src/map/duel.c
index 4cd2e276f..762745b75 100644
--- a/src/map/duel.c
+++ b/src/map/duel.c
@@ -17,6 +17,7 @@
#include <time.h>
struct duel_interface duel_s;
+struct duel_interface *duel;
/*==========================================
* Duel organizing functions [LuzZza]
diff --git a/src/map/duel.h b/src/map/duel.h
index 0c55c1266..c77f1c351 100644
--- a/src/map/duel.h
+++ b/src/map/duel.h
@@ -5,7 +5,7 @@
#ifndef MAP_DUEL_H
#define MAP_DUEL_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
struct map_session_data;
@@ -42,10 +42,10 @@ struct duel_interface {
void (*final) (void);
};
-struct duel_interface *duel;
-
#ifdef HERCULES_CORE
void duel_defaults(void);
#endif // HERCULES_CORE
+HPShared struct duel_interface *duel;
+
#endif /* MAP_DUEL_H */
diff --git a/src/map/elemental.c b/src/map/elemental.c
index bf0d42ce9..435dffaf4 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -42,6 +42,7 @@
#include <string.h>
struct elemental_interface elemental_s;
+struct elemental_interface *elemental;
int elemental_search_index(int class_) {
int i;
@@ -586,8 +587,8 @@ struct skill_condition elemental_skill_get_requirements(uint16 skill_id, uint16
if( skill_lv < 1 || skill_lv > MAX_SKILL_LEVEL )
return req;
- req.hp = skill->db[idx].hp[skill_lv-1];
- req.sp = skill->db[idx].sp[skill_lv-1];
+ req.hp = skill->dbs->db[idx].hp[skill_lv-1];
+ req.sp = skill->dbs->db[idx].sp[skill_lv-1];
return req;
}
@@ -785,7 +786,7 @@ int read_elementaldb(void) {
sprintf(line, "%s/%s", map->db_path, "elemental_db.txt");
- if( runflag == MAPSERVER_ST_RUNNING ) //only necessary after we're up
+ if( core->runflag == MAPSERVER_ST_RUNNING ) //only necessary after we're up
memset(elemental->db,0,sizeof(elemental->db));
fp = fopen(line, "r");
diff --git a/src/map/elemental.h b/src/map/elemental.h
index 582e1059c..d040f8337 100644
--- a/src/map/elemental.h
+++ b/src/map/elemental.h
@@ -7,7 +7,7 @@
#include "map/status.h" // struct status_data, struct status_change
#include "map/unit.h" // struct unit_data
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/mmo.h" // NAME_LENGTH
#include <stdarg.h>
@@ -120,10 +120,10 @@ struct elemental_interface {
int (*read_db) (void);
};
-struct elemental_interface *elemental;
-
#ifdef HERCULES_CORE
void elemental_defaults(void);
#endif // HERCULES_CORE
+HPShared struct elemental_interface *elemental;
+
#endif /* MAP_ELEMENTAL_H */
diff --git a/src/map/guild.c b/src/map/guild.c
index 5f6ce83c6..15c65ec98 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -36,6 +36,7 @@
#include <string.h>
struct guild_interface guild_s;
+struct guild_interface *guild;
/*==========================================
* Retrieves and validates the sd pointer for this guild member [Skotlex]
diff --git a/src/map/guild.h b/src/map/guild.h
index 18a25af58..a11585fbc 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -6,7 +6,7 @@
#define MAP_GUILD_H
#include "map/map.h" // EVENT_NAME_LENGTH, TBL_PC
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
#include "common/mmo.h"
@@ -163,10 +163,10 @@ struct guild_interface {
void (*castle_reconnect_sub) (void *key, void *data, va_list ap);
};
-struct guild_interface *guild;
-
#ifdef HERCULES_CORE
void guild_defaults(void);
#endif // HERCULES_CORE
+HPShared struct guild_interface *guild;
+
#endif /* MAP_GUILD_H */
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index dd158fc5d..cc736708d 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -43,11 +43,14 @@
#include <string.h>
struct homunculus_interface homunculus_s;
+struct homun_dbs homundbs;
+
+struct homunculus_interface *homun;
//Returns the viewdata for homunculus
struct view_data* homunculus_get_viewdata(int class_) {
if (homdb_checkid(class_))
- return &homun->viewdb[class_-HM_CLASS_BASE];
+ return &homun->dbs->viewdb[class_-HM_CLASS_BASE];
return NULL;
}
@@ -193,13 +196,13 @@ int homunculus_calc_skilltree(struct homun_data *hd, int flag_evolve) {
if( hd->homunculus.prev_class != 0 ) {
c = hd->homunculus.prev_class - HM_CLASS_BASE;
- for( i = 0; i < MAX_SKILL_TREE && ( id = homun->skill_tree[c][i].id ) > 0; i++ ) {
+ for( i = 0; i < MAX_SKILL_TREE && ( id = homun->dbs->skill_tree[c][i].id ) > 0; i++ ) {
if( hd->homunculus.hskill[ id - HM_SKILLBASE ].id )
continue; //Skill already known.
if(!battle_config.skillfree) {
for( j = 0; j < MAX_PC_SKILL_REQUIRE; j++ ) {
- if( homun->skill_tree[c][i].need[j].id &&
- homun->checkskill(hd,homun->skill_tree[c][i].need[j].id) < homun->skill_tree[c][i].need[j].lv ) {
+ if( homun->dbs->skill_tree[c][i].need[j].id &&
+ homun->checkskill(hd,homun->dbs->skill_tree[c][i].need[j].id) < homun->dbs->skill_tree[c][i].need[j].lv ) {
f = 0;
break;
}
@@ -214,16 +217,16 @@ int homunculus_calc_skilltree(struct homun_data *hd, int flag_evolve) {
c = hd->homunculus.class_ - HM_CLASS_BASE;
- for( i = 0; i < MAX_SKILL_TREE && ( id = homun->skill_tree[c][i].id ) > 0; i++ ) {
+ for( i = 0; i < MAX_SKILL_TREE && ( id = homun->dbs->skill_tree[c][i].id ) > 0; i++ ) {
if( hd->homunculus.hskill[ id - HM_SKILLBASE ].id )
continue; //Skill already known.
j = ( flag_evolve ) ? 10 : hd->homunculus.intimacy;
- if( j < homun->skill_tree[c][i].intimacylv )
+ if( j < homun->dbs->skill_tree[c][i].intimacylv )
continue;
if(!battle_config.skillfree) {
for( j = 0; j < MAX_PC_SKILL_REQUIRE; j++ ) {
- if( homun->skill_tree[c][i].need[j].id &&
- homun->checkskill(hd,homun->skill_tree[c][i].need[j].id) < homun->skill_tree[c][i].need[j].lv ) {
+ if( homun->dbs->skill_tree[c][i].need[j].id &&
+ homun->checkskill(hd,homun->dbs->skill_tree[c][i].need[j].id) < homun->dbs->skill_tree[c][i].need[j].lv ) {
f = 0;
break;
}
@@ -252,9 +255,9 @@ int homunculus_checkskill(struct homun_data *hd,uint16 skill_id) {
int homunculus_skill_tree_get_max(int id, int b_class) {
int i, skill_id;
b_class -= HM_CLASS_BASE;
- for(i=0;(skill_id=homun->skill_tree[b_class][i].id)>0;i++)
+ for(i=0;(skill_id=homun->dbs->skill_tree[b_class][i].id)>0;i++)
if (id == skill_id)
- return homun->skill_tree[b_class][i].max;
+ return homun->dbs->skill_tree[b_class][i].max;
return skill->get_max(id);
}
@@ -316,7 +319,7 @@ bool homunculus_levelup(struct homun_data *hd) {
hom->skillpts++; //1 skillpoint each 3 base level
hom->exp -= hd->exp_next;
- hd->exp_next = homun->exptable[hom->level - 1];
+ hd->exp_next = homun->dbs->exptable[hom->level - 1];
max = &hd->homunculusDB->gmax;
min = &hd->homunculusDB->gmin;
@@ -366,7 +369,7 @@ int homunculus_change_class(struct homun_data *hd, short class_) {
i = homun->db_search(class_,HOMUNCULUS_CLASS);
if(i < 0)
return 0;
- hd->homunculusDB = &homun->db[i];
+ hd->homunculusDB = &homun->dbs->db[i];
hd->homunculus.class_ = class_;
status->set_viewdata(&hd->bl, class_);
homun->calc_skilltree(hd, 1);
@@ -703,16 +706,16 @@ int homunculus_db_search(int key,int type) {
int i;
for(i=0;i<MAX_HOMUNCULUS_CLASS;i++) {
- if(homun->db[i].base_class <= 0)
+ if(homun->dbs->db[i].base_class <= 0)
continue;
switch(type) {
case HOMUNCULUS_CLASS:
- if(homun->db[i].base_class == key ||
- homun->db[i].evo_class == key)
+ if(homun->dbs->db[i].base_class == key ||
+ homun->dbs->db[i].evo_class == key)
return i;
break;
case HOMUNCULUS_FOOD:
- if(homun->db[i].foodID == key)
+ if(homun->dbs->db[i].foodID == key)
return i;
break;
default:
@@ -743,9 +746,9 @@ bool homunculus_create(struct map_session_data *sd, struct s_homunculus *hom) {
hd->bl.id = npc->get_new_npc_id();
hd->master = sd;
- hd->homunculusDB = &homun->db[i];
+ hd->homunculusDB = &homun->dbs->db[i];
memcpy(&hd->homunculus, hom, sizeof(struct s_homunculus));
- hd->exp_next = homun->exptable[hd->homunculus.level - 1];
+ hd->exp_next = homun->dbs->exptable[hd->homunculus.level - 1];
status->set_viewdata(&hd->bl, hd->homunculus.class_);
status->change_init(&hd->bl);
@@ -879,7 +882,7 @@ bool homunculus_creation_request(struct map_session_data *sd, int class_) {
memset(&hom, 0, sizeof(struct s_homunculus));
//Initial data
- safestrncpy(hom.name, homun->db[i].name, NAME_LENGTH-1);
+ safestrncpy(hom.name, homun->dbs->db[i].name, NAME_LENGTH-1);
hom.class_ = class_;
hom.level = 1;
hom.hunger = 32; //32%
@@ -887,7 +890,7 @@ bool homunculus_creation_request(struct map_session_data *sd, int class_) {
hom.char_id = sd->status.char_id;
hom.hp = 10 ;
- base = &homun->db[i].base;
+ base = &homun->dbs->db[i].base;
hom.max_hp = base->HP;
hom.max_sp = base->SP;
hom.str = base->str *10;
@@ -963,7 +966,7 @@ void homunculus_stat_reset(struct homun_data *hd) {
hom->dex = base->dex *10;
hom->luk = base->luk *10;
hom->exp = 0;
- hd->exp_next = homun->exptable[0];
+ hd->exp_next = homun->dbs->exptable[0];
memset(&hd->homunculus.hskill, 0, sizeof hd->homunculus.hskill);
hd->homunculus.skillpts = 0;
}
@@ -1026,7 +1029,7 @@ bool homunculus_read_db_sub(char* str[], int columns, int current) {
ShowError("homunculus_read_db_sub : Invalid class %d\n", classid);
return false;
}
- db = &homun->db[current];
+ db = &homun->dbs->db[current];
db->base_class = classid;
classid = atoi(str[1]);
if (classid < HM_CLASS_BASE || classid > HM_CLASS_MAX) {
@@ -1129,8 +1132,7 @@ bool homunculus_read_db_sub(char* str[], int columns, int current) {
void homunculus_read_db(void) {
int i;
const char *filename[]={DBPATH"homunculus_db.txt","homunculus_db2.txt"};
-
- memset(homun->db,0,sizeof(homun->db));
+ memset(homun->dbs->db, 0, sizeof(homun->dbs->db));
for(i = 0; i<ARRAYLENGTH(filename); i++) {
if( i > 0 ) {
char filepath[256];
@@ -1165,23 +1167,23 @@ bool homunculus_read_skill_db_sub(char* split[], int columns, int current) {
k = atoi(split[1]); //This is to avoid adding two lines for the same skill. [Skotlex]
// Search an empty line or a line with the same skill_id (stored in j)
- ARR_FIND( 0, MAX_SKILL_TREE, j, !homun->skill_tree[classid][j].id || homun->skill_tree[classid][j].id == k );
+ ARR_FIND( 0, MAX_SKILL_TREE, j, !homun->dbs->skill_tree[classid][j].id || homun->dbs->skill_tree[classid][j].id == k );
if (j == MAX_SKILL_TREE) {
ShowWarning("Unable to load skill %d into homunculus %d's tree. Maximum number of skills per class has been reached.\n", k, classid);
return false;
}
- homun->skill_tree[classid][j].id = k;
- homun->skill_tree[classid][j].max = atoi(split[2]);
+ homun->dbs->skill_tree[classid][j].id = k;
+ homun->dbs->skill_tree[classid][j].max = atoi(split[2]);
if (minJobLevelPresent)
- homun->skill_tree[classid][j].joblv = atoi(split[3]);
+ homun->dbs->skill_tree[classid][j].joblv = atoi(split[3]);
for( k = 0; k < MAX_PC_SKILL_REQUIRE; k++ ) {
- homun->skill_tree[classid][j].need[k].id = atoi(split[3+k*2+minJobLevelPresent]);
- homun->skill_tree[classid][j].need[k].lv = atoi(split[3+k*2+minJobLevelPresent+1]);
+ homun->dbs->skill_tree[classid][j].need[k].id = atoi(split[3+k*2+minJobLevelPresent]);
+ homun->dbs->skill_tree[classid][j].need[k].lv = atoi(split[3+k*2+minJobLevelPresent+1]);
}
- homun->skill_tree[classid][j].intimacylv = atoi(split[13+minJobLevelPresent]);
+ homun->dbs->skill_tree[classid][j].intimacylv = atoi(split[13+minJobLevelPresent]);
return true;
}
@@ -1205,9 +1207,8 @@ int8 homunculus_get_intimacy_grade(struct homun_data *hd) {
}
void homunculus_skill_db_read(void) {
- memset(homun->skill_tree,0,sizeof(homun->skill_tree));
+ memset(homun->dbs->skill_tree, 0, sizeof(homun->dbs->skill_tree));
sv->readdb(map->db_path, "homun_skill_tree.txt", ',', 13, 15, -1, homun->read_skill_db_sub);
-
}
void homunculus_exp_db_read(void) {
@@ -1217,7 +1218,7 @@ void homunculus_exp_db_read(void) {
DBPATH"exp_homun.txt",
"exp_homun2.txt"};
- memset(homun->exptable,0,sizeof(homun->exptable));
+ memset(homun->dbs->exptable, 0, sizeof(homun->dbs->exptable));
for(i = 0; i < 2; i++) {
FILE *fp;
sprintf(line, "%s/%s", map->db_path, filename[i]);
@@ -1231,13 +1232,13 @@ void homunculus_exp_db_read(void) {
if(line[0] == '/' && line[1] == '/')
continue;
- if (!(homun->exptable[j++] = (unsigned int)strtoul(line, NULL, 10)))
+ if (!(homun->dbs->exptable[j++] = (unsigned int)strtoul(line, NULL, 10)))
break;
}
// Last permitted level have to be 0!
- if (homun->exptable[MAX_LEVEL - 1]) {
+ if (homun->dbs->exptable[MAX_LEVEL - 1]) {
ShowWarning("homunculus_exp_db_read: Reached max level in exp_homun [%d]. Remaining lines were not read.\n ", MAX_LEVEL);
- homun->exptable[MAX_LEVEL - 1] = 0;
+ homun->dbs->exptable[MAX_LEVEL - 1] = 0;
}
fclose(fp);
ShowStatus("Done reading '"CL_WHITE"%d"CL_RESET"' levels in '"CL_WHITE"%s"CL_RESET"'.\n", j, filename[i]);
@@ -1266,9 +1267,9 @@ void do_init_homunculus(bool minimal) {
timer->add_func_list(homun->hunger_timer, "homunculus_hunger_timer");
//Stock view data for homuncs
- memset(&homun->viewdb, 0, sizeof(homun->viewdb));
- for (class_ = 0; class_ < ARRAYLENGTH(homun->viewdb); class_++)
- homun->viewdb[class_].class_ = HM_CLASS_BASE+class_;
+ memset(homun->dbs->viewdb, 0, sizeof(homun->dbs->viewdb));
+ for (class_ = 0; class_ < MAX_HOMUNCULUS_CLASS; class_++)
+ homun->dbs->viewdb[class_].class_ = HM_CLASS_BASE+class_;
}
void do_final_homunculus(void) {
@@ -1277,7 +1278,8 @@ void do_final_homunculus(void) {
void homunculus_defaults(void) {
homun = &homunculus_s;
-
+ homun->dbs = &homundbs;
+
homun->init = do_init_homunculus;
homun->final = do_final_homunculus;
homun->reload = homunculus_reload;
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index 32e48b1e9..9d23fbe2c 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -7,6 +7,7 @@
#include "map/status.h" // struct status_data, struct status_change
#include "map/unit.h" // struct unit_data
+#include "common/hercules.h"
#include "common/mmo.h"
struct map_session_data;
@@ -99,12 +100,16 @@ enum homun_type {
HT_INVALID = -1, // Invalid Homunculus
};
-/* homunculus.c interface */
-struct homunculus_interface {
+struct homun_dbs {
unsigned int exptable[MAX_LEVEL];
struct view_data viewdb[MAX_HOMUNCULUS_CLASS];
struct s_homunculus_db db[MAX_HOMUNCULUS_CLASS];
struct homun_skill_tree_entry skill_tree[MAX_HOMUNCULUS_CLASS][MAX_SKILL_TREE];
+};
+
+/* homunculus.c interface */
+struct homunculus_interface {
+ struct homun_dbs *dbs;
/* */
void (*init) (bool minimal);
void (*final) (void);
@@ -156,10 +161,10 @@ struct homunculus_interface {
int8 (*get_intimacy_grade) (struct homun_data *hd);
};
-struct homunculus_interface *homun;
-
#ifdef HERCULES_CORE
void homunculus_defaults(void);
#endif // HERCULES_CORE
+HPShared struct homunculus_interface *homun;
+
#endif /* MAP_HOMUNCULUS_H */
diff --git a/src/map/instance.c b/src/map/instance.c
index f5688d02c..1fc396325 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -32,6 +32,7 @@
#include <time.h>
struct instance_interface instance_s;
+struct instance_interface *instance;
/// Checks whether given instance id is valid or not.
bool instance_is_valid(int instance_id) {
@@ -357,7 +358,7 @@ int instance_init_npc(struct block_list* bl, va_list args) {
snprintf(evname, EVENT_NAME_LENGTH, "%s::OnInstanceInit", nd->exname);
if( ( ev = strdb_get(npc->ev_db, evname) ) )
- script->run(ev->nd->u.scr.script, ev->pos, 0, ev->nd->bl.id);
+ script->run_npc(ev->nd->u.scr.script, ev->pos, 0, ev->nd->bl.id);
return 1;
}
diff --git a/src/map/instance.h b/src/map/instance.h
index e17d6866f..589e1a511 100644
--- a/src/map/instance.h
+++ b/src/map/instance.h
@@ -6,7 +6,7 @@
#define MAP_INSTANCE_H
#include "map/script.h" // struct reg_db
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/mmo.h" // struct point
struct HPluginData;
@@ -85,10 +85,10 @@ struct instance_interface {
int (*destroy_timer) (int tid, int64 tick, int id, intptr_t data);
};
-struct instance_interface *instance;
-
#ifdef HERCULES_CORE
void instance_defaults(void);
#endif // HERCULES_CORE
+HPShared struct instance_interface *instance;
+
#endif /* MAP_INSTANCE_H */
diff --git a/src/map/intif.c b/src/map/intif.c
index 6c40d5109..12f679552 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -37,6 +37,7 @@
#include <sys/types.h>
struct intif_interface intif_s;
+struct intif_interface *intif;
#define inter_fd (chrif->fd) // alias
@@ -45,7 +46,7 @@ struct intif_interface intif_s;
int CheckForCharServer(void)
{
- return ((chrif->fd <= 0) || session[chrif->fd] == NULL || session[chrif->fd]->wdata == NULL);
+ return ((chrif->fd <= 0) || sockt->session[chrif->fd] == NULL || sockt->session[chrif->fd]->wdata == NULL);
}
// pet
@@ -2145,14 +2146,14 @@ void intif_request_accinfo( int u_fd, int aid, int group_lv, char* query ) {
void intif_parse_MessageToFD(int fd) {
int u_fd = RFIFOL(fd,4);
- if( session[u_fd] && session[u_fd]->session_data ) {
+ if( sockt->session[u_fd] && sockt->session[u_fd]->session_data ) {
int aid = RFIFOL(fd,8);
- struct map_session_data * sd = session[u_fd]->session_data;
+ struct map_session_data * sd = sockt->session[u_fd]->session_data;
/* matching e.g. previous fd owner didn't dc during request or is still the same */
if( sd && sd->bl.id == aid ) {
char msg[512];
safestrncpy(msg, (char*)RFIFOP(fd,12), RFIFOW(fd,2) - 12);
- clif->message(u_fd,msg);
+ clif->messagecolor_self(u_fd, COLOR_DEFAULT ,msg);
}
}
diff --git a/src/map/intif.h b/src/map/intif.h
index 3303feb6e..369ac1d9b 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -5,7 +5,7 @@
#ifndef MAP_INTIF_H
#define MAP_INTIF_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
/**
* Declarations
@@ -182,10 +182,10 @@ struct intif_interface {
void (*pDeleteHomunculusOk) (int fd);
};
-struct intif_interface *intif;
-
#ifdef HERCULES_CORE
void intif_defaults(void);
#endif // HERCULES_CORE
+HPShared struct intif_interface *intif;
+
#endif /* MAP_INTIF_H */
diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c
index b0f687c0d..86f854ff7 100644
--- a/src/map/irc-bot.c
+++ b/src/map/irc-bot.c
@@ -24,6 +24,7 @@
//#define IRCBOT_DEBUG
struct irc_bot_interface irc_bot_s;
+struct irc_bot_interface *ircbot;
char send_string[IRC_MESSAGE_LENGTH];
@@ -41,9 +42,9 @@ int irc_connect_timer(int tid, int64 tick, int id, intptr_t data) {
ircbot->last_try = timer->gettick();
- if ((ircbot->fd = make_connection(ircbot->ip, channel->config->irc_server_port, &opt)) > 0) {
- session[ircbot->fd]->func_parse = ircbot->parse;
- session[ircbot->fd]->flag.server = 1;
+ if ((ircbot->fd = sockt->make_connection(ircbot->ip, channel->config->irc_server_port, &opt)) > 0) {
+ sockt->session[ircbot->fd]->func_parse = ircbot->parse;
+ sockt->session[ircbot->fd]->flag.server = 1;
timer->add(timer->gettick() + 3000, ircbot->identify_timer, 0, 0);
ircbot->isOn = true;
}
@@ -114,13 +115,13 @@ struct irc_func* irc_func_search(char* function_name) {
int irc_parse(int fd) {
char *parse_string = NULL, *str_safe = NULL;
- if (session[fd]->flag.eof) {
- do_close(fd);
+ if (sockt->session[fd]->flag.eof) {
+ sockt->close(fd);
ircbot->fd = 0;
ircbot->isOn = false;
ircbot->isIn = false;
ircbot->fails = 0;
- ircbot->ip = host2ip(channel->config->irc_server);
+ ircbot->ip = sockt->host2ip(channel->config->irc_server);
timer->add(timer->gettick() + 120000, ircbot->connect_timer, 0, 0);
return 0;
}
@@ -415,7 +416,7 @@ void irc_bot_init(bool minimal) {
if (!channel->config->irc)
return;
- if (!(ircbot->ip = host2ip(channel->config->irc_server))) {
+ if (!(ircbot->ip = sockt->host2ip(channel->config->irc_server))) {
ShowError("Unable to resolve '%s' (irc server), disabling irc channel...\n", channel->config->irc_server);
channel->config->irc = false;
return;
@@ -454,7 +455,7 @@ void irc_bot_final(void) {
return;
if( ircbot->isOn ) {
ircbot->send("QUIT :Hercules is shutting down");
- do_close(ircbot->fd);
+ sockt->close(ircbot->fd);
}
for( i = 0; i < ircbot->funcs.size; i++ ) {
diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h
index b0bfd72f8..a85fc46e8 100644
--- a/src/map/irc-bot.h
+++ b/src/map/irc-bot.h
@@ -6,7 +6,7 @@
#ifndef MAP_IRC_BOT_H
#define MAP_IRC_BOT_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#define IRC_NICK_LENGTH 40
#define IRC_IDENT_LENGTH 40
@@ -59,10 +59,10 @@ struct irc_bot_interface {
void (*usernick) (int fd, char *cmd, char *source, char *target, char *msg);
};
-struct irc_bot_interface *ircbot;
-
#ifdef HERCULES_CORE
void ircbot_defaults(void);
#endif // HERCULES_CORE
+HPShared struct irc_bot_interface *ircbot;
+
#endif /* MAP_IRC_BOT_H */
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 4ebe282a2..7f5c2224c 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -26,6 +26,7 @@
#include <string.h>
struct itemdb_interface itemdb_s;
+struct itemdb_interface *itemdb;
/**
* Search for item name
@@ -75,7 +76,7 @@ struct item_data* itemdb_searchname(const char *str) {
return item;
//Second priority to Client displayed name.
- if( strcasecmp(item->jname,str) == 0 )
+ if (!item2 && strcasecmp(item->jname,str) == 0)
item2 = item;
}
@@ -1616,15 +1617,15 @@ int itemdb_readdb_sql_sub(Sql *handle, int n, const char *source) {
id.stack.storage = (stack_flag&4)!=0;
id.stack.guildstorage = (stack_flag&8)!=0;
}
- SQL->GetData(handle, 30, &data, NULL);
+ SQL->GetData(handle, 31, &data, NULL);
if (data) {
id.view_id = atoi(data);
if (id.view_id)
id.flag.available = 1;
}
- SQL->GetData(handle, 31, &data, NULL); id.script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
- SQL->GetData(handle, 32, &data, NULL); id.equip_script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
- SQL->GetData(handle, 33, &data, NULL); id.unequip_script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
+ SQL->GetData(handle, 32, &data, NULL); id.script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
+ SQL->GetData(handle, 33, &data, NULL); id.equip_script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
+ SQL->GetData(handle, 34, &data, NULL); id.unequip_script = data && *data ? script->parse(data, source, -id.nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
return itemdb->validate_entry(&id, n, source);
}
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index e50ebfd3d..a3edd451e 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -6,7 +6,7 @@
#define MAP_ITEMDB_H
/* #include "map/map.h" */
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/conf.h"
#include "common/db.h"
#include "common/mmo.h" // ITEM_NAME_LENGTH
@@ -618,10 +618,10 @@ struct itemdb_interface {
bool (*lookup_const) (const config_setting_t *it, const char *name, int *value);
};
-struct itemdb_interface *itemdb;
-
#ifdef HERCULES_CORE
void itemdb_defaults(void);
#endif // HERCULES_CORE
+HPShared struct itemdb_interface *itemdb;
+
#endif /* MAP_ITEMDB_H */
diff --git a/src/map/log.c b/src/map/log.c
index 0a9b16418..0c5977c05 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -23,6 +23,7 @@
#include <string.h>
struct log_interface log_s;
+struct log_interface *logs;
/// obtain log type character for item/zeny logs
char log_picktype2char(e_log_pick_type type) {
diff --git a/src/map/log.h b/src/map/log.h
index ef654149c..4b2b5d4d6 100644
--- a/src/map/log.h
+++ b/src/map/log.h
@@ -5,7 +5,7 @@
#ifndef MAP_LOG_H
#define MAP_LOG_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/sql.h"
/**
@@ -129,10 +129,10 @@ struct log_interface {
bool (*should_log_item) (int nameid, int amount, int refine, struct item_data *id);
};
-struct log_interface *logs;
-
#ifdef HERCULES_CORE
void log_defaults(void);
#endif // HERCULES_CORE
+HPShared struct log_interface *logs;
+
#endif /* MAP_LOG_H */
diff --git a/src/map/mail.c b/src/map/mail.c
index 184e2be8d..0bdad2877 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -19,6 +19,7 @@
#include <string.h>
struct mail_interface mail_s;
+struct mail_interface *mail;
void mail_clear(struct map_session_data *sd)
{
diff --git a/src/map/mail.h b/src/map/mail.h
index 4f325067d..128b1fbaa 100644
--- a/src/map/mail.h
+++ b/src/map/mail.h
@@ -5,7 +5,7 @@
#ifndef MAP_MAIL_H
#define MAP_MAIL_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
struct item;
struct mail_message;
@@ -23,10 +23,10 @@ struct mail_interface {
bool (*invalid_operation) (struct map_session_data *sd);
};
-struct mail_interface *mail;
-
#ifdef HERCULES_CORE
void mail_defaults(void);
#endif // HERCULES_CORE
+HPShared struct mail_interface *mail;
+
#endif /* MAP_MAIL_H */
diff --git a/src/map/map.c b/src/map/map.c
index dc935079a..a7b171ddf 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -69,6 +69,9 @@
struct map_interface map_s;
struct mapit_interface mapit_s;
+struct map_interface *map;
+struct mapit_interface *mapit;
+
/*==========================================
* server player count (of all mapservers)
*------------------------------------------*/
@@ -1799,7 +1802,7 @@ int map_quit(struct map_session_data *sd) {
if( sd->bg_id && !sd->bg_queue.arena ) /* TODO: dump this chunk after bg_queue is fully enabled */
bg->team_leave(sd,BGTL_QUIT);
- if (sd->state.autotrade && runflag != MAPSERVER_ST_SHUTDOWN && !channel->config->closing)
+ if (sd->state.autotrade && core->runflag != MAPSERVER_ST_SHUTDOWN && !channel->config->closing)
pc->autotrade_update(sd,PAUC_REMOVE);
skill->cooldown_save(sd);
@@ -3538,12 +3541,12 @@ int map_config_read(char *cfgName) {
*ptr = '\0';
if(strcmpi(w1,"timestamp_format")==0)
- safestrncpy(timestamp_format, w2, 20);
+ safestrncpy(showmsg->timestamp_format, w2, 20);
else if(strcmpi(w1,"stdout_with_ansisequence")==0)
- stdout_with_ansisequence = config_switch(w2);
+ showmsg->stdout_with_ansisequence = config_switch(w2) ? true : false;
else if(strcmpi(w1,"console_silent")==0) {
- msg_silent = atoi(w2);
- if( msg_silent ) // only bother if its actually enabled
+ showmsg->silent = atoi(w2);
+ if (showmsg->silent) // only bother if its actually enabled
ShowInfo("Console Silent Setting: %d\n", atoi(w2));
} else if (strcmpi(w1, "userid")==0)
chrif->setuserid(w2);
@@ -3593,7 +3596,7 @@ int map_config_read(char *cfgName) {
else if (strcmpi(w1, "use_grf") == 0)
map->enable_grf = config_switch(w2);
else if (strcmpi(w1, "console_msg_log") == 0)
- console_msg_log = atoi(w2);//[Ind]
+ showmsg->console_log = atoi(w2);//[Ind]
else if (strcmpi(w1, "default_language") == 0)
safestrncpy(map->default_lang_str, w2, sizeof(map->default_lang_str));
else if (strcmpi(w1, "import") == 0)
@@ -3730,8 +3733,6 @@ int inter_config_read(char *cfgName) {
safestrncpy(map->mob_skill_db_db, w2, sizeof(map->mob_skill_db_db));
else if(strcmpi(w1,"mob_skill_db2_db")==0)
safestrncpy(map->mob_skill_db2_db, w2, sizeof(map->mob_skill_db2_db));
- else if(strcmpi(w1,"interreg_db")==0)
- safestrncpy(map->interreg_db, w2, sizeof(map->interreg_db));
/* map sql stuff */
else if(strcmpi(w1,"map_server_ip")==0)
safestrncpy(map->server_ip, w2, sizeof(map->server_ip));
@@ -3748,14 +3749,38 @@ int inter_config_read(char *cfgName) {
else if(strcmpi(w1,"use_sql_item_db")==0) {
map->db_use_sql_item_db = config_switch(w2);
ShowStatus ("Using item database as SQL: '%s'\n", w2);
+ if (map->db_use_sql_item_db) {
+ // Deprecated 2015-08-09 [Haru]
+ ShowWarning("Support for the SQL item database is deprecated and it will removed in future versions. "
+ "Please upgrade to the non-sql version as soon as possible. "
+ "Bug reports or pull requests concerning the SQL item database are no longer accepted.\n");
+ ShowInfo("Resuming in 10 seconds...\n");
+ HSleep(10);
+ }
}
else if(strcmpi(w1,"use_sql_mob_db")==0) {
map->db_use_sql_mob_db = config_switch(w2);
ShowStatus ("Using monster database as SQL: '%s'\n", w2);
+ if (map->db_use_sql_mob_db) {
+ // Deprecated 2015-08-09 [Haru]
+ ShowWarning("Support for the SQL monster database is deprecated and it will removed in future versions. "
+ "Please upgrade to the non-sql version as soon as possible. "
+ "Bug reports or pull requests concerning the SQL monster database are no longer accepted.\n");
+ ShowInfo("Resuming in 10 seconds...\n");
+ HSleep(10);
+ }
}
else if(strcmpi(w1,"use_sql_mob_skill_db")==0) {
map->db_use_sql_mob_skill_db = config_switch(w2);
ShowStatus ("Using monster skill database as SQL: '%s'\n", w2);
+ if (map->db_use_sql_mob_skill_db) {
+ // Deprecated 2015-08-09 [Haru]
+ ShowWarning("Support for the SQL monster skill database is deprecated and it will removed in future versions. "
+ "Please upgrade to the non-sql version as soon as possible. "
+ "Bug reports or pull requests concerning the SQL monster skill database are no longer accepted.\n");
+ ShowInfo("Resuming in 10 seconds...\n");
+ HSleep(10);
+ }
}
else if(strcmpi(w1,"autotrade_merchants_db")==0)
safestrncpy(map->autotrade_merchants_db, w2, sizeof(map->autotrade_merchants_db));
@@ -5520,9 +5545,9 @@ void set_server_type(void) {
/// Called when a terminate signal is received.
void do_shutdown(void)
{
- if( runflag != MAPSERVER_ST_SHUTDOWN )
+ if( core->runflag != MAPSERVER_ST_SHUTDOWN )
{
- runflag = MAPSERVER_ST_SHUTDOWN;
+ core->runflag = MAPSERVER_ST_SHUTDOWN;
ShowStatus("Shutting down...\n");
{
struct map_session_data* sd;
@@ -5530,7 +5555,7 @@ void do_shutdown(void)
for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) )
clif->GM_kick(NULL, sd);
mapit->free(iter);
- flush_fifos();
+ sockt->flush_fifos();
}
chrif->check_shutdown();
}
@@ -5590,60 +5615,6 @@ void map_cp_defaults(void) {
console->input->addCommand("gm:use",CPCMD_A(gm_use));
#endif
}
-/* Hercules Plugin Mananger */
-void map_hp_symbols(void) {
- /* full interfaces */
- HPM->share(atcommand,"atcommand");
- HPM->share(battle,"battle");
- HPM->share(bg,"battlegrounds");
- HPM->share(buyingstore,"buyingstore");
- HPM->share(channel,"channel");
- HPM->share(clif,"clif");
- HPM->share(chrif,"chrif");
- HPM->share(guild,"guild");
- HPM->share(gstorage,"gstorage");
- HPM->share(homun,"homun");
- HPM->share(map,"map");
- HPM->share(ircbot,"ircbot");
- HPM->share(itemdb,"itemdb");
- HPM->share(logs,"logs");
- HPM->share(mail,"mail");
- HPM->share(instance,"instance");
- HPM->share(script,"script");
- HPM->share(searchstore,"searchstore");
- HPM->share(skill,"skill");
- HPM->share(vending,"vending");
- HPM->share(pc,"pc");
- HPM->share(pcg,"pc_groups");
- HPM->share(party,"party");
- HPM->share(storage,"storage");
- HPM->share(trade,"trade");
- HPM->share(status,"status");
- HPM->share(chat, "chat");
- HPM->share(duel,"duel");
- HPM->share(elemental,"elemental");
- HPM->share(intif,"intif");
- HPM->share(mercenary,"mercenary");
- HPM->share(mob,"mob");
- HPM->share(unit,"unit");
- HPM->share(npc,"npc");
- HPM->share(mapreg,"mapreg");
- HPM->share(pet,"pet");
- HPM->share(path,"path");
- HPM->share(quest,"quest");
-#ifdef PCRE_SUPPORT
- HPM->share(npc_chat,"npc_chat");
- HPM->share(libpcre,"libpcre");
-#endif
- HPM->share(mapit,"mapit");
- HPM->share(mapindex,"mapindex");
- /* sql link */
- HPM->share(map->mysql_handle,"sql_handle");
- /* specific */
- HPM->share(atcommand->create,"addCommand");
- HPM->share(script->addScript,"addScript");
- HPM->share(HPM_map_add_group_permission,"addGroupPermission");
-}
void map_load_defaults(void) {
mapindex_defaults();
@@ -5698,7 +5669,7 @@ void map_load_defaults(void) {
*/
static CMDLINEARG(runonce)
{
- runflag = CORE_ST_STOP;
+ core->runflag = CORE_ST_STOP;
return true;
}
/**
@@ -5806,7 +5777,7 @@ static CMDLINEARG(logconfig)
static CMDLINEARG(scriptcheck)
{
map->minimal = true;
- runflag = CORE_ST_STOP;
+ core->runflag = CORE_ST_STOP;
map->scriptcheck = true;
return true;
}
@@ -5836,7 +5807,7 @@ static CMDLINEARG(generatetranslations) {
ShowError("export-dialog: failed to open '%s' for writing\n",script->lang_export_file);
}
- runflag = CORE_ST_STOP;
+ core->runflag = CORE_ST_STOP;
return true;
}
@@ -5880,7 +5851,6 @@ int do_init(int argc, char *argv[])
map->GRF_PATH_FILENAME = aStrdup("conf/grf-files.txt");
HPM_map_do_init();
- HPM->symbol_defaults_sub = map_hp_symbols;
cmdline->exec(argc, argv, CMDLINE_OPT_PREINIT);
HPM->config_read();
@@ -5901,7 +5871,7 @@ int do_init(int argc, char *argv[])
if (!map->ip_set || !map->char_ip_set) {
char ip_str[16];
- ip2str(sockt->addr_[0], ip_str);
+ sockt->ip2str(sockt->addr_[0], ip_str);
ShowWarning("Not all IP addresses in /conf/map-server.conf configured, auto-detecting...\n");
@@ -6035,9 +6005,9 @@ int do_init(int argc, char *argv[])
ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map->port);
- if( runflag != CORE_ST_STOP ) {
- shutdown_callback = map->do_shutdown;
- runflag = MAPSERVER_ST_RUNNING;
+ if( core->runflag != CORE_ST_STOP ) {
+ core->shutdown_callback = map->do_shutdown;
+ core->runflag = MAPSERVER_ST_RUNNING;
}
map_cp_defaults();
@@ -6089,7 +6059,6 @@ void map_defaults(void) {
sprintf(map->mob_db2_db, "mob_db2");
sprintf(map->mob_skill_db_db, "mob_skill_db");
sprintf(map->mob_skill_db2_db, "mob_skill_db2");
- sprintf(map->interreg_db, "interreg");
map->INTER_CONF_NAME="conf/inter-server.conf";
map->LOG_CONF_NAME="conf/logs.conf";
diff --git a/src/map/map.h b/src/map/map.h
index 8d879cd56..d4ab954be 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -5,10 +5,8 @@
#ifndef MAP_MAP_H
#define MAP_MAP_H
-#include "config/core.h"
-
#include "map/atcommand.h"
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/core.h" // CORE_ST_LAST
#include "common/db.h"
#include "common/mapindex.h"
@@ -215,7 +213,13 @@ enum {
#define EVENT_NAME_LENGTH ( NAME_LENGTH * 2 + 3 )
#define DEFAULT_AUTOSAVE_INTERVAL (5*60*1000)
// Specifies maps where players may hit each other
-#define map_flag_vs(m) (map->list[m].flag.pvp || map->list[m].flag.gvg_dungeon || map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) || map->list[m].flag.battleground)
+#define map_flag_vs(m) ( \
+ map->list[m].flag.pvp \
+ || map->list[m].flag.gvg_dungeon \
+ || map->list[m].flag.gvg \
+ || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) \
+ || map->list[m].flag.battleground \
+ )
// Specifies maps that have special GvG/WoE restrictions
#define map_flag_gvg(m) (map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle))
// Specifies if the map is tagged as GvG/WoE (regardless of map->agit_flag status)
@@ -762,8 +766,6 @@ struct mapit_interface {
bool (*exists) (struct s_mapiterator* iter);
};
-struct mapit_interface *mapit;
-
#define mapit_getallusers() (mapit->alloc(MAPIT_NORMAL,BL_PC))
#define mapit_geteachpc() (mapit->alloc(MAPIT_NORMAL,BL_PC))
#define mapit_geteachmob() (mapit->alloc(MAPIT_NORMAL,BL_MOB))
@@ -861,7 +863,6 @@ struct map_interface {
char mob_db2_db[32];
char mob_skill_db_db[32];
char mob_skill_db2_db[32];
- char interreg_db[32];
char autotrade_merchants_db[32];
char autotrade_data_db[32];
char npc_market_data_db[32];
@@ -1086,10 +1087,11 @@ END_ZEROED_BLOCK;
void (*zone_clear_single) (struct map_zone_data *zone);
};
-struct map_interface *map;
-
#ifdef HERCULES_CORE
void map_defaults(void);
#endif // HERCULES_CORE
+HPShared struct mapit_interface *mapit;
+HPShared struct map_interface *map;
+
#endif /* MAP_MAP_H */
diff --git a/src/map/mapreg.h b/src/map/mapreg.h
index cafd25b64..09d051bab 100644
--- a/src/map/mapreg.h
+++ b/src/map/mapreg.h
@@ -6,7 +6,7 @@
#define MAP_MAPREG_H
#include "map/script.h" // struct reg_db
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
struct eri;
@@ -48,10 +48,10 @@ struct mapreg_interface {
bool (*config_read) (const char *w1, const char *w2);
};
-struct mapreg_interface *mapreg;
-
#ifdef HERCULES_CORE
void mapreg_defaults(void);
#endif // HERCULES_CORE
+HPShared struct mapreg_interface *mapreg;
+
#endif /* MAP_MAPREG_H */
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index bed40e295..37c830e2e 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -21,6 +21,7 @@
#include <string.h>
struct mapreg_interface mapreg_s;
+struct mapreg_interface *mapreg;
#define MAPREG_AUTOSAVE_INTERVAL (300*1000)
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index ffcb26629..ff37f396d 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -42,6 +42,9 @@
#include <string.h>
struct mercenary_interface mercenary_s;
+struct s_mercenary_db mercdb[MAX_MERCENARY_CLASS];
+
+struct mercenary_interface *mercenary;
int merc_search_index(int class_)
{
@@ -449,7 +452,7 @@ bool read_mercenarydb_sub(char* str[], int columns, int current) {
}
int read_mercenarydb(void) {
- memset(mercenary->db,0,sizeof(mercenary->db));
+ memset(mercenary->db, 0, sizeof(struct s_mercenary_db) * MAX_MERCENARY_CLASS);
sv->readdb(map->db_path, "mercenary_db.txt", ',', 26, 26, MAX_MERCENARY_CLASS, mercenary->read_db_sub);
return 0;
@@ -511,7 +514,8 @@ void mercenary_defaults(void) {
mercenary = &mercenary_s;
/* vars */
- memset(mercenary->db,0,sizeof(mercenary->db));
+ mercenary->db = mercdb;
+ memset(mercenary->db, 0, sizeof(struct s_mercenary_db) * MAX_MERCENARY_CLASS);
/* funcs */
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index 29a2c6ba0..9e0c59428 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -6,7 +6,7 @@
#include "map/status.h" // struct status_data, struct status_change
#include "map/unit.h" // struct unit_data
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
struct map_session_data;
@@ -58,7 +58,7 @@ struct mercenary_interface {
/* vars */
- struct s_mercenary_db db[MAX_MERCENARY_CLASS];
+ struct s_mercenary_db *db;
/* funcs */
@@ -97,10 +97,10 @@ struct mercenary_interface {
bool (*read_skill_db_sub) (char* str[], int columns, int current);
};
-struct mercenary_interface *mercenary;
-
#ifdef HERCULES_CORE
void mercenary_defaults(void);
#endif // HERCULES_CORE
+HPShared struct mercenary_interface *mercenary;
+
#endif /* MAP_MERCENARY_H */
diff --git a/src/map/mob.c b/src/map/mob.c
index 493e30049..f64c7e582 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -48,6 +48,7 @@
#include <string.h>
struct mob_interface mob_s;
+struct mob_interface *mob;
#define ACTIVE_AI_RANGE 2 //Distance added on top of 'AREA_SIZE' at which mobs enter active AI mode.
@@ -3402,7 +3403,7 @@ int mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, cons
int idx = pc->skill_tree[pc->class2idx(sd->status.class_)][j].idx;
int skill_id = pc->skill_tree[pc->class2idx(sd->status.class_)][j].id;
if (!skill_id || sd->status.skill[idx].lv < 1 ||
- (skill->db[idx].inf2&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL))
+ (skill->dbs->db[idx].inf2&(INF2_WEDDING_SKILL|INF2_GUILD_SKILL))
)
continue;
for(h = 0; h < map->list[sd->bl.m].zone->disabled_skills_count; h++) {
@@ -3435,7 +3436,7 @@ int mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, cons
ms[i].casttime = skill->cast_fix(&sd->bl,skill_id, ms[i].skill_lv);
ms[i].delay = 5000+skill->delay_fix(&sd->bl,skill_id, ms[i].skill_lv);
- inf = skill->db[idx].inf;
+ inf = skill->dbs->db[idx].inf;
if (inf&INF_ATTACK_SKILL) {
ms[i].target = MST_TARGET;
ms[i].cond1 = MSC_ALWAYS;
@@ -4399,13 +4400,13 @@ bool mob_parse_row_mobskilldb(char** str, int columns, int current)
if ( skill->get_casttype2(sidx) == CAST_GROUND) {//Ground skill.
if (ms->target > MST_AROUND) {
ShowWarning("mob_parse_row_mobskilldb: Wrong mob skill target for ground skill %d (%s) for %s.\n",
- ms->skill_id, skill->db[sidx].name,
+ ms->skill_id, skill->dbs->db[sidx].name,
mob_id < 0?"all mobs":mob->db_data[mob_id]->sprite);
ms->target = MST_TARGET;
}
} else if (ms->target > MST_MASTER) {
ShowWarning("mob_parse_row_mobskilldb: Wrong mob skill target 'around' for non-ground skill %d (%s) for %s.\n",
- ms->skill_id, skill->db[sidx].name,
+ ms->skill_id, skill->dbs->db[sidx].name,
mob_id < 0?"all mobs":mob->db_data[mob_id]->sprite);
ms->target = MST_TARGET;
}
diff --git a/src/map/mob.h b/src/map/mob.h
index 85d2bf9b8..4b8a054b5 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -8,7 +8,7 @@
#include "map/map.h" // struct block_list
#include "map/status.h" // struct status_data, struct status_change
#include "map/unit.h" // struct unit_data, view_data
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/mmo.h" // struct item
#define MAX_RANDOMMONSTER 5
@@ -272,8 +272,8 @@ struct item_drop_list {
#define mob_stop_walking(md, type) (unit->stop_walking(&(md)->bl, (type)))
#define mob_stop_attack(md) (unit->stop_attack(&(md)->bl))
-#define mob_is_battleground(md) ( map->list[(md)->bl.m].flag.battleground && ((md)->class_ == MOBID_BARRICADE2 || ((md)->class_ >= MOBID_FOOD_STOR && (md)->class_ <= MOBID_PINK_CRYST)) )
-#define mob_is_gvg(md) (map->list[(md)->bl.m].flag.gvg_castle && ( (md)->class_ == MOBID_EMPERIUM || (md)->class_ == MOBID_BARRICADE1 || (md)->class_ == MOBID_GUARIDAN_STONE1 || (md)->class_ == MOBID_GUARIDAN_STONE2) )
+#define mob_is_battleground(md) (map->list[(md)->bl.m].flag.battleground && ((md)->class_ == MOBID_BARRICADE2 || ((md)->class_ >= MOBID_FOOD_STOR && (md)->class_ <= MOBID_PINK_CRYST)))
+#define mob_is_gvg(md) (map->list[(md)->bl.m].flag.gvg_castle && ( (md)->class_ == MOBID_EMPERIUM || (md)->class_ == MOBID_BARRICADE1 || (md)->class_ == MOBID_GUARIDAN_STONE1 || (md)->class_ == MOBID_GUARIDAN_STONE2))
#define mob_is_treasure(md) (((md)->class_ >= MOBID_TREAS01 && (md)->class_ <= MOBID_TREAS40) || ((md)->class_ >= MOBID_TREAS41 && (md)->class_ <= MOBID_TREAS49))
struct mob_interface {
@@ -387,10 +387,10 @@ struct mob_interface {
void (*destroy_mob_db) (int index);
};
-struct mob_interface *mob;
-
#ifdef HERCULES_CORE
void mob_defaults(void);
#endif // HERCULES_CORE
+HPShared struct mob_interface *mob;
+
#endif /* MAP_MOB_H */
diff --git a/src/map/npc.c b/src/map/npc.c
index a79062c77..bb0e772ae 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -43,6 +43,7 @@
#include <time.h>
struct npc_interface npc_s;
+struct npc_interface *npc;
static int npc_id=START_NPC_NUM;
static int npc_warp=0;
@@ -396,7 +397,7 @@ void npc_event_doall_sub(void *key, void *data, va_list ap)
npc->event_sub(map->id2sd(rid), ev, buf);
}
else {
- script->run(ev->nd->u.scr.script, ev->pos, rid, ev->nd->bl.id);
+ script->run_npc(ev->nd->u.scr.script, ev->pos, rid, ev->nd->bl.id);
}
(*c)++;
}
@@ -411,7 +412,7 @@ int npc_event_do(const char* name)
else {
struct event_data *ev = strdb_get(npc->ev_db, name);
if (ev) {
- script->run(ev->nd->u.scr.script, ev->pos, 0, ev->nd->bl.id);
+ script->run_npc(ev->nd->u.scr.script, ev->pos, 0, ev->nd->bl.id);
return 1;
}
}
@@ -596,7 +597,7 @@ int npc_timerevent(int tid, int64 tick, int id, intptr_t data) {
}
// Run the script
- script->run(nd->u.scr.script,te->pos,nd->u.scr.rid,nd->bl.id);
+ script->run_npc(nd->u.scr.script,te->pos,nd->u.scr.rid,nd->bl.id);
nd->u.scr.rid = old_rid; // Attached-rid should be restored anyway.
if( sd )
@@ -745,7 +746,7 @@ void npc_timerevent_quit(struct map_session_data* sd)
nd->u.scr.timer = ted->time;
//Execute label
- script->run(nd->u.scr.script,ev->pos,sd->bl.id,nd->bl.id);
+ script->run_npc(nd->u.scr.script,ev->pos,sd->bl.id,nd->bl.id);
//Restore previous data.
nd->u.scr.rid = old_rid;
@@ -822,7 +823,7 @@ int npc_event_sub(struct map_session_data* sd, struct event_data* ev, const char
npc->event_dequeue(sd);
return 2;
}
- script->run(ev->nd->u.scr.script,ev->pos,sd->bl.id,ev->nd->bl.id);
+ script->run_npc(ev->nd->u.scr.script,ev->pos,sd->bl.id,ev->nd->bl.id);
return 0;
}
@@ -1067,7 +1068,7 @@ int npc_touch_areanpc2(struct mob_data *md)
break; // No OnTouchNPC Event
md->areanpc_id = map->list[m].npc[i]->bl.id;
id = md->bl.id; // Stores Unique ID
- script->run(ev->nd->u.scr.script, ev->pos, md->bl.id, ev->nd->bl.id);
+ script->run_npc(ev->nd->u.scr.script, ev->pos, md->bl.id, ev->nd->bl.id);
if( map->id2md(id) == NULL ) return 1; // Not Warped, but killed
break;
}
@@ -1255,7 +1256,7 @@ int npc_click(struct map_session_data* sd, struct npc_data* nd)
if( !npc->trader_open(sd,nd) )
return 1;
} else
- script->run(nd->u.scr.script,0,sd->bl.id,nd->bl.id);
+ script->run_npc(nd->u.scr.script,0,sd->bl.id,nd->bl.id);
break;
case TOMB:
npc->run_tomb(sd,nd);
@@ -1654,7 +1655,7 @@ void npc_trader_count_funds(struct npc_data *nd, struct map_session_data *sd) {
snprintf(evname, EVENT_NAME_LENGTH, "%s::OnCountFunds",nd->exname);
if ( (ev = strdb_get(npc->ev_db, evname)) )
- script->run(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);
+ script->run_npc(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);
else
ShowError("npc_trader_count_funds: '%s' event '%s' not found, operation failed\n",nd->exname,evname);
@@ -1682,7 +1683,7 @@ bool npc_trader_pay(struct npc_data *nd, struct map_session_data *sd, int price,
pc->setreg(sd,script->add_str("@price"),price);
pc->setreg(sd,script->add_str("@points"),points);
- script->run(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);
+ script->run_npc(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);
} else
ShowError("npc_trader_pay: '%s' event '%s' not found, operation failed\n",nd->exname,evname);
@@ -2535,6 +2536,8 @@ int npc_parseview(const char* w4, const char* start, const char* buffer, const c
} else {
// NPC has an ID specified for view id.
val = atoi(w4);
+ if (val != -1)
+ ShowWarning("npc_parseview: Use of numeric NPC view IDs is deprecated and may be removed in a future update. Please use NPC view constants instead. ID '%d' specified in file '%s', line '%d'.\n", val, filepath, strline(buffer, start-buffer));
}
return val;
@@ -2705,6 +2708,12 @@ const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* s
return strchr(start,'\n');// skip and continue
}
+ if (dir < 0 || dir > 7) {
+ ShowError("npc_parse_ship: Invalid NPC facing direction '%d' in file '%s', line '%d'.\n", dir, filepath, strline(buffer, start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
+ return strchr(start,'\n');//continue
+ }
+
m = map->mapname2mapid(mapname);
}
@@ -2930,6 +2939,13 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char*
script_start = strstr(start,",{");
end = strchr(start,'\n');
+
+ if (dir < 0 || dir > 7) {
+ ShowError("npc_parse_script: Invalid NPC facing direction '%d' in file '%s', line '%d'.\n", dir, filepath, strline(buffer, start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
+ return npc->skip_script(script_start, buffer, filepath, retval); // continue
+ }
+
if( strstr(w4,",{") == NULL || script_start == NULL || (end != NULL && script_start > end) )
{
ShowError("npc_parse_script: Missing left curly ',{' in file '%s', line '%d'. Skipping the rest of the file.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
@@ -3022,7 +3038,7 @@ const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char*
if( ( ev = (struct event_data*)strdb_get(npc->ev_db, evname) ) ) {
//Execute OnInit
- script->run(nd->u.scr.script,ev->pos,0,nd->bl.id);
+ script->run_npc(nd->u.scr.script,ev->pos,0,nd->bl.id);
}
}
@@ -3087,6 +3103,11 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
if (retval) *retval = EXIT_FAILURE;
return end;// next line, try to continue
}
+ if (dir < 0 || dir > 7) {
+ ShowError("npc_parse_duplicate: Invalid NPC facing direction '%d' in file '%s', line '%d'.\n", dir, filepath, strline(buffer, start-buffer));
+ if (retval) *retval = EXIT_FAILURE;
+ return end; // try next
+ }
m = map->mapname2mapid(mapname);
}
@@ -3188,7 +3209,7 @@ const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const ch
if( ( ev = (struct event_data*)strdb_get(npc->ev_db, evname) ) ) {
//Execute OnInit
- script->run(nd->u.scr.script,ev->pos,0,nd->bl.id);
+ script->run_npc(nd->u.scr.script,ev->pos,0,nd->bl.id);
}
}
@@ -3511,10 +3532,10 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
// w1=<map name>,<x>,<y>,<xs>,<ys>
// w3=<mob name>{,<mob level>}
- // w4=<mob id>,<amount>,<delay1>,<delay2>,<event>{,<mob size>,<mob ai>}
- if( sscanf(w1, "%31[^,],%d,%d,%d,%d", mapname, &x, &y, &xs, &ys) < 3
+ // w4=<mob id>,<amount>,<delay1>,<delay2>{,<event>,<mob size>,<mob ai>}
+ if( sscanf(w1, "%31[^,],%d,%d,%d,%d", mapname, &x, &y, &xs, &ys) < 5
|| sscanf(w3, "%23[^,],%d", mobname, &mob_lv) < 1
- || sscanf(w4, "%d,%d,%u,%u,%50[^,],%d,%d[^\t\r\n]", &class_, &num, &mobspawn.delay1, &mobspawn.delay2, mobspawn.eventname, &size, &ai) < 2
+ || sscanf(w4, "%d,%d,%u,%u,%50[^,],%d,%d[^\t\r\n]", &class_, &num, &mobspawn.delay1, &mobspawn.delay2, mobspawn.eventname, &size, &ai) < 4
) {
ShowError("npc_parse_mob: Invalid mob definition in file '%s', line '%d'.\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
if (retval) *retval = EXIT_FAILURE;
diff --git a/src/map/npc.h b/src/map/npc.h
index bc779b56b..14b89d128 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -8,7 +8,7 @@
#include "map/map.h" // struct block_list
#include "map/status.h" // struct status_change
#include "map/unit.h" // struct unit_data
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
struct HPluginData;
@@ -279,12 +279,11 @@ struct npc_interface {
int (*secure_timeout_timer) (int tid, int64 tick, int id, intptr_t data);
};
-struct npc_interface *npc;
-
#ifdef HERCULES_CORE
void npc_defaults(void);
#endif // HERCULES_CORE
+HPShared struct npc_interface *npc;
/* comes from npc_chat.c */
#ifdef PCRE_SUPPORT
@@ -326,8 +325,6 @@ struct npc_chat_interface {
void (*finalize_pcrematch_entry) (struct pcrematch_entry* e);
};
-struct npc_chat_interface *npc_chat;
-
/**
* pcre interface (libpcre)
* so that plugins may share and take advantage of the core's pcre
@@ -344,14 +341,16 @@ struct pcre_interface {
int (*get_substring) (const char *subject, int *ovector, int stringcount, int stringnumber, const char **stringptr);
};
-struct pcre_interface *libpcre;
-
/**
* Also defaults libpcre
**/
#ifdef HERCULES_CORE
void npc_chat_defaults(void);
#endif // HERCULES_CORE
+
+HPShared struct npc_chat_interface *npc_chat;
+HPShared struct pcre_interface *libpcre;
+
#endif // PCRE_SUPPORT
#endif /* MAP_NPC_H */
diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c
index 3fe379f36..0b9023ede 100644
--- a/src/map/npc_chat.c
+++ b/src/map/npc_chat.c
@@ -30,6 +30,8 @@
struct npc_chat_interface npc_chat_s;
struct pcre_interface libpcre_s;
+struct npc_chat_interface *npc_chat;
+struct pcre_interface *libpcre;
/**
* Written by MouseJstr in a vision... (2/21/2005)
@@ -371,7 +373,7 @@ int npc_chat_sub(struct block_list* bl, va_list ap)
}
// run the npc script
- script->run(nd->u.scr.script,lst[i].pos,sd->bl.id,nd->bl.id);
+ script->run_npc(nd->u.scr.script,lst[i].pos,sd->bl.id,nd->bl.id);
return 0;
}
}
diff --git a/src/map/party.c b/src/map/party.c
index 6b35debe5..472c03423 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -35,6 +35,7 @@
#include <string.h>
struct party_interface party_s;
+struct party_interface *party;
/*==========================================
* Fills the given party_member structure according to the sd provided.
diff --git a/src/map/party.h b/src/map/party.h
index 95faa2213..c7893add2 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -6,7 +6,7 @@
#define MAP_PARTY_H
#include "map/map.h" // TBL_PC
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
#include "common/mmo.h" // struct party
@@ -139,10 +139,10 @@ struct party_interface {
int (*db_final) (DBKey key, DBData *data, va_list ap);
};
-struct party_interface *party;
-
#ifdef HERCULES_CORE
void party_defaults(void);
#endif // HERCULES_CORE
+HPShared struct party_interface *party;
+
#endif /* MAP_PARTY_H */
diff --git a/src/map/path.c b/src/map/path.c
index 3ded5423e..723fd8e8f 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -29,6 +29,7 @@
#define DIR_EAST 8
struct path_interface path_s;
+struct path_interface *path;
/// @name Structures and defines for A* pathfinding
/// @{
diff --git a/src/map/path.h b/src/map/path.h
index bbd81b8c6..2ece8f84b 100644
--- a/src/map/path.h
+++ b/src/map/path.h
@@ -6,7 +6,7 @@
#define MAP_PATH_H
#include "map/map.h" // enum cell_chk
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#define MOVE_COST 10
#define MOVE_DIAGONAL_COST 14
@@ -53,10 +53,10 @@ struct path_interface {
int (*distance_client) (int dx, int dy);
};
-struct path_interface *path;
-
#ifdef HERCULES_CORE
void path_defaults(void);
#endif // HERCULES_CORE
+HPShared struct path_interface *path;
+
#endif /* MAP_PATH_H */
diff --git a/src/map/pc.c b/src/map/pc.c
index b9ef479dc..49b8f1f94 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -45,7 +45,7 @@
#include "common/nullpo.h"
#include "common/random.h"
#include "common/showmsg.h"
-#include "common/socket.h" // session[]
+#include "common/socket.h"
#include "common/strlib.h" // safestrncpy()
#include "common/sysinfo.h"
#include "common/timer.h"
@@ -57,6 +57,7 @@
#include <time.h>
struct pc_interface pc_s;
+struct pc_interface *pc;
//Converts a class to its array index for CLASS_COUNT defined arrays.
//Note that it does not do a validity check for speed purposes, where parsing
@@ -651,6 +652,7 @@ int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int lo
sd->canlog_tick = timer->gettick();
//Required to prevent homunculus copuing a base speed of 0.
sd->battle_status.speed = sd->base_status.speed = DEFAULT_WALK_SPEED;
+ sd->state.warp_clean = 1;
return 0;
}
@@ -1006,7 +1008,7 @@ int pc_isequip(struct map_session_data *sd,int n)
bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers) {
int i;
int64 tick = timer->gettick();
- uint32 ip = session[sd->fd]->client_addr;
+ uint32 ip = sockt->session[sd->fd]->client_addr;
sd->login_id2 = login_id2;
@@ -1389,7 +1391,7 @@ int pc_calc_skillpoint(struct map_session_data* sd) {
for (i = 1; i < MAX_SKILL; i++) {
int skill_lv = pc->checkskill2(sd,i);
if (skill_lv > 0) {
- inf2 = skill->db[i].inf2;
+ inf2 = skill->dbs->db[i].inf2;
if((!(inf2&INF2_QUEST_SKILL) || battle_config.quest_skill_learn) &&
!(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL|INF2_GUILD_SKILL)) //Do not count wedding/link skills. [Skotlex]
) {
@@ -1428,7 +1430,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
sd->status.skill[i].id = 0; //First clear skills.
/* permanent skills that must be re-checked */
if( sd->status.skill[i].flag == SKILL_FLAG_PERMANENT ) {
- switch( skill->db[i].nameid ) {
+ switch( skill->dbs->db[i].nameid ) {
case NV_TRICKDEAD:
if( (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE ) {
sd->status.skill[i].id = 0;
@@ -1447,21 +1449,21 @@ int pc_calc_skilltree(struct map_session_data *sd)
sd->status.skill[i].flag = SKILL_FLAG_PERMANENT;
}
- if( sd->sc.count && sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_BARDDANCER && skill->db[i].nameid >= DC_HUMMING && skill->db[i].nameid <= DC_SERVICEFORYOU )
+ if( sd->sc.count && sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_BARDDANCER && skill->dbs->db[i].nameid >= DC_HUMMING && skill->dbs->db[i].nameid <= DC_SERVICEFORYOU )
{ //Enable Bard/Dancer spirit linked skills.
if( sd->status.sex )
{ //Link dancer skills to bard.
// i can be < 8?
if( sd->status.skill[i-8].lv < 10 )
continue;
- sd->status.skill[i].id = skill->db[i].nameid;
+ sd->status.skill[i].id = skill->dbs->db[i].nameid;
sd->status.skill[i].lv = sd->status.skill[i-8].lv; // Set the level to the same as the linking skill
sd->status.skill[i].flag = SKILL_FLAG_TEMPORARY; // Tag it as a non-savable, non-uppable, bonus skill
} else { //Link bard skills to dancer.
if( sd->status.skill[i].lv < 10 )
continue;
// i can be < 8?
- sd->status.skill[i-8].id = skill->db[i-8].nameid;
+ sd->status.skill[i-8].id = skill->dbs->db[i-8].nameid;
sd->status.skill[i-8].lv = sd->status.skill[i].lv; // Set the level to the same as the linking skill
sd->status.skill[i-8].flag = SKILL_FLAG_TEMPORARY; // Tag it as a non-savable, non-uppable, bonus skill
}
@@ -1470,7 +1472,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
if( pc_has_permission(sd, PC_PERM_ALL_SKILL) ) {
for( i = 0; i < MAX_SKILL; i++ ) {
- switch(skill->db[i].nameid) {
+ switch(skill->dbs->db[i].nameid) {
/**
* Dummy skills must be added here otherwise they'll be displayed in the,
* skill tree and since they have no icons they'll give resource errors
@@ -1493,10 +1495,10 @@ int pc_calc_skilltree(struct map_session_data *sd)
default:
break;
}
- if( skill->db[i].inf2&(INF2_NPC_SKILL|INF2_GUILD_SKILL) )
+ if( skill->dbs->db[i].inf2&(INF2_NPC_SKILL|INF2_GUILD_SKILL) )
continue; //Only skills you can't have are npc/guild ones
- if( skill->db[i].max > 0 )
- sd->status.skill[i].id = skill->db[i].nameid;
+ if( skill->dbs->db[i].max > 0 )
+ sd->status.skill[i].id = skill->dbs->db[i].nameid;
}
return 0;
}
@@ -1539,7 +1541,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
}
if( f ) {
int inf2;
- inf2 = skill->db[idx].inf2;
+ inf2 = skill->dbs->db[idx].inf2;
if(!sd->status.skill[idx].lv && (
(inf2&INF2_QUEST_SKILL && !battle_config.quest_skill_learn) ||
@@ -1570,7 +1572,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
for( i = 0; i < MAX_SKILL_TREE && (id = pc->skill_tree[c][i].id) > 0; i++ ) {
int idx = pc->skill_tree[c][i].idx;
- if( (skill->db[idx].inf2&(INF2_QUEST_SKILL|INF2_WEDDING_SKILL)) )
+ if( (skill->dbs->db[idx].inf2&(INF2_QUEST_SKILL|INF2_WEDDING_SKILL)) )
continue; //Do not include Quest/Wedding skills.
if( sd->status.skill[idx].id == 0 ) {
@@ -1640,7 +1642,7 @@ void pc_check_skilltree(struct map_session_data *sd, int skill_id)
continue;
}
- j = skill->db[idx].inf2;
+ j = skill->dbs->db[idx].inf2;
if( !sd->status.skill[idx].lv && (
(j&INF2_QUEST_SKILL && !battle_config.quest_skill_learn) ||
j&INF2_WEDDING_SKILL ||
@@ -2833,7 +2835,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
}
if ( type2 >= RC_MAX ) {
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ) {
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -2886,7 +2888,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
if(sd->state.lr_flag != 2) {
if (type2 >= RC_MAX ) {
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -2947,7 +2949,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
if(sd->state.lr_flag != 2){
if ( type2 >= RC_MAX ){
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3148,7 +3150,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
if(sd->state.lr_flag == 2)
break;
if ( type2 >= RC_MAX ) {
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3177,7 +3179,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
if(sd->state.lr_flag != 2){
if ( type2 >= RC_MAX ){
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3267,23 +3269,17 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
sd->skillblown[i].val = val;
}
break;
- #ifndef RENEWAL_CAST
+#ifndef RENEWAL_CAST
case SP_VARCASTRATE:
- #endif
+#endif
case SP_CASTRATE:
if(sd->state.lr_flag == 2)
break;
ARR_FIND(0, ARRAYLENGTH(sd->skillcast), i, sd->skillcast[i].id == 0 || sd->skillcast[i].id == type2);
if (i == ARRAYLENGTH(sd->skillcast)) {
//Better mention this so the array length can be updated. [Skotlex]
- ShowDebug("script->run: bonus2 %s reached it's limit (%"PRIuS" skills per character), bonus skill %d (+%d%%) lost.\n",
-
- #ifndef RENEWAL_CAST
- "bCastRate",
- #else
- "bVariableCastrate",
- #endif
-
+ ShowDebug("script->run: bonus2 %s reached its limit (%"PRIuS" skills per character), bonus skill %d (+%d%%) lost.\n",
+ type == SP_CASTRATE ? "bCastRate" : "bVariableCastrate",
ARRAYLENGTH(sd->skillcast), type2, val);
break;
}
@@ -3366,7 +3362,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
if(sd->state.lr_flag != 2) {
if ( type2 >= RC_MAX ){
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3387,7 +3383,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
if(sd->state.lr_flag != 2) {
if ( type2 >= RC_MAX ){
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3423,7 +3419,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
}
if ( type2 >= RC_MAX ){
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3452,7 +3448,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
}
if ( type2 >= RC_MAX ){
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3490,7 +3486,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
if(sd->state.lr_flag != 2) {
if ( type2 >= RC_MAX ) {
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3511,7 +3507,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
if(sd->state.lr_flag != 2) {
if ( type2 >= RC_MAX ) {
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3635,7 +3631,7 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
if(sd->state.lr_flag != 2) {
if ( type2 >= RC_MAX ) {
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3714,7 +3710,7 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
break;
}
if ( type2 >= RC_MAX ) {
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3747,7 +3743,7 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
break;
}
if ( type2 >= RC_MAX ) {
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3887,7 +3883,7 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4
if(sd->state.lr_flag == 2)
break;
if ( type2 >= RC_MAX ) {
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -3913,7 +3909,7 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4
if(sd->state.lr_flag == 2)
break;
if ( type2 >= RC_MAX ) {
- for ( i = RC_FORMLESS; i < RC_MAX; i++ ){
+ for ( i = RC_FORMLESS; i < RC_BOSS; i++ ) {
if ( (type2 == RC_NONPLAYER && i == RC_PLAYER) ||
(type2 == RC_NONDEMIHUMAN && i == RC_DEMIHUMAN) ||
(type2 == RC_DEMIPLAYER && (i != RC_PLAYER && i != RC_DEMIHUMAN)) ||
@@ -4017,7 +4013,7 @@ int pc_skill(TBL_PC* sd, int id, int level, int flag)
clif->deleteskill(sd,id);
} else
clif->addskill(sd,id);
- if( !skill->db[index].inf ) //Only recalculate for passive skills.
+ if( !skill->dbs->db[index].inf ) //Only recalculate for passive skills.
status_calc_pc(sd, SCO_NONE);
break;
case SKILL_GRANT_TEMPORARY: //Item bonus skill.
@@ -4051,7 +4047,7 @@ int pc_skill(TBL_PC* sd, int id, int level, int flag)
clif->deleteskill(sd,id);
} else
clif->addskill(sd,id);
- if( !skill->db[index].inf ) //Only recalculate for passive skills.
+ if( !skill->dbs->db[index].inf ) //Only recalculate for passive skills.
status_calc_pc(sd, SCO_NONE);
break;
default: //Unknown flag?
@@ -4881,7 +4877,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
int pc_useitem(struct map_session_data *sd,int n) {
int64 tick = timer->gettick();
int amount, nameid, i;
- struct script_code *item_script;
+ bool removeItem = false;
nullpo_ret(sd);
@@ -4993,38 +4989,36 @@ int pc_useitem(struct map_session_data *sd,int n) {
sd->catch_target_class = -1;
amount = sd->status.inventory[n].amount;
- item_script = sd->inventory_data[n]->script;
//Check if the item is to be consumed immediately [Skotlex]
if (sd->inventory_data[n]->flag.delay_consume || sd->inventory_data[n]->flag.keepafteruse)
clif->useitemack(sd,n,amount,true);
else {
if (sd->status.inventory[n].expire_time == 0) {
clif->useitemack(sd, n, amount - 1, true);
- pc->delitem(sd, n, 1, 1, DELITEM_NORMAL, LOG_TYPE_CONSUME); // Rental Usable Items are not deleted until expiration
+ removeItem = true;
} else {
clif->useitemack(sd, n, 0, false);
}
}
+
if(sd->status.inventory[n].card[0]==CARD0_CREATE &&
pc->famerank(MakeDWord(sd->status.inventory[n].card[2],sd->status.inventory[n].card[3]), MAPID_ALCHEMIST))
{
- script->potion_flag = 2; // Famous player's potions have 50% more efficiency
- if (sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_ROGUE)
- script->potion_flag = 3; //Even more effective potions.
+ script->potion_flag = 2; // Famous player's potions have 50% more efficiency
+ if (sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_ROGUE)
+ script->potion_flag = 3; //Even more effective potions.
}
//Update item use time.
sd->canuseitem_tick = tick + battle_config.item_use_interval;
if( itemdb_iscashfood(nameid) )
sd->canusecashfood_tick = tick + battle_config.cashfood_use_interval;
-
- script->current_item_id = nameid;
-
- script->run(item_script,0,sd->bl.id,npc->fake_nd->bl.id);
-
- script->current_item_id = 0;
+
+ script->run_use_script(sd, sd->inventory_data[n], npc->fake_nd->bl.id);
script->potion_flag = 0;
-
+
+ if (removeItem)
+ pc->delitem(sd, n, 1, 1, DELITEM_NORMAL, LOG_TYPE_CONSUME);
return 1;
}
@@ -5706,14 +5700,14 @@ int pc_checkskill2(struct map_session_data *sd,uint16 index) {
ShowError("pc_checkskill: Invalid skill index %d (char_id=%d).\n", index, sd->status.char_id);
return 0;
}
- if( skill->db[index].nameid >= GD_SKILLBASE && skill->db[index].nameid < GD_MAX ) {
+ if( skill->dbs->db[index].nameid >= GD_SKILLBASE && skill->dbs->db[index].nameid < GD_MAX ) {
struct guild *g;
if( sd->status.guild_id>0 && (g=sd->guild)!=NULL)
- return guild->checkskill(g,skill->db[index].nameid);
+ return guild->checkskill(g,skill->dbs->db[index].nameid);
return 0;
}
- if(sd->status.skill[index].id == skill->db[index].nameid)
+ if(sd->status.skill[index].id == skill->dbs->db[index].nameid)
return (sd->status.skill[index].lv);
return 0;
@@ -7015,7 +7009,7 @@ int pc_skillup(struct map_session_data *sd,uint16 skill_id) {
{
sd->status.skill[index].lv++;
sd->status.skill_point--;
- if( !skill->db[index].inf )
+ if( !skill->dbs->db[index].inf )
status_calc_pc(sd,SCO_NONE); // Only recalculate for passive skills.
else if( sd->status.skill_point == 0 && (sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc->famerank(sd->status.char_id, MAPID_TAEKWON) )
pc->calc_skilltree(sd); // Required to grant all TK Ranger skills.
@@ -7060,22 +7054,22 @@ int pc_allskillup(struct map_session_data *sd)
if (pc_has_permission(sd, PC_PERM_ALL_SKILL)) { //Get ALL skills except npc/guild ones. [Skotlex]
//and except SG_DEVIL [Komurka] and MO_TRIPLEATTACK and RG_SNATCHER [ultramage]
for(i=0;i<MAX_SKILL;i++){
- switch( skill->db[i].nameid ) {
+ switch( skill->dbs->db[i].nameid ) {
case SG_DEVIL:
case MO_TRIPLEATTACK:
case RG_SNATCHER:
continue;
default:
- if( !(skill->db[i].inf2&(INF2_NPC_SKILL|INF2_GUILD_SKILL)) )
- if ( ( sd->status.skill[i].lv = skill->db[i].max ) )//Nonexistant skills should return a max of 0 anyway.
- sd->status.skill[i].id = skill->db[i].nameid;
+ if( !(skill->dbs->db[i].inf2&(INF2_NPC_SKILL|INF2_GUILD_SKILL)) )
+ if ( ( sd->status.skill[i].lv = skill->dbs->db[i].max ) )//Nonexistant skills should return a max of 0 anyway.
+ sd->status.skill[i].id = skill->dbs->db[i].nameid;
}
}
} else {
int id;
for (i = 0; i < MAX_SKILL_TREE && (id=pc->skill_tree[pc->class2idx(sd->status.class_)][i].id) > 0; i++) {
int idx = pc->skill_tree[pc->class2idx(sd->status.class_)][i].idx;
- int inf2 = skill->db[idx].inf2;
+ int inf2 = skill->dbs->db[idx].inf2;
if (
(inf2&INF2_QUEST_SKILL && !battle_config.quest_skill_learn) ||
(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL)) ||
@@ -7298,17 +7292,17 @@ int pc_resetskill(struct map_session_data* sd, int flag)
for( i = 1; i < MAX_SKILL; i++ ) {
// FIXME: We're looping on i = [1..MAX_SKILL-1] (which makes sense as index for sd->status.skill[]) but then we're using the
- // same i to access skill->db[], and especially to check skill_ischangesex(). This is wrong.
+ // same i to access skill->dbs->db[], and especially to check skill_ischangesex(). This is wrong.
uint16 skill_id = 0;
int lv = sd->status.skill[i].lv;
if (lv < 1) continue;
- inf2 = skill->db[i].inf2;
+ inf2 = skill->dbs->db[i].inf2;
if( inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL) ) //Avoid reseting wedding/linker skills.
continue;
- skill_id = skill->db[i].nameid;
+ skill_id = skill->dbs->db[i].nameid;
// Don't reset trick dead if not a novice/baby
if( skill_id == NV_TRICKDEAD && (sd->class_&(MAPID_BASEMASK|JOBL_2)) != MAPID_NOVICE ) {
@@ -9015,7 +9009,7 @@ int pc_readregistry(struct map_session_data *sd, int64 reg) {
ShowError("pc_readregistry: Trying to read reg %s before it's been loaded!\n", script->get_str(script_getvarid(reg)));
//This really shouldn't happen, so it's possible the data was lost somewhere, we should request it again.
//intif->request_registry(sd,type==3?4:type);
- set_eof(sd->fd);
+ sockt->eof(sd->fd);
return 0;
}
@@ -9036,7 +9030,7 @@ char* pc_readregistry_str(struct map_session_data *sd, int64 reg) {
ShowError("pc_readregistry_str: Trying to read reg %s before it's been loaded!\n", script->get_str(script_getvarid(reg)));
//This really shouldn't happen, so it's possible the data was lost somewhere, we should request it again.
//intif->request_registry(sd,type==3?4:type);
- set_eof(sd->fd);
+ sockt->eof(sd->fd);
return NULL;
}
@@ -9439,7 +9433,14 @@ int pc_load_combo(struct map_session_data *sd) {
return ret;
}
-void pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int pos)
+/**
+* Equip item ad given position.
+* @param sd the affected player structure. Must be checked before.
+* @param id item structure for equip. Must be checked before.
+* @param n inventory item position. Must be checked before.
+* @param pos slot position. Must be checked before.
+**/
+void pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int n, int pos)
{
if (pos & (EQP_HAND_R|EQP_SHADOW_WEAPON)) {
if(id)
@@ -9613,7 +9614,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
sd->status.inventory[n].equip=pos;
- pc->equipitem_pos(sd, id, pos);
+ pc->equipitem_pos(sd, id, n, pos);
pc->checkallowskill(sd); //Check if status changes should be halted.
iflag = sd->npc_item_flag;
@@ -9641,7 +9642,8 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
//OnEquip script [Skotlex]
if (id->equip_script)
- script->run(id->equip_script,0,sd->bl.id,npc->fake_nd->bl.id);
+ script->run_item_equip_script(sd, id, npc->fake_nd->bl.id);
+
if(itemdb_isspecial(sd->status.inventory[n].card[0]))
; //No cards
else {
@@ -9650,8 +9652,8 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
if (!sd->status.inventory[n].card[i])
continue;
if ( ( data = itemdb->exists(sd->status.inventory[n].card[i]) ) != NULL ) {
- if( data->equip_script )
- script->run(data->equip_script,0,sd->bl.id,npc->fake_nd->bl.id);
+ if (data->equip_script)
+ script->run_item_equip_script(sd, data, npc->fake_nd->bl.id);
}
}
}
@@ -9660,6 +9662,12 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
return 1;
}
+/**
+* Unrquip item ad given position.
+* @param sd the affected player structure. Must be checked before.
+* @param n inventory item position. Must be checked before.
+* @param pos slot position. Must be checked before.
+**/
void pc_unequipitem_pos(struct map_session_data *sd, int n, int pos)
{
if (pos & EQP_HAND_R) {
@@ -9818,10 +9826,10 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
if ( battle_config.unequip_restricted_equipment & 1 ) {
ARR_FIND(0, map->list[sd->bl.m].zone->disabled_items_count, i, map->list[sd->bl.m].zone->disabled_items[i] == sd->status.inventory[n].nameid);
if ( i == map->list[sd->bl.m].zone->disabled_items_count )
- script->run(sd->inventory_data[n]->unequip_script,0,sd->bl.id,npc->fake_nd->bl.id);
+ script->run_item_unequip_script(sd, sd->inventory_data[n], npc->fake_nd->bl.id);
}
else
- script->run(sd->inventory_data[n]->unequip_script,0,sd->bl.id,npc->fake_nd->bl.id);
+ script->run_item_unequip_script(sd, sd->inventory_data[n], npc->fake_nd->bl.id);
}
if(itemdb_isspecial(sd->status.inventory[n].card[0]))
; //No cards
@@ -9837,10 +9845,10 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
int j;
ARR_FIND(0, map->list[sd->bl.m].zone->disabled_items_count, j, map->list[sd->bl.m].zone->disabled_items[j] == sd->status.inventory[n].card[i]);
if ( j == map->list[sd->bl.m].zone->disabled_items_count )
- script->run(data->unequip_script,0,sd->bl.id,npc->fake_nd->bl.id);
+ script->run_item_unequip_script(sd, data, npc->fake_nd->bl.id);
}
else
- script->run(data->unequip_script,0,sd->bl.id,npc->fake_nd->bl.id);
+ script->run_item_unequip_script(sd, data, npc->fake_nd->bl.id);
}
}
diff --git a/src/map/pc.h b/src/map/pc.h
index c370f9956..85bbd2016 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -5,8 +5,6 @@
#ifndef MAP_PC_H
#define MAP_PC_H
-#include "config/core.h" // AUTOLOOTITEM_SIZE, RENEWAL, SECURE_NPCTIMEOUT
-
#include "map/battle.h" // battle
#include "map/battleground.h" // enum bg_queue_types
#include "map/buyingstore.h" // struct s_buyingstore
@@ -19,7 +17,7 @@
#include "map/status.h" // enum sc_type, OPTION_*
#include "map/unit.h" // struct unit_data, struct view_data
#include "map/vending.h" // struct s_vending
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/ers.h" // struct eri
#include "common/mmo.h" // JOB_*, MAX_FAME_LIST, struct fame_list, struct mmo_charstatus, NEW_CARTS
@@ -206,6 +204,7 @@ struct map_session_data {
unsigned int itemcheck : 1;
unsigned int standalone : 1;/* [Ind/Hercules <3] */
unsigned int loggingout : 1;
+ unsigned int warp_clean : 1;
} state;
struct {
unsigned char no_weapon_damage, no_magic_damage, no_misc_damage;
@@ -914,7 +913,7 @@ END_ZEROED_BLOCK; /* End */
int (*resetfeel) (struct map_session_data *sd);
int (*resethate) (struct map_session_data *sd);
int (*equipitem) (struct map_session_data *sd,int n,int req_pos);
- void (*equipitem_pos) (struct map_session_data *sd, struct item_data *id, int pos);
+ void (*equipitem_pos) (struct map_session_data *sd, struct item_data *id, int n, int pos);
int (*unequipitem) (struct map_session_data *sd,int n,int flag);
void (*unequipitem_pos) (struct map_session_data *sd, int n, int pos);
int (*checkitem) (struct map_session_data *sd);
@@ -1071,10 +1070,10 @@ END_ZEROED_BLOCK; /* End */
int (*check_job_name) (const char *name);
};
-struct pc_interface *pc;
-
#ifdef HERCULES_CORE
void pc_defaults(void);
#endif // HERCULES_CORE
+HPShared struct pc_interface *pc;
+
#endif /* MAP_PC_H */
diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c
index f9a442d97..28bef6a85 100644
--- a/src/map/pc_groups.c
+++ b/src/map/pc_groups.c
@@ -21,6 +21,7 @@
static GroupSettings dummy_group; ///< dummy group used in dummy map sessions @see pc_get_dummy_sd()
struct pc_groups_interface pcg_s;
+struct pc_groups_interface *pcg;
/**
* Returns dummy group.
diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h
index 4fee312a4..6f92a7955 100644
--- a/src/map/pc_groups.h
+++ b/src/map/pc_groups.h
@@ -5,7 +5,7 @@
#ifndef MAP_PC_GROUPS_H
#define MAP_PC_GROUPS_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/conf.h"
#include "common/db.h"
@@ -96,10 +96,10 @@ struct pc_groups_interface {
int (*get_idx) (GroupSettings *group);
};
-struct pc_groups_interface *pcg;
-
#ifdef HERCULES_CORE
void pc_groups_defaults(void);
#endif // HERCULES_CORE
+HPShared struct pc_groups_interface *pcg;
+
#endif /* MAP_PC_GROUPS_H */
diff --git a/src/map/pet.c b/src/map/pet.c
index 2379ec984..1ac6d117a 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -37,6 +37,7 @@
#include <string.h>
struct pet_interface pet_s;
+struct pet_interface *pet;
#define MIN_PETTHINKTIME 100
@@ -367,7 +368,7 @@ int pet_data_init(struct map_session_data *sd, struct s_pet *petinfo)
pd->state.skillbonus = 0;
if( battle_config.pet_status_support )
- script->run(pet->db[i].pet_script,0,sd->bl.id,0);
+ script->run_pet(pet->db[i].pet_script,0,sd->bl.id,0);
if( pd->petDB ) {
if( pd->petDB->equip_script )
diff --git a/src/map/pet.h b/src/map/pet.h
index 06302c9b2..84df856bf 100644
--- a/src/map/pet.h
+++ b/src/map/pet.h
@@ -8,7 +8,7 @@
#include "map/map.h" // struct block_list
#include "map/status.h" // enum sc_type
#include "map/unit.h" // struct unit_data
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/mmo.h" // NAME_LENGTH, struct s_pet
#define MAX_PET_DB 300
@@ -153,10 +153,10 @@ struct pet_interface {
int (*read_db) ();
};
-struct pet_interface *pet;
-
#ifdef HERCULES_CORE
void pet_defaults(void);
#endif // HERCULES_CORE
+HPShared struct pet_interface *pet;
+
#endif /* MAP_PET_H */
diff --git a/src/map/quest.c b/src/map/quest.c
index da5f73caa..ddbd2f92d 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -37,6 +37,9 @@
#include <time.h>
struct quest_interface quest_s;
+struct quest_db *db_data[MAX_QUEST_DB]; ///< Quest database
+
+struct quest_interface *quest;
/**
* Searches a quest by ID.
@@ -618,6 +621,7 @@ void do_reload_quest(void) {
*/
void quest_defaults(void) {
quest = &quest_s;
+ quest->db_data = db_data;
memset(&quest->db, 0, sizeof(quest->db));
memset(&quest->dummy, 0, sizeof(quest->dummy));
diff --git a/src/map/quest.h b/src/map/quest.h
index 014f82527..ccb3e58f9 100644
--- a/src/map/quest.h
+++ b/src/map/quest.h
@@ -6,7 +6,7 @@
#define MAP_QUEST_H
#include "map/map.h" // TBL_PC
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/conf.h"
#define MAX_QUEST_DB (60355+1) // Highest quest ID + 1
@@ -40,7 +40,7 @@ enum quest_check_type {
};
struct quest_interface {
- struct quest_db *db_data[MAX_QUEST_DB]; ///< Quest database
+ struct quest_db **db_data; ///< Quest database
struct quest_db dummy; ///< Dummy entry for invalid quest lookups
/* */
void (*init) (bool minimal);
@@ -61,10 +61,10 @@ struct quest_interface {
struct quest_db *(*read_db_sub) (config_setting_t *cs, int n, const char *source);
};
-struct quest_interface *quest;
-
#ifdef HERCULES_CORE
void quest_defaults(void);
#endif // HERCULES_CORE
+HPShared struct quest_interface *quest;
+
#endif /* MAP_QUEST_H */
diff --git a/src/map/script.c b/src/map/script.c
index 30af4d0f7..cbbf306d1 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -62,6 +62,7 @@
#endif
struct script_interface script_s;
+struct script_interface *script;
static inline int GETVALUE(const unsigned char* buf, int i) {
return (int)MakeDWord(MakeWord(buf[i], buf[i+1]), MakeWord(buf[i+2], 0));
@@ -4035,7 +4036,7 @@ int run_func(struct script_state *st)
/*==========================================
* script execution
*------------------------------------------*/
-void run_script(struct script_code *rootscript,int pos,int rid,int oid) {
+void run_script(struct script_code *rootscript, int pos, int rid, int oid) {
struct script_state *st;
if( rootscript == NULL || pos < 0 )
@@ -5763,6 +5764,7 @@ BUILDIN(warp)
{
int ret;
int x,y;
+ int warp_clean = 1;
const char* str;
TBL_PC* sd;
@@ -5774,6 +5776,11 @@ BUILDIN(warp)
x = script_getnum(st,3);
y = script_getnum(st,4);
+ if (script_hasdata(st, 5)) {
+ warp_clean = script_getnum(st, 5);
+ }
+
+ sd->state.warp_clean = warp_clean;
if(strcmp(str,"Random")==0)
ret = pc->randomwarp(sd,CLR_TELEPORT);
else if(strcmp(str,"SavePoint")==0 || strcmp(str,"Save")==0)
@@ -10447,7 +10454,7 @@ BUILDIN(itemeffect) {
}
}
- script->run( item_data->script, 0, sd->bl.id, nd->bl.id );
+ script->run_use_script(sd, item_data, nd->bl.id);
return true;
}
@@ -18259,22 +18266,22 @@ BUILDIN(getcharip) {
}
/* check for sd and IP */
- if (!sd || !session[sd->fd]->client_addr)
+ if (!sd || !sockt->session[sd->fd]->client_addr)
{
script_pushconststr(st, "");
return true;
}
/* return the client ip_addr converted for output */
- if (sd && sd->fd && session[sd->fd])
+ if (sd && sd->fd && sockt->session[sd->fd])
{
/* initiliaze */
const char *ip_addr = NULL;
uint32 ip;
/* set ip, ip_addr and convert to ip and push str */
- ip = session[sd->fd]->client_addr;
- ip_addr = ip2str(ip, NULL);
+ ip = sockt->session[sd->fd]->client_addr;
+ ip_addr = sockt->ip2str(ip, NULL);
script_pushstrcopy(st, ip_addr);
}
@@ -19828,6 +19835,54 @@ bool script_hp_add(char *name, char *args, bool (*func)(struct script_state *st)
return script->add_builtin(&buildin, true);
}
+void script_run_use_script(struct map_session_data *sd, struct item_data *data, int oid) __attribute__((nonnull (1)));
+
+/**
+ * Run use script for item.
+ *
+ * @param sd player session data. Must be correct and checked before.
+ * @param n item index in inventory. Must be correct and checked before.
+ * @param oid npc id. Can be also 0 or fake npc id.
+ */
+void script_run_use_script(struct map_session_data *sd, struct item_data *data, int oid)
+{
+ script->current_item_id = data->nameid;
+ script->run(data->script, 0, sd->bl.id, oid);
+ script->current_item_id = 0;
+}
+
+void script_run_item_equip_script(struct map_session_data *sd, struct item_data *data, int oid) __attribute__((nonnull (1, 2)));
+
+/**
+ * Run item equip script for item.
+ *
+ * @param sd player session data. Must be correct and checked before.
+ * @param data equipped item data. Must be correct and checked before.
+ * @param oid npc id. Can be also 0 or fake npc id.
+ */
+void script_run_item_equip_script(struct map_session_data *sd, struct item_data *data, int oid)
+{
+ script->current_item_id = data->nameid;
+ script->run(data->equip_script, 0, sd->bl.id, oid);
+ script->current_item_id = 0;
+}
+
+void script_run_item_unequip_script(struct map_session_data *sd, struct item_data *data, int oid) __attribute__((nonnull (1, 2)));
+
+/**
+ * Run item unequip script for item.
+ *
+ * @param sd player session data. Must be correct and checked before.
+ * @param data unequipped item data. Must be correct and checked before.
+ * @param oid npc id. Can be also 0 or fake npc id.
+ */
+void script_run_item_unequip_script(struct map_session_data *sd, struct item_data *data, int oid)
+{
+ script->current_item_id = data->nameid;
+ script->run(data->unequip_script, 0, sd->bl.id, oid);
+ script->current_item_id = 0;
+}
+
#define BUILDIN_DEF(x,args) { buildin_ ## x , #x , args, false }
#define BUILDIN_DEF2(x,x2,args) { buildin_ ## x , x2 , args, false }
#define BUILDIN_DEF_DEPRECATED(x,args) { buildin_ ## x , #x , args, true }
@@ -19855,7 +19910,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(jobchange,"i?"),
BUILDIN_DEF(jobname,"i"),
BUILDIN_DEF(input,"r??"),
- BUILDIN_DEF(warp,"sii"),
+ BUILDIN_DEF(warp,"sii?"),
BUILDIN_DEF(areawarp,"siiiisii??"),
BUILDIN_DEF(warpchar,"siii"), // [LuzZza]
BUILDIN_DEF(warpparty,"siii?"), // [Fredzilla] [Paradox924X]
@@ -20271,7 +20326,6 @@ void script_parse_builtin(void) {
BUILDIN_DEF(makerune,"i"),
BUILDIN_DEF(hascashmount,""),//[Ind]
BUILDIN_DEF(setcashmount,""),//[Ind]
- BUILDIN_DEF_DEPRECATED(checkre,"i"), // Deprecated 2015-05-08 [Haru]
/**
* rAthena and beyond!
**/
@@ -20608,6 +20662,8 @@ void script_defaults(void) {
script->get_constant = script_get_constant;
script->label_add = script_label_add;
script->run = run_script;
+ script->run_npc = run_script;
+ script->run_pet = run_script;
script->run_main = run_script_main;
script->run_timer = run_script_timer;
script->set_var = set_var;
@@ -20773,5 +20829,8 @@ void script_defaults(void) {
script->add_language = script_add_language;
script->get_translation_file_name = script_get_translation_file_name;
script->parser_clean_leftovers = script_parser_clean_leftovers;
-
+
+ script->run_use_script = script_run_use_script;
+ script->run_item_equip_script = script_run_item_equip_script;
+ script->run_item_unequip_script = script_run_item_unequip_script;
}
diff --git a/src/map/script.h b/src/map/script.h
index 93d60f416..ad8ae82cb 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -6,7 +6,7 @@
#define MAP_SCRIPT_H
#include "map/map.h" //EVENT_NAME_LENGTH
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
#include "common/mmo.h" // struct item
#include "common/sql.h" // Sql
@@ -19,6 +19,7 @@
* Declarations
**/
struct eri;
+struct item_data;
/**
* Defines
@@ -636,7 +637,9 @@ struct script_interface {
void (*set_constant2) (const char *name, int value, bool isparameter);
bool (*get_constant) (const char* name, int* value);
void (*label_add)(int key, int pos);
- void (*run) (struct script_code *rootscript,int pos,int rid,int oid);
+ void (*run) (struct script_code *rootscript, int pos, int rid, int oid);
+ void (*run_npc) (struct script_code *rootscript, int pos, int rid, int oid);
+ void (*run_pet) (struct script_code *rootscript, int pos, int rid, int oid);
void (*run_main) (struct script_state *st);
int (*run_timer) (int tid, int64 tick, int id, intptr_t data);
int (*set_var) (struct map_session_data *sd, char *name, void *val);
@@ -765,12 +768,15 @@ struct script_interface {
uint8 (*add_language) (const char *name);
const char *(*get_translation_file_name) (const char *file);
void (*parser_clean_leftovers) (void);
+ void (*run_use_script) (struct map_session_data *sd, struct item_data *data, int oid);
+ void (*run_item_equip_script) (struct map_session_data *sd, struct item_data *data, int oid);
+ void (*run_item_unequip_script) (struct map_session_data *sd, struct item_data *data, int oid);
};
-struct script_interface *script;
-
#ifdef HERCULES_CORE
void script_defaults(void);
#endif // HERCULES_CORE
+HPShared struct script_interface *script;
+
#endif /* MAP_SCRIPT_H */
diff --git a/src/map/searchstore.c b/src/map/searchstore.c
index b9e23ae82..46b102ad5 100644
--- a/src/map/searchstore.c
+++ b/src/map/searchstore.c
@@ -15,6 +15,7 @@
#include "common/strlib.h" // safestrncpy
struct searchstore_interface searchstore_s;
+struct searchstore_interface *searchstore;
/// retrieves search function by type
static inline searchstore_search_t searchstore_getsearchfunc(unsigned char type) {
diff --git a/src/map/searchstore.h b/src/map/searchstore.h
index 2778740a5..24d7665e0 100644
--- a/src/map/searchstore.h
+++ b/src/map/searchstore.h
@@ -6,7 +6,7 @@
#define MAP_SEARCHSTORE_H
#include "map/map.h" // MESSAGE_SIZE
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/mmo.h" // MAX_SLOTS
#include <time.h>
@@ -95,10 +95,10 @@ struct searchstore_interface {
bool (*result) (struct map_session_data* sd, unsigned int store_id, int account_id, const char* store_name, unsigned short nameid, unsigned short amount, unsigned int price, const short* card, unsigned char refine);
};
-struct searchstore_interface *searchstore;
-
#ifdef HERCULES_CORE
void searchstore_defaults(void);
#endif // HERCULES_CORE
+HPShared struct searchstore_interface *searchstore;
+
#endif /* MAP_SEARCHSTORE_H */
diff --git a/src/map/skill.c b/src/map/skill.c
index 3a69bf380..c647cc325 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -62,6 +62,9 @@
#endif
struct skill_interface skill_s;
+struct s_skill_dbs skilldbs;
+
+struct skill_interface *skill;
//Since only mob-casted splash skills can hit ice-walls
static inline int splash_target(struct block_list* bl) {
@@ -121,11 +124,11 @@ int skill_get_index( uint16 skill_id ) {
}
const char* skill_get_name( uint16 skill_id ) {
- return skill->db[skill->get_index(skill_id)].name;
+ return skill->dbs->db[skill->get_index(skill_id)].name;
}
const char* skill_get_desc( uint16 skill_id ) {
- return skill->db[skill->get_index(skill_id)].desc;
+ return skill->dbs->db[skill->get_index(skill_id)].desc;
}
// out of bounds error checking [celest]
@@ -138,58 +141,58 @@ void skill_chk(uint16* skill_id) {
skill->chk(&(id)); \
if(!(id)) return 0; \
if( (lv) > MAX_SKILL_LEVEL && (var) > 1 ) { \
- int lv2__ = (lv); (lv) = skill->db[(id)].max; \
+ int lv2__ = (lv); (lv) = skill->dbs->db[(id)].max; \
return (var) + ((lv2__-(lv))/2);\
} \
return (var);\
} while(0)
#define skill_glv(lv) min((lv),MAX_SKILL_LEVEL-1)
// Skill DB
-int skill_get_hit( uint16 skill_id ) { skill_get (skill->db[skill_id].hit, skill_id); }
-int skill_get_inf( uint16 skill_id ) { skill_get (skill->db[skill_id].inf, skill_id); }
-int skill_get_ele( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get (skill->db[skill_id].element[skill_glv(skill_lv-1)], skill_id); }
-int skill_get_nk( uint16 skill_id ) { skill_get (skill->db[skill_id].nk, skill_id); }
-int skill_get_max( uint16 skill_id ) { skill_get (skill->db[skill_id].max, skill_id); }
-int skill_get_range( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].range[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_splash( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 ( (skill->db[skill_id].splash[skill_glv(skill_lv-1)]>=0?skill->db[skill_id].splash[skill_glv(skill_lv-1)]:AREA_SIZE), skill_id, skill_lv); }
-int skill_get_hp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].hp[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_sp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].sp[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_hp_rate(uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].hp_rate[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_sp_rate(uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].sp_rate[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_state(uint16 skill_id) { skill_get (skill->db[skill_id].state, skill_id); }
-int skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].spiritball[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_itemid(uint16 skill_id, int idx) { skill_get (skill->db[skill_id].itemid[idx], skill_id); }
-int skill_get_itemqty(uint16 skill_id, int idx) { skill_get (skill->db[skill_id].amount[idx], skill_id); }
-int skill_get_zeny( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].zeny[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_num( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].num[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_cast( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].cast[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_delay( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].delay[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_walkdelay( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].walkdelay[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_time( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].upkeep_time[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_time2( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].upkeep_time2[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_castdef( uint16 skill_id ) { skill_get (skill->db[skill_id].cast_def_rate, skill_id); }
-int skill_get_weapontype( uint16 skill_id ) { skill_get (skill->db[skill_id].weapon, skill_id); }
-int skill_get_ammotype( uint16 skill_id ) { skill_get (skill->db[skill_id].ammo, skill_id); }
-int skill_get_ammo_qty( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].ammo_qty[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_inf2( uint16 skill_id ) { skill_get (skill->db[skill_id].inf2, skill_id); }
-int skill_get_castcancel( uint16 skill_id ) { skill_get (skill->db[skill_id].castcancel, skill_id); }
-int skill_get_maxcount( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].maxcount[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_blewcount( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].blewcount[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_mhp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].mhp[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_castnodex( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].castnodex[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_delaynodex( uint16 skill_id ,uint16 skill_lv ){ Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].delaynodex[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_type( uint16 skill_id ) { skill_get (skill->db[skill_id].skill_type, skill_id); }
-int skill_get_unit_id ( uint16 skill_id, int flag ){ skill_get (skill->db[skill_id].unit_id[flag], skill_id); }
-int skill_get_unit_interval( uint16 skill_id ) { skill_get (skill->db[skill_id].unit_interval, skill_id); }
-int skill_get_unit_range( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].unit_range[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_unit_target( uint16 skill_id ) { skill_get (skill->db[skill_id].unit_target&BCT_ALL, skill_id); }
-int skill_get_unit_bl_target( uint16 skill_id ) { skill_get (skill->db[skill_id].unit_target&BL_ALL, skill_id); }
-int skill_get_unit_flag( uint16 skill_id ) { skill_get (skill->db[skill_id].unit_flag, skill_id); }
-int skill_get_unit_layout_type( uint16 skill_id ,uint16 skill_lv ){ Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].unit_layout_type[skill_glv(skill_lv-1)], skill_id, skill_lv); }
-int skill_get_cooldown( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].cooldown[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_hit( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].hit, skill_id); }
+int skill_get_inf( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].inf, skill_id); }
+int skill_get_ele( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get (skill->dbs->db[skill_id].element[skill_glv(skill_lv-1)], skill_id); }
+int skill_get_nk( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].nk, skill_id); }
+int skill_get_max( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].max, skill_id); }
+int skill_get_range( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].range[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_splash( uint16 skill_id , uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 ( (skill->dbs->db[skill_id].splash[skill_glv(skill_lv-1)]>=0?skill->dbs->db[skill_id].splash[skill_glv(skill_lv-1)]:AREA_SIZE), skill_id, skill_lv); }
+int skill_get_hp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].hp[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_sp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].sp[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_hp_rate(uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].hp_rate[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_sp_rate(uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].sp_rate[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_state(uint16 skill_id) { skill_get (skill->dbs->db[skill_id].state, skill_id); }
+int skill_get_spiritball(uint16 skill_id, uint16 skill_lv) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].spiritball[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_itemid(uint16 skill_id, int idx) { skill_get (skill->dbs->db[skill_id].itemid[idx], skill_id); }
+int skill_get_itemqty(uint16 skill_id, int idx) { skill_get (skill->dbs->db[skill_id].amount[idx], skill_id); }
+int skill_get_zeny( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].zeny[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_num( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].num[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_cast( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].cast[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_delay( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].delay[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_walkdelay( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].walkdelay[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_time( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].upkeep_time[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_time2( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].upkeep_time2[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_castdef( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].cast_def_rate, skill_id); }
+int skill_get_weapontype( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].weapon, skill_id); }
+int skill_get_ammotype( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].ammo, skill_id); }
+int skill_get_ammo_qty( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].ammo_qty[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_inf2( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].inf2, skill_id); }
+int skill_get_castcancel( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].castcancel, skill_id); }
+int skill_get_maxcount( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].maxcount[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_blewcount( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].blewcount[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_mhp( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].mhp[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_castnodex( uint16 skill_id ,uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].castnodex[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_delaynodex( uint16 skill_id ,uint16 skill_lv ){ Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].delaynodex[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_type( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].skill_type, skill_id); }
+int skill_get_unit_id ( uint16 skill_id, int flag ){ skill_get (skill->dbs->db[skill_id].unit_id[flag], skill_id); }
+int skill_get_unit_interval( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_interval, skill_id); }
+int skill_get_unit_range( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].unit_range[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_unit_target( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_target&BCT_ALL, skill_id); }
+int skill_get_unit_bl_target( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_target&BL_ALL, skill_id); }
+int skill_get_unit_flag( uint16 skill_id ) { skill_get (skill->dbs->db[skill_id].unit_flag, skill_id); }
+int skill_get_unit_layout_type( uint16 skill_id ,uint16 skill_lv ){ Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].unit_layout_type[skill_glv(skill_lv-1)], skill_id, skill_lv); }
+int skill_get_cooldown( uint16 skill_id, uint16 skill_lv ) { Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].cooldown[skill_glv(skill_lv-1)], skill_id, skill_lv); }
int skill_get_fixed_cast( uint16 skill_id ,uint16 skill_lv ) {
#ifdef RENEWAL_CAST
- Assert_ret(skill_lv > 0); skill_get2 (skill->db[skill_id].fixed_cast[skill_glv(skill_lv-1)], skill_id, skill_lv);
+ Assert_ret(skill_lv > 0); skill_get2 (skill->dbs->db[skill_id].fixed_cast[skill_glv(skill_lv-1)], skill_id, skill_lv);
#else
return 0;
#endif
@@ -223,17 +226,17 @@ int skill_get_casttype (uint16 skill_id) {
}
int skill_get_casttype2 (uint16 index) {
- int inf = skill->db[index].inf;
+ int inf = skill->dbs->db[index].inf;
if (inf&(INF_GROUND_SKILL))
return CAST_GROUND;
if (inf&INF_SUPPORT_SKILL)
return CAST_NODAMAGE;
if (inf&INF_SELF_SKILL) {
- if(skill->db[index].inf2&INF2_NO_TARGET_SELF)
+ if(skill->dbs->db[index].inf2&INF2_NO_TARGET_SELF)
return CAST_DAMAGE; //Combo skill.
return CAST_NODAMAGE;
}
- if (skill->db[index].nk&NK_NO_DAMAGE)
+ if (skill->dbs->db[index].nk&NK_NO_DAMAGE)
return CAST_NODAMAGE;
return CAST_DAMAGE;
}
@@ -438,7 +441,7 @@ int can_copy (struct map_session_data *sd, uint16 skill_id, struct block_list* b
if( !(sd->sc.data[SC__REPRODUCE]) && ((skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK) || (skill_id >= RL_GLITTERING_GREED && skill_id <= OB_AKAITSUKI) || (skill_id >= GC_DARKCROW && skill_id <= NC_MAGMA_ERUPTION_DOTDAMAGE)))
return 0;
// Reproduce will only copy skills according on the list. [Jobbie]
- else if( sd->sc.data[SC__REPRODUCE] && !skill->reproduce_db[skill->get_index(skill_id)] )
+ else if( sd->sc.data[SC__REPRODUCE] && !skill->dbs->reproduce_db[skill->get_index(skill_id)] )
return 0;
return 1;
@@ -619,19 +622,19 @@ struct s_skill_unit_layout* skill_get_unit_layout (uint16 skill_id, uint16 skill
}
if (pos != -1) // simple single-definition layout
- return &skill->unit_layout[pos];
+ return &skill->dbs->unit_layout[pos];
dir = (src->x == x && src->y == y) ? 6 : map->calc_dir(src,x,y); // 6 - default aegis direction
if (skill_id == MG_FIREWALL)
- return &skill->unit_layout [skill->firewall_unit_pos + dir];
+ return &skill->dbs->unit_layout [skill->firewall_unit_pos + dir];
else if (skill_id == WZ_ICEWALL)
- return &skill->unit_layout [skill->icewall_unit_pos + dir];
+ return &skill->dbs->unit_layout [skill->icewall_unit_pos + dir];
else if( skill_id == WL_EARTHSTRAIN ) //Warlock
- return &skill->unit_layout [skill->earthstrain_unit_pos + dir];
+ return &skill->dbs->unit_layout [skill->earthstrain_unit_pos + dir];
ShowError("skill_get_unit_layout: unknown unit layout for skill %d (level %d)\n", skill_id, skill_lv);
- return &skill->unit_layout[0]; // default 1x1 layout
+ return &skill->dbs->unit_layout[0]; // default 1x1 layout
}
/*==========================================
@@ -3086,15 +3089,15 @@ int skill_check_condition_mercenary(struct block_list *bl, int skill_id, int lv,
// Requirements
for( i = 0; i < ARRAYLENGTH(itemid); i++ )
{
- itemid[i] = skill->db[idx].itemid[i];
- amount[i] = skill->db[idx].amount[i];
- }
- hp = skill->db[idx].hp[lv-1];
- sp = skill->db[idx].sp[lv-1];
- hp_rate = skill->db[idx].hp_rate[lv-1];
- sp_rate = skill->db[idx].sp_rate[lv-1];
- state = skill->db[idx].state;
- if( (mhp = skill->db[idx].mhp[lv-1]) > 0 )
+ itemid[i] = skill->dbs->db[idx].itemid[i];
+ amount[i] = skill->dbs->db[idx].amount[i];
+ }
+ hp = skill->dbs->db[idx].hp[lv-1];
+ sp = skill->dbs->db[idx].sp[lv-1];
+ hp_rate = skill->dbs->db[idx].hp_rate[lv-1];
+ sp_rate = skill->dbs->db[idx].sp_rate[lv-1];
+ state = skill->dbs->db[idx].state;
+ if( (mhp = skill->dbs->db[idx].mhp[lv-1]) > 0 )
hp += (st->max_hp * mhp) / 100;
if( hp_rate > 0 )
hp += (st->hp * hp_rate) / 100;
@@ -5538,10 +5541,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
int abra_skill_id = 0, abra_skill_lv, abra_idx;
do {
abra_idx = rnd() % MAX_SKILL_ABRA_DB;
- abra_skill_id = skill->abra_db[abra_idx].skill_id;
+ abra_skill_id = skill->dbs->abra_db[abra_idx].skill_id;
} while (abra_skill_id == 0 ||
- skill->abra_db[abra_idx].req_lv > skill_lv || //Required lv for it to appear
- rnd()%10000 >= skill->abra_db[abra_idx].per
+ skill->dbs->abra_db[abra_idx].req_lv > skill_lv || //Required lv for it to appear
+ rnd()%10000 >= skill->dbs->abra_db[abra_idx].per
);
abra_skill_lv = min(skill_lv, skill->get_max(abra_skill_id));
clif->skill_nodamage (src, bl, skill_id, skill_lv, 1);
@@ -6460,7 +6463,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
// custom hack to make the mob display the skill, because these skills don't show the skill use text themselves
//NOTE: mobs don't have the sprite animation that is used when performing this skill (will cause glitches)
char temp[70];
- snprintf(temp, sizeof(temp), "%s : %s !!",md->name,skill->db[skill_id].desc);
+ snprintf(temp, sizeof(temp), "%s : %s !!",md->name,skill->dbs->db[skill_id].desc);
clif->disp_overhead(&md->bl,temp);
}
break;
@@ -6658,7 +6661,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
return 1;
}
if( sd->skillitem != skill_id )
- status_zap(src,0,skill->db[skill->get_index(skill_id)].sp[skill_lv]); // consume sp only if succeeded
+ status_zap(src,0,skill->dbs->db[skill->get_index(skill_id)].sp[skill_lv]); // consume sp only if succeeded
}
break;
@@ -6836,13 +6839,13 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if( sd ) {
int x,bonus=100, potion = min(500+skill_lv,505);
x = skill_lv%11 - 1;
- i = pc->search_inventory(sd,skill->db[skill_id].itemid[x]);
- if (i == INDEX_NOT_FOUND || skill->db[skill_id].itemid[x] <= 0) {
+ i = pc->search_inventory(sd,skill->dbs->db[skill_id].itemid[x]);
+ if (i == INDEX_NOT_FOUND || skill->dbs->db[skill_id].itemid[x] <= 0) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
map->freeblock_unlock();
return 1;
}
- if(sd->inventory_data[i] == NULL || sd->status.inventory[i].amount < skill->db[skill_id].amount[x]) {
+ if(sd->inventory_data[i] == NULL || sd->status.inventory[i].amount < skill->dbs->db[skill_id].amount[x]) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
map->freeblock_unlock();
return 1;
@@ -6857,7 +6860,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
script->potion_flag = 1;
script->potion_hp = script->potion_sp = script->potion_per_hp = script->potion_per_sp = 0;
script->potion_target = bl->id;
- script->run(sd->inventory_data[i]->script,0,sd->bl.id,0);
+ script->run_use_script(sd, sd->inventory_data[i], 0);
script->potion_flag = script->potion_target = 0;
if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_ALCHEMIST )
bonus += sd->status.base_level;
@@ -7384,14 +7387,14 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case WE_MALE:
{
- int hp_rate = (!skill_lv)? 0:skill->db[skill_id].hp_rate[skill_lv-1];
+ int hp_rate = (!skill_lv)? 0:skill->dbs->db[skill_id].hp_rate[skill_lv-1];
int gain_hp = tstatus->max_hp*abs(hp_rate)/100; // The earned is the same % of the target HP than it cost the caster. [Skotlex]
clif->skill_nodamage(src,bl,skill_id,status->heal(bl, gain_hp, 0, 0),1);
}
break;
case WE_FEMALE:
{
- int sp_rate = (!skill_lv)? 0:skill->db[skill_id].sp_rate[skill_lv-1];
+ int sp_rate = (!skill_lv)? 0:skill->dbs->db[skill_id].sp_rate[skill_lv-1];
int gain_sp = tstatus->max_sp*abs(sp_rate)/100;// The earned is the same % of the target SP than it cost the caster. [Skotlex]
clif->skill_nodamage(src,bl,skill_id,status->heal(bl, 0, gain_sp, 0),1);
}
@@ -7455,15 +7458,15 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
int i;
// get back all items used to deploy the trap
for( i = 0; i < 10; i++ ) {
- if( skill->db[su->group->skill_id].itemid[i] > 0 ) {
+ if( skill->dbs->db[su->group->skill_id].itemid[i] > 0 ) {
int success;
struct item item_tmp;
memset(&item_tmp,0,sizeof(item_tmp));
- item_tmp.nameid = skill->db[su->group->skill_id].itemid[i];
+ item_tmp.nameid = skill->dbs->db[su->group->skill_id].itemid[i];
item_tmp.identify = 1;
- if( item_tmp.nameid && (success=pc->additem(sd,&item_tmp,skill->db[su->group->skill_id].amount[i],LOG_TYPE_OTHER)) ) {
+ if( item_tmp.nameid && (success=pc->additem(sd,&item_tmp,skill->dbs->db[su->group->skill_id].amount[i],LOG_TYPE_OTHER)) ) {
clif->additem(sd,0,0,success);
- map->addflooritem(&item_tmp,skill->db[su->group->skill_id].amount[i],sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
+ map->addflooritem(&item_tmp,skill->dbs->db[su->group->skill_id].amount[i],sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
}
}
@@ -7693,7 +7696,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
map->freeblock_unlock();
return 0;
}
- status_zap(src,0,skill->db[skill->get_index(skill_id)].sp[skill_lv]); // consume sp only if succeeded [Inkfish]
+ status_zap(src,0,skill->dbs->db[skill->get_index(skill_id)].sp[skill_lv]); // consume sp only if succeeded [Inkfish]
do {
int eff = rnd() % 14;
if( eff == 5 )
@@ -9232,8 +9235,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
int improv_skill_id = 0, improv_skill_lv, improv_idx;
do {
improv_idx = rnd() % MAX_SKILL_IMPROVISE_DB;
- improv_skill_id = skill->improvise_db[improv_idx].skill_id;
- } while( improv_skill_id == 0 || rnd()%10000 >= skill->improvise_db[improv_idx].per );
+ improv_skill_id = skill->dbs->improvise_db[improv_idx].skill_id;
+ } while( improv_skill_id == 0 || rnd()%10000 >= skill->dbs->improvise_db[improv_idx].per );
improv_skill_lv = 4 + skill_lv;
clif->skill_nodamage (src, bl, skill_id, skill_lv, 1);
@@ -10528,9 +10531,9 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
case CR_SLIMPITCHER:
if (sd) {
int i = skill_lv%11 - 1;
- int j = pc->search_inventory(sd,skill->db[skill_id].itemid[i]);
- if (j == INDEX_NOT_FOUND || skill->db[skill_id].itemid[i] <= 0
- || sd->inventory_data[j] == NULL || sd->status.inventory[j].amount < skill->db[skill_id].amount[i]
+ int j = pc->search_inventory(sd,skill->dbs->db[skill_id].itemid[i]);
+ if (j == INDEX_NOT_FOUND || skill->dbs->db[skill_id].itemid[i] <= 0
+ || sd->inventory_data[j] == NULL || sd->status.inventory[j].amount < skill->dbs->db[skill_id].amount[i]
) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 1;
@@ -10538,7 +10541,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
script->potion_flag = 1;
script->potion_hp = 0;
script->potion_sp = 0;
- script->run(sd->inventory_data[j]->script,0,sd->bl.id,0);
+ script->run_use_script(sd, sd->inventory_data[j], 0);
script->potion_flag = 0;
//Apply skill bonuses
i = pc->checkskill(sd,CR_SLIMPITCHER)*10
@@ -10559,7 +10562,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
} else {
int i = skill_lv%11 - 1;
struct item_data *item;
- i = skill->db[skill_id].itemid[i];
+ i = skill->dbs->db[skill_id].itemid[i];
item = itemdb->search(i);
script->potion_flag = 1;
script->potion_hp = 0;
@@ -14284,17 +14287,17 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
st = &sd->battle_status;
- req.hp = skill->db[idx].hp[skill_lv-1];
- hp_rate = skill->db[idx].hp_rate[skill_lv-1];
+ req.hp = skill->dbs->db[idx].hp[skill_lv-1];
+ hp_rate = skill->dbs->db[idx].hp_rate[skill_lv-1];
if(hp_rate > 0)
req.hp += (st->hp * hp_rate)/100;
else
req.hp += (st->max_hp * (-hp_rate))/100;
- req.sp = skill->db[idx].sp[skill_lv-1];
+ req.sp = skill->dbs->db[idx].sp[skill_lv-1];
if((sd->skill_id_old == BD_ENCORE) && skill_id == sd->skill_id_dance)
req.sp /= 2;
- sp_rate = skill->db[idx].sp_rate[skill_lv-1];
+ sp_rate = skill->dbs->db[idx].sp_rate[skill_lv-1];
if(sp_rate > 0)
req.sp += (st->sp * sp_rate)/100;
else
@@ -14322,22 +14325,22 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
req.sp -= req.sp * sc->data[SC_TELEKINESIS_INTENSE]->val2 / 100;
}
- req.zeny = skill->db[idx].zeny[skill_lv-1];
+ req.zeny = skill->dbs->db[idx].zeny[skill_lv-1];
if( sc && sc->data[SC__UNLUCKY] )
req.zeny += sc->data[SC__UNLUCKY]->val1 * 500;
- req.spiritball = skill->db[idx].spiritball[skill_lv-1];
+ req.spiritball = skill->dbs->db[idx].spiritball[skill_lv-1];
- req.state = skill->db[idx].state;
+ req.state = skill->dbs->db[idx].state;
- req.mhp = skill->db[idx].mhp[skill_lv-1];
+ req.mhp = skill->dbs->db[idx].mhp[skill_lv-1];
- req.weapon = skill->db[idx].weapon;
+ req.weapon = skill->dbs->db[idx].weapon;
- req.ammo_qty = skill->db[idx].ammo_qty[skill_lv-1];
+ req.ammo_qty = skill->dbs->db[idx].ammo_qty[skill_lv-1];
if (req.ammo_qty)
- req.ammo = skill->db[idx].ammo;
+ req.ammo = skill->dbs->db[idx].ammo;
if (!req.ammo && skill_id && skill->isammotype(sd, skill_id)) {
//Assume this skill is using the weapon, therefore it requires arrows.
@@ -14363,11 +14366,11 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
continue;
break;
case AB_ADORAMUS:
- if( itemid_isgemstone(skill->db[idx].itemid[i]) && skill->check_pc_partner(sd,skill_id,&skill_lv, 1, 2) )
+ if( itemid_isgemstone(skill->dbs->db[idx].itemid[i]) && skill->check_pc_partner(sd,skill_id,&skill_lv, 1, 2) )
continue;
break;
case WL_COMET:
- if( itemid_isgemstone(skill->db[idx].itemid[i]) && skill->check_pc_partner(sd,skill_id,&skill_lv, 1, 0) )
+ if( itemid_isgemstone(skill->dbs->db[idx].itemid[i]) && skill->check_pc_partner(sd,skill_id,&skill_lv, 1, 0) )
continue;
break;
case GN_FIRE_EXPANSION:
@@ -14393,8 +14396,8 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
}
}
- req.itemid[i] = skill->db[idx].itemid[i];
- req.amount[i] = skill->db[idx].amount[i];
+ req.itemid[i] = skill->dbs->db[idx].itemid[i];
+ req.amount[i] = skill->dbs->db[idx].amount[i];
if (itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN) {
if (sd->special_state.no_gemstone) {
@@ -14436,8 +14439,8 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
case SO_FIRE_INSIGNIA:
case SO_WIND_INSIGNIA:
case SO_EARTH_INSIGNIA:
- req.itemid[skill_lv-1] = skill->db[idx].itemid[skill_lv-1];
- req.amount[skill_lv-1] = skill->db[idx].amount[skill_lv-1];
+ req.itemid[skill_lv-1] = skill->dbs->db[idx].itemid[skill_lv-1];
+ req.amount[skill_lv-1] = skill->dbs->db[idx].amount[skill_lv-1];
break;
}
if (skill_id == NC_REPAIR) {
@@ -16803,9 +16806,9 @@ int skill_can_produce_mix (struct map_session_data *sd, int nameid, int trigger,
return 0;
for(i=0;i<MAX_SKILL_PRODUCE_DB;i++){
- if(skill->produce_db[i].nameid == nameid ){
- if((j=skill->produce_db[i].req_skill)>0 &&
- pc->checkskill(sd,j) < skill->produce_db[i].req_skill_lv)
+ if(skill->dbs->produce_db[i].nameid == nameid ){
+ if((j=skill->dbs->produce_db[i].req_skill)>0 &&
+ pc->checkskill(sd,j) < skill->dbs->produce_db[i].req_skill_lv)
continue; // must iterate again to check other skills that produce it. [malufett]
if( j > 0 && sd->menuskill_id > 0 && sd->menuskill_id != j )
continue; // special case
@@ -16823,22 +16826,22 @@ int skill_can_produce_mix (struct map_session_data *sd, int nameid, int trigger,
if(trigger>=0){
if(trigger>20) { // Non-weapon, non-food item (itemlv must match)
- if(skill->produce_db[i].itemlv!=trigger)
+ if(skill->dbs->produce_db[i].itemlv!=trigger)
return 0;
} else if(trigger>10) { // Food (any item level between 10 and 20 will do)
- if(skill->produce_db[i].itemlv<=10 || skill->produce_db[i].itemlv>20)
+ if(skill->dbs->produce_db[i].itemlv<=10 || skill->dbs->produce_db[i].itemlv>20)
return 0;
} else { // Weapon (itemlv must be higher or equal)
- if(skill->produce_db[i].itemlv>trigger)
+ if(skill->dbs->produce_db[i].itemlv>trigger)
return 0;
}
}
for (j = 0; j < MAX_PRODUCE_RESOURCE; j++) {
- int id = skill->produce_db[i].mat_id[j];
+ int id = skill->dbs->produce_db[i].mat_id[j];
if (id <= 0)
continue;
- if (skill->produce_db[i].mat_amount[j] <= 0) {
+ if (skill->dbs->produce_db[i].mat_amount[j] <= 0) {
if (pc->search_inventory(sd,id) == INDEX_NOT_FOUND)
return 0;
} else {
@@ -16846,7 +16849,7 @@ int skill_can_produce_mix (struct map_session_data *sd, int nameid, int trigger,
for(y=0,x=0;y<MAX_INVENTORY;y++)
if( sd->status.inventory[y].nameid == id )
x+=sd->status.inventory[y].amount;
- if(x<qty*skill->produce_db[i].mat_amount[j])
+ if(x<qty*skill->dbs->produce_db[i].mat_amount[j])
return 0;
}
}
@@ -16877,7 +16880,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
qty = 1;
if (!skill_id) //A skill can be specified for some override cases.
- skill_id = skill->produce_db[idx].req_skill;
+ skill_id = skill->dbs->produce_db[idx].req_skill;
if( skill_id == GC_RESEARCHNEWPOISON )
skill_id = GC_CREATENEWPOISON;
@@ -16934,10 +16937,10 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
for(i=0;i<MAX_PRODUCE_RESOURCE;i++){
int j,id,x;
- if( (id=skill->produce_db[idx].mat_id[i]) <= 0 )
+ if( (id=skill->dbs->produce_db[idx].mat_id[i]) <= 0 )
continue;
num++;
- x=( skill_id == RK_RUNEMASTERY ? 1 : qty)*skill->produce_db[idx].mat_amount[i];
+ x=( skill_id == RK_RUNEMASTERY ? 1 : qty)*skill->dbs->produce_db[idx].mat_amount[i];
do{
int y=0;
j = pc->search_inventory(sd,id);
@@ -17078,8 +17081,8 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
break;
case GN_CHANGEMATERIAL:
for(i=0; i<MAX_SKILL_PRODUCE_DB; i++)
- if( skill->changematerial_db[i].itemid == nameid ){
- make_per = skill->changematerial_db[i].rate * 10;
+ if( skill->dbs->changematerial_db[i].itemid == nameid ){
+ make_per = skill->dbs->changematerial_db[i].rate * 10;
break;
}
break;
@@ -17191,7 +17194,7 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
+ 20 * (sd->status.base_level + 1)
+ 20 * (st->dex + 1)
+ 100 * (rnd()%(30+5*(sd->cook_mastery/400) - (6+sd->cook_mastery/80)) + (6+sd->cook_mastery/80))
- - 400 * (skill->produce_db[idx].itemlv - 11 + 1)
+ - 400 * (skill->dbs->produce_db[idx].itemlv - 11 + 1)
- 10 * (100 - st->luk + 1)
- 500 * (num - 1)
- 100 * (rnd()%4 + 1);
@@ -17347,11 +17350,11 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
clif->misceffect(&sd->bl,5);
break;
default: //Those that don't require a skill?
- if( skill->produce_db[idx].itemlv > 10 && skill->produce_db[idx].itemlv <= 20)
+ if( skill->dbs->produce_db[idx].itemlv > 10 && skill->dbs->produce_db[idx].itemlv <= 20)
{ //Cooking items.
clif->specialeffect(&sd->bl, 608, AREA);
if( sd->cook_mastery < 1999 )
- pc_setglobalreg(sd, script->add_str("COOK_MASTERY"),sd->cook_mastery + ( 1 << ( (skill->produce_db[idx].itemlv - 11) / 2 ) ) * 5);
+ pc_setglobalreg(sd, script->add_str("COOK_MASTERY"),sd->cook_mastery + ( 1 << ( (skill->dbs->produce_db[idx].itemlv - 11) / 2 ) ) * 5);
}
break;
}
@@ -17359,10 +17362,10 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
if ( skill_id == GN_CHANGEMATERIAL && tmp_item.amount) { //Success
int j, k = 0;
for(i=0; i<MAX_SKILL_PRODUCE_DB; i++)
- if( skill->changematerial_db[i].itemid == nameid ){
+ if( skill->dbs->changematerial_db[i].itemid == nameid ){
for(j=0; j<5; j++){
- if( rnd()%1000 < skill->changematerial_db[i].qty_rate[j] ){
- tmp_item.amount = qty * skill->changematerial_db[i].qty[j];
+ if( rnd()%1000 < skill->dbs->changematerial_db[i].qty_rate[j] ){
+ tmp_item.amount = qty * skill->dbs->changematerial_db[i].qty[j];
if((flag = pc->additem(sd,&tmp_item,tmp_item.amount,LOG_TYPE_PRODUCE))) {
clif->additem(sd,0,0,flag);
map->addflooritem(&tmp_item,tmp_item.amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
@@ -17450,11 +17453,11 @@ int skill_produce_mix(struct map_session_data *sd, uint16 skill_id, int nameid,
clif->msgtable_skill(sd, skill_id, MSG_SKILL_FAILURE);
break;
default:
- if( skill->produce_db[idx].itemlv > 10 && skill->produce_db[idx].itemlv <= 20 )
+ if( skill->dbs->produce_db[idx].itemlv > 10 && skill->dbs->produce_db[idx].itemlv <= 20 )
{ //Cooking items.
clif->specialeffect(&sd->bl, 609, AREA);
if( sd->cook_mastery > 0 )
- pc_setglobalreg(sd, script->add_str("COOK_MASTERY"), sd->cook_mastery - ( 1 << ((skill->produce_db[idx].itemlv - 11) / 2) ) - ( ( ( 1 << ((skill->produce_db[idx].itemlv - 11) / 2) ) >> 1 ) * 3 ));
+ pc_setglobalreg(sd, script->add_str("COOK_MASTERY"), sd->cook_mastery - ( 1 << ((skill->dbs->produce_db[idx].itemlv - 11) / 2) ) - ( ( ( 1 << ((skill->dbs->produce_db[idx].itemlv - 11) / 2) ) >> 1 ) * 3 ));
}
}
}
@@ -17472,7 +17475,7 @@ int skill_arrow_create (struct map_session_data *sd, int nameid)
return 1;
for(i=0;i<MAX_SKILL_ARROW_DB;i++)
- if(nameid == skill->arrow_db[i].nameid) {
+ if(nameid == skill->dbs->arrow_db[i].nameid) {
index = i;
break;
}
@@ -17484,8 +17487,8 @@ int skill_arrow_create (struct map_session_data *sd, int nameid)
for(i=0;i<MAX_ARROW_RESOURCE;i++) {
memset(&tmp_item,0,sizeof(tmp_item));
tmp_item.identify = 1;
- tmp_item.nameid = skill->arrow_db[index].cre_id[i];
- tmp_item.amount = skill->arrow_db[index].cre_amount[i];
+ tmp_item.nameid = skill->dbs->arrow_db[index].cre_id[i];
+ tmp_item.amount = skill->dbs->arrow_db[index].cre_amount[i];
if(battle_config.produce_item_name_input&0x4) {
tmp_item.card[0]=CARD0_CREATE;
tmp_item.card[1]=0;
@@ -17612,10 +17615,10 @@ int skill_spellbook (struct map_session_data *sd, int nameid) {
return 0;
}
- ARR_FIND(0,MAX_SKILL_SPELLBOOK_DB,i,skill->spellbook_db[i].nameid == nameid); // Search for information of this item
+ ARR_FIND(0,MAX_SKILL_SPELLBOOK_DB,i,skill->dbs->spellbook_db[i].nameid == nameid); // Search for information of this item
if( i == MAX_SKILL_SPELLBOOK_DB ) return 0;
- if( !pc->checkskill(sd, (skill_id = skill->spellbook_db[i].skill_id)) )
+ if( !pc->checkskill(sd, (skill_id = skill->dbs->spellbook_db[i].skill_id)) )
{ // User don't know the skill
sc_start(&sd->bl, &sd->bl, SC_SLEEP, 100, 1, skill->get_time(WL_READING_SB, pc->checkskill(sd,WL_READING_SB)));
clif->skill_fail(sd, WL_READING_SB, USESKILL_FAIL_SPELLBOOK_DIFFICULT_SLEEP, 0);
@@ -17623,7 +17626,7 @@ int skill_spellbook (struct map_session_data *sd, int nameid) {
}
max_preserve = 4 * pc->checkskill(sd, WL_FREEZE_SP) + (status_get_int(&sd->bl) + sd->status.base_level) / 10;
- point = skill->spellbook_db[i].point;
+ point = skill->dbs->spellbook_db[i].point;
if( sc && sc->data[SC_READING_SB] ) {
if( (sc->data[SC_READING_SB]->val2 + point) > max_preserve ) {
@@ -17746,13 +17749,13 @@ int skill_changematerial(struct map_session_data *sd, int n, unsigned short *ite
// Search for objects that can be created.
for( i = 0; i < MAX_SKILL_PRODUCE_DB; i++ ) {
- if( skill->produce_db[i].itemlv == 26 ) {
+ if( skill->dbs->produce_db[i].itemlv == 26 ) {
p = 0;
do {
c = 0;
// Verification of overlap between the objects required and the list submitted.
for( j = 0; j < MAX_PRODUCE_RESOURCE; j++ ) {
- if( skill->produce_db[i].mat_id[j] > 0 ) {
+ if( skill->dbs->produce_db[i].mat_id[j] > 0 ) {
for( k = 0; k < n; k++ ) {
int idx = item_list[k*2+0]-2;
nameid = sd->status.inventory[idx].nameid;
@@ -17761,8 +17764,8 @@ int skill_changematerial(struct map_session_data *sd, int n, unsigned short *ite
clif->msgtable_skill(sd, GN_CHANGEMATERIAL, MSG_SKILL_ITEM_NEED_IDENTIFY);
return 0;
}
- if( nameid == skill->produce_db[i].mat_id[j] && (amount-p*skill->produce_db[i].mat_amount[j]) >= skill->produce_db[i].mat_amount[j]
- && (amount-p*skill->produce_db[i].mat_amount[j])%skill->produce_db[i].mat_amount[j] == 0 ) // must be in exact amount
+ if( nameid == skill->dbs->produce_db[i].mat_id[j] && (amount-p*skill->dbs->produce_db[i].mat_amount[j]) >= skill->dbs->produce_db[i].mat_amount[j]
+ && (amount-p*skill->dbs->produce_db[i].mat_amount[j])%skill->dbs->produce_db[i].mat_amount[j] == 0 ) // must be in exact amount
c++; // match
}
}
@@ -17773,7 +17776,7 @@ int skill_changematerial(struct map_session_data *sd, int n, unsigned short *ite
} while(n == j && c == n);
p--;
if ( p > 0 ) {
- skill->produce_mix(sd,GN_CHANGEMATERIAL,skill->produce_db[i].nameid,0,0,0,p);
+ skill->produce_mix(sd,GN_CHANGEMATERIAL,skill->dbs->produce_db[i].nameid,0,0,0,p);
return 1;
}
}
@@ -17903,6 +17906,9 @@ int skill_blockpc_start_(struct map_session_data *sd, uint16 skill_id, int tick)
}
if( i != cd->cursor ) {/* duplicate, update necessary */
+ // Don't do anything if there's already a tick longer than the incoming one
+ if (DIFF_TICK32(cd->entry[i]->started + cd->entry[i]->duration, now) > tick)
+ return 0;
cd->entry[i]->duration = tick;
#if PACKETVER >= 20120604
cd->entry[i]->total = tick;
@@ -18085,26 +18091,26 @@ void skill_init_unit_layout (void)
int i,j,pos = 0;
//when != it was already cleared during skill_defaults() no need to repeat
- if( runflag == MAPSERVER_ST_RUNNING )
- memset(skill->unit_layout,0,sizeof(skill->unit_layout));
+ if( core->runflag == MAPSERVER_ST_RUNNING )
+ memset(skill->dbs->unit_layout, 0, sizeof(skill->dbs->unit_layout));
// standard square layouts go first
for (i=0; i<=MAX_SQUARE_LAYOUT; i++) {
int size = i*2+1;
- skill->unit_layout[i].count = size*size;
+ skill->dbs->unit_layout[i].count = size*size;
for (j=0; j<size*size; j++) {
- skill->unit_layout[i].dx[j] = (j%size-i);
- skill->unit_layout[i].dy[j] = (j/size-i);
+ skill->dbs->unit_layout[i].dx[j] = (j%size-i);
+ skill->dbs->unit_layout[i].dy[j] = (j/size-i);
}
}
// afterwards add special ones
pos = i;
for (i=0;i<MAX_SKILL_DB;i++) {
- if (!skill->db[i].unit_id[0] || skill->db[i].unit_layout_type[0] != -1)
+ if (!skill->dbs->db[i].unit_id[0] || skill->dbs->db[i].unit_layout_type[0] != -1)
continue;
- switch (skill->db[i].nameid) {
+ switch (skill->dbs->db[i].nameid) {
case MG_FIREWALL:
case WZ_ICEWALL:
case WL_EARTHSTRAIN://Warlock
@@ -18118,9 +18124,9 @@ void skill_init_unit_layout (void)
static const int dy[]={
-2,-2,-2,-1,-1,-1,-1,-1, 0, 0,
0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2};
- skill->unit_layout[pos].count = 21;
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ skill->dbs->unit_layout[pos].count = 21;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
break;
case PR_MAGNUS: {
@@ -18132,18 +18138,18 @@ void skill_init_unit_layout (void)
-3,-3,-3,-2,-2,-2,-1,-1,-1,-1,
-1,-1,-1, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3};
- skill->unit_layout[pos].count = 33;
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ skill->dbs->unit_layout[pos].count = 33;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
break;
case MH_POISON_MIST:
case AS_VENOMDUST: {
static const int dx[] = {-1, 0, 0, 0, 1};
static const int dy[] = { 0,-1, 0, 1, 0};
- skill->unit_layout[pos].count = 5;
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ skill->dbs->unit_layout[pos].count = 5;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
break;
case CR_GRANDCROSS:
@@ -18156,9 +18162,9 @@ void skill_init_unit_layout (void)
-4,-3,-2,-2,-2,-1,-1,-1,-1,-1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
1, 1, 1, 1, 2, 2, 2, 3, 4};
- skill->unit_layout[pos].count = 29;
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ skill->dbs->unit_layout[pos].count = 29;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
break;
case PF_FOGWALL: {
@@ -18166,9 +18172,9 @@ void skill_init_unit_layout (void)
-2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2};
static const int dy[] = {
-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1};
- skill->unit_layout[pos].count = 15;
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ skill->dbs->unit_layout[pos].count = 15;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
break;
case PA_GOSPEL: {
@@ -18182,17 +18188,17 @@ void skill_init_unit_layout (void)
-1,-1,-1, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
3, 3, 3};
- skill->unit_layout[pos].count = 33;
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ skill->dbs->unit_layout[pos].count = 33;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
break;
case NJ_KAENSIN: {
static const int dx[] = {-2,-1, 0, 1, 2,-2,-1, 0, 1, 2,-2,-1, 1, 2,-2,-1, 0, 1, 2,-2,-1, 0, 1, 2};
static const int dy[] = { 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0,-1,-1,-1,-1,-1,-2,-2,-2,-2,-2};
- skill->unit_layout[pos].count = 24;
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ skill->dbs->unit_layout[pos].count = 24;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
break;
case NJ_TATAMIGAESHI: {
@@ -18207,29 +18213,29 @@ void skill_init_unit_layout (void)
static const int dy3[] = { 0, 0, 0, 0, 0, 0,-3,-2,-1, 1, 2, 3};
//lv1
j = 0;
- skill->unit_layout[pos].count = 4;
- memcpy(skill->unit_layout[pos].dx,dx1,sizeof(dx1));
- memcpy(skill->unit_layout[pos].dy,dy1,sizeof(dy1));
- skill->db[i].unit_layout_type[j] = pos;
+ skill->dbs->unit_layout[pos].count = 4;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx1,sizeof(dx1));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy1,sizeof(dy1));
+ skill->dbs->db[i].unit_layout_type[j] = pos;
//lv2/3
j++;
pos++;
- skill->unit_layout[pos].count = 8;
- memcpy(skill->unit_layout[pos].dx,dx2,sizeof(dx2));
- memcpy(skill->unit_layout[pos].dy,dy2,sizeof(dy2));
- skill->db[i].unit_layout_type[j] = pos;
- skill->db[i].unit_layout_type[++j] = pos;
+ skill->dbs->unit_layout[pos].count = 8;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx2,sizeof(dx2));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy2,sizeof(dy2));
+ skill->dbs->db[i].unit_layout_type[j] = pos;
+ skill->dbs->db[i].unit_layout_type[++j] = pos;
//lv4/5
j++;
pos++;
- skill->unit_layout[pos].count = 12;
- memcpy(skill->unit_layout[pos].dx,dx3,sizeof(dx3));
- memcpy(skill->unit_layout[pos].dy,dy3,sizeof(dy3));
- skill->db[i].unit_layout_type[j] = pos;
- skill->db[i].unit_layout_type[++j] = pos;
+ skill->dbs->unit_layout[pos].count = 12;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx3,sizeof(dx3));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy3,sizeof(dy3));
+ skill->dbs->db[i].unit_layout_type[j] = pos;
+ skill->dbs->db[i].unit_layout_type[++j] = pos;
//Fill in the rest using lv 5.
for (;j<MAX_SKILL_LEVEL;j++)
- skill->db[i].unit_layout_type[j] = pos;
+ skill->dbs->db[i].unit_layout_type[j] = pos;
//Skip, this way the check below will fail and continue to the next skill.
pos++;
}
@@ -18237,27 +18243,27 @@ void skill_init_unit_layout (void)
case GN_WALLOFTHORN: {
static const int dx[] = {-1,-2,-2,-2,-2,-2,-1, 0, 1, 2, 2, 2, 2, 2, 1, 0};
static const int dy[] = { 2, 2, 1, 0,-1,-2,-2,-2,-2,-2,-1, 0, 1, 2, 2, 2};
- skill->unit_layout[pos].count = 16;
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ skill->dbs->unit_layout[pos].count = 16;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
break;
case EL_FIRE_MANTLE: {
static const int dx[] = {-1, 0, 1, 1, 1, 0,-1,-1};
static const int dy[] = { 1, 1, 1, 0,-1,-1,-1, 0};
- skill->unit_layout[pos].count = 8;
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ skill->dbs->unit_layout[pos].count = 8;
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
break;
default:
ShowError("unknown unit layout at skill %d\n",i);
break;
}
- if (!skill->unit_layout[pos].count)
+ if (!skill->dbs->unit_layout[pos].count)
continue;
for (j=0;j<MAX_SKILL_LEVEL;j++)
- skill->db[i].unit_layout_type[j] = pos;
+ skill->dbs->db[i].unit_layout_type[j] = pos;
pos++;
}
@@ -18265,60 +18271,60 @@ void skill_init_unit_layout (void)
skill->firewall_unit_pos = pos;
for (i=0;i<8;i++) {
if (i&1) {
- skill->unit_layout[pos].count = 5;
+ skill->dbs->unit_layout[pos].count = 5;
if (i&0x2) {
int dx[] = {-1,-1, 0, 0, 1};
int dy[] = { 1, 0, 0,-1,-1};
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
} else {
int dx[] = { 1, 1 ,0, 0,-1};
int dy[] = { 1, 0, 0,-1,-1};
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
} else {
- skill->unit_layout[pos].count = 3;
+ skill->dbs->unit_layout[pos].count = 3;
if (i%4==0) {
int dx[] = {-1, 0, 1};
int dy[] = { 0, 0, 0};
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
} else {
int dx[] = { 0, 0, 0};
int dy[] = {-1, 0, 1};
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
}
pos++;
}
skill->icewall_unit_pos = pos;
for (i=0;i<8;i++) {
- skill->unit_layout[pos].count = 5;
+ skill->dbs->unit_layout[pos].count = 5;
if (i&1) {
if (i&0x2) {
int dx[] = {-2,-1, 0, 1, 2};
int dy[] = { 2, 1, 0,-1,-2};
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
} else {
int dx[] = { 2, 1 ,0,-1,-2};
int dy[] = { 2, 1, 0,-1,-2};
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
} else {
if (i%4==0) {
int dx[] = {-2,-1, 0, 1, 2};
int dy[] = { 0, 0, 0, 0, 0};
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
} else {
int dx[] = { 0, 0, 0, 0, 0};
int dy[] = {-2,-1, 0, 1, 2};
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
}
pos++;
@@ -18326,15 +18332,15 @@ void skill_init_unit_layout (void)
skill->earthstrain_unit_pos = pos;
for( i = 0; i < 8; i++ )
{ // For each Direction
- skill->unit_layout[pos].count = 15;
+ skill->dbs->unit_layout[pos].count = 15;
switch( i )
{
case 0: case 1: case 3: case 4: case 5: case 7:
{
int dx[] = {-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
int dy[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
break;
case 2:
@@ -18342,8 +18348,8 @@ void skill_init_unit_layout (void)
{
int dx[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
int dy[] = {-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7};
- memcpy(skill->unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill->unit_layout[pos].dy,dy,sizeof(dy));
+ memcpy(skill->dbs->unit_layout[pos].dx,dx,sizeof(dx));
+ memcpy(skill->dbs->unit_layout[pos].dy,dy,sizeof(dy));
}
break;
}
@@ -18590,36 +18596,36 @@ bool skill_parse_row_skilldb(char* split[], int columns, int current) {
if( !idx ) // invalid skill id
return false;
- skill->db[idx].nameid = skill_id;
- skill->split_atoi(split[1],skill->db[idx].range);
- skill->db[idx].hit = atoi(split[2]);
- skill->db[idx].inf = atoi(split[3]);
- skill->split_atoi(split[4],skill->db[idx].element);
- skill->db[idx].nk = (int)strtol(split[5], NULL, 0);
- skill->split_atoi(split[6],skill->db[idx].splash);
- skill->db[idx].max = atoi(split[7]);
- skill->split_atoi(split[8],skill->db[idx].num);
+ skill->dbs->db[idx].nameid = skill_id;
+ skill->split_atoi(split[1],skill->dbs->db[idx].range);
+ skill->dbs->db[idx].hit = atoi(split[2]);
+ skill->dbs->db[idx].inf = atoi(split[3]);
+ skill->split_atoi(split[4],skill->dbs->db[idx].element);
+ skill->dbs->db[idx].nk = (int)strtol(split[5], NULL, 0);
+ skill->split_atoi(split[6],skill->dbs->db[idx].splash);
+ skill->dbs->db[idx].max = atoi(split[7]);
+ skill->split_atoi(split[8],skill->dbs->db[idx].num);
if( strcmpi(split[9],"yes") == 0 )
- skill->db[idx].castcancel = 1;
+ skill->dbs->db[idx].castcancel = 1;
else
- skill->db[idx].castcancel = 0;
- skill->db[idx].cast_def_rate = atoi(split[10]);
- skill->db[idx].inf2 = (int)strtol(split[11], NULL, 0);
- skill->split_atoi(split[12],skill->db[idx].maxcount);
+ skill->dbs->db[idx].castcancel = 0;
+ skill->dbs->db[idx].cast_def_rate = atoi(split[10]);
+ skill->dbs->db[idx].inf2 = (int)strtol(split[11], NULL, 0);
+ skill->split_atoi(split[12],skill->dbs->db[idx].maxcount);
if( strcmpi(split[13],"weapon") == 0 )
- skill->db[idx].skill_type = BF_WEAPON;
+ skill->dbs->db[idx].skill_type = BF_WEAPON;
else if( strcmpi(split[13],"magic") == 0 )
- skill->db[idx].skill_type = BF_MAGIC;
+ skill->dbs->db[idx].skill_type = BF_MAGIC;
else if( strcmpi(split[13],"misc") == 0 )
- skill->db[idx].skill_type = BF_MISC;
+ skill->dbs->db[idx].skill_type = BF_MISC;
else
- skill->db[idx].skill_type = 0;
- skill->split_atoi(split[14],skill->db[idx].blewcount);
- safestrncpy(skill->db[idx].name, trim(split[15]), sizeof(skill->db[idx].name));
- safestrncpy(skill->db[idx].desc, trim(split[16]), sizeof(skill->db[idx].desc));
- strdb_iput(skill->name2id_db, skill->db[idx].name, skill_id);
- script->set_constant2(skill->db[idx].name,(int)skill_id,0);
+ skill->dbs->db[idx].skill_type = 0;
+ skill->split_atoi(split[14],skill->dbs->db[idx].blewcount);
+ safestrncpy(skill->dbs->db[idx].name, trim(split[15]), sizeof(skill->dbs->db[idx].name));
+ safestrncpy(skill->dbs->db[idx].desc, trim(split[16]), sizeof(skill->dbs->db[idx].desc));
+ strdb_iput(skill->name2id_db, skill->dbs->db[idx].name, skill_id);
+ script->set_constant2(skill->dbs->db[idx].name,(int)skill_id,0);
return true;
}
@@ -18634,22 +18640,22 @@ bool skill_parse_row_requiredb(char* split[], int columns, int current) {
if( !idx ) // invalid skill id
return false;
- skill->split_atoi(split[1],skill->db[idx].hp);
- skill->split_atoi(split[2],skill->db[idx].mhp);
- skill->split_atoi(split[3],skill->db[idx].sp);
- skill->split_atoi(split[4],skill->db[idx].hp_rate);
- skill->split_atoi(split[5],skill->db[idx].sp_rate);
- skill->split_atoi(split[6],skill->db[idx].zeny);
+ skill->split_atoi(split[1],skill->dbs->db[idx].hp);
+ skill->split_atoi(split[2],skill->dbs->db[idx].mhp);
+ skill->split_atoi(split[3],skill->dbs->db[idx].sp);
+ skill->split_atoi(split[4],skill->dbs->db[idx].hp_rate);
+ skill->split_atoi(split[5],skill->dbs->db[idx].sp_rate);
+ skill->split_atoi(split[6],skill->dbs->db[idx].zeny);
//Which weapon type are required, see doc/item_db for types
p = split[7];
for( j = 0; j < 32; j++ ) {
int l = atoi(p);
if( l == 99 ) { // Any weapon
- skill->db[idx].weapon = 0;
+ skill->dbs->db[idx].weapon = 0;
break;
} else
- skill->db[idx].weapon |= 1<<l;
+ skill->dbs->db[idx].weapon |= 1<<l;
p = strchr(p,':');
if(!p)
break;
@@ -18661,49 +18667,49 @@ bool skill_parse_row_requiredb(char* split[], int columns, int current) {
for( j = 0; j < 32; j++ ) {
int l = atoi(p);
if( l == 99 ) { // Any ammo type
- skill->db[idx].ammo = 0xFFFFFFFF;
+ skill->dbs->db[idx].ammo = 0xFFFFFFFF;
break;
} else if( l ) // 0 stands for no requirement
- skill->db[idx].ammo |= 1<<l;
+ skill->dbs->db[idx].ammo |= 1<<l;
p = strchr(p,':');
if( !p )
break;
p++;
}
- skill->split_atoi(split[9],skill->db[idx].ammo_qty);
-
- if( strcmpi(split[10],"hiding") == 0 ) skill->db[idx].state = ST_HIDING;
- else if( strcmpi(split[10],"cloaking") == 0 ) skill->db[idx].state = ST_CLOAKING;
- else if( strcmpi(split[10],"hidden") == 0 ) skill->db[idx].state = ST_HIDDEN;
- else if( strcmpi(split[10],"riding") == 0 ) skill->db[idx].state = ST_RIDING;
- else if( strcmpi(split[10],"falcon") == 0 ) skill->db[idx].state = ST_FALCON;
- else if( strcmpi(split[10],"cart") == 0 ) skill->db[idx].state = ST_CART;
- else if( strcmpi(split[10],"shield") == 0 ) skill->db[idx].state = ST_SHIELD;
- else if( strcmpi(split[10],"sight") == 0 ) skill->db[idx].state = ST_SIGHT;
- else if( strcmpi(split[10],"explosionspirits") == 0 ) skill->db[idx].state = ST_EXPLOSIONSPIRITS;
- else if( strcmpi(split[10],"cartboost") == 0 ) skill->db[idx].state = ST_CARTBOOST;
- else if( strcmpi(split[10],"recover_weight_rate") == 0 ) skill->db[idx].state = ST_RECOV_WEIGHT_RATE;
- else if( strcmpi(split[10],"move_enable") == 0 ) skill->db[idx].state = ST_MOVE_ENABLE;
- else if( strcmpi(split[10],"water") == 0 ) skill->db[idx].state = ST_WATER;
- else if( strcmpi(split[10],"dragon") == 0 ) skill->db[idx].state = ST_RIDINGDRAGON;
- else if( strcmpi(split[10],"warg") == 0 ) skill->db[idx].state = ST_WUG;
- else if( strcmpi(split[10],"ridingwarg") == 0 ) skill->db[idx].state = ST_RIDINGWUG;
- else if( strcmpi(split[10],"mado") == 0 ) skill->db[idx].state = ST_MADO;
- else if( strcmpi(split[10],"elementalspirit") == 0 ) skill->db[idx].state = ST_ELEMENTALSPIRIT;
- else if( strcmpi(split[10],"poisonweapon") == 0 ) skill->db[idx].state = ST_POISONINGWEAPON;
- else if( strcmpi(split[10],"rollingcutter") == 0 ) skill->db[idx].state = ST_ROLLINGCUTTER;
- else if( strcmpi(split[10],"mh_fighting") == 0 ) skill->db[idx].state = ST_MH_FIGHTING;
- else if( strcmpi(split[10],"mh_grappling") == 0 ) skill->db[idx].state = ST_MH_GRAPPLING;
- else if( strcmpi(split[10],"peco") == 0 ) skill->db[idx].state = ST_PECO;
+ skill->split_atoi(split[9],skill->dbs->db[idx].ammo_qty);
+
+ if( strcmpi(split[10],"hiding") == 0 ) skill->dbs->db[idx].state = ST_HIDING;
+ else if( strcmpi(split[10],"cloaking") == 0 ) skill->dbs->db[idx].state = ST_CLOAKING;
+ else if( strcmpi(split[10],"hidden") == 0 ) skill->dbs->db[idx].state = ST_HIDDEN;
+ else if( strcmpi(split[10],"riding") == 0 ) skill->dbs->db[idx].state = ST_RIDING;
+ else if( strcmpi(split[10],"falcon") == 0 ) skill->dbs->db[idx].state = ST_FALCON;
+ else if( strcmpi(split[10],"cart") == 0 ) skill->dbs->db[idx].state = ST_CART;
+ else if( strcmpi(split[10],"shield") == 0 ) skill->dbs->db[idx].state = ST_SHIELD;
+ else if( strcmpi(split[10],"sight") == 0 ) skill->dbs->db[idx].state = ST_SIGHT;
+ else if( strcmpi(split[10],"explosionspirits") == 0 ) skill->dbs->db[idx].state = ST_EXPLOSIONSPIRITS;
+ else if( strcmpi(split[10],"cartboost") == 0 ) skill->dbs->db[idx].state = ST_CARTBOOST;
+ else if( strcmpi(split[10],"recover_weight_rate") == 0 ) skill->dbs->db[idx].state = ST_RECOV_WEIGHT_RATE;
+ else if( strcmpi(split[10],"move_enable") == 0 ) skill->dbs->db[idx].state = ST_MOVE_ENABLE;
+ else if( strcmpi(split[10],"water") == 0 ) skill->dbs->db[idx].state = ST_WATER;
+ else if( strcmpi(split[10],"dragon") == 0 ) skill->dbs->db[idx].state = ST_RIDINGDRAGON;
+ else if( strcmpi(split[10],"warg") == 0 ) skill->dbs->db[idx].state = ST_WUG;
+ else if( strcmpi(split[10],"ridingwarg") == 0 ) skill->dbs->db[idx].state = ST_RIDINGWUG;
+ else if( strcmpi(split[10],"mado") == 0 ) skill->dbs->db[idx].state = ST_MADO;
+ else if( strcmpi(split[10],"elementalspirit") == 0 ) skill->dbs->db[idx].state = ST_ELEMENTALSPIRIT;
+ else if( strcmpi(split[10],"poisonweapon") == 0 ) skill->dbs->db[idx].state = ST_POISONINGWEAPON;
+ else if( strcmpi(split[10],"rollingcutter") == 0 ) skill->dbs->db[idx].state = ST_ROLLINGCUTTER;
+ else if( strcmpi(split[10],"mh_fighting") == 0 ) skill->dbs->db[idx].state = ST_MH_FIGHTING;
+ else if( strcmpi(split[10],"mh_grappling") == 0 ) skill->dbs->db[idx].state = ST_MH_GRAPPLING;
+ else if( strcmpi(split[10],"peco") == 0 ) skill->dbs->db[idx].state = ST_PECO;
/**
* Unknown or no state
**/
- else skill->db[idx].state = ST_NONE;
+ else skill->dbs->db[idx].state = ST_NONE;
- skill->split_atoi(split[11],skill->db[idx].spiritball);
+ skill->split_atoi(split[11],skill->dbs->db[idx].spiritball);
for( j = 0; j < MAX_SKILL_ITEM_REQUIRE; j++ ) {
- skill->db[idx].itemid[j] = atoi(split[12+ 2*j]);
- skill->db[idx].amount[j] = atoi(split[13+ 2*j]);
+ skill->dbs->db[idx].itemid[j] = atoi(split[12+ 2*j]);
+ skill->dbs->db[idx].amount[j] = atoi(split[13+ 2*j]);
}
return true;
@@ -18716,14 +18722,14 @@ bool skill_parse_row_castdb(char* split[], int columns, int current) {
if( !idx ) // invalid skill id
return false;
- skill->split_atoi(split[1],skill->db[idx].cast);
- skill->split_atoi(split[2],skill->db[idx].delay);
- skill->split_atoi(split[3],skill->db[idx].walkdelay);
- skill->split_atoi(split[4],skill->db[idx].upkeep_time);
- skill->split_atoi(split[5],skill->db[idx].upkeep_time2);
- skill->split_atoi(split[6],skill->db[idx].cooldown);
+ skill->split_atoi(split[1],skill->dbs->db[idx].cast);
+ skill->split_atoi(split[2],skill->dbs->db[idx].delay);
+ skill->split_atoi(split[3],skill->dbs->db[idx].walkdelay);
+ skill->split_atoi(split[4],skill->dbs->db[idx].upkeep_time);
+ skill->split_atoi(split[5],skill->dbs->db[idx].upkeep_time2);
+ skill->split_atoi(split[6],skill->dbs->db[idx].cooldown);
#ifdef RENEWAL_CAST
- skill->split_atoi(split[7],skill->db[idx].fixed_cast);
+ skill->split_atoi(split[7],skill->dbs->db[idx].fixed_cast);
#endif
return true;
}
@@ -18735,9 +18741,9 @@ bool skill_parse_row_castnodexdb(char* split[], int columns, int current) {
if( !idx ) // invalid skill id
return false;
- skill->split_atoi(split[1],skill->db[idx].castnodex);
+ skill->split_atoi(split[1],skill->dbs->db[idx].castnodex);
if( split[2] ) // optional column
- skill->split_atoi(split[2],skill->db[idx].delaynodex);
+ skill->split_atoi(split[2],skill->dbs->db[idx].delaynodex);
return true;
}
@@ -18749,37 +18755,37 @@ bool skill_parse_row_unitdb(char* split[], int columns, int current) {
if( !idx ) // invalid skill id
return false;
- skill->db[idx].unit_id[0] = (int)strtol(split[1],NULL,16);
- skill->db[idx].unit_id[1] = (int)strtol(split[2],NULL,16);
- skill->split_atoi(split[3],skill->db[idx].unit_layout_type);
- skill->split_atoi(split[4],skill->db[idx].unit_range);
- skill->db[idx].unit_interval = atoi(split[5]);
-
- if( strcmpi(split[6],"noenemy")==0 ) skill->db[idx].unit_target = BCT_NOENEMY;
- else if( strcmpi(split[6],"friend")==0 ) skill->db[idx].unit_target = BCT_NOENEMY;
- else if( strcmpi(split[6],"party")==0 ) skill->db[idx].unit_target = BCT_PARTY;
- else if( strcmpi(split[6],"ally")==0 ) skill->db[idx].unit_target = BCT_PARTY|BCT_GUILD;
- else if( strcmpi(split[6],"guild")==0 ) skill->db[idx].unit_target = BCT_GUILD;
- else if( strcmpi(split[6],"all")==0 ) skill->db[idx].unit_target = BCT_ALL;
- else if( strcmpi(split[6],"enemy")==0 ) skill->db[idx].unit_target = BCT_ENEMY;
- else if( strcmpi(split[6],"self")==0 ) skill->db[idx].unit_target = BCT_SELF;
- else if( strcmpi(split[6],"sameguild")==0 ) skill->db[idx].unit_target = BCT_GUILD|BCT_SAMEGUILD;
- else if( strcmpi(split[6],"noone")==0 ) skill->db[idx].unit_target = BCT_NOONE;
- else skill->db[idx].unit_target = (int)strtol(split[6],NULL,16);
-
- skill->db[idx].unit_flag = (int)strtol(split[7],NULL,16);
-
- if (skill->db[idx].unit_flag&UF_DEFNOTENEMY && battle_config.defnotenemy)
- skill->db[idx].unit_target = BCT_NOENEMY;
+ skill->dbs->db[idx].unit_id[0] = (int)strtol(split[1],NULL,16);
+ skill->dbs->db[idx].unit_id[1] = (int)strtol(split[2],NULL,16);
+ skill->split_atoi(split[3],skill->dbs->db[idx].unit_layout_type);
+ skill->split_atoi(split[4],skill->dbs->db[idx].unit_range);
+ skill->dbs->db[idx].unit_interval = atoi(split[5]);
+
+ if( strcmpi(split[6],"noenemy")==0 ) skill->dbs->db[idx].unit_target = BCT_NOENEMY;
+ else if( strcmpi(split[6],"friend")==0 ) skill->dbs->db[idx].unit_target = BCT_NOENEMY;
+ else if( strcmpi(split[6],"party")==0 ) skill->dbs->db[idx].unit_target = BCT_PARTY;
+ else if( strcmpi(split[6],"ally")==0 ) skill->dbs->db[idx].unit_target = BCT_PARTY|BCT_GUILD;
+ else if( strcmpi(split[6],"guild")==0 ) skill->dbs->db[idx].unit_target = BCT_GUILD;
+ else if( strcmpi(split[6],"all")==0 ) skill->dbs->db[idx].unit_target = BCT_ALL;
+ else if( strcmpi(split[6],"enemy")==0 ) skill->dbs->db[idx].unit_target = BCT_ENEMY;
+ else if( strcmpi(split[6],"self")==0 ) skill->dbs->db[idx].unit_target = BCT_SELF;
+ else if( strcmpi(split[6],"sameguild")==0 ) skill->dbs->db[idx].unit_target = BCT_GUILD|BCT_SAMEGUILD;
+ else if( strcmpi(split[6],"noone")==0 ) skill->dbs->db[idx].unit_target = BCT_NOONE;
+ else skill->dbs->db[idx].unit_target = (int)strtol(split[6],NULL,16);
+
+ skill->dbs->db[idx].unit_flag = (int)strtol(split[7],NULL,16);
+
+ if (skill->dbs->db[idx].unit_flag&UF_DEFNOTENEMY && battle_config.defnotenemy)
+ skill->dbs->db[idx].unit_target = BCT_NOENEMY;
//By default, target just characters.
- skill->db[idx].unit_target |= BL_CHAR;
- if (skill->db[idx].unit_flag&UF_NOPC)
- skill->db[idx].unit_target &= ~BL_PC;
- if (skill->db[idx].unit_flag&UF_NOMOB)
- skill->db[idx].unit_target &= ~BL_MOB;
- if (skill->db[idx].unit_flag&UF_SKILL)
- skill->db[idx].unit_target |= BL_SKILL;
+ skill->dbs->db[idx].unit_target |= BL_CHAR;
+ if (skill->dbs->db[idx].unit_flag&UF_NOPC)
+ skill->dbs->db[idx].unit_target &= ~BL_PC;
+ if (skill->dbs->db[idx].unit_flag&UF_NOMOB)
+ skill->dbs->db[idx].unit_target &= ~BL_MOB;
+ if (skill->dbs->db[idx].unit_flag&UF_SKILL)
+ skill->dbs->db[idx].unit_target |= BL_SKILL;
return true;
}
@@ -18792,14 +18798,14 @@ bool skill_parse_row_producedb(char* split[], int columns, int current) {
if( !i )
return false;
- skill->produce_db[current].nameid = i;
- skill->produce_db[current].itemlv = atoi(split[1]);
- skill->produce_db[current].req_skill = atoi(split[2]);
- skill->produce_db[current].req_skill_lv = atoi(split[3]);
+ skill->dbs->produce_db[current].nameid = i;
+ skill->dbs->produce_db[current].itemlv = atoi(split[1]);
+ skill->dbs->produce_db[current].req_skill = atoi(split[2]);
+ skill->dbs->produce_db[current].req_skill_lv = atoi(split[3]);
for( x = 4, y = 0; x+1 < columns && split[x] && split[x+1] && y < MAX_PRODUCE_RESOURCE; x += 2, y++ ) {
- skill->produce_db[current].mat_id[y] = atoi(split[x]);
- skill->produce_db[current].mat_amount[y] = atoi(split[x+1]);
+ skill->dbs->produce_db[current].mat_id[y] = atoi(split[x]);
+ skill->dbs->produce_db[current].mat_amount[y] = atoi(split[x+1]);
}
return true;
@@ -18813,11 +18819,11 @@ bool skill_parse_row_createarrowdb(char* split[], int columns, int current) {
if( !i )
return false;
- skill->arrow_db[current].nameid = i;
+ skill->dbs->arrow_db[current].nameid = i;
for( x = 1, y = 0; x+1 < columns && split[x] && split[x+1] && y < MAX_ARROW_RESOURCE; x += 2, y++ ) {
- skill->arrow_db[current].cre_id[y] = atoi(split[x]);
- skill->arrow_db[current].cre_amount[y] = atoi(split[x+1]);
+ skill->dbs->arrow_db[current].cre_id[y] = atoi(split[x]);
+ skill->dbs->arrow_db[current].cre_amount[y] = atoi(split[x+1]);
}
return true;
@@ -18836,9 +18842,9 @@ bool skill_parse_row_spellbookdb(char* split[], int columns, int current) {
if( points < 1 )
ShowError("spellbook_db: PreservePoints have to be 1 or above! (%d/%s)\n", skill_id, skill->get_name(skill_id));
else {
- skill->spellbook_db[current].skill_id = skill_id;
- skill->spellbook_db[current].point = points;
- skill->spellbook_db[current].nameid = nameid;
+ skill->dbs->spellbook_db[current].skill_id = skill_id;
+ skill->dbs->spellbook_db[current].point = points;
+ skill->dbs->spellbook_db[current].nameid = nameid;
return true;
}
@@ -18866,8 +18872,8 @@ bool skill_parse_row_improvisedb(char* split[], int columns, int current) {
ShowError("skill_improvise_db: Maximum amount of entries reached (%d), increase MAX_SKILL_IMPROVISE_DB\n",MAX_SKILL_IMPROVISE_DB);
return false;
}
- skill->improvise_db[current].skill_id = skill_id;
- skill->improvise_db[current].per = j; // Still need confirm it.
+ skill->dbs->improvise_db[current].skill_id = skill_id;
+ skill->dbs->improvise_db[current].per = j; // Still need confirm it.
return true;
}
@@ -18884,7 +18890,7 @@ bool skill_parse_row_magicmushroomdb(char* split[], int column, int current) {
return false;
}
- skill->magicmushroom_db[current].skill_id = skill_id;
+ skill->dbs->magicmushroom_db[current].skill_id = skill_id;
return true;
}
@@ -18895,7 +18901,7 @@ bool skill_parse_row_reproducedb(char* split[], int column, int current) {
if( !idx )
return false;
- skill->reproduce_db[idx] = true;
+ skill->dbs->reproduce_db[idx] = true;
return true;
}
@@ -18913,9 +18919,9 @@ bool skill_parse_row_abradb(char* split[], int columns, int current) {
return false;
}
- skill->abra_db[current].skill_id = skill_id;
- skill->abra_db[current].req_lv = atoi(split[2]);
- skill->abra_db[current].per = atoi(split[3]);
+ skill->dbs->abra_db[current].skill_id = skill_id;
+ skill->dbs->abra_db[current].req_lv = atoi(split[2]);
+ skill->dbs->abra_db[current].per = atoi(split[3]);
return true;
}
@@ -18927,8 +18933,8 @@ bool skill_parse_row_changematerialdb(char* split[], int columns, int current) {
int x,y;
for(x=0; x<MAX_SKILL_PRODUCE_DB; x++){
- if( skill->produce_db[x].nameid == skill_id )
- if( skill->produce_db[x].req_skill == GN_CHANGEMATERIAL )
+ if( skill->dbs->produce_db[x].nameid == skill_id )
+ if( skill->dbs->produce_db[x].req_skill == GN_CHANGEMATERIAL )
break;
}
@@ -18942,12 +18948,12 @@ bool skill_parse_row_changematerialdb(char* split[], int columns, int current) {
return false;
}
- skill->changematerial_db[current].itemid = skill_id;
- skill->changematerial_db[current].rate = j;
+ skill->dbs->changematerial_db[current].itemid = skill_id;
+ skill->dbs->changematerial_db[current].rate = j;
for( x = 2, y = 0; x+1 < columns && split[x] && split[x+1] && y < 5; x += 2, y++ ) {
- skill->changematerial_db[current].qty[y] = atoi(split[x]);
- skill->changematerial_db[current].qty_rate[y] = atoi(split[x+1]);
+ skill->dbs->changematerial_db[current].qty[y] = atoi(split[x]);
+ skill->dbs->changematerial_db[current].qty_rate[y] = atoi(split[x+1]);
}
return true;
@@ -18970,13 +18976,13 @@ void skill_readdb(bool minimal) {
db_clear(skill->name2id_db);
/* when != it was called during init and this procedure was already performed by skill_defaults() */
- if( runflag == MAPSERVER_ST_RUNNING ) {
- memset(ZEROED_BLOCK_POS(skill), 0, ZEROED_BLOCK_SIZE(skill));
+ if( core->runflag == MAPSERVER_ST_RUNNING ) {
+ memset(ZEROED_BLOCK_POS(skill->dbs), 0, ZEROED_BLOCK_SIZE(skill->dbs));
}
// load skill databases
- safestrncpy(skill->db[0].name, "UNKNOWN_SKILL", sizeof(skill->db[0].name));
- safestrncpy(skill->db[0].desc, "Unknown Skill", sizeof(skill->db[0].desc));
+ safestrncpy(skill->dbs->db[0].name, "UNKNOWN_SKILL", sizeof(skill->dbs->db[0].name));
+ safestrncpy(skill->dbs->db[0].desc, "Unknown Skill", sizeof(skill->dbs->db[0].desc));
#ifdef ENABLE_CASE_CHECK
script->parser_current_file = DBPATH"skill_db.txt";
@@ -19094,6 +19100,8 @@ void skill_defaults(void) {
const int skill_deluge_eff[5] = { 5, 9, 12, 14, 15 };
skill = &skill_s;
+ skill->dbs = &skilldbs;
+
skill->init = do_init_skill;
skill->final = do_final_skill;
skill->reload = skill_reload;
@@ -19111,8 +19119,8 @@ void skill_defaults(void) {
skill->cd_ers = NULL;
skill->cd_entry_ers = NULL;
- memset(ZEROED_BLOCK_POS(skill), 0, ZEROED_BLOCK_SIZE(skill));
- memset(skill->unit_layout, 0, sizeof(skill->unit_layout));
+ memset(ZEROED_BLOCK_POS(skill->dbs), 0, ZEROED_BLOCK_SIZE(skill->dbs));
+ memset(skill->dbs->unit_layout, 0, sizeof(skill->dbs->unit_layout));
/* */
memcpy(skill->enchant_eff, skill_enchant_eff, sizeof(skill->enchant_eff));
diff --git a/src/map/skill.h b/src/map/skill.h
index 6e56e276b..1db03bcd1 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -5,11 +5,9 @@
#ifndef MAP_SKILL_H
#define MAP_SKILL_H
-#include "config/core.h" // RENEWAL_CAST
-
#include "map/map.h" // struct block_list
#include "map/status.h" // enum sc_type
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
#include "common/mmo.h" // MAX_SKILL, struct square
@@ -1814,6 +1812,21 @@ struct s_skill_spellbook_db {
typedef int (*SkillFunc)(struct block_list *src, struct block_list *target, uint16 skill_id, uint16 skill_lv, int64 tick, int flag);
+struct s_skill_dbs {
+BEGIN_ZEROED_BLOCK; // This block will be zeroed in skill_defaults() as well as skill_readdb()
+ struct s_skill_db db[MAX_SKILL_DB];
+ struct s_skill_produce_db produce_db[MAX_SKILL_PRODUCE_DB];
+ struct s_skill_arrow_db arrow_db[MAX_SKILL_ARROW_DB];
+ struct s_skill_abra_db abra_db[MAX_SKILL_ABRA_DB];
+ struct s_skill_magicmushroom_db magicmushroom_db[MAX_SKILL_MAGICMUSHROOM_DB];
+ struct s_skill_improvise_db improvise_db[MAX_SKILL_IMPROVISE_DB];
+ struct s_skill_changematerial_db changematerial_db[MAX_SKILL_PRODUCE_DB];
+ struct s_skill_spellbook_db spellbook_db[MAX_SKILL_SPELLBOOK_DB];
+ bool reproduce_db[MAX_SKILL_DB];
+END_ZEROED_BLOCK;
+ struct s_skill_unit_layout unit_layout[MAX_SKILL_UNIT_LAYOUT];
+};
+
/**
* Skill.c Interface
**/
@@ -1835,18 +1848,7 @@ struct skill_interface {
struct eri *cd_ers; // ERS Storage for skill cool down managers [Ind/Hercules]
struct eri *cd_entry_ers; // ERS Storage for skill cool down entries [Ind/Hercules]
/* */
-BEGIN_ZEROED_BLOCK; // This block will be zeroed in skill_defaults() as well as skill_readdb()
- struct s_skill_db db[MAX_SKILL_DB];
- struct s_skill_produce_db produce_db[MAX_SKILL_PRODUCE_DB];
- struct s_skill_arrow_db arrow_db[MAX_SKILL_ARROW_DB];
- struct s_skill_abra_db abra_db[MAX_SKILL_ABRA_DB];
- struct s_skill_magicmushroom_db magicmushroom_db[MAX_SKILL_MAGICMUSHROOM_DB];
- struct s_skill_improvise_db improvise_db[MAX_SKILL_IMPROVISE_DB];
- struct s_skill_changematerial_db changematerial_db[MAX_SKILL_PRODUCE_DB];
- struct s_skill_spellbook_db spellbook_db[MAX_SKILL_SPELLBOOK_DB];
- bool reproduce_db[MAX_SKILL_DB];
-END_ZEROED_BLOCK;
- struct s_skill_unit_layout unit_layout[MAX_SKILL_UNIT_LAYOUT];
+ struct s_skill_dbs *dbs;
/* */
int enchant_eff[5];
int deluge_eff[5];
@@ -2080,10 +2082,10 @@ END_ZEROED_BLOCK;
void (*get_requirement_unknown) (struct status_change *sc, struct map_session_data* sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req);
};
-struct skill_interface *skill;
-
#ifdef HERCULES_CORE
void skill_defaults(void);
#endif // HERCULES_CORE
+HPShared struct skill_interface *skill;
+
#endif /* MAP_SKILL_H */
diff --git a/src/map/status.c b/src/map/status.c
index d88bcf146..4fc975268 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -44,6 +44,9 @@
#include <time.h>
struct status_interface status_s;
+struct s_status_dbs statusdbs;
+
+struct status_interface *status;
/**
* Returns the status change associated with a skill.
@@ -56,7 +59,7 @@ sc_type status_skill2sc(int skill_id) {
ShowError("status_skill2sc: Unsupported skill id %d\n", skill_id);
return SC_NONE;
}
- return status->Skill2SCTable[idx];
+ return status->dbs->Skill2SCTable[idx];
}
/**
@@ -72,7 +75,7 @@ int status_sc2skill(sc_type sc)
return 0;
}
- return status->SkillChangeTable[sc];
+ return status->dbs->SkillChangeTable[sc];
}
/**
@@ -87,7 +90,7 @@ unsigned int status_sc2scb_flag(sc_type sc)
return SCB_NONE;
}
- return status->ChangeFlagTable[sc];
+ return status->dbs->ChangeFlagTable[sc];
}
/**
@@ -102,7 +105,7 @@ int status_type2relevant_bl_types(int type)
return BL_NUL;
}
- return status->RelevantBLTypes[type];
+ return status->dbs->RelevantBLTypes[type];
}
static void set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) {
@@ -116,35 +119,35 @@ static void set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) {
return;
}
- if( status->SkillChangeTable[sc] == 0 )
- status->SkillChangeTable[sc] = skill_id;
- if( status->IconChangeTable[sc] == SI_BLANK )
- status->IconChangeTable[sc] = icon;
- status->ChangeFlagTable[sc] |= flag;
+ if( status->dbs->SkillChangeTable[sc] == 0 )
+ status->dbs->SkillChangeTable[sc] = skill_id;
+ if( status->dbs->IconChangeTable[sc] == SI_BLANK )
+ status->dbs->IconChangeTable[sc] = icon;
+ status->dbs->ChangeFlagTable[sc] |= flag;
- if( status->Skill2SCTable[idx] == SC_NONE )
- status->Skill2SCTable[idx] = sc;
+ if( status->dbs->Skill2SCTable[idx] == SC_NONE )
+ status->dbs->Skill2SCTable[idx] = sc;
}
void initChangeTables(void) {
#define add_sc(skill,sc) set_sc((skill),(sc),SI_BLANK,SCB_NONE)
// indicates that the status displays a visual effect for the affected unit, and should be sent to the client for all supported units
-#define set_sc_with_vfx(skill, sc, icon, flag) do { set_sc((skill), (sc), (icon), (flag)); if((icon) < SI_MAX) status->RelevantBLTypes[(icon)] |= BL_SCEFFECT; } while(0)
+#define set_sc_with_vfx(skill, sc, icon, flag) do { set_sc((skill), (sc), (icon), (flag)); if((icon) < SI_MAX) status->dbs->RelevantBLTypes[(icon)] |= BL_SCEFFECT; } while(0)
int i;
for (i = 0; i < SC_MAX; i++)
- status->IconChangeTable[i] = SI_BLANK;
+ status->dbs->IconChangeTable[i] = SI_BLANK;
for (i = 0; i < MAX_SKILL; i++)
- status->Skill2SCTable[i] = SC_NONE;
+ status->dbs->Skill2SCTable[i] = SC_NONE;
for (i = 0; i < SI_MAX; i++)
- status->RelevantBLTypes[i] = BL_PC;
+ status->dbs->RelevantBLTypes[i] = BL_PC;
- memset(status->SkillChangeTable, 0, sizeof(status->SkillChangeTable));
- memset(status->ChangeFlagTable, 0, sizeof(status->ChangeFlagTable));
- memset(status->DisplayType, 0, sizeof(status->DisplayType));
+ memset(status->dbs->SkillChangeTable, 0, sizeof(status->dbs->SkillChangeTable));
+ memset(status->dbs->ChangeFlagTable, 0, sizeof(status->dbs->ChangeFlagTable));
+ memset(status->dbs->DisplayType, 0, sizeof(status->dbs->DisplayType));
//First we define the skill for common ailments. These are used in skill_additional_effect through sc cards. [Skotlex]
set_sc( NPC_PETRIFYATTACK , SC_STONE , SI_BLANK , SCB_DEF_ELE|SCB_DEF|SCB_MDEF );
@@ -754,303 +757,303 @@ void initChangeTables(void) {
set_sc_with_vfx( GN_ILLUSIONDOPING , SC_ILLUSIONDOPING , SI_ILLUSIONDOPING , SCB_HIT );
// Storing the target job rather than simply SC_SOULLINK simplifies code later on.
- status->Skill2SCTable[SL_ALCHEMIST] = (sc_type)MAPID_ALCHEMIST,
- status->Skill2SCTable[SL_MONK] = (sc_type)MAPID_MONK,
- status->Skill2SCTable[SL_STAR] = (sc_type)MAPID_STAR_GLADIATOR,
- status->Skill2SCTable[SL_SAGE] = (sc_type)MAPID_SAGE,
- status->Skill2SCTable[SL_CRUSADER] = (sc_type)MAPID_CRUSADER,
- status->Skill2SCTable[SL_SUPERNOVICE] = (sc_type)MAPID_SUPER_NOVICE,
- status->Skill2SCTable[SL_KNIGHT] = (sc_type)MAPID_KNIGHT,
- status->Skill2SCTable[SL_WIZARD] = (sc_type)MAPID_WIZARD,
- status->Skill2SCTable[SL_PRIEST] = (sc_type)MAPID_PRIEST,
- status->Skill2SCTable[SL_BARDDANCER] = (sc_type)MAPID_BARDDANCER,
- status->Skill2SCTable[SL_ROGUE] = (sc_type)MAPID_ROGUE,
- status->Skill2SCTable[SL_ASSASIN] = (sc_type)MAPID_ASSASSIN,
- status->Skill2SCTable[SL_BLACKSMITH] = (sc_type)MAPID_BLACKSMITH,
- status->Skill2SCTable[SL_HUNTER] = (sc_type)MAPID_HUNTER,
- status->Skill2SCTable[SL_SOULLINKER] = (sc_type)MAPID_SOUL_LINKER,
+ status->dbs->Skill2SCTable[SL_ALCHEMIST] = (sc_type)MAPID_ALCHEMIST,
+ status->dbs->Skill2SCTable[SL_MONK] = (sc_type)MAPID_MONK,
+ status->dbs->Skill2SCTable[SL_STAR] = (sc_type)MAPID_STAR_GLADIATOR,
+ status->dbs->Skill2SCTable[SL_SAGE] = (sc_type)MAPID_SAGE,
+ status->dbs->Skill2SCTable[SL_CRUSADER] = (sc_type)MAPID_CRUSADER,
+ status->dbs->Skill2SCTable[SL_SUPERNOVICE] = (sc_type)MAPID_SUPER_NOVICE,
+ status->dbs->Skill2SCTable[SL_KNIGHT] = (sc_type)MAPID_KNIGHT,
+ status->dbs->Skill2SCTable[SL_WIZARD] = (sc_type)MAPID_WIZARD,
+ status->dbs->Skill2SCTable[SL_PRIEST] = (sc_type)MAPID_PRIEST,
+ status->dbs->Skill2SCTable[SL_BARDDANCER] = (sc_type)MAPID_BARDDANCER,
+ status->dbs->Skill2SCTable[SL_ROGUE] = (sc_type)MAPID_ROGUE,
+ status->dbs->Skill2SCTable[SL_ASSASIN] = (sc_type)MAPID_ASSASSIN,
+ status->dbs->Skill2SCTable[SL_BLACKSMITH] = (sc_type)MAPID_BLACKSMITH,
+ status->dbs->Skill2SCTable[SL_HUNTER] = (sc_type)MAPID_HUNTER,
+ status->dbs->Skill2SCTable[SL_SOULLINKER] = (sc_type)MAPID_SOUL_LINKER,
//Status that don't have a skill associated.
- status->IconChangeTable[SC_WEIGHTOVER50] = SI_WEIGHTOVER50;
- status->IconChangeTable[SC_WEIGHTOVER90] = SI_WEIGHTOVER90;
- status->IconChangeTable[SC_ATTHASTE_POTION1] = SI_ATTHASTE_POTION1;
- status->IconChangeTable[SC_ATTHASTE_POTION2] = SI_ATTHASTE_POTION2;
- status->IconChangeTable[SC_ATTHASTE_POTION3] = SI_ATTHASTE_POTION3;
- status->IconChangeTable[SC_ATTHASTE_INFINITY] = SI_ATTHASTE_INFINITY;
- status->IconChangeTable[SC_MOVHASTE_HORSE] = SI_MOVHASTE_HORSE;
- status->IconChangeTable[SC_MOVHASTE_INFINITY] = SI_MOVHASTE_INFINITY;
- status->IconChangeTable[SC_CHASEWALK2] = SI_INCSTR;
- status->IconChangeTable[SC_MIRACLE] = SI_SOULLINK;
- status->IconChangeTable[SC_CLAIRVOYANCE] = SI_CLAIRVOYANCE;
- status->IconChangeTable[SC_FOOD_STR] = SI_FOOD_STR;
- status->IconChangeTable[SC_FOOD_AGI] = SI_FOOD_AGI;
- status->IconChangeTable[SC_FOOD_VIT] = SI_FOOD_VIT;
- status->IconChangeTable[SC_FOOD_INT] = SI_FOOD_INT;
- status->IconChangeTable[SC_FOOD_DEX] = SI_FOOD_DEX;
- status->IconChangeTable[SC_FOOD_LUK] = SI_FOOD_LUK;
- status->IconChangeTable[SC_FOOD_BASICAVOIDANCE]= SI_FOOD_BASICAVOIDANCE;
- status->IconChangeTable[SC_FOOD_BASICHIT] = SI_FOOD_BASICHIT;
- status->IconChangeTable[SC_MANU_ATK] = SI_MANU_ATK;
- status->IconChangeTable[SC_MANU_DEF] = SI_MANU_DEF;
- status->IconChangeTable[SC_SPL_ATK] = SI_SPL_ATK;
- status->IconChangeTable[SC_SPL_DEF] = SI_SPL_DEF;
- status->IconChangeTable[SC_MANU_MATK] = SI_MANU_MATK;
- status->IconChangeTable[SC_SPL_MATK] = SI_SPL_MATK;
- status->IconChangeTable[SC_PLUSATTACKPOWER] = SI_PLUSATTACKPOWER;
- status->IconChangeTable[SC_PLUSMAGICPOWER] = SI_PLUSMAGICPOWER;
+ status->dbs->IconChangeTable[SC_WEIGHTOVER50] = SI_WEIGHTOVER50;
+ status->dbs->IconChangeTable[SC_WEIGHTOVER90] = SI_WEIGHTOVER90;
+ status->dbs->IconChangeTable[SC_ATTHASTE_POTION1] = SI_ATTHASTE_POTION1;
+ status->dbs->IconChangeTable[SC_ATTHASTE_POTION2] = SI_ATTHASTE_POTION2;
+ status->dbs->IconChangeTable[SC_ATTHASTE_POTION3] = SI_ATTHASTE_POTION3;
+ status->dbs->IconChangeTable[SC_ATTHASTE_INFINITY] = SI_ATTHASTE_INFINITY;
+ status->dbs->IconChangeTable[SC_MOVHASTE_HORSE] = SI_MOVHASTE_HORSE;
+ status->dbs->IconChangeTable[SC_MOVHASTE_INFINITY] = SI_MOVHASTE_INFINITY;
+ status->dbs->IconChangeTable[SC_CHASEWALK2] = SI_INCSTR;
+ status->dbs->IconChangeTable[SC_MIRACLE] = SI_SOULLINK;
+ status->dbs->IconChangeTable[SC_CLAIRVOYANCE] = SI_CLAIRVOYANCE;
+ status->dbs->IconChangeTable[SC_FOOD_STR] = SI_FOOD_STR;
+ status->dbs->IconChangeTable[SC_FOOD_AGI] = SI_FOOD_AGI;
+ status->dbs->IconChangeTable[SC_FOOD_VIT] = SI_FOOD_VIT;
+ status->dbs->IconChangeTable[SC_FOOD_INT] = SI_FOOD_INT;
+ status->dbs->IconChangeTable[SC_FOOD_DEX] = SI_FOOD_DEX;
+ status->dbs->IconChangeTable[SC_FOOD_LUK] = SI_FOOD_LUK;
+ status->dbs->IconChangeTable[SC_FOOD_BASICAVOIDANCE]= SI_FOOD_BASICAVOIDANCE;
+ status->dbs->IconChangeTable[SC_FOOD_BASICHIT] = SI_FOOD_BASICHIT;
+ status->dbs->IconChangeTable[SC_MANU_ATK] = SI_MANU_ATK;
+ status->dbs->IconChangeTable[SC_MANU_DEF] = SI_MANU_DEF;
+ status->dbs->IconChangeTable[SC_SPL_ATK] = SI_SPL_ATK;
+ status->dbs->IconChangeTable[SC_SPL_DEF] = SI_SPL_DEF;
+ status->dbs->IconChangeTable[SC_MANU_MATK] = SI_MANU_MATK;
+ status->dbs->IconChangeTable[SC_SPL_MATK] = SI_SPL_MATK;
+ status->dbs->IconChangeTable[SC_PLUSATTACKPOWER] = SI_PLUSATTACKPOWER;
+ status->dbs->IconChangeTable[SC_PLUSMAGICPOWER] = SI_PLUSMAGICPOWER;
//Cash Items
- status->IconChangeTable[SC_FOOD_STR_CASH] = SI_FOOD_STR_CASH;
- status->IconChangeTable[SC_FOOD_AGI_CASH] = SI_FOOD_AGI_CASH;
- status->IconChangeTable[SC_FOOD_VIT_CASH] = SI_FOOD_VIT_CASH;
- status->IconChangeTable[SC_FOOD_DEX_CASH] = SI_FOOD_DEX_CASH;
- status->IconChangeTable[SC_FOOD_INT_CASH] = SI_FOOD_INT_CASH;
- status->IconChangeTable[SC_FOOD_LUK_CASH] = SI_FOOD_LUK_CASH;
- status->IconChangeTable[SC_CASH_PLUSEXP] = SI_CASH_PLUSEXP;
- status->IconChangeTable[SC_CASH_RECEIVEITEM] = SI_CASH_RECEIVEITEM;
- status->IconChangeTable[SC_CASH_PLUSONLYJOBEXP] = SI_CASH_PLUSONLYJOBEXP;
- status->IconChangeTable[SC_CASH_DEATHPENALTY] = SI_CASH_DEATHPENALTY;
- status->IconChangeTable[SC_CASH_BOSS_ALARM] = SI_CASH_BOSS_ALARM;
- status->IconChangeTable[SC_PROTECT_DEF] = SI_PROTECT_DEF;
- status->IconChangeTable[SC_PROTECT_MDEF] = SI_PROTECT_MDEF;
- status->IconChangeTable[SC_CRITICALPERCENT] = SI_CRITICALPERCENT;
- status->IconChangeTable[SC_PLUSAVOIDVALUE] = SI_PLUSAVOIDVALUE;
- status->IconChangeTable[SC_HEALPLUS] = SI_HEALPLUS;
- status->IconChangeTable[SC_S_LIFEPOTION] = SI_S_LIFEPOTION;
- status->IconChangeTable[SC_L_LIFEPOTION] = SI_L_LIFEPOTION;
- status->IconChangeTable[SC_ATKER_BLOOD] = SI_ATKER_BLOOD;
- status->IconChangeTable[SC_TARGET_BLOOD] = SI_TARGET_BLOOD;
+ status->dbs->IconChangeTable[SC_FOOD_STR_CASH] = SI_FOOD_STR_CASH;
+ status->dbs->IconChangeTable[SC_FOOD_AGI_CASH] = SI_FOOD_AGI_CASH;
+ status->dbs->IconChangeTable[SC_FOOD_VIT_CASH] = SI_FOOD_VIT_CASH;
+ status->dbs->IconChangeTable[SC_FOOD_DEX_CASH] = SI_FOOD_DEX_CASH;
+ status->dbs->IconChangeTable[SC_FOOD_INT_CASH] = SI_FOOD_INT_CASH;
+ status->dbs->IconChangeTable[SC_FOOD_LUK_CASH] = SI_FOOD_LUK_CASH;
+ status->dbs->IconChangeTable[SC_CASH_PLUSEXP] = SI_CASH_PLUSEXP;
+ status->dbs->IconChangeTable[SC_CASH_RECEIVEITEM] = SI_CASH_RECEIVEITEM;
+ status->dbs->IconChangeTable[SC_CASH_PLUSONLYJOBEXP] = SI_CASH_PLUSONLYJOBEXP;
+ status->dbs->IconChangeTable[SC_CASH_DEATHPENALTY] = SI_CASH_DEATHPENALTY;
+ status->dbs->IconChangeTable[SC_CASH_BOSS_ALARM] = SI_CASH_BOSS_ALARM;
+ status->dbs->IconChangeTable[SC_PROTECT_DEF] = SI_PROTECT_DEF;
+ status->dbs->IconChangeTable[SC_PROTECT_MDEF] = SI_PROTECT_MDEF;
+ status->dbs->IconChangeTable[SC_CRITICALPERCENT] = SI_CRITICALPERCENT;
+ status->dbs->IconChangeTable[SC_PLUSAVOIDVALUE] = SI_PLUSAVOIDVALUE;
+ status->dbs->IconChangeTable[SC_HEALPLUS] = SI_HEALPLUS;
+ status->dbs->IconChangeTable[SC_S_LIFEPOTION] = SI_S_LIFEPOTION;
+ status->dbs->IconChangeTable[SC_L_LIFEPOTION] = SI_L_LIFEPOTION;
+ status->dbs->IconChangeTable[SC_ATKER_BLOOD] = SI_ATKER_BLOOD;
+ status->dbs->IconChangeTable[SC_TARGET_BLOOD] = SI_TARGET_BLOOD;
// Mercenary Bonus Effects
- status->IconChangeTable[SC_MER_FLEE] = SI_MER_FLEE;
- status->IconChangeTable[SC_MER_ATK] = SI_MER_ATK;
- status->IconChangeTable[SC_MER_HP] = SI_MER_HP;
- status->IconChangeTable[SC_MER_SP] = SI_MER_SP;
- status->IconChangeTable[SC_MER_HIT] = SI_MER_HIT;
+ status->dbs->IconChangeTable[SC_MER_FLEE] = SI_MER_FLEE;
+ status->dbs->IconChangeTable[SC_MER_ATK] = SI_MER_ATK;
+ status->dbs->IconChangeTable[SC_MER_HP] = SI_MER_HP;
+ status->dbs->IconChangeTable[SC_MER_SP] = SI_MER_SP;
+ status->dbs->IconChangeTable[SC_MER_HIT] = SI_MER_HIT;
// Warlock Spheres
- status->IconChangeTable[SC_SUMMON1] = SI_SPHERE_1;
- status->IconChangeTable[SC_SUMMON2] = SI_SPHERE_2;
- status->IconChangeTable[SC_SUMMON3] = SI_SPHERE_3;
- status->IconChangeTable[SC_SUMMON4] = SI_SPHERE_4;
- status->IconChangeTable[SC_SUMMON5] = SI_SPHERE_5;
+ status->dbs->IconChangeTable[SC_SUMMON1] = SI_SPHERE_1;
+ status->dbs->IconChangeTable[SC_SUMMON2] = SI_SPHERE_2;
+ status->dbs->IconChangeTable[SC_SUMMON3] = SI_SPHERE_3;
+ status->dbs->IconChangeTable[SC_SUMMON4] = SI_SPHERE_4;
+ status->dbs->IconChangeTable[SC_SUMMON5] = SI_SPHERE_5;
// Warlock Preserved spells
- status->IconChangeTable[SC_SPELLBOOK1] = SI_SPELLBOOK1;
- status->IconChangeTable[SC_SPELLBOOK2] = SI_SPELLBOOK2;
- status->IconChangeTable[SC_SPELLBOOK3] = SI_SPELLBOOK3;
- status->IconChangeTable[SC_SPELLBOOK4] = SI_SPELLBOOK4;
- status->IconChangeTable[SC_SPELLBOOK5] = SI_SPELLBOOK5;
- status->IconChangeTable[SC_SPELLBOOK6] = SI_SPELLBOOK6;
- status->IconChangeTable[SC_SPELLBOOK7] = SI_SPELLBOOK7;
-
- status->IconChangeTable[SC_NEUTRALBARRIER_MASTER] = SI_NEUTRALBARRIER_MASTER;
- status->IconChangeTable[SC_STEALTHFIELD_MASTER] = SI_STEALTHFIELD_MASTER;
- status->IconChangeTable[SC_OVERHEAT] = SI_OVERHEAT;
- status->IconChangeTable[SC_OVERHEAT_LIMITPOINT] = SI_OVERHEAT_LIMITPOINT;
-
- status->IconChangeTable[SC_HALLUCINATIONWALK_POSTDELAY] = SI_HALLUCINATIONWALK_POSTDELAY;
- status->IconChangeTable[SC_TOXIN] = SI_TOXIN;
- status->IconChangeTable[SC_PARALYSE] = SI_PARALYSE;
- status->IconChangeTable[SC_VENOMBLEED] = SI_VENOMBLEED;
- status->IconChangeTable[SC_MAGICMUSHROOM] = SI_MAGICMUSHROOM;
- status->IconChangeTable[SC_DEATHHURT] = SI_DEATHHURT;
- status->IconChangeTable[SC_PYREXIA] = SI_PYREXIA;
- status->IconChangeTable[SC_OBLIVIONCURSE] = SI_OBLIVIONCURSE;
- status->IconChangeTable[SC_LEECHESEND] = SI_LEECHESEND;
-
- status->IconChangeTable[SC_SHIELDSPELL_DEF] = SI_SHIELDSPELL_DEF;
- status->IconChangeTable[SC_SHIELDSPELL_MDEF] = SI_SHIELDSPELL_MDEF;
- status->IconChangeTable[SC_SHIELDSPELL_REF] = SI_SHIELDSPELL_REF;
- status->IconChangeTable[SC_BANDING_DEFENCE] = SI_BANDING_DEFENCE;
-
- status->IconChangeTable[SC_CURSEDCIRCLE_ATKER] = SI_CURSEDCIRCLE_ATKER;
-
- status->IconChangeTable[SC_STOMACHACHE] = SI_STOMACHACHE;
- status->IconChangeTable[SC_MYSTERIOUS_POWDER] = SI_MYSTERIOUS_POWDER;
- status->IconChangeTable[SC_MELON_BOMB] = SI_MELON_BOMB;
- status->IconChangeTable[SC_BANANA_BOMB] = SI_BANANA_BOMB;
- status->IconChangeTable[SC_BANANA_BOMB_SITDOWN_POSTDELAY] = SI_BANANA_BOMB_SITDOWN_POSTDELAY;
+ status->dbs->IconChangeTable[SC_SPELLBOOK1] = SI_SPELLBOOK1;
+ status->dbs->IconChangeTable[SC_SPELLBOOK2] = SI_SPELLBOOK2;
+ status->dbs->IconChangeTable[SC_SPELLBOOK3] = SI_SPELLBOOK3;
+ status->dbs->IconChangeTable[SC_SPELLBOOK4] = SI_SPELLBOOK4;
+ status->dbs->IconChangeTable[SC_SPELLBOOK5] = SI_SPELLBOOK5;
+ status->dbs->IconChangeTable[SC_SPELLBOOK6] = SI_SPELLBOOK6;
+ status->dbs->IconChangeTable[SC_SPELLBOOK7] = SI_SPELLBOOK7;
+
+ status->dbs->IconChangeTable[SC_NEUTRALBARRIER_MASTER] = SI_NEUTRALBARRIER_MASTER;
+ status->dbs->IconChangeTable[SC_STEALTHFIELD_MASTER] = SI_STEALTHFIELD_MASTER;
+ status->dbs->IconChangeTable[SC_OVERHEAT] = SI_OVERHEAT;
+ status->dbs->IconChangeTable[SC_OVERHEAT_LIMITPOINT] = SI_OVERHEAT_LIMITPOINT;
+
+ status->dbs->IconChangeTable[SC_HALLUCINATIONWALK_POSTDELAY] = SI_HALLUCINATIONWALK_POSTDELAY;
+ status->dbs->IconChangeTable[SC_TOXIN] = SI_TOXIN;
+ status->dbs->IconChangeTable[SC_PARALYSE] = SI_PARALYSE;
+ status->dbs->IconChangeTable[SC_VENOMBLEED] = SI_VENOMBLEED;
+ status->dbs->IconChangeTable[SC_MAGICMUSHROOM] = SI_MAGICMUSHROOM;
+ status->dbs->IconChangeTable[SC_DEATHHURT] = SI_DEATHHURT;
+ status->dbs->IconChangeTable[SC_PYREXIA] = SI_PYREXIA;
+ status->dbs->IconChangeTable[SC_OBLIVIONCURSE] = SI_OBLIVIONCURSE;
+ status->dbs->IconChangeTable[SC_LEECHESEND] = SI_LEECHESEND;
+
+ status->dbs->IconChangeTable[SC_SHIELDSPELL_DEF] = SI_SHIELDSPELL_DEF;
+ status->dbs->IconChangeTable[SC_SHIELDSPELL_MDEF] = SI_SHIELDSPELL_MDEF;
+ status->dbs->IconChangeTable[SC_SHIELDSPELL_REF] = SI_SHIELDSPELL_REF;
+ status->dbs->IconChangeTable[SC_BANDING_DEFENCE] = SI_BANDING_DEFENCE;
+
+ status->dbs->IconChangeTable[SC_CURSEDCIRCLE_ATKER] = SI_CURSEDCIRCLE_ATKER;
+
+ status->dbs->IconChangeTable[SC_STOMACHACHE] = SI_STOMACHACHE;
+ status->dbs->IconChangeTable[SC_MYSTERIOUS_POWDER] = SI_MYSTERIOUS_POWDER;
+ status->dbs->IconChangeTable[SC_MELON_BOMB] = SI_MELON_BOMB;
+ status->dbs->IconChangeTable[SC_BANANA_BOMB] = SI_BANANA_BOMB;
+ status->dbs->IconChangeTable[SC_BANANA_BOMB_SITDOWN_POSTDELAY] = SI_BANANA_BOMB_SITDOWN_POSTDELAY;
//Genetics New Food Items Status Icons
- status->IconChangeTable[SC_SAVAGE_STEAK] = SI_SAVAGE_STEAK;
- status->IconChangeTable[SC_COCKTAIL_WARG_BLOOD] = SI_COCKTAIL_WARG_BLOOD;
- status->IconChangeTable[SC_MINOR_BBQ] = SI_MINOR_BBQ;
- status->IconChangeTable[SC_SIROMA_ICE_TEA] = SI_SIROMA_ICE_TEA;
- status->IconChangeTable[SC_DROCERA_HERB_STEAMED] = SI_DROCERA_HERB_STEAMED;
- status->IconChangeTable[SC_PUTTI_TAILS_NOODLES] = SI_PUTTI_TAILS_NOODLES;
-
- status->IconChangeTable[SC_BOOST500] |= SI_BOOST500;
- status->IconChangeTable[SC_FULL_SWING_K] |= SI_FULL_SWING_K;
- status->IconChangeTable[SC_MANA_PLUS] |= SI_MANA_PLUS;
- status->IconChangeTable[SC_MUSTLE_M] |= SI_MUSTLE_M;
- status->IconChangeTable[SC_LIFE_FORCE_F] |= SI_LIFE_FORCE_F;
- status->IconChangeTable[SC_EXTRACT_WHITE_POTION_Z] |= SI_EXTRACT_WHITE_POTION_Z;
- status->IconChangeTable[SC_VITATA_500] |= SI_VITATA_500;
- status->IconChangeTable[SC_EXTRACT_SALAMINE_JUICE] |= SI_EXTRACT_SALAMINE_JUICE;
+ status->dbs->IconChangeTable[SC_SAVAGE_STEAK] = SI_SAVAGE_STEAK;
+ status->dbs->IconChangeTable[SC_COCKTAIL_WARG_BLOOD] = SI_COCKTAIL_WARG_BLOOD;
+ status->dbs->IconChangeTable[SC_MINOR_BBQ] = SI_MINOR_BBQ;
+ status->dbs->IconChangeTable[SC_SIROMA_ICE_TEA] = SI_SIROMA_ICE_TEA;
+ status->dbs->IconChangeTable[SC_DROCERA_HERB_STEAMED] = SI_DROCERA_HERB_STEAMED;
+ status->dbs->IconChangeTable[SC_PUTTI_TAILS_NOODLES] = SI_PUTTI_TAILS_NOODLES;
+
+ status->dbs->IconChangeTable[SC_BOOST500] |= SI_BOOST500;
+ status->dbs->IconChangeTable[SC_FULL_SWING_K] |= SI_FULL_SWING_K;
+ status->dbs->IconChangeTable[SC_MANA_PLUS] |= SI_MANA_PLUS;
+ status->dbs->IconChangeTable[SC_MUSTLE_M] |= SI_MUSTLE_M;
+ status->dbs->IconChangeTable[SC_LIFE_FORCE_F] |= SI_LIFE_FORCE_F;
+ status->dbs->IconChangeTable[SC_EXTRACT_WHITE_POTION_Z] |= SI_EXTRACT_WHITE_POTION_Z;
+ status->dbs->IconChangeTable[SC_VITATA_500] |= SI_VITATA_500;
+ status->dbs->IconChangeTable[SC_EXTRACT_SALAMINE_JUICE] |= SI_EXTRACT_SALAMINE_JUICE;
// Elemental Spirit's 'side' status change icons.
- status->IconChangeTable[SC_CIRCLE_OF_FIRE] = SI_CIRCLE_OF_FIRE;
- status->IconChangeTable[SC_FIRE_CLOAK] = SI_FIRE_CLOAK;
- status->IconChangeTable[SC_WATER_SCREEN] = SI_WATER_SCREEN;
- status->IconChangeTable[SC_WATER_DROP] = SI_WATER_DROP;
- status->IconChangeTable[SC_WIND_STEP] = SI_WIND_STEP;
- status->IconChangeTable[SC_WIND_CURTAIN] = SI_WIND_CURTAIN;
- status->IconChangeTable[SC_SOLID_SKIN] = SI_SOLID_SKIN;
- status->IconChangeTable[SC_STONE_SHIELD] = SI_STONE_SHIELD;
- status->IconChangeTable[SC_PYROTECHNIC] = SI_PYROTECHNIC;
- status->IconChangeTable[SC_HEATER] = SI_HEATER;
- status->IconChangeTable[SC_TROPIC] = SI_TROPIC;
- status->IconChangeTable[SC_AQUAPLAY] = SI_AQUAPLAY;
- status->IconChangeTable[SC_COOLER] = SI_COOLER;
- status->IconChangeTable[SC_CHILLY_AIR] = SI_CHILLY_AIR;
- status->IconChangeTable[SC_GUST] = SI_GUST;
- status->IconChangeTable[SC_BLAST] = SI_BLAST;
- status->IconChangeTable[SC_WILD_STORM] = SI_WILD_STORM;
- status->IconChangeTable[SC_PETROLOGY] = SI_PETROLOGY;
- status->IconChangeTable[SC_CURSED_SOIL] = SI_CURSED_SOIL;
- status->IconChangeTable[SC_UPHEAVAL] = SI_UPHEAVAL;
- status->IconChangeTable[SC_PUSH_CART] = SI_ON_PUSH_CART;
- status->IconChangeTable[SC_REBOUND] = SI_REBOUND;
- status->IconChangeTable[SC_ALL_RIDING] = SI_ALL_RIDING;
- status->IconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;
- status->IconChangeTable[SC_MOONSTAR] = SI_MOONSTAR;
- status->IconChangeTable[SC_SUPER_STAR] = SI_SUPER_STAR;
- status->IconChangeTable[SC_STRANGELIGHTS] = SI_STRANGELIGHTS;
- status->IconChangeTable[SC_DECORATION_OF_MUSIC] = SI_DECORATION_OF_MUSIC;
+ status->dbs->IconChangeTable[SC_CIRCLE_OF_FIRE] = SI_CIRCLE_OF_FIRE;
+ status->dbs->IconChangeTable[SC_FIRE_CLOAK] = SI_FIRE_CLOAK;
+ status->dbs->IconChangeTable[SC_WATER_SCREEN] = SI_WATER_SCREEN;
+ status->dbs->IconChangeTable[SC_WATER_DROP] = SI_WATER_DROP;
+ status->dbs->IconChangeTable[SC_WIND_STEP] = SI_WIND_STEP;
+ status->dbs->IconChangeTable[SC_WIND_CURTAIN] = SI_WIND_CURTAIN;
+ status->dbs->IconChangeTable[SC_SOLID_SKIN] = SI_SOLID_SKIN;
+ status->dbs->IconChangeTable[SC_STONE_SHIELD] = SI_STONE_SHIELD;
+ status->dbs->IconChangeTable[SC_PYROTECHNIC] = SI_PYROTECHNIC;
+ status->dbs->IconChangeTable[SC_HEATER] = SI_HEATER;
+ status->dbs->IconChangeTable[SC_TROPIC] = SI_TROPIC;
+ status->dbs->IconChangeTable[SC_AQUAPLAY] = SI_AQUAPLAY;
+ status->dbs->IconChangeTable[SC_COOLER] = SI_COOLER;
+ status->dbs->IconChangeTable[SC_CHILLY_AIR] = SI_CHILLY_AIR;
+ status->dbs->IconChangeTable[SC_GUST] = SI_GUST;
+ status->dbs->IconChangeTable[SC_BLAST] = SI_BLAST;
+ status->dbs->IconChangeTable[SC_WILD_STORM] = SI_WILD_STORM;
+ status->dbs->IconChangeTable[SC_PETROLOGY] = SI_PETROLOGY;
+ status->dbs->IconChangeTable[SC_CURSED_SOIL] = SI_CURSED_SOIL;
+ status->dbs->IconChangeTable[SC_UPHEAVAL] = SI_UPHEAVAL;
+ status->dbs->IconChangeTable[SC_PUSH_CART] = SI_ON_PUSH_CART;
+ status->dbs->IconChangeTable[SC_REBOUND] = SI_REBOUND;
+ status->dbs->IconChangeTable[SC_ALL_RIDING] = SI_ALL_RIDING;
+ status->dbs->IconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;
+ status->dbs->IconChangeTable[SC_MOONSTAR] = SI_MOONSTAR;
+ status->dbs->IconChangeTable[SC_SUPER_STAR] = SI_SUPER_STAR;
+ status->dbs->IconChangeTable[SC_STRANGELIGHTS] = SI_STRANGELIGHTS;
+ status->dbs->IconChangeTable[SC_DECORATION_OF_MUSIC] = SI_DECORATION_OF_MUSIC;
//Other SC which are not necessarily associated to skills.
- status->ChangeFlagTable[SC_ATTHASTE_POTION1] = SCB_ASPD;
- status->ChangeFlagTable[SC_ATTHASTE_POTION2] = SCB_ASPD;
- status->ChangeFlagTable[SC_ATTHASTE_POTION3] = SCB_ASPD;
- status->ChangeFlagTable[SC_ATTHASTE_INFINITY] = SCB_ASPD;
- status->ChangeFlagTable[SC_MOVHASTE_HORSE] = SCB_SPEED;
- status->ChangeFlagTable[SC_MOVHASTE_INFINITY] = SCB_SPEED;
- status->ChangeFlagTable[SC_PLUSATTACKPOWER] = SCB_BATK;
- status->ChangeFlagTable[SC_PLUSMAGICPOWER] = SCB_MATK;
- status->ChangeFlagTable[SC_INCALLSTATUS] |= SCB_STR|SCB_AGI|SCB_VIT|SCB_INT|SCB_DEX|SCB_LUK;
- status->ChangeFlagTable[SC_CHASEWALK2] |= SCB_STR;
- status->ChangeFlagTable[SC_INCAGI] |= SCB_AGI;
- status->ChangeFlagTable[SC_INCVIT] |= SCB_VIT;
- status->ChangeFlagTable[SC_INCINT] |= SCB_INT;
- status->ChangeFlagTable[SC_INCDEX] |= SCB_DEX;
- status->ChangeFlagTable[SC_INCLUK] |= SCB_LUK;
- status->ChangeFlagTable[SC_INCHIT] |= SCB_HIT;
- status->ChangeFlagTable[SC_INCHITRATE] |= SCB_HIT;
- status->ChangeFlagTable[SC_INCFLEE] |= SCB_FLEE;
- status->ChangeFlagTable[SC_INCFLEERATE] |= SCB_FLEE;
- status->ChangeFlagTable[SC_MTF_HITFLEE] |= SCB_HIT|SCB_FLEE;
- status->ChangeFlagTable[SC_CRITICALPERCENT] |= SCB_CRI;
- status->ChangeFlagTable[SC_INCASPDRATE] |= SCB_ASPD;
- status->ChangeFlagTable[SC_PLUSAVOIDVALUE] |= SCB_FLEE2;
- status->ChangeFlagTable[SC_INCMHPRATE] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_INCMSPRATE] |= SCB_MAXSP;
- status->ChangeFlagTable[SC_INCMHP] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_MTF_MHP] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_INCMSP] |= SCB_MAXSP;
- status->ChangeFlagTable[SC_MTF_MSP] |= SCB_MAXSP;
- status->ChangeFlagTable[SC_INCATKRATE] |= SCB_BATK|SCB_WATK;
- status->ChangeFlagTable[SC_INCMATKRATE] |= SCB_MATK;
- status->ChangeFlagTable[SC_INCDEFRATE] |= SCB_DEF;
- status->ChangeFlagTable[SC_FOOD_STR] |= SCB_STR;
- status->ChangeFlagTable[SC_FOOD_AGI] |= SCB_AGI;
- status->ChangeFlagTable[SC_FOOD_VIT] |= SCB_VIT;
- status->ChangeFlagTable[SC_FOOD_INT] |= SCB_INT;
- status->ChangeFlagTable[SC_FOOD_DEX] |= SCB_DEX;
- status->ChangeFlagTable[SC_FOOD_LUK] |= SCB_LUK;
- status->ChangeFlagTable[SC_FOOD_BASICHIT] |= SCB_HIT;
- status->ChangeFlagTable[SC_FOOD_BASICAVOIDANCE] |= SCB_FLEE;
- status->ChangeFlagTable[SC_BATKFOOD] |= SCB_BATK;
- status->ChangeFlagTable[SC_WATKFOOD] |= SCB_WATK;
- status->ChangeFlagTable[SC_MATKFOOD] |= SCB_MATK;
- status->ChangeFlagTable[SC_ARMORPROPERTY] |= SCB_ALL;
- status->ChangeFlagTable[SC_ARMOR_RESIST] |= SCB_ALL;
- status->ChangeFlagTable[SC_ATKER_BLOOD] |= SCB_ALL;
- status->ChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED;
- status->ChangeFlagTable[SC_ITEMSCRIPT] |= SCB_ALL;
+ status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION1] = SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION2] = SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION3] = SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_ATTHASTE_INFINITY] = SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_MOVHASTE_HORSE] = SCB_SPEED;
+ status->dbs->ChangeFlagTable[SC_MOVHASTE_INFINITY] = SCB_SPEED;
+ status->dbs->ChangeFlagTable[SC_PLUSATTACKPOWER] = SCB_BATK;
+ status->dbs->ChangeFlagTable[SC_PLUSMAGICPOWER] = SCB_MATK;
+ status->dbs->ChangeFlagTable[SC_INCALLSTATUS] |= SCB_STR|SCB_AGI|SCB_VIT|SCB_INT|SCB_DEX|SCB_LUK;
+ status->dbs->ChangeFlagTable[SC_CHASEWALK2] |= SCB_STR;
+ status->dbs->ChangeFlagTable[SC_INCAGI] |= SCB_AGI;
+ status->dbs->ChangeFlagTable[SC_INCVIT] |= SCB_VIT;
+ status->dbs->ChangeFlagTable[SC_INCINT] |= SCB_INT;
+ status->dbs->ChangeFlagTable[SC_INCDEX] |= SCB_DEX;
+ status->dbs->ChangeFlagTable[SC_INCLUK] |= SCB_LUK;
+ status->dbs->ChangeFlagTable[SC_INCHIT] |= SCB_HIT;
+ status->dbs->ChangeFlagTable[SC_INCHITRATE] |= SCB_HIT;
+ status->dbs->ChangeFlagTable[SC_INCFLEE] |= SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_INCFLEERATE] |= SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_MTF_HITFLEE] |= SCB_HIT|SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_CRITICALPERCENT] |= SCB_CRI;
+ status->dbs->ChangeFlagTable[SC_INCASPDRATE] |= SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_PLUSAVOIDVALUE] |= SCB_FLEE2;
+ status->dbs->ChangeFlagTable[SC_INCMHPRATE] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_INCMSPRATE] |= SCB_MAXSP;
+ status->dbs->ChangeFlagTable[SC_INCMHP] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_MTF_MHP] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_INCMSP] |= SCB_MAXSP;
+ status->dbs->ChangeFlagTable[SC_MTF_MSP] |= SCB_MAXSP;
+ status->dbs->ChangeFlagTable[SC_INCATKRATE] |= SCB_BATK|SCB_WATK;
+ status->dbs->ChangeFlagTable[SC_INCMATKRATE] |= SCB_MATK;
+ status->dbs->ChangeFlagTable[SC_INCDEFRATE] |= SCB_DEF;
+ status->dbs->ChangeFlagTable[SC_FOOD_STR] |= SCB_STR;
+ status->dbs->ChangeFlagTable[SC_FOOD_AGI] |= SCB_AGI;
+ status->dbs->ChangeFlagTable[SC_FOOD_VIT] |= SCB_VIT;
+ status->dbs->ChangeFlagTable[SC_FOOD_INT] |= SCB_INT;
+ status->dbs->ChangeFlagTable[SC_FOOD_DEX] |= SCB_DEX;
+ status->dbs->ChangeFlagTable[SC_FOOD_LUK] |= SCB_LUK;
+ status->dbs->ChangeFlagTable[SC_FOOD_BASICHIT] |= SCB_HIT;
+ status->dbs->ChangeFlagTable[SC_FOOD_BASICAVOIDANCE] |= SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_BATKFOOD] |= SCB_BATK;
+ status->dbs->ChangeFlagTable[SC_WATKFOOD] |= SCB_WATK;
+ status->dbs->ChangeFlagTable[SC_MATKFOOD] |= SCB_MATK;
+ status->dbs->ChangeFlagTable[SC_ARMORPROPERTY] |= SCB_ALL;
+ status->dbs->ChangeFlagTable[SC_ARMOR_RESIST] |= SCB_ALL;
+ status->dbs->ChangeFlagTable[SC_ATKER_BLOOD] |= SCB_ALL;
+ status->dbs->ChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED;
+ status->dbs->ChangeFlagTable[SC_ITEMSCRIPT] |= SCB_ALL;
// Cash Items
- status->ChangeFlagTable[SC_FOOD_STR_CASH] = SCB_STR;
- status->ChangeFlagTable[SC_FOOD_AGI_CASH] = SCB_AGI;
- status->ChangeFlagTable[SC_FOOD_VIT_CASH] = SCB_VIT;
- status->ChangeFlagTable[SC_FOOD_DEX_CASH] = SCB_DEX;
- status->ChangeFlagTable[SC_FOOD_INT_CASH] = SCB_INT;
- status->ChangeFlagTable[SC_FOOD_LUK_CASH] = SCB_LUK;
+ status->dbs->ChangeFlagTable[SC_FOOD_STR_CASH] = SCB_STR;
+ status->dbs->ChangeFlagTable[SC_FOOD_AGI_CASH] = SCB_AGI;
+ status->dbs->ChangeFlagTable[SC_FOOD_VIT_CASH] = SCB_VIT;
+ status->dbs->ChangeFlagTable[SC_FOOD_DEX_CASH] = SCB_DEX;
+ status->dbs->ChangeFlagTable[SC_FOOD_INT_CASH] = SCB_INT;
+ status->dbs->ChangeFlagTable[SC_FOOD_LUK_CASH] = SCB_LUK;
// Mercenary Bonus Effects
- status->ChangeFlagTable[SC_MER_FLEE] |= SCB_FLEE;
- status->ChangeFlagTable[SC_MER_ATK] |= SCB_WATK;
- status->ChangeFlagTable[SC_MER_HP] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_MER_SP] |= SCB_MAXSP;
- status->ChangeFlagTable[SC_MER_HIT] |= SCB_HIT;
+ status->dbs->ChangeFlagTable[SC_MER_FLEE] |= SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_MER_ATK] |= SCB_WATK;
+ status->dbs->ChangeFlagTable[SC_MER_HP] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_MER_SP] |= SCB_MAXSP;
+ status->dbs->ChangeFlagTable[SC_MER_HIT] |= SCB_HIT;
// Guillotine Cross Poison Effects
- status->ChangeFlagTable[SC_PARALYSE] |= SCB_FLEE|SCB_SPEED|SCB_ASPD;
- status->ChangeFlagTable[SC_VENOMBLEED] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_MAGICMUSHROOM] |= SCB_REGEN;
- status->ChangeFlagTable[SC_DEATHHURT] |= SCB_REGEN;
- status->ChangeFlagTable[SC_PYREXIA] |= SCB_HIT|SCB_FLEE;
- status->ChangeFlagTable[SC_OBLIVIONCURSE] |= SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_PARALYSE] |= SCB_FLEE|SCB_SPEED|SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_VENOMBLEED] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_MAGICMUSHROOM] |= SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_DEATHHURT] |= SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_PYREXIA] |= SCB_HIT|SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_OBLIVIONCURSE] |= SCB_REGEN;
// RG status
- status->ChangeFlagTable[SC_SHIELDSPELL_DEF] |= SCB_WATK;
- status->ChangeFlagTable[SC_SHIELDSPELL_REF] |= SCB_DEF;
+ status->dbs->ChangeFlagTable[SC_SHIELDSPELL_DEF] |= SCB_WATK;
+ status->dbs->ChangeFlagTable[SC_SHIELDSPELL_REF] |= SCB_DEF;
// Meca status
- status->ChangeFlagTable[SC_STEALTHFIELD_MASTER] |= SCB_SPEED;
-
- status->ChangeFlagTable[SC_SAVAGE_STEAK] |= SCB_STR;
- status->ChangeFlagTable[SC_COCKTAIL_WARG_BLOOD] |= SCB_INT;
- status->ChangeFlagTable[SC_MINOR_BBQ] |= SCB_VIT;
- status->ChangeFlagTable[SC_SIROMA_ICE_TEA] |= SCB_DEX;
- status->ChangeFlagTable[SC_DROCERA_HERB_STEAMED] |= SCB_AGI;
- status->ChangeFlagTable[SC_PUTTI_TAILS_NOODLES] |= SCB_LUK;
- status->ChangeFlagTable[SC_BOOST500] |= SCB_ASPD;
- status->ChangeFlagTable[SC_FULL_SWING_K] |= SCB_BATK;
- status->ChangeFlagTable[SC_MANA_PLUS] |= SCB_MATK;
- status->ChangeFlagTable[SC_MUSTLE_M] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_LIFE_FORCE_F] |= SCB_MAXSP;
- status->ChangeFlagTable[SC_EXTRACT_WHITE_POTION_Z] |= SCB_REGEN;
- status->ChangeFlagTable[SC_VITATA_500] |= SCB_REGEN;
- status->ChangeFlagTable[SC_EXTRACT_SALAMINE_JUICE] |= SCB_ASPD;
- status->ChangeFlagTable[SC_REBOUND] |= SCB_SPEED|SCB_REGEN;
- status->ChangeFlagTable[SC_DEFSET] |= SCB_DEF|SCB_DEF2;
- status->ChangeFlagTable[SC_MDEFSET] |= SCB_MDEF|SCB_MDEF2;
- status->ChangeFlagTable[SC_MYSTERIOUS_POWDER] |= SCB_MAXHP;
-
- status->ChangeFlagTable[SC_ALL_RIDING] = SCB_SPEED;
- status->ChangeFlagTable[SC_WEDDING] = SCB_SPEED;
-
- status->ChangeFlagTable[SC_MTF_ASPD] = SCB_ASPD|SCB_HIT;
- status->ChangeFlagTable[SC_MTF_MATK] = SCB_MATK;
- status->ChangeFlagTable[SC_MTF_MLEATKED] |= SCB_ALL;
-
- status->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE;
- status->ChangeFlagTable[SC_SUPER_STAR] |= SCB_NONE;
- status->ChangeFlagTable[SC_STRANGELIGHTS] |= SCB_NONE;
- status->ChangeFlagTable[SC_DECORATION_OF_MUSIC] |= SCB_NONE;
-
- /* status->DisplayType Table [Ind/Hercules] */
- status->DisplayType[SC_ALL_RIDING] = true;
- status->DisplayType[SC_PUSH_CART] = true;
- status->DisplayType[SC_SUMMON1] = true;
- status->DisplayType[SC_SUMMON2] = true;
- status->DisplayType[SC_SUMMON3] = true;
- status->DisplayType[SC_SUMMON4] = true;
- status->DisplayType[SC_SUMMON5] = true;
- status->DisplayType[SC_CAMOUFLAGE] = true;
- status->DisplayType[SC_DUPLELIGHT] = true;
- status->DisplayType[SC_ORATIO] = true;
- status->DisplayType[SC_FROSTMISTY] = true;
- status->DisplayType[SC_VENOMIMPRESS] = true;
- status->DisplayType[SC_HALLUCINATIONWALK] = true;
- status->DisplayType[SC_ROLLINGCUTTER] = true;
- status->DisplayType[SC_BANDING] = true;
- status->DisplayType[SC_COLD] = true;
- status->DisplayType[SC_DEEP_SLEEP] = true;
- status->DisplayType[SC_CURSEDCIRCLE_ATKER] = true;
- status->DisplayType[SC_CURSEDCIRCLE_TARGET] = true;
- status->DisplayType[SC_BLOOD_SUCKER] = true;
- status->DisplayType[SC__SHADOWFORM] = true;
- status->DisplayType[SC_MONSTER_TRANSFORM] = true;
- status->DisplayType[SC_MOONSTAR] = true;
- status->DisplayType[SC_SUPER_STAR] = true;
- status->DisplayType[SC_STRANGELIGHTS] = true;
- status->DisplayType[SC_DECORATION_OF_MUSIC] = true;
+ status->dbs->ChangeFlagTable[SC_STEALTHFIELD_MASTER] |= SCB_SPEED;
+
+ status->dbs->ChangeFlagTable[SC_SAVAGE_STEAK] |= SCB_STR;
+ status->dbs->ChangeFlagTable[SC_COCKTAIL_WARG_BLOOD] |= SCB_INT;
+ status->dbs->ChangeFlagTable[SC_MINOR_BBQ] |= SCB_VIT;
+ status->dbs->ChangeFlagTable[SC_SIROMA_ICE_TEA] |= SCB_DEX;
+ status->dbs->ChangeFlagTable[SC_DROCERA_HERB_STEAMED] |= SCB_AGI;
+ status->dbs->ChangeFlagTable[SC_PUTTI_TAILS_NOODLES] |= SCB_LUK;
+ status->dbs->ChangeFlagTable[SC_BOOST500] |= SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_FULL_SWING_K] |= SCB_BATK;
+ status->dbs->ChangeFlagTable[SC_MANA_PLUS] |= SCB_MATK;
+ status->dbs->ChangeFlagTable[SC_MUSTLE_M] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_LIFE_FORCE_F] |= SCB_MAXSP;
+ status->dbs->ChangeFlagTable[SC_EXTRACT_WHITE_POTION_Z] |= SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_VITATA_500] |= SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_EXTRACT_SALAMINE_JUICE] |= SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_REBOUND] |= SCB_SPEED|SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_DEFSET] |= SCB_DEF|SCB_DEF2;
+ status->dbs->ChangeFlagTable[SC_MDEFSET] |= SCB_MDEF|SCB_MDEF2;
+ status->dbs->ChangeFlagTable[SC_MYSTERIOUS_POWDER] |= SCB_MAXHP;
+
+ status->dbs->ChangeFlagTable[SC_ALL_RIDING] = SCB_SPEED;
+ status->dbs->ChangeFlagTable[SC_WEDDING] = SCB_SPEED;
+
+ status->dbs->ChangeFlagTable[SC_MTF_ASPD] = SCB_ASPD|SCB_HIT;
+ status->dbs->ChangeFlagTable[SC_MTF_MATK] = SCB_MATK;
+ status->dbs->ChangeFlagTable[SC_MTF_MLEATKED] |= SCB_ALL;
+
+ status->dbs->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE;
+ status->dbs->ChangeFlagTable[SC_SUPER_STAR] |= SCB_NONE;
+ status->dbs->ChangeFlagTable[SC_STRANGELIGHTS] |= SCB_NONE;
+ status->dbs->ChangeFlagTable[SC_DECORATION_OF_MUSIC] |= SCB_NONE;
+
+ /* status->dbs->DisplayType Table [Ind/Hercules] */
+ status->dbs->DisplayType[SC_ALL_RIDING] = true;
+ status->dbs->DisplayType[SC_PUSH_CART] = true;
+ status->dbs->DisplayType[SC_SUMMON1] = true;
+ status->dbs->DisplayType[SC_SUMMON2] = true;
+ status->dbs->DisplayType[SC_SUMMON3] = true;
+ status->dbs->DisplayType[SC_SUMMON4] = true;
+ status->dbs->DisplayType[SC_SUMMON5] = true;
+ status->dbs->DisplayType[SC_CAMOUFLAGE] = true;
+ status->dbs->DisplayType[SC_DUPLELIGHT] = true;
+ status->dbs->DisplayType[SC_ORATIO] = true;
+ status->dbs->DisplayType[SC_FROSTMISTY] = true;
+ status->dbs->DisplayType[SC_VENOMIMPRESS] = true;
+ status->dbs->DisplayType[SC_HALLUCINATIONWALK] = true;
+ status->dbs->DisplayType[SC_ROLLINGCUTTER] = true;
+ status->dbs->DisplayType[SC_BANDING] = true;
+ status->dbs->DisplayType[SC_COLD] = true;
+ status->dbs->DisplayType[SC_DEEP_SLEEP] = true;
+ status->dbs->DisplayType[SC_CURSEDCIRCLE_ATKER] = true;
+ status->dbs->DisplayType[SC_CURSEDCIRCLE_TARGET] = true;
+ status->dbs->DisplayType[SC_BLOOD_SUCKER] = true;
+ status->dbs->DisplayType[SC__SHADOWFORM] = true;
+ status->dbs->DisplayType[SC_MONSTER_TRANSFORM] = true;
+ status->dbs->DisplayType[SC_MOONSTAR] = true;
+ status->dbs->DisplayType[SC_SUPER_STAR] = true;
+ status->dbs->DisplayType[SC_STRANGELIGHTS] = true;
+ status->dbs->DisplayType[SC_DECORATION_OF_MUSIC] = true;
if( !battle_config.display_hallucination ) //Disable Hallucination.
- status->IconChangeTable[SC_ILLUSION] = SI_BLANK;
+ status->dbs->IconChangeTable[SC_ILLUSION] = SI_BLANK;
#undef add_sc
#undef set_sc_with_vfx
}
@@ -2089,7 +2092,7 @@ int status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt)
unsigned int status_get_base_maxsp(struct map_session_data* sd, struct status_data *st) {
uint64 val = pc->class2idx(sd->status.class_);
- val = status->SP_table[val][sd->status.base_level];
+ val = status->dbs->SP_table[val][sd->status.base_level];
if ( sd->class_&JOBL_UPPER )
val += val * 25 / 100;
@@ -2106,7 +2109,7 @@ unsigned int status_get_base_maxsp(struct map_session_data* sd, struct status_da
unsigned int status_get_base_maxhp(struct map_session_data *sd, struct status_data *st) {
uint64 val = pc->class2idx(sd->status.class_);
- val = status->HP_table[val][sd->status.base_level];
+ val = status->dbs->HP_table[val][sd->status.base_level];
if ( (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.base_level >= 99 )
val += 2000; //Supernovice lvl99 hp bonus.
@@ -2126,6 +2129,11 @@ unsigned int status_get_base_maxhp(struct map_session_data *sd, struct status_da
return (unsigned int)cap_value(val,0,UINT_MAX);
}
+void status_calc_pc_additional(struct map_session_data* sd, enum e_status_calc_opt opt) {
+ /* Just used for Plugin to give bonuses. */
+ return;
+}
+
//Calculates player data from scratch without counting SC adjustments.
//Should be invoked whenever players raise stats, learn passive skills or change equipment.
int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
@@ -2148,7 +2156,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
pc->calc_skilltree(sd); // SkillTree calculation
- sd->max_weight = status->max_weight_base[pc->class2idx(sd->status.class_)]+sd->status.str*300;
+ sd->max_weight = status->dbs->max_weight_base[pc->class2idx(sd->status.class_)]+sd->status.str*300;
if(opt&SCO_FIRST) {
//Load Hp/SP from char-received data.
@@ -2261,7 +2269,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
if (opt&SCO_FIRST && sd->inventory_data[index]->equip_script) {
//Execute equip-script on login
- script->run(sd->inventory_data[index]->equip_script,0,sd->bl.id,0);
+ script->run_item_equip_script(sd, sd->inventory_data[index], 0);
if (!calculating)
return 1;
}
@@ -2285,27 +2293,27 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
}
wa->atk += sd->inventory_data[index]->atk;
if ( (r = sd->status.inventory[index].refine) )
- wa->atk2 = status->refine_info[wlv].bonus[r-1] / 100;
+ wa->atk2 = status->dbs->refine_info[wlv].bonus[r-1] / 100;
#ifdef RENEWAL
wa->matk += sd->inventory_data[index]->matk;
wa->wlv = wlv;
if( r && sd->weapontype1 != W_BOW ) // renewal magic attack refine bonus
- wa->matk += status->refine_info[wlv].bonus[r-1] / 100;
+ wa->matk += status->dbs->refine_info[wlv].bonus[r-1] / 100;
#endif
//Overrefined bonus.
if (r)
- wd->overrefine = status->refine_info[wlv].randombonus_max[r-1] / 100;
+ wd->overrefine = status->dbs->refine_info[wlv].randombonus_max[r-1] / 100;
wa->range += sd->inventory_data[index]->range;
if(sd->inventory_data[index]->script) {
if (wd == &sd->left_weapon) {
sd->state.lr_flag = 1;
- script->run(sd->inventory_data[index]->script,0,sd->bl.id,0);
+ script->run_use_script(sd, sd->inventory_data[index], 0);
sd->state.lr_flag = 0;
} else
- script->run(sd->inventory_data[index]->script,0,sd->bl.id,0);
+ script->run_use_script(sd, sd->inventory_data[index], 0);
if (!calculating) //Abort, script->run retriggered this. [Skotlex]
return 1;
}
@@ -2324,11 +2332,11 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
else if(sd->inventory_data[index]->type == IT_ARMOR) {
int r;
if ( (r = sd->status.inventory[index].refine) )
- refinedef += status->refine_info[REFINE_TYPE_ARMOR].bonus[r-1];
+ refinedef += status->dbs->refine_info[REFINE_TYPE_ARMOR].bonus[r-1];
if(sd->inventory_data[index]->script) {
if( i == EQI_HAND_L ) //Shield
sd->state.lr_flag = 3;
- script->run(sd->inventory_data[index]->script,0,sd->bl.id,0);
+ script->run_use_script(sd, sd->inventory_data[index], 0);
if( i == EQI_HAND_L ) //Shield
sd->state.lr_flag = 0;
if (!calculating) //Abort, script->run retriggered this. [Skotlex]
@@ -2344,7 +2352,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
sd->bonus.arrow_atk += sd->inventory_data[index]->atk;
sd->state.lr_flag = 2;
if( !itemdb_is_GNthrowable(sd->inventory_data[index]->nameid) ) //don't run scripts on throwable items
- script->run(sd->inventory_data[index]->script,0,sd->bl.id,0);
+ script->run_use_script(sd, sd->inventory_data[index], 0);
sd->state.lr_flag = 0;
if (!calculating) //Abort, script->run retriggered status_calc_pc. [Skotlex]
return 1;
@@ -2422,7 +2430,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
continue;
if(opt&SCO_FIRST && data->equip_script) {//Execute equip-script on login
- script->run(data->equip_script,0,sd->bl.id,0);
+ script->run_item_equip_script(sd, data, 0);
if (!calculating)
return 1;
}
@@ -2432,10 +2440,10 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
if(i == EQI_HAND_L && sd->status.inventory[index].equip == EQP_HAND_L) { //Left hand status.
sd->state.lr_flag = 1;
- script->run(data->script,0,sd->bl.id,0);
+ script->run_use_script(sd, data, 0);
sd->state.lr_flag = 0;
} else
- script->run(data->script,0,sd->bl.id,0);
+ script->run_use_script(sd, data, 0);
if (!calculating) //Abort, script->run his function. [Skotlex]
return 1;
}
@@ -2445,8 +2453,10 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
if( sc->count && sc->data[SC_ITEMSCRIPT] ) {
struct item_data *data = itemdb->exists(sc->data[SC_ITEMSCRIPT]->val1);
if( data && data->script )
- script->run(data->script,0,sd->bl.id,0);
+ script->run_use_script(sd, data, 0);
}
+
+ status->calc_pc_additional(sd, opt);
if( sd->pd ) { // Pet Bonus
struct pet_data *pd = sd->pd;
@@ -2467,12 +2477,12 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
sd->bonus.splash_range += sd->bonus.splash_add_range;
// Damage modifiers from weapon type
- sd->right_weapon.atkmods[0] = status->atkmods[0][sd->weapontype1];
- sd->right_weapon.atkmods[1] = status->atkmods[1][sd->weapontype1];
- sd->right_weapon.atkmods[2] = status->atkmods[2][sd->weapontype1];
- sd->left_weapon.atkmods[0] = status->atkmods[0][sd->weapontype2];
- sd->left_weapon.atkmods[1] = status->atkmods[1][sd->weapontype2];
- sd->left_weapon.atkmods[2] = status->atkmods[2][sd->weapontype2];
+ sd->right_weapon.atkmods[0] = status->dbs->atkmods[0][sd->weapontype1];
+ sd->right_weapon.atkmods[1] = status->dbs->atkmods[1][sd->weapontype1];
+ sd->right_weapon.atkmods[2] = status->dbs->atkmods[2][sd->weapontype1];
+ sd->left_weapon.atkmods[0] = status->dbs->atkmods[0][sd->weapontype2];
+ sd->left_weapon.atkmods[1] = status->dbs->atkmods[1][sd->weapontype2];
+ sd->left_weapon.atkmods[2] = status->dbs->atkmods[2][sd->weapontype2];
if ((pc_isridingpeco(sd) || pc_isridingdragon(sd))
&& (sd->status.weapon==W_1HSPEAR || sd->status.weapon==W_2HSPEAR)
@@ -2488,9 +2498,9 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
// Job bonuses
index = pc->class2idx(sd->status.class_);
for(i=0;i<(int)sd->status.job_level && i<MAX_LEVEL;i++){
- if(!status->job_bonus[index][i])
+ if(!status->dbs->job_bonus[index][i])
continue;
- switch(status->job_bonus[index][i]) {
+ switch(status->dbs->job_bonus[index][i]) {
case 1: bstatus->str++; break;
case 2: bstatus->agi++; break;
case 3: bstatus->vit++; break;
@@ -3925,11 +3935,11 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
#ifdef RENEWAL_ASPD /* [malufett/Hercules] */
float temp;
int skill_lv, val = 0;
- amotion = status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1];
+ amotion = status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1];
if ( sd->status.weapon > MAX_WEAPON_TYPE )
- amotion += status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2] / 4;
+ amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2] / 4;
if ( sd->status.shield )
- amotion += status->aspd_base[pc->class2idx(sd->status.class_)][MAX_WEAPON_TYPE];
+ amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class_)][MAX_WEAPON_TYPE];
switch ( sd->status.weapon ) {
case W_BOW: case W_MUSICAL:
case W_WHIP: case W_REVOLVER:
@@ -3949,8 +3959,8 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
#else
// base weapon delay
amotion = (sd->status.weapon < MAX_WEAPON_TYPE)
- ? (status->aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
- : (status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1] + status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]) * 7 / 10; // dual-wield
+ ? (status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
+ : (status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1] + status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]) * 7 / 10; // dual-wield
// percentual delay reduction from stats
amotion -= amotion * (4 * st->agi + st->dex) / 1000;
@@ -7525,7 +7535,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
}
vd = status->get_viewdata(bl);
- calc_flag = status->ChangeFlagTable[type];
+ calc_flag = status->dbs->ChangeFlagTable[type];
if(!(flag&SCFLAG_LOADED)) { // Do not parse val settings when loading SCs
switch(type) {
case SC_ADORAMUS:
@@ -9056,7 +9066,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
val2 = 20+(20*val1);
break;
default:
- if (calc_flag == SCB_NONE && status->SkillChangeTable[type] == 0 && status->IconChangeTable[type] == 0) {
+ if (calc_flag == SCB_NONE && status->dbs->SkillChangeTable[type] == 0 && status->dbs->IconChangeTable[type] == 0) {
//Status change with no calc, no icon, and no skill associated...?
ShowError("UnknownStatusChange [%d]\n", type);
return 0;
@@ -9210,7 +9220,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
}
/* [Ind/Hercules] */
- if( sd && status->DisplayType[type] ) {
+ if( sd && status->dbs->DisplayType[type] ) {
int dval1 = 0, dval2 = 0, dval3 = 0;
switch( type ) {
case SC_ALL_RIDING:
@@ -9503,8 +9513,8 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
calc_flag&=~SCB_DYE;
}
- if(!(flag&SCFLAG_NOICON) && !(flag&SCFLAG_LOADED && status->DisplayType[type]))
- clif->status_change(bl,status->IconChangeTable[type],1,tick,(val_flag&1)?val1:1,(val_flag&2)?val2:0,(val_flag&4)?val3:0);
+ if(!(flag&SCFLAG_NOICON) && !(flag&SCFLAG_LOADED && status->dbs->DisplayType[type]))
+ clif->status_change(bl,status->dbs->IconChangeTable[type],1,tick,(val_flag&1)?val1:1,(val_flag&2)?val2:0,(val_flag&4)?val3:0);
/**
* used as temporary storage for scs with interval ticks, so that the actual duration is sent to the client first.
@@ -9751,7 +9761,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
sc->data[type] = NULL;
- if( sd && status->DisplayType[type] ) {
+ if( sd && status->dbs->DisplayType[type] ) {
status->display_remove(sd,type);
}
@@ -9761,7 +9771,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
#endif
vd = status->get_viewdata(bl);
- calc_flag = status->ChangeFlagTable[type];
+ calc_flag = status->dbs->ChangeFlagTable[type];
switch(type) {
case SC_GRANITIC_ARMOR:
{
@@ -10405,7 +10415,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
}
//On Aegis, when turning off a status change, first goes the sc packet, then the option packet.
- clif->sc_end(bl,bl->id,AREA,status->IconChangeTable[type]);
+ clif->sc_end(bl,bl->id,AREA,status->dbs->IconChangeTable[type]);
if( opt_flag&8 ) //bugreport:681
clif->changeoption2(bl);
@@ -10584,7 +10594,7 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
sc->opt1 = OPT1_STONE;
clif->changeoption(bl);
sc_timer_next(1000+tick, status->change_timer, bl->id, data );
- status_calc_bl(bl, status->ChangeFlagTable[type]);
+ status_calc_bl(bl, status->dbs->ChangeFlagTable[type]);
return 0;
}
if(--(sce->val3) > 0) {
@@ -10870,7 +10880,7 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
unit->skillcastcancel(bl,0);
do {
int i = rnd() % MAX_SKILL_MAGICMUSHROOM_DB;
- mushroom_skill_id = skill->magicmushroom_db[i].skill_id;
+ mushroom_skill_id = skill->dbs->magicmushroom_db[i].skill_id;
} while (mushroom_skill_id == 0);
switch( skill->get_casttype(mushroom_skill_id) ) { // Magic Mushroom skills are buffs or area damage
@@ -11449,7 +11459,7 @@ int status_get_weapon_atk(struct block_list *bl, struct weapon_atk *watk, int fl
short index = sd->equip_index[EQI_HAND_R], refine;
if ( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON
&& (refine = sd->status.inventory[index].refine) < 16 && refine ) {
- int r = status->refine_info[watk->wlv].randombonus_max[refine + (4 - watk->wlv)] / 100;
+ int r = status->dbs->refine_info[watk->wlv].randombonus_max[refine + (4 - watk->wlv)] / 100;
if ( r )
max += (rnd() % 100) % r + 1;
}
@@ -11548,7 +11558,7 @@ void status_get_matk_sub(struct block_list *bl, int flag, unsigned short *matk_m
short index = sd->equip_index[EQI_HAND_R], refine;
if ( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON
&& (refine = sd->status.inventory[index].refine) < 16 && refine ) {
- int r = status->refine_info[sd->inventory_data[index]->wlv].randombonus_max[refine + (4 - sd->inventory_data[index]->wlv)] / 100;
+ int r = status->dbs->refine_info[sd->inventory_data[index]->wlv].randombonus_max[refine + (4 - sd->inventory_data[index]->wlv)] / 100;
if ( r )
*matk_max += (rnd() % 100) % r + 1;
}
@@ -11991,7 +12001,7 @@ int status_get_refine_chance(enum refine_type wlv, int refine) {
if ( refine < 0 || refine >= MAX_REFINE)
return 0;
- return status->refine_info[wlv].chance[refine];
+ return status->dbs->refine_info[wlv].chance[refine];
}
int status_get_sc_type(sc_type type) {
@@ -11999,7 +12009,7 @@ int status_get_sc_type(sc_type type) {
if( type <= SC_NONE || type >= SC_MAX )
return 0;
- return status->sc_conf[type];
+ return status->dbs->sc_conf[type];
}
void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
@@ -12050,25 +12060,25 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
continue;
}
iidx = pc->class2idx(iclass);
- status->max_weight_base[idx] = status->max_weight_base[iidx];
- memcpy(&status->aspd_base[idx], &status->aspd_base[iidx], sizeof(status->aspd_base[iidx]));
+ status->dbs->max_weight_base[idx] = status->dbs->max_weight_base[iidx];
+ memcpy(&status->dbs->aspd_base[idx], &status->dbs->aspd_base[iidx], sizeof(status->dbs->aspd_base[iidx]));
- for (i = 1; i <= MAX_LEVEL && status->HP_table[iidx][i]; i++) {
- status->HP_table[idx][i] = status->HP_table[iidx][i];
+ for (i = 1; i <= MAX_LEVEL && status->dbs->HP_table[iidx][i]; i++) {
+ status->dbs->HP_table[idx][i] = status->dbs->HP_table[iidx][i];
}
- base = (i > 1 ? status->HP_table[idx][1] : 35); // Safe value if none are specified
- avg_increment = (i > 2 ? (status->HP_table[idx][i] - base) / (i-1) : 5); // Safe value if none are specified
+ base = (i > 1 ? status->dbs->HP_table[idx][1] : 35); // Safe value if none are specified
+ avg_increment = (i > 2 ? (status->dbs->HP_table[idx][i] - base) / (i-1) : 5); // Safe value if none are specified
for ( ; i <= pc->max_level[idx][0]; i++) {
- status->HP_table[idx][i] = min(base + avg_increment * i, battle_config.max_hp);
+ status->dbs->HP_table[idx][i] = min(base + avg_increment * i, battle_config.max_hp);
}
- for (i = 1; i <= MAX_LEVEL && status->SP_table[iidx][i]; i++) {
- status->SP_table[idx][i] = status->SP_table[iidx][i];
+ for (i = 1; i <= MAX_LEVEL && status->dbs->SP_table[iidx][i]; i++) {
+ status->dbs->SP_table[idx][i] = status->dbs->SP_table[iidx][i];
}
- base = (i > 1 ? status->SP_table[idx][1] : 10); // Safe value if none are specified
- avg_increment = (i > 2 ? (status->SP_table[idx][i] - base) / (i-1) : 1); // Safe value if none are specified
+ base = (i > 1 ? status->dbs->SP_table[idx][1] : 10); // Safe value if none are specified
+ avg_increment = (i > 2 ? (status->dbs->SP_table[idx][i] - base) / (i-1) : 1); // Safe value if none are specified
for ( ; i <= pc->max_level[idx][0]; i++) {
- status->SP_table[idx][i] = min(base + avg_increment * i, battle_config.max_sp);
+ status->dbs->SP_table[idx][i] = min(base + avg_increment * i, battle_config.max_sp);
}
}
}
@@ -12082,13 +12092,13 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
continue;
}
iidx = pc->class2idx(iclass);
- for (i = 1; i <= MAX_LEVEL && status->HP_table[iidx][i]; i++) {
- status->HP_table[idx][i] = status->HP_table[iidx][i];
+ for (i = 1; i <= MAX_LEVEL && status->dbs->HP_table[iidx][i]; i++) {
+ status->dbs->HP_table[idx][i] = status->dbs->HP_table[iidx][i];
}
- base = (i > 1 ? status->HP_table[idx][1] : 35); // Safe value if none are specified
- avg_increment = (i > 2 ? (status->HP_table[idx][i] - base) / (i-1) : 5); // Safe value if none are specified
+ base = (i > 1 ? status->dbs->HP_table[idx][1] : 35); // Safe value if none are specified
+ avg_increment = (i > 2 ? (status->dbs->HP_table[idx][i] - base) / (i-1) : 5); // Safe value if none are specified
for ( ; i <= pc->max_level[idx][0]; i++) {
- status->HP_table[idx][i] = min(base + avg_increment * i, battle_config.max_hp);
+ status->dbs->HP_table[idx][i] = min(base + avg_increment * i, battle_config.max_hp);
}
}
}
@@ -12102,21 +12112,21 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
continue;
}
iidx = pc->class2idx(iclass);
- for (i = 1; i <= MAX_LEVEL && status->SP_table[iidx][i]; i++) {
- status->SP_table[idx][i] = status->SP_table[iidx][i];
+ for (i = 1; i <= MAX_LEVEL && status->dbs->SP_table[iidx][i]; i++) {
+ status->dbs->SP_table[idx][i] = status->dbs->SP_table[iidx][i];
}
- base = (i > 1 ? status->SP_table[idx][1] : 10); // Safe value if none are specified
- avg_increment = (i > 2 ? (status->SP_table[idx][i] - base) / (i-1) : 1); // Safe value if none are specified
+ base = (i > 1 ? status->dbs->SP_table[idx][1] : 10); // Safe value if none are specified
+ avg_increment = (i > 2 ? (status->dbs->SP_table[idx][i] - base) / (i-1) : 1); // Safe value if none are specified
for ( ; i <= pc->max_level[idx][0]; i++) {
- status->SP_table[idx][i] = min(avg_increment * i, battle_config.max_sp);
+ status->dbs->SP_table[idx][i] = min(avg_increment * i, battle_config.max_sp);
}
}
}
if (libconfig->setting_lookup_int(jdb, "Weight", &i32))
- status->max_weight_base[idx] = i32;
- else if (!status->max_weight_base[idx])
- status->max_weight_base[idx] = 20000;
+ status->dbs->max_weight_base[idx] = i32;
+ else if (!status->dbs->max_weight_base[idx])
+ status->dbs->max_weight_base[idx] = 20000;
if ((temp = libconfig->setting_get_member(jdb, "BaseASPD"))) {
int widx = 0;
@@ -12127,7 +12137,7 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
ARR_FIND(0, wlen, w, strcmp(wnames[w].name, wname) == 0);
if (w != wlen) {
- status->aspd_base[idx][wnames[w].id] = libconfig->setting_get_int(wpn);
+ status->dbs->aspd_base[idx][wnames[w].id] = libconfig->setting_get_int(wpn);
} else {
ShowWarning("status_read_job_db: unknown weapon type '%s'!\n", wname);
}
@@ -12139,12 +12149,12 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
config_setting_t *hp = NULL;
while (level <= MAX_LEVEL && (hp = libconfig->setting_get_elem(temp, level))) {
i32 = libconfig->setting_get_int(hp);
- status->HP_table[idx][++level] = min(i32, battle_config.max_hp);
+ status->dbs->HP_table[idx][++level] = min(i32, battle_config.max_hp);
}
- base = (level > 0 ? status->HP_table[idx][1] : 35); // Safe value if none are specified
- avg_increment = (level > 1 ? (status->HP_table[idx][level] - base) / level : 5); // Safe value if none are specified
+ base = (level > 0 ? status->dbs->HP_table[idx][1] : 35); // Safe value if none are specified
+ avg_increment = (level > 1 ? (status->dbs->HP_table[idx][level] - base) / level : 5); // Safe value if none are specified
for (++level; level <= pc->max_level[idx][0]; ++level) { /* limit only to possible maximum level of the given class */
- status->HP_table[idx][level] = min(base + avg_increment * level, battle_config.max_hp); /* some are still empty? then let's use the average increase */
+ status->dbs->HP_table[idx][level] = min(base + avg_increment * level, battle_config.max_hp); /* some are still empty? then let's use the average increase */
}
}
@@ -12153,12 +12163,12 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
config_setting_t *sp = NULL;
while (level <= MAX_LEVEL && (sp = libconfig->setting_get_elem(temp, level))) {
i32 = libconfig->setting_get_int(sp);
- status->SP_table[idx][++level] = min(i32, battle_config.max_sp);
+ status->dbs->SP_table[idx][++level] = min(i32, battle_config.max_sp);
}
- base = (level > 0 ? status->SP_table[idx][1] : 10); // Safe value if none are specified
- avg_increment = (level > 1 ? (status->SP_table[idx][level] - base) / level : 1);
+ base = (level > 0 ? status->dbs->SP_table[idx][1] : 10); // Safe value if none are specified
+ avg_increment = (level > 1 ? (status->dbs->SP_table[idx][level] - base) / level : 1);
for ( ; level <= pc->max_level[idx][0]; level++ ) {
- status->SP_table[idx][level] = min(base + avg_increment * level, battle_config.max_sp);
+ status->dbs->SP_table[idx][level] = min(base + avg_increment * level, battle_config.max_sp);
}
}
}
@@ -12216,7 +12226,7 @@ bool status_readdb_job2(char* fields[], int columns, int current)
for(i = 1; i < columns; i++)
{
- status->job_bonus[idx][i-1] = atoi(fields[i]);
+ status->dbs->job_bonus[idx][i-1] = atoi(fields[i]);
}
return true;
}
@@ -12227,7 +12237,7 @@ bool status_readdb_sizefix(char* fields[], int columns, int current)
for(i = 0; i < MAX_WEAPON_TYPE; i++)
{
- status->atkmods[current][i] = atoi(fields[i]);
+ status->dbs->atkmods[current][i] = atoi(fields[i]);
}
return true;
}
@@ -12254,14 +12264,14 @@ bool status_readdb_refine(char* fields[], int columns, int current)
*delim = '\0';
- status->refine_info[current].chance[i] = atoi(fields[4+i]);
+ status->dbs->refine_info[current].chance[i] = atoi(fields[4+i]);
if (i >= random_bonus_start_level - 1)
- status->refine_info[current].randombonus_max[i] = random_bonus * (i - random_bonus_start_level + 2);
+ status->dbs->refine_info[current].randombonus_max[i] = random_bonus * (i - random_bonus_start_level + 2);
- status->refine_info[current].bonus[i] = bonus_per_level + atoi(delim+1);
+ status->dbs->refine_info[current].bonus[i] = bonus_per_level + atoi(delim+1);
if (i > 0)
- status->refine_info[current].bonus[i] += status->refine_info[current].bonus[i-1];
+ status->dbs->refine_info[current].bonus[i] += status->dbs->refine_info[current].bonus[i-1];
}
return true;
}
@@ -12275,7 +12285,7 @@ bool status_readdb_scconfig(char* fields[], int columns, int current) {
return false;
}
- status->sc_conf[val] = (int)strtol(fields[1], NULL, 0);
+ status->dbs->sc_conf[val] = (int)strtol(fields[1], NULL, 0);
return true;
}
@@ -12292,41 +12302,41 @@ int status_readdb(void)
// initialize databases to default
//
- if( runflag == MAPSERVER_ST_RUNNING ) {//not necessary during boot
+ if( core->runflag == MAPSERVER_ST_RUNNING ) {//not necessary during boot
// reset job_db.conf data
- memset(status->max_weight_base, 0, sizeof(status->max_weight_base));
- memset(status->HP_table, 0, sizeof(status->HP_table));
- memset(status->SP_table, 0, sizeof(status->SP_table));
+ memset(status->dbs->max_weight_base, 0, sizeof(status->dbs->max_weight_base));
+ memset(status->dbs->HP_table, 0, sizeof(status->dbs->HP_table));
+ memset(status->dbs->SP_table, 0, sizeof(status->dbs->SP_table));
// reset job_db2.txt data
- memset(status->job_bonus,0,sizeof(status->job_bonus)); // Job-specific stats bonus
+ memset(status->dbs->job_bonus,0,sizeof(status->dbs->job_bonus)); // Job-specific stats bonus
}
for ( i = 0; i < CLASS_COUNT; i++ ) {
for ( j = 0; j < MAX_WEAPON_TYPE; j++ )
- status->aspd_base[i][j] = 2000;
+ status->dbs->aspd_base[i][j] = 2000;
#ifdef RENEWAL_ASPD
- status->aspd_base[i][MAX_WEAPON_TYPE] = 0;
+ status->dbs->aspd_base[i][MAX_WEAPON_TYPE] = 0;
#endif
}
// size_fix.txt
- for(i = 0; i < ARRAYLENGTH(status->atkmods); i++)
+ for(i = 0; i < ARRAYLENGTH(status->dbs->atkmods); i++)
for(j = 0; j < MAX_WEAPON_TYPE; j++)
- status->atkmods[i][j] = 100;
+ status->dbs->atkmods[i][j] = 100;
// refine_db.txt
- for(i=0;i<ARRAYLENGTH(status->refine_info);i++) {
+ for(i=0;i<ARRAYLENGTH(status->dbs->refine_info);i++) {
for(j=0;j<MAX_REFINE; j++) {
- status->refine_info[i].chance[j] = 100;
- status->refine_info[i].bonus[j] = 0;
- status->refine_info[i].randombonus_max[j] = 0;
+ status->dbs->refine_info[i].chance[j] = 100;
+ status->dbs->refine_info[i].bonus[j] = 0;
+ status->dbs->refine_info[i].randombonus_max[j] = 0;
}
}
// read databases
//
sv->readdb(map->db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, status->readdb_job2);
- sv->readdb(map->db_path, DBPATH"size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(status->atkmods), status->readdb_sizefix);
- sv->readdb(map->db_path, DBPATH"refine_db.txt", ',', 4+MAX_REFINE, 4+MAX_REFINE, ARRAYLENGTH(status->refine_info), status->readdb_refine);
+ sv->readdb(map->db_path, DBPATH"size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(status->dbs->atkmods), status->readdb_sizefix);
+ sv->readdb(map->db_path, DBPATH"refine_db.txt", ',', 4+MAX_REFINE, 4+MAX_REFINE, ARRAYLENGTH(status->dbs->refine_info), status->readdb_refine);
sv->readdb(map->db_path, "sc_config.txt", ',', 2, 2, SC_MAX, status->readdb_scconfig);
status->read_job_db();
@@ -12362,6 +12372,7 @@ void do_final_status(void) {
*-------------------------------------*/
void status_defaults(void) {
status = &status_s;
+ status->dbs = &statusdbs;
/* vars */
//we need it for new cards 15 Feb 2005, to check if the combo cards are insrerted into the CURRENT weapon only
@@ -12370,7 +12381,7 @@ void status_defaults(void) {
status->current_equip_card_id = 0; //To prevent card-stacking (from jA) [Skotlex]
// These macros are used instead of a sum of sizeof(), to ensure that padding won't interfere with our size, and code won't rot when adding more fields
- memset(ZEROED_BLOCK_POS(status), 0, ZEROED_BLOCK_SIZE(status));
+ memset(ZEROED_BLOCK_POS(status->dbs), 0, ZEROED_BLOCK_SIZE(status->dbs));
status->data_ers = NULL;
memset(&status->dummy, 0, sizeof(status->dummy));
@@ -12432,6 +12443,7 @@ void status_defaults(void) {
status->calc_mob_ = status_calc_mob_;
status->calc_pet_ = status_calc_pet_;
status->calc_pc_ = status_calc_pc_;
+ status->calc_pc_additional = status_calc_pc_additional;
status->calc_homunculus_ = status_calc_homunculus_;
status->calc_mercenary_ = status_calc_mercenary_;
status->calc_elemental_ = status_calc_elemental_;
diff --git a/src/map/status.h b/src/map/status.h
index 4bda57fa9..274c64c5b 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -5,10 +5,8 @@
#ifndef MAP_STATUS_H
#define MAP_STATUS_H
-#include "config/core.h" // defType, RENEWAL, RENEWAL_ASPD
-
#include "common/conf.h"
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/mmo.h" // NEW_CARTS
struct block_list;
@@ -1928,17 +1926,7 @@ struct s_refine_info {
int randombonus_max[MAX_REFINE]; // cumulative maximum random bonus damage
};
-/*=====================================
-* Interface : status.h
-* Generated by HerculesInterfaceMaker
-* created by Susu
-*-------------------------------------*/
-struct status_interface {
-
- /* vars */
- int current_equip_item_index;
- int current_equip_card_id;
-
+struct s_status_dbs {
BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when status_defaults() is executed */
int max_weight_base[CLASS_COUNT];
int HP_table[CLASS_COUNT][MAX_LEVEL + 1];
@@ -1957,6 +1945,20 @@ BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when sta
char job_bonus[CLASS_COUNT][MAX_LEVEL];
sc_conf_type sc_conf[SC_MAX];
END_ZEROED_BLOCK; /* End */
+};
+
+/*=====================================
+* Interface : status.h
+* Generated by HerculesInterfaceMaker
+* created by Susu
+*-------------------------------------*/
+struct status_interface {
+
+ /* vars */
+ int current_equip_item_index;
+ int current_equip_card_id;
+
+ struct s_status_dbs *dbs;
struct eri *data_ers; //For sc_data entries
struct status_data dummy;
@@ -2015,6 +2017,7 @@ END_ZEROED_BLOCK; /* End */
int (*calc_mob_) (struct mob_data* md, enum e_status_calc_opt opt);
int (*calc_pet_) (struct pet_data* pd, enum e_status_calc_opt opt);
int (*calc_pc_) (struct map_session_data* sd, enum e_status_calc_opt opt);
+ void (*calc_pc_additional) (struct map_session_data* sd, enum e_status_calc_opt opt);
int (*calc_homunculus_) (struct homun_data *hd, enum e_status_calc_opt opt);
int (*calc_mercenary_) (struct mercenary_data *md, enum e_status_calc_opt opt);
int (*calc_elemental_) (struct elemental_data *ed, enum e_status_calc_opt opt);
@@ -2080,10 +2083,10 @@ END_ZEROED_BLOCK; /* End */
void (*read_job_db_sub) (int idx, const char *name, config_setting_t *jdb);
};
-struct status_interface *status;
-
#ifdef HERCULES_CORE
void status_defaults(void);
#endif // HERCULES_CORE
+HPShared struct status_interface *status;
+
#endif /* MAP_STATUS_H */
diff --git a/src/map/storage.c b/src/map/storage.c
index 95194bc47..fb6e2ed45 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -28,6 +28,9 @@
struct storage_interface storage_s;
struct guild_storage_interface gstorage_s;
+struct storage_interface *storage;
+struct guild_storage_interface *gstorage;
+
/*==========================================
* Sort items in the warehouse
*------------------------------------------*/
diff --git a/src/map/storage.h b/src/map/storage.h
index 5f2c69f56..37f894f76 100644
--- a/src/map/storage.h
+++ b/src/map/storage.h
@@ -5,7 +5,7 @@
#ifndef MAP_STORAGE_H
#define MAP_STORAGE_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
struct guild_storage;
@@ -38,7 +38,6 @@ struct storage_interface {
void (*sortitem) (struct item* items, unsigned int size);
int (*reconnect_sub) (DBKey key, DBData *data, va_list ap);
};
-struct storage_interface *storage;
struct guild_storage_interface {
struct DBMap* db; // int guild_id -> struct guild_storage*
@@ -63,11 +62,12 @@ struct guild_storage_interface {
DBData (*create) (DBKey key, va_list args);
};
-struct guild_storage_interface *gstorage;
-
#ifdef HERCULES_CORE
void storage_defaults(void);
void gstorage_defaults(void);
#endif // HERCULES_CORE
+HPShared struct storage_interface *storage;
+HPShared struct guild_storage_interface *gstorage;
+
#endif /* MAP_STORAGE_H */
diff --git a/src/map/trade.c b/src/map/trade.c
index 4dd6ffafa..8af3ddf4a 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -25,6 +25,7 @@
#include <string.h>
struct trade_interface trade_s;
+struct trade_interface *trade;
/*==========================================
* Initiates a trade request.
@@ -209,13 +210,13 @@ int impossible_trade_check(struct map_session_data *sd)
// if we block people
if (battle_config.ban_hack_trade < 0) {
chrif->char_ask_name(-1, sd->status.name, CHAR_ASK_NAME_BLOCK, 0, 0, 0, 0, 0, 0);
- set_eof(sd->fd); // forced to disconnect because of the hack
+ sockt->eof(sd->fd); // forced to disconnect because of the hack
// message about the ban
safestrncpy(message_to_gm, msg_txt(540), sizeof(message_to_gm)); // This player has been definitively blocked.
// if we ban people
} else if (battle_config.ban_hack_trade > 0) {
chrif->char_ask_name(-1, sd->status.name, CHAR_ASK_NAME_BAN, 0, 0, 0, 0, battle_config.ban_hack_trade, 0); // type: 2 - ban (year, month, day, hour, minute, second)
- set_eof(sd->fd); // forced to disconnect because of the hack
+ sockt->eof(sd->fd); // forced to disconnect because of the hack
// message about the ban
sprintf(message_to_gm, msg_txt(507), battle_config.ban_hack_trade); // This player has been banned for %d minute(s).
} else
diff --git a/src/map/trade.h b/src/map/trade.h
index 85e73025c..010f67e26 100644
--- a/src/map/trade.h
+++ b/src/map/trade.h
@@ -5,6 +5,8 @@
#ifndef MAP_TRADE_H
#define MAP_TRADE_H
+#include "common/hercules.h"
+
//Max distance from traders to enable a trade to take place.
//TODO: battle_config candidate?
#define TRADE_DISTANCE 2
@@ -23,10 +25,10 @@ struct trade_interface {
void (*commit) (struct map_session_data *sd);
};
-struct trade_interface *trade;
-
#ifdef HERCULES_CORE
void trade_defaults(void);
#endif // HERCULES_CORE
+HPShared struct trade_interface *trade;
+
#endif /* MAP_TRADE_H */
diff --git a/src/map/unit.c b/src/map/unit.c
index 60911b85a..33360584a 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -49,6 +49,7 @@ const short dirx[8]={0,-1,-1,-1,0,1,1,1};
const short diry[8]={1,1,0,-1,-1,-1,0,1};
struct unit_interface unit_s;
+struct unit_interface *unit;
/**
* Returns the unit_data for the given block_list. If the object is using
diff --git a/src/map/unit.h b/src/map/unit.h
index 00fff5981..0d970ca16 100644
--- a/src/map/unit.h
+++ b/src/map/unit.h
@@ -8,7 +8,7 @@
#include "map/clif.h" // clr_type
#include "map/path.h" // struct walkpath_data
#include "map/skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
struct map_session_data;
struct block_list;
@@ -84,9 +84,6 @@ struct view_data {
unsigned dead_sit : 2;
};
-extern const short dirx[8];
-extern const short diry[8];
-
struct unit_interface {
int (*init) (bool minimal);
int (*final) (void);
@@ -139,8 +136,13 @@ struct unit_interface {
int (*free) (struct block_list *bl, clr_type clrtype);
};
-struct unit_interface *unit;
+#ifdef HERCULES_CORE
+extern const short dirx[8];
+extern const short diry[8];
void unit_defaults(void);
+#endif // HERCULES_CORE
+
+HPShared struct unit_interface *unit;
#endif /* MAP_UNIT_H */
diff --git a/src/map/vending.c b/src/map/vending.c
index d0f0dee00..80c79984e 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -25,6 +25,7 @@
#include <string.h>
struct vending_interface vending_s;
+struct vending_interface *vending;
/// Returns an unique vending shop id.
static inline unsigned int getid(void) {
diff --git a/src/map/vending.h b/src/map/vending.h
index 189189227..2f624fac7 100644
--- a/src/map/vending.h
+++ b/src/map/vending.h
@@ -5,7 +5,7 @@
#ifndef MAP_VENDING_H
#define MAP_VENDING_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/db.h"
struct map_session_data;
@@ -32,10 +32,10 @@ struct vending_interface {
bool (*searchall) (struct map_session_data* sd, const struct s_search_store_search* s);
};
-struct vending_interface *vending;
-
#ifdef HERCULES_CORE
void vending_defaults(void);
#endif // HERCULES_CORE
+HPShared struct vending_interface *vending;
+
#endif /* MAP_VENDING_H */
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c
index e15cc363d..19d7ae2c5 100644
--- a/src/plugins/HPMHooking.c
+++ b/src/plugins/HPMHooking.c
@@ -2,7 +2,7 @@
// See the LICENSE file
// Sample Hercules Plugin
-#include "common/HPMi.h"
+#include "common/hercules.h"
#include "common/db.h"
#include "common/malloc.h"
#include "common/mmo.h"
@@ -11,7 +11,6 @@
#if defined (HPMHOOKING_LOGIN)
#define HPM_SERVER_TYPE SERVER_TYPE_LOGIN
#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_login.HPMHooksCore.inc"
-#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking_login.GetSymbol.inc"
#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_login.Hooks.inc"
#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_login.HookingPoints.inc"
#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_login.sources.inc"
@@ -19,7 +18,6 @@
#elif defined (HPMHOOKING_CHAR)
#define HPM_SERVER_TYPE SERVER_TYPE_CHAR
#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_char.HPMHooksCore.inc"
-#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking_char.GetSymbol.inc"
#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_char.Hooks.inc"
#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_char.HookingPoints.inc"
#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_char.sources.inc"
@@ -39,10 +37,10 @@
#include "char/loginif.h"
#include "char/mapif.h"
#include "char/pincode.h"
+#include "common/mapindex.h"
#elif defined (HPMHOOKING_MAP)
#define HPM_SERVER_TYPE SERVER_TYPE_MAP
#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking_map.HPMHooksCore.inc"
-#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking_map.GetSymbol.inc"
#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking_map.Hooks.inc"
#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking_map.HookingPoints.inc"
#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking_map.sources.inc"
@@ -68,7 +66,6 @@
#include "map/mercenary.h"
#include "map/mob.h"
#include "map/npc.h"
-#include "map/npc.h"
#include "map/party.h"
#include "map/path.h"
#include "map/pc.h"
@@ -80,15 +77,27 @@
#include "map/storage.h"
#include "map/trade.h"
#include "map/unit.h"
+#include "common/mapindex.h"
#else
#define HPM_SERVER_TYPE SERVER_TYPE_UNKNOWN
#define HPM_CORE_INCLUDE "HPMHooking/HPMHooking.HPMHooksCore.inc"
-#define HPM_SYMBOL_INCLUDE "HPMHooking/HPMHooking.GetSymbol.inc"
#define HPM_HOOKS_INCLUDE "HPMHooking/HPMHooking.Hooks.inc"
#define HPM_POINTS_INCLUDE "HPMHooking/HPMHooking.HookingPoints.inc"
#define HPM_SOURCES_INCLUDE "HPMHooking/HPMHooking.sources.inc"
#error HPMHooking plugin needs to be compiled for a specific server type. Please make sure your Makefiles are up to date.
#endif
+#include "common/conf.h"
+#include "common/console.h"
+#include "common/db.h"
+#include "common/malloc.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+#include "common/sysinfo.h"
+#include "common/timer.h"
+#include "common/utils.h"
#include "common/HPMDataCheck.h"
@@ -135,10 +144,10 @@ HPExport void server_post_final (void) {
}
HPExport const char *Hooked (bool *fr) {
+ const char *ret = HPM_shared_symbols(HPM_SERVER_TYPE);
+ if (ret)
+ return ret;
HPMforce_return = fr;
- if (!(DB = GET_SYMBOL("DB"))) return "DB";
- if (!(iMalloc = GET_SYMBOL("iMalloc"))) return "iMalloc";
-#include HPM_SYMBOL_INCLUDE
HPM_HP_load();
return NULL;
}
diff --git a/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc
deleted file mode 100644
index af7df2980..000000000
--- a/src/plugins/HPMHooking/HPMHooking_char.GetSymbol.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
-
-if( !(chr = GET_SYMBOL("chr") ) ) return "chr";
-if( !(geoip = GET_SYMBOL("geoip") ) ) return "geoip";
-if( !(inter_auction = GET_SYMBOL("inter_auction") ) ) return "inter_auction";
-if( !(inter_elemental = GET_SYMBOL("inter_elemental") ) ) return "inter_elemental";
-if( !(inter_guild = GET_SYMBOL("inter_guild") ) ) return "inter_guild";
-if( !(inter_homunculus = GET_SYMBOL("inter_homunculus") ) ) return "inter_homunculus";
-if( !(inter = GET_SYMBOL("inter") ) ) return "inter";
-if( !(inter_mail = GET_SYMBOL("inter_mail") ) ) return "inter_mail";
-if( !(inter_mercenary = GET_SYMBOL("inter_mercenary") ) ) return "inter_mercenary";
-if( !(inter_party = GET_SYMBOL("inter_party") ) ) return "inter_party";
-if( !(inter_pet = GET_SYMBOL("inter_pet") ) ) return "inter_pet";
-if( !(inter_quest = GET_SYMBOL("inter_quest") ) ) return "inter_quest";
-if( !(inter_storage = GET_SYMBOL("inter_storage") ) ) return "inter_storage";
-if( !(loginif = GET_SYMBOL("loginif") ) ) return "loginif";
-if( !(mapif = GET_SYMBOL("mapif") ) ) return "mapif";
-if( !(pincode = GET_SYMBOL("pincode") ) ) return "pincode";
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index 09d6ce1b6..c5f135937 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -5,6 +5,12 @@
// as it will get overwritten.
struct {
+ struct HPMHookPoint *HP_HCache_init_pre;
+ struct HPMHookPoint *HP_HCache_init_post;
+ struct HPMHookPoint *HP_HCache_check_pre;
+ struct HPMHookPoint *HP_HCache_check_post;
+ struct HPMHookPoint *HP_HCache_open_pre;
+ struct HPMHookPoint *HP_HCache_open_post;
struct HPMHookPoint *HP_chr_waiting_disconnect_pre;
struct HPMHookPoint *HP_chr_waiting_disconnect_post;
struct HPMHookPoint *HP_chr_delete_char_sql_pre;
@@ -219,8 +225,8 @@ struct {
struct HPMHookPoint *HP_chr_search_mapserver_post;
struct HPMHookPoint *HP_chr_mapif_init_pre;
struct HPMHookPoint *HP_chr_mapif_init_post;
- struct HPMHookPoint *HP_chr_lan_subnetcheck_pre;
- struct HPMHookPoint *HP_chr_lan_subnetcheck_post;
+ struct HPMHookPoint *HP_chr_lan_subnet_check_pre;
+ struct HPMHookPoint *HP_chr_lan_subnet_check_post;
struct HPMHookPoint *HP_chr_delete2_ack_pre;
struct HPMHookPoint *HP_chr_delete2_ack_post;
struct HPMHookPoint *HP_chr_delete2_accept_actual_ack_pre;
@@ -317,14 +323,70 @@ struct {
struct HPMHookPoint *HP_chr_online_data_cleanup_sub_post;
struct HPMHookPoint *HP_chr_online_data_cleanup_pre;
struct HPMHookPoint *HP_chr_online_data_cleanup_post;
- struct HPMHookPoint *HP_chr_lan_config_read_pre;
- struct HPMHookPoint *HP_chr_lan_config_read_post;
struct HPMHookPoint *HP_chr_sql_config_read_pre;
struct HPMHookPoint *HP_chr_sql_config_read_post;
struct HPMHookPoint *HP_chr_config_dispatch_pre;
struct HPMHookPoint *HP_chr_config_dispatch_post;
struct HPMHookPoint *HP_chr_config_read_pre;
struct HPMHookPoint *HP_chr_config_read_post;
+ struct HPMHookPoint *HP_cmdline_init_pre;
+ struct HPMHookPoint *HP_cmdline_init_post;
+ struct HPMHookPoint *HP_cmdline_final_pre;
+ struct HPMHookPoint *HP_cmdline_final_post;
+ struct HPMHookPoint *HP_cmdline_arg_add_pre;
+ struct HPMHookPoint *HP_cmdline_arg_add_post;
+ struct HPMHookPoint *HP_cmdline_exec_pre;
+ struct HPMHookPoint *HP_cmdline_exec_post;
+ struct HPMHookPoint *HP_cmdline_arg_next_value_pre;
+ struct HPMHookPoint *HP_cmdline_arg_next_value_post;
+ struct HPMHookPoint *HP_cmdline_arg_source_pre;
+ struct HPMHookPoint *HP_cmdline_arg_source_post;
+ struct HPMHookPoint *HP_console_init_pre;
+ struct HPMHookPoint *HP_console_init_post;
+ struct HPMHookPoint *HP_console_final_pre;
+ struct HPMHookPoint *HP_console_final_post;
+ struct HPMHookPoint *HP_console_display_title_pre;
+ struct HPMHookPoint *HP_console_display_title_post;
+ struct HPMHookPoint *HP_core_shutdown_callback_pre;
+ struct HPMHookPoint *HP_core_shutdown_callback_post;
+ struct HPMHookPoint *HP_DB_fix_options_pre;
+ struct HPMHookPoint *HP_DB_fix_options_post;
+ struct HPMHookPoint *HP_DB_default_cmp_pre;
+ struct HPMHookPoint *HP_DB_default_cmp_post;
+ struct HPMHookPoint *HP_DB_default_hash_pre;
+ struct HPMHookPoint *HP_DB_default_hash_post;
+ struct HPMHookPoint *HP_DB_default_release_pre;
+ struct HPMHookPoint *HP_DB_default_release_post;
+ struct HPMHookPoint *HP_DB_custom_release_pre;
+ struct HPMHookPoint *HP_DB_custom_release_post;
+ struct HPMHookPoint *HP_DB_alloc_pre;
+ struct HPMHookPoint *HP_DB_alloc_post;
+ struct HPMHookPoint *HP_DB_i2key_pre;
+ struct HPMHookPoint *HP_DB_i2key_post;
+ struct HPMHookPoint *HP_DB_ui2key_pre;
+ struct HPMHookPoint *HP_DB_ui2key_post;
+ struct HPMHookPoint *HP_DB_str2key_pre;
+ struct HPMHookPoint *HP_DB_str2key_post;
+ struct HPMHookPoint *HP_DB_i642key_pre;
+ struct HPMHookPoint *HP_DB_i642key_post;
+ struct HPMHookPoint *HP_DB_ui642key_pre;
+ struct HPMHookPoint *HP_DB_ui642key_post;
+ struct HPMHookPoint *HP_DB_i2data_pre;
+ struct HPMHookPoint *HP_DB_i2data_post;
+ struct HPMHookPoint *HP_DB_ui2data_pre;
+ struct HPMHookPoint *HP_DB_ui2data_post;
+ struct HPMHookPoint *HP_DB_ptr2data_pre;
+ struct HPMHookPoint *HP_DB_ptr2data_post;
+ struct HPMHookPoint *HP_DB_data2i_pre;
+ struct HPMHookPoint *HP_DB_data2i_post;
+ struct HPMHookPoint *HP_DB_data2ui_pre;
+ struct HPMHookPoint *HP_DB_data2ui_post;
+ struct HPMHookPoint *HP_DB_data2ptr_pre;
+ struct HPMHookPoint *HP_DB_data2ptr_post;
+ struct HPMHookPoint *HP_DB_init_pre;
+ struct HPMHookPoint *HP_DB_init_post;
+ struct HPMHookPoint *HP_DB_final_pre;
+ struct HPMHookPoint *HP_DB_final_post;
struct HPMHookPoint *HP_geoip_getcountry_pre;
struct HPMHookPoint *HP_geoip_getcountry_post;
struct HPMHookPoint *HP_geoip_final_pre;
@@ -523,6 +585,122 @@ struct {
struct HPMHookPoint *HP_inter_storage_guild_storage_delete_post;
struct HPMHookPoint *HP_inter_storage_parse_frommap_pre;
struct HPMHookPoint *HP_inter_storage_parse_frommap_post;
+ struct HPMHookPoint *HP_libconfig_read_pre;
+ struct HPMHookPoint *HP_libconfig_read_post;
+ struct HPMHookPoint *HP_libconfig_write_pre;
+ struct HPMHookPoint *HP_libconfig_write_post;
+ struct HPMHookPoint *HP_libconfig_set_auto_convert_pre;
+ struct HPMHookPoint *HP_libconfig_set_auto_convert_post;
+ struct HPMHookPoint *HP_libconfig_get_auto_convert_pre;
+ struct HPMHookPoint *HP_libconfig_get_auto_convert_post;
+ struct HPMHookPoint *HP_libconfig_read_string_pre;
+ struct HPMHookPoint *HP_libconfig_read_string_post;
+ struct HPMHookPoint *HP_libconfig_read_file_src_pre;
+ struct HPMHookPoint *HP_libconfig_read_file_src_post;
+ struct HPMHookPoint *HP_libconfig_write_file_pre;
+ struct HPMHookPoint *HP_libconfig_write_file_post;
+ struct HPMHookPoint *HP_libconfig_set_destructor_pre;
+ struct HPMHookPoint *HP_libconfig_set_destructor_post;
+ struct HPMHookPoint *HP_libconfig_set_include_dir_pre;
+ struct HPMHookPoint *HP_libconfig_set_include_dir_post;
+ struct HPMHookPoint *HP_libconfig_init_pre;
+ struct HPMHookPoint *HP_libconfig_init_post;
+ struct HPMHookPoint *HP_libconfig_destroy_pre;
+ struct HPMHookPoint *HP_libconfig_destroy_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int64_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int64_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_float_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_float_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_bool_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_bool_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_string_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_string_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_format_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_format_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_format_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_format_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_index_pre;
+ struct HPMHookPoint *HP_libconfig_setting_index_post;
+ struct HPMHookPoint *HP_libconfig_setting_length_pre;
+ struct HPMHookPoint *HP_libconfig_setting_length_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_member_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_member_post;
+ struct HPMHookPoint *HP_libconfig_setting_add_pre;
+ struct HPMHookPoint *HP_libconfig_setting_add_post;
+ struct HPMHookPoint *HP_libconfig_setting_remove_pre;
+ struct HPMHookPoint *HP_libconfig_setting_remove_post;
+ struct HPMHookPoint *HP_libconfig_setting_remove_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_remove_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_hook_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_hook_post;
+ struct HPMHookPoint *HP_libconfig_lookup_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_post;
+ struct HPMHookPoint *HP_libconfig_lookup_from_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_from_post;
+ struct HPMHookPoint *HP_libconfig_lookup_int_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_int_post;
+ struct HPMHookPoint *HP_libconfig_lookup_int64_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_int64_post;
+ struct HPMHookPoint *HP_libconfig_lookup_float_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_float_post;
+ struct HPMHookPoint *HP_libconfig_lookup_bool_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_bool_post;
+ struct HPMHookPoint *HP_libconfig_lookup_string_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_string_post;
+ struct HPMHookPoint *HP_libconfig_read_file_pre;
+ struct HPMHookPoint *HP_libconfig_read_file_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_simple_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_simple_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_post;
struct HPMHookPoint *HP_loginif_init_pre;
struct HPMHookPoint *HP_loginif_init_post;
struct HPMHookPoint *HP_loginif_final_pre;
@@ -549,6 +727,32 @@ struct {
struct HPMHookPoint *HP_loginif_send_users_count_post;
struct HPMHookPoint *HP_loginif_connect_to_server_pre;
struct HPMHookPoint *HP_loginif_connect_to_server_post;
+ struct HPMHookPoint *HP_iMalloc_init_pre;
+ struct HPMHookPoint *HP_iMalloc_init_post;
+ struct HPMHookPoint *HP_iMalloc_final_pre;
+ struct HPMHookPoint *HP_iMalloc_final_post;
+ struct HPMHookPoint *HP_iMalloc_malloc_pre;
+ struct HPMHookPoint *HP_iMalloc_malloc_post;
+ struct HPMHookPoint *HP_iMalloc_calloc_pre;
+ struct HPMHookPoint *HP_iMalloc_calloc_post;
+ struct HPMHookPoint *HP_iMalloc_realloc_pre;
+ struct HPMHookPoint *HP_iMalloc_realloc_post;
+ struct HPMHookPoint *HP_iMalloc_reallocz_pre;
+ struct HPMHookPoint *HP_iMalloc_reallocz_post;
+ struct HPMHookPoint *HP_iMalloc_astrdup_pre;
+ struct HPMHookPoint *HP_iMalloc_astrdup_post;
+ struct HPMHookPoint *HP_iMalloc_free_pre;
+ struct HPMHookPoint *HP_iMalloc_free_post;
+ struct HPMHookPoint *HP_iMalloc_memory_check_pre;
+ struct HPMHookPoint *HP_iMalloc_memory_check_post;
+ struct HPMHookPoint *HP_iMalloc_verify_ptr_pre;
+ struct HPMHookPoint *HP_iMalloc_verify_ptr_post;
+ struct HPMHookPoint *HP_iMalloc_usage_pre;
+ struct HPMHookPoint *HP_iMalloc_usage_post;
+ struct HPMHookPoint *HP_iMalloc_post_shutdown_pre;
+ struct HPMHookPoint *HP_iMalloc_post_shutdown_post;
+ struct HPMHookPoint *HP_iMalloc_init_messages_pre;
+ struct HPMHookPoint *HP_iMalloc_init_messages_post;
struct HPMHookPoint *HP_mapif_ban_pre;
struct HPMHookPoint *HP_mapif_ban_post;
struct HPMHookPoint *HP_mapif_server_init_pre;
@@ -881,6 +1085,26 @@ struct {
struct HPMHookPoint *HP_mapif_namechange_ack_post;
struct HPMHookPoint *HP_mapif_parse_NameChangeRequest_pre;
struct HPMHookPoint *HP_mapif_parse_NameChangeRequest_post;
+ struct HPMHookPoint *HP_mapindex_init_pre;
+ struct HPMHookPoint *HP_mapindex_init_post;
+ struct HPMHookPoint *HP_mapindex_final_pre;
+ struct HPMHookPoint *HP_mapindex_final_post;
+ struct HPMHookPoint *HP_mapindex_addmap_pre;
+ struct HPMHookPoint *HP_mapindex_addmap_post;
+ struct HPMHookPoint *HP_mapindex_removemap_pre;
+ struct HPMHookPoint *HP_mapindex_removemap_post;
+ struct HPMHookPoint *HP_mapindex_getmapname_pre;
+ struct HPMHookPoint *HP_mapindex_getmapname_post;
+ struct HPMHookPoint *HP_mapindex_getmapname_ext_pre;
+ struct HPMHookPoint *HP_mapindex_getmapname_ext_post;
+ struct HPMHookPoint *HP_mapindex_name2id_pre;
+ struct HPMHookPoint *HP_mapindex_name2id_post;
+ struct HPMHookPoint *HP_mapindex_id2name_pre;
+ struct HPMHookPoint *HP_mapindex_id2name_post;
+ struct HPMHookPoint *HP_mapindex_check_default_pre;
+ struct HPMHookPoint *HP_mapindex_check_default_post;
+ struct HPMHookPoint *HP_nullpo_assert_report_pre;
+ struct HPMHookPoint *HP_nullpo_assert_report_post;
struct HPMHookPoint *HP_pincode_handle_pre;
struct HPMHookPoint *HP_pincode_handle_post;
struct HPMHookPoint *HP_pincode_decrypt_pre;
@@ -901,9 +1125,267 @@ struct {
struct HPMHookPoint *HP_pincode_check_post;
struct HPMHookPoint *HP_pincode_config_read_pre;
struct HPMHookPoint *HP_pincode_config_read_post;
+ struct HPMHookPoint *HP_showmsg_init_pre;
+ struct HPMHookPoint *HP_showmsg_init_post;
+ struct HPMHookPoint *HP_showmsg_final_pre;
+ struct HPMHookPoint *HP_showmsg_final_post;
+ struct HPMHookPoint *HP_showmsg_clearScreen_pre;
+ struct HPMHookPoint *HP_showmsg_clearScreen_post;
+ struct HPMHookPoint *HP_showmsg_showMessageV_pre;
+ struct HPMHookPoint *HP_showmsg_showMessageV_post;
+ struct HPMHookPoint *HP_sockt_init_pre;
+ struct HPMHookPoint *HP_sockt_init_post;
+ struct HPMHookPoint *HP_sockt_final_pre;
+ struct HPMHookPoint *HP_sockt_final_post;
+ struct HPMHookPoint *HP_sockt_perform_pre;
+ struct HPMHookPoint *HP_sockt_perform_post;
+ struct HPMHookPoint *HP_sockt_datasync_pre;
+ struct HPMHookPoint *HP_sockt_datasync_post;
+ struct HPMHookPoint *HP_sockt_make_listen_bind_pre;
+ struct HPMHookPoint *HP_sockt_make_listen_bind_post;
+ struct HPMHookPoint *HP_sockt_make_connection_pre;
+ struct HPMHookPoint *HP_sockt_make_connection_post;
+ struct HPMHookPoint *HP_sockt_realloc_fifo_pre;
+ struct HPMHookPoint *HP_sockt_realloc_fifo_post;
+ struct HPMHookPoint *HP_sockt_realloc_writefifo_pre;
+ struct HPMHookPoint *HP_sockt_realloc_writefifo_post;
+ struct HPMHookPoint *HP_sockt_wfifoset_pre;
+ struct HPMHookPoint *HP_sockt_wfifoset_post;
+ struct HPMHookPoint *HP_sockt_rfifoskip_pre;
+ struct HPMHookPoint *HP_sockt_rfifoskip_post;
+ struct HPMHookPoint *HP_sockt_close_pre;
+ struct HPMHookPoint *HP_sockt_close_post;
+ struct HPMHookPoint *HP_sockt_session_is_valid_pre;
+ struct HPMHookPoint *HP_sockt_session_is_valid_post;
+ struct HPMHookPoint *HP_sockt_session_is_active_pre;
+ struct HPMHookPoint *HP_sockt_session_is_active_post;
+ struct HPMHookPoint *HP_sockt_flush_pre;
+ struct HPMHookPoint *HP_sockt_flush_post;
+ struct HPMHookPoint *HP_sockt_flush_fifos_pre;
+ struct HPMHookPoint *HP_sockt_flush_fifos_post;
+ struct HPMHookPoint *HP_sockt_set_nonblocking_pre;
+ struct HPMHookPoint *HP_sockt_set_nonblocking_post;
+ struct HPMHookPoint *HP_sockt_set_defaultparse_pre;
+ struct HPMHookPoint *HP_sockt_set_defaultparse_post;
+ struct HPMHookPoint *HP_sockt_host2ip_pre;
+ struct HPMHookPoint *HP_sockt_host2ip_post;
+ struct HPMHookPoint *HP_sockt_ip2str_pre;
+ struct HPMHookPoint *HP_sockt_ip2str_post;
+ struct HPMHookPoint *HP_sockt_str2ip_pre;
+ struct HPMHookPoint *HP_sockt_str2ip_post;
+ struct HPMHookPoint *HP_sockt_ntows_pre;
+ struct HPMHookPoint *HP_sockt_ntows_post;
+ struct HPMHookPoint *HP_sockt_getips_pre;
+ struct HPMHookPoint *HP_sockt_getips_post;
+ struct HPMHookPoint *HP_sockt_eof_pre;
+ struct HPMHookPoint *HP_sockt_eof_post;
+ struct HPMHookPoint *HP_sockt_lan_subnet_check_pre;
+ struct HPMHookPoint *HP_sockt_lan_subnet_check_post;
+ struct HPMHookPoint *HP_sockt_allowed_ip_check_pre;
+ struct HPMHookPoint *HP_sockt_allowed_ip_check_post;
+ struct HPMHookPoint *HP_sockt_trusted_ip_check_pre;
+ struct HPMHookPoint *HP_sockt_trusted_ip_check_post;
+ struct HPMHookPoint *HP_sockt_net_config_read_sub_pre;
+ struct HPMHookPoint *HP_sockt_net_config_read_sub_post;
+ struct HPMHookPoint *HP_sockt_net_config_read_pre;
+ struct HPMHookPoint *HP_sockt_net_config_read_post;
+ struct HPMHookPoint *HP_SQL_Connect_pre;
+ struct HPMHookPoint *HP_SQL_Connect_post;
+ struct HPMHookPoint *HP_SQL_GetTimeout_pre;
+ struct HPMHookPoint *HP_SQL_GetTimeout_post;
+ struct HPMHookPoint *HP_SQL_GetColumnNames_pre;
+ struct HPMHookPoint *HP_SQL_GetColumnNames_post;
+ struct HPMHookPoint *HP_SQL_SetEncoding_pre;
+ struct HPMHookPoint *HP_SQL_SetEncoding_post;
+ struct HPMHookPoint *HP_SQL_Ping_pre;
+ struct HPMHookPoint *HP_SQL_Ping_post;
+ struct HPMHookPoint *HP_SQL_EscapeString_pre;
+ struct HPMHookPoint *HP_SQL_EscapeString_post;
+ struct HPMHookPoint *HP_SQL_EscapeStringLen_pre;
+ struct HPMHookPoint *HP_SQL_EscapeStringLen_post;
+ struct HPMHookPoint *HP_SQL_QueryV_pre;
+ struct HPMHookPoint *HP_SQL_QueryV_post;
+ struct HPMHookPoint *HP_SQL_QueryStr_pre;
+ struct HPMHookPoint *HP_SQL_QueryStr_post;
+ struct HPMHookPoint *HP_SQL_LastInsertId_pre;
+ struct HPMHookPoint *HP_SQL_LastInsertId_post;
+ struct HPMHookPoint *HP_SQL_NumColumns_pre;
+ struct HPMHookPoint *HP_SQL_NumColumns_post;
+ struct HPMHookPoint *HP_SQL_NumRows_pre;
+ struct HPMHookPoint *HP_SQL_NumRows_post;
+ struct HPMHookPoint *HP_SQL_NextRow_pre;
+ struct HPMHookPoint *HP_SQL_NextRow_post;
+ struct HPMHookPoint *HP_SQL_GetData_pre;
+ struct HPMHookPoint *HP_SQL_GetData_post;
+ struct HPMHookPoint *HP_SQL_FreeResult_pre;
+ struct HPMHookPoint *HP_SQL_FreeResult_post;
+ struct HPMHookPoint *HP_SQL_ShowDebug__pre;
+ struct HPMHookPoint *HP_SQL_ShowDebug__post;
+ struct HPMHookPoint *HP_SQL_Free_pre;
+ struct HPMHookPoint *HP_SQL_Free_post;
+ struct HPMHookPoint *HP_SQL_Malloc_pre;
+ struct HPMHookPoint *HP_SQL_Malloc_post;
+ struct HPMHookPoint *HP_SQL_StmtMalloc_pre;
+ struct HPMHookPoint *HP_SQL_StmtMalloc_post;
+ struct HPMHookPoint *HP_SQL_StmtPrepareV_pre;
+ struct HPMHookPoint *HP_SQL_StmtPrepareV_post;
+ struct HPMHookPoint *HP_SQL_StmtPrepareStr_pre;
+ struct HPMHookPoint *HP_SQL_StmtPrepareStr_post;
+ struct HPMHookPoint *HP_SQL_StmtNumParams_pre;
+ struct HPMHookPoint *HP_SQL_StmtNumParams_post;
+ struct HPMHookPoint *HP_SQL_StmtBindParam_pre;
+ struct HPMHookPoint *HP_SQL_StmtBindParam_post;
+ struct HPMHookPoint *HP_SQL_StmtExecute_pre;
+ struct HPMHookPoint *HP_SQL_StmtExecute_post;
+ struct HPMHookPoint *HP_SQL_StmtLastInsertId_pre;
+ struct HPMHookPoint *HP_SQL_StmtLastInsertId_post;
+ struct HPMHookPoint *HP_SQL_StmtNumColumns_pre;
+ struct HPMHookPoint *HP_SQL_StmtNumColumns_post;
+ struct HPMHookPoint *HP_SQL_StmtBindColumn_pre;
+ struct HPMHookPoint *HP_SQL_StmtBindColumn_post;
+ struct HPMHookPoint *HP_SQL_StmtNumRows_pre;
+ struct HPMHookPoint *HP_SQL_StmtNumRows_post;
+ struct HPMHookPoint *HP_SQL_StmtNextRow_pre;
+ struct HPMHookPoint *HP_SQL_StmtNextRow_post;
+ struct HPMHookPoint *HP_SQL_StmtFreeResult_pre;
+ struct HPMHookPoint *HP_SQL_StmtFreeResult_post;
+ struct HPMHookPoint *HP_SQL_StmtFree_pre;
+ struct HPMHookPoint *HP_SQL_StmtFree_post;
+ struct HPMHookPoint *HP_SQL_StmtShowDebug__pre;
+ struct HPMHookPoint *HP_SQL_StmtShowDebug__post;
+ struct HPMHookPoint *HP_StrBuf_Malloc_pre;
+ struct HPMHookPoint *HP_StrBuf_Malloc_post;
+ struct HPMHookPoint *HP_StrBuf_Init_pre;
+ struct HPMHookPoint *HP_StrBuf_Init_post;
+ struct HPMHookPoint *HP_StrBuf_Vprintf_pre;
+ struct HPMHookPoint *HP_StrBuf_Vprintf_post;
+ struct HPMHookPoint *HP_StrBuf_Append_pre;
+ struct HPMHookPoint *HP_StrBuf_Append_post;
+ struct HPMHookPoint *HP_StrBuf_AppendStr_pre;
+ struct HPMHookPoint *HP_StrBuf_AppendStr_post;
+ struct HPMHookPoint *HP_StrBuf_Length_pre;
+ struct HPMHookPoint *HP_StrBuf_Length_post;
+ struct HPMHookPoint *HP_StrBuf_Value_pre;
+ struct HPMHookPoint *HP_StrBuf_Value_post;
+ struct HPMHookPoint *HP_StrBuf_Clear_pre;
+ struct HPMHookPoint *HP_StrBuf_Clear_post;
+ struct HPMHookPoint *HP_StrBuf_Destroy_pre;
+ struct HPMHookPoint *HP_StrBuf_Destroy_post;
+ struct HPMHookPoint *HP_StrBuf_Free_pre;
+ struct HPMHookPoint *HP_StrBuf_Free_post;
+ struct HPMHookPoint *HP_strlib_jstrescape_pre;
+ struct HPMHookPoint *HP_strlib_jstrescape_post;
+ struct HPMHookPoint *HP_strlib_jstrescapecpy_pre;
+ struct HPMHookPoint *HP_strlib_jstrescapecpy_post;
+ struct HPMHookPoint *HP_strlib_jmemescapecpy_pre;
+ struct HPMHookPoint *HP_strlib_jmemescapecpy_post;
+ struct HPMHookPoint *HP_strlib_remove_control_chars__pre;
+ struct HPMHookPoint *HP_strlib_remove_control_chars__post;
+ struct HPMHookPoint *HP_strlib_trim__pre;
+ struct HPMHookPoint *HP_strlib_trim__post;
+ struct HPMHookPoint *HP_strlib_normalize_name__pre;
+ struct HPMHookPoint *HP_strlib_normalize_name__post;
+ struct HPMHookPoint *HP_strlib_stristr__pre;
+ struct HPMHookPoint *HP_strlib_stristr__post;
+ struct HPMHookPoint *HP_strlib_strnlen__pre;
+ struct HPMHookPoint *HP_strlib_strnlen__post;
+ struct HPMHookPoint *HP_strlib_strtok_r__pre;
+ struct HPMHookPoint *HP_strlib_strtok_r__post;
+ struct HPMHookPoint *HP_strlib_e_mail_check__pre;
+ struct HPMHookPoint *HP_strlib_e_mail_check__post;
+ struct HPMHookPoint *HP_strlib_config_switch__pre;
+ struct HPMHookPoint *HP_strlib_config_switch__post;
+ struct HPMHookPoint *HP_strlib_safestrncpy__pre;
+ struct HPMHookPoint *HP_strlib_safestrncpy__post;
+ struct HPMHookPoint *HP_strlib_safestrnlen__pre;
+ struct HPMHookPoint *HP_strlib_safestrnlen__post;
+ struct HPMHookPoint *HP_strlib_strline__pre;
+ struct HPMHookPoint *HP_strlib_strline__post;
+ struct HPMHookPoint *HP_strlib_bin2hex__pre;
+ struct HPMHookPoint *HP_strlib_bin2hex__post;
+ struct HPMHookPoint *HP_sv_parse_next_pre;
+ struct HPMHookPoint *HP_sv_parse_next_post;
+ struct HPMHookPoint *HP_sv_parse_pre;
+ struct HPMHookPoint *HP_sv_parse_post;
+ struct HPMHookPoint *HP_sv_split_pre;
+ struct HPMHookPoint *HP_sv_split_post;
+ struct HPMHookPoint *HP_sv_escape_c_pre;
+ struct HPMHookPoint *HP_sv_escape_c_post;
+ struct HPMHookPoint *HP_sv_unescape_c_pre;
+ struct HPMHookPoint *HP_sv_unescape_c_post;
+ struct HPMHookPoint *HP_sv_skip_escaped_c_pre;
+ struct HPMHookPoint *HP_sv_skip_escaped_c_post;
+ struct HPMHookPoint *HP_sv_readdb_pre;
+ struct HPMHookPoint *HP_sv_readdb_post;
+ struct HPMHookPoint *HP_sysinfo_getpagesize_pre;
+ struct HPMHookPoint *HP_sysinfo_getpagesize_post;
+ struct HPMHookPoint *HP_sysinfo_platform_pre;
+ struct HPMHookPoint *HP_sysinfo_platform_post;
+ struct HPMHookPoint *HP_sysinfo_osversion_pre;
+ struct HPMHookPoint *HP_sysinfo_osversion_post;
+ struct HPMHookPoint *HP_sysinfo_cpu_pre;
+ struct HPMHookPoint *HP_sysinfo_cpu_post;
+ struct HPMHookPoint *HP_sysinfo_cpucores_pre;
+ struct HPMHookPoint *HP_sysinfo_cpucores_post;
+ struct HPMHookPoint *HP_sysinfo_arch_pre;
+ struct HPMHookPoint *HP_sysinfo_arch_post;
+ struct HPMHookPoint *HP_sysinfo_is64bit_pre;
+ struct HPMHookPoint *HP_sysinfo_is64bit_post;
+ struct HPMHookPoint *HP_sysinfo_compiler_pre;
+ struct HPMHookPoint *HP_sysinfo_compiler_post;
+ struct HPMHookPoint *HP_sysinfo_cflags_pre;
+ struct HPMHookPoint *HP_sysinfo_cflags_post;
+ struct HPMHookPoint *HP_sysinfo_vcstype_pre;
+ struct HPMHookPoint *HP_sysinfo_vcstype_post;
+ struct HPMHookPoint *HP_sysinfo_vcstypeid_pre;
+ struct HPMHookPoint *HP_sysinfo_vcstypeid_post;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_src_pre;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_src_post;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_pre;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_post;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_pre;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_post;
+ struct HPMHookPoint *HP_sysinfo_is_superuser_pre;
+ struct HPMHookPoint *HP_sysinfo_is_superuser_post;
+ struct HPMHookPoint *HP_sysinfo_init_pre;
+ struct HPMHookPoint *HP_sysinfo_init_post;
+ struct HPMHookPoint *HP_sysinfo_final_pre;
+ struct HPMHookPoint *HP_sysinfo_final_post;
+ struct HPMHookPoint *HP_timer_gettick_pre;
+ struct HPMHookPoint *HP_timer_gettick_post;
+ struct HPMHookPoint *HP_timer_gettick_nocache_pre;
+ struct HPMHookPoint *HP_timer_gettick_nocache_post;
+ struct HPMHookPoint *HP_timer_add_pre;
+ struct HPMHookPoint *HP_timer_add_post;
+ struct HPMHookPoint *HP_timer_add_interval_pre;
+ struct HPMHookPoint *HP_timer_add_interval_post;
+ struct HPMHookPoint *HP_timer_get_pre;
+ struct HPMHookPoint *HP_timer_get_post;
+ struct HPMHookPoint *HP_timer_delete_pre;
+ struct HPMHookPoint *HP_timer_delete_post;
+ struct HPMHookPoint *HP_timer_addtick_pre;
+ struct HPMHookPoint *HP_timer_addtick_post;
+ struct HPMHookPoint *HP_timer_settick_pre;
+ struct HPMHookPoint *HP_timer_settick_post;
+ struct HPMHookPoint *HP_timer_add_func_list_pre;
+ struct HPMHookPoint *HP_timer_add_func_list_post;
+ struct HPMHookPoint *HP_timer_get_uptime_pre;
+ struct HPMHookPoint *HP_timer_get_uptime_post;
+ struct HPMHookPoint *HP_timer_perform_pre;
+ struct HPMHookPoint *HP_timer_perform_post;
+ struct HPMHookPoint *HP_timer_init_pre;
+ struct HPMHookPoint *HP_timer_init_post;
+ struct HPMHookPoint *HP_timer_final_pre;
+ struct HPMHookPoint *HP_timer_final_post;
} list;
struct {
+ int HP_HCache_init_pre;
+ int HP_HCache_init_post;
+ int HP_HCache_check_pre;
+ int HP_HCache_check_post;
+ int HP_HCache_open_pre;
+ int HP_HCache_open_post;
int HP_chr_waiting_disconnect_pre;
int HP_chr_waiting_disconnect_post;
int HP_chr_delete_char_sql_pre;
@@ -1118,8 +1600,8 @@ struct {
int HP_chr_search_mapserver_post;
int HP_chr_mapif_init_pre;
int HP_chr_mapif_init_post;
- int HP_chr_lan_subnetcheck_pre;
- int HP_chr_lan_subnetcheck_post;
+ int HP_chr_lan_subnet_check_pre;
+ int HP_chr_lan_subnet_check_post;
int HP_chr_delete2_ack_pre;
int HP_chr_delete2_ack_post;
int HP_chr_delete2_accept_actual_ack_pre;
@@ -1216,14 +1698,70 @@ struct {
int HP_chr_online_data_cleanup_sub_post;
int HP_chr_online_data_cleanup_pre;
int HP_chr_online_data_cleanup_post;
- int HP_chr_lan_config_read_pre;
- int HP_chr_lan_config_read_post;
int HP_chr_sql_config_read_pre;
int HP_chr_sql_config_read_post;
int HP_chr_config_dispatch_pre;
int HP_chr_config_dispatch_post;
int HP_chr_config_read_pre;
int HP_chr_config_read_post;
+ int HP_cmdline_init_pre;
+ int HP_cmdline_init_post;
+ int HP_cmdline_final_pre;
+ int HP_cmdline_final_post;
+ int HP_cmdline_arg_add_pre;
+ int HP_cmdline_arg_add_post;
+ int HP_cmdline_exec_pre;
+ int HP_cmdline_exec_post;
+ int HP_cmdline_arg_next_value_pre;
+ int HP_cmdline_arg_next_value_post;
+ int HP_cmdline_arg_source_pre;
+ int HP_cmdline_arg_source_post;
+ int HP_console_init_pre;
+ int HP_console_init_post;
+ int HP_console_final_pre;
+ int HP_console_final_post;
+ int HP_console_display_title_pre;
+ int HP_console_display_title_post;
+ int HP_core_shutdown_callback_pre;
+ int HP_core_shutdown_callback_post;
+ int HP_DB_fix_options_pre;
+ int HP_DB_fix_options_post;
+ int HP_DB_default_cmp_pre;
+ int HP_DB_default_cmp_post;
+ int HP_DB_default_hash_pre;
+ int HP_DB_default_hash_post;
+ int HP_DB_default_release_pre;
+ int HP_DB_default_release_post;
+ int HP_DB_custom_release_pre;
+ int HP_DB_custom_release_post;
+ int HP_DB_alloc_pre;
+ int HP_DB_alloc_post;
+ int HP_DB_i2key_pre;
+ int HP_DB_i2key_post;
+ int HP_DB_ui2key_pre;
+ int HP_DB_ui2key_post;
+ int HP_DB_str2key_pre;
+ int HP_DB_str2key_post;
+ int HP_DB_i642key_pre;
+ int HP_DB_i642key_post;
+ int HP_DB_ui642key_pre;
+ int HP_DB_ui642key_post;
+ int HP_DB_i2data_pre;
+ int HP_DB_i2data_post;
+ int HP_DB_ui2data_pre;
+ int HP_DB_ui2data_post;
+ int HP_DB_ptr2data_pre;
+ int HP_DB_ptr2data_post;
+ int HP_DB_data2i_pre;
+ int HP_DB_data2i_post;
+ int HP_DB_data2ui_pre;
+ int HP_DB_data2ui_post;
+ int HP_DB_data2ptr_pre;
+ int HP_DB_data2ptr_post;
+ int HP_DB_init_pre;
+ int HP_DB_init_post;
+ int HP_DB_final_pre;
+ int HP_DB_final_post;
int HP_geoip_getcountry_pre;
int HP_geoip_getcountry_post;
int HP_geoip_final_pre;
@@ -1422,6 +1960,122 @@ struct {
int HP_inter_storage_guild_storage_delete_post;
int HP_inter_storage_parse_frommap_pre;
int HP_inter_storage_parse_frommap_post;
+ int HP_libconfig_read_pre;
+ int HP_libconfig_read_post;
+ int HP_libconfig_write_pre;
+ int HP_libconfig_write_post;
+ int HP_libconfig_set_auto_convert_pre;
+ int HP_libconfig_set_auto_convert_post;
+ int HP_libconfig_get_auto_convert_pre;
+ int HP_libconfig_get_auto_convert_post;
+ int HP_libconfig_read_string_pre;
+ int HP_libconfig_read_string_post;
+ int HP_libconfig_read_file_src_pre;
+ int HP_libconfig_read_file_src_post;
+ int HP_libconfig_write_file_pre;
+ int HP_libconfig_write_file_post;
+ int HP_libconfig_set_destructor_pre;
+ int HP_libconfig_set_destructor_post;
+ int HP_libconfig_set_include_dir_pre;
+ int HP_libconfig_set_include_dir_post;
+ int HP_libconfig_init_pre;
+ int HP_libconfig_init_post;
+ int HP_libconfig_destroy_pre;
+ int HP_libconfig_destroy_post;
+ int HP_libconfig_setting_get_int_pre;
+ int HP_libconfig_setting_get_int_post;
+ int HP_libconfig_setting_get_int64_pre;
+ int HP_libconfig_setting_get_int64_post;
+ int HP_libconfig_setting_get_float_pre;
+ int HP_libconfig_setting_get_float_post;
+ int HP_libconfig_setting_get_bool_pre;
+ int HP_libconfig_setting_get_bool_post;
+ int HP_libconfig_setting_get_string_pre;
+ int HP_libconfig_setting_get_string_post;
+ int HP_libconfig_setting_lookup_int_pre;
+ int HP_libconfig_setting_lookup_int_post;
+ int HP_libconfig_setting_lookup_int64_pre;
+ int HP_libconfig_setting_lookup_int64_post;
+ int HP_libconfig_setting_lookup_float_pre;
+ int HP_libconfig_setting_lookup_float_post;
+ int HP_libconfig_setting_lookup_bool_pre;
+ int HP_libconfig_setting_lookup_bool_post;
+ int HP_libconfig_setting_lookup_string_pre;
+ int HP_libconfig_setting_lookup_string_post;
+ int HP_libconfig_setting_set_int_pre;
+ int HP_libconfig_setting_set_int_post;
+ int HP_libconfig_setting_set_int64_pre;
+ int HP_libconfig_setting_set_int64_post;
+ int HP_libconfig_setting_set_float_pre;
+ int HP_libconfig_setting_set_float_post;
+ int HP_libconfig_setting_set_bool_pre;
+ int HP_libconfig_setting_set_bool_post;
+ int HP_libconfig_setting_set_string_pre;
+ int HP_libconfig_setting_set_string_post;
+ int HP_libconfig_setting_set_format_pre;
+ int HP_libconfig_setting_set_format_post;
+ int HP_libconfig_setting_get_format_pre;
+ int HP_libconfig_setting_get_format_post;
+ int HP_libconfig_setting_get_int_elem_pre;
+ int HP_libconfig_setting_get_int_elem_post;
+ int HP_libconfig_setting_get_int64_elem_pre;
+ int HP_libconfig_setting_get_int64_elem_post;
+ int HP_libconfig_setting_get_float_elem_pre;
+ int HP_libconfig_setting_get_float_elem_post;
+ int HP_libconfig_setting_get_bool_elem_pre;
+ int HP_libconfig_setting_get_bool_elem_post;
+ int HP_libconfig_setting_get_string_elem_pre;
+ int HP_libconfig_setting_get_string_elem_post;
+ int HP_libconfig_setting_set_int_elem_pre;
+ int HP_libconfig_setting_set_int_elem_post;
+ int HP_libconfig_setting_set_int64_elem_pre;
+ int HP_libconfig_setting_set_int64_elem_post;
+ int HP_libconfig_setting_set_float_elem_pre;
+ int HP_libconfig_setting_set_float_elem_post;
+ int HP_libconfig_setting_set_bool_elem_pre;
+ int HP_libconfig_setting_set_bool_elem_post;
+ int HP_libconfig_setting_set_string_elem_pre;
+ int HP_libconfig_setting_set_string_elem_post;
+ int HP_libconfig_setting_index_pre;
+ int HP_libconfig_setting_index_post;
+ int HP_libconfig_setting_length_pre;
+ int HP_libconfig_setting_length_post;
+ int HP_libconfig_setting_get_elem_pre;
+ int HP_libconfig_setting_get_elem_post;
+ int HP_libconfig_setting_get_member_pre;
+ int HP_libconfig_setting_get_member_post;
+ int HP_libconfig_setting_add_pre;
+ int HP_libconfig_setting_add_post;
+ int HP_libconfig_setting_remove_pre;
+ int HP_libconfig_setting_remove_post;
+ int HP_libconfig_setting_remove_elem_pre;
+ int HP_libconfig_setting_remove_elem_post;
+ int HP_libconfig_setting_set_hook_pre;
+ int HP_libconfig_setting_set_hook_post;
+ int HP_libconfig_lookup_pre;
+ int HP_libconfig_lookup_post;
+ int HP_libconfig_lookup_from_pre;
+ int HP_libconfig_lookup_from_post;
+ int HP_libconfig_lookup_int_pre;
+ int HP_libconfig_lookup_int_post;
+ int HP_libconfig_lookup_int64_pre;
+ int HP_libconfig_lookup_int64_post;
+ int HP_libconfig_lookup_float_pre;
+ int HP_libconfig_lookup_float_post;
+ int HP_libconfig_lookup_bool_pre;
+ int HP_libconfig_lookup_bool_post;
+ int HP_libconfig_lookup_string_pre;
+ int HP_libconfig_lookup_string_post;
+ int HP_libconfig_read_file_pre;
+ int HP_libconfig_read_file_post;
+ int HP_libconfig_setting_copy_simple_pre;
+ int HP_libconfig_setting_copy_simple_post;
+ int HP_libconfig_setting_copy_elem_pre;
+ int HP_libconfig_setting_copy_elem_post;
+ int HP_libconfig_setting_copy_aggregate_pre;
+ int HP_libconfig_setting_copy_aggregate_post;
+ int HP_libconfig_setting_copy_pre;
+ int HP_libconfig_setting_copy_post;
int HP_loginif_init_pre;
int HP_loginif_init_post;
int HP_loginif_final_pre;
@@ -1448,6 +2102,32 @@ struct {
int HP_loginif_send_users_count_post;
int HP_loginif_connect_to_server_pre;
int HP_loginif_connect_to_server_post;
+ int HP_iMalloc_init_pre;
+ int HP_iMalloc_init_post;
+ int HP_iMalloc_final_pre;
+ int HP_iMalloc_final_post;
+ int HP_iMalloc_malloc_pre;
+ int HP_iMalloc_malloc_post;
+ int HP_iMalloc_calloc_pre;
+ int HP_iMalloc_calloc_post;
+ int HP_iMalloc_realloc_pre;
+ int HP_iMalloc_realloc_post;
+ int HP_iMalloc_reallocz_pre;
+ int HP_iMalloc_reallocz_post;
+ int HP_iMalloc_astrdup_pre;
+ int HP_iMalloc_astrdup_post;
+ int HP_iMalloc_free_pre;
+ int HP_iMalloc_free_post;
+ int HP_iMalloc_memory_check_pre;
+ int HP_iMalloc_memory_check_post;
+ int HP_iMalloc_verify_ptr_pre;
+ int HP_iMalloc_verify_ptr_post;
+ int HP_iMalloc_usage_pre;
+ int HP_iMalloc_usage_post;
+ int HP_iMalloc_post_shutdown_pre;
+ int HP_iMalloc_post_shutdown_post;
+ int HP_iMalloc_init_messages_pre;
+ int HP_iMalloc_init_messages_post;
int HP_mapif_ban_pre;
int HP_mapif_ban_post;
int HP_mapif_server_init_pre;
@@ -1780,6 +2460,26 @@ struct {
int HP_mapif_namechange_ack_post;
int HP_mapif_parse_NameChangeRequest_pre;
int HP_mapif_parse_NameChangeRequest_post;
+ int HP_mapindex_init_pre;
+ int HP_mapindex_init_post;
+ int HP_mapindex_final_pre;
+ int HP_mapindex_final_post;
+ int HP_mapindex_addmap_pre;
+ int HP_mapindex_addmap_post;
+ int HP_mapindex_removemap_pre;
+ int HP_mapindex_removemap_post;
+ int HP_mapindex_getmapname_pre;
+ int HP_mapindex_getmapname_post;
+ int HP_mapindex_getmapname_ext_pre;
+ int HP_mapindex_getmapname_ext_post;
+ int HP_mapindex_name2id_pre;
+ int HP_mapindex_name2id_post;
+ int HP_mapindex_id2name_pre;
+ int HP_mapindex_id2name_post;
+ int HP_mapindex_check_default_pre;
+ int HP_mapindex_check_default_post;
+ int HP_nullpo_assert_report_pre;
+ int HP_nullpo_assert_report_post;
int HP_pincode_handle_pre;
int HP_pincode_handle_post;
int HP_pincode_decrypt_pre;
@@ -1800,10 +2500,267 @@ struct {
int HP_pincode_check_post;
int HP_pincode_config_read_pre;
int HP_pincode_config_read_post;
+ int HP_showmsg_init_pre;
+ int HP_showmsg_init_post;
+ int HP_showmsg_final_pre;
+ int HP_showmsg_final_post;
+ int HP_showmsg_clearScreen_pre;
+ int HP_showmsg_clearScreen_post;
+ int HP_showmsg_showMessageV_pre;
+ int HP_showmsg_showMessageV_post;
+ int HP_sockt_init_pre;
+ int HP_sockt_init_post;
+ int HP_sockt_final_pre;
+ int HP_sockt_final_post;
+ int HP_sockt_perform_pre;
+ int HP_sockt_perform_post;
+ int HP_sockt_datasync_pre;
+ int HP_sockt_datasync_post;
+ int HP_sockt_make_listen_bind_pre;
+ int HP_sockt_make_listen_bind_post;
+ int HP_sockt_make_connection_pre;
+ int HP_sockt_make_connection_post;
+ int HP_sockt_realloc_fifo_pre;
+ int HP_sockt_realloc_fifo_post;
+ int HP_sockt_realloc_writefifo_pre;
+ int HP_sockt_realloc_writefifo_post;
+ int HP_sockt_wfifoset_pre;
+ int HP_sockt_wfifoset_post;
+ int HP_sockt_rfifoskip_pre;
+ int HP_sockt_rfifoskip_post;
+ int HP_sockt_close_pre;
+ int HP_sockt_close_post;
+ int HP_sockt_session_is_valid_pre;
+ int HP_sockt_session_is_valid_post;
+ int HP_sockt_session_is_active_pre;
+ int HP_sockt_session_is_active_post;
+ int HP_sockt_flush_pre;
+ int HP_sockt_flush_post;
+ int HP_sockt_flush_fifos_pre;
+ int HP_sockt_flush_fifos_post;
+ int HP_sockt_set_nonblocking_pre;
+ int HP_sockt_set_nonblocking_post;
+ int HP_sockt_set_defaultparse_pre;
+ int HP_sockt_set_defaultparse_post;
+ int HP_sockt_host2ip_pre;
+ int HP_sockt_host2ip_post;
+ int HP_sockt_ip2str_pre;
+ int HP_sockt_ip2str_post;
+ int HP_sockt_str2ip_pre;
+ int HP_sockt_str2ip_post;
+ int HP_sockt_ntows_pre;
+ int HP_sockt_ntows_post;
+ int HP_sockt_getips_pre;
+ int HP_sockt_getips_post;
+ int HP_sockt_eof_pre;
+ int HP_sockt_eof_post;
+ int HP_sockt_lan_subnet_check_pre;
+ int HP_sockt_lan_subnet_check_post;
+ int HP_sockt_allowed_ip_check_pre;
+ int HP_sockt_allowed_ip_check_post;
+ int HP_sockt_trusted_ip_check_pre;
+ int HP_sockt_trusted_ip_check_post;
+ int HP_sockt_net_config_read_sub_pre;
+ int HP_sockt_net_config_read_sub_post;
+ int HP_sockt_net_config_read_pre;
+ int HP_sockt_net_config_read_post;
+ int HP_SQL_Connect_pre;
+ int HP_SQL_Connect_post;
+ int HP_SQL_GetTimeout_pre;
+ int HP_SQL_GetTimeout_post;
+ int HP_SQL_GetColumnNames_pre;
+ int HP_SQL_GetColumnNames_post;
+ int HP_SQL_SetEncoding_pre;
+ int HP_SQL_SetEncoding_post;
+ int HP_SQL_Ping_pre;
+ int HP_SQL_Ping_post;
+ int HP_SQL_EscapeString_pre;
+ int HP_SQL_EscapeString_post;
+ int HP_SQL_EscapeStringLen_pre;
+ int HP_SQL_EscapeStringLen_post;
+ int HP_SQL_QueryV_pre;
+ int HP_SQL_QueryV_post;
+ int HP_SQL_QueryStr_pre;
+ int HP_SQL_QueryStr_post;
+ int HP_SQL_LastInsertId_pre;
+ int HP_SQL_LastInsertId_post;
+ int HP_SQL_NumColumns_pre;
+ int HP_SQL_NumColumns_post;
+ int HP_SQL_NumRows_pre;
+ int HP_SQL_NumRows_post;
+ int HP_SQL_NextRow_pre;
+ int HP_SQL_NextRow_post;
+ int HP_SQL_GetData_pre;
+ int HP_SQL_GetData_post;
+ int HP_SQL_FreeResult_pre;
+ int HP_SQL_FreeResult_post;
+ int HP_SQL_ShowDebug__pre;
+ int HP_SQL_ShowDebug__post;
+ int HP_SQL_Free_pre;
+ int HP_SQL_Free_post;
+ int HP_SQL_Malloc_pre;
+ int HP_SQL_Malloc_post;
+ int HP_SQL_StmtMalloc_pre;
+ int HP_SQL_StmtMalloc_post;
+ int HP_SQL_StmtPrepareV_pre;
+ int HP_SQL_StmtPrepareV_post;
+ int HP_SQL_StmtPrepareStr_pre;
+ int HP_SQL_StmtPrepareStr_post;
+ int HP_SQL_StmtNumParams_pre;
+ int HP_SQL_StmtNumParams_post;
+ int HP_SQL_StmtBindParam_pre;
+ int HP_SQL_StmtBindParam_post;
+ int HP_SQL_StmtExecute_pre;
+ int HP_SQL_StmtExecute_post;
+ int HP_SQL_StmtLastInsertId_pre;
+ int HP_SQL_StmtLastInsertId_post;
+ int HP_SQL_StmtNumColumns_pre;
+ int HP_SQL_StmtNumColumns_post;
+ int HP_SQL_StmtBindColumn_pre;
+ int HP_SQL_StmtBindColumn_post;
+ int HP_SQL_StmtNumRows_pre;
+ int HP_SQL_StmtNumRows_post;
+ int HP_SQL_StmtNextRow_pre;
+ int HP_SQL_StmtNextRow_post;
+ int HP_SQL_StmtFreeResult_pre;
+ int HP_SQL_StmtFreeResult_post;
+ int HP_SQL_StmtFree_pre;
+ int HP_SQL_StmtFree_post;
+ int HP_SQL_StmtShowDebug__pre;
+ int HP_SQL_StmtShowDebug__post;
+ int HP_StrBuf_Malloc_pre;
+ int HP_StrBuf_Malloc_post;
+ int HP_StrBuf_Init_pre;
+ int HP_StrBuf_Init_post;
+ int HP_StrBuf_Vprintf_pre;
+ int HP_StrBuf_Vprintf_post;
+ int HP_StrBuf_Append_pre;
+ int HP_StrBuf_Append_post;
+ int HP_StrBuf_AppendStr_pre;
+ int HP_StrBuf_AppendStr_post;
+ int HP_StrBuf_Length_pre;
+ int HP_StrBuf_Length_post;
+ int HP_StrBuf_Value_pre;
+ int HP_StrBuf_Value_post;
+ int HP_StrBuf_Clear_pre;
+ int HP_StrBuf_Clear_post;
+ int HP_StrBuf_Destroy_pre;
+ int HP_StrBuf_Destroy_post;
+ int HP_StrBuf_Free_pre;
+ int HP_StrBuf_Free_post;
+ int HP_strlib_jstrescape_pre;
+ int HP_strlib_jstrescape_post;
+ int HP_strlib_jstrescapecpy_pre;
+ int HP_strlib_jstrescapecpy_post;
+ int HP_strlib_jmemescapecpy_pre;
+ int HP_strlib_jmemescapecpy_post;
+ int HP_strlib_remove_control_chars__pre;
+ int HP_strlib_remove_control_chars__post;
+ int HP_strlib_trim__pre;
+ int HP_strlib_trim__post;
+ int HP_strlib_normalize_name__pre;
+ int HP_strlib_normalize_name__post;
+ int HP_strlib_stristr__pre;
+ int HP_strlib_stristr__post;
+ int HP_strlib_strnlen__pre;
+ int HP_strlib_strnlen__post;
+ int HP_strlib_strtok_r__pre;
+ int HP_strlib_strtok_r__post;
+ int HP_strlib_e_mail_check__pre;
+ int HP_strlib_e_mail_check__post;
+ int HP_strlib_config_switch__pre;
+ int HP_strlib_config_switch__post;
+ int HP_strlib_safestrncpy__pre;
+ int HP_strlib_safestrncpy__post;
+ int HP_strlib_safestrnlen__pre;
+ int HP_strlib_safestrnlen__post;
+ int HP_strlib_strline__pre;
+ int HP_strlib_strline__post;
+ int HP_strlib_bin2hex__pre;
+ int HP_strlib_bin2hex__post;
+ int HP_sv_parse_next_pre;
+ int HP_sv_parse_next_post;
+ int HP_sv_parse_pre;
+ int HP_sv_parse_post;
+ int HP_sv_split_pre;
+ int HP_sv_split_post;
+ int HP_sv_escape_c_pre;
+ int HP_sv_escape_c_post;
+ int HP_sv_unescape_c_pre;
+ int HP_sv_unescape_c_post;
+ int HP_sv_skip_escaped_c_pre;
+ int HP_sv_skip_escaped_c_post;
+ int HP_sv_readdb_pre;
+ int HP_sv_readdb_post;
+ int HP_sysinfo_getpagesize_pre;
+ int HP_sysinfo_getpagesize_post;
+ int HP_sysinfo_platform_pre;
+ int HP_sysinfo_platform_post;
+ int HP_sysinfo_osversion_pre;
+ int HP_sysinfo_osversion_post;
+ int HP_sysinfo_cpu_pre;
+ int HP_sysinfo_cpu_post;
+ int HP_sysinfo_cpucores_pre;
+ int HP_sysinfo_cpucores_post;
+ int HP_sysinfo_arch_pre;
+ int HP_sysinfo_arch_post;
+ int HP_sysinfo_is64bit_pre;
+ int HP_sysinfo_is64bit_post;
+ int HP_sysinfo_compiler_pre;
+ int HP_sysinfo_compiler_post;
+ int HP_sysinfo_cflags_pre;
+ int HP_sysinfo_cflags_post;
+ int HP_sysinfo_vcstype_pre;
+ int HP_sysinfo_vcstype_post;
+ int HP_sysinfo_vcstypeid_pre;
+ int HP_sysinfo_vcstypeid_post;
+ int HP_sysinfo_vcsrevision_src_pre;
+ int HP_sysinfo_vcsrevision_src_post;
+ int HP_sysinfo_vcsrevision_scripts_pre;
+ int HP_sysinfo_vcsrevision_scripts_post;
+ int HP_sysinfo_vcsrevision_reload_pre;
+ int HP_sysinfo_vcsrevision_reload_post;
+ int HP_sysinfo_is_superuser_pre;
+ int HP_sysinfo_is_superuser_post;
+ int HP_sysinfo_init_pre;
+ int HP_sysinfo_init_post;
+ int HP_sysinfo_final_pre;
+ int HP_sysinfo_final_post;
+ int HP_timer_gettick_pre;
+ int HP_timer_gettick_post;
+ int HP_timer_gettick_nocache_pre;
+ int HP_timer_gettick_nocache_post;
+ int HP_timer_add_pre;
+ int HP_timer_add_post;
+ int HP_timer_add_interval_pre;
+ int HP_timer_add_interval_post;
+ int HP_timer_get_pre;
+ int HP_timer_get_post;
+ int HP_timer_delete_pre;
+ int HP_timer_delete_post;
+ int HP_timer_addtick_pre;
+ int HP_timer_addtick_post;
+ int HP_timer_settick_pre;
+ int HP_timer_settick_post;
+ int HP_timer_add_func_list_pre;
+ int HP_timer_add_func_list_post;
+ int HP_timer_get_uptime_pre;
+ int HP_timer_get_uptime_post;
+ int HP_timer_perform_pre;
+ int HP_timer_perform_post;
+ int HP_timer_init_pre;
+ int HP_timer_init_post;
+ int HP_timer_final_pre;
+ int HP_timer_final_post;
} count;
struct {
+ struct HCache_interface HCache;
struct char_interface chr;
+ struct cmdline_interface cmdline;
+ struct console_interface console;
+ struct core_interface core;
+ struct db_interface DB;
struct geoip_interface geoip;
struct inter_auction_interface inter_auction;
struct inter_elemental_interface inter_elemental;
@@ -1816,7 +2773,19 @@ struct {
struct inter_pet_interface inter_pet;
struct inter_quest_interface inter_quest;
struct inter_storage_interface inter_storage;
+ struct libconfig_interface libconfig;
struct loginif_interface loginif;
+ struct malloc_interface iMalloc;
struct mapif_interface mapif;
+ struct mapindex_interface mapindex;
+ struct nullpo_interface nullpo;
struct pincode_interface pincode;
+ struct showmsg_interface showmsg;
+ struct socket_interface sockt;
+ struct sql_interface SQL;
+ struct stringbuf_interface StrBuf;
+ struct strlib_interface strlib;
+ struct sv_interface sv;
+ struct sysinfo_interface sysinfo;
+ struct timer_interface timer;
} source;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 631544248..59c82f0e2 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -5,6 +5,10 @@
// as it will get overwritten.
struct HookingPointData HookingPoints[] = {
+/* HCache */
+ { HP_POP(HCache->init, HP_HCache_init) },
+ { HP_POP(HCache->check, HP_HCache_check) },
+ { HP_POP(HCache->open, HP_HCache_open) },
/* chr */
{ HP_POP(chr->waiting_disconnect, HP_chr_waiting_disconnect) },
{ HP_POP(chr->delete_char_sql, HP_chr_delete_char_sql) },
@@ -113,7 +117,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(chr->parse_frommap, HP_chr_parse_frommap) },
{ HP_POP(chr->search_mapserver, HP_chr_search_mapserver) },
{ HP_POP(chr->mapif_init, HP_chr_mapif_init) },
- { HP_POP(chr->lan_subnetcheck, HP_chr_lan_subnetcheck) },
+ { HP_POP(chr->lan_subnet_check, HP_chr_lan_subnet_check) },
{ HP_POP(chr->delete2_ack, HP_chr_delete2_ack) },
{ HP_POP(chr->delete2_accept_actual_ack, HP_chr_delete2_accept_actual_ack) },
{ HP_POP(chr->delete2_accept_ack, HP_chr_delete2_accept_ack) },
@@ -162,10 +166,42 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(chr->check_connect_login_server, HP_chr_check_connect_login_server) },
{ HP_POP(chr->online_data_cleanup_sub, HP_chr_online_data_cleanup_sub) },
{ HP_POP(chr->online_data_cleanup, HP_chr_online_data_cleanup) },
- { HP_POP(chr->lan_config_read, HP_chr_lan_config_read) },
{ HP_POP(chr->sql_config_read, HP_chr_sql_config_read) },
{ HP_POP(chr->config_dispatch, HP_chr_config_dispatch) },
{ HP_POP(chr->config_read, HP_chr_config_read) },
+/* cmdline */
+ { HP_POP(cmdline->init, HP_cmdline_init) },
+ { HP_POP(cmdline->final, HP_cmdline_final) },
+ { HP_POP(cmdline->arg_add, HP_cmdline_arg_add) },
+ { HP_POP(cmdline->exec, HP_cmdline_exec) },
+ { HP_POP(cmdline->arg_next_value, HP_cmdline_arg_next_value) },
+ { HP_POP(cmdline->arg_source, HP_cmdline_arg_source) },
+/* console */
+ { HP_POP(console->init, HP_console_init) },
+ { HP_POP(console->final, HP_console_final) },
+ { HP_POP(console->display_title, HP_console_display_title) },
+/* core */
+ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) },
+/* DB */
+ { HP_POP(DB->fix_options, HP_DB_fix_options) },
+ { HP_POP(DB->default_cmp, HP_DB_default_cmp) },
+ { HP_POP(DB->default_hash, HP_DB_default_hash) },
+ { HP_POP(DB->default_release, HP_DB_default_release) },
+ { HP_POP(DB->custom_release, HP_DB_custom_release) },
+ { HP_POP(DB->alloc, HP_DB_alloc) },
+ { HP_POP(DB->i2key, HP_DB_i2key) },
+ { HP_POP(DB->ui2key, HP_DB_ui2key) },
+ { HP_POP(DB->str2key, HP_DB_str2key) },
+ { HP_POP(DB->i642key, HP_DB_i642key) },
+ { HP_POP(DB->ui642key, HP_DB_ui642key) },
+ { HP_POP(DB->i2data, HP_DB_i2data) },
+ { HP_POP(DB->ui2data, HP_DB_ui2data) },
+ { HP_POP(DB->ptr2data, HP_DB_ptr2data) },
+ { HP_POP(DB->data2i, HP_DB_data2i) },
+ { HP_POP(DB->data2ui, HP_DB_data2ui) },
+ { HP_POP(DB->data2ptr, HP_DB_data2ptr) },
+ { HP_POP(DB->init, HP_DB_init) },
+ { HP_POP(DB->final, HP_DB_final) },
/* geoip */
{ HP_POP(geoip->getcountry, HP_geoip_getcountry) },
{ HP_POP(geoip->final, HP_geoip_final) },
@@ -277,6 +313,65 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(inter_storage->delete_, HP_inter_storage_delete_) },
{ HP_POP(inter_storage->guild_storage_delete, HP_inter_storage_guild_storage_delete) },
{ HP_POP(inter_storage->parse_frommap, HP_inter_storage_parse_frommap) },
+/* libconfig */
+ { HP_POP(libconfig->read, HP_libconfig_read) },
+ { HP_POP(libconfig->write, HP_libconfig_write) },
+ { HP_POP(libconfig->set_auto_convert, HP_libconfig_set_auto_convert) },
+ { HP_POP(libconfig->get_auto_convert, HP_libconfig_get_auto_convert) },
+ { HP_POP(libconfig->read_string, HP_libconfig_read_string) },
+ { HP_POP(libconfig->read_file_src, HP_libconfig_read_file_src) },
+ { HP_POP(libconfig->write_file, HP_libconfig_write_file) },
+ { HP_POP(libconfig->set_destructor, HP_libconfig_set_destructor) },
+ { HP_POP(libconfig->set_include_dir, HP_libconfig_set_include_dir) },
+ { HP_POP(libconfig->init, HP_libconfig_init) },
+ { HP_POP(libconfig->destroy, HP_libconfig_destroy) },
+ { HP_POP(libconfig->setting_get_int, HP_libconfig_setting_get_int) },
+ { HP_POP(libconfig->setting_get_int64, HP_libconfig_setting_get_int64) },
+ { HP_POP(libconfig->setting_get_float, HP_libconfig_setting_get_float) },
+ { HP_POP(libconfig->setting_get_bool, HP_libconfig_setting_get_bool) },
+ { HP_POP(libconfig->setting_get_string, HP_libconfig_setting_get_string) },
+ { HP_POP(libconfig->setting_lookup_int, HP_libconfig_setting_lookup_int) },
+ { HP_POP(libconfig->setting_lookup_int64, HP_libconfig_setting_lookup_int64) },
+ { HP_POP(libconfig->setting_lookup_float, HP_libconfig_setting_lookup_float) },
+ { HP_POP(libconfig->setting_lookup_bool, HP_libconfig_setting_lookup_bool) },
+ { HP_POP(libconfig->setting_lookup_string, HP_libconfig_setting_lookup_string) },
+ { HP_POP(libconfig->setting_set_int, HP_libconfig_setting_set_int) },
+ { HP_POP(libconfig->setting_set_int64, HP_libconfig_setting_set_int64) },
+ { HP_POP(libconfig->setting_set_float, HP_libconfig_setting_set_float) },
+ { HP_POP(libconfig->setting_set_bool, HP_libconfig_setting_set_bool) },
+ { HP_POP(libconfig->setting_set_string, HP_libconfig_setting_set_string) },
+ { HP_POP(libconfig->setting_set_format, HP_libconfig_setting_set_format) },
+ { HP_POP(libconfig->setting_get_format, HP_libconfig_setting_get_format) },
+ { HP_POP(libconfig->setting_get_int_elem, HP_libconfig_setting_get_int_elem) },
+ { HP_POP(libconfig->setting_get_int64_elem, HP_libconfig_setting_get_int64_elem) },
+ { HP_POP(libconfig->setting_get_float_elem, HP_libconfig_setting_get_float_elem) },
+ { HP_POP(libconfig->setting_get_bool_elem, HP_libconfig_setting_get_bool_elem) },
+ { HP_POP(libconfig->setting_get_string_elem, HP_libconfig_setting_get_string_elem) },
+ { HP_POP(libconfig->setting_set_int_elem, HP_libconfig_setting_set_int_elem) },
+ { HP_POP(libconfig->setting_set_int64_elem, HP_libconfig_setting_set_int64_elem) },
+ { HP_POP(libconfig->setting_set_float_elem, HP_libconfig_setting_set_float_elem) },
+ { HP_POP(libconfig->setting_set_bool_elem, HP_libconfig_setting_set_bool_elem) },
+ { HP_POP(libconfig->setting_set_string_elem, HP_libconfig_setting_set_string_elem) },
+ { HP_POP(libconfig->setting_index, HP_libconfig_setting_index) },
+ { HP_POP(libconfig->setting_length, HP_libconfig_setting_length) },
+ { HP_POP(libconfig->setting_get_elem, HP_libconfig_setting_get_elem) },
+ { HP_POP(libconfig->setting_get_member, HP_libconfig_setting_get_member) },
+ { HP_POP(libconfig->setting_add, HP_libconfig_setting_add) },
+ { HP_POP(libconfig->setting_remove, HP_libconfig_setting_remove) },
+ { HP_POP(libconfig->setting_remove_elem, HP_libconfig_setting_remove_elem) },
+ { HP_POP(libconfig->setting_set_hook, HP_libconfig_setting_set_hook) },
+ { HP_POP(libconfig->lookup, HP_libconfig_lookup) },
+ { HP_POP(libconfig->lookup_from, HP_libconfig_lookup_from) },
+ { HP_POP(libconfig->lookup_int, HP_libconfig_lookup_int) },
+ { HP_POP(libconfig->lookup_int64, HP_libconfig_lookup_int64) },
+ { HP_POP(libconfig->lookup_float, HP_libconfig_lookup_float) },
+ { HP_POP(libconfig->lookup_bool, HP_libconfig_lookup_bool) },
+ { HP_POP(libconfig->lookup_string, HP_libconfig_lookup_string) },
+ { HP_POP(libconfig->read_file, HP_libconfig_read_file) },
+ { HP_POP(libconfig->setting_copy_simple, HP_libconfig_setting_copy_simple) },
+ { HP_POP(libconfig->setting_copy_elem, HP_libconfig_setting_copy_elem) },
+ { HP_POP(libconfig->setting_copy_aggregate, HP_libconfig_setting_copy_aggregate) },
+ { HP_POP(libconfig->setting_copy, HP_libconfig_setting_copy) },
/* loginif */
{ HP_POP(loginif->init, HP_loginif_init) },
{ HP_POP(loginif->final, HP_loginif_final) },
@@ -291,6 +386,20 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(loginif->auth, HP_loginif_auth) },
{ HP_POP(loginif->send_users_count, HP_loginif_send_users_count) },
{ HP_POP(loginif->connect_to_server, HP_loginif_connect_to_server) },
+/* iMalloc */
+ { HP_POP(iMalloc->init, HP_iMalloc_init) },
+ { HP_POP(iMalloc->final, HP_iMalloc_final) },
+ { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) },
+ { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) },
+ { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) },
+ { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) },
+ { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) },
+ { HP_POP(iMalloc->free, HP_iMalloc_free) },
+ { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) },
+ { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) },
+ { HP_POP(iMalloc->usage, HP_iMalloc_usage) },
+ { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) },
+ { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) },
/* mapif */
{ HP_POP(mapif->ban, HP_mapif_ban) },
{ HP_POP(mapif->server_init, HP_mapif_server_init) },
@@ -458,6 +567,18 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mapif->parse_RegistryRequest, HP_mapif_parse_RegistryRequest) },
{ HP_POP(mapif->namechange_ack, HP_mapif_namechange_ack) },
{ HP_POP(mapif->parse_NameChangeRequest, HP_mapif_parse_NameChangeRequest) },
+/* mapindex */
+ { HP_POP(mapindex->init, HP_mapindex_init) },
+ { HP_POP(mapindex->final, HP_mapindex_final) },
+ { HP_POP(mapindex->addmap, HP_mapindex_addmap) },
+ { HP_POP(mapindex->removemap, HP_mapindex_removemap) },
+ { HP_POP(mapindex->getmapname, HP_mapindex_getmapname) },
+ { HP_POP(mapindex->getmapname_ext, HP_mapindex_getmapname_ext) },
+ { HP_POP(mapindex->name2id, HP_mapindex_name2id) },
+ { HP_POP(mapindex->id2name, HP_mapindex_id2name) },
+ { HP_POP(mapindex->check_default, HP_mapindex_check_default) },
+/* nullpo */
+ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) },
/* pincode */
{ HP_POP(pincode->handle, HP_pincode_handle) },
{ HP_POP(pincode->decrypt, HP_pincode_decrypt) },
@@ -469,6 +590,140 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pincode->compare, HP_pincode_compare) },
{ HP_POP(pincode->check, HP_pincode_check) },
{ HP_POP(pincode->config_read, HP_pincode_config_read) },
+/* showmsg */
+ { HP_POP(showmsg->init, HP_showmsg_init) },
+ { HP_POP(showmsg->final, HP_showmsg_final) },
+ { HP_POP(showmsg->clearScreen, HP_showmsg_clearScreen) },
+ { HP_POP(showmsg->showMessageV, HP_showmsg_showMessageV) },
+/* sockt */
+ { HP_POP(sockt->init, HP_sockt_init) },
+ { HP_POP(sockt->final, HP_sockt_final) },
+ { HP_POP(sockt->perform, HP_sockt_perform) },
+ { HP_POP(sockt->datasync, HP_sockt_datasync) },
+ { HP_POP(sockt->make_listen_bind, HP_sockt_make_listen_bind) },
+ { HP_POP(sockt->make_connection, HP_sockt_make_connection) },
+ { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) },
+ { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) },
+ { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) },
+ { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) },
+ { HP_POP(sockt->close, HP_sockt_close) },
+ { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) },
+ { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) },
+ { HP_POP(sockt->flush, HP_sockt_flush) },
+ { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) },
+ { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) },
+ { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) },
+ { HP_POP(sockt->host2ip, HP_sockt_host2ip) },
+ { HP_POP(sockt->ip2str, HP_sockt_ip2str) },
+ { HP_POP(sockt->str2ip, HP_sockt_str2ip) },
+ { HP_POP(sockt->ntows, HP_sockt_ntows) },
+ { HP_POP(sockt->getips, HP_sockt_getips) },
+ { HP_POP(sockt->eof, HP_sockt_eof) },
+ { HP_POP(sockt->lan_subnet_check, HP_sockt_lan_subnet_check) },
+ { HP_POP(sockt->allowed_ip_check, HP_sockt_allowed_ip_check) },
+ { HP_POP(sockt->trusted_ip_check, HP_sockt_trusted_ip_check) },
+ { HP_POP(sockt->net_config_read_sub, HP_sockt_net_config_read_sub) },
+ { HP_POP(sockt->net_config_read, HP_sockt_net_config_read) },
+/* SQL */
+ { HP_POP(SQL->Connect, HP_SQL_Connect) },
+ { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) },
+ { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) },
+ { HP_POP(SQL->SetEncoding, HP_SQL_SetEncoding) },
+ { HP_POP(SQL->Ping, HP_SQL_Ping) },
+ { HP_POP(SQL->EscapeString, HP_SQL_EscapeString) },
+ { HP_POP(SQL->EscapeStringLen, HP_SQL_EscapeStringLen) },
+ { HP_POP(SQL->QueryV, HP_SQL_QueryV) },
+ { HP_POP(SQL->QueryStr, HP_SQL_QueryStr) },
+ { HP_POP(SQL->LastInsertId, HP_SQL_LastInsertId) },
+ { HP_POP(SQL->NumColumns, HP_SQL_NumColumns) },
+ { HP_POP(SQL->NumRows, HP_SQL_NumRows) },
+ { HP_POP(SQL->NextRow, HP_SQL_NextRow) },
+ { HP_POP(SQL->GetData, HP_SQL_GetData) },
+ { HP_POP(SQL->FreeResult, HP_SQL_FreeResult) },
+ { HP_POP(SQL->ShowDebug_, HP_SQL_ShowDebug_) },
+ { HP_POP(SQL->Free, HP_SQL_Free) },
+ { HP_POP(SQL->Malloc, HP_SQL_Malloc) },
+ { HP_POP(SQL->StmtMalloc, HP_SQL_StmtMalloc) },
+ { HP_POP(SQL->StmtPrepareV, HP_SQL_StmtPrepareV) },
+ { HP_POP(SQL->StmtPrepareStr, HP_SQL_StmtPrepareStr) },
+ { HP_POP(SQL->StmtNumParams, HP_SQL_StmtNumParams) },
+ { HP_POP(SQL->StmtBindParam, HP_SQL_StmtBindParam) },
+ { HP_POP(SQL->StmtExecute, HP_SQL_StmtExecute) },
+ { HP_POP(SQL->StmtLastInsertId, HP_SQL_StmtLastInsertId) },
+ { HP_POP(SQL->StmtNumColumns, HP_SQL_StmtNumColumns) },
+ { HP_POP(SQL->StmtBindColumn, HP_SQL_StmtBindColumn) },
+ { HP_POP(SQL->StmtNumRows, HP_SQL_StmtNumRows) },
+ { HP_POP(SQL->StmtNextRow, HP_SQL_StmtNextRow) },
+ { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) },
+ { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) },
+ { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) },
+/* StrBuf */
+ { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) },
+ { HP_POP(StrBuf->Init, HP_StrBuf_Init) },
+ { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) },
+ { HP_POP(StrBuf->Append, HP_StrBuf_Append) },
+ { HP_POP(StrBuf->AppendStr, HP_StrBuf_AppendStr) },
+ { HP_POP(StrBuf->Length, HP_StrBuf_Length) },
+ { HP_POP(StrBuf->Value, HP_StrBuf_Value) },
+ { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) },
+ { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) },
+ { HP_POP(StrBuf->Free, HP_StrBuf_Free) },
+/* strlib */
+ { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) },
+ { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) },
+ { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) },
+ { HP_POP(strlib->remove_control_chars_, HP_strlib_remove_control_chars_) },
+ { HP_POP(strlib->trim_, HP_strlib_trim_) },
+ { HP_POP(strlib->normalize_name_, HP_strlib_normalize_name_) },
+ { HP_POP(strlib->stristr_, HP_strlib_stristr_) },
+ { HP_POP(strlib->strnlen_, HP_strlib_strnlen_) },
+ { HP_POP(strlib->strtok_r_, HP_strlib_strtok_r_) },
+ { HP_POP(strlib->e_mail_check_, HP_strlib_e_mail_check_) },
+ { HP_POP(strlib->config_switch_, HP_strlib_config_switch_) },
+ { HP_POP(strlib->safestrncpy_, HP_strlib_safestrncpy_) },
+ { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) },
+ { HP_POP(strlib->strline_, HP_strlib_strline_) },
+ { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) },
+/* sv */
+ { HP_POP(sv->parse_next, HP_sv_parse_next) },
+ { HP_POP(sv->parse, HP_sv_parse) },
+ { HP_POP(sv->split, HP_sv_split) },
+ { HP_POP(sv->escape_c, HP_sv_escape_c) },
+ { HP_POP(sv->unescape_c, HP_sv_unescape_c) },
+ { HP_POP(sv->skip_escaped_c, HP_sv_skip_escaped_c) },
+ { HP_POP(sv->readdb, HP_sv_readdb) },
+/* sysinfo */
+ { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) },
+ { HP_POP(sysinfo->platform, HP_sysinfo_platform) },
+ { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) },
+ { HP_POP(sysinfo->cpu, HP_sysinfo_cpu) },
+ { HP_POP(sysinfo->cpucores, HP_sysinfo_cpucores) },
+ { HP_POP(sysinfo->arch, HP_sysinfo_arch) },
+ { HP_POP(sysinfo->is64bit, HP_sysinfo_is64bit) },
+ { HP_POP(sysinfo->compiler, HP_sysinfo_compiler) },
+ { HP_POP(sysinfo->cflags, HP_sysinfo_cflags) },
+ { HP_POP(sysinfo->vcstype, HP_sysinfo_vcstype) },
+ { HP_POP(sysinfo->vcstypeid, HP_sysinfo_vcstypeid) },
+ { HP_POP(sysinfo->vcsrevision_src, HP_sysinfo_vcsrevision_src) },
+ { HP_POP(sysinfo->vcsrevision_scripts, HP_sysinfo_vcsrevision_scripts) },
+ { HP_POP(sysinfo->vcsrevision_reload, HP_sysinfo_vcsrevision_reload) },
+ { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) },
+ { HP_POP(sysinfo->init, HP_sysinfo_init) },
+ { HP_POP(sysinfo->final, HP_sysinfo_final) },
+/* timer */
+ { HP_POP(timer->gettick, HP_timer_gettick) },
+ { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) },
+ { HP_POP(timer->add, HP_timer_add) },
+ { HP_POP(timer->add_interval, HP_timer_add_interval) },
+ { HP_POP(timer->get, HP_timer_get) },
+ { HP_POP(timer->delete, HP_timer_delete) },
+ { HP_POP(timer->addtick, HP_timer_addtick) },
+ { HP_POP(timer->settick, HP_timer_settick) },
+ { HP_POP(timer->add_func_list, HP_timer_add_func_list) },
+ { HP_POP(timer->get_uptime, HP_timer_get_uptime) },
+ { HP_POP(timer->perform, HP_timer_perform) },
+ { HP_POP(timer->init, HP_timer_init) },
+ { HP_POP(timer->final, HP_timer_final) },
};
int HookingPointsLenMax = 42;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index d1bff9280..2e35992bc 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -4,6 +4,87 @@
// NOTE: This file was auto-generated and should never be manually edited,
// as it will get overwritten.
+/* HCache */
+void HP_HCache_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_HCache_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.HCache.init();
+ }
+ if( HPMHooks.count.HP_HCache_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_HCache_check(const char *file) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_HCache_check_pre ) {
+ bool (*preHookFunc) (const char *file);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func;
+ retVal___ = preHookFunc(file);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.HCache.check(file);
+ }
+ if( HPMHooks.count.HP_HCache_check_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *file);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, file);
+ }
+ }
+ return retVal___;
+}
+FILE* HP_HCache_open(const char *file, const char *opt) {
+ int hIndex = 0;
+ FILE* retVal___ = NULL;
+ if( HPMHooks.count.HP_HCache_open_pre ) {
+ FILE* (*preHookFunc) (const char *file, const char *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func;
+ retVal___ = preHookFunc(file, opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.HCache.open(file, opt);
+ }
+ if( HPMHooks.count.HP_HCache_open_post ) {
+ FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, file, opt);
+ }
+ }
+ return retVal___;
+}
/* chr */
int HP_chr_waiting_disconnect(int tid, int64 tick, int id, intptr_t data) {
int hIndex = 0;
@@ -2847,14 +2928,14 @@ int HP_chr_mapif_init(int fd) {
}
return retVal___;
}
-int HP_chr_lan_subnetcheck(uint32 ip) {
+uint32 HP_chr_lan_subnet_check(uint32 ip) {
int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_chr_lan_subnetcheck_pre ) {
- int (*preHookFunc) (uint32 *ip);
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_chr_lan_subnet_check_pre ) {
+ uint32 (*preHookFunc) (uint32 *ip);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnetcheck_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_chr_lan_subnetcheck_pre[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_chr_lan_subnet_check_pre[hIndex].func;
retVal___ = preHookFunc(&ip);
}
if( *HPMforce_return ) {
@@ -2863,12 +2944,12 @@ int HP_chr_lan_subnetcheck(uint32 ip) {
}
}
{
- retVal___ = HPMHooks.source.chr.lan_subnetcheck(ip);
+ retVal___ = HPMHooks.source.chr.lan_subnet_check(ip);
}
- if( HPMHooks.count.HP_chr_lan_subnetcheck_post ) {
- int (*postHookFunc) (int retVal___, uint32 *ip);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnetcheck_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_chr_lan_subnetcheck_post[hIndex].func;
+ if( HPMHooks.count.HP_chr_lan_subnet_check_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_subnet_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_chr_lan_subnet_check_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &ip);
}
}
@@ -3707,14 +3788,14 @@ void HP_chr_login_map_server_ack(int fd, uint8 flag) {
}
return;
}
-void HP_chr_parse_char_login_map_server(int fd) {
+void HP_chr_parse_char_login_map_server(int fd, uint32 ipl) {
int hIndex = 0;
if( HPMHooks.count.HP_chr_parse_char_login_map_server_pre ) {
- void (*preHookFunc) (int *fd);
+ void (*preHookFunc) (int *fd, uint32 *ipl);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_chr_parse_char_login_map_server_pre[hIndex].func;
- preHookFunc(&fd);
+ preHookFunc(&fd, &ipl);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -3722,13 +3803,13 @@ void HP_chr_parse_char_login_map_server(int fd) {
}
}
{
- HPMHooks.source.chr.parse_char_login_map_server(fd);
+ HPMHooks.source.chr.parse_char_login_map_server(fd, ipl);
}
if( HPMHooks.count.HP_chr_parse_char_login_map_server_post ) {
- void (*postHookFunc) (int *fd);
+ void (*postHookFunc) (int *fd, uint32 *ipl);
for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_parse_char_login_map_server_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_chr_parse_char_login_map_server_post[hIndex].func;
- postHookFunc(&fd);
+ postHookFunc(&fd, &ipl);
}
}
return;
@@ -4143,33 +4224,6 @@ int HP_chr_online_data_cleanup(int tid, int64 tick, int id, intptr_t data) {
}
return retVal___;
}
-int HP_chr_lan_config_read(const char *lancfgName) {
- int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_chr_lan_config_read_pre ) {
- int (*preHookFunc) (const char *lancfgName);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_config_read_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_chr_lan_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(lancfgName);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.chr.lan_config_read(lancfgName);
- }
- if( HPMHooks.count.HP_chr_lan_config_read_post ) {
- int (*postHookFunc) (int retVal___, const char *lancfgName);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_chr_lan_config_read_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_chr_lan_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, lancfgName);
- }
- }
- return retVal___;
-}
void HP_chr_sql_config_read(const char *cfgName) {
int hIndex = 0;
if( HPMHooks.count.HP_chr_sql_config_read_pre ) {
@@ -4249,6 +4303,793 @@ int HP_chr_config_read(const char *cfgName) {
}
return retVal___;
}
+/* cmdline */
+void HP_cmdline_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_cmdline_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.cmdline.init();
+ }
+ if( HPMHooks.count.HP_cmdline_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_cmdline_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_cmdline_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.cmdline.final();
+ }
+ if( HPMHooks.count.HP_cmdline_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_cmdline_arg_add_pre ) {
+ bool (*preHookFunc) (unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func;
+ retVal___ = preHookFunc(&pluginID, name, &shortname, &func, help, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options);
+ }
+ if( HPMHooks.count.HP_cmdline_arg_add_post ) {
+ bool (*postHookFunc) (bool retVal___, unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &pluginID, name, &shortname, &func, help, &options);
+ }
+ }
+ return retVal___;
+}
+int HP_cmdline_exec(int argc, char **argv, unsigned int options) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_cmdline_exec_pre ) {
+ int (*preHookFunc) (int *argc, char **argv, unsigned int *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func;
+ retVal___ = preHookFunc(&argc, argv, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options);
+ }
+ if( HPMHooks.count.HP_cmdline_exec_post ) {
+ int (*postHookFunc) (int retVal___, int *argc, char **argv, unsigned int *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &argc, argv, &options);
+ }
+ }
+ return retVal___;
+}
+bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) {
+ bool (*preHookFunc) (const char *name, int *current_arg, int *argc);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func;
+ retVal___ = preHookFunc(name, &current_arg, &argc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc);
+ }
+ if( HPMHooks.count.HP_cmdline_arg_next_value_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *name, int *current_arg, int *argc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, &current_arg, &argc);
+ }
+ }
+ return retVal___;
+}
+const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_cmdline_arg_source_pre ) {
+ const char* (*preHookFunc) (struct CmdlineArgData *arg);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func;
+ retVal___ = preHookFunc(arg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.arg_source(arg);
+ }
+ if( HPMHooks.count.HP_cmdline_arg_source_post ) {
+ const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, arg);
+ }
+ }
+ return retVal___;
+}
+/* console */
+void HP_console_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.init();
+ }
+ if( HPMHooks.count.HP_console_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_console_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.final();
+ }
+ if( HPMHooks.count.HP_console_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_console_display_title(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_display_title_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.display_title();
+ }
+ if( HPMHooks.count.HP_console_display_title_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* core */
+void HP_core_shutdown_callback(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_core_shutdown_callback_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.core.shutdown_callback();
+ }
+ if( HPMHooks.count.HP_core_shutdown_callback_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* DB */
+DBOptions HP_DB_fix_options(DBType type, DBOptions options) {
+ int hIndex = 0;
+ DBOptions retVal___ = DB_OPT_BASE;
+ if( HPMHooks.count.HP_DB_fix_options_pre ) {
+ DBOptions (*preHookFunc) (DBType *type, DBOptions *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func;
+ retVal___ = preHookFunc(&type, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.fix_options(type, options);
+ }
+ if( HPMHooks.count.HP_DB_fix_options_post ) {
+ DBOptions (*postHookFunc) (DBOptions retVal___, DBType *type, DBOptions *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type, &options);
+ }
+ }
+ return retVal___;
+}
+DBComparator HP_DB_default_cmp(DBType type) {
+ int hIndex = 0;
+ DBComparator retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_default_cmp_pre ) {
+ DBComparator (*preHookFunc) (DBType *type);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.default_cmp(type);
+ }
+ if( HPMHooks.count.HP_DB_default_cmp_post ) {
+ DBComparator (*postHookFunc) (DBComparator retVal___, DBType *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type);
+ }
+ }
+ return retVal___;
+}
+DBHasher HP_DB_default_hash(DBType type) {
+ int hIndex = 0;
+ DBHasher retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_default_hash_pre ) {
+ DBHasher (*preHookFunc) (DBType *type);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.default_hash(type);
+ }
+ if( HPMHooks.count.HP_DB_default_hash_post ) {
+ DBHasher (*postHookFunc) (DBHasher retVal___, DBType *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type);
+ }
+ }
+ return retVal___;
+}
+DBReleaser HP_DB_default_release(DBType type, DBOptions options) {
+ int hIndex = 0;
+ DBReleaser retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_default_release_pre ) {
+ DBReleaser (*preHookFunc) (DBType *type, DBOptions *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func;
+ retVal___ = preHookFunc(&type, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.default_release(type, options);
+ }
+ if( HPMHooks.count.HP_DB_default_release_post ) {
+ DBReleaser (*postHookFunc) (DBReleaser retVal___, DBType *type, DBOptions *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type, &options);
+ }
+ }
+ return retVal___;
+}
+DBReleaser HP_DB_custom_release(DBRelease which) {
+ int hIndex = 0;
+ DBReleaser retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_custom_release_pre ) {
+ DBReleaser (*preHookFunc) (DBRelease *which);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func;
+ retVal___ = preHookFunc(&which);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.custom_release(which);
+ }
+ if( HPMHooks.count.HP_DB_custom_release_post ) {
+ DBReleaser (*postHookFunc) (DBReleaser retVal___, DBRelease *which);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &which);
+ }
+ }
+ return retVal___;
+}
+DBMap* HP_DB_alloc(const char *file, const char *func, int line, DBType type, DBOptions options, unsigned short maxlen) {
+ int hIndex = 0;
+ DBMap* retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_alloc_pre ) {
+ DBMap* (*preHookFunc) (const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func;
+ retVal___ = preHookFunc(file, func, &line, &type, &options, &maxlen);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen);
+ }
+ if( HPMHooks.count.HP_DB_alloc_post ) {
+ DBMap* (*postHookFunc) (DBMap* retVal___, const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, file, func, &line, &type, &options, &maxlen);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_i2key(int key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_i2key_pre ) {
+ DBKey (*preHookFunc) (int *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.i2key(key);
+ }
+ if( HPMHooks.count.HP_DB_i2key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, int *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_ui2key(unsigned int key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_ui2key_pre ) {
+ DBKey (*preHookFunc) (unsigned int *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ui2key(key);
+ }
+ if( HPMHooks.count.HP_DB_ui2key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, unsigned int *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_str2key(const char *key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_str2key_pre ) {
+ DBKey (*preHookFunc) (const char *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func;
+ retVal___ = preHookFunc(key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.str2key(key);
+ }
+ if( HPMHooks.count.HP_DB_str2key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, const char *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_i642key(int64 key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_i642key_pre ) {
+ DBKey (*preHookFunc) (int64 *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.i642key(key);
+ }
+ if( HPMHooks.count.HP_DB_i642key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, int64 *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_ui642key(uint64 key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_ui642key_pre ) {
+ DBKey (*preHookFunc) (uint64 *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ui642key(key);
+ }
+ if( HPMHooks.count.HP_DB_ui642key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, uint64 *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBData HP_DB_i2data(int data) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_DB_i2data_pre ) {
+ DBData (*preHookFunc) (int *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func;
+ retVal___ = preHookFunc(&data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.i2data(data);
+ }
+ if( HPMHooks.count.HP_DB_i2data_post ) {
+ DBData (*postHookFunc) (DBData retVal___, int *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &data);
+ }
+ }
+ return retVal___;
+}
+DBData HP_DB_ui2data(unsigned int data) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_DB_ui2data_pre ) {
+ DBData (*preHookFunc) (unsigned int *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func;
+ retVal___ = preHookFunc(&data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ui2data(data);
+ }
+ if( HPMHooks.count.HP_DB_ui2data_post ) {
+ DBData (*postHookFunc) (DBData retVal___, unsigned int *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &data);
+ }
+ }
+ return retVal___;
+}
+DBData HP_DB_ptr2data(void *data) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_DB_ptr2data_pre ) {
+ DBData (*preHookFunc) (void *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ptr2data(data);
+ }
+ if( HPMHooks.count.HP_DB_ptr2data_post ) {
+ DBData (*postHookFunc) (DBData retVal___, void *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+int HP_DB_data2i(DBData *data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_DB_data2i_pre ) {
+ int (*preHookFunc) (DBData *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.data2i(data);
+ }
+ if( HPMHooks.count.HP_DB_data2i_post ) {
+ int (*postHookFunc) (int retVal___, DBData *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_DB_data2ui(DBData *data) {
+ int hIndex = 0;
+ unsigned int retVal___ = 0;
+ if( HPMHooks.count.HP_DB_data2ui_pre ) {
+ unsigned int (*preHookFunc) (DBData *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.data2ui(data);
+ }
+ if( HPMHooks.count.HP_DB_data2ui_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, DBData *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+void* HP_DB_data2ptr(DBData *data) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_data2ptr_pre ) {
+ void* (*preHookFunc) (DBData *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.data2ptr(data);
+ }
+ if( HPMHooks.count.HP_DB_data2ptr_post ) {
+ void* (*postHookFunc) (void* retVal___, DBData *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+void HP_DB_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_DB_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.DB.init();
+ }
+ if( HPMHooks.count.HP_DB_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_DB_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_DB_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.DB.final();
+ }
+ if( HPMHooks.count.HP_DB_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* geoip */
const char* HP_geoip_getcountry(uint32 ipnum) {
int hIndex = 0;
@@ -6937,6 +7778,1563 @@ int HP_inter_storage_parse_frommap(int fd) {
}
return retVal___;
}
+/* libconfig */
+int HP_libconfig_read(config_t *config, FILE *stream) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_pre ) {
+ int (*preHookFunc) (config_t *config, FILE *stream);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func;
+ retVal___ = preHookFunc(config, stream);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read(config, stream);
+ }
+ if( HPMHooks.count.HP_libconfig_read_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, FILE *stream);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, stream);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_write(const config_t *config, FILE *stream) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_write_pre ) {
+ void (*preHookFunc) (const config_t *config, FILE *stream);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func;
+ preHookFunc(config, stream);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.write(config, stream);
+ }
+ if( HPMHooks.count.HP_libconfig_write_post ) {
+ void (*postHookFunc) (const config_t *config, FILE *stream);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func;
+ postHookFunc(config, stream);
+ }
+ }
+ return;
+}
+void HP_libconfig_set_auto_convert(config_t *config, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_set_auto_convert_pre ) {
+ void (*preHookFunc) (config_t *config, int *flag);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_pre[hIndex].func;
+ preHookFunc(config, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.set_auto_convert(config, flag);
+ }
+ if( HPMHooks.count.HP_libconfig_set_auto_convert_post ) {
+ void (*postHookFunc) (config_t *config, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_post[hIndex].func;
+ postHookFunc(config, &flag);
+ }
+ }
+ return;
+}
+int HP_libconfig_get_auto_convert(const config_t *config) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_get_auto_convert_pre ) {
+ int (*preHookFunc) (const config_t *config);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_pre[hIndex].func;
+ retVal___ = preHookFunc(config);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.get_auto_convert(config);
+ }
+ if( HPMHooks.count.HP_libconfig_get_auto_convert_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_read_string(config_t *config, const char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_string_pre ) {
+ int (*preHookFunc) (config_t *config, const char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func;
+ retVal___ = preHookFunc(config, str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read_string(config, str);
+ }
+ if( HPMHooks.count.HP_libconfig_read_string_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, str);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_read_file_src(config_t *config, const char *filename) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_file_src_pre ) {
+ int (*preHookFunc) (config_t *config, const char *filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename);
+ }
+ if( HPMHooks.count.HP_libconfig_read_file_src_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filename);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_write_file(config_t *config, const char *filename) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_write_file_pre ) {
+ int (*preHookFunc) (config_t *config, const char *filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.write_file(config, filename);
+ }
+ if( HPMHooks.count.HP_libconfig_write_file_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filename);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_set_destructor(config_t *config, void ( *destructor ) (void *)) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_set_destructor_pre ) {
+ void (*preHookFunc) (config_t *config, void ( *destructor ) (void *));
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func;
+ preHookFunc(config, destructor);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.set_destructor(config, destructor);
+ }
+ if( HPMHooks.count.HP_libconfig_set_destructor_post ) {
+ void (*postHookFunc) (config_t *config, void ( *destructor ) (void *));
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func;
+ postHookFunc(config, destructor);
+ }
+ }
+ return;
+}
+void HP_libconfig_set_include_dir(config_t *config, const char *include_dir) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) {
+ void (*preHookFunc) (config_t *config, const char *include_dir);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func;
+ preHookFunc(config, include_dir);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.set_include_dir(config, include_dir);
+ }
+ if( HPMHooks.count.HP_libconfig_set_include_dir_post ) {
+ void (*postHookFunc) (config_t *config, const char *include_dir);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func;
+ postHookFunc(config, include_dir);
+ }
+ }
+ return;
+}
+void HP_libconfig_init(config_t *config) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_init_pre ) {
+ void (*preHookFunc) (config_t *config);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func;
+ preHookFunc(config);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.init(config);
+ }
+ if( HPMHooks.count.HP_libconfig_init_post ) {
+ void (*postHookFunc) (config_t *config);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func;
+ postHookFunc(config);
+ }
+ }
+ return;
+}
+void HP_libconfig_destroy(config_t *config) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_destroy_pre ) {
+ void (*preHookFunc) (config_t *config);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func;
+ preHookFunc(config);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.destroy(config);
+ }
+ if( HPMHooks.count.HP_libconfig_destroy_post ) {
+ void (*postHookFunc) (config_t *config);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func;
+ postHookFunc(config);
+ }
+ }
+ return;
+}
+int HP_libconfig_setting_get_int(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+long long HP_libconfig_setting_get_int64(const config_setting_t *setting) {
+ int hIndex = 0;
+ long long retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) {
+ long long (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) {
+ long long (*postHookFunc) (long long retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+double HP_libconfig_setting_get_float(const config_setting_t *setting) {
+ int hIndex = 0;
+ double retVal___ = 0.;
+ if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) {
+ double (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_float(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_float_post ) {
+ double (*postHookFunc) (double retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_get_bool(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+const char* HP_libconfig_setting_get_string(const config_setting_t *setting) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) {
+ const char* (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_string(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_string_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_int(const config_setting_t *setting, const char *name, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_int64(const config_setting_t *setting, const char *name, long long *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_float(const config_setting_t *setting, const char *name, double *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_bool(const config_setting_t *setting, const char *name, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_string(const config_setting_t *setting, const char *name, const char **value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, const char **value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, const char **value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_int(config_setting_t *setting, int value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_int64(config_setting_t *setting, long long value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_float(config_setting_t *setting, double value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_float_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_bool(config_setting_t *setting, int value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_string(config_setting_t *setting, const char *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, const char *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_string_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, const char *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_format(config_setting_t *setting, short format) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, short *format);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &format);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_format_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, short *format);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &format);
+ }
+ }
+ return retVal___;
+}
+short HP_libconfig_setting_get_format(const config_setting_t *setting) {
+ int hIndex = 0;
+ short retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) {
+ short (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_format(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_format_post ) {
+ short (*postHookFunc) (short retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_get_int_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+long long HP_libconfig_setting_get_int64_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ long long retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) {
+ long long (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) {
+ long long (*postHookFunc) (long long retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+double HP_libconfig_setting_get_float_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ double retVal___ = 0.;
+ if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) {
+ double (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) {
+ double (*postHookFunc) (double retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_get_bool_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+const char* HP_libconfig_setting_get_string_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) {
+ const char* (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_int_elem(config_setting_t *setting, int idx, int value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_int64_elem(config_setting_t *setting, int idx, long long value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_float_elem(config_setting_t *setting, int idx, double value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_bool_elem(config_setting_t *setting, int idx, int value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_string_elem(config_setting_t *setting, int idx, const char *value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, const char *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, const char *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_index(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_index_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_index(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_index_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_length(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_length_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_length(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_length_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_get_elem(const config_setting_t *setting, unsigned int idx) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) {
+ config_setting_t* (*preHookFunc) (const config_setting_t *setting, unsigned int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, unsigned int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_get_member(const config_setting_t *setting, const char *name) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) {
+ config_setting_t* (*preHookFunc) (const config_setting_t *setting, const char *name);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_member_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_add(config_setting_t *parent, const char *name, int type) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_add_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *parent, const char *name, int *type);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, name, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_add_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *parent, const char *name, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, name, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_remove(config_setting_t *parent, const char *name) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_remove_pre ) {
+ int (*preHookFunc) (config_setting_t *parent, const char *name);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_remove_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *parent, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, name);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_remove_elem(config_setting_t *parent, unsigned int idx) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) {
+ int (*preHookFunc) (config_setting_t *parent, unsigned int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *parent, unsigned int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, &idx);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_setting_set_hook(config_setting_t *setting, void *hook) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) {
+ void (*preHookFunc) (config_setting_t *setting, void *hook);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func;
+ preHookFunc(setting, hook);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_set_hook(setting, hook);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) {
+ void (*postHookFunc) (config_setting_t *setting, void *hook);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func;
+ postHookFunc(setting, hook);
+ }
+ }
+ return;
+}
+config_setting_t* HP_libconfig_lookup(const config_t *config, const char *filepath) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_lookup_pre ) {
+ config_setting_t* (*preHookFunc) (const config_t *config, const char *filepath);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup(config, filepath);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_t *config, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_lookup_from(config_setting_t *setting, const char *filepath) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_lookup_from_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, const char *filepath);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_from_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_from(setting, filepath);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_from_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_from_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, filepath);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_int(const config_t *config, const char *filepath, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_int_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_int_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_int64(const config_t *config, const char *filepath, long long *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_int64_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_float(const config_t *config, const char *filepath, double *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_float_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_float_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_bool(const config_t *config, const char *filepath, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_bool_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_string(const config_t *config, const char *filepath, const char **value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_string_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, const char **value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_string_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, const char **value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_read_file(config_t *config, const char *config_filename) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_file_pre ) {
+ int (*preHookFunc) (config_t *config, const char *config_filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_file_pre[hIndex].func;
+ retVal___ = preHookFunc(config, config_filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read_file(config, config_filename);
+ }
+ if( HPMHooks.count.HP_libconfig_read_file_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *config_filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_file_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, config_filename);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_setting_copy_simple(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) {
+ void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func;
+ preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_copy_simple(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) {
+ void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func;
+ postHookFunc(parent, src);
+ }
+ }
+ return;
+}
+void HP_libconfig_setting_copy_elem(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) {
+ void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func;
+ preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_copy_elem(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) {
+ void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func;
+ postHookFunc(parent, src);
+ }
+ }
+ return;
+}
+void HP_libconfig_setting_copy_aggregate(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) {
+ void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func;
+ preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_copy_aggregate(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) {
+ void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func;
+ postHookFunc(parent, src);
+ }
+ }
+ return;
+}
+int HP_libconfig_setting_copy(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_pre ) {
+ int (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, src);
+ }
+ }
+ return retVal___;
+}
/* loginif */
void HP_loginif_init(void) {
int hIndex = 0;
@@ -7276,6 +9674,352 @@ void HP_loginif_connect_to_server(void) {
}
return;
}
+/* iMalloc */
+void HP_iMalloc_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.init();
+ }
+ if( HPMHooks.count.HP_iMalloc_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_iMalloc_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.final();
+ }
+ if( HPMHooks.count.HP_iMalloc_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_malloc_pre ) {
+ void* (*preHookFunc) (size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func;
+ retVal___ = preHookFunc(&size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_malloc_post ) {
+ void* (*postHookFunc) (void* retVal___, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_calloc_pre ) {
+ void* (*preHookFunc) (size_t *num, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func;
+ retVal___ = preHookFunc(&num, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_calloc_post ) {
+ void* (*postHookFunc) (void* retVal___, size_t *num, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &num, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_realloc_pre ) {
+ void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_realloc_post ) {
+ void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_reallocz_pre ) {
+ void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_reallocz_post ) {
+ void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_astrdup_pre ) {
+ char* (*preHookFunc) (const char *p, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func;
+ retVal___ = preHookFunc(p, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_astrdup_post ) {
+ char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void HP_iMalloc_free(void *p, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_free_pre ) {
+ void (*preHookFunc) (void *p, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func;
+ preHookFunc(p, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.free(p, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_free_post ) {
+ void (*postHookFunc) (void *p, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func;
+ postHookFunc(p, file, &line, func);
+ }
+ }
+ return;
+}
+void HP_iMalloc_memory_check(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_memory_check_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.memory_check();
+ }
+ if( HPMHooks.count.HP_iMalloc_memory_check_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_iMalloc_verify_ptr(void *ptr) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) {
+ bool (*preHookFunc) (void *ptr);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func;
+ retVal___ = preHookFunc(ptr);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr);
+ }
+ if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) {
+ bool (*postHookFunc) (bool retVal___, void *ptr);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ptr);
+ }
+ }
+ return retVal___;
+}
+size_t HP_iMalloc_usage(void) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_iMalloc_usage_pre ) {
+ size_t (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.usage();
+ }
+ if( HPMHooks.count.HP_iMalloc_usage_post ) {
+ size_t (*postHookFunc) (size_t retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_iMalloc_post_shutdown(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.post_shutdown();
+ }
+ if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_iMalloc_init_messages(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_init_messages_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.init_messages();
+ }
+ if( HPMHooks.count.HP_iMalloc_init_messages_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* mapif */
void HP_mapif_ban(int id, unsigned int flag, int status) {
int hIndex = 0;
@@ -11693,6 +14437,275 @@ int HP_mapif_parse_NameChangeRequest(int fd) {
}
return retVal___;
}
+/* mapindex */
+int HP_mapindex_init(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_mapindex_init_pre ) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.init();
+ }
+ if( HPMHooks.count.HP_mapindex_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_mapindex_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mapindex_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapindex.final();
+ }
+ if( HPMHooks.count.HP_mapindex_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_mapindex_addmap(int index, const char *name) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_mapindex_addmap_pre ) {
+ int (*preHookFunc) (int *index, const char *name);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_addmap_pre[hIndex].func;
+ retVal___ = preHookFunc(&index, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.addmap(index, name);
+ }
+ if( HPMHooks.count.HP_mapindex_addmap_post ) {
+ int (*postHookFunc) (int retVal___, int *index, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_addmap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &index, name);
+ }
+ }
+ return retVal___;
+}
+void HP_mapindex_removemap(int index) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mapindex_removemap_pre ) {
+ void (*preHookFunc) (int *index);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_removemap_pre[hIndex].func;
+ preHookFunc(&index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapindex.removemap(index);
+ }
+ if( HPMHooks.count.HP_mapindex_removemap_post ) {
+ void (*postHookFunc) (int *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_removemap_post[hIndex].func;
+ postHookFunc(&index);
+ }
+ }
+ return;
+}
+const char* HP_mapindex_getmapname(const char *string, char *output) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapindex_getmapname_pre ) {
+ const char* (*preHookFunc) (const char *string, char *output);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_getmapname_pre[hIndex].func;
+ retVal___ = preHookFunc(string, output);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.getmapname(string, output);
+ }
+ if( HPMHooks.count.HP_mapindex_getmapname_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *string, char *output);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_getmapname_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, output);
+ }
+ }
+ return retVal___;
+}
+const char* HP_mapindex_getmapname_ext(const char *string, char *output) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapindex_getmapname_ext_pre ) {
+ const char* (*preHookFunc) (const char *string, char *output);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_pre[hIndex].func;
+ retVal___ = preHookFunc(string, output);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.getmapname_ext(string, output);
+ }
+ if( HPMHooks.count.HP_mapindex_getmapname_ext_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *string, char *output);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, output);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_mapindex_name2id(const char *p1) {
+ int hIndex = 0;
+ unsigned short retVal___ = 0;
+ if( HPMHooks.count.HP_mapindex_name2id_pre ) {
+ unsigned short (*preHookFunc) (const char *p1);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_name2id_pre[hIndex].func;
+ retVal___ = preHookFunc(p1);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.name2id(p1);
+ }
+ if( HPMHooks.count.HP_mapindex_name2id_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, const char *p1);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_name2id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p1);
+ }
+ }
+ return retVal___;
+}
+const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapindex_id2name_pre ) {
+ const char* (*preHookFunc) (uint16 *id, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_id2name_pre[hIndex].func;
+ retVal___ = preHookFunc(&id, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.id2name(id, file, line, func);
+ }
+ if( HPMHooks.count.HP_mapindex_id2name_post ) {
+ const char* (*postHookFunc) (const char* retVal___, uint16 *id, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_id2name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+bool HP_mapindex_check_default(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_mapindex_check_default_pre ) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_check_default_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.check_default();
+ }
+ if( HPMHooks.count.HP_mapindex_check_default_post ) {
+ bool (*postHookFunc) (bool retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_check_default_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+/* nullpo */
+void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_nullpo_assert_report_pre ) {
+ void (*preHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func;
+ preHookFunc(file, &line, func, targetname, title);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title);
+ }
+ if( HPMHooks.count.HP_nullpo_assert_report_post ) {
+ void (*postHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func;
+ postHookFunc(file, &line, func, targetname, title);
+ }
+ }
+ return;
+}
/* pincode */
void HP_pincode_handle(int fd, struct char_session_data *sd) {
int hIndex = 0;
@@ -11956,3 +14969,3409 @@ bool HP_pincode_config_read(char *w1, char *w2) {
}
return retVal___;
}
+/* showmsg */
+void HP_showmsg_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_showmsg_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.showmsg.init();
+ }
+ if( HPMHooks.count.HP_showmsg_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_showmsg_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_showmsg_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.showmsg.final();
+ }
+ if( HPMHooks.count.HP_showmsg_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_showmsg_clearScreen(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_showmsg_clearScreen_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.showmsg.clearScreen();
+ }
+ if( HPMHooks.count.HP_showmsg_clearScreen_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_showmsg_showMessageV(const char *string, va_list ap) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_showmsg_showMessageV_pre ) {
+ int (*preHookFunc) (const char *string, va_list ap);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func;
+ retVal___ = preHookFunc(string, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.showmsg.showMessageV(string, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_showmsg_showMessageV_post ) {
+ int (*postHookFunc) (int retVal___, const char *string, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+/* sockt */
+void HP_sockt_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.init();
+ }
+ if( HPMHooks.count.HP_sockt_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_sockt_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.final();
+ }
+ if( HPMHooks.count.HP_sockt_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_sockt_perform(int next) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_perform_pre ) {
+ int (*preHookFunc) (int *next);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func;
+ retVal___ = preHookFunc(&next);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.perform(next);
+ }
+ if( HPMHooks.count.HP_sockt_perform_post ) {
+ int (*postHookFunc) (int retVal___, int *next);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &next);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_datasync(int fd, bool send) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_datasync_pre ) {
+ void (*preHookFunc) (int *fd, bool *send);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func;
+ preHookFunc(&fd, &send);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.datasync(fd, send);
+ }
+ if( HPMHooks.count.HP_sockt_datasync_post ) {
+ void (*postHookFunc) (int *fd, bool *send);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func;
+ postHookFunc(&fd, &send);
+ }
+ }
+ return;
+}
+int HP_sockt_make_listen_bind(uint32 ip, uint16 port) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) {
+ int (*preHookFunc) (uint32 *ip, uint16 *port);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, &port);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port);
+ }
+ if( HPMHooks.count.HP_sockt_make_listen_bind_post ) {
+ int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, &port);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_make_connection_pre ) {
+ int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, &port, opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt);
+ }
+ if( HPMHooks.count.HP_sockt_make_connection_post ) {
+ int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port, struct hSockOpt *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, &port, opt);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) {
+ int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size);
+ }
+ if( HPMHooks.count.HP_sockt_realloc_fifo_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &rfifo_size, &wfifo_size);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_realloc_writefifo(int fd, size_t addition) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) {
+ int (*preHookFunc) (int *fd, size_t *addition);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &addition);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition);
+ }
+ if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, size_t *addition);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &addition);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_wfifoset(int fd, size_t len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_wfifoset_pre ) {
+ int (*preHookFunc) (int *fd, size_t *len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.wfifoset(fd, len);
+ }
+ if( HPMHooks.count.HP_sockt_wfifoset_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, size_t *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_rfifoskip(int fd, size_t len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_rfifoskip_pre ) {
+ int (*preHookFunc) (int *fd, size_t *len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len);
+ }
+ if( HPMHooks.count.HP_sockt_rfifoskip_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, size_t *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &len);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_close(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_close_pre ) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.close(fd);
+ }
+ if( HPMHooks.count.HP_sockt_close_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+bool HP_sockt_session_is_valid(int fd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_session_is_valid_pre ) {
+ bool (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.session_is_valid(fd);
+ }
+ if( HPMHooks.count.HP_sockt_session_is_valid_post ) {
+ bool (*postHookFunc) (bool retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+bool HP_sockt_session_is_active(int fd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_session_is_active_pre ) {
+ bool (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.session_is_active(fd);
+ }
+ if( HPMHooks.count.HP_sockt_session_is_active_post ) {
+ bool (*postHookFunc) (bool retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_flush(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_flush_pre ) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.flush(fd);
+ }
+ if( HPMHooks.count.HP_sockt_flush_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_sockt_flush_fifos(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_flush_fifos_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.flush_fifos();
+ }
+ if( HPMHooks.count.HP_sockt_flush_fifos_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_sockt_set_nonblocking(int fd, unsigned long yes) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) {
+ void (*preHookFunc) (int *fd, unsigned long *yes);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func;
+ preHookFunc(&fd, &yes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.set_nonblocking(fd, yes);
+ }
+ if( HPMHooks.count.HP_sockt_set_nonblocking_post ) {
+ void (*postHookFunc) (int *fd, unsigned long *yes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func;
+ postHookFunc(&fd, &yes);
+ }
+ }
+ return;
+}
+void HP_sockt_set_defaultparse(ParseFunc defaultparse) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) {
+ void (*preHookFunc) (ParseFunc *defaultparse);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func;
+ preHookFunc(&defaultparse);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.set_defaultparse(defaultparse);
+ }
+ if( HPMHooks.count.HP_sockt_set_defaultparse_post ) {
+ void (*postHookFunc) (ParseFunc *defaultparse);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func;
+ postHookFunc(&defaultparse);
+ }
+ }
+ return;
+}
+uint32 HP_sockt_host2ip(const char *hostname) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_host2ip_pre ) {
+ uint32 (*preHookFunc) (const char *hostname);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func;
+ retVal___ = preHookFunc(hostname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.host2ip(hostname);
+ }
+ if( HPMHooks.count.HP_sockt_host2ip_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, const char *hostname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hostname);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sockt_ip2str(uint32 ip, char *ip_str) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sockt_ip2str_pre ) {
+ const char* (*preHookFunc) (uint32 *ip, char *ip_str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, ip_str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str);
+ }
+ if( HPMHooks.count.HP_sockt_ip2str_post ) {
+ const char* (*postHookFunc) (const char* retVal___, uint32 *ip, char *ip_str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, ip_str);
+ }
+ }
+ return retVal___;
+}
+uint32 HP_sockt_str2ip(const char *ip_str) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_str2ip_pre ) {
+ uint32 (*preHookFunc) (const char *ip_str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func;
+ retVal___ = preHookFunc(ip_str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.str2ip(ip_str);
+ }
+ if( HPMHooks.count.HP_sockt_str2ip_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ip_str);
+ }
+ }
+ return retVal___;
+}
+uint16 HP_sockt_ntows(uint16 netshort) {
+ int hIndex = 0;
+ uint16 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_ntows_pre ) {
+ uint16 (*preHookFunc) (uint16 *netshort);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func;
+ retVal___ = preHookFunc(&netshort);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.ntows(netshort);
+ }
+ if( HPMHooks.count.HP_sockt_ntows_post ) {
+ uint16 (*postHookFunc) (uint16 retVal___, uint16 *netshort);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &netshort);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_getips(uint32 *ips, int max) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_getips_pre ) {
+ int (*preHookFunc) (uint32 *ips, int *max);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func;
+ retVal___ = preHookFunc(ips, &max);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.getips(ips, max);
+ }
+ if( HPMHooks.count.HP_sockt_getips_post ) {
+ int (*postHookFunc) (int retVal___, uint32 *ips, int *max);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ips, &max);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_eof(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_eof_pre ) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.eof(fd);
+ }
+ if( HPMHooks.count.HP_sockt_eof_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) {
+ uint32 (*preHookFunc) (uint32 *ip, struct s_subnet *info);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, info);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info);
+ }
+ if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip, struct s_subnet *info);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, info);
+ }
+ }
+ return retVal___;
+}
+bool HP_sockt_allowed_ip_check(uint32 ip) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) {
+ bool (*preHookFunc) (uint32 *ip);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip);
+ }
+ if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) {
+ bool (*postHookFunc) (bool retVal___, uint32 *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip);
+ }
+ }
+ return retVal___;
+}
+bool HP_sockt_trusted_ip_check(uint32 ip) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) {
+ bool (*preHookFunc) (uint32 *ip);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip);
+ }
+ if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) {
+ bool (*postHookFunc) (bool retVal___, uint32 *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_net_config_read_sub(config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) {
+ int (*preHookFunc) (config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(t, list, count, filename, groupname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, count, filename, groupname);
+ }
+ if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, t, list, count, filename, groupname);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_net_config_read(const char *filename) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_net_config_read_pre ) {
+ void (*preHookFunc) (const char *filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func;
+ preHookFunc(filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.net_config_read(filename);
+ }
+ if( HPMHooks.count.HP_sockt_net_config_read_post ) {
+ void (*postHookFunc) (const char *filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func;
+ postHookFunc(filename);
+ }
+ }
+ return;
+}
+/* SQL */
+int HP_SQL_Connect(Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_Connect_pre ) {
+ int (*preHookFunc) (Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func;
+ retVal___ = preHookFunc(self, user, passwd, host, &port, db);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db);
+ }
+ if( HPMHooks.count.HP_SQL_Connect_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, user, passwd, host, &port, db);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_GetTimeout(Sql *self, uint32 *out_timeout) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_GetTimeout_pre ) {
+ int (*preHookFunc) (Sql *self, uint32 *out_timeout);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func;
+ retVal___ = preHookFunc(self, out_timeout);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout);
+ }
+ if( HPMHooks.count.HP_SQL_GetTimeout_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, uint32 *out_timeout);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, out_timeout);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_GetColumnNames(Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) {
+ int (*preHookFunc) (Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func;
+ retVal___ = preHookFunc(self, table, out_buf, &buf_len, &sep);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep);
+ }
+ if( HPMHooks.count.HP_SQL_GetColumnNames_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, table, out_buf, &buf_len, &sep);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_SetEncoding(Sql *self, const char *encoding) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_SetEncoding_pre ) {
+ int (*preHookFunc) (Sql *self, const char *encoding);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func;
+ retVal___ = preHookFunc(self, encoding);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding);
+ }
+ if( HPMHooks.count.HP_SQL_SetEncoding_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *encoding);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, encoding);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_Ping(Sql *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_Ping_pre ) {
+ int (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.Ping(self);
+ }
+ if( HPMHooks.count.HP_SQL_Ping_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_EscapeString(Sql *self, char *out_to, const char *from) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_EscapeString_pre ) {
+ size_t (*preHookFunc) (Sql *self, char *out_to, const char *from);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func;
+ retVal___ = preHookFunc(self, out_to, from);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from);
+ }
+ if( HPMHooks.count.HP_SQL_EscapeString_post ) {
+ size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, out_to, from);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_EscapeStringLen(Sql *self, char *out_to, const char *from, size_t from_len) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) {
+ size_t (*preHookFunc) (Sql *self, char *out_to, const char *from, size_t *from_len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func;
+ retVal___ = preHookFunc(self, out_to, from, &from_len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len);
+ }
+ if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) {
+ size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from, size_t *from_len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, out_to, from, &from_len);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_QueryV(Sql *self, const char *query, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_QueryV_pre ) {
+ int (*preHookFunc) (Sql *self, const char *query, va_list args);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_SQL_QueryV_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *query, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_QueryStr(Sql *self, const char *query) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_QueryStr_pre ) {
+ int (*preHookFunc) (Sql *self, const char *query);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.QueryStr(self, query);
+ }
+ if( HPMHooks.count.HP_SQL_QueryStr_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *query);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_LastInsertId(Sql *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_LastInsertId_pre ) {
+ uint64 (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.LastInsertId(self);
+ }
+ if( HPMHooks.count.HP_SQL_LastInsertId_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+uint32 HP_SQL_NumColumns(Sql *self) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_NumColumns_pre ) {
+ uint32 (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.NumColumns(self);
+ }
+ if( HPMHooks.count.HP_SQL_NumColumns_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_NumRows(Sql *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_NumRows_pre ) {
+ uint64 (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.NumRows(self);
+ }
+ if( HPMHooks.count.HP_SQL_NumRows_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_NextRow(Sql *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_NextRow_pre ) {
+ int (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.NextRow(self);
+ }
+ if( HPMHooks.count.HP_SQL_NextRow_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_GetData(Sql *self, size_t col, char **out_buf, size_t *out_len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_GetData_pre ) {
+ int (*preHookFunc) (Sql *self, size_t *col, char **out_buf, size_t *out_len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func;
+ retVal___ = preHookFunc(self, &col, out_buf, out_len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len);
+ }
+ if( HPMHooks.count.HP_SQL_GetData_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, size_t *col, char **out_buf, size_t *out_len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, &col, out_buf, out_len);
+ }
+ }
+ return retVal___;
+}
+void HP_SQL_FreeResult(Sql *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_FreeResult_pre ) {
+ void (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.FreeResult(self);
+ }
+ if( HPMHooks.count.HP_SQL_FreeResult_post ) {
+ void (*postHookFunc) (Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_SQL_ShowDebug_(Sql *self, const char *debug_file, const unsigned long debug_line) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_ShowDebug__pre ) {
+ void (*preHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func;
+ preHookFunc(self, debug_file, &debug_line);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line);
+ }
+ if( HPMHooks.count.HP_SQL_ShowDebug__post ) {
+ void (*postHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func;
+ postHookFunc(self, debug_file, &debug_line);
+ }
+ }
+ return;
+}
+void HP_SQL_Free(Sql *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_Free_pre ) {
+ void (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.Free(self);
+ }
+ if( HPMHooks.count.HP_SQL_Free_post ) {
+ void (*postHookFunc) (Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+struct Sql* HP_SQL_Malloc(void) {
+ int hIndex = 0;
+ struct Sql* retVal___ = NULL;
+ if( HPMHooks.count.HP_SQL_Malloc_pre ) {
+ struct Sql* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.Malloc();
+ }
+ if( HPMHooks.count.HP_SQL_Malloc_post ) {
+ struct Sql* (*postHookFunc) (struct Sql* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+struct SqlStmt* HP_SQL_StmtMalloc(Sql *sql) {
+ int hIndex = 0;
+ struct SqlStmt* retVal___ = NULL;
+ if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) {
+ struct SqlStmt* (*preHookFunc) (Sql *sql);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func;
+ retVal___ = preHookFunc(sql);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtMalloc(sql);
+ }
+ if( HPMHooks.count.HP_SQL_StmtMalloc_post ) {
+ struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, Sql *sql);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sql);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtPrepareV(SqlStmt *self, const char *query, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) {
+ int (*preHookFunc) (SqlStmt *self, const char *query, va_list args);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtPrepareStr(SqlStmt *self, const char *query) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) {
+ int (*preHookFunc) (SqlStmt *self, const char *query);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query);
+ }
+ if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_StmtNumParams(SqlStmt *self) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) {
+ size_t (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNumParams(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNumParams_post ) {
+ size_t (*postHookFunc) (size_t retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtBindParam(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) {
+ int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func;
+ retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len);
+ }
+ if( HPMHooks.count.HP_SQL_StmtBindParam_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtExecute(SqlStmt *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtExecute_pre ) {
+ int (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtExecute(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtExecute_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_StmtLastInsertId(SqlStmt *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) {
+ uint64 (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_StmtNumColumns(SqlStmt *self) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) {
+ size_t (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNumColumns(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) {
+ size_t (*postHookFunc) (size_t retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtBindColumn(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) {
+ int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func;
+ retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null);
+ }
+ if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_StmtNumRows(SqlStmt *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) {
+ uint64 (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNumRows(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNumRows_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtNextRow(SqlStmt *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) {
+ int (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNextRow(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNextRow_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+void HP_SQL_StmtFreeResult(SqlStmt *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) {
+ void (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.StmtFreeResult(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) {
+ void (*postHookFunc) (SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_SQL_StmtFree(SqlStmt *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_StmtFree_pre ) {
+ void (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.StmtFree(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtFree_post ) {
+ void (*postHookFunc) (SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_SQL_StmtShowDebug_(SqlStmt *self, const char *debug_file, const unsigned long debug_line) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) {
+ void (*preHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func;
+ preHookFunc(self, debug_file, &debug_line);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line);
+ }
+ if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) {
+ void (*postHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func;
+ postHookFunc(self, debug_file, &debug_line);
+ }
+ }
+ return;
+}
+/* StrBuf */
+StringBuf* HP_StrBuf_Malloc(void) {
+ int hIndex = 0;
+ StringBuf* retVal___ = NULL;
+ if( HPMHooks.count.HP_StrBuf_Malloc_pre ) {
+ StringBuf* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Malloc();
+ }
+ if( HPMHooks.count.HP_StrBuf_Malloc_post ) {
+ StringBuf* (*postHookFunc) (StringBuf* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_StrBuf_Init(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Init_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Init(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Init_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) {
+ int (*preHookFunc) (StringBuf *self, const char *fmt, va_list args);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func;
+ retVal___ = preHookFunc(self, fmt, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_StrBuf_Vprintf_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, fmt, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_Append_pre ) {
+ int (*preHookFunc) (StringBuf *self, const StringBuf *sbuf);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func;
+ retVal___ = preHookFunc(self, sbuf);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf);
+ }
+ if( HPMHooks.count.HP_StrBuf_Append_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, sbuf);
+ }
+ }
+ return retVal___;
+}
+int HP_StrBuf_AppendStr(StringBuf *self, const char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) {
+ int (*preHookFunc) (StringBuf *self, const char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func;
+ retVal___ = preHookFunc(self, str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str);
+ }
+ if( HPMHooks.count.HP_StrBuf_AppendStr_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, str);
+ }
+ }
+ return retVal___;
+}
+int HP_StrBuf_Length(StringBuf *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_Length_pre ) {
+ int (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Length(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Length_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+char* HP_StrBuf_Value(StringBuf *self) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_StrBuf_Value_pre ) {
+ char* (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Value(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Value_post ) {
+ char* (*postHookFunc) (char* retVal___, StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+void HP_StrBuf_Clear(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Clear_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Clear(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Clear_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_StrBuf_Destroy(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Destroy_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Destroy(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Destroy_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_StrBuf_Free(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Free_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Free(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Free_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+/* strlib */
+char* HP_strlib_jstrescape(char *pt) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_jstrescape_pre ) {
+ char* (*preHookFunc) (char *pt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func;
+ retVal___ = preHookFunc(pt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.jstrescape(pt);
+ }
+ if( HPMHooks.count.HP_strlib_jstrescape_post ) {
+ char* (*postHookFunc) (char* retVal___, char *pt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pt);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_jstrescapecpy(char *pt, const char *spt) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) {
+ char* (*preHookFunc) (char *pt, const char *spt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func;
+ retVal___ = preHookFunc(pt, spt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt);
+ }
+ if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) {
+ char* (*postHookFunc) (char* retVal___, char *pt, const char *spt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pt, spt);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) {
+ int (*preHookFunc) (char *pt, const char *spt, int *size);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func;
+ retVal___ = preHookFunc(pt, spt, &size);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size);
+ }
+ if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) {
+ int (*postHookFunc) (int retVal___, char *pt, const char *spt, int *size);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pt, spt, &size);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_remove_control_chars_(char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) {
+ int (*preHookFunc) (char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.remove_control_chars_(str);
+ }
+ if( HPMHooks.count.HP_strlib_remove_control_chars__post ) {
+ int (*postHookFunc) (int retVal___, char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_trim_(char *str) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_trim__pre ) {
+ char* (*preHookFunc) (char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.trim_(str);
+ }
+ if( HPMHooks.count.HP_strlib_trim__post ) {
+ char* (*postHookFunc) (char* retVal___, char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_normalize_name_(char *str, const char *delims) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_normalize_name__pre ) {
+ char* (*preHookFunc) (char *str, const char *delims);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func;
+ retVal___ = preHookFunc(str, delims);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims);
+ }
+ if( HPMHooks.count.HP_strlib_normalize_name__post ) {
+ char* (*postHookFunc) (char* retVal___, char *str, const char *delims);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, delims);
+ }
+ }
+ return retVal___;
+}
+const char* HP_strlib_stristr_(const char *haystack, const char *needle) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_stristr__pre ) {
+ const char* (*preHookFunc) (const char *haystack, const char *needle);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func;
+ retVal___ = preHookFunc(haystack, needle);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle);
+ }
+ if( HPMHooks.count.HP_strlib_stristr__post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, haystack, needle);
+ }
+ }
+ return retVal___;
+}
+size_t HP_strlib_strnlen_(const char *string, size_t maxlen) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_strnlen__pre ) {
+ size_t (*preHookFunc) (const char *string, size_t *maxlen);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func;
+ retVal___ = preHookFunc(string, &maxlen);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen);
+ }
+ if( HPMHooks.count.HP_strlib_strnlen__post ) {
+ size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, &maxlen);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_strtok_r__pre ) {
+ char* (*preHookFunc) (char *s1, const char *s2, char **lasts);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func;
+ retVal___ = preHookFunc(s1, s2, lasts);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts);
+ }
+ if( HPMHooks.count.HP_strlib_strtok_r__post ) {
+ char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, s1, s2, lasts);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_e_mail_check_(char *email) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_e_mail_check__pre ) {
+ int (*preHookFunc) (char *email);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func;
+ retVal___ = preHookFunc(email);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.e_mail_check_(email);
+ }
+ if( HPMHooks.count.HP_strlib_e_mail_check__post ) {
+ int (*postHookFunc) (int retVal___, char *email);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, email);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_config_switch_(const char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_config_switch__pre ) {
+ int (*preHookFunc) (const char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.config_switch_(str);
+ }
+ if( HPMHooks.count.HP_strlib_config_switch__post ) {
+ int (*postHookFunc) (int retVal___, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_safestrncpy__pre ) {
+ char* (*preHookFunc) (char *dst, const char *src, size_t *n);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func;
+ retVal___ = preHookFunc(dst, src, &n);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n);
+ }
+ if( HPMHooks.count.HP_strlib_safestrncpy__post ) {
+ char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t *n);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, dst, src, &n);
+ }
+ }
+ return retVal___;
+}
+size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_safestrnlen__pre ) {
+ size_t (*preHookFunc) (const char *string, size_t *maxlen);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func;
+ retVal___ = preHookFunc(string, &maxlen);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen);
+ }
+ if( HPMHooks.count.HP_strlib_safestrnlen__post ) {
+ size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, &maxlen);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_strline_(const char *str, size_t pos) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_strline__pre ) {
+ int (*preHookFunc) (const char *str, size_t *pos);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func;
+ retVal___ = preHookFunc(str, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.strline_(str, pos);
+ }
+ if( HPMHooks.count.HP_strlib_strline__post ) {
+ int (*postHookFunc) (int retVal___, const char *str, size_t *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &pos);
+ }
+ }
+ return retVal___;
+}
+bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_strlib_bin2hex__pre ) {
+ bool (*preHookFunc) (char *output, unsigned char *input, size_t *count);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func;
+ retVal___ = preHookFunc(output, input, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count);
+ }
+ if( HPMHooks.count.HP_strlib_bin2hex__post ) {
+ bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, output, input, &count);
+ }
+ }
+ return retVal___;
+}
+/* sv */
+int HP_sv_parse_next(struct s_svstate *svstate) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sv_parse_next_pre ) {
+ int (*preHookFunc) (struct s_svstate *svstate);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func;
+ retVal___ = preHookFunc(svstate);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.parse_next(svstate);
+ }
+ if( HPMHooks.count.HP_sv_parse_next_post ) {
+ int (*postHookFunc) (int retVal___, struct s_svstate *svstate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, svstate);
+ }
+ }
+ return retVal___;
+}
+int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sv_parse_pre ) {
+ int (*preHookFunc) (const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &len, &startoff, &delim, out_pos, &npos, &opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt);
+ }
+ if( HPMHooks.count.HP_sv_parse_post ) {
+ int (*postHookFunc) (int retVal___, const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_pos, &npos, &opt);
+ }
+ }
+ return retVal___;
+}
+int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sv_split_pre ) {
+ int (*preHookFunc) (char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &len, &startoff, &delim, out_fields, &nfields, &opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt);
+ }
+ if( HPMHooks.count.HP_sv_split_post ) {
+ int (*postHookFunc) (int retVal___, char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_fields, &nfields, &opt);
+ }
+ }
+ return retVal___;
+}
+size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_sv_escape_c_pre ) {
+ size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len, const char *escapes);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func;
+ retVal___ = preHookFunc(out_dest, src, &len, escapes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes);
+ }
+ if( HPMHooks.count.HP_sv_escape_c_post ) {
+ size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len, const char *escapes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, out_dest, src, &len, escapes);
+ }
+ }
+ return retVal___;
+}
+size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_sv_unescape_c_pre ) {
+ size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func;
+ retVal___ = preHookFunc(out_dest, src, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len);
+ }
+ if( HPMHooks.count.HP_sv_unescape_c_post ) {
+ size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, out_dest, src, &len);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sv_skip_escaped_c(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.skip_escaped_c(p);
+ }
+ if( HPMHooks.count.HP_sv_skip_escaped_c_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sv_readdb_pre ) {
+ bool (*preHookFunc) (const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current));
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func;
+ retVal___ = preHookFunc(directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc);
+ }
+ if( HPMHooks.count.HP_sv_readdb_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current));
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc);
+ }
+ }
+ return retVal___;
+}
+/* sysinfo */
+int HP_sysinfo_getpagesize(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.getpagesize();
+ }
+ if( HPMHooks.count.HP_sysinfo_getpagesize_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_platform(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_platform_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.platform();
+ }
+ if( HPMHooks.count.HP_sysinfo_platform_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_osversion(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_osversion_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.osversion();
+ }
+ if( HPMHooks.count.HP_sysinfo_osversion_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_cpu(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_cpu_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.cpu();
+ }
+ if( HPMHooks.count.HP_sysinfo_cpu_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_sysinfo_cpucores(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sysinfo_cpucores_pre ) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.cpucores();
+ }
+ if( HPMHooks.count.HP_sysinfo_cpucores_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_arch(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_arch_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.arch();
+ }
+ if( HPMHooks.count.HP_sysinfo_arch_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_sysinfo_is64bit(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sysinfo_is64bit_pre ) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.is64bit();
+ }
+ if( HPMHooks.count.HP_sysinfo_is64bit_post ) {
+ bool (*postHookFunc) (bool retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_compiler(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_compiler_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.compiler();
+ }
+ if( HPMHooks.count.HP_sysinfo_compiler_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_cflags(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_cflags_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.cflags();
+ }
+ if( HPMHooks.count.HP_sysinfo_cflags_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_vcstype(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_vcstype_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcstype();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcstype_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_sysinfo_vcstypeid(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcstypeid();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_vcsrevision_src(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcsrevision_src();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_vcsrevision_scripts(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_sysinfo_vcsrevision_reload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sysinfo.vcsrevision_reload();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_sysinfo_is_superuser(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.is_superuser();
+ }
+ if( HPMHooks.count.HP_sysinfo_is_superuser_post ) {
+ bool (*postHookFunc) (bool retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_sysinfo_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sysinfo_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sysinfo.init();
+ }
+ if( HPMHooks.count.HP_sysinfo_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_sysinfo_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sysinfo_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sysinfo.final();
+ }
+ if( HPMHooks.count.HP_sysinfo_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* timer */
+int64 HP_timer_gettick(void) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_gettick_pre ) {
+ int64 (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.gettick();
+ }
+ if( HPMHooks.count.HP_timer_gettick_post ) {
+ int64 (*postHookFunc) (int64 retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int64 HP_timer_gettick_nocache(void) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_gettick_nocache_pre ) {
+ int64 (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.gettick_nocache();
+ }
+ if( HPMHooks.count.HP_timer_gettick_nocache_post ) {
+ int64 (*postHookFunc) (int64 retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_add_pre ) {
+ int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func;
+ retVal___ = preHookFunc(&tick, &func, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.add(tick, func, id, data);
+ }
+ if( HPMHooks.count.HP_timer_add_post ) {
+ int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_add_interval_pre ) {
+ int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func;
+ retVal___ = preHookFunc(&tick, &func, &id, &data, &interval);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval);
+ }
+ if( HPMHooks.count.HP_timer_add_interval_post ) {
+ int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data, &interval);
+ }
+ }
+ return retVal___;
+}
+const struct TimerData* HP_timer_get(int tid) {
+ int hIndex = 0;
+ const struct TimerData* retVal___ = NULL;
+ if( HPMHooks.count.HP_timer_get_pre ) {
+ const struct TimerData* (*preHookFunc) (int *tid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.get(tid);
+ }
+ if( HPMHooks.count.HP_timer_get_post ) {
+ const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int *tid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_delete(int tid, TimerFunc func) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_delete_pre ) {
+ int (*preHookFunc) (int *tid, TimerFunc *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.delete(tid, func);
+ }
+ if( HPMHooks.count.HP_timer_delete_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, TimerFunc *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &func);
+ }
+ }
+ return retVal___;
+}
+int64 HP_timer_addtick(int tid, int64 tick) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_addtick_pre ) {
+ int64 (*preHookFunc) (int *tid, int64 *tick);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.addtick(tid, tick);
+ }
+ if( HPMHooks.count.HP_timer_addtick_post ) {
+ int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick);
+ }
+ }
+ return retVal___;
+}
+int64 HP_timer_settick(int tid, int64 tick) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_settick_pre ) {
+ int64 (*preHookFunc) (int *tid, int64 *tick);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.settick(tid, tick);
+ }
+ if( HPMHooks.count.HP_timer_settick_post ) {
+ int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_add_func_list(TimerFunc func, char *name) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_add_func_list_pre ) {
+ int (*preHookFunc) (TimerFunc *func, char *name);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func;
+ retVal___ = preHookFunc(&func, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.add_func_list(func, name);
+ }
+ if( HPMHooks.count.HP_timer_add_func_list_post ) {
+ int (*postHookFunc) (int retVal___, TimerFunc *func, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &func, name);
+ }
+ }
+ return retVal___;
+}
+unsigned long HP_timer_get_uptime(void) {
+ int hIndex = 0;
+ unsigned long retVal___ = 0;
+ if( HPMHooks.count.HP_timer_get_uptime_pre ) {
+ unsigned long (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.get_uptime();
+ }
+ if( HPMHooks.count.HP_timer_get_uptime_post ) {
+ unsigned long (*postHookFunc) (unsigned long retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_perform(int64 tick) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_perform_pre ) {
+ int (*preHookFunc) (int64 *tick);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func;
+ retVal___ = preHookFunc(&tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.perform(tick);
+ }
+ if( HPMHooks.count.HP_timer_perform_post ) {
+ int (*postHookFunc) (int retVal___, int64 *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tick);
+ }
+ }
+ return retVal___;
+}
+void HP_timer_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_timer_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.timer.init();
+ }
+ if( HPMHooks.count.HP_timer_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_timer_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_timer_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.timer.final();
+ }
+ if( HPMHooks.count.HP_timer_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
index 00700756c..489917771 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
@@ -4,7 +4,12 @@
// NOTE: This file was auto-generated and should never be manually edited,
// as it will get overwritten.
+memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface));
memcpy(&HPMHooks.source.chr, chr, sizeof(struct char_interface));
+memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface));
+memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface));
+memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface));
+memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface));
memcpy(&HPMHooks.source.geoip, geoip, sizeof(struct geoip_interface));
memcpy(&HPMHooks.source.inter_auction, inter_auction, sizeof(struct inter_auction_interface));
memcpy(&HPMHooks.source.inter_elemental, inter_elemental, sizeof(struct inter_elemental_interface));
@@ -17,6 +22,18 @@ memcpy(&HPMHooks.source.inter_party, inter_party, sizeof(struct inter_party_inte
memcpy(&HPMHooks.source.inter_pet, inter_pet, sizeof(struct inter_pet_interface));
memcpy(&HPMHooks.source.inter_quest, inter_quest, sizeof(struct inter_quest_interface));
memcpy(&HPMHooks.source.inter_storage, inter_storage, sizeof(struct inter_storage_interface));
+memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface));
memcpy(&HPMHooks.source.loginif, loginif, sizeof(struct loginif_interface));
+memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface));
memcpy(&HPMHooks.source.mapif, mapif, sizeof(struct mapif_interface));
+memcpy(&HPMHooks.source.mapindex, mapindex, sizeof(struct mapindex_interface));
+memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface));
memcpy(&HPMHooks.source.pincode, pincode, sizeof(struct pincode_interface));
+memcpy(&HPMHooks.source.showmsg, showmsg, sizeof(struct showmsg_interface));
+memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface));
+memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface));
+memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface));
+memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface));
+memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface));
+memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface));
+memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_interface));
diff --git a/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc
deleted file mode 100644
index fd9eeba8c..000000000
--- a/src/plugins/HPMHooking/HPMHooking_login.GetSymbol.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
-
-if( !(login = GET_SYMBOL("login") ) ) return "login";
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index af7e7250c..4edefd5b7 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -5,6 +5,186 @@
// as it will get overwritten.
struct {
+ struct HPMHookPoint *HP_HCache_init_pre;
+ struct HPMHookPoint *HP_HCache_init_post;
+ struct HPMHookPoint *HP_HCache_check_pre;
+ struct HPMHookPoint *HP_HCache_check_post;
+ struct HPMHookPoint *HP_HCache_open_pre;
+ struct HPMHookPoint *HP_HCache_open_post;
+ struct HPMHookPoint *HP_cmdline_init_pre;
+ struct HPMHookPoint *HP_cmdline_init_post;
+ struct HPMHookPoint *HP_cmdline_final_pre;
+ struct HPMHookPoint *HP_cmdline_final_post;
+ struct HPMHookPoint *HP_cmdline_arg_add_pre;
+ struct HPMHookPoint *HP_cmdline_arg_add_post;
+ struct HPMHookPoint *HP_cmdline_exec_pre;
+ struct HPMHookPoint *HP_cmdline_exec_post;
+ struct HPMHookPoint *HP_cmdline_arg_next_value_pre;
+ struct HPMHookPoint *HP_cmdline_arg_next_value_post;
+ struct HPMHookPoint *HP_cmdline_arg_source_pre;
+ struct HPMHookPoint *HP_cmdline_arg_source_post;
+ struct HPMHookPoint *HP_console_init_pre;
+ struct HPMHookPoint *HP_console_init_post;
+ struct HPMHookPoint *HP_console_final_pre;
+ struct HPMHookPoint *HP_console_final_post;
+ struct HPMHookPoint *HP_console_display_title_pre;
+ struct HPMHookPoint *HP_console_display_title_post;
+ struct HPMHookPoint *HP_core_shutdown_callback_pre;
+ struct HPMHookPoint *HP_core_shutdown_callback_post;
+ struct HPMHookPoint *HP_DB_fix_options_pre;
+ struct HPMHookPoint *HP_DB_fix_options_post;
+ struct HPMHookPoint *HP_DB_default_cmp_pre;
+ struct HPMHookPoint *HP_DB_default_cmp_post;
+ struct HPMHookPoint *HP_DB_default_hash_pre;
+ struct HPMHookPoint *HP_DB_default_hash_post;
+ struct HPMHookPoint *HP_DB_default_release_pre;
+ struct HPMHookPoint *HP_DB_default_release_post;
+ struct HPMHookPoint *HP_DB_custom_release_pre;
+ struct HPMHookPoint *HP_DB_custom_release_post;
+ struct HPMHookPoint *HP_DB_alloc_pre;
+ struct HPMHookPoint *HP_DB_alloc_post;
+ struct HPMHookPoint *HP_DB_i2key_pre;
+ struct HPMHookPoint *HP_DB_i2key_post;
+ struct HPMHookPoint *HP_DB_ui2key_pre;
+ struct HPMHookPoint *HP_DB_ui2key_post;
+ struct HPMHookPoint *HP_DB_str2key_pre;
+ struct HPMHookPoint *HP_DB_str2key_post;
+ struct HPMHookPoint *HP_DB_i642key_pre;
+ struct HPMHookPoint *HP_DB_i642key_post;
+ struct HPMHookPoint *HP_DB_ui642key_pre;
+ struct HPMHookPoint *HP_DB_ui642key_post;
+ struct HPMHookPoint *HP_DB_i2data_pre;
+ struct HPMHookPoint *HP_DB_i2data_post;
+ struct HPMHookPoint *HP_DB_ui2data_pre;
+ struct HPMHookPoint *HP_DB_ui2data_post;
+ struct HPMHookPoint *HP_DB_ptr2data_pre;
+ struct HPMHookPoint *HP_DB_ptr2data_post;
+ struct HPMHookPoint *HP_DB_data2i_pre;
+ struct HPMHookPoint *HP_DB_data2i_post;
+ struct HPMHookPoint *HP_DB_data2ui_pre;
+ struct HPMHookPoint *HP_DB_data2ui_post;
+ struct HPMHookPoint *HP_DB_data2ptr_pre;
+ struct HPMHookPoint *HP_DB_data2ptr_post;
+ struct HPMHookPoint *HP_DB_init_pre;
+ struct HPMHookPoint *HP_DB_init_post;
+ struct HPMHookPoint *HP_DB_final_pre;
+ struct HPMHookPoint *HP_DB_final_post;
+ struct HPMHookPoint *HP_libconfig_read_pre;
+ struct HPMHookPoint *HP_libconfig_read_post;
+ struct HPMHookPoint *HP_libconfig_write_pre;
+ struct HPMHookPoint *HP_libconfig_write_post;
+ struct HPMHookPoint *HP_libconfig_set_auto_convert_pre;
+ struct HPMHookPoint *HP_libconfig_set_auto_convert_post;
+ struct HPMHookPoint *HP_libconfig_get_auto_convert_pre;
+ struct HPMHookPoint *HP_libconfig_get_auto_convert_post;
+ struct HPMHookPoint *HP_libconfig_read_string_pre;
+ struct HPMHookPoint *HP_libconfig_read_string_post;
+ struct HPMHookPoint *HP_libconfig_read_file_src_pre;
+ struct HPMHookPoint *HP_libconfig_read_file_src_post;
+ struct HPMHookPoint *HP_libconfig_write_file_pre;
+ struct HPMHookPoint *HP_libconfig_write_file_post;
+ struct HPMHookPoint *HP_libconfig_set_destructor_pre;
+ struct HPMHookPoint *HP_libconfig_set_destructor_post;
+ struct HPMHookPoint *HP_libconfig_set_include_dir_pre;
+ struct HPMHookPoint *HP_libconfig_set_include_dir_post;
+ struct HPMHookPoint *HP_libconfig_init_pre;
+ struct HPMHookPoint *HP_libconfig_init_post;
+ struct HPMHookPoint *HP_libconfig_destroy_pre;
+ struct HPMHookPoint *HP_libconfig_destroy_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int64_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int64_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_float_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_float_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_bool_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_bool_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_string_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_string_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_format_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_format_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_format_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_format_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_index_pre;
+ struct HPMHookPoint *HP_libconfig_setting_index_post;
+ struct HPMHookPoint *HP_libconfig_setting_length_pre;
+ struct HPMHookPoint *HP_libconfig_setting_length_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_member_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_member_post;
+ struct HPMHookPoint *HP_libconfig_setting_add_pre;
+ struct HPMHookPoint *HP_libconfig_setting_add_post;
+ struct HPMHookPoint *HP_libconfig_setting_remove_pre;
+ struct HPMHookPoint *HP_libconfig_setting_remove_post;
+ struct HPMHookPoint *HP_libconfig_setting_remove_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_remove_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_hook_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_hook_post;
+ struct HPMHookPoint *HP_libconfig_lookup_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_post;
+ struct HPMHookPoint *HP_libconfig_lookup_from_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_from_post;
+ struct HPMHookPoint *HP_libconfig_lookup_int_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_int_post;
+ struct HPMHookPoint *HP_libconfig_lookup_int64_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_int64_post;
+ struct HPMHookPoint *HP_libconfig_lookup_float_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_float_post;
+ struct HPMHookPoint *HP_libconfig_lookup_bool_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_bool_post;
+ struct HPMHookPoint *HP_libconfig_lookup_string_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_string_post;
+ struct HPMHookPoint *HP_libconfig_read_file_pre;
+ struct HPMHookPoint *HP_libconfig_read_file_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_simple_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_simple_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_post;
struct HPMHookPoint *HP_login_mmo_auth_pre;
struct HPMHookPoint *HP_login_mmo_auth_post;
struct HPMHookPoint *HP_login_mmo_auth_new_pre;
@@ -29,10 +209,8 @@ struct {
struct HPMHookPoint *HP_login_check_encrypted_post;
struct HPMHookPoint *HP_login_check_password_pre;
struct HPMHookPoint *HP_login_check_password_post;
- struct HPMHookPoint *HP_login_lan_subnetcheck_pre;
- struct HPMHookPoint *HP_login_lan_subnetcheck_post;
- struct HPMHookPoint *HP_login_lan_config_read_pre;
- struct HPMHookPoint *HP_login_lan_config_read_post;
+ struct HPMHookPoint *HP_login_lan_subnet_check_pre;
+ struct HPMHookPoint *HP_login_lan_subnet_check_post;
struct HPMHookPoint *HP_login_fromchar_accinfo_pre;
struct HPMHookPoint *HP_login_fromchar_accinfo_post;
struct HPMHookPoint *HP_login_fromchar_account_pre;
@@ -115,9 +293,469 @@ struct {
struct HPMHookPoint *HP_login_parse_request_connection_post;
struct HPMHookPoint *HP_login_parse_login_pre;
struct HPMHookPoint *HP_login_parse_login_post;
+ struct HPMHookPoint *HP_iMalloc_init_pre;
+ struct HPMHookPoint *HP_iMalloc_init_post;
+ struct HPMHookPoint *HP_iMalloc_final_pre;
+ struct HPMHookPoint *HP_iMalloc_final_post;
+ struct HPMHookPoint *HP_iMalloc_malloc_pre;
+ struct HPMHookPoint *HP_iMalloc_malloc_post;
+ struct HPMHookPoint *HP_iMalloc_calloc_pre;
+ struct HPMHookPoint *HP_iMalloc_calloc_post;
+ struct HPMHookPoint *HP_iMalloc_realloc_pre;
+ struct HPMHookPoint *HP_iMalloc_realloc_post;
+ struct HPMHookPoint *HP_iMalloc_reallocz_pre;
+ struct HPMHookPoint *HP_iMalloc_reallocz_post;
+ struct HPMHookPoint *HP_iMalloc_astrdup_pre;
+ struct HPMHookPoint *HP_iMalloc_astrdup_post;
+ struct HPMHookPoint *HP_iMalloc_free_pre;
+ struct HPMHookPoint *HP_iMalloc_free_post;
+ struct HPMHookPoint *HP_iMalloc_memory_check_pre;
+ struct HPMHookPoint *HP_iMalloc_memory_check_post;
+ struct HPMHookPoint *HP_iMalloc_verify_ptr_pre;
+ struct HPMHookPoint *HP_iMalloc_verify_ptr_post;
+ struct HPMHookPoint *HP_iMalloc_usage_pre;
+ struct HPMHookPoint *HP_iMalloc_usage_post;
+ struct HPMHookPoint *HP_iMalloc_post_shutdown_pre;
+ struct HPMHookPoint *HP_iMalloc_post_shutdown_post;
+ struct HPMHookPoint *HP_iMalloc_init_messages_pre;
+ struct HPMHookPoint *HP_iMalloc_init_messages_post;
+ struct HPMHookPoint *HP_nullpo_assert_report_pre;
+ struct HPMHookPoint *HP_nullpo_assert_report_post;
+ struct HPMHookPoint *HP_showmsg_init_pre;
+ struct HPMHookPoint *HP_showmsg_init_post;
+ struct HPMHookPoint *HP_showmsg_final_pre;
+ struct HPMHookPoint *HP_showmsg_final_post;
+ struct HPMHookPoint *HP_showmsg_clearScreen_pre;
+ struct HPMHookPoint *HP_showmsg_clearScreen_post;
+ struct HPMHookPoint *HP_showmsg_showMessageV_pre;
+ struct HPMHookPoint *HP_showmsg_showMessageV_post;
+ struct HPMHookPoint *HP_sockt_init_pre;
+ struct HPMHookPoint *HP_sockt_init_post;
+ struct HPMHookPoint *HP_sockt_final_pre;
+ struct HPMHookPoint *HP_sockt_final_post;
+ struct HPMHookPoint *HP_sockt_perform_pre;
+ struct HPMHookPoint *HP_sockt_perform_post;
+ struct HPMHookPoint *HP_sockt_datasync_pre;
+ struct HPMHookPoint *HP_sockt_datasync_post;
+ struct HPMHookPoint *HP_sockt_make_listen_bind_pre;
+ struct HPMHookPoint *HP_sockt_make_listen_bind_post;
+ struct HPMHookPoint *HP_sockt_make_connection_pre;
+ struct HPMHookPoint *HP_sockt_make_connection_post;
+ struct HPMHookPoint *HP_sockt_realloc_fifo_pre;
+ struct HPMHookPoint *HP_sockt_realloc_fifo_post;
+ struct HPMHookPoint *HP_sockt_realloc_writefifo_pre;
+ struct HPMHookPoint *HP_sockt_realloc_writefifo_post;
+ struct HPMHookPoint *HP_sockt_wfifoset_pre;
+ struct HPMHookPoint *HP_sockt_wfifoset_post;
+ struct HPMHookPoint *HP_sockt_rfifoskip_pre;
+ struct HPMHookPoint *HP_sockt_rfifoskip_post;
+ struct HPMHookPoint *HP_sockt_close_pre;
+ struct HPMHookPoint *HP_sockt_close_post;
+ struct HPMHookPoint *HP_sockt_session_is_valid_pre;
+ struct HPMHookPoint *HP_sockt_session_is_valid_post;
+ struct HPMHookPoint *HP_sockt_session_is_active_pre;
+ struct HPMHookPoint *HP_sockt_session_is_active_post;
+ struct HPMHookPoint *HP_sockt_flush_pre;
+ struct HPMHookPoint *HP_sockt_flush_post;
+ struct HPMHookPoint *HP_sockt_flush_fifos_pre;
+ struct HPMHookPoint *HP_sockt_flush_fifos_post;
+ struct HPMHookPoint *HP_sockt_set_nonblocking_pre;
+ struct HPMHookPoint *HP_sockt_set_nonblocking_post;
+ struct HPMHookPoint *HP_sockt_set_defaultparse_pre;
+ struct HPMHookPoint *HP_sockt_set_defaultparse_post;
+ struct HPMHookPoint *HP_sockt_host2ip_pre;
+ struct HPMHookPoint *HP_sockt_host2ip_post;
+ struct HPMHookPoint *HP_sockt_ip2str_pre;
+ struct HPMHookPoint *HP_sockt_ip2str_post;
+ struct HPMHookPoint *HP_sockt_str2ip_pre;
+ struct HPMHookPoint *HP_sockt_str2ip_post;
+ struct HPMHookPoint *HP_sockt_ntows_pre;
+ struct HPMHookPoint *HP_sockt_ntows_post;
+ struct HPMHookPoint *HP_sockt_getips_pre;
+ struct HPMHookPoint *HP_sockt_getips_post;
+ struct HPMHookPoint *HP_sockt_eof_pre;
+ struct HPMHookPoint *HP_sockt_eof_post;
+ struct HPMHookPoint *HP_sockt_lan_subnet_check_pre;
+ struct HPMHookPoint *HP_sockt_lan_subnet_check_post;
+ struct HPMHookPoint *HP_sockt_allowed_ip_check_pre;
+ struct HPMHookPoint *HP_sockt_allowed_ip_check_post;
+ struct HPMHookPoint *HP_sockt_trusted_ip_check_pre;
+ struct HPMHookPoint *HP_sockt_trusted_ip_check_post;
+ struct HPMHookPoint *HP_sockt_net_config_read_sub_pre;
+ struct HPMHookPoint *HP_sockt_net_config_read_sub_post;
+ struct HPMHookPoint *HP_sockt_net_config_read_pre;
+ struct HPMHookPoint *HP_sockt_net_config_read_post;
+ struct HPMHookPoint *HP_SQL_Connect_pre;
+ struct HPMHookPoint *HP_SQL_Connect_post;
+ struct HPMHookPoint *HP_SQL_GetTimeout_pre;
+ struct HPMHookPoint *HP_SQL_GetTimeout_post;
+ struct HPMHookPoint *HP_SQL_GetColumnNames_pre;
+ struct HPMHookPoint *HP_SQL_GetColumnNames_post;
+ struct HPMHookPoint *HP_SQL_SetEncoding_pre;
+ struct HPMHookPoint *HP_SQL_SetEncoding_post;
+ struct HPMHookPoint *HP_SQL_Ping_pre;
+ struct HPMHookPoint *HP_SQL_Ping_post;
+ struct HPMHookPoint *HP_SQL_EscapeString_pre;
+ struct HPMHookPoint *HP_SQL_EscapeString_post;
+ struct HPMHookPoint *HP_SQL_EscapeStringLen_pre;
+ struct HPMHookPoint *HP_SQL_EscapeStringLen_post;
+ struct HPMHookPoint *HP_SQL_QueryV_pre;
+ struct HPMHookPoint *HP_SQL_QueryV_post;
+ struct HPMHookPoint *HP_SQL_QueryStr_pre;
+ struct HPMHookPoint *HP_SQL_QueryStr_post;
+ struct HPMHookPoint *HP_SQL_LastInsertId_pre;
+ struct HPMHookPoint *HP_SQL_LastInsertId_post;
+ struct HPMHookPoint *HP_SQL_NumColumns_pre;
+ struct HPMHookPoint *HP_SQL_NumColumns_post;
+ struct HPMHookPoint *HP_SQL_NumRows_pre;
+ struct HPMHookPoint *HP_SQL_NumRows_post;
+ struct HPMHookPoint *HP_SQL_NextRow_pre;
+ struct HPMHookPoint *HP_SQL_NextRow_post;
+ struct HPMHookPoint *HP_SQL_GetData_pre;
+ struct HPMHookPoint *HP_SQL_GetData_post;
+ struct HPMHookPoint *HP_SQL_FreeResult_pre;
+ struct HPMHookPoint *HP_SQL_FreeResult_post;
+ struct HPMHookPoint *HP_SQL_ShowDebug__pre;
+ struct HPMHookPoint *HP_SQL_ShowDebug__post;
+ struct HPMHookPoint *HP_SQL_Free_pre;
+ struct HPMHookPoint *HP_SQL_Free_post;
+ struct HPMHookPoint *HP_SQL_Malloc_pre;
+ struct HPMHookPoint *HP_SQL_Malloc_post;
+ struct HPMHookPoint *HP_SQL_StmtMalloc_pre;
+ struct HPMHookPoint *HP_SQL_StmtMalloc_post;
+ struct HPMHookPoint *HP_SQL_StmtPrepareV_pre;
+ struct HPMHookPoint *HP_SQL_StmtPrepareV_post;
+ struct HPMHookPoint *HP_SQL_StmtPrepareStr_pre;
+ struct HPMHookPoint *HP_SQL_StmtPrepareStr_post;
+ struct HPMHookPoint *HP_SQL_StmtNumParams_pre;
+ struct HPMHookPoint *HP_SQL_StmtNumParams_post;
+ struct HPMHookPoint *HP_SQL_StmtBindParam_pre;
+ struct HPMHookPoint *HP_SQL_StmtBindParam_post;
+ struct HPMHookPoint *HP_SQL_StmtExecute_pre;
+ struct HPMHookPoint *HP_SQL_StmtExecute_post;
+ struct HPMHookPoint *HP_SQL_StmtLastInsertId_pre;
+ struct HPMHookPoint *HP_SQL_StmtLastInsertId_post;
+ struct HPMHookPoint *HP_SQL_StmtNumColumns_pre;
+ struct HPMHookPoint *HP_SQL_StmtNumColumns_post;
+ struct HPMHookPoint *HP_SQL_StmtBindColumn_pre;
+ struct HPMHookPoint *HP_SQL_StmtBindColumn_post;
+ struct HPMHookPoint *HP_SQL_StmtNumRows_pre;
+ struct HPMHookPoint *HP_SQL_StmtNumRows_post;
+ struct HPMHookPoint *HP_SQL_StmtNextRow_pre;
+ struct HPMHookPoint *HP_SQL_StmtNextRow_post;
+ struct HPMHookPoint *HP_SQL_StmtFreeResult_pre;
+ struct HPMHookPoint *HP_SQL_StmtFreeResult_post;
+ struct HPMHookPoint *HP_SQL_StmtFree_pre;
+ struct HPMHookPoint *HP_SQL_StmtFree_post;
+ struct HPMHookPoint *HP_SQL_StmtShowDebug__pre;
+ struct HPMHookPoint *HP_SQL_StmtShowDebug__post;
+ struct HPMHookPoint *HP_StrBuf_Malloc_pre;
+ struct HPMHookPoint *HP_StrBuf_Malloc_post;
+ struct HPMHookPoint *HP_StrBuf_Init_pre;
+ struct HPMHookPoint *HP_StrBuf_Init_post;
+ struct HPMHookPoint *HP_StrBuf_Vprintf_pre;
+ struct HPMHookPoint *HP_StrBuf_Vprintf_post;
+ struct HPMHookPoint *HP_StrBuf_Append_pre;
+ struct HPMHookPoint *HP_StrBuf_Append_post;
+ struct HPMHookPoint *HP_StrBuf_AppendStr_pre;
+ struct HPMHookPoint *HP_StrBuf_AppendStr_post;
+ struct HPMHookPoint *HP_StrBuf_Length_pre;
+ struct HPMHookPoint *HP_StrBuf_Length_post;
+ struct HPMHookPoint *HP_StrBuf_Value_pre;
+ struct HPMHookPoint *HP_StrBuf_Value_post;
+ struct HPMHookPoint *HP_StrBuf_Clear_pre;
+ struct HPMHookPoint *HP_StrBuf_Clear_post;
+ struct HPMHookPoint *HP_StrBuf_Destroy_pre;
+ struct HPMHookPoint *HP_StrBuf_Destroy_post;
+ struct HPMHookPoint *HP_StrBuf_Free_pre;
+ struct HPMHookPoint *HP_StrBuf_Free_post;
+ struct HPMHookPoint *HP_strlib_jstrescape_pre;
+ struct HPMHookPoint *HP_strlib_jstrescape_post;
+ struct HPMHookPoint *HP_strlib_jstrescapecpy_pre;
+ struct HPMHookPoint *HP_strlib_jstrescapecpy_post;
+ struct HPMHookPoint *HP_strlib_jmemescapecpy_pre;
+ struct HPMHookPoint *HP_strlib_jmemescapecpy_post;
+ struct HPMHookPoint *HP_strlib_remove_control_chars__pre;
+ struct HPMHookPoint *HP_strlib_remove_control_chars__post;
+ struct HPMHookPoint *HP_strlib_trim__pre;
+ struct HPMHookPoint *HP_strlib_trim__post;
+ struct HPMHookPoint *HP_strlib_normalize_name__pre;
+ struct HPMHookPoint *HP_strlib_normalize_name__post;
+ struct HPMHookPoint *HP_strlib_stristr__pre;
+ struct HPMHookPoint *HP_strlib_stristr__post;
+ struct HPMHookPoint *HP_strlib_strnlen__pre;
+ struct HPMHookPoint *HP_strlib_strnlen__post;
+ struct HPMHookPoint *HP_strlib_strtok_r__pre;
+ struct HPMHookPoint *HP_strlib_strtok_r__post;
+ struct HPMHookPoint *HP_strlib_e_mail_check__pre;
+ struct HPMHookPoint *HP_strlib_e_mail_check__post;
+ struct HPMHookPoint *HP_strlib_config_switch__pre;
+ struct HPMHookPoint *HP_strlib_config_switch__post;
+ struct HPMHookPoint *HP_strlib_safestrncpy__pre;
+ struct HPMHookPoint *HP_strlib_safestrncpy__post;
+ struct HPMHookPoint *HP_strlib_safestrnlen__pre;
+ struct HPMHookPoint *HP_strlib_safestrnlen__post;
+ struct HPMHookPoint *HP_strlib_strline__pre;
+ struct HPMHookPoint *HP_strlib_strline__post;
+ struct HPMHookPoint *HP_strlib_bin2hex__pre;
+ struct HPMHookPoint *HP_strlib_bin2hex__post;
+ struct HPMHookPoint *HP_sv_parse_next_pre;
+ struct HPMHookPoint *HP_sv_parse_next_post;
+ struct HPMHookPoint *HP_sv_parse_pre;
+ struct HPMHookPoint *HP_sv_parse_post;
+ struct HPMHookPoint *HP_sv_split_pre;
+ struct HPMHookPoint *HP_sv_split_post;
+ struct HPMHookPoint *HP_sv_escape_c_pre;
+ struct HPMHookPoint *HP_sv_escape_c_post;
+ struct HPMHookPoint *HP_sv_unescape_c_pre;
+ struct HPMHookPoint *HP_sv_unescape_c_post;
+ struct HPMHookPoint *HP_sv_skip_escaped_c_pre;
+ struct HPMHookPoint *HP_sv_skip_escaped_c_post;
+ struct HPMHookPoint *HP_sv_readdb_pre;
+ struct HPMHookPoint *HP_sv_readdb_post;
+ struct HPMHookPoint *HP_sysinfo_getpagesize_pre;
+ struct HPMHookPoint *HP_sysinfo_getpagesize_post;
+ struct HPMHookPoint *HP_sysinfo_platform_pre;
+ struct HPMHookPoint *HP_sysinfo_platform_post;
+ struct HPMHookPoint *HP_sysinfo_osversion_pre;
+ struct HPMHookPoint *HP_sysinfo_osversion_post;
+ struct HPMHookPoint *HP_sysinfo_cpu_pre;
+ struct HPMHookPoint *HP_sysinfo_cpu_post;
+ struct HPMHookPoint *HP_sysinfo_cpucores_pre;
+ struct HPMHookPoint *HP_sysinfo_cpucores_post;
+ struct HPMHookPoint *HP_sysinfo_arch_pre;
+ struct HPMHookPoint *HP_sysinfo_arch_post;
+ struct HPMHookPoint *HP_sysinfo_is64bit_pre;
+ struct HPMHookPoint *HP_sysinfo_is64bit_post;
+ struct HPMHookPoint *HP_sysinfo_compiler_pre;
+ struct HPMHookPoint *HP_sysinfo_compiler_post;
+ struct HPMHookPoint *HP_sysinfo_cflags_pre;
+ struct HPMHookPoint *HP_sysinfo_cflags_post;
+ struct HPMHookPoint *HP_sysinfo_vcstype_pre;
+ struct HPMHookPoint *HP_sysinfo_vcstype_post;
+ struct HPMHookPoint *HP_sysinfo_vcstypeid_pre;
+ struct HPMHookPoint *HP_sysinfo_vcstypeid_post;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_src_pre;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_src_post;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_pre;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_post;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_pre;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_post;
+ struct HPMHookPoint *HP_sysinfo_is_superuser_pre;
+ struct HPMHookPoint *HP_sysinfo_is_superuser_post;
+ struct HPMHookPoint *HP_sysinfo_init_pre;
+ struct HPMHookPoint *HP_sysinfo_init_post;
+ struct HPMHookPoint *HP_sysinfo_final_pre;
+ struct HPMHookPoint *HP_sysinfo_final_post;
+ struct HPMHookPoint *HP_timer_gettick_pre;
+ struct HPMHookPoint *HP_timer_gettick_post;
+ struct HPMHookPoint *HP_timer_gettick_nocache_pre;
+ struct HPMHookPoint *HP_timer_gettick_nocache_post;
+ struct HPMHookPoint *HP_timer_add_pre;
+ struct HPMHookPoint *HP_timer_add_post;
+ struct HPMHookPoint *HP_timer_add_interval_pre;
+ struct HPMHookPoint *HP_timer_add_interval_post;
+ struct HPMHookPoint *HP_timer_get_pre;
+ struct HPMHookPoint *HP_timer_get_post;
+ struct HPMHookPoint *HP_timer_delete_pre;
+ struct HPMHookPoint *HP_timer_delete_post;
+ struct HPMHookPoint *HP_timer_addtick_pre;
+ struct HPMHookPoint *HP_timer_addtick_post;
+ struct HPMHookPoint *HP_timer_settick_pre;
+ struct HPMHookPoint *HP_timer_settick_post;
+ struct HPMHookPoint *HP_timer_add_func_list_pre;
+ struct HPMHookPoint *HP_timer_add_func_list_post;
+ struct HPMHookPoint *HP_timer_get_uptime_pre;
+ struct HPMHookPoint *HP_timer_get_uptime_post;
+ struct HPMHookPoint *HP_timer_perform_pre;
+ struct HPMHookPoint *HP_timer_perform_post;
+ struct HPMHookPoint *HP_timer_init_pre;
+ struct HPMHookPoint *HP_timer_init_post;
+ struct HPMHookPoint *HP_timer_final_pre;
+ struct HPMHookPoint *HP_timer_final_post;
} list;
struct {
+ int HP_HCache_init_pre;
+ int HP_HCache_init_post;
+ int HP_HCache_check_pre;
+ int HP_HCache_check_post;
+ int HP_HCache_open_pre;
+ int HP_HCache_open_post;
+ int HP_cmdline_init_pre;
+ int HP_cmdline_init_post;
+ int HP_cmdline_final_pre;
+ int HP_cmdline_final_post;
+ int HP_cmdline_arg_add_pre;
+ int HP_cmdline_arg_add_post;
+ int HP_cmdline_exec_pre;
+ int HP_cmdline_exec_post;
+ int HP_cmdline_arg_next_value_pre;
+ int HP_cmdline_arg_next_value_post;
+ int HP_cmdline_arg_source_pre;
+ int HP_cmdline_arg_source_post;
+ int HP_console_init_pre;
+ int HP_console_init_post;
+ int HP_console_final_pre;
+ int HP_console_final_post;
+ int HP_console_display_title_pre;
+ int HP_console_display_title_post;
+ int HP_core_shutdown_callback_pre;
+ int HP_core_shutdown_callback_post;
+ int HP_DB_fix_options_pre;
+ int HP_DB_fix_options_post;
+ int HP_DB_default_cmp_pre;
+ int HP_DB_default_cmp_post;
+ int HP_DB_default_hash_pre;
+ int HP_DB_default_hash_post;
+ int HP_DB_default_release_pre;
+ int HP_DB_default_release_post;
+ int HP_DB_custom_release_pre;
+ int HP_DB_custom_release_post;
+ int HP_DB_alloc_pre;
+ int HP_DB_alloc_post;
+ int HP_DB_i2key_pre;
+ int HP_DB_i2key_post;
+ int HP_DB_ui2key_pre;
+ int HP_DB_ui2key_post;
+ int HP_DB_str2key_pre;
+ int HP_DB_str2key_post;
+ int HP_DB_i642key_pre;
+ int HP_DB_i642key_post;
+ int HP_DB_ui642key_pre;
+ int HP_DB_ui642key_post;
+ int HP_DB_i2data_pre;
+ int HP_DB_i2data_post;
+ int HP_DB_ui2data_pre;
+ int HP_DB_ui2data_post;
+ int HP_DB_ptr2data_pre;
+ int HP_DB_ptr2data_post;
+ int HP_DB_data2i_pre;
+ int HP_DB_data2i_post;
+ int HP_DB_data2ui_pre;
+ int HP_DB_data2ui_post;
+ int HP_DB_data2ptr_pre;
+ int HP_DB_data2ptr_post;
+ int HP_DB_init_pre;
+ int HP_DB_init_post;
+ int HP_DB_final_pre;
+ int HP_DB_final_post;
+ int HP_libconfig_read_pre;
+ int HP_libconfig_read_post;
+ int HP_libconfig_write_pre;
+ int HP_libconfig_write_post;
+ int HP_libconfig_set_auto_convert_pre;
+ int HP_libconfig_set_auto_convert_post;
+ int HP_libconfig_get_auto_convert_pre;
+ int HP_libconfig_get_auto_convert_post;
+ int HP_libconfig_read_string_pre;
+ int HP_libconfig_read_string_post;
+ int HP_libconfig_read_file_src_pre;
+ int HP_libconfig_read_file_src_post;
+ int HP_libconfig_write_file_pre;
+ int HP_libconfig_write_file_post;
+ int HP_libconfig_set_destructor_pre;
+ int HP_libconfig_set_destructor_post;
+ int HP_libconfig_set_include_dir_pre;
+ int HP_libconfig_set_include_dir_post;
+ int HP_libconfig_init_pre;
+ int HP_libconfig_init_post;
+ int HP_libconfig_destroy_pre;
+ int HP_libconfig_destroy_post;
+ int HP_libconfig_setting_get_int_pre;
+ int HP_libconfig_setting_get_int_post;
+ int HP_libconfig_setting_get_int64_pre;
+ int HP_libconfig_setting_get_int64_post;
+ int HP_libconfig_setting_get_float_pre;
+ int HP_libconfig_setting_get_float_post;
+ int HP_libconfig_setting_get_bool_pre;
+ int HP_libconfig_setting_get_bool_post;
+ int HP_libconfig_setting_get_string_pre;
+ int HP_libconfig_setting_get_string_post;
+ int HP_libconfig_setting_lookup_int_pre;
+ int HP_libconfig_setting_lookup_int_post;
+ int HP_libconfig_setting_lookup_int64_pre;
+ int HP_libconfig_setting_lookup_int64_post;
+ int HP_libconfig_setting_lookup_float_pre;
+ int HP_libconfig_setting_lookup_float_post;
+ int HP_libconfig_setting_lookup_bool_pre;
+ int HP_libconfig_setting_lookup_bool_post;
+ int HP_libconfig_setting_lookup_string_pre;
+ int HP_libconfig_setting_lookup_string_post;
+ int HP_libconfig_setting_set_int_pre;
+ int HP_libconfig_setting_set_int_post;
+ int HP_libconfig_setting_set_int64_pre;
+ int HP_libconfig_setting_set_int64_post;
+ int HP_libconfig_setting_set_float_pre;
+ int HP_libconfig_setting_set_float_post;
+ int HP_libconfig_setting_set_bool_pre;
+ int HP_libconfig_setting_set_bool_post;
+ int HP_libconfig_setting_set_string_pre;
+ int HP_libconfig_setting_set_string_post;
+ int HP_libconfig_setting_set_format_pre;
+ int HP_libconfig_setting_set_format_post;
+ int HP_libconfig_setting_get_format_pre;
+ int HP_libconfig_setting_get_format_post;
+ int HP_libconfig_setting_get_int_elem_pre;
+ int HP_libconfig_setting_get_int_elem_post;
+ int HP_libconfig_setting_get_int64_elem_pre;
+ int HP_libconfig_setting_get_int64_elem_post;
+ int HP_libconfig_setting_get_float_elem_pre;
+ int HP_libconfig_setting_get_float_elem_post;
+ int HP_libconfig_setting_get_bool_elem_pre;
+ int HP_libconfig_setting_get_bool_elem_post;
+ int HP_libconfig_setting_get_string_elem_pre;
+ int HP_libconfig_setting_get_string_elem_post;
+ int HP_libconfig_setting_set_int_elem_pre;
+ int HP_libconfig_setting_set_int_elem_post;
+ int HP_libconfig_setting_set_int64_elem_pre;
+ int HP_libconfig_setting_set_int64_elem_post;
+ int HP_libconfig_setting_set_float_elem_pre;
+ int HP_libconfig_setting_set_float_elem_post;
+ int HP_libconfig_setting_set_bool_elem_pre;
+ int HP_libconfig_setting_set_bool_elem_post;
+ int HP_libconfig_setting_set_string_elem_pre;
+ int HP_libconfig_setting_set_string_elem_post;
+ int HP_libconfig_setting_index_pre;
+ int HP_libconfig_setting_index_post;
+ int HP_libconfig_setting_length_pre;
+ int HP_libconfig_setting_length_post;
+ int HP_libconfig_setting_get_elem_pre;
+ int HP_libconfig_setting_get_elem_post;
+ int HP_libconfig_setting_get_member_pre;
+ int HP_libconfig_setting_get_member_post;
+ int HP_libconfig_setting_add_pre;
+ int HP_libconfig_setting_add_post;
+ int HP_libconfig_setting_remove_pre;
+ int HP_libconfig_setting_remove_post;
+ int HP_libconfig_setting_remove_elem_pre;
+ int HP_libconfig_setting_remove_elem_post;
+ int HP_libconfig_setting_set_hook_pre;
+ int HP_libconfig_setting_set_hook_post;
+ int HP_libconfig_lookup_pre;
+ int HP_libconfig_lookup_post;
+ int HP_libconfig_lookup_from_pre;
+ int HP_libconfig_lookup_from_post;
+ int HP_libconfig_lookup_int_pre;
+ int HP_libconfig_lookup_int_post;
+ int HP_libconfig_lookup_int64_pre;
+ int HP_libconfig_lookup_int64_post;
+ int HP_libconfig_lookup_float_pre;
+ int HP_libconfig_lookup_float_post;
+ int HP_libconfig_lookup_bool_pre;
+ int HP_libconfig_lookup_bool_post;
+ int HP_libconfig_lookup_string_pre;
+ int HP_libconfig_lookup_string_post;
+ int HP_libconfig_read_file_pre;
+ int HP_libconfig_read_file_post;
+ int HP_libconfig_setting_copy_simple_pre;
+ int HP_libconfig_setting_copy_simple_post;
+ int HP_libconfig_setting_copy_elem_pre;
+ int HP_libconfig_setting_copy_elem_post;
+ int HP_libconfig_setting_copy_aggregate_pre;
+ int HP_libconfig_setting_copy_aggregate_post;
+ int HP_libconfig_setting_copy_pre;
+ int HP_libconfig_setting_copy_post;
int HP_login_mmo_auth_pre;
int HP_login_mmo_auth_post;
int HP_login_mmo_auth_new_pre;
@@ -142,10 +780,8 @@ struct {
int HP_login_check_encrypted_post;
int HP_login_check_password_pre;
int HP_login_check_password_post;
- int HP_login_lan_subnetcheck_pre;
- int HP_login_lan_subnetcheck_post;
- int HP_login_lan_config_read_pre;
- int HP_login_lan_config_read_post;
+ int HP_login_lan_subnet_check_pre;
+ int HP_login_lan_subnet_check_post;
int HP_login_fromchar_accinfo_pre;
int HP_login_fromchar_accinfo_post;
int HP_login_fromchar_account_pre;
@@ -228,8 +864,304 @@ struct {
int HP_login_parse_request_connection_post;
int HP_login_parse_login_pre;
int HP_login_parse_login_post;
+ int HP_iMalloc_init_pre;
+ int HP_iMalloc_init_post;
+ int HP_iMalloc_final_pre;
+ int HP_iMalloc_final_post;
+ int HP_iMalloc_malloc_pre;
+ int HP_iMalloc_malloc_post;
+ int HP_iMalloc_calloc_pre;
+ int HP_iMalloc_calloc_post;
+ int HP_iMalloc_realloc_pre;
+ int HP_iMalloc_realloc_post;
+ int HP_iMalloc_reallocz_pre;
+ int HP_iMalloc_reallocz_post;
+ int HP_iMalloc_astrdup_pre;
+ int HP_iMalloc_astrdup_post;
+ int HP_iMalloc_free_pre;
+ int HP_iMalloc_free_post;
+ int HP_iMalloc_memory_check_pre;
+ int HP_iMalloc_memory_check_post;
+ int HP_iMalloc_verify_ptr_pre;
+ int HP_iMalloc_verify_ptr_post;
+ int HP_iMalloc_usage_pre;
+ int HP_iMalloc_usage_post;
+ int HP_iMalloc_post_shutdown_pre;
+ int HP_iMalloc_post_shutdown_post;
+ int HP_iMalloc_init_messages_pre;
+ int HP_iMalloc_init_messages_post;
+ int HP_nullpo_assert_report_pre;
+ int HP_nullpo_assert_report_post;
+ int HP_showmsg_init_pre;
+ int HP_showmsg_init_post;
+ int HP_showmsg_final_pre;
+ int HP_showmsg_final_post;
+ int HP_showmsg_clearScreen_pre;
+ int HP_showmsg_clearScreen_post;
+ int HP_showmsg_showMessageV_pre;
+ int HP_showmsg_showMessageV_post;
+ int HP_sockt_init_pre;
+ int HP_sockt_init_post;
+ int HP_sockt_final_pre;
+ int HP_sockt_final_post;
+ int HP_sockt_perform_pre;
+ int HP_sockt_perform_post;
+ int HP_sockt_datasync_pre;
+ int HP_sockt_datasync_post;
+ int HP_sockt_make_listen_bind_pre;
+ int HP_sockt_make_listen_bind_post;
+ int HP_sockt_make_connection_pre;
+ int HP_sockt_make_connection_post;
+ int HP_sockt_realloc_fifo_pre;
+ int HP_sockt_realloc_fifo_post;
+ int HP_sockt_realloc_writefifo_pre;
+ int HP_sockt_realloc_writefifo_post;
+ int HP_sockt_wfifoset_pre;
+ int HP_sockt_wfifoset_post;
+ int HP_sockt_rfifoskip_pre;
+ int HP_sockt_rfifoskip_post;
+ int HP_sockt_close_pre;
+ int HP_sockt_close_post;
+ int HP_sockt_session_is_valid_pre;
+ int HP_sockt_session_is_valid_post;
+ int HP_sockt_session_is_active_pre;
+ int HP_sockt_session_is_active_post;
+ int HP_sockt_flush_pre;
+ int HP_sockt_flush_post;
+ int HP_sockt_flush_fifos_pre;
+ int HP_sockt_flush_fifos_post;
+ int HP_sockt_set_nonblocking_pre;
+ int HP_sockt_set_nonblocking_post;
+ int HP_sockt_set_defaultparse_pre;
+ int HP_sockt_set_defaultparse_post;
+ int HP_sockt_host2ip_pre;
+ int HP_sockt_host2ip_post;
+ int HP_sockt_ip2str_pre;
+ int HP_sockt_ip2str_post;
+ int HP_sockt_str2ip_pre;
+ int HP_sockt_str2ip_post;
+ int HP_sockt_ntows_pre;
+ int HP_sockt_ntows_post;
+ int HP_sockt_getips_pre;
+ int HP_sockt_getips_post;
+ int HP_sockt_eof_pre;
+ int HP_sockt_eof_post;
+ int HP_sockt_lan_subnet_check_pre;
+ int HP_sockt_lan_subnet_check_post;
+ int HP_sockt_allowed_ip_check_pre;
+ int HP_sockt_allowed_ip_check_post;
+ int HP_sockt_trusted_ip_check_pre;
+ int HP_sockt_trusted_ip_check_post;
+ int HP_sockt_net_config_read_sub_pre;
+ int HP_sockt_net_config_read_sub_post;
+ int HP_sockt_net_config_read_pre;
+ int HP_sockt_net_config_read_post;
+ int HP_SQL_Connect_pre;
+ int HP_SQL_Connect_post;
+ int HP_SQL_GetTimeout_pre;
+ int HP_SQL_GetTimeout_post;
+ int HP_SQL_GetColumnNames_pre;
+ int HP_SQL_GetColumnNames_post;
+ int HP_SQL_SetEncoding_pre;
+ int HP_SQL_SetEncoding_post;
+ int HP_SQL_Ping_pre;
+ int HP_SQL_Ping_post;
+ int HP_SQL_EscapeString_pre;
+ int HP_SQL_EscapeString_post;
+ int HP_SQL_EscapeStringLen_pre;
+ int HP_SQL_EscapeStringLen_post;
+ int HP_SQL_QueryV_pre;
+ int HP_SQL_QueryV_post;
+ int HP_SQL_QueryStr_pre;
+ int HP_SQL_QueryStr_post;
+ int HP_SQL_LastInsertId_pre;
+ int HP_SQL_LastInsertId_post;
+ int HP_SQL_NumColumns_pre;
+ int HP_SQL_NumColumns_post;
+ int HP_SQL_NumRows_pre;
+ int HP_SQL_NumRows_post;
+ int HP_SQL_NextRow_pre;
+ int HP_SQL_NextRow_post;
+ int HP_SQL_GetData_pre;
+ int HP_SQL_GetData_post;
+ int HP_SQL_FreeResult_pre;
+ int HP_SQL_FreeResult_post;
+ int HP_SQL_ShowDebug__pre;
+ int HP_SQL_ShowDebug__post;
+ int HP_SQL_Free_pre;
+ int HP_SQL_Free_post;
+ int HP_SQL_Malloc_pre;
+ int HP_SQL_Malloc_post;
+ int HP_SQL_StmtMalloc_pre;
+ int HP_SQL_StmtMalloc_post;
+ int HP_SQL_StmtPrepareV_pre;
+ int HP_SQL_StmtPrepareV_post;
+ int HP_SQL_StmtPrepareStr_pre;
+ int HP_SQL_StmtPrepareStr_post;
+ int HP_SQL_StmtNumParams_pre;
+ int HP_SQL_StmtNumParams_post;
+ int HP_SQL_StmtBindParam_pre;
+ int HP_SQL_StmtBindParam_post;
+ int HP_SQL_StmtExecute_pre;
+ int HP_SQL_StmtExecute_post;
+ int HP_SQL_StmtLastInsertId_pre;
+ int HP_SQL_StmtLastInsertId_post;
+ int HP_SQL_StmtNumColumns_pre;
+ int HP_SQL_StmtNumColumns_post;
+ int HP_SQL_StmtBindColumn_pre;
+ int HP_SQL_StmtBindColumn_post;
+ int HP_SQL_StmtNumRows_pre;
+ int HP_SQL_StmtNumRows_post;
+ int HP_SQL_StmtNextRow_pre;
+ int HP_SQL_StmtNextRow_post;
+ int HP_SQL_StmtFreeResult_pre;
+ int HP_SQL_StmtFreeResult_post;
+ int HP_SQL_StmtFree_pre;
+ int HP_SQL_StmtFree_post;
+ int HP_SQL_StmtShowDebug__pre;
+ int HP_SQL_StmtShowDebug__post;
+ int HP_StrBuf_Malloc_pre;
+ int HP_StrBuf_Malloc_post;
+ int HP_StrBuf_Init_pre;
+ int HP_StrBuf_Init_post;
+ int HP_StrBuf_Vprintf_pre;
+ int HP_StrBuf_Vprintf_post;
+ int HP_StrBuf_Append_pre;
+ int HP_StrBuf_Append_post;
+ int HP_StrBuf_AppendStr_pre;
+ int HP_StrBuf_AppendStr_post;
+ int HP_StrBuf_Length_pre;
+ int HP_StrBuf_Length_post;
+ int HP_StrBuf_Value_pre;
+ int HP_StrBuf_Value_post;
+ int HP_StrBuf_Clear_pre;
+ int HP_StrBuf_Clear_post;
+ int HP_StrBuf_Destroy_pre;
+ int HP_StrBuf_Destroy_post;
+ int HP_StrBuf_Free_pre;
+ int HP_StrBuf_Free_post;
+ int HP_strlib_jstrescape_pre;
+ int HP_strlib_jstrescape_post;
+ int HP_strlib_jstrescapecpy_pre;
+ int HP_strlib_jstrescapecpy_post;
+ int HP_strlib_jmemescapecpy_pre;
+ int HP_strlib_jmemescapecpy_post;
+ int HP_strlib_remove_control_chars__pre;
+ int HP_strlib_remove_control_chars__post;
+ int HP_strlib_trim__pre;
+ int HP_strlib_trim__post;
+ int HP_strlib_normalize_name__pre;
+ int HP_strlib_normalize_name__post;
+ int HP_strlib_stristr__pre;
+ int HP_strlib_stristr__post;
+ int HP_strlib_strnlen__pre;
+ int HP_strlib_strnlen__post;
+ int HP_strlib_strtok_r__pre;
+ int HP_strlib_strtok_r__post;
+ int HP_strlib_e_mail_check__pre;
+ int HP_strlib_e_mail_check__post;
+ int HP_strlib_config_switch__pre;
+ int HP_strlib_config_switch__post;
+ int HP_strlib_safestrncpy__pre;
+ int HP_strlib_safestrncpy__post;
+ int HP_strlib_safestrnlen__pre;
+ int HP_strlib_safestrnlen__post;
+ int HP_strlib_strline__pre;
+ int HP_strlib_strline__post;
+ int HP_strlib_bin2hex__pre;
+ int HP_strlib_bin2hex__post;
+ int HP_sv_parse_next_pre;
+ int HP_sv_parse_next_post;
+ int HP_sv_parse_pre;
+ int HP_sv_parse_post;
+ int HP_sv_split_pre;
+ int HP_sv_split_post;
+ int HP_sv_escape_c_pre;
+ int HP_sv_escape_c_post;
+ int HP_sv_unescape_c_pre;
+ int HP_sv_unescape_c_post;
+ int HP_sv_skip_escaped_c_pre;
+ int HP_sv_skip_escaped_c_post;
+ int HP_sv_readdb_pre;
+ int HP_sv_readdb_post;
+ int HP_sysinfo_getpagesize_pre;
+ int HP_sysinfo_getpagesize_post;
+ int HP_sysinfo_platform_pre;
+ int HP_sysinfo_platform_post;
+ int HP_sysinfo_osversion_pre;
+ int HP_sysinfo_osversion_post;
+ int HP_sysinfo_cpu_pre;
+ int HP_sysinfo_cpu_post;
+ int HP_sysinfo_cpucores_pre;
+ int HP_sysinfo_cpucores_post;
+ int HP_sysinfo_arch_pre;
+ int HP_sysinfo_arch_post;
+ int HP_sysinfo_is64bit_pre;
+ int HP_sysinfo_is64bit_post;
+ int HP_sysinfo_compiler_pre;
+ int HP_sysinfo_compiler_post;
+ int HP_sysinfo_cflags_pre;
+ int HP_sysinfo_cflags_post;
+ int HP_sysinfo_vcstype_pre;
+ int HP_sysinfo_vcstype_post;
+ int HP_sysinfo_vcstypeid_pre;
+ int HP_sysinfo_vcstypeid_post;
+ int HP_sysinfo_vcsrevision_src_pre;
+ int HP_sysinfo_vcsrevision_src_post;
+ int HP_sysinfo_vcsrevision_scripts_pre;
+ int HP_sysinfo_vcsrevision_scripts_post;
+ int HP_sysinfo_vcsrevision_reload_pre;
+ int HP_sysinfo_vcsrevision_reload_post;
+ int HP_sysinfo_is_superuser_pre;
+ int HP_sysinfo_is_superuser_post;
+ int HP_sysinfo_init_pre;
+ int HP_sysinfo_init_post;
+ int HP_sysinfo_final_pre;
+ int HP_sysinfo_final_post;
+ int HP_timer_gettick_pre;
+ int HP_timer_gettick_post;
+ int HP_timer_gettick_nocache_pre;
+ int HP_timer_gettick_nocache_post;
+ int HP_timer_add_pre;
+ int HP_timer_add_post;
+ int HP_timer_add_interval_pre;
+ int HP_timer_add_interval_post;
+ int HP_timer_get_pre;
+ int HP_timer_get_post;
+ int HP_timer_delete_pre;
+ int HP_timer_delete_post;
+ int HP_timer_addtick_pre;
+ int HP_timer_addtick_post;
+ int HP_timer_settick_pre;
+ int HP_timer_settick_post;
+ int HP_timer_add_func_list_pre;
+ int HP_timer_add_func_list_post;
+ int HP_timer_get_uptime_pre;
+ int HP_timer_get_uptime_post;
+ int HP_timer_perform_pre;
+ int HP_timer_perform_post;
+ int HP_timer_init_pre;
+ int HP_timer_init_post;
+ int HP_timer_final_pre;
+ int HP_timer_final_post;
} count;
struct {
+ struct HCache_interface HCache;
+ struct cmdline_interface cmdline;
+ struct console_interface console;
+ struct core_interface core;
+ struct db_interface DB;
+ struct libconfig_interface libconfig;
struct login_interface login;
+ struct malloc_interface iMalloc;
+ struct nullpo_interface nullpo;
+ struct showmsg_interface showmsg;
+ struct socket_interface sockt;
+ struct sql_interface SQL;
+ struct stringbuf_interface StrBuf;
+ struct strlib_interface strlib;
+ struct sv_interface sv;
+ struct sysinfo_interface sysinfo;
+ struct timer_interface timer;
} source;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index a4a9db119..cdcdedcb5 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -5,6 +5,102 @@
// as it will get overwritten.
struct HookingPointData HookingPoints[] = {
+/* HCache */
+ { HP_POP(HCache->init, HP_HCache_init) },
+ { HP_POP(HCache->check, HP_HCache_check) },
+ { HP_POP(HCache->open, HP_HCache_open) },
+/* cmdline */
+ { HP_POP(cmdline->init, HP_cmdline_init) },
+ { HP_POP(cmdline->final, HP_cmdline_final) },
+ { HP_POP(cmdline->arg_add, HP_cmdline_arg_add) },
+ { HP_POP(cmdline->exec, HP_cmdline_exec) },
+ { HP_POP(cmdline->arg_next_value, HP_cmdline_arg_next_value) },
+ { HP_POP(cmdline->arg_source, HP_cmdline_arg_source) },
+/* console */
+ { HP_POP(console->init, HP_console_init) },
+ { HP_POP(console->final, HP_console_final) },
+ { HP_POP(console->display_title, HP_console_display_title) },
+/* core */
+ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) },
+/* DB */
+ { HP_POP(DB->fix_options, HP_DB_fix_options) },
+ { HP_POP(DB->default_cmp, HP_DB_default_cmp) },
+ { HP_POP(DB->default_hash, HP_DB_default_hash) },
+ { HP_POP(DB->default_release, HP_DB_default_release) },
+ { HP_POP(DB->custom_release, HP_DB_custom_release) },
+ { HP_POP(DB->alloc, HP_DB_alloc) },
+ { HP_POP(DB->i2key, HP_DB_i2key) },
+ { HP_POP(DB->ui2key, HP_DB_ui2key) },
+ { HP_POP(DB->str2key, HP_DB_str2key) },
+ { HP_POP(DB->i642key, HP_DB_i642key) },
+ { HP_POP(DB->ui642key, HP_DB_ui642key) },
+ { HP_POP(DB->i2data, HP_DB_i2data) },
+ { HP_POP(DB->ui2data, HP_DB_ui2data) },
+ { HP_POP(DB->ptr2data, HP_DB_ptr2data) },
+ { HP_POP(DB->data2i, HP_DB_data2i) },
+ { HP_POP(DB->data2ui, HP_DB_data2ui) },
+ { HP_POP(DB->data2ptr, HP_DB_data2ptr) },
+ { HP_POP(DB->init, HP_DB_init) },
+ { HP_POP(DB->final, HP_DB_final) },
+/* libconfig */
+ { HP_POP(libconfig->read, HP_libconfig_read) },
+ { HP_POP(libconfig->write, HP_libconfig_write) },
+ { HP_POP(libconfig->set_auto_convert, HP_libconfig_set_auto_convert) },
+ { HP_POP(libconfig->get_auto_convert, HP_libconfig_get_auto_convert) },
+ { HP_POP(libconfig->read_string, HP_libconfig_read_string) },
+ { HP_POP(libconfig->read_file_src, HP_libconfig_read_file_src) },
+ { HP_POP(libconfig->write_file, HP_libconfig_write_file) },
+ { HP_POP(libconfig->set_destructor, HP_libconfig_set_destructor) },
+ { HP_POP(libconfig->set_include_dir, HP_libconfig_set_include_dir) },
+ { HP_POP(libconfig->init, HP_libconfig_init) },
+ { HP_POP(libconfig->destroy, HP_libconfig_destroy) },
+ { HP_POP(libconfig->setting_get_int, HP_libconfig_setting_get_int) },
+ { HP_POP(libconfig->setting_get_int64, HP_libconfig_setting_get_int64) },
+ { HP_POP(libconfig->setting_get_float, HP_libconfig_setting_get_float) },
+ { HP_POP(libconfig->setting_get_bool, HP_libconfig_setting_get_bool) },
+ { HP_POP(libconfig->setting_get_string, HP_libconfig_setting_get_string) },
+ { HP_POP(libconfig->setting_lookup_int, HP_libconfig_setting_lookup_int) },
+ { HP_POP(libconfig->setting_lookup_int64, HP_libconfig_setting_lookup_int64) },
+ { HP_POP(libconfig->setting_lookup_float, HP_libconfig_setting_lookup_float) },
+ { HP_POP(libconfig->setting_lookup_bool, HP_libconfig_setting_lookup_bool) },
+ { HP_POP(libconfig->setting_lookup_string, HP_libconfig_setting_lookup_string) },
+ { HP_POP(libconfig->setting_set_int, HP_libconfig_setting_set_int) },
+ { HP_POP(libconfig->setting_set_int64, HP_libconfig_setting_set_int64) },
+ { HP_POP(libconfig->setting_set_float, HP_libconfig_setting_set_float) },
+ { HP_POP(libconfig->setting_set_bool, HP_libconfig_setting_set_bool) },
+ { HP_POP(libconfig->setting_set_string, HP_libconfig_setting_set_string) },
+ { HP_POP(libconfig->setting_set_format, HP_libconfig_setting_set_format) },
+ { HP_POP(libconfig->setting_get_format, HP_libconfig_setting_get_format) },
+ { HP_POP(libconfig->setting_get_int_elem, HP_libconfig_setting_get_int_elem) },
+ { HP_POP(libconfig->setting_get_int64_elem, HP_libconfig_setting_get_int64_elem) },
+ { HP_POP(libconfig->setting_get_float_elem, HP_libconfig_setting_get_float_elem) },
+ { HP_POP(libconfig->setting_get_bool_elem, HP_libconfig_setting_get_bool_elem) },
+ { HP_POP(libconfig->setting_get_string_elem, HP_libconfig_setting_get_string_elem) },
+ { HP_POP(libconfig->setting_set_int_elem, HP_libconfig_setting_set_int_elem) },
+ { HP_POP(libconfig->setting_set_int64_elem, HP_libconfig_setting_set_int64_elem) },
+ { HP_POP(libconfig->setting_set_float_elem, HP_libconfig_setting_set_float_elem) },
+ { HP_POP(libconfig->setting_set_bool_elem, HP_libconfig_setting_set_bool_elem) },
+ { HP_POP(libconfig->setting_set_string_elem, HP_libconfig_setting_set_string_elem) },
+ { HP_POP(libconfig->setting_index, HP_libconfig_setting_index) },
+ { HP_POP(libconfig->setting_length, HP_libconfig_setting_length) },
+ { HP_POP(libconfig->setting_get_elem, HP_libconfig_setting_get_elem) },
+ { HP_POP(libconfig->setting_get_member, HP_libconfig_setting_get_member) },
+ { HP_POP(libconfig->setting_add, HP_libconfig_setting_add) },
+ { HP_POP(libconfig->setting_remove, HP_libconfig_setting_remove) },
+ { HP_POP(libconfig->setting_remove_elem, HP_libconfig_setting_remove_elem) },
+ { HP_POP(libconfig->setting_set_hook, HP_libconfig_setting_set_hook) },
+ { HP_POP(libconfig->lookup, HP_libconfig_lookup) },
+ { HP_POP(libconfig->lookup_from, HP_libconfig_lookup_from) },
+ { HP_POP(libconfig->lookup_int, HP_libconfig_lookup_int) },
+ { HP_POP(libconfig->lookup_int64, HP_libconfig_lookup_int64) },
+ { HP_POP(libconfig->lookup_float, HP_libconfig_lookup_float) },
+ { HP_POP(libconfig->lookup_bool, HP_libconfig_lookup_bool) },
+ { HP_POP(libconfig->lookup_string, HP_libconfig_lookup_string) },
+ { HP_POP(libconfig->read_file, HP_libconfig_read_file) },
+ { HP_POP(libconfig->setting_copy_simple, HP_libconfig_setting_copy_simple) },
+ { HP_POP(libconfig->setting_copy_elem, HP_libconfig_setting_copy_elem) },
+ { HP_POP(libconfig->setting_copy_aggregate, HP_libconfig_setting_copy_aggregate) },
+ { HP_POP(libconfig->setting_copy, HP_libconfig_setting_copy) },
/* login */
{ HP_POP(login->mmo_auth, HP_login_mmo_auth) },
{ HP_POP(login->mmo_auth_new, HP_login_mmo_auth_new) },
@@ -18,8 +114,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(login->sync_ip_addresses, HP_login_sync_ip_addresses) },
{ HP_POP(login->check_encrypted, HP_login_check_encrypted) },
{ HP_POP(login->check_password, HP_login_check_password) },
- { HP_POP(login->lan_subnetcheck, HP_login_lan_subnetcheck) },
- { HP_POP(login->lan_config_read, HP_login_lan_config_read) },
+ { HP_POP(login->lan_subnet_check, HP_login_lan_subnet_check) },
{ HP_POP(login->fromchar_accinfo, HP_login_fromchar_accinfo) },
{ HP_POP(login->fromchar_account, HP_login_fromchar_account) },
{ HP_POP(login->fromchar_account_update_other, HP_login_fromchar_account_update_other) },
@@ -61,6 +156,156 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(login->char_server_connection_status, HP_login_char_server_connection_status) },
{ HP_POP(login->parse_request_connection, HP_login_parse_request_connection) },
{ HP_POP(login->parse_login, HP_login_parse_login) },
+/* iMalloc */
+ { HP_POP(iMalloc->init, HP_iMalloc_init) },
+ { HP_POP(iMalloc->final, HP_iMalloc_final) },
+ { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) },
+ { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) },
+ { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) },
+ { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) },
+ { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) },
+ { HP_POP(iMalloc->free, HP_iMalloc_free) },
+ { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) },
+ { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) },
+ { HP_POP(iMalloc->usage, HP_iMalloc_usage) },
+ { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) },
+ { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) },
+/* nullpo */
+ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) },
+/* showmsg */
+ { HP_POP(showmsg->init, HP_showmsg_init) },
+ { HP_POP(showmsg->final, HP_showmsg_final) },
+ { HP_POP(showmsg->clearScreen, HP_showmsg_clearScreen) },
+ { HP_POP(showmsg->showMessageV, HP_showmsg_showMessageV) },
+/* sockt */
+ { HP_POP(sockt->init, HP_sockt_init) },
+ { HP_POP(sockt->final, HP_sockt_final) },
+ { HP_POP(sockt->perform, HP_sockt_perform) },
+ { HP_POP(sockt->datasync, HP_sockt_datasync) },
+ { HP_POP(sockt->make_listen_bind, HP_sockt_make_listen_bind) },
+ { HP_POP(sockt->make_connection, HP_sockt_make_connection) },
+ { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) },
+ { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) },
+ { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) },
+ { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) },
+ { HP_POP(sockt->close, HP_sockt_close) },
+ { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) },
+ { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) },
+ { HP_POP(sockt->flush, HP_sockt_flush) },
+ { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) },
+ { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) },
+ { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) },
+ { HP_POP(sockt->host2ip, HP_sockt_host2ip) },
+ { HP_POP(sockt->ip2str, HP_sockt_ip2str) },
+ { HP_POP(sockt->str2ip, HP_sockt_str2ip) },
+ { HP_POP(sockt->ntows, HP_sockt_ntows) },
+ { HP_POP(sockt->getips, HP_sockt_getips) },
+ { HP_POP(sockt->eof, HP_sockt_eof) },
+ { HP_POP(sockt->lan_subnet_check, HP_sockt_lan_subnet_check) },
+ { HP_POP(sockt->allowed_ip_check, HP_sockt_allowed_ip_check) },
+ { HP_POP(sockt->trusted_ip_check, HP_sockt_trusted_ip_check) },
+ { HP_POP(sockt->net_config_read_sub, HP_sockt_net_config_read_sub) },
+ { HP_POP(sockt->net_config_read, HP_sockt_net_config_read) },
+/* SQL */
+ { HP_POP(SQL->Connect, HP_SQL_Connect) },
+ { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) },
+ { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) },
+ { HP_POP(SQL->SetEncoding, HP_SQL_SetEncoding) },
+ { HP_POP(SQL->Ping, HP_SQL_Ping) },
+ { HP_POP(SQL->EscapeString, HP_SQL_EscapeString) },
+ { HP_POP(SQL->EscapeStringLen, HP_SQL_EscapeStringLen) },
+ { HP_POP(SQL->QueryV, HP_SQL_QueryV) },
+ { HP_POP(SQL->QueryStr, HP_SQL_QueryStr) },
+ { HP_POP(SQL->LastInsertId, HP_SQL_LastInsertId) },
+ { HP_POP(SQL->NumColumns, HP_SQL_NumColumns) },
+ { HP_POP(SQL->NumRows, HP_SQL_NumRows) },
+ { HP_POP(SQL->NextRow, HP_SQL_NextRow) },
+ { HP_POP(SQL->GetData, HP_SQL_GetData) },
+ { HP_POP(SQL->FreeResult, HP_SQL_FreeResult) },
+ { HP_POP(SQL->ShowDebug_, HP_SQL_ShowDebug_) },
+ { HP_POP(SQL->Free, HP_SQL_Free) },
+ { HP_POP(SQL->Malloc, HP_SQL_Malloc) },
+ { HP_POP(SQL->StmtMalloc, HP_SQL_StmtMalloc) },
+ { HP_POP(SQL->StmtPrepareV, HP_SQL_StmtPrepareV) },
+ { HP_POP(SQL->StmtPrepareStr, HP_SQL_StmtPrepareStr) },
+ { HP_POP(SQL->StmtNumParams, HP_SQL_StmtNumParams) },
+ { HP_POP(SQL->StmtBindParam, HP_SQL_StmtBindParam) },
+ { HP_POP(SQL->StmtExecute, HP_SQL_StmtExecute) },
+ { HP_POP(SQL->StmtLastInsertId, HP_SQL_StmtLastInsertId) },
+ { HP_POP(SQL->StmtNumColumns, HP_SQL_StmtNumColumns) },
+ { HP_POP(SQL->StmtBindColumn, HP_SQL_StmtBindColumn) },
+ { HP_POP(SQL->StmtNumRows, HP_SQL_StmtNumRows) },
+ { HP_POP(SQL->StmtNextRow, HP_SQL_StmtNextRow) },
+ { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) },
+ { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) },
+ { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) },
+/* StrBuf */
+ { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) },
+ { HP_POP(StrBuf->Init, HP_StrBuf_Init) },
+ { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) },
+ { HP_POP(StrBuf->Append, HP_StrBuf_Append) },
+ { HP_POP(StrBuf->AppendStr, HP_StrBuf_AppendStr) },
+ { HP_POP(StrBuf->Length, HP_StrBuf_Length) },
+ { HP_POP(StrBuf->Value, HP_StrBuf_Value) },
+ { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) },
+ { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) },
+ { HP_POP(StrBuf->Free, HP_StrBuf_Free) },
+/* strlib */
+ { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) },
+ { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) },
+ { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) },
+ { HP_POP(strlib->remove_control_chars_, HP_strlib_remove_control_chars_) },
+ { HP_POP(strlib->trim_, HP_strlib_trim_) },
+ { HP_POP(strlib->normalize_name_, HP_strlib_normalize_name_) },
+ { HP_POP(strlib->stristr_, HP_strlib_stristr_) },
+ { HP_POP(strlib->strnlen_, HP_strlib_strnlen_) },
+ { HP_POP(strlib->strtok_r_, HP_strlib_strtok_r_) },
+ { HP_POP(strlib->e_mail_check_, HP_strlib_e_mail_check_) },
+ { HP_POP(strlib->config_switch_, HP_strlib_config_switch_) },
+ { HP_POP(strlib->safestrncpy_, HP_strlib_safestrncpy_) },
+ { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) },
+ { HP_POP(strlib->strline_, HP_strlib_strline_) },
+ { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) },
+/* sv */
+ { HP_POP(sv->parse_next, HP_sv_parse_next) },
+ { HP_POP(sv->parse, HP_sv_parse) },
+ { HP_POP(sv->split, HP_sv_split) },
+ { HP_POP(sv->escape_c, HP_sv_escape_c) },
+ { HP_POP(sv->unescape_c, HP_sv_unescape_c) },
+ { HP_POP(sv->skip_escaped_c, HP_sv_skip_escaped_c) },
+ { HP_POP(sv->readdb, HP_sv_readdb) },
+/* sysinfo */
+ { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) },
+ { HP_POP(sysinfo->platform, HP_sysinfo_platform) },
+ { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) },
+ { HP_POP(sysinfo->cpu, HP_sysinfo_cpu) },
+ { HP_POP(sysinfo->cpucores, HP_sysinfo_cpucores) },
+ { HP_POP(sysinfo->arch, HP_sysinfo_arch) },
+ { HP_POP(sysinfo->is64bit, HP_sysinfo_is64bit) },
+ { HP_POP(sysinfo->compiler, HP_sysinfo_compiler) },
+ { HP_POP(sysinfo->cflags, HP_sysinfo_cflags) },
+ { HP_POP(sysinfo->vcstype, HP_sysinfo_vcstype) },
+ { HP_POP(sysinfo->vcstypeid, HP_sysinfo_vcstypeid) },
+ { HP_POP(sysinfo->vcsrevision_src, HP_sysinfo_vcsrevision_src) },
+ { HP_POP(sysinfo->vcsrevision_scripts, HP_sysinfo_vcsrevision_scripts) },
+ { HP_POP(sysinfo->vcsrevision_reload, HP_sysinfo_vcsrevision_reload) },
+ { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) },
+ { HP_POP(sysinfo->init, HP_sysinfo_init) },
+ { HP_POP(sysinfo->final, HP_sysinfo_final) },
+/* timer */
+ { HP_POP(timer->gettick, HP_timer_gettick) },
+ { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) },
+ { HP_POP(timer->add, HP_timer_add) },
+ { HP_POP(timer->add_interval, HP_timer_add_interval) },
+ { HP_POP(timer->get, HP_timer_get) },
+ { HP_POP(timer->delete, HP_timer_delete) },
+ { HP_POP(timer->addtick, HP_timer_addtick) },
+ { HP_POP(timer->settick, HP_timer_settick) },
+ { HP_POP(timer->add_func_list, HP_timer_add_func_list) },
+ { HP_POP(timer->get_uptime, HP_timer_get_uptime) },
+ { HP_POP(timer->perform, HP_timer_perform) },
+ { HP_POP(timer->init, HP_timer_init) },
+ { HP_POP(timer->final, HP_timer_final) },
};
int HookingPointsLenMax = 42;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 1ebd9fd1a..94b298d36 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -4,6 +4,2431 @@
// NOTE: This file was auto-generated and should never be manually edited,
// as it will get overwritten.
+/* HCache */
+void HP_HCache_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_HCache_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.HCache.init();
+ }
+ if( HPMHooks.count.HP_HCache_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_HCache_check(const char *file) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_HCache_check_pre ) {
+ bool (*preHookFunc) (const char *file);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func;
+ retVal___ = preHookFunc(file);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.HCache.check(file);
+ }
+ if( HPMHooks.count.HP_HCache_check_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *file);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, file);
+ }
+ }
+ return retVal___;
+}
+FILE* HP_HCache_open(const char *file, const char *opt) {
+ int hIndex = 0;
+ FILE* retVal___ = NULL;
+ if( HPMHooks.count.HP_HCache_open_pre ) {
+ FILE* (*preHookFunc) (const char *file, const char *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func;
+ retVal___ = preHookFunc(file, opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.HCache.open(file, opt);
+ }
+ if( HPMHooks.count.HP_HCache_open_post ) {
+ FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, file, opt);
+ }
+ }
+ return retVal___;
+}
+/* cmdline */
+void HP_cmdline_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_cmdline_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.cmdline.init();
+ }
+ if( HPMHooks.count.HP_cmdline_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_cmdline_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_cmdline_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.cmdline.final();
+ }
+ if( HPMHooks.count.HP_cmdline_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_cmdline_arg_add_pre ) {
+ bool (*preHookFunc) (unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func;
+ retVal___ = preHookFunc(&pluginID, name, &shortname, &func, help, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options);
+ }
+ if( HPMHooks.count.HP_cmdline_arg_add_post ) {
+ bool (*postHookFunc) (bool retVal___, unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &pluginID, name, &shortname, &func, help, &options);
+ }
+ }
+ return retVal___;
+}
+int HP_cmdline_exec(int argc, char **argv, unsigned int options) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_cmdline_exec_pre ) {
+ int (*preHookFunc) (int *argc, char **argv, unsigned int *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func;
+ retVal___ = preHookFunc(&argc, argv, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options);
+ }
+ if( HPMHooks.count.HP_cmdline_exec_post ) {
+ int (*postHookFunc) (int retVal___, int *argc, char **argv, unsigned int *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &argc, argv, &options);
+ }
+ }
+ return retVal___;
+}
+bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) {
+ bool (*preHookFunc) (const char *name, int *current_arg, int *argc);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func;
+ retVal___ = preHookFunc(name, &current_arg, &argc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc);
+ }
+ if( HPMHooks.count.HP_cmdline_arg_next_value_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *name, int *current_arg, int *argc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, &current_arg, &argc);
+ }
+ }
+ return retVal___;
+}
+const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_cmdline_arg_source_pre ) {
+ const char* (*preHookFunc) (struct CmdlineArgData *arg);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func;
+ retVal___ = preHookFunc(arg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.arg_source(arg);
+ }
+ if( HPMHooks.count.HP_cmdline_arg_source_post ) {
+ const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, arg);
+ }
+ }
+ return retVal___;
+}
+/* console */
+void HP_console_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.init();
+ }
+ if( HPMHooks.count.HP_console_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_console_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.final();
+ }
+ if( HPMHooks.count.HP_console_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_console_display_title(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_display_title_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.display_title();
+ }
+ if( HPMHooks.count.HP_console_display_title_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* core */
+void HP_core_shutdown_callback(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_core_shutdown_callback_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.core.shutdown_callback();
+ }
+ if( HPMHooks.count.HP_core_shutdown_callback_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* DB */
+DBOptions HP_DB_fix_options(DBType type, DBOptions options) {
+ int hIndex = 0;
+ DBOptions retVal___ = DB_OPT_BASE;
+ if( HPMHooks.count.HP_DB_fix_options_pre ) {
+ DBOptions (*preHookFunc) (DBType *type, DBOptions *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func;
+ retVal___ = preHookFunc(&type, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.fix_options(type, options);
+ }
+ if( HPMHooks.count.HP_DB_fix_options_post ) {
+ DBOptions (*postHookFunc) (DBOptions retVal___, DBType *type, DBOptions *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type, &options);
+ }
+ }
+ return retVal___;
+}
+DBComparator HP_DB_default_cmp(DBType type) {
+ int hIndex = 0;
+ DBComparator retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_default_cmp_pre ) {
+ DBComparator (*preHookFunc) (DBType *type);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.default_cmp(type);
+ }
+ if( HPMHooks.count.HP_DB_default_cmp_post ) {
+ DBComparator (*postHookFunc) (DBComparator retVal___, DBType *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type);
+ }
+ }
+ return retVal___;
+}
+DBHasher HP_DB_default_hash(DBType type) {
+ int hIndex = 0;
+ DBHasher retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_default_hash_pre ) {
+ DBHasher (*preHookFunc) (DBType *type);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.default_hash(type);
+ }
+ if( HPMHooks.count.HP_DB_default_hash_post ) {
+ DBHasher (*postHookFunc) (DBHasher retVal___, DBType *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type);
+ }
+ }
+ return retVal___;
+}
+DBReleaser HP_DB_default_release(DBType type, DBOptions options) {
+ int hIndex = 0;
+ DBReleaser retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_default_release_pre ) {
+ DBReleaser (*preHookFunc) (DBType *type, DBOptions *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func;
+ retVal___ = preHookFunc(&type, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.default_release(type, options);
+ }
+ if( HPMHooks.count.HP_DB_default_release_post ) {
+ DBReleaser (*postHookFunc) (DBReleaser retVal___, DBType *type, DBOptions *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type, &options);
+ }
+ }
+ return retVal___;
+}
+DBReleaser HP_DB_custom_release(DBRelease which) {
+ int hIndex = 0;
+ DBReleaser retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_custom_release_pre ) {
+ DBReleaser (*preHookFunc) (DBRelease *which);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func;
+ retVal___ = preHookFunc(&which);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.custom_release(which);
+ }
+ if( HPMHooks.count.HP_DB_custom_release_post ) {
+ DBReleaser (*postHookFunc) (DBReleaser retVal___, DBRelease *which);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &which);
+ }
+ }
+ return retVal___;
+}
+DBMap* HP_DB_alloc(const char *file, const char *func, int line, DBType type, DBOptions options, unsigned short maxlen) {
+ int hIndex = 0;
+ DBMap* retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_alloc_pre ) {
+ DBMap* (*preHookFunc) (const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func;
+ retVal___ = preHookFunc(file, func, &line, &type, &options, &maxlen);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen);
+ }
+ if( HPMHooks.count.HP_DB_alloc_post ) {
+ DBMap* (*postHookFunc) (DBMap* retVal___, const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, file, func, &line, &type, &options, &maxlen);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_i2key(int key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_i2key_pre ) {
+ DBKey (*preHookFunc) (int *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.i2key(key);
+ }
+ if( HPMHooks.count.HP_DB_i2key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, int *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_ui2key(unsigned int key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_ui2key_pre ) {
+ DBKey (*preHookFunc) (unsigned int *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ui2key(key);
+ }
+ if( HPMHooks.count.HP_DB_ui2key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, unsigned int *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_str2key(const char *key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_str2key_pre ) {
+ DBKey (*preHookFunc) (const char *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func;
+ retVal___ = preHookFunc(key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.str2key(key);
+ }
+ if( HPMHooks.count.HP_DB_str2key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, const char *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_i642key(int64 key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_i642key_pre ) {
+ DBKey (*preHookFunc) (int64 *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.i642key(key);
+ }
+ if( HPMHooks.count.HP_DB_i642key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, int64 *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_ui642key(uint64 key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_ui642key_pre ) {
+ DBKey (*preHookFunc) (uint64 *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ui642key(key);
+ }
+ if( HPMHooks.count.HP_DB_ui642key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, uint64 *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBData HP_DB_i2data(int data) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_DB_i2data_pre ) {
+ DBData (*preHookFunc) (int *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func;
+ retVal___ = preHookFunc(&data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.i2data(data);
+ }
+ if( HPMHooks.count.HP_DB_i2data_post ) {
+ DBData (*postHookFunc) (DBData retVal___, int *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &data);
+ }
+ }
+ return retVal___;
+}
+DBData HP_DB_ui2data(unsigned int data) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_DB_ui2data_pre ) {
+ DBData (*preHookFunc) (unsigned int *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func;
+ retVal___ = preHookFunc(&data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ui2data(data);
+ }
+ if( HPMHooks.count.HP_DB_ui2data_post ) {
+ DBData (*postHookFunc) (DBData retVal___, unsigned int *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &data);
+ }
+ }
+ return retVal___;
+}
+DBData HP_DB_ptr2data(void *data) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_DB_ptr2data_pre ) {
+ DBData (*preHookFunc) (void *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ptr2data(data);
+ }
+ if( HPMHooks.count.HP_DB_ptr2data_post ) {
+ DBData (*postHookFunc) (DBData retVal___, void *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+int HP_DB_data2i(DBData *data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_DB_data2i_pre ) {
+ int (*preHookFunc) (DBData *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.data2i(data);
+ }
+ if( HPMHooks.count.HP_DB_data2i_post ) {
+ int (*postHookFunc) (int retVal___, DBData *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_DB_data2ui(DBData *data) {
+ int hIndex = 0;
+ unsigned int retVal___ = 0;
+ if( HPMHooks.count.HP_DB_data2ui_pre ) {
+ unsigned int (*preHookFunc) (DBData *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.data2ui(data);
+ }
+ if( HPMHooks.count.HP_DB_data2ui_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, DBData *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+void* HP_DB_data2ptr(DBData *data) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_data2ptr_pre ) {
+ void* (*preHookFunc) (DBData *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.data2ptr(data);
+ }
+ if( HPMHooks.count.HP_DB_data2ptr_post ) {
+ void* (*postHookFunc) (void* retVal___, DBData *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+void HP_DB_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_DB_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.DB.init();
+ }
+ if( HPMHooks.count.HP_DB_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_DB_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_DB_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.DB.final();
+ }
+ if( HPMHooks.count.HP_DB_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* libconfig */
+int HP_libconfig_read(config_t *config, FILE *stream) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_pre ) {
+ int (*preHookFunc) (config_t *config, FILE *stream);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func;
+ retVal___ = preHookFunc(config, stream);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read(config, stream);
+ }
+ if( HPMHooks.count.HP_libconfig_read_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, FILE *stream);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, stream);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_write(const config_t *config, FILE *stream) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_write_pre ) {
+ void (*preHookFunc) (const config_t *config, FILE *stream);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func;
+ preHookFunc(config, stream);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.write(config, stream);
+ }
+ if( HPMHooks.count.HP_libconfig_write_post ) {
+ void (*postHookFunc) (const config_t *config, FILE *stream);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func;
+ postHookFunc(config, stream);
+ }
+ }
+ return;
+}
+void HP_libconfig_set_auto_convert(config_t *config, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_set_auto_convert_pre ) {
+ void (*preHookFunc) (config_t *config, int *flag);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_pre[hIndex].func;
+ preHookFunc(config, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.set_auto_convert(config, flag);
+ }
+ if( HPMHooks.count.HP_libconfig_set_auto_convert_post ) {
+ void (*postHookFunc) (config_t *config, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_post[hIndex].func;
+ postHookFunc(config, &flag);
+ }
+ }
+ return;
+}
+int HP_libconfig_get_auto_convert(const config_t *config) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_get_auto_convert_pre ) {
+ int (*preHookFunc) (const config_t *config);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_pre[hIndex].func;
+ retVal___ = preHookFunc(config);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.get_auto_convert(config);
+ }
+ if( HPMHooks.count.HP_libconfig_get_auto_convert_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_read_string(config_t *config, const char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_string_pre ) {
+ int (*preHookFunc) (config_t *config, const char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func;
+ retVal___ = preHookFunc(config, str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read_string(config, str);
+ }
+ if( HPMHooks.count.HP_libconfig_read_string_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, str);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_read_file_src(config_t *config, const char *filename) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_file_src_pre ) {
+ int (*preHookFunc) (config_t *config, const char *filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename);
+ }
+ if( HPMHooks.count.HP_libconfig_read_file_src_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filename);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_write_file(config_t *config, const char *filename) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_write_file_pre ) {
+ int (*preHookFunc) (config_t *config, const char *filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.write_file(config, filename);
+ }
+ if( HPMHooks.count.HP_libconfig_write_file_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filename);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_set_destructor(config_t *config, void ( *destructor ) (void *)) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_set_destructor_pre ) {
+ void (*preHookFunc) (config_t *config, void ( *destructor ) (void *));
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func;
+ preHookFunc(config, destructor);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.set_destructor(config, destructor);
+ }
+ if( HPMHooks.count.HP_libconfig_set_destructor_post ) {
+ void (*postHookFunc) (config_t *config, void ( *destructor ) (void *));
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func;
+ postHookFunc(config, destructor);
+ }
+ }
+ return;
+}
+void HP_libconfig_set_include_dir(config_t *config, const char *include_dir) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) {
+ void (*preHookFunc) (config_t *config, const char *include_dir);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func;
+ preHookFunc(config, include_dir);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.set_include_dir(config, include_dir);
+ }
+ if( HPMHooks.count.HP_libconfig_set_include_dir_post ) {
+ void (*postHookFunc) (config_t *config, const char *include_dir);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func;
+ postHookFunc(config, include_dir);
+ }
+ }
+ return;
+}
+void HP_libconfig_init(config_t *config) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_init_pre ) {
+ void (*preHookFunc) (config_t *config);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func;
+ preHookFunc(config);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.init(config);
+ }
+ if( HPMHooks.count.HP_libconfig_init_post ) {
+ void (*postHookFunc) (config_t *config);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func;
+ postHookFunc(config);
+ }
+ }
+ return;
+}
+void HP_libconfig_destroy(config_t *config) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_destroy_pre ) {
+ void (*preHookFunc) (config_t *config);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func;
+ preHookFunc(config);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.destroy(config);
+ }
+ if( HPMHooks.count.HP_libconfig_destroy_post ) {
+ void (*postHookFunc) (config_t *config);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func;
+ postHookFunc(config);
+ }
+ }
+ return;
+}
+int HP_libconfig_setting_get_int(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+long long HP_libconfig_setting_get_int64(const config_setting_t *setting) {
+ int hIndex = 0;
+ long long retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) {
+ long long (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) {
+ long long (*postHookFunc) (long long retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+double HP_libconfig_setting_get_float(const config_setting_t *setting) {
+ int hIndex = 0;
+ double retVal___ = 0.;
+ if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) {
+ double (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_float(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_float_post ) {
+ double (*postHookFunc) (double retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_get_bool(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+const char* HP_libconfig_setting_get_string(const config_setting_t *setting) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) {
+ const char* (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_string(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_string_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_int(const config_setting_t *setting, const char *name, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_int64(const config_setting_t *setting, const char *name, long long *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_float(const config_setting_t *setting, const char *name, double *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_bool(const config_setting_t *setting, const char *name, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_string(const config_setting_t *setting, const char *name, const char **value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, const char **value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, const char **value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_int(config_setting_t *setting, int value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_int64(config_setting_t *setting, long long value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_float(config_setting_t *setting, double value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_float_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_bool(config_setting_t *setting, int value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_string(config_setting_t *setting, const char *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, const char *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_string_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, const char *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_format(config_setting_t *setting, short format) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, short *format);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &format);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_format_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, short *format);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &format);
+ }
+ }
+ return retVal___;
+}
+short HP_libconfig_setting_get_format(const config_setting_t *setting) {
+ int hIndex = 0;
+ short retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) {
+ short (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_format(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_format_post ) {
+ short (*postHookFunc) (short retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_get_int_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+long long HP_libconfig_setting_get_int64_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ long long retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) {
+ long long (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) {
+ long long (*postHookFunc) (long long retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+double HP_libconfig_setting_get_float_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ double retVal___ = 0.;
+ if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) {
+ double (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) {
+ double (*postHookFunc) (double retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_get_bool_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+const char* HP_libconfig_setting_get_string_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) {
+ const char* (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_int_elem(config_setting_t *setting, int idx, int value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_int64_elem(config_setting_t *setting, int idx, long long value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_float_elem(config_setting_t *setting, int idx, double value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_bool_elem(config_setting_t *setting, int idx, int value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_string_elem(config_setting_t *setting, int idx, const char *value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, const char *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, const char *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_index(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_index_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_index(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_index_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_length(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_length_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_length(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_length_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_get_elem(const config_setting_t *setting, unsigned int idx) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) {
+ config_setting_t* (*preHookFunc) (const config_setting_t *setting, unsigned int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, unsigned int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_get_member(const config_setting_t *setting, const char *name) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) {
+ config_setting_t* (*preHookFunc) (const config_setting_t *setting, const char *name);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_member_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_add(config_setting_t *parent, const char *name, int type) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_add_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *parent, const char *name, int *type);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, name, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_add_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *parent, const char *name, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, name, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_remove(config_setting_t *parent, const char *name) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_remove_pre ) {
+ int (*preHookFunc) (config_setting_t *parent, const char *name);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_remove_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *parent, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, name);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_remove_elem(config_setting_t *parent, unsigned int idx) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) {
+ int (*preHookFunc) (config_setting_t *parent, unsigned int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *parent, unsigned int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, &idx);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_setting_set_hook(config_setting_t *setting, void *hook) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) {
+ void (*preHookFunc) (config_setting_t *setting, void *hook);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func;
+ preHookFunc(setting, hook);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_set_hook(setting, hook);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) {
+ void (*postHookFunc) (config_setting_t *setting, void *hook);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func;
+ postHookFunc(setting, hook);
+ }
+ }
+ return;
+}
+config_setting_t* HP_libconfig_lookup(const config_t *config, const char *filepath) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_lookup_pre ) {
+ config_setting_t* (*preHookFunc) (const config_t *config, const char *filepath);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup(config, filepath);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_t *config, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_lookup_from(config_setting_t *setting, const char *filepath) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_lookup_from_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, const char *filepath);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_from_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_from(setting, filepath);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_from_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_from_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, filepath);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_int(const config_t *config, const char *filepath, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_int_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_int_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_int64(const config_t *config, const char *filepath, long long *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_int64_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_float(const config_t *config, const char *filepath, double *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_float_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_float_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_bool(const config_t *config, const char *filepath, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_bool_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_string(const config_t *config, const char *filepath, const char **value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_string_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, const char **value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_string_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, const char **value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_read_file(config_t *config, const char *config_filename) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_file_pre ) {
+ int (*preHookFunc) (config_t *config, const char *config_filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_file_pre[hIndex].func;
+ retVal___ = preHookFunc(config, config_filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read_file(config, config_filename);
+ }
+ if( HPMHooks.count.HP_libconfig_read_file_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *config_filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_file_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, config_filename);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_setting_copy_simple(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) {
+ void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func;
+ preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_copy_simple(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) {
+ void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func;
+ postHookFunc(parent, src);
+ }
+ }
+ return;
+}
+void HP_libconfig_setting_copy_elem(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) {
+ void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func;
+ preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_copy_elem(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) {
+ void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func;
+ postHookFunc(parent, src);
+ }
+ }
+ return;
+}
+void HP_libconfig_setting_copy_aggregate(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) {
+ void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func;
+ preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_copy_aggregate(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) {
+ void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func;
+ postHookFunc(parent, src);
+ }
+ }
+ return;
+}
+int HP_libconfig_setting_copy(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_pre ) {
+ int (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, src);
+ }
+ }
+ return retVal___;
+}
/* login */
int HP_login_mmo_auth(struct login_session_data *sd, bool isServer) {
int hIndex = 0;
@@ -347,14 +2772,14 @@ bool HP_login_check_password(const char *md5key, int passwdenc, const char *pass
}
return retVal___;
}
-int HP_login_lan_subnetcheck(uint32 ip) {
+uint32 HP_login_lan_subnet_check(uint32 ip) {
int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_login_lan_subnetcheck_pre ) {
- int (*preHookFunc) (uint32 *ip);
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_login_lan_subnet_check_pre ) {
+ uint32 (*preHookFunc) (uint32 *ip);
*HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnetcheck_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_login_lan_subnetcheck_pre[hIndex].func;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_login_lan_subnet_check_pre[hIndex].func;
retVal___ = preHookFunc(&ip);
}
if( *HPMforce_return ) {
@@ -363,44 +2788,17 @@ int HP_login_lan_subnetcheck(uint32 ip) {
}
}
{
- retVal___ = HPMHooks.source.login.lan_subnetcheck(ip);
+ retVal___ = HPMHooks.source.login.lan_subnet_check(ip);
}
- if( HPMHooks.count.HP_login_lan_subnetcheck_post ) {
- int (*postHookFunc) (int retVal___, uint32 *ip);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnetcheck_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_login_lan_subnetcheck_post[hIndex].func;
+ if( HPMHooks.count.HP_login_lan_subnet_check_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_subnet_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_login_lan_subnet_check_post[hIndex].func;
retVal___ = postHookFunc(retVal___, &ip);
}
}
return retVal___;
}
-int HP_login_lan_config_read(const char *lancfgName) {
- int hIndex = 0;
- int retVal___ = 0;
- if( HPMHooks.count.HP_login_lan_config_read_pre ) {
- int (*preHookFunc) (const char *lancfgName);
- *HPMforce_return = false;
- for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_config_read_pre; hIndex++ ) {
- preHookFunc = HPMHooks.list.HP_login_lan_config_read_pre[hIndex].func;
- retVal___ = preHookFunc(lancfgName);
- }
- if( *HPMforce_return ) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.login.lan_config_read(lancfgName);
- }
- if( HPMHooks.count.HP_login_lan_config_read_post ) {
- int (*postHookFunc) (int retVal___, const char *lancfgName);
- for(hIndex = 0; hIndex < HPMHooks.count.HP_login_lan_config_read_post; hIndex++ ) {
- postHookFunc = HPMHooks.list.HP_login_lan_config_read_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, lancfgName);
- }
- }
- return retVal___;
-}
void HP_login_fromchar_accinfo(int fd, int account_id, int u_fd, int u_aid, int u_group, int map_fd, struct mmo_account *acc) {
int hIndex = 0;
if( HPMHooks.count.HP_login_fromchar_accinfo_pre ) {
@@ -1418,14 +3816,14 @@ void HP_login_char_server_connection_status(int fd, struct login_session_data *s
}
return;
}
-void HP_login_parse_request_connection(int fd, struct login_session_data *sd, const char *ip) {
+void HP_login_parse_request_connection(int fd, struct login_session_data *sd, const char *ip, uint32 ipl) {
int hIndex = 0;
if( HPMHooks.count.HP_login_parse_request_connection_pre ) {
- void (*preHookFunc) (int *fd, struct login_session_data *sd, const char *ip);
+ void (*preHookFunc) (int *fd, struct login_session_data *sd, const char *ip, uint32 *ipl);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_login_parse_request_connection_pre[hIndex].func;
- preHookFunc(&fd, sd, ip);
+ preHookFunc(&fd, sd, ip, &ipl);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -1433,13 +3831,13 @@ void HP_login_parse_request_connection(int fd, struct login_session_data *sd, co
}
}
{
- HPMHooks.source.login.parse_request_connection(fd, sd, ip);
+ HPMHooks.source.login.parse_request_connection(fd, sd, ip, ipl);
}
if( HPMHooks.count.HP_login_parse_request_connection_post ) {
- void (*postHookFunc) (int *fd, struct login_session_data *sd, const char *ip);
+ void (*postHookFunc) (int *fd, struct login_session_data *sd, const char *ip, uint32 *ipl);
for(hIndex = 0; hIndex < HPMHooks.count.HP_login_parse_request_connection_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_login_parse_request_connection_post[hIndex].func;
- postHookFunc(&fd, sd, ip);
+ postHookFunc(&fd, sd, ip, &ipl);
}
}
return;
@@ -1471,3 +3869,3782 @@ int HP_login_parse_login(int fd) {
}
return retVal___;
}
+/* iMalloc */
+void HP_iMalloc_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.init();
+ }
+ if( HPMHooks.count.HP_iMalloc_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_iMalloc_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.final();
+ }
+ if( HPMHooks.count.HP_iMalloc_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_malloc_pre ) {
+ void* (*preHookFunc) (size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func;
+ retVal___ = preHookFunc(&size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_malloc_post ) {
+ void* (*postHookFunc) (void* retVal___, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_calloc_pre ) {
+ void* (*preHookFunc) (size_t *num, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func;
+ retVal___ = preHookFunc(&num, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_calloc_post ) {
+ void* (*postHookFunc) (void* retVal___, size_t *num, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &num, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_realloc_pre ) {
+ void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_realloc_post ) {
+ void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_reallocz_pre ) {
+ void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_reallocz_post ) {
+ void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_astrdup_pre ) {
+ char* (*preHookFunc) (const char *p, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func;
+ retVal___ = preHookFunc(p, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_astrdup_post ) {
+ char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void HP_iMalloc_free(void *p, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_free_pre ) {
+ void (*preHookFunc) (void *p, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func;
+ preHookFunc(p, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.free(p, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_free_post ) {
+ void (*postHookFunc) (void *p, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func;
+ postHookFunc(p, file, &line, func);
+ }
+ }
+ return;
+}
+void HP_iMalloc_memory_check(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_memory_check_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.memory_check();
+ }
+ if( HPMHooks.count.HP_iMalloc_memory_check_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_iMalloc_verify_ptr(void *ptr) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) {
+ bool (*preHookFunc) (void *ptr);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func;
+ retVal___ = preHookFunc(ptr);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr);
+ }
+ if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) {
+ bool (*postHookFunc) (bool retVal___, void *ptr);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ptr);
+ }
+ }
+ return retVal___;
+}
+size_t HP_iMalloc_usage(void) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_iMalloc_usage_pre ) {
+ size_t (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.usage();
+ }
+ if( HPMHooks.count.HP_iMalloc_usage_post ) {
+ size_t (*postHookFunc) (size_t retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_iMalloc_post_shutdown(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.post_shutdown();
+ }
+ if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_iMalloc_init_messages(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_init_messages_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.init_messages();
+ }
+ if( HPMHooks.count.HP_iMalloc_init_messages_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* nullpo */
+void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_nullpo_assert_report_pre ) {
+ void (*preHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func;
+ preHookFunc(file, &line, func, targetname, title);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title);
+ }
+ if( HPMHooks.count.HP_nullpo_assert_report_post ) {
+ void (*postHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func;
+ postHookFunc(file, &line, func, targetname, title);
+ }
+ }
+ return;
+}
+/* showmsg */
+void HP_showmsg_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_showmsg_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.showmsg.init();
+ }
+ if( HPMHooks.count.HP_showmsg_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_showmsg_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_showmsg_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.showmsg.final();
+ }
+ if( HPMHooks.count.HP_showmsg_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_showmsg_clearScreen(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_showmsg_clearScreen_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.showmsg.clearScreen();
+ }
+ if( HPMHooks.count.HP_showmsg_clearScreen_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_showmsg_showMessageV(const char *string, va_list ap) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_showmsg_showMessageV_pre ) {
+ int (*preHookFunc) (const char *string, va_list ap);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func;
+ retVal___ = preHookFunc(string, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.showmsg.showMessageV(string, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_showmsg_showMessageV_post ) {
+ int (*postHookFunc) (int retVal___, const char *string, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+/* sockt */
+void HP_sockt_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.init();
+ }
+ if( HPMHooks.count.HP_sockt_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_sockt_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.final();
+ }
+ if( HPMHooks.count.HP_sockt_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_sockt_perform(int next) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_perform_pre ) {
+ int (*preHookFunc) (int *next);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func;
+ retVal___ = preHookFunc(&next);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.perform(next);
+ }
+ if( HPMHooks.count.HP_sockt_perform_post ) {
+ int (*postHookFunc) (int retVal___, int *next);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &next);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_datasync(int fd, bool send) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_datasync_pre ) {
+ void (*preHookFunc) (int *fd, bool *send);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func;
+ preHookFunc(&fd, &send);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.datasync(fd, send);
+ }
+ if( HPMHooks.count.HP_sockt_datasync_post ) {
+ void (*postHookFunc) (int *fd, bool *send);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func;
+ postHookFunc(&fd, &send);
+ }
+ }
+ return;
+}
+int HP_sockt_make_listen_bind(uint32 ip, uint16 port) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) {
+ int (*preHookFunc) (uint32 *ip, uint16 *port);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, &port);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port);
+ }
+ if( HPMHooks.count.HP_sockt_make_listen_bind_post ) {
+ int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, &port);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_make_connection_pre ) {
+ int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, &port, opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt);
+ }
+ if( HPMHooks.count.HP_sockt_make_connection_post ) {
+ int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port, struct hSockOpt *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, &port, opt);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) {
+ int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size);
+ }
+ if( HPMHooks.count.HP_sockt_realloc_fifo_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &rfifo_size, &wfifo_size);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_realloc_writefifo(int fd, size_t addition) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) {
+ int (*preHookFunc) (int *fd, size_t *addition);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &addition);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition);
+ }
+ if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, size_t *addition);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &addition);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_wfifoset(int fd, size_t len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_wfifoset_pre ) {
+ int (*preHookFunc) (int *fd, size_t *len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.wfifoset(fd, len);
+ }
+ if( HPMHooks.count.HP_sockt_wfifoset_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, size_t *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_rfifoskip(int fd, size_t len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_rfifoskip_pre ) {
+ int (*preHookFunc) (int *fd, size_t *len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len);
+ }
+ if( HPMHooks.count.HP_sockt_rfifoskip_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, size_t *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &len);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_close(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_close_pre ) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.close(fd);
+ }
+ if( HPMHooks.count.HP_sockt_close_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+bool HP_sockt_session_is_valid(int fd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_session_is_valid_pre ) {
+ bool (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.session_is_valid(fd);
+ }
+ if( HPMHooks.count.HP_sockt_session_is_valid_post ) {
+ bool (*postHookFunc) (bool retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+bool HP_sockt_session_is_active(int fd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_session_is_active_pre ) {
+ bool (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.session_is_active(fd);
+ }
+ if( HPMHooks.count.HP_sockt_session_is_active_post ) {
+ bool (*postHookFunc) (bool retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_flush(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_flush_pre ) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.flush(fd);
+ }
+ if( HPMHooks.count.HP_sockt_flush_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_sockt_flush_fifos(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_flush_fifos_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.flush_fifos();
+ }
+ if( HPMHooks.count.HP_sockt_flush_fifos_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_sockt_set_nonblocking(int fd, unsigned long yes) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) {
+ void (*preHookFunc) (int *fd, unsigned long *yes);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func;
+ preHookFunc(&fd, &yes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.set_nonblocking(fd, yes);
+ }
+ if( HPMHooks.count.HP_sockt_set_nonblocking_post ) {
+ void (*postHookFunc) (int *fd, unsigned long *yes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func;
+ postHookFunc(&fd, &yes);
+ }
+ }
+ return;
+}
+void HP_sockt_set_defaultparse(ParseFunc defaultparse) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) {
+ void (*preHookFunc) (ParseFunc *defaultparse);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func;
+ preHookFunc(&defaultparse);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.set_defaultparse(defaultparse);
+ }
+ if( HPMHooks.count.HP_sockt_set_defaultparse_post ) {
+ void (*postHookFunc) (ParseFunc *defaultparse);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func;
+ postHookFunc(&defaultparse);
+ }
+ }
+ return;
+}
+uint32 HP_sockt_host2ip(const char *hostname) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_host2ip_pre ) {
+ uint32 (*preHookFunc) (const char *hostname);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func;
+ retVal___ = preHookFunc(hostname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.host2ip(hostname);
+ }
+ if( HPMHooks.count.HP_sockt_host2ip_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, const char *hostname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hostname);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sockt_ip2str(uint32 ip, char *ip_str) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sockt_ip2str_pre ) {
+ const char* (*preHookFunc) (uint32 *ip, char *ip_str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, ip_str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str);
+ }
+ if( HPMHooks.count.HP_sockt_ip2str_post ) {
+ const char* (*postHookFunc) (const char* retVal___, uint32 *ip, char *ip_str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, ip_str);
+ }
+ }
+ return retVal___;
+}
+uint32 HP_sockt_str2ip(const char *ip_str) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_str2ip_pre ) {
+ uint32 (*preHookFunc) (const char *ip_str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func;
+ retVal___ = preHookFunc(ip_str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.str2ip(ip_str);
+ }
+ if( HPMHooks.count.HP_sockt_str2ip_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ip_str);
+ }
+ }
+ return retVal___;
+}
+uint16 HP_sockt_ntows(uint16 netshort) {
+ int hIndex = 0;
+ uint16 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_ntows_pre ) {
+ uint16 (*preHookFunc) (uint16 *netshort);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func;
+ retVal___ = preHookFunc(&netshort);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.ntows(netshort);
+ }
+ if( HPMHooks.count.HP_sockt_ntows_post ) {
+ uint16 (*postHookFunc) (uint16 retVal___, uint16 *netshort);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &netshort);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_getips(uint32 *ips, int max) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_getips_pre ) {
+ int (*preHookFunc) (uint32 *ips, int *max);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func;
+ retVal___ = preHookFunc(ips, &max);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.getips(ips, max);
+ }
+ if( HPMHooks.count.HP_sockt_getips_post ) {
+ int (*postHookFunc) (int retVal___, uint32 *ips, int *max);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ips, &max);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_eof(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_eof_pre ) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.eof(fd);
+ }
+ if( HPMHooks.count.HP_sockt_eof_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) {
+ uint32 (*preHookFunc) (uint32 *ip, struct s_subnet *info);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, info);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info);
+ }
+ if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip, struct s_subnet *info);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, info);
+ }
+ }
+ return retVal___;
+}
+bool HP_sockt_allowed_ip_check(uint32 ip) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) {
+ bool (*preHookFunc) (uint32 *ip);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip);
+ }
+ if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) {
+ bool (*postHookFunc) (bool retVal___, uint32 *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip);
+ }
+ }
+ return retVal___;
+}
+bool HP_sockt_trusted_ip_check(uint32 ip) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) {
+ bool (*preHookFunc) (uint32 *ip);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip);
+ }
+ if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) {
+ bool (*postHookFunc) (bool retVal___, uint32 *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_net_config_read_sub(config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) {
+ int (*preHookFunc) (config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(t, list, count, filename, groupname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, count, filename, groupname);
+ }
+ if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, t, list, count, filename, groupname);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_net_config_read(const char *filename) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_net_config_read_pre ) {
+ void (*preHookFunc) (const char *filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func;
+ preHookFunc(filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.net_config_read(filename);
+ }
+ if( HPMHooks.count.HP_sockt_net_config_read_post ) {
+ void (*postHookFunc) (const char *filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func;
+ postHookFunc(filename);
+ }
+ }
+ return;
+}
+/* SQL */
+int HP_SQL_Connect(Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_Connect_pre ) {
+ int (*preHookFunc) (Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func;
+ retVal___ = preHookFunc(self, user, passwd, host, &port, db);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db);
+ }
+ if( HPMHooks.count.HP_SQL_Connect_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, user, passwd, host, &port, db);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_GetTimeout(Sql *self, uint32 *out_timeout) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_GetTimeout_pre ) {
+ int (*preHookFunc) (Sql *self, uint32 *out_timeout);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func;
+ retVal___ = preHookFunc(self, out_timeout);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout);
+ }
+ if( HPMHooks.count.HP_SQL_GetTimeout_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, uint32 *out_timeout);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, out_timeout);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_GetColumnNames(Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) {
+ int (*preHookFunc) (Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func;
+ retVal___ = preHookFunc(self, table, out_buf, &buf_len, &sep);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep);
+ }
+ if( HPMHooks.count.HP_SQL_GetColumnNames_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, table, out_buf, &buf_len, &sep);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_SetEncoding(Sql *self, const char *encoding) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_SetEncoding_pre ) {
+ int (*preHookFunc) (Sql *self, const char *encoding);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func;
+ retVal___ = preHookFunc(self, encoding);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding);
+ }
+ if( HPMHooks.count.HP_SQL_SetEncoding_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *encoding);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, encoding);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_Ping(Sql *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_Ping_pre ) {
+ int (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.Ping(self);
+ }
+ if( HPMHooks.count.HP_SQL_Ping_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_EscapeString(Sql *self, char *out_to, const char *from) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_EscapeString_pre ) {
+ size_t (*preHookFunc) (Sql *self, char *out_to, const char *from);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func;
+ retVal___ = preHookFunc(self, out_to, from);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from);
+ }
+ if( HPMHooks.count.HP_SQL_EscapeString_post ) {
+ size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, out_to, from);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_EscapeStringLen(Sql *self, char *out_to, const char *from, size_t from_len) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) {
+ size_t (*preHookFunc) (Sql *self, char *out_to, const char *from, size_t *from_len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func;
+ retVal___ = preHookFunc(self, out_to, from, &from_len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len);
+ }
+ if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) {
+ size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from, size_t *from_len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, out_to, from, &from_len);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_QueryV(Sql *self, const char *query, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_QueryV_pre ) {
+ int (*preHookFunc) (Sql *self, const char *query, va_list args);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_SQL_QueryV_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *query, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_QueryStr(Sql *self, const char *query) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_QueryStr_pre ) {
+ int (*preHookFunc) (Sql *self, const char *query);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.QueryStr(self, query);
+ }
+ if( HPMHooks.count.HP_SQL_QueryStr_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *query);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_LastInsertId(Sql *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_LastInsertId_pre ) {
+ uint64 (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.LastInsertId(self);
+ }
+ if( HPMHooks.count.HP_SQL_LastInsertId_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+uint32 HP_SQL_NumColumns(Sql *self) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_NumColumns_pre ) {
+ uint32 (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.NumColumns(self);
+ }
+ if( HPMHooks.count.HP_SQL_NumColumns_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_NumRows(Sql *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_NumRows_pre ) {
+ uint64 (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.NumRows(self);
+ }
+ if( HPMHooks.count.HP_SQL_NumRows_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_NextRow(Sql *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_NextRow_pre ) {
+ int (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.NextRow(self);
+ }
+ if( HPMHooks.count.HP_SQL_NextRow_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_GetData(Sql *self, size_t col, char **out_buf, size_t *out_len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_GetData_pre ) {
+ int (*preHookFunc) (Sql *self, size_t *col, char **out_buf, size_t *out_len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func;
+ retVal___ = preHookFunc(self, &col, out_buf, out_len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len);
+ }
+ if( HPMHooks.count.HP_SQL_GetData_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, size_t *col, char **out_buf, size_t *out_len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, &col, out_buf, out_len);
+ }
+ }
+ return retVal___;
+}
+void HP_SQL_FreeResult(Sql *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_FreeResult_pre ) {
+ void (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.FreeResult(self);
+ }
+ if( HPMHooks.count.HP_SQL_FreeResult_post ) {
+ void (*postHookFunc) (Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_SQL_ShowDebug_(Sql *self, const char *debug_file, const unsigned long debug_line) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_ShowDebug__pre ) {
+ void (*preHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func;
+ preHookFunc(self, debug_file, &debug_line);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line);
+ }
+ if( HPMHooks.count.HP_SQL_ShowDebug__post ) {
+ void (*postHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func;
+ postHookFunc(self, debug_file, &debug_line);
+ }
+ }
+ return;
+}
+void HP_SQL_Free(Sql *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_Free_pre ) {
+ void (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.Free(self);
+ }
+ if( HPMHooks.count.HP_SQL_Free_post ) {
+ void (*postHookFunc) (Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+struct Sql* HP_SQL_Malloc(void) {
+ int hIndex = 0;
+ struct Sql* retVal___ = NULL;
+ if( HPMHooks.count.HP_SQL_Malloc_pre ) {
+ struct Sql* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.Malloc();
+ }
+ if( HPMHooks.count.HP_SQL_Malloc_post ) {
+ struct Sql* (*postHookFunc) (struct Sql* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+struct SqlStmt* HP_SQL_StmtMalloc(Sql *sql) {
+ int hIndex = 0;
+ struct SqlStmt* retVal___ = NULL;
+ if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) {
+ struct SqlStmt* (*preHookFunc) (Sql *sql);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func;
+ retVal___ = preHookFunc(sql);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtMalloc(sql);
+ }
+ if( HPMHooks.count.HP_SQL_StmtMalloc_post ) {
+ struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, Sql *sql);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sql);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtPrepareV(SqlStmt *self, const char *query, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) {
+ int (*preHookFunc) (SqlStmt *self, const char *query, va_list args);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtPrepareStr(SqlStmt *self, const char *query) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) {
+ int (*preHookFunc) (SqlStmt *self, const char *query);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query);
+ }
+ if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_StmtNumParams(SqlStmt *self) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) {
+ size_t (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNumParams(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNumParams_post ) {
+ size_t (*postHookFunc) (size_t retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtBindParam(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) {
+ int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func;
+ retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len);
+ }
+ if( HPMHooks.count.HP_SQL_StmtBindParam_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtExecute(SqlStmt *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtExecute_pre ) {
+ int (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtExecute(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtExecute_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_StmtLastInsertId(SqlStmt *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) {
+ uint64 (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_StmtNumColumns(SqlStmt *self) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) {
+ size_t (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNumColumns(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) {
+ size_t (*postHookFunc) (size_t retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtBindColumn(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) {
+ int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func;
+ retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null);
+ }
+ if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_StmtNumRows(SqlStmt *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) {
+ uint64 (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNumRows(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNumRows_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtNextRow(SqlStmt *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) {
+ int (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNextRow(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNextRow_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+void HP_SQL_StmtFreeResult(SqlStmt *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) {
+ void (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.StmtFreeResult(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) {
+ void (*postHookFunc) (SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_SQL_StmtFree(SqlStmt *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_StmtFree_pre ) {
+ void (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.StmtFree(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtFree_post ) {
+ void (*postHookFunc) (SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_SQL_StmtShowDebug_(SqlStmt *self, const char *debug_file, const unsigned long debug_line) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) {
+ void (*preHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func;
+ preHookFunc(self, debug_file, &debug_line);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line);
+ }
+ if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) {
+ void (*postHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func;
+ postHookFunc(self, debug_file, &debug_line);
+ }
+ }
+ return;
+}
+/* StrBuf */
+StringBuf* HP_StrBuf_Malloc(void) {
+ int hIndex = 0;
+ StringBuf* retVal___ = NULL;
+ if( HPMHooks.count.HP_StrBuf_Malloc_pre ) {
+ StringBuf* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Malloc();
+ }
+ if( HPMHooks.count.HP_StrBuf_Malloc_post ) {
+ StringBuf* (*postHookFunc) (StringBuf* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_StrBuf_Init(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Init_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Init(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Init_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) {
+ int (*preHookFunc) (StringBuf *self, const char *fmt, va_list args);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func;
+ retVal___ = preHookFunc(self, fmt, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_StrBuf_Vprintf_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, fmt, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_Append_pre ) {
+ int (*preHookFunc) (StringBuf *self, const StringBuf *sbuf);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func;
+ retVal___ = preHookFunc(self, sbuf);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf);
+ }
+ if( HPMHooks.count.HP_StrBuf_Append_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, sbuf);
+ }
+ }
+ return retVal___;
+}
+int HP_StrBuf_AppendStr(StringBuf *self, const char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) {
+ int (*preHookFunc) (StringBuf *self, const char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func;
+ retVal___ = preHookFunc(self, str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str);
+ }
+ if( HPMHooks.count.HP_StrBuf_AppendStr_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, str);
+ }
+ }
+ return retVal___;
+}
+int HP_StrBuf_Length(StringBuf *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_Length_pre ) {
+ int (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Length(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Length_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+char* HP_StrBuf_Value(StringBuf *self) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_StrBuf_Value_pre ) {
+ char* (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Value(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Value_post ) {
+ char* (*postHookFunc) (char* retVal___, StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+void HP_StrBuf_Clear(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Clear_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Clear(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Clear_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_StrBuf_Destroy(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Destroy_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Destroy(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Destroy_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_StrBuf_Free(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Free_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Free(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Free_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+/* strlib */
+char* HP_strlib_jstrescape(char *pt) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_jstrescape_pre ) {
+ char* (*preHookFunc) (char *pt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func;
+ retVal___ = preHookFunc(pt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.jstrescape(pt);
+ }
+ if( HPMHooks.count.HP_strlib_jstrescape_post ) {
+ char* (*postHookFunc) (char* retVal___, char *pt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pt);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_jstrescapecpy(char *pt, const char *spt) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) {
+ char* (*preHookFunc) (char *pt, const char *spt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func;
+ retVal___ = preHookFunc(pt, spt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt);
+ }
+ if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) {
+ char* (*postHookFunc) (char* retVal___, char *pt, const char *spt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pt, spt);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) {
+ int (*preHookFunc) (char *pt, const char *spt, int *size);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func;
+ retVal___ = preHookFunc(pt, spt, &size);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size);
+ }
+ if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) {
+ int (*postHookFunc) (int retVal___, char *pt, const char *spt, int *size);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pt, spt, &size);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_remove_control_chars_(char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) {
+ int (*preHookFunc) (char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.remove_control_chars_(str);
+ }
+ if( HPMHooks.count.HP_strlib_remove_control_chars__post ) {
+ int (*postHookFunc) (int retVal___, char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_trim_(char *str) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_trim__pre ) {
+ char* (*preHookFunc) (char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.trim_(str);
+ }
+ if( HPMHooks.count.HP_strlib_trim__post ) {
+ char* (*postHookFunc) (char* retVal___, char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_normalize_name_(char *str, const char *delims) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_normalize_name__pre ) {
+ char* (*preHookFunc) (char *str, const char *delims);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func;
+ retVal___ = preHookFunc(str, delims);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims);
+ }
+ if( HPMHooks.count.HP_strlib_normalize_name__post ) {
+ char* (*postHookFunc) (char* retVal___, char *str, const char *delims);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, delims);
+ }
+ }
+ return retVal___;
+}
+const char* HP_strlib_stristr_(const char *haystack, const char *needle) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_stristr__pre ) {
+ const char* (*preHookFunc) (const char *haystack, const char *needle);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func;
+ retVal___ = preHookFunc(haystack, needle);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle);
+ }
+ if( HPMHooks.count.HP_strlib_stristr__post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, haystack, needle);
+ }
+ }
+ return retVal___;
+}
+size_t HP_strlib_strnlen_(const char *string, size_t maxlen) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_strnlen__pre ) {
+ size_t (*preHookFunc) (const char *string, size_t *maxlen);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func;
+ retVal___ = preHookFunc(string, &maxlen);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen);
+ }
+ if( HPMHooks.count.HP_strlib_strnlen__post ) {
+ size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, &maxlen);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_strtok_r__pre ) {
+ char* (*preHookFunc) (char *s1, const char *s2, char **lasts);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func;
+ retVal___ = preHookFunc(s1, s2, lasts);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts);
+ }
+ if( HPMHooks.count.HP_strlib_strtok_r__post ) {
+ char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, s1, s2, lasts);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_e_mail_check_(char *email) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_e_mail_check__pre ) {
+ int (*preHookFunc) (char *email);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func;
+ retVal___ = preHookFunc(email);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.e_mail_check_(email);
+ }
+ if( HPMHooks.count.HP_strlib_e_mail_check__post ) {
+ int (*postHookFunc) (int retVal___, char *email);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, email);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_config_switch_(const char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_config_switch__pre ) {
+ int (*preHookFunc) (const char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.config_switch_(str);
+ }
+ if( HPMHooks.count.HP_strlib_config_switch__post ) {
+ int (*postHookFunc) (int retVal___, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_safestrncpy__pre ) {
+ char* (*preHookFunc) (char *dst, const char *src, size_t *n);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func;
+ retVal___ = preHookFunc(dst, src, &n);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n);
+ }
+ if( HPMHooks.count.HP_strlib_safestrncpy__post ) {
+ char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t *n);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, dst, src, &n);
+ }
+ }
+ return retVal___;
+}
+size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_safestrnlen__pre ) {
+ size_t (*preHookFunc) (const char *string, size_t *maxlen);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func;
+ retVal___ = preHookFunc(string, &maxlen);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen);
+ }
+ if( HPMHooks.count.HP_strlib_safestrnlen__post ) {
+ size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, &maxlen);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_strline_(const char *str, size_t pos) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_strline__pre ) {
+ int (*preHookFunc) (const char *str, size_t *pos);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func;
+ retVal___ = preHookFunc(str, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.strline_(str, pos);
+ }
+ if( HPMHooks.count.HP_strlib_strline__post ) {
+ int (*postHookFunc) (int retVal___, const char *str, size_t *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &pos);
+ }
+ }
+ return retVal___;
+}
+bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_strlib_bin2hex__pre ) {
+ bool (*preHookFunc) (char *output, unsigned char *input, size_t *count);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func;
+ retVal___ = preHookFunc(output, input, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count);
+ }
+ if( HPMHooks.count.HP_strlib_bin2hex__post ) {
+ bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, output, input, &count);
+ }
+ }
+ return retVal___;
+}
+/* sv */
+int HP_sv_parse_next(struct s_svstate *svstate) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sv_parse_next_pre ) {
+ int (*preHookFunc) (struct s_svstate *svstate);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func;
+ retVal___ = preHookFunc(svstate);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.parse_next(svstate);
+ }
+ if( HPMHooks.count.HP_sv_parse_next_post ) {
+ int (*postHookFunc) (int retVal___, struct s_svstate *svstate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, svstate);
+ }
+ }
+ return retVal___;
+}
+int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sv_parse_pre ) {
+ int (*preHookFunc) (const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &len, &startoff, &delim, out_pos, &npos, &opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt);
+ }
+ if( HPMHooks.count.HP_sv_parse_post ) {
+ int (*postHookFunc) (int retVal___, const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_pos, &npos, &opt);
+ }
+ }
+ return retVal___;
+}
+int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sv_split_pre ) {
+ int (*preHookFunc) (char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &len, &startoff, &delim, out_fields, &nfields, &opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt);
+ }
+ if( HPMHooks.count.HP_sv_split_post ) {
+ int (*postHookFunc) (int retVal___, char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_fields, &nfields, &opt);
+ }
+ }
+ return retVal___;
+}
+size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_sv_escape_c_pre ) {
+ size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len, const char *escapes);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func;
+ retVal___ = preHookFunc(out_dest, src, &len, escapes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes);
+ }
+ if( HPMHooks.count.HP_sv_escape_c_post ) {
+ size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len, const char *escapes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, out_dest, src, &len, escapes);
+ }
+ }
+ return retVal___;
+}
+size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_sv_unescape_c_pre ) {
+ size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func;
+ retVal___ = preHookFunc(out_dest, src, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len);
+ }
+ if( HPMHooks.count.HP_sv_unescape_c_post ) {
+ size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, out_dest, src, &len);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sv_skip_escaped_c(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.skip_escaped_c(p);
+ }
+ if( HPMHooks.count.HP_sv_skip_escaped_c_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sv_readdb_pre ) {
+ bool (*preHookFunc) (const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current));
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func;
+ retVal___ = preHookFunc(directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc);
+ }
+ if( HPMHooks.count.HP_sv_readdb_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current));
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc);
+ }
+ }
+ return retVal___;
+}
+/* sysinfo */
+int HP_sysinfo_getpagesize(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.getpagesize();
+ }
+ if( HPMHooks.count.HP_sysinfo_getpagesize_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_platform(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_platform_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.platform();
+ }
+ if( HPMHooks.count.HP_sysinfo_platform_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_osversion(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_osversion_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.osversion();
+ }
+ if( HPMHooks.count.HP_sysinfo_osversion_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_cpu(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_cpu_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.cpu();
+ }
+ if( HPMHooks.count.HP_sysinfo_cpu_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_sysinfo_cpucores(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sysinfo_cpucores_pre ) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.cpucores();
+ }
+ if( HPMHooks.count.HP_sysinfo_cpucores_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_arch(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_arch_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.arch();
+ }
+ if( HPMHooks.count.HP_sysinfo_arch_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_sysinfo_is64bit(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sysinfo_is64bit_pre ) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.is64bit();
+ }
+ if( HPMHooks.count.HP_sysinfo_is64bit_post ) {
+ bool (*postHookFunc) (bool retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_compiler(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_compiler_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.compiler();
+ }
+ if( HPMHooks.count.HP_sysinfo_compiler_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_cflags(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_cflags_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.cflags();
+ }
+ if( HPMHooks.count.HP_sysinfo_cflags_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_vcstype(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_vcstype_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcstype();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcstype_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_sysinfo_vcstypeid(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcstypeid();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_vcsrevision_src(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcsrevision_src();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_vcsrevision_scripts(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_sysinfo_vcsrevision_reload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sysinfo.vcsrevision_reload();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_sysinfo_is_superuser(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.is_superuser();
+ }
+ if( HPMHooks.count.HP_sysinfo_is_superuser_post ) {
+ bool (*postHookFunc) (bool retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_sysinfo_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sysinfo_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sysinfo.init();
+ }
+ if( HPMHooks.count.HP_sysinfo_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_sysinfo_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sysinfo_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sysinfo.final();
+ }
+ if( HPMHooks.count.HP_sysinfo_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* timer */
+int64 HP_timer_gettick(void) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_gettick_pre ) {
+ int64 (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.gettick();
+ }
+ if( HPMHooks.count.HP_timer_gettick_post ) {
+ int64 (*postHookFunc) (int64 retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int64 HP_timer_gettick_nocache(void) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_gettick_nocache_pre ) {
+ int64 (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.gettick_nocache();
+ }
+ if( HPMHooks.count.HP_timer_gettick_nocache_post ) {
+ int64 (*postHookFunc) (int64 retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_add_pre ) {
+ int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func;
+ retVal___ = preHookFunc(&tick, &func, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.add(tick, func, id, data);
+ }
+ if( HPMHooks.count.HP_timer_add_post ) {
+ int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_add_interval_pre ) {
+ int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func;
+ retVal___ = preHookFunc(&tick, &func, &id, &data, &interval);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval);
+ }
+ if( HPMHooks.count.HP_timer_add_interval_post ) {
+ int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data, &interval);
+ }
+ }
+ return retVal___;
+}
+const struct TimerData* HP_timer_get(int tid) {
+ int hIndex = 0;
+ const struct TimerData* retVal___ = NULL;
+ if( HPMHooks.count.HP_timer_get_pre ) {
+ const struct TimerData* (*preHookFunc) (int *tid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.get(tid);
+ }
+ if( HPMHooks.count.HP_timer_get_post ) {
+ const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int *tid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_delete(int tid, TimerFunc func) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_delete_pre ) {
+ int (*preHookFunc) (int *tid, TimerFunc *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.delete(tid, func);
+ }
+ if( HPMHooks.count.HP_timer_delete_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, TimerFunc *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &func);
+ }
+ }
+ return retVal___;
+}
+int64 HP_timer_addtick(int tid, int64 tick) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_addtick_pre ) {
+ int64 (*preHookFunc) (int *tid, int64 *tick);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.addtick(tid, tick);
+ }
+ if( HPMHooks.count.HP_timer_addtick_post ) {
+ int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick);
+ }
+ }
+ return retVal___;
+}
+int64 HP_timer_settick(int tid, int64 tick) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_settick_pre ) {
+ int64 (*preHookFunc) (int *tid, int64 *tick);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.settick(tid, tick);
+ }
+ if( HPMHooks.count.HP_timer_settick_post ) {
+ int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_add_func_list(TimerFunc func, char *name) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_add_func_list_pre ) {
+ int (*preHookFunc) (TimerFunc *func, char *name);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func;
+ retVal___ = preHookFunc(&func, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.add_func_list(func, name);
+ }
+ if( HPMHooks.count.HP_timer_add_func_list_post ) {
+ int (*postHookFunc) (int retVal___, TimerFunc *func, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &func, name);
+ }
+ }
+ return retVal___;
+}
+unsigned long HP_timer_get_uptime(void) {
+ int hIndex = 0;
+ unsigned long retVal___ = 0;
+ if( HPMHooks.count.HP_timer_get_uptime_pre ) {
+ unsigned long (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.get_uptime();
+ }
+ if( HPMHooks.count.HP_timer_get_uptime_post ) {
+ unsigned long (*postHookFunc) (unsigned long retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_perform(int64 tick) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_perform_pre ) {
+ int (*preHookFunc) (int64 *tick);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func;
+ retVal___ = preHookFunc(&tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.perform(tick);
+ }
+ if( HPMHooks.count.HP_timer_perform_post ) {
+ int (*postHookFunc) (int retVal___, int64 *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tick);
+ }
+ }
+ return retVal___;
+}
+void HP_timer_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_timer_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.timer.init();
+ }
+ if( HPMHooks.count.HP_timer_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_timer_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_timer_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.timer.final();
+ }
+ if( HPMHooks.count.HP_timer_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
index aa1bb2625..aed0dc77f 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
@@ -4,4 +4,20 @@
// NOTE: This file was auto-generated and should never be manually edited,
// as it will get overwritten.
+memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface));
+memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface));
+memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface));
+memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface));
+memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface));
+memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface));
memcpy(&HPMHooks.source.login, login, sizeof(struct login_interface));
+memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface));
+memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface));
+memcpy(&HPMHooks.source.showmsg, showmsg, sizeof(struct showmsg_interface));
+memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface));
+memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface));
+memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface));
+memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface));
+memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface));
+memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface));
+memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_interface));
diff --git a/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc b/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc
deleted file mode 100644
index 88fe7745a..000000000
--- a/src/plugins/HPMHooking/HPMHooking_map.GetSymbol.inc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
-
-if( !(atcommand = GET_SYMBOL("atcommand") ) ) return "atcommand";
-if( !(battle = GET_SYMBOL("battle") ) ) return "battle";
-if( !(bg = GET_SYMBOL("battlegrounds") ) ) return "battlegrounds";
-if( !(buyingstore = GET_SYMBOL("buyingstore") ) ) return "buyingstore";
-if( !(channel = GET_SYMBOL("channel") ) ) return "channel";
-if( !(chat = GET_SYMBOL("chat") ) ) return "chat";
-if( !(chrif = GET_SYMBOL("chrif") ) ) return "chrif";
-if( !(clif = GET_SYMBOL("clif") ) ) return "clif";
-if( !(duel = GET_SYMBOL("duel") ) ) return "duel";
-if( !(elemental = GET_SYMBOL("elemental") ) ) return "elemental";
-if( !(guild = GET_SYMBOL("guild") ) ) return "guild";
-if( !(gstorage = GET_SYMBOL("gstorage") ) ) return "gstorage";
-if( !(homun = GET_SYMBOL("homun") ) ) return "homun";
-if( !(instance = GET_SYMBOL("instance") ) ) return "instance";
-if( !(intif = GET_SYMBOL("intif") ) ) return "intif";
-if( !(ircbot = GET_SYMBOL("ircbot") ) ) return "ircbot";
-if( !(itemdb = GET_SYMBOL("itemdb") ) ) return "itemdb";
-if( !(logs = GET_SYMBOL("logs") ) ) return "logs";
-if( !(mail = GET_SYMBOL("mail") ) ) return "mail";
-if( !(map = GET_SYMBOL("map") ) ) return "map";
-if( !(mapit = GET_SYMBOL("mapit") ) ) return "mapit";
-if( !(mapreg = GET_SYMBOL("mapreg") ) ) return "mapreg";
-if( !(mercenary = GET_SYMBOL("mercenary") ) ) return "mercenary";
-if( !(mob = GET_SYMBOL("mob") ) ) return "mob";
-if( !(npc = GET_SYMBOL("npc") ) ) return "npc";
-if( !(party = GET_SYMBOL("party") ) ) return "party";
-if( !(path = GET_SYMBOL("path") ) ) return "path";
-if( !(pcg = GET_SYMBOL("pc_groups") ) ) return "pc_groups";
-if( !(pc = GET_SYMBOL("pc") ) ) return "pc";
-if( !(pet = GET_SYMBOL("pet") ) ) return "pet";
-if( !(quest = GET_SYMBOL("quest") ) ) return "quest";
-if( !(script = GET_SYMBOL("script") ) ) return "script";
-if( !(searchstore = GET_SYMBOL("searchstore") ) ) return "searchstore";
-if( !(skill = GET_SYMBOL("skill") ) ) return "skill";
-if( !(status = GET_SYMBOL("status") ) ) return "status";
-if( !(storage = GET_SYMBOL("storage") ) ) return "storage";
-if( !(trade = GET_SYMBOL("trade") ) ) return "trade";
-if( !(unit = GET_SYMBOL("unit") ) ) return "unit";
-if( !(vending = GET_SYMBOL("vending") ) ) return "vending";
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index f3e3711c1..28892e84d 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -5,6 +5,12 @@
// as it will get overwritten.
struct {
+ struct HPMHookPoint *HP_HCache_init_pre;
+ struct HPMHookPoint *HP_HCache_init_post;
+ struct HPMHookPoint *HP_HCache_check_pre;
+ struct HPMHookPoint *HP_HCache_check_post;
+ struct HPMHookPoint *HP_HCache_open_pre;
+ struct HPMHookPoint *HP_HCache_open_post;
struct HPMHookPoint *HP_atcommand_init_pre;
struct HPMHookPoint *HP_atcommand_init_post;
struct HPMHookPoint *HP_atcommand_final_pre;
@@ -1807,6 +1813,64 @@ struct {
struct HPMHookPoint *HP_clif_pNPCMarketClosed_post;
struct HPMHookPoint *HP_clif_pNPCMarketPurchase_pre;
struct HPMHookPoint *HP_clif_pNPCMarketPurchase_post;
+ struct HPMHookPoint *HP_cmdline_init_pre;
+ struct HPMHookPoint *HP_cmdline_init_post;
+ struct HPMHookPoint *HP_cmdline_final_pre;
+ struct HPMHookPoint *HP_cmdline_final_post;
+ struct HPMHookPoint *HP_cmdline_arg_add_pre;
+ struct HPMHookPoint *HP_cmdline_arg_add_post;
+ struct HPMHookPoint *HP_cmdline_exec_pre;
+ struct HPMHookPoint *HP_cmdline_exec_post;
+ struct HPMHookPoint *HP_cmdline_arg_next_value_pre;
+ struct HPMHookPoint *HP_cmdline_arg_next_value_post;
+ struct HPMHookPoint *HP_cmdline_arg_source_pre;
+ struct HPMHookPoint *HP_cmdline_arg_source_post;
+ struct HPMHookPoint *HP_console_init_pre;
+ struct HPMHookPoint *HP_console_init_post;
+ struct HPMHookPoint *HP_console_final_pre;
+ struct HPMHookPoint *HP_console_final_post;
+ struct HPMHookPoint *HP_console_display_title_pre;
+ struct HPMHookPoint *HP_console_display_title_post;
+ struct HPMHookPoint *HP_core_shutdown_callback_pre;
+ struct HPMHookPoint *HP_core_shutdown_callback_post;
+ struct HPMHookPoint *HP_DB_fix_options_pre;
+ struct HPMHookPoint *HP_DB_fix_options_post;
+ struct HPMHookPoint *HP_DB_default_cmp_pre;
+ struct HPMHookPoint *HP_DB_default_cmp_post;
+ struct HPMHookPoint *HP_DB_default_hash_pre;
+ struct HPMHookPoint *HP_DB_default_hash_post;
+ struct HPMHookPoint *HP_DB_default_release_pre;
+ struct HPMHookPoint *HP_DB_default_release_post;
+ struct HPMHookPoint *HP_DB_custom_release_pre;
+ struct HPMHookPoint *HP_DB_custom_release_post;
+ struct HPMHookPoint *HP_DB_alloc_pre;
+ struct HPMHookPoint *HP_DB_alloc_post;
+ struct HPMHookPoint *HP_DB_i2key_pre;
+ struct HPMHookPoint *HP_DB_i2key_post;
+ struct HPMHookPoint *HP_DB_ui2key_pre;
+ struct HPMHookPoint *HP_DB_ui2key_post;
+ struct HPMHookPoint *HP_DB_str2key_pre;
+ struct HPMHookPoint *HP_DB_str2key_post;
+ struct HPMHookPoint *HP_DB_i642key_pre;
+ struct HPMHookPoint *HP_DB_i642key_post;
+ struct HPMHookPoint *HP_DB_ui642key_pre;
+ struct HPMHookPoint *HP_DB_ui642key_post;
+ struct HPMHookPoint *HP_DB_i2data_pre;
+ struct HPMHookPoint *HP_DB_i2data_post;
+ struct HPMHookPoint *HP_DB_ui2data_pre;
+ struct HPMHookPoint *HP_DB_ui2data_post;
+ struct HPMHookPoint *HP_DB_ptr2data_pre;
+ struct HPMHookPoint *HP_DB_ptr2data_post;
+ struct HPMHookPoint *HP_DB_data2i_pre;
+ struct HPMHookPoint *HP_DB_data2i_post;
+ struct HPMHookPoint *HP_DB_data2ui_pre;
+ struct HPMHookPoint *HP_DB_data2ui_post;
+ struct HPMHookPoint *HP_DB_data2ptr_pre;
+ struct HPMHookPoint *HP_DB_data2ptr_post;
+ struct HPMHookPoint *HP_DB_init_pre;
+ struct HPMHookPoint *HP_DB_init_post;
+ struct HPMHookPoint *HP_DB_final_pre;
+ struct HPMHookPoint *HP_DB_final_post;
struct HPMHookPoint *HP_duel_create_pre;
struct HPMHookPoint *HP_duel_create_post;
struct HPMHookPoint *HP_duel_invite_pre;
@@ -2635,6 +2699,122 @@ struct {
struct HPMHookPoint *HP_itemdb_is_item_usable_post;
struct HPMHookPoint *HP_itemdb_lookup_const_pre;
struct HPMHookPoint *HP_itemdb_lookup_const_post;
+ struct HPMHookPoint *HP_libconfig_read_pre;
+ struct HPMHookPoint *HP_libconfig_read_post;
+ struct HPMHookPoint *HP_libconfig_write_pre;
+ struct HPMHookPoint *HP_libconfig_write_post;
+ struct HPMHookPoint *HP_libconfig_set_auto_convert_pre;
+ struct HPMHookPoint *HP_libconfig_set_auto_convert_post;
+ struct HPMHookPoint *HP_libconfig_get_auto_convert_pre;
+ struct HPMHookPoint *HP_libconfig_get_auto_convert_post;
+ struct HPMHookPoint *HP_libconfig_read_string_pre;
+ struct HPMHookPoint *HP_libconfig_read_string_post;
+ struct HPMHookPoint *HP_libconfig_read_file_src_pre;
+ struct HPMHookPoint *HP_libconfig_read_file_src_post;
+ struct HPMHookPoint *HP_libconfig_write_file_pre;
+ struct HPMHookPoint *HP_libconfig_write_file_post;
+ struct HPMHookPoint *HP_libconfig_set_destructor_pre;
+ struct HPMHookPoint *HP_libconfig_set_destructor_post;
+ struct HPMHookPoint *HP_libconfig_set_include_dir_pre;
+ struct HPMHookPoint *HP_libconfig_set_include_dir_post;
+ struct HPMHookPoint *HP_libconfig_init_pre;
+ struct HPMHookPoint *HP_libconfig_init_post;
+ struct HPMHookPoint *HP_libconfig_destroy_pre;
+ struct HPMHookPoint *HP_libconfig_destroy_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int64_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_int64_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_float_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_float_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_bool_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_bool_post;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_string_pre;
+ struct HPMHookPoint *HP_libconfig_setting_lookup_string_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_format_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_format_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_format_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_format_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_int64_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_float_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_bool_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_string_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_int64_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_float_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_bool_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_string_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_index_pre;
+ struct HPMHookPoint *HP_libconfig_setting_index_post;
+ struct HPMHookPoint *HP_libconfig_setting_length_pre;
+ struct HPMHookPoint *HP_libconfig_setting_length_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_get_member_pre;
+ struct HPMHookPoint *HP_libconfig_setting_get_member_post;
+ struct HPMHookPoint *HP_libconfig_setting_add_pre;
+ struct HPMHookPoint *HP_libconfig_setting_add_post;
+ struct HPMHookPoint *HP_libconfig_setting_remove_pre;
+ struct HPMHookPoint *HP_libconfig_setting_remove_post;
+ struct HPMHookPoint *HP_libconfig_setting_remove_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_remove_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_set_hook_pre;
+ struct HPMHookPoint *HP_libconfig_setting_set_hook_post;
+ struct HPMHookPoint *HP_libconfig_lookup_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_post;
+ struct HPMHookPoint *HP_libconfig_lookup_from_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_from_post;
+ struct HPMHookPoint *HP_libconfig_lookup_int_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_int_post;
+ struct HPMHookPoint *HP_libconfig_lookup_int64_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_int64_post;
+ struct HPMHookPoint *HP_libconfig_lookup_float_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_float_post;
+ struct HPMHookPoint *HP_libconfig_lookup_bool_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_bool_post;
+ struct HPMHookPoint *HP_libconfig_lookup_string_pre;
+ struct HPMHookPoint *HP_libconfig_lookup_string_post;
+ struct HPMHookPoint *HP_libconfig_read_file_pre;
+ struct HPMHookPoint *HP_libconfig_read_file_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_simple_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_simple_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_elem_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_elem_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_aggregate_post;
+ struct HPMHookPoint *HP_libconfig_setting_copy_pre;
+ struct HPMHookPoint *HP_libconfig_setting_copy_post;
struct HPMHookPoint *HP_logs_pick_pc_pre;
struct HPMHookPoint *HP_logs_pick_pc_post;
struct HPMHookPoint *HP_logs_pick_mob_pre;
@@ -2697,6 +2877,32 @@ struct {
struct HPMHookPoint *HP_mail_deliveryfail_post;
struct HPMHookPoint *HP_mail_invalid_operation_pre;
struct HPMHookPoint *HP_mail_invalid_operation_post;
+ struct HPMHookPoint *HP_iMalloc_init_pre;
+ struct HPMHookPoint *HP_iMalloc_init_post;
+ struct HPMHookPoint *HP_iMalloc_final_pre;
+ struct HPMHookPoint *HP_iMalloc_final_post;
+ struct HPMHookPoint *HP_iMalloc_malloc_pre;
+ struct HPMHookPoint *HP_iMalloc_malloc_post;
+ struct HPMHookPoint *HP_iMalloc_calloc_pre;
+ struct HPMHookPoint *HP_iMalloc_calloc_post;
+ struct HPMHookPoint *HP_iMalloc_realloc_pre;
+ struct HPMHookPoint *HP_iMalloc_realloc_post;
+ struct HPMHookPoint *HP_iMalloc_reallocz_pre;
+ struct HPMHookPoint *HP_iMalloc_reallocz_post;
+ struct HPMHookPoint *HP_iMalloc_astrdup_pre;
+ struct HPMHookPoint *HP_iMalloc_astrdup_post;
+ struct HPMHookPoint *HP_iMalloc_free_pre;
+ struct HPMHookPoint *HP_iMalloc_free_post;
+ struct HPMHookPoint *HP_iMalloc_memory_check_pre;
+ struct HPMHookPoint *HP_iMalloc_memory_check_post;
+ struct HPMHookPoint *HP_iMalloc_verify_ptr_pre;
+ struct HPMHookPoint *HP_iMalloc_verify_ptr_post;
+ struct HPMHookPoint *HP_iMalloc_usage_pre;
+ struct HPMHookPoint *HP_iMalloc_usage_post;
+ struct HPMHookPoint *HP_iMalloc_post_shutdown_pre;
+ struct HPMHookPoint *HP_iMalloc_post_shutdown_post;
+ struct HPMHookPoint *HP_iMalloc_init_messages_pre;
+ struct HPMHookPoint *HP_iMalloc_init_messages_post;
struct HPMHookPoint *HP_map_zone_init_pre;
struct HPMHookPoint *HP_map_zone_init_post;
struct HPMHookPoint *HP_map_zone_remove_pre;
@@ -2953,6 +3159,24 @@ struct {
struct HPMHookPoint *HP_map_merge_zone_post;
struct HPMHookPoint *HP_map_zone_clear_single_pre;
struct HPMHookPoint *HP_map_zone_clear_single_post;
+ struct HPMHookPoint *HP_mapindex_init_pre;
+ struct HPMHookPoint *HP_mapindex_init_post;
+ struct HPMHookPoint *HP_mapindex_final_pre;
+ struct HPMHookPoint *HP_mapindex_final_post;
+ struct HPMHookPoint *HP_mapindex_addmap_pre;
+ struct HPMHookPoint *HP_mapindex_addmap_post;
+ struct HPMHookPoint *HP_mapindex_removemap_pre;
+ struct HPMHookPoint *HP_mapindex_removemap_post;
+ struct HPMHookPoint *HP_mapindex_getmapname_pre;
+ struct HPMHookPoint *HP_mapindex_getmapname_post;
+ struct HPMHookPoint *HP_mapindex_getmapname_ext_pre;
+ struct HPMHookPoint *HP_mapindex_getmapname_ext_post;
+ struct HPMHookPoint *HP_mapindex_name2id_pre;
+ struct HPMHookPoint *HP_mapindex_name2id_post;
+ struct HPMHookPoint *HP_mapindex_id2name_pre;
+ struct HPMHookPoint *HP_mapindex_id2name_post;
+ struct HPMHookPoint *HP_mapindex_check_default_pre;
+ struct HPMHookPoint *HP_mapindex_check_default_post;
struct HPMHookPoint *HP_mapit_alloc_pre;
struct HPMHookPoint *HP_mapit_alloc_post;
struct HPMHookPoint *HP_mapit_free_pre;
@@ -3441,6 +3665,8 @@ struct {
struct HPMHookPoint *HP_npc_db_checkid_post;
struct HPMHookPoint *HP_npc_secure_timeout_timer_pre;
struct HPMHookPoint *HP_npc_secure_timeout_timer_post;
+ struct HPMHookPoint *HP_nullpo_assert_report_pre;
+ struct HPMHookPoint *HP_nullpo_assert_report_post;
struct HPMHookPoint *HP_party_init_pre;
struct HPMHookPoint *HP_party_init_post;
struct HPMHookPoint *HP_party_final_pre;
@@ -4159,6 +4385,10 @@ struct {
struct HPMHookPoint *HP_script_label_add_post;
struct HPMHookPoint *HP_script_run_pre;
struct HPMHookPoint *HP_script_run_post;
+ struct HPMHookPoint *HP_script_run_npc_pre;
+ struct HPMHookPoint *HP_script_run_npc_post;
+ struct HPMHookPoint *HP_script_run_pet_pre;
+ struct HPMHookPoint *HP_script_run_pet_post;
struct HPMHookPoint *HP_script_run_main_pre;
struct HPMHookPoint *HP_script_run_main_post;
struct HPMHookPoint *HP_script_run_timer_pre;
@@ -4391,6 +4621,12 @@ struct {
struct HPMHookPoint *HP_script_get_translation_file_name_post;
struct HPMHookPoint *HP_script_parser_clean_leftovers_pre;
struct HPMHookPoint *HP_script_parser_clean_leftovers_post;
+ struct HPMHookPoint *HP_script_run_use_script_pre;
+ struct HPMHookPoint *HP_script_run_use_script_post;
+ struct HPMHookPoint *HP_script_run_item_equip_script_pre;
+ struct HPMHookPoint *HP_script_run_item_equip_script_post;
+ struct HPMHookPoint *HP_script_run_item_unequip_script_pre;
+ struct HPMHookPoint *HP_script_run_item_unequip_script_post;
struct HPMHookPoint *HP_searchstore_open_pre;
struct HPMHookPoint *HP_searchstore_open_post;
struct HPMHookPoint *HP_searchstore_query_pre;
@@ -4411,6 +4647,14 @@ struct {
struct HPMHookPoint *HP_searchstore_clearremote_post;
struct HPMHookPoint *HP_searchstore_result_pre;
struct HPMHookPoint *HP_searchstore_result_post;
+ struct HPMHookPoint *HP_showmsg_init_pre;
+ struct HPMHookPoint *HP_showmsg_init_post;
+ struct HPMHookPoint *HP_showmsg_final_pre;
+ struct HPMHookPoint *HP_showmsg_final_post;
+ struct HPMHookPoint *HP_showmsg_clearScreen_pre;
+ struct HPMHookPoint *HP_showmsg_clearScreen_post;
+ struct HPMHookPoint *HP_showmsg_showMessageV_pre;
+ struct HPMHookPoint *HP_showmsg_showMessageV_post;
struct HPMHookPoint *HP_skill_init_pre;
struct HPMHookPoint *HP_skill_init_post;
struct HPMHookPoint *HP_skill_final_pre;
@@ -4845,6 +5089,126 @@ struct {
struct HPMHookPoint *HP_skill_get_requirement_item_unknown_post;
struct HPMHookPoint *HP_skill_get_requirement_unknown_pre;
struct HPMHookPoint *HP_skill_get_requirement_unknown_post;
+ struct HPMHookPoint *HP_sockt_init_pre;
+ struct HPMHookPoint *HP_sockt_init_post;
+ struct HPMHookPoint *HP_sockt_final_pre;
+ struct HPMHookPoint *HP_sockt_final_post;
+ struct HPMHookPoint *HP_sockt_perform_pre;
+ struct HPMHookPoint *HP_sockt_perform_post;
+ struct HPMHookPoint *HP_sockt_datasync_pre;
+ struct HPMHookPoint *HP_sockt_datasync_post;
+ struct HPMHookPoint *HP_sockt_make_listen_bind_pre;
+ struct HPMHookPoint *HP_sockt_make_listen_bind_post;
+ struct HPMHookPoint *HP_sockt_make_connection_pre;
+ struct HPMHookPoint *HP_sockt_make_connection_post;
+ struct HPMHookPoint *HP_sockt_realloc_fifo_pre;
+ struct HPMHookPoint *HP_sockt_realloc_fifo_post;
+ struct HPMHookPoint *HP_sockt_realloc_writefifo_pre;
+ struct HPMHookPoint *HP_sockt_realloc_writefifo_post;
+ struct HPMHookPoint *HP_sockt_wfifoset_pre;
+ struct HPMHookPoint *HP_sockt_wfifoset_post;
+ struct HPMHookPoint *HP_sockt_rfifoskip_pre;
+ struct HPMHookPoint *HP_sockt_rfifoskip_post;
+ struct HPMHookPoint *HP_sockt_close_pre;
+ struct HPMHookPoint *HP_sockt_close_post;
+ struct HPMHookPoint *HP_sockt_session_is_valid_pre;
+ struct HPMHookPoint *HP_sockt_session_is_valid_post;
+ struct HPMHookPoint *HP_sockt_session_is_active_pre;
+ struct HPMHookPoint *HP_sockt_session_is_active_post;
+ struct HPMHookPoint *HP_sockt_flush_pre;
+ struct HPMHookPoint *HP_sockt_flush_post;
+ struct HPMHookPoint *HP_sockt_flush_fifos_pre;
+ struct HPMHookPoint *HP_sockt_flush_fifos_post;
+ struct HPMHookPoint *HP_sockt_set_nonblocking_pre;
+ struct HPMHookPoint *HP_sockt_set_nonblocking_post;
+ struct HPMHookPoint *HP_sockt_set_defaultparse_pre;
+ struct HPMHookPoint *HP_sockt_set_defaultparse_post;
+ struct HPMHookPoint *HP_sockt_host2ip_pre;
+ struct HPMHookPoint *HP_sockt_host2ip_post;
+ struct HPMHookPoint *HP_sockt_ip2str_pre;
+ struct HPMHookPoint *HP_sockt_ip2str_post;
+ struct HPMHookPoint *HP_sockt_str2ip_pre;
+ struct HPMHookPoint *HP_sockt_str2ip_post;
+ struct HPMHookPoint *HP_sockt_ntows_pre;
+ struct HPMHookPoint *HP_sockt_ntows_post;
+ struct HPMHookPoint *HP_sockt_getips_pre;
+ struct HPMHookPoint *HP_sockt_getips_post;
+ struct HPMHookPoint *HP_sockt_eof_pre;
+ struct HPMHookPoint *HP_sockt_eof_post;
+ struct HPMHookPoint *HP_sockt_lan_subnet_check_pre;
+ struct HPMHookPoint *HP_sockt_lan_subnet_check_post;
+ struct HPMHookPoint *HP_sockt_allowed_ip_check_pre;
+ struct HPMHookPoint *HP_sockt_allowed_ip_check_post;
+ struct HPMHookPoint *HP_sockt_trusted_ip_check_pre;
+ struct HPMHookPoint *HP_sockt_trusted_ip_check_post;
+ struct HPMHookPoint *HP_sockt_net_config_read_sub_pre;
+ struct HPMHookPoint *HP_sockt_net_config_read_sub_post;
+ struct HPMHookPoint *HP_sockt_net_config_read_pre;
+ struct HPMHookPoint *HP_sockt_net_config_read_post;
+ struct HPMHookPoint *HP_SQL_Connect_pre;
+ struct HPMHookPoint *HP_SQL_Connect_post;
+ struct HPMHookPoint *HP_SQL_GetTimeout_pre;
+ struct HPMHookPoint *HP_SQL_GetTimeout_post;
+ struct HPMHookPoint *HP_SQL_GetColumnNames_pre;
+ struct HPMHookPoint *HP_SQL_GetColumnNames_post;
+ struct HPMHookPoint *HP_SQL_SetEncoding_pre;
+ struct HPMHookPoint *HP_SQL_SetEncoding_post;
+ struct HPMHookPoint *HP_SQL_Ping_pre;
+ struct HPMHookPoint *HP_SQL_Ping_post;
+ struct HPMHookPoint *HP_SQL_EscapeString_pre;
+ struct HPMHookPoint *HP_SQL_EscapeString_post;
+ struct HPMHookPoint *HP_SQL_EscapeStringLen_pre;
+ struct HPMHookPoint *HP_SQL_EscapeStringLen_post;
+ struct HPMHookPoint *HP_SQL_QueryV_pre;
+ struct HPMHookPoint *HP_SQL_QueryV_post;
+ struct HPMHookPoint *HP_SQL_QueryStr_pre;
+ struct HPMHookPoint *HP_SQL_QueryStr_post;
+ struct HPMHookPoint *HP_SQL_LastInsertId_pre;
+ struct HPMHookPoint *HP_SQL_LastInsertId_post;
+ struct HPMHookPoint *HP_SQL_NumColumns_pre;
+ struct HPMHookPoint *HP_SQL_NumColumns_post;
+ struct HPMHookPoint *HP_SQL_NumRows_pre;
+ struct HPMHookPoint *HP_SQL_NumRows_post;
+ struct HPMHookPoint *HP_SQL_NextRow_pre;
+ struct HPMHookPoint *HP_SQL_NextRow_post;
+ struct HPMHookPoint *HP_SQL_GetData_pre;
+ struct HPMHookPoint *HP_SQL_GetData_post;
+ struct HPMHookPoint *HP_SQL_FreeResult_pre;
+ struct HPMHookPoint *HP_SQL_FreeResult_post;
+ struct HPMHookPoint *HP_SQL_ShowDebug__pre;
+ struct HPMHookPoint *HP_SQL_ShowDebug__post;
+ struct HPMHookPoint *HP_SQL_Free_pre;
+ struct HPMHookPoint *HP_SQL_Free_post;
+ struct HPMHookPoint *HP_SQL_Malloc_pre;
+ struct HPMHookPoint *HP_SQL_Malloc_post;
+ struct HPMHookPoint *HP_SQL_StmtMalloc_pre;
+ struct HPMHookPoint *HP_SQL_StmtMalloc_post;
+ struct HPMHookPoint *HP_SQL_StmtPrepareV_pre;
+ struct HPMHookPoint *HP_SQL_StmtPrepareV_post;
+ struct HPMHookPoint *HP_SQL_StmtPrepareStr_pre;
+ struct HPMHookPoint *HP_SQL_StmtPrepareStr_post;
+ struct HPMHookPoint *HP_SQL_StmtNumParams_pre;
+ struct HPMHookPoint *HP_SQL_StmtNumParams_post;
+ struct HPMHookPoint *HP_SQL_StmtBindParam_pre;
+ struct HPMHookPoint *HP_SQL_StmtBindParam_post;
+ struct HPMHookPoint *HP_SQL_StmtExecute_pre;
+ struct HPMHookPoint *HP_SQL_StmtExecute_post;
+ struct HPMHookPoint *HP_SQL_StmtLastInsertId_pre;
+ struct HPMHookPoint *HP_SQL_StmtLastInsertId_post;
+ struct HPMHookPoint *HP_SQL_StmtNumColumns_pre;
+ struct HPMHookPoint *HP_SQL_StmtNumColumns_post;
+ struct HPMHookPoint *HP_SQL_StmtBindColumn_pre;
+ struct HPMHookPoint *HP_SQL_StmtBindColumn_post;
+ struct HPMHookPoint *HP_SQL_StmtNumRows_pre;
+ struct HPMHookPoint *HP_SQL_StmtNumRows_post;
+ struct HPMHookPoint *HP_SQL_StmtNextRow_pre;
+ struct HPMHookPoint *HP_SQL_StmtNextRow_post;
+ struct HPMHookPoint *HP_SQL_StmtFreeResult_pre;
+ struct HPMHookPoint *HP_SQL_StmtFreeResult_post;
+ struct HPMHookPoint *HP_SQL_StmtFree_pre;
+ struct HPMHookPoint *HP_SQL_StmtFree_post;
+ struct HPMHookPoint *HP_SQL_StmtShowDebug__pre;
+ struct HPMHookPoint *HP_SQL_StmtShowDebug__post;
struct HPMHookPoint *HP_status_init_pre;
struct HPMHookPoint *HP_status_init_post;
struct HPMHookPoint *HP_status_final_pre;
@@ -4941,6 +5305,8 @@ struct {
struct HPMHookPoint *HP_status_calc_pet__post;
struct HPMHookPoint *HP_status_calc_pc__pre;
struct HPMHookPoint *HP_status_calc_pc__post;
+ struct HPMHookPoint *HP_status_calc_pc_additional_pre;
+ struct HPMHookPoint *HP_status_calc_pc_additional_post;
struct HPMHookPoint *HP_status_calc_homunculus__pre;
struct HPMHookPoint *HP_status_calc_homunculus__post;
struct HPMHookPoint *HP_status_calc_mercenary__pre;
@@ -5091,6 +5457,130 @@ struct {
struct HPMHookPoint *HP_storage_sortitem_post;
struct HPMHookPoint *HP_storage_reconnect_sub_pre;
struct HPMHookPoint *HP_storage_reconnect_sub_post;
+ struct HPMHookPoint *HP_StrBuf_Malloc_pre;
+ struct HPMHookPoint *HP_StrBuf_Malloc_post;
+ struct HPMHookPoint *HP_StrBuf_Init_pre;
+ struct HPMHookPoint *HP_StrBuf_Init_post;
+ struct HPMHookPoint *HP_StrBuf_Vprintf_pre;
+ struct HPMHookPoint *HP_StrBuf_Vprintf_post;
+ struct HPMHookPoint *HP_StrBuf_Append_pre;
+ struct HPMHookPoint *HP_StrBuf_Append_post;
+ struct HPMHookPoint *HP_StrBuf_AppendStr_pre;
+ struct HPMHookPoint *HP_StrBuf_AppendStr_post;
+ struct HPMHookPoint *HP_StrBuf_Length_pre;
+ struct HPMHookPoint *HP_StrBuf_Length_post;
+ struct HPMHookPoint *HP_StrBuf_Value_pre;
+ struct HPMHookPoint *HP_StrBuf_Value_post;
+ struct HPMHookPoint *HP_StrBuf_Clear_pre;
+ struct HPMHookPoint *HP_StrBuf_Clear_post;
+ struct HPMHookPoint *HP_StrBuf_Destroy_pre;
+ struct HPMHookPoint *HP_StrBuf_Destroy_post;
+ struct HPMHookPoint *HP_StrBuf_Free_pre;
+ struct HPMHookPoint *HP_StrBuf_Free_post;
+ struct HPMHookPoint *HP_strlib_jstrescape_pre;
+ struct HPMHookPoint *HP_strlib_jstrescape_post;
+ struct HPMHookPoint *HP_strlib_jstrescapecpy_pre;
+ struct HPMHookPoint *HP_strlib_jstrescapecpy_post;
+ struct HPMHookPoint *HP_strlib_jmemescapecpy_pre;
+ struct HPMHookPoint *HP_strlib_jmemescapecpy_post;
+ struct HPMHookPoint *HP_strlib_remove_control_chars__pre;
+ struct HPMHookPoint *HP_strlib_remove_control_chars__post;
+ struct HPMHookPoint *HP_strlib_trim__pre;
+ struct HPMHookPoint *HP_strlib_trim__post;
+ struct HPMHookPoint *HP_strlib_normalize_name__pre;
+ struct HPMHookPoint *HP_strlib_normalize_name__post;
+ struct HPMHookPoint *HP_strlib_stristr__pre;
+ struct HPMHookPoint *HP_strlib_stristr__post;
+ struct HPMHookPoint *HP_strlib_strnlen__pre;
+ struct HPMHookPoint *HP_strlib_strnlen__post;
+ struct HPMHookPoint *HP_strlib_strtok_r__pre;
+ struct HPMHookPoint *HP_strlib_strtok_r__post;
+ struct HPMHookPoint *HP_strlib_e_mail_check__pre;
+ struct HPMHookPoint *HP_strlib_e_mail_check__post;
+ struct HPMHookPoint *HP_strlib_config_switch__pre;
+ struct HPMHookPoint *HP_strlib_config_switch__post;
+ struct HPMHookPoint *HP_strlib_safestrncpy__pre;
+ struct HPMHookPoint *HP_strlib_safestrncpy__post;
+ struct HPMHookPoint *HP_strlib_safestrnlen__pre;
+ struct HPMHookPoint *HP_strlib_safestrnlen__post;
+ struct HPMHookPoint *HP_strlib_strline__pre;
+ struct HPMHookPoint *HP_strlib_strline__post;
+ struct HPMHookPoint *HP_strlib_bin2hex__pre;
+ struct HPMHookPoint *HP_strlib_bin2hex__post;
+ struct HPMHookPoint *HP_sv_parse_next_pre;
+ struct HPMHookPoint *HP_sv_parse_next_post;
+ struct HPMHookPoint *HP_sv_parse_pre;
+ struct HPMHookPoint *HP_sv_parse_post;
+ struct HPMHookPoint *HP_sv_split_pre;
+ struct HPMHookPoint *HP_sv_split_post;
+ struct HPMHookPoint *HP_sv_escape_c_pre;
+ struct HPMHookPoint *HP_sv_escape_c_post;
+ struct HPMHookPoint *HP_sv_unescape_c_pre;
+ struct HPMHookPoint *HP_sv_unescape_c_post;
+ struct HPMHookPoint *HP_sv_skip_escaped_c_pre;
+ struct HPMHookPoint *HP_sv_skip_escaped_c_post;
+ struct HPMHookPoint *HP_sv_readdb_pre;
+ struct HPMHookPoint *HP_sv_readdb_post;
+ struct HPMHookPoint *HP_sysinfo_getpagesize_pre;
+ struct HPMHookPoint *HP_sysinfo_getpagesize_post;
+ struct HPMHookPoint *HP_sysinfo_platform_pre;
+ struct HPMHookPoint *HP_sysinfo_platform_post;
+ struct HPMHookPoint *HP_sysinfo_osversion_pre;
+ struct HPMHookPoint *HP_sysinfo_osversion_post;
+ struct HPMHookPoint *HP_sysinfo_cpu_pre;
+ struct HPMHookPoint *HP_sysinfo_cpu_post;
+ struct HPMHookPoint *HP_sysinfo_cpucores_pre;
+ struct HPMHookPoint *HP_sysinfo_cpucores_post;
+ struct HPMHookPoint *HP_sysinfo_arch_pre;
+ struct HPMHookPoint *HP_sysinfo_arch_post;
+ struct HPMHookPoint *HP_sysinfo_is64bit_pre;
+ struct HPMHookPoint *HP_sysinfo_is64bit_post;
+ struct HPMHookPoint *HP_sysinfo_compiler_pre;
+ struct HPMHookPoint *HP_sysinfo_compiler_post;
+ struct HPMHookPoint *HP_sysinfo_cflags_pre;
+ struct HPMHookPoint *HP_sysinfo_cflags_post;
+ struct HPMHookPoint *HP_sysinfo_vcstype_pre;
+ struct HPMHookPoint *HP_sysinfo_vcstype_post;
+ struct HPMHookPoint *HP_sysinfo_vcstypeid_pre;
+ struct HPMHookPoint *HP_sysinfo_vcstypeid_post;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_src_pre;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_src_post;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_pre;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_scripts_post;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_pre;
+ struct HPMHookPoint *HP_sysinfo_vcsrevision_reload_post;
+ struct HPMHookPoint *HP_sysinfo_is_superuser_pre;
+ struct HPMHookPoint *HP_sysinfo_is_superuser_post;
+ struct HPMHookPoint *HP_sysinfo_init_pre;
+ struct HPMHookPoint *HP_sysinfo_init_post;
+ struct HPMHookPoint *HP_sysinfo_final_pre;
+ struct HPMHookPoint *HP_sysinfo_final_post;
+ struct HPMHookPoint *HP_timer_gettick_pre;
+ struct HPMHookPoint *HP_timer_gettick_post;
+ struct HPMHookPoint *HP_timer_gettick_nocache_pre;
+ struct HPMHookPoint *HP_timer_gettick_nocache_post;
+ struct HPMHookPoint *HP_timer_add_pre;
+ struct HPMHookPoint *HP_timer_add_post;
+ struct HPMHookPoint *HP_timer_add_interval_pre;
+ struct HPMHookPoint *HP_timer_add_interval_post;
+ struct HPMHookPoint *HP_timer_get_pre;
+ struct HPMHookPoint *HP_timer_get_post;
+ struct HPMHookPoint *HP_timer_delete_pre;
+ struct HPMHookPoint *HP_timer_delete_post;
+ struct HPMHookPoint *HP_timer_addtick_pre;
+ struct HPMHookPoint *HP_timer_addtick_post;
+ struct HPMHookPoint *HP_timer_settick_pre;
+ struct HPMHookPoint *HP_timer_settick_post;
+ struct HPMHookPoint *HP_timer_add_func_list_pre;
+ struct HPMHookPoint *HP_timer_add_func_list_post;
+ struct HPMHookPoint *HP_timer_get_uptime_pre;
+ struct HPMHookPoint *HP_timer_get_uptime_post;
+ struct HPMHookPoint *HP_timer_perform_pre;
+ struct HPMHookPoint *HP_timer_perform_post;
+ struct HPMHookPoint *HP_timer_init_pre;
+ struct HPMHookPoint *HP_timer_init_post;
+ struct HPMHookPoint *HP_timer_final_pre;
+ struct HPMHookPoint *HP_timer_final_post;
struct HPMHookPoint *HP_trade_request_pre;
struct HPMHookPoint *HP_trade_request_post;
struct HPMHookPoint *HP_trade_ack_pre;
@@ -5224,6 +5714,12 @@ struct {
} list;
struct {
+ int HP_HCache_init_pre;
+ int HP_HCache_init_post;
+ int HP_HCache_check_pre;
+ int HP_HCache_check_post;
+ int HP_HCache_open_pre;
+ int HP_HCache_open_post;
int HP_atcommand_init_pre;
int HP_atcommand_init_post;
int HP_atcommand_final_pre;
@@ -7026,6 +7522,64 @@ struct {
int HP_clif_pNPCMarketClosed_post;
int HP_clif_pNPCMarketPurchase_pre;
int HP_clif_pNPCMarketPurchase_post;
+ int HP_cmdline_init_pre;
+ int HP_cmdline_init_post;
+ int HP_cmdline_final_pre;
+ int HP_cmdline_final_post;
+ int HP_cmdline_arg_add_pre;
+ int HP_cmdline_arg_add_post;
+ int HP_cmdline_exec_pre;
+ int HP_cmdline_exec_post;
+ int HP_cmdline_arg_next_value_pre;
+ int HP_cmdline_arg_next_value_post;
+ int HP_cmdline_arg_source_pre;
+ int HP_cmdline_arg_source_post;
+ int HP_console_init_pre;
+ int HP_console_init_post;
+ int HP_console_final_pre;
+ int HP_console_final_post;
+ int HP_console_display_title_pre;
+ int HP_console_display_title_post;
+ int HP_core_shutdown_callback_pre;
+ int HP_core_shutdown_callback_post;
+ int HP_DB_fix_options_pre;
+ int HP_DB_fix_options_post;
+ int HP_DB_default_cmp_pre;
+ int HP_DB_default_cmp_post;
+ int HP_DB_default_hash_pre;
+ int HP_DB_default_hash_post;
+ int HP_DB_default_release_pre;
+ int HP_DB_default_release_post;
+ int HP_DB_custom_release_pre;
+ int HP_DB_custom_release_post;
+ int HP_DB_alloc_pre;
+ int HP_DB_alloc_post;
+ int HP_DB_i2key_pre;
+ int HP_DB_i2key_post;
+ int HP_DB_ui2key_pre;
+ int HP_DB_ui2key_post;
+ int HP_DB_str2key_pre;
+ int HP_DB_str2key_post;
+ int HP_DB_i642key_pre;
+ int HP_DB_i642key_post;
+ int HP_DB_ui642key_pre;
+ int HP_DB_ui642key_post;
+ int HP_DB_i2data_pre;
+ int HP_DB_i2data_post;
+ int HP_DB_ui2data_pre;
+ int HP_DB_ui2data_post;
+ int HP_DB_ptr2data_pre;
+ int HP_DB_ptr2data_post;
+ int HP_DB_data2i_pre;
+ int HP_DB_data2i_post;
+ int HP_DB_data2ui_pre;
+ int HP_DB_data2ui_post;
+ int HP_DB_data2ptr_pre;
+ int HP_DB_data2ptr_post;
+ int HP_DB_init_pre;
+ int HP_DB_init_post;
+ int HP_DB_final_pre;
+ int HP_DB_final_post;
int HP_duel_create_pre;
int HP_duel_create_post;
int HP_duel_invite_pre;
@@ -7854,6 +8408,122 @@ struct {
int HP_itemdb_is_item_usable_post;
int HP_itemdb_lookup_const_pre;
int HP_itemdb_lookup_const_post;
+ int HP_libconfig_read_pre;
+ int HP_libconfig_read_post;
+ int HP_libconfig_write_pre;
+ int HP_libconfig_write_post;
+ int HP_libconfig_set_auto_convert_pre;
+ int HP_libconfig_set_auto_convert_post;
+ int HP_libconfig_get_auto_convert_pre;
+ int HP_libconfig_get_auto_convert_post;
+ int HP_libconfig_read_string_pre;
+ int HP_libconfig_read_string_post;
+ int HP_libconfig_read_file_src_pre;
+ int HP_libconfig_read_file_src_post;
+ int HP_libconfig_write_file_pre;
+ int HP_libconfig_write_file_post;
+ int HP_libconfig_set_destructor_pre;
+ int HP_libconfig_set_destructor_post;
+ int HP_libconfig_set_include_dir_pre;
+ int HP_libconfig_set_include_dir_post;
+ int HP_libconfig_init_pre;
+ int HP_libconfig_init_post;
+ int HP_libconfig_destroy_pre;
+ int HP_libconfig_destroy_post;
+ int HP_libconfig_setting_get_int_pre;
+ int HP_libconfig_setting_get_int_post;
+ int HP_libconfig_setting_get_int64_pre;
+ int HP_libconfig_setting_get_int64_post;
+ int HP_libconfig_setting_get_float_pre;
+ int HP_libconfig_setting_get_float_post;
+ int HP_libconfig_setting_get_bool_pre;
+ int HP_libconfig_setting_get_bool_post;
+ int HP_libconfig_setting_get_string_pre;
+ int HP_libconfig_setting_get_string_post;
+ int HP_libconfig_setting_lookup_int_pre;
+ int HP_libconfig_setting_lookup_int_post;
+ int HP_libconfig_setting_lookup_int64_pre;
+ int HP_libconfig_setting_lookup_int64_post;
+ int HP_libconfig_setting_lookup_float_pre;
+ int HP_libconfig_setting_lookup_float_post;
+ int HP_libconfig_setting_lookup_bool_pre;
+ int HP_libconfig_setting_lookup_bool_post;
+ int HP_libconfig_setting_lookup_string_pre;
+ int HP_libconfig_setting_lookup_string_post;
+ int HP_libconfig_setting_set_int_pre;
+ int HP_libconfig_setting_set_int_post;
+ int HP_libconfig_setting_set_int64_pre;
+ int HP_libconfig_setting_set_int64_post;
+ int HP_libconfig_setting_set_float_pre;
+ int HP_libconfig_setting_set_float_post;
+ int HP_libconfig_setting_set_bool_pre;
+ int HP_libconfig_setting_set_bool_post;
+ int HP_libconfig_setting_set_string_pre;
+ int HP_libconfig_setting_set_string_post;
+ int HP_libconfig_setting_set_format_pre;
+ int HP_libconfig_setting_set_format_post;
+ int HP_libconfig_setting_get_format_pre;
+ int HP_libconfig_setting_get_format_post;
+ int HP_libconfig_setting_get_int_elem_pre;
+ int HP_libconfig_setting_get_int_elem_post;
+ int HP_libconfig_setting_get_int64_elem_pre;
+ int HP_libconfig_setting_get_int64_elem_post;
+ int HP_libconfig_setting_get_float_elem_pre;
+ int HP_libconfig_setting_get_float_elem_post;
+ int HP_libconfig_setting_get_bool_elem_pre;
+ int HP_libconfig_setting_get_bool_elem_post;
+ int HP_libconfig_setting_get_string_elem_pre;
+ int HP_libconfig_setting_get_string_elem_post;
+ int HP_libconfig_setting_set_int_elem_pre;
+ int HP_libconfig_setting_set_int_elem_post;
+ int HP_libconfig_setting_set_int64_elem_pre;
+ int HP_libconfig_setting_set_int64_elem_post;
+ int HP_libconfig_setting_set_float_elem_pre;
+ int HP_libconfig_setting_set_float_elem_post;
+ int HP_libconfig_setting_set_bool_elem_pre;
+ int HP_libconfig_setting_set_bool_elem_post;
+ int HP_libconfig_setting_set_string_elem_pre;
+ int HP_libconfig_setting_set_string_elem_post;
+ int HP_libconfig_setting_index_pre;
+ int HP_libconfig_setting_index_post;
+ int HP_libconfig_setting_length_pre;
+ int HP_libconfig_setting_length_post;
+ int HP_libconfig_setting_get_elem_pre;
+ int HP_libconfig_setting_get_elem_post;
+ int HP_libconfig_setting_get_member_pre;
+ int HP_libconfig_setting_get_member_post;
+ int HP_libconfig_setting_add_pre;
+ int HP_libconfig_setting_add_post;
+ int HP_libconfig_setting_remove_pre;
+ int HP_libconfig_setting_remove_post;
+ int HP_libconfig_setting_remove_elem_pre;
+ int HP_libconfig_setting_remove_elem_post;
+ int HP_libconfig_setting_set_hook_pre;
+ int HP_libconfig_setting_set_hook_post;
+ int HP_libconfig_lookup_pre;
+ int HP_libconfig_lookup_post;
+ int HP_libconfig_lookup_from_pre;
+ int HP_libconfig_lookup_from_post;
+ int HP_libconfig_lookup_int_pre;
+ int HP_libconfig_lookup_int_post;
+ int HP_libconfig_lookup_int64_pre;
+ int HP_libconfig_lookup_int64_post;
+ int HP_libconfig_lookup_float_pre;
+ int HP_libconfig_lookup_float_post;
+ int HP_libconfig_lookup_bool_pre;
+ int HP_libconfig_lookup_bool_post;
+ int HP_libconfig_lookup_string_pre;
+ int HP_libconfig_lookup_string_post;
+ int HP_libconfig_read_file_pre;
+ int HP_libconfig_read_file_post;
+ int HP_libconfig_setting_copy_simple_pre;
+ int HP_libconfig_setting_copy_simple_post;
+ int HP_libconfig_setting_copy_elem_pre;
+ int HP_libconfig_setting_copy_elem_post;
+ int HP_libconfig_setting_copy_aggregate_pre;
+ int HP_libconfig_setting_copy_aggregate_post;
+ int HP_libconfig_setting_copy_pre;
+ int HP_libconfig_setting_copy_post;
int HP_logs_pick_pc_pre;
int HP_logs_pick_pc_post;
int HP_logs_pick_mob_pre;
@@ -7916,6 +8586,32 @@ struct {
int HP_mail_deliveryfail_post;
int HP_mail_invalid_operation_pre;
int HP_mail_invalid_operation_post;
+ int HP_iMalloc_init_pre;
+ int HP_iMalloc_init_post;
+ int HP_iMalloc_final_pre;
+ int HP_iMalloc_final_post;
+ int HP_iMalloc_malloc_pre;
+ int HP_iMalloc_malloc_post;
+ int HP_iMalloc_calloc_pre;
+ int HP_iMalloc_calloc_post;
+ int HP_iMalloc_realloc_pre;
+ int HP_iMalloc_realloc_post;
+ int HP_iMalloc_reallocz_pre;
+ int HP_iMalloc_reallocz_post;
+ int HP_iMalloc_astrdup_pre;
+ int HP_iMalloc_astrdup_post;
+ int HP_iMalloc_free_pre;
+ int HP_iMalloc_free_post;
+ int HP_iMalloc_memory_check_pre;
+ int HP_iMalloc_memory_check_post;
+ int HP_iMalloc_verify_ptr_pre;
+ int HP_iMalloc_verify_ptr_post;
+ int HP_iMalloc_usage_pre;
+ int HP_iMalloc_usage_post;
+ int HP_iMalloc_post_shutdown_pre;
+ int HP_iMalloc_post_shutdown_post;
+ int HP_iMalloc_init_messages_pre;
+ int HP_iMalloc_init_messages_post;
int HP_map_zone_init_pre;
int HP_map_zone_init_post;
int HP_map_zone_remove_pre;
@@ -8172,6 +8868,24 @@ struct {
int HP_map_merge_zone_post;
int HP_map_zone_clear_single_pre;
int HP_map_zone_clear_single_post;
+ int HP_mapindex_init_pre;
+ int HP_mapindex_init_post;
+ int HP_mapindex_final_pre;
+ int HP_mapindex_final_post;
+ int HP_mapindex_addmap_pre;
+ int HP_mapindex_addmap_post;
+ int HP_mapindex_removemap_pre;
+ int HP_mapindex_removemap_post;
+ int HP_mapindex_getmapname_pre;
+ int HP_mapindex_getmapname_post;
+ int HP_mapindex_getmapname_ext_pre;
+ int HP_mapindex_getmapname_ext_post;
+ int HP_mapindex_name2id_pre;
+ int HP_mapindex_name2id_post;
+ int HP_mapindex_id2name_pre;
+ int HP_mapindex_id2name_post;
+ int HP_mapindex_check_default_pre;
+ int HP_mapindex_check_default_post;
int HP_mapit_alloc_pre;
int HP_mapit_alloc_post;
int HP_mapit_free_pre;
@@ -8660,6 +9374,8 @@ struct {
int HP_npc_db_checkid_post;
int HP_npc_secure_timeout_timer_pre;
int HP_npc_secure_timeout_timer_post;
+ int HP_nullpo_assert_report_pre;
+ int HP_nullpo_assert_report_post;
int HP_party_init_pre;
int HP_party_init_post;
int HP_party_final_pre;
@@ -9378,6 +10094,10 @@ struct {
int HP_script_label_add_post;
int HP_script_run_pre;
int HP_script_run_post;
+ int HP_script_run_npc_pre;
+ int HP_script_run_npc_post;
+ int HP_script_run_pet_pre;
+ int HP_script_run_pet_post;
int HP_script_run_main_pre;
int HP_script_run_main_post;
int HP_script_run_timer_pre;
@@ -9610,6 +10330,12 @@ struct {
int HP_script_get_translation_file_name_post;
int HP_script_parser_clean_leftovers_pre;
int HP_script_parser_clean_leftovers_post;
+ int HP_script_run_use_script_pre;
+ int HP_script_run_use_script_post;
+ int HP_script_run_item_equip_script_pre;
+ int HP_script_run_item_equip_script_post;
+ int HP_script_run_item_unequip_script_pre;
+ int HP_script_run_item_unequip_script_post;
int HP_searchstore_open_pre;
int HP_searchstore_open_post;
int HP_searchstore_query_pre;
@@ -9630,6 +10356,14 @@ struct {
int HP_searchstore_clearremote_post;
int HP_searchstore_result_pre;
int HP_searchstore_result_post;
+ int HP_showmsg_init_pre;
+ int HP_showmsg_init_post;
+ int HP_showmsg_final_pre;
+ int HP_showmsg_final_post;
+ int HP_showmsg_clearScreen_pre;
+ int HP_showmsg_clearScreen_post;
+ int HP_showmsg_showMessageV_pre;
+ int HP_showmsg_showMessageV_post;
int HP_skill_init_pre;
int HP_skill_init_post;
int HP_skill_final_pre;
@@ -10064,6 +10798,126 @@ struct {
int HP_skill_get_requirement_item_unknown_post;
int HP_skill_get_requirement_unknown_pre;
int HP_skill_get_requirement_unknown_post;
+ int HP_sockt_init_pre;
+ int HP_sockt_init_post;
+ int HP_sockt_final_pre;
+ int HP_sockt_final_post;
+ int HP_sockt_perform_pre;
+ int HP_sockt_perform_post;
+ int HP_sockt_datasync_pre;
+ int HP_sockt_datasync_post;
+ int HP_sockt_make_listen_bind_pre;
+ int HP_sockt_make_listen_bind_post;
+ int HP_sockt_make_connection_pre;
+ int HP_sockt_make_connection_post;
+ int HP_sockt_realloc_fifo_pre;
+ int HP_sockt_realloc_fifo_post;
+ int HP_sockt_realloc_writefifo_pre;
+ int HP_sockt_realloc_writefifo_post;
+ int HP_sockt_wfifoset_pre;
+ int HP_sockt_wfifoset_post;
+ int HP_sockt_rfifoskip_pre;
+ int HP_sockt_rfifoskip_post;
+ int HP_sockt_close_pre;
+ int HP_sockt_close_post;
+ int HP_sockt_session_is_valid_pre;
+ int HP_sockt_session_is_valid_post;
+ int HP_sockt_session_is_active_pre;
+ int HP_sockt_session_is_active_post;
+ int HP_sockt_flush_pre;
+ int HP_sockt_flush_post;
+ int HP_sockt_flush_fifos_pre;
+ int HP_sockt_flush_fifos_post;
+ int HP_sockt_set_nonblocking_pre;
+ int HP_sockt_set_nonblocking_post;
+ int HP_sockt_set_defaultparse_pre;
+ int HP_sockt_set_defaultparse_post;
+ int HP_sockt_host2ip_pre;
+ int HP_sockt_host2ip_post;
+ int HP_sockt_ip2str_pre;
+ int HP_sockt_ip2str_post;
+ int HP_sockt_str2ip_pre;
+ int HP_sockt_str2ip_post;
+ int HP_sockt_ntows_pre;
+ int HP_sockt_ntows_post;
+ int HP_sockt_getips_pre;
+ int HP_sockt_getips_post;
+ int HP_sockt_eof_pre;
+ int HP_sockt_eof_post;
+ int HP_sockt_lan_subnet_check_pre;
+ int HP_sockt_lan_subnet_check_post;
+ int HP_sockt_allowed_ip_check_pre;
+ int HP_sockt_allowed_ip_check_post;
+ int HP_sockt_trusted_ip_check_pre;
+ int HP_sockt_trusted_ip_check_post;
+ int HP_sockt_net_config_read_sub_pre;
+ int HP_sockt_net_config_read_sub_post;
+ int HP_sockt_net_config_read_pre;
+ int HP_sockt_net_config_read_post;
+ int HP_SQL_Connect_pre;
+ int HP_SQL_Connect_post;
+ int HP_SQL_GetTimeout_pre;
+ int HP_SQL_GetTimeout_post;
+ int HP_SQL_GetColumnNames_pre;
+ int HP_SQL_GetColumnNames_post;
+ int HP_SQL_SetEncoding_pre;
+ int HP_SQL_SetEncoding_post;
+ int HP_SQL_Ping_pre;
+ int HP_SQL_Ping_post;
+ int HP_SQL_EscapeString_pre;
+ int HP_SQL_EscapeString_post;
+ int HP_SQL_EscapeStringLen_pre;
+ int HP_SQL_EscapeStringLen_post;
+ int HP_SQL_QueryV_pre;
+ int HP_SQL_QueryV_post;
+ int HP_SQL_QueryStr_pre;
+ int HP_SQL_QueryStr_post;
+ int HP_SQL_LastInsertId_pre;
+ int HP_SQL_LastInsertId_post;
+ int HP_SQL_NumColumns_pre;
+ int HP_SQL_NumColumns_post;
+ int HP_SQL_NumRows_pre;
+ int HP_SQL_NumRows_post;
+ int HP_SQL_NextRow_pre;
+ int HP_SQL_NextRow_post;
+ int HP_SQL_GetData_pre;
+ int HP_SQL_GetData_post;
+ int HP_SQL_FreeResult_pre;
+ int HP_SQL_FreeResult_post;
+ int HP_SQL_ShowDebug__pre;
+ int HP_SQL_ShowDebug__post;
+ int HP_SQL_Free_pre;
+ int HP_SQL_Free_post;
+ int HP_SQL_Malloc_pre;
+ int HP_SQL_Malloc_post;
+ int HP_SQL_StmtMalloc_pre;
+ int HP_SQL_StmtMalloc_post;
+ int HP_SQL_StmtPrepareV_pre;
+ int HP_SQL_StmtPrepareV_post;
+ int HP_SQL_StmtPrepareStr_pre;
+ int HP_SQL_StmtPrepareStr_post;
+ int HP_SQL_StmtNumParams_pre;
+ int HP_SQL_StmtNumParams_post;
+ int HP_SQL_StmtBindParam_pre;
+ int HP_SQL_StmtBindParam_post;
+ int HP_SQL_StmtExecute_pre;
+ int HP_SQL_StmtExecute_post;
+ int HP_SQL_StmtLastInsertId_pre;
+ int HP_SQL_StmtLastInsertId_post;
+ int HP_SQL_StmtNumColumns_pre;
+ int HP_SQL_StmtNumColumns_post;
+ int HP_SQL_StmtBindColumn_pre;
+ int HP_SQL_StmtBindColumn_post;
+ int HP_SQL_StmtNumRows_pre;
+ int HP_SQL_StmtNumRows_post;
+ int HP_SQL_StmtNextRow_pre;
+ int HP_SQL_StmtNextRow_post;
+ int HP_SQL_StmtFreeResult_pre;
+ int HP_SQL_StmtFreeResult_post;
+ int HP_SQL_StmtFree_pre;
+ int HP_SQL_StmtFree_post;
+ int HP_SQL_StmtShowDebug__pre;
+ int HP_SQL_StmtShowDebug__post;
int HP_status_init_pre;
int HP_status_init_post;
int HP_status_final_pre;
@@ -10160,6 +11014,8 @@ struct {
int HP_status_calc_pet__post;
int HP_status_calc_pc__pre;
int HP_status_calc_pc__post;
+ int HP_status_calc_pc_additional_pre;
+ int HP_status_calc_pc_additional_post;
int HP_status_calc_homunculus__pre;
int HP_status_calc_homunculus__post;
int HP_status_calc_mercenary__pre;
@@ -10310,6 +11166,130 @@ struct {
int HP_storage_sortitem_post;
int HP_storage_reconnect_sub_pre;
int HP_storage_reconnect_sub_post;
+ int HP_StrBuf_Malloc_pre;
+ int HP_StrBuf_Malloc_post;
+ int HP_StrBuf_Init_pre;
+ int HP_StrBuf_Init_post;
+ int HP_StrBuf_Vprintf_pre;
+ int HP_StrBuf_Vprintf_post;
+ int HP_StrBuf_Append_pre;
+ int HP_StrBuf_Append_post;
+ int HP_StrBuf_AppendStr_pre;
+ int HP_StrBuf_AppendStr_post;
+ int HP_StrBuf_Length_pre;
+ int HP_StrBuf_Length_post;
+ int HP_StrBuf_Value_pre;
+ int HP_StrBuf_Value_post;
+ int HP_StrBuf_Clear_pre;
+ int HP_StrBuf_Clear_post;
+ int HP_StrBuf_Destroy_pre;
+ int HP_StrBuf_Destroy_post;
+ int HP_StrBuf_Free_pre;
+ int HP_StrBuf_Free_post;
+ int HP_strlib_jstrescape_pre;
+ int HP_strlib_jstrescape_post;
+ int HP_strlib_jstrescapecpy_pre;
+ int HP_strlib_jstrescapecpy_post;
+ int HP_strlib_jmemescapecpy_pre;
+ int HP_strlib_jmemescapecpy_post;
+ int HP_strlib_remove_control_chars__pre;
+ int HP_strlib_remove_control_chars__post;
+ int HP_strlib_trim__pre;
+ int HP_strlib_trim__post;
+ int HP_strlib_normalize_name__pre;
+ int HP_strlib_normalize_name__post;
+ int HP_strlib_stristr__pre;
+ int HP_strlib_stristr__post;
+ int HP_strlib_strnlen__pre;
+ int HP_strlib_strnlen__post;
+ int HP_strlib_strtok_r__pre;
+ int HP_strlib_strtok_r__post;
+ int HP_strlib_e_mail_check__pre;
+ int HP_strlib_e_mail_check__post;
+ int HP_strlib_config_switch__pre;
+ int HP_strlib_config_switch__post;
+ int HP_strlib_safestrncpy__pre;
+ int HP_strlib_safestrncpy__post;
+ int HP_strlib_safestrnlen__pre;
+ int HP_strlib_safestrnlen__post;
+ int HP_strlib_strline__pre;
+ int HP_strlib_strline__post;
+ int HP_strlib_bin2hex__pre;
+ int HP_strlib_bin2hex__post;
+ int HP_sv_parse_next_pre;
+ int HP_sv_parse_next_post;
+ int HP_sv_parse_pre;
+ int HP_sv_parse_post;
+ int HP_sv_split_pre;
+ int HP_sv_split_post;
+ int HP_sv_escape_c_pre;
+ int HP_sv_escape_c_post;
+ int HP_sv_unescape_c_pre;
+ int HP_sv_unescape_c_post;
+ int HP_sv_skip_escaped_c_pre;
+ int HP_sv_skip_escaped_c_post;
+ int HP_sv_readdb_pre;
+ int HP_sv_readdb_post;
+ int HP_sysinfo_getpagesize_pre;
+ int HP_sysinfo_getpagesize_post;
+ int HP_sysinfo_platform_pre;
+ int HP_sysinfo_platform_post;
+ int HP_sysinfo_osversion_pre;
+ int HP_sysinfo_osversion_post;
+ int HP_sysinfo_cpu_pre;
+ int HP_sysinfo_cpu_post;
+ int HP_sysinfo_cpucores_pre;
+ int HP_sysinfo_cpucores_post;
+ int HP_sysinfo_arch_pre;
+ int HP_sysinfo_arch_post;
+ int HP_sysinfo_is64bit_pre;
+ int HP_sysinfo_is64bit_post;
+ int HP_sysinfo_compiler_pre;
+ int HP_sysinfo_compiler_post;
+ int HP_sysinfo_cflags_pre;
+ int HP_sysinfo_cflags_post;
+ int HP_sysinfo_vcstype_pre;
+ int HP_sysinfo_vcstype_post;
+ int HP_sysinfo_vcstypeid_pre;
+ int HP_sysinfo_vcstypeid_post;
+ int HP_sysinfo_vcsrevision_src_pre;
+ int HP_sysinfo_vcsrevision_src_post;
+ int HP_sysinfo_vcsrevision_scripts_pre;
+ int HP_sysinfo_vcsrevision_scripts_post;
+ int HP_sysinfo_vcsrevision_reload_pre;
+ int HP_sysinfo_vcsrevision_reload_post;
+ int HP_sysinfo_is_superuser_pre;
+ int HP_sysinfo_is_superuser_post;
+ int HP_sysinfo_init_pre;
+ int HP_sysinfo_init_post;
+ int HP_sysinfo_final_pre;
+ int HP_sysinfo_final_post;
+ int HP_timer_gettick_pre;
+ int HP_timer_gettick_post;
+ int HP_timer_gettick_nocache_pre;
+ int HP_timer_gettick_nocache_post;
+ int HP_timer_add_pre;
+ int HP_timer_add_post;
+ int HP_timer_add_interval_pre;
+ int HP_timer_add_interval_post;
+ int HP_timer_get_pre;
+ int HP_timer_get_post;
+ int HP_timer_delete_pre;
+ int HP_timer_delete_post;
+ int HP_timer_addtick_pre;
+ int HP_timer_addtick_post;
+ int HP_timer_settick_pre;
+ int HP_timer_settick_post;
+ int HP_timer_add_func_list_pre;
+ int HP_timer_add_func_list_post;
+ int HP_timer_get_uptime_pre;
+ int HP_timer_get_uptime_post;
+ int HP_timer_perform_pre;
+ int HP_timer_perform_post;
+ int HP_timer_init_pre;
+ int HP_timer_init_post;
+ int HP_timer_final_pre;
+ int HP_timer_final_post;
int HP_trade_request_pre;
int HP_trade_request_post;
int HP_trade_ack_pre;
@@ -10443,6 +11423,7 @@ struct {
} count;
struct {
+ struct HCache_interface HCache;
struct atcommand_interface atcommand;
struct battle_interface battle;
struct battleground_interface bg;
@@ -10451,6 +11432,10 @@ struct {
struct chat_interface chat;
struct chrif_interface chrif;
struct clif_interface clif;
+ struct cmdline_interface cmdline;
+ struct console_interface console;
+ struct core_interface core;
+ struct db_interface DB;
struct duel_interface duel;
struct elemental_interface elemental;
struct guild_interface guild;
@@ -10460,14 +11445,18 @@ struct {
struct intif_interface intif;
struct irc_bot_interface ircbot;
struct itemdb_interface itemdb;
+ struct libconfig_interface libconfig;
struct log_interface logs;
struct mail_interface mail;
+ struct malloc_interface iMalloc;
struct map_interface map;
+ struct mapindex_interface mapindex;
struct mapit_interface mapit;
struct mapreg_interface mapreg;
struct mercenary_interface mercenary;
struct mob_interface mob;
struct npc_interface npc;
+ struct nullpo_interface nullpo;
struct party_interface party;
struct path_interface path;
struct pc_groups_interface pcg;
@@ -10476,9 +11465,17 @@ struct {
struct quest_interface quest;
struct script_interface script;
struct searchstore_interface searchstore;
+ struct showmsg_interface showmsg;
struct skill_interface skill;
+ struct socket_interface sockt;
+ struct sql_interface SQL;
struct status_interface status;
struct storage_interface storage;
+ struct stringbuf_interface StrBuf;
+ struct strlib_interface strlib;
+ struct sv_interface sv;
+ struct sysinfo_interface sysinfo;
+ struct timer_interface timer;
struct trade_interface trade;
struct unit_interface unit;
struct vending_interface vending;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 4e23425ec..cc96d3171 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -5,6 +5,10 @@
// as it will get overwritten.
struct HookingPointData HookingPoints[] = {
+/* HCache */
+ { HP_POP(HCache->init, HP_HCache_init) },
+ { HP_POP(HCache->check, HP_HCache_check) },
+ { HP_POP(HCache->open, HP_HCache_open) },
/* atcommand */
{ HP_POP(atcommand->init, HP_atcommand_init) },
{ HP_POP(atcommand->final, HP_atcommand_final) },
@@ -914,6 +918,39 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pNPCShopClosed, HP_clif_pNPCShopClosed) },
{ HP_POP(clif->pNPCMarketClosed, HP_clif_pNPCMarketClosed) },
{ HP_POP(clif->pNPCMarketPurchase, HP_clif_pNPCMarketPurchase) },
+/* cmdline */
+ { HP_POP(cmdline->init, HP_cmdline_init) },
+ { HP_POP(cmdline->final, HP_cmdline_final) },
+ { HP_POP(cmdline->arg_add, HP_cmdline_arg_add) },
+ { HP_POP(cmdline->exec, HP_cmdline_exec) },
+ { HP_POP(cmdline->arg_next_value, HP_cmdline_arg_next_value) },
+ { HP_POP(cmdline->arg_source, HP_cmdline_arg_source) },
+/* console */
+ { HP_POP(console->init, HP_console_init) },
+ { HP_POP(console->final, HP_console_final) },
+ { HP_POP(console->display_title, HP_console_display_title) },
+/* core */
+ { HP_POP(core->shutdown_callback, HP_core_shutdown_callback) },
+/* DB */
+ { HP_POP(DB->fix_options, HP_DB_fix_options) },
+ { HP_POP(DB->default_cmp, HP_DB_default_cmp) },
+ { HP_POP(DB->default_hash, HP_DB_default_hash) },
+ { HP_POP(DB->default_release, HP_DB_default_release) },
+ { HP_POP(DB->custom_release, HP_DB_custom_release) },
+ { HP_POP(DB->alloc, HP_DB_alloc) },
+ { HP_POP(DB->i2key, HP_DB_i2key) },
+ { HP_POP(DB->ui2key, HP_DB_ui2key) },
+ { HP_POP(DB->str2key, HP_DB_str2key) },
+ { HP_POP(DB->i642key, HP_DB_i642key) },
+ { HP_POP(DB->ui642key, HP_DB_ui642key) },
+ { HP_POP(DB->i2data, HP_DB_i2data) },
+ { HP_POP(DB->ui2data, HP_DB_ui2data) },
+ { HP_POP(DB->ptr2data, HP_DB_ptr2data) },
+ { HP_POP(DB->data2i, HP_DB_data2i) },
+ { HP_POP(DB->data2ui, HP_DB_data2ui) },
+ { HP_POP(DB->data2ptr, HP_DB_data2ptr) },
+ { HP_POP(DB->init, HP_DB_init) },
+ { HP_POP(DB->final, HP_DB_final) },
/* duel */
{ HP_POP(duel->create, HP_duel_create) },
{ HP_POP(duel->invite, HP_duel_invite) },
@@ -1337,6 +1374,65 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(itemdb->id2combo, HP_itemdb_id2combo) },
{ HP_POP(itemdb->is_item_usable, HP_itemdb_is_item_usable) },
{ HP_POP(itemdb->lookup_const, HP_itemdb_lookup_const) },
+/* libconfig */
+ { HP_POP(libconfig->read, HP_libconfig_read) },
+ { HP_POP(libconfig->write, HP_libconfig_write) },
+ { HP_POP(libconfig->set_auto_convert, HP_libconfig_set_auto_convert) },
+ { HP_POP(libconfig->get_auto_convert, HP_libconfig_get_auto_convert) },
+ { HP_POP(libconfig->read_string, HP_libconfig_read_string) },
+ { HP_POP(libconfig->read_file_src, HP_libconfig_read_file_src) },
+ { HP_POP(libconfig->write_file, HP_libconfig_write_file) },
+ { HP_POP(libconfig->set_destructor, HP_libconfig_set_destructor) },
+ { HP_POP(libconfig->set_include_dir, HP_libconfig_set_include_dir) },
+ { HP_POP(libconfig->init, HP_libconfig_init) },
+ { HP_POP(libconfig->destroy, HP_libconfig_destroy) },
+ { HP_POP(libconfig->setting_get_int, HP_libconfig_setting_get_int) },
+ { HP_POP(libconfig->setting_get_int64, HP_libconfig_setting_get_int64) },
+ { HP_POP(libconfig->setting_get_float, HP_libconfig_setting_get_float) },
+ { HP_POP(libconfig->setting_get_bool, HP_libconfig_setting_get_bool) },
+ { HP_POP(libconfig->setting_get_string, HP_libconfig_setting_get_string) },
+ { HP_POP(libconfig->setting_lookup_int, HP_libconfig_setting_lookup_int) },
+ { HP_POP(libconfig->setting_lookup_int64, HP_libconfig_setting_lookup_int64) },
+ { HP_POP(libconfig->setting_lookup_float, HP_libconfig_setting_lookup_float) },
+ { HP_POP(libconfig->setting_lookup_bool, HP_libconfig_setting_lookup_bool) },
+ { HP_POP(libconfig->setting_lookup_string, HP_libconfig_setting_lookup_string) },
+ { HP_POP(libconfig->setting_set_int, HP_libconfig_setting_set_int) },
+ { HP_POP(libconfig->setting_set_int64, HP_libconfig_setting_set_int64) },
+ { HP_POP(libconfig->setting_set_float, HP_libconfig_setting_set_float) },
+ { HP_POP(libconfig->setting_set_bool, HP_libconfig_setting_set_bool) },
+ { HP_POP(libconfig->setting_set_string, HP_libconfig_setting_set_string) },
+ { HP_POP(libconfig->setting_set_format, HP_libconfig_setting_set_format) },
+ { HP_POP(libconfig->setting_get_format, HP_libconfig_setting_get_format) },
+ { HP_POP(libconfig->setting_get_int_elem, HP_libconfig_setting_get_int_elem) },
+ { HP_POP(libconfig->setting_get_int64_elem, HP_libconfig_setting_get_int64_elem) },
+ { HP_POP(libconfig->setting_get_float_elem, HP_libconfig_setting_get_float_elem) },
+ { HP_POP(libconfig->setting_get_bool_elem, HP_libconfig_setting_get_bool_elem) },
+ { HP_POP(libconfig->setting_get_string_elem, HP_libconfig_setting_get_string_elem) },
+ { HP_POP(libconfig->setting_set_int_elem, HP_libconfig_setting_set_int_elem) },
+ { HP_POP(libconfig->setting_set_int64_elem, HP_libconfig_setting_set_int64_elem) },
+ { HP_POP(libconfig->setting_set_float_elem, HP_libconfig_setting_set_float_elem) },
+ { HP_POP(libconfig->setting_set_bool_elem, HP_libconfig_setting_set_bool_elem) },
+ { HP_POP(libconfig->setting_set_string_elem, HP_libconfig_setting_set_string_elem) },
+ { HP_POP(libconfig->setting_index, HP_libconfig_setting_index) },
+ { HP_POP(libconfig->setting_length, HP_libconfig_setting_length) },
+ { HP_POP(libconfig->setting_get_elem, HP_libconfig_setting_get_elem) },
+ { HP_POP(libconfig->setting_get_member, HP_libconfig_setting_get_member) },
+ { HP_POP(libconfig->setting_add, HP_libconfig_setting_add) },
+ { HP_POP(libconfig->setting_remove, HP_libconfig_setting_remove) },
+ { HP_POP(libconfig->setting_remove_elem, HP_libconfig_setting_remove_elem) },
+ { HP_POP(libconfig->setting_set_hook, HP_libconfig_setting_set_hook) },
+ { HP_POP(libconfig->lookup, HP_libconfig_lookup) },
+ { HP_POP(libconfig->lookup_from, HP_libconfig_lookup_from) },
+ { HP_POP(libconfig->lookup_int, HP_libconfig_lookup_int) },
+ { HP_POP(libconfig->lookup_int64, HP_libconfig_lookup_int64) },
+ { HP_POP(libconfig->lookup_float, HP_libconfig_lookup_float) },
+ { HP_POP(libconfig->lookup_bool, HP_libconfig_lookup_bool) },
+ { HP_POP(libconfig->lookup_string, HP_libconfig_lookup_string) },
+ { HP_POP(libconfig->read_file, HP_libconfig_read_file) },
+ { HP_POP(libconfig->setting_copy_simple, HP_libconfig_setting_copy_simple) },
+ { HP_POP(libconfig->setting_copy_elem, HP_libconfig_setting_copy_elem) },
+ { HP_POP(libconfig->setting_copy_aggregate, HP_libconfig_setting_copy_aggregate) },
+ { HP_POP(libconfig->setting_copy, HP_libconfig_setting_copy) },
/* logs */
{ HP_POP(logs->pick_pc, HP_logs_pick_pc) },
{ HP_POP(logs->pick_mob, HP_logs_pick_mob) },
@@ -1370,6 +1466,20 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mail->openmail, HP_mail_openmail) },
{ HP_POP(mail->deliveryfail, HP_mail_deliveryfail) },
{ HP_POP(mail->invalid_operation, HP_mail_invalid_operation) },
+/* iMalloc */
+ { HP_POP(iMalloc->init, HP_iMalloc_init) },
+ { HP_POP(iMalloc->final, HP_iMalloc_final) },
+ { HP_POP(iMalloc->malloc, HP_iMalloc_malloc) },
+ { HP_POP(iMalloc->calloc, HP_iMalloc_calloc) },
+ { HP_POP(iMalloc->realloc, HP_iMalloc_realloc) },
+ { HP_POP(iMalloc->reallocz, HP_iMalloc_reallocz) },
+ { HP_POP(iMalloc->astrdup, HP_iMalloc_astrdup) },
+ { HP_POP(iMalloc->free, HP_iMalloc_free) },
+ { HP_POP(iMalloc->memory_check, HP_iMalloc_memory_check) },
+ { HP_POP(iMalloc->verify_ptr, HP_iMalloc_verify_ptr) },
+ { HP_POP(iMalloc->usage, HP_iMalloc_usage) },
+ { HP_POP(iMalloc->post_shutdown, HP_iMalloc_post_shutdown) },
+ { HP_POP(iMalloc->init_messages, HP_iMalloc_init_messages) },
/* map */
{ HP_POP(map->zone_init, HP_map_zone_init) },
{ HP_POP(map->zone_remove, HP_map_zone_remove) },
@@ -1499,6 +1609,16 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(map->remove_questinfo, HP_map_remove_questinfo) },
{ HP_POP(map->merge_zone, HP_map_merge_zone) },
{ HP_POP(map->zone_clear_single, HP_map_zone_clear_single) },
+/* mapindex */
+ { HP_POP(mapindex->init, HP_mapindex_init) },
+ { HP_POP(mapindex->final, HP_mapindex_final) },
+ { HP_POP(mapindex->addmap, HP_mapindex_addmap) },
+ { HP_POP(mapindex->removemap, HP_mapindex_removemap) },
+ { HP_POP(mapindex->getmapname, HP_mapindex_getmapname) },
+ { HP_POP(mapindex->getmapname_ext, HP_mapindex_getmapname_ext) },
+ { HP_POP(mapindex->name2id, HP_mapindex_name2id) },
+ { HP_POP(mapindex->id2name, HP_mapindex_id2name) },
+ { HP_POP(mapindex->check_default, HP_mapindex_check_default) },
/* mapit */
{ HP_POP(mapit->alloc, HP_mapit_alloc) },
{ HP_POP(mapit->free, HP_mapit_free) },
@@ -1748,6 +1868,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(npc->market_delfromsql_sub, HP_npc_market_delfromsql_sub) },
{ HP_POP(npc->db_checkid, HP_npc_db_checkid) },
{ HP_POP(npc->secure_timeout_timer, HP_npc_secure_timeout_timer) },
+/* nullpo */
+ { HP_POP(nullpo->assert_report, HP_nullpo_assert_report) },
/* party */
{ HP_POP(party->init, HP_party_init) },
{ HP_POP(party->final, HP_party_final) },
@@ -2114,6 +2236,8 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(script->get_constant, HP_script_get_constant) },
{ HP_POP(script->label_add, HP_script_label_add) },
{ HP_POP(script->run, HP_script_run) },
+ { HP_POP(script->run_npc, HP_script_run_npc) },
+ { HP_POP(script->run_pet, HP_script_run_pet) },
{ HP_POP(script->run_main, HP_script_run_main) },
{ HP_POP(script->run_timer, HP_script_run_timer) },
{ HP_POP(script->set_var, HP_script_set_var) },
@@ -2230,6 +2354,9 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(script->add_language, HP_script_add_language) },
{ HP_POP(script->get_translation_file_name, HP_script_get_translation_file_name) },
{ HP_POP(script->parser_clean_leftovers, HP_script_parser_clean_leftovers) },
+ { HP_POP(script->run_use_script, HP_script_run_use_script) },
+ { HP_POP(script->run_item_equip_script, HP_script_run_item_equip_script) },
+ { HP_POP(script->run_item_unequip_script, HP_script_run_item_unequip_script) },
/* searchstore */
{ HP_POP(searchstore->open, HP_searchstore_open) },
{ HP_POP(searchstore->query, HP_searchstore_query) },
@@ -2241,6 +2368,11 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(searchstore->queryremote, HP_searchstore_queryremote) },
{ HP_POP(searchstore->clearremote, HP_searchstore_clearremote) },
{ HP_POP(searchstore->result, HP_searchstore_result) },
+/* showmsg */
+ { HP_POP(showmsg->init, HP_showmsg_init) },
+ { HP_POP(showmsg->final, HP_showmsg_final) },
+ { HP_POP(showmsg->clearScreen, HP_showmsg_clearScreen) },
+ { HP_POP(showmsg->showMessageV, HP_showmsg_showMessageV) },
/* skill */
{ HP_POP(skill->init, HP_skill_init) },
{ HP_POP(skill->final, HP_skill_final) },
@@ -2459,6 +2591,68 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->get_requirement_off_unknown, HP_skill_get_requirement_off_unknown) },
{ HP_POP(skill->get_requirement_item_unknown, HP_skill_get_requirement_item_unknown) },
{ HP_POP(skill->get_requirement_unknown, HP_skill_get_requirement_unknown) },
+/* sockt */
+ { HP_POP(sockt->init, HP_sockt_init) },
+ { HP_POP(sockt->final, HP_sockt_final) },
+ { HP_POP(sockt->perform, HP_sockt_perform) },
+ { HP_POP(sockt->datasync, HP_sockt_datasync) },
+ { HP_POP(sockt->make_listen_bind, HP_sockt_make_listen_bind) },
+ { HP_POP(sockt->make_connection, HP_sockt_make_connection) },
+ { HP_POP(sockt->realloc_fifo, HP_sockt_realloc_fifo) },
+ { HP_POP(sockt->realloc_writefifo, HP_sockt_realloc_writefifo) },
+ { HP_POP(sockt->wfifoset, HP_sockt_wfifoset) },
+ { HP_POP(sockt->rfifoskip, HP_sockt_rfifoskip) },
+ { HP_POP(sockt->close, HP_sockt_close) },
+ { HP_POP(sockt->session_is_valid, HP_sockt_session_is_valid) },
+ { HP_POP(sockt->session_is_active, HP_sockt_session_is_active) },
+ { HP_POP(sockt->flush, HP_sockt_flush) },
+ { HP_POP(sockt->flush_fifos, HP_sockt_flush_fifos) },
+ { HP_POP(sockt->set_nonblocking, HP_sockt_set_nonblocking) },
+ { HP_POP(sockt->set_defaultparse, HP_sockt_set_defaultparse) },
+ { HP_POP(sockt->host2ip, HP_sockt_host2ip) },
+ { HP_POP(sockt->ip2str, HP_sockt_ip2str) },
+ { HP_POP(sockt->str2ip, HP_sockt_str2ip) },
+ { HP_POP(sockt->ntows, HP_sockt_ntows) },
+ { HP_POP(sockt->getips, HP_sockt_getips) },
+ { HP_POP(sockt->eof, HP_sockt_eof) },
+ { HP_POP(sockt->lan_subnet_check, HP_sockt_lan_subnet_check) },
+ { HP_POP(sockt->allowed_ip_check, HP_sockt_allowed_ip_check) },
+ { HP_POP(sockt->trusted_ip_check, HP_sockt_trusted_ip_check) },
+ { HP_POP(sockt->net_config_read_sub, HP_sockt_net_config_read_sub) },
+ { HP_POP(sockt->net_config_read, HP_sockt_net_config_read) },
+/* SQL */
+ { HP_POP(SQL->Connect, HP_SQL_Connect) },
+ { HP_POP(SQL->GetTimeout, HP_SQL_GetTimeout) },
+ { HP_POP(SQL->GetColumnNames, HP_SQL_GetColumnNames) },
+ { HP_POP(SQL->SetEncoding, HP_SQL_SetEncoding) },
+ { HP_POP(SQL->Ping, HP_SQL_Ping) },
+ { HP_POP(SQL->EscapeString, HP_SQL_EscapeString) },
+ { HP_POP(SQL->EscapeStringLen, HP_SQL_EscapeStringLen) },
+ { HP_POP(SQL->QueryV, HP_SQL_QueryV) },
+ { HP_POP(SQL->QueryStr, HP_SQL_QueryStr) },
+ { HP_POP(SQL->LastInsertId, HP_SQL_LastInsertId) },
+ { HP_POP(SQL->NumColumns, HP_SQL_NumColumns) },
+ { HP_POP(SQL->NumRows, HP_SQL_NumRows) },
+ { HP_POP(SQL->NextRow, HP_SQL_NextRow) },
+ { HP_POP(SQL->GetData, HP_SQL_GetData) },
+ { HP_POP(SQL->FreeResult, HP_SQL_FreeResult) },
+ { HP_POP(SQL->ShowDebug_, HP_SQL_ShowDebug_) },
+ { HP_POP(SQL->Free, HP_SQL_Free) },
+ { HP_POP(SQL->Malloc, HP_SQL_Malloc) },
+ { HP_POP(SQL->StmtMalloc, HP_SQL_StmtMalloc) },
+ { HP_POP(SQL->StmtPrepareV, HP_SQL_StmtPrepareV) },
+ { HP_POP(SQL->StmtPrepareStr, HP_SQL_StmtPrepareStr) },
+ { HP_POP(SQL->StmtNumParams, HP_SQL_StmtNumParams) },
+ { HP_POP(SQL->StmtBindParam, HP_SQL_StmtBindParam) },
+ { HP_POP(SQL->StmtExecute, HP_SQL_StmtExecute) },
+ { HP_POP(SQL->StmtLastInsertId, HP_SQL_StmtLastInsertId) },
+ { HP_POP(SQL->StmtNumColumns, HP_SQL_StmtNumColumns) },
+ { HP_POP(SQL->StmtBindColumn, HP_SQL_StmtBindColumn) },
+ { HP_POP(SQL->StmtNumRows, HP_SQL_StmtNumRows) },
+ { HP_POP(SQL->StmtNextRow, HP_SQL_StmtNextRow) },
+ { HP_POP(SQL->StmtFreeResult, HP_SQL_StmtFreeResult) },
+ { HP_POP(SQL->StmtFree, HP_SQL_StmtFree) },
+ { HP_POP(SQL->StmtShowDebug_, HP_SQL_StmtShowDebug_) },
/* status */
{ HP_POP(status->init, HP_status_init) },
{ HP_POP(status->final, HP_status_final) },
@@ -2508,6 +2702,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(status->calc_mob_, HP_status_calc_mob_) },
{ HP_POP(status->calc_pet_, HP_status_calc_pet_) },
{ HP_POP(status->calc_pc_, HP_status_calc_pc_) },
+ { HP_POP(status->calc_pc_additional, HP_status_calc_pc_additional) },
{ HP_POP(status->calc_homunculus_, HP_status_calc_homunculus_) },
{ HP_POP(status->calc_mercenary_, HP_status_calc_mercenary_) },
{ HP_POP(status->calc_elemental_, HP_status_calc_elemental_) },
@@ -2584,6 +2779,73 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(storage->comp_item, HP_storage_comp_item) },
{ HP_POP(storage->sortitem, HP_storage_sortitem) },
{ HP_POP(storage->reconnect_sub, HP_storage_reconnect_sub) },
+/* StrBuf */
+ { HP_POP(StrBuf->Malloc, HP_StrBuf_Malloc) },
+ { HP_POP(StrBuf->Init, HP_StrBuf_Init) },
+ { HP_POP(StrBuf->Vprintf, HP_StrBuf_Vprintf) },
+ { HP_POP(StrBuf->Append, HP_StrBuf_Append) },
+ { HP_POP(StrBuf->AppendStr, HP_StrBuf_AppendStr) },
+ { HP_POP(StrBuf->Length, HP_StrBuf_Length) },
+ { HP_POP(StrBuf->Value, HP_StrBuf_Value) },
+ { HP_POP(StrBuf->Clear, HP_StrBuf_Clear) },
+ { HP_POP(StrBuf->Destroy, HP_StrBuf_Destroy) },
+ { HP_POP(StrBuf->Free, HP_StrBuf_Free) },
+/* strlib */
+ { HP_POP(strlib->jstrescape, HP_strlib_jstrescape) },
+ { HP_POP(strlib->jstrescapecpy, HP_strlib_jstrescapecpy) },
+ { HP_POP(strlib->jmemescapecpy, HP_strlib_jmemescapecpy) },
+ { HP_POP(strlib->remove_control_chars_, HP_strlib_remove_control_chars_) },
+ { HP_POP(strlib->trim_, HP_strlib_trim_) },
+ { HP_POP(strlib->normalize_name_, HP_strlib_normalize_name_) },
+ { HP_POP(strlib->stristr_, HP_strlib_stristr_) },
+ { HP_POP(strlib->strnlen_, HP_strlib_strnlen_) },
+ { HP_POP(strlib->strtok_r_, HP_strlib_strtok_r_) },
+ { HP_POP(strlib->e_mail_check_, HP_strlib_e_mail_check_) },
+ { HP_POP(strlib->config_switch_, HP_strlib_config_switch_) },
+ { HP_POP(strlib->safestrncpy_, HP_strlib_safestrncpy_) },
+ { HP_POP(strlib->safestrnlen_, HP_strlib_safestrnlen_) },
+ { HP_POP(strlib->strline_, HP_strlib_strline_) },
+ { HP_POP(strlib->bin2hex_, HP_strlib_bin2hex_) },
+/* sv */
+ { HP_POP(sv->parse_next, HP_sv_parse_next) },
+ { HP_POP(sv->parse, HP_sv_parse) },
+ { HP_POP(sv->split, HP_sv_split) },
+ { HP_POP(sv->escape_c, HP_sv_escape_c) },
+ { HP_POP(sv->unescape_c, HP_sv_unescape_c) },
+ { HP_POP(sv->skip_escaped_c, HP_sv_skip_escaped_c) },
+ { HP_POP(sv->readdb, HP_sv_readdb) },
+/* sysinfo */
+ { HP_POP(sysinfo->getpagesize, HP_sysinfo_getpagesize) },
+ { HP_POP(sysinfo->platform, HP_sysinfo_platform) },
+ { HP_POP(sysinfo->osversion, HP_sysinfo_osversion) },
+ { HP_POP(sysinfo->cpu, HP_sysinfo_cpu) },
+ { HP_POP(sysinfo->cpucores, HP_sysinfo_cpucores) },
+ { HP_POP(sysinfo->arch, HP_sysinfo_arch) },
+ { HP_POP(sysinfo->is64bit, HP_sysinfo_is64bit) },
+ { HP_POP(sysinfo->compiler, HP_sysinfo_compiler) },
+ { HP_POP(sysinfo->cflags, HP_sysinfo_cflags) },
+ { HP_POP(sysinfo->vcstype, HP_sysinfo_vcstype) },
+ { HP_POP(sysinfo->vcstypeid, HP_sysinfo_vcstypeid) },
+ { HP_POP(sysinfo->vcsrevision_src, HP_sysinfo_vcsrevision_src) },
+ { HP_POP(sysinfo->vcsrevision_scripts, HP_sysinfo_vcsrevision_scripts) },
+ { HP_POP(sysinfo->vcsrevision_reload, HP_sysinfo_vcsrevision_reload) },
+ { HP_POP(sysinfo->is_superuser, HP_sysinfo_is_superuser) },
+ { HP_POP(sysinfo->init, HP_sysinfo_init) },
+ { HP_POP(sysinfo->final, HP_sysinfo_final) },
+/* timer */
+ { HP_POP(timer->gettick, HP_timer_gettick) },
+ { HP_POP(timer->gettick_nocache, HP_timer_gettick_nocache) },
+ { HP_POP(timer->add, HP_timer_add) },
+ { HP_POP(timer->add_interval, HP_timer_add_interval) },
+ { HP_POP(timer->get, HP_timer_get) },
+ { HP_POP(timer->delete, HP_timer_delete) },
+ { HP_POP(timer->addtick, HP_timer_addtick) },
+ { HP_POP(timer->settick, HP_timer_settick) },
+ { HP_POP(timer->add_func_list, HP_timer_add_func_list) },
+ { HP_POP(timer->get_uptime, HP_timer_get_uptime) },
+ { HP_POP(timer->perform, HP_timer_perform) },
+ { HP_POP(timer->init, HP_timer_init) },
+ { HP_POP(timer->final, HP_timer_final) },
/* trade */
{ HP_POP(trade->request, HP_trade_request) },
{ HP_POP(trade->ack, HP_trade_ack) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 85f477bec..bc2235b02 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -4,6 +4,87 @@
// NOTE: This file was auto-generated and should never be manually edited,
// as it will get overwritten.
+/* HCache */
+void HP_HCache_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_HCache_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_HCache_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.HCache.init();
+ }
+ if( HPMHooks.count.HP_HCache_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_HCache_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_HCache_check(const char *file) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_HCache_check_pre ) {
+ bool (*preHookFunc) (const char *file);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_HCache_check_pre[hIndex].func;
+ retVal___ = preHookFunc(file);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.HCache.check(file);
+ }
+ if( HPMHooks.count.HP_HCache_check_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *file);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_HCache_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, file);
+ }
+ }
+ return retVal___;
+}
+FILE* HP_HCache_open(const char *file, const char *opt) {
+ int hIndex = 0;
+ FILE* retVal___ = NULL;
+ if( HPMHooks.count.HP_HCache_open_pre ) {
+ FILE* (*preHookFunc) (const char *file, const char *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_HCache_open_pre[hIndex].func;
+ retVal___ = preHookFunc(file, opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.HCache.open(file, opt);
+ }
+ if( HPMHooks.count.HP_HCache_open_post ) {
+ FILE* (*postHookFunc) (FILE* retVal___, const char *file, const char *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_HCache_open_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_HCache_open_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, file, opt);
+ }
+ }
+ return retVal___;
+}
/* atcommand */
void HP_atcommand_init(bool minimal) {
int hIndex = 0;
@@ -23758,6 +23839,793 @@ void HP_clif_pNPCMarketPurchase(int fd, struct map_session_data *sd) {
}
return;
}
+/* cmdline */
+void HP_cmdline_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_cmdline_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.cmdline.init();
+ }
+ if( HPMHooks.count.HP_cmdline_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_cmdline_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_cmdline_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.cmdline.final();
+ }
+ if( HPMHooks.count.HP_cmdline_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_cmdline_arg_add_pre ) {
+ bool (*preHookFunc) (unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_arg_add_pre[hIndex].func;
+ retVal___ = preHookFunc(&pluginID, name, &shortname, &func, help, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.arg_add(pluginID, name, shortname, func, help, options);
+ }
+ if( HPMHooks.count.HP_cmdline_arg_add_post ) {
+ bool (*postHookFunc) (bool retVal___, unsigned int *pluginID, const char *name, char *shortname, CmdlineExecFunc *func, const char *help, unsigned int *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_arg_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &pluginID, name, &shortname, &func, help, &options);
+ }
+ }
+ return retVal___;
+}
+int HP_cmdline_exec(int argc, char **argv, unsigned int options) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_cmdline_exec_pre ) {
+ int (*preHookFunc) (int *argc, char **argv, unsigned int *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_exec_pre[hIndex].func;
+ retVal___ = preHookFunc(&argc, argv, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.exec(argc, argv, options);
+ }
+ if( HPMHooks.count.HP_cmdline_exec_post ) {
+ int (*postHookFunc) (int retVal___, int *argc, char **argv, unsigned int *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_exec_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_exec_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &argc, argv, &options);
+ }
+ }
+ return retVal___;
+}
+bool HP_cmdline_arg_next_value(const char *name, int current_arg, int argc) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_cmdline_arg_next_value_pre ) {
+ bool (*preHookFunc) (const char *name, int *current_arg, int *argc);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_pre[hIndex].func;
+ retVal___ = preHookFunc(name, &current_arg, &argc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.arg_next_value(name, current_arg, argc);
+ }
+ if( HPMHooks.count.HP_cmdline_arg_next_value_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *name, int *current_arg, int *argc);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_next_value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_arg_next_value_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, name, &current_arg, &argc);
+ }
+ }
+ return retVal___;
+}
+const char* HP_cmdline_arg_source(struct CmdlineArgData *arg) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_cmdline_arg_source_pre ) {
+ const char* (*preHookFunc) (struct CmdlineArgData *arg);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_cmdline_arg_source_pre[hIndex].func;
+ retVal___ = preHookFunc(arg);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.cmdline.arg_source(arg);
+ }
+ if( HPMHooks.count.HP_cmdline_arg_source_post ) {
+ const char* (*postHookFunc) (const char* retVal___, struct CmdlineArgData *arg);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_cmdline_arg_source_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_cmdline_arg_source_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, arg);
+ }
+ }
+ return retVal___;
+}
+/* console */
+void HP_console_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.init();
+ }
+ if( HPMHooks.count.HP_console_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_console_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.final();
+ }
+ if( HPMHooks.count.HP_console_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_console_display_title(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_display_title_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_display_title_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.display_title();
+ }
+ if( HPMHooks.count.HP_console_display_title_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_title_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_display_title_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* core */
+void HP_core_shutdown_callback(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_core_shutdown_callback_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_core_shutdown_callback_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.core.shutdown_callback();
+ }
+ if( HPMHooks.count.HP_core_shutdown_callback_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_core_shutdown_callback_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_core_shutdown_callback_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* DB */
+DBOptions HP_DB_fix_options(DBType type, DBOptions options) {
+ int hIndex = 0;
+ DBOptions retVal___ = DB_OPT_BASE;
+ if( HPMHooks.count.HP_DB_fix_options_pre ) {
+ DBOptions (*preHookFunc) (DBType *type, DBOptions *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_fix_options_pre[hIndex].func;
+ retVal___ = preHookFunc(&type, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.fix_options(type, options);
+ }
+ if( HPMHooks.count.HP_DB_fix_options_post ) {
+ DBOptions (*postHookFunc) (DBOptions retVal___, DBType *type, DBOptions *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_fix_options_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_fix_options_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type, &options);
+ }
+ }
+ return retVal___;
+}
+DBComparator HP_DB_default_cmp(DBType type) {
+ int hIndex = 0;
+ DBComparator retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_default_cmp_pre ) {
+ DBComparator (*preHookFunc) (DBType *type);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_default_cmp_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.default_cmp(type);
+ }
+ if( HPMHooks.count.HP_DB_default_cmp_post ) {
+ DBComparator (*postHookFunc) (DBComparator retVal___, DBType *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_cmp_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_default_cmp_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type);
+ }
+ }
+ return retVal___;
+}
+DBHasher HP_DB_default_hash(DBType type) {
+ int hIndex = 0;
+ DBHasher retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_default_hash_pre ) {
+ DBHasher (*preHookFunc) (DBType *type);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_default_hash_pre[hIndex].func;
+ retVal___ = preHookFunc(&type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.default_hash(type);
+ }
+ if( HPMHooks.count.HP_DB_default_hash_post ) {
+ DBHasher (*postHookFunc) (DBHasher retVal___, DBType *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_hash_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_default_hash_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type);
+ }
+ }
+ return retVal___;
+}
+DBReleaser HP_DB_default_release(DBType type, DBOptions options) {
+ int hIndex = 0;
+ DBReleaser retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_default_release_pre ) {
+ DBReleaser (*preHookFunc) (DBType *type, DBOptions *options);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_default_release_pre[hIndex].func;
+ retVal___ = preHookFunc(&type, &options);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.default_release(type, options);
+ }
+ if( HPMHooks.count.HP_DB_default_release_post ) {
+ DBReleaser (*postHookFunc) (DBReleaser retVal___, DBType *type, DBOptions *options);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_default_release_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_default_release_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &type, &options);
+ }
+ }
+ return retVal___;
+}
+DBReleaser HP_DB_custom_release(DBRelease which) {
+ int hIndex = 0;
+ DBReleaser retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_custom_release_pre ) {
+ DBReleaser (*preHookFunc) (DBRelease *which);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_custom_release_pre[hIndex].func;
+ retVal___ = preHookFunc(&which);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.custom_release(which);
+ }
+ if( HPMHooks.count.HP_DB_custom_release_post ) {
+ DBReleaser (*postHookFunc) (DBReleaser retVal___, DBRelease *which);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_custom_release_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_custom_release_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &which);
+ }
+ }
+ return retVal___;
+}
+DBMap* HP_DB_alloc(const char *file, const char *func, int line, DBType type, DBOptions options, unsigned short maxlen) {
+ int hIndex = 0;
+ DBMap* retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_alloc_pre ) {
+ DBMap* (*preHookFunc) (const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_alloc_pre[hIndex].func;
+ retVal___ = preHookFunc(file, func, &line, &type, &options, &maxlen);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.alloc(file, func, line, type, options, maxlen);
+ }
+ if( HPMHooks.count.HP_DB_alloc_post ) {
+ DBMap* (*postHookFunc) (DBMap* retVal___, const char *file, const char *func, int *line, DBType *type, DBOptions *options, unsigned short *maxlen);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_alloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_alloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, file, func, &line, &type, &options, &maxlen);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_i2key(int key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_i2key_pre ) {
+ DBKey (*preHookFunc) (int *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_i2key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.i2key(key);
+ }
+ if( HPMHooks.count.HP_DB_i2key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, int *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_i2key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_ui2key(unsigned int key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_ui2key_pre ) {
+ DBKey (*preHookFunc) (unsigned int *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ui2key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ui2key(key);
+ }
+ if( HPMHooks.count.HP_DB_ui2key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, unsigned int *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ui2key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_str2key(const char *key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_str2key_pre ) {
+ DBKey (*preHookFunc) (const char *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_str2key_pre[hIndex].func;
+ retVal___ = preHookFunc(key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.str2key(key);
+ }
+ if( HPMHooks.count.HP_DB_str2key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, const char *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_str2key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_str2key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_i642key(int64 key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_i642key_pre ) {
+ DBKey (*preHookFunc) (int64 *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_i642key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.i642key(key);
+ }
+ if( HPMHooks.count.HP_DB_i642key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, int64 *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i642key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_i642key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBKey HP_DB_ui642key(uint64 key) {
+ int hIndex = 0;
+ DBKey retVal___;
+ memset(&retVal___, '\0', sizeof(DBKey));
+ if( HPMHooks.count.HP_DB_ui642key_pre ) {
+ DBKey (*preHookFunc) (uint64 *key);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ui642key_pre[hIndex].func;
+ retVal___ = preHookFunc(&key);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ui642key(key);
+ }
+ if( HPMHooks.count.HP_DB_ui642key_post ) {
+ DBKey (*postHookFunc) (DBKey retVal___, uint64 *key);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui642key_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ui642key_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &key);
+ }
+ }
+ return retVal___;
+}
+DBData HP_DB_i2data(int data) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_DB_i2data_pre ) {
+ DBData (*preHookFunc) (int *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_i2data_pre[hIndex].func;
+ retVal___ = preHookFunc(&data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.i2data(data);
+ }
+ if( HPMHooks.count.HP_DB_i2data_post ) {
+ DBData (*postHookFunc) (DBData retVal___, int *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_i2data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_i2data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &data);
+ }
+ }
+ return retVal___;
+}
+DBData HP_DB_ui2data(unsigned int data) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_DB_ui2data_pre ) {
+ DBData (*preHookFunc) (unsigned int *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ui2data_pre[hIndex].func;
+ retVal___ = preHookFunc(&data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ui2data(data);
+ }
+ if( HPMHooks.count.HP_DB_ui2data_post ) {
+ DBData (*postHookFunc) (DBData retVal___, unsigned int *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ui2data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ui2data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &data);
+ }
+ }
+ return retVal___;
+}
+DBData HP_DB_ptr2data(void *data) {
+ int hIndex = 0;
+ DBData retVal___;
+ memset(&retVal___, '\0', sizeof(DBData));
+ if( HPMHooks.count.HP_DB_ptr2data_pre ) {
+ DBData (*preHookFunc) (void *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_ptr2data_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.ptr2data(data);
+ }
+ if( HPMHooks.count.HP_DB_ptr2data_post ) {
+ DBData (*postHookFunc) (DBData retVal___, void *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_ptr2data_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_ptr2data_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+int HP_DB_data2i(DBData *data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_DB_data2i_pre ) {
+ int (*preHookFunc) (DBData *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_data2i_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.data2i(data);
+ }
+ if( HPMHooks.count.HP_DB_data2i_post ) {
+ int (*postHookFunc) (int retVal___, DBData *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2i_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_data2i_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+unsigned int HP_DB_data2ui(DBData *data) {
+ int hIndex = 0;
+ unsigned int retVal___ = 0;
+ if( HPMHooks.count.HP_DB_data2ui_pre ) {
+ unsigned int (*preHookFunc) (DBData *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_data2ui_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.data2ui(data);
+ }
+ if( HPMHooks.count.HP_DB_data2ui_post ) {
+ unsigned int (*postHookFunc) (unsigned int retVal___, DBData *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ui_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_data2ui_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+void* HP_DB_data2ptr(DBData *data) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_DB_data2ptr_pre ) {
+ void* (*preHookFunc) (DBData *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_data2ptr_pre[hIndex].func;
+ retVal___ = preHookFunc(data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.DB.data2ptr(data);
+ }
+ if( HPMHooks.count.HP_DB_data2ptr_post ) {
+ void* (*postHookFunc) (void* retVal___, DBData *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_data2ptr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_data2ptr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, data);
+ }
+ }
+ return retVal___;
+}
+void HP_DB_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_DB_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.DB.init();
+ }
+ if( HPMHooks.count.HP_DB_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_DB_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_DB_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_DB_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.DB.final();
+ }
+ if( HPMHooks.count.HP_DB_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_DB_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_DB_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* duel */
int HP_duel_create(struct map_session_data *sd, const unsigned int maxpl) {
int hIndex = 0;
@@ -34907,6 +35775,1563 @@ bool HP_itemdb_lookup_const(const config_setting_t *it, const char *name, int *v
}
return retVal___;
}
+/* libconfig */
+int HP_libconfig_read(config_t *config, FILE *stream) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_pre ) {
+ int (*preHookFunc) (config_t *config, FILE *stream);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_pre[hIndex].func;
+ retVal___ = preHookFunc(config, stream);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read(config, stream);
+ }
+ if( HPMHooks.count.HP_libconfig_read_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, FILE *stream);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, stream);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_write(const config_t *config, FILE *stream) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_write_pre ) {
+ void (*preHookFunc) (const config_t *config, FILE *stream);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_write_pre[hIndex].func;
+ preHookFunc(config, stream);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.write(config, stream);
+ }
+ if( HPMHooks.count.HP_libconfig_write_post ) {
+ void (*postHookFunc) (const config_t *config, FILE *stream);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_write_post[hIndex].func;
+ postHookFunc(config, stream);
+ }
+ }
+ return;
+}
+void HP_libconfig_set_auto_convert(config_t *config, int flag) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_set_auto_convert_pre ) {
+ void (*preHookFunc) (config_t *config, int *flag);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_pre[hIndex].func;
+ preHookFunc(config, &flag);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.set_auto_convert(config, flag);
+ }
+ if( HPMHooks.count.HP_libconfig_set_auto_convert_post ) {
+ void (*postHookFunc) (config_t *config, int *flag);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_auto_convert_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_set_auto_convert_post[hIndex].func;
+ postHookFunc(config, &flag);
+ }
+ }
+ return;
+}
+int HP_libconfig_get_auto_convert(const config_t *config) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_get_auto_convert_pre ) {
+ int (*preHookFunc) (const config_t *config);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_pre[hIndex].func;
+ retVal___ = preHookFunc(config);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.get_auto_convert(config);
+ }
+ if( HPMHooks.count.HP_libconfig_get_auto_convert_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_get_auto_convert_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_get_auto_convert_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_read_string(config_t *config, const char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_string_pre ) {
+ int (*preHookFunc) (config_t *config, const char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_string_pre[hIndex].func;
+ retVal___ = preHookFunc(config, str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read_string(config, str);
+ }
+ if( HPMHooks.count.HP_libconfig_read_string_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, str);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_read_file_src(config_t *config, const char *filename) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_file_src_pre ) {
+ int (*preHookFunc) (config_t *config, const char *filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_file_src_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read_file_src(config, filename);
+ }
+ if( HPMHooks.count.HP_libconfig_read_file_src_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_src_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_file_src_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filename);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_write_file(config_t *config, const char *filename) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_write_file_pre ) {
+ int (*preHookFunc) (config_t *config, const char *filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_write_file_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.write_file(config, filename);
+ }
+ if( HPMHooks.count.HP_libconfig_write_file_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_write_file_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_write_file_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filename);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_set_destructor(config_t *config, void ( *destructor ) (void *)) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_set_destructor_pre ) {
+ void (*preHookFunc) (config_t *config, void ( *destructor ) (void *));
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_set_destructor_pre[hIndex].func;
+ preHookFunc(config, destructor);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.set_destructor(config, destructor);
+ }
+ if( HPMHooks.count.HP_libconfig_set_destructor_post ) {
+ void (*postHookFunc) (config_t *config, void ( *destructor ) (void *));
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_destructor_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_set_destructor_post[hIndex].func;
+ postHookFunc(config, destructor);
+ }
+ }
+ return;
+}
+void HP_libconfig_set_include_dir(config_t *config, const char *include_dir) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_set_include_dir_pre ) {
+ void (*preHookFunc) (config_t *config, const char *include_dir);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_pre[hIndex].func;
+ preHookFunc(config, include_dir);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.set_include_dir(config, include_dir);
+ }
+ if( HPMHooks.count.HP_libconfig_set_include_dir_post ) {
+ void (*postHookFunc) (config_t *config, const char *include_dir);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_set_include_dir_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_set_include_dir_post[hIndex].func;
+ postHookFunc(config, include_dir);
+ }
+ }
+ return;
+}
+void HP_libconfig_init(config_t *config) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_init_pre ) {
+ void (*preHookFunc) (config_t *config);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_init_pre[hIndex].func;
+ preHookFunc(config);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.init(config);
+ }
+ if( HPMHooks.count.HP_libconfig_init_post ) {
+ void (*postHookFunc) (config_t *config);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_init_post[hIndex].func;
+ postHookFunc(config);
+ }
+ }
+ return;
+}
+void HP_libconfig_destroy(config_t *config) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_destroy_pre ) {
+ void (*preHookFunc) (config_t *config);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_destroy_pre[hIndex].func;
+ preHookFunc(config);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.destroy(config);
+ }
+ if( HPMHooks.count.HP_libconfig_destroy_post ) {
+ void (*postHookFunc) (config_t *config);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_destroy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_destroy_post[hIndex].func;
+ postHookFunc(config);
+ }
+ }
+ return;
+}
+int HP_libconfig_setting_get_int(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+long long HP_libconfig_setting_get_int64(const config_setting_t *setting) {
+ int hIndex = 0;
+ long long retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_pre ) {
+ long long (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int64(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_post ) {
+ long long (*postHookFunc) (long long retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+double HP_libconfig_setting_get_float(const config_setting_t *setting) {
+ int hIndex = 0;
+ double retVal___ = 0.;
+ if( HPMHooks.count.HP_libconfig_setting_get_float_pre ) {
+ double (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_float(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_float_post ) {
+ double (*postHookFunc) (double retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_get_bool(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_bool(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+const char* HP_libconfig_setting_get_string(const config_setting_t *setting) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_string_pre ) {
+ const char* (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_string(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_string_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_int(const config_setting_t *setting, const char *name, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_int(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_int64(const config_setting_t *setting, const char *name, long long *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int64_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_int64(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_int64_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_float(const config_setting_t *setting, const char *name, double *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_float_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_float(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_float_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_bool(const config_setting_t *setting, const char *name, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_bool_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_bool(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_bool_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_lookup_string(const config_setting_t *setting, const char *name, const char **value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_lookup_string_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, const char *name, const char **value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_lookup_string(setting, name, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_lookup_string_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, const char *name, const char **value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_lookup_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_lookup_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_int(config_setting_t *setting, int value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_int_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_int64(config_setting_t *setting, long long value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int64(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_float(config_setting_t *setting, double value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_float_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_float(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_float_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_bool(config_setting_t *setting, int value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_bool(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_string(config_setting_t *setting, const char *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_string_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, const char *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_string(setting, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_string_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, const char *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_set_format(config_setting_t *setting, short format) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_format_pre ) {
+ int (*preHookFunc) (config_setting_t *setting, short *format);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &format);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_format(setting, format);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_format_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *setting, short *format);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_format_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_format_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &format);
+ }
+ }
+ return retVal___;
+}
+short HP_libconfig_setting_get_format(const config_setting_t *setting) {
+ int hIndex = 0;
+ short retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_format_pre ) {
+ short (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_format(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_format_post ) {
+ short (*postHookFunc) (short retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_format_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_format_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_get_int_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int_elem_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int_elem_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+long long HP_libconfig_setting_get_int64_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ long long retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre ) {
+ long long (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_int64_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_int64_elem_post ) {
+ long long (*postHookFunc) (long long retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_int64_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_int64_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+double HP_libconfig_setting_get_float_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ double retVal___ = 0.;
+ if( HPMHooks.count.HP_libconfig_setting_get_float_elem_pre ) {
+ double (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_float_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_float_elem_post ) {
+ double (*postHookFunc) (double retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_float_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_float_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_get_bool_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_bool_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_bool_elem_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_bool_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_bool_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+const char* HP_libconfig_setting_get_string_elem(const config_setting_t *setting, int idx) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_string_elem_pre ) {
+ const char* (*preHookFunc) (const config_setting_t *setting, int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_string_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_string_elem_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const config_setting_t *setting, int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_string_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_string_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_int_elem(config_setting_t *setting, int idx, int value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_int_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_int64_elem(config_setting_t *setting, int idx, long long value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_int64_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_int64_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_int64_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_int64_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_float_elem(config_setting_t *setting, int idx, double value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_float_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_float_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_float_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_float_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_float_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_bool_elem(config_setting_t *setting, int idx, int value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, &value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_bool_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_bool_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_bool_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_bool_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, &value);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_set_string_elem(config_setting_t *setting, int idx, const char *value) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_set_string_elem_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, int *idx, const char *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_set_string_elem(setting, idx, value);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_string_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, int *idx, const char *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_string_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_string_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_index(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_index_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_index_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_index(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_index_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_index_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_index_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_length(const config_setting_t *setting) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_length_pre ) {
+ int (*preHookFunc) (const config_setting_t *setting);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_length_pre[hIndex].func;
+ retVal___ = preHookFunc(setting);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_length(setting);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_length_post ) {
+ int (*postHookFunc) (int retVal___, const config_setting_t *setting);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_length_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_length_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_get_elem(const config_setting_t *setting, unsigned int idx) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_elem_pre ) {
+ config_setting_t* (*preHookFunc) (const config_setting_t *setting, unsigned int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_elem(setting, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_elem_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, unsigned int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, &idx);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_get_member(const config_setting_t *setting, const char *name) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_get_member_pre ) {
+ config_setting_t* (*preHookFunc) (const config_setting_t *setting, const char *name);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_get_member(setting, name);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_get_member_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_setting_t *setting, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_get_member_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_get_member_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, name);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_setting_add(config_setting_t *parent, const char *name, int type) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_setting_add_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *parent, const char *name, int *type);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_add_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, name, &type);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_add(parent, name, type);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_add_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *parent, const char *name, int *type);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, name, &type);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_remove(config_setting_t *parent, const char *name) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_remove_pre ) {
+ int (*preHookFunc) (config_setting_t *parent, const char *name);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_remove(parent, name);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_remove_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *parent, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, name);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_setting_remove_elem(config_setting_t *parent, unsigned int idx) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_remove_elem_pre ) {
+ int (*preHookFunc) (config_setting_t *parent, unsigned int *idx);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, &idx);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_remove_elem(parent, idx);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_remove_elem_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *parent, unsigned int *idx);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_remove_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_remove_elem_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, &idx);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_setting_set_hook(config_setting_t *setting, void *hook) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_set_hook_pre ) {
+ void (*preHookFunc) (config_setting_t *setting, void *hook);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_pre[hIndex].func;
+ preHookFunc(setting, hook);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_set_hook(setting, hook);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_set_hook_post ) {
+ void (*postHookFunc) (config_setting_t *setting, void *hook);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_set_hook_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_set_hook_post[hIndex].func;
+ postHookFunc(setting, hook);
+ }
+ }
+ return;
+}
+config_setting_t* HP_libconfig_lookup(const config_t *config, const char *filepath) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_lookup_pre ) {
+ config_setting_t* (*preHookFunc) (const config_t *config, const char *filepath);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup(config, filepath);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, const config_t *config, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath);
+ }
+ }
+ return retVal___;
+}
+config_setting_t* HP_libconfig_lookup_from(config_setting_t *setting, const char *filepath) {
+ int hIndex = 0;
+ config_setting_t* retVal___ = NULL;
+ if( HPMHooks.count.HP_libconfig_lookup_from_pre ) {
+ config_setting_t* (*preHookFunc) (config_setting_t *setting, const char *filepath);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_from_pre[hIndex].func;
+ retVal___ = preHookFunc(setting, filepath);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_from(setting, filepath);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_from_post ) {
+ config_setting_t* (*postHookFunc) (config_setting_t* retVal___, config_setting_t *setting, const char *filepath);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_from_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_from_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, setting, filepath);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_int(const config_t *config, const char *filepath, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_int_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_int_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_int(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_int_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_int_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_int64(const config_t *config, const char *filepath, long long *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_int64_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, long long *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_int64(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_int64_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, long long *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_int64_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_int64_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_float(const config_t *config, const char *filepath, double *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_float_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, double *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_float_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_float(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_float_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, double *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_float_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_float_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_bool(const config_t *config, const char *filepath, int *value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_bool_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, int *value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_bool(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_bool_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, int *value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_bool_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_bool_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_lookup_string(const config_t *config, const char *filepath, const char **value) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_lookup_string_pre ) {
+ int (*preHookFunc) (const config_t *config, const char *filepath, const char **value);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_lookup_string_pre[hIndex].func;
+ retVal___ = preHookFunc(config, filepath, value);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.lookup_string(config, filepath, value);
+ }
+ if( HPMHooks.count.HP_libconfig_lookup_string_post ) {
+ int (*postHookFunc) (int retVal___, const config_t *config, const char *filepath, const char **value);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_lookup_string_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_lookup_string_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, filepath, value);
+ }
+ }
+ return retVal___;
+}
+int HP_libconfig_read_file(config_t *config, const char *config_filename) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_read_file_pre ) {
+ int (*preHookFunc) (config_t *config, const char *config_filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_read_file_pre[hIndex].func;
+ retVal___ = preHookFunc(config, config_filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.read_file(config, config_filename);
+ }
+ if( HPMHooks.count.HP_libconfig_read_file_post ) {
+ int (*postHookFunc) (int retVal___, config_t *config, const char *config_filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_read_file_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_read_file_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, config, config_filename);
+ }
+ }
+ return retVal___;
+}
+void HP_libconfig_setting_copy_simple(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_simple_pre ) {
+ void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_pre[hIndex].func;
+ preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_copy_simple(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_simple_post ) {
+ void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_simple_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_simple_post[hIndex].func;
+ postHookFunc(parent, src);
+ }
+ }
+ return;
+}
+void HP_libconfig_setting_copy_elem(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_elem_pre ) {
+ void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_pre[hIndex].func;
+ preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_copy_elem(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_elem_post ) {
+ void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_elem_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_elem_post[hIndex].func;
+ postHookFunc(parent, src);
+ }
+ }
+ return;
+}
+void HP_libconfig_setting_copy_aggregate(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre ) {
+ void (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_pre[hIndex].func;
+ preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libconfig.setting_copy_aggregate(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_aggregate_post ) {
+ void (*postHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_aggregate_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_aggregate_post[hIndex].func;
+ postHookFunc(parent, src);
+ }
+ }
+ return;
+}
+int HP_libconfig_setting_copy(config_setting_t *parent, const config_setting_t *src) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libconfig_setting_copy_pre ) {
+ int (*preHookFunc) (config_setting_t *parent, const config_setting_t *src);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libconfig_setting_copy_pre[hIndex].func;
+ retVal___ = preHookFunc(parent, src);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libconfig.setting_copy(parent, src);
+ }
+ if( HPMHooks.count.HP_libconfig_setting_copy_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *parent, const config_setting_t *src);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libconfig_setting_copy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libconfig_setting_copy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, parent, src);
+ }
+ }
+ return retVal___;
+}
/* logs */
void HP_logs_pick_pc(struct map_session_data *sd, e_log_pick_type type, int amount, struct item *itm, struct item_data *data) {
int hIndex = 0;
@@ -35725,6 +38150,352 @@ bool HP_mail_invalid_operation(struct map_session_data *sd) {
}
return retVal___;
}
+/* iMalloc */
+void HP_iMalloc_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.init();
+ }
+ if( HPMHooks.count.HP_iMalloc_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_iMalloc_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.final();
+ }
+ if( HPMHooks.count.HP_iMalloc_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void* HP_iMalloc_malloc(size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_malloc_pre ) {
+ void* (*preHookFunc) (size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_malloc_pre[hIndex].func;
+ retVal___ = preHookFunc(&size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.malloc(size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_malloc_post ) {
+ void* (*postHookFunc) (void* retVal___, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_malloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_malloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void* HP_iMalloc_calloc(size_t num, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_calloc_pre ) {
+ void* (*preHookFunc) (size_t *num, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_calloc_pre[hIndex].func;
+ retVal___ = preHookFunc(&num, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.calloc(num, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_calloc_post ) {
+ void* (*postHookFunc) (void* retVal___, size_t *num, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_calloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_calloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &num, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void* HP_iMalloc_realloc(void *p, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_realloc_pre ) {
+ void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_realloc_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.realloc(p, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_realloc_post ) {
+ void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_realloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_realloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void* HP_iMalloc_reallocz(void *p, size_t size, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ void* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_reallocz_pre ) {
+ void* (*preHookFunc) (void *p, size_t *size, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_reallocz_pre[hIndex].func;
+ retVal___ = preHookFunc(p, &size, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.reallocz(p, size, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_reallocz_post ) {
+ void* (*postHookFunc) (void* retVal___, void *p, size_t *size, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_reallocz_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_reallocz_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, &size, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+char* HP_iMalloc_astrdup(const char *p, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_iMalloc_astrdup_pre ) {
+ char* (*preHookFunc) (const char *p, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_astrdup_pre[hIndex].func;
+ retVal___ = preHookFunc(p, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.astrdup(p, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_astrdup_post ) {
+ char* (*postHookFunc) (char* retVal___, const char *p, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_astrdup_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_astrdup_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+void HP_iMalloc_free(void *p, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_free_pre ) {
+ void (*preHookFunc) (void *p, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_free_pre[hIndex].func;
+ preHookFunc(p, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.free(p, file, line, func);
+ }
+ if( HPMHooks.count.HP_iMalloc_free_post ) {
+ void (*postHookFunc) (void *p, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_free_post[hIndex].func;
+ postHookFunc(p, file, &line, func);
+ }
+ }
+ return;
+}
+void HP_iMalloc_memory_check(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_memory_check_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_memory_check_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.memory_check();
+ }
+ if( HPMHooks.count.HP_iMalloc_memory_check_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_memory_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_memory_check_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_iMalloc_verify_ptr(void *ptr) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_iMalloc_verify_ptr_pre ) {
+ bool (*preHookFunc) (void *ptr);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_pre[hIndex].func;
+ retVal___ = preHookFunc(ptr);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.verify_ptr(ptr);
+ }
+ if( HPMHooks.count.HP_iMalloc_verify_ptr_post ) {
+ bool (*postHookFunc) (bool retVal___, void *ptr);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_verify_ptr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_verify_ptr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ptr);
+ }
+ }
+ return retVal___;
+}
+size_t HP_iMalloc_usage(void) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_iMalloc_usage_pre ) {
+ size_t (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_usage_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.iMalloc.usage();
+ }
+ if( HPMHooks.count.HP_iMalloc_usage_post ) {
+ size_t (*postHookFunc) (size_t retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_usage_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_usage_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_iMalloc_post_shutdown(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_post_shutdown_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.post_shutdown();
+ }
+ if( HPMHooks.count.HP_iMalloc_post_shutdown_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_post_shutdown_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_post_shutdown_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_iMalloc_init_messages(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_iMalloc_init_messages_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_iMalloc_init_messages_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.iMalloc.init_messages();
+ }
+ if( HPMHooks.count.HP_iMalloc_init_messages_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_iMalloc_init_messages_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_iMalloc_init_messages_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* map */
void HP_map_zone_init(void) {
int hIndex = 0;
@@ -39295,6 +42066,248 @@ void HP_map_zone_clear_single(struct map_zone_data *zone) {
}
return;
}
+/* mapindex */
+int HP_mapindex_init(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_mapindex_init_pre ) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_init_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.init();
+ }
+ if( HPMHooks.count.HP_mapindex_init_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_init_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_mapindex_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mapindex_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapindex.final();
+ }
+ if( HPMHooks.count.HP_mapindex_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_mapindex_addmap(int index, const char *name) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_mapindex_addmap_pre ) {
+ int (*preHookFunc) (int *index, const char *name);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_addmap_pre[hIndex].func;
+ retVal___ = preHookFunc(&index, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.addmap(index, name);
+ }
+ if( HPMHooks.count.HP_mapindex_addmap_post ) {
+ int (*postHookFunc) (int retVal___, int *index, const char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_addmap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_addmap_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &index, name);
+ }
+ }
+ return retVal___;
+}
+void HP_mapindex_removemap(int index) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_mapindex_removemap_pre ) {
+ void (*preHookFunc) (int *index);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_removemap_pre[hIndex].func;
+ preHookFunc(&index);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.mapindex.removemap(index);
+ }
+ if( HPMHooks.count.HP_mapindex_removemap_post ) {
+ void (*postHookFunc) (int *index);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_removemap_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_removemap_post[hIndex].func;
+ postHookFunc(&index);
+ }
+ }
+ return;
+}
+const char* HP_mapindex_getmapname(const char *string, char *output) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapindex_getmapname_pre ) {
+ const char* (*preHookFunc) (const char *string, char *output);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_getmapname_pre[hIndex].func;
+ retVal___ = preHookFunc(string, output);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.getmapname(string, output);
+ }
+ if( HPMHooks.count.HP_mapindex_getmapname_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *string, char *output);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_getmapname_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, output);
+ }
+ }
+ return retVal___;
+}
+const char* HP_mapindex_getmapname_ext(const char *string, char *output) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapindex_getmapname_ext_pre ) {
+ const char* (*preHookFunc) (const char *string, char *output);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_pre[hIndex].func;
+ retVal___ = preHookFunc(string, output);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.getmapname_ext(string, output);
+ }
+ if( HPMHooks.count.HP_mapindex_getmapname_ext_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *string, char *output);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_getmapname_ext_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_getmapname_ext_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, output);
+ }
+ }
+ return retVal___;
+}
+unsigned short HP_mapindex_name2id(const char *p1) {
+ int hIndex = 0;
+ unsigned short retVal___ = 0;
+ if( HPMHooks.count.HP_mapindex_name2id_pre ) {
+ unsigned short (*preHookFunc) (const char *p1);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_name2id_pre[hIndex].func;
+ retVal___ = preHookFunc(p1);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.name2id(p1);
+ }
+ if( HPMHooks.count.HP_mapindex_name2id_post ) {
+ unsigned short (*postHookFunc) (unsigned short retVal___, const char *p1);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_name2id_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_name2id_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p1);
+ }
+ }
+ return retVal___;
+}
+const char* HP_mapindex_id2name(uint16 id, const char *file, int line, const char *func) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_mapindex_id2name_pre ) {
+ const char* (*preHookFunc) (uint16 *id, const char *file, int *line, const char *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_id2name_pre[hIndex].func;
+ retVal___ = preHookFunc(&id, file, &line, func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.id2name(id, file, line, func);
+ }
+ if( HPMHooks.count.HP_mapindex_id2name_post ) {
+ const char* (*postHookFunc) (const char* retVal___, uint16 *id, const char *file, int *line, const char *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_id2name_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_id2name_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &id, file, &line, func);
+ }
+ }
+ return retVal___;
+}
+bool HP_mapindex_check_default(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_mapindex_check_default_pre ) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_mapindex_check_default_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.mapindex.check_default();
+ }
+ if( HPMHooks.count.HP_mapindex_check_default_post ) {
+ bool (*postHookFunc) (bool retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_mapindex_check_default_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_mapindex_check_default_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
/* mapit */
struct s_mapiterator* HP_mapit_alloc(enum e_mapitflags flags, enum bl_type types) {
int hIndex = 0;
@@ -45999,6 +49012,33 @@ int HP_npc_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
}
return retVal___;
}
+/* nullpo */
+void HP_nullpo_assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_nullpo_assert_report_pre ) {
+ void (*preHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_nullpo_assert_report_pre[hIndex].func;
+ preHookFunc(file, &line, func, targetname, title);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.nullpo.assert_report(file, line, func, targetname, title);
+ }
+ if( HPMHooks.count.HP_nullpo_assert_report_post ) {
+ void (*postHookFunc) (const char *file, int *line, const char *func, const char *targetname, const char *title);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_assert_report_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_nullpo_assert_report_post[hIndex].func;
+ postHookFunc(file, &line, func, targetname, title);
+ }
+ }
+ return;
+}
/* party */
void HP_party_init(bool minimal) {
int hIndex = 0;
@@ -50271,14 +53311,14 @@ int HP_pc_equipitem(struct map_session_data *sd, int n, int req_pos) {
}
return retVal___;
}
-void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int pos) {
+void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int n, int pos) {
int hIndex = 0;
if( HPMHooks.count.HP_pc_equipitem_pos_pre ) {
- void (*preHookFunc) (struct map_session_data *sd, struct item_data *id, int *pos);
+ void (*preHookFunc) (struct map_session_data *sd, struct item_data *id, int *n, int *pos);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_pc_equipitem_pos_pre[hIndex].func;
- preHookFunc(sd, id, &pos);
+ preHookFunc(sd, id, &n, &pos);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -50286,13 +53326,13 @@ void HP_pc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int
}
}
{
- HPMHooks.source.pc.equipitem_pos(sd, id, pos);
+ HPMHooks.source.pc.equipitem_pos(sd, id, n, pos);
}
if( HPMHooks.count.HP_pc_equipitem_pos_post ) {
- void (*postHookFunc) (struct map_session_data *sd, struct item_data *id, int *pos);
+ void (*postHookFunc) (struct map_session_data *sd, struct item_data *id, int *n, int *pos);
for(hIndex = 0; hIndex < HPMHooks.count.HP_pc_equipitem_pos_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_pc_equipitem_pos_post[hIndex].func;
- postHookFunc(sd, id, &pos);
+ postHookFunc(sd, id, &n, &pos);
}
}
return;
@@ -55686,6 +58726,58 @@ void HP_script_run(struct script_code *rootscript, int pos, int rid, int oid) {
}
return;
}
+void HP_script_run_npc(struct script_code *rootscript, int pos, int rid, int oid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_npc_pre ) {
+ void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_npc_pre[hIndex].func;
+ preHookFunc(rootscript, &pos, &rid, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_npc(rootscript, pos, rid, oid);
+ }
+ if( HPMHooks.count.HP_script_run_npc_post ) {
+ void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_npc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_npc_post[hIndex].func;
+ postHookFunc(rootscript, &pos, &rid, &oid);
+ }
+ }
+ return;
+}
+void HP_script_run_pet(struct script_code *rootscript, int pos, int rid, int oid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_pet_pre ) {
+ void (*preHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_pet_pre[hIndex].func;
+ preHookFunc(rootscript, &pos, &rid, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_pet(rootscript, pos, rid, oid);
+ }
+ if( HPMHooks.count.HP_script_run_pet_post ) {
+ void (*postHookFunc) (struct script_code *rootscript, int *pos, int *rid, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_pet_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_pet_post[hIndex].func;
+ postHookFunc(rootscript, &pos, &rid, &oid);
+ }
+ }
+ return;
+}
void HP_script_run_main(struct script_state *st) {
int hIndex = 0;
if( HPMHooks.count.HP_script_run_main_pre ) {
@@ -58915,6 +62007,84 @@ void HP_script_parser_clean_leftovers(void) {
}
return;
}
+void HP_script_run_use_script(struct map_session_data *sd, struct item_data *data, int oid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_use_script_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_use_script_pre[hIndex].func;
+ preHookFunc(sd, data, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_use_script(sd, data, oid);
+ }
+ if( HPMHooks.count.HP_script_run_use_script_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_use_script_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_use_script_post[hIndex].func;
+ postHookFunc(sd, data, &oid);
+ }
+ }
+ return;
+}
+void HP_script_run_item_equip_script(struct map_session_data *sd, struct item_data *data, int oid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_item_equip_script_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_item_equip_script_pre[hIndex].func;
+ preHookFunc(sd, data, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_item_equip_script(sd, data, oid);
+ }
+ if( HPMHooks.count.HP_script_run_item_equip_script_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_equip_script_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_item_equip_script_post[hIndex].func;
+ postHookFunc(sd, data, &oid);
+ }
+ }
+ return;
+}
+void HP_script_run_item_unequip_script(struct map_session_data *sd, struct item_data *data, int oid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_script_run_item_unequip_script_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_pre[hIndex].func;
+ preHookFunc(sd, data, &oid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.script.run_item_unequip_script(sd, data, oid);
+ }
+ if( HPMHooks.count.HP_script_run_item_unequip_script_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, struct item_data *data, int *oid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_script_run_item_unequip_script_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_script_run_item_unequip_script_post[hIndex].func;
+ postHookFunc(sd, data, &oid);
+ }
+ }
+ return;
+}
/* searchstore */
bool HP_searchstore_open(struct map_session_data *sd, unsigned int uses, unsigned short effect) {
int hIndex = 0;
@@ -59180,6 +62350,118 @@ bool HP_searchstore_result(struct map_session_data *sd, unsigned int store_id, i
}
return retVal___;
}
+/* showmsg */
+void HP_showmsg_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_showmsg_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_showmsg_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.showmsg.init();
+ }
+ if( HPMHooks.count.HP_showmsg_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_showmsg_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_showmsg_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_showmsg_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_showmsg_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.showmsg.final();
+ }
+ if( HPMHooks.count.HP_showmsg_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_showmsg_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_showmsg_clearScreen(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_showmsg_clearScreen_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_showmsg_clearScreen_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.showmsg.clearScreen();
+ }
+ if( HPMHooks.count.HP_showmsg_clearScreen_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_clearScreen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_showmsg_clearScreen_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_showmsg_showMessageV(const char *string, va_list ap) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_showmsg_showMessageV_pre ) {
+ int (*preHookFunc) (const char *string, va_list ap);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_showmsg_showMessageV_pre[hIndex].func;
+ retVal___ = preHookFunc(string, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.showmsg.showMessageV(string, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_showmsg_showMessageV_post ) {
+ int (*postHookFunc) (int retVal___, const char *string, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_showmsg_showMessageV_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_showmsg_showMessageV_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
/* skill */
int HP_skill_init(bool minimal) {
int hIndex = 0;
@@ -65154,6 +68436,1624 @@ void HP_skill_get_requirement_unknown(struct status_change *sc, struct map_sessi
}
return;
}
+/* sockt */
+void HP_sockt_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.init();
+ }
+ if( HPMHooks.count.HP_sockt_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_sockt_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.final();
+ }
+ if( HPMHooks.count.HP_sockt_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+int HP_sockt_perform(int next) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_perform_pre ) {
+ int (*preHookFunc) (int *next);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_perform_pre[hIndex].func;
+ retVal___ = preHookFunc(&next);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.perform(next);
+ }
+ if( HPMHooks.count.HP_sockt_perform_post ) {
+ int (*postHookFunc) (int retVal___, int *next);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_perform_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_perform_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &next);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_datasync(int fd, bool send) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_datasync_pre ) {
+ void (*preHookFunc) (int *fd, bool *send);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_datasync_pre[hIndex].func;
+ preHookFunc(&fd, &send);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.datasync(fd, send);
+ }
+ if( HPMHooks.count.HP_sockt_datasync_post ) {
+ void (*postHookFunc) (int *fd, bool *send);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_datasync_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_datasync_post[hIndex].func;
+ postHookFunc(&fd, &send);
+ }
+ }
+ return;
+}
+int HP_sockt_make_listen_bind(uint32 ip, uint16 port) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_make_listen_bind_pre ) {
+ int (*preHookFunc) (uint32 *ip, uint16 *port);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, &port);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.make_listen_bind(ip, port);
+ }
+ if( HPMHooks.count.HP_sockt_make_listen_bind_post ) {
+ int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_listen_bind_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_make_listen_bind_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, &port);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_make_connection_pre ) {
+ int (*preHookFunc) (uint32 *ip, uint16 *port, struct hSockOpt *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_make_connection_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, &port, opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.make_connection(ip, port, opt);
+ }
+ if( HPMHooks.count.HP_sockt_make_connection_post ) {
+ int (*postHookFunc) (int retVal___, uint32 *ip, uint16 *port, struct hSockOpt *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_make_connection_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_make_connection_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, &port, opt);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_realloc_fifo(int fd, unsigned int rfifo_size, unsigned int wfifo_size) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_realloc_fifo_pre ) {
+ int (*preHookFunc) (int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &rfifo_size, &wfifo_size);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.realloc_fifo(fd, rfifo_size, wfifo_size);
+ }
+ if( HPMHooks.count.HP_sockt_realloc_fifo_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, unsigned int *rfifo_size, unsigned int *wfifo_size);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_fifo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_realloc_fifo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &rfifo_size, &wfifo_size);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_realloc_writefifo(int fd, size_t addition) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_realloc_writefifo_pre ) {
+ int (*preHookFunc) (int *fd, size_t *addition);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &addition);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.realloc_writefifo(fd, addition);
+ }
+ if( HPMHooks.count.HP_sockt_realloc_writefifo_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, size_t *addition);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_realloc_writefifo_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_realloc_writefifo_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &addition);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_wfifoset(int fd, size_t len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_wfifoset_pre ) {
+ int (*preHookFunc) (int *fd, size_t *len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_wfifoset_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.wfifoset(fd, len);
+ }
+ if( HPMHooks.count.HP_sockt_wfifoset_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, size_t *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_wfifoset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_wfifoset_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &len);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_rfifoskip(int fd, size_t len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_rfifoskip_pre ) {
+ int (*preHookFunc) (int *fd, size_t *len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_rfifoskip_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.rfifoskip(fd, len);
+ }
+ if( HPMHooks.count.HP_sockt_rfifoskip_post ) {
+ int (*postHookFunc) (int retVal___, int *fd, size_t *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_rfifoskip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_rfifoskip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd, &len);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_close(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_close_pre ) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_close_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.close(fd);
+ }
+ if( HPMHooks.count.HP_sockt_close_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_close_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_close_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+bool HP_sockt_session_is_valid(int fd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_session_is_valid_pre ) {
+ bool (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_session_is_valid_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.session_is_valid(fd);
+ }
+ if( HPMHooks.count.HP_sockt_session_is_valid_post ) {
+ bool (*postHookFunc) (bool retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_valid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_session_is_valid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+bool HP_sockt_session_is_active(int fd) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_session_is_active_pre ) {
+ bool (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_session_is_active_pre[hIndex].func;
+ retVal___ = preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.session_is_active(fd);
+ }
+ if( HPMHooks.count.HP_sockt_session_is_active_post ) {
+ bool (*postHookFunc) (bool retVal___, int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_session_is_active_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_session_is_active_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &fd);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_flush(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_flush_pre ) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_flush_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.flush(fd);
+ }
+ if( HPMHooks.count.HP_sockt_flush_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_flush_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+void HP_sockt_flush_fifos(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_flush_fifos_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_flush_fifos_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.flush_fifos();
+ }
+ if( HPMHooks.count.HP_sockt_flush_fifos_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_flush_fifos_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_flush_fifos_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_sockt_set_nonblocking(int fd, unsigned long yes) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_set_nonblocking_pre ) {
+ void (*preHookFunc) (int *fd, unsigned long *yes);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_pre[hIndex].func;
+ preHookFunc(&fd, &yes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.set_nonblocking(fd, yes);
+ }
+ if( HPMHooks.count.HP_sockt_set_nonblocking_post ) {
+ void (*postHookFunc) (int *fd, unsigned long *yes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_nonblocking_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_set_nonblocking_post[hIndex].func;
+ postHookFunc(&fd, &yes);
+ }
+ }
+ return;
+}
+void HP_sockt_set_defaultparse(ParseFunc defaultparse) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_set_defaultparse_pre ) {
+ void (*preHookFunc) (ParseFunc *defaultparse);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_pre[hIndex].func;
+ preHookFunc(&defaultparse);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.set_defaultparse(defaultparse);
+ }
+ if( HPMHooks.count.HP_sockt_set_defaultparse_post ) {
+ void (*postHookFunc) (ParseFunc *defaultparse);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_set_defaultparse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_set_defaultparse_post[hIndex].func;
+ postHookFunc(&defaultparse);
+ }
+ }
+ return;
+}
+uint32 HP_sockt_host2ip(const char *hostname) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_host2ip_pre ) {
+ uint32 (*preHookFunc) (const char *hostname);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_host2ip_pre[hIndex].func;
+ retVal___ = preHookFunc(hostname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.host2ip(hostname);
+ }
+ if( HPMHooks.count.HP_sockt_host2ip_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, const char *hostname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_host2ip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_host2ip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, hostname);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sockt_ip2str(uint32 ip, char *ip_str) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sockt_ip2str_pre ) {
+ const char* (*preHookFunc) (uint32 *ip, char *ip_str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_ip2str_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, ip_str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.ip2str(ip, ip_str);
+ }
+ if( HPMHooks.count.HP_sockt_ip2str_post ) {
+ const char* (*postHookFunc) (const char* retVal___, uint32 *ip, char *ip_str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ip2str_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_ip2str_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, ip_str);
+ }
+ }
+ return retVal___;
+}
+uint32 HP_sockt_str2ip(const char *ip_str) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_str2ip_pre ) {
+ uint32 (*preHookFunc) (const char *ip_str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_str2ip_pre[hIndex].func;
+ retVal___ = preHookFunc(ip_str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.str2ip(ip_str);
+ }
+ if( HPMHooks.count.HP_sockt_str2ip_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, const char *ip_str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_str2ip_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_str2ip_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ip_str);
+ }
+ }
+ return retVal___;
+}
+uint16 HP_sockt_ntows(uint16 netshort) {
+ int hIndex = 0;
+ uint16 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_ntows_pre ) {
+ uint16 (*preHookFunc) (uint16 *netshort);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_ntows_pre[hIndex].func;
+ retVal___ = preHookFunc(&netshort);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.ntows(netshort);
+ }
+ if( HPMHooks.count.HP_sockt_ntows_post ) {
+ uint16 (*postHookFunc) (uint16 retVal___, uint16 *netshort);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_ntows_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_ntows_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &netshort);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_getips(uint32 *ips, int max) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_getips_pre ) {
+ int (*preHookFunc) (uint32 *ips, int *max);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_getips_pre[hIndex].func;
+ retVal___ = preHookFunc(ips, &max);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.getips(ips, max);
+ }
+ if( HPMHooks.count.HP_sockt_getips_post ) {
+ int (*postHookFunc) (int retVal___, uint32 *ips, int *max);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_getips_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_getips_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, ips, &max);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_eof(int fd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_eof_pre ) {
+ void (*preHookFunc) (int *fd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_eof_pre[hIndex].func;
+ preHookFunc(&fd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.eof(fd);
+ }
+ if( HPMHooks.count.HP_sockt_eof_post ) {
+ void (*postHookFunc) (int *fd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_eof_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_eof_post[hIndex].func;
+ postHookFunc(&fd);
+ }
+ }
+ return;
+}
+uint32 HP_sockt_lan_subnet_check(uint32 ip, struct s_subnet *info) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_lan_subnet_check_pre ) {
+ uint32 (*preHookFunc) (uint32 *ip, struct s_subnet *info);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip, info);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.lan_subnet_check(ip, info);
+ }
+ if( HPMHooks.count.HP_sockt_lan_subnet_check_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, uint32 *ip, struct s_subnet *info);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_lan_subnet_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_lan_subnet_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip, info);
+ }
+ }
+ return retVal___;
+}
+bool HP_sockt_allowed_ip_check(uint32 ip) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_allowed_ip_check_pre ) {
+ bool (*preHookFunc) (uint32 *ip);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.allowed_ip_check(ip);
+ }
+ if( HPMHooks.count.HP_sockt_allowed_ip_check_post ) {
+ bool (*postHookFunc) (bool retVal___, uint32 *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_allowed_ip_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_allowed_ip_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip);
+ }
+ }
+ return retVal___;
+}
+bool HP_sockt_trusted_ip_check(uint32 ip) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sockt_trusted_ip_check_pre ) {
+ bool (*preHookFunc) (uint32 *ip);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_pre[hIndex].func;
+ retVal___ = preHookFunc(&ip);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.trusted_ip_check(ip);
+ }
+ if( HPMHooks.count.HP_sockt_trusted_ip_check_post ) {
+ bool (*postHookFunc) (bool retVal___, uint32 *ip);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_trusted_ip_check_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_trusted_ip_check_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &ip);
+ }
+ }
+ return retVal___;
+}
+int HP_sockt_net_config_read_sub(config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sockt_net_config_read_sub_pre ) {
+ int (*preHookFunc) (config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(t, list, count, filename, groupname);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sockt.net_config_read_sub(t, list, count, filename, groupname);
+ }
+ if( HPMHooks.count.HP_sockt_net_config_read_sub_post ) {
+ int (*postHookFunc) (int retVal___, config_setting_t *t, struct s_subnet **list, int *count, const char *filename, const char *groupname);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_sub_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_net_config_read_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, t, list, count, filename, groupname);
+ }
+ }
+ return retVal___;
+}
+void HP_sockt_net_config_read(const char *filename) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sockt_net_config_read_pre ) {
+ void (*preHookFunc) (const char *filename);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sockt_net_config_read_pre[hIndex].func;
+ preHookFunc(filename);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sockt.net_config_read(filename);
+ }
+ if( HPMHooks.count.HP_sockt_net_config_read_post ) {
+ void (*postHookFunc) (const char *filename);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sockt_net_config_read_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sockt_net_config_read_post[hIndex].func;
+ postHookFunc(filename);
+ }
+ }
+ return;
+}
+/* SQL */
+int HP_SQL_Connect(Sql *self, const char *user, const char *passwd, const char *host, uint16 port, const char *db) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_Connect_pre ) {
+ int (*preHookFunc) (Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Connect_pre[hIndex].func;
+ retVal___ = preHookFunc(self, user, passwd, host, &port, db);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.Connect(self, user, passwd, host, port, db);
+ }
+ if( HPMHooks.count.HP_SQL_Connect_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *user, const char *passwd, const char *host, uint16 *port, const char *db);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Connect_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Connect_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, user, passwd, host, &port, db);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_GetTimeout(Sql *self, uint32 *out_timeout) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_GetTimeout_pre ) {
+ int (*preHookFunc) (Sql *self, uint32 *out_timeout);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_GetTimeout_pre[hIndex].func;
+ retVal___ = preHookFunc(self, out_timeout);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.GetTimeout(self, out_timeout);
+ }
+ if( HPMHooks.count.HP_SQL_GetTimeout_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, uint32 *out_timeout);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetTimeout_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_GetTimeout_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, out_timeout);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_GetColumnNames(Sql *self, const char *table, char *out_buf, size_t buf_len, char sep) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_GetColumnNames_pre ) {
+ int (*preHookFunc) (Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_pre[hIndex].func;
+ retVal___ = preHookFunc(self, table, out_buf, &buf_len, &sep);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.GetColumnNames(self, table, out_buf, buf_len, sep);
+ }
+ if( HPMHooks.count.HP_SQL_GetColumnNames_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *table, char *out_buf, size_t *buf_len, char *sep);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetColumnNames_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_GetColumnNames_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, table, out_buf, &buf_len, &sep);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_SetEncoding(Sql *self, const char *encoding) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_SetEncoding_pre ) {
+ int (*preHookFunc) (Sql *self, const char *encoding);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_SetEncoding_pre[hIndex].func;
+ retVal___ = preHookFunc(self, encoding);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.SetEncoding(self, encoding);
+ }
+ if( HPMHooks.count.HP_SQL_SetEncoding_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *encoding);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_SetEncoding_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_SetEncoding_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, encoding);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_Ping(Sql *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_Ping_pre ) {
+ int (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Ping_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.Ping(self);
+ }
+ if( HPMHooks.count.HP_SQL_Ping_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Ping_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Ping_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_EscapeString(Sql *self, char *out_to, const char *from) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_EscapeString_pre ) {
+ size_t (*preHookFunc) (Sql *self, char *out_to, const char *from);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_EscapeString_pre[hIndex].func;
+ retVal___ = preHookFunc(self, out_to, from);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.EscapeString(self, out_to, from);
+ }
+ if( HPMHooks.count.HP_SQL_EscapeString_post ) {
+ size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeString_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_EscapeString_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, out_to, from);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_EscapeStringLen(Sql *self, char *out_to, const char *from, size_t from_len) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_EscapeStringLen_pre ) {
+ size_t (*preHookFunc) (Sql *self, char *out_to, const char *from, size_t *from_len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_pre[hIndex].func;
+ retVal___ = preHookFunc(self, out_to, from, &from_len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.EscapeStringLen(self, out_to, from, from_len);
+ }
+ if( HPMHooks.count.HP_SQL_EscapeStringLen_post ) {
+ size_t (*postHookFunc) (size_t retVal___, Sql *self, char *out_to, const char *from, size_t *from_len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_EscapeStringLen_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_EscapeStringLen_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, out_to, from, &from_len);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_QueryV(Sql *self, const char *query, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_QueryV_pre ) {
+ int (*preHookFunc) (Sql *self, const char *query, va_list args);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_SQL_QueryV_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.SQL.QueryV(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_SQL_QueryV_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *query, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryV_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_SQL_QueryV_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_QueryStr(Sql *self, const char *query) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_QueryStr_pre ) {
+ int (*preHookFunc) (Sql *self, const char *query);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_QueryStr_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.QueryStr(self, query);
+ }
+ if( HPMHooks.count.HP_SQL_QueryStr_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, const char *query);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_QueryStr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_QueryStr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_LastInsertId(Sql *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_LastInsertId_pre ) {
+ uint64 (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_LastInsertId_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.LastInsertId(self);
+ }
+ if( HPMHooks.count.HP_SQL_LastInsertId_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_LastInsertId_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_LastInsertId_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+uint32 HP_SQL_NumColumns(Sql *self) {
+ int hIndex = 0;
+ uint32 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_NumColumns_pre ) {
+ uint32 (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_NumColumns_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.NumColumns(self);
+ }
+ if( HPMHooks.count.HP_SQL_NumColumns_post ) {
+ uint32 (*postHookFunc) (uint32 retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumColumns_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_NumColumns_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_NumRows(Sql *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_NumRows_pre ) {
+ uint64 (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_NumRows_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.NumRows(self);
+ }
+ if( HPMHooks.count.HP_SQL_NumRows_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NumRows_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_NumRows_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_NextRow(Sql *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_NextRow_pre ) {
+ int (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_NextRow_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.NextRow(self);
+ }
+ if( HPMHooks.count.HP_SQL_NextRow_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_NextRow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_NextRow_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_GetData(Sql *self, size_t col, char **out_buf, size_t *out_len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_GetData_pre ) {
+ int (*preHookFunc) (Sql *self, size_t *col, char **out_buf, size_t *out_len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_GetData_pre[hIndex].func;
+ retVal___ = preHookFunc(self, &col, out_buf, out_len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.GetData(self, col, out_buf, out_len);
+ }
+ if( HPMHooks.count.HP_SQL_GetData_post ) {
+ int (*postHookFunc) (int retVal___, Sql *self, size_t *col, char **out_buf, size_t *out_len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_GetData_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_GetData_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, &col, out_buf, out_len);
+ }
+ }
+ return retVal___;
+}
+void HP_SQL_FreeResult(Sql *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_FreeResult_pre ) {
+ void (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_FreeResult_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.FreeResult(self);
+ }
+ if( HPMHooks.count.HP_SQL_FreeResult_post ) {
+ void (*postHookFunc) (Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_FreeResult_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_FreeResult_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_SQL_ShowDebug_(Sql *self, const char *debug_file, const unsigned long debug_line) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_ShowDebug__pre ) {
+ void (*preHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_ShowDebug__pre[hIndex].func;
+ preHookFunc(self, debug_file, &debug_line);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.ShowDebug_(self, debug_file, debug_line);
+ }
+ if( HPMHooks.count.HP_SQL_ShowDebug__post ) {
+ void (*postHookFunc) (Sql *self, const char *debug_file, const unsigned long *debug_line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_ShowDebug__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_ShowDebug__post[hIndex].func;
+ postHookFunc(self, debug_file, &debug_line);
+ }
+ }
+ return;
+}
+void HP_SQL_Free(Sql *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_Free_pre ) {
+ void (*preHookFunc) (Sql *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Free_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.Free(self);
+ }
+ if( HPMHooks.count.HP_SQL_Free_post ) {
+ void (*postHookFunc) (Sql *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Free_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+struct Sql* HP_SQL_Malloc(void) {
+ int hIndex = 0;
+ struct Sql* retVal___ = NULL;
+ if( HPMHooks.count.HP_SQL_Malloc_pre ) {
+ struct Sql* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_Malloc_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.Malloc();
+ }
+ if( HPMHooks.count.HP_SQL_Malloc_post ) {
+ struct Sql* (*postHookFunc) (struct Sql* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_Malloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_Malloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+struct SqlStmt* HP_SQL_StmtMalloc(Sql *sql) {
+ int hIndex = 0;
+ struct SqlStmt* retVal___ = NULL;
+ if( HPMHooks.count.HP_SQL_StmtMalloc_pre ) {
+ struct SqlStmt* (*preHookFunc) (Sql *sql);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_pre[hIndex].func;
+ retVal___ = preHookFunc(sql);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtMalloc(sql);
+ }
+ if( HPMHooks.count.HP_SQL_StmtMalloc_post ) {
+ struct SqlStmt* (*postHookFunc) (struct SqlStmt* retVal___, Sql *sql);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtMalloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtMalloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, sql);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtPrepareV(SqlStmt *self, const char *query, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtPrepareV_pre ) {
+ int (*preHookFunc) (SqlStmt *self, const char *query, va_list args);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.SQL.StmtPrepareV(self, query, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_SQL_StmtPrepareV_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareV_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareV_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtPrepareStr(SqlStmt *self, const char *query) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtPrepareStr_pre ) {
+ int (*preHookFunc) (SqlStmt *self, const char *query);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_pre[hIndex].func;
+ retVal___ = preHookFunc(self, query);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtPrepareStr(self, query);
+ }
+ if( HPMHooks.count.HP_SQL_StmtPrepareStr_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, const char *query);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtPrepareStr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtPrepareStr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, query);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_StmtNumParams(SqlStmt *self) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNumParams_pre ) {
+ size_t (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNumParams(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNumParams_post ) {
+ size_t (*postHookFunc) (size_t retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumParams_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNumParams_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtBindParam(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtBindParam_pre ) {
+ int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_pre[hIndex].func;
+ retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtBindParam(self, idx, buffer_type, buffer, buffer_len);
+ }
+ if( HPMHooks.count.HP_SQL_StmtBindParam_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindParam_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtBindParam_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtExecute(SqlStmt *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtExecute_pre ) {
+ int (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtExecute_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtExecute(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtExecute_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtExecute_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtExecute_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_StmtLastInsertId(SqlStmt *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtLastInsertId_pre ) {
+ uint64 (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtLastInsertId(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtLastInsertId_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtLastInsertId_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtLastInsertId_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+size_t HP_SQL_StmtNumColumns(SqlStmt *self) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNumColumns_pre ) {
+ size_t (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNumColumns(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNumColumns_post ) {
+ size_t (*postHookFunc) (size_t retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumColumns_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNumColumns_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtBindColumn(SqlStmt *self, size_t idx, SqlDataType buffer_type, void *buffer, size_t buffer_len, uint32 *out_length, int8 *out_is_null) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtBindColumn_pre ) {
+ int (*preHookFunc) (SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_pre[hIndex].func;
+ retVal___ = preHookFunc(self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtBindColumn(self, idx, buffer_type, buffer, buffer_len, out_length, out_is_null);
+ }
+ if( HPMHooks.count.HP_SQL_StmtBindColumn_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self, size_t *idx, SqlDataType *buffer_type, void *buffer, size_t *buffer_len, uint32 *out_length, int8 *out_is_null);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtBindColumn_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtBindColumn_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, &idx, &buffer_type, buffer, &buffer_len, out_length, out_is_null);
+ }
+ }
+ return retVal___;
+}
+uint64 HP_SQL_StmtNumRows(SqlStmt *self) {
+ int hIndex = 0;
+ uint64 retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNumRows_pre ) {
+ uint64 (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNumRows(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNumRows_post ) {
+ uint64 (*postHookFunc) (uint64 retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNumRows_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNumRows_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+int HP_SQL_StmtNextRow(SqlStmt *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_SQL_StmtNextRow_pre ) {
+ int (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.SQL.StmtNextRow(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtNextRow_post ) {
+ int (*postHookFunc) (int retVal___, SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtNextRow_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtNextRow_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+void HP_SQL_StmtFreeResult(SqlStmt *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_StmtFreeResult_pre ) {
+ void (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.StmtFreeResult(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtFreeResult_post ) {
+ void (*postHookFunc) (SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFreeResult_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtFreeResult_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_SQL_StmtFree(SqlStmt *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_StmtFree_pre ) {
+ void (*preHookFunc) (SqlStmt *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtFree_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.StmtFree(self);
+ }
+ if( HPMHooks.count.HP_SQL_StmtFree_post ) {
+ void (*postHookFunc) (SqlStmt *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtFree_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtFree_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_SQL_StmtShowDebug_(SqlStmt *self, const char *debug_file, const unsigned long debug_line) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_SQL_StmtShowDebug__pre ) {
+ void (*preHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__pre[hIndex].func;
+ preHookFunc(self, debug_file, &debug_line);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.SQL.StmtShowDebug_(self, debug_file, debug_line);
+ }
+ if( HPMHooks.count.HP_SQL_StmtShowDebug__post ) {
+ void (*postHookFunc) (SqlStmt *self, const char *debug_file, const unsigned long *debug_line);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_SQL_StmtShowDebug__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_SQL_StmtShowDebug__post[hIndex].func;
+ postHookFunc(self, debug_file, &debug_line);
+ }
+ }
+ return;
+}
/* status */
int HP_status_init(bool minimal) {
int hIndex = 0;
@@ -66453,6 +71353,32 @@ int HP_status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt opt)
}
return retVal___;
}
+void HP_status_calc_pc_additional(struct map_session_data *sd, enum e_status_calc_opt opt) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_status_calc_pc_additional_pre ) {
+ void (*preHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_status_calc_pc_additional_pre[hIndex].func;
+ preHookFunc(sd, &opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.status.calc_pc_additional(sd, opt);
+ }
+ if( HPMHooks.count.HP_status_calc_pc_additional_post ) {
+ void (*postHookFunc) (struct map_session_data *sd, enum e_status_calc_opt *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_pc_additional_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_status_calc_pc_additional_post[hIndex].func;
+ postHookFunc(sd, &opt);
+ }
+ }
+ return;
+}
int HP_status_calc_homunculus_(struct homun_data *hd, enum e_status_calc_opt opt) {
int hIndex = 0;
int retVal___ = 0;
@@ -68476,6 +73402,1682 @@ int HP_storage_reconnect_sub(DBKey key, DBData *data, va_list ap) {
}
return retVal___;
}
+/* StrBuf */
+StringBuf* HP_StrBuf_Malloc(void) {
+ int hIndex = 0;
+ StringBuf* retVal___ = NULL;
+ if( HPMHooks.count.HP_StrBuf_Malloc_pre ) {
+ StringBuf* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Malloc_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Malloc();
+ }
+ if( HPMHooks.count.HP_StrBuf_Malloc_post ) {
+ StringBuf* (*postHookFunc) (StringBuf* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Malloc_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Malloc_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_StrBuf_Init(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Init_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Init_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Init(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Init_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Init_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+int HP_StrBuf_Vprintf(StringBuf *self, const char *fmt, va_list args) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_Vprintf_pre ) {
+ int (*preHookFunc) (StringBuf *self, const char *fmt, va_list args);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_pre; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ preHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_pre[hIndex].func;
+ retVal___ = preHookFunc(self, fmt, args___copy);
+ va_end(args___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list args___copy; va_copy(args___copy, args);
+ retVal___ = HPMHooks.source.StrBuf.Vprintf(self, fmt, args___copy);
+ va_end(args___copy);
+ }
+ if( HPMHooks.count.HP_StrBuf_Vprintf_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self, const char *fmt, va_list args);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Vprintf_post; hIndex++ ) {
+ va_list args___copy; va_copy(args___copy, args);
+ postHookFunc = HPMHooks.list.HP_StrBuf_Vprintf_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, fmt, args___copy);
+ va_end(args___copy);
+ }
+ }
+ return retVal___;
+}
+int HP_StrBuf_Append(StringBuf *self, const StringBuf *sbuf) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_Append_pre ) {
+ int (*preHookFunc) (StringBuf *self, const StringBuf *sbuf);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Append_pre[hIndex].func;
+ retVal___ = preHookFunc(self, sbuf);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Append(self, sbuf);
+ }
+ if( HPMHooks.count.HP_StrBuf_Append_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self, const StringBuf *sbuf);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Append_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Append_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, sbuf);
+ }
+ }
+ return retVal___;
+}
+int HP_StrBuf_AppendStr(StringBuf *self, const char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_AppendStr_pre ) {
+ int (*preHookFunc) (StringBuf *self, const char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_pre[hIndex].func;
+ retVal___ = preHookFunc(self, str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.AppendStr(self, str);
+ }
+ if( HPMHooks.count.HP_StrBuf_AppendStr_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_AppendStr_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_AppendStr_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self, str);
+ }
+ }
+ return retVal___;
+}
+int HP_StrBuf_Length(StringBuf *self) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_StrBuf_Length_pre ) {
+ int (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Length_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Length(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Length_post ) {
+ int (*postHookFunc) (int retVal___, StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Length_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Length_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+char* HP_StrBuf_Value(StringBuf *self) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_StrBuf_Value_pre ) {
+ char* (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Value_pre[hIndex].func;
+ retVal___ = preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.StrBuf.Value(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Value_post ) {
+ char* (*postHookFunc) (char* retVal___, StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Value_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Value_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, self);
+ }
+ }
+ return retVal___;
+}
+void HP_StrBuf_Clear(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Clear_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Clear_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Clear(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Clear_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Clear_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Clear_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_StrBuf_Destroy(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Destroy_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Destroy_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Destroy(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Destroy_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Destroy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Destroy_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+void HP_StrBuf_Free(StringBuf *self) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_StrBuf_Free_pre ) {
+ void (*preHookFunc) (StringBuf *self);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_StrBuf_Free_pre[hIndex].func;
+ preHookFunc(self);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.StrBuf.Free(self);
+ }
+ if( HPMHooks.count.HP_StrBuf_Free_post ) {
+ void (*postHookFunc) (StringBuf *self);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_StrBuf_Free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_StrBuf_Free_post[hIndex].func;
+ postHookFunc(self);
+ }
+ }
+ return;
+}
+/* strlib */
+char* HP_strlib_jstrescape(char *pt) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_jstrescape_pre ) {
+ char* (*preHookFunc) (char *pt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_jstrescape_pre[hIndex].func;
+ retVal___ = preHookFunc(pt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.jstrescape(pt);
+ }
+ if( HPMHooks.count.HP_strlib_jstrescape_post ) {
+ char* (*postHookFunc) (char* retVal___, char *pt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescape_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_jstrescape_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pt);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_jstrescapecpy(char *pt, const char *spt) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_jstrescapecpy_pre ) {
+ char* (*preHookFunc) (char *pt, const char *spt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_pre[hIndex].func;
+ retVal___ = preHookFunc(pt, spt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.jstrescapecpy(pt, spt);
+ }
+ if( HPMHooks.count.HP_strlib_jstrescapecpy_post ) {
+ char* (*postHookFunc) (char* retVal___, char *pt, const char *spt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jstrescapecpy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_jstrescapecpy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pt, spt);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_jmemescapecpy(char *pt, const char *spt, int size) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_jmemescapecpy_pre ) {
+ int (*preHookFunc) (char *pt, const char *spt, int *size);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_pre[hIndex].func;
+ retVal___ = preHookFunc(pt, spt, &size);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.jmemescapecpy(pt, spt, size);
+ }
+ if( HPMHooks.count.HP_strlib_jmemescapecpy_post ) {
+ int (*postHookFunc) (int retVal___, char *pt, const char *spt, int *size);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_jmemescapecpy_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_jmemescapecpy_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pt, spt, &size);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_remove_control_chars_(char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_remove_control_chars__pre ) {
+ int (*preHookFunc) (char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.remove_control_chars_(str);
+ }
+ if( HPMHooks.count.HP_strlib_remove_control_chars__post ) {
+ int (*postHookFunc) (int retVal___, char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_remove_control_chars__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_remove_control_chars__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_trim_(char *str) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_trim__pre ) {
+ char* (*preHookFunc) (char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_trim__pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.trim_(str);
+ }
+ if( HPMHooks.count.HP_strlib_trim__post ) {
+ char* (*postHookFunc) (char* retVal___, char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_trim__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_trim__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_normalize_name_(char *str, const char *delims) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_normalize_name__pre ) {
+ char* (*preHookFunc) (char *str, const char *delims);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_normalize_name__pre[hIndex].func;
+ retVal___ = preHookFunc(str, delims);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.normalize_name_(str, delims);
+ }
+ if( HPMHooks.count.HP_strlib_normalize_name__post ) {
+ char* (*postHookFunc) (char* retVal___, char *str, const char *delims);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_normalize_name__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_normalize_name__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, delims);
+ }
+ }
+ return retVal___;
+}
+const char* HP_strlib_stristr_(const char *haystack, const char *needle) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_stristr__pre ) {
+ const char* (*preHookFunc) (const char *haystack, const char *needle);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_stristr__pre[hIndex].func;
+ retVal___ = preHookFunc(haystack, needle);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.stristr_(haystack, needle);
+ }
+ if( HPMHooks.count.HP_strlib_stristr__post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *haystack, const char *needle);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_stristr__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_stristr__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, haystack, needle);
+ }
+ }
+ return retVal___;
+}
+size_t HP_strlib_strnlen_(const char *string, size_t maxlen) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_strnlen__pre ) {
+ size_t (*preHookFunc) (const char *string, size_t *maxlen);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_strnlen__pre[hIndex].func;
+ retVal___ = preHookFunc(string, &maxlen);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.strnlen_(string, maxlen);
+ }
+ if( HPMHooks.count.HP_strlib_strnlen__post ) {
+ size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strnlen__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_strnlen__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, &maxlen);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_strtok_r_(char *s1, const char *s2, char **lasts) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_strtok_r__pre ) {
+ char* (*preHookFunc) (char *s1, const char *s2, char **lasts);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_strtok_r__pre[hIndex].func;
+ retVal___ = preHookFunc(s1, s2, lasts);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.strtok_r_(s1, s2, lasts);
+ }
+ if( HPMHooks.count.HP_strlib_strtok_r__post ) {
+ char* (*postHookFunc) (char* retVal___, char *s1, const char *s2, char **lasts);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strtok_r__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_strtok_r__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, s1, s2, lasts);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_e_mail_check_(char *email) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_e_mail_check__pre ) {
+ int (*preHookFunc) (char *email);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_e_mail_check__pre[hIndex].func;
+ retVal___ = preHookFunc(email);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.e_mail_check_(email);
+ }
+ if( HPMHooks.count.HP_strlib_e_mail_check__post ) {
+ int (*postHookFunc) (int retVal___, char *email);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_e_mail_check__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_e_mail_check__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, email);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_config_switch_(const char *str) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_config_switch__pre ) {
+ int (*preHookFunc) (const char *str);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_config_switch__pre[hIndex].func;
+ retVal___ = preHookFunc(str);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.config_switch_(str);
+ }
+ if( HPMHooks.count.HP_strlib_config_switch__post ) {
+ int (*postHookFunc) (int retVal___, const char *str);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_config_switch__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_config_switch__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str);
+ }
+ }
+ return retVal___;
+}
+char* HP_strlib_safestrncpy_(char *dst, const char *src, size_t n) {
+ int hIndex = 0;
+ char* retVal___ = NULL;
+ if( HPMHooks.count.HP_strlib_safestrncpy__pre ) {
+ char* (*preHookFunc) (char *dst, const char *src, size_t *n);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_safestrncpy__pre[hIndex].func;
+ retVal___ = preHookFunc(dst, src, &n);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.safestrncpy_(dst, src, n);
+ }
+ if( HPMHooks.count.HP_strlib_safestrncpy__post ) {
+ char* (*postHookFunc) (char* retVal___, char *dst, const char *src, size_t *n);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrncpy__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_safestrncpy__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, dst, src, &n);
+ }
+ }
+ return retVal___;
+}
+size_t HP_strlib_safestrnlen_(const char *string, size_t maxlen) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_safestrnlen__pre ) {
+ size_t (*preHookFunc) (const char *string, size_t *maxlen);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_safestrnlen__pre[hIndex].func;
+ retVal___ = preHookFunc(string, &maxlen);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.safestrnlen_(string, maxlen);
+ }
+ if( HPMHooks.count.HP_strlib_safestrnlen__post ) {
+ size_t (*postHookFunc) (size_t retVal___, const char *string, size_t *maxlen);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_safestrnlen__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_safestrnlen__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, string, &maxlen);
+ }
+ }
+ return retVal___;
+}
+int HP_strlib_strline_(const char *str, size_t pos) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_strlib_strline__pre ) {
+ int (*preHookFunc) (const char *str, size_t *pos);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_strline__pre[hIndex].func;
+ retVal___ = preHookFunc(str, &pos);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.strline_(str, pos);
+ }
+ if( HPMHooks.count.HP_strlib_strline__post ) {
+ int (*postHookFunc) (int retVal___, const char *str, size_t *pos);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_strline__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_strline__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &pos);
+ }
+ }
+ return retVal___;
+}
+bool HP_strlib_bin2hex_(char *output, unsigned char *input, size_t count) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_strlib_bin2hex__pre ) {
+ bool (*preHookFunc) (char *output, unsigned char *input, size_t *count);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_strlib_bin2hex__pre[hIndex].func;
+ retVal___ = preHookFunc(output, input, &count);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.strlib.bin2hex_(output, input, count);
+ }
+ if( HPMHooks.count.HP_strlib_bin2hex__post ) {
+ bool (*postHookFunc) (bool retVal___, char *output, unsigned char *input, size_t *count);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_strlib_bin2hex__post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_strlib_bin2hex__post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, output, input, &count);
+ }
+ }
+ return retVal___;
+}
+/* sv */
+int HP_sv_parse_next(struct s_svstate *svstate) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sv_parse_next_pre ) {
+ int (*preHookFunc) (struct s_svstate *svstate);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_parse_next_pre[hIndex].func;
+ retVal___ = preHookFunc(svstate);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.parse_next(svstate);
+ }
+ if( HPMHooks.count.HP_sv_parse_next_post ) {
+ int (*postHookFunc) (int retVal___, struct s_svstate *svstate);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_next_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_parse_next_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, svstate);
+ }
+ }
+ return retVal___;
+}
+int HP_sv_parse(const char *str, int len, int startoff, char delim, int *out_pos, int npos, enum e_svopt opt) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sv_parse_pre ) {
+ int (*preHookFunc) (const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_parse_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &len, &startoff, &delim, out_pos, &npos, &opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.parse(str, len, startoff, delim, out_pos, npos, opt);
+ }
+ if( HPMHooks.count.HP_sv_parse_post ) {
+ int (*postHookFunc) (int retVal___, const char *str, int *len, int *startoff, char *delim, int *out_pos, int *npos, enum e_svopt *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_parse_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_parse_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_pos, &npos, &opt);
+ }
+ }
+ return retVal___;
+}
+int HP_sv_split(char *str, int len, int startoff, char delim, char **out_fields, int nfields, enum e_svopt opt) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sv_split_pre ) {
+ int (*preHookFunc) (char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_split_pre[hIndex].func;
+ retVal___ = preHookFunc(str, &len, &startoff, &delim, out_fields, &nfields, &opt);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.split(str, len, startoff, delim, out_fields, nfields, opt);
+ }
+ if( HPMHooks.count.HP_sv_split_post ) {
+ int (*postHookFunc) (int retVal___, char *str, int *len, int *startoff, char *delim, char **out_fields, int *nfields, enum e_svopt *opt);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_split_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_split_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, str, &len, &startoff, &delim, out_fields, &nfields, &opt);
+ }
+ }
+ return retVal___;
+}
+size_t HP_sv_escape_c(char *out_dest, const char *src, size_t len, const char *escapes) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_sv_escape_c_pre ) {
+ size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len, const char *escapes);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_escape_c_pre[hIndex].func;
+ retVal___ = preHookFunc(out_dest, src, &len, escapes);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.escape_c(out_dest, src, len, escapes);
+ }
+ if( HPMHooks.count.HP_sv_escape_c_post ) {
+ size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len, const char *escapes);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_escape_c_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_escape_c_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, out_dest, src, &len, escapes);
+ }
+ }
+ return retVal___;
+}
+size_t HP_sv_unescape_c(char *out_dest, const char *src, size_t len) {
+ int hIndex = 0;
+ size_t retVal___ = 0;
+ if( HPMHooks.count.HP_sv_unescape_c_pre ) {
+ size_t (*preHookFunc) (char *out_dest, const char *src, size_t *len);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_unescape_c_pre[hIndex].func;
+ retVal___ = preHookFunc(out_dest, src, &len);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.unescape_c(out_dest, src, len);
+ }
+ if( HPMHooks.count.HP_sv_unescape_c_post ) {
+ size_t (*postHookFunc) (size_t retVal___, char *out_dest, const char *src, size_t *len);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_unescape_c_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_unescape_c_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, out_dest, src, &len);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sv_skip_escaped_c(const char *p) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sv_skip_escaped_c_pre ) {
+ const char* (*preHookFunc) (const char *p);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_pre[hIndex].func;
+ retVal___ = preHookFunc(p);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.skip_escaped_c(p);
+ }
+ if( HPMHooks.count.HP_sv_skip_escaped_c_post ) {
+ const char* (*postHookFunc) (const char* retVal___, const char *p);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_skip_escaped_c_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_skip_escaped_c_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, p);
+ }
+ }
+ return retVal___;
+}
+bool HP_sv_readdb(const char *directory, const char *filename, char delim, int mincols, int maxcols, int maxrows, bool ( *parseproc ) (char *fields[], int columns, int current)) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sv_readdb_pre ) {
+ bool (*preHookFunc) (const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current));
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sv_readdb_pre[hIndex].func;
+ retVal___ = preHookFunc(directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sv.readdb(directory, filename, delim, mincols, maxcols, maxrows, parseproc);
+ }
+ if( HPMHooks.count.HP_sv_readdb_post ) {
+ bool (*postHookFunc) (bool retVal___, const char *directory, const char *filename, char *delim, int *mincols, int *maxcols, int *maxrows, bool ( *parseproc ) (char *fields[], int columns, int current));
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sv_readdb_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sv_readdb_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, directory, filename, &delim, &mincols, &maxcols, &maxrows, parseproc);
+ }
+ }
+ return retVal___;
+}
+/* sysinfo */
+int HP_sysinfo_getpagesize(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sysinfo_getpagesize_pre ) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.getpagesize();
+ }
+ if( HPMHooks.count.HP_sysinfo_getpagesize_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_getpagesize_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_getpagesize_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_platform(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_platform_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_platform_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.platform();
+ }
+ if( HPMHooks.count.HP_sysinfo_platform_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_platform_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_platform_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_osversion(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_osversion_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_osversion_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.osversion();
+ }
+ if( HPMHooks.count.HP_sysinfo_osversion_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_osversion_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_osversion_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_cpu(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_cpu_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_cpu_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.cpu();
+ }
+ if( HPMHooks.count.HP_sysinfo_cpu_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpu_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_cpu_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_sysinfo_cpucores(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sysinfo_cpucores_pre ) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_cpucores_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.cpucores();
+ }
+ if( HPMHooks.count.HP_sysinfo_cpucores_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cpucores_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_cpucores_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_arch(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_arch_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_arch_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.arch();
+ }
+ if( HPMHooks.count.HP_sysinfo_arch_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_arch_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_arch_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+bool HP_sysinfo_is64bit(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sysinfo_is64bit_pre ) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_is64bit_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.is64bit();
+ }
+ if( HPMHooks.count.HP_sysinfo_is64bit_post ) {
+ bool (*postHookFunc) (bool retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is64bit_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_is64bit_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_compiler(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_compiler_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_compiler_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.compiler();
+ }
+ if( HPMHooks.count.HP_sysinfo_compiler_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_compiler_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_compiler_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_cflags(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_cflags_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_cflags_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.cflags();
+ }
+ if( HPMHooks.count.HP_sysinfo_cflags_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_cflags_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_cflags_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_vcstype(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_vcstype_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcstype_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcstype();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcstype_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstype_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcstype_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_sysinfo_vcstypeid(void) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_sysinfo_vcstypeid_pre ) {
+ int (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcstypeid();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcstypeid_post ) {
+ int (*postHookFunc) (int retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcstypeid_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcstypeid_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_vcsrevision_src(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_src_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcsrevision_src();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_src_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_src_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_src_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+const char* HP_sysinfo_vcsrevision_scripts(void) {
+ int hIndex = 0;
+ const char* retVal___ = NULL;
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre ) {
+ const char* (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.vcsrevision_scripts();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post ) {
+ const char* (*postHookFunc) (const char* retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_scripts_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_scripts_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_sysinfo_vcsrevision_reload(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sysinfo.vcsrevision_reload();
+ }
+ if( HPMHooks.count.HP_sysinfo_vcsrevision_reload_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_vcsrevision_reload_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_vcsrevision_reload_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+bool HP_sysinfo_is_superuser(void) {
+ int hIndex = 0;
+ bool retVal___ = false;
+ if( HPMHooks.count.HP_sysinfo_is_superuser_pre ) {
+ bool (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.sysinfo.is_superuser();
+ }
+ if( HPMHooks.count.HP_sysinfo_is_superuser_post ) {
+ bool (*postHookFunc) (bool retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_is_superuser_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_is_superuser_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+void HP_sysinfo_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sysinfo_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sysinfo.init();
+ }
+ if( HPMHooks.count.HP_sysinfo_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_sysinfo_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_sysinfo_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_sysinfo_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.sysinfo.final();
+ }
+ if( HPMHooks.count.HP_sysinfo_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_sysinfo_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_sysinfo_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+/* timer */
+int64 HP_timer_gettick(void) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_gettick_pre ) {
+ int64 (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_gettick_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.gettick();
+ }
+ if( HPMHooks.count.HP_timer_gettick_post ) {
+ int64 (*postHookFunc) (int64 retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_gettick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int64 HP_timer_gettick_nocache(void) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_gettick_nocache_pre ) {
+ int64 (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_gettick_nocache_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.gettick_nocache();
+ }
+ if( HPMHooks.count.HP_timer_gettick_nocache_post ) {
+ int64 (*postHookFunc) (int64 retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_gettick_nocache_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_gettick_nocache_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_add(int64 tick, TimerFunc func, int id, intptr_t data) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_add_pre ) {
+ int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_add_pre[hIndex].func;
+ retVal___ = preHookFunc(&tick, &func, &id, &data);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.add(tick, func, id, data);
+ }
+ if( HPMHooks.count.HP_timer_add_post ) {
+ int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_add_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_add_interval(int64 tick, TimerFunc func, int id, intptr_t data, int interval) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_add_interval_pre ) {
+ int (*preHookFunc) (int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_add_interval_pre[hIndex].func;
+ retVal___ = preHookFunc(&tick, &func, &id, &data, &interval);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.add_interval(tick, func, id, data, interval);
+ }
+ if( HPMHooks.count.HP_timer_add_interval_post ) {
+ int (*postHookFunc) (int retVal___, int64 *tick, TimerFunc *func, int *id, intptr_t *data, int *interval);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_interval_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_add_interval_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tick, &func, &id, &data, &interval);
+ }
+ }
+ return retVal___;
+}
+const struct TimerData* HP_timer_get(int tid) {
+ int hIndex = 0;
+ const struct TimerData* retVal___ = NULL;
+ if( HPMHooks.count.HP_timer_get_pre ) {
+ const struct TimerData* (*preHookFunc) (int *tid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_get_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.get(tid);
+ }
+ if( HPMHooks.count.HP_timer_get_post ) {
+ const struct TimerData* (*postHookFunc) (const struct TimerData* retVal___, int *tid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_get_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_delete(int tid, TimerFunc func) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_delete_pre ) {
+ int (*preHookFunc) (int *tid, TimerFunc *func);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_delete_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &func);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.delete(tid, func);
+ }
+ if( HPMHooks.count.HP_timer_delete_post ) {
+ int (*postHookFunc) (int retVal___, int *tid, TimerFunc *func);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_delete_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_delete_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &func);
+ }
+ }
+ return retVal___;
+}
+int64 HP_timer_addtick(int tid, int64 tick) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_addtick_pre ) {
+ int64 (*preHookFunc) (int *tid, int64 *tick);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_addtick_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.addtick(tid, tick);
+ }
+ if( HPMHooks.count.HP_timer_addtick_post ) {
+ int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_addtick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_addtick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick);
+ }
+ }
+ return retVal___;
+}
+int64 HP_timer_settick(int tid, int64 tick) {
+ int hIndex = 0;
+ int64 retVal___ = 0;
+ if( HPMHooks.count.HP_timer_settick_pre ) {
+ int64 (*preHookFunc) (int *tid, int64 *tick);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_settick_pre[hIndex].func;
+ retVal___ = preHookFunc(&tid, &tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.settick(tid, tick);
+ }
+ if( HPMHooks.count.HP_timer_settick_post ) {
+ int64 (*postHookFunc) (int64 retVal___, int *tid, int64 *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_settick_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_settick_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tid, &tick);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_add_func_list(TimerFunc func, char *name) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_add_func_list_pre ) {
+ int (*preHookFunc) (TimerFunc *func, char *name);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_add_func_list_pre[hIndex].func;
+ retVal___ = preHookFunc(&func, name);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.add_func_list(func, name);
+ }
+ if( HPMHooks.count.HP_timer_add_func_list_post ) {
+ int (*postHookFunc) (int retVal___, TimerFunc *func, char *name);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_add_func_list_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_add_func_list_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &func, name);
+ }
+ }
+ return retVal___;
+}
+unsigned long HP_timer_get_uptime(void) {
+ int hIndex = 0;
+ unsigned long retVal___ = 0;
+ if( HPMHooks.count.HP_timer_get_uptime_pre ) {
+ unsigned long (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_get_uptime_pre[hIndex].func;
+ retVal___ = preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.get_uptime();
+ }
+ if( HPMHooks.count.HP_timer_get_uptime_post ) {
+ unsigned long (*postHookFunc) (unsigned long retVal___);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_get_uptime_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_get_uptime_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___);
+ }
+ }
+ return retVal___;
+}
+int HP_timer_perform(int64 tick) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_timer_perform_pre ) {
+ int (*preHookFunc) (int64 *tick);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_perform_pre[hIndex].func;
+ retVal___ = preHookFunc(&tick);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.timer.perform(tick);
+ }
+ if( HPMHooks.count.HP_timer_perform_post ) {
+ int (*postHookFunc) (int retVal___, int64 *tick);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_perform_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_perform_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, &tick);
+ }
+ }
+ return retVal___;
+}
+void HP_timer_init(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_timer_init_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_init_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.timer.init();
+ }
+ if( HPMHooks.count.HP_timer_init_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_init_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_init_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
+void HP_timer_final(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_timer_final_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_timer_final_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.timer.final();
+ }
+ if( HPMHooks.count.HP_timer_final_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_timer_final_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_timer_final_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* trade */
void HP_trade_request(struct map_session_data *sd, struct map_session_data *target_sd) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
index d7d7ac1ac..024febdf8 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
@@ -4,6 +4,7 @@
// NOTE: This file was auto-generated and should never be manually edited,
// as it will get overwritten.
+memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface));
memcpy(&HPMHooks.source.atcommand, atcommand, sizeof(struct atcommand_interface));
memcpy(&HPMHooks.source.battle, battle, sizeof(struct battle_interface));
memcpy(&HPMHooks.source.bg, bg, sizeof(struct battleground_interface));
@@ -12,6 +13,10 @@ memcpy(&HPMHooks.source.channel, channel, sizeof(struct channel_interface));
memcpy(&HPMHooks.source.chat, chat, sizeof(struct chat_interface));
memcpy(&HPMHooks.source.chrif, chrif, sizeof(struct chrif_interface));
memcpy(&HPMHooks.source.clif, clif, sizeof(struct clif_interface));
+memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface));
+memcpy(&HPMHooks.source.console, console, sizeof(struct console_interface));
+memcpy(&HPMHooks.source.core, core, sizeof(struct core_interface));
+memcpy(&HPMHooks.source.DB, DB, sizeof(struct db_interface));
memcpy(&HPMHooks.source.duel, duel, sizeof(struct duel_interface));
memcpy(&HPMHooks.source.elemental, elemental, sizeof(struct elemental_interface));
memcpy(&HPMHooks.source.guild, guild, sizeof(struct guild_interface));
@@ -21,14 +26,18 @@ memcpy(&HPMHooks.source.instance, instance, sizeof(struct instance_interface));
memcpy(&HPMHooks.source.intif, intif, sizeof(struct intif_interface));
memcpy(&HPMHooks.source.ircbot, ircbot, sizeof(struct irc_bot_interface));
memcpy(&HPMHooks.source.itemdb, itemdb, sizeof(struct itemdb_interface));
+memcpy(&HPMHooks.source.libconfig, libconfig, sizeof(struct libconfig_interface));
memcpy(&HPMHooks.source.logs, logs, sizeof(struct log_interface));
memcpy(&HPMHooks.source.mail, mail, sizeof(struct mail_interface));
+memcpy(&HPMHooks.source.iMalloc, iMalloc, sizeof(struct malloc_interface));
memcpy(&HPMHooks.source.map, map, sizeof(struct map_interface));
+memcpy(&HPMHooks.source.mapindex, mapindex, sizeof(struct mapindex_interface));
memcpy(&HPMHooks.source.mapit, mapit, sizeof(struct mapit_interface));
memcpy(&HPMHooks.source.mapreg, mapreg, sizeof(struct mapreg_interface));
memcpy(&HPMHooks.source.mercenary, mercenary, sizeof(struct mercenary_interface));
memcpy(&HPMHooks.source.mob, mob, sizeof(struct mob_interface));
memcpy(&HPMHooks.source.npc, npc, sizeof(struct npc_interface));
+memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface));
memcpy(&HPMHooks.source.party, party, sizeof(struct party_interface));
memcpy(&HPMHooks.source.path, path, sizeof(struct path_interface));
memcpy(&HPMHooks.source.pcg, pcg, sizeof(struct pc_groups_interface));
@@ -37,9 +46,17 @@ memcpy(&HPMHooks.source.pet, pet, sizeof(struct pet_interface));
memcpy(&HPMHooks.source.quest, quest, sizeof(struct quest_interface));
memcpy(&HPMHooks.source.script, script, sizeof(struct script_interface));
memcpy(&HPMHooks.source.searchstore, searchstore, sizeof(struct searchstore_interface));
+memcpy(&HPMHooks.source.showmsg, showmsg, sizeof(struct showmsg_interface));
memcpy(&HPMHooks.source.skill, skill, sizeof(struct skill_interface));
+memcpy(&HPMHooks.source.sockt, sockt, sizeof(struct socket_interface));
+memcpy(&HPMHooks.source.SQL, SQL, sizeof(struct sql_interface));
memcpy(&HPMHooks.source.status, status, sizeof(struct status_interface));
memcpy(&HPMHooks.source.storage, storage, sizeof(struct storage_interface));
+memcpy(&HPMHooks.source.StrBuf, StrBuf, sizeof(struct stringbuf_interface));
+memcpy(&HPMHooks.source.strlib, strlib, sizeof(struct strlib_interface));
+memcpy(&HPMHooks.source.sv, sv, sizeof(struct sv_interface));
+memcpy(&HPMHooks.source.sysinfo, sysinfo, sizeof(struct sysinfo_interface));
+memcpy(&HPMHooks.source.timer, timer, sizeof(struct timer_interface));
memcpy(&HPMHooks.source.trade, trade, sizeof(struct trade_interface));
memcpy(&HPMHooks.source.unit, unit, sizeof(struct unit_interface));
memcpy(&HPMHooks.source.vending, vending, sizeof(struct vending_interface));
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index 2741ce468..ff2feefa0 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -3,7 +3,7 @@
#include "config/core.h"
-#include "common/HPMi.h"
+#include "common/hercules.h"
#include "common/cbasetypes.h"
#include "common/conf.h"
#include "common/malloc.h"
@@ -141,7 +141,7 @@ int db2sql(config_setting_t *entry, int n, const char *source) {
StrBuf->Printf(&buf, "'%u',", it->flag.bindonequip?1:0);
// forceserial
- StrBuf->Printf(&buf, "'%u',", it->flag.force_serial?1:0);
+ StrBuf->Printf(&buf, "'%u',", it->flag.force_serial?1:0);
// buyingstore
StrBuf->Printf(&buf, "'%u',", it->flag.buyingstore?1:0);
@@ -357,21 +357,14 @@ CMDLINEARG(db2sql)
map->minimal = torun = true;
return true;
}
-HPExport void server_preinit (void) {
- SQL = GET_SYMBOL("SQL");
- itemdb = GET_SYMBOL("itemdb");
- map = GET_SYMBOL("map");
- strlib = GET_SYMBOL("strlib");
- iMalloc = GET_SYMBOL("iMalloc");
- libconfig = GET_SYMBOL("libconfig");
- StrBuf = GET_SYMBOL("StrBuf");
+HPExport void server_preinit(void) {
addArg("--db2sql",false,db2sql,NULL);
}
-HPExport void plugin_init (void) {
+HPExport void plugin_init(void) {
addCPCommand("server:tools:db2sql",db2sql);
}
-HPExport void server_online (void) {
+HPExport void server_online(void) {
if( torun )
do_db2sql();
}
diff --git a/src/plugins/dbghelpplug.c b/src/plugins/dbghelpplug.c
index 6ed16d7a6..b5f1fe485 100644
--- a/src/plugins/dbghelpplug.c
+++ b/src/plugins/dbghelpplug.c
@@ -5,8 +5,9 @@
// Ported from eAthena Dev Team's version @ http://eathena-project.googlecode.com/svn/trunk/src/plugins/dbghelpplug.c
// Currently supported dbghelp 5.1
+#include "common/hercules.h"
+
#include "common/sysinfo.h"
-#include "common/HPMi.h"
#include "common/HPMDataCheck.h"
@@ -108,8 +109,6 @@ typedef enum _SymTag {
*/
#endif /* _NO_CVCONST_H */
-struct sysinfo_interface *sysinfo;
-
/////////////////////////////////////////////////////////////////////
// dbghelp function prototypes
//
@@ -1800,7 +1799,6 @@ static LPTOP_LEVEL_EXCEPTION_FILTER previousFilter;
**/
HPExport void plugin_init (void) {
previousFilter = SetUnhandledExceptionFilter(Dhp__UnhandledExceptionFilter);
- sysinfo = GET_SYMBOL("sysinfo");
}
/**
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index b034775b0..275edb129 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -2,7 +2,7 @@
// See the LICENSE file
// Sample Hercules Plugin
-#include "common/HPMi.h"
+#include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */
#include "common/malloc.h"
#include "common/mmo.h"
#include "common/socket.h"
@@ -11,7 +11,7 @@
#include "map/pc.h"
#include "map/script.h"
-#include "common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
+#include "common/HPMDataCheck.h" /* should always be the last Hercules file included! (if you don't make it last, it'll intentionally break compile time) */
#include <stdio.h>
#include <stdlib.h>
@@ -44,15 +44,15 @@ struct sample_data_struct {
/* cmd 0xf3 - it is a client-server existent id, for clif_parse_GlobalMessage */
/* in this sample we do nothing and simply redirect */
void sample_packet0f3(int fd) {
- struct map_session_data *sd = session[fd]->session_data;
+ struct map_session_data *sd = sockt->session[fd]->session_data;
struct sample_data_struct *data;
if( !sd ) return;/* socket didn't fully log-in? this packet shouldn't do anything then! */
ShowInfo("sample_packet0f3: Hello World! received 0xf3 for '%s', redirecting!\n",sd->status.name);
- /* sample usage of appending data to a socket_data (session[]) entry */
- if( !(data = getFromSession(session[fd],0)) ) {
+ /* sample usage of appending data to a socket_data (sockt->session[]) entry */
+ if( !(data = getFromSession(sockt->session[fd],0)) ) {
CREATE(data,struct sample_data_struct,1);
data->lastMSGPosition.map = sd->status.last_point.map;
@@ -60,13 +60,13 @@ void sample_packet0f3(int fd) {
data->lastMSGPosition.y = sd->status.last_point.y;
data->someNumber = rand()%777;
- ShowInfo("Created Appended session[] data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
- addToSession(session[fd],data,0,true);
+ ShowInfo("Created Appended sockt->session[] data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
+ addToSession(sockt->session[fd],data,0,true);
} else {
- ShowInfo("Existent Appended session[] data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
+ ShowInfo("Existent Appended sockt->session[] data, %d %d %d %d\n",data->lastMSGPosition.map,data->lastMSGPosition.x,data->lastMSGPosition.y,data->someNumber);
if( rand()%4 == 2 ) {
- ShowInfo("Removing Appended session[] data\n");
- removeFromSession(session[fd],0);
+ ShowInfo("Removing Appended sockt->session[] data\n");
+ removeFromSession(sockt->session[fd],0);
}
}
@@ -117,34 +117,15 @@ void parse_my_setting(const char *val) {
}
/* run when server starts */
HPExport void plugin_init (void) {
- char *server_type;
- char *server_name;
+ ShowInfo("Server type is ");
- /* core vars */
- server_type = GET_SYMBOL("SERVER_TYPE");
- server_name = GET_SYMBOL("SERVER_NAME");
-
- /* core interfaces */
- iMalloc = GET_SYMBOL("iMalloc");
-
- /* map-server interfaces */
- script = GET_SYMBOL("script");
- clif = GET_SYMBOL("clif");
- pc = GET_SYMBOL("pc");
- strlib = GET_SYMBOL("strlib");
-
- /* session[] */
- session = GET_SYMBOL("session");
-
- ShowInfo ("Server type is ");
-
- switch (*server_type) {
- case SERVER_TYPE_LOGIN: printf ("Login Server\n"); break;
- case SERVER_TYPE_CHAR: printf ("Char Server\n"); break;
+ switch (SERVER_TYPE) {
+ case SERVER_TYPE_LOGIN: printf("Login Server\n"); break;
+ case SERVER_TYPE_CHAR: printf("Char Server\n"); break;
case SERVER_TYPE_MAP: printf ("Map Server\n"); break;
}
- ShowInfo ("I'm being run from the '%s' filename\n", server_name);
+ ShowInfo("I'm being run from the '%s' filename\n", SERVER_NAME);
/* addAtcommand("command-key",command-function) tells map server to call ACMD(sample) when "sample" command is used */
/* - it will print a warning when used on a non-map-server plugin */
diff --git a/src/plugins/script_mapquit.c b/src/plugins/script_mapquit.c
new file mode 100644
index 000000000..8ed108f82
--- /dev/null
+++ b/src/plugins/script_mapquit.c
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2014 Hercules Dev Team
+ * Base author: Haru <haru@dotalux.com>
+ *
+ * This plugin is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This plugin is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this plugin. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/// mapquit() script command
+
+#include "common/hercules.h"
+#include "map/map.h"
+#include "map/script.h"
+
+#include "common/HPMDataCheck.h"
+
+HPExport struct hplugin_info pinfo = {
+ "script_mapquit", // Plugin name
+ SERVER_TYPE_MAP, // Which server types this plugin works with?
+ "0.1", // Plugin version
+ HPM_VERSION, // HPM Version (don't change, macro is automatically updated)
+};
+
+BUILDIN(mapquit) {
+ if (script_hasdata(st, 2)) {
+ map->retval = script_getnum(st, 2);
+ }
+ map->do_shutdown();
+ return true;
+}
+HPExport void server_preinit(void) {
+}
+HPExport void plugin_init(void) {
+ addScriptCommand("mapquit", "?", mapquit);
+}
diff --git a/tools/HPMHookGen/HPMDataCheckGen.pl b/tools/HPMHookGen/HPMDataCheckGen.pl
index 0e5f628cd..e658f8be8 100644
--- a/tools/HPMHookGen/HPMDataCheckGen.pl
+++ b/tools/HPMHookGen/HPMDataCheckGen.pl
@@ -29,8 +29,15 @@ foreach my $file (@files) {
next if $filepath[-1] eq "HPM.h"; # Skip the HPM core, plugins don't need it
my $filename = uc($filepath[-1]); $filename =~ s/-/_/g; $filename =~ s/\.[^.]*$//;
my $plugintypes = 'SERVER_TYPE_UNKNOWN';
- $plugintypes = 'SERVER_TYPE_ALL' if $foldername eq 'COMMON';
- $plugintypes = "SERVER_TYPE_${foldername}" if $foldername =~ /^(LOGIN|CHAR|MAP)/;
+ if ($foldername eq 'COMMON') {
+ if ($filename eq 'MAPINDEX') {
+ $plugintypes = 'SERVER_TYPE_CHAR|SERVER_TYPE_MAP';
+ } else {
+ $plugintypes = 'SERVER_TYPE_ALL';
+ }
+ } elsif ($foldername =~ /^(LOGIN|CHAR|MAP)/) {
+ $plugintypes = "SERVER_TYPE_${foldername}";
+ }
my $symboldata = {
name => $data->{compounddef}->{$filekey}->{compoundname}->[0],
type => $plugintypes,
@@ -51,6 +58,12 @@ print FH <<"EOF";
#ifndef HPM_DATA_CHECK_H
#define HPM_DATA_CHECK_H
+#if !defined(HPMHOOKGEN)
+#include "common/HPMSymbols.inc.h"
+#endif // ! HPMHOOKGEN
+#ifdef HPM_SYMBOL
+#undef HPM_SYMBOL
+#endif // HPM_SYMBOL
HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
EOF
diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl
index a77b50a3b..d1b96efb3 100755
--- a/tools/HPMHookGen/HPMHookGen.pl
+++ b/tools/HPMHookGen/HPMHookGen.pl
@@ -222,13 +222,20 @@ sub parse($$) {
$rtinit = ' = HCS_STATUS_FAIL';
} elsif ($x =~ /^enum\s+bg_queue_types$/) { # Known enum bg_queue_types
$rtinit = ' = BGQT_INVALID';
- } elsif ($x =~ /^struct\s+.*$/ or $x eq 'DBData') { # Structs
+ } elsif ($x =~ /^(?:enum\s+)?DBOptions$/) { # Known enum DBOptions
+ $rtinit = ' = DB_OPT_BASE';
+ } elsif ($x eq 'DBComparator' or $x eq 'DBHasher' or $x eq 'DBReleaser') { # DB function pointers
+ $rtinit = ' = NULL';
+ } elsif ($x =~ /^struct\s+.*$/ or $x eq 'DBData' or $x eq 'DBKey') { # Structs and unions
$rtinit = '';
$rtmemset = 1;
+ } elsif ($x =~ /^float|double$/) { # Floating point variables
+ $rtinit = ' = 0.';
} elsif ($x =~ /^(?:(?:un)?signed\s+)?(?:char|int|long|short)$/
or $x =~ /^(?:long|short)\s+(?:int|long)$/
or $x =~ /^u?int(?:8|16|32|64)$/
or $x eq 'defType'
+ or $x eq 'size_t'
) { # Numeric variables
$rtinit = ' = 0';
} else { # Anything else
@@ -257,7 +264,9 @@ my %keys = (
login => [ ],
char => [ ],
map => [ ],
+ all => [ ],
);
+my %fileguards = ( );
foreach my $file (@files) { # Loop through the xml files
my $xml = new XML::Simple;
@@ -265,20 +274,34 @@ foreach my $file (@files) { # Loop through the xml files
my $filekey = (keys %{ $data->{compounddef} })[0];
my $loc = $data->{compounddef}->{$filekey}->{location}->[0];
- next unless $loc->{file} =~ /src\/(map|char|login)\//;
+ next unless $loc->{file} =~ /src\/(map|char|login|common)\//;
+ next if $loc->{file} =~ /\/HPM.*\.h/; # Don't allow hooking into the HPM itself
my $servertype = $1;
-
my $key = $data->{compounddef}->{$filekey}->{compoundname}->[0];
my $original = $key;
+ my @servertypes = ();
+ my $servermask = 'SERVER_TYPE_NONE';
+ if ($servertype ne "common") {
+ push @servertypes, $1;
+ $servermask = 'SERVER_TYPE_' . uc($1);
+ } elsif ($key eq "mapindex_interface") {
+ push @servertypes, ("map", "char"); # Currently not used by the login server
+ $servermask = 'SERVER_TYPE_MAP|SERVER_TYPE_CHAR';
+ } else {
+ push @servertypes, ("map", "char", "login");
+ $servermask = 'SERVER_TYPE_ALL';
+ }
+ my @filepath = split(/[\/\\]/, $loc->{file});
+ my $foldername = uc($filepath[-2]);
+ my $filename = uc($filepath[-1]); $filename =~ s/-/_/g; $filename =~ s/\.[^.]*$//;
+ my $guardname = "${foldername}_${filename}_H";
# Some known interfaces with different names
if ($key =~ /battleground/) {
$key = "bg";
} elsif ($key =~ /guild_storage/) {
$key = "gstorage";
- } elsif ($key =~ /inter_homunculus/) { # to avoid replace to homun
- $key = "inter_homunculus";
- } elsif ($key =~ /homunculus/) {
+ } elsif ($key eq "homunculus_interface") {
$key = "homun";
} elsif ($key eq "irc_bot_interface") {
$key = "ircbot";
@@ -286,8 +309,23 @@ foreach my $file (@files) { # Loop through the xml files
$key = "logs";
} elsif ($key eq "pc_groups_interface") {
$key = "pcg";
+ } elsif ($key eq "pcre_interface") {
+ $key = "libpcre";
} elsif ($key eq "char_interface") {
$key = "chr";
+ } elsif ($key eq "db_interface") {
+ $key = "DB";
+ } elsif ($key eq "malloc_interface") {
+ $key = "iMalloc";
+ } elsif ($key eq "socket_interface") {
+ $key = "sockt";
+ } elsif ($key eq "sql_interface") {
+ $key = "SQL";
+ } elsif ($key eq "stringbuf_interface") {
+ $key = "StrBuf";
+ } elsif ($key eq "console_input_interface") {
+ # TODO
+ next;
} else {
$key =~ s/_interface//;
}
@@ -382,7 +420,14 @@ foreach my $file (@files) { # Loop through the xml files
push(@{ $ifs{$key} }, $if);
}
}
- push(@{ $keys{$servertype} }, $key) if $key2original{$key};
+ foreach $servertype (@servertypes) {
+ push(@{ $keys{$servertype} }, $key) if $key2original{$key};
+ }
+ push(@{ $keys{all} }, $key) if $key2original{$key};
+ $fileguards{$key} = {
+ guard => $guardname,
+ type => $servermask,
+ };
}
foreach my $servertype (keys %keys) {
@@ -390,14 +435,61 @@ foreach my $servertype (keys %keys) {
# Some interfaces use different names
my %exportsymbols = map {
$_ => &{ sub ($) {
- return 'battlegrounds' if $servertype eq 'map' and $_ =~ /^bg$/;
- return 'pc_groups' if $servertype eq 'map' and $_ =~ /^pcg$/;
+ return 'battlegrounds' if $_ =~ /^bg$/;
+ return 'pc_groups' if $_ =~ /^pcg$/;
return $_;
}}($_);
} @$keysref;
my ($maxlen, $idx) = (0, 0);
my $fname;
+
+ if ($servertype eq 'all') {
+ $fname = "../../src/common/HPMSymbols.inc.h";
+ open(FH, ">", $fname)
+ or die "cannot open > $fname: $!";
+
+ print FH <<"EOF";
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+//
+// NOTE: This file was auto-generated and should never be manually edited,
+// as it will get overwritten.
+
+#if !defined(HERCULES_CORE)
+EOF
+
+ foreach my $key (@$keysref) {
+ print FH <<"EOF";
+#ifdef $fileguards{$key}->{guard} /* $key */
+struct $key2original{$key} *$key;
+#endif // $fileguards{$key}->{guard}
+EOF
+ }
+
+ print FH <<"EOF";
+#endif // ! HERCULES_CORE
+
+HPExport const char *HPM_shared_symbols(int server_type)
+{
+EOF
+
+ foreach my $key (@$keysref) {
+ print FH <<"EOF";
+#ifdef $fileguards{$key}->{guard} /* $key */
+if ((server_type&($fileguards{$key}->{type})) && !HPM_SYMBOL("$exportsymbols{$key}", $key)) return "$exportsymbols{$key}";
+#endif // $fileguards{$key}->{guard}
+EOF
+ }
+
+ print FH <<"EOF";
+ return NULL;
+}
+EOF
+ close FH;
+ next;
+ }
+
$fname = "../../src/plugins/HPMHooking/HPMHooking_${servertype}.HookingPoints.inc";
open(FH, ">", $fname)
or die "cannot open > $fname: $!";
@@ -451,26 +543,6 @@ EOF
}
close FH;
- $fname = "../../src/plugins/HPMHooking/HPMHooking_${servertype}.GetSymbol.inc";
- open(FH, ">", $fname)
- or die "cannot open > $fname: $!";
-
- print FH <<"EOF";
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
-
-EOF
- foreach my $key (@$keysref) {
-
- print FH <<"EOF";
-if( !($key = GET_SYMBOL("$exportsymbols{$key}") ) ) return "$exportsymbols{$key}";
-EOF
- }
- close FH;
-
$fname = "../../src/plugins/HPMHooking/HPMHooking_${servertype}.HPMHooksCore.inc";
open(FH, ">", $fname)
or die "cannot open > $fname: $!";
diff --git a/tools/HPMHookGen/doxygen.conf b/tools/HPMHookGen/doxygen.conf
index 3a848abe4..66c1d6158 100644
--- a/tools/HPMHookGen/doxygen.conf
+++ b/tools/HPMHookGen/doxygen.conf
@@ -178,7 +178,7 @@ EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
-PREDEFINED = __attribute__(x)=
+PREDEFINED = __attribute__(x)= HPMHOOKGEN
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = NO
TAGFILES =
diff --git a/travis.sh b/travis.sh
index c04131e20..31a3f330a 100755
--- a/travis.sh
+++ b/travis.sh
@@ -57,9 +57,7 @@ case "$MODE" in
(cd tools && ./validateinterfaces.py silent) || aborterror "Interface validation error."
./configure $@ || aborterror "Configure error, aborting build."
make sql -j3 || aborterror "Build failed."
- if [ -f src/plugins/script_mapquit.c ]; then
- make plugin.script_mapquit -j3 || aborterror "Build failed."
- fi
+ make plugin.script_mapquit -j3 || aborterror "Build failed."
;;
test)
cat >> conf/import/login_conf.txt << EOF
@@ -92,25 +90,21 @@ log_db_ip: localhost
EOF
[ $? -eq 0 ] || aborterror "Unable to import configuration, aborting tests."
ARGS="--load-script npc/dev/test.txt "
- if [ -f src/plugins/script_mapquit.c ]; then
- ARGS="--load-plugin script_mapquit $ARGS --load-script npc/dev/ci_test.txt"
- fi
+ ARGS="--load-plugin script_mapquit $ARGS --load-script npc/dev/ci_test.txt"
echo "Running Hercules with command line: ./map-server --run-once $ARGS"
./map-server --run-once $ARGS || aborterror "Test failed."
;;
getplugins)
echo "Cloning plugins repository..."
- git clone http://github.com/HerculesWS/StaffPlugins.git || aborterror "Unable to fetch plugin repository"
- if [ -f StaffPlugins/Haru/script_mapquit/script_mapquit.c -a -f StaffPlugins/Haru/script_mapquit/examples/ci_test.txt ]; then
- pushd src/plugins || aborterror "Unable to enter plugins directory."
- ln -s ../../StaffPlugins/Haru/script_mapquit/script_mapquit.c ./
- popd
- pushd npc/dev || aborterror "Unable to enter scripts directory."
- ln -s ../../StaffPlugins/Haru/script_mapquit/examples/ci_test.txt ./
- popd
- else
- echo "Plugin not found, skipping advanced tests."
- fi
+ # Nothing to clone right now, all relevant plugins are part of the repository.
+ #git clone http://github.com/HerculesWS/StaffPlugins.git || aborterror "Unable to fetch plugin repository"
+ #if [ -f StaffPlugins/Haru/script_mapquit/script_mapquit.c -a -f StaffPlugins/Haru/script_mapquit/examples/ci_test.txt ]; then
+ # pushd src/plugins || aborterror "Unable to enter plugins directory."
+ # ln -s ../../StaffPlugins/Haru/script_mapquit/script_mapquit.c ./
+ # popd
+ #else
+ # echo "Plugin not found, skipping advanced tests."
+ #fi
;;
*)
usage
diff --git a/vcproj-14/char-server.vcxproj b/vcproj-14/char-server.vcxproj
new file mode 100644
index 000000000..9ab262fd8
--- /dev/null
+++ b/vcproj-14/char-server.vcxproj
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E4E9646175AF}</ProjectGuid>
+ <RootNamespace>char-server</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">char-server</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">char-server</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LIBCONFIG_STATIC;YY_USE_CONST;FD_SETSIZE=4096;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\3rdparty\libconfig\grammar.h" />
+ <ClInclude Include="..\3rdparty\libconfig\libconfig.h" />
+ <ClInclude Include="..\3rdparty\libconfig\parsectx.h" />
+ <ClInclude Include="..\3rdparty\libconfig\scanctx.h" />
+ <ClInclude Include="..\3rdparty\libconfig\scanner.h" />
+ <ClInclude Include="..\3rdparty\libconfig\strbuf.h" />
+ <ClInclude Include="..\3rdparty\libconfig\wincompat.h" />
+ <ClInclude Include="..\3rdparty\mt19937ar\mt19937ar.h" />
+ <ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\conf.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\console.h" />
+ <ClInclude Include="..\src\common\db.h" />
+ <ClInclude Include="..\src\common\ers.h" />
+ <ClInclude Include="..\src\common\HPM.h" />
+ <ClInclude Include="..\src\common\HPMi.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\mapindex.h" />
+ <ClInclude Include="..\src\common\mmo.h" />
+ <ClInclude Include="..\src\common\mutex.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
+ <ClInclude Include="..\src\common\random.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\socket.h" />
+ <ClInclude Include="..\src\common\sql.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
+ <ClInclude Include="..\src\common\thread.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\common\winapi.h" />
+ <ClInclude Include="..\src\char\HPMchar.h" />
+ <ClInclude Include="..\src\char\char.h" />
+ <ClInclude Include="..\src\char\geoip.h" />
+ <ClInclude Include="..\src\char\int_auction.h" />
+ <ClInclude Include="..\src\char\int_elemental.h" />
+ <ClInclude Include="..\src\char\int_guild.h" />
+ <ClInclude Include="..\src\char\int_homun.h" />
+ <ClInclude Include="..\src\char\int_mail.h" />
+ <ClInclude Include="..\src\char\int_mercenary.h" />
+ <ClInclude Include="..\src\char\int_party.h" />
+ <ClInclude Include="..\src\char\int_pet.h" />
+ <ClInclude Include="..\src\char\int_quest.h" />
+ <ClInclude Include="..\src\char\int_storage.h" />
+ <ClInclude Include="..\src\char\inter.h" />
+ <ClInclude Include="..\src\char\loginif.h" />
+ <ClInclude Include="..\src\char\mapif.h" />
+ <ClInclude Include="..\src\char\pincode.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\3rdparty\libconfig\grammar.c" />
+ <ClCompile Include="..\3rdparty\libconfig\libconfig.c" />
+ <ClCompile Include="..\3rdparty\libconfig\scanctx.c" />
+ <ClCompile Include="..\3rdparty\libconfig\scanner.c" />
+ <ClCompile Include="..\3rdparty\libconfig\strbuf.c" />
+ <ClCompile Include="..\3rdparty\mt19937ar\mt19937ar.c" />
+ <ClCompile Include="..\src\common\conf.c" />
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\console.c" />
+ <ClCompile Include="..\src\common\db.c" />
+ <ClCompile Include="..\src\common\ers.c" />
+ <ClCompile Include="..\src\common\HPM.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\mapindex.c" />
+ <ClCompile Include="..\src\common\mutex.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
+ <ClCompile Include="..\src\common\random.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\socket.c" />
+ <ClCompile Include="..\src\common\sql.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
+ <ClCompile Include="..\src\common\thread.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ <ClCompile Include="..\src\char\HPMchar.c" />
+ <ClCompile Include="..\src\char\char.c" />
+ <ClCompile Include="..\src\char\geoip.c" />
+ <ClCompile Include="..\src\char\int_auction.c" />
+ <ClCompile Include="..\src\char\int_elemental.c" />
+ <ClCompile Include="..\src\char\int_guild.c" />
+ <ClCompile Include="..\src\char\int_homun.c" />
+ <ClCompile Include="..\src\char\int_mail.c" />
+ <ClCompile Include="..\src\char\int_mercenary.c" />
+ <ClCompile Include="..\src\char\int_party.c" />
+ <ClCompile Include="..\src\char\int_pet.c" />
+ <ClCompile Include="..\src\char\int_quest.c" />
+ <ClCompile Include="..\src\char\int_storage.c" />
+ <ClCompile Include="..\src\char\inter.c" />
+ <ClCompile Include="..\src\char\loginif.c" />
+ <ClCompile Include="..\src\char\mapif.c" />
+ <ClCompile Include="..\src\char\pincode.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-14/char-server.vcxproj.filters b/vcproj-14/char-server.vcxproj.filters
new file mode 100644
index 000000000..b3b9e49cd
--- /dev/null
+++ b/vcproj-14/char-server.vcxproj.filters
@@ -0,0 +1,294 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="..\src\common\conf.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\core.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\console.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\db.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\ers.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\HPM.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\malloc.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\mapindex.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\nullpo.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\random.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\showmsg.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\socket.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\sql.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\strlib.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\timer.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\utils.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\HPMchar.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\char.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\geoip.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\int_auction.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\int_elemental.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\int_guild.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\int_homun.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\int_mail.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\int_mercenary.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\int_party.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\int_pet.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\int_quest.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\int_storage.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\inter.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\loginif.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\mapif.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\char\pincode.c">
+ <Filter>char_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\mt19937ar\mt19937ar.c">
+ <Filter>3rdparty\mt19937ar</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\grammar.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\libconfig.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\scanctx.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\scanner.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\strbuf.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\thread.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\mutex.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\common\cbasetypes.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\conf.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\core.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\console.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\db.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\ers.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\HPM.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\HPMi.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\malloc.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\mapindex.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\mmo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\nullpo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\random.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\showmsg.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\socket.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\sql.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\strlib.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\timer.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\utils.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\HPMchar.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\char.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\geoip.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\int_auction.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\int_elemental.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\int_guild.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\int_homun.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\int_mail.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\int_mercenary.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\int_party.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\int_pet.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\int_quest.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\int_storage.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\inter.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\loginif.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\mapif.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\char\pincode.h">
+ <Filter>char_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\mt19937ar\mt19937ar.h">
+ <Filter>3rdparty\mt19937ar</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\grammar.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\libconfig.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\parsectx.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\scanctx.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\scanner.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\strbuf.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\wincompat.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\winapi.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\thread.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\mutex.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="common">
+ <UniqueIdentifier>{623f21b1-c166-4848-83d8-8b4fe0e2e2df}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="char_sql">
+ <UniqueIdentifier>{83b1ecf5-21d1-4dac-915f-95ff77a90899}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="3rdparty">
+ <UniqueIdentifier>{b3f5c857-79c0-4a55-b8c5-7e7f56a8f948}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="3rdparty\mt19937ar">
+ <UniqueIdentifier>{847768ab-8c4b-431b-8667-00f8ae3b915c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="3rdparty\libconfig">
+ <UniqueIdentifier>{9e8badd7-548f-4eb4-9e87-613e87e772ff}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-14/login-server.vcxproj b/vcproj-14/login-server.vcxproj
new file mode 100644
index 000000000..2d1aa40cf
--- /dev/null
+++ b/vcproj-14/login-server.vcxproj
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E5E9646175AF}</ProjectGuid>
+ <RootNamespace>login-server</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">login-server</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">login-server</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;WITH_SQL;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\mysql\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;WITH_SQL;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderFile>
+ </PrecompiledHeaderFile>
+ <PrecompiledHeaderOutputFile>
+ </PrecompiledHeaderOutputFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\3rdparty\libconfig\grammar.h" />
+ <ClInclude Include="..\3rdparty\libconfig\libconfig.h" />
+ <ClInclude Include="..\3rdparty\libconfig\parsectx.h" />
+ <ClInclude Include="..\3rdparty\libconfig\scanctx.h" />
+ <ClInclude Include="..\3rdparty\libconfig\scanner.h" />
+ <ClInclude Include="..\3rdparty\libconfig\strbuf.h" />
+ <ClInclude Include="..\3rdparty\libconfig\wincompat.h" />
+ <ClInclude Include="..\src\common\mutex.h" />
+ <ClInclude Include="..\src\common\thread.h" />
+ <ClInclude Include="..\src\common\winapi.h" />
+ <ClInclude Include="..\src\login\account.h" />
+ <ClInclude Include="..\src\login\HPMlogin.h" />
+ <ClInclude Include="..\src\login\ipban.h" />
+ <ClInclude Include="..\src\login\login.h" />
+ <ClInclude Include="..\src\login\loginlog.h" />
+ <ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\conf.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\console.h" />
+ <ClInclude Include="..\src\common\db.h" />
+ <ClInclude Include="..\src\common\ers.h" />
+ <ClInclude Include="..\src\common\HPM.h" />
+ <ClInclude Include="..\src\common\HPMi.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\md5calc.h" />
+ <ClInclude Include="..\src\common\mmo.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
+ <ClInclude Include="..\src\common\random.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\socket.h" />
+ <ClInclude Include="..\src\common\sql.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\3rdparty\mt19937ar\mt19937ar.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\3rdparty\libconfig\grammar.c" />
+ <ClCompile Include="..\3rdparty\libconfig\libconfig.c" />
+ <ClCompile Include="..\3rdparty\libconfig\scanctx.c" />
+ <ClCompile Include="..\3rdparty\libconfig\scanner.c" />
+ <ClCompile Include="..\3rdparty\libconfig\strbuf.c" />
+ <ClCompile Include="..\src\common\mutex.c" />
+ <ClCompile Include="..\src\common\thread.c" />
+ <ClCompile Include="..\src\login\account_sql.c" />
+ <ClCompile Include="..\src\login\HPMlogin.c" />
+ <ClCompile Include="..\src\login\ipban_sql.c" />
+ <ClCompile Include="..\src\login\login.c" />
+ <ClCompile Include="..\src\login\loginlog_sql.c" />
+ <ClCompile Include="..\src\common\conf.c" />
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\console.c" />
+ <ClCompile Include="..\src\common\db.c" />
+ <ClCompile Include="..\src\common\ers.c" />
+ <ClCompile Include="..\src\common\HPM.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\md5calc.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
+ <ClCompile Include="..\src\common\random.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\socket.c" />
+ <ClCompile Include="..\src\common\sql.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ <ClCompile Include="..\3rdparty\mt19937ar\mt19937ar.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-14/login-server.vcxproj.filters b/vcproj-14/login-server.vcxproj.filters
new file mode 100644
index 000000000..3bdb93f6f
--- /dev/null
+++ b/vcproj-14/login-server.vcxproj.filters
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="..\src\login\account_sql.c">
+ <Filter>login_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\login\HPMlogin.c">
+ <Filter>login_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\login\ipban_sql.c">
+ <Filter>login_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\login\login.c">
+ <Filter>login_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\login\loginlog_sql.c">
+ <Filter>login_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\conf.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\core.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\console.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\db.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\ers.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\HPM.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\malloc.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\md5calc.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\nullpo.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\random.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\showmsg.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\socket.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\sql.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\strlib.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\timer.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\utils.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\mt19937ar\mt19937ar.c">
+ <Filter>3rdparty\mt19937ar</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\grammar.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\libconfig.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\scanctx.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\scanner.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\strbuf.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\thread.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\mutex.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\login\account.h">
+ <Filter>login_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\login\HPMlogin.h">
+ <Filter>login_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\login\ipban.h">
+ <Filter>login_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\login\loginlog.h">
+ <Filter>login_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\login\login.h">
+ <Filter>login_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\cbasetypes.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\conf.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\core.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\console.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\db.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\ers.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\HPM.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\HPMi.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\malloc.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\md5calc.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\mmo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\nullpo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\random.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\showmsg.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\socket.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\sql.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\strlib.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\timer.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\utils.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\mt19937ar\mt19937ar.h">
+ <Filter>3rdparty\mt19937ar</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\grammar.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\libconfig.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\parsectx.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\scanctx.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\scanner.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\strbuf.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\wincompat.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\winapi.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\thread.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\mutex.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="common">
+ <UniqueIdentifier>{b50ee803-e71d-4d41-8f7d-2dad5839df50}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="login_sql">
+ <UniqueIdentifier>{8eea96ed-d379-4694-ae2e-ffb0be95170c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="3rdparty">
+ <UniqueIdentifier>{ab5c90ec-923d-4847-a214-45b40818211e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="3rdparty\mt19937ar">
+ <UniqueIdentifier>{68e3bcee-28d9-4b2d-8701-614d50f32999}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="3rdparty\libconfig">
+ <UniqueIdentifier>{779e8145-9bb2-4a88-9149-60586ab0bdd4}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-14/map-server.vcxproj b/vcproj-14/map-server.vcxproj
new file mode 100644
index 000000000..66c407db5
--- /dev/null
+++ b/vcproj-14/map-server.vcxproj
@@ -0,0 +1,297 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E6E9646175AF}</ProjectGuid>
+ <RootNamespace>map-server</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">map-server</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">map-server</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4018;4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\mysql\include;..\3rdparty\zlib\include;..\3rdparty\pcre\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;PCRE_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;FD_SETSIZE=4096;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <DisableSpecificWarnings>4018;4100;4800;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;ws2_32.lib;libmysql.lib;zdll.lib;pcre.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\mysql\lib;..\3rdparty\zlib\lib;..\3rdparty\pcre\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\3rdparty\libconfig\grammar.h" />
+ <ClInclude Include="..\3rdparty\libconfig\libconfig.h" />
+ <ClInclude Include="..\3rdparty\libconfig\parsectx.h" />
+ <ClInclude Include="..\3rdparty\libconfig\scanctx.h" />
+ <ClInclude Include="..\3rdparty\libconfig\scanner.h" />
+ <ClInclude Include="..\3rdparty\libconfig\strbuf.h" />
+ <ClInclude Include="..\3rdparty\libconfig\wincompat.h" />
+ <ClInclude Include="..\3rdparty\mt19937ar\mt19937ar.h" />
+ <ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\conf.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\console.h" />
+ <ClInclude Include="..\src\common\db.h" />
+ <ClInclude Include="..\src\common\des.h" />
+ <ClInclude Include="..\src\common\ers.h" />
+ <ClInclude Include="..\src\common\grfio.h" />
+ <ClInclude Include="..\src\common\HPM.h" />
+ <ClInclude Include="..\src\common\HPMi.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\mapindex.h" />
+ <ClInclude Include="..\src\common\md5calc.h" />
+ <ClInclude Include="..\src\common\mmo.h" />
+ <ClInclude Include="..\src\common\mutex.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
+ <ClInclude Include="..\src\common\random.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\socket.h" />
+ <ClInclude Include="..\src\common\sql.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
+ <ClInclude Include="..\src\common\thread.h" />
+ <ClInclude Include="..\src\common\timer.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\common\winapi.h" />
+ <ClInclude Include="..\src\map\atcommand.h" />
+ <ClInclude Include="..\src\map\battle.h" />
+ <ClInclude Include="..\src\map\battleground.h" />
+ <ClInclude Include="..\src\map\buyingstore.h" />
+ <ClInclude Include="..\src\map\channel.h" />
+ <ClInclude Include="..\src\map\chat.h" />
+ <ClInclude Include="..\src\map\chrif.h" />
+ <ClInclude Include="..\src\map\clif.h" />
+ <ClInclude Include="..\src\map\date.h" />
+ <ClInclude Include="..\src\map\duel.h" />
+ <ClInclude Include="..\src\map\elemental.h" />
+ <ClInclude Include="..\src\map\guild.h" />
+ <ClInclude Include="..\src\map\intif.h" />
+ <ClInclude Include="..\src\map\irc-bot.h" />
+ <ClInclude Include="..\src\map\itemdb.h" />
+ <ClInclude Include="..\src\map\log.h" />
+ <ClInclude Include="..\src\map\mail.h" />
+ <ClInclude Include="..\src\map\map.h" />
+ <ClInclude Include="..\src\map\mapreg.h" />
+ <ClInclude Include="..\src\map\homunculus.h" />
+ <ClInclude Include="..\src\map\HPMmap.h" />
+ <ClInclude Include="..\src\map\instance.h" />
+ <ClInclude Include="..\src\map\mercenary.h" />
+ <ClInclude Include="..\src\map\mob.h" />
+ <ClInclude Include="..\src\map\npc.h" />
+ <ClInclude Include="..\src\map\packets.h" />
+ <ClInclude Include="..\src\map\packets_struct.h" />
+ <ClInclude Include="..\src\map\party.h" />
+ <ClInclude Include="..\src\map\path.h" />
+ <ClInclude Include="..\src\map\pc.h" />
+ <ClInclude Include="..\src\map\pc_groups.h" />
+ <ClInclude Include="..\src\map\pet.h" />
+ <ClInclude Include="..\src\map\quest.h" />
+ <ClInclude Include="..\src\config\const.h" />
+ <ClInclude Include="..\src\config\core.h" />
+ <ClInclude Include="..\src\config\renewal.h" />
+ <ClInclude Include="..\src\config\secure.h" />
+ <ClInclude Include="..\src\config\classes\general.h" />
+ <ClInclude Include="..\src\map\script.h" />
+ <ClInclude Include="..\src\map\searchstore.h" />
+ <ClInclude Include="..\src\map\skill.h" />
+ <ClInclude Include="..\src\map\status.h" />
+ <ClInclude Include="..\src\map\storage.h" />
+ <ClInclude Include="..\src\map\trade.h" />
+ <ClInclude Include="..\src\map\unit.h" />
+ <ClInclude Include="..\src\map\vending.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\3rdparty\libconfig\grammar.c" />
+ <ClCompile Include="..\3rdparty\libconfig\libconfig.c" />
+ <ClCompile Include="..\3rdparty\libconfig\scanctx.c" />
+ <ClCompile Include="..\3rdparty\libconfig\scanner.c" />
+ <ClCompile Include="..\3rdparty\libconfig\strbuf.c" />
+ <ClCompile Include="..\3rdparty\mt19937ar\mt19937ar.c" />
+ <ClCompile Include="..\src\common\conf.c" />
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\console.c" />
+ <ClCompile Include="..\src\common\db.c" />
+ <ClCompile Include="..\src\common\des.c" />
+ <ClCompile Include="..\src\common\ers.c" />
+ <ClCompile Include="..\src\common\grfio.c" />
+ <ClCompile Include="..\src\common\HPM.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\mapindex.c" />
+ <ClCompile Include="..\src\common\md5calc.c" />
+ <ClCompile Include="..\src\common\mutex.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
+ <ClCompile Include="..\src\common\random.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\socket.c" />
+ <ClCompile Include="..\src\common\sql.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
+ <ClCompile Include="..\src\common\thread.c" />
+ <ClCompile Include="..\src\common\timer.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ <ClCompile Include="..\src\map\atcommand.c" />
+ <ClCompile Include="..\src\map\battle.c" />
+ <ClCompile Include="..\src\map\battleground.c" />
+ <ClCompile Include="..\src\map\buyingstore.c" />
+ <ClCompile Include="..\src\map\channel.c" />
+ <ClCompile Include="..\src\map\chat.c" />
+ <ClCompile Include="..\src\map\chrif.c" />
+ <ClCompile Include="..\src\map\clif.c" />
+ <ClCompile Include="..\src\map\date.c" />
+ <ClCompile Include="..\src\map\duel.c" />
+ <ClCompile Include="..\src\map\elemental.c" />
+ <ClCompile Include="..\src\map\guild.c" />
+ <ClCompile Include="..\src\map\intif.c" />
+ <ClCompile Include="..\src\map\irc-bot.c" />
+ <ClCompile Include="..\src\map\itemdb.c" />
+ <ClCompile Include="..\src\map\log.c" />
+ <ClCompile Include="..\src\map\mail.c" />
+ <ClCompile Include="..\src\map\map.c" />
+ <ClCompile Include="..\src\map\mapreg_sql.c" />
+ <ClCompile Include="..\src\map\homunculus.c" />
+ <ClCompile Include="..\src\map\HPMmap.c" />
+ <ClCompile Include="..\src\map\instance.c" />
+ <ClCompile Include="..\src\map\mercenary.c" />
+ <ClCompile Include="..\src\map\mob.c" />
+ <ClCompile Include="..\src\map\npc.c" />
+ <ClCompile Include="..\src\map\npc_chat.c" />
+ <ClCompile Include="..\src\map\party.c" />
+ <ClCompile Include="..\src\map\path.c" />
+ <ClCompile Include="..\src\map\pc.c" />
+ <ClCompile Include="..\src\map\pc_groups.c" />
+ <ClCompile Include="..\src\map\pet.c" />
+ <ClCompile Include="..\src\map\quest.c" />
+ <ClCompile Include="..\src\map\script.c" />
+ <ClCompile Include="..\src\map\searchstore.c" />
+ <ClCompile Include="..\src\map\skill.c" />
+ <ClCompile Include="..\src\map\status.c" />
+ <ClCompile Include="..\src\map\storage.c" />
+ <ClCompile Include="..\src\map\trade.c" />
+ <ClCompile Include="..\src\map\unit.c" />
+ <ClCompile Include="..\src\map\vending.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+ <Target Name="AfterBuild">
+ <Copy SourceFiles="..\conf\import-tmpl\battle_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" Condition="!Exists('..\conf\import\battle_conf.txt')" />
+ <Copy SourceFiles="..\conf\import-tmpl\char_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" Condition="!Exists('..\conf\import\char_conf.txt')" />
+ <Copy SourceFiles="..\conf\import-tmpl\inter_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" Condition="!Exists('..\conf\import\inter_conf.txt')" />
+ <Copy SourceFiles="..\conf\import-tmpl\log_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" Condition="!Exists('..\conf\import\log_conf.txt')" />
+ <Copy SourceFiles="..\conf\import-tmpl\login_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" Condition="!Exists('..\conf\import\login_conf.txt')" />
+ <Copy SourceFiles="..\conf\import-tmpl\map_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" Condition="!Exists('..\conf\import\map_conf.txt')" />
+ <Copy SourceFiles="..\conf\import-tmpl\msg_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" Condition="!Exists('..\conf\import\msg_conf.txt')" />
+ <Copy SourceFiles="..\conf\import-tmpl\packet_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" Condition="!Exists('..\conf\import\packet_conf.txt')" />
+ <Copy SourceFiles="..\conf\import-tmpl\script_conf.txt" DestinationFolder="..\conf\import\" ContinueOnError="true" Condition="!Exists('..\conf\import\script_conf.txt')" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/vcproj-14/map-server.vcxproj.filters b/vcproj-14/map-server.vcxproj.filters
new file mode 100644
index 000000000..8347c134a
--- /dev/null
+++ b/vcproj-14/map-server.vcxproj.filters
@@ -0,0 +1,454 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="..\src\map\atcommand.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\battle.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\battleground.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\buyingstore.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\chat.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\chrif.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\clif.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\date.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\duel.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\elemental.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\guild.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\homunculus.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\HPMmap.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\instance.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\intif.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\irc-bot.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\itemdb.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\log.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\mail.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\map.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\mapreg_sql.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\mercenary.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\mob.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\npc.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\npc_chat.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\party.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\path.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\pc.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\pet.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\quest.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\script.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\searchstore.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\skill.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\status.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\storage.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\trade.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\unit.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\vending.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\core.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\console.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\des.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\db.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\ers.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\grfio.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\HPM.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\malloc.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\mapindex.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\md5calc.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\nullpo.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\random.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\socket.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\sql.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\strlib.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\timer.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\utils.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\conf.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\pc_groups.c">
+ <Filter>map_sql</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\showmsg.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\mt19937ar\mt19937ar.c">
+ <Filter>3rdparty\mt19937ar</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\grammar.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\libconfig.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\scanctx.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\scanner.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\3rdparty\libconfig\strbuf.c">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\thread.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\mutex.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\map\channel.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\map\atcommand.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\battle.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\battleground.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\buyingstore.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\chat.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\chrif.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\clif.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\date.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\duel.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\elemental.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\guild.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\homunculus.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\HPMmap.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\instance.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\intif.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\irc-bot.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\itemdb.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\log.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\mail.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\map.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\mapreg.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\mercenary.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\mob.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\npc.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\packets.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\packets_struct.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\party.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\path.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\pc.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\pet.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\quest.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\script.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\searchstore.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\skill.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\status.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\storage.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\trade.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\unit.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\vending.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\cbasetypes.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\core.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\console.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\db.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\des.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\ers.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\grfio.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\HPM.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\HPMi.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\malloc.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\mapindex.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\md5calc.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\mmo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\nullpo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\random.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\socket.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\sql.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\strlib.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\timer.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\utils.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\config\const.h" />
+ <ClInclude Include="..\src\config\core.h" />
+ <ClInclude Include="..\src\config\renewal.h" />
+ <ClInclude Include="..\src\config\secure.h" />
+ <ClInclude Include="..\src\config\classes\general.h" />
+ <ClInclude Include="..\src\common\conf.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\pc_groups.h">
+ <Filter>map_sql</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\showmsg.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\mt19937ar\mt19937ar.h">
+ <Filter>3rdparty\mt19937ar</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\grammar.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\libconfig.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\parsectx.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\scanctx.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\scanner.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\strbuf.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\3rdparty\libconfig\wincompat.h">
+ <Filter>3rdparty\libconfig</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\winapi.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\thread.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\mutex.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\map\channel.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="common">
+ <UniqueIdentifier>{3a137217-ebf7-44ee-95d9-3d7c51d2a199}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="map_sql">
+ <UniqueIdentifier>{8c01a080-5a78-4fb7-96f2-862c33a02230}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="3rdparty">
+ <UniqueIdentifier>{c4845ea8-bcc7-411b-af29-e3842adb6714}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="3rdparty\mt19937ar">
+ <UniqueIdentifier>{fcf23386-ddba-4a72-9b41-62f8e2d0e6c0}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="3rdparty\libconfig">
+ <UniqueIdentifier>{9caf40b7-c4d1-43b4-bd1f-0376b4f920e7}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-14/mapcache.vcxproj b/vcproj-14/mapcache.vcxproj
new file mode 100644
index 000000000..e8392f8f0
--- /dev/null
+++ b/vcproj-14/mapcache.vcxproj
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D356871D-58E1-450B-967A-E7E9646175AF}</ProjectGuid>
+ <RootNamespace>mapcache</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">mapcache</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">mapcache</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\zlib\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;MINICORE;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessToFile>false</PreprocessToFile>
+ <PreprocessSuppressLineNumbers>false</PreprocessSuppressLineNumbers>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/FIXED:NO %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>libcmtd.lib;oldnames.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)mapcache.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\zlib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\zlib\include;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WIN32;__WIN32;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;MINICORE;LIBCONFIG_STATIC;YY_USE_CONST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <FunctionLevelLinking>false</FunctionLevelLinking>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>CompileAsC</CompileAs>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>libcmt.lib;oldnames.lib;zdll.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)mapcache.exe</OutputFile>
+ <AdditionalLibraryDirectories>..\3rdparty\zlib\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\common\core.c" />
+ <ClCompile Include="..\src\common\console.c" />
+ <ClCompile Include="..\src\common\des.c" />
+ <ClCompile Include="..\src\common\grfio.c" />
+ <ClCompile Include="..\src\common\malloc.c" />
+ <ClCompile Include="..\src\common\showmsg.c" />
+ <ClCompile Include="..\src\common\strlib.c" />
+ <ClCompile Include="..\src\common\sysinfo.c" />
+ <ClCompile Include="..\src\common\utils.c" />
+ <ClCompile Include="..\src\common\nullpo.c" />
+ <ClCompile Include="..\src\tool\mapcache.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\core.h" />
+ <ClInclude Include="..\src\common\console.h" />
+ <ClInclude Include="..\src\common\des.h" />
+ <ClInclude Include="..\src\common\grfio.h" />
+ <ClInclude Include="..\src\common\malloc.h" />
+ <ClInclude Include="..\src\common\mmo.h" />
+ <ClInclude Include="..\src\common\showmsg.h" />
+ <ClInclude Include="..\src\common\strlib.h" />
+ <ClInclude Include="..\src\common\sysinfo.h" />
+ <ClInclude Include="..\src\common\utils.h" />
+ <ClInclude Include="..\src\common\winapi.h" />
+ <ClInclude Include="..\src\common\nullpo.h" />
+ <ClInclude Include="..\src\config\renewal.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-14/mapcache.vcxproj.filters b/vcproj-14/mapcache.vcxproj.filters
new file mode 100644
index 000000000..d5c2fbb83
--- /dev/null
+++ b/vcproj-14/mapcache.vcxproj.filters
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="..\src\common\core.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\console.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\des.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\grfio.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\malloc.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\showmsg.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\strlib.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\sysinfo.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\utils.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\common\nullpo.c">
+ <Filter>common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\tool\mapcache.c">
+ <Filter>mapcache</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\common\cbasetypes.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\core.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\console.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\des.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\grfio.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\malloc.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\mmo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\showmsg.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\strlib.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\sysinfo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\utils.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\winapi.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\common\nullpo.h">
+ <Filter>common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\config\renewal.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="common">
+ <UniqueIdentifier>{a9c2444c-ffec-4e89-8412-e530231d79dc}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="mapcache">
+ <UniqueIdentifier>{5ea9d6f7-0a10-4bfb-ad39-478e4b1d8a0d}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-14/plugin-HPMHooking_char.vcxproj b/vcproj-14/plugin-HPMHooking_char.vcxproj
new file mode 100644
index 000000000..832f46e7b
--- /dev/null
+++ b/vcproj-14/plugin-HPMHooking_char.vcxproj
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{D495824D-24D3-4623-A28C-4CA506084A09}</ProjectGuid>
+ <RootNamespace>plugin-HPMHooking_char</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>plugin-HPMHooking_char</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_char</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_char</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_CHAR;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\plugins\HPMHooking.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-14/plugin-HPMHooking_login.vcxproj b/vcproj-14/plugin-HPMHooking_login.vcxproj
new file mode 100644
index 000000000..5fc9ff10c
--- /dev/null
+++ b/vcproj-14/plugin-HPMHooking_login.vcxproj
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{544AD8E8-0309-49DE-9F8D-F9FEA24D92F1}</ProjectGuid>
+ <RootNamespace>plugin-HPMHooking_login</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>plugin-HPMHooking_login</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_login</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_login</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_LOGIN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_LOGIN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\plugins\HPMHooking.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-14/plugin-HPMHooking_map.vcxproj b/vcproj-14/plugin-HPMHooking_map.vcxproj
new file mode 100644
index 000000000..01e042841
--- /dev/null
+++ b/vcproj-14/plugin-HPMHooking_map.vcxproj
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{745D4A8C-6A68-4721-A43A-D81BF59860A1}</ProjectGuid>
+ <RootNamespace>plugin-HPMHooking_map</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>plugin-HPMHooking_map</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">HPMHooking_map</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">HPMHooking_map</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_MAP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;HPMHOOKING_MAP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\plugins\HPMHooking.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/vcproj-14/plugin-sample.vcxproj b/vcproj-14/plugin-sample.vcxproj
new file mode 100644
index 000000000..d2baea444
--- /dev/null
+++ b/vcproj-14/plugin-sample.vcxproj
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{E64C56D3-CDFB-483B-900B-A62D216B6D2F}</ProjectGuid>
+ <RootNamespace>plugin-sample</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>plugin-sample</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v140</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectName)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NativeRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">plugin-sample</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">plugin-sample</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/MP %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\src;..\3rdparty;..\3rdparty\msinttypes\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0417</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
+ <ModuleDefinitionFile>
+ </ModuleDefinitionFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\plugins\sample.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file