summaryrefslogtreecommitdiff
path: root/tclqrouter.c
diff options
context:
space:
mode:
authorTim Edwards <tim@opencircuitdesign.com>2013-12-05 17:38:17 -0500
committerTim Edwards <tim@opencircuitdesign.com>2013-12-05 17:38:17 -0500
commit872458a0a205256f9b024a3865913a70d9fc002d (patch)
treea9b2e6164cc79621be2b0be36e437e8ea80ba2b8 /tclqrouter.c
parent8aae85cde82858c1cb504a495cbb3cc7d0613475 (diff)
Restored the "failing all" command, which had not been rewritten
for the revised Nlnets array.
Diffstat (limited to 'tclqrouter.c')
-rw-r--r--tclqrouter.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/tclqrouter.c b/tclqrouter.c
index 9d02ba1..8278f67 100644
--- a/tclqrouter.c
+++ b/tclqrouter.c
@@ -1015,7 +1015,7 @@ int qrouter_failing(ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[])
{
Tcl_Obj *lobj;
- NETLIST nl;
+ NETLIST nl, nlast;
NET net;
int i, failcount;
@@ -1029,12 +1029,17 @@ int qrouter_failing(ClientData clientData, Tcl_Interp *interp,
FailedNets = FailedNets->next;
free(nl);
}
+ nlast = NULL;
for (i = 0; i < Numnets; i++) {
net = Nlnets[i];
nl = (NETLIST)malloc(sizeof(struct netlist_));
nl->net = net;
- nl->next = FailedNets;
- FailedNets = nl;
+ nl->next = NULL;
+ if (nlast == NULL)
+ FailedNets = nl;
+ else
+ nlast->next = nl;
+ nlast = nl;
}
}
else if (!strncmp(Tcl_GetString(objv[1]), "all", 3)) {
@@ -1043,7 +1048,19 @@ int qrouter_failing(ClientData clientData, Tcl_Interp *interp,
FailedNets = FailedNets->next;
free(nl);
}
- create_netorder(0, &FailedNets);
+ create_netorder(0);
+ nlast = NULL;
+ for (i = 0; i < Numnets; i++) {
+ net = Nlnets[i];
+ nl = (NETLIST)malloc(sizeof(struct netlist_));
+ nl->net = net;
+ nl->next = NULL;
+ if (nlast == NULL)
+ FailedNets = nl;
+ else
+ nlast->next = nl;
+ nlast = nl;
+ }
}
else if (!strncmp(Tcl_GetString(objv[1]), "summary", 7)) {
failcount = countlist(FailedNets);