From: Ben Pfaff Date: Mon, 8 Feb 2010 17:43:00 +0000 (-0800) Subject: output: Phrase output driver error messages more consistently. X-Git-Tag: v0.7.4~14 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dde5a3c946871b4aab3d6b436438dd8df11db261;p=pspp-builds.git output: Phrase output driver error messages more consistently. This should aid translation. --- diff --git a/src/output/cairo.c b/src/output/cairo.c index 4e8b1d38..6eb39b27 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; @@ -1119,7 +1119,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); diff --git a/src/output/csv.c b/src/output/csv.c index 004558f1..ceca34dd 100644 --- a/src/output/csv.c +++ b/src/output/csv.c @@ -84,7 +84,7 @@ csv_create (const char *file_name, enum settings_output_devices device_type, if (csv->file == NULL) { - error (0, errno, _("csv: opening output file \"%s\""), csv->file_name); + error (0, errno, _("error opening output file \"%s\""), csv->file_name); output_driver_destroy (d); return NULL; } diff --git a/src/output/html.c b/src/output/html.c index 636450a9..4a436cf5 100644 --- a/src/output/html.c +++ b/src/output/html.c @@ -103,7 +103,7 @@ html_create (const char *file_name, enum settings_output_devices device_type, html->file = fn_open (html->file_name, "w"); if (html->file == NULL) { - error (0, errno, _("opening HTML output file: %s"), html->file_name); + error (0, errno, _("error opening output file \"%s\""), html->file_name); goto error; } diff --git a/src/output/journal.c b/src/output/journal.c index 6b733277..1a700898 100644 --- a/src/output/journal.c +++ b/src/output/journal.c @@ -64,7 +64,8 @@ journal_close (void) if (journal != NULL && journal->file != NULL) { if (fwriteerror (journal->file)) - error (0, errno, _("error writing \"%s\""), journal_file_name); + error (0, errno, _("error writing output file \"%s\""), + journal_file_name); journal->file = NULL; } } @@ -89,7 +90,8 @@ journal_output (struct journal_driver *j, const char *s) j->file = fopen (journal_file_name, "a"); if (j->file == NULL) { - error (0, errno, _("%s: open failed"), journal_file_name); + error (0, errno, _("error opening output file \"%s\""), + journal_file_name); output_driver_destroy (&j->driver); return; } diff --git a/src/output/measure.c b/src/output/measure.c index 8f6e666f..2064f45b 100644 --- a/src/output/measure.c +++ b/src/output/measure.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 1997-9, 2000, 2007, 2009 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2007, 2009, 2010 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -245,7 +245,7 @@ read_paper_conf (const char *file_name, int *h, int *v) file = fopen (file_name, "r"); if (file == NULL) { - error (0, errno, _("error opening \"%s\""), file_name); + error (0, errno, _("error opening input file \"%s\""), file_name); return false; } @@ -256,7 +256,7 @@ read_paper_conf (const char *file_name, int *h, int *v) if (!ds_read_config_line (&line, &line_number, file)) { if (ferror (file)) - error (0, errno, _("error reading \"%s\""), file_name); + error (0, errno, _("error reading file \"%s\""), file_name); break; } diff --git a/src/output/msglog.c b/src/output/msglog.c index d5c68069..70c237c3 100644 --- a/src/output/msglog.c +++ b/src/output/msglog.c @@ -63,7 +63,7 @@ msglog_create (const char *file_name) file = fn_open (file_name, "w"); if (file == NULL) { - error (0, errno, _("%s: open failed"), file_name); + error (0, errno, _("error opening output file \"%s\""), file_name); return NULL; } diff --git a/src/output/odt.c b/src/output/odt.c index 0b55ac9a..bfc698e7 100644 --- a/src/output/odt.c +++ b/src/output/odt.c @@ -91,7 +91,7 @@ create_mimetype (const char *dirname) if (fp == NULL) { - error (0, errno, _("failed to create output file %s"), + error (0, errno, _("error opening output file \"%s\""), ds_cstr (&filename)); ds_destroy (&filename); return false;