diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-07 00:44:47 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-07 00:44:47 -0400 |
| commit | cf7ea6fbef55e217da5289b80b6551737e534083 (patch) | |
| tree | 4ad0a3754b32788e96bd4d9eedce2df1a8788992 /builtins/functions.c | |
| parent | 2bc948567e51e2c79cc703968e59c4caccb4b176 (diff) | |
Add exit() function
Diffstat (limited to 'builtins/functions.c')
| -rw-r--r-- | builtins/functions.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/builtins/functions.c b/builtins/functions.c index bfa9465f..93c4abff 100644 --- a/builtins/functions.c +++ b/builtins/functions.c @@ -257,6 +257,13 @@ public void say(Text_t text, bool newline) fflush(stdout); } +public _Noreturn void tomo_exit(Text_t text, int32_t status) +{ + if (text.length > 0) + say(text, true); + _exit(status); +} + public Text_t ask(Text_t prompt, bool bold, bool force_tty) { Text_t ret = Text(""); |
