groff-commit
[Top][All Lists]
Advanced

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

[groff] 12/25: [preconv]: Demote diagnostic message.


From: G. Branden Robinson
Subject: [groff] 12/25: [preconv]: Demote diagnostic message.
Date: Mon, 28 Mar 2022 12:08:20 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 7a33261f4485cb34d9fd2a9af1aa3d12cdab2fe4
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Mar 29 00:47:36 2022 +1100

    [preconv]: Demote diagnostic message.
    
    * src/preproc/preconv/preconv.cpp (detect_file_encoding): Demote an
      error diagnostic to a debugging message.  libuchardet has no man page,
      and inspecting the source of the `uchardet_handle_data` function we
      find that it effectively returns a Boolean value (if the result of a
      `reinterpret_cast`(!) is not `NS_OK`).  This is useless information
      for a user-facing tool.  We're designed to muddle on regardless (see
      preconv(1)).
---
 ChangeLog                       | 11 +++++++++++
 src/preproc/preconv/preconv.cpp |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 9678a983..4b47b67e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-03-29  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/preproc/preconv/preconv.cpp (detect_file_encoding): Demote
+       an error diagnostic to a debugging message.  libuchardet has no
+       man page, and inspecting the source of the
+       `uchardet_handle_data` function we find that it effectively
+       returns a Boolean value (if the result of a
+       `reinterpret_cast`(!) is not `NS_OK`).  This is useless
+       information for a user-facing tool.  We're designed to muddle on
+       regardless (see preconv(1)).
+
 2022-03-29  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/devices/grodvi/dvi.cpp (dvi_printer::set_color,
diff --git a/src/preproc/preconv/preconv.cpp b/src/preproc/preconv/preconv.cpp
index 627f2c2e..83feef8f 100644
--- a/src/preproc/preconv/preconv.cpp
+++ b/src/preproc/preconv/preconv.cpp
@@ -1039,7 +1039,7 @@ detect_file_encoding(FILE *fp)
   ud = uchardet_new();
   res = uchardet_handle_data(ud, data, len);
   if (res != 0) {
-    error("uchardet_handle_data: %1\n", res);
+    debug("  uchardet_handle_data: error %1\n", res);
     goto end;
   }
   if (is_debugging)



reply via email to

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