gbranden pushed a commit to branch master
in repository groff.

commit 7f96cf1e850275f2a1cc9c96cbcb5e3a0bc803f3
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon May 25 02:50:47 2026 -0500

    [tfmtodit]: Revise error diagnostics.
    
    * src/utils/tfmtodit/tfmtodit.cpp (tfm::load, gf::load, read_map):
      Characterize files being read as "invalid", not "bad".
    
    "No, sir, we don't morally censure--we just want the data."
---
 ChangeLog                       |  6 ++++++
 src/utils/tfmtodit/tfmtodit.cpp | 10 +++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f364da14f..831bf3206 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-05-25  G. Branden Robinson <[email protected]>
+
+       * src/utils/tfmtodit/tfmtodit.cpp (tfm::load, gf::load)
+       (read_map): Characterize files being read as "invalid", not
+       "bad".
+
 2026-05-25  G. Branden Robinson <[email protected]>
 
        * src/utils/tfmtodit/tfmtodit.cpp: Boolify.
diff --git a/src/utils/tfmtodit/tfmtodit.cpp b/src/utils/tfmtodit/tfmtodit.cpp
index c311c3e92..ccfabf68b 100644
--- a/src/utils/tfmtodit/tfmtodit.cpp
+++ b/src/utils/tfmtodit/tfmtodit.cpp
@@ -313,7 +313,7 @@ bool tfm::load(const char *file)
   }
   fclose(fp);
   if (lf < 6) {
-    error("bad TFM file '%1': impossibly short", file);
+    error("invalid TFM file '%1': impossibly short", file);
     delete[] buf;
     return false;
   }
@@ -331,12 +331,12 @@ bool tfm::load(const char *file)
   np = read2(ptr);
   if ((6 + lh + (ec - bc + 1) + nw + nh + nd + ni + nl + nk + ne + np)
       != lf) {
-    error("bad TFM file '%1': lengths do not sum", file);
+    error("invalid TFM file '%1': lengths do not sum", file);
     delete[] buf;
     return false;
   }
   if (lh < 2) {
-    error("bad TFM file '%1': header too short", file);
+    error("invalid TFM file '%1': header too short", file);
     delete[] buf;
     return false;
   }
@@ -434,7 +434,7 @@ bool gf::load(const char *file)
     return false;
   }
   if (getc(fp) != pre || getc(fp) != gf_id_byte) {
-    error("bad gf file");
+    error("invalid gf file");
     return false;
   }
   int n = getc(fp);
@@ -636,7 +636,7 @@ bool read_map(const char *file, char_list **table)
       continue;
     int n;
     if (sscanf(ptr, "%d", &n) != 1) {
-      error("%1:%2: bad map file", file, lineno);
+      error("%1:%2: invalid map file", file, lineno);
       fclose(fp);
       return false;
     }

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to