diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-01 11:14:58 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-01 11:14:58 +0300 |
commit | 78b25d9756403fef919684738f7aecb2cdcee465 (patch) | |
tree | d43f312f8f994be9d485dcc9c7c8ded3f415898f /etc | |
parent | f2ce145a8d27d18db064fc35313b7495f868b18b (diff) | |
download | eclat-78b25d9756403fef919684738f7aecb2cdcee465.tar.gz eclat-78b25d9756403fef919684738f7aecb2cdcee465.tar.bz2 |
Implement get-console-output command.
* etc/Makefile.am: Add new files.
* etc/get-console-output.fln: New file.
* lib/forlan.c: New built-in function "decode".
* lib/forlangrm.y: Fix grammar to allow functions to
return any data type, not only node.
* src/Makefile.am (eclat_SOURCES): Add new files.
* src/eclat.c: Register get-console-output command.
* src/eclat.h (eclat_get_console_output): New proto.
* src/getconout.c: New file.
* tests/Makefile.am: Add new files.
* tests/testsuite.at: Include new files.
* tests/decode.at: New test case.
* tests/get-console-output.at: New test case.
* tests/last.at: Minor change.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/Makefile.am | 1 | ||||
-rw-r--r-- | etc/get-console-output.fln | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/etc/Makefile.am b/etc/Makefile.am index 2b1c84d..6ef5e1a 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -24,6 +24,7 @@ FLNFILES=\ describe-instances.fln\ describe-tags.fln\ describe-volumes.fln\ + get-console-output.fln\ reboot-instances.fln\ start-instances.fln\ stop-instances.fln diff --git a/etc/get-console-output.fln b/etc/get-console-output.fln new file mode 100644 index 0000000..382ffba --- /dev/null +++ b/etc/get-console-output.fln @@ -0,0 +1,18 @@ +/* This file is part of Eclat. + Copyright (C) 2012 Sergey Poznyakoff. + + Eclat 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 3, or (at your option) + any later version. + + Eclat 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 Eclat. If not, see <http://www.gnu.org/licenses/>. */ + +if (.GetConsoleOutputResponse.output) + print(decode(last), "\n");
\ No newline at end of file |