From a9fc99174a32760b5c52193e7292f3416d58a944 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 12 Apr 2021 13:32:16 -0400 Subject: [PATCH] Revert "Removed the stupid restriction that "cellname readwrite" won't work" This reverts commit 8b9c47c3efe9e507c9f32bccd393bf2efd1fa8ed. Reverting back to the state before messing with the substrate extraction code. All of the substrate extraction code is now in a separate branch. --- commands/CmdCD.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/commands/CmdCD.c b/commands/CmdCD.c index bb779d87..2eec220e 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -1084,11 +1084,13 @@ CmdCellname(w, cmd) if (cellDef->cd_fd == -1) dbReadOpen(cellDef, NULL, TRUE, NULL); - if (cellDef->cd_fd == -1) - TxError("Warning: Cell %s is not writeable\n", cellDef->cd_name); -#endif - + if (cellDef->cd_fd != -1) + cellDef->cd_flags &= ~CDNOEDIT; + else + TxError("Advisory lock held on cell %s\n", cellDef->cd_name); +#else cellDef->cd_flags &= ~CDNOEDIT; +#endif WindAreaChanged(w, &w->w_screenArea); CmdSetWindCaption(EditCellUse, EditRootDef); }