aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/world.c b/src/world.c
index 52ef1bce..01a86dc5 100644
--- a/src/world.c
+++ b/src/world.c
@@ -51,22 +51,22 @@ serd_world_fopen(SerdWorld* world, const char* path, const char* mode)
}
SerdStatus
-serd_world_error(const SerdWorld* world, const SerdError* e)
+serd_world_error(const SerdWorld* world, const SerdMessage* msg)
{
- if (world->error_sink) {
- world->error_sink(world->error_handle, e);
+ if (world->msg_sink) {
+ world->msg_sink(world->msg_handle, msg);
} else {
fprintf(stderr, "error: ");
- if (e->cursor) {
+ if (msg->cursor) {
fprintf(stderr,
"%s:%u:%u: ",
- serd_node_get_string(e->cursor->file),
- e->cursor->line,
- e->cursor->col);
+ serd_node_get_string(msg->cursor->file),
+ msg->cursor->line,
+ msg->cursor->col);
}
- vfprintf(stderr, e->fmt, *e->args);
+ vfprintf(stderr, msg->fmt, *msg->args);
}
- return e->status;
+ return msg->status;
}
SerdStatus
@@ -74,8 +74,8 @@ serd_world_errorf(const SerdWorld* world, SerdStatus st, const char* fmt, ...)
{
va_list args;
va_start(args, fmt);
- const SerdError e = { st, NULL, fmt, &args };
- serd_world_error(world, &e);
+ const SerdMessage msg = { st, NULL, fmt, &args };
+ serd_world_error(world, &msg);
va_end(args);
return st;
}
@@ -119,10 +119,10 @@ serd_world_get_blank(SerdWorld* world)
}
void
-serd_world_set_error_sink(SerdWorld* world,
- SerdErrorSink error_sink,
- void* handle)
+serd_world_set_message_sink(SerdWorld* world,
+ SerdMessageSink msg_sink,
+ void* handle)
{
- world->error_sink = error_sink;
- world->error_handle = handle;
+ world->msg_sink = msg_sink;
+ world->msg_handle = handle;
}