run-to-line/address porting from old df_entity-based behavior

This commit is contained in:
Ryan Fleury
2024-09-13 11:21:13 -07:00
parent 6b758f08fa
commit 96b5f82964
14 changed files with 770 additions and 636 deletions
+4 -4
View File
@@ -775,7 +775,7 @@ entry_point(CmdLine *cmd_line)
if(args.node_count > 0 && args.first->string.size != 0)
{
Temp scratch = scratch_begin(0, 0);
DF_Entity *target = d_entity_alloc(d_entity_root(), D_EntityKind_Target);
DF_Entity *target = d_entity_alloc(d_entity_root(), DF_EntityKind_Target);
d_entity_equip_cfg_src(target, D_CfgSrc_CommandLine);
String8List passthrough_args_list = {0};
for(String8Node *n = args.first->next; n != 0; n = n->next)
@@ -790,7 +790,7 @@ entry_point(CmdLine *cmd_line)
if(args.first->string.size != 0)
{
String8 exe_name = args.first->string;
DF_Entity *exe = d_entity_alloc(target, D_EntityKind_Executable);
DF_Entity *exe = d_entity_alloc(target, DF_EntityKind_Executable);
PathStyle style = path_style_from_str8(exe_name);
if(style == PathStyle_Relative)
{
@@ -805,7 +805,7 @@ entry_point(CmdLine *cmd_line)
if(path_part_of_arg.size != 0)
{
String8 path = push_str8f(scratch.arena, "%S/", path_part_of_arg);
DF_Entity *wdir = d_entity_alloc(target, D_EntityKind_WorkingDirectory);
DF_Entity *wdir = d_entity_alloc(target, DF_EntityKind_WorkingDirectory);
d_entity_equip_name(wdir, path);
}
@@ -814,7 +814,7 @@ entry_point(CmdLine *cmd_line)
String8 args_str = str8_list_join(scratch.arena, &passthrough_args_list, &join);
if(args_str.size != 0)
{
DF_Entity *args_entity = d_entity_alloc(target, D_EntityKind_Arguments);
DF_Entity *args_entity = d_entity_alloc(target, DF_EntityKind_Arguments);
d_entity_equip_name(args_entity, args_str);
}
scratch_end(scratch);