static int read_header (struct sfm_reader *,
struct dictionary *, struct sfm_read_info *);
static int read_header (struct sfm_reader *,
struct dictionary *, struct sfm_read_info *);
struct fmt_spec *, const struct variable *);
static int read_value_labels (struct sfm_reader *, struct dictionary *,
struct variable **var_by_idx);
struct fmt_spec *, const struct variable *);
static int read_value_labels (struct sfm_reader *, struct dictionary *,
struct variable **var_by_idx);
/* Read records of types 3, 4, 6, and 7. */
for (;;)
{
/* Read records of types 3, 4, 6, and 7. */
for (;;)
{
assertive_buf_read (r, &rec_type, sizeof rec_type, 0);
if (r->reverse_endian)
assertive_buf_read (r, &rec_type, sizeof rec_type, 0);
if (r->reverse_endian)
assertive_buf_read (r, &filler, sizeof filler, 0);
goto success;
assertive_buf_read (r, &filler, sizeof filler, 0);
goto success;
lose ((ME, _("%s: Bad size (%d) or count (%d) field on record type 7, "
"subtype 3. Expected size %d, count 8."),
lose ((ME, _("%s: Bad size (%d) or count (%d) field on record type 7, "
"subtype 3. Expected size %d, count 8."),
- fh_get_filename (r->fh), size, count, sizeof (int32)));
+ fh_get_filename (r->fh), size, count, sizeof (int32_t)));
assertive_buf_read (r, data, sizeof data, 0);
if (r->reverse_endian)
assertive_buf_read (r, data, sizeof data, 0);
if (r->reverse_endian)
/* Read length of label. */
assertive_buf_read (r, &len, sizeof len, 0);
/* Read length of label. */
assertive_buf_read (r, &len, sizeof len, 0);
- vv->label = buf_read (r, NULL, ROUND_UP (len, sizeof (int32)), len + 1);
+ vv->label = buf_read (r, NULL, ROUND_UP (len, sizeof (int32_t)), len + 1);
struct fmt_spec *f, const struct variable *v)
{
f->type = translate_fmt ((s >> 16) & 0xff);
struct fmt_spec *f, const struct variable *v)
{
f->type = translate_fmt ((s >> 16) & 0xff);
{
corrupt_msg(MW, _("%s: Invalid number of labels: %d. Ignoring labels."),
fh_get_filename (r->fh), n_labels);
{
corrupt_msg(MW, _("%s: Invalid number of labels: %d. Ignoring labels."),
fh_get_filename (r->fh), n_labels);
assertive_buf_read (r, &rec_type, sizeof rec_type, 0);
if (r->reverse_endian)
assertive_buf_read (r, &rec_type, sizeof rec_type, 0);
if (r->reverse_endian)
var = xnmalloc (n_vars, sizeof *var);
for (i = 0; i < n_vars; i++)
{
var = xnmalloc (n_vars, sizeof *var);
for (i = 0; i < n_vars; i++)
{