From 978e0ccb3dc80279aae70732b260298a5877e813 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 7 Jan 2023 19:19:07 -0600 Subject: [PATCH] Update: Add man page documentation for status_code. --- level_3/status_code/data/build/settings | 2 + .../data/documentation/man/man1/status_code.1 | 71 ++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 level_3/status_code/data/documentation/man/man1/status_code.1 diff --git a/level_3/status_code/data/build/settings b/level_3/status_code/data/build/settings index cb6f4c8..983a8d7 100644 --- a/level_3/status_code/data/build/settings +++ b/level_3/status_code/data/build/settings @@ -28,6 +28,8 @@ build_sources_program main.c build_sources_headers status_code.h common.h +build_sources_documentation man + build_script yes build_shared yes build_static no diff --git a/level_3/status_code/data/documentation/man/man1/status_code.1 b/level_3/status_code/data/documentation/man/man1/status_code.1 new file mode 100644 index 0000000..727aa7d --- /dev/null +++ b/level_3/status_code/data/documentation/man/man1/status_code.1 @@ -0,0 +1,71 @@ +.TH STATUS_CODE "1" "January 2023" "FLL - Status Code 0.6.3" "User Commands" +.SH NAME +status_code \- Convert to or from status codes returned by FLL programs. +.SH SYNOPSIS +.B status_code +[\fI\,OPTIONS\/\fR] [\fI\,STATUS CODES\/\fR] +.SH DESCRIPTION +.PP +The FLL programs use a \fB16-bit unsigned integer\fR to represent the return status of programs and functions. +Programs may print a generic error with one of these codes. +This is a tool for converting to or converting from these codes. + +The \fB16-bit unsigned integer\fR also has the first two high-order bits used to represent flags. +These flags are the \fBerror\fR bit and the \fBwarning\fR bit. +When neither of these flags are set, then the status is considered \fBfine\f. + +These codes stop at the \fBF_fss_status_code_last\fR code. + +Each code will be printed on its own line. +Errors regarding each code may be printed on its own line. +.SH OPTIONS +.TP +\fB\{+h, ++help\fR +Print the help message. +.TP +\fB+d, ++dark\fR +Output using colors that show up better on dark backgrounds +.TP +\fB+l, ++light\fR +Output using colors that show up better on light backgrounds. +.TP +\fB+n, ++no_color\fR +Do not print using color. +.TP +\fB+Q, ++quiet\fR +Decrease verbosity, silencing most output. +.TP +\fB+E, ++error\fR +Decrease verbosity, using only error output. +.TP +\fB+N, ++normal\fR +Set verbosity to normal. +.TP +\fB+V, ++verbose\fR +Increase verbosity beyond normal output. +.TP +\fB+D, ++debug\fR +Enable debugging, significantly increasing verbosity beyond normal output. +.TP +\fB+v, ++version\fR +Print only the version number. +.TP +\fB\-f, \-\-fine\fR +Print F_true or F_false if status code is neither an error nor a warning or print number with neither the error code nor the warning code bits set. +.TP +\fB\-w, \-\-warning\fR +Print F_true or F_false if status code is a warning or print number with warning code bit set. +.TP +\fB\-e, \-\-error\fR +Print F_true or F_false if status code is an error or print number with error code bit set. +.TP +\fB\-n, \-\-number\fR +Convert status code name to number. +.SH STATUS CODES +.TP +Either code strings, such as \fBF_none\fR, or digits, such as \fB197\fR. +.SH AUTHOR +Written by Kevin Day. +.SH COPYRIGHT +.PP +Copyright \(co 2023 Kevin Day, GNU LGPL Version 2.1 or later. -- 1.8.3.1