cinera: Resolve output location clashes
This commit adds support for tracking and resolving clashes of output locations. Previously open-ended clash dependency chains could passively resolve across multiple Cinera invocations (undesirable, but possible); whereas closed-loop dependency chains could not resolve without the user manually resolving them by moving one clash to a temporary location (not acceptable). This new support handles such clashes in one fell swoop. Other smaller changes in this commit: • Change message_control to use memory_book • Fix deletion of old .index files when reorganising projects • Fix deletion of moved entries when subdividing projects
This commit is contained in:
parent
6576a91d11
commit
44a5008aa7
1560
cinera/cinera.c
1560
cinera/cinera.c
File diff suppressed because it is too large
Load Diff
|
@ -4532,22 +4532,18 @@ PrintLineage(string Lineage, bool AppendNewline)
|
||||||
if(AppendNewline) { Print(stderr, "\n"); }
|
if(AppendNewline) { Print(stderr, "\n"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
void
|
||||||
CopyLineageToBarePtr(char *Ptr, string Lineage, bool AppendNewline)
|
ExtendLineageInBook(memory_book *M, string Lineage, bool AppendNewline)
|
||||||
{
|
{
|
||||||
int Length = 0;
|
|
||||||
|
|
||||||
string Parent = StripComponentFromPath(Lineage);
|
string Parent = StripComponentFromPath(Lineage);
|
||||||
Length += CopyStringCToBarePtr(CS_BLACK_BOLD, Ptr + Length, Parent);
|
ExtendStringCInBook(M, CS_BLACK_BOLD, Parent);
|
||||||
if(Parent.Length > 0)
|
if(Parent.Length > 0)
|
||||||
{
|
{
|
||||||
Length += CopyStringCToBarePtr(CS_BLACK_BOLD, Ptr + Length, Wrap0("/"));
|
ExtendStringCInBook(M, CS_BLACK_BOLD, Wrap0("/"));
|
||||||
}
|
}
|
||||||
string Us = GetFinalComponent(Lineage);
|
string Us = GetFinalComponent(Lineage);
|
||||||
Length += CopyStringCToBarePtr(CS_BLUE_BOLD, Ptr + Length, Us);
|
ExtendStringCInBook(M, CS_BLUE_BOLD, Us);
|
||||||
if(AppendNewline) { Length += CopyStringToBarePtr(Ptr + Length, Wrap0("\n")); }
|
if(AppendNewline) { ExtendStringInBook(M, Wrap0("\n")); }
|
||||||
|
|
||||||
return Length;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t
|
uint8_t
|
||||||
|
@ -5073,7 +5069,7 @@ PositionRolesInConfig(config *C, resolution_errors *E, config_verifiers *V, scop
|
||||||
config_pair *Position = GetPair(*Role, IDENT_POSITION);
|
config_pair *Position = GetPair(*Role, IDENT_POSITION);
|
||||||
if(IsPositioned(Position))
|
if(IsPositioned(Position))
|
||||||
{
|
{
|
||||||
int TargetPos;
|
int TargetPos = 0;
|
||||||
if(Position->int64_t < 0)
|
if(Position->int64_t < 0)
|
||||||
{
|
{
|
||||||
TargetPos = SlotCount + Position->int64_t;
|
TargetPos = SlotCount + Position->int64_t;
|
||||||
|
|
Loading…
Reference in New Issue