Require @(init) and @(fini) to be proc "contextless" ()

This commit is contained in:
gingerBill
2025-08-08 12:10:01 +01:00
parent 3194fda8f3
commit 7642e0a0e0
47 changed files with 170 additions and 102 deletions
+5 -3
View File
@@ -2,15 +2,17 @@
#+build linux, darwin, netbsd, openbsd, freebsd, haiku
package terminal
import "base:runtime"
import "core:os"
import "core:sys/posix"
_is_terminal :: proc(handle: os.Handle) -> bool {
_is_terminal :: proc "contextless" (handle: os.Handle) -> bool {
return bool(posix.isatty(posix.FD(handle)))
}
_init_terminal :: proc() {
_init_terminal :: proc "contextless" () {
context = runtime.default_context()
color_depth = get_environment_color()
}
_fini_terminal :: proc() { }
_fini_terminal :: proc "contextless" () { }