Name

funcsynopsis — The syntax summary for a function definition

Synopsis

funcsynopsis ::= (infodb.titleforbidden.info, (funcprototype | funcsynopsisinfo)+)

Attribute synopsis

Common attributes and common linking attributes.

Additional attributes:

  • language

Description

A funcsynopsis contains the syntax summary of a function prototype or a set of function prototypes. The content model of this element was designed specifically to capture the semantics of most C-language function prototypes (for use in UNIX reference pages).

This is one of the few places where DocBook attempts to model as well as describe. Using funcsynopsis for languages that are unrelated to C may prove difficult.

Processing expectations

For the most part, the processing application is expected to generate all of the parentheses, semicolons, commas, and so on required in the rendered synopsis. The exception to this rule is that the spacing and other punctuation inside a parameter that is a pointer to a function must be provided in the source markup.

With sufficient author cooperation, it should be possible to mark up a function synopsis with enough clarity so that a processing system can generate either K&R-style or ANSI-style renderings.

Attributes

Common attributes and common linking attributes.

language

Identifies the language (i.e., programming language) of the content

See Also

cmdsynopsis, synopsis

Examples

There are two common presentation styles for function synopses, “K&R” style and “ANSI” style.

K&R examples

<article xmlns='http://docbook.org/ns/docbook'> ...

Get DocBook 5: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.