Get latest changes from Primitive Indexer"
This commit is contained in:
@@ -65,7 +65,7 @@ static void AppendCppFileLineByLine(DN_Str8Builder *dest, DN_Str8 cpp_path)
|
||||
line = DN_Str8FromFmtArena(&scratch.arena, "%S// DN: Single header generator commented out => %S", find.start_to_before_match, DN_Str8TrimWhitespaceAround(find.match_to_end_of_buffer));
|
||||
DN_Str8 rel_include_path = DN_Str8TrimWhitespaceAround(find.after_match_to_end_of_buffer);
|
||||
DN_Str8 root_dir = DN_Str8FileDirectoryFromPath(cpp_path);
|
||||
extra_include_path = DN_OS_PathF(&scratch.arena, "%S/%S", root_dir, DN_Str8TrimSuffixSensitive(rel_include_path, DN_Str8Lit("\"")));
|
||||
extra_include_path = DN_OS_PathFmtArena(&scratch.arena, "%S/%S", root_dir, DN_Str8TrimSuffixSensitive(rel_include_path, DN_Str8Lit("\"")));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ int main(int argc, char **argv)
|
||||
DN_Str8Builder builder = DN_Str8BuilderFromArena(&scratch.arena);
|
||||
DN_Str8 suffix = type == FileType_Header ? DN_Str8Lit("h") : DN_Str8Lit("cpp");
|
||||
for (DN_ForItCArray(it, DN_Str8 const, REL_FILE_PATHS)) {
|
||||
DN_Str8 path = DN_OS_PathF(&scratch.arena, "%S/%S.%S", dn_root_dir, *it.data, suffix);
|
||||
DN_Str8 path = DN_OS_PathFmtArena(&scratch.arena, "%S/%S.%S", dn_root_dir, *it.data, suffix);
|
||||
AppendCppFileLineByLine(&builder, path);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
|
||||
DN_Str8BuilderPrependF(&builder, "// Generated by the DN single header generator %04u-%02u-%02u %02u:%02u:%02u\n\n", date.year, date.month, date.day, date.hour, date.minutes, date.seconds);
|
||||
|
||||
DN_Str8 buffer = DN_Str8TrimWhitespaceAround(DN_Str8FromStr8BuilderArena(&builder, &scratch.arena));
|
||||
DN_Str8 single_header_path = DN_OS_PathF(&scratch.arena, "%S/dn_single_header.%S", output_dir, suffix);
|
||||
DN_Str8 single_header_path = DN_OS_PathFmtArena(&scratch.arena, "%S/dn_single_header.%S", output_dir, suffix);
|
||||
DN_ErrSink *err = DN_TCErrSinkBeginDefault();
|
||||
DN_OS_FileWriteAllSafe(single_header_path, buffer, err);
|
||||
DN_ErrSinkEndExitIfErrorF(err, -1, "Failed to write Single header file '%S'", single_header_path);
|
||||
|
||||
Reference in New Issue
Block a user