/* Formats a value according to FORMAT
The returned string must be freed when no longer required */
gchar *
-value_to_text (union value v, PsppireDict *dict, struct fmt_spec format)
+value_to_text (union value v, const PsppireDict *dict, struct fmt_spec format)
{
gchar *s = 0;
/* Formats a value according to FORMAT
The returned string must be freed when no longer required */
-gchar * value_to_text (union value v, PsppireDict *dict, struct fmt_spec format);
+gchar * value_to_text (union value v, const PsppireDict *dict, struct fmt_spec format);
gboolean text_to_value (const gchar *text, union value *v,
g_assert (vl);
{
- gchar *const vstr = value_to_text (vl->value, dict->dict, *write_spec);
+ gchar *const vstr = value_to_text (vl->value, dict, *write_spec);
return g_strdup_printf ( "{%s,\"%s\"}_", vstr, val_lab_get_label (vl));
}
gint i;
for (i = 0 ; i < n; ++i )
{
- mv[i] = value_to_text (*mv_get_value (miss, i), dict->dict, *fmt);
+ mv[i] = value_to_text (*mv_get_value (miss, i), dict, *fmt);
if ( i > 0 )
g_string_append (gstr, ", ");
g_string_append (gstr, mv[i]);
union value low, high;
mv_get_range (miss, &low.f, &high.f);
- l = value_to_text (low, dict->dict, *fmt);
- h = value_to_text (high, dict->dict,*fmt);
+ l = value_to_text (low, dict, *fmt);
+ h = value_to_text (high, dict,*fmt);
g_string_printf (gstr, "%s - %s", l, h);
g_free (l);
{
gchar *ss = 0;
- ss = value_to_text (*mv_get_value (miss, 0), dict->dict, *fmt);
+ ss = value_to_text (*mv_get_value (miss, 0), dict, *fmt);
g_string_append (gstr, ", ");
g_string_append (gstr, ss);
{
const struct val_lab *vl = labels[i];
gchar *const vstr =
- value_to_text (vl->value, dict->dict, *var_get_print_format (var));
+ value_to_text (vl->value, dict, *var_get_print_format (var));
g_string_append_printf (gstring, _("%s %s\n"), vstr, val_lab_get_label (vl));