Replace core:* to base:* where appropriate

This commit is contained in:
gingerBill
2024-01-28 22:18:51 +00:00
parent 6a07effdd2
commit 3e7e779abf
180 changed files with 225 additions and 225 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ package os
import "core:strings"
import "core:mem"
import "core:runtime"
import "base:runtime"
read_dir :: proc(fd: Handle, n: int, allocator := context.allocator) -> (fi: []File_Info, err: Errno) {
dirp: Dir
+1 -1
View File
@@ -2,7 +2,7 @@ package os
import win32 "core:sys/windows"
import "core:strings"
import "core:runtime"
import "base:runtime"
read_dir :: proc(fd: Handle, n: int, allocator := context.allocator) -> (fi: []File_Info, err: Errno) {
find_data_to_file_info :: proc(base_path: string, d: ^win32.WIN32_FIND_DATAW) -> (fi: File_Info) {
+1 -1
View File
@@ -1,7 +1,7 @@
package os
import win32 "core:sys/windows"
import "core:runtime"
import "base:runtime"
// lookup_env gets the value of the environment variable named by the key
// If the variable is found in the environment the value (which can be empty) is returned and the boolean is true
+2 -2
View File
@@ -1,8 +1,8 @@
package os
import win32 "core:sys/windows"
import "core:intrinsics"
import "core:runtime"
import "base:intrinsics"
import "base:runtime"
import "core:unicode/utf16"
is_path_separator :: proc(c: byte) -> bool {
+1 -1
View File
@@ -1,6 +1,6 @@
package os2
import "core:runtime"
import "base:runtime"
// get_env retrieves the value of the environment variable named by the key
// It returns the value, which will be empty if the variable is not present
+1 -1
View File
@@ -1,7 +1,7 @@
//+private
package os2
import "core:runtime"
import "base:runtime"
_lookup_env :: proc(key: string, allocator: runtime.Allocator) -> (value: string, found: bool) {
//TODO
+1 -1
View File
@@ -2,7 +2,7 @@
package os2
import win32 "core:sys/windows"
import "core:runtime"
import "base:runtime"
_lookup_env :: proc(key: string, allocator: runtime.Allocator) -> (value: string, found: bool) {
if key == "" {
+1 -1
View File
@@ -1,7 +1,7 @@
package os2
import "core:io"
import "core:runtime"
import "base:runtime"
General_Error :: enum u32 {
None,
+1 -1
View File
@@ -2,7 +2,7 @@ package os2
import "core:io"
import "core:time"
import "core:runtime"
import "base:runtime"
File :: struct {
impl: _File,
+1 -1
View File
@@ -4,7 +4,7 @@ package os2
import "core:io"
import "core:time"
import "core:strings"
import "core:runtime"
import "base:runtime"
import "core:sys/unix"
INVALID_HANDLE :: -1
+1 -1
View File
@@ -1,7 +1,7 @@
package os2
import "core:mem"
import "core:runtime"
import "base:runtime"
import "core:strconv"
import "core:unicode/utf8"
+1 -1
View File
@@ -4,7 +4,7 @@ package os2
import "core:io"
import "core:mem"
import "core:sync"
import "core:runtime"
import "base:runtime"
import "core:strings"
import "core:time"
import "core:unicode/utf16"
+1 -1
View File
@@ -1,6 +1,6 @@
package os2
import "core:runtime"
import "base:runtime"
heap_allocator :: proc() -> runtime.Allocator {
return runtime.Allocator{
+1 -1
View File
@@ -1,6 +1,6 @@
package os2
import "core:runtime"
import "base:runtime"
Path_Separator :: _Path_Separator // OS-Specific
Path_List_Separator :: _Path_List_Separator // OS-Specific
+1 -1
View File
@@ -3,7 +3,7 @@ package os2
import "core:strings"
import "core:strconv"
import "core:runtime"
import "base:runtime"
import "core:sys/unix"
_Path_Separator :: '/'
+1 -1
View File
@@ -2,7 +2,7 @@
package os2
import win32 "core:sys/windows"
import "core:runtime"
import "base:runtime"
import "core:strings"
_Path_Separator :: '\\'
+1 -1
View File
@@ -2,7 +2,7 @@ package os2
import "core:sync"
import "core:time"
import "core:runtime"
import "base:runtime"
args: []string
+1 -1
View File
@@ -1,7 +1,7 @@
package os2
import "core:time"
import "core:runtime"
import "base:runtime"
File_Info :: struct {
fullpath: string,
+1 -1
View File
@@ -2,7 +2,7 @@
package os2
import "core:time"
import "core:runtime"
import "base:runtime"
import "core:strings"
import "core:sys/unix"
import "core:path/filepath"
+1 -1
View File
@@ -1,7 +1,7 @@
//+private
package os2
import "core:runtime"
import "base:runtime"
import "core:time"
import "core:strings"
import win32 "core:sys/windows"
+1 -1
View File
@@ -1,6 +1,6 @@
package os2
import "core:runtime"
import "base:runtime"
create_temp :: proc(dir, pattern: string) -> (^File, Error) {
return _create_temp(dir, pattern)
+1 -1
View File
@@ -1,7 +1,7 @@
//+private
package os2
import "core:runtime"
import "base:runtime"
_create_temp :: proc(dir, pattern: string) -> (^File, Error) {
+1 -1
View File
@@ -1,7 +1,7 @@
//+private
package os2
import "core:runtime"
import "base:runtime"
import win32 "core:sys/windows"
_create_temp :: proc(dir, pattern: string) -> (^File, Error) {
+1 -1
View File
@@ -1,7 +1,7 @@
package os2
import "core:strings"
import "core:runtime"
import "base:runtime"
user_cache_dir :: proc(allocator: runtime.Allocator) -> (dir: string, err: Error) {
#partial switch ODIN_OS {
+1 -1
View File
@@ -4,7 +4,7 @@ foreign import dl "system:dl"
foreign import libc "System.framework"
foreign import pthread "System.framework"
import "core:runtime"
import "base:runtime"
import "core:strings"
import "core:c"
+1 -1
View File
@@ -3,7 +3,7 @@ package os
foreign import dl "system:dl"
foreign import libc "system:c"
import "core:runtime"
import "base:runtime"
import "core:strings"
import "core:c"
+2 -2
View File
@@ -1,8 +1,8 @@
//+build js
package os
import "core:intrinsics"
import "core:runtime"
import "base:intrinsics"
import "base:runtime"
import "core:unicode/utf16"
is_path_separator :: proc(c: byte) -> bool {
+2 -2
View File
@@ -3,11 +3,11 @@ package os
foreign import dl "system:dl"
foreign import libc "system:c"
import "core:runtime"
import "base:runtime"
import "core:strings"
import "core:c"
import "core:strconv"
import "core:intrinsics"
import "base:intrinsics"
// NOTE(flysand): For compatibility we'll make core:os package
// depend on the old (scheduled for removal) linux package.
+1 -1
View File
@@ -4,7 +4,7 @@ foreign import libc "system:c"
import "core:strings"
import "core:c"
import "core:runtime"
import "base:runtime"
Handle :: distinct i32
Pid :: distinct i32
+1 -1
View File
@@ -1,7 +1,7 @@
package os
import "core:sys/wasm/wasi"
import "core:runtime"
import "base:runtime"
Handle :: distinct i32
Errno :: distinct i32
+2 -2
View File
@@ -2,8 +2,8 @@
package os
import win32 "core:sys/windows"
import "core:runtime"
import "core:intrinsics"
import "base:runtime"
import "base:intrinsics"
Handle :: distinct uintptr
File_Time :: distinct u64
+1 -1
View File
@@ -1,7 +1,7 @@
package os
import "core:time"
import "core:runtime"
import "base:runtime"
import win32 "core:sys/windows"
@(private)