This parameter is used only to obtain the dictionary's
encoding, which may also be obtained through the variable.
/* PSPPIRE - a graphical user interface for PSPP.
/* 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
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;
cmptr->destroy = cmptr_value_destroy;
cmptr->dict = dict;
- text_to_value (target, dict, var, &vc->pattern);
+ text_to_value (target, var, &vc->pattern);
VAL will be initialised and filled by this function.
It is the caller's responsibility to destroy VAL when no longer needed.
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,
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)
{
const struct variable *var,
union value *val)
{
value_init (val, width);
free (data_in (ss_cstr (text), UTF8, format->type, val, width,
value_init (val, width);
free (data_in (ss_cstr (text), UTF8, format->type, val, width,
- dict_get_encoding (dict->dict)));
+ var_get_encoding (var)));
union value *
text_to_value (const gchar *text,
union value *
text_to_value (const gchar *text,
- const PsppireDict *dict,
const struct variable *var,
union value *);
const struct variable *var,
union value *);
/* PSPPIRE - a graphical user interface for PSPP.
/* 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
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
- 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);
{
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));
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 )
{
{
if ( low_val.f > high_val.f )
{
{
union value discrete_val;
if ( !text_to_value (discrete_text,
{
union value discrete_val;
if ( !text_to_value (discrete_text,
dialog->pv,
&discrete_val))
{
dialog->pv,
&discrete_val))
{
text = gtk_entry_get_text (GTK_ENTRY (dialog->value_entry));
text_to_value (text,
text = gtk_entry_get_text (GTK_ENTRY (dialog->value_entry));
text_to_value (text,
union value v;
text_to_value (text,
union value v;
text_to_value (text,
union value v;
text_to_value (val_text,
union value v;
text_to_value (val_text,
const gchar *text = gtk_entry_get_text (GTK_ENTRY (dialog->value_entry));
text_to_value (text,
const gchar *text = gtk_entry_get_text (GTK_ENTRY (dialog->value_entry));
text_to_value (text,