From 2046318942f7cf4b379fd956ce8f764c0a969343 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Thu, 24 Oct 2019 16:57:46 -0400 Subject: [PATCH] Corrected routine lefFileOpen() so that it will read files with extensions other than specifically ".lef" or ".def" (such as ".tlef" for technology LEF, recently encountered). --- lef/lefWrite.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lef/lefWrite.c b/lef/lefWrite.c index 30859c11..69264fc3 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -83,6 +83,7 @@ lefFileOpen(def, file, suffix, mode, prealfile) */ { char namebuf[512], *name, *endp, *ends; + char *locsuffix; int len; FILE *rfile; @@ -115,14 +116,17 @@ lefFileOpen(def, file, suffix, mode, prealfile) (void) strncpy(namebuf, name, len); namebuf[len] = '\0'; name = namebuf; + locsuffix = suffix; } + else + locsuffix = NULL; } /* Try once as-is, and if this fails, try stripping any leading */ /* path information in case cell is in a read-only directory (mode */ /* "read" only, and if def is non-NULL). */ - if ((rfile = PaOpen(name, mode, suffix, Path, CellLibPath, prealfile)) != NULL) + if ((rfile = PaOpen(name, mode, locsuffix, Path, CellLibPath, prealfile)) != NULL) return rfile; if (def)