summaryrefslogtreecommitdiff
path: root/src/platform
diff options
context:
space:
mode:
authoromnisci3nce <omniscient.oce@gmail.com>2024-07-13 16:34:48 +1000
committeromnisci3nce <omniscient.oce@gmail.com>2024-07-13 16:34:48 +1000
commit8d6b838d0a5919620ca8562ac6be1da5c0c3237e (patch)
tree0cffbe159b23464e64cde1165e9e58031d0623b8 /src/platform
parentf74cf52946f4e569a26bc81105537b40be95c2c7 (diff)
add empty shell scripts
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/file.c6
-rw-r--r--src/platform/file.h6
-rw-r--r--src/platform/path.h4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/platform/file.c b/src/platform/file.c
index 6030620..33194d7 100644
--- a/src/platform/file.c
+++ b/src/platform/file.c
@@ -33,7 +33,7 @@ const char *string_from_file(const char *path) {
return string;
}
-str8_opt str8_from_file(arena *a, str8 path) {
+str8_opt str8_from_file(arena *a, Str8 path) {
char *p = cstr(a, path);
str8_opt result = { .has_value = false };
@@ -51,7 +51,7 @@ str8_opt str8_from_file(arena *a, str8 path) {
rewind(f);
u8 *raw = arena_alloc(a, fsize + 1);
- str8 contents = str8_create(raw, fsize);
+ Str8 contents = str8_create(raw, fsize);
contents.buf[contents.len] = '\0';
fread(raw, fsize, 1, f);
@@ -90,4 +90,4 @@ FileData load_spv_file(const char *path) {
fclose(f);
return (FileData){ data, bytesRead };
-} \ No newline at end of file
+}
diff --git a/src/platform/file.h b/src/platform/file.h
index a8aa8ea..5e5e1e1 100644
--- a/src/platform/file.h
+++ b/src/platform/file.h
@@ -10,17 +10,17 @@
#include "str.h"
typedef struct str8_opt {
- str8 contents;
+ Str8 contents;
bool has_value;
} str8_opt;
const char* string_from_file(const char* path);
-str8_opt str8_from_file(arena* a, str8 path);
+str8_opt str8_from_file(arena* a, Str8 path);
typedef struct {
char* data;
size_t size;
} FileData;
-FileData load_spv_file(const char* path); \ No newline at end of file
+FileData load_spv_file(const char* path);
diff --git a/src/platform/path.h b/src/platform/path.h
index 73063ea..ce53339 100644
--- a/src/platform/path.h
+++ b/src/platform/path.h
@@ -9,8 +9,8 @@
#include "str.h"
typedef struct path_opt {
- str8 path;
+ Str8 path;
bool has_value;
} path_opt;
-path_opt path_parent(arena* a, const char* path); // TODO: convert to using str8 \ No newline at end of file
+path_opt path_parent(arena* a, const char* path); // TODO: convert to using str8