X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fany-reader.c;h=50feb6892e936f4fbf9ea54d14f90707c11acf67;hb=a4b62f0df511939a5f9d7d19c12b98a71982516e;hp=731f552a9f9021bf05ffd524c5fbebad11946405;hpb=aca5e0c21bb5f2cc509ea1fb0ec5ba5be4faaf7d;p=pspp-builds.git diff --git a/src/data/any-reader.c b/src/data/any-reader.c index 731f552a..50feb689 100644 --- a/src/data/any-reader.c +++ b/src/data/any-reader.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2006, 2010 Free Software Foundation, Inc. + Copyright (C) 2006, 2010, 2011 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 @@ -15,21 +15,25 @@ along with this program. If not, see . */ #include -#include "any-reader.h" + +#include "data/any-reader.h" + #include #include #include #include #include -#include -#include -#include "file-handle-def.h" -#include "file-name.h" -#include "por-file-reader.h" -#include "sys-file-reader.h" -#include -#include "scratch-reader.h" -#include "xalloc.h" + +#include "data/dataset-reader.h" +#include "data/file-handle-def.h" +#include "data/file-name.h" +#include "data/por-file-reader.h" +#include "data/sys-file-reader.h" +#include "libpspp/assertion.h" +#include "libpspp/message.h" +#include "libpspp/str.h" + +#include "gl/xalloc.h" #include "gettext.h" #define _(msgid) gettext (msgid) @@ -53,7 +57,7 @@ try_detect (const char *file_name, bool (*detect) (FILE *)) file = fn_open (file_name, "rb"); if (file == NULL) { - msg (ME, _("An error occurred while opening \"%s\": %s."), + msg (ME, _("An error occurred while opening `%s': %s."), file_name, strerror (errno)); return IO_ERROR; } @@ -98,7 +102,7 @@ any_reader_open (struct file_handle *handle, struct dictionary **dict) else if (result == YES) return pfm_open_reader (handle, dict, NULL); - msg (SE, _("\"%s\" is not a system or portable file."), + msg (SE, _("`%s' is not a system or portable file."), fh_get_file_name (handle)); return NULL; } @@ -107,8 +111,8 @@ any_reader_open (struct file_handle *handle, struct dictionary **dict) msg (SE, _("The inline file is not allowed here.")); return NULL; - case FH_REF_SCRATCH: - return scratch_reader_open (handle, dict); + case FH_REF_DATASET: + return dataset_reader_open (handle, dict); } NOT_REACHED (); }