02110-1301, USA. */
#include <config.h>
-#include "file-handle.h"
-#include "message.h"
+#include <language/data-io/file-handle.h>
+#include <libpspp/message.h>
#include <errno.h>
#include <stdlib.h>
-#include "alloc.h"
-#include "filename.h"
-#include "command.h"
-#include "lexer.h"
-#include "line-buffer.h"
-#include "message.h"
-#include "magic.h"
-#include "str.h"
-#include "variable.h"
-#include "file-handle-def.h"
+#include <libpspp/alloc.h>
+#include <data/file-name.h>
+#include <language/command.h>
+#include <language/lexer/lexer.h>
+#include <language/line-buffer.h>
+#include <libpspp/message.h>
+#include <libpspp/magic.h>
+#include <libpspp/str.h>
+#include <data/variable.h>
+#include <data/file-handle-def.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
}
}
-/* Parses a file handle name, which may be a filename as a string
+/* Parses a file handle name, which may be a file name as a string
or a file handle name as an identifier. The allowed types of
file handle are restricted to those in REFERENT_MASK. Returns
the file handle when successful, a null pointer on failure. */
if (token == T_ID)
handle = fh_from_name (tokid);
if (handle == NULL)
- handle = fh_from_filename (ds_c_str (&tokstr));
+ handle = fh_from_file_name (ds_cstr (&tokstr));
if (handle == NULL)
{
if (token != T_ID || tokid[0] != '#' || get_syntax () != ENHANCED)
{
- char *filename = ds_c_str (&tokstr);
- char *handle_name = xasprintf ("\"%s\"", filename);
- handle = fh_create_file (handle_name, filename,
+ char *file_name = ds_cstr (&tokstr);
+ char *handle_name = xasprintf ("\"%s\"", file_name);
+ handle = fh_create_file (handle_name, file_name,
fh_default_properties ());
free (handle_name);
}