bug-groff
[Top][All Lists]
Advanced

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

[bug #60673] adjustment algorithm should disregard nonadjusted lines in


From: G. Branden Robinson
Subject: [bug #60673] adjustment algorithm should disregard nonadjusted lines in its alternation pattern
Date: Sat, 4 Sep 2021 12:40:28 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Update of bug #60673 (project groff):

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

    _______________________________________________________

Follow-up Comment #7:

I _think_ the changes I have pushed today resolve the issues raised in this
bug.  The ones in bug #57836 are not addressed.

My solution turned out to be different, simpler, and (perhaps) more elegant,
but that was through accident rather than cleverness because I was setting out
to resolve a different problem entirely.

Long story short: adjustment parity is not changed on lines where no
adjustment will take place.

...aaaaaand I see a typo in the commit message.  Sigh.


commit b93eacd8d7c4fb5ac587c629a38d8a3732c03d76
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Sep 5 00:07:50 2021 +1000

    src/roff/troff/env.cpp: Refactor slightly.
    
    * src/roff/troff/env.cpp (distribute_space): Refactor slightly.
      - Rename `force_reverse` to `force_reverse_node_list`.
      - Rename `reverse` to `do_reverse`.
      - Demote both of the above from `int` to `bool`.
      - Use Boolean literals with them.
      - Add assertions to enforce positive values of `nspaces` and
        `desired_space`.
      - Remove now-rendundant test for `nspaces` being positive.
      - Add explanatory comments.
    
      (environment::wrap_up_field): Update call sites of `distribute_space`
      when non-default value of `force_reverse_node_list` is supplied.

commit 69efbe0a69a8e7de8904d78e3de8c7e8a58a8b92
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Sep 4 23:20:54 2021 +1000

    [troff]: Don't adjust nonadjustable lines.
    
    This means that the direction from which an output line in adjustment
    mode "b" (or its "n" synonym) is filled with supplemental space is not
    changed if that output line does not require adjustment.  This will
    result in whitespace changes to documents using that adjustment mode,
    and these changes will be plainly visible on low-resolution output
    devices like terminals.
    
    To illustrate, in the following "A" means an output line requiring
    adjustment; "F" a line that is "full" and does not; and "L" and "R"
    indicate distribution of adjustment spaces from the left and right,
    respectively.
    
    groff 1.22.4    groff 1.23.0
    ------------    ------------
    A    L          A    L
    A    R          A    R
    F    L          F    R
    A    R          A    L
    
    * src/roff/troff/env.cpp (distribute_space): Return early if either the
      amount of desired space to be distributed or the count of space nodes
      in the output line to distribute it among is zero.
    
    * tmac/tests/an_TH-repairs-ad-damage.sh: Update test to expect space to
      be distributed differently.
    
    Fixes <https://savannah.gnu.org/bugs/?61089> and
    <https://savannah.gnu.org/bugs/index.php?60673>.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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