diff options
author | Ruben Undheim <ruben.undheim@gmail.com> | 2019-01-04 19:14:24 +0100 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2019-01-04 19:14:24 +0100 |
commit | 8d755759d932c513118a1ad8275a2b0f903667ce (patch) | |
tree | 5fc7a29c7eea23786b7ba26a7ff61146611c5f5c | |
parent | e266a6f9d79ff9d311706e6d1694b26e9c2ec678 (diff) | |
parent | 865a8002848550990b963870cca74c0a51426047 (diff) |
Merge tag 'upstream/1.3.108'
Upstream version 1.3.108
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | lef.c | 2 | ||||
-rw-r--r-- | node.c | 1 | ||||
-rw-r--r-- | qconfig.c | 47 |
4 files changed, 20 insertions, 32 deletions
@@ -1 +1 @@ -1.3.107 +1.3.108 @@ -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); } } @@ -17,6 +17,7 @@ #include "node.h" #include "qconfig.h" #include "lef.h" +#include "output.h" /*--------------------------------------------------------------*/ /* SetNodeinfo -- */ @@ -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 |