X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Ffile-handle.q;h=944306276343113c169c0cd46a4d97355aa915a2;hb=efe067379890a29af2b4ad06bf83df7a2eb4d009;hp=65c7b2558e5d427a423530ad445530486f0f2b6d;hpb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;p=pspp diff --git a/src/language/data-io/file-handle.q b/src/language/data-io/file-handle.q index 65c7b2558e..9443062763 100644 --- a/src/language/data-io/file-handle.q +++ b/src/language/data-io/file-handle.q @@ -18,20 +18,20 @@ 02110-1301, USA. */ #include -#include "file-handle.h" -#include "message.h" +#include +#include #include #include -#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 +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "gettext.h" #define _(msgid) gettext (msgid) @@ -158,7 +158,7 @@ referent_name (enum fh_referent referent) } } -/* 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. */ @@ -181,14 +181,14 @@ fh_parse (enum fh_referent referent_mask) 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_c_str (&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_c_str (&tokstr); + char *handle_name = xasprintf ("\"%s\"", file_name); + handle = fh_create_file (handle_name, file_name, fh_default_properties ()); free (handle_name); }