groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 79/80: [lookbib]: Diagnose lack of operands.


From: G. Branden Robinson
Subject: [groff] 79/80: [lookbib]: Diagnose lack of operands.
Date: Sat, 30 Nov 2024 04:02:30 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 780200f716d97145f534ee5de536252748153234
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
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 <g.branden.robinson@gmail.com>
+
+       * 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 <g.branden.robinson@gmail.com>
 
        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++)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]