X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Ftests%2Fformat-guesser-test.c;h=0900ebd817d75991ee61fe168fa5d4bb19e7e778;hb=3d188ce69f19490938b8e961f289a050f648f39d;hp=6285fc042c04a07cac583e68a38c814921ab4022;hpb=a258e53c63a08b0ec48aea8f03808eb651729424;p=pspp diff --git a/src/language/tests/format-guesser-test.c b/src/language/tests/format-guesser-test.c index 6285fc042c..0900ebd817 100644 --- a/src/language/tests/format-guesser-test.c +++ b/src/language/tests/format-guesser-test.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2008, 2010 Free Software Foundation, Inc. + Copyright (C) 2008, 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 @@ -18,11 +18,11 @@ #include -#include -#include -#include -#include -#include +#include "data/format.h" +#include "data/format-guesser.h" +#include "language/command.h" +#include "language/lexer/lexer.h" +#include "libpspp/message.h" /* Executes the DEBUG FORMAT GUESSER command. */ int @@ -35,8 +35,8 @@ cmd_debug_format_guesser (struct lexer *lexer, struct dataset *ds UNUSED) g = fmt_guesser_create (); while (lex_is_string (lexer)) { - fprintf (stderr, "\"%s\" ", ds_cstr (lex_tokstr (lexer))); - fmt_guesser_add (g, ds_ss (lex_tokstr (lexer))); + fprintf (stderr, "\"%s\" ", lex_tokcstr (lexer)); + fmt_guesser_add (g, lex_tokss (lexer)); lex_get (lexer); } @@ -52,6 +52,7 @@ cmd_debug_format_guesser (struct lexer *lexer, struct dataset *ds UNUSED) } msg_enable (); putc ('\n', stderr); + fmt_guesser_destroy (g); - return lex_end_of_command (lexer); + return CMD_SUCCESS; }