groff-commit
[Top][All Lists]
Advanced

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

[groff] 11/13: [gdiffmk]: Revise wording of diagnostic messages.


From: G. Branden Robinson
Subject: [groff] 11/13: [gdiffmk]: Revise wording of diagnostic messages.
Date: Mon, 25 Dec 2023 20:38:53 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 6601bf4b6bd7a662e6f7eedcbfd1212f3461c40f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Dec 23 16:25:03 2023 -0600

    [gdiffmk]: Revise wording of diagnostic messages.
    
    * contrib/gdiffmk/gdiffmk.sh (FileRead, main): Revise wording of
      diagnostic messages.
---
 contrib/gdiffmk/ChangeLog  |  5 +++++
 contrib/gdiffmk/gdiffmk.sh | 10 +++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/contrib/gdiffmk/ChangeLog b/contrib/gdiffmk/ChangeLog
index b23a13203..ebc4bb2f9 100644
--- a/contrib/gdiffmk/ChangeLog
+++ b/contrib/gdiffmk/ChangeLog
@@ -1,3 +1,8 @@
+2023-12-23  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * gdiffmk.sh (FileRead, main): Revise wording of diagnostic
+       messages.
+
 2023-12-23  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * gdiffmk.sh (WouldClobber, main): Drop obsolescent (per POSIX)
diff --git a/contrib/gdiffmk/gdiffmk.sh b/contrib/gdiffmk/gdiffmk.sh
index b6791cff9..2f9a3e784 100644
--- a/contrib/gdiffmk/gdiffmk.sh
+++ b/contrib/gdiffmk/gdiffmk.sh
@@ -79,11 +79,11 @@ FileRead () {
 
        if test ! -f "$2"
        then
-               Exit $1 "File '$2' not found."
+               Exit $1 "input file \"$2\" does not exist or is not a file"
        fi
        if test ! -r "$2"
        then
-               Exit $1 "File '$2' not readable."
+               Exit $1 "input file \"$2\" is not readable"
        fi
 }
 
@@ -153,7 +153,7 @@ RequiresArgument () {
 
        if test $# -lt 2
        then
-               Exit 2 "Option '$1' requires a value."
+               Exit 2 "option '$1' requires an argument"
        fi
 
        echo "$2"
@@ -249,12 +249,12 @@ fi
 
 if test $# -lt 2 || test $# -gt 3
 then
-       Usage "Incorrect number of arguments."
+       Usage "expected 2 or 3 operands, got $#"
 fi
 
 if test "1$1" = "1-" && test "2$2" = "2-"
 then
-       Usage "Both FILE1 and FILE2 are '-'."
+       Usage "attempting to compare standard input to itself"
 fi
 
 FILE1="$1"



reply via email to

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