diff --git a/VERSION b/VERSION index 73d0b208..85bfd89e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.611 +8.3.612 diff --git a/commands/CmdSubrs.c b/commands/CmdSubrs.c index d871ca50..5ff6d199 100644 --- a/commands/CmdSubrs.c +++ b/commands/CmdSubrs.c @@ -761,13 +761,16 @@ cmdSaveCell( if (!tryRename || (fileName == NULL) || (strcmp(cellDef->cd_name, fileName) == 0)) goto cleanup; - /* Rename the cell */ - if (!DBCellRenameDef(cellDef, fileName)) + /* Rename the cell, unless fileName is a .tcl file (scripted output) */ + if ((strlen(fileName) <= 4) || strcmp(fileName + strlen(fileName) - 4, ".tcl")) { - /* This should never happen */ - TxError("Magic error: there is already a cell named \"%s\"\n", + if (!DBCellRenameDef(cellDef, fileName)) + { + /* This should never happen */ + TxError("Magic error: there is already a cell named \"%s\"\n", fileName); - goto cleanup; + goto cleanup; + } } if (EditCellUse && (cellDef == EditCellUse->cu_def)) diff --git a/database/DBio.c b/database/DBio.c index 9c065f2b..cc4ec1ad 100644 --- a/database/DBio.c +++ b/database/DBio.c @@ -4384,8 +4384,6 @@ ioerror: return (FALSE); } SigEnableInterrupts(); - TxPrintf("Saved cell %s as a sequence of magic commands (file %s.tcl).\n", - cellDef->cd_name, cellDef->cd_name); return (TRUE); } @@ -4527,7 +4525,7 @@ dbWritePropCommandsFunc(key, proprec, cdarg) break; case PROPERTY_TYPE_INTEGER: - fprintf(f, "property integer "); + fprintf(f, "property integer %s ", key); for (i = 0; i < proprec->prop_len; i++) fprintf(f, "%d ", proprec->prop_value.prop_integer[i]); fprintf(f, "\n"); @@ -4535,15 +4533,15 @@ dbWritePropCommandsFunc(key, proprec, cdarg) case PROPERTY_TYPE_DIMENSION: windCheckOnlyWindow(&w, DBWclientID); - fprintf(f, "property dimension "); + fprintf(f, "property dimension %s ", key); for (i = 0; i < proprec->prop_len; i++) - fprintf(f, "%d ", DBWPrintValue(proprec->prop_value.prop_integer[i], + fprintf(f, "%s ", DBWPrintValue(proprec->prop_value.prop_integer[i], w, ((i % 2) == 0) ? TRUE : FALSE)); fprintf(f, "\n"); break; case PROPERTY_TYPE_DOUBLE: - fprintf(f, "property double "); + fprintf(f, "property double %s ", key); for (i = 0; i < proprec->prop_len; i++) fprintf(f, "%"DLONG_PREFIX"d ", proprec->prop_value.prop_double[i]); fprintf(f, "\n"); @@ -4624,6 +4622,8 @@ DBCellWrite(cellDef, fileName) { result = DBCellWriteCommandFile(cellDef, realf); fclose(realf); + TxPrintf("Saved cell %s as a sequence of magic commands " + "(file %s).\n", cellDef->cd_name, fileName); return result; } }