mirror of
https://github.com/janet-lang/janet
synced 2024-12-25 07:50:27 +00:00
Remove exit in favor of os-exit.
This commit is contained in:
parent
e21a69920f
commit
0d5b57daee
@ -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}
|
||||
};
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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))
|
||||
})
|
||||
|
||||
|
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user