diff options
author | Haru <haru@dotalux.com> | 2015-06-18 02:29:43 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-08-15 00:51:39 +0200 |
commit | 1f4d2c86b3d9ef894d77f7f47e0c2337fb17738b (patch) | |
tree | 08a9e7b2b4fee9b86cdf2f5ea19ead5e842ed79a /src/common/core.c | |
parent | 2ce7edfe772c319756a9e4feb46f33b201ccfae5 (diff) | |
download | hercules-1f4d2c86b3d9ef894d77f7f47e0c2337fb17738b.tar.gz hercules-1f4d2c86b3d9ef894d77f7f47e0c2337fb17738b.tar.bz2 hercules-1f4d2c86b3d9ef894d77f7f47e0c2337fb17738b.tar.xz hercules-1f4d2c86b3d9ef894d77f7f47e0c2337fb17738b.zip |
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 <haru@dotalux.com>
Diffstat (limited to 'src/common/core.c')
-rw-r--r-- | src/common/core.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/core.c b/src/common/core.c index e663c4e4c..e46c9589b 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -176,6 +176,7 @@ void core_defaults(void) { console_defaults(); strlib_defaults(); malloc_defaults(); + showmsg_defaults(); cmdline_defaults(); #ifndef MINICORE libconfig_defaults(); @@ -317,7 +318,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)) { @@ -393,6 +394,7 @@ int main (int argc, char **argv) { core_defaults(); iMalloc->init();// needed for Show* in display_title() [FlavioJS] + showmsg->init(); cmdline->init(); @@ -402,7 +404,7 @@ int main (int argc, char **argv) { sysinfo->init(); - if (!(msg_silent&0x1)) + if (!(showmsg->silent&0x1)) console->display_title(); usercheck(); @@ -458,6 +460,7 @@ int main (int argc, char **argv) { //sysinfo->final(); Called by iMalloc->final() iMalloc->final(); + showmsg->final(); // Should be after iMalloc->final() return retval; } |