1
0
forked from bonsai/harakit

docs: updates to use man(7) macros to fix formatting

This commit is contained in:
2024-06-02 18:47:14 -06:00
parent b7f52902b6
commit 70cbc52c93
13 changed files with 406 additions and 495 deletions

119
docs/dj.1
View File

@@ -3,15 +3,13 @@
.\"
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
.TH dj 1
.\"
.TH DJ 1
.SH NAME
dj \(en disk jockey
.\"
.SH SYNOPSIS
.\"
dj
.RB ( -AdHnq )
.RB ( -a
@@ -44,102 +42,63 @@ dj
.R [
.B output offset
.R ])
.\"
.SH OPTIONS
.B -i
.RS
.\"
.IP \fB-i\fP
Takes a file path as an argument and opens it for use as an input.
.RE
.B -b
.RS
.IP \fB-b\fP
Takes a numeric argument as the size in bytes of the input buffer, with the
default being 1024.
.RE
.B -s
.RS
.IP \fB-s\fP
Takes a numeric argument as the number of bytes to skip into the input
before starting to read. If the standard input is used, bytes read to this point
are discarded.
.RE
.B -o
.RS
.IP \fB-o\fP
Takes a file path as an argument and opens it for use as an output.
.RE
.B -B
.RS
.IP \fB-B\fP
Does the same as
.B -b
but for the output buffer.
.RE
.B -S
.RS
.IP \fB-S\fP
Skips a number of bytes through the output before starting to write from
the input. If the output is a stream, null characters are printed.
.RE
.B -a
.RS
.IP \fB-a\fP
Accepts a single literal byte with which input buffer is padded in the event
of an incomplete read from the input file.
.RE
.B -A
.RS
.IP \fB-A\fP
Specifying this option pads the input buffer with null bytes in the event of an
incomplete read. Equivalent to specifying
.B -a
with a null byte instead of a character.
.RE
.B -c
.RS
with a null byte instead of a character.
.IP \fB-c\fP
Specifies a number of reads to make. The default is zero, in which case the
input is read until a partial or empty read is made.
.RE
.B -d
.RS
.IP \fB-d\fP
Prints invocation information before program execution as described in the
DIAGNOSTICS section below. Each invocation increments the debug level of the
program.
.RE
.B -H
.RS
.IP \fB-H\fP
Prints diagnostics messages in a human-readable manner as described in the
DIAGNOSTICS section below.
.RE
.B -n
.RS
.IP \fB-n\fP
Retries failed reads once more before exiting.
.RE
.B -q
.RS
.IP \fB-q\fP
Suppresses error messages which print when a read or write is partial or
empty. Each invocation decrements the debug level of the program.
.RE
.SH STANDARD INPUT
.\"
The standard input shall be used as an input if no inputs are specified or if
one or more of the input files is “-”.
one or more of the input files is \(lq-\(rq.
.\"
.SH DIAGNOSTICS
.\"
On a partial or empty read, a diagnostic message is printed (unless the
.B -q
option is specified) and the program exits (unless the
.B -n
option is specified).
.\"
By default, statistics are printed for input and output to the standard error in
the following format:
@@ -175,12 +134,12 @@ as the only argument:
.R out=<stdout> obs=1024 seek=0 debug= 3 noerror=0
.RE
In non-recoverable errors that dont pertain to the read-write cycle, a
In non-recoverable errors that don\(cqt pertain to the read-write cycle, a
diagnostic message is printed and the program exits with the appropriate
sysexits.h(3) status.
.\"
.SH BUGS
.\"
If
.B -n
is specified along with the
@@ -191,29 +150,29 @@ of the count and the input block size). If the
or
.B -A
options are used, this could make data written nonsensical.
.\"
.SH CAVEATS
.\"
Existing files are not truncated on ouput and are instead overwritten.
Many lowercase options have capitalized variants and vice-versa which can be
confusing. Capitalized options tend to affect output or are more intense
versions of lowercase options.
.\"
.SH RATIONALE
.\"
This program was based on the dd(1p) utility as specified in POSIX. While
character conversion may have been the original intent of dd(1p), it is
irrelevant to its modern use. Because of this, this program eschews character
conversion and adds typical option formatting, allowing seeks to be specified
in bytes rather than in blocks, allowing arbitrary bytes as padding, and
printing in a format thats easy for machines to parse.
printing in a format that\(cqs easy for machines to parse.
.\"
.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
<https://gnu.org/licenses/agpl.html>.
.\"
.SH SEE ALSO
dd(1p)
.\"
.BR dd (1p)