From: Kevin Day Date: Sun, 8 Jan 2023 01:26:03 +0000 (-0600) Subject: Update: Add man page documentation for status_code. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=514965da746b3d741726a34c90cbb46783cc8ef8;p=fll Update: Add man page documentation for status_code. More work is needed to only install the man pages for each specific program. --- diff --git a/level_3/status_code/data/build/settings.fss b/level_3/status_code/data/build/settings.fss index dd2da52..ca6ad9a 100644 --- a/level_3/status_code/data/build/settings.fss +++ b/level_3/status_code/data/build/settings.fss @@ -28,6 +28,8 @@ build_libraries-monolithic -lfll build_sources_program fss/main.c fss/print.c +build_sources_documentation man + build_script yes build_shared yes build_static no diff --git a/level_3/status_code/data/build/settings.main b/level_3/status_code/data/build/settings.main index 5e3991e..290e708 100644 --- a/level_3/status_code/data/build/settings.main +++ b/level_3/status_code/data/build/settings.main @@ -28,6 +28,8 @@ build_libraries-monolithic -lfll build_sources_program main/main.c +build_sources_documentation man + build_script yes build_shared yes build_static no diff --git a/level_3/status_code/data/documentation/man/man1/fss_status_code.1 b/level_3/status_code/data/documentation/man/man1/fss_status_code.1 new file mode 100644 index 0000000..4422d81 --- /dev/null +++ b/level_3/status_code/data/documentation/man/man1/fss_status_code.1 @@ -0,0 +1,79 @@ +.TH FSS_STATUS_CODE "1" "January 2023" "FLL - FSS Status Code 0.7.0" "User Commands" +.SH NAME +fss_status_code \- Convert to or from status codes returned by FLL programs with FSS codes. +.SH SYNOPSIS +.B fss_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. + +This operates identical to the \fBstatus_codes\fR program except that this program handles additional codes regarding FSS. +These special codes numericaly appear after the \fBF_status_code_last\fR code. +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, ++line_first_no\fR +Disable printing of first line. +.TP +\fB+L, ++line_last_no\fR +Disable printing of last line. +.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 STATUS CODES +.PP +Copyright \(co 2023 Kevin Day, GNU LGPL Version 2.1 or later. 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..3be575c --- /dev/null +++ b/level_3/status_code/data/documentation/man/man1/status_code.1 @@ -0,0 +1,77 @@ +.TH STATUS_CODE "1" "January 2023" "FLL - Status Code 0.7.0" "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, ++line_first_no\fR +Disable printing of first line. +.TP +\fB+L, ++line_last_no\fR +Disable printing of last line. +.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.