bug-groff
[Top][All Lists]
Advanced

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

[bug #52463] anything that talks to standard error should identify itsel


From: G. Branden Robinson
Subject: [bug #52463] anything that talks to standard error should identify itself
Date: Tue, 25 Jan 2022 11:39:16 -0500 (EST)

Update of bug #52463 (project groff):

                Category:                    None => General                

    _______________________________________________________

Follow-up Comment #1:

This isn't done, but it is wearing down like a block of Azbantium.


commit 6a7b821acfc0329db5e08cf011a88c8d87280f29
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Dec 8 09:24:52 2021 +1100

    [me]: Revise diagnostic messages.
    
    ...to follow GNU Coding Standards, identifying what is emitting them.
    
    * tmac/e.tmac (_e): New string holds "e.tmac".
    
      (@err): New macro constructs and issues diagnostics.  Add file name to
      messages when available.  Suppress line number when unavailable.
    
      (check_page_length, @z, @h, n2, sk, @p, @(, @), (c, )c, EQ, (f, ++,
      @U): Call `@err` instead of invoking `tm` request.  Revise wording of
      messages in an attempt at clarity.
    
    Continues the long process of fixing Savannah #52463.

commit dcc38ebd122864a66aa23ba8f0e1bf468a0c5344
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun May 30 11:18:40 2021 +1000

    tmac/papersize.tmac: Improve diagnostic message.
    
    * tmac/papersize.tmac: Improve diagnostic message; when complaining
      about unrecognized input, report back the input we actually received,
      not what it looks like after we transform it.  Also add name of macro
      package to diagnostic so the user knows who is speaking, continuing
      the long process of fixing Savannah #52463.

commit 7dcb6263dcb3edcf373fff0a6e1f62242d18950e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun May 23 13:01:52 2021 +1000

    [grohtml]: Avoid deallocation of static strings.
    
    * src/devices/grohtml/post-html.cpp (assert_state::add): Avoid potential
      deallocation of statically-allocated strings.  Use strsave() to
      duplicate them so that they can be safely handed to a_delete().  Also
      update diagnostic message to report name of complaining program
      (continuing the long process of fixing Savannah #52463).
    
    Fixes <https://savannah.gnu.org/bugs/index.php?60656>.  Thanks to
    Petru-Florin Mihancea for the report.
    
    Also wrap source lines at 72 columns.

commit 5ceb0eee6676ebed0836f884ba5e3769c24b80d9
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat May 22 18:14:51 2021 +1000

    [grohtml]: Use warning() upon usage errors.
    
    * src/preproc/html/pre-html.cpp (scanArguments):
    * src/devices/grohtml/post-html.cpp (main): Use libgroff's warning()
      instead of printf() to emit diagnostic about unrecognized paramter to
      `-x` option.  This sends the diagnostic to the standard error stream
      and continues the long process of fixing Savannah #52463.

commit 546748d60c95886e408c07083d60cc06516aed5c
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Jan 20 18:23:20 2021 +1100

    [grog]: Report program name in fatal diagnostics.
    
    * src/roff/grog/grog.pl: Report program name in fatal error diagnostics.
      Also drop sentence-ending punctuation since Perl supplies additional
      information.
    
    Continues the long process of fixing Savannah #52463.

commit ac0dc2068bd8cb5a7ef84c0659698da0306cba65
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Oct 30 23:00:35 2020 +1100

    tmac/s.tmac: Revise diagnostic messages.
    
    Define a common prefix string, starting all such messages with "s.tmac".
    Continues the long process of fixing Savannah #52463.  Drop the word
    "macro" from diagnostic since this will now be clear from the prefix.
    Prefix every macro name in a diagnostic message with a leading dot; this
    was already done in four cases.
    
    (cov*first-page-init): Use temporary string to avoid multi-line
    diagnostic message.
    
    (@NH): Use temporary string to prevent overlength line.
    
    A further benefit of this revision is that index information produced by
    ms's .IX macro (which writes to the standard error stream) will now be
    trivially easy to extract even for documents that cause diagnostic
    messages.  One can simply filter them with
            grep -v '^s\.tmac:'
    or similar.
    
    Also wrap long lines and comment some unimplemented macros.

commit 3b680c8500ccca576c95253009e28764c36e9cd2
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Oct 17 10:06:11 2020 +1100

    [afmtodit]: Report program name in warnings.
    
    * src/utils/afmtodit/afmtodit.pl: Report program name in warning
      diagnostics.
    
    Continues the long process of fixing Savannah #52463.

commit f75e156b621d3743368c58425f357e6cd52372a0
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Sep 26 10:41:29 2020 +1000

    src/preproc/tbl/table.cpp: Regularize diagnostics.
    
    * src/preproc/tbl/table.cpp (table::init_output):
      (table::compute_expand_width):
      (table::compute_separation_factor): Use consistent format for
      diagnostic messages.
      + Do not spread a single diagnostic across multiple lines.
      + Report messages in GNU Coding Standards format, that is:
      + Report the name of the file the problem is in...
      + ...then the line number...
      + ...then the diagnostic severity level...
      + ...then the specific problem.
    
    Unfortunately source line numbers for tbl(1) tables can get a bit
    approximate and are badly off in some cases (I think it has to do with
    text blocks--I'll be investgating that soon), but that is a separate
    issue.
    
    Continues the long process of fixing Savannah #52463.
    
    Here are examples of output before and after this change. \\ marks lines
    wrapped for the purpose of this commit message.
    
    Before:
    
    $ groff -z -Tps -t -ms diag1-Tps.ms
    warning: file 'diag1-Tps.ms', around line 11:
      table wider than line width
    warning: file 'diag1-Tps.ms', around line 11:
      column separation set to zero
    warning: file 'diag1-Tps.ms', around line 101:
      table wider than line width
    warning: file 'diag1-Tps.ms', around line 96:
      table squeezed horizontally to fit line length
    $ groff -z -Tps -t -man diag2-Tps.man
    error: page 2: table will not fit on one page; use .TS H/.TH with a \\
    supporting macro package
    $ groff -z -Tutf8 -t -man diag3-Tutf8.man
    warning: page 3: table text block will not fit on one page
    warning: page 10: table text block will not fit on one page
    
    Now:
    
    $ ../build/test-groff -z -Tps -t -ms diag1-Tps.ms
    diag1-Tps.ms: around line 11: warning: table wider than line width
    diag1-Tps.ms: around line 11: warning: column separation set to zero
    diag1-Tps.ms: around line 101: warning: table wider than line width
    diag1-Tps.ms: around line 96: warning: table squeezed horizontally to \\
    fit line length
    $ ../build/test-groff -z -Tps -t -man diag2-Tps.man
    diag2-Tps.man: around line 3660: error: table will not fit on page 2; \\
    use .TS H/.TH with a supporting macro package
    $ ../build/test-groff -z -Tutf8 -t -man diag3-Tutf8.man
    diag3-Tutf8.man: around line 536: warning: table text block will not \\
    fit on page 3
    diag3-Tutf8.man: around line 1361: warning: table text block will not \\
    fit on page 10

commit a2058f6ba364144d193262f4efae8941c47c7fa1
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Nov 4 13:54:00 2018 -0500

    an-old.tmac: Report macro file in diagnostics.
    
            * tmac/an-old.tmac: When emitting diagnostics, report the name
            of the macro file complaining.
    
            Continues the long process of fixing
            <https://savannah.gnu.org/bugs/?52463>.
    
            Also:
            + Shorten abort diagnostic when version of groff is too old, to
              keep input line length within 72 columns.
    
    Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>

commit 697beedb7a27c6205fe939d51a490c510cbebe6a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Nov 30 13:27:57 2017 -0500

    Make writers to stderr identify themselves.
    
    * font/devpdf/util/BuildFoundries.pl:
    Same; also refactor all diagnostics into Notice(), Warn(), and Die()
    functions, which delegate their common message-printing to Msg().
    
    Fix part of bug https://savannah.gnu.org/bugs/?52463.
    
    Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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