From 1f4d2c86b3d9ef894d77f7f47e0c2337fb17738b Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 18 Jun 2015 02:29:43 +0200 Subject: Added showmsg HPM interface - The showmsg interface is automatically imported into plugins by the HPM (just like previously, the various Show* functions were). This change requires no actions from plugin developers. - stdout_with_ansisequence is now available through showmsg->stdout_with_ansisequence - msg_silent is now available through showmsg->silent - console_msg_log is now available through showmsg->console_log - timestamp_format is now available through showmsg->timestamp_format - Plugin-safe macros are provided, so that all Show* and Clear* calls will require no changes. - vShowMessage is provided through the public API, as va_list variant of ShowMessage. - vShowMessage_ is no longer part of the public API. If necessary, va_list variants of the other Show* functions will be added at a later time as follow-ups. Signed-off-by: Haru --- src/common/HPM.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/common/HPM.c') diff --git a/src/common/HPM.c b/src/common/HPM.c index cdd9bb769..caf0f9471 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -100,15 +100,7 @@ bool hplugin_populate(struct hplugin *plugin, const char *filename) { 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), + HPM_POP(showmsg), }; int i, length = ARRAYLENGTH(ToLink); @@ -778,6 +770,8 @@ void hplugins_share_defaults(void) { HPM->share(DB, "DB"); HPM->share(HPMiMalloc, "iMalloc"); HPM->share(nullpo,"nullpo"); + /* showmsg */ + HPM->share(showmsg,"showmsg"); /* socket */ HPM->share(sockt,"sockt"); /* strlib */ -- cgit v1.2.3-70-g09d2