X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fdata%2Fany-reader.c;h=691bc475dc996a095f495a1a38abbbc79a01d0cb;hb=8c8b1ba6eadf4cf533b5cce513a21b48ae06c402;hp=df37c8ea470afb8f8be68fbf028d50854cc96f2f;hpb=ac6051350fba373c6f72ad44deded2b5b0e31ca0;p=pspp diff --git a/src/data/any-reader.c b/src/data/any-reader.c index df37c8ea47..691bc475dc 100644 --- a/src/data/any-reader.c +++ b/src/data/any-reader.c @@ -24,9 +24,10 @@ #include #include #include +#include #include #include "file-handle-def.h" -#include "filename.h" +#include "file-name.h" #include "por-file-reader.h" #include "sys-file-reader.h" #include @@ -68,17 +69,17 @@ try_detect (struct file_handle *handle, bool (*detect) (FILE *)) FILE *file; bool is_type; - file = fn_open (fh_get_filename (handle), "rb"); + file = fn_open (fh_get_file_name (handle), "rb"); if (file == NULL) { msg (ME, _("An error occurred while opening \"%s\": %s."), - fh_get_filename (handle), strerror (errno)); + fh_get_file_name (handle), strerror (errno)); return IO_ERROR; } is_type = detect (file); - fn_close (fh_get_filename (handle), file); + fn_close (fh_get_file_name (handle), file); return is_type ? YES : NO; } @@ -127,7 +128,7 @@ any_reader_open (struct file_handle *handle, struct dictionary **dict) pfm_open_reader (handle, dict, NULL)); msg (SE, _("\"%s\" is not a system or portable file."), - fh_get_filename (handle)); + fh_get_file_name (handle)); return NULL; } @@ -139,7 +140,7 @@ any_reader_open (struct file_handle *handle, struct dictionary **dict) return make_any_reader (SCRATCH_FILE, scratch_reader_open (handle, dict)); } - abort (); + NOT_REACHED (); } /* Reads a single case from READER into C. @@ -158,7 +159,7 @@ any_reader_read (struct any_reader *reader, struct ccase *c) case SCRATCH_FILE: return scratch_reader_read_case (reader->private, c); } - abort (); + NOT_REACHED (); } /* Returns true if an I/O error has occurred on READER, false @@ -177,7 +178,7 @@ any_reader_error (struct any_reader *reader) case SCRATCH_FILE: return scratch_reader_error (reader->private); } - abort (); + NOT_REACHED (); } /* Closes READER. */ @@ -202,7 +203,7 @@ any_reader_close (struct any_reader *reader) break; default: - abort (); + NOT_REACHED (); } free (reader);