What is your opinion on the subject question? Is it better to indent everything between the braces ?
What do you think about having the first brace at the end of the line above rather than on it's own line?
You always indent another level for another layer of braces. This is a simple example:
Code:
int main(void)
{
//blah
if(something == 5)
{
//blah
if(somethingelse == 7)
{
//bah
}
}
}
annoyingly tabs don't work properly on this forum. But that should be one tab indent per layer. Most programmers (well the open source projects I have looked into) equate one tab with four spaces.
Some people prefer to declare functions like this though:
so you can see the name clearly on the left hand side.
It is just worth reading some coding standards guidelines from some open source projects. I recommend reading through the OpenBSD source code as it is very clear and easy to understand code compared to some other open source projects.