netrik hacker's manual
>========================<

[This file contains a description of the hyperlink mechanism. See hacking.txt or hacking.html for an overview of the manual.]

In contrast to most other aspects of functionality, there is no seperate module for link handling. The components forming the link mechanism are spread over several other modules instead.

There is a links.c file (and a related links.h, of course), but it contains only some simple helper functions -- at least for now.

parse_struct()

The first step is done already in the layout module: The links need to be extracted while parsing the structure of the page to generate the item tree. This is described under Links in hacking-layout.*.

Link Struct

The start and end position of a link, and the link's destination (extracted from the "href" attribute) are stored in "string->link[]".

This is a list of "struct Link", containing the data of all links and form controls inside the current text item: