/* PSPP - a program for statistical analysis.
- Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2007, 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 <libpspp/compiler.h>
#include <libpspp/taint.h>
#include <math/sort.h>
-#include <output/manager.h>
-#include <output/table.h>
+#include <output/tab.h>
#include <gsl/gsl_cdf.h>
int v;
tab_output_text (0, _("Variables Created By RANK"));
- tab_output_text (0, "\n");
+ tab_output_text (0, "");
for (i = 0 ; i < n_rank_specs ; ++i )
{
static int
rank_custom_variables (struct lexer *lexer, struct dataset *ds, struct cmd_rank *cmd UNUSED, void *aux UNUSED)
{
- lex_match (lexer, '=');
+ lex_match (lexer, T_EQUALS);
- if ((lex_token (lexer) != T_ID || dict_lookup_var (dataset_dict (ds), lex_tokid (lexer)) == NULL)
+ if ((lex_token (lexer) != T_ID || dict_lookup_var (dataset_dict (ds), lex_tokcstr (lexer)) == NULL)
&& lex_token (lexer) != T_ALL)
return 2;
if ( lex_match (lexer, T_BY) )
{
- if ((lex_token (lexer) != T_ID || dict_lookup_var (dataset_dict (ds), lex_tokid (lexer)) == NULL))
+ if ((lex_token (lexer) != T_ID || dict_lookup_var (dataset_dict (ds), lex_tokcstr (lexer)) == NULL))
{
return 2;
}
while( lex_token (lexer) == T_ID )
{
- if ( dict_lookup_var (dict, lex_tokid (lexer)) != NULL )
+ if ( dict_lookup_var (dict, lex_tokcstr (lexer)) != NULL )
{
- msg(SE, _("Variable %s already exists."), lex_tokid (lexer));
+ msg(SE, _("Variable %s already exists."), lex_tokcstr (lexer));
return 0;
}
if ( var_count >= subcase_get_n_fields (&sc) )
return 0;
}
- destvar = create_rank_variable (dict, f, src_vars[var_count], lex_tokid (lexer));
+ destvar = create_rank_variable (dict, f, src_vars[var_count], lex_tokcstr (lexer));
rank_specs[n_rank_specs - 1].destvars[var_count] = destvar ;
lex_get (lexer);
{
struct dictionary *dict = dataset_dict (ds);
- if ( lex_force_match (lexer, '(') )
+ if ( lex_force_match (lexer, T_LPAREN) )
{
if ( lex_force_int (lexer) )
{
k_ntiles = lex_integer (lexer);
lex_get (lexer);
- lex_force_match (lexer, ')');
+ lex_force_match (lexer, T_RPAREN);
}
else
return 0;