From 9d19ee7e4c285d5d881570be3328d81bdff40368 Mon Sep 17 00:00:00 2001 From: Zachary Pierson Date: Sun, 12 Feb 2017 18:25:58 -0600 Subject: [PATCH] Changed standard libraries for MacOS and Linux to be closer to os_windows. --- core/os_linux.odin | 9 --------- core/os_x.odin | 12 +----------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/core/os_linux.odin b/core/os_linux.odin index 1aa4d7ccf..f0d9efca1 100644 --- a/core/os_linux.odin +++ b/core/os_linux.odin @@ -166,15 +166,6 @@ read_entire_file :: proc(name: string) -> ([]byte, bool) { 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 { assert(size > 0); diff --git a/core/os_x.odin b/core/os_x.odin index 6cc31e584..80f858a5c 100644 --- a/core/os_x.odin +++ b/core/os_x.odin @@ -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_by_name :: proc(name: string) -> File_Time {} */ -/* + read_entire_file :: proc(name: string) -> ([]byte, bool) { handle, err := open_simple(name, O_RDONLY); @@ -170,16 +170,6 @@ read_entire_file :: proc(name: string) -> ([]byte, bool) { 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 { assert(size > 0);