FictionTools/z88dk/src/sccz80/goto.c
/*
 *      Clean up the goto tree, called at the end of a function
 *      Should remedy all stack problems etc(!)
 */
Clean up the goto tree, called at the end of a function
Should remedy all stack problems etc(!)
Clean up the goto tree called at the end of a function Should remedy all stack problems etc ( ! )
void goto_cleanup(void)
{
    int i;
    GOTO_TAB* gptr;
    if (gotocnt == 0)
        return;
    gptr = gotoq + 1;
    for (i = 0; i < gotocnt; i++) {
        if (gptr->sym) {
            debug(DBG_GOTO, "Cleaning %s #%d\n", gptr->sym->name, i);
            postlabel(gptr->label);
            modstk((gptr->sym->offset.i) - (gptr->sp), KIND_NONE, NO, YES);
            jump(gptr->sym->size); 
        }
        gptr++;
    }
    gotocnt = 0;
}
void goto_cleanup ( void ) { int i ; GOTO_TAB * gptr ; if ( gotocnt == 0 ) return ; gptr = gotoq + 1 ; for ( i = 0 ; i < gotocnt ; i ++ ) { if ( gptr -> sym ) { debug ( DBG_GOTO , " \n " , gptr -> sym -> name , i ) ; postlabel ( gptr -> label ) ; modstk ( ( gptr -> sym -> offset . i ) - ( gptr -> sp ) , KIND_NONE , NO , YES ) ; jump ( gptr -> sym -> size ) ; } gptr ++ ; } gotocnt = 0 ; }
Clean up the goto tree, called at the end of a function
      Should remedy all stack problems etc(!)
Clean up the goto tree called at the end of a function Should remedy all stack problems etc ( ! )
/* label label(!) */ /* Wipe out reference to our goto labels in symbol table */