From ff718c3ecffb088e56df79267cbca8d444014f6a Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Sat, 29 Nov 2025 13:24:23 -0500 Subject: [PATCH] Got rid of one problem with timestamps, which was the requirement to force an update on a child cell to match the timestamp of the parent. This is no longer done on read-only cells, although it probably ought to be applied to all cells. A timestamp should change when a cell has been modified, but a parent cell should never force a child cell to update its timestamp if the child cell has not been modified. The main problem is that "drc check" runs checks on all child cells, and they then are marked as modified without consideration of whether the child's DRC status changed. A better solution would be to avoid unnecessary updates by detecting a change in DRC results, but for now, just disabling updates on read-only cells (which can't be updated anyway) should suffice. --- VERSION | 2 +- commands/CmdCD.c | 2 ++ database/DBtimestmp.c | 13 +++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index c792ec5f..3e80806b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.579 +8.3.581 diff --git a/commands/CmdCD.c b/commands/CmdCD.c index 052f4598..35293b3f 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -4308,6 +4308,8 @@ CmdDrc( #endif TxPrintf("Error area #%d:\n", result); if (DRCWhy(dolist, rootUse, &area, findonly)) break; + /* Check for interrupt or this will go into an infinite loop */ + else if (SigInterruptPending) break; drc_nth++; } else if (result < 0) diff --git a/database/DBtimestmp.c b/database/DBtimestmp.c index 1c27fc3d..1eb3a94f 100644 --- a/database/DBtimestmp.c +++ b/database/DBtimestmp.c @@ -247,9 +247,18 @@ dbStampFunc(cellDef) if (cellDef->cd_timestamp == timestamp) return 0; - if (!(cellDef->cd_flags & CDFIXEDSTAMP)) - cellDef->cd_timestamp = timestamp; + /* + * Do not force a non-edit cell or a cell with a fixed timestamp + * to update its timestamp, as it cannot or should not. Just clear + * any flag suggesting that it needs a new timestamp. + */ + if (!(cellDef->cd_flags & (CDNOEDIT | CDFIXEDSTAMP))) + { + cellDef->cd_flags &= ~CDGETNEWSTAMP; + return 0; + } + cellDef->cd_timestamp = timestamp; cellDef->cd_flags &= ~CDGETNEWSTAMP; // printf("Writing new timestamp %d for %s.\n", timestamp, cellDef->cd_name);