Use the msg function to report errors wherever possible.
[pspp] / src / output / csv.c
index c8619a9a7d403ebc84ebc55d9c307976a49b734b..9b51ed79d34de5e959876367bb0ca5bae59d3217 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010, 2012 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
@@ -31,7 +31,6 @@
 #include "output/table-item.h"
 #include "output/table-provider.h"
 
-#include "gl/error.h"
 #include "gl/xalloc.h"
 #include "gl/xvasprintf.h"
 
@@ -94,7 +93,7 @@ csv_create (const char *file_name, enum settings_output_devices device_type,
 
   if (csv->file == NULL)
     {
-      error (0, errno, _("error opening output file `%s'"), csv->file_name);
+      msg_error (errno, _("error opening output file `%s'"), csv->file_name);
       output_driver_destroy (d);
       return NULL;
     }
@@ -255,7 +254,7 @@ csv_submit (struct output_driver *driver,
     }
 }
 
-struct output_driver_factory csv_driver_factory = { "csv", csv_create };
+struct output_driver_factory csv_driver_factory = { "csv", "-", csv_create };
 
 static const struct output_driver_class csv_driver_class =
   {