Lines Matching refs:links

353 static struct link *	links;
702 /* Compare the two links A and B, for a stable sort by link name. */
729 /* Make the links specified by the Link lines. */
735 qsort(links, nlinks, sizeof *links, qsort_linkcmp);
741 && strcmp(links[i].l_linkname, links[i + 1].l_linkname) == 0)
743 links[j++] = links[i];
747 /* Walk through the link array making links. However,
750 up with a small sorted subsequence of not-yet-made links.
751 nalinks counts all the links in the array, including copies.
759 links that either have been made, or have been copied to a
763 not-yet-made links for this pass
765 not-yet-made links that this pass has skipped because
766 they were links to not-yet-made links
772 If there are L links, this algorithm is O(C*L*log(L)) where
781 eat(links[i].l_filenum, links[i].l_linenum);
783 /* If this pass examined all its links, start the next pass. */
787 links[i].l_target, links[i].l_linkname);
794 /* Diagnose self links, which the cycle detection algorithm would not
796 if (strcmp(links[i].l_target, links[i].l_linkname) == 0) {
797 error(_("link %s targets itself"), links[i].l_target);
802 l = bsearch(links[i].l_target, &links[i + 1], j - (i + 1),
803 sizeof *links, bsearch_linkcmp);
805 l = bsearch(links[i].l_target, &links[j], nalinks - j,
806 sizeof *links, bsearch_linkcmp);
808 dolink(links[i].l_target, links[i].l_linkname, false);
811 links = growalloc(links, sizeof *links, nalinks, &nlinks_alloc);
812 links[nalinks++] = links[i];
818 links[i].l_linkname, links[i].l_target);
819 else if (bsearch(links[i].l_target, links, nlinks, sizeof *links,
822 links[i].l_linkname, links[i].l_target);
2138 links = growalloc(links, sizeof *links, nlinks, &nlinks_alloc);
2139 links[nlinks++] = l;