bug-groff
[Top][All Lists]
Advanced

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

[bug #62391] [refer] off-by-one line numbering error in invalid input ch


From: G. Branden Robinson
Subject: [bug #62391] [refer] off-by-one line numbering error in invalid input character diagnostics
Date: Tue, 3 May 2022 14:30:41 -0400 (EDT)

Update of bug #62391 (project groff):

              Item Group:                    None => Incorrect behaviour    
                  Status:             In Progress => Fixed                  
             Open/Closed:                    Open => Closed                 
         Planned Release:                    None => 1.23.0                 

    _______________________________________________________

Follow-up Comment #1:


commit 5383f0ff88aa6622c65837e15b6794120275b77e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun May 1 23:24:07 2022 -0500

    [refer]: Fix Savannah #62391.
    
    [refer]: Fix off-by-one error in line number for some diagnostics.
    
    * src/preproc/refer/command.cpp (input_item::get_location): Decrement
      reported line number by one after looping over input so that we report
      the line number as it was before the last newline character seen.
      This off-by-one error was partially masked by...
    
    * src/preproc/refer/refer.cpp (do_file): ...initialzation of
      `current_lineno` to zero.  However, for syntax problems (as opposed to
      the semantic problems of refer(1) command processing), this could
      result in complaints about the line number before they occurred,
      even on "line zero".  Initialize the variable to 1.
    
    Fixes <https://savannah.gnu.org/bugs/?62391>.

commit 0f0e4cfb3e4b878bfaacb3841c95f9533c25cbb9
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon May 2 08:04:05 2022 -0500

    [refer]: Regression-test Savannah #62391.
    
    * src/preproc/refer/tests/report-correct-line-numbers.sh: Add regression
      test for Savannah #62391.
    
    Test fails at this commit.



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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