diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-02-06 06:37:35 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-02-06 06:37:35 -0800 |
commit | b0d0ba0657ff67cdc29bee3b305c3c72f55725f7 (patch) | |
tree | cc24376e8562f90d305a0d0295fda29504c3c28e /sysif.c | |
parent | 3286f2ca94da081bca5ddeffdfcc6ec92adf237c (diff) | |
download | txr-b0d0ba0657ff67cdc29bee3b305c3c72f55725f7.tar.gz txr-b0d0ba0657ff67cdc29bee3b305c3c72f55725f7.tar.bz2 txr-b0d0ba0657ff67cdc29bee3b305c3c72f55725f7.zip |
* sysif.c (abort_wrap): New static function.
(sysif_init): Registered abort intrinsic.
* txr.1: Documented abort. Changed Unix Programming heading
to System Programming, since exit, abort and errno are not
Unix-specific, but C-specific.
* tl.vim, txr.vim: Updated.
Diffstat (limited to 'sysif.c')
-rw-r--r-- | sysif.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -93,6 +93,11 @@ static val exit_wrap(val status) return nil; } +static val abort_wrap(void) +{ + abort(); +} + static val usleep_wrap(val usec) { val retval; @@ -365,6 +370,7 @@ void sysif_init(void) { reg_fun(intern(lit("errno"), user_package), func_n1o(errno_wrap, 0)); reg_fun(intern(lit("exit"), user_package), func_n1(exit_wrap)); + reg_fun(intern(lit("abort"), user_package), func_n0(abort_wrap)); reg_fun(intern(lit("usleep"), user_package), func_n1(usleep_wrap)); #if HAVE_UNISTD_H reg_fun(intern(lit("getpid"), user_package), func_n0(getpid_wrap)); |