1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-24 17:27:18 +00:00

Remove exit in favor of os-exit.

This commit is contained in:
Calvin Rose 2018-03-28 21:24:54 -04:00
parent e21a69920f
commit 0d5b57daee
5 changed files with 3 additions and 15 deletions

View File

@ -56,7 +56,6 @@ static const DstReg cfuns[] = {
{"next", dst_core_next},
{"hash", dst_core_hash},
{"string-slice", dst_core_string_slice},
{"exit", dst_core_exit},
{NULL, NULL}
};

View File

@ -23,15 +23,6 @@
#include <dst/dst.h>
#include <dst/dstcorelib.h>
int dst_core_exit(DstArgs args) {
int32_t exitcode = 0;
if (args.n > 0) {
exitcode = dst_hash(args.v[0]);
}
exit(exitcode);
return 0;
}
int dst_core_print(DstArgs args) {
int32_t i;
for (i = 0; i < args.n; ++i) {

View File

@ -77,7 +77,6 @@ int dst_ceil(DstArgs args);
int dst_pow(DstArgs args);
/* Misc core functions */
int dst_core_exit(DstArgs args);
int dst_core_print(DstArgs args);
int dst_core_describe(DstArgs args);
int dst_core_string(DstArgs args);

View File

@ -11,8 +11,8 @@
(print " -h Show this help")
(print " -v Print the version string")
(print " -r Enter the repl after running all scripts")
(exit 0))
"v" (fn [] (print VERSION) (exit 0))
(os-exit 0))
"v" (fn [] (print VERSION) (os-exit 0))
"r" (fn [] (:= *should-repl* true))
})

View File

@ -19,5 +19,4 @@
(defn end-suite []
(print "\nTest suite " suite-num " finished.")
(print num-tests-passed " of " num-tests-run " tests passed.\n")
(if (not= num-tests-passed num-tests-run) (exit 1)))
(if (not= num-tests-passed num-tests-run) (os-exit 1)))