-sc -fca doesn't recognize star comment paragraphs
Seth Dickson <[email protected]> Tue, 21 Apr 2015 21:08:55 -0700
| Newsgroups | gmane.comp.gnu.indent.bugs |
|---|---|
| Message-ID | <CAO_mTrJ48bPAd8afCGKH=Cppne-APpM2N85JCHitQOZZk-phyQ@mail.gmail.com> |
I have attached a simple shell script that demonstrates indent incorrectly formatting star comments when -sc and -fca are enabled. I am using indent 2.2.11. _______________________________________________ bug-indent mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-indent
bug.sh
(application/x-sh, 1017 B)
echo writing example file foo.c
echo
sleep 5
cat > foo.c <<EOF
/* test top level comment
second paragraph
formatting for this comment can be enabled using -fc1
*/
/* second level comment
formatting can be enabled using -fca
*/
EOF
cat foo.c
sleep 5
echo
echo format the second level comment with stars
echo
sleep 5
indent -sc -fca foo.c
cat foo.c
sleep 5
echo
echo format the second level comment with stars again
echo this should do nothing, but joins all paragraphs
echo
sleep 5
indent -sc -fca foo.c
cat foo.c
sleep 5
echo
echo format the top level comment with stars
echo
sleep 5
indent -sc -fc1 foo.c
cat foo.c
sleep 5
echo
echo format the top level comment with stars again
echo this should do nothing, and does nothing
echo
sleep 5
indent -sc -fc1 foo.c
cat foo.c
sleep 5
echo
echo format both top and second level comments with stars in one command
echo this should do nothing, but joins all paragraphs in the top level comment
echo
sleep 5
indent -sc -fc1 -fca foo.c
cat foo.c