mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-29 08:21:32 +00:00
19 lines
393 B
Odin
19 lines
393 B
Odin
#+private
|
|
#+build linux, darwin, netbsd, openbsd, freebsd
|
|
package terminal
|
|
|
|
import "base:runtime"
|
|
import "core:os"
|
|
|
|
_is_terminal :: proc "contextless" (f: ^os.File) -> bool {
|
|
return os.is_tty(f)
|
|
}
|
|
|
|
_init_terminal :: proc "contextless" () {
|
|
context = runtime.default_context()
|
|
color_depth = get_environment_color()
|
|
is_dumb = get_is_dumb()
|
|
}
|
|
|
|
_fini_terminal :: proc "contextless" () { }
|