diff options
Diffstat (limited to 'desktop/textarea.c')
-rw-r--r-- | desktop/textarea.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c index 65ee8b82f..1cbb767f6 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -828,7 +828,7 @@ static bool textarea_reflow_singleline(struct textarea *ta, size_t b_off, ta->lines = malloc(LINE_CHUNK_SIZE * sizeof(struct line_info)); if (ta->lines == NULL) { - LOG("malloc failed"); + NSLOG(netsurf, INFO, "malloc failed"); return false; } ta->lines_alloc_size = LINE_CHUNK_SIZE; @@ -852,7 +852,7 @@ static bool textarea_reflow_singleline(struct textarea *ta, size_t b_off, char *temp = realloc(ta->password.data, b_len + TA_ALLOC_STEP); if (temp == NULL) { - LOG("realloc failed"); + NSLOG(netsurf, INFO, "realloc failed"); return false; } @@ -936,7 +936,8 @@ static bool textarea_reflow_multiline(struct textarea *ta, if (ta->lines == NULL) { ta->lines = calloc(sizeof(struct line_info), LINE_CHUNK_SIZE); if (ta->lines == NULL) { - LOG("Failed to allocate memory for textarea lines"); + NSLOG(netsurf, INFO, + "Failed to allocate memory for textarea lines"); return false; } ta->lines_alloc_size = LINE_CHUNK_SIZE; @@ -1053,7 +1054,7 @@ static bool textarea_reflow_multiline(struct textarea *ta, (line + 2 + LINE_CHUNK_SIZE) * sizeof(struct line_info)); if (temp == NULL) { - LOG("realloc failed"); + NSLOG(netsurf, INFO, "realloc failed"); return false; } @@ -1334,7 +1335,7 @@ static bool textarea_insert_text(struct textarea *ta, const char *text, char *temp = realloc(ta->text.data, b_len + ta->text.len + TA_ALLOC_STEP); if (temp == NULL) { - LOG("realloc failed"); + NSLOG(netsurf, INFO, "realloc failed"); return false; } @@ -1484,7 +1485,7 @@ static bool textarea_replace_text_internal(struct textarea *ta, size_t b_start, rep_len + ta->text.len - (b_end - b_start) + TA_ALLOC_STEP); if (temp == NULL) { - LOG("realloc failed"); + NSLOG(netsurf, INFO, "realloc failed"); return false; } @@ -1561,7 +1562,7 @@ static bool textarea_copy_to_undo_buffer(struct textarea *ta, char *temp = realloc(undo->text.data, b_offset + len + TA_ALLOC_STEP); if (temp == NULL) { - LOG("realloc failed"); + NSLOG(netsurf, INFO, "realloc failed"); return false; } @@ -1575,7 +1576,7 @@ static bool textarea_copy_to_undo_buffer(struct textarea *ta, (undo->next_detail + 128) * sizeof(struct textarea_undo_detail)); if (temp == NULL) { - LOG("realloc failed"); + NSLOG(netsurf, INFO, "realloc failed"); return false; } @@ -1835,13 +1836,13 @@ struct textarea *textarea_create(const textarea_flags flags, flags & TEXTAREA_PASSWORD)); if (callback == NULL) { - LOG("no callback provided"); + NSLOG(netsurf, INFO, "no callback provided"); return NULL; } ret = malloc(sizeof(struct textarea)); if (ret == NULL) { - LOG("malloc failed"); + NSLOG(netsurf, INFO, "malloc failed"); return NULL; } @@ -1888,7 +1889,7 @@ struct textarea *textarea_create(const textarea_flags flags, ret->text.data = malloc(TA_ALLOC_STEP); if (ret->text.data == NULL) { - LOG("malloc failed"); + NSLOG(netsurf, INFO, "malloc failed"); free(ret); return NULL; } @@ -1900,7 +1901,7 @@ struct textarea *textarea_create(const textarea_flags flags, if (flags & TEXTAREA_PASSWORD) { ret->password.data = malloc(TA_ALLOC_STEP); if (ret->password.data == NULL) { - LOG("malloc failed"); + NSLOG(netsurf, INFO, "malloc failed"); free(ret->text.data); free(ret); return NULL; @@ -1975,7 +1976,7 @@ bool textarea_set_text(struct textarea *ta, const char *text) if (len >= ta->text.alloc) { char *temp = realloc(ta->text.data, len + TA_ALLOC_STEP); if (temp == NULL) { - LOG("realloc failed"); + NSLOG(netsurf, INFO, "realloc failed"); return false; } ta->text.data = temp; @@ -2062,7 +2063,7 @@ int textarea_get_text(struct textarea *ta, char *buf, unsigned int len) } if (len < ta->text.len) { - LOG("buffer too small"); + NSLOG(netsurf, INFO, "buffer too small"); return -1; } |