diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 17:29:51 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 17:29:51 +0200 |
commit | f783c31203be2dbd7a28c89557014f97a367bec9 (patch) | |
tree | 8faea8d21fa44b99226af34a13f33c6a0e1f7182 /xps | |
parent | aa7668835afffd5a2a496a60ed6edb672f5af1a7 (diff) | |
download | mupdf-f783c31203be2dbd7a28c89557014f97a367bec9.tar.xz |
Add warning context.
Diffstat (limited to 'xps')
-rw-r--r-- | xps/xps_common.c | 6 | ||||
-rw-r--r-- | xps/xps_glyphs.c | 14 | ||||
-rw-r--r-- | xps/xps_gradient.c | 10 | ||||
-rw-r--r-- | xps/xps_image.c | 2 | ||||
-rw-r--r-- | xps/xps_path.c | 8 | ||||
-rw-r--r-- | xps/xps_tiff.c | 2 |
6 files changed, 21 insertions, 21 deletions
diff --git a/xps/xps_common.c b/xps/xps_common.c index 894a4941..5fb1db31 100644 --- a/xps/xps_common.c +++ b/xps/xps_common.c @@ -22,7 +22,7 @@ xps_parse_brush(xps_context *ctx, fz_matrix ctm, fz_rect area, char *base_uri, x else if (!strcmp(xml_tag(node), "RadialGradientBrush")) xps_parse_radial_gradient_brush(ctx, ctm, area, base_uri, dict, node); else - fz_warn("unknown brush tag: %s", xml_tag(node)); + fz_warn(ctx->ctx, "unknown brush tag: %s", xml_tag(node)); } void @@ -230,7 +230,7 @@ xps_parse_color(xps_context *ctx, char *base_uri, char *string, profile = strchr(buf, ' '); if (!profile) { - fz_warn("cannot find icc profile uri in '%s'", string); + fz_warn(ctx->ctx, "cannot find icc profile uri in '%s'", string); return; } @@ -238,7 +238,7 @@ xps_parse_color(xps_context *ctx, char *base_uri, char *string, p = strchr(profile, ' '); if (!p) { - fz_warn("cannot find component values in '%s'", profile); + fz_warn(ctx->ctx, "cannot find component values in '%s'", profile); return; } diff --git a/xps/xps_glyphs.c b/xps/xps_glyphs.c index d5b3ea23..9dfd165e 100644 --- a/xps/xps_glyphs.c +++ b/xps/xps_glyphs.c @@ -113,7 +113,7 @@ xps_deobfuscate_font_resource(xps_context *ctx, xps_part *part) if (i != 32) { - fz_warn("cannot extract GUID from obfuscated font part name"); + fz_warn(ctx->ctx, "cannot extract GUID from obfuscated font part name"); return; } @@ -128,7 +128,7 @@ xps_deobfuscate_font_resource(xps_context *ctx, xps_part *part) } static void -xps_select_best_font_encoding(fz_font *font) +xps_select_best_font_encoding(xps_context *ctx, fz_font *font) { static struct { int pid, eid; } xps_cmap_list[] = { @@ -160,7 +160,7 @@ xps_select_best_font_encoding(fz_font *font) } } - fz_warn("cannot find a suitable cmap"); + fz_warn(ctx->ctx, "cannot find a suitable cmap"); } /* @@ -267,7 +267,7 @@ xps_parse_glyphs_imp(xps_context *ctx, fz_matrix ctm, int un = 0; if (!unicode && !indices) - fz_warn("glyphs element with neither characters nor indices"); + fz_warn(ctx->ctx, "glyphs element with neither characters nor indices"); if (us) { @@ -456,7 +456,7 @@ xps_parse_glyphs(xps_context *ctx, fz_matrix ctm, */ if (!font_size_att || !font_uri_att || !origin_x_att || !origin_y_att) { - fz_warn("missing attributes in glyphs element"); + fz_warn(ctx->ctx, "missing attributes in glyphs element"); return; } @@ -486,7 +486,7 @@ xps_parse_glyphs(xps_context *ctx, fz_matrix ctm, { part = xps_read_part(ctx, partname); if (!part) { - fz_warn("cannot find font resource part '%s'", partname); + fz_warn(ctx->ctx, "cannot find font resource part '%s'", partname); return; } @@ -503,7 +503,7 @@ xps_parse_glyphs(xps_context *ctx, fz_matrix ctm, return; } - xps_select_best_font_encoding(font); + xps_select_best_font_encoding(ctx, font); xps_insert_font(ctx, part->name, font); diff --git a/xps/xps_gradient.c b/xps/xps_gradient.c index 4dcf1ef8..19424f9b 100644 --- a/xps/xps_gradient.c +++ b/xps/xps_gradient.c @@ -61,7 +61,7 @@ xps_parse_gradient_stops(xps_context *ctx, char *base_uri, xml_element *node, xps_parse_color(ctx, base_uri, color, &colorspace, sample); - fz_convert_color(colorspace, sample + 1, fz_device_rgb, rgb); + fz_convert_color(ctx->ctx, colorspace, sample + 1, fz_device_rgb, rgb); stops[count].r = rgb[0]; stops[count].g = rgb[1]; @@ -76,7 +76,7 @@ xps_parse_gradient_stops(xps_context *ctx, char *base_uri, xml_element *node, if (count == 0) { - fz_warn("gradient brush has no gradient stops"); + fz_warn(ctx->ctx, "gradient brush has no gradient stops"); stops[0].offset = 0; stops[0].r = 0; stops[0].g = 0; @@ -91,7 +91,7 @@ xps_parse_gradient_stops(xps_context *ctx, char *base_uri, xml_element *node, } if (count == maxcount) - fz_warn("gradient brush exceeded maximum number of gradient stops"); + fz_warn(ctx->ctx, "gradient brush exceeded maximum number of gradient stops"); /* Postprocess to make sure the range of offsets is 0.0 to 1.0 */ @@ -425,14 +425,14 @@ xps_parse_gradient_brush(xps_context *ctx, fz_matrix ctm, fz_rect area, ctm = fz_concat(transform, ctm); if (!stop_tag) { - fz_warn("missing gradient stops tag"); + fz_warn(ctx->ctx, "missing gradient stops tag"); return; } stop_count = xps_parse_gradient_stops(ctx, base_uri, stop_tag, stop_list, MAX_STOPS); if (stop_count == 0) { - fz_warn("no gradient stops found"); + fz_warn(ctx->ctx, "no gradient stops found"); return; } diff --git a/xps/xps_image.c b/xps/xps_image.c index e3570ffb..28cadecf 100644 --- a/xps/xps_image.c +++ b/xps/xps_image.c @@ -110,7 +110,7 @@ xps_parse_image_brush(xps_context *ctx, fz_matrix ctm, fz_rect area, part = xps_find_image_brush_source_part(ctx, base_uri, root); if (!part) { - fz_warn("cannot find image source"); + fz_warn(ctx, "cannot find image source"); return; } diff --git a/xps/xps_path.c b/xps/xps_path.c index 28548c56..fcc6f571 100644 --- a/xps/xps_path.c +++ b/xps/xps_path.c @@ -468,7 +468,7 @@ xps_parse_arc_segment(fz_context *ctx, fz_path *path, xml_element *root, int str if (!point_att || !size_att || !rotation_angle_att || !is_large_arc_att || !sweep_direction_att) { - fz_warn("ArcSegment element is missing attributes"); + fz_warn(ctx, "ArcSegment element is missing attributes"); return; } @@ -506,7 +506,7 @@ xps_parse_poly_quadratic_bezier_segment(fz_context *ctx, fz_path *path, xml_elem if (!points_att) { - fz_warn("PolyQuadraticBezierSegment element has no points"); + fz_warn(ctx, "PolyQuadraticBezierSegment element has no points"); return; } @@ -555,7 +555,7 @@ xps_parse_poly_bezier_segment(fz_context *ctx, fz_path *path, xml_element *root, if (!points_att) { - fz_warn("PolyBezierSegment element has no points"); + fz_warn(ctx, "PolyBezierSegment element has no points"); return; } @@ -595,7 +595,7 @@ xps_parse_poly_line_segment(fz_context *ctx, fz_path *path, xml_element *root, i if (!points_att) { - fz_warn("PolyLineSegment element has no points"); + fz_warn(ctx, "PolyLineSegment element has no points"); return; } diff --git a/xps/xps_tiff.c b/xps/xps_tiff.c index a777fdaa..f970f153 100644 --- a/xps/xps_tiff.c +++ b/xps/xps_tiff.c @@ -683,7 +683,7 @@ xps_read_tiff_tag(struct tiff *tiff, unsigned offset) break; case JPEGTables: - fz_warn("jpeg tables in tiff not implemented"); + fz_warn(tiff->ctx, "jpeg tables in tiff not implemented"); tiff->jpegtables = tiff->bp + value; tiff->jpegtableslen = count; break; |