mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
fix assumption about std handles in os2/file.odin
This commit is contained in:
@@ -45,11 +45,9 @@ O_TRUNC :: File_Flags{.Trunc}
|
|||||||
O_SPARSE :: File_Flags{.Sparse}
|
O_SPARSE :: File_Flags{.Sparse}
|
||||||
O_CLOEXEC :: File_Flags{.Close_On_Exec}
|
O_CLOEXEC :: File_Flags{.Close_On_Exec}
|
||||||
|
|
||||||
|
stdin: ^File = nil // OS-Specific
|
||||||
stdin: ^File = &_stdin
|
stdout: ^File = nil // OS-Specific
|
||||||
stdout: ^File = &_stdout
|
stderr: ^File = nil // OS-Specific
|
||||||
stderr: ^File = &_stderr
|
|
||||||
|
|
||||||
|
|
||||||
@(require_results)
|
@(require_results)
|
||||||
create :: proc(name: string) -> (^File, Error) {
|
create :: proc(name: string) -> (^File, Error) {
|
||||||
|
|||||||
@@ -49,6 +49,10 @@ _standard_stream_init :: proc() {
|
|||||||
_stdin.stream.data = &_stdin
|
_stdin.stream.data = &_stdin
|
||||||
_stdout.stream.data = &_stdout
|
_stdout.stream.data = &_stdout
|
||||||
_stderr.stream.data = &_stderr
|
_stderr.stream.data = &_stderr
|
||||||
|
|
||||||
|
stdin = &_stdin
|
||||||
|
stdout = &_stdout
|
||||||
|
stderr = &_stderr
|
||||||
}
|
}
|
||||||
|
|
||||||
_file_allocator :: proc() -> runtime.Allocator {
|
_file_allocator :: proc() -> runtime.Allocator {
|
||||||
|
|||||||
Reference in New Issue
Block a user