bugGNU indent - Bugs: bug #48971, Option -fca loses paragraphs in...

 
 

bug #48971: Option -fca loses paragraphs in starred comments.

Submitter:  Donovan Baarda <dbaarda>
Submitted:  Fri 02 Sep 2016 12:48:30 AM UTC
   
 
Category:  C Severity:  3 - Normal
Item Group:  Incorrect Result Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 02 Sep 2016 12:48:30 AM UTC, original submission:  

When reformatting comments with -fca it looses blank line paragraph markers for starred comments. They are preserved for non-starred comments. It happens with both -sc and -nsc output and affects all styles.


$ indent --version
GNU indent 2.2.11

$ cat test-fca.c
 /* This is a description line.
  *
  * This is a very long paragraph that goes past the end of the desired line length.
  *
  * This is a short paragraph
  * that needs to be unwrapped. */

 /* This is a description line.

    This is a very long paragraph that goes past the end of the desired line length.

    This is a short paragraph
    that needs to be unwrapped. */

$ indent -fca -sc <test-fca.c
 /* This is a description line. This is a very long paragraph that goes past
  * the end of the desired line length. This is a short paragraph that needs
  * to be unwrapped. */

 /* This is a description line.
  *
  * This is a very long paragraph that goes past the end of the desired line
  * length.
  *
  * This is a short paragraph that needs to be unwrapped. */

$ indent -fca -nsc <test-fca.c
 /* This is a description line. This is a very long paragraph that goes past
    the end of the desired line length. This is a short paragraph that needs
    to be unwrapped. */

 /* This is a description line.

    This is a very long paragraph that goes past the end of the desired line
    length.

    This is a short paragraph that needs to be unwrapped. */


Note I have worked around this problem and several others using pre/post processing using sed in my tidyc script available at;

https://github.com/dbaarda/tidyc

Donovan Baarda <dbaarda>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by andrewsh (Updated the item)
  • -email is unavailable- added by dbaarda (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-18 andrewsh SummaryOption -fca looses paragraphs in starred comments. Option -fca loses paragraphs in starred comments.

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code