From 65c8c36777ae9c1ef69152b80c5e1043d410dbac Mon Sep 17 00:00:00 2001
From: Thomas Voss <mail@thomasvoss.com>
Date: Thu, 17 Nov 2022 12:26:55 +0100
Subject: Make use of the new 3head section

---
 Makefile        |  11 +++---
 man/lux.h.0     | 106 --------------------------------------------------------
 man/lux.h.3head | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 man/luxget.3    |   6 ++--
 man/luxinit.3   |   6 ++--
 man/luxset.3    |   6 ++--
 6 files changed, 121 insertions(+), 120 deletions(-)
 delete mode 100644 man/lux.h.0
 create mode 100644 man/lux.h.3head

diff --git a/Makefile b/Makefile
index a193c6e..75137eb 100644
--- a/Makefile
+++ b/Makefile
@@ -10,12 +10,13 @@ all:
 	@echo 'run `tup` to build the library' >&2
 
 install:
-	mkdir -p ${DPREFIX}/include ${DPREFIX}/lib ${MANDIR}/man0 ${MANDIR}/man3
+	mkdir -p ${DPREFIX}/include ${DPREFIX}/lib \
+	         ${MANDIR}/man3 ${MANDIR}/man3head
 	cp src/liblux.a src/liblux.so ${DPREFIX}/lib
-	cp src/lux.h ${DPREFIX}/include
-	cp man/*.0 ${MANDIR}/man0
-	cp man/*.3 ${MANDIR}/man3
-	sed -i '/^\.ds doc-str-Lb-liblux/d' ${GFILE}
+	cp src/lux.h                  ${DPREFIX}/include
+	cp man/*.3     ${MANDIR}/man3
+	cp man/*.3head ${MANDIR}/man3head
+	sed  -i '/^\.ds doc-str-Lb-liblux/d' ${GFILE}
 	grep -v '^\.\\"' man/Lb-desc.tmac >> ${GFILE}
 
 clean:
diff --git a/man/lux.h.0 b/man/lux.h.0
deleted file mode 100644
index c13bb58..0000000
--- a/man/lux.h.0
+++ /dev/null
@@ -1,106 +0,0 @@
-.\" vi: tw=80 ft=nroff
-.\"
-.\" BSD Zero Clause License
-.\" 
-.\" Copyright (c) 2022 Thomas Voss
-.\" 
-.\" Permission to use, copy, modify, and/or distribute this software for any
-.\" purpose with or without fee is hereby granted.
-.\" 
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-.\" AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-.\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-.\" PERFORMANCE OF THIS SOFTWARE.
-.\"
-.Dd $Mdocdate: November 14 2022 $
-.Dt lux.h 0
-.Os Linux
-.Sh NAME
-.Nm lux.h
-.Nd query and manipulate screen brightness
-.Sh SYNOPSIS
-.In lux.h
-.Sh DESCRIPTION
-The
-.Nm liblux
-library is a C library
-.Pq C++ compatible
-that allows you to query information about and modify the state of the systems
-display brightness.
-The library defines a
-.Vt lux_t
-type which is used as an argument to all the library functions.
-This struct contains relevant file descriptors and other cacheable information;
-it’s fields are not intended to be accessed directly by the library user but
-only by library functions.
-.Pp
-The
-.Nm liblux
-library offers three sets of functions, each with their own manual.
-These sets of functions are used to allocate and free the
-.Vt lux_t
-structure, to query brightness information, and to modify brightness
-information.
-.Pp
-The following functions deal with the allocation of library structures:
-.Bl -bullet
-.It
-.Ft int
-.Fn luxinit "lux_t *"
-.It
-.Ft void
-.Fn luxfree "lux_t *"
-.El
-.Pp
-The following functions deal with querying information regarding display
-brightness:
-.Bl -bullet
-.It
-.Ft int
-.Fn luxget "lux_t *"
-.It
-.Ft int
-.Fn luxmax "lux_t *"
-.It
-.Ft double
-.Fn luxgetp "lux_t *"
-.El
-.Pp
-The following functions deal with modifying display brightness:
-.Bl -bullet
-.It
-.Ft int
-.Fn luxset "lux_t *" int
-.It
-.Ft int
-.Fn luxinc "lux_t *" int
-.It
-.Ft int
-.Fn luxdec "lux_t *" int
-.It
-.Ft double
-.Fn luxsetp "lux_t *" double
-.It
-.Ft double
-.Fn luxincp "lux_t *" double
-.It
-.Ft double
-.Fn luxdecp "lux_t *" double
-.El
-.Sh SEE ALSO
-.Xr luxdec 3 ,
-.Xr luxdecp 3 ,
-.Xr luxfree 3 ,
-.Xr luxget 3 ,
-.Xr luxgetp 3 ,
-.Xr luxinc 3 ,
-.Xr luxincp 3 ,
-.Xr luxinit 3 ,
-.Xr luxmax 3 ,
-.Xr luxset 3 ,
-.Xr luxsetp 3
-.Sh AUTHORS
-.An Thomas Voss Aq Mt mail@thomasvoss.com
diff --git a/man/lux.h.3head b/man/lux.h.3head
new file mode 100644
index 0000000..ddc38cd
--- /dev/null
+++ b/man/lux.h.3head
@@ -0,0 +1,106 @@
+.\" vi: tw=80 ft=nroff
+.\"
+.\" BSD Zero Clause License
+.\" 
+.\" Copyright (c) 2022 Thomas Voss
+.\" 
+.\" Permission to use, copy, modify, and/or distribute this software for any
+.\" purpose with or without fee is hereby granted.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+.\" AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+.\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+.\" PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: November 17 2022 $
+.Dt lux.h 3HEAD
+.Os Linux
+.Sh NAME
+.Nm lux.h
+.Nd query and manipulate screen brightness
+.Sh SYNOPSIS
+.In lux.h
+.Sh DESCRIPTION
+The
+.Nm liblux
+library is a C library
+.Pq C++ compatible
+that allows you to query information about and modify the state of the systems
+display brightness.
+The library defines a
+.Vt lux_t
+type which is used as an argument to all the library functions.
+This struct contains relevant file descriptors and other cacheable information;
+it’s fields are not intended to be accessed directly by the library user but
+only by library functions.
+.Pp
+The
+.Nm liblux
+library offers three sets of functions, each with their own manual.
+These sets of functions are used to allocate and free the
+.Vt lux_t
+structure, to query brightness information, and to modify brightness
+information.
+.Pp
+The following functions deal with the allocation of library structures:
+.Bl -bullet
+.It
+.Ft int
+.Fn luxinit "lux_t *"
+.It
+.Ft void
+.Fn luxfree "lux_t *"
+.El
+.Pp
+The following functions deal with querying information regarding display
+brightness:
+.Bl -bullet
+.It
+.Ft int
+.Fn luxget "lux_t *"
+.It
+.Ft int
+.Fn luxmax "lux_t *"
+.It
+.Ft double
+.Fn luxgetp "lux_t *"
+.El
+.Pp
+The following functions deal with modifying display brightness:
+.Bl -bullet
+.It
+.Ft int
+.Fn luxset "lux_t *" int
+.It
+.Ft int
+.Fn luxinc "lux_t *" int
+.It
+.Ft int
+.Fn luxdec "lux_t *" int
+.It
+.Ft double
+.Fn luxsetp "lux_t *" double
+.It
+.Ft double
+.Fn luxincp "lux_t *" double
+.It
+.Ft double
+.Fn luxdecp "lux_t *" double
+.El
+.Sh SEE ALSO
+.Xr luxdec 3 ,
+.Xr luxdecp 3 ,
+.Xr luxfree 3 ,
+.Xr luxget 3 ,
+.Xr luxgetp 3 ,
+.Xr luxinc 3 ,
+.Xr luxincp 3 ,
+.Xr luxinit 3 ,
+.Xr luxmax 3 ,
+.Xr luxset 3 ,
+.Xr luxsetp 3
+.Sh AUTHORS
+.An Thomas Voss Aq Mt mail@thomasvoss.com
diff --git a/man/luxget.3 b/man/luxget.3
index a571ef7..18c9a1a 100644
--- a/man/luxget.3
+++ b/man/luxget.3
@@ -15,7 +15,7 @@
 .\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 .\" PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd $Mdocdate: November 14 2022 $
+.Dd $Mdocdate: November 17 2022 $
 .Dt LUXGET 3
 .Os Linux
 .Sh NAME
@@ -137,7 +137,6 @@ can fail with any of the errors specified for
 or
 .Fn openat .
 .Sh SEE ALSO
-.Xr lux.h 0 ,
 .Xr luxdec 3 ,
 .Xr luxdecp 3 ,
 .Xr luxfree 3 ,
@@ -145,6 +144,7 @@ or
 .Xr luxincp 3 ,
 .Xr luxinit 3 ,
 .Xr luxset 3 ,
-.Xr luxsetp 3
+.Xr luxsetp 3 ,
+.Xr lux.h 3head
 .Sh AUTHORS
 .An Thomas Voss Aq Mt mail@thomasvoss.com
diff --git a/man/luxinit.3 b/man/luxinit.3
index 39047ca..12fa161 100644
--- a/man/luxinit.3
+++ b/man/luxinit.3
@@ -15,7 +15,7 @@
 .\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 .\" PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd $Mdocdate: November 14 2022 $
+.Dd $Mdocdate: November 17 2022 $
 .Dt LUXINIT 3
 .Os Linux
 .Sh NAME
@@ -106,7 +106,6 @@ can fail with any of the errors specified for
 or
 .Fn readdir .
 .Sh SEE ALSO
-.Xr lux.h 0 ,
 .Xr luxdec 3 ,
 .Xr luxdecp 3 ,
 .Xr luxget 3 ,
@@ -115,6 +114,7 @@ or
 .Xr luxincp 3 ,
 .Xr luxmax 3 ,
 .Xr luxset 3 ,
-.Xr luxsetp 3
+.Xr luxsetp 3 ,
+.Xr lux.h 3head
 .Sh AUTHORS
 .An Thomas Voss Aq Mt mail@thomasvoss.com
diff --git a/man/luxset.3 b/man/luxset.3
index 2cbedb4..9a6975f 100644
--- a/man/luxset.3
+++ b/man/luxset.3
@@ -15,7 +15,7 @@
 .\" OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 .\" PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd $Mdocdate: November 14 2022 $
+.Dd $Mdocdate: November 17 2022 $
 .Dt LUXSET 3
 .Os Linux
 .Sh NAME
@@ -162,11 +162,11 @@ can fail with any of the errors specified for
 or
 .Fn openat .
 .Sh SEE ALSO
-.Xr lux.h 0 ,
 .Xr luxfree 3 ,
 .Xr luxget 3 ,
 .Xr luxgetp 3 ,
 .Xr luxinit 3 ,
-.Xr luxmax 3
+.Xr luxmax 3 ,
+.Xr lux.h 3head
 .Sh AUTHORS
 .An Thomas Voss Aq Mt mail@thomasvoss.com
-- 
cgit v1.2.3