X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fmessage.c;h=24bb8e874ba10d77dd29cf76e168af795cfaee8a;hb=2d4dd90964061defa92972156ae2a12323708519;hp=1a4601fc18981b55bf3ed9f1422b1478d872e8ac;hpb=2997cc6481d0744e910eccb6f23d56efe93d32d3;p=pspp-builds.git diff --git a/src/libpspp/message.c b/src/libpspp/message.c index 1a4601fc..24bb8e87 100644 --- a/src/libpspp/message.c +++ b/src/libpspp/message.c @@ -19,7 +19,8 @@ #include -#include +#include "message.h" +#include "msg-locator.h" #include #include @@ -39,8 +40,6 @@ static char *command_name; /* Message handler as set by msg_init(). */ static void (*msg_handler) (const struct msg *); -static void (*msg_location) (struct msg_locator *); - /* Disables emitting messages if positive. */ static int messages_disabled; @@ -65,11 +64,9 @@ msg (enum msg_class class, const char *format, ...) } void -msg_init ( void (*handler) (const struct msg *), - void (*location) (struct msg_locator *) ) +msg_init ( void (*handler) (const struct msg *) ) { msg_handler = handler; - msg_location = location; } void @@ -102,7 +99,7 @@ msg_destroy(struct msg *m) void msg_emit (struct msg *m) { - msg_location (&m->where); + get_msg_location (&m->where); if (!messages_disabled) msg_handler (m); free (m->text);