mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Changed standard libraries for MacOS and Linux to be closer to os_windows.
This commit is contained in:
@@ -166,15 +166,6 @@ read_entire_file :: proc(name: string) -> ([]byte, bool) {
|
|||||||
|
|
||||||
return data, true;
|
return data, true;
|
||||||
}
|
}
|
||||||
read_entire_file_to_string :: proc(name: string) -> (string, bool) {
|
|
||||||
|
|
||||||
contents, success := read_entire_file(name);
|
|
||||||
if(!success) {
|
|
||||||
fmt.println("Failed to seek to end of file.");
|
|
||||||
return "", false;
|
|
||||||
}
|
|
||||||
return from_c_str(^contents[0]), true;
|
|
||||||
}
|
|
||||||
|
|
||||||
heap_alloc :: proc(size: int) -> rawptr {
|
heap_alloc :: proc(size: int) -> rawptr {
|
||||||
assert(size > 0);
|
assert(size > 0);
|
||||||
|
|||||||
+1
-11
@@ -133,7 +133,7 @@ stderr: Handle = 2; // get_std_handle(win32.STD_ERROR_HANDLE);
|
|||||||
last_write_time :: proc(fd: Handle) -> File_Time {}
|
last_write_time :: proc(fd: Handle) -> File_Time {}
|
||||||
last_write_time_by_name :: proc(name: string) -> File_Time {}
|
last_write_time_by_name :: proc(name: string) -> File_Time {}
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
read_entire_file :: proc(name: string) -> ([]byte, bool) {
|
read_entire_file :: proc(name: string) -> ([]byte, bool) {
|
||||||
|
|
||||||
handle, err := open_simple(name, O_RDONLY);
|
handle, err := open_simple(name, O_RDONLY);
|
||||||
@@ -170,16 +170,6 @@ read_entire_file :: proc(name: string) -> ([]byte, bool) {
|
|||||||
|
|
||||||
return data, true;
|
return data, true;
|
||||||
}
|
}
|
||||||
read_entire_file_to_string :: proc(name: string) -> (string, bool) {
|
|
||||||
|
|
||||||
contents, success := read_entire_file(name);
|
|
||||||
if(!success) {
|
|
||||||
fmt.println("Failed to seek to end of file.");
|
|
||||||
return "", false;
|
|
||||||
}
|
|
||||||
return from_c_str(^contents[0]), true;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
heap_alloc :: proc(size: int) -> rawptr #inline {
|
heap_alloc :: proc(size: int) -> rawptr #inline {
|
||||||
assert(size > 0);
|
assert(size > 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user