M README.md => README.md +18 -7
@@ 2,25 2,34 @@
[](https://builds.sr.ht/~donmcc/ood?)
+
## License
-_Ood_ is available under a BSD-style license. See the [LICENSE](https://git.sr.ht/~donmcc/ood/tree/main/item/LICENSE)
+_Ood_ is available under a BSD-style license. See the [LICENSE][]
file for details.
+[license]: https://git.sr.ht/~donmcc/ood/tree/main/item/LICENSE
+
+
## Building From Source
_Ood_ is tested on macOS, Linux, FreeBSD and OpenBSD. Building it requires a
-C toolchain and [CMake](https://cmake.org) 3.13 or later.
+C toolchain and [CMake][] 3.13 or later.
+
+[cmake]: https://cmake.org
git clone https://git.sr.ht/~donmcc/ood
cd ood
cmake -S . -B tmp
cmake --build tmp --target all test
+
### Build Options
-To build with the [Address Sanitizer][https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options]
-enabled, set the `ADDRESS_SANITIZER` option to `ON`.
+To build with the [Address Sanitizer][] enabled, set the `ADDRESS_SANITIZER`
+option to `ON`.
+
+[address sanitizer]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options
cmake -S . -B tmp -DADDRESS_SANITIZER=ON
@@ 31,8 40,10 @@ Set the `COVERAGE` option to `ON` to generate coverage files.
cmake -S . -B tmp -DCOVERAGE=ON
-Set the `WALL` option to `ON` turns on [additional warnings][https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options]
-using the `-Wall` compiler option and treats warnings as errors. `WALL` is off
-by default but should be turned on for development and integration builds.
+Set the `WALL` option to `ON` turns on [additional warnings][] using the `-Wall`
+compiler option and treats warnings as errors. `WALL` is off by default but
+should be turned on for development and integration builds.
+
+[additional warnings]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options
cmake -S . -B tmp -DCOVERAGE=ON -DWALL=ON
M src/sa/README.md => src/sa/README.md +27 -13
@@ 1,14 1,18 @@
# _SA_: Socket Addresses
-A wrapper around the polymorphic `sockaddr` family of structs and a set of
+A wrapper around the polymorphic [`sockaddr`][] family of structs and a set of
helper functions for common socket address chores.
+[sockaddr]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html
+
+
## Overview
-The `sa` union holds storage for each of the `sockaddr`
-[type puns](https://en.wikipedia.org/wiki/Type_punning) along with space for
-a string representation. For the `sockaddr_un` address type, the `sun_path`
-field is used as the string representation.
+The `sa` union holds storage for each of the `sockaddr` [type puns][] along with
+space for a string representation. For the `sockaddr_un` address type, the
+`sun_path` field is used as the string representation.
+
+[type puns]: https://en.wikipedia.org/wiki/Type_punning
The union contains fields `.ipv4`, `.ipv6` and `.local` which correspond to
structs `sockaddr_in`, `sockaddr_in6` and `sockaddr_un` respectively.
@@ 49,23 53,31 @@ representation.
## License
-_SA_ is available under a BSD-style license. See the
-[LICENSE](https://git.sr.ht/~donmcc/sa/tree/main/item/LICENSE) file for details.
+_SA_ is available under a BSD-style license. See the [LICENSE][] file for
+details.
+
+[license]: https://git.sr.ht/~donmcc/sa/tree/main/item/LICENSE
+
## Building From Source
_SA_ is tested on macOS, Linux, FreeBSD and OpenBSD. Building it requires a
-C toolchain and [CMake](https://cmake.org) 3.13 or later.
+C toolchain and [CMake][] 3.13 or later.
+
+[cmake]: https://cmake.org
git clone https://git.sr.ht/~donmcc/sa
cd sa
cmake -S . -B tmp
cmake --build tmp --target all test
+
### Build Options
-To build with the [Address Sanitizer][https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options]
-enabled, set the `ADDRESS_SANITIZER` option to `ON`.
+To build with the [Address Sanitizer][] enabled, set the `ADDRESS_SANITIZER`
+option to `ON`.
+
+[address sanitizer]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options
cmake -S . -B tmp -DADDRESS_SANITIZER=ON
@@ 76,8 88,10 @@ Set the `COVERAGE` option to `ON` to generate coverage files.
cmake -S . -B tmp -DCOVERAGE=ON
-Set the `WALL` option to `ON` turns on [additional warnings][https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options]
-using the `-Wall` compiler option and treats warnings as errors. `WALL` is off
-by default but should be turned on for development and integration builds.
+Set the `WALL` option to `ON` turns on [additional warnings][] using the `-Wall`
+compiler option and treats warnings as errors. `WALL` is off by default but
+should be turned on for development and integration builds.
+
+[additional warnings]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#Warning-Options
cmake -S . -B tmp -DCOVERAGE=ON -DWALL=ON