offsetof(3) is not documented so here's a man page for it.

Is the text below enough or should it be more verbose?

.Dt OFFSETOF 3
.Os
.Sh NAME
.Nm offsetof
.Nd offset of a structure member
.Sh SYNOPSIS
.Fd #include <stddef.h>
.Ft size_t
.Fn offsetof "type" "member"
.Sh DESCRIPTION
The
.Fn offsetof
macro expands to an integer constant expression and yields the offset,
in bytes, of the field
.Ar member
from the start of the structure
.Ar type .
.Pp
A compiler error will result if
.Ar member
is not aligned to a byte boundary (i.e. it is a bit-field).
.Sh STANDARDS
The
.Fn offsetof
macro conforms to
.St -ansiC .

Reply via email to