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
