/* _exit_sys.c *********** Copyright 1989-1993 by Vermont Creative Software *********** REVISIONS: _exit_sys() Cleans up after a Vermont Views application freeing all memory allocated by vv_init(). Call #include #include #include #include #include void _exit_sys() Returns None Description _exit_sys() frees any memory allocated by the initialization function. _exit_sys() is called when VV_FREE is defined through inclusion of vv_free.h before vv_main.h. */ #include /*C library headers */ #include /*Development Library header */ #include /*Designer header file */ #include /*enabling use of forms */ #include /*Vermont Views system header */ #ifdef OLD_STYLE void FASTCALL _exit_sys() #else void FASTCALL _exit_sys(void) #endif { #ifndef NO_DEBUG_CODE register int i; #endif if (_evq_head) /*free event queue head */ { mem_free(_evq_head); _evq_head = (EVENTPTR)NULLP; } if (_inittbl[DESIGNINIT]) /*free memory for Des. Library */ { /*logical att. linked list */ mem_free(_liblathdndp); _liblathdndp = (NODEPTR)NULLP; } if (_inittbl[HELPINIT]) /*if help system enabled */ { wn_free(HELP_WNP); HELP_WNP = (WINDOWPTR)NULLP; } if (_inittbl[FORMINIT]) /*free memory for picture linked list*/ { mem_free(_pichdndp); _pichdndp = (NODEPTR)NULLP; } if (ERR_WNP) wn_free(ERR_WNP); if (MSG_WNP) wn_free(MSG_WNP); FULL_WNP->flags &= ~SET; /*unset FULL_WNP so we can free it */ wn_free(FULL_WNP); #ifndef NO_DEBUG_CODE if (_inittbl[DEBUGINIT]) /*free all memory used by dev. debug */ { mem_free(_fullbdr_vstp); for (i = 0; i < _dblogq; i++) mem_free(_dblogp[i]); mem_free(_dblogp); mem_free(_dbstk); _fullbdr_vstp = (UCHAR *)NULLP; _dblogp = (MFLINEPTR *)NULLP; _dbstk = (UCHAR *)NULLP; } #endif }