file-handle-def: New function fh_equal().
[pspp] / src / data / variable.c
index 593e23ca720bcbc89bae8bfde8c6312d23f0ac9a..3f32fa5d02b8206b6308db9687475f3a796ed74d 100644 (file)
@@ -128,12 +128,11 @@ static void var_set_name_quiet (struct variable *v, const char *name);
 struct variable *
 var_create (const char *name, int width)
 {
-  struct variable *v;
   enum val_type type;
 
   assert (width >= 0 && width <= MAX_STRING);
 
-  v = xzalloc (sizeof *v);
+  struct variable *v = XZALLOC (struct variable);
   var_set_name_quiet (v, name);
   v->width = width;
   mv_init (&v->miss, width);
@@ -572,7 +571,8 @@ static void
 append_value (const struct variable *v, const union value *value,
              struct string *str)
 {
-  char *s = data_out (value, var_get_encoding (v), &v->print);
+  char *s = data_out (value, var_get_encoding (v), &v->print,
+                      settings_get_fmt_settings ());
   struct substring ss = ss_cstr (s);
   ss_rtrim (&ss, ss_cstr (" "));
   ds_put_substring (str, ss);