[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[misc 14/18] ECHO: Use text_item, as intended.
From: |
Ben Pfaff |
Subject: |
[misc 14/18] ECHO: Use text_item, as intended. |
Date: |
Sat, 11 Dec 2010 22:20:08 -0800 |
TEXT_ITEM_ECHO is meant for use by ECHO but it had been overlooked
accidentally until now.
---
src/language/utilities/echo.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/src/language/utilities/echo.c b/src/language/utilities/echo.c
index 149cc0e..88ece63 100644
--- a/src/language/utilities/echo.c
+++ b/src/language/utilities/echo.c
@@ -15,28 +15,24 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
-#include <libpspp/message.h>
-#include <libpspp/str.h>
-#include <language/lexer/lexer.h>
-#include <language/command.h>
-#include <output/tab.h>
-#include "xalloc.h"
+#include "language/command.h"
+#include "language/lexer/lexer.h"
+#include "libpspp/message.h"
+#include "libpspp/str.h"
+#include "output/text-item.h"
+
+#include "gl/xalloc.h"
/* Echos a string to the output stream */
int
cmd_echo (struct lexer *lexer, struct dataset *ds UNUSED)
{
- struct tab_table *tab;
-
if (!lex_force_string (lexer))
return CMD_FAILURE;
- tab = tab_create(1, 1);
-
- tab_text (tab, 0, 0, 0, lex_tokcstr (lexer));
-
- tab_submit(tab);
+ text_item_submit (text_item_create (TEXT_ITEM_ECHO, lex_tokcstr (lexer)));
+ lex_get (lexer);
return CMD_SUCCESS;
}
--
1.7.1
- [misc 00/18] miscellaneous minor improvements, Ben Pfaff, 2010/12/12
- [misc 06/18] expressions: Make extract_min_valid() parameter const., Ben Pfaff, 2010/12/12
- [misc 01/18] friedman: Fix GCC warning about uninitialized fr.w., Ben Pfaff, 2010/12/12
- [misc 15/18] i18n: Remove unnecessary #ifs., Ben Pfaff, 2010/12/12
- [misc 12/18] DO REPEAT: Make this command usable anywhere., Ben Pfaff, 2010/12/12
- [misc 16/18] AGGREGATE: Align arg_func_tab[] in columns., Ben Pfaff, 2010/12/12
- [misc 10/18] NPAR TESTS: Prefer lex_match_id() over lex_match_hyphenated_word(), Ben Pfaff, 2010/12/12
- [misc 14/18] ECHO: Use text_item, as intended.,
Ben Pfaff <=
- [misc 04/18] covariance: Fix const-ness of covariance_calculate[_unnormalized] retval., Ben Pfaff, 2010/12/12
- [misc 08/18] DEBUG XFORM FAIL: Issue an error message as part of transformation., Ben Pfaff, 2010/12/12
- [misc 18/18] value-parser: Remove redundant call to lex_force_string() in parse_value()., Ben Pfaff, 2010/12/12
- [misc 17/18] GET DATA: Fix punctuation in error message., Ben Pfaff, 2010/12/12
- [misc 07/18] INPUT PROGRAM: Remove unused enumeration., Ben Pfaff, 2010/12/12
- [misc 03/18] ONEWAY: Fix warning for passing "const" pointer as non-const parameter., Ben Pfaff, 2010/12/12
- [misc 09/18] q2c: Prefer lex_match_id() over lex_match_hyphenated_word() in emitted code., Ben Pfaff, 2010/12/12
- [misc 02/18] mann-whitney: Suppress GCC warning about unused parameter., Ben Pfaff, 2010/12/12
- [misc 05/18] categoricals: Make parameter to categoricals_done() const., Ben Pfaff, 2010/12/12
- [misc 13/18] float-format: Don't translate test strings., Ben Pfaff, 2010/12/12