Corrected one major error which will cause magic to fail to find the
".res.ext" file from "extresist" after using "extract do local" (and probably with "extract path" as well). Fixed this, and also made sure that "extresist" writes the ".res.ext" file to the same location as ".ext" always, so that handling is consistent throughout the full R-C extraction process, across the use of "extract", "ext2sim", "extresist", and "ext2spice".
This commit is contained in:
parent
952b20d2a2
commit
22fbb28656
|
|
@ -623,13 +623,39 @@ resistChanged:
|
|||
break;
|
||||
}
|
||||
}
|
||||
(void) fclose(inf);
|
||||
fclose(inf);
|
||||
inf = (FILE *)NULL;
|
||||
|
||||
/* Is there an "extresist" extract file? */
|
||||
if (DoResist)
|
||||
{
|
||||
DoResist = FALSE; /* do this only once */
|
||||
inf = PaOpen(name, "r", ".res.ext", EFSearchPath, EFLibPath, &efReadFileName);
|
||||
if (EFSearchPath != NULL)
|
||||
inf = PaOpen(name, "r", ".res.ext", EFSearchPath,
|
||||
EFLibPath, &efReadFileName);
|
||||
|
||||
if ((inf == NULL) && (dbdef = DBCellLookDef(name)) != NULL)
|
||||
{
|
||||
/* If cell is in main database, check if there is a file path set. */
|
||||
if (dbdef->cd_file != NULL)
|
||||
{
|
||||
char *filepath, *sptr;
|
||||
|
||||
filepath = StrDup((char **)NULL, dbdef->cd_file);
|
||||
sptr = strrchr(filepath, '/');
|
||||
if (sptr) {
|
||||
*sptr = '\0';
|
||||
inf = PaOpen(name, "r", ".res.ext", filepath,
|
||||
EFLibPath, &efReadFileName);
|
||||
}
|
||||
freeMagic(filepath);
|
||||
}
|
||||
}
|
||||
|
||||
/* Try with the standard search path */
|
||||
if ((inf == NULL) && (EFSearchPath == NULL))
|
||||
inf = PaOpen(name, "r", ".res.ext", Path, EFLibPath, &efReadFileName);
|
||||
|
||||
if (inf != NULL)
|
||||
goto readfile;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -975,7 +975,17 @@ ResCheckSimNodes(celldef, resisdata)
|
|||
|
||||
if (ResOptionsFlags & ResOpt_DoExtFile)
|
||||
{
|
||||
ResExtFile = PaOpen(outfile,"w",".res.ext",".",(char *) NULL, (char **) NULL);
|
||||
if (ExtLocalPath != NULL)
|
||||
if (strcmp(ExtLocalPath, "."))
|
||||
{
|
||||
char *namebuf;
|
||||
namebuf = mallocMagic(strlen(ExtLocalPath) + strlen(celldef->cd_name)
|
||||
+ 2);
|
||||
sprintf(namebuf, "%s/%s", ExtLocalPath, celldef->cd_name);
|
||||
outfile = namebuf;
|
||||
}
|
||||
ResExtFile = PaOpen(outfile, "w", ".res.ext", ".", (char *)NULL, (char **)NULL);
|
||||
if (outfile != celldef->cd_name) freeMagic(outfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue