From 521baa91d93c9502c4a6eda783b3382c3f01cbf2 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 19 Apr 2021 12:53:32 -0400 Subject: [PATCH] Modified the "gds write" command so that it issues a strongly- worded warning if an abstract cell view is written to GDS. Corrected the "cellname ... writeable" command to allow an overrride of the read-only status of a cell. That change had been made before but apparently got reverted by the recent rollback. --- calma/CalmaWrite.c | 7 +++++++ commands/CmdCD.c | 10 ++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/calma/CalmaWrite.c b/calma/CalmaWrite.c index 282e83f0..cb1857cd 100644 --- a/calma/CalmaWrite.c +++ b/calma/CalmaWrite.c @@ -814,6 +814,13 @@ calmaProcessDef(def, outf, do_library) if (isReadOnly && hasContent && CalmaAddendum) return (0); + /* Give a strongly-worded statement about writing abstract views */ + + if (isAbstract && !isReadOnly) + TxError("Warning: Writing abstract view of \"%s\" to GDS. This is" + " probably not what you want to do.\n", + def->cd_name); + /* * Output the definitions for any of our descendants that have * not already been output. Numbers are assigned to the subcells diff --git a/commands/CmdCD.c b/commands/CmdCD.c index 2eec220e..0288f8e0 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -1084,13 +1084,11 @@ CmdCellname(w, cmd) if (cellDef->cd_fd == -1) dbReadOpen(cellDef, NULL, TRUE, NULL); - 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; + if (cellDef->cd_fd == -1) + TxError("Overriding advisory lock held on cell %s\n", + cellDef->cd_name); #endif + cellDef->cd_flags &= ~CDNOEDIT; WindAreaChanged(w, &w->w_screenArea); CmdSetWindCaption(EditCellUse, EditRootDef); }