/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2010, 2011, 2012, 2013 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
lrecl=integer;
tabwidth=integer;
mode=mode:!character/binary/image/360;
+ ends=ends:lf/crlf;
recform=recform:fixed/f/variable/v/spanned/vs;
encoding=string.
*/
if (handle != NULL)
{
msg (SE, _("File handle %s is already defined. "
- "Use CLOSE FILE HANDLE before redefining a file handle."),
- handle_name);
+ "Use %s before redefining a file handle."),
+ handle_name, "CLOSE FILE HANDLE");
goto exit_free_handle_name;
}
else
msg (SE, _("%s must not be negative."), "TABWIDTH");
}
+ if (cmd.ends == FH_LF)
+ properties.line_ends = FH_END_LF;
+ else if (cmd.ends == FH_CRLF)
+ properties.line_ends = FH_END_CRLF;
break;
case FH_IMAGE:
properties.mode = FH_MODE_FIXED;
}
else
{
- msg (SE, _("RECFORM must be specified with MODE=360."));
+ msg (SE, _("%s must be specified with %s."), "RECFORM", "MODE=360");
goto exit_free_cmd;
}
break;
if (cmd.s_encoding != NULL)
properties.encoding = cmd.s_encoding;
- fh_create_file (handle_name, cmd.s_name, &properties);
+ fh_create_file (handle_name, cmd.s_name, lex_get_encoding (lexer), &properties);
result = CMD_SUCCESS;
if (lex_token (lexer) == T_ID)
handle = fh_from_id (lex_tokcstr (lexer));
if (handle == NULL)
- handle = fh_create_file (NULL, lex_tokcstr (lexer),
+ handle = fh_create_file (NULL, lex_tokcstr (lexer), lex_get_encoding (lexer),
fh_default_properties ());
lex_get (lexer);
}