mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Add @(require_results) everywhere in os2
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user