/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2007, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2007, 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
#include <ctype.h>
#include <stdlib.h>
-#include <data/dictionary.h>
-#include <data/procedure.h>
-#include <data/variable.h>
-#include <language/command.h>
-#include <language/lexer/lexer.h>
-#include <libpspp/message.h>
-#include <libpspp/start-date.h>
-#include <libpspp/version.h>
-#include <output/text-item.h>
+#include "data/dictionary.h"
+#include "data/procedure.h"
+#include "data/variable.h"
+#include "language/command.h"
+#include "language/lexer/lexer.h"
+#include "libpspp/message.h"
+#include "libpspp/start-date.h"
+#include "libpspp/version.h"
+#include "output/text-item.h"
-#include "xalloc.h"
+#include "gl/xalloc.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
static int
parse_title (struct lexer *lexer, enum text_item_type type)
{
- int c;
-
- c = lex_look_ahead (lexer);
- if (c == '"' || c == '\'')
+ if (lex_look_ahead (lexer) == T_STRING)
{
lex_get (lexer);
if (!lex_force_string (lexer))
return CMD_FAILURE;
- set_title (ds_cstr (lex_tokstr (lexer)), type);
+ set_title (lex_tokcstr (lexer), type);
lex_get (lexer);
return lex_end_of_command (lexer);
}
while ( lex_is_string (lexer))
{
- dict_add_document_line (dict, ds_cstr (lex_tokstr (lexer)));
+ dict_add_document_line (dict, lex_tokcstr (lexer));
lex_get (lexer);
}