/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006, 2009, 2010, 2011, 2012, 2013 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 <config.h>
#include <ctype.h>
+#include <float.h>
#include <stdlib.h>
#include "data/attributes.h"
? var_get_name (weight_var) : _("Not weighted.")));
}
- tab_text (t, 0, r, TAB_LEFT, _("Mode:"));
+ tab_text (t, 0, r, TAB_LEFT, _("Compression:"));
tab_text_format (t, 1, r++, TAB_LEFT,
- _("Compression %s."), info.compressed ? _("on") : _("off"));
-
+ info.compression == SFM_COMP_NONE ? _("None")
+ : info.compression == SFM_COMP_SIMPLE ? "SAV"
+ : "ZSAV");
tab_text (t, 0, r, TAB_LEFT, _("Charset:"));
tab_text (t, 1, r++, TAB_LEFT, dict_get_encoding (d));
const struct attribute *attr = attrs[i];
const char *name = attribute_get_name (attr);
size_t n_values;
- size_t i;
+ size_t j;
if (!(flags & DF_AT_ATTRIBUTES) && is_at_name (name))
continue;
n_values = attribute_get_n_values (attr);
- for (i = 0; i < n_values; i++)
+ for (j = 0; j < n_values; j++)
{
if (n_values > 1)
- tab_text_format (t, c, r, TAB_LEFT, "%s[%zu]", name, i + 1);
+ tab_text_format (t, c, r, TAB_LEFT, "%s[%zu]", name, j + 1);
else
tab_text (t, c, r, TAB_LEFT, name);
- tab_text (t, c + 1, r, TAB_LEFT, attribute_get_value (attr, i));
+ tab_text (t, c + 1, r, TAB_LEFT, attribute_get_value (attr, j));
r++;
}
}
if (flags & DF_VARIABLE_LABELS && var_has_label (v))
{
- tab_joint_text (t, 1, r, 2, r, TAB_LEFT, var_get_label (v));
+ if (flags & ~(DF_DICT_INDEX | DF_VARIABLE_LABELS))
+ tab_joint_text_format (t, 1, r, 2, r, TAB_LEFT,
+ _("Label: %s"), var_get_label (v));
+ else
+ tab_joint_text (t, 1, r, 2, r, TAB_LEFT, var_get_label (v));
r++;
}
double x, y;
mv_get_range (mv, &x, &y);
if (x == LOWEST)
- cp += sprintf (cp, "LOWEST THRU %g", y);
+ cp += sprintf (cp, "LOWEST THRU %.*g", DBL_DIG + 1, y);
else if (y == HIGHEST)
- cp += sprintf (cp, "%g THRU HIGHEST", x);
+ cp += sprintf (cp, "%.*g THRU HIGHEST", DBL_DIG + 1, x);
else
- cp += sprintf (cp, "%g THRU %g", x, y);
+ cp += sprintf (cp, "%.*g THRU %.*g",
+ DBL_DIG + 1, x,
+ DBL_DIG + 1, y);
cnt++;
}
for (i = 0; i < mv_n_values (mv); i++)
if (cnt++ > 0)
cp += sprintf (cp, "; ");
if (var_is_numeric (v))
- cp += sprintf (cp, "%g", value->f);
+ cp += sprintf (cp, "%.*g", DBL_DIG + 1, value->f);
else
{
int width = var_get_width (v);