From 659fc6b55e28740c74d66dbe3bda765d1004a12e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 27 Feb 2005 21:40:23 +0000 Subject: Implementation of the second expansion in explicit rules, static pattern rules and implicit rules. --- misc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'misc.c') diff --git a/misc.c b/misc.c index 5532369..4f1f864 100644 --- a/misc.c +++ b/misc.c @@ -525,6 +525,27 @@ copy_dep_chain (struct dep *d) return firstnew; } +/* Free a chain of `struct dep'. Each dep->name is freed + as well. */ + +void +free_dep_chain (struct dep *d) +{ + register struct dep *tmp; + + while (d != 0) + { + if (d->name != 0) + free (d->name); + + tmp = d; + + d = d->next; + + free (tmp); + } + +} #ifdef iAPX286 /* The losing compiler on this machine can't handle this macro. */ -- cgit v1.2.3