refactoring
[pspp] / src / output / measure.c
index 358958550199c43f148ba638f9afcf2e56eab03a..65d9fdddf28934e1e0172027d7b3a46ca14d424b 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2011, 2012, 2014, 2016 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
@@ -18,6 +18,7 @@
 
 #include "output/measure.h"
 
+#include <unistd.h>
 #include <gl/c-strtod.h>
 #include <ctype.h>
 #include <errno.h>
@@ -27,7 +28,6 @@
 #include <stdint.h>
 #include <stdlib.h>
 
-#include "data/file-name.h"
 #include "libpspp/str.h"
 
 #include "gl/c-strcase.h"
@@ -276,8 +276,7 @@ read_paper_conf (const char *file_name, int *h, int *v)
 
   fclose (file);
   ds_destroy (&line);
-  msg (ME, _("paper size file `%s' does not state a paper size"),
-         file_name);
+  msg (ME, _("file `%s' does not state a paper size"), file_name);
   return false;
 }
 
@@ -308,7 +307,7 @@ get_default_paper_size (int *h, int *v)
 #endif
 
   /* libpaper defaults to /etc/papersize. */
-  if (fn_exists ("/etc/papersize"))
+  if (0 == access ("/etc/papersize", R_OK))
     return read_paper_conf ("/etc/papersize", h, v);
 
   /* Can't find a default. */