if ( r->case_cnt > INT_MAX / 2)
r->case_cnt = -1;
-
/* Identify floating-point format and obtain compression bias. */
read_bytes (r, raw_bias, sizeof raw_bias);
if (float_identify (100.0, raw_bias, sizeof raw_bias, &r->float_format) == 0)
sys_error (r, _("Bad width %d for variable %s."), width, name);
var = dict_create_var (dict, name, width);
if (var == NULL)
- sys_error (r,
- _("Duplicate variable name `%s' within system file."),
- name);
+ sys_error (r, _("Duplicate variable name `%s'."), name);
/* Set the short name the same as the long name. */
var_set_short_name (var, 0, var_get_name (var));
else
var_set_write_format (v, &f);
}
- else if (*++format_warning_cnt <= max_format_warnings)
+ else if (++*format_warning_cnt <= max_format_warnings)
{
char fmt_string[FMT_STRING_LEN_MAX + 1];
sys_warn (r, _("%s variable %s has invalid %s format %s."),
if (var_is_numeric (weight_var))
dict_set_weight (dict, weight_var);
else
- sys_error (r, _("Weighting variable must be numeric."));
+ sys_error (r, _("Weighting variable must be numeric "
+ "(not string variable `%s')."),
+ var_get_name (weight_var));
}
}
if (float_representation != expected_float_format)
sys_error (r, _("Floating-point representation indicated by "
"system file (%d) differs from expected (%d)."),
- r->float_format, expected_float_format);
+ float_representation, expected_float_format);
/* Check integer format. */
if (r->integer_format == INTEGER_MSB_FIRST)
else
NOT_REACHED ();
if (integer_representation != expected_integer_format)
- {
- static const char *const endian[] = {N_("Little Endian"), N_("Big Endian")};
- sys_warn (r, _("Integer format indicated by system file (%s) "
- "differs from expected (%s)."),
- gettext (endian[integer_representation == 1]),
- gettext (endian[expected_integer_format == 1]));
- }
-
+ sys_warn (r, _("Integer format indicated by system file (%d) "
+ "differs from expected (%d)."),
+ integer_representation, expected_integer_format);
/*
Record 7 (20) provides a much more reliable way of
if (strcasecmp (var_get_short_name (var, 0), long_name)
&& dict_lookup_var (dict, long_name) != NULL)
{
- sys_warn (r, _("Duplicate long variable name `%s' "
- "within system file."), long_name);
+ sys_warn (r, _("Duplicate long variable name `%s'."), long_name);
continue;
}
label_cnt = read_int (r);
if (size_overflow_p (xtimes (label_cnt, sizeof *labels)))
- {
- sys_warn (r, _("Invalid number of labels: %d. Ignoring labels."),
- label_cnt);
- label_cnt = 0;
- }
+ sys_error (r, _("Invalid number of labels %d."), label_cnt);
/* Read each value/label tuple into labels[]. */
labels = pool_nalloc (subpool, label_cnt, sizeof *labels);