docs: fixes and clarification #128

Closed
Ghost wants to merge 3 commits from (deleted):main into main
5 changed files with 15 additions and 11 deletions

View File

@ -1,5 +1,6 @@
.\" Copyright (c) 2024 DTB <trinity@trinity.moe> .\" Copyright (c) 2024 DTB <trinity@trinity.moe>
.\" Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media> .\" Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
.\" Copyright (c) 2024 Taocana <taocana@cock.lu>
.\" .\"
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license, .\" 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/>. .\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
@ -95,8 +96,8 @@ The standard input shall be used as an input if no inputs are specified or if
one or more of the input files is \(lq-\(rq. one or more of the input files is \(lq-\(rq.
.\" .\"
.SH STANDARD OUTPUT .SH STANDARD OUTPUT
The standard output shall be used as an output if no inputs are specified or if The standard output shall be used as an output if no outputs are specified or
one or more of the input files is \(lq-\(rq. if one or more of the output files is \(lq-\(rq.
.\" .\"
.SH DIAGNOSTICS .SH DIAGNOSTICS

View File

@ -1,4 +1,5 @@
.\" Copyright (c) 2024 DTB <trinity@trinity.moe> .\" Copyright (c) 2024 DTB <trinity@trinity.moe>
.\" Copyright (c) 2024 Taocana <taocana@cock.lu>
.\" .\"
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license, .\" 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/>. .\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
@ -27,10 +28,10 @@ Opens subsequent outputs for appending rather than updating.
.IP \fB-e\fP .IP \fB-e\fP
Use the standard error as an output. Use the standard error as an output.
.IP \fB-i\fP .IP \fB-i\fP
Opens a path as an input. If one or more of the input files is \(lq-\(rq or if Opens a file as an input. If one or more of the input files is \(lq-\(rq or if
no inputs are specified, the standard input shall be used. no inputs are specified, the standard input shall be used.
.IP \fB-o\fP .IP \fB-o\fP
Opens a path as an output. If one or more of the output files is \(lq-\(rq or if Opens a file as an output. If one or more of the output files is \(lq-\(rq or if
no outputs are specified, the standard output shall be used. no outputs are specified, the standard output shall be used.
.IP \fB-u\fP .IP \fB-u\fP
Ensures neither input or output will be buffered. Ensures neither input or output will be buffered.

View File

@ -1,5 +1,6 @@
.\" Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media> .\" Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
.\" Copyright (c) 2024 DTB <trinity@trinity.moe> .\" Copyright (c) 2024 DTB <trinity@trinity.moe>
.\" Copyright (c) 2024 Taocana <taocana@cock.lu>
.\" .\"
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license, .\" 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/>. .\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
@ -22,9 +23,9 @@ The program evaluates reverse polish notation expressions read either from the
standard input or parsed from provided arguments. See the STANDARD INPUT standard input or parsed from provided arguments. See the STANDARD INPUT
section. section.
Ghost marked this conversation as resolved Outdated
Outdated
Review

Would this work better as “at the top of the stack”?

Would this work better as “at the top of the stack”?
Outdated
Review

haha that's embarrassing, fixed in new commit.

haha that's embarrassing, fixed in new commit.
Upon evaluation, the resulting number on the stack will be printed to the Upon evaluation, the resulting number at the top of the stack will be printed
standard output. Any further numbers specified will be placed at the end of the to the standard output. Any further numbers specified will be placed at the
stack. bottom of the stack.
For information on for reverse polish notation syntax, see For information on for reverse polish notation syntax, see
.BR rpn (7). .BR rpn (7).

View File

@ -1,5 +1,6 @@
.\" Copyright (c) 2024 DTB <trinity@trinity.moe> .\" Copyright (c) 2024 DTB <trinity@trinity.moe>
.\" Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media> .\" Copyright (c) 2024 Emma Tebibyte <emma@tebibyte.media>
.\" Copyright (c) 2024 Taocana <taocana@cock.lu>
.\" .\"
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license, .\" 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/>. .\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
@ -36,15 +37,15 @@ Requires the given files to exist, and is redundant to any other option.
.IP \fB-f\fP .IP \fB-f\fP
Requires the given files to exist and be regular files. Requires the given files to exist and be regular files.
.IP \fB-g\fP .IP \fB-g\fP
Ghost marked this conversation as resolved Outdated
Outdated
Review

Are these changes the proper terminology? Wikipedia differs from this: https://en.wikipedia.org/wiki/Setuid

Are these changes the proper terminology? Wikipedia differs from this: https://en.wikipedia.org/wiki/Setuid
Outdated
Review

changed in new commit.

changed in new commit.
Requires the given files to exist and have their set group ID flags set. Requires the given files to exist and have their setgid bits set.
.IP \fB-k\fP .IP \fB-k\fP
Ghost marked this conversation as resolved Outdated
Outdated
Review
Same for this: https://en.wikipedia.org/wiki/Sticky_bit
Outdated
Review

changed in new commit.

changed in new commit.
Requires the given files to exist and have their sticky bit set. Requires the given files to exist and have their sticky bits set.
.IP \fB-p\fP .IP \fB-p\fP
Requires the given files to exist and be named pipes. Requires the given files to exist and be named pipes.
.IP \fB-r\fP .IP \fB-r\fP
Requires the given files to exist and be readable. Requires the given files to exist and be readable.
.IP \fB-u\fP .IP \fB-u\fP
Requires the given files to exist and have their set user ID flags set. Requires the given files to exist and have their setuid bits set.
.IP \fB-w\fP .IP \fB-w\fP
Requires the given files to exist and be writable. Requires the given files to exist and be writable.
.IP \fB-x\fP .IP \fB-x\fP

View File

@ -52,7 +52,7 @@ int main(int argc, char *argv[]){
if(optind + 2 /* ref cmp */ > argc){ if(optind + 2 /* ref cmp */ > argc){
usage: fprintf(stderr, usage: fprintf(stderr,
"Usage: %s (-eghl) [integer] [integer...]\n", "Usage: %s (-egl) [integer] [integer...]\n",
argv[0] == NULL ? program_name : argv[0]); argv[0] == NULL ? program_name : argv[0]);
return EX_USAGE; return EX_USAGE;
} }