projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rewrite formatted data input routines to conform to SPSS data formats
[pspp-builds.git]
/
src
/
ui
/
gui
/
psppire-case-file.c
diff --git
a/src/ui/gui/psppire-case-file.c
b/src/ui/gui/psppire-case-file.c
index 6b0f2111272282c90c637e457a4d80fa8efc4d61..7e16087eb93ae7bfe2057d72fdc49cb3d9e48136 100644
(file)
--- a/
src/ui/gui/psppire-case-file.c
+++ b/
src/ui/gui/psppire-case-file.c
@@
-18,7
+18,7
@@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
-
+#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
@@
-296,7
+296,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,
/* 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 ;
{
struct ccase cc ;
@@
-309,9
+309,8
@@
psppire_case_file_data_in(PsppireCaseFile *cf, gint casenum, gint idx,
return FALSE;
/* Cast away const in flagrant abuse of the casefile */
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(&cc, idx), fmt_var_width (fmt)))
g_warning("Cant set value\n");
g_signal_emit(cf, signal[CASE_CHANGED], 0, casenum);
g_warning("Cant set value\n");
g_signal_emit(cf, signal[CASE_CHANGED], 0, casenum);