Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
C Code formatting
1. function pointer:
type (*ptr)(args)
which would be our style, will result in
type (* ptr)(args)
2. multi line function calls
assignement = func(
very_long_arg,
very_long_arg
);
which are fine this way will result in
assignement = func(
very_long_arg,
very_long_arg
);
3. Function implementations should look like
void
functionname(
type param1,
type param2
) {
/* ... */
}
but results in
void
functionname(
type param1,
type param2
)
{
/* ... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment