summaryrefslogtreecommitdiff
path: root/libstd/fmt.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-05-16 01:24:34 -0700
committerOri Bernstein <ori@eigenstate.org>2015-05-16 01:24:34 -0700
commit9fa7e376e33410e78fda13897bf8e0914f201ddf (patch)
treec3e1e6f004c5ee96712770153a6a267592ecf223 /libstd/fmt.myr
parent99bd0e314a7050f7ac4ae2c33207be08aa5c4507 (diff)
downloadmc-9fa7e376e33410e78fda13897bf8e0914f201ddf.tar.gz
Remove status arg from fatal.
We never set it to anything other than '1' anyways. There's no standardized error codes, so the exit status isn't really useful in any case.
Diffstat (limited to 'libstd/fmt.myr')
-rw-r--r--libstd/fmt.myr12
1 files changed, 6 insertions, 6 deletions
diff --git a/libstd/fmt.myr b/libstd/fmt.myr
index 9092cd1..bb2cf91 100644
--- a/libstd/fmt.myr
+++ b/libstd/fmt.myr
@@ -37,8 +37,8 @@ pkg std =
const bfmt : (buf : byte[:], fmt : byte[:], args : ... -> byte[:])
const bfmtv : (buf : byte[:], fmt : byte[:], ap : valist -> byte[:])
- $noret const fatal : (status : int, fmt : byte[:], args : ... -> void)
- $noret const fatalv : (status : int, fmt : byte[:], ap : valist -> void)
+ $noret const fatal : (fmt : byte[:], args : ... -> void)
+ $noret const fatalv : (fmt : byte[:], ap : valist -> void)
;;
/* Writes a string of text up to 2 kb in size to stdout */
@@ -63,15 +63,15 @@ const fputv = {fd, fmt, ap
}
/* same as 'put', but exits the program after printing */
-const fatal = {status, fmt, args
+const fatal = {fmt, args
putv(fmt, vastart(&args))
- exit(status)
+ exit(1)
}
/* same as 'putv', but exits the program after printing */
-const fatalv = {status, fmt, ap
+const fatalv = {fmt, ap
putv(fmt, ap)
- exit(status)
+ exit(1)
}
/* formats a string, allocating the slice. FIXME: calculate the