projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added variable/parameter matching and error reporting
[pspp]
/
src
/
levene.c
diff --git
a/src/levene.c
b/src/levene.c
index 7877c7ec6aa5fc039efb7fbedff900096977c8a8..5de5220588564cb6674fd20aa04e21279dd3f0bf 100644
(file)
--- a/
src/levene.c
+++ b/
src/levene.c
@@
-68,7
+68,7
@@
struct levene_info
struct variable *v_indep;
/* Number of dependent variables */
struct variable *v_indep;
/* Number of dependent variables */
-
in
t n_dep;
+
size_
t n_dep;
/* The dependent variables */
struct variable **v_dep;
/* The dependent variables */
struct variable **v_dep;
@@
-94,7
+94,7
@@
static void levene2_postcalc (void *);
void
levene(const struct casefile *cf,
void
levene(const struct casefile *cf,
- struct variable *v_indep,
in
t n_dep, struct variable **v_dep,
+ struct variable *v_indep,
size_
t n_dep, struct variable **v_dep,
enum lev_missing missing, is_missing_func value_is_missing)
{
struct casereader *r;
enum lev_missing missing, is_missing_func value_is_missing)
{
struct casereader *r;
@@
-156,9
+156,9
@@
static struct lz_stats *lz;
static void
levene_precalc (const struct levene_info *l)
{
static void
levene_precalc (const struct levene_info *l)
{
-
in
t i;
+
size_
t i;
- lz
= xmalloc (sizeof (struct lz_stats ) * l->n_dep )
;
+ lz
= xnmalloc (l->n_dep, sizeof *lz)
;
for(i = 0; i < l->n_dep ; ++i )
{
for(i = 0; i < l->n_dep ; ++i )
{
@@
-186,7
+186,7
@@
levene_precalc (const struct levene_info *l)
static int
levene_calc (const struct ccase *c, void *_l)
{
static int
levene_calc (const struct ccase *c, void *_l)
{
-
in
t i;
+
size_
t i;
int warn = 0;
struct levene_info *l = (struct levene_info *) _l;
const union value *gv = case_data (c, l->v_indep->fv);
int warn = 0;
struct levene_info *l = (struct levene_info *) _l;
const union value *gv = case_data (c, l->v_indep->fv);
@@
-241,7
+241,7
@@
levene_calc (const struct ccase *c, void *_l)
static void
levene_postcalc (void *_l)
{
static void
levene_postcalc (void *_l)
{
-
in
t v;
+
size_
t v;
struct levene_info *l = (struct levene_info *) _l;
struct levene_info *l = (struct levene_info *) _l;
@@
-261,11
+261,11
@@
static double *lz_denominator;
static void
levene2_precalc (void *_l)
{
static void
levene2_precalc (void *_l)
{
-
in
t v;
+
size_
t v;
struct levene_info *l = (struct levene_info *) _l;
struct levene_info *l = (struct levene_info *) _l;
- lz_denominator =
(double *) xmalloc(sizeof(double) * l->n_dep
);
+ lz_denominator =
xnmalloc (l->n_dep, sizeof *lz_denominator
);
/* This stuff could go in the first post calc . . . */
for (v = 0; v < l->n_dep; ++v)
/* This stuff could go in the first post calc . . . */
for (v = 0; v < l->n_dep; ++v)
@@
-290,7
+290,7
@@
levene2_precalc (void *_l)
static int
levene2_calc (const struct ccase *c, void *_l)
{
static int
levene2_calc (const struct ccase *c, void *_l)
{
-
in
t i;
+
size_
t i;
int warn = 0;
struct levene_info *l = (struct levene_info *) _l;
int warn = 0;
struct levene_info *l = (struct levene_info *) _l;
@@
-343,7
+343,7
@@
levene2_calc (const struct ccase *c, void *_l)
static void
levene2_postcalc (void *_l)
{
static void
levene2_postcalc (void *_l)
{
-
in
t v;
+
size_
t v;
struct levene_info *l = (struct levene_info *) _l;
struct levene_info *l = (struct levene_info *) _l;