summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/html.c9
-rw-r--r--render/textplain.c22
2 files changed, 22 insertions, 9 deletions
diff --git a/render/html.c b/render/html.c
index 46d98b81d..db7c694cc 100644
--- a/render/html.c
+++ b/render/html.c
@@ -136,7 +136,6 @@ bool html_create(struct content *c, const char *params[])
no_memory:
msg_data.error = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- warn_user("NoMemory", 0);
return false;
}
@@ -1358,7 +1357,13 @@ void html_object_failed(struct box *box, struct content *content,
* containers */
ic = box_create(0, 0, 0, 0, 0, content);
if (!ic) {
- warn_user("NoMemory", 0);
+ union content_msg_data msg_data;
+
+ msg_data.error =
+ messages_get("NoMemory");
+ content_broadcast(content,
+ CONTENT_MSG_ERROR,
+ msg_data);
return;
}
ic->type = BOX_INLINE_CONTAINER;
diff --git a/render/textplain.c b/render/textplain.c
index 8984ff851..cb9bc644f 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -76,9 +76,14 @@ bool textplain_create(struct content *c, const char *params[])
iconv_cd = iconv_open("utf-8", "iso-8859-1");
}
if (iconv_cd == (iconv_t)(-1)) {
- msg_data.error = strerror(errno);
+ char buf[300];
+
+ snprintf(buf, sizeof buf, "IconvFailed %s", strerror(errno));
+ buf[sizeof buf - 1] = 0;
+
+ msg_data.error = buf;
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- warn_user("IconvFailed", strerror(errno));
+
return false;
}
@@ -97,7 +102,6 @@ bool textplain_create(struct content *c, const char *params[])
no_memory:
msg_data.error = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- warn_user("NoMemory", 0);
return false;
}
@@ -137,9 +141,15 @@ bool textplain_process_data(struct content *c, char *data, unsigned int size)
c->data.textplain.utf8_data = utf8_data;
c->data.textplain.utf8_data_allocated = allocated;
} else if (count == (size_t)(-1) && errno != EINVAL) {
- msg_data.error = strerror(errno);
+ char buf[300];
+
+ snprintf(buf, sizeof buf, "IconvFailed %s",
+ strerror(errno));
+ buf[sizeof buf - 1] = 0;
+
+ msg_data.error = buf;
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- warn_user("IconvFailed", strerror(errno));
+
return false;
}
@@ -152,7 +162,6 @@ bool textplain_process_data(struct content *c, char *data, unsigned int size)
no_memory:
msg_data.error = messages_get("NoMemory");
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
- warn_user("NoMemory", 0);
return false;
}
@@ -266,7 +275,6 @@ void textplain_reformat(struct content *c, int width, int height)
no_memory:
LOG(("out of memory (line_count %lu)", line_count));
- warn_user("NoMemory", 0);
return;
}