summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-04-14 14:09:30 +0200
committerAlejandro Colomar <alx@kernel.org>2023-04-14 14:09:36 +0200
commitb7bc9f744faf76aa516a61fdb34089d6c62a403d (patch)
tree02e624b24cd9b640e3fb29875849818c7a8c14a1
parent9ad94d352696c166b99b59d5c0f44f08a8a5736e (diff)
bin/stdc, stdc.1: Use the exit status like in grep(1)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rwxr-xr-xbin/stdc2
-rw-r--r--share/man/man1/stdc.110
2 files changed, 11 insertions, 1 deletions
diff --git a/bin/stdc b/bin/stdc
index 54db0d7..a57fab6 100755
--- a/bin/stdc
+++ b/bin/stdc
@@ -9,7 +9,7 @@ docdir="$datarootdir/doc";
err()
{
>&2 echo "$(basename "$0"): error: $*";
- exit 1;
+ exit 2;
}
grep_proto()
diff --git a/share/man/man1/stdc.1 b/share/man/man1/stdc.1
index 7fde342..c134f45 100644
--- a/share/man/man1/stdc.1
+++ b/share/man/man1/stdc.1
@@ -30,6 +30,16 @@ Name of the function to be searched.
It is a
.MR PCRE2 3
pattern.
+.SH Exit status
+.TP
+0
+At least a matching declaration was found.
+.TP
+1
+No matching declarations were found.
+.TP
+2
+An error occured.
.SH Examples
.EX
.RB "$ " "stdc c11 \[aq]mem[[:alpha:]]*\[aq]"