groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Documenting a set of functions with -man


From: Lennart Jablonka
Subject: Re: Documenting a set of functions with -man
Date: Fri, 21 Jun 2024 14:52:22 +0000

Quoth Anton Shepelev:
What is the covenstional way of documenting a set of C
functions with -man?  Have you any recommendations or
examples about typesetting function declaraions, their
return types and aruguments in a classic man-page?  The .SY
macro does not seem to work well for C, because its function
declarations start with the return type.

Do take a look at .SY, but also note that it’s possible to do something like this.
.TH MMAP 2
.SH NAME
mmap \- map pages of memory
.SH SYNOPSIS
.ad l
#include <sys/mman.h>
.HP
void *mmap(\
void\ *addr,
size_t\ len,
int\ prot,
int\ flags,
int\ filedes,
off_t\ off);
.HP "\w'void *mmap('u"
void *mmap(\
void\ *addr,
size_t\ len,
int\ prot,
int\ flags,
int\ filedes,
off_t\ off);
.ad

reply via email to

[Prev in Thread] Current Thread [Next in Thread]