/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012, 2013, 2014 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
#include "data/value-labels.h"
#include "data/variable.h"
#include "libpspp/compiler.h"
+#include "libpspp/i18n.h"
#include "libpspp/message.h"
#include "libpspp/misc.h"
#include "libpspp/pool.h"
struct pool *volatile pool = NULL;
struct pfm_reader *volatile r = NULL;
- *dict = dict_create ();
+ *dict = dict_create (get_default_encoding ());
/* Create and initialize reader. */
pool = pool_create ();
{
static const char empty_string[] = "";
char *date, *time;
- const char *product, *author, *subproduct;
+ const char *product, *subproduct;
int i;
/* Read file. */
date = read_pool_string (r);
time = read_pool_string (r);
product = match (r, '1') ? read_pool_string (r) : empty_string;
- author = match (r, '2') ? read_pool_string (r) : empty_string;
+ if (match (r, '2'))
+ {
+ /* Skip "author" field. */
+ read_pool_string (r);
+ }
subproduct = match (r, '3') ? read_pool_string (r) : empty_string;
/* Validate file. */
if (r->var_cnt <= 0)
error (r, _("Invalid number of variables %d."), r->var_cnt);
- /* Purpose of this value is unknown. It is typically 161. */
- read_int (r);
+ if (match (r, '5'))
+ read_int (r);
if (match (r, '6'))
{
{
char label[256];
read_string (r, label);
- var_set_label (v, label, NULL, false); /* XXX */
+ var_set_label (v, label); /* XXX */
}
}