/* Variables. */
struct hsh_table *var_hash;
- struct variable *const *svars;
+ struct variable **svars;
/* File's special constants. */
flt64 sysmis;
va_list args;
struct string text;
- ds_create (&text, _("corrupt system file: "));
+ ds_init_cstr (&text, _("corrupt system file: "));
va_start (args, format);
- ds_vprintf (&text, format, args);
+ ds_put_vformat (&text, format, args);
va_end (args);
m.category = msg_class_to_category (class);
m.severity = msg_class_to_severity (class);
m.where.file_name = NULL;
m.where.line_number = 0;
- m.text = ds_c_str (&text);
+ m.text = ds_cstr (&text);
msg_emit (&m);
}
assertive_buf_read (r, ¶ms, sizeof(params), 0);
+ if ( ! measure_is_valid(params.measure)
+ ||
+ ! alignment_is_valid(params.align))
+ {
+ msg(MW,
+ _("%s: Invalid variable display parameters. Default parameters substituted."),
+ fh_get_file_name(r->fh));
+ continue;
+ }
+
v = dict_get_var(*dict, i);
v->measure = params.measure;
if ( ! r->svars )
{
- r->svars = (struct variable *const *) hsh_data(r->var_hash);
+ r->svars = (struct variable **) hsh_data(r->var_hash);
sort(r->svars, hsh_count(r->var_hash),
sizeof(*r->svars), compare_var_index, 0);
}