summaryrefslogtreecommitdiff
path: root/render/textplain.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/textplain.c')
-rw-r--r--render/textplain.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/render/textplain.c b/render/textplain.c
index 5d28d9c54..0036eb5c0 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -150,7 +150,6 @@ textplain_create_internal(textplain_content *c, lwc_string *encoding)
char *utf8_data;
parserutils_inputstream *stream;
parserutils_error error;
- union content_msg_data msg_data;
textplain_style.size = (nsoption_int(font_size) * FONT_SIZE_SCALE) / 10;
@@ -185,8 +184,7 @@ textplain_create_internal(textplain_content *c, lwc_string *encoding)
return NSERROR_OK;
no_memory:
- msg_data.error = messages_get("NoMemory");
- content_broadcast(&c->base, CONTENT_MSG_ERROR, msg_data);
+ content_broadcast_errorcode(&c->base, NSERROR_NOMEM);
return NSERROR_NOMEM;
}
@@ -347,7 +345,6 @@ textplain_process_data(struct content *c, const char *data, unsigned int size)
{
textplain_content *text = (textplain_content *) c;
parserutils_inputstream *stream = text->inputstream;
- union content_msg_data msg_data;
parserutils_error error;
error = parserutils_inputstream_append(stream,
@@ -362,8 +359,7 @@ textplain_process_data(struct content *c, const char *data, unsigned int size)
return true;
no_memory:
- msg_data.error = messages_get("NoMemory");
- content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
+ content_broadcast_errorcode(c, NSERROR_NOMEM);
return false;
}
@@ -427,7 +423,7 @@ static void textplain_reformat(struct content *c, int width, int height)
size_t line_start;
nserror res;
- LOG("content %p w:%d h:%d", c, width, height);
+ NSLOG(netsurf, INFO, "content %p w:%d h:%d", c, width, height);
/* compute available columns (assuming monospaced font) - use 8
* characters for better accuracy
@@ -526,7 +522,7 @@ static void textplain_reformat(struct content *c, int width, int height)
return;
no_memory:
- LOG("out of memory (line_count %lu)", line_count);
+ NSLOG(netsurf, INFO, "out of memory (line_count %lu)", line_count);
return;
}
@@ -647,10 +643,10 @@ textplain_mouse_action(struct content *c,
}
msg_data.explicit_status_text = status;
- content_broadcast(c, CONTENT_MSG_STATUS, msg_data);
+ content_broadcast(c, CONTENT_MSG_STATUS, &msg_data);
msg_data.pointer = pointer;
- content_broadcast(c, CONTENT_MSG_POINTER, msg_data);
+ content_broadcast(c, CONTENT_MSG_POINTER, &msg_data);
}
@@ -992,7 +988,7 @@ textplain_open(struct content *c,
text->bw = bw;
/* text selection */
- selection_init(&text->sel, NULL);
+ selection_init(&text->sel, NULL, NULL);
}