Add @(require_results) everywhere in os2

This commit is contained in:
gingerBill
2024-05-14 18:25:15 +01:00
parent 48c1822709
commit 450b9ceaec
13 changed files with 85 additions and 39 deletions
+3
View File
@@ -76,6 +76,7 @@ read_entire_file :: proc{
read_entire_file_from_file,
}
@(require_results)
read_entire_file_from_path :: proc(name: string, allocator: runtime.Allocator) -> (data: []byte, err: Error) {
f, ferr := open(name)
if ferr != nil {
@@ -85,6 +86,7 @@ read_entire_file_from_path :: proc(name: string, allocator: runtime.Allocator) -
return read_entire_file_from_file(f, allocator)
}
@(require_results)
read_entire_file_from_file :: proc(f: ^File, allocator: runtime.Allocator) -> (data: []byte, err: Error) {
size: int
has_size := true
@@ -135,6 +137,7 @@ read_entire_file_from_file :: proc(f: ^File, allocator: runtime.Allocator) -> (d
}
}
@(require_results)
write_entire_file :: proc(name: string, data: []byte, perm: File_Mode, truncate := true) -> Error {
flags := O_WRONLY|O_CREATE
if truncate {