projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc: Document that type-7 records must appear in ascending numerical order.
[pspp-builds.git]
/
src
/
language
/
utilities
/
title.c
diff --git
a/src/language/utilities/title.c
b/src/language/utilities/title.c
index fe826db155dadb8ad1b5cd97d2df7709399171ba..82f7be50f5341b5b8cdddf69d0aba116dbafd302 100644
(file)
--- a/
src/language/utilities/title.c
+++ b/
src/language/utilities/title.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2007
, 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
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
@@
-52,15
+52,12
@@
cmd_subtitle (struct lexer *lexer, struct dataset *ds UNUSED)
static int
parse_title (struct lexer *lexer, enum text_item_type type)
{
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;
{
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);
}
lex_get (lexer);
return lex_end_of_command (lexer);
}
@@
-117,7
+114,7
@@
cmd_document (struct lexer *lexer, struct dataset *ds)
end_dot = lex_end_dot (lexer);
ds_assign_string (&line, lex_entire_line_ds (lexer));
if (end_dot)
end_dot = lex_end_dot (lexer);
ds_assign_string (&line, lex_entire_line_ds (lexer));
if (end_dot)
- ds_put_
char
(&line, '.');
+ ds_put_
byte
(&line, '.');
dict_add_document_line (dict, ds_cstr (&line));
lex_discard_line (lexer);
dict_add_document_line (dict, ds_cstr (&line));
lex_discard_line (lexer);
@@
-152,7
+149,7
@@
cmd_add_documents (struct lexer *lexer, struct dataset *ds)
while ( lex_is_string (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);
}
lex_get (lexer);
}