Begin mocking os2 for windows out more

This commit is contained in:
gingerBill
2022-05-05 18:01:44 +01:00
parent 18bde22b26
commit 96ab17ecfc
9 changed files with 402 additions and 160 deletions
+2 -30
View File
@@ -11,6 +11,8 @@ General_Error :: enum u32 {
Closed,
Timeout,
Invalid_File,
}
Platform_Error :: struct {
@@ -24,36 +26,6 @@ Error :: union {
}
#assert(size_of(Error) == size_of(u64))
Path_Error :: struct {
op: string,
path: string,
err: Error,
}
Link_Error :: struct {
op: string,
old: string,
new: string,
err: Error,
}
path_error_delete :: proc(perr: Maybe(Path_Error)) {
if err, ok := perr.?; ok {
context.allocator = error_allocator()
delete(err.op)
delete(err.path)
}
}
link_error_delete :: proc(lerr: Maybe(Link_Error)) {
if err, ok := lerr.?; ok {
context.allocator = error_allocator()
delete(err.op)
delete(err.old)
delete(err.new)
}
}
is_platform_error :: proc(ferr: Error) -> (err: i32, ok: bool) {