+ if (dest->type != NONE) {
+ xr = mknew(xref);
+ xr->next = NULL;
+ xr->dest = *dest; /* structure copy */
+ if (ldata->page->last_xref)
+ ldata->page->last_xref->next = xr;
+ else
+ ldata->page->first_xref = xr;
+ ldata->page->last_xref = xr;
+ xr->lx = xr->rx = left_x + ldata->xpos;
+ xr->by = top_y - ldata->ypos;
+ xr->ty = top_y - ldata->ypos + ldata->line_height;
+ } else
+ xr = NULL;
+
+ render_text(ldata->page, ldata->pdata, ldata, left_x + ldata->xpos,
+ top_y - ldata->ypos, ldata->first, ldata->end, &xr,
+ ldata->hshortfall, ldata->nspaces, &nspace, keywords);
+
+ if (xr) {
+ /*
+ * There's a cross-reference continued on to the next line.
+ */
+ *dest = xr->dest;
+ } else
+ dest->type = NONE;
+ }