7.5. Describing an API

DocBook has a rather detailed way of marking up descriptions of function behaviour. The tag that introduces it is <funcsynopsis>. Here is an example:

Example 7.9. Describing a function in a C library API

<funcsynopsis>
<funcsynopsisinfo>#include <stdlib.h></funcsynopsisinfo>
<funcprototype>
<funcdef>double <function>atof</function></funcdef>
<paramdef>const char *<parameter>nptr</parameter></paramdef>
</funcprototype>
</funcsynopsis>

Here is how it looks:

#include <stdlib.h>

double atof(nptr);
const char *nptr;