Errno -> Error

This commit is contained in:
gingerBill
2024-08-04 11:46:42 +01:00
parent def2e2e271
commit 160048eaee
14 changed files with 215 additions and 215 deletions
+13 -13
View File
@@ -5,7 +5,7 @@ import "core:sys/es"
Handle :: distinct int
_Platform_Error :: enum i32 {NONE}
// ERROR_NONE :: Errno(es.SUCCESS)
// ERROR_NONE :: Error(es.SUCCESS)
O_RDONLY :: 0x1
O_WRONLY :: 0x2
@@ -30,26 +30,26 @@ heap_resize :: proc(ptr: rawptr, new_size: int) -> rawptr {
return es.HeapReallocate(ptr, new_size, false)
}
open :: proc(path: string, flags: int = O_RDONLY, mode: int = 0) -> (Handle, Errno) {
return (Handle) (0), (Errno) (1)
open :: proc(path: string, flags: int = O_RDONLY, mode: int = 0) -> (Handle, Error) {
return (Handle) (0), (Error) (1)
}
close :: proc(fd: Handle) -> Errno {
return (Errno) (1)
close :: proc(fd: Handle) -> Error {
return (Error) (1)
}
file_size :: proc(fd: Handle) -> (i64, Errno) {
return (i64) (0), (Errno) (1)
file_size :: proc(fd: Handle) -> (i64, Error) {
return (i64) (0), (Error) (1)
}
read :: proc(fd: Handle, data: []byte) -> (int, Errno) {
return (int) (0), (Errno) (1)
read :: proc(fd: Handle, data: []byte) -> (int, Error) {
return (int) (0), (Error) (1)
}
write :: proc(fd: Handle, data: []u8) -> (int, Errno) {
return (int) (0), (Errno) (1)
write :: proc(fd: Handle, data: []u8) -> (int, Error) {
return (int) (0), (Error) (1)
}
seek :: proc(fd: Handle, offset: i64, whence: int) -> (i64, Errno) {
return (i64) (0), (Errno) (1)
seek :: proc(fd: Handle, offset: i64, whence: int) -> (i64, Error) {
return (i64) (0), (Error) (1)
}