projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix error messages and comment.
[pspp]
/
src
/
language
/
tests
/
moments-test.c
diff --git
a/src/language/tests/moments-test.c
b/src/language/tests/moments-test.c
index c038a63c42fce13257b60e7b04bcc3af975b3921..533b558ff003409d43bd0557f6cf852ec7aef8c1 100644
(file)
--- a/
src/language/tests/moments-test.c
+++ b/
src/language/tests/moments-test.c
@@
-20,13
+20,17
@@
#include <config.h>
#include <stdio.h>
#include "gettext.h"
#include <config.h>
#include <stdio.h>
#include "gettext.h"
-#include "command.h"
-#include "lexer.h"
-#include "moments.h"
+#include <language/command.h>
+#include <language/lexer/lexer.h>
+#include <math/moments.h>
+#include <math.h>
+#include <stdlib.h>
+#include "xalloc.h"
+#include <libpspp/compiler.h>
#define _(msgid) gettext (msgid)
#define _(msgid) gettext (msgid)
-static
int
+static
bool
read_values (double **values, double **weights, size_t *cnt)
{
size_t cap = 0;
read_values (double **values, double **weights, size_t *cnt)
{
size_t cap = 0;
@@
-44,7
+48,7
@@
read_values (double **values, double **weights, size_t *cnt)
if (!lex_is_number ())
{
lex_error (_("expecting weight value"));
if (!lex_is_number ())
{
lex_error (_("expecting weight value"));
- return
0
;
+ return
false
;
}
weight = tokval;
lex_get ();
}
weight = tokval;
lex_get ();
@@
-62,11
+66,11
@@
read_values (double **values, double **weights, size_t *cnt)
(*cnt)++;
}
(*cnt)++;
}
- return
1
;
+ return
true
;
}
int
}
int
-cmd_debug_moments (
void
)
+cmd_debug_moments (
struct dataset *ds UNUSED
)
{
int retval = CMD_FAILURE;
double *values = NULL;
{
int retval = CMD_FAILURE;
double *values = NULL;