Reputation: 21
I would like to format my C code to a specific style of function definition like so:
foo.c (where "Arg" is a type/struct)
Example1:
void *
foo(
const Arg *arg1 /**< my arg */
)
{
...
}
Example2
void *
foo(
const Arg *arg1, /**< my arg */
const Arg *arg2 /**< my arg2 */
)
{
...
}
I've tried many combinations of parameters without success... any tips?
Upvotes: 0
Views: 542
Reputation: 13171
I don't see how to do it with clang-format
, but indent
can come pretty close:
indent -i4 -cd24 -blf -bfda file.c
(except for that closing paren--not sure how to do that).
Upvotes: 1