chiark / gitweb /
align: Add trivial manpage.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 4 Jan 2009 13:50:14 +0000 (13:50 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 4 Jan 2009 13:56:34 +0000 (13:56 +0000)
I discovered while reorganizing the manpage build system that there was
no manual for align.h.

Makefile.am
align.3 [new file with mode: 0644]

index 6518677b93b1c20a124097addcf4251cee55ca66..7f6182828d9c81ee98b4b398f0a0c9f977008e36 100644 (file)
@@ -89,6 +89,7 @@ LIBMANS                       += macros.3
 
 ## Alignment.
 pkginclude_HEADERS     += align.h
+LIBMANS                        += align.3
 
 ## Bit manipulation.
 pkginclude_HEADERS     += bits.h
diff --git a/align.3 b/align.3
new file mode 100644 (file)
index 0000000..9ee2377
--- /dev/null
+++ b/align.3
@@ -0,0 +1,26 @@
+.\" -*-nroff-*-
+.TH align 3 "4 January 2009" "Straylight/Edgeware" "mLib utilities library"
+.SH NAME
+align \- alignment utilities
+.\" @ALIGN
+.SH SYNOPSIS
+.nf
+.B "#include <mLib/align.h>"
+
+.BI "size_t ALIGN(size_t " sz ");"
+.fi
+.SH DESCRIPTION
+The
+.B ALIGN
+macro returns the value of its argument
+.I sz
+rounded up to the next multiple of the size of
+.BR "union align" ,
+which is defined as a union containing a selection of built-in types.
+The intent is to write fairly portable memory allocators, which must
+return correctly-aligned memory.
+.IR array .
+.SH "SEE ALSO"
+.BR mLib (3).
+.SH "AUTHOR"
+Mark Wooding, <mdw@distorted.org.uk>