* target.c (unpush_target): Fix handling of removal of top target.
This commit is contained in:
parent
c7f7225314
commit
67e947deb2
|
@ -1,3 +1,7 @@
|
||||||
|
Sat Jul 23 00:58:15 1994 Stu Grossman (grossman@cygnus.com)
|
||||||
|
|
||||||
|
* target.c (unpush_target): Fix handling of removal of top target.
|
||||||
|
|
||||||
Fri Jul 22 17:30:39 1994 Stu Grossman (grossman@cygnus.com)
|
Fri Jul 22 17:30:39 1994 Stu Grossman (grossman@cygnus.com)
|
||||||
|
|
||||||
* Makefile.in: Add stuff to build nlmstub.
|
* Makefile.in: Add stuff to build nlmstub.
|
||||||
|
|
|
@ -443,6 +443,8 @@ unpush_target (t)
|
||||||
{
|
{
|
||||||
struct target_stack_item *cur, *prev;
|
struct target_stack_item *cur, *prev;
|
||||||
|
|
||||||
|
t->to_close (0); /* Let it clean up */
|
||||||
|
|
||||||
/* Look for the specified target. Note that we assume that a target
|
/* Look for the specified target. Note that we assume that a target
|
||||||
can only occur once in the target stack. */
|
can only occur once in the target stack. */
|
||||||
|
|
||||||
|
@ -456,13 +458,14 @@ unpush_target (t)
|
||||||
/* Unchain the target */
|
/* Unchain the target */
|
||||||
|
|
||||||
if (!prev)
|
if (!prev)
|
||||||
target_stack = NULL;
|
target_stack = cur->next;
|
||||||
else
|
else
|
||||||
prev->next = cur->next;
|
prev->next = cur->next;
|
||||||
|
|
||||||
free (cur); /* Release the target_stack_item */
|
free (cur); /* Release the target_stack_item */
|
||||||
|
|
||||||
(t->to_close) (0); /* Let it clean up */
|
update_current_target ();
|
||||||
|
cleanup_target (¤t_target);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue