bug-groff
[Top][All Lists]
Advanced

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

[bug #61414] [libgroff] emits misleading diagnostics when DESC file 'res


From: G. Branden Robinson
Subject: [bug #61414] [libgroff] emits misleading diagnostics when DESC file 'res' is invalid
Date: Sat, 6 Nov 2021 01:47:01 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Update of bug #61414 (project groff):

                  Status:             In Progress => Fixed                  
             Open/Closed:                    Open => Closed                 
         Planned Release:                    None => 1.23.0                 

    _______________________________________________________

Follow-up Comment #1:


commit ee0942bdecdef59b202d84dc2a754d04288c9abd
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Tue Nov 2 18:23:09 2021 +1100

    [libgroff]: Validate DESC, font descriptions more.
    
    [libgroff]: Do more device and font description file validation, resolve
    an assertion failure arising from a negative declared device resolution,
    and correct a documentation error.
    
    * src/libs/libgroff/font.cpp (font::load): Include more information
      about invalid input in diagnostic messages.
      - When a kern pair's amount is missing or invalid, report the name of
        the kern pair.
      - When someone tries to declare the first entry in the charset section
        as an alias, report the glyph name.
      - Identify the token for the unnamed character if an attempt is made
        to alias it.
      - When an out-of-range character type is applied to a glyph, name the
        glyph.
    
      (font::load_desc): Same.
      - Drop redundant zero initialization of `res`.
      - Check all directives that take basic units for positive values,
        adding `res`, `unitwidth`, `paperwidth`, and `paperlength`.  Update
        this diagnostic to demand positive, not nonnegative, values.
      - When the font count is long in a `fonts` directive, report how many
        font names were declared (and thus expected).  (If the count is
        short, the next line is read for a font name, like 'tcommand' in our
        devutf8/DESC.)
      - When interpreting a `papersize` directive, throw an error and return
        false if `res` has not yet been encountered, since it is used in
        subsequent computations.
      - When a paper format cannot be determined, report the original
        declared value from the DESC file.  Use `strdup()` to save it since
        it gets clobbered by the resolving process.  `free()` the saved
        string when we're done, regardless of error condition.
    
    * doc/groff.texi (Device and Font Files):
    * man/groff_font.5.man (DESC file format): Document additional exception
      to order-indifference of directives: (at least one) `res` must precede
      `papersize`.

    Fixes <https://savannah.gnu.org/bugs/?61414>.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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