+
+
+/* Set the IDXth value of case C using D_IN */
+static gboolean
+psppire_data_store_data_in (PsppireDataStore *ds, casenumber casenum, gint idx,
+ struct substring input, const struct fmt_spec *fmt)
+{
+ union value *value = NULL;
+ int width;
+ bool ok;
+
+ g_return_val_if_fail (ds, FALSE);
+ g_return_val_if_fail (ds->datasheet, FALSE);
+
+ g_return_val_if_fail (idx < datasheet_get_column_cnt (ds->datasheet), FALSE);
+
+ width = fmt_var_width (fmt);
+ value = xmalloca (value_cnt_from_width (width) * sizeof *value);
+ ok = (datasheet_get_value (ds->datasheet, casenum, idx, value, width)
+ && data_in (input, LEGACY_NATIVE, fmt->type, 0, 0, 0, value, width)
+ && datasheet_put_value (ds->datasheet, casenum, idx, value, width));
+
+ if (ok)
+ g_signal_emit (ds, signals [CASE_CHANGED], 0, casenum);
+
+ freea (value);
+
+ return TRUE;
+}
+
+/* Resize the cases in the casefile, by inserting N_VALUES into every
+ one of them at the position immediately preceeding WHERE.
+*/
+static gboolean
+psppire_data_store_insert_values (PsppireDataStore *ds,
+ gint n_values, gint where)