diff options
Diffstat (limited to 'content/handlers/image')
-rw-r--r-- | content/handlers/image/bmp.c | 6 | ||||
-rw-r--r-- | content/handlers/image/gif.c | 6 | ||||
-rw-r--r-- | content/handlers/image/ico.c | 6 | ||||
-rw-r--r-- | content/handlers/image/png.c | 8 | ||||
-rw-r--r-- | content/handlers/image/rsvg.c | 12 | ||||
-rw-r--r-- | content/handlers/image/svg.c | 2 |
6 files changed, 20 insertions, 20 deletions
diff --git a/content/handlers/image/bmp.c b/content/handlers/image/bmp.c index 75d8880f3..448728ede 100644 --- a/content/handlers/image/bmp.c +++ b/content/handlers/image/bmp.c @@ -78,7 +78,7 @@ static nserror nsbmp_create_bmp_data(nsbmp_content *bmp) bmp->bmp = calloc(sizeof(struct bmp_image), 1); if (bmp->bmp == NULL) { - content_broadcast_errorcode(&bmp->base, NSERROR_NOMEM); + content_broadcast_error(&bmp->base, NSERROR_NOMEM, NULL); return NSERROR_NOMEM; } @@ -135,11 +135,11 @@ static bool nsbmp_convert(struct content *c) case BMP_OK: break; case BMP_INSUFFICIENT_MEMORY: - content_broadcast_errorcode(c, NSERROR_NOMEM); + content_broadcast_error(c, NSERROR_NOMEM, NULL); return false; case BMP_INSUFFICIENT_DATA: case BMP_DATA_ERROR: - content_broadcast_errorcode(c, NSERROR_BMP_ERROR); + content_broadcast_error(c, NSERROR_BMP_ERROR, NULL); return false; } diff --git a/content/handlers/image/gif.c b/content/handlers/image/gif.c index ee85a6309..94f8d3f62 100644 --- a/content/handlers/image/gif.c +++ b/content/handlers/image/gif.c @@ -84,7 +84,7 @@ static nserror nsgif_create_gif_data(nsgif_content *c) /* Initialise our data structure */ c->gif = calloc(sizeof(gif_animation), 1); if (c->gif == NULL) { - content_broadcast_errorcode(&c->base, NSERROR_NOMEM); + content_broadcast_error(&c->base, NSERROR_NOMEM, NULL); return NSERROR_NOMEM; } gif_create(c->gif, &gif_bitmap_callbacks); @@ -259,7 +259,7 @@ static bool nsgif_convert(struct content *c) error = NSERROR_NOMEM; break; } - content_broadcast_errorcode(c, error); + content_broadcast_error(c, error, NULL); return false; } } while (res != GIF_OK && res != GIF_INSUFFICIENT_FRAME_DATA); @@ -267,7 +267,7 @@ static bool nsgif_convert(struct content *c) /* Abort on bad GIFs */ if ((gif->gif->frame_count_partial == 0) || (gif->gif->width == 0) || (gif->gif->height == 0)) { - content_broadcast_errorcode(c, NSERROR_GIF_ERROR); + content_broadcast_error(c, NSERROR_GIF_ERROR, NULL); return false; } diff --git a/content/handlers/image/ico.c b/content/handlers/image/ico.c index 467533376..1f320636b 100644 --- a/content/handlers/image/ico.c +++ b/content/handlers/image/ico.c @@ -75,7 +75,7 @@ static nserror nsico_create_ico_data(nsico_content *c) c->ico = calloc(sizeof(ico_collection), 1); if (c->ico == NULL) { - content_broadcast_errorcode(&c->base, NSERROR_NOMEM); + content_broadcast_error(&c->base, NSERROR_NOMEM, NULL); return NSERROR_NOMEM; } ico_collection_create(c->ico, &bmp_bitmap_callbacks); @@ -134,11 +134,11 @@ static bool nsico_convert(struct content *c) case BMP_OK: break; case BMP_INSUFFICIENT_MEMORY: - content_broadcast_errorcode(c, NSERROR_NOMEM); + content_broadcast_error(c, NSERROR_NOMEM, NULL); return false; case BMP_INSUFFICIENT_DATA: case BMP_DATA_ERROR: - content_broadcast_errorcode(c, NSERROR_ICO_ERROR); + content_broadcast_error(c, NSERROR_ICO_ERROR, NULL); return false; } diff --git a/content/handlers/image/png.c b/content/handlers/image/png.c index 841d5de52..cf8e780d6 100644 --- a/content/handlers/image/png.c +++ b/content/handlers/image/png.c @@ -242,7 +242,7 @@ static nserror nspng_create_png_data(nspng_content *png_c) png_c->png = png_create_read_struct(PNG_LIBPNG_VER_STRING, 0, 0, 0); if (png_c->png == NULL) { - content_broadcast_errorcode(&png_c->base, NSERROR_NOMEM); + content_broadcast_error(&png_c->base, NSERROR_NOMEM, NULL); return NSERROR_NOMEM; } @@ -252,7 +252,7 @@ static nserror nspng_create_png_data(nspng_content *png_c) if (png_c->info == NULL) { png_destroy_read_struct(&png_c->png, &png_c->info, 0); - content_broadcast_errorcode(&png_c->base, NSERROR_NOMEM); + content_broadcast_error(&png_c->base, NSERROR_NOMEM, NULL); return NSERROR_NOMEM; } @@ -262,7 +262,7 @@ static nserror nspng_create_png_data(nspng_content *png_c) png_c->png = NULL; png_c->info = NULL; - content_broadcast_errorcode(&png_c->base, NSERROR_PNG_ERROR); + content_broadcast_error(&png_c->base, NSERROR_PNG_ERROR, NULL); return NSERROR_NOMEM; } @@ -355,7 +355,7 @@ static bool nspng_process_data(struct content *c, const char *data, png_c->png = NULL; png_c->info = NULL; - content_broadcast_errorcode(c, NSERROR_PNG_ERROR); + content_broadcast_error(c, NSERROR_PNG_ERROR, NULL); ret = false; diff --git a/content/handlers/image/rsvg.c b/content/handlers/image/rsvg.c index ee7373795..c7cb6257e 100644 --- a/content/handlers/image/rsvg.c +++ b/content/handlers/image/rsvg.c @@ -71,7 +71,7 @@ static nserror rsvg_create_svg_data(rsvg_content *c) if ((c->rsvgh = rsvg_handle_new()) == NULL) { NSLOG(netsurf, INFO, "rsvg_handle_new() returned NULL."); - content_broadcast_errorcode(&c->base, NSERROR_NOMEM); + content_broadcast_error(&c->base, NSERROR_NOMEM, NULL); return NSERROR_NOMEM; } @@ -120,7 +120,7 @@ static bool rsvg_process_data(struct content *c, const char *data, &err) == FALSE) { NSLOG(netsurf, INFO, "rsvg_handle_write returned an error: %s", err->message); - content_broadcast_errorcode(c, NSERROR_SVG_ERROR); + content_broadcast_error(c, NSERROR_SVG_ERROR, NULL); return false; } @@ -171,7 +171,7 @@ static bool rsvg_convert(struct content *c) if (rsvg_handle_close(d->rsvgh, &err) == FALSE) { NSLOG(netsurf, INFO, "rsvg_handle_close returned an error: %s", err->message); - content_broadcast_errorcode(c, NSERROR_SVG_ERROR); + content_broadcast_error(c, NSERROR_SVG_ERROR, NULL); return false; } @@ -189,7 +189,7 @@ static bool rsvg_convert(struct content *c) BITMAP_NEW)) == NULL) { NSLOG(netsurf, INFO, "Failed to create bitmap for rsvg render."); - content_broadcast_errorcode(c, NSERROR_NOMEM); + content_broadcast_error(c, NSERROR_NOMEM, NULL); return false; } @@ -200,14 +200,14 @@ static bool rsvg_convert(struct content *c) guit->bitmap->get_rowstride(d->bitmap))) == NULL) { NSLOG(netsurf, INFO, "Failed to create Cairo image surface for rsvg render."); - content_broadcast_errorcode(c, NSERROR_NOMEM); + content_broadcast_error(c, NSERROR_NOMEM, NULL); return false; } if ((d->ct = cairo_create(d->cs)) == NULL) { NSLOG(netsurf, INFO, "Failed to create Cairo drawing context for rsvg render."); - content_broadcast_errorcode(c, NSERROR_NOMEM); + content_broadcast_error(c, NSERROR_NOMEM, NULL); return false; } diff --git a/content/handlers/image/svg.c b/content/handlers/image/svg.c index 3f4e00c89..5124360e9 100644 --- a/content/handlers/image/svg.c +++ b/content/handlers/image/svg.c @@ -59,7 +59,7 @@ static nserror svg_create_svg_data(svg_content *c) return NSERROR_OK; no_memory: - content_broadcast_errorcode(&c->base, NSERROR_NOMEM); + content_broadcast_error(&c->base, NSERROR_NOMEM, NULL); return NSERROR_NOMEM; } |