projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Consolidate quoting style in printed strings.
[pspp]
/
src
/
language
/
control
/
repeat.c
diff --git
a/src/language/control/repeat.c
b/src/language/control/repeat.c
index 32847bb4a9298bd100f0cb80e8489097adc7d8ca..cd88a1e141884121f691b812a496a19fb77f698f 100644
(file)
--- a/
src/language/control/repeat.c
+++ b/
src/language/control/repeat.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
, 2009
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
@@
-29,6
+29,7
@@
#include <language/command.h>
#include <language/lexer/lexer.h>
#include <language/lexer/variable-parser.h>
#include <language/command.h>
#include <language/lexer/lexer.h>
#include <language/lexer/variable-parser.h>
+#include <libpspp/cast.h>
#include <libpspp/ll.h>
#include <libpspp/message.h>
#include <libpspp/misc.h>
#include <libpspp/ll.h>
#include <libpspp/message.h>
#include <libpspp/misc.h>
@@
-168,12
+169,12
@@
parse_specification (struct lexer *lexer, struct repeat_block *block)
if (!lex_force_id (lexer))
return false;
if (dict_lookup_var (dict, lex_tokid (lexer)))
if (!lex_force_id (lexer))
return false;
if (dict_lookup_var (dict, lex_tokid (lexer)))
- msg (SW, _("Dummy variable name
\"%s\"
hides dictionary "
- "variable
\"%s\"
."),
+ msg (SW, _("Dummy variable name
`%s'
hides dictionary "
+ "variable
`%s'
."),
lex_tokid (lexer), lex_tokid (lexer));
if (find_macro (block, ss_cstr (lex_tokid (lexer))))
{
lex_tokid (lexer), lex_tokid (lexer));
if (find_macro (block, ss_cstr (lex_tokid (lexer))))
{
- msg (SE, _("Dummy variable name
\"%s\"
is given twice."),
+ msg (SE, _("Dummy variable name
`%s'
is given twice."),
lex_tokid (lexer));
return false;
}
lex_tokid (lexer));
return false;
}
@@
-219,8
+220,8
@@
parse_specification (struct lexer *lexer, struct repeat_block *block)
}
else if (block->loop_cnt != count)
{
}
else if (block->loop_cnt != count)
{
- msg (SE, _("Dummy variable
\"%.*s\"
had %d "
- "substitutions, so
\"%.*s\"
must also, but %d "
+ msg (SE, _("Dummy variable
`%.*s'
had %d "
+ "substitutions, so
`%.*s'
must also, but %d "
"were specified."),
(int) ss_length (first_name), ss_data (first_name),
block->loop_cnt,
"were specified."),
(int) ss_length (first_name), ss_data (first_name),
block->loop_cnt,
@@
-512,10
+513,10
@@
find_substitution (struct repeat_block *block, struct substring name)
/* Makes appropriate DO REPEAT macro substitutions within the
repeated lines. */
static void
/* Makes appropriate DO REPEAT macro substitutions within the
repeated lines. */
static void
-do_repeat_filter (struct getl_interface *block_,
- struct string *line)
+do_repeat_filter (struct getl_interface *interface, struct string *line)
{
{
- struct repeat_block *block = (struct repeat_block *) block_;
+ struct repeat_block *block
+ = UP_CAST (interface, struct repeat_block, parent);
bool in_apos, in_quote, dot;
struct substring input;
struct string output;
bool in_apos, in_quote, dot;
struct substring input;
struct string output;
@@
-557,7
+558,8
@@
do_repeat_filter (struct getl_interface *block_,
static struct repeat_line *
current_line (const struct getl_interface *interface)
{
static struct repeat_line *
current_line (const struct getl_interface *interface)
{
- struct repeat_block *block = (struct repeat_block *) interface;
+ struct repeat_block *block
+ = UP_CAST (interface, struct repeat_block, parent);
return (block->cur_line != ll_null (&block->lines)
? ll_data (block->cur_line, struct repeat_line, ll)
: NULL);
return (block->cur_line != ll_null (&block->lines)
? ll_data (block->cur_line, struct repeat_line, ll)
: NULL);
@@
-570,7
+572,8
@@
static bool
do_repeat_read (struct getl_interface *interface,
struct string *output)
{
do_repeat_read (struct getl_interface *interface,
struct string *output)
{
- struct repeat_block *block = (struct repeat_block *) interface;
+ struct repeat_block *block
+ = UP_CAST (interface, struct repeat_block, parent);
struct repeat_line *line;
block->cur_line = ll_next (block->cur_line);
struct repeat_line *line;
block->cur_line = ll_next (block->cur_line);
@@
-591,9
+594,10
@@
do_repeat_read (struct getl_interface *interface,
/* Frees a DO REPEAT block.
Called by getl to close out the DO REPEAT block. */
static void
/* Frees a DO REPEAT block.
Called by getl to close out the DO REPEAT block. */
static void
-do_repeat_close (struct getl_interface *
block_
)
+do_repeat_close (struct getl_interface *
interface
)
{
{
- struct repeat_block *block = (struct repeat_block *) block_;
+ struct repeat_block *block
+ = UP_CAST (interface, struct repeat_block, parent);
pool_destroy (block->pool);
}
pool_destroy (block->pool);
}