diff --git a/calma/CalmaWrite.c b/calma/CalmaWrite.c index 910dfdde..f3d0e66b 100644 --- a/calma/CalmaWrite.c +++ b/calma/CalmaWrite.c @@ -681,12 +681,12 @@ calmaProcessDef(def, outf) /* another vendor GDS, it would not normally be output. */ DBPropGet(def->cd_parents->cu_parent, "GDS_FILE", &isReadOnly); - if (!isReadOnly) + if (!isReadOnly || isAbstract) TxError("Calma output error: Can't find GDS file \"%s\" " "for vendor cell \"%s\". Using magic's " "internal definition\n", filename, def->cd_name); - else + if (isReadOnly) def->cd_flags |= CDVENDORGDS; } else if (isAbstract) diff --git a/database/DBio.c b/database/DBio.c index a3f3db4d..e04f6a9a 100644 --- a/database/DBio.c +++ b/database/DBio.c @@ -1400,39 +1400,42 @@ badTransform: /* now two versions of the same cell name coming from different */ /* sources, and this must be corrected. */ - if (subCellDef->cd_file != NULL) + if (*pathptr != '\0') { - slashptr = strrchr(subCellDef->cd_file, '/'); - if (slashptr != NULL) + if (subCellDef->cd_file != NULL) { - *slashptr = '\0'; - - if (strcmp(subCellDef->cd_file, pathptr)) + slashptr = strrchr(subCellDef->cd_file, '/'); + if (slashptr != NULL) { - TxError("Duplicate cell in %s: Instance of cell %s is from " - "path %s but cell was previously read from %s.\n", - cellDef->cd_name, slashptr + 1, pathptr, - subCellDef->cd_file); + *slashptr = '\0'; - /* To do: Check if new path does not exist (ignore), */ - /* or if new path has same symbolic link or is the same */ - /* filesize and checksum (ignore). If file appears to */ - /* be truly different, then create a new cell with a */ - /* modified cell name. */ + if (strcmp(subCellDef->cd_file, pathptr)) + { + TxError("Duplicate cell in %s: Instance of cell %s is from " + "path %s but cell was previously read from %s.\n", + cellDef->cd_name, slashptr + 1, pathptr, + subCellDef->cd_file); - TxError("New path will be ignored. Please check.\n"); + /* To do: Check if new path does not exist (ignore), */ + /* or if new path has same symbolic link or is the same */ + /* filesize and checksum (ignore). If file appears to */ + /* be truly different, then create a new cell with a */ + /* modified cell name. */ + + TxError("New path will be ignored. Please check.\n"); + } + *slashptr = '/'; } - *slashptr = '/'; } - } - else if (*pathptr != '\0') - { - /* Reconstruct file from path and cellname */ + else + { + /* Reconstruct file from path and cellname */ - strcat(path, "/"); - strcat(path, subCellDef->cd_name); - strcat(path, DBSuffix); - StrDup(&subCellDef->cd_file, path); + strcat(path, "/"); + strcat(path, subCellDef->cd_name); + strcat(path, DBSuffix); + StrDup(&subCellDef->cd_file, path); + } } subCellUse = DBCellNewUse(subCellDef, (useid[0]) ?