diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-01 16:43:18 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-01 16:58:20 +0300 |
commit | ddb280198adcada561b8e72c79b92d50a05b3e78 (patch) | |
tree | de6f2d47fe10d0fb37279893d17ffcbd30b156ce /etc | |
parent | 78b25d9756403fef919684738f7aecb2cdcee465 (diff) | |
download | eclat-ddb280198adcada561b8e72c79b92d50a05b3e78.tar.gz eclat-ddb280198adcada561b8e72c79b92d50a05b3e78.tar.bz2 |
Implement exit; add some docs.
* Makefile.am (SUBDIRS): Add doc.
* configure.ac: Build doc/Makefile
* doc/Makefile.am: New file.
* doc/eclat-associate-address.1: New file.
* doc/eclat.1: New file.
* etc/associate-address.fln: Call exit if the request fails.
* etc/default.fln: Call exit if error is returned or if the
response is not recognized.
* lib/forlan.c (forlan_eval_env) <exit_code>: New member.
New built-in function: exit.
(forlan_run): Return exit code.
* lib/forlan.h (forlan_run): Change return type.
* lib/forlanlex.l: Treat unquoted decimal number as
a quoted string.
* src/asscaddr-cl.opt: Minor changes.
* src/cmdline.opt: Minor changes.
* src/eclat.c: Return EX_NOPERM on unsufficient permissions
to open the configuration file.
* tests/exit.at: New file.
* tests/Makefile.am: Add new files.
* tests/testsuite.at: Include new test cases.
* tests/tforlan.c: Propagate the return from forlan_run to
the shell.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/associate-address.fln | 4 | ||||
-rw-r--r-- | etc/default.fln | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/etc/associate-address.fln b/etc/associate-address.fln index 4c5d5d1..5c20a20 100644 --- a/etc/associate-address.fln +++ b/etc/associate-address.fln @@ -15,6 +15,8 @@ along with Eclat. If not, see <http://www.gnu.org/licenses/>. */ if (.AssociateAddressResponse.return) { - if (!.AssociateAddressResponse.return[true]) + if (!.AssociateAddressResponse.return[true]) { error("Return: ",.AssociateAddressResponse.return,"\n"); + exit(1); + } } diff --git a/etc/default.fln b/etc/default.fln index 2e2f690..9a6f140 100644 --- a/etc/default.fln +++ b/etc/default.fln @@ -14,9 +14,11 @@ You should have received a copy of the GNU General Public License along with Eclat. If not, see <http://www.gnu.org/licenses/>. */ -if (.Response.Errors) +if (.Response.Errors) { error("Error: ",.Response.Errors.Error.Message,"\n"); -else { + exit(1); +} else { error("Unrecognized response:\n"); dump(.); + exit(2); } |