/* PSPP - a program for statistical analysis.
- Copyright (C) 2004, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2008, 2009, 2010 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
#include <config.h>
#include <gsl/gsl_cdf.h>
-#include <libpspp/message.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <language/dictionary/split-file.h>
#include <language/lexer/lexer.h>
#include <libpspp/compiler.h>
-#include <libpspp/hash.h>
#include <libpspp/message.h>
#include <libpspp/misc.h>
#include <libpspp/str.h>
np = result->metrics[v].np;
reader = casewriter_make_reader (np->writer);
npp = np_plot_create (np, reader, ds_cstr (&label));
- dnpp = np_plot_create (np, reader, ds_cstr (&label));
+ dnpp = dnp_plot_create (np, reader, ds_cstr (&label));
ds_destroy (&label);
}
statistic_destroy (&np->parent.parent);
+ casereader_destroy (reader);
}
}
}
xmn_custom_percentiles (struct lexer *lexer, struct dataset *ds UNUSED,
struct cmd_examine *p UNUSED, void *aux UNUSED)
{
- lex_match (lexer, '=');
+ lex_match (lexer, T_EQUALS);
- lex_match (lexer, '(');
+ lex_match (lexer, T_LPAREN);
while ( lex_is_number (lexer) )
{
lex_get (lexer);
- lex_match (lexer, ',') ;
+ lex_match (lexer, T_COMMA) ;
}
- lex_match (lexer, ')');
+ lex_match (lexer, T_RPAREN);
- lex_match (lexer, '=');
+ lex_match (lexer, T_EQUALS);
if ( lex_match_id (lexer, "HAVERAGE"))
percentile_algorithm = PC_HAVERAGE;
void *aux UNUSED)
{
const struct dictionary *dict = dataset_dict (ds);
- lex_match (lexer, '=');
+ lex_match (lexer, T_EQUALS);
- if ( (lex_token (lexer) != T_ID || dict_lookup_var (dict, lex_tokid (lexer)) == NULL)
+ if ( (lex_token (lexer) != T_ID || dict_lookup_var (dict, lex_tokcstr (lexer)) == NULL)
&& lex_token (lexer) != T_ALL)
{
return 2;
ll_init (&sf->result_list);
if ( (lex_token (lexer) != T_ID ||
- dict_lookup_var (dict, lex_tokid (lexer)) == NULL)
+ dict_lookup_var (dict, lex_tokcstr (lexer)) == NULL)
&& lex_token (lexer) != T_ALL)
{
free ( sf ) ;
lex_match (lexer, T_BY);
if ( (lex_token (lexer) != T_ID ||
- dict_lookup_var (dict, lex_tokid (lexer)) == NULL)
+ dict_lookup_var (dict, lex_tokcstr (lexer)) == NULL)
&& lex_token (lexer) != T_ALL)
{
free (sf);
else
ll_push_tail (&factor_list, &sf->ll);
- lex_match (lexer, ',');
+ lex_match (lexer, T_COMMA);
- if ( lex_token (lexer) == '.' || lex_token (lexer) == '/' )
+ if ( lex_token (lexer) == T_ENDCMD || lex_token (lexer) == T_SLASH )
return 1;
success = examine_parse_independent_vars (lexer, dict, cmd);