model_server/xref/src/Xref_util.cxx
// copy all links from this to sym
copy all links from this to sym
copy all links from this to sym
void xrefSymbol::copy_link(xrefSymbol* new_sym, XrefTable* xref)
{
    Initialize(xrefSymbol::copy_link);
    Xref* xr = xref->get_Xref();
    uint sind = get_symbol_index();
    Link* lnk = get_start_link(sind, xref);
    while (lnk && !last_link(lnk)) {
        if (lnk->symbol_link()) {
            xrefSymbol* lnk_sym = lnk->get_symbol_of_link(xref);
            long j = lnk_sym->get_link_offset(lt_sym, xref);
            if (j > 0) {
                xrefSymbol* nls = xref->get_symbol_from_index((int)j);
                new_sym->add_link(lnk->lt(), nls, xr);
            }
        }
        else if (lnk->num_link())
            new_sym->add_link(lnk->lt(), (long) lnk->get_index(), xref);
        lnk = get_next_link(lnk, sind, xref);
    }
    return;
}
void xrefSymbol :: copy_link ( xrefSymbol * new_sym , XrefTable * xref ) { Initialize ( xrefSymbol :: copy_link ) ; Xref * xr = xref -> get_Xref ( ) ; uint sind = get_symbol_index ( ) ; Link * lnk = get_start_link ( sind , xref ) ; while ( lnk && ! last_link ( lnk ) ) { if ( lnk -> symbol_link ( ) ) { xrefSymbol * lnk_sym = lnk -> get_symbol_of_link ( xref ) ; long j = lnk_sym -> get_link_offset ( lt_sym , xref ) ; if ( j > 0 ) { xrefSymbol * nls = xref -> get_symbol_from_index ( ( int ) j ) ; new_sym -> add_link ( lnk -> lt ( ) , nls , xr ) ; } } else if ( lnk -> num_link ( ) ) new_sym -> add_link ( lnk -> lt ( ) , ( long ) lnk -> get_index ( ) , xref ) ; lnk = get_next_link ( lnk , sind , xref ) ; } return ; }
copy all links from this to sym
copy all links from this to sym