discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: discuss@mdocml.bsd.lv
Subject: Re: Library manpages per-function or per-library?
Date: Thu, 20 Nov 2014 03:02:38 +0100	[thread overview]
Message-ID: <20141120020238.GL28366@iris.usta.de> (raw)
In-Reply-To: <20141112145127.GA28857@britannica.bec.de>

Hi, Kristaps and Joerg,

Joerg Sonnenberger wrote on Wed, Nov 12, 2014 at 03:51:27PM +0100:
> On Wed, Nov 12, 2014 at 03:28:30PM +0100, Kristaps Dzonsons wrote:

>> I thought I'd put this question up for future searches, as it
>> confuses me and no doubt confuses others, as well.  In short, when
>> writing a library, does one document each function in a separate
>> mdoc(7) page, or all functions in one big one?  Or perhaps, grouped
>> by utility?  Or grouped by header file?

The usual policy in OpenBSD is one page per function, except when
that would cause substantial text duplication, in which case
functions get grouped into pages to avoid duplication.
Grouping a few closely related functions for other reasons
is also widely considered acceptable, in particular if the
amount of information per function is low, as long as the
number of functions per page doesn't grow too much.

> One man page documenting the general API design and one man page
> per function group.

That sounds like a sound policy, too, even though OpenBSD usually
skips the page documenting the general API design, explaining that
in whichever of the individual pages fits best.

Note that there are many cases where these policies are not
followed for various, often historical reasons, and that the
policies are not intended to be followed by the letter.
If, in a particular case, doing it a bit differently makes
the pages easier to use, that's OK.

Yours,
  Ingo
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2014-11-20  2:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 14:28 Kristaps Dzonsons
2014-11-12 14:51 ` Joerg Sonnenberger
2014-11-20  2:02   ` Ingo Schwarze [this message]
2014-11-20  2:10 ` Guy Harris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141120020238.GL28366@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=discuss@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).