Removed my authorship lines.
[pspp] / src / ui / gui / psppire-case-file.c
index 6b0f2111272282c90c637e457a4d80fa8efc4d61..e43ab107b1bf7690dbcba75ecb2a2d98e8cae3a3 100644 (file)
@@ -1,7 +1,6 @@
 /* 
     PSPPIRE --- A Graphical User Interface for PSPP
     Copyright (C) 2006  Free Software Foundation
-    Written by John Darrington
 
     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
@@ -18,7 +17,7 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
     02110-1301, USA. */
 
-
+#include <config.h>
 #include <string.h>
 #include <stdlib.h>
 
@@ -247,7 +246,7 @@ psppire_case_file_get_value(const PsppireCaseFile *cf, gint casenum, gint idx)
 
   flexifile_get_case(FLEXIFILE(cf->flexifile), casenum, &c);
 
-  v = case_data(&c, idx);
+  v = case_data_idx(&c, idx);
 
   case_destroy(&c);
 
@@ -284,7 +283,7 @@ psppire_case_file_set_value(PsppireCaseFile *cf, gint casenum, gint idx,
     bytes = DIV_RND_UP(width, MAX_SHORT_STRING) * MAX_SHORT_STRING ;
 
   /* Cast away const in flagrant abuse of the casefile */
-  memcpy((union value *)case_data(&cc, idx), v, bytes);
+  memcpy((union value *)case_data_idx(&cc, idx), v, bytes);
 
   g_signal_emit(cf, signal[CASE_CHANGED], 0, casenum);
 
@@ -296,7 +295,7 @@ psppire_case_file_set_value(PsppireCaseFile *cf, gint casenum, gint idx,
 /* Set the IDXth value of case C using D_IN */
 gboolean
 psppire_case_file_data_in(PsppireCaseFile *cf, gint casenum, gint idx,
-                           struct data_in *d_in)
+                          struct substring input, const struct fmt_spec *fmt)
 {
   struct ccase cc ;
 
@@ -309,9 +308,8 @@ psppire_case_file_data_in(PsppireCaseFile *cf, gint casenum, gint idx,
     return FALSE;
 
   /* Cast away const in flagrant abuse of the casefile */
-  d_in->v = (union value *) case_data(&cc, idx);
-
-  if ( ! data_in(d_in) ) 
+  if (!data_in (input, fmt->type, 0, 0,
+                (union value *) case_data_idx(&cc, idx), fmt_var_width (fmt)))
     g_warning("Cant set value\n");
 
   g_signal_emit(cf, signal[CASE_CHANGED], 0, casenum);