mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-14 17:28:07 +00:00
rd: fix file path mapping to correctly use destination path's style in constructing mapped paths
This commit is contained in:
+2
-2
@@ -46,10 +46,10 @@ load_paths =
|
||||
commands =
|
||||
{
|
||||
//- rjf: [raddbg]
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg meta telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
.f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build raddbg debug telemetry", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
// .f1 = { .win = "raddbg_stable --ipc kill_all && build radbin", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
.f1 = { .win = "build radbin && pushd build && radbin --rdi simple && radbin --dump simple.rdi --out:simple.dump", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
// .f1 = { .win = "build radbin", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
|
||||
//- rjf: [raddbg wsl]
|
||||
// .f1 = { .win = "wsl ./build.sh raddbg", .linux = "", .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = false, },
|
||||
|
||||
+14
-14
@@ -345,13 +345,13 @@ internal B32
|
||||
str8_match_wildcard(String8 string, String8 pattern, StringMatchFlags flags)
|
||||
{
|
||||
B32 matched = 0;
|
||||
|
||||
|
||||
U64 pattern_cursor = 0;
|
||||
U64 string_cursor = 0;
|
||||
|
||||
|
||||
U64 pattern_start = max_U64;
|
||||
U64 string_start = 0;
|
||||
|
||||
|
||||
for (;;) {
|
||||
if (pattern_cursor == pattern.size) {
|
||||
if (string_cursor == string.size || (flags & StringMatchFlag_RightSideSloppy)) {
|
||||
@@ -359,7 +359,7 @@ str8_match_wildcard(String8 string, String8 pattern, StringMatchFlags flags)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (string_cursor == string.size) {
|
||||
while (pattern_cursor < pattern.size && pattern.str[pattern_cursor] == '*') {
|
||||
pattern_cursor += 1;
|
||||
@@ -367,31 +367,31 @@ str8_match_wildcard(String8 string, String8 pattern, StringMatchFlags flags)
|
||||
matched = (pattern_cursor == pattern.size);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (pattern_cursor < pattern.size && pattern.str[pattern_cursor] == '*') {
|
||||
pattern_start = pattern_cursor;
|
||||
string_start = string_cursor;
|
||||
pattern_cursor += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (pattern_cursor < pattern.size && (pattern.str[pattern_cursor] == '?' || str8_char_match(string.str[string_cursor], pattern.str[pattern_cursor], flags))) {
|
||||
string_cursor += 1;
|
||||
pattern_cursor += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (pattern_start != max_U64) {
|
||||
pattern_cursor = pattern_start + 1;
|
||||
string_start += 1;
|
||||
string_cursor = string_start;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return matched;
|
||||
}
|
||||
|
||||
@@ -2362,7 +2362,7 @@ string_from_elapsed_time(Arena *arena, DateTime dt)
|
||||
} else if (dt.day) {
|
||||
str8_list_pushf(scratch.arena, &list, "%ud", dt.day);
|
||||
}
|
||||
|
||||
|
||||
if (dt.hour) {
|
||||
str8_list_pushf(scratch.arena, &list, "%uh %um %u.%us", dt.hour, dt.min, dt.sec, dt.msec);
|
||||
} else if (dt.min) {
|
||||
@@ -2374,13 +2374,13 @@ string_from_elapsed_time(Arena *arena, DateTime dt)
|
||||
} else if (dt.micro_sec) {
|
||||
str8_list_pushf(scratch.arena, &list, "%uus", dt.micro_sec);
|
||||
}
|
||||
|
||||
|
||||
if (list.node_count == 0) {
|
||||
str8_list_pushf(scratch.arena, &list, "0");
|
||||
}
|
||||
|
||||
|
||||
String8 result = str8_list_join(arena, &list, &(StringJoin){ str8_lit_comp(""), str8_lit_comp(" "), str8_lit_comp("") });
|
||||
|
||||
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -517,13 +517,13 @@ rd_mapped_from_file_path(Arena *arena, String8 file_path)
|
||||
}
|
||||
if(best_map_dst.size != 0)
|
||||
{
|
||||
PathStyle dst_path_style = path_style_from_str8(best_map_dst);
|
||||
String8List best_map_dst_parts = str8_split_path(scratch.arena, best_map_dst);
|
||||
for(String8Node *n = best_map_remaining_suffix_first; n != 0; n = n->next)
|
||||
{
|
||||
str8_list_push(scratch.arena, &best_map_dst_parts, n->string);
|
||||
}
|
||||
StringJoin join = {.sep = str8_lit("/")};
|
||||
file_path = str8_list_join(scratch.arena, &best_map_dst_parts, &join);
|
||||
file_path = str8_path_list_join_by_style(scratch.arena, &best_map_dst_parts, dst_path_style);
|
||||
}
|
||||
}
|
||||
String8 result = push_str8_copy(arena, file_path);
|
||||
|
||||
Reference in New Issue
Block a user