summaryrefslogtreecommitdiff
path: root/source/base/base_os.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/base/base_os.h')
-rw-r--r--source/base/base_os.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/base/base_os.h b/source/base/base_os.h
index 23587c6..abe8628 100644
--- a/source/base/base_os.h
+++ b/source/base/base_os.h
@@ -1,21 +1,13 @@
1#ifndef BASE_OS_H 1#ifndef BASE_OS_H
2#define BASE_OS_H 2#define BASE_OS_H
3 3
4internal void
5print(const char *str)
6{
7 i32 len = 0;
8 while (str[len]) len++;
9 write(STDOUT_FILENO, str, len);
10}
11
12internal string8 4internal string8
13load_file(const char *path) 5load_file(const char *path)
14{ 6{
15 string8 result = {0}; 7 string8 result = {0};
16 struct stat sbuf = {0}; 8 struct stat sbuf = {0};
17 9
18 i32 file = open(path, O_RDONLY); 10 s32 file = open(path, O_RDONLY);
19 if(file == -1) return result; 11 if(file == -1) return result;
20 12
21 if(fstat(file, &sbuf) == -1) 13 if(fstat(file, &sbuf) == -1)