+Wed Apr 27 07:44:57 WST 2005 John Darrington <john@darrington.wattle.id.au>
+
+ * utilities.texi: Added the ECHO command.
+
Fri Apr 15 18:35:42 2005 Ben Pfaff <blp@gnu.org>
* pspp.texinfo: Change manual license to GNU FDL, pursuant to
* DISPLAY DOCUMENTS:: Display active file documents.
* DISPLAY FILE LABEL:: Display the active file label.
* DROP DOCUMENTS:: Remove documents from the active file.
+* ECHO:: Write a string to the output stream.
* ERASE:: Erase a file.
* EXECUTE:: Execute pending transformations.
* FILE LABEL:: Set the active file's label.
active file,
if any. @xref{FILE LABEL}.
-@node DROP DOCUMENTS, ERASE, DISPLAY FILE LABEL, Utilities
+@node DROP DOCUMENTS, ECHO, DISPLAY FILE LABEL, Utilities
@section DROP DOCUMENTS
@vindex DROP DOCUMENTS
@cmd{DROP DOCUMENTS} changes only the active file. It does not modify any
system files stored on disk.
+@node ECHO, ERASE, DROP DOCUMENTS, Utilities
+@section ECHO
+@vindex ECHO
-@node ERASE, EXECUTE, DROP DOCUMENTS, Utilities
+@display
+ECHO 'arbitrary text' .
+@end display
+
+Use @cmd{ECHO} to write arbitrary text to the output stream. The text should be enclosed in quotation marks following the normal rules for string tokens (@pxref{Tokens}).
+
+@node ERASE, EXECUTE, ECHO, Utilities
@comment node-name, next, previous, up
@section ERASE
@vindex ERASE
msgstr ""
"Project-Id-Version: PSPP 0.3.1\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2005-04-25 22:30-0700\n"
+"POT-Creation-Date: 2005-04-27 07:45+0800\n"
"PO-Revision-Date: 2004-01-23 13:04+0800\n"
"Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
"Language-Team: John Darrington <john@darrington.wattle.id.au>\n"
msgid "installation error"
msgstr ""
+#: src/filename.c:221
+#, c-format
+msgid "Searching for `%s'..."
+msgstr ""
+
+#: src/filename.c:229 src/filename.c:261
+msgid "Search unsuccessful!"
+msgstr ""
+
+#: src/filename.c:254
+#, c-format
+msgid "Found `%s'."
+msgstr ""
+
+#: src/filename.c:686
+#, c-format
+msgid "Not opening pipe file `%s' because SAFER option set."
+msgstr ""
+
#: src/file-type.c:129
msgid "MIXED, GROUPED, or NESTED expected."
msgstr ""
msgid "Unknown record type %g."
msgstr ""
-#: src/filename.c:221
-#, c-format
-msgid "Searching for `%s'..."
-msgstr ""
-
-#: src/filename.c:229 src/filename.c:261
-msgid "Search unsuccessful!"
-msgstr ""
-
-#: src/filename.c:254
-#, c-format
-msgid "Found `%s'."
-msgstr ""
-
-#: src/filename.c:686
-#, c-format
-msgid "Not opening pipe file `%s' because SAFER option set."
-msgstr ""
-
#: src/flip.c:82
msgid ""
"FLIP ignores TEMPORARY. Temporary transformations will be made permanent."
"commands."
msgstr ""
-#: src/title.c:56
+#: src/title.c:57
#, c-format
msgid "%s before: %s\n"
msgstr ""
-#: src/title.c:56
+#: src/title.c:57
msgid "<none>"
msgstr ""
-#: src/title.c:68
+#: src/title.c:69
#, c-format
msgid "%s: `.' expected after string."
msgstr ""
-#: src/title.c:84
+#: src/title.c:85
#, c-format
msgid "%s after: %s\n"
msgstr ""
-#: src/title.c:140
+#: src/title.c:141
#, c-format
msgid "Document entered %s %02d:%02d:%02d by %s (%s):"
msgstr ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2005-04-25 22:30-0700\n"
+"POT-Creation-Date: 2005-04-27 07:45+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "installation error"
msgstr ""
+#: src/filename.c:221
+#, c-format
+msgid "Searching for `%s'..."
+msgstr ""
+
+#: src/filename.c:229 src/filename.c:261
+msgid "Search unsuccessful!"
+msgstr ""
+
+#: src/filename.c:254
+#, c-format
+msgid "Found `%s'."
+msgstr ""
+
+#: src/filename.c:686
+#, c-format
+msgid "Not opening pipe file `%s' because SAFER option set."
+msgstr ""
+
#: src/file-type.c:129
msgid "MIXED, GROUPED, or NESTED expected."
msgstr ""
msgid "Unknown record type %g."
msgstr ""
-#: src/filename.c:221
-#, c-format
-msgid "Searching for `%s'..."
-msgstr ""
-
-#: src/filename.c:229 src/filename.c:261
-msgid "Search unsuccessful!"
-msgstr ""
-
-#: src/filename.c:254
-#, c-format
-msgid "Found `%s'."
-msgstr ""
-
-#: src/filename.c:686
-#, c-format
-msgid "Not opening pipe file `%s' because SAFER option set."
-msgstr ""
-
#: src/flip.c:82
msgid ""
"FLIP ignores TEMPORARY. Temporary transformations will be made permanent."
"commands."
msgstr ""
-#: src/title.c:56
+#: src/title.c:57
#, c-format
msgid "%s before: %s\n"
msgstr ""
-#: src/title.c:56
+#: src/title.c:57
msgid "<none>"
msgstr ""
-#: src/title.c:68
+#: src/title.c:69
#, c-format
msgid "%s: `.' expected after string."
msgstr ""
-#: src/title.c:84
+#: src/title.c:85
#, c-format
msgid "%s after: %s\n"
msgstr ""
-#: src/title.c:140
+#: src/title.c:141
#, c-format
msgid "Document entered %s %02d:%02d:%02d by %s (%s):"
msgstr ""
+Wed Apr 27 07:43:50 WST 2005 John Darrington <john@darrington.wattle.id.au>
+
+ * command.def echo.c: Added the ECHO command.
+
Mon Apr 25 22:55:59 2005 Ben Pfaff <blp@gnu.org>
Finish fixing MATCH FILES (PR 11677).
command.h compute.c copyleft.c copyleft.h count.c data-in.c data-in.h \
data-list.c data-list.h data-out.c date.c debug-print.h descript.c \
devind.c devind.h dfm-read.c dfm-read.h dfm-write.c dfm-write.h \
-dictionary.c dictionary.h do-if.c do-ifP.h error.c \
+dictionary.c dictionary.h do-if.c do-ifP.h echo.c error.c \
error.h factor_stats.c factor_stats.h file-handle.h \
file-type.c filename.c filename.h flip.c font.h format.c format.def \
format.h formats.c get.c getline.c getline.h glob.c glob.h \
DEFCMD ("DO IF", ERRO, INPU, TRAN, TRAN, cmd_do_if)
DEFCMD ("DO REPEAT", ERRO, INPU, TRAN, TRAN, cmd_do_repeat)
DEFCMD ("DROP DOCUMENTS", INIT, INPU, TRAN, PROC, cmd_drop_documents)
+DEFCMD ("ECHO", INIT, INPU, TRAN, PROC, cmd_echo)
UNIMPL ("EDIT", ERRO, ERRO, ERRO, ERRO)
DEFCMD ("ELSE", ERRO, INPU, TRAN, TRAN, cmd_else)
DEFCMD ("ELSE IF", ERRO, INPU, TRAN, TRAN, cmd_else_if)
--- /dev/null
+/* PSPP - computes sample statistics. -*-c-*-
+
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ Written by John Darrington 2005
+
+ 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 the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#include <config.h>
+#include "error.h"
+#include "alloc.h"
+#include "str.h"
+#include "lexer.h"
+#include "command.h"
+#include "tab.h"
+#include "som.h"
+
+/* Echos a string to the output stream */
+int
+cmd_echo(void)
+{
+ struct tab_table *tab;
+
+ if (token != T_STRING)
+ return CMD_FAILURE;
+
+ tab = tab_create(1, 1, 0);
+
+ tab_dim (tab, tab_natural_dimensions);
+ tab_flags (tab, SOMF_NO_TITLE );
+
+ tab_text(tab, 0, 0, 0, tokstr.string);
+
+ tab_submit(tab);
+
+ return CMD_SUCCESS;
+}