/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2009 Free Software Foundation
+ Copyright (C) 2007, 2009, 2011 Free Software Foundation
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
cmptr->destroy = cmptr_value_destroy;
cmptr->dict = dict;
- text_to_value (target, dict, var, &vc->pattern);
+ text_to_value (target, var, &vc->pattern);
return cmptr;
}
VAL will be initialised and filled by this function.
It is the caller's responsibility to destroy VAL when no longer needed.
- VAR and DICT must be the variable and dictionary with which VAL
- is associated.
+ VAR must be the variable with which VAL is associated.
On success, VAL is returned, NULL otherwise.
*/
union value *
text_to_value (const gchar *text,
- const PsppireDict *dict,
const struct variable *var,
union value *val)
{
value_init (val, width);
free (data_in (ss_cstr (text), UTF8, format->type, val, width,
- dict_get_encoding (dict->dict)));
+ var_get_encoding (var)));
return val;
}
union value *
text_to_value (const gchar *text,
- const PsppireDict *dict,
const struct variable *var,
union value *);
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2005, 2006, 2009 Free Software Foundation
+ Copyright (C) 2005, 2006, 2009, 2011 Free Software Foundation
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
continue;
}
- if ( text_to_value (text, dialog->dict, dialog->pv, &v))
+ if ( text_to_value (text, dialog->pv, &v))
{
nvals++;
mv_add_value (&dialog->mvl, &v);
const gchar *low_text = gtk_entry_get_text (GTK_ENTRY (dialog->low));
const gchar *high_text = gtk_entry_get_text (GTK_ENTRY (dialog->high));
- if ( text_to_value (low_text, dialog->dict, dialog->pv, &low_val)
+ if ( text_to_value (low_text, dialog->pv, &low_val)
&&
- text_to_value (high_text, dialog->dict, dialog->pv, &high_val))
+ text_to_value (high_text, dialog->pv, &high_val))
{
if ( low_val.f > high_val.f )
{
{
union value discrete_val;
if ( !text_to_value (discrete_text,
- dialog->dict,
dialog->pv,
&discrete_val))
{
text = gtk_entry_get_text (GTK_ENTRY (dialog->value_entry));
text_to_value (text,
- dialog->dict,
dialog->pv,
&v);
union value v;
text_to_value (text,
- dialog->dict,
dialog->pv,
&v);
union value v;
text_to_value (val_text,
- dialog->dict,
dialog->pv,
&v);
const gchar *text = gtk_entry_get_text (GTK_ENTRY (dialog->value_entry));
text_to_value (text,
- dialog->dict,
dialog->pv,
&v);