mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-29 00:11:34 +00:00
Port core:flags to os2
This commit is contained in:
@@ -4,7 +4,7 @@ import "base:runtime"
|
||||
import "core:flags"
|
||||
import "core:fmt"
|
||||
import "core:net"
|
||||
import "core:os"
|
||||
import os "core:os/os2"
|
||||
import "core:time/datetime"
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@ Distinct_Int :: distinct int
|
||||
main :: proc() {
|
||||
Options :: struct {
|
||||
|
||||
file: os.Handle `args:"pos=0,required,file=r" usage:"Input file."`,
|
||||
output: os.Handle `args:"pos=1,file=cw" usage:"Output file."`,
|
||||
file: ^os.File `args:"pos=0,required,file=r" usage:"Input file."`,
|
||||
output: ^os.File `args:"pos=1,file=cw" usage:"Output file."`,
|
||||
|
||||
hub: net.Host_Or_Endpoint `usage:"Internet address to contact for updates."`,
|
||||
schedule: datetime.DateTime `usage:"Launch tasks at this time."`,
|
||||
@@ -126,7 +126,7 @@ main :: proc() {
|
||||
|
||||
fmt.printfln("%#v", opt)
|
||||
|
||||
if opt.output != 0 {
|
||||
if opt.output != nil {
|
||||
os.write_string(opt.output, "Hellope!\n")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user