aboutsummaryrefslogtreecommitdiff
path: root/core/path
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-09-08 13:12:38 +0100
committergingerBill <bill@gingerbill.org>2021-09-08 13:12:38 +0100
commitca33cb990b5a05829067e18ea24bcb36a75aba67 (patch)
treec3fa66a18cee6f44ea409e62e3878295f881c49a /core/path
parentd4f5ef046da7d1d3402f671e84fa483c71a3b26f (diff)
Strip semicolons in core which were missing
Diffstat (limited to 'core/path')
-rw-r--r--core/path/filepath/path_unix.odin34
1 files changed, 17 insertions, 17 deletions
diff --git a/core/path/filepath/path_unix.odin b/core/path/filepath/path_unix.odin
index 165d856de..1db528a2f 100644
--- a/core/path/filepath/path_unix.odin
+++ b/core/path/filepath/path_unix.odin
@@ -9,43 +9,43 @@ when ODIN_OS == "darwin" {
import "core:strings"
-SEPARATOR :: '/';
-SEPARATOR_STRING :: `/`;
-LIST_SEPARATOR :: ':';
+SEPARATOR :: '/'
+SEPARATOR_STRING :: `/`
+LIST_SEPARATOR :: ':'
is_reserved_name :: proc(path: string) -> bool {
- return false;
+ return false
}
is_abs :: proc(path: string) -> bool {
- return strings.has_prefix(path, "/");
+ return strings.has_prefix(path, "/")
}
abs :: proc(path: string, allocator := context.allocator) -> (string, bool) {
- rel := path;
+ rel := path
if rel == "" {
- rel = ".";
+ rel = "."
}
- rel_cstr := strings.clone_to_cstring(rel, context.temp_allocator);
- path_ptr := realpath(rel_cstr, nil);
+ rel_cstr := strings.clone_to_cstring(rel, context.temp_allocator)
+ path_ptr := realpath(rel_cstr, nil)
if path_ptr == nil {
- return "", __error()^ == 0;
+ return "", __error()^ == 0
}
- defer _unix_free(path_ptr);
+ defer _unix_free(path_ptr)
- path_cstr := cstring(path_ptr);
- path_str := strings.clone(string(path_cstr), allocator);
- return path_str, true;
+ path_cstr := cstring(path_ptr)
+ path_str := strings.clone(string(path_cstr), allocator)
+ return path_str, true
}
join :: proc(elems: ..string, allocator := context.allocator) -> string {
for e, i in elems {
if e != "" {
- p := strings.join(elems[i:], SEPARATOR_STRING, context.temp_allocator);
- return clean(p, allocator);
+ p := strings.join(elems[i:], SEPARATOR_STRING, context.temp_allocator)
+ return clean(p, allocator)
}
}
- return "";
+ return ""
}
@(private)