bug-groff
[Top][All Lists]
Advanced

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

[bug #60981] pre-grohtml doesn't honor -F option


From: G. Branden Robinson
Subject: [bug #60981] pre-grohtml doesn't honor -F option
Date: Thu, 29 Jul 2021 06:28:04 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Update of bug #60981 (project groff):

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

    _______________________________________________________

Follow-up Comment #2:


commit 5e5cd25d4eec5481c836f8307c943a9043949647
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Jul 28 16:51:41 2021 +1000

    [grohtml]: Fix Savannah #60981.

    Refactor device description file handling, make it more robust, and make
    this preprocessor's -F option work as documented, and to honor
    documented device description file semantics.

    * src/preproc/html/pre-html.cpp: Store partial filespecs of HTML and
      PostScript device files in constant strings.

      (get_resolution): Initialize `res` to zero.  Only `free()` the pointer
      `pathp` if `open_file()` succeeded (populating it).  Stop checking for
      valid `sscanf()` conversions of an integer to store in `res`, and
      don't return early.  Instead process the whole DESC file; per our
      Texinfo manual and groff_font(5), "Later entries in the file ...
      override previous values."

      (get_image_generator): Add new function, paralleling
      `get_resolution()`, replacing open-coded logic in `main()`.  Only the
      body of the `while` loop significantly differs.  Instead of using
      `sscanf`, process the input character by character matching the
      keyword and {1,} spaces or tabs after it.  Whatever follows in
      `linebuf` must be the program name.

      (imageList::createPage): Add `assert()` to cause failure if an empty
      image generator program gets this far, because it creates repeated
      messes if it does.  (Something isn't checking exit statuses.)

      (main): Condense `image_gen` collection to a function call, a null
      pointer check, and a fatal diagnostic.  Add a sanity check and a fatal
      diagnostic if the PostScript resolution is garbage.  (It's initialized
      to -1 and `get_resolution()` will return 0 if it doesn't find one.)

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


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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