diff options
author | Hercules.ws <dev@herc.ws> | 2020-04-05 19:38:09 +0200 |
---|---|---|
committer | HerculesWSAPI <dev@herc.ws> | 2020-04-05 19:38:09 +0200 |
commit | e827fed09af22b18ffa54ca5dc9991eff464f7ab (patch) | |
tree | a9b6a3ceeacd9523b015753067cf7b01b0e54116 /src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | |
parent | 0c7baa39ae58eaf7f823f04a57247e1cc7ab604f (diff) | |
download | hercules-e827fed09af22b18ffa54ca5dc9991eff464f7ab.tar.gz hercules-e827fed09af22b18ffa54ca5dc9991eff464f7ab.tar.bz2 hercules-e827fed09af22b18ffa54ca5dc9991eff464f7ab.tar.xz hercules-e827fed09af22b18ffa54ca5dc9991eff464f7ab.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <dev@herc.ws>
Diffstat (limited to 'src/plugins/HPMHooking/HPMHooking_char.Hooks.inc')
-rw-r--r-- | src/plugins/HPMHooking/HPMHooking_char.Hooks.inc | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index a022abb54..8c1dec681 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -17160,6 +17160,58 @@ void HP_mutex_cond_broadcast(struct cond_data *c) { return; } /* nullpo_interface */ +void HP_nullpo_init(void) { + int hIndex = 0; + if (HPMHooks.count.HP_nullpo_init_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_init_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_nullpo_init_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.nullpo.init(); + } + if (HPMHooks.count.HP_nullpo_init_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_init_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_nullpo_init_post[hIndex].func; + postHookFunc(); + } + } + return; +} +void HP_nullpo_final(void) { + int hIndex = 0; + if (HPMHooks.count.HP_nullpo_final_pre > 0) { + void (*preHookFunc) (void); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_final_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_nullpo_final_pre[hIndex].func; + preHookFunc(); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.nullpo.final(); + } + if (HPMHooks.count.HP_nullpo_final_post > 0) { + void (*postHookFunc) (void); + for (hIndex = 0; hIndex < HPMHooks.count.HP_nullpo_final_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_nullpo_final_post[hIndex].func; + postHookFunc(); + } + } + return; +} 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 > 0) { |