X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fglm.c;h=e09382a5c5ceb9c297efd92c65bc28e817e45dbb;hb=2be9bee9da6a2ce27715e58128569594319abfa2;hp=1acf03ffb0a098655fd9a9ea2727a0a57a0cdf32;hpb=4399391aa1efe1cf6cbbcfde90ff52d7f88c9c40;p=pspp-builds.git diff --git a/src/language/stats/glm.c b/src/language/stats/glm.c index 1acf03ff..e09382a5 100644 --- a/src/language/stats/glm.c +++ b/src/language/stats/glm.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 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 @@ -16,38 +16,31 @@ #include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - #include +#include #include -#include -#include - -#include +#include "data/case.h" +#include "data/casegrouper.h" +#include "data/casereader.h" +#include "data/dataset.h" +#include "data/dictionary.h" +#include "data/format.h" +#include "data/value.h" +#include "language/command.h" +#include "language/dictionary/split-file.h" +#include "language/lexer/lexer.h" +#include "language/lexer/value-parser.h" +#include "language/lexer/variable-parser.h" +#include "libpspp/ll.h" +#include "libpspp/message.h" +#include "libpspp/misc.h" +#include "libpspp/taint.h" +#include "linreg/sweep.h" +#include "math/categoricals.h" +#include "math/covariance.h" +#include "math/moments.h" +#include "output/tab.h" #include "gettext.h" #define _(msgid) gettext (msgid) @@ -112,14 +105,14 @@ cmd_glm (struct lexer *lexer, struct dataset *ds) struct const_var_set *factors = const_var_set_create_from_array (glm.factor_vars, glm.n_factor_vars); - while (lex_token (lexer) != '.') + while (lex_token (lexer) != T_ENDCMD) { - lex_match (lexer, '/'); + lex_match (lexer, T_SLASH); if (lex_match_id (lexer, "MISSING")) { - lex_match (lexer, '='); - while (lex_token (lexer) != '.' && lex_token (lexer) != '/') + lex_match (lexer, T_EQUALS); + while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "INCLUDE")) { @@ -138,8 +131,8 @@ cmd_glm (struct lexer *lexer, struct dataset *ds) } else if (lex_match_id (lexer, "INTERCEPT")) { - lex_match (lexer, '='); - while (lex_token (lexer) != '.' && lex_token (lexer) != '/') + lex_match (lexer, T_EQUALS); + while (lex_token (lexer) != T_ENDCMD && lex_token (lexer) != T_SLASH) { if (lex_match_id (lexer, "INCLUDE")) { @@ -160,7 +153,7 @@ cmd_glm (struct lexer *lexer, struct dataset *ds) { size_t n_des; const struct variable **des; - lex_match (lexer, '='); + lex_match (lexer, T_EQUALS); parse_const_var_set_vars (lexer, factors, &des, &n_des, 0); } @@ -263,6 +256,8 @@ run_glm (const struct glm_spec *cmd, struct casereader *input, const struct data reg_sweep (cm, 0); dump_matrix (cm); + + gsl_matrix_free (cm); } if (!taint_has_tainted_successor (taint))