mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Require @(init) and @(fini) to be proc "contextless" ()
This commit is contained in:
@@ -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" () { }
|
||||
|
||||
Reference in New Issue
Block a user