bug-groff
[Top][All Lists]
Advanced

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

[bug #59481] [PATCH] m4/groff.m4: tweak warnings for missing uchardet li


From: Dave
Subject: [bug #59481] [PATCH] m4/groff.m4: tweak warnings for missing uchardet library
Date: Wed, 18 Nov 2020 19:03:36 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0

URL:
  <https://savannah.gnu.org/bugs/?59481>

                 Summary: [PATCH] m4/groff.m4: tweak warnings for missing
uchardet library
                 Project: GNU troff
            Submitted by: barx
            Submitted on: Wed 18 Nov 2020 06:03:34 PM CST
                Category: Preprocessor preconv
                Severity: 2 - Minor
              Item Group: Build/Installation
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

== Overview ==

The attached patch concerns the warnings generated by "configure" on a system
that doesn't have a uchardet library.  It slightly alters the text of these
warnings.

These warnings were introduced in commit 75c0873c
<http://git.savannah.gnu.org/cgit/groff.git/commit/?id=75c0873c>.  As Branden
points out (http://lists.gnu.org/archive/html/groff/2020-11/msg00084.html),
this commit was in groff 1.22.4 and has garnered no complaint until now, so
there is no particular urgency to apply this patch.

== The problem ==

If uchardet is not found, these two warnings appear:


configure:20532: WARNING: uchardet library not found, preconv might not work
properly


configure:26790: WARNING:
  uchardet library was not found; preprocessor 'preconv', which uses it to
detect
  the input file encoding, might not work properly (to check how and in which
  order 'preconv' tries to determine the file encoding, see its man page).


The vagueness of the phrase "might not work properly" can imply the problem is
more serious than it is.  If the warning explained exactly what might not
work, users could determine for themselves how serious it is (which, in most
cases, is not very: this library's absence only eliminates one method (out of
six documented) of determining the input's encoding--and the method in
question is an educated guess, so it "might not work" even _with_ the uchardet
library).

== The solution ==

The attached patch fixes the first warning by removing the "preconv might not
work properly" part altogether.  This one is generated at the time the
library's absence is discovered; the consequences of this absence should be
saved for the later, more visible, more verbose warning.  (As trivial side
effects, this also eliminates the comma splice and keeps the message under 80
columns.)

The second is rewritten to say:


  uchardet library was not found; preprocessor 'preconv' will skip this
method
  of attempting to determine the input encoding.  (To check how and in what
  order 'preconv' tries to determine the encoding, see its man page.)


In addition to being more precise about the effect, I've also edited "input
file encoding" down to simply "input encoding" (since preconv's input needn't
be from a file) and shortened the lines to be under 80 columns.

The patch also corrects one nonstandard English construction in a related
warning.

Further refinements welcome.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Wed 18 Nov 2020 06:03:34 PM CST  Name: groff.m4.patch  Size: 1KiB   By:
barx

<http://savannah.gnu.org/bugs/download.php?file_id=50302>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59481>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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