summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/HPMchar.c10
-rw-r--r--src/char/char.c201
-rw-r--r--src/char/char.h106
-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.h10
-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.h14
-rw-r--r--src/common/HPMSymbols.inc.h451
-rw-r--r--src/common/HPMi.h64
-rw-r--r--src/common/Makefile.in6
-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.c1
-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.c293
-rw-r--r--src/common/socket.h80
-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.c2
-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.h6
-rw-r--r--src/login/HPMlogin.c10
-rw-r--r--src/login/login.c108
-rw-r--r--src/login/login.h13
-rw-r--r--src/login/loginlog_sql.c4
-rw-r--r--src/map/HPMmap.c8
-rw-r--r--src/map/atcommand.c9
-rw-r--r--src/map/atcommand.h6
-rw-r--r--src/map/battle.c1
-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.c75
-rw-r--r--src/map/chrif.h6
-rw-r--r--src/map/clif.c72
-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.c3
-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.c2
-rw-r--r--src/map/homunculus.h5
-rw-r--r--src/map/instance.c1
-rw-r--r--src/map/instance.h6
-rw-r--r--src/map/intif.c7
-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.c1
-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.c90
-rw-r--r--src/map/map.h19
-rw-r--r--src/map/mapreg.h6
-rw-r--r--src/map/mapreg_sql.c1
-rw-r--r--src/map/mercenary.c2
-rw-r--r--src/map/mercenary.h6
-rw-r--r--src/map/mob.c1
-rw-r--r--src/map/mob.h10
-rw-r--r--src/map/npc.c1
-rw-r--r--src/map/npc.h13
-rw-r--r--src/map/npc_chat.c2
-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.c23
-rw-r--r--src/map/pc.h8
-rw-r--r--src/map/pc_groups.c1
-rw-r--r--src/map/pc_groups.h6
-rw-r--r--src/map/pet.c1
-rw-r--r--src/map/pet.h6
-rw-r--r--src/map/quest.c2
-rw-r--r--src/map/quest.h6
-rw-r--r--src/map/script.c9
-rw-r--r--src/map/script.h6
-rw-r--r--src/map/searchstore.c1
-rw-r--r--src/map/searchstore.h6
-rw-r--r--src/map/skill.c6
-rw-r--r--src/map/skill.h8
-rw-r--r--src/map/status.c4
-rw-r--r--src/map/status.h8
-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.inc973
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc256
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc6446
-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.inc936
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc246
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc6204
-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.inc973
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc256
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc6446
-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.c4
168 files changed, 24776 insertions, 1679 deletions
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 e70a4b762..576eb9630 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -87,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;
@@ -206,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);
}
@@ -246,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);
}
@@ -292,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);
}
@@ -355,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();
}
@@ -2206,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)
@@ -2280,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);
@@ -2315,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;
@@ -2344,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);
@@ -2388,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)
@@ -2532,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);
@@ -2561,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;
@@ -2596,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;
}
}
@@ -2713,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;
}
}
@@ -2940,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;
}
}
@@ -3241,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);
}
@@ -3296,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;
@@ -3777,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);
@@ -3785,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 &&
@@ -3824,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) );
@@ -3840,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);
@@ -3894,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;
@@ -4113,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
@@ -4226,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
@@ -4442,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;
@@ -4453,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;
}
@@ -4497,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);
}
@@ -4647,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;
@@ -4961,7 +4962,7 @@ void char_parse_char_login_map_server(int fd, uint32 ipl)
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 ||
@@ -4975,9 +4976,9 @@ void char_parse_char_login_map_server(int fd, uint32 ipl)
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);
@@ -5052,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;
}
@@ -5061,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
@@ -5079,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;
}
@@ -5340,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);
@@ -5371,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);
@@ -5388,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();
@@ -5575,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) {
@@ -5593,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);
@@ -5739,7 +5740,7 @@ int do_final(void) {
inter->final();
- flush_fifos();
+ sockt->flush_fifos();
do_final_mapif();
loginif->final();
@@ -5752,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;
}
@@ -5791,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;
+ }
}
/**
@@ -5887,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);
@@ -5919,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);
@@ -5927,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);
}
}
@@ -5962,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);
}
@@ -5975,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);
diff --git a/src/char/char.h b/src/char/char.h
index 1f5df2750..e79cc1898 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -5,7 +5,7 @@
#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,57 +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 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;
@@ -310,6 +259,57 @@ struct char_interface {
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 /* 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 ee04388fc..c2393d103 100644
--- a/src/char/int_quest.h
+++ b/src/char/int_quest.h
@@ -4,9 +4,7 @@
#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_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 584cab5c9..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,6 +192,11 @@ 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 },
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 bf4eb83c8..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 */
@@ -224,10 +215,17 @@ 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/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 0db714ae1..829ba4aab 100644
--- a/src/common/nullpo.c
+++ b/src/common/nullpo.c
@@ -17,6 +17,7 @@
#endif // HAVE_EXECINFO
struct nullpo_interface nullpo_s;
+struct nullpo_interface *nullpo;
/**
* Reports failed assertions or NULL pointers
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 830877044..c4cc4a329 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -5,9 +5,7 @@
#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"
@@ -57,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
@@ -359,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;
}
}
@@ -373,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;
}
@@ -410,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;
}
@@ -435,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;
}
@@ -455,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);
}
/*======================================
@@ -493,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)) ) {
@@ -506,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;
}
@@ -535,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);
@@ -556,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;
}
@@ -601,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;
}
@@ -676,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);
@@ -722,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
@@ -771,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);
@@ -800,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
@@ -832,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;
}
}
@@ -853,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
@@ -869,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;
}
}
@@ -1220,15 +1220,15 @@ 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(session);
+ aFree(sockt->session);
if (sockt->lan_subnet)
aFree(sockt->lan_subnet);
@@ -1247,16 +1247,16 @@ void socket_final(void)
}
/// 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.
@@ -1393,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);
@@ -1419,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.
@@ -1441,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);
@@ -1518,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);
@@ -1535,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;
@@ -1585,20 +1588,20 @@ 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);
}
}
@@ -1696,8 +1699,8 @@ int socket_net_config_read_sub(config_setting_t *t, struct s_subnet **list, int
}
RECREATE(*list, struct s_subnet, *count + 1);
l = *list;
- l[*count].ip = str2ip(ipbuf);
- l[*count].mask = str2ip(maskbuf);
+ l[*count].ip = sockt->str2ip(ipbuf);
+ l[*count].mask = sockt->str2ip(maskbuf);
++*count;
}
return *count;
@@ -1792,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;
@@ -1808,7 +1811,7 @@ 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;
diff --git a/src/common/socket.h b/src/common/socket.h
index 26b674d43..a995bffc8 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -5,7 +5,7 @@
#ifndef COMMON_SOCKET_H
#define COMMON_SOCKET_H
-#include "common/cbasetypes.h"
+#include "common/hercules.h"
#include "common/conf.h"
#ifdef WIN32
@@ -23,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)))
@@ -35,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))
@@ -124,11 +132,6 @@ struct s_subnet {
#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 {
@@ -140,6 +143,8 @@ 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
@@ -159,27 +164,27 @@ 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);
uint32 (*lan_subnet_check) (uint32 ip, struct s_subnet *info);
bool (*allowed_ip_check) (uint32 ip);
@@ -188,33 +193,10 @@ struct socket_interface {
void (*net_config_read) (const char *filename);
};
-struct socket_interface *sockt;
-
#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 105f300ad..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
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 e2b0dacc9..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*
@@ -68,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 141ab5e2b..572bd594f 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -29,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
@@ -144,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);
@@ -172,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;
}
}
@@ -294,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 &&
@@ -703,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);
@@ -776,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);
@@ -954,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
@@ -1034,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;
}
@@ -1191,8 +1191,8 @@ void login_auth_ok(struct login_session_data* sd)
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
@@ -1211,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 )
@@ -1263,12 +1263,12 @@ void login_auth_ok(struct login_session_data* sd)
for (i = 0, n = 0; i < ARRAYLENGTH(server); ++i) {
uint32 subnet_char_ip;
- if( !session_isValid(server[i].fd) )
+ if (!sockt->session_is_valid(server[i].fd))
continue;
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;
@@ -1313,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;
@@ -1534,15 +1534,15 @@ 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) &&
+ !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);
@@ -1554,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);
@@ -1573,17 +1573,17 @@ 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;
}
@@ -1595,13 +1595,13 @@ int login_parse_login(int fd)
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;
}
@@ -1675,7 +1675,7 @@ int login_parse_login(int fd)
default:
ShowNotice("Abnormal end of connection (ip: %s): Unknown packet 0x%x\n", ip, command);
- set_eof(fd);
+ sockt->eof(fd);
return 0;
}
}
@@ -1735,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") ) {
@@ -1874,7 +1874,7 @@ int do_final(void) {
if( login->fd != -1 )
{
- do_close(login->fd);
+ sockt->close(login->fd);
login->fd = -1;
}
@@ -1905,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
*
@@ -1980,7 +1975,6 @@ int do_init(int argc, char** argv)
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);
@@ -2007,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");
@@ -2028,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);
diff --git a/src/login/login.h b/src/login/login.h
index 6dc4c875b..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_*
@@ -128,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
@@ -201,10 +197,13 @@ struct login_interface {
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 fb0b89381..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();
@@ -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 f64fde55f..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;
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 5bd1e436f..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,14 +1309,14 @@ 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));
@@ -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 d00cac0ee..ded028974 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);
}
@@ -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));
}
@@ -2238,7 +2240,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 )
@@ -2697,7 +2699,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);
@@ -3605,7 +3607,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)));
@@ -5404,7 +5406,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) {
@@ -5683,7 +5685,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 )
@@ -7450,7 +7452,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')
@@ -8806,7 +8808,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;
}
@@ -8943,7 +8945,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;
}
@@ -8956,7 +8958,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;
}
@@ -8976,7 +8978,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);
@@ -9528,7 +9530,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 {
@@ -9981,7 +9983,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);
}
@@ -18297,13 +18299,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
@@ -18317,9 +18319,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;
}
@@ -18348,7 +18350,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;
}
@@ -18364,7 +18366,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;
}
@@ -18506,8 +18508,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 c827406ca..66a749818 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 {
@@ -1322,10 +1317,15 @@ struct clif_interface {
void (*pNPCMarketPurchase) (int fd, struct map_session_data *sd);
};
-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 459ce2a39..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;
@@ -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 305d60f5b..cc736708d 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -45,6 +45,8 @@
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_))
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index 95b613fff..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;
@@ -160,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 92acd1bbb..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) {
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 26fd1949c..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,9 +2146,9 @@ 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];
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 644c16a00..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
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 e43d4d7f6..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)
@@ -5542,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;
@@ -5552,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();
}
@@ -5612,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();
@@ -5720,7 +5669,7 @@ void map_load_defaults(void) {
*/
static CMDLINEARG(runonce)
{
- runflag = CORE_ST_STOP;
+ core->runflag = CORE_ST_STOP;
return true;
}
/**
@@ -5828,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;
}
@@ -5858,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;
}
@@ -5902,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();
@@ -5923,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");
@@ -6057,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();
diff --git a/src/map/map.h b/src/map/map.h
index 826548f49..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))
@@ -1085,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 c60234d5d..ff37f396d 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -44,6 +44,8 @@
struct mercenary_interface mercenary_s;
struct s_mercenary_db mercdb[MAX_MERCENARY_CLASS];
+struct mercenary_interface *mercenary;
+
int merc_search_index(int class_)
{
int i;
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index c96b5a5ef..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;
@@ -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 8112c208c..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.
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 8733ee7e4..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;
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 67b78dcea..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)
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 ad32217b8..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
@@ -1007,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;
@@ -3268,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;
}
@@ -9014,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;
}
@@ -9035,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;
}
diff --git a/src/map/pc.h b/src/map/pc.h
index d35c29bc7..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
@@ -1072,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 b612a9505..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
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 463a3395a..ddbd2f92d 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -39,6 +39,8 @@
struct quest_interface quest_s;
struct quest_db *db_data[MAX_QUEST_DB]; ///< Quest database
+struct quest_interface *quest;
+
/**
* Searches a quest by ID.
*
diff --git a/src/map/quest.h b/src/map/quest.h
index 9b5199625..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
@@ -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 23c6af0f8..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));
@@ -18265,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);
}
diff --git a/src/map/script.h b/src/map/script.h
index b3d2a3c8a..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
@@ -773,10 +773,10 @@ struct script_interface {
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 e3f85f8d1..c647cc325 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -64,6 +64,8 @@
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) {
#ifndef RENEWAL
@@ -18089,7 +18091,7 @@ 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 )
+ if( core->runflag == MAPSERVER_ST_RUNNING )
memset(skill->dbs->unit_layout, 0, sizeof(skill->dbs->unit_layout));
// standard square layouts go first
@@ -18974,7 +18976,7 @@ 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 ) {
+ if( core->runflag == MAPSERVER_ST_RUNNING ) {
memset(ZEROED_BLOCK_POS(skill->dbs), 0, ZEROED_BLOCK_SIZE(skill->dbs));
}
diff --git a/src/map/skill.h b/src/map/skill.h
index aa0188be6..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
@@ -2084,10 +2082,10 @@ struct skill_interface {
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 e70fb1eb1..4fc975268 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -46,6 +46,8 @@
struct status_interface status_s;
struct s_status_dbs statusdbs;
+struct status_interface *status;
+
/**
* Returns the status change associated with a skill.
* @param skill The skill to look up
@@ -12300,7 +12302,7 @@ 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->dbs->max_weight_base, 0, sizeof(status->dbs->max_weight_base));
memset(status->dbs->HP_table, 0, sizeof(status->dbs->HP_table));
diff --git a/src/map/status.h b/src/map/status.h
index 45a1300a0..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;
@@ -2085,10 +2083,10 @@ struct status_interface {
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 bcda4332d..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;
@@ -323,6 +329,64 @@ struct {
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;
@@ -521,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;
@@ -547,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;
@@ -879,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;
@@ -899,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;
@@ -1220,6 +1704,64 @@ struct {
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;
@@ -1418,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;
@@ -1444,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;
@@ -1776,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;
@@ -1796,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;
@@ -1812,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 b11149cf1..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) },
@@ -165,6 +169,39 @@ struct HookingPointData HookingPoints[] = {
{ 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) },
@@ -276,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) },
@@ -290,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) },
@@ -457,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) },
@@ -468,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 f8d01cb28..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;
@@ -4222,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;
@@ -6910,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;
@@ -7249,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;
@@ -11666,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;
@@ -11929,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 31cd3d710..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;
@@ -113,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;
@@ -224,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 00cdfc8c9..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) },
@@ -60,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 18195af77..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;
@@ -1444,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 33c991933..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;
@@ -4421,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;
@@ -4855,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;
@@ -5103,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;
@@ -5236,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;
@@ -7038,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;
@@ -7866,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;
@@ -7928,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;
@@ -8184,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;
@@ -8672,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;
@@ -9652,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;
@@ -10086,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;
@@ -10334,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;
@@ -10467,6 +11423,7 @@ struct {
} count;
struct {
+ struct HCache_interface HCache;
struct atcommand_interface atcommand;
struct battle_interface battle;
struct battleground_interface bg;
@@ -10475,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;
@@ -10484,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;
@@ -10500,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 720d76b6c..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) },
@@ -2246,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) },
@@ -2464,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) },
@@ -2590,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 a6724f0f7..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;
@@ -59310,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;
@@ -65284,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;
@@ -68632,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
index e44582db7..8ed108f82 100644
--- a/src/plugins/script_mapquit.c
+++ b/src/plugins/script_mapquit.c
@@ -18,7 +18,7 @@
/// mapquit() script command
-#include "common/HPMi.h"
+#include "common/hercules.h"
#include "map/map.h"
#include "map/script.h"
@@ -39,8 +39,6 @@ BUILDIN(mapquit) {
return true;
}
HPExport void server_preinit(void) {
- map = GET_SYMBOL("map");
- script = GET_SYMBOL("script");
}
HPExport void plugin_init(void) {
addScriptCommand("mapquit", "?", mapquit);