X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Floop.c;h=f2925e0cb0614debac98da719cb374b166f6e278;hb=9b7c16ec4cbb5282642c377272224e3fc825f860;hp=cb58d126fb92422673f46696ca9ac1220fc3be23;hpb=544705e6f456abaef98462d78325b4d1907bc6b0;p=cc65 diff --git a/src/cc65/loop.c b/src/cc65/loop.c index cb58d126f..f2925e0cb 100644 --- a/src/cc65/loop.c +++ b/src/cc65/loop.c @@ -6,10 +6,10 @@ /* */ /* */ /* */ -/* (C) 1998-2000 Ullrich von Bassewitz */ -/* Wacholderweg 14 */ -/* D-70597 Stuttgart */ -/* EMail: uz@musoftware.de */ +/* (C) 1998-2004 Ullrich von Bassewitz */ +/* Römerstraße 52 */ +/* D-70794 Filderstadt */ +/* EMail: uz@cc65.org */ /* */ /* */ /* This software is provided 'as-is', without any expressed or implied */ @@ -34,11 +34,13 @@ /* common */ +#include "check.h" #include "xmalloc.h" /* cc65 */ #include "error.h" -#include "loop.h" +#include "loop.h" +#include "stackptr.h" @@ -59,19 +61,16 @@ static LoopDesc* LoopStack = 0; -LoopDesc* AddLoop (unsigned sp, unsigned loop, unsigned label, - unsigned linc, unsigned lstat) -/* Create and add a new loop descriptor */ +LoopDesc* AddLoop (unsigned BreakLabel, unsigned ContinueLabel) +/* Create and add a new loop descriptor. */ { /* Allocate a new struct */ - LoopDesc* L = (LoopDesc*) xmalloc (sizeof (LoopDesc)); + LoopDesc* L = xmalloc (sizeof (LoopDesc)); /* Fill in the data */ - L->StackPtr = sp; - L->Loop = loop; - L->Label = label; - L->linc = linc; - L->lstat = lstat; + L->StackPtr = StackPtr; + L->BreakLabel = BreakLabel; + L->ContinueLabel = ContinueLabel; /* Insert it into the list */ L->Next = LoopStack; @@ -95,6 +94,7 @@ void DelLoop (void) /* Remove the current loop */ { LoopDesc* L = LoopStack; + CHECK (L != 0); LoopStack = LoopStack->Next; xfree (L); }