X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Fcairo.c;h=977a414420fa207cc8f4bd383bc44cad9bb75fa2;hb=319711ff80e76a730ec26c86d67c0107143d8747;hp=4e8b1d38bcdc71b896233454076042cee3d553ba;hpb=ddb7b52128d8f1f54d9632dc3a15c7869e0fbcce;p=pspp diff --git a/src/output/cairo.c b/src/output/cairo.c index 4e8b1d38bc..977a414420 100644 --- a/src/output/cairo.c +++ b/src/output/cairo.c @@ -280,7 +280,7 @@ xr_create (const char *file_name, enum settings_output_devices device_type, status = cairo_surface_status (surface); if (status != CAIRO_STATUS_SUCCESS) { - error (0, 0, _("opening output file \"%s\": %s"), + error (0, 0, _("error opening output file \"%s\": %s"), file_name, cairo_status_to_string (status)); cairo_surface_destroy (surface); goto error; @@ -959,15 +959,9 @@ struct xr_rendering #define CHART_HEIGHT 375 struct xr_driver * -xr_create_driver (cairo_t *cairo) +xr_create_driver (cairo_t *cairo, struct string_map *options) { - struct xr_driver *xr; - struct string_map map; - - string_map_init (&map); - xr = xr_allocate ("cairo", 0, &map); - string_map_destroy (&map); - + struct xr_driver *xr = xr_allocate ("cairo", 0, options); xr->width = INT_MAX / 8; xr->length = INT_MAX / 8; if (!xr_set_cairo (xr, cairo)) @@ -1119,7 +1113,7 @@ xr_draw_png_chart (const struct chart_item *item, status = cairo_surface_write_to_png (surface, file_name); if (status != CAIRO_STATUS_SUCCESS) - error (0, 0, _("writing output file \"%s\": %s"), + error (0, 0, _("error writing output file \"%s\": %s"), file_name, cairo_status_to_string (status)); cairo_destroy (cr);