along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
+#include <limits.h>
#include <language/data-io/file-handle.h>
#include <libpspp/message.h>
#include <errno.h>
int
cmd_file_handle (struct lexer *lexer, struct dataset *ds)
{
- char handle_name[LONG_NAME_LEN + 1];
+ char handle_name[VAR_NAME_LEN + 1];
struct cmd_file_handle cmd;
struct file_handle *handle;
properties.mode = FH_MODE_VARIABLE;
break;
case FH_360:
- properties.encoding = LEGACY_EBCDIC;
+ properties.encoding = "PSPP-LEGACY-EBCDIC";
if (cmd.recform == FH_FIXED || cmd.recform == FH_F)
properties.mode = FH_MODE_FIXED;
else if (cmd.recform == FH_VARIABLE || cmd.recform == FH_V)
handle = fh_from_id (lex_tokid (lexer));
if (handle == NULL)
{
- if (lex_token (lexer) != T_ID || lex_tokid (lexer)[0] != '#' || get_syntax () != ENHANCED)
+ if (lex_token (lexer) != T_ID || lex_tokid (lexer)[0] != '#' || settings_get_syntax () != ENHANCED)
handle = fh_create_file (NULL, ds_cstr (lex_tokstr (lexer)),
fh_default_properties ());
else