projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add new output/ascii.h header to the distribution, fixing "make dist".
[pspp]
/
src
/
language
/
stats
/
npar-summary.c
diff --git
a/src/language/stats/npar-summary.c
b/src/language/stats/npar-summary.c
index 625291360fb7ed453472982f01b084bf46edf003..e1870f62fd28f962979f79aff4498633feb13606 100644
(file)
--- a/
src/language/stats/npar-summary.c
+++ b/
src/language/stats/npar-summary.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009, 2010
, 2011
Free Software Foundation, Inc.
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
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
@@
-16,17
+16,19
@@
#include <config.h>
#include <config.h>
-#include <data/format.h>
-#include <output/tab.h>
-#include <data/casereader.h>
-#include <libpspp/hash.h>
-#include <data/variable.h>
-#include "npar-summary.h"
-#include <math/moments.h>
-#include <data/case.h>
-#include <data/dictionary.h>
+#include "language/stats/npar-summary.h"
+
#include <math.h>
#include <math.h>
-#include <minmax.h>
+
+#include "data/case.h"
+#include "data/casereader.h"
+#include "data/dictionary.h"
+#include "data/format.h"
+#include "data/variable.h"
+#include "math/moments.h"
+#include "output/tab.h"
+
+#include "gl/minmax.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "gettext.h"
#define _(msgid) gettext (msgid)
@@
-37,18
+39,18
@@
npar_summary_calc_descriptives (struct descriptives *desc,
struct casereader *input,
const struct dictionary *dict,
const struct variable *const *vv,
struct casereader *input,
const struct dictionary *dict,
const struct variable *const *vv,
- int n_vars
UNUSED
,
+ int n_vars,
enum mv_class filter)
{
int i = 0;
enum mv_class filter)
{
int i = 0;
-
while (*vv
)
+
for (i = 0 ; i < n_vars; ++i
)
{
double minimum = DBL_MAX;
double maximum = -DBL_MAX;
double var;
struct moments1 *moments = moments1_create (MOMENT_VARIANCE);
struct ccase *c;
{
double minimum = DBL_MAX;
double maximum = -DBL_MAX;
double var;
struct moments1 *moments = moments1_create (MOMENT_VARIANCE);
struct ccase *c;
- const struct variable *v =
*vv++
;
+ const struct variable *v =
vv[i]
;
struct casereader *pass;
pass = casereader_clone (input);
struct casereader *pass;
pass = casereader_clone (input);
@@
-79,9
+81,8
@@
npar_summary_calc_descriptives (struct descriptives *desc,
desc[i].min = minimum;
desc[i].max = maximum;
desc[i].min = minimum;
desc[i].max = maximum;
-
- i++;
}
}
+
casereader_destroy (input);
}
casereader_destroy (input);
}