sym_id STFreeName( sym_id sym_ptr ) { //========================================== // Free a symbol name. if( ( sym_ptr->u.ns.flags & SY_CLASS ) == SY_COMMON ) { sym_ptr = FreeLink( (void **)sym_ptr ); } else { if( ( sym_ptr->u.ns.flags & SY_CLASS ) == SY_VARIABLE ) { if( sym_ptr->u.ns.flags & SY_SUBSCRIPTED ) { if( sym_ptr->u.ns.si.va.u.dim_ext != NULL ) { FMemFree( sym_ptr->u.ns.si.va.u.dim_ext ); } } if( sym_ptr->u.ns.flags & SY_IN_EC ) { if( sym_ptr->u.ns.si.va.vi.ec_ext != NULL ) { FMemFree( sym_ptr->u.ns.si.va.vi.ec_ext ); } } } else if( ( sym_ptr->u.ns.flags & SY_CLASS ) == SY_SUBPROGRAM ) { if( ( sym_ptr->u.ns.flags & SY_SUBPROG_TYPE ) == SY_STMT_FUNC ) { FreeSFHeader( sym_ptr ); } } sym_ptr = STFree( sym_ptr ); } return( sym_ptr ); }
static sym_id STFreeMSTE( sym_id sym_ptr ) { //============================================== // Free a "magic" symbol table entry. sym_ptr = STFree( sym_ptr ); return( sym_ptr ); }
static void FreeList( sym_id sym_ptr ) { //========================================== // Free a symbol table (CList, LList or SList ). while( sym_ptr != NULL ) { sym_ptr = STFree( sym_ptr ); } }
void FreeRtRtns( void ) { //==================== // Free symbol table entries for run-time routines. int rt_index; sym_id sym; rt_index = 0; while( rt_index <= MAX_RT_INDEX ) { sym = RtnTab[ rt_index ].sym_ptr; if( sym != NULL ) { if( ( CGFlags & CG_FATAL ) == 0 ) { if( sym->u.ns.u3.address != NULL ) { BEFreeBack( sym->u.ns.u3.address ); } } STFree( sym ); RtnTab[ rt_index ].sym_ptr = NULL; } rt_index++; } }
void FreeInlinePragmas( void ) { //=========================== // Free symbol table entries for run-time routines. #if _CPU == 386 || _CPU == 8086 int index; sym_id sym; if( !CreatedPragmas ) return; for( index = 0; index < MAX_IN_INDEX; index++ ) { sym = InlineTab[ index ].sym_ptr; if( sym != NULL ) { if( ( CGFlags & CG_FATAL ) == 0 ) { if( sym->u.ns.u3.address != NULL ) { BEFreeBack( sym->u.ns.u3.address ); } } STFree( sym ); InlineTab[ index ].sym_ptr = NULL; } } #endif }