Пример #1
0
void PragmaAuxFini( void )
{
    void    *junk;

    while( AuxList != NULL ) {
        junk = AuxList;
        if( AuxList->info != NULL ) {
            if( AuxList->info->use > 1 ) {
                AuxList->info->use--;
            } else {
                FreeAuxInfo( AuxList->info );
                if( !IsAuxInfoBuiltIn( AuxList->info ) ) {
                    CMemFree( AuxList->info );
                }
            }
        }
        AuxList = AuxList->next;
        CMemFree( junk );
    }

    FreeAuxInfo( &DefaultInfo );
    FreeAuxInfo( &WatcallInfo );
    FreeAuxInfo( &CdeclInfo );
    FreeAuxInfo( &PascalInfo );
    FreeAuxInfo( &SyscallInfo );
    FreeAuxInfo( &OptlinkInfo );
    FreeAuxInfo( &FortranInfo );
    FreeAuxInfo( &StdcallInfo );
    FreeAuxInfo( &FastcallInfo );
#if _CPU == 386
    FreeAuxInfo( &Far16CdeclInfo );
    FreeAuxInfo( &Far16PascalInfo );
#endif
}
Пример #2
0
static void pragmaFini(         // FINISH PRAGMAS
    INITFINI* defn )            // - definition
{
    AUX_ENTRY       *next;
    AUX_ENTRY       *curr;
    AUX_INFO        *info;

    defn = defn;
    for( curr = AuxList; curr != NULL; curr = next ) {
        next = curr->next;
        info = curr->info;
        if( info != NULL ) {
            if( info->use > 1 ) {
                info->use--;
            } else {
                freeInfo( info );
#ifndef NDEBUG
                if( IsAuxInfoBuiltIn( info ) ) {
                    CFatal( "freeing a static calling convention info" );
                }
#endif
                if( !IsAuxInfoBuiltIn( info ) ) {
                    CMemFree( info );
                }
            }
        }
        CMemFree( curr );
    }
    freeInfo( &DefaultInfo );
    freeInfo( &CdeclInfo );
    freeInfo( &PascalInfo );
    freeInfo( &SyscallInfo );
    freeInfo( &OptlinkInfo );
    freeInfo( &StdcallInfo );
    freeInfo( &FastcallInfo );
#if _CPU == 386
    freeInfo( &Far16CdeclInfo );
    freeInfo( &Far16PascalInfo );
#endif
    freeInfo( &WatcallInfo );
    freeInfo( &FortranInfo );
    //CMemFreePtr( &FortranInfo.objname );
    AuxList = NULL;
    CgInfoFreeLibs();
    CgInfoFreeImports();
    CgInfoFreeImportsS();
}
Пример #3
0
static void pragmaFini(         // FINISH PRAGMAS
    INITFINI* defn )            // - definition
{
    register struct aux_entry *next;
    register void             *junk;

    defn = defn;
    next = AuxList;
    while( next != NULL ) {
        junk = next;
        if( next->info != NULL ) {
            if( next->info->use != 1 ) {
                next->info->use--;
            } else {
                freeInfo( next->info );
#ifndef NDEBUG
                if( IsAuxInfoBuiltIn( next->info ) ) {
                    CFatal( "freeing a static calling convention info" );
                }
#endif
                if( !IsAuxInfoBuiltIn( next->info ) ) {
                    CMemFree( next->info );
                }
            }
        }
        next = next->next;
        CMemFree( junk );
    }
    freeInfo( &DefaultInfo );
    freeInfo( &CdeclInfo );
    freeInfo( &PascalInfo );
    freeInfo( &SyscallInfo );
    freeInfo( &OptlinkInfo );
    freeInfo( &StdcallInfo );
    freeInfo( &FastcallInfo );
#if _CPU == 386
    freeInfo( &Far16CdeclInfo );
    freeInfo( &Far16PascalInfo );
#endif
    freeInfo( &WatcallInfo );
    freeInfo( &FortranInfo );
    //CMemFreePtr( &FortranInfo.objname );
    AuxList = NULL;
    CgInfoFreeLibs();
    CgInfoFreeImports();
    CgInfoFreeImportsS();
}