X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Flanguage%2Fdata-io%2Ffile-handle.q;h=5f2a44075a78835d36afe933184cb7e4bf6c6ec9;hb=848c950e47bf9912c91edf9aae9b3b6be21a2c01;hp=71081b922ac0601835fec8b13a819aa4f2a17dc3;hpb=774441e68b4d2e3a4b5c6975e9614dcd4369955e;p=pspp
diff --git a/src/language/data-io/file-handle.q b/src/language/data-io/file-handle.q
index 71081b922a..5f2a44075a 100644
--- a/src/language/data-io/file-handle.q
+++ b/src/language/data-io/file-handle.q
@@ -1,5 +1,5 @@
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2010 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,13 +15,13 @@
along with this program. If not, see . */
#include
+
#include
-#include
-#include
#include
#include
#include
#include
+#include
#include
#include
#include
@@ -57,7 +57,7 @@ cmd_file_handle (struct lexer *lexer, struct dataset *ds)
if (!lex_force_id (lexer))
return CMD_CASCADING_FAILURE;
- str_copy_trunc (handle_name, sizeof handle_name, lex_tokid (lexer));
+ str_copy_trunc (handle_name, sizeof handle_name, lex_tokcstr (lexer));
handle = fh_from_id (handle_name);
if (handle != NULL)
@@ -69,7 +69,7 @@ cmd_file_handle (struct lexer *lexer, struct dataset *ds)
}
lex_get (lexer);
- if (!lex_force_match (lexer, '/'))
+ if (!lex_force_match (lexer, T_SLASH))
return CMD_CASCADING_FAILURE;
if (!parse_file_handle (lexer, ds, &cmd, NULL))
@@ -159,7 +159,7 @@ cmd_close_file_handle (struct lexer *lexer, struct dataset *ds UNUSED)
if (!lex_force_id (lexer))
return CMD_CASCADING_FAILURE;
- handle = fh_from_id (lex_tokid (lexer));
+ handle = fh_from_id (lex_tokcstr (lexer));
if (handle == NULL)
return CMD_CASCADING_FAILURE;
@@ -208,14 +208,15 @@ fh_parse (struct lexer *lexer, enum fh_referent referent_mask)
handle = NULL;
if (lex_token (lexer) == T_ID)
- handle = fh_from_id (lex_tokid (lexer));
+ handle = fh_from_id (lex_tokcstr (lexer));
if (handle == NULL)
{
- if (lex_token (lexer) != T_ID || lex_tokid (lexer)[0] != '#' || settings_get_syntax () != ENHANCED)
- handle = fh_create_file (NULL, ds_cstr (lex_tokstr (lexer)),
+ if (lex_token (lexer) != T_ID || lex_tokcstr (lexer)[0] != '#'
+ || settings_get_syntax () != ENHANCED)
+ handle = fh_create_file (NULL, lex_tokcstr (lexer),
fh_default_properties ());
else
- handle = fh_create_scratch (lex_tokid (lexer));
+ handle = fh_create_scratch (lex_tokcstr (lexer));
}
lex_get (lexer);
}