/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2009, 2010, 2011, 2012, 2013, 2014 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/i18n.h"
#include "libpspp/message.h"
#include "libpspp/str.h"
-#include "output/text-item.h"
+#include "output/output-item.h"
-#include "xalloc.h"
#include "xmalloca.h"
#include "gettext.h"
result = CMD_FAILURE;
goto finish;
}
- text_item_submit (text_item_create (TEXT_ITEM_COMMAND_OPEN, command->name));
+ output_item_submit (group_open_item_create_nocopy (
+ utf8_to_title (command->name),
+ utf8_to_title (command->name)));
opened = true;
if (command->function == NULL)
result = lex_end_of_command (lexer);
lex_discard_rest_of_command (lexer);
- while (lex_token (lexer) == T_ENDCMD)
- lex_get (lexer);
+ if (result != CMD_EOF && result != CMD_FINISH)
+ while (lex_token (lexer) == T_ENDCMD)
+ lex_get (lexer);
if (opened)
- text_item_submit (text_item_create (TEXT_ITEM_COMMAND_CLOSE,
- command->name));
+ output_item_submit (group_close_item_create ());
return result;
}
command->name, "FILE TYPE");
break;
case S_INPUT_PROGRAM | S_FILE_TYPE:
- msg (SE, _("%s is allowed only inside %s or inside %s."), command->name,
+ msg (SE, _("%s is allowed only inside %s or inside %s."), command->name,
"INPUT PROGRAM", "FILE TYPE");
break;
}
else if (state == CMD_STATE_INPUT_PROGRAM)
msg (SE, _("%s is not allowed inside %s."),
- command->name, "INPUT PROGRAM" );
+ command->name, "INPUT PROGRAM");
else if (state == CMD_STATE_FILE_TYPE)
msg (SE, _("%s is not allowed inside %s."), command->name, "FILE TYPE");