According to http://astyle.sourceforge.net/astyle.html#_delete-empty-lines , "Empty lines outside of functions or methods are NOT deleted."
However when I run the command astyle --delete-empty-lines file_name.c
file_name.c
:::c
int main()
{
int Foo(bool isBar)
{
if (isBar, h)
{
bar();
return 1;
}
else
return 0;
}
int Foo(bool isBar)
{
if (isBar, h)
{
bar();
return 1;
}
else
return 0;
}
return 0;
}
becomes:
:::c
int main()
{
int Foo(bool isBar)
{
if (isBar, h)
{
bar();
return 1;
}
else
return 0;
}
int Foo(bool isBar)
{
if (isBar, h)
{
bar();
return 1;
}
else
return 0;
}
return 0;
}
I am using astyle 3.1 on mac os.
The docs refer to functions in the top level of a file - not nested functions. I will check it in the code or fix the manual.