X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdata-io%2Ffile-handle.q;h=5f2a44075a78835d36afe933184cb7e4bf6c6ec9;hb=refs%2Fbuilds%2F20101125030504%2Fpspp;hp=ba84a15dc54f2127576227a13e95a22aecd95be8;hpb=740218f508466f16a79939cd97027b99f589d682;p=pspp diff --git a/src/language/data-io/file-handle.q b/src/language/data-io/file-handle.q index ba84a15dc5..5f2a44075a 100644 --- a/src/language/data-io/file-handle.q +++ b/src/language/data-io/file-handle.q @@ -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) @@ -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); }