+/* Interpret text, display error dialog
+ If parsing is o.k., the value is initialized and it is the responsibility of
+ the caller to destroy the variable. */
+static gboolean
+try_missing_value(const PsppireMissingValDialog *dialog, const gchar *text, union value *vp)
+{
+ const int var_width = fmt_var_width (&dialog->format);
+ char *error_txt = NULL;
+
+ value_init(vp, var_width);
+ error_txt = data_in (ss_cstr(text), "UTF-8", dialog->format.type,
+ vp, var_width, dialog->encoding);
+ if (error_txt)
+ {
+ err_dialog (error_txt, GTK_WINDOW (dialog));
+ free (error_txt);
+ goto error;
+ }
+ else
+ {
+ if (mv_is_acceptable (vp, var_width))
+ return TRUE;
+ else
+ {
+ err_dialog (_("The maximum length of a missing value"
+ " for a string variable is 8 in UTF-8."),
+ GTK_WINDOW (dialog));
+ goto error;
+ }
+ }
+ error:
+ value_destroy (vp, var_width);
+ return FALSE;
+}
+
+/* Acceptability predicate for PsppireMissingValDialog.
+
+ This function is also the only place that dialog->mvl gets updated. */
+static gboolean
+missing_val_dialog_acceptable (gpointer data)
+{
+ PsppireMissingValDialog *dialog = data;
+ int var_width = fmt_var_width (&dialog->format);