summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2019-01-04 19:14:24 +0100
committerRuben Undheim <ruben.undheim@gmail.com>2019-01-04 19:14:24 +0100
commit8d755759d932c513118a1ad8275a2b0f903667ce (patch)
tree5fc7a29c7eea23786b7ba26a7ff61146611c5f5c
parente266a6f9d79ff9d311706e6d1694b26e9c2ec678 (diff)
parent865a8002848550990b963870cca74c0a51426047 (diff)
Merge tag 'upstream/1.3.108'
Upstream version 1.3.108
-rw-r--r--VERSION2
-rw-r--r--lef.c2
-rw-r--r--node.c1
-rw-r--r--qconfig.c47
4 files changed, 20 insertions, 32 deletions
diff --git a/VERSION b/VERSION
index 328a637..81d6db0 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.3.107
+1.3.108
diff --git a/lef.c b/lef.c
index 409c693..959fcb7 100644
--- a/lef.c
+++ b/lef.c
@@ -1096,7 +1096,7 @@ LefReadLayers(f, obstruct, lreturn)
/* CLASS_VIA in lefl record is a cut, and the layer */
/* geometry is ignored for the purpose of routing. */
- if (lefl->lefClass != CLASS_VIA)
+ if ((!lefl) || (lefl->lefClass != CLASS_VIA))
LefError("Don't know how to parse layer \"%s\"\n", token);
}
}
diff --git a/node.c b/node.c
index 6fb3173..5b13dc1 100644
--- a/node.c
+++ b/node.c
@@ -17,6 +17,7 @@
#include "node.h"
#include "qconfig.h"
#include "lef.h"
+#include "output.h"
/*--------------------------------------------------------------*/
/* SetNodeinfo -- */
diff --git a/qconfig.c b/qconfig.c
index 380315c..d71c4ff 100644
--- a/qconfig.c
+++ b/qconfig.c
@@ -127,6 +127,20 @@ post_config(void)
} /* post_config() */
/*--------------------------------------------------------------*/
+/* Append to string list */
+/*--------------------------------------------------------------*/
+
+void string_list_append(STRING *lst, const char *s)
+{
+ STRING n, strl;
+ n = (STRING)malloc(sizeof(struct string_));
+ n->name = strdup(s);
+ n->next = NULL;
+ while (*lst) lst = &(*lst)->next;
+ *lst = n;
+}
+
+/*--------------------------------------------------------------*/
/* read_config - read in the config file */
/* */
/* ARGS: the filename (normally route.cfg) */
@@ -312,44 +326,17 @@ int read_config(FILE *fconfig, int is_info)
if ((i = sscanf(lineptr, "do not route node %s\n", sarg)) == 1) {
OK = 1;
- dnr = (STRING)malloc(sizeof(struct string_));
- dnr->name = strdup(sarg);
- if (DontRoute != NULL) {
- for (strl = DontRoute; strl->next; strl = strl->next);
- strl->next = dnr;
- }
- else {
- dnr->next = NULL;
- DontRoute = dnr;
- }
+ string_list_append(&DontRoute, sarg);
}
if ((i = sscanf(lineptr, "route priority %s\n", sarg)) == 1) {
OK = 1;
- cn = (STRING)malloc(sizeof(struct string_));
- cn->name = strdup(sarg);
- if (CriticalNet != NULL) {
- for (strl = CriticalNet; strl->next; strl = strl->next);
- strl->next = cn;
- }
- else {
- cn->next = NULL;
- CriticalNet = cn;
- }
+ string_list_append(&CriticalNet, sarg);
}
if ((i = sscanf(lineptr, "critical net %s\n", sarg)) == 1) {
OK = 1;
- cn = (STRING)malloc(sizeof(struct string_));
- cn->name = strdup(sarg);
- if (CriticalNet != NULL) {
- for (strl = CriticalNet; strl->next; strl = strl->next);
- strl->next = cn;
- }
- else {
- cn->next = NULL;
- CriticalNet = cn;
- }
+ string_list_append(&CriticalNet, sarg);
}
// Search for "no stack". This allows variants like "no stacked