|
|
|
@ -29,7 +29,12 @@ var stdLibrary = vars{
|
|
|
|
|
"stdin": &IOHandle{os.Stdin, true, "file (read-only)"},
|
|
|
|
|
"stdout": &IOHandle{os.Stdout, true, "file (write-only)"},
|
|
|
|
|
"stderr": &IOHandle{os.Stderr, true, "file (write-only)"},
|
|
|
|
|
"devnull": &IOHandle{GetFile(os.DevNull), true, "file (write-only)"},
|
|
|
|
|
"devnull": func() *IOHandle {
|
|
|
|
|
devnull, _ := os.OpenFile(os.DevNull, os.O_WRONLY, 0755)
|
|
|
|
|
dn := &IOHandle{devnull, true, "file (write-only)"}
|
|
|
|
|
openFiles = append(openFiles, dn)
|
|
|
|
|
return dn
|
|
|
|
|
}(),
|
|
|
|
|
// TODO add env pathlookup
|
|
|
|
|
"PI": number(math.Pi),
|
|
|
|
|
"E": number(math.E),
|
|
|
|
|