From f4cad598c467c07f2a7d3014e70093a85103eed6 Mon Sep 17 00:00:00 2001 From: emma Date: Tue, 4 Jun 2024 16:11:33 -0600 Subject: [PATCH] docs: formatting --- docs/intcmp.1 | 2 +- docs/mm.1 | 18 +++++++++--------- docs/npc.1 | 7 +++---- docs/rpn.1 | 7 ++++--- docs/scrut.1 | 30 +++++++++++++++--------------- docs/str.1 | 11 +++++++---- docs/strcmp.1 | 20 +++++++++++++++----- docs/swab.1 | 6 +++--- 8 files changed, 57 insertions(+), 44 deletions(-) diff --git a/docs/intcmp.1 b/docs/intcmp.1 index ed88038..905d31d 100644 --- a/docs/intcmp.1 +++ b/docs/intcmp.1 @@ -32,7 +32,7 @@ It may help to think of the -e, -g, and -l options as equivalent to the infix algebraic \(lq=\(rq, \(lq>\(rq, and \(lq<\(rq operators respectively, with each option putting its symbol between every given integer. The following example is equivalent to evaluating \(lq1 < 2 < 3\(rq: - +\" .RS .R intcmp -l 1 2 3 .RE diff --git a/docs/mm.1 b/docs/mm.1 index ef0336a..58bc26e 100644 --- a/docs/mm.1 +++ b/docs/mm.1 @@ -22,21 +22,21 @@ Catenate input files and write them to the start of each output file or stream. .\" .SH OPTIONS -.IP -a +.IP \fB-a\fP Opens subsequent outputs for appending rather than updating. -.IP -e +.IP \fB-e\fP Use the standard error as an output. -.IP -i +.IP \fB-i\fP Opens a path as an input. Without any inputs specified mm will use the standard input. The standard input shall be used as an input if one or more of -the input files is “-”. -.IP -o +the input files is \(lq-\(rq. +.IP \fB-o\fP Opens a path as an output. Without any outputs specified mm will use the standard output. The standard output shall be used as an output if one or more -of the output files is “-”. -.IP -u +of the output files is \(lq-\(rq. +.IP \fB-u\fP Ensures neither input or output will be buffered. -.IP -n +.IP \fB-n\fP Causes SIGINT signals to be ignored. .\" .SH DIAGNOSTICS @@ -66,7 +66,7 @@ unncessary. .\" .SH COPYRIGHT -Copyright (c) 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later +Copyright \(co 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later . .\" .SH SEE ALSO diff --git a/docs/npc.1 b/docs/npc.1 index 64f3406..e18e4ff 100644 --- a/docs/npc.1 +++ b/docs/npc.1 @@ -27,9 +27,9 @@ high bit set. .\" .SH USAGE -.IP -e +.IP \fB-e\fP Prints a currency sign ('$') before each line ending. -.IP -t +.IP \fB-t\fP Prints tab characters as '^I' rather than a literal horizontal tab. .\" .SH DIAGNOSTICS @@ -69,7 +69,6 @@ Copyright © 2023 DTB. License AGPLv3+: GNU AGPL version 3 or later .\" .SH SEE ALSO .BR cat (1p), -.BR cat-v (1) - +.BR cat-v (1), .I UNIX Style, or cat -v Considered Harmful by Rob Pike diff --git a/docs/rpn.1 b/docs/rpn.1 index c791613..8e87802 100644 --- a/docs/rpn.1 +++ b/docs/rpn.1 @@ -26,7 +26,8 @@ Upon evaluation, the program will print the resulting number on the stack to the standard output. Any further specified numbers will be placed at the end of the stack. -For information on for reverse polish notation syntax, see rpn(7). +For information on for reverse polish notation syntax, see +.BR rpn (7). .\" .SH STANDARD INPUT @@ -40,7 +41,7 @@ In the event of a syntax error, the program will print an In the event of an error, a debug message will be printed and the program will exit with the appropriate -.BR sysexits.h(3) +.BR sysexits.h (3) error code. .\" .SH CAVEATS @@ -80,5 +81,5 @@ Copyright (c) 2024 Emma Tebibyte. License AGPLv3+: GNU AGPL version 3 or later .SH SEE ALSO .BR bc (1p), .BR dc (1), -.BR rpn(7), +.BR rpn (7), .I IEEE 754 diff --git a/docs/scrut.1 b/docs/scrut.1 index 52d96ed..22c77fb 100644 --- a/docs/scrut.1 +++ b/docs/scrut.1 @@ -10,7 +10,7 @@ scrut \(en scrutinize file properties .SH SYNOPSIS scrut -.RB ( -bcdefgkprsuwxLS ) +.RB ( -LSbcdefgkprsuwx ) .RB [ file... ] .\" .SH DESCRIPTION @@ -19,33 +19,33 @@ Determine if files comply with requirements. .\" .SH OPTIONS -.IP -L +.IP \fB-L\fB Requires the given files to exist and be symbolic links. -.IP -S +.IP \fB-S\fP Requires the given files to exist and be sockets. -.IP -b +.IP \fB-b\fP Requires the given files to exist and be block special files. -.IP -c +.IP \fB-c\fP Requires the given files to exist and be character special files. -.IP -d +.IP \fB-d\fP Requires the given files to exist and be directories. -.IP -e +.IP \fB-e\fP Requires the given files to exist, and is redundant to any other option. -.IP -e +.IP \fB-f\fP Requires the given files to exist and be regular files. -.IP -g +.IP \fB-g\fP Requires the given files to exist and have their set group ID flags set. -.IP -k +.IP \fB-k\fP Requires the given files to exist and have their sticky bit set. -.IP -p +.IP \fB-p\fP Requires the given files to exist and be named pipes. -.IP -r +.IP \fB-r\fP Requires the given files to exist and be readable. -.IP -u +.IP \fB-u\fP Requires the given files to exist and have their set user ID flags set. -.IP -w +.IP \fB-w\fP Requires the given files to exist and be writable. -.IP -x +.IP \fB-x\fP Requires the given files to exist and be executable. .\" .SH DIAGNOSTICS diff --git a/docs/str.1 b/docs/str.1 index d40eafa..87caabb 100644 --- a/docs/str.1 +++ b/docs/str.1 @@ -31,14 +31,17 @@ An empty string will cause an unsuccessful exit as none of its contents pass any tests. When invoked incorrectly, a debug message will be printed and the program will -exit with the appropriate sysexits.h(3) error code. +exit with the appropriate +.BR sysexits.h (3) +error code. .\" .SH CAVEATS -There’s no way of knowing which argument failed the test without re-testing +There\(cqs no way of knowing which argument failed the test without re-testing arguments individually. -If a character in a string isn't valid ASCII str will exit unsuccessfully. +If a character in a string isn\(cqt valid ASCII the program will exit +unsuccessfully. .\" .SH AUTHOR @@ -48,7 +51,7 @@ Written by DTB .\" .SH COPYRIGHT -Copyright © 2023 DTB. License AGPLv3+: GNU AGPL version 3 or later +Copyright \(co 2023 DTB. License AGPLv3+: GNU AGPL version 3 or later . .\" .SH SEE ALSO diff --git a/docs/strcmp.1 b/docs/strcmp.1 index 768be0f..84b661d 100644 --- a/docs/strcmp.1 +++ b/docs/strcmp.1 @@ -21,9 +21,19 @@ Check whether string arguments are the same. .SH DIAGNOSTICS The program will exit successfully if the strings are identical. Otherwise, it -exits with the value 1 if an earlier string has a greater byte value than a -later string (e.g. strcmp b a) and 255 if an earlier string has a lesser byte -value (e.g. strcmp a b). +will exit with an error code of 1 if a string passed has a lesser byte value +than one of the prior strings: + +.RS +.R strcmp b a +.RE + +and with an error code of 255 if it has a greater byte value than one of the +prior strings: + +.RS +.R strcmp a b +.RE When invoked incorrectly, a debug message will be printed and the program will exit with the appropriate @@ -44,7 +54,7 @@ been This tool also handles integer comparisons and file scrutiny. These parts of its functionality have been broken out into multiple utilities. -This program’s functionality may be performed on a POSIX-compliant system with +This program\(cqs functionality may be performed on a POSIX-compliant system with .BR test (1p). .\" .SH AUTHOR @@ -55,7 +65,7 @@ Written by DTB .\" .SH COPYRIGHT -Copyright © 2023 DTB. License AGPLv3+: GNU AGPL version 3 or later +Copyright \(co 2023 DTB. License AGPLv3+: GNU AGPL version 3 or later . .\" .SH SEE ALSO diff --git a/docs/swab.1 b/docs/swab.1 index 90b50b0..7197a0a 100644 --- a/docs/swab.1 +++ b/docs/swab.1 @@ -17,7 +17,7 @@ swab .B word size .R ]) .\" -.SH USAGE +.SH DESCRIPTION Swap the latter and former halves of a block of bytes. .\" @@ -28,7 +28,7 @@ Ignore system call interruptions. .IP \fB-w\fP Configures the word size; that is, the size in bytes of the block size on which to operate. By default the word size is 2. The word size must be -cleanly divisible by 2, otherwise the block of bytes being processed can't be +cleanly divisible by 2, otherwise the block of bytes being processed can\(cqt be halved. .\" .SH EXAMPLES @@ -66,7 +66,7 @@ on other machines. .\" .SH COPYRIGHT -Copyright (c) 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later +Copyright \(co 2024 DTB. License AGPLv3+: GNU AGPL version 3 or later . .\" .SH SEE ALSO