projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added (some of the) calculations for the examine command.
[pspp]
/
src
/
inpt-pgm.c
diff --git
a/src/inpt-pgm.c
b/src/inpt-pgm.c
index ee2fd7cb1302c0a495a0ef26ed59a00a9e68314f..0cbf66f325569d54b828c98eac639c2124ac029b 100644
(file)
--- a/
src/inpt-pgm.c
+++ b/
src/inpt-pgm.c
@@
-18,10
+18,11
@@
02111-1307, USA. */
#include <config.h>
02111-1307, USA. */
#include <config.h>
-#include
<assert.h>
+#include
"error.h"
#include <float.h>
#include <stdlib.h>
#include "alloc.h"
#include <float.h>
#include <stdlib.h>
#include "alloc.h"
+#include "case.h"
#include "command.h"
#include "data-list.h"
#include "dfm.h"
#include "command.h"
#include "data-list.h"
#include "dfm.h"
@@
-130,14
+131,14
@@
init_case (const struct input_program_pgm *inp, struct ccase *c)
switch (inp->init[i])
{
case INP_NUMERIC | INP_INIT_ONCE:
switch (inp->init[i])
{
case INP_NUMERIC | INP_INIT_ONCE:
- c
->data[i].
f = 0.0;
+ c
ase_data_rw (c, i)->
f = 0.0;
break;
case INP_NUMERIC | INP_REINIT:
break;
case INP_NUMERIC | INP_REINIT:
- c
->data[i].
f = SYSMIS;
+ c
ase_data_rw (c, i)->
f = SYSMIS;
break;
case INP_STRING | INP_INIT_ONCE:
case INP_STRING | INP_REINIT:
break;
case INP_STRING | INP_INIT_ONCE:
case INP_STRING | INP_REINIT:
- memset (c
->data[i].s, ' ', sizeof c->data[i].
s);
+ memset (c
ase_data_rw (c, i)->s, ' ', sizeof case_data_rw (c, i)->
s);
break;
default:
assert (0);
break;
default:
assert (0);
@@
-156,12
+157,12
@@
clear_case (const struct input_program_pgm *inp, struct ccase *c)
case INP_NUMERIC | INP_INIT_ONCE:
break;
case INP_NUMERIC | INP_REINIT:
case INP_NUMERIC | INP_INIT_ONCE:
break;
case INP_NUMERIC | INP_REINIT:
- c
->data[i].
f = SYSMIS;
+ c
ase_data_rw (c, i)->
f = SYSMIS;
break;
case INP_STRING | INP_INIT_ONCE:
break;
case INP_STRING | INP_REINIT:
break;
case INP_STRING | INP_INIT_ONCE:
break;
case INP_STRING | INP_REINIT:
- memset (c
->data[i].s, ' ', sizeof c->data[i].
s);
+ memset (c
ase_data_rw (c, i)->s, ' ', sizeof case_data_rw (c, i)->
s);
break;
default:
assert (0);
break;
default:
assert (0);
@@
-303,6
+304,7
@@
end_case_trns_proc (struct trns_header *t UNUSED, struct ccase * c UNUSED,
int case_num UNUSED)
{
assert (0);
int case_num UNUSED)
{
assert (0);
+ abort ();
}
/* REREAD transformation. */
}
/* REREAD transformation. */
@@
-342,7
+344,7
@@
cmd_reread (void)
return CMD_FAILURE;
}
return CMD_FAILURE;
}
- e = expr_parse (
PXP
_NUMERIC);
+ e = expr_parse (
EXPR
_NUMERIC);
if (!e)
return CMD_FAILURE;
}
if (!e)
return CMD_FAILURE;
}
@@
-382,7
+384,7
@@
reread_trns_proc (struct trns_header * pt, struct ccase * c,
struct reread_trns *t = (struct reread_trns *) pt;
if (t->column == NULL)
struct reread_trns *t = (struct reread_trns *) pt;
if (t->column == NULL)
- dfm_
bkw
d_record (t->handle, 1);
+ dfm_
rerea
d_record (t->handle, 1);
else
{
union value column;
else
{
union value column;
@@
-392,10
+394,10
@@
reread_trns_proc (struct trns_header * pt, struct ccase * c,
{
msg (SE, _("REREAD: Column numbers must be positive finite "
"numbers. Column set to 1."));
{
msg (SE, _("REREAD: Column numbers must be positive finite "
"numbers. Column set to 1."));
- dfm_
bkw
d_record (t->handle, 1);
+ dfm_
rerea
d_record (t->handle, 1);
}
else
}
else
- dfm_
bkw
d_record (t->handle, column.f);
+ dfm_
rerea
d_record (t->handle, column.f);
}
return -1;
}
}
return -1;
}