gbranden pushed a commit to branch master
in repository groff.
commit 780200f716d97145f534ee5de536252748153234
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Nov 30 02:23:42 2024 -0600
[lookbib]: Diagnose lack of operands.
* src/utils/lookbib/lookbib.cpp (main): Emit error diagnostic and exit
with status 2, not 1, when given no operands. Continues commit
89283b0935, 18 October.
---
ChangeLog | 6 ++++++
src/utils/lookbib/lookbib.cpp | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 1e555326f..d368fbb3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-11-30 G. Branden Robinson <[email protected]>
+
+ * src/utils/lookbib/lookbib.cpp (main): Emit error diagnostic
+ and exit with status 2, not 1, when given no operands.
+ Continues commit 89283b0935, 18 October.
+
2024-11-30 G. Branden Robinson <[email protected]>
Rename Makefile macro `DEVICE` to `DEFAULT_DEVICE`.
diff --git a/src/utils/lookbib/lookbib.cpp b/src/utils/lookbib/lookbib.cpp
index 359abcc0c..ab0647c85 100644
--- a/src/utils/lookbib/lookbib.cpp
+++ b/src/utils/lookbib/lookbib.cpp
@@ -101,8 +101,9 @@ int main(int argc, char **argv)
assert(0 == "unhandled case of command-line option");
}
if (optind >= argc) {
+ error("no database file operands");
usage(stderr);
- exit(1);
+ exit(2);
}
search_list list;
for (int i = optind; i < argc; i++)
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit